[{"data":1,"prerenderedAt":4654},["ShallowReactive",2],{"navigation_docs":3,"-docs-architecture-sagas":493,"-docs-architecture-sagas-surround":4649},[4,46,135,218,257,292,355,377,420],{"title":5,"icon":6,"path":7,"stem":8,"children":9,"page":45},"Getting Started","i-lucide-rocket","\u002Fdocs\u002Fgetting-started","docs\u002F01.getting-started",[10,15,20,25,30,35,40],{"title":11,"path":12,"stem":13,"icon":14},"What is Heximon?","\u002Fdocs\u002Fgetting-started\u002Fintroduction","docs\u002F01.getting-started\u002F01.introduction","i-lucide-info",{"title":16,"path":17,"stem":18,"icon":19},"Installation","\u002Fdocs\u002Fgetting-started\u002Finstallation","docs\u002F01.getting-started\u002F02.installation","i-lucide-download",{"title":21,"path":22,"stem":23,"icon":24},"Quick Start","\u002Fdocs\u002Fgetting-started\u002Fquick-start","docs\u002F01.getting-started\u002F03.quick-start","i-lucide-zap",{"title":26,"path":27,"stem":28,"icon":29},"Core Concepts","\u002Fdocs\u002Fgetting-started\u002Fcore-concepts","docs\u002F01.getting-started\u002F04.core-concepts","i-lucide-shapes",{"title":31,"path":32,"stem":33,"icon":34},"Examples","\u002Fdocs\u002Fgetting-started\u002Fexamples","docs\u002F01.getting-started\u002F05.examples","i-lucide-library",{"title":36,"path":37,"stem":38,"icon":39},"Where Next?","\u002Fdocs\u002Fgetting-started\u002Fwhere-next","docs\u002F01.getting-started\u002F06.where-next","i-lucide-signpost",{"title":41,"path":42,"stem":43,"icon":44},"Troubleshooting","\u002Fdocs\u002Fgetting-started\u002Ftroubleshooting","docs\u002F01.getting-started\u002F07.troubleshooting","i-lucide-life-buoy",false,{"title":47,"icon":48,"path":49,"stem":50,"children":51,"page":45},"Essentials","i-lucide-boxes","\u002Fdocs\u002Fessentials","docs\u002F02.essentials",[52,56,61,66,71,76,81,86,91,96,101,105,110,115,120,125,130],{"title":53,"path":54,"stem":55,"icon":48},"Modules & DI","\u002Fdocs\u002Fessentials\u002Fmodules-and-di","docs\u002F02.essentials\u002F01.modules-and-di",{"title":57,"path":58,"stem":59,"icon":60},"Controllers","\u002Fdocs\u002Fessentials\u002Fcontrollers","docs\u002F02.essentials\u002F02.controllers","i-lucide-route",{"title":62,"path":63,"stem":64,"icon":65},"Validation & DTOs","\u002Fdocs\u002Fessentials\u002Fvalidation","docs\u002F02.essentials\u002F03.validation","i-lucide-shield-check",{"title":67,"path":68,"stem":69,"icon":70},"Contracts","\u002Fdocs\u002Fessentials\u002Fcontracts","docs\u002F02.essentials\u002F04.contracts","i-lucide-file-signature",{"title":72,"path":73,"stem":74,"icon":75},"REST Client","\u002Fdocs\u002Fessentials\u002Fclient","docs\u002F02.essentials\u002F05.client","i-lucide-plug",{"title":77,"path":78,"stem":79,"icon":80},"Database","\u002Fdocs\u002Fessentials\u002Fdatabase","docs\u002F02.essentials\u002F06.database","i-lucide-database",{"title":82,"path":83,"stem":84,"icon":85},"Drizzle ORM","\u002Fdocs\u002Fessentials\u002Fdrizzle","docs\u002F02.essentials\u002F07.drizzle","i-lucide-database-zap",{"title":87,"path":88,"stem":89,"icon":90},"Persistence & Transactions","\u002Fdocs\u002Fessentials\u002Fpersistence","docs\u002F02.essentials\u002F08.persistence","i-lucide-database-backup",{"title":92,"path":93,"stem":94,"icon":95},"Migrations","\u002Fdocs\u002Fessentials\u002Fmigrations","docs\u002F02.essentials\u002F09.migrations","i-lucide-git-branch",{"title":97,"path":98,"stem":99,"icon":100},"Authentication","\u002Fdocs\u002Fessentials\u002Fauthentication","docs\u002F02.essentials\u002F10.authentication","i-lucide-key-round",{"title":102,"path":103,"stem":104,"icon":65},"Permissions & scopes","\u002Fdocs\u002Fessentials\u002Fpermissions","docs\u002F02.essentials\u002F11.permissions",{"title":106,"path":107,"stem":108,"icon":109},"Error Handling","\u002Fdocs\u002Fessentials\u002Ferrors","docs\u002F02.essentials\u002F12.errors","i-lucide-triangle-alert",{"title":111,"path":112,"stem":113,"icon":114},"Testing a Heximon App","\u002Fdocs\u002Fessentials\u002Ftesting","docs\u002F02.essentials\u002F13.testing","i-lucide-flask-conical",{"title":116,"path":117,"stem":118,"icon":119},"Test app harness","\u002Fdocs\u002Fessentials\u002Fcreatetestapp","docs\u002F02.essentials\u002F14.createtestapp","i-lucide-test-tube",{"title":121,"path":122,"stem":123,"icon":124},"Logging & Observability","\u002Fdocs\u002Fessentials\u002Flogging","docs\u002F02.essentials\u002F17.logging","i-lucide-scroll-text",{"title":126,"path":127,"stem":128,"icon":129},"Context & Lifecycle","\u002Fdocs\u002Fessentials\u002Fcontext-and-lifecycle","docs\u002F02.essentials\u002F18.context-and-lifecycle","i-lucide-radio",{"title":131,"path":132,"stem":133,"icon":134},"Project Structure","\u002Fdocs\u002Fessentials\u002Fproject-structure","docs\u002F02.essentials\u002F19.project-structure","i-lucide-folder-tree",{"title":136,"icon":137,"path":138,"stem":139,"children":140,"page":45},"Capabilities","i-lucide-sparkles","\u002Fdocs\u002Fcapabilities","docs\u002F03.capabilities",[141,145,150,155,160,164,169,174,179,184,188,193,198,203,208,213],{"title":142,"path":143,"stem":144,"icon":137},"Overview","\u002Fdocs\u002Fcapabilities\u002Foverview","docs\u002F03.capabilities\u002F01.overview",{"title":146,"path":147,"stem":148,"icon":149},"Events","\u002Fdocs\u002Fcapabilities\u002Fevents","docs\u002F03.capabilities\u002F02.events","i-lucide-radio-tower",{"title":151,"path":152,"stem":153,"icon":154},"Queue","\u002Fdocs\u002Fcapabilities\u002Fbackground-jobs","docs\u002F03.capabilities\u002F03.background-jobs","i-lucide-list-ordered",{"title":156,"path":157,"stem":158,"icon":159},"Scheduled Work","\u002Fdocs\u002Fcapabilities\u002Fscheduled-jobs","docs\u002F03.capabilities\u002F04.scheduled-jobs","i-lucide-clock",{"title":161,"path":162,"stem":163,"icon":85},"Caching","\u002Fdocs\u002Fcapabilities\u002Fcaching","docs\u002F03.capabilities\u002F05.caching",{"title":165,"path":166,"stem":167,"icon":168},"Key\u002FValue Storage","\u002Fdocs\u002Fcapabilities\u002Fkey-value","docs\u002F03.capabilities\u002F06.key-value","i-lucide-hard-drive",{"title":170,"path":171,"stem":172,"icon":173},"Blob Storage","\u002Fdocs\u002Fcapabilities\u002Fblob","docs\u002F03.capabilities\u002F07.blob","i-lucide-folder-open",{"title":175,"path":176,"stem":177,"icon":178},"Health & Readiness","\u002Fdocs\u002Fcapabilities\u002Fhealth","docs\u002F03.capabilities\u002F08.health","i-lucide-heart-pulse",{"title":180,"path":181,"stem":182,"icon":183},"Notifications","\u002Fdocs\u002Fcapabilities\u002Fnotifications","docs\u002F03.capabilities\u002F09.notifications","i-lucide-mail",{"title":185,"path":186,"stem":187,"icon":65},"Idempotency","\u002Fdocs\u002Fcapabilities\u002Fidempotency","docs\u002F03.capabilities\u002F10.idempotency",{"title":189,"path":190,"stem":191,"icon":192},"Security Hardening","\u002Fdocs\u002Fcapabilities\u002Fsecurity","docs\u002F03.capabilities\u002F11.security","i-lucide-shield",{"title":194,"path":195,"stem":196,"icon":197},"Observability & Tracing","\u002Fdocs\u002Fcapabilities\u002Fobservability","docs\u002F03.capabilities\u002F12.observability","i-lucide-activity",{"title":199,"path":200,"stem":201,"icon":202},"OpenAPI","\u002Fdocs\u002Fcapabilities\u002Fopenapi","docs\u002F03.capabilities\u002F13.openapi","i-lucide-book-marked",{"title":204,"path":205,"stem":206,"icon":207},"MCP Server","\u002Fdocs\u002Fcapabilities\u002Fmcp","docs\u002F03.capabilities\u002F14.mcp","i-lucide-bot",{"title":209,"path":210,"stem":211,"icon":212},"Schema DTOs","\u002Fdocs\u002Fcapabilities\u002Fschema","docs\u002F03.capabilities\u002F15.schema","i-lucide-file-json",{"title":214,"path":215,"stem":216,"icon":217},"Branded IDs","\u002Fdocs\u002Fcapabilities\u002Fbranded-ids","docs\u002F03.capabilities\u002F16.branded-ids","i-lucide-tag",{"title":219,"icon":220,"path":221,"stem":222,"children":223,"page":45},"Architecture","i-lucide-building","\u002Fdocs\u002Farchitecture","docs\u002F04.architecture",[224,227,232,237,242,247,252],{"title":142,"path":225,"stem":226,"icon":220},"\u002Fdocs\u002Farchitecture\u002Foverview","docs\u002F04.architecture\u002F01.overview",{"title":228,"path":229,"stem":230,"icon":231},"Domain-Driven Design","\u002Fdocs\u002Farchitecture\u002Fddd","docs\u002F04.architecture\u002F02.ddd","i-lucide-hexagon",{"title":233,"path":234,"stem":235,"icon":236},"CQRS","\u002Fdocs\u002Farchitecture\u002Fcqrs","docs\u002F04.architecture\u002F03.cqrs","i-lucide-split",{"title":238,"path":239,"stem":240,"icon":241},"Repository Pattern","\u002Fdocs\u002Farchitecture\u002Frepository-pattern","docs\u002F04.architecture\u002F04.repository-pattern","i-lucide-archive",{"title":243,"path":244,"stem":245,"icon":246},"Integration Events","\u002Fdocs\u002Farchitecture\u002Fintegration-events","docs\u002F04.architecture\u002F05.integration-events","i-lucide-send-horizontal",{"title":248,"path":249,"stem":250,"icon":251},"Saga Orchestration","\u002Fdocs\u002Farchitecture\u002Fsagas","docs\u002F04.architecture\u002F06.sagas","i-lucide-hourglass",{"title":253,"path":254,"stem":255,"icon":256},"Durable Workflows","\u002Fdocs\u002Farchitecture\u002Fworkflows","docs\u002F04.architecture\u002F07.workflows","i-lucide-workflow",{"title":258,"icon":259,"path":260,"stem":261,"children":262,"page":45},"Realtime","i-lucide-cable","\u002Fdocs\u002Frealtime","docs\u002F05.realtime",[263,266,270,274,279,284,288],{"title":142,"path":264,"stem":265,"icon":259},"\u002Fdocs\u002Frealtime\u002Foverview","docs\u002F05.realtime\u002F01.overview",{"title":267,"path":268,"stem":269,"icon":129},"WebSockets","\u002Fdocs\u002Frealtime\u002Fwebsockets","docs\u002F05.realtime\u002F02.websockets",{"title":271,"path":272,"stem":273,"icon":70},"WebSocket Contracts","\u002Fdocs\u002Frealtime\u002Fwebsocket-contracts","docs\u002F05.realtime\u002F03.websocket-contracts",{"title":275,"path":276,"stem":277,"icon":278},"Server-Sent Events","\u002Fdocs\u002Frealtime\u002Fserver-sent-events","docs\u002F05.realtime\u002F04.server-sent-events","i-lucide-rss",{"title":280,"path":281,"stem":282,"icon":283},"Typed Clients","\u002Fdocs\u002Frealtime\u002Ftyped-clients","docs\u002F05.realtime\u002F05.typed-clients","i-lucide-plug-zap",{"title":285,"path":286,"stem":287,"icon":259},"AsyncAPI","\u002Fdocs\u002Frealtime\u002Fasyncapi","docs\u002F05.realtime\u002F06.asyncapi",{"title":289,"path":290,"stem":291,"icon":80},"Durable Objects","\u002Fdocs\u002Frealtime\u002Fdurable-objects","docs\u002F05.realtime\u002F07.durable-objects",{"title":293,"icon":294,"path":295,"stem":296,"children":297,"page":45},"Deploy","i-lucide-cloud-upload","\u002Fdocs\u002Fdeploy","docs\u002F06.deploy",[298,301,306,311,316,321,326,331,336,341,345,350],{"title":142,"path":299,"stem":300,"icon":6},"\u002Fdocs\u002Fdeploy\u002Foverview","docs\u002F06.deploy\u002F01.overview",{"title":302,"path":303,"stem":304,"icon":305},"Node","\u002Fdocs\u002Fdeploy\u002Fnode","docs\u002F06.deploy\u002F02.node","la:node-js",{"title":307,"path":308,"stem":309,"icon":310},"Cloudflare","\u002Fdocs\u002Fdeploy\u002Fcloudflare","docs\u002F06.deploy\u002F03.cloudflare","simple-icons:cloudflare",{"title":312,"path":313,"stem":314,"icon":315},"Vercel","\u002Fdocs\u002Fdeploy\u002Fvercel","docs\u002F06.deploy\u002F04.vercel","ri:vercel-fill",{"title":317,"path":318,"stem":319,"icon":320},"Netlify","\u002Fdocs\u002Fdeploy\u002Fnetlify","docs\u002F06.deploy\u002F05.netlify","i-simple-icons-netlify",{"title":322,"path":323,"stem":324,"icon":325},"AWS Lambda","\u002Fdocs\u002Fdeploy\u002Faws-lambda","docs\u002F06.deploy\u002F06.aws-lambda","hugeicons:aws-lambda",{"title":327,"path":328,"stem":329,"icon":330},"Deno Deploy","\u002Fdocs\u002Fdeploy\u002Fdeno-deploy","docs\u002F06.deploy\u002F07.deno-deploy","simple-icons:denodeploy",{"title":332,"path":333,"stem":334,"icon":335},"Nitro","\u002Fdocs\u002Fdeploy\u002Fnitro","docs\u002F06.deploy\u002F08.nitro","i-unjs-nitro",{"title":337,"path":338,"stem":339,"icon":340},"Nuxt","\u002Fdocs\u002Fdeploy\u002Fnuxt","docs\u002F06.deploy\u002F09.nuxt","i-devicon-nuxt",{"title":342,"path":343,"stem":344,"icon":236},"Mixed-runtime split","\u002Fdocs\u002Fdeploy\u002Fmixed-runtime-split","docs\u002F06.deploy\u002F10.mixed-runtime-split",{"title":346,"path":347,"stem":348,"icon":349},"Hosts","\u002Fdocs\u002Fdeploy\u002Fhosts","docs\u002F06.deploy\u002F11.hosts","i-lucide-map",{"title":351,"path":352,"stem":353,"icon":354},"Cross-service events","\u002Fdocs\u002Fdeploy\u002Fcross-service-events","docs\u002F06.deploy\u002F12.cross-service-events","i-lucide-network",{"title":356,"icon":357,"path":358,"stem":359,"children":360,"page":45},"CLI","i-lucide-terminal","\u002Fdocs\u002Fcli","docs\u002F07.cli",[361,365,369,373],{"title":362,"path":363,"stem":364,"icon":357},"The heximon CLI","\u002Fdocs\u002Fcli\u002Foverview","docs\u002F07.cli\u002F01.overview",{"title":366,"path":367,"stem":368,"icon":137},"Create a New App","\u002Fdocs\u002Fcli\u002Fcreate","docs\u002F07.cli\u002F02.create",{"title":370,"path":371,"stem":372,"icon":95},"Migrations from the CLI","\u002Fdocs\u002Fcli\u002Fmigrations","docs\u002F07.cli\u002F03.migrations",{"title":374,"path":375,"stem":376,"icon":6},"Deploying a Heximon app","\u002Fdocs\u002Fcli\u002Fdeploy","docs\u002F07.cli\u002F04.deploy",{"title":378,"icon":379,"path":380,"stem":381,"children":382,"page":45},"Under the Hood","i-lucide-wrench","\u002Fdocs\u002Funder-the-hood","docs\u002F08.under-the-hood",[383,388,393,397,402,407,411,415],{"title":384,"path":385,"stem":386,"icon":387},"How the Compiler Works","\u002Fdocs\u002Funder-the-hood\u002Fhow-the-compiler-works","docs\u002F08.under-the-hood\u002F01.how-the-compiler-works","i-lucide-cog",{"title":389,"path":390,"stem":391,"icon":392},"Compiler","\u002Fdocs\u002Funder-the-hood\u002Fextending-the-compiler","docs\u002F08.under-the-hood\u002F02.extending-the-compiler","i-lucide-cpu",{"title":394,"path":395,"stem":396,"icon":357},"Compiler Diagnostics","\u002Fdocs\u002Funder-the-hood\u002Fcompiler-diagnostics","docs\u002F08.under-the-hood\u002F03.compiler-diagnostics",{"title":398,"path":399,"stem":400,"icon":401},"Library Mode","\u002Fdocs\u002Funder-the-hood\u002Flibrary-mode","docs\u002F08.under-the-hood\u002F04.library-mode","i-lucide-package",{"title":403,"path":404,"stem":405,"icon":406},"Other bundlers","\u002Fdocs\u002Funder-the-hood\u002Falternate-bundlers","docs\u002F08.under-the-hood\u002F05.alternate-bundlers","i-lucide-blocks",{"title":408,"path":409,"stem":410,"icon":401},"Packages","\u002Fdocs\u002Funder-the-hood\u002Fpackages","docs\u002F08.under-the-hood\u002F06.packages",{"title":412,"path":413,"stem":414,"icon":207},"AI Skills","\u002Fdocs\u002Funder-the-hood\u002Fai-and-agents","docs\u002F08.under-the-hood\u002F07.ai-and-agents",{"title":416,"path":417,"stem":418,"icon":419},"Advanced DI","\u002Fdocs\u002Funder-the-hood\u002Fadvanced-di","docs\u002F08.under-the-hood\u002F08.advanced-di","i-lucide-git-fork",{"title":421,"icon":422,"path":423,"stem":424,"children":425,"page":45},"Recipes","i-lucide-book-open-check","\u002Fdocs\u002Frecipes","docs\u002F09.recipes",[426,431,436,440,444,448,452,456,460,465,469,474,479,484,488],{"title":427,"path":428,"stem":429,"icon":430},"Send an Email","\u002Fdocs\u002Frecipes\u002Fsend-an-email","docs\u002F09.recipes\u002F01.send-an-email","i-lucide-send",{"title":432,"path":433,"stem":434,"icon":435},"Upload a File","\u002Fdocs\u002Frecipes\u002Fupload-a-file","docs\u002F09.recipes\u002F02.upload-a-file","i-lucide-upload",{"title":437,"path":438,"stem":439,"icon":24},"Cache an Expensive Call","\u002Fdocs\u002Frecipes\u002Fcache-an-expensive-call","docs\u002F09.recipes\u002F03.cache-an-expensive-call",{"title":441,"path":442,"stem":443,"icon":154},"Paginate a List","\u002Fdocs\u002Frecipes\u002Fpaginate-a-list","docs\u002F09.recipes\u002F04.paginate-a-list",{"title":445,"path":446,"stem":447,"icon":65},"Protect Admin Routes","\u002Fdocs\u002Frecipes\u002Fprotect-admin-routes","docs\u002F09.recipes\u002F05.protect-admin-routes",{"title":449,"path":450,"stem":451,"icon":178},"Health Probes and a Nightly Job","\u002Fdocs\u002Frecipes\u002Fhealth-probes-and-a-nightly-job","docs\u002F09.recipes\u002F06.health-probes-and-a-nightly-job",{"title":453,"path":454,"stem":455,"icon":80},"Build a CRUD API","\u002Fdocs\u002Frecipes\u002Fcrud-api","docs\u002F09.recipes\u002F07.crud-api",{"title":457,"path":458,"stem":459,"icon":100},"Add Authentication","\u002Fdocs\u002Frecipes\u002Fadd-authentication","docs\u002F09.recipes\u002F08.add-authentication",{"title":461,"path":462,"stem":463,"icon":464},"Background Jobs","\u002Fdocs\u002Frecipes\u002Fbackground-jobs","docs\u002F09.recipes\u002F09.background-jobs","i-lucide-timer",{"title":466,"path":467,"stem":468,"icon":149},"Decouple Features with Events","\u002Fdocs\u002Frecipes\u002Fevent-driven-module","docs\u002F09.recipes\u002F10.event-driven-module",{"title":470,"path":471,"stem":472,"icon":473},"Build a DDD Aggregate","\u002Fdocs\u002Frecipes\u002Fddd-aggregate","docs\u002F09.recipes\u002F11.ddd-aggregate","i-lucide-box",{"title":475,"path":476,"stem":477,"icon":478},"Publish a Feature Package","\u002Fdocs\u002Frecipes\u002Ffeature-package","docs\u002F09.recipes\u002F12.feature-package","i-lucide-package-open",{"title":480,"path":481,"stem":482,"icon":483},"Reliable Integration Events","\u002Fdocs\u002Frecipes\u002Freliable-integration-events","docs\u002F09.recipes\u002F13.reliable-integration-events","i-lucide-inbox",{"title":485,"path":486,"stem":487,"icon":95},"Reactive Choreography","\u002Fdocs\u002Frecipes\u002Freactive-choreography","docs\u002F09.recipes\u002F14.reactive-choreography",{"title":489,"path":490,"stem":491,"icon":492},"Build a Production CRUD API","\u002Fdocs\u002Frecipes\u002Fproduction-crud-api","docs\u002F09.recipes\u002F15.production-crud-api","i-lucide-layers",{"id":494,"title":248,"body":495,"description":4642,"extension":4643,"links":4644,"meta":4645,"navigation":4646,"path":249,"seo":4647,"stem":250,"__hash__":4648},"docs\u002Fdocs\u002F04.architecture\u002F06.sagas.md",{"type":496,"value":497,"toc":4628},"minimark",[498,502,514,532,537,540,643,657,683,687,704,1552,1558,1562,1577,1589,1786,1806,1837,1841,1855,2400,2404,2410,2805,2819,2823,2842,2848,3357,3362,3366,3391,3405,3583,3586,3744,3762,3766,3806,4259,4276,4459,4503,4506,4517,4521,4545,4552,4556,4564,4568,4624],[499,500,501],"p",{},"Reactive choreography handles multi-step flows well when every step either succeeds or is compensated by a\ndownstream event. One pattern it cannot express without external help is a deadline: \"if payment is not confirmed\nwithin 30 seconds, cancel the reservation and the order.\" That requires a clock that survives process restarts.",[499,503,504,505,509,510,513],{},"Heximon's ",[506,507,508],"code",{},"@heximon\u002Fsaga"," package provides that clock as ",[506,511,512],{},"DurableTimer"," — a one-shot deadline that commits to a\ndatabase row inside the same transaction as the saga state write, fires when it elapses, and delivers its payload\nas an ordinary integration event.",[499,515,516,519,520,523,524,527,528,531],{},[506,517,518],{},"SagaTimer"," is the typed injectable veneer you author against: it encapsulates the identity and channel\ncomputation, so your handlers never hand-build a ",[506,521,522],{},"WakeupRequest"," or recompute a channel string. No ",[506,525,526],{},"setAlarm",",\nno ",[506,529,530],{},"step.sleep",", no external scheduler.",[533,534,536],"h2",{"id":535},"the-mental-model","The mental model",[499,538,539],{},"The saga pattern names its two ingredients:",[541,542,543,577,625],"ul",{},[544,545,546,550,551,554,555,558,559,562,563,566,567,566,570,566,573,576],"li",{},[547,548,549],"strong",{},"A process-state aggregate"," — an ",[506,552,553],{},"AggregateRoot"," whose ",[506,556,557],{},"id"," is the correlation key (e.g. the ",[506,560,561],{},"orderId","). It\nholds the current step of the orchestration (",[506,564,565],{},"placed",", ",[506,568,569],{},"awaiting-payment",[506,571,572],{},"completed",[506,574,575],{},"cancelled",") and\nenforces that transitions happen in the only legal order. Each transition is version-guarded: a re-delivered\nintegration event that finds the aggregate already past its expected step throws, and the retry loop absorbs the\nthrow as a duplicate.",[544,578,579,585,586,589,590,593,594,597,598,601,602,605,606,609,610,613,614,617,618,621,622,624],{},[547,580,581,582,584],{},"A ",[506,583,518],{}," subclass"," — one per deadline slot. Declare it with a ",[506,587,588],{},"slot"," field; list it under\n",[506,591,592],{},"saga: { timers }",", and inject it into any handler that needs to arm or cancel that deadline. Call\n",[506,595,596],{},"arm(correlationKey, payload, after)"," inside a transaction and the timer row commits atomically with the saga\nwrite. ",[506,599,600],{},"cancel(correlationKey)"," removes it the same way.",[603,604],"br",{},"When the deadline elapses the payload is re-emitted on the ",[506,607,608],{},"\"saga.timeout.\u003Cslot>\""," channel and the bound\n",[506,611,612],{},"TimeoutHandler\u003CYourTimer>"," receives it through the same ",[506,615,616],{},"\"queue:channel\""," fan-out integration events use. The\nslot is declared ",[547,619,620],{},"once"," — the ",[506,623,588],{}," field, which the compiler reads off the discovered timer and the\nruntime uses to arm\u002Fcancel — so there is no string-slot argument to keep in sync.",[544,626,627,631,632,635,636,638,639,642],{},[547,628,581,629],{},[506,630,612],{}," — the consumer side. Linked to the timer by class identity\n(",[506,633,634],{},"TimeoutHandler\u003COrderPaymentDeadline>","), not a string literal slot. The payload type is inferred from the\ntimer, and the dispatch channel is computed by the compiler from the bound timer's ",[506,637,588],{}," field.\nThe stale-timeout guard in the ",[506,640,641],{},"TimeoutHandler"," is the same idempotency guard every integration-event handler\nuses: load the aggregate, check its step, return early if the transition no longer applies.",[499,644,645,647,648,650,651,653,654,656],{},[506,646,518],{}," delegates to the lower-level ",[506,649,512],{}," abstract port under the hood — inject ",[506,652,512],{},"\ndirectly only if you need a custom arming shape; standard saga authoring stays on ",[506,655,518],{},".",[499,658,659,660,667,668,671,672,671,675,678,679,682],{},"Payloads are persisted with ",[661,662,666],"a",{"href":663,"rel":664},"https:\u002F\u002Fgithub.com\u002FRich-Harris\u002Fdevalue",[665],"nofollow","devalue",", so a ",[506,669,670],{},"Date"," \u002F ",[506,673,674],{},"Map",[506,676,677],{},"Set"," \u002F\n",[506,680,681],{},"BigInt"," fires with the type it was armed with; a non-plain payload (a class instance, a function) throws at arm\ntime rather than degrading silently — arm with plain data.",[533,684,686],{"id":685},"declare-the-process-aggregate","Declare the process aggregate",[499,688,689,690,693,694,696,697,699,700,703],{},"An ",[506,691,692],{},"OrderSaga"," aggregate owns the orchestration state. Its ",[506,695,557],{}," is the ",[506,698,561],{}," — the same value used as the\ntimer's ",[506,701,702],{},"correlationKey",", so the deadline is addressed by the order it guards:",[705,706,712],"pre",{"className":707,"code":708,"filename":709,"language":710,"meta":711,"style":711},"language-ts shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","import type { Branded } from \"@heximon\u002Fprimitives\";\nimport { ConflictError } from \"@heximon\u002Fruntime\u002Ferrors\";\nimport { AggregateRoot } from \"@heximon\u002Fdomain\";\n\nexport type OrderSagaId = Branded\u003Cstring, \"OrderSagaId\">;\n\nexport type OrderSagaStep = \"placed\" | \"awaiting-payment\" | \"completed\" | \"cancelled\";\n\ninterface OrderSagaProps extends Record\u003Cstring, unknown> {\n  step: OrderSagaStep;\n}\n\nexport class OrderSaga extends AggregateRoot\u003COrderSagaProps, OrderSagaId> {\n  public static start(id: OrderSagaId): OrderSaga {\n    return new OrderSaga(id, { step: \"placed\" });\n  }\n\n  public get step(): OrderSagaStep {\n    return this.props.step;\n  }\n\n  public isAwaitingPayment(): boolean {\n    return this.props.step === \"awaiting-payment\";\n  }\n\n  public awaitPayment(): void {\n    this.assertStep(\"placed\", \"awaitPayment\");\n    this.props.step = \"awaiting-payment\";\n  }\n\n  public complete(): void {\n    this.assertStep(\"awaiting-payment\", \"complete\");\n    this.props.step = \"completed\";\n  }\n\n  public cancel(): void {\n    this.assertStep(\"awaiting-payment\", \"cancel\");\n    this.props.step = \"cancelled\";\n  }\n\n  private assertStep(expected: OrderSagaStep, transition: string): void {\n    if (this.props.step !== expected) {\n      throw new ConflictError(\n        `OrderSaga ${this.id}: cannot ${transition} from step \"${this.props.step}\" ` +\n          `(expected \"${expected}\")`,\n      );\n    }\n  }\n}\n","saga\u002Forder-saga.entity.ts","ts","",[506,713,714,753,776,799,806,843,848,893,898,928,942,948,953,981,1010,1048,1054,1059,1076,1094,1099,1104,1119,1143,1148,1153,1168,1198,1219,1224,1229,1243,1271,1292,1297,1302,1316,1344,1365,1370,1375,1409,1439,1452,1505,1528,1536,1542,1547],{"__ignoreMap":711},[715,716,719,723,726,730,734,737,740,743,747,750],"span",{"class":717,"line":718},"line",1,[715,720,722],{"class":721},"s7zQu","import",[715,724,725],{"class":721}," type",[715,727,729],{"class":728},"sMK4o"," {",[715,731,733],{"class":732},"sTEyZ"," Branded",[715,735,736],{"class":728}," }",[715,738,739],{"class":721}," from",[715,741,742],{"class":728}," \"",[715,744,746],{"class":745},"sfazB","@heximon\u002Fprimitives",[715,748,749],{"class":728},"\"",[715,751,752],{"class":728},";\n",[715,754,756,758,760,763,765,767,769,772,774],{"class":717,"line":755},2,[715,757,722],{"class":721},[715,759,729],{"class":728},[715,761,762],{"class":732}," ConflictError",[715,764,736],{"class":728},[715,766,739],{"class":721},[715,768,742],{"class":728},[715,770,771],{"class":745},"@heximon\u002Fruntime\u002Ferrors",[715,773,749],{"class":728},[715,775,752],{"class":728},[715,777,779,781,783,786,788,790,792,795,797],{"class":717,"line":778},3,[715,780,722],{"class":721},[715,782,729],{"class":728},[715,784,785],{"class":732}," AggregateRoot",[715,787,736],{"class":728},[715,789,739],{"class":721},[715,791,742],{"class":728},[715,793,794],{"class":745},"@heximon\u002Fdomain",[715,796,749],{"class":728},[715,798,752],{"class":728},[715,800,802],{"class":717,"line":801},4,[715,803,805],{"emptyLinePlaceholder":804},true,"\n",[715,807,809,812,815,819,822,824,827,830,833,835,838,840],{"class":717,"line":808},5,[715,810,811],{"class":721},"export",[715,813,725],{"class":814},"spNyl",[715,816,818],{"class":817},"sBMFI"," OrderSagaId",[715,820,821],{"class":728}," =",[715,823,733],{"class":817},[715,825,826],{"class":728},"\u003C",[715,828,829],{"class":817},"string",[715,831,832],{"class":728},",",[715,834,742],{"class":728},[715,836,837],{"class":745},"OrderSagaId",[715,839,749],{"class":728},[715,841,842],{"class":728},">;\n",[715,844,846],{"class":717,"line":845},6,[715,847,805],{"emptyLinePlaceholder":804},[715,849,851,853,855,858,860,862,864,866,869,871,873,875,877,879,881,883,885,887,889,891],{"class":717,"line":850},7,[715,852,811],{"class":721},[715,854,725],{"class":814},[715,856,857],{"class":817}," OrderSagaStep",[715,859,821],{"class":728},[715,861,742],{"class":728},[715,863,565],{"class":745},[715,865,749],{"class":728},[715,867,868],{"class":728}," |",[715,870,742],{"class":728},[715,872,569],{"class":745},[715,874,749],{"class":728},[715,876,868],{"class":728},[715,878,742],{"class":728},[715,880,572],{"class":745},[715,882,749],{"class":728},[715,884,868],{"class":728},[715,886,742],{"class":728},[715,888,575],{"class":745},[715,890,749],{"class":728},[715,892,752],{"class":728},[715,894,896],{"class":717,"line":895},8,[715,897,805],{"emptyLinePlaceholder":804},[715,899,901,904,907,910,913,915,917,919,922,925],{"class":717,"line":900},9,[715,902,903],{"class":814},"interface",[715,905,906],{"class":817}," OrderSagaProps",[715,908,909],{"class":814}," extends",[715,911,912],{"class":817}," Record",[715,914,826],{"class":728},[715,916,829],{"class":817},[715,918,832],{"class":728},[715,920,921],{"class":817}," unknown",[715,923,924],{"class":728},">",[715,926,927],{"class":728}," {\n",[715,929,931,935,938,940],{"class":717,"line":930},10,[715,932,934],{"class":933},"swJcz","  step",[715,936,937],{"class":728},":",[715,939,857],{"class":817},[715,941,752],{"class":728},[715,943,945],{"class":717,"line":944},11,[715,946,947],{"class":728},"}\n",[715,949,951],{"class":717,"line":950},12,[715,952,805],{"emptyLinePlaceholder":804},[715,954,956,958,961,964,966,968,970,973,975,977,979],{"class":717,"line":955},13,[715,957,811],{"class":721},[715,959,960],{"class":814}," class",[715,962,963],{"class":817}," OrderSaga",[715,965,909],{"class":814},[715,967,785],{"class":817},[715,969,826],{"class":728},[715,971,972],{"class":817},"OrderSagaProps",[715,974,832],{"class":728},[715,976,818],{"class":817},[715,978,924],{"class":728},[715,980,927],{"class":728},[715,982,984,987,990,993,996,999,1001,1003,1006,1008],{"class":717,"line":983},14,[715,985,986],{"class":814},"  public",[715,988,989],{"class":814}," static",[715,991,992],{"class":933}," start",[715,994,995],{"class":728},"(",[715,997,557],{"class":998},"sHdIc",[715,1000,937],{"class":728},[715,1002,818],{"class":817},[715,1004,1005],{"class":728},"):",[715,1007,963],{"class":817},[715,1009,927],{"class":728},[715,1011,1013,1016,1019,1022,1024,1026,1028,1030,1033,1035,1037,1039,1041,1043,1046],{"class":717,"line":1012},15,[715,1014,1015],{"class":721},"    return",[715,1017,1018],{"class":728}," new",[715,1020,963],{"class":1021},"s2Zo4",[715,1023,995],{"class":933},[715,1025,557],{"class":732},[715,1027,832],{"class":728},[715,1029,729],{"class":728},[715,1031,1032],{"class":933}," step",[715,1034,937],{"class":728},[715,1036,742],{"class":728},[715,1038,565],{"class":745},[715,1040,749],{"class":728},[715,1042,736],{"class":728},[715,1044,1045],{"class":933},")",[715,1047,752],{"class":728},[715,1049,1051],{"class":717,"line":1050},16,[715,1052,1053],{"class":728},"  }\n",[715,1055,1057],{"class":717,"line":1056},17,[715,1058,805],{"emptyLinePlaceholder":804},[715,1060,1062,1064,1067,1069,1072,1074],{"class":717,"line":1061},18,[715,1063,986],{"class":814},[715,1065,1066],{"class":814}," get",[715,1068,1032],{"class":933},[715,1070,1071],{"class":728},"():",[715,1073,857],{"class":817},[715,1075,927],{"class":728},[715,1077,1079,1081,1084,1087,1089,1092],{"class":717,"line":1078},19,[715,1080,1015],{"class":721},[715,1082,1083],{"class":728}," this.",[715,1085,1086],{"class":732},"props",[715,1088,656],{"class":728},[715,1090,1091],{"class":732},"step",[715,1093,752],{"class":728},[715,1095,1097],{"class":717,"line":1096},20,[715,1098,1053],{"class":728},[715,1100,1102],{"class":717,"line":1101},21,[715,1103,805],{"emptyLinePlaceholder":804},[715,1105,1107,1109,1112,1114,1117],{"class":717,"line":1106},22,[715,1108,986],{"class":814},[715,1110,1111],{"class":933}," isAwaitingPayment",[715,1113,1071],{"class":728},[715,1115,1116],{"class":817}," boolean",[715,1118,927],{"class":728},[715,1120,1122,1124,1126,1128,1130,1132,1135,1137,1139,1141],{"class":717,"line":1121},23,[715,1123,1015],{"class":721},[715,1125,1083],{"class":728},[715,1127,1086],{"class":732},[715,1129,656],{"class":728},[715,1131,1091],{"class":732},[715,1133,1134],{"class":728}," ===",[715,1136,742],{"class":728},[715,1138,569],{"class":745},[715,1140,749],{"class":728},[715,1142,752],{"class":728},[715,1144,1146],{"class":717,"line":1145},24,[715,1147,1053],{"class":728},[715,1149,1151],{"class":717,"line":1150},25,[715,1152,805],{"emptyLinePlaceholder":804},[715,1154,1156,1158,1161,1163,1166],{"class":717,"line":1155},26,[715,1157,986],{"class":814},[715,1159,1160],{"class":933}," awaitPayment",[715,1162,1071],{"class":728},[715,1164,1165],{"class":817}," void",[715,1167,927],{"class":728},[715,1169,1171,1174,1177,1179,1181,1183,1185,1187,1189,1192,1194,1196],{"class":717,"line":1170},27,[715,1172,1173],{"class":728},"    this.",[715,1175,1176],{"class":1021},"assertStep",[715,1178,995],{"class":933},[715,1180,749],{"class":728},[715,1182,565],{"class":745},[715,1184,749],{"class":728},[715,1186,832],{"class":728},[715,1188,742],{"class":728},[715,1190,1191],{"class":745},"awaitPayment",[715,1193,749],{"class":728},[715,1195,1045],{"class":933},[715,1197,752],{"class":728},[715,1199,1201,1203,1205,1207,1209,1211,1213,1215,1217],{"class":717,"line":1200},28,[715,1202,1173],{"class":728},[715,1204,1086],{"class":732},[715,1206,656],{"class":728},[715,1208,1091],{"class":732},[715,1210,821],{"class":728},[715,1212,742],{"class":728},[715,1214,569],{"class":745},[715,1216,749],{"class":728},[715,1218,752],{"class":728},[715,1220,1222],{"class":717,"line":1221},29,[715,1223,1053],{"class":728},[715,1225,1227],{"class":717,"line":1226},30,[715,1228,805],{"emptyLinePlaceholder":804},[715,1230,1232,1234,1237,1239,1241],{"class":717,"line":1231},31,[715,1233,986],{"class":814},[715,1235,1236],{"class":933}," complete",[715,1238,1071],{"class":728},[715,1240,1165],{"class":817},[715,1242,927],{"class":728},[715,1244,1246,1248,1250,1252,1254,1256,1258,1260,1262,1265,1267,1269],{"class":717,"line":1245},32,[715,1247,1173],{"class":728},[715,1249,1176],{"class":1021},[715,1251,995],{"class":933},[715,1253,749],{"class":728},[715,1255,569],{"class":745},[715,1257,749],{"class":728},[715,1259,832],{"class":728},[715,1261,742],{"class":728},[715,1263,1264],{"class":745},"complete",[715,1266,749],{"class":728},[715,1268,1045],{"class":933},[715,1270,752],{"class":728},[715,1272,1274,1276,1278,1280,1282,1284,1286,1288,1290],{"class":717,"line":1273},33,[715,1275,1173],{"class":728},[715,1277,1086],{"class":732},[715,1279,656],{"class":728},[715,1281,1091],{"class":732},[715,1283,821],{"class":728},[715,1285,742],{"class":728},[715,1287,572],{"class":745},[715,1289,749],{"class":728},[715,1291,752],{"class":728},[715,1293,1295],{"class":717,"line":1294},34,[715,1296,1053],{"class":728},[715,1298,1300],{"class":717,"line":1299},35,[715,1301,805],{"emptyLinePlaceholder":804},[715,1303,1305,1307,1310,1312,1314],{"class":717,"line":1304},36,[715,1306,986],{"class":814},[715,1308,1309],{"class":933}," cancel",[715,1311,1071],{"class":728},[715,1313,1165],{"class":817},[715,1315,927],{"class":728},[715,1317,1319,1321,1323,1325,1327,1329,1331,1333,1335,1338,1340,1342],{"class":717,"line":1318},37,[715,1320,1173],{"class":728},[715,1322,1176],{"class":1021},[715,1324,995],{"class":933},[715,1326,749],{"class":728},[715,1328,569],{"class":745},[715,1330,749],{"class":728},[715,1332,832],{"class":728},[715,1334,742],{"class":728},[715,1336,1337],{"class":745},"cancel",[715,1339,749],{"class":728},[715,1341,1045],{"class":933},[715,1343,752],{"class":728},[715,1345,1347,1349,1351,1353,1355,1357,1359,1361,1363],{"class":717,"line":1346},38,[715,1348,1173],{"class":728},[715,1350,1086],{"class":732},[715,1352,656],{"class":728},[715,1354,1091],{"class":732},[715,1356,821],{"class":728},[715,1358,742],{"class":728},[715,1360,575],{"class":745},[715,1362,749],{"class":728},[715,1364,752],{"class":728},[715,1366,1368],{"class":717,"line":1367},39,[715,1369,1053],{"class":728},[715,1371,1373],{"class":717,"line":1372},40,[715,1374,805],{"emptyLinePlaceholder":804},[715,1376,1378,1381,1384,1386,1389,1391,1393,1395,1398,1400,1403,1405,1407],{"class":717,"line":1377},41,[715,1379,1380],{"class":814},"  private",[715,1382,1383],{"class":933}," assertStep",[715,1385,995],{"class":728},[715,1387,1388],{"class":998},"expected",[715,1390,937],{"class":728},[715,1392,857],{"class":817},[715,1394,832],{"class":728},[715,1396,1397],{"class":998}," transition",[715,1399,937],{"class":728},[715,1401,1402],{"class":817}," string",[715,1404,1005],{"class":728},[715,1406,1165],{"class":817},[715,1408,927],{"class":728},[715,1410,1412,1415,1418,1421,1423,1425,1427,1430,1433,1436],{"class":717,"line":1411},42,[715,1413,1414],{"class":721},"    if",[715,1416,1417],{"class":933}," (",[715,1419,1420],{"class":728},"this.",[715,1422,1086],{"class":732},[715,1424,656],{"class":728},[715,1426,1091],{"class":732},[715,1428,1429],{"class":728}," !==",[715,1431,1432],{"class":732}," expected",[715,1434,1435],{"class":933},") ",[715,1437,1438],{"class":728},"{\n",[715,1440,1442,1445,1447,1449],{"class":717,"line":1441},43,[715,1443,1444],{"class":721},"      throw",[715,1446,1018],{"class":728},[715,1448,762],{"class":1021},[715,1450,1451],{"class":933},"(\n",[715,1453,1455,1458,1461,1464,1466,1468,1471,1474,1476,1479,1481,1484,1486,1488,1490,1492,1494,1496,1499,1502],{"class":717,"line":1454},44,[715,1456,1457],{"class":728},"        `",[715,1459,1460],{"class":745},"OrderSaga ",[715,1462,1463],{"class":728},"${",[715,1465,1420],{"class":728},[715,1467,557],{"class":732},[715,1469,1470],{"class":728},"}",[715,1472,1473],{"class":745},": cannot ",[715,1475,1463],{"class":728},[715,1477,1478],{"class":732},"transition",[715,1480,1470],{"class":728},[715,1482,1483],{"class":745}," from step \"",[715,1485,1463],{"class":728},[715,1487,1420],{"class":728},[715,1489,1086],{"class":732},[715,1491,656],{"class":728},[715,1493,1091],{"class":732},[715,1495,1470],{"class":728},[715,1497,1498],{"class":745},"\" ",[715,1500,1501],{"class":728},"`",[715,1503,1504],{"class":728}," +\n",[715,1506,1508,1511,1514,1516,1518,1520,1523,1525],{"class":717,"line":1507},45,[715,1509,1510],{"class":728},"          `",[715,1512,1513],{"class":745},"(expected \"",[715,1515,1463],{"class":728},[715,1517,1388],{"class":732},[715,1519,1470],{"class":728},[715,1521,1522],{"class":745},"\")",[715,1524,1501],{"class":728},[715,1526,1527],{"class":728},",\n",[715,1529,1531,1534],{"class":717,"line":1530},46,[715,1532,1533],{"class":933},"      )",[715,1535,752],{"class":728},[715,1537,1539],{"class":717,"line":1538},47,[715,1540,1541],{"class":728},"    }\n",[715,1543,1545],{"class":717,"line":1544},48,[715,1546,1053],{"class":728},[715,1548,1550],{"class":717,"line":1549},49,[715,1551,947],{"class":728},[499,1553,1554,1555,1557],{},"The ",[506,1556,1176],{}," guard makes every transition idempotent under at-least-once delivery — a duplicate event throws\ninside the transaction, rolls back, and the relay absorbs the throw.",[533,1559,1561],{"id":1560},"declare-a-sagatimer","Declare a SagaTimer",[499,1563,1564,1565,1567,1568,1570,1571,1573,1574,1576],{},"Declare one concrete ",[506,1566,518],{}," subclass per deadline slot. It encapsulates the ",[506,1569,588],{}," and the derived\n",[506,1572,608],{}," channel, so the slot is declared in exactly one place — the ",[506,1575,588],{}," field, which the\ncompiler reads off the discovered timer and the runtime uses to arm \u002F cancel.",[499,1578,1579,1580,1582,1583,1585,1586,1588],{},"List it under ",[506,1581,592],{}," (a discovered concept that is also injectable). No constructor is needed: the\ncompiler recovers the inherited ",[506,1584,512],{}," dependency from the ",[506,1587,518],{}," base.",[705,1590,1593],{"className":707,"code":1591,"filename":1592,"language":710,"meta":711,"style":711},"import { TimeSpan } from \"@heximon\u002Fprimitives\";\nimport { SagaTimer } from \"@heximon\u002Fsaga\";\n\nexport interface PaymentDeadlinePayload {\n  readonly orderId: string;\n}\n\nexport class OrderPaymentDeadline extends SagaTimer\u003CPaymentDeadlinePayload> {\n  public static readonly window: TimeSpan = new TimeSpan(50, \"ms\");\n\n  protected readonly sagaName = \"OrderSaga\";\n  protected readonly slot = \"payment\";\n}\n","saga\u002Forder-payment-deadline.ts",[506,1594,1595,1616,1637,1641,1653,1667,1671,1675,1697,1738,1742,1762,1782],{"__ignoreMap":711},[715,1596,1597,1599,1601,1604,1606,1608,1610,1612,1614],{"class":717,"line":718},[715,1598,722],{"class":721},[715,1600,729],{"class":728},[715,1602,1603],{"class":732}," TimeSpan",[715,1605,736],{"class":728},[715,1607,739],{"class":721},[715,1609,742],{"class":728},[715,1611,746],{"class":745},[715,1613,749],{"class":728},[715,1615,752],{"class":728},[715,1617,1618,1620,1622,1625,1627,1629,1631,1633,1635],{"class":717,"line":755},[715,1619,722],{"class":721},[715,1621,729],{"class":728},[715,1623,1624],{"class":732}," SagaTimer",[715,1626,736],{"class":728},[715,1628,739],{"class":721},[715,1630,742],{"class":728},[715,1632,508],{"class":745},[715,1634,749],{"class":728},[715,1636,752],{"class":728},[715,1638,1639],{"class":717,"line":778},[715,1640,805],{"emptyLinePlaceholder":804},[715,1642,1643,1645,1648,1651],{"class":717,"line":801},[715,1644,811],{"class":721},[715,1646,1647],{"class":814}," interface",[715,1649,1650],{"class":817}," PaymentDeadlinePayload",[715,1652,927],{"class":728},[715,1654,1655,1658,1661,1663,1665],{"class":717,"line":808},[715,1656,1657],{"class":814},"  readonly",[715,1659,1660],{"class":933}," orderId",[715,1662,937],{"class":728},[715,1664,1402],{"class":817},[715,1666,752],{"class":728},[715,1668,1669],{"class":717,"line":845},[715,1670,947],{"class":728},[715,1672,1673],{"class":717,"line":850},[715,1674,805],{"emptyLinePlaceholder":804},[715,1676,1677,1679,1681,1684,1686,1688,1690,1693,1695],{"class":717,"line":895},[715,1678,811],{"class":721},[715,1680,960],{"class":814},[715,1682,1683],{"class":817}," OrderPaymentDeadline",[715,1685,909],{"class":814},[715,1687,1624],{"class":817},[715,1689,826],{"class":728},[715,1691,1692],{"class":817},"PaymentDeadlinePayload",[715,1694,924],{"class":728},[715,1696,927],{"class":728},[715,1698,1699,1701,1703,1706,1709,1711,1713,1715,1717,1719,1721,1725,1727,1729,1732,1734,1736],{"class":717,"line":900},[715,1700,986],{"class":814},[715,1702,989],{"class":814},[715,1704,1705],{"class":814}," readonly",[715,1707,1708],{"class":933}," window",[715,1710,937],{"class":728},[715,1712,1603],{"class":817},[715,1714,821],{"class":728},[715,1716,1018],{"class":728},[715,1718,1603],{"class":933},[715,1720,995],{"class":732},[715,1722,1724],{"class":1723},"sbssI","50",[715,1726,832],{"class":728},[715,1728,742],{"class":728},[715,1730,1731],{"class":745},"ms",[715,1733,749],{"class":728},[715,1735,1045],{"class":732},[715,1737,752],{"class":728},[715,1739,1740],{"class":717,"line":930},[715,1741,805],{"emptyLinePlaceholder":804},[715,1743,1744,1747,1749,1752,1754,1756,1758,1760],{"class":717,"line":944},[715,1745,1746],{"class":814},"  protected",[715,1748,1705],{"class":814},[715,1750,1751],{"class":933}," sagaName",[715,1753,821],{"class":728},[715,1755,742],{"class":728},[715,1757,692],{"class":745},[715,1759,749],{"class":728},[715,1761,752],{"class":728},[715,1763,1764,1766,1768,1771,1773,1775,1778,1780],{"class":717,"line":950},[715,1765,1746],{"class":814},[715,1767,1705],{"class":814},[715,1769,1770],{"class":933}," slot",[715,1772,821],{"class":728},[715,1774,742],{"class":728},[715,1776,1777],{"class":745},"payment",[715,1779,749],{"class":728},[715,1781,752],{"class":728},[715,1783,1784],{"class":717,"line":955},[715,1785,947],{"class":728},[499,1787,1788,1789,1791,1792,1795,1796,1799,1800,1802,1805],{},"Two declared fields identify the deadline: ",[506,1790,588],{}," (the channel suffix the compiler reads to derive\n",[506,1793,1794],{},"\"saga.timeout.payment\"",") and ",[506,1797,1798],{},"sagaName"," (which namespaces the timer in the durable store). Keep ",[506,1801,1798],{},[547,1803,1804],{},"stable across class renames"," so a rename never orphans timers already armed under the old name.",[499,1807,1808,1811,1812,1814,1815,566,1818,566,1821,566,1824,566,1827,566,1830,1833,1834,1836],{},[506,1809,1810],{},"TimeSpan"," (from ",[506,1813,746],{},") accepts units ",[506,1816,1817],{},"\"ms\"",[506,1819,1820],{},"\"s\"",[506,1822,1823],{},"\"m\"",[506,1825,1826],{},"\"h\"",[506,1828,1829],{},"\"d\"",[506,1831,1832],{},"\"w\""," — no constructor\nis needed on the timer class itself; the compiler recovers the inherited ",[506,1835,512],{}," dependency.",[533,1838,1840],{"id":1839},"arm-a-deadline","Arm a deadline",[499,1842,1843,1844,1847,1848,1851,1852,1854],{},"A saga step handler injects the ",[506,1845,1846],{},"OrderPaymentDeadline"," by class identity. Inside its ",[506,1849,1850],{},"runInTransaction"," body it\ncalls ",[506,1853,596],{}," — sync-void and transactional: the timer row commits atomically with\nthe saga state write. A rollback discards both.",[705,1856,1859],{"className":707,"code":1857,"filename":1858,"language":710,"meta":711,"style":711},"import type { IntegrationEventHandler } from \"@heximon\u002Fintegration\";\nimport { type InventoryReservedPayload, PaymentRequested } from \"..\u002Fevents\";\nimport { OrderPaymentDeadline } from \".\u002Forder-payment-deadline\";\nimport { type OrderSagaId } from \".\u002Forder-saga.entity\";\nimport { OrderSagaRepository } from \".\u002Forder-saga.repository\";\n\nexport class InventoryReservedSagaHandler implements IntegrationEventHandler\u003C\n  \"inventory.reserved\",\n  InventoryReservedPayload\n> {\n  public constructor(\n    private readonly repository: OrderSagaRepository,\n    private readonly deadline: OrderPaymentDeadline,\n    private readonly paymentRequested: PaymentRequested,\n  ) {}\n\n  public handle(payload: InventoryReservedPayload): Promise\u003Cvoid> {\n    return this.repository.runInTransaction(async () => {\n      const saga = await this.repository.getById(payload.orderId as OrderSagaId);\n\n      if (saga === undefined) {\n        return;\n      }\n\n      saga.awaitPayment();\n      await this.repository.save(saga);\n\n      \u002F\u002F Sync-void: the timer row commits atomically with the saga write.\n      this.deadline.arm(saga.id, { orderId: saga.id }, OrderPaymentDeadline.window);\n\n      await this.paymentRequested.publish({\n        orderId: saga.id,\n        abandonPayment: payload.abandonPayment,\n      });\n    });\n  }\n}\n","saga\u002Finventory-reserved.handler.ts",[506,1860,1861,1885,1914,1935,1958,1980,1984,2001,2013,2018,2024,2033,2049,2064,2079,2087,2091,2121,2147,2186,2190,2209,2216,2221,2225,2239,2261,2265,2271,2320,2324,2342,2357,2374,2383,2392,2396],{"__ignoreMap":711},[715,1862,1863,1865,1867,1869,1872,1874,1876,1878,1881,1883],{"class":717,"line":718},[715,1864,722],{"class":721},[715,1866,725],{"class":721},[715,1868,729],{"class":728},[715,1870,1871],{"class":732}," IntegrationEventHandler",[715,1873,736],{"class":728},[715,1875,739],{"class":721},[715,1877,742],{"class":728},[715,1879,1880],{"class":745},"@heximon\u002Fintegration",[715,1882,749],{"class":728},[715,1884,752],{"class":728},[715,1886,1887,1889,1891,1893,1896,1898,1901,1903,1905,1907,1910,1912],{"class":717,"line":755},[715,1888,722],{"class":721},[715,1890,729],{"class":728},[715,1892,725],{"class":721},[715,1894,1895],{"class":732}," InventoryReservedPayload",[715,1897,832],{"class":728},[715,1899,1900],{"class":732}," PaymentRequested",[715,1902,736],{"class":728},[715,1904,739],{"class":721},[715,1906,742],{"class":728},[715,1908,1909],{"class":745},"..\u002Fevents",[715,1911,749],{"class":728},[715,1913,752],{"class":728},[715,1915,1916,1918,1920,1922,1924,1926,1928,1931,1933],{"class":717,"line":778},[715,1917,722],{"class":721},[715,1919,729],{"class":728},[715,1921,1683],{"class":732},[715,1923,736],{"class":728},[715,1925,739],{"class":721},[715,1927,742],{"class":728},[715,1929,1930],{"class":745},".\u002Forder-payment-deadline",[715,1932,749],{"class":728},[715,1934,752],{"class":728},[715,1936,1937,1939,1941,1943,1945,1947,1949,1951,1954,1956],{"class":717,"line":801},[715,1938,722],{"class":721},[715,1940,729],{"class":728},[715,1942,725],{"class":721},[715,1944,818],{"class":732},[715,1946,736],{"class":728},[715,1948,739],{"class":721},[715,1950,742],{"class":728},[715,1952,1953],{"class":745},".\u002Forder-saga.entity",[715,1955,749],{"class":728},[715,1957,752],{"class":728},[715,1959,1960,1962,1964,1967,1969,1971,1973,1976,1978],{"class":717,"line":808},[715,1961,722],{"class":721},[715,1963,729],{"class":728},[715,1965,1966],{"class":732}," OrderSagaRepository",[715,1968,736],{"class":728},[715,1970,739],{"class":721},[715,1972,742],{"class":728},[715,1974,1975],{"class":745},".\u002Forder-saga.repository",[715,1977,749],{"class":728},[715,1979,752],{"class":728},[715,1981,1982],{"class":717,"line":845},[715,1983,805],{"emptyLinePlaceholder":804},[715,1985,1986,1988,1990,1993,1996,1998],{"class":717,"line":850},[715,1987,811],{"class":721},[715,1989,960],{"class":814},[715,1991,1992],{"class":817}," InventoryReservedSagaHandler",[715,1994,1995],{"class":814}," implements",[715,1997,1871],{"class":817},[715,1999,2000],{"class":728},"\u003C\n",[715,2002,2003,2006,2009,2011],{"class":717,"line":895},[715,2004,2005],{"class":728},"  \"",[715,2007,2008],{"class":745},"inventory.reserved",[715,2010,749],{"class":728},[715,2012,1527],{"class":728},[715,2014,2015],{"class":717,"line":900},[715,2016,2017],{"class":817},"  InventoryReservedPayload\n",[715,2019,2020,2022],{"class":717,"line":930},[715,2021,924],{"class":728},[715,2023,927],{"class":728},[715,2025,2026,2028,2031],{"class":717,"line":944},[715,2027,986],{"class":814},[715,2029,2030],{"class":814}," constructor",[715,2032,1451],{"class":728},[715,2034,2035,2038,2040,2043,2045,2047],{"class":717,"line":950},[715,2036,2037],{"class":814},"    private",[715,2039,1705],{"class":814},[715,2041,2042],{"class":998}," repository",[715,2044,937],{"class":728},[715,2046,1966],{"class":817},[715,2048,1527],{"class":728},[715,2050,2051,2053,2055,2058,2060,2062],{"class":717,"line":955},[715,2052,2037],{"class":814},[715,2054,1705],{"class":814},[715,2056,2057],{"class":998}," deadline",[715,2059,937],{"class":728},[715,2061,1683],{"class":817},[715,2063,1527],{"class":728},[715,2065,2066,2068,2070,2073,2075,2077],{"class":717,"line":983},[715,2067,2037],{"class":814},[715,2069,1705],{"class":814},[715,2071,2072],{"class":998}," paymentRequested",[715,2074,937],{"class":728},[715,2076,1900],{"class":817},[715,2078,1527],{"class":728},[715,2080,2081,2084],{"class":717,"line":1012},[715,2082,2083],{"class":728},"  )",[715,2085,2086],{"class":728}," {}\n",[715,2088,2089],{"class":717,"line":1050},[715,2090,805],{"emptyLinePlaceholder":804},[715,2092,2093,2095,2098,2100,2103,2105,2107,2109,2112,2114,2117,2119],{"class":717,"line":1056},[715,2094,986],{"class":814},[715,2096,2097],{"class":933}," handle",[715,2099,995],{"class":728},[715,2101,2102],{"class":998},"payload",[715,2104,937],{"class":728},[715,2106,1895],{"class":817},[715,2108,1005],{"class":728},[715,2110,2111],{"class":817}," Promise",[715,2113,826],{"class":728},[715,2115,2116],{"class":817},"void",[715,2118,924],{"class":728},[715,2120,927],{"class":728},[715,2122,2123,2125,2127,2130,2132,2134,2136,2139,2142,2145],{"class":717,"line":1061},[715,2124,1015],{"class":721},[715,2126,1083],{"class":728},[715,2128,2129],{"class":732},"repository",[715,2131,656],{"class":728},[715,2133,1850],{"class":1021},[715,2135,995],{"class":933},[715,2137,2138],{"class":814},"async",[715,2140,2141],{"class":728}," ()",[715,2143,2144],{"class":814}," =>",[715,2146,927],{"class":728},[715,2148,2149,2152,2155,2157,2160,2162,2164,2166,2169,2171,2173,2175,2177,2180,2182,2184],{"class":717,"line":1078},[715,2150,2151],{"class":814},"      const",[715,2153,2154],{"class":732}," saga",[715,2156,821],{"class":728},[715,2158,2159],{"class":721}," await",[715,2161,1083],{"class":728},[715,2163,2129],{"class":732},[715,2165,656],{"class":728},[715,2167,2168],{"class":1021},"getById",[715,2170,995],{"class":933},[715,2172,2102],{"class":732},[715,2174,656],{"class":728},[715,2176,561],{"class":732},[715,2178,2179],{"class":721}," as",[715,2181,818],{"class":817},[715,2183,1045],{"class":933},[715,2185,752],{"class":728},[715,2187,2188],{"class":717,"line":1096},[715,2189,805],{"emptyLinePlaceholder":804},[715,2191,2192,2195,2197,2200,2202,2205,2207],{"class":717,"line":1101},[715,2193,2194],{"class":721},"      if",[715,2196,1417],{"class":933},[715,2198,2199],{"class":732},"saga",[715,2201,1134],{"class":728},[715,2203,2204],{"class":728}," undefined",[715,2206,1435],{"class":933},[715,2208,1438],{"class":728},[715,2210,2211,2214],{"class":717,"line":1106},[715,2212,2213],{"class":721},"        return",[715,2215,752],{"class":728},[715,2217,2218],{"class":717,"line":1121},[715,2219,2220],{"class":728},"      }\n",[715,2222,2223],{"class":717,"line":1145},[715,2224,805],{"emptyLinePlaceholder":804},[715,2226,2227,2230,2232,2234,2237],{"class":717,"line":1150},[715,2228,2229],{"class":732},"      saga",[715,2231,656],{"class":728},[715,2233,1191],{"class":1021},[715,2235,2236],{"class":933},"()",[715,2238,752],{"class":728},[715,2240,2241,2244,2246,2248,2250,2253,2255,2257,2259],{"class":717,"line":1155},[715,2242,2243],{"class":721},"      await",[715,2245,1083],{"class":728},[715,2247,2129],{"class":732},[715,2249,656],{"class":728},[715,2251,2252],{"class":1021},"save",[715,2254,995],{"class":933},[715,2256,2199],{"class":732},[715,2258,1045],{"class":933},[715,2260,752],{"class":728},[715,2262,2263],{"class":717,"line":1170},[715,2264,805],{"emptyLinePlaceholder":804},[715,2266,2267],{"class":717,"line":1200},[715,2268,2270],{"class":2269},"sHwdD","      \u002F\u002F Sync-void: the timer row commits atomically with the saga write.\n",[715,2272,2273,2276,2279,2281,2284,2286,2288,2290,2292,2294,2296,2298,2300,2302,2304,2306,2309,2311,2313,2316,2318],{"class":717,"line":1221},[715,2274,2275],{"class":728},"      this.",[715,2277,2278],{"class":732},"deadline",[715,2280,656],{"class":728},[715,2282,2283],{"class":1021},"arm",[715,2285,995],{"class":933},[715,2287,2199],{"class":732},[715,2289,656],{"class":728},[715,2291,557],{"class":732},[715,2293,832],{"class":728},[715,2295,729],{"class":728},[715,2297,1660],{"class":933},[715,2299,937],{"class":728},[715,2301,2154],{"class":732},[715,2303,656],{"class":728},[715,2305,557],{"class":732},[715,2307,2308],{"class":728}," },",[715,2310,1683],{"class":732},[715,2312,656],{"class":728},[715,2314,2315],{"class":732},"window",[715,2317,1045],{"class":933},[715,2319,752],{"class":728},[715,2321,2322],{"class":717,"line":1226},[715,2323,805],{"emptyLinePlaceholder":804},[715,2325,2326,2328,2330,2333,2335,2338,2340],{"class":717,"line":1231},[715,2327,2243],{"class":721},[715,2329,1083],{"class":728},[715,2331,2332],{"class":732},"paymentRequested",[715,2334,656],{"class":728},[715,2336,2337],{"class":1021},"publish",[715,2339,995],{"class":933},[715,2341,1438],{"class":728},[715,2343,2344,2347,2349,2351,2353,2355],{"class":717,"line":1245},[715,2345,2346],{"class":933},"        orderId",[715,2348,937],{"class":728},[715,2350,2154],{"class":732},[715,2352,656],{"class":728},[715,2354,557],{"class":732},[715,2356,1527],{"class":728},[715,2358,2359,2362,2364,2367,2369,2372],{"class":717,"line":1273},[715,2360,2361],{"class":933},"        abandonPayment",[715,2363,937],{"class":728},[715,2365,2366],{"class":732}," payload",[715,2368,656],{"class":728},[715,2370,2371],{"class":732},"abandonPayment",[715,2373,1527],{"class":728},[715,2375,2376,2379,2381],{"class":717,"line":1294},[715,2377,2378],{"class":728},"      }",[715,2380,1045],{"class":933},[715,2382,752],{"class":728},[715,2384,2385,2388,2390],{"class":717,"line":1299},[715,2386,2387],{"class":728},"    }",[715,2389,1045],{"class":933},[715,2391,752],{"class":728},[715,2393,2394],{"class":717,"line":1304},[715,2395,1053],{"class":728},[715,2397,2398],{"class":717,"line":1318},[715,2399,947],{"class":728},[533,2401,2403],{"id":2402},"cancel-on-success","Cancel on success",[499,2405,2406,2407,2409],{},"When payment is confirmed the handler cancels the armed deadline inside the same transaction as the ",[506,2408,572],{},"\nsaga write, so the deadline can never fire after payment:",[705,2411,2414],{"className":707,"code":2412,"filename":2413,"language":710,"meta":711,"style":711},"import type { IntegrationEventHandler } from \"@heximon\u002Fintegration\";\nimport type { PaymentProcessedPayload } from \"..\u002Fevents\";\nimport { OrderPaymentDeadline } from \".\u002Forder-payment-deadline\";\nimport { type OrderSagaId } from \".\u002Forder-saga.entity\";\nimport { OrderSagaRepository } from \".\u002Forder-saga.repository\";\n\nexport class PaymentProcessedSagaHandler implements IntegrationEventHandler\u003C\n  \"payment.processed\",\n  PaymentProcessedPayload\n> {\n  public constructor(\n    private readonly repository: OrderSagaRepository,\n    private readonly deadline: OrderPaymentDeadline,\n  ) {}\n\n  public handle(payload: PaymentProcessedPayload): Promise\u003Cvoid> {\n    return this.repository.runInTransaction(async () => {\n      const saga = await this.repository.getById(payload.orderId as OrderSagaId);\n\n      if (saga === undefined) {\n        return;\n      }\n\n      saga.complete();\n      await this.repository.save(saga);\n\n      \u002F\u002F Sync-void: the timer row is removed atomically with the `completed` state.\n      this.deadline.cancel(saga.id);\n    });\n  }\n}\n","saga\u002Fpayment-processed.handler.ts",[506,2415,2416,2438,2461,2481,2503,2523,2527,2542,2553,2558,2564,2572,2586,2600,2606,2610,2636,2658,2692,2696,2712,2718,2722,2726,2738,2758,2762,2767,2789,2797,2801],{"__ignoreMap":711},[715,2417,2418,2420,2422,2424,2426,2428,2430,2432,2434,2436],{"class":717,"line":718},[715,2419,722],{"class":721},[715,2421,725],{"class":721},[715,2423,729],{"class":728},[715,2425,1871],{"class":732},[715,2427,736],{"class":728},[715,2429,739],{"class":721},[715,2431,742],{"class":728},[715,2433,1880],{"class":745},[715,2435,749],{"class":728},[715,2437,752],{"class":728},[715,2439,2440,2442,2444,2446,2449,2451,2453,2455,2457,2459],{"class":717,"line":755},[715,2441,722],{"class":721},[715,2443,725],{"class":721},[715,2445,729],{"class":728},[715,2447,2448],{"class":732}," PaymentProcessedPayload",[715,2450,736],{"class":728},[715,2452,739],{"class":721},[715,2454,742],{"class":728},[715,2456,1909],{"class":745},[715,2458,749],{"class":728},[715,2460,752],{"class":728},[715,2462,2463,2465,2467,2469,2471,2473,2475,2477,2479],{"class":717,"line":778},[715,2464,722],{"class":721},[715,2466,729],{"class":728},[715,2468,1683],{"class":732},[715,2470,736],{"class":728},[715,2472,739],{"class":721},[715,2474,742],{"class":728},[715,2476,1930],{"class":745},[715,2478,749],{"class":728},[715,2480,752],{"class":728},[715,2482,2483,2485,2487,2489,2491,2493,2495,2497,2499,2501],{"class":717,"line":801},[715,2484,722],{"class":721},[715,2486,729],{"class":728},[715,2488,725],{"class":721},[715,2490,818],{"class":732},[715,2492,736],{"class":728},[715,2494,739],{"class":721},[715,2496,742],{"class":728},[715,2498,1953],{"class":745},[715,2500,749],{"class":728},[715,2502,752],{"class":728},[715,2504,2505,2507,2509,2511,2513,2515,2517,2519,2521],{"class":717,"line":808},[715,2506,722],{"class":721},[715,2508,729],{"class":728},[715,2510,1966],{"class":732},[715,2512,736],{"class":728},[715,2514,739],{"class":721},[715,2516,742],{"class":728},[715,2518,1975],{"class":745},[715,2520,749],{"class":728},[715,2522,752],{"class":728},[715,2524,2525],{"class":717,"line":845},[715,2526,805],{"emptyLinePlaceholder":804},[715,2528,2529,2531,2533,2536,2538,2540],{"class":717,"line":850},[715,2530,811],{"class":721},[715,2532,960],{"class":814},[715,2534,2535],{"class":817}," PaymentProcessedSagaHandler",[715,2537,1995],{"class":814},[715,2539,1871],{"class":817},[715,2541,2000],{"class":728},[715,2543,2544,2546,2549,2551],{"class":717,"line":895},[715,2545,2005],{"class":728},[715,2547,2548],{"class":745},"payment.processed",[715,2550,749],{"class":728},[715,2552,1527],{"class":728},[715,2554,2555],{"class":717,"line":900},[715,2556,2557],{"class":817},"  PaymentProcessedPayload\n",[715,2559,2560,2562],{"class":717,"line":930},[715,2561,924],{"class":728},[715,2563,927],{"class":728},[715,2565,2566,2568,2570],{"class":717,"line":944},[715,2567,986],{"class":814},[715,2569,2030],{"class":814},[715,2571,1451],{"class":728},[715,2573,2574,2576,2578,2580,2582,2584],{"class":717,"line":950},[715,2575,2037],{"class":814},[715,2577,1705],{"class":814},[715,2579,2042],{"class":998},[715,2581,937],{"class":728},[715,2583,1966],{"class":817},[715,2585,1527],{"class":728},[715,2587,2588,2590,2592,2594,2596,2598],{"class":717,"line":955},[715,2589,2037],{"class":814},[715,2591,1705],{"class":814},[715,2593,2057],{"class":998},[715,2595,937],{"class":728},[715,2597,1683],{"class":817},[715,2599,1527],{"class":728},[715,2601,2602,2604],{"class":717,"line":983},[715,2603,2083],{"class":728},[715,2605,2086],{"class":728},[715,2607,2608],{"class":717,"line":1012},[715,2609,805],{"emptyLinePlaceholder":804},[715,2611,2612,2614,2616,2618,2620,2622,2624,2626,2628,2630,2632,2634],{"class":717,"line":1050},[715,2613,986],{"class":814},[715,2615,2097],{"class":933},[715,2617,995],{"class":728},[715,2619,2102],{"class":998},[715,2621,937],{"class":728},[715,2623,2448],{"class":817},[715,2625,1005],{"class":728},[715,2627,2111],{"class":817},[715,2629,826],{"class":728},[715,2631,2116],{"class":817},[715,2633,924],{"class":728},[715,2635,927],{"class":728},[715,2637,2638,2640,2642,2644,2646,2648,2650,2652,2654,2656],{"class":717,"line":1056},[715,2639,1015],{"class":721},[715,2641,1083],{"class":728},[715,2643,2129],{"class":732},[715,2645,656],{"class":728},[715,2647,1850],{"class":1021},[715,2649,995],{"class":933},[715,2651,2138],{"class":814},[715,2653,2141],{"class":728},[715,2655,2144],{"class":814},[715,2657,927],{"class":728},[715,2659,2660,2662,2664,2666,2668,2670,2672,2674,2676,2678,2680,2682,2684,2686,2688,2690],{"class":717,"line":1061},[715,2661,2151],{"class":814},[715,2663,2154],{"class":732},[715,2665,821],{"class":728},[715,2667,2159],{"class":721},[715,2669,1083],{"class":728},[715,2671,2129],{"class":732},[715,2673,656],{"class":728},[715,2675,2168],{"class":1021},[715,2677,995],{"class":933},[715,2679,2102],{"class":732},[715,2681,656],{"class":728},[715,2683,561],{"class":732},[715,2685,2179],{"class":721},[715,2687,818],{"class":817},[715,2689,1045],{"class":933},[715,2691,752],{"class":728},[715,2693,2694],{"class":717,"line":1078},[715,2695,805],{"emptyLinePlaceholder":804},[715,2697,2698,2700,2702,2704,2706,2708,2710],{"class":717,"line":1096},[715,2699,2194],{"class":721},[715,2701,1417],{"class":933},[715,2703,2199],{"class":732},[715,2705,1134],{"class":728},[715,2707,2204],{"class":728},[715,2709,1435],{"class":933},[715,2711,1438],{"class":728},[715,2713,2714,2716],{"class":717,"line":1101},[715,2715,2213],{"class":721},[715,2717,752],{"class":728},[715,2719,2720],{"class":717,"line":1106},[715,2721,2220],{"class":728},[715,2723,2724],{"class":717,"line":1121},[715,2725,805],{"emptyLinePlaceholder":804},[715,2727,2728,2730,2732,2734,2736],{"class":717,"line":1145},[715,2729,2229],{"class":732},[715,2731,656],{"class":728},[715,2733,1264],{"class":1021},[715,2735,2236],{"class":933},[715,2737,752],{"class":728},[715,2739,2740,2742,2744,2746,2748,2750,2752,2754,2756],{"class":717,"line":1150},[715,2741,2243],{"class":721},[715,2743,1083],{"class":728},[715,2745,2129],{"class":732},[715,2747,656],{"class":728},[715,2749,2252],{"class":1021},[715,2751,995],{"class":933},[715,2753,2199],{"class":732},[715,2755,1045],{"class":933},[715,2757,752],{"class":728},[715,2759,2760],{"class":717,"line":1155},[715,2761,805],{"emptyLinePlaceholder":804},[715,2763,2764],{"class":717,"line":1170},[715,2765,2766],{"class":2269},"      \u002F\u002F Sync-void: the timer row is removed atomically with the `completed` state.\n",[715,2768,2769,2771,2773,2775,2777,2779,2781,2783,2785,2787],{"class":717,"line":1200},[715,2770,2275],{"class":728},[715,2772,2278],{"class":732},[715,2774,656],{"class":728},[715,2776,1337],{"class":1021},[715,2778,995],{"class":933},[715,2780,2199],{"class":732},[715,2782,656],{"class":728},[715,2784,557],{"class":732},[715,2786,1045],{"class":933},[715,2788,752],{"class":728},[715,2790,2791,2793,2795],{"class":717,"line":1221},[715,2792,2387],{"class":728},[715,2794,1045],{"class":933},[715,2796,752],{"class":728},[715,2798,2799],{"class":717,"line":1226},[715,2800,1053],{"class":728},[715,2802,2803],{"class":717,"line":1231},[715,2804,947],{"class":728},[499,2806,2807,2809,2810,2812,2813,2815,2816,2818],{},[506,2808,600],{}," — just the saga instance id; ",[506,2811,1798],{}," and ",[506,2814,588],{}," are already on the ",[506,2817,518],{},"\nsubclass.",[533,2820,2822],{"id":2821},"handle-a-fired-timeout","Handle a fired timeout",[499,2824,581,2825,2828,2829,2831,2832,2835,2836,2838,2839,656],{},[506,2826,2827],{},"TimeoutHandler\u003CTimer>"," is the consumer side of the deadline — the type argument is the ",[506,2830,518],{}," subclass,\nnot a string slot. The compiler reads that timer's ",[506,2833,2834],{},"slot = \"payment\""," field and registers this handler under the\nderived ",[506,2837,1794],{}," channel; the payload type is inferred from the timer via ",[506,2840,2841],{},"SagaTimerPayload\u003CTimer>",[499,2843,2844,2845,2847],{},"When a deadline fires, its payload is re-emitted on that channel and this handler receives it through the shared\n",[506,2846,616],{}," dispatch. The stale-timeout guard protects against a re-delivered fired timer:",[705,2849,2852],{"className":707,"code":2850,"filename":2851,"language":710,"meta":711,"style":711},"import { TimeoutHandler } from \"@heximon\u002Fsaga\";\nimport { OrderCancelled, ReservationReleased } from \"..\u002Fevents\";\nimport { OrderPaymentDeadline, type PaymentDeadlinePayload } from \".\u002Forder-payment-deadline\";\nimport { type OrderSagaId } from \".\u002Forder-saga.entity\";\nimport { OrderSagaRepository } from \".\u002Forder-saga.repository\";\n\nexport class PaymentTimeoutHandler extends TimeoutHandler\u003COrderPaymentDeadline> {\n  public constructor(\n    private readonly repository: OrderSagaRepository,\n    private readonly reservationReleased: ReservationReleased,\n    private readonly orderCancelled: OrderCancelled,\n  ) {\n    super();\n  }\n\n  public override handle(payload: PaymentDeadlinePayload): Promise\u003Cvoid> {\n    return this.repository.runInTransaction(async () => {\n      const saga = await this.repository.getById(payload.orderId as OrderSagaId);\n\n      if (saga === undefined) {\n        return;\n      }\n\n      \u002F\u002F Stale-timeout guard: if the saga already advanced past `awaiting-payment`\n      \u002F\u002F (payment arrived and cancelled the deadline, or compensation already ran),\n      \u002F\u002F the fired timer is a no-op.\n      if (!saga.isAwaitingPayment()) {\n        return;\n      }\n\n      saga.cancel();\n      await this.repository.save(saga);\n\n      await this.reservationReleased.publish({ orderId: saga.id });\n      await this.orderCancelled.publish({ orderId: saga.id });\n    });\n  }\n}\n","saga\u002Fpayment-timeout.handler.ts",[506,2853,2854,2875,2901,2927,2949,2969,2973,2994,3002,3016,3031,3046,3052,3061,3065,3069,3098,3120,3154,3158,3174,3180,3184,3188,3193,3198,3203,3224,3230,3234,3238,3250,3270,3274,3308,3341,3349,3353],{"__ignoreMap":711},[715,2855,2856,2858,2860,2863,2865,2867,2869,2871,2873],{"class":717,"line":718},[715,2857,722],{"class":721},[715,2859,729],{"class":728},[715,2861,2862],{"class":732}," TimeoutHandler",[715,2864,736],{"class":728},[715,2866,739],{"class":721},[715,2868,742],{"class":728},[715,2870,508],{"class":745},[715,2872,749],{"class":728},[715,2874,752],{"class":728},[715,2876,2877,2879,2881,2884,2886,2889,2891,2893,2895,2897,2899],{"class":717,"line":755},[715,2878,722],{"class":721},[715,2880,729],{"class":728},[715,2882,2883],{"class":732}," OrderCancelled",[715,2885,832],{"class":728},[715,2887,2888],{"class":732}," ReservationReleased",[715,2890,736],{"class":728},[715,2892,739],{"class":721},[715,2894,742],{"class":728},[715,2896,1909],{"class":745},[715,2898,749],{"class":728},[715,2900,752],{"class":728},[715,2902,2903,2905,2907,2909,2911,2913,2915,2917,2919,2921,2923,2925],{"class":717,"line":778},[715,2904,722],{"class":721},[715,2906,729],{"class":728},[715,2908,1683],{"class":732},[715,2910,832],{"class":728},[715,2912,725],{"class":721},[715,2914,1650],{"class":732},[715,2916,736],{"class":728},[715,2918,739],{"class":721},[715,2920,742],{"class":728},[715,2922,1930],{"class":745},[715,2924,749],{"class":728},[715,2926,752],{"class":728},[715,2928,2929,2931,2933,2935,2937,2939,2941,2943,2945,2947],{"class":717,"line":801},[715,2930,722],{"class":721},[715,2932,729],{"class":728},[715,2934,725],{"class":721},[715,2936,818],{"class":732},[715,2938,736],{"class":728},[715,2940,739],{"class":721},[715,2942,742],{"class":728},[715,2944,1953],{"class":745},[715,2946,749],{"class":728},[715,2948,752],{"class":728},[715,2950,2951,2953,2955,2957,2959,2961,2963,2965,2967],{"class":717,"line":808},[715,2952,722],{"class":721},[715,2954,729],{"class":728},[715,2956,1966],{"class":732},[715,2958,736],{"class":728},[715,2960,739],{"class":721},[715,2962,742],{"class":728},[715,2964,1975],{"class":745},[715,2966,749],{"class":728},[715,2968,752],{"class":728},[715,2970,2971],{"class":717,"line":845},[715,2972,805],{"emptyLinePlaceholder":804},[715,2974,2975,2977,2979,2982,2984,2986,2988,2990,2992],{"class":717,"line":850},[715,2976,811],{"class":721},[715,2978,960],{"class":814},[715,2980,2981],{"class":817}," PaymentTimeoutHandler",[715,2983,909],{"class":814},[715,2985,2862],{"class":817},[715,2987,826],{"class":728},[715,2989,1846],{"class":817},[715,2991,924],{"class":728},[715,2993,927],{"class":728},[715,2995,2996,2998,3000],{"class":717,"line":895},[715,2997,986],{"class":814},[715,2999,2030],{"class":814},[715,3001,1451],{"class":728},[715,3003,3004,3006,3008,3010,3012,3014],{"class":717,"line":900},[715,3005,2037],{"class":814},[715,3007,1705],{"class":814},[715,3009,2042],{"class":998},[715,3011,937],{"class":728},[715,3013,1966],{"class":817},[715,3015,1527],{"class":728},[715,3017,3018,3020,3022,3025,3027,3029],{"class":717,"line":930},[715,3019,2037],{"class":814},[715,3021,1705],{"class":814},[715,3023,3024],{"class":998}," reservationReleased",[715,3026,937],{"class":728},[715,3028,2888],{"class":817},[715,3030,1527],{"class":728},[715,3032,3033,3035,3037,3040,3042,3044],{"class":717,"line":944},[715,3034,2037],{"class":814},[715,3036,1705],{"class":814},[715,3038,3039],{"class":998}," orderCancelled",[715,3041,937],{"class":728},[715,3043,2883],{"class":817},[715,3045,1527],{"class":728},[715,3047,3048,3050],{"class":717,"line":950},[715,3049,2083],{"class":728},[715,3051,927],{"class":728},[715,3053,3054,3057,3059],{"class":717,"line":955},[715,3055,3056],{"class":732},"    super",[715,3058,2236],{"class":933},[715,3060,752],{"class":728},[715,3062,3063],{"class":717,"line":983},[715,3064,1053],{"class":728},[715,3066,3067],{"class":717,"line":1012},[715,3068,805],{"emptyLinePlaceholder":804},[715,3070,3071,3073,3076,3078,3080,3082,3084,3086,3088,3090,3092,3094,3096],{"class":717,"line":1050},[715,3072,986],{"class":814},[715,3074,3075],{"class":814}," override",[715,3077,2097],{"class":933},[715,3079,995],{"class":728},[715,3081,2102],{"class":998},[715,3083,937],{"class":728},[715,3085,1650],{"class":817},[715,3087,1005],{"class":728},[715,3089,2111],{"class":817},[715,3091,826],{"class":728},[715,3093,2116],{"class":817},[715,3095,924],{"class":728},[715,3097,927],{"class":728},[715,3099,3100,3102,3104,3106,3108,3110,3112,3114,3116,3118],{"class":717,"line":1056},[715,3101,1015],{"class":721},[715,3103,1083],{"class":728},[715,3105,2129],{"class":732},[715,3107,656],{"class":728},[715,3109,1850],{"class":1021},[715,3111,995],{"class":933},[715,3113,2138],{"class":814},[715,3115,2141],{"class":728},[715,3117,2144],{"class":814},[715,3119,927],{"class":728},[715,3121,3122,3124,3126,3128,3130,3132,3134,3136,3138,3140,3142,3144,3146,3148,3150,3152],{"class":717,"line":1061},[715,3123,2151],{"class":814},[715,3125,2154],{"class":732},[715,3127,821],{"class":728},[715,3129,2159],{"class":721},[715,3131,1083],{"class":728},[715,3133,2129],{"class":732},[715,3135,656],{"class":728},[715,3137,2168],{"class":1021},[715,3139,995],{"class":933},[715,3141,2102],{"class":732},[715,3143,656],{"class":728},[715,3145,561],{"class":732},[715,3147,2179],{"class":721},[715,3149,818],{"class":817},[715,3151,1045],{"class":933},[715,3153,752],{"class":728},[715,3155,3156],{"class":717,"line":1078},[715,3157,805],{"emptyLinePlaceholder":804},[715,3159,3160,3162,3164,3166,3168,3170,3172],{"class":717,"line":1096},[715,3161,2194],{"class":721},[715,3163,1417],{"class":933},[715,3165,2199],{"class":732},[715,3167,1134],{"class":728},[715,3169,2204],{"class":728},[715,3171,1435],{"class":933},[715,3173,1438],{"class":728},[715,3175,3176,3178],{"class":717,"line":1101},[715,3177,2213],{"class":721},[715,3179,752],{"class":728},[715,3181,3182],{"class":717,"line":1106},[715,3183,2220],{"class":728},[715,3185,3186],{"class":717,"line":1121},[715,3187,805],{"emptyLinePlaceholder":804},[715,3189,3190],{"class":717,"line":1145},[715,3191,3192],{"class":2269},"      \u002F\u002F Stale-timeout guard: if the saga already advanced past `awaiting-payment`\n",[715,3194,3195],{"class":717,"line":1150},[715,3196,3197],{"class":2269},"      \u002F\u002F (payment arrived and cancelled the deadline, or compensation already ran),\n",[715,3199,3200],{"class":717,"line":1155},[715,3201,3202],{"class":2269},"      \u002F\u002F the fired timer is a no-op.\n",[715,3204,3205,3207,3209,3212,3214,3216,3219,3222],{"class":717,"line":1170},[715,3206,2194],{"class":721},[715,3208,1417],{"class":933},[715,3210,3211],{"class":728},"!",[715,3213,2199],{"class":732},[715,3215,656],{"class":728},[715,3217,3218],{"class":1021},"isAwaitingPayment",[715,3220,3221],{"class":933},"()) ",[715,3223,1438],{"class":728},[715,3225,3226,3228],{"class":717,"line":1200},[715,3227,2213],{"class":721},[715,3229,752],{"class":728},[715,3231,3232],{"class":717,"line":1221},[715,3233,2220],{"class":728},[715,3235,3236],{"class":717,"line":1226},[715,3237,805],{"emptyLinePlaceholder":804},[715,3239,3240,3242,3244,3246,3248],{"class":717,"line":1231},[715,3241,2229],{"class":732},[715,3243,656],{"class":728},[715,3245,1337],{"class":1021},[715,3247,2236],{"class":933},[715,3249,752],{"class":728},[715,3251,3252,3254,3256,3258,3260,3262,3264,3266,3268],{"class":717,"line":1245},[715,3253,2243],{"class":721},[715,3255,1083],{"class":728},[715,3257,2129],{"class":732},[715,3259,656],{"class":728},[715,3261,2252],{"class":1021},[715,3263,995],{"class":933},[715,3265,2199],{"class":732},[715,3267,1045],{"class":933},[715,3269,752],{"class":728},[715,3271,3272],{"class":717,"line":1273},[715,3273,805],{"emptyLinePlaceholder":804},[715,3275,3276,3278,3280,3283,3285,3287,3289,3292,3294,3296,3298,3300,3302,3304,3306],{"class":717,"line":1294},[715,3277,2243],{"class":721},[715,3279,1083],{"class":728},[715,3281,3282],{"class":732},"reservationReleased",[715,3284,656],{"class":728},[715,3286,2337],{"class":1021},[715,3288,995],{"class":933},[715,3290,3291],{"class":728},"{",[715,3293,1660],{"class":933},[715,3295,937],{"class":728},[715,3297,2154],{"class":732},[715,3299,656],{"class":728},[715,3301,557],{"class":732},[715,3303,736],{"class":728},[715,3305,1045],{"class":933},[715,3307,752],{"class":728},[715,3309,3310,3312,3314,3317,3319,3321,3323,3325,3327,3329,3331,3333,3335,3337,3339],{"class":717,"line":1299},[715,3311,2243],{"class":721},[715,3313,1083],{"class":728},[715,3315,3316],{"class":732},"orderCancelled",[715,3318,656],{"class":728},[715,3320,2337],{"class":1021},[715,3322,995],{"class":933},[715,3324,3291],{"class":728},[715,3326,1660],{"class":933},[715,3328,937],{"class":728},[715,3330,2154],{"class":732},[715,3332,656],{"class":728},[715,3334,557],{"class":732},[715,3336,736],{"class":728},[715,3338,1045],{"class":933},[715,3340,752],{"class":728},[715,3342,3343,3345,3347],{"class":717,"line":1304},[715,3344,2387],{"class":728},[715,3346,1045],{"class":933},[715,3348,752],{"class":728},[715,3350,3351],{"class":717,"line":1318},[715,3352,1053],{"class":728},[715,3354,3355],{"class":717,"line":1346},[715,3356,947],{"class":728},[499,3358,3359,3361],{},[506,3360,1692],{}," is imported from the timer file, keeping the payload type co-located with the slot it\nbelongs to.",[533,3363,3365],{"id":3364},"wire-the-durable-timer-store","Wire the durable timer store",[499,3367,3368,3370,3371,3374,3375,3378,3379,3382,3383,3386,3387,3390],{},[506,3369,512],{}," is an abstract DI token — its satisfier is not listed in ",[506,3372,3373],{},"providers",". The ",[506,3376,3377],{},"SagaPlugin"," emits the\n",[506,3380,3381],{},"NodeDurableTimer"," as a core provider automatically once it discovers timeout handlers. You only need to provide\nthe ",[506,3384,3385],{},"DurableTimerStore"," satisfier and declare the ",[506,3388,3389],{},"durable_timers"," table it reads.",[499,3392,3393,3394,3397,3398,3401,3402,3404],{},"Declare the table by spreading ",[506,3395,3396],{},"durableTimerColumns(dialect)",", with the ",[506,3399,3400],{},"(saga_name, correlation_key, slot)","\ntriple as the composite primary key (what makes ",[506,3403,2283],{}," an upsert):",[705,3406,3409],{"className":707,"code":3407,"filename":3408,"language":710,"meta":711,"style":711},"import { primaryKey, sqliteTable } from \"drizzle-orm\u002Fsqlite-core\";\nimport { durableTimerColumns } from \"@heximon\u002Fsaga\u002Fnode\";\n\nexport const durableTimers = sqliteTable(\n  \"durable_timers\",\n  { ...durableTimerColumns(\"sqlite\") }, \u002F\u002F or \"pg\" \u002F \"mysql\" with the matching table builder\n  (columns) => [primaryKey({ columns: [columns.sagaName, columns.correlationKey, columns.slot] })],\n);\n","saga\u002Fdurable-timers-table.ts",[506,3410,3411,3438,3460,3464,3481,3491,3519,3577],{"__ignoreMap":711},[715,3412,3413,3415,3417,3420,3422,3425,3427,3429,3431,3434,3436],{"class":717,"line":718},[715,3414,722],{"class":721},[715,3416,729],{"class":728},[715,3418,3419],{"class":732}," primaryKey",[715,3421,832],{"class":728},[715,3423,3424],{"class":732}," sqliteTable",[715,3426,736],{"class":728},[715,3428,739],{"class":721},[715,3430,742],{"class":728},[715,3432,3433],{"class":745},"drizzle-orm\u002Fsqlite-core",[715,3435,749],{"class":728},[715,3437,752],{"class":728},[715,3439,3440,3442,3444,3447,3449,3451,3453,3456,3458],{"class":717,"line":755},[715,3441,722],{"class":721},[715,3443,729],{"class":728},[715,3445,3446],{"class":732}," durableTimerColumns",[715,3448,736],{"class":728},[715,3450,739],{"class":721},[715,3452,742],{"class":728},[715,3454,3455],{"class":745},"@heximon\u002Fsaga\u002Fnode",[715,3457,749],{"class":728},[715,3459,752],{"class":728},[715,3461,3462],{"class":717,"line":778},[715,3463,805],{"emptyLinePlaceholder":804},[715,3465,3466,3468,3471,3474,3477,3479],{"class":717,"line":801},[715,3467,811],{"class":721},[715,3469,3470],{"class":814}," const",[715,3472,3473],{"class":732}," durableTimers ",[715,3475,3476],{"class":728},"=",[715,3478,3424],{"class":1021},[715,3480,1451],{"class":732},[715,3482,3483,3485,3487,3489],{"class":717,"line":808},[715,3484,2005],{"class":728},[715,3486,3389],{"class":745},[715,3488,749],{"class":728},[715,3490,1527],{"class":728},[715,3492,3493,3496,3499,3502,3504,3506,3509,3511,3513,3516],{"class":717,"line":845},[715,3494,3495],{"class":728},"  {",[715,3497,3498],{"class":728}," ...",[715,3500,3501],{"class":1021},"durableTimerColumns",[715,3503,995],{"class":732},[715,3505,749],{"class":728},[715,3507,3508],{"class":745},"sqlite",[715,3510,749],{"class":728},[715,3512,1435],{"class":732},[715,3514,3515],{"class":728},"},",[715,3517,3518],{"class":2269}," \u002F\u002F or \"pg\" \u002F \"mysql\" with the matching table builder\n",[715,3520,3521,3524,3527,3529,3531,3534,3537,3539,3541,3544,3546,3549,3551,3553,3555,3557,3559,3561,3563,3565,3567,3570,3572,3575],{"class":717,"line":850},[715,3522,3523],{"class":728},"  (",[715,3525,3526],{"class":998},"columns",[715,3528,1045],{"class":728},[715,3530,2144],{"class":814},[715,3532,3533],{"class":732}," [",[715,3535,3536],{"class":1021},"primaryKey",[715,3538,995],{"class":732},[715,3540,3291],{"class":728},[715,3542,3543],{"class":933}," columns",[715,3545,937],{"class":728},[715,3547,3548],{"class":732}," [columns",[715,3550,656],{"class":728},[715,3552,1798],{"class":732},[715,3554,832],{"class":728},[715,3556,3543],{"class":732},[715,3558,656],{"class":728},[715,3560,702],{"class":732},[715,3562,832],{"class":728},[715,3564,3543],{"class":732},[715,3566,656],{"class":728},[715,3568,3569],{"class":732},"slot] ",[715,3571,1470],{"class":728},[715,3573,3574],{"class":732},")]",[715,3576,1527],{"class":728},[715,3578,3579,3581],{"class":717,"line":895},[715,3580,1045],{"class":732},[715,3582,752],{"class":728},[499,3584,3585],{},"Bind the one-hop store satisfier:",[705,3587,3590],{"className":707,"code":3588,"filename":3589,"language":710,"meta":711,"style":711},"import { DurableTimerStore } from \"@heximon\u002Fsaga\";\nimport { DrizzleDurableTimerStore } from \"@heximon\u002Fsaga\u002Fnode\";\nimport { Database } from \"..\u002Fdatabase\u002Fdatabase\";\nimport { durableTimers } from \".\u002Fdurable-timers-table\";\n\nexport class AppDurableTimerStore extends DrizzleDurableTimerStore implements DurableTimerStore {\n  public constructor(database: Database) {\n    super(database, durableTimers);\n  }\n}\n","saga\u002Fdurable-timer-store.ts",[506,3591,3592,3613,3634,3656,3678,3682,3701,3720,3736,3740],{"__ignoreMap":711},[715,3593,3594,3596,3598,3601,3603,3605,3607,3609,3611],{"class":717,"line":718},[715,3595,722],{"class":721},[715,3597,729],{"class":728},[715,3599,3600],{"class":732}," DurableTimerStore",[715,3602,736],{"class":728},[715,3604,739],{"class":721},[715,3606,742],{"class":728},[715,3608,508],{"class":745},[715,3610,749],{"class":728},[715,3612,752],{"class":728},[715,3614,3615,3617,3619,3622,3624,3626,3628,3630,3632],{"class":717,"line":755},[715,3616,722],{"class":721},[715,3618,729],{"class":728},[715,3620,3621],{"class":732}," DrizzleDurableTimerStore",[715,3623,736],{"class":728},[715,3625,739],{"class":721},[715,3627,742],{"class":728},[715,3629,3455],{"class":745},[715,3631,749],{"class":728},[715,3633,752],{"class":728},[715,3635,3636,3638,3640,3643,3645,3647,3649,3652,3654],{"class":717,"line":778},[715,3637,722],{"class":721},[715,3639,729],{"class":728},[715,3641,3642],{"class":732}," Database",[715,3644,736],{"class":728},[715,3646,739],{"class":721},[715,3648,742],{"class":728},[715,3650,3651],{"class":745},"..\u002Fdatabase\u002Fdatabase",[715,3653,749],{"class":728},[715,3655,752],{"class":728},[715,3657,3658,3660,3662,3665,3667,3669,3671,3674,3676],{"class":717,"line":801},[715,3659,722],{"class":721},[715,3661,729],{"class":728},[715,3663,3664],{"class":732}," durableTimers",[715,3666,736],{"class":728},[715,3668,739],{"class":721},[715,3670,742],{"class":728},[715,3672,3673],{"class":745},".\u002Fdurable-timers-table",[715,3675,749],{"class":728},[715,3677,752],{"class":728},[715,3679,3680],{"class":717,"line":808},[715,3681,805],{"emptyLinePlaceholder":804},[715,3683,3684,3686,3688,3691,3693,3695,3697,3699],{"class":717,"line":845},[715,3685,811],{"class":721},[715,3687,960],{"class":814},[715,3689,3690],{"class":817}," AppDurableTimerStore",[715,3692,909],{"class":814},[715,3694,3621],{"class":817},[715,3696,1995],{"class":814},[715,3698,3600],{"class":817},[715,3700,927],{"class":728},[715,3702,3703,3705,3707,3709,3712,3714,3716,3718],{"class":717,"line":850},[715,3704,986],{"class":814},[715,3706,2030],{"class":814},[715,3708,995],{"class":728},[715,3710,3711],{"class":998},"database",[715,3713,937],{"class":728},[715,3715,3642],{"class":817},[715,3717,1045],{"class":728},[715,3719,927],{"class":728},[715,3721,3722,3724,3726,3728,3730,3732,3734],{"class":717,"line":895},[715,3723,3056],{"class":732},[715,3725,995],{"class":933},[715,3727,3711],{"class":732},[715,3729,832],{"class":728},[715,3731,3664],{"class":732},[715,3733,1045],{"class":933},[715,3735,752],{"class":728},[715,3737,3738],{"class":717,"line":900},[715,3739,1053],{"class":728},[715,3741,3742],{"class":717,"line":930},[715,3743,947],{"class":728},[499,3745,3746,3747,2812,3750,3753,3754,3757,3758,3761],{},"Both ",[506,3748,3749],{},"extends DrizzleDurableTimerStore",[506,3751,3752],{},"implements DurableTimerStore"," are required: ",[506,3755,3756],{},"extends"," provides the\nimplementation; ",[506,3759,3760],{},"implements"," makes the class satisfy the abstract token.",[533,3763,3765],{"id":3764},"wire-the-module","Wire the module",[499,3767,3768,3769,3772,3773,3776,3777,3779,3780,3782,3783,3785,3786,3789,3790,3793,3794,3796,3797,3799,3800,3802,3803,3805],{},"List each typed ",[506,3770,3771],{},"IntegrationEvent"," producer under ",[506,3774,3775],{},"integration: { events }",", the ",[506,3778,518],{}," subclass under\n",[506,3781,592],{},", and the ",[506,3784,641],{}," subclass under ",[506,3787,3788],{},"saga: { timeouts }",". ",[506,3791,3792],{},"AppDurableTimerStore"," and a\n",[506,3795,77],{}," must be reachable in the same module's DI scope. ",[506,3798,512],{}," itself is NOT listed in ",[506,3801,3373],{}," —\n",[506,3804,3377],{}," emits it as a core provider:",[705,3807,3810],{"className":707,"code":3808,"filename":3809,"language":710,"meta":711,"style":711},"import { Module } from \"@heximon\u002Fruntime\";\nimport {\n  OrderCancelled,\n  OrderPlaced,\n  PaymentRequested,\n  ReservationReleased,\n} from \"..\u002Fevents\";\nimport { DatabaseModule } from \"..\u002Fdatabase\u002Fdatabase.module\";\nimport { OutboxModule } from \"..\u002Foutbox\u002Foutbox.module\";\nimport { AppDurableTimerStore } from \".\u002Fdurable-timer-store\";\nimport { InventoryReservedSagaHandler } from \".\u002Finventory-reserved.handler\";\nimport { OrderPaymentDeadline } from \".\u002Forder-payment-deadline\";\nimport { OrderSagaRepository } from \".\u002Forder-saga.repository\";\nimport { OrdersController } from \".\u002Forders.controller\";\nimport { PaymentProcessedSagaHandler } from \".\u002Fpayment-processed.handler\";\nimport { PaymentTimeoutHandler } from \".\u002Fpayment-timeout.handler\";\n\nexport class SagaModule extends Module({\n  imports: [DatabaseModule, OutboxModule],\n  providers: [OrderSagaRepository, AppDurableTimerStore],\n  http: { controllers: [OrdersController] },\n  integration: { events: [OrderPlaced, PaymentRequested, ReservationReleased, OrderCancelled],\n    eventHandlers: [InventoryReservedSagaHandler, PaymentProcessedSagaHandler],\n  },\n  saga: {\n    timers: [OrderPaymentDeadline],\n    timeouts: [PaymentTimeoutHandler],\n  },\n  exports: [OrderSagaRepository],\n}) {}\n","saga\u002Fsaga.module.ts",[506,3811,3812,3834,3840,3847,3854,3861,3868,3882,3904,3926,3947,3968,3988,4008,4030,4051,4072,4076,4093,4110,4127,4147,4179,4196,4201,4210,4222,4234,4238,4250],{"__ignoreMap":711},[715,3813,3814,3816,3818,3821,3823,3825,3827,3830,3832],{"class":717,"line":718},[715,3815,722],{"class":721},[715,3817,729],{"class":728},[715,3819,3820],{"class":732}," Module",[715,3822,736],{"class":728},[715,3824,739],{"class":721},[715,3826,742],{"class":728},[715,3828,3829],{"class":745},"@heximon\u002Fruntime",[715,3831,749],{"class":728},[715,3833,752],{"class":728},[715,3835,3836,3838],{"class":717,"line":755},[715,3837,722],{"class":721},[715,3839,927],{"class":728},[715,3841,3842,3845],{"class":717,"line":778},[715,3843,3844],{"class":732},"  OrderCancelled",[715,3846,1527],{"class":728},[715,3848,3849,3852],{"class":717,"line":801},[715,3850,3851],{"class":732},"  OrderPlaced",[715,3853,1527],{"class":728},[715,3855,3856,3859],{"class":717,"line":808},[715,3857,3858],{"class":732},"  PaymentRequested",[715,3860,1527],{"class":728},[715,3862,3863,3866],{"class":717,"line":845},[715,3864,3865],{"class":732},"  ReservationReleased",[715,3867,1527],{"class":728},[715,3869,3870,3872,3874,3876,3878,3880],{"class":717,"line":850},[715,3871,1470],{"class":728},[715,3873,739],{"class":721},[715,3875,742],{"class":728},[715,3877,1909],{"class":745},[715,3879,749],{"class":728},[715,3881,752],{"class":728},[715,3883,3884,3886,3888,3891,3893,3895,3897,3900,3902],{"class":717,"line":895},[715,3885,722],{"class":721},[715,3887,729],{"class":728},[715,3889,3890],{"class":732}," DatabaseModule",[715,3892,736],{"class":728},[715,3894,739],{"class":721},[715,3896,742],{"class":728},[715,3898,3899],{"class":745},"..\u002Fdatabase\u002Fdatabase.module",[715,3901,749],{"class":728},[715,3903,752],{"class":728},[715,3905,3906,3908,3910,3913,3915,3917,3919,3922,3924],{"class":717,"line":900},[715,3907,722],{"class":721},[715,3909,729],{"class":728},[715,3911,3912],{"class":732}," OutboxModule",[715,3914,736],{"class":728},[715,3916,739],{"class":721},[715,3918,742],{"class":728},[715,3920,3921],{"class":745},"..\u002Foutbox\u002Foutbox.module",[715,3923,749],{"class":728},[715,3925,752],{"class":728},[715,3927,3928,3930,3932,3934,3936,3938,3940,3943,3945],{"class":717,"line":930},[715,3929,722],{"class":721},[715,3931,729],{"class":728},[715,3933,3690],{"class":732},[715,3935,736],{"class":728},[715,3937,739],{"class":721},[715,3939,742],{"class":728},[715,3941,3942],{"class":745},".\u002Fdurable-timer-store",[715,3944,749],{"class":728},[715,3946,752],{"class":728},[715,3948,3949,3951,3953,3955,3957,3959,3961,3964,3966],{"class":717,"line":944},[715,3950,722],{"class":721},[715,3952,729],{"class":728},[715,3954,1992],{"class":732},[715,3956,736],{"class":728},[715,3958,739],{"class":721},[715,3960,742],{"class":728},[715,3962,3963],{"class":745},".\u002Finventory-reserved.handler",[715,3965,749],{"class":728},[715,3967,752],{"class":728},[715,3969,3970,3972,3974,3976,3978,3980,3982,3984,3986],{"class":717,"line":950},[715,3971,722],{"class":721},[715,3973,729],{"class":728},[715,3975,1683],{"class":732},[715,3977,736],{"class":728},[715,3979,739],{"class":721},[715,3981,742],{"class":728},[715,3983,1930],{"class":745},[715,3985,749],{"class":728},[715,3987,752],{"class":728},[715,3989,3990,3992,3994,3996,3998,4000,4002,4004,4006],{"class":717,"line":955},[715,3991,722],{"class":721},[715,3993,729],{"class":728},[715,3995,1966],{"class":732},[715,3997,736],{"class":728},[715,3999,739],{"class":721},[715,4001,742],{"class":728},[715,4003,1975],{"class":745},[715,4005,749],{"class":728},[715,4007,752],{"class":728},[715,4009,4010,4012,4014,4017,4019,4021,4023,4026,4028],{"class":717,"line":983},[715,4011,722],{"class":721},[715,4013,729],{"class":728},[715,4015,4016],{"class":732}," OrdersController",[715,4018,736],{"class":728},[715,4020,739],{"class":721},[715,4022,742],{"class":728},[715,4024,4025],{"class":745},".\u002Forders.controller",[715,4027,749],{"class":728},[715,4029,752],{"class":728},[715,4031,4032,4034,4036,4038,4040,4042,4044,4047,4049],{"class":717,"line":1012},[715,4033,722],{"class":721},[715,4035,729],{"class":728},[715,4037,2535],{"class":732},[715,4039,736],{"class":728},[715,4041,739],{"class":721},[715,4043,742],{"class":728},[715,4045,4046],{"class":745},".\u002Fpayment-processed.handler",[715,4048,749],{"class":728},[715,4050,752],{"class":728},[715,4052,4053,4055,4057,4059,4061,4063,4065,4068,4070],{"class":717,"line":1050},[715,4054,722],{"class":721},[715,4056,729],{"class":728},[715,4058,2981],{"class":732},[715,4060,736],{"class":728},[715,4062,739],{"class":721},[715,4064,742],{"class":728},[715,4066,4067],{"class":745},".\u002Fpayment-timeout.handler",[715,4069,749],{"class":728},[715,4071,752],{"class":728},[715,4073,4074],{"class":717,"line":1056},[715,4075,805],{"emptyLinePlaceholder":804},[715,4077,4078,4080,4082,4085,4087,4089,4091],{"class":717,"line":1061},[715,4079,811],{"class":721},[715,4081,960],{"class":814},[715,4083,4084],{"class":817}," SagaModule",[715,4086,909],{"class":814},[715,4088,3820],{"class":1021},[715,4090,995],{"class":732},[715,4092,1438],{"class":728},[715,4094,4095,4098,4100,4103,4105,4108],{"class":717,"line":1078},[715,4096,4097],{"class":933},"  imports",[715,4099,937],{"class":728},[715,4101,4102],{"class":732}," [DatabaseModule",[715,4104,832],{"class":728},[715,4106,4107],{"class":732}," OutboxModule]",[715,4109,1527],{"class":728},[715,4111,4112,4115,4117,4120,4122,4125],{"class":717,"line":1096},[715,4113,4114],{"class":933},"  providers",[715,4116,937],{"class":728},[715,4118,4119],{"class":732}," [OrderSagaRepository",[715,4121,832],{"class":728},[715,4123,4124],{"class":732}," AppDurableTimerStore]",[715,4126,1527],{"class":728},[715,4128,4129,4132,4134,4136,4139,4141,4144],{"class":717,"line":1101},[715,4130,4131],{"class":933},"  http",[715,4133,937],{"class":728},[715,4135,729],{"class":728},[715,4137,4138],{"class":933}," controllers",[715,4140,937],{"class":728},[715,4142,4143],{"class":732}," [OrdersController] ",[715,4145,4146],{"class":728},"},\n",[715,4148,4149,4152,4154,4156,4159,4161,4164,4166,4168,4170,4172,4174,4177],{"class":717,"line":1106},[715,4150,4151],{"class":933},"  integration",[715,4153,937],{"class":728},[715,4155,729],{"class":728},[715,4157,4158],{"class":933}," events",[715,4160,937],{"class":728},[715,4162,4163],{"class":732}," [OrderPlaced",[715,4165,832],{"class":728},[715,4167,1900],{"class":732},[715,4169,832],{"class":728},[715,4171,2888],{"class":732},[715,4173,832],{"class":728},[715,4175,4176],{"class":732}," OrderCancelled]",[715,4178,1527],{"class":728},[715,4180,4181,4184,4186,4189,4191,4194],{"class":717,"line":1121},[715,4182,4183],{"class":933},"    eventHandlers",[715,4185,937],{"class":728},[715,4187,4188],{"class":732}," [InventoryReservedSagaHandler",[715,4190,832],{"class":728},[715,4192,4193],{"class":732}," PaymentProcessedSagaHandler]",[715,4195,1527],{"class":728},[715,4197,4198],{"class":717,"line":1145},[715,4199,4200],{"class":728},"  },\n",[715,4202,4203,4206,4208],{"class":717,"line":1150},[715,4204,4205],{"class":933},"  saga",[715,4207,937],{"class":728},[715,4209,927],{"class":728},[715,4211,4212,4215,4217,4220],{"class":717,"line":1155},[715,4213,4214],{"class":933},"    timers",[715,4216,937],{"class":728},[715,4218,4219],{"class":732}," [OrderPaymentDeadline]",[715,4221,1527],{"class":728},[715,4223,4224,4227,4229,4232],{"class":717,"line":1170},[715,4225,4226],{"class":933},"    timeouts",[715,4228,937],{"class":728},[715,4230,4231],{"class":732}," [PaymentTimeoutHandler]",[715,4233,1527],{"class":728},[715,4235,4236],{"class":717,"line":1200},[715,4237,4200],{"class":728},[715,4239,4240,4243,4245,4248],{"class":717,"line":1221},[715,4241,4242],{"class":933},"  exports",[715,4244,937],{"class":728},[715,4246,4247],{"class":732}," [OrderSagaRepository]",[715,4249,1527],{"class":728},[715,4251,4252,4254,4256],{"class":717,"line":1226},[715,4253,1470],{"class":728},[715,4255,1435],{"class":732},[715,4257,4258],{"class":728},"{}\n",[499,4260,4261,4262,4264,4265,4268,4269,4272,4273,4275],{},"Register ",[506,4263,3377],{}," in ",[506,4266,4267],{},"heximon.config.ts"," after ",[506,4270,4271],{},"QueuePlugin"," (the saga plugin contributes its handlers into\nthe queue dispatch table, so ",[506,4274,4271],{}," must be listed first):",[705,4277,4279],{"className":707,"code":4278,"filename":4267,"language":710,"meta":711,"style":711},"import { defineHeximonConfig } from \"@heximon\u002Fbuild\";\nimport { IntegrationEventsPlugin } from \"@heximon\u002Fintegration\u002Fcompiler\";\nimport { HttpPlugin } from \"@heximon\u002Fhttp\u002Fcompiler\";\nimport { QueuePlugin } from \"@heximon\u002Fqueue\u002Fcompiler\";\nimport { SagaPlugin } from \"@heximon\u002Fsaga\u002Fcompiler\";\n\nexport default defineHeximonConfig({\n  plugins: [new HttpPlugin(), new QueuePlugin(), new IntegrationEventsPlugin(), new SagaPlugin()],\n});\n",[506,4280,4281,4303,4325,4347,4369,4391,4395,4408,4451],{"__ignoreMap":711},[715,4282,4283,4285,4287,4290,4292,4294,4296,4299,4301],{"class":717,"line":718},[715,4284,722],{"class":721},[715,4286,729],{"class":728},[715,4288,4289],{"class":732}," defineHeximonConfig",[715,4291,736],{"class":728},[715,4293,739],{"class":721},[715,4295,742],{"class":728},[715,4297,4298],{"class":745},"@heximon\u002Fbuild",[715,4300,749],{"class":728},[715,4302,752],{"class":728},[715,4304,4305,4307,4309,4312,4314,4316,4318,4321,4323],{"class":717,"line":755},[715,4306,722],{"class":721},[715,4308,729],{"class":728},[715,4310,4311],{"class":732}," IntegrationEventsPlugin",[715,4313,736],{"class":728},[715,4315,739],{"class":721},[715,4317,742],{"class":728},[715,4319,4320],{"class":745},"@heximon\u002Fintegration\u002Fcompiler",[715,4322,749],{"class":728},[715,4324,752],{"class":728},[715,4326,4327,4329,4331,4334,4336,4338,4340,4343,4345],{"class":717,"line":778},[715,4328,722],{"class":721},[715,4330,729],{"class":728},[715,4332,4333],{"class":732}," HttpPlugin",[715,4335,736],{"class":728},[715,4337,739],{"class":721},[715,4339,742],{"class":728},[715,4341,4342],{"class":745},"@heximon\u002Fhttp\u002Fcompiler",[715,4344,749],{"class":728},[715,4346,752],{"class":728},[715,4348,4349,4351,4353,4356,4358,4360,4362,4365,4367],{"class":717,"line":801},[715,4350,722],{"class":721},[715,4352,729],{"class":728},[715,4354,4355],{"class":732}," QueuePlugin",[715,4357,736],{"class":728},[715,4359,739],{"class":721},[715,4361,742],{"class":728},[715,4363,4364],{"class":745},"@heximon\u002Fqueue\u002Fcompiler",[715,4366,749],{"class":728},[715,4368,752],{"class":728},[715,4370,4371,4373,4375,4378,4380,4382,4384,4387,4389],{"class":717,"line":808},[715,4372,722],{"class":721},[715,4374,729],{"class":728},[715,4376,4377],{"class":732}," SagaPlugin",[715,4379,736],{"class":728},[715,4381,739],{"class":721},[715,4383,742],{"class":728},[715,4385,4386],{"class":745},"@heximon\u002Fsaga\u002Fcompiler",[715,4388,749],{"class":728},[715,4390,752],{"class":728},[715,4392,4393],{"class":717,"line":845},[715,4394,805],{"emptyLinePlaceholder":804},[715,4396,4397,4399,4402,4404,4406],{"class":717,"line":850},[715,4398,811],{"class":721},[715,4400,4401],{"class":721}," default",[715,4403,4289],{"class":1021},[715,4405,995],{"class":732},[715,4407,1438],{"class":728},[715,4409,4410,4413,4415,4417,4420,4422,4424,4426,4428,4430,4432,4434,4436,4438,4440,4442,4444,4446,4449],{"class":717,"line":895},[715,4411,4412],{"class":933},"  plugins",[715,4414,937],{"class":728},[715,4416,3533],{"class":732},[715,4418,4419],{"class":728},"new",[715,4421,4333],{"class":1021},[715,4423,2236],{"class":732},[715,4425,832],{"class":728},[715,4427,1018],{"class":728},[715,4429,4355],{"class":1021},[715,4431,2236],{"class":732},[715,4433,832],{"class":728},[715,4435,1018],{"class":728},[715,4437,4311],{"class":1021},[715,4439,2236],{"class":732},[715,4441,832],{"class":728},[715,4443,1018],{"class":728},[715,4445,4377],{"class":1021},[715,4447,4448],{"class":732},"()]",[715,4450,1527],{"class":728},[715,4452,4453,4455,4457],{"class":717,"line":900},[715,4454,1470],{"class":728},[715,4456,1045],{"class":732},[715,4458,752],{"class":728},[4460,4461,4463,4492],"callout",{"type":4462},"warning",[499,4464,4465,4470,4471,4473,4474,4476,4477,4479,4480,4482,4483,4485,4486,4489,4490,656],{},[547,4466,4467],{},[506,4468,4469],{},"SagaTimerStoreUnbound"," — a build error fires when timeout handlers are declared but no concrete\n",[506,4472,3385],{}," satisfier AND a ",[506,4475,77],{}," satisfier are both reachable from the timeout handlers' owning\nmodule's DI scope. Both must be present: ",[506,4478,3792],{}," (in ",[506,4481,3373],{},") plus a ",[506,4484,77],{}," reachable\nvia ",[506,4487,4488],{},"imports"," or ",[506,4491,3373],{},[499,4493,4494,4495,4498,4499,4502],{},"This check is ",[547,4496,4497],{},"node-only"," — the edge tier needs no store or database (the Durable Object owns the timer\nstate), so it is not raised on an ",[506,4500,4501],{},"edge"," build.",[533,4504,92],{"id":4505},"migrations",[499,4507,1554,4508,4510,4511,4513,4514,4516],{},[506,4509,3389],{}," table is the one declared above (spreading ",[506,4512,3396],{}," from\n",[506,4515,3455],{},"). There is no framework-shipped migration — generate it from your declared schema with\ndrizzle-kit, the same as your domain tables.",[533,4518,4520],{"id":4519},"run-it-on-cloudflare","Run it on Cloudflare",[499,4522,1554,4523,4525,4526,4528,4529,4531,4532,4535,4536,4539,4540,4542,4543,656],{},[506,4524,512],{}," port your saga step injects is the same on every platform — only the satisfier the compiler\nbakes in differs per build target. On an ",[506,4527,4501],{}," build for Cloudflare, ",[506,4530,3377],{}," swaps in a shipped\n",[506,4533,4534],{},"TimerRoom"," Durable Object (one alarm per ",[506,4537,4538],{},"(sagaName, correlationKey, slot)"," triple) instead of the Node poller\n— no ",[506,4541,3389],{}," table, no ",[506,4544,3385],{},[499,4546,4547,4548,4551],{},"See ",[661,4549,4550],{"href":308},"Deploy to Cloudflare"," for the wrangler wiring and the Durable Object alarm\nmechanics.",[533,4553,4555],{"id":4554},"when-to-use-a-saga","When to use a saga",[499,4557,4558,4559,4563],{},"A saga trades choreography's simplicity for a deadline and a queryable process state — see the decision table\nin the ",[661,4560,4562],{"href":4561},"\u002Fdocs\u002Farchitecture\u002Foverview#choreography-saga-or-workflow","Architecture overview"," for how it stacks up\nagainst plain choreography and workflows.",[533,4565,4567],{"id":4566},"see-also","See also",[541,4569,4570,4575,4580,4588,4599,4610],{},[544,4571,4572,4574],{},[661,4573,485],{"href":486}," — the pattern this builds on; start here if you don't need a deadline.",[544,4576,4577,4579],{},[661,4578,480],{"href":481}," — the transactional outbox that makes each step durable.",[544,4581,4582,621,4584,4587],{},[661,4583,243],{"href":244},[506,4585,4586],{},"IntegrationEventHandler"," tier a saga's step and timeout handlers are built on.",[544,4589,4590,4592,4593,2812,4595,4598],{},[661,4591,228],{"href":229}," — ",[506,4594,553],{},[506,4596,4597],{},"Repository",", the process-state aggregate a saga persists.",[544,4600,4601,621,4603,4605,4606,4609],{},[661,4602,4550],{"href":308},[506,4604,4534],{}," Durable Object leg and ",[506,4607,4608],{},"wrangler.json"," wiring for the edge tier.",[544,4611,4612,4617,4618,4623],{},[661,4613,4616],{"href":4614,"rel":4615},"https:\u002F\u002Fgithub.com\u002Fheximon\u002Fheximon\u002Ftree\u002Fmain\u002Fexamples\u002Fgap\u002Fsaga-orchestration",[665],"Saga orchestration"," — the complete, runnable three-context app; its ",[661,4619,4622],{"href":4620,"rel":4621},"https:\u002F\u002Fgithub.com\u002Fheximon\u002Fheximon\u002Fblob\u002Fmain\u002Fexamples\u002Fgap\u002Fsaga-orchestration\u002Ftest\u002Fsaga-orchestration.test.ts",[665],"test suite"," proves both the happy path (deadline cancelled) and the compensation path (deadline fires) with an in-process e2e.",[4625,4626,4627],"style",{},"html pre.shiki code .s7zQu, html code.shiki .s7zQu{--shiki-light:#39ADB5;--shiki-light-font-style:italic;--shiki-default:#89DDFF;--shiki-default-font-style:italic;--shiki-dark:#89DDFF;--shiki-dark-font-style:italic}html pre.shiki code .sMK4o, html code.shiki .sMK4o{--shiki-light:#39ADB5;--shiki-default:#89DDFF;--shiki-dark:#89DDFF}html pre.shiki code .sTEyZ, html code.shiki .sTEyZ{--shiki-light:#90A4AE;--shiki-default:#EEFFFF;--shiki-dark:#BABED8}html pre.shiki code .sfazB, html code.shiki .sfazB{--shiki-light:#91B859;--shiki-default:#C3E88D;--shiki-dark:#C3E88D}html pre.shiki code .spNyl, html code.shiki .spNyl{--shiki-light:#9C3EDA;--shiki-default:#C792EA;--shiki-dark:#C792EA}html pre.shiki code .sBMFI, html code.shiki .sBMFI{--shiki-light:#E2931D;--shiki-default:#FFCB6B;--shiki-dark:#FFCB6B}html pre.shiki code .swJcz, html code.shiki .swJcz{--shiki-light:#E53935;--shiki-default:#F07178;--shiki-dark:#F07178}html pre.shiki code .sHdIc, html code.shiki .sHdIc{--shiki-light:#90A4AE;--shiki-light-font-style:italic;--shiki-default:#EEFFFF;--shiki-default-font-style:italic;--shiki-dark:#BABED8;--shiki-dark-font-style:italic}html pre.shiki code .s2Zo4, html code.shiki .s2Zo4{--shiki-light:#6182B8;--shiki-default:#82AAFF;--shiki-dark:#82AAFF}html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .sbssI, html code.shiki .sbssI{--shiki-light:#F76D47;--shiki-default:#F78C6C;--shiki-dark:#F78C6C}html pre.shiki code .sHwdD, html code.shiki .sHwdD{--shiki-light:#90A4AE;--shiki-light-font-style:italic;--shiki-default:#546E7A;--shiki-default-font-style:italic;--shiki-dark:#676E95;--shiki-dark-font-style:italic}",{"title":711,"searchDepth":755,"depth":755,"links":4629},[4630,4631,4632,4633,4634,4635,4636,4637,4638,4639,4640,4641],{"id":535,"depth":755,"text":536},{"id":685,"depth":755,"text":686},{"id":1560,"depth":755,"text":1561},{"id":1839,"depth":755,"text":1840},{"id":2402,"depth":755,"text":2403},{"id":2821,"depth":755,"text":2822},{"id":3364,"depth":755,"text":3365},{"id":3764,"depth":755,"text":3765},{"id":4505,"depth":755,"text":92},{"id":4519,"depth":755,"text":4520},{"id":4554,"depth":755,"text":4555},{"id":4566,"depth":755,"text":4567},"SagaTimer, TimeoutHandler, DurableTimer, DurableTimerStore, NodeDurableTimer, DrizzleDurableTimerStore, durableTimerColumns, SagaPlugin — durable one-shot deadlines that commit atomically with saga state.","md",null,{},{"icon":251},{"title":248,"description":4642},"pbfm9sephjujuF4pFl31NL6fTqK1YwA1wXwNKWymt8A",[4650,4652],{"title":243,"path":244,"stem":245,"description":4651,"icon":246,"children":-1},"Cross-context and cross-service events with IntegrationEvent producers, IntegrationEventHandler consumers, and the transactional outbox (OutboxStore, OutboxRelay, OutboxIntegrationEventTransport).",{"title":253,"path":254,"stem":255,"description":4653,"icon":256,"children":-1},"Workflow, WorkflowFactory, WorkflowStep, NodeWorkflowEngine — a linear imperative procedure that memoizes each step and survives restarts, with step.do durable checkpoints and step.sleep durable suspend\u002Fresume.",1783300761903]