@entifix/transactions 0.14.0 → 0.15.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (93) hide show
  1. package/README.md +6 -6
  2. package/dist/engine/index.d.ts +2 -9
  3. package/dist/engine/index.d.ts.map +1 -1
  4. package/dist/engine/index.js +3 -10
  5. package/dist/engine/index.js.map +1 -1
  6. package/dist/index.d.ts +0 -14
  7. package/dist/index.d.ts.map +1 -1
  8. package/dist/index.js +0 -14
  9. package/dist/index.js.map +1 -1
  10. package/dist/ports/participant-client.d.ts +7 -2
  11. package/dist/ports/participant-client.d.ts.map +1 -1
  12. package/dist/ports/participant-client.js.map +1 -1
  13. package/package.json +4 -4
  14. package/dist/contracts/command.d.ts +0 -59
  15. package/dist/contracts/command.d.ts.map +0 -1
  16. package/dist/contracts/command.js +0 -46
  17. package/dist/contracts/command.js.map +0 -1
  18. package/dist/contracts/event.d.ts +0 -85
  19. package/dist/contracts/event.d.ts.map +0 -1
  20. package/dist/contracts/event.js +0 -81
  21. package/dist/contracts/event.js.map +0 -1
  22. package/dist/contracts/messages.d.ts +0 -37
  23. package/dist/contracts/messages.d.ts.map +0 -1
  24. package/dist/contracts/messages.js +0 -68
  25. package/dist/contracts/messages.js.map +0 -1
  26. package/dist/contracts/record.d.ts +0 -106
  27. package/dist/contracts/record.d.ts.map +0 -1
  28. package/dist/contracts/record.js +0 -27
  29. package/dist/contracts/record.js.map +0 -1
  30. package/dist/contracts/saga-definition.d.ts +0 -181
  31. package/dist/contracts/saga-definition.d.ts.map +0 -1
  32. package/dist/contracts/saga-definition.js +0 -101
  33. package/dist/contracts/saga-definition.js.map +0 -1
  34. package/dist/engine/local-saga-dispatcher.d.ts +0 -35
  35. package/dist/engine/local-saga-dispatcher.d.ts.map +0 -1
  36. package/dist/engine/local-saga-dispatcher.js +0 -28
  37. package/dist/engine/local-saga-dispatcher.js.map +0 -1
  38. package/dist/engine/resolve-template.d.ts +0 -48
  39. package/dist/engine/resolve-template.d.ts.map +0 -1
  40. package/dist/engine/resolve-template.js +0 -95
  41. package/dist/engine/resolve-template.js.map +0 -1
  42. package/dist/engine/resume-sweep.d.ts +0 -46
  43. package/dist/engine/resume-sweep.d.ts.map +0 -1
  44. package/dist/engine/resume-sweep.js +0 -74
  45. package/dist/engine/resume-sweep.js.map +0 -1
  46. package/dist/engine/run-saga.d.ts +0 -54
  47. package/dist/engine/run-saga.d.ts.map +0 -1
  48. package/dist/engine/run-saga.js +0 -463
  49. package/dist/engine/run-saga.js.map +0 -1
  50. package/dist/engine/run-transaction.d.ts +0 -55
  51. package/dist/engine/run-transaction.d.ts.map +0 -1
  52. package/dist/engine/run-transaction.js +0 -101
  53. package/dist/engine/run-transaction.js.map +0 -1
  54. package/dist/mixins/transaction-mixins.d.ts +0 -20
  55. package/dist/mixins/transaction-mixins.d.ts.map +0 -1
  56. package/dist/mixins/transaction-mixins.js +0 -13
  57. package/dist/mixins/transaction-mixins.js.map +0 -1
  58. package/dist/ports/lock-service.d.ts +0 -24
  59. package/dist/ports/lock-service.d.ts.map +0 -1
  60. package/dist/ports/lock-service.js +0 -5
  61. package/dist/ports/lock-service.js.map +0 -1
  62. package/dist/ports/saga-dispatcher.d.ts +0 -46
  63. package/dist/ports/saga-dispatcher.d.ts.map +0 -1
  64. package/dist/ports/saga-dispatcher.js +0 -5
  65. package/dist/ports/saga-dispatcher.js.map +0 -1
  66. package/dist/ports/saga-store.d.ts +0 -96
  67. package/dist/ports/saga-store.d.ts.map +0 -1
  68. package/dist/ports/saga-store.js +0 -19
  69. package/dist/ports/saga-store.js.map +0 -1
  70. package/dist/ports/sequence-service.d.ts +0 -17
  71. package/dist/ports/sequence-service.d.ts.map +0 -1
  72. package/dist/ports/sequence-service.js +0 -5
  73. package/dist/ports/sequence-service.js.map +0 -1
  74. package/dist/ports/transaction-handler.d.ts +0 -66
  75. package/dist/ports/transaction-handler.d.ts.map +0 -1
  76. package/dist/ports/transaction-handler.js +0 -5
  77. package/dist/ports/transaction-handler.js.map +0 -1
  78. package/dist/ports/transaction-sink.d.ts +0 -120
  79. package/dist/ports/transaction-sink.d.ts.map +0 -1
  80. package/dist/ports/transaction-sink.js +0 -28
  81. package/dist/ports/transaction-sink.js.map +0 -1
  82. package/dist/ports/transaction-stream-hub.d.ts +0 -28
  83. package/dist/ports/transaction-stream-hub.d.ts.map +0 -1
  84. package/dist/ports/transaction-stream-hub.js +0 -5
  85. package/dist/ports/transaction-stream-hub.js.map +0 -1
  86. package/dist/stream/transaction-stream-hub.d.ts +0 -18
  87. package/dist/stream/transaction-stream-hub.d.ts.map +0 -1
  88. package/dist/stream/transaction-stream-hub.js +0 -50
  89. package/dist/stream/transaction-stream-hub.js.map +0 -1
  90. package/dist/use-case/facade.uc.d.ts +0 -22
  91. package/dist/use-case/facade.uc.d.ts.map +0 -1
  92. package/dist/use-case/facade.uc.js +0 -55
  93. package/dist/use-case/facade.uc.js.map +0 -1
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../src/engine/local-saga-dispatcher.ts"],"sourcesContent":["import type { Unavailable } from '@entifix/core';\nimport { Effect, Layer } from 'effect';\n\nimport type { SagaCall } from '../contracts/saga-definition.js';\nimport {\n type SagaDispatch,\n type SagaDispatcher,\n SagaDispatcherTag,\n type SagaResponse,\n} from '../ports/saga-dispatcher.js';\n\n/** What a local participant is handed: the dispatch, minus whom it is for. */\nexport type LocalSagaRequest = Omit<SagaDispatch, 'participant'>;\n\n/**\n * One participant answered in-process.\n *\n * The same contract an HTTP participant keeps: a business refusal is a response\n * with `ok: false` — the engine compensates on it — and only a failure to reach\n * the participant at all is an {@link Unavailable}. Key the side effect on\n * `commandId` (an inbox), because a resumed flow dispatches the same command\n * again.\n */\nexport type LocalSagaParticipant = (\n request: LocalSagaRequest,\n) => Effect.Effect<SagaResponse, Unavailable>;\n\n/**\n * A {@link SagaDispatcher} that calls participants in this process.\n *\n * The saga engine never does HTTP itself: a step is a `{ method, path }` handed\n * to the dispatcher port. So a flow whose every step belongs to one service needs\n * no transport, no crossing token and no second process — only this, with each\n * participant name mapped to the Effect that performs its commands. A handler\n * that serves several commands routes on `request.call`.\n *\n * ⚠️ A participant the definition names and this map lacks is a **defect**, not\n * a failed step: it is a wiring mistake the flow cannot recover from, and\n * reporting it as a refusal would compensate a flow for a bug.\n */\nexport const makeLocalSagaDispatcher = (\n participants: Readonly<Record<string, LocalSagaParticipant>>,\n): SagaDispatcher => ({\n dispatch: ({ participant, ...request }) => {\n const handle = participants[participant];\n return handle === undefined\n ? Effect.die(\n new Error(\n `The saga dispatched to participant \"${participant}\", which this service registered no local handler for.`,\n ),\n )\n : handle(request);\n },\n});\n\n/** Provides {@link SagaDispatcherTag} from local participants. */\nexport const LocalSagaDispatcherLayer = (\n participants: Readonly<Record<string, LocalSagaParticipant>>,\n): Layer.Layer<SagaDispatcherTag> =>\n Layer.succeed(SagaDispatcherTag, makeLocalSagaDispatcher(participants));\n\n/** True when a request is the given command, for a participant routing on it. */\nexport const isSagaCall = (\n request: LocalSagaRequest,\n call: SagaCall,\n): boolean =>\n request.call.method === call.method && request.call.path === call.path;\n"],"names":["Effect","Layer","SagaDispatcherTag","makeLocalSagaDispatcher","participants","dispatch","participant","request","handle","undefined","die","Error","LocalSagaDispatcherLayer","succeed","isSagaCall","call","method","path"],"mappings":";AACA,SAASA,MAAM,EAAEC,KAAK,QAAQ,SAAS;AAGvC,SAGEC,iBAAiB,QAEZ,8BAA8B;AAkBrC;;;;;;;;;;;;CAYC,GACD,OAAO,MAAMC,0BAA0B,CACrCC,eACoB,CAAA;QACpBC,UAAU;gBAAC,EAAEC,WAAW,EAAc,OAATC;;;YAC3B,MAAMC,SAASJ,YAAY,CAACE,YAAY;YACxC,OAAOE,WAAWC,YACdT,OAAOU,GAAG,CACR,IAAIC,MACF,CAAC,oCAAoC,EAAEL,YAAY,sDAAsD,CAAC,KAG9GE,OAAOD;QACb;IACF,CAAA,EAAG;AAEH,gEAAgE,GAChE,OAAO,MAAMK,2BAA2B,CACtCR,eAEAH,MAAMY,OAAO,CAACX,mBAAmBC,wBAAwBC,eAAe;AAE1E,+EAA+E,GAC/E,OAAO,MAAMU,aAAa,CACxBP,SACAQ,OAEAR,QAAQQ,IAAI,CAACC,MAAM,KAAKD,KAAKC,MAAM,IAAIT,QAAQQ,IAAI,CAACE,IAAI,KAAKF,KAAKE,IAAI,CAAC"}
@@ -1,48 +0,0 @@
1
- /**
2
- * Resolve a path template against a scope.
3
- *
4
- * `/api/reservation/{outcome.data.id}` with
5
- * `{ outcome: { data: { id: 'r-1' } } }` becomes `/api/reservation/r-1`.
6
- *
7
- * ⚠️ **An unresolved placeholder throws rather than interpolating `undefined`.**
8
- * The failure this prevents is specific and silent: a compensation whose
9
- * template no longer matches its participant's response shape would otherwise
10
- * `DELETE /api/reservation/undefined`, get a `404`, and be recorded as a
11
- * compensation that ran — leaving the hold in place and the saga reporting that
12
- * it was reversed. That is the "failed and stranded" state nobody plans for, arrived at by string interpolation.
13
- *
14
- * Values are URI-encoded: a participant's id is data, and a path segment is not
15
- * the place to discover it contained a slash.
16
- */
17
- export declare function resolveTemplate(template: string, scope: Record<string, unknown>): string;
18
- /**
19
- * Resolve the placeholders inside a **request body**, recursively.
20
- *
21
- * ⚠️ **Why a body needs this at all.** A step's payload can depend on what an
22
- * earlier step created: checkout's capture has to name the order that was just
23
- * written, and the order id is minted by order-service — so a caller cannot put
24
- * it in the body it sends when it starts the flow. Without this, the capture
25
- * carries a placeholder string and the order it names never advances, which is
26
- * precisely the defect measured on the live lab: a saga reporting `COMPLETED`
27
- * with a payment attached to nothing.
28
- *
29
- * ⚠️ **The template lives in the caller's `inputs`, never in the definition.**
30
- * That is a constraint, not an accident: a definition that carried
31
- * domain payloads would be importing the shape of another domain's entity, which
32
- * is the class of thing that has no legal home. The definition stays a list of
33
- * verbs and addresses; what to send is the caller's, and this only lets the
34
- * caller point at a value it could not have known yet.
35
- *
36
- * Two behaviours, and the difference is load-bearing:
37
- *
38
- * - A string that is **exactly** one placeholder resolves to the raw value, so
39
- * a number stays a number and an object stays an object. `"{steps.x.data.qty}"`
40
- * becoming the string `"3"` would reach a validator expecting a number.
41
- * - A string that merely **contains** placeholders is interpolated textually,
42
- * and — unlike {@link resolveTemplate} — **not** URI-encoded. A body is JSON,
43
- * not a path segment; encoding here would put `%20` in a customer's name.
44
- *
45
- * An unresolved placeholder throws, for the same reason it does in a path.
46
- */
47
- export declare function resolveBodyTemplate(value: unknown, scope: Record<string, unknown>): unknown;
48
- //# sourceMappingURL=resolve-template.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"resolve-template.d.ts","sourceRoot":"","sources":["../../src/engine/resolve-template.ts"],"names":[],"mappings":"AAcA;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,eAAe,CAC7B,QAAQ,EAAE,MAAM,EAChB,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAC7B,MAAM,CAUR;AAKD;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,wBAAgB,mBAAmB,CACjC,KAAK,EAAE,OAAO,EACd,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAC7B,OAAO,CAqCT"}
@@ -1,95 +0,0 @@
1
- /** The `{a.b.c}` placeholders a {@link SagaCall}'s path may carry. */ const PLACEHOLDER = /\{([^{}]+)\}/g;
2
- const readPath = (root, path)=>{
3
- let value = root;
4
- for (const segment of path.split('.')){
5
- if (value === null || typeof value !== 'object') {
6
- return undefined;
7
- }
8
- value = value[segment];
9
- }
10
- return value;
11
- };
12
- /**
13
- * Resolve a path template against a scope.
14
- *
15
- * `/api/reservation/{outcome.data.id}` with
16
- * `{ outcome: { data: { id: 'r-1' } } }` becomes `/api/reservation/r-1`.
17
- *
18
- * ⚠️ **An unresolved placeholder throws rather than interpolating `undefined`.**
19
- * The failure this prevents is specific and silent: a compensation whose
20
- * template no longer matches its participant's response shape would otherwise
21
- * `DELETE /api/reservation/undefined`, get a `404`, and be recorded as a
22
- * compensation that ran — leaving the hold in place and the saga reporting that
23
- * it was reversed. That is the "failed and stranded" state nobody plans for, arrived at by string interpolation.
24
- *
25
- * Values are URI-encoded: a participant's id is data, and a path segment is not
26
- * the place to discover it contained a slash.
27
- */ export function resolveTemplate(template, scope) {
28
- return template.replaceAll(PLACEHOLDER, (_match, path)=>{
29
- const value = readPath(scope, path);
30
- if (value === undefined || value === null) {
31
- throw new Error(`saga path template '${template}' has no value for '{${path}}'`);
32
- }
33
- return encodeURIComponent(String(value));
34
- });
35
- }
36
- /** A string that is nothing but one placeholder, so its type can be preserved. */ const WHOLE_PLACEHOLDER = /^\{([^{}]+)\}$/;
37
- /**
38
- * Resolve the placeholders inside a **request body**, recursively.
39
- *
40
- * ⚠️ **Why a body needs this at all.** A step's payload can depend on what an
41
- * earlier step created: checkout's capture has to name the order that was just
42
- * written, and the order id is minted by order-service — so a caller cannot put
43
- * it in the body it sends when it starts the flow. Without this, the capture
44
- * carries a placeholder string and the order it names never advances, which is
45
- * precisely the defect measured on the live lab: a saga reporting `COMPLETED`
46
- * with a payment attached to nothing.
47
- *
48
- * ⚠️ **The template lives in the caller's `inputs`, never in the definition.**
49
- * That is a constraint, not an accident: a definition that carried
50
- * domain payloads would be importing the shape of another domain's entity, which
51
- * is the class of thing that has no legal home. The definition stays a list of
52
- * verbs and addresses; what to send is the caller's, and this only lets the
53
- * caller point at a value it could not have known yet.
54
- *
55
- * Two behaviours, and the difference is load-bearing:
56
- *
57
- * - A string that is **exactly** one placeholder resolves to the raw value, so
58
- * a number stays a number and an object stays an object. `"{steps.x.data.qty}"`
59
- * becoming the string `"3"` would reach a validator expecting a number.
60
- * - A string that merely **contains** placeholders is interpolated textually,
61
- * and — unlike {@link resolveTemplate} — **not** URI-encoded. A body is JSON,
62
- * not a path segment; encoding here would put `%20` in a customer's name.
63
- *
64
- * An unresolved placeholder throws, for the same reason it does in a path.
65
- */ export function resolveBodyTemplate(value, scope) {
66
- if (typeof value === 'string') {
67
- const whole = WHOLE_PLACEHOLDER.exec(value);
68
- if ((whole == null ? void 0 : whole[1]) !== undefined) {
69
- const resolved = readPath(scope, whole[1]);
70
- if (resolved === undefined || resolved === null) {
71
- throw new Error(`saga body template '${value}' has no value for '{${whole[1]}}'`);
72
- }
73
- return resolved;
74
- }
75
- return value.replaceAll(PLACEHOLDER, (_match, path)=>{
76
- const resolved = readPath(scope, path);
77
- if (resolved === undefined || resolved === null) {
78
- throw new Error(`saga body template '${value}' has no value for '{${path}}'`);
79
- }
80
- return String(resolved);
81
- });
82
- }
83
- if (Array.isArray(value)) {
84
- return value.map((element)=>resolveBodyTemplate(element, scope));
85
- }
86
- if (value !== null && typeof value === 'object') {
87
- return Object.fromEntries(Object.entries(value).map(([key, entry])=>[
88
- key,
89
- resolveBodyTemplate(entry, scope)
90
- ]));
91
- }
92
- return value;
93
- }
94
-
95
- //# sourceMappingURL=resolve-template.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../src/engine/resolve-template.ts"],"sourcesContent":["/** The `{a.b.c}` placeholders a {@link SagaCall}'s path may carry. */\nconst PLACEHOLDER = /\\{([^{}]+)\\}/g;\n\nconst readPath = (root: unknown, path: string): unknown => {\n let value = root;\n for (const segment of path.split('.')) {\n if (value === null || typeof value !== 'object') {\n return undefined;\n }\n value = (value as Record<string, unknown>)[segment];\n }\n return value;\n};\n\n/**\n * Resolve a path template against a scope.\n *\n * `/api/reservation/{outcome.data.id}` with\n * `{ outcome: { data: { id: 'r-1' } } }` becomes `/api/reservation/r-1`.\n *\n * ⚠️ **An unresolved placeholder throws rather than interpolating `undefined`.**\n * The failure this prevents is specific and silent: a compensation whose\n * template no longer matches its participant's response shape would otherwise\n * `DELETE /api/reservation/undefined`, get a `404`, and be recorded as a\n * compensation that ran — leaving the hold in place and the saga reporting that\n * it was reversed. That is the \"failed and stranded\" state nobody plans for, arrived at by string interpolation.\n *\n * Values are URI-encoded: a participant's id is data, and a path segment is not\n * the place to discover it contained a slash.\n */\nexport function resolveTemplate(\n template: string,\n scope: Record<string, unknown>,\n): string {\n return template.replaceAll(PLACEHOLDER, (_match, path: string) => {\n const value = readPath(scope, path);\n if (value === undefined || value === null) {\n throw new Error(\n `saga path template '${template}' has no value for '{${path}}'`,\n );\n }\n return encodeURIComponent(String(value));\n });\n}\n\n/** A string that is nothing but one placeholder, so its type can be preserved. */\nconst WHOLE_PLACEHOLDER = /^\\{([^{}]+)\\}$/;\n\n/**\n * Resolve the placeholders inside a **request body**, recursively.\n *\n * ⚠️ **Why a body needs this at all.** A step's payload can depend on what an\n * earlier step created: checkout's capture has to name the order that was just\n * written, and the order id is minted by order-service — so a caller cannot put\n * it in the body it sends when it starts the flow. Without this, the capture\n * carries a placeholder string and the order it names never advances, which is\n * precisely the defect measured on the live lab: a saga reporting `COMPLETED`\n * with a payment attached to nothing.\n *\n * ⚠️ **The template lives in the caller's `inputs`, never in the definition.**\n * That is a constraint, not an accident: a definition that carried\n * domain payloads would be importing the shape of another domain's entity, which\n * is the class of thing that has no legal home. The definition stays a list of\n * verbs and addresses; what to send is the caller's, and this only lets the\n * caller point at a value it could not have known yet.\n *\n * Two behaviours, and the difference is load-bearing:\n *\n * - A string that is **exactly** one placeholder resolves to the raw value, so\n * a number stays a number and an object stays an object. `\"{steps.x.data.qty}\"`\n * becoming the string `\"3\"` would reach a validator expecting a number.\n * - A string that merely **contains** placeholders is interpolated textually,\n * and — unlike {@link resolveTemplate} — **not** URI-encoded. A body is JSON,\n * not a path segment; encoding here would put `%20` in a customer's name.\n *\n * An unresolved placeholder throws, for the same reason it does in a path.\n */\nexport function resolveBodyTemplate(\n value: unknown,\n scope: Record<string, unknown>,\n): unknown {\n if (typeof value === 'string') {\n const whole = WHOLE_PLACEHOLDER.exec(value);\n if (whole?.[1] !== undefined) {\n const resolved = readPath(scope, whole[1]);\n if (resolved === undefined || resolved === null) {\n throw new Error(\n `saga body template '${value}' has no value for '{${whole[1]}}'`,\n );\n }\n return resolved;\n }\n return value.replaceAll(PLACEHOLDER, (_match, path: string) => {\n const resolved = readPath(scope, path);\n if (resolved === undefined || resolved === null) {\n throw new Error(\n `saga body template '${value}' has no value for '{${path}}'`,\n );\n }\n return String(resolved);\n });\n }\n\n if (Array.isArray(value)) {\n return value.map(element => resolveBodyTemplate(element, scope));\n }\n\n if (value !== null && typeof value === 'object') {\n return Object.fromEntries(\n Object.entries(value as Record<string, unknown>).map(([key, entry]) => [\n key,\n resolveBodyTemplate(entry, scope),\n ]),\n );\n }\n\n return value;\n}\n"],"names":["PLACEHOLDER","readPath","root","path","value","segment","split","undefined","resolveTemplate","template","scope","replaceAll","_match","Error","encodeURIComponent","String","WHOLE_PLACEHOLDER","resolveBodyTemplate","whole","exec","resolved","Array","isArray","map","element","Object","fromEntries","entries","key","entry"],"mappings":"AAAA,oEAAoE,GACpE,MAAMA,cAAc;AAEpB,MAAMC,WAAW,CAACC,MAAeC;IAC/B,IAAIC,QAAQF;IACZ,KAAK,MAAMG,WAAWF,KAAKG,KAAK,CAAC,KAAM;QACrC,IAAIF,UAAU,QAAQ,OAAOA,UAAU,UAAU;YAC/C,OAAOG;QACT;QACAH,QAAQ,AAACA,KAAiC,CAACC,QAAQ;IACrD;IACA,OAAOD;AACT;AAEA;;;;;;;;;;;;;;;CAeC,GACD,OAAO,SAASI,gBACdC,QAAgB,EAChBC,KAA8B;IAE9B,OAAOD,SAASE,UAAU,CAACX,aAAa,CAACY,QAAQT;QAC/C,MAAMC,QAAQH,SAASS,OAAOP;QAC9B,IAAIC,UAAUG,aAAaH,UAAU,MAAM;YACzC,MAAM,IAAIS,MACR,CAAC,oBAAoB,EAAEJ,SAAS,qBAAqB,EAAEN,KAAK,EAAE,CAAC;QAEnE;QACA,OAAOW,mBAAmBC,OAAOX;IACnC;AACF;AAEA,gFAAgF,GAChF,MAAMY,oBAAoB;AAE1B;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA4BC,GACD,OAAO,SAASC,oBACdb,KAAc,EACdM,KAA8B;IAE9B,IAAI,OAAON,UAAU,UAAU;QAC7B,MAAMc,QAAQF,kBAAkBG,IAAI,CAACf;QACrC,IAAIc,CAAAA,yBAAAA,KAAO,CAAC,EAAE,MAAKX,WAAW;YAC5B,MAAMa,WAAWnB,SAASS,OAAOQ,KAAK,CAAC,EAAE;YACzC,IAAIE,aAAab,aAAaa,aAAa,MAAM;gBAC/C,MAAM,IAAIP,MACR,CAAC,oBAAoB,EAAET,MAAM,qBAAqB,EAAEc,KAAK,CAAC,EAAE,CAAC,EAAE,CAAC;YAEpE;YACA,OAAOE;QACT;QACA,OAAOhB,MAAMO,UAAU,CAACX,aAAa,CAACY,QAAQT;YAC5C,MAAMiB,WAAWnB,SAASS,OAAOP;YACjC,IAAIiB,aAAab,aAAaa,aAAa,MAAM;gBAC/C,MAAM,IAAIP,MACR,CAAC,oBAAoB,EAAET,MAAM,qBAAqB,EAAED,KAAK,EAAE,CAAC;YAEhE;YACA,OAAOY,OAAOK;QAChB;IACF;IAEA,IAAIC,MAAMC,OAAO,CAAClB,QAAQ;QACxB,OAAOA,MAAMmB,GAAG,CAACC,CAAAA,UAAWP,oBAAoBO,SAASd;IAC3D;IAEA,IAAIN,UAAU,QAAQ,OAAOA,UAAU,UAAU;QAC/C,OAAOqB,OAAOC,WAAW,CACvBD,OAAOE,OAAO,CAACvB,OAAkCmB,GAAG,CAAC,CAAC,CAACK,KAAKC,MAAM,GAAK;gBACrED;gBACAX,oBAAoBY,OAAOnB;aAC5B;IAEL;IAEA,OAAON;AACT"}
@@ -1,46 +0,0 @@
1
- import { ShutdownRegistryTag } from '@entifix/business';
2
- import { Effect } from 'effect';
3
- import type { SagaDefinition } from '../contracts/saga-definition.js';
4
- import { SagaDispatcherTag } from '../ports/saga-dispatcher.js';
5
- import { SagaStoreTag } from '../ports/saga-store.js';
6
- export interface ResumeSweepOptions {
7
- /** Every flow this process can finish, by `definition.name`. */
8
- readonly definitions: readonly SagaDefinition[];
9
- /**
10
- * How long an instance may sit untouched before its coordinator is presumed
11
- * gone.
12
- *
13
- * ⚠️ **Must stay above the longest a step legitimately takes.** `updatedAt`
14
- * is re-stamped before every dispatch, so a slow participant keeps an instance
15
- * fresh — but a step slower than this window is resumed underneath the
16
- * coordinator still waiting on it, and only the participants' inboxes stop
17
- * that from being two side effects.
18
- */
19
- readonly staleAfterMs: number;
20
- /** Past this many sweeps, an instance settles `STRANDED` instead. */
21
- readonly maxResumeAttempts: number;
22
- }
23
- /**
24
- * One pass: find the instances nobody finished, claim each, and finish it.
25
- *
26
- * ⚠️ **`findStale` then `claimForResume`, never `findStale` then resume.** The
27
- * claim is a conditional write, so an instance another replica already took no
28
- * longer matches and is skipped. Without it two sweepers would walk one flow
29
- * together, and the attempt ceiling would count two attempts per tick.
30
- *
31
- * Failures are logged, per instance and around the pass, never raised: one flow
32
- * that cannot be resumed must not abandon the flows behind it, and a store that
33
- * is briefly unreachable must not kill the daemon that calls this.
34
- */
35
- export declare const resumeStaleSagas: ({ definitions, staleAfterMs, maxResumeAttempts, }: ResumeSweepOptions) => Effect.Effect<void, never, SagaStoreTag | SagaDispatcherTag>;
36
- /**
37
- * Runs {@link resumeStaleSagas} every `intervalMs` as a daemon, and stops it on
38
- * shutdown.
39
- *
40
- * `stop-intake`, not `flush`: the sweep writes the store and dispatches, so it
41
- * has to stop before the clients it goes through do.
42
- */
43
- export declare const startSagaResume: (options: ResumeSweepOptions & {
44
- readonly intervalMs: number;
45
- }) => Effect.Effect<void, never, SagaStoreTag | SagaDispatcherTag | ShutdownRegistryTag>;
46
- //# sourceMappingURL=resume-sweep.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"resume-sweep.d.ts","sourceRoot":"","sources":["../../src/engine/resume-sweep.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AACxD,OAAO,EAAY,MAAM,EAAS,MAAM,QAAQ,CAAC;AAEjD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,iCAAiC,CAAC;AACtE,OAAO,EAAE,iBAAiB,EAAE,MAAM,6BAA6B,CAAC;AAChE,OAAO,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAGtD,MAAM,WAAW,kBAAkB;IACjC,gEAAgE;IAChE,QAAQ,CAAC,WAAW,EAAE,SAAS,cAAc,EAAE,CAAC;IAChD;;;;;;;;;OASG;IACH,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC;IAC9B,qEAAqE;IACrE,QAAQ,CAAC,iBAAiB,EAAE,MAAM,CAAC;CACpC;AAED;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,gBAAgB,GAAI,mDAI9B,kBAAkB,KAAG,MAAM,CAAC,MAAM,CACnC,IAAI,EACJ,KAAK,EACL,YAAY,GAAG,iBAAiB,CAwD/B,CAAC;AAEJ;;;;;;GAMG;AACH,eAAO,MAAM,eAAe,GAC1B,SAAS,kBAAkB,GAAG;IAAE,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAA;CAAE,KAC5D,MAAM,CAAC,MAAM,CACd,IAAI,EACJ,KAAK,EACL,YAAY,GAAG,iBAAiB,GAAG,mBAAmB,CA0BpD,CAAC"}
@@ -1,74 +0,0 @@
1
- import { ShutdownRegistryTag } from '@entifix/business';
2
- import { Duration, Effect, Fiber } from 'effect';
3
- import { SagaDispatcherTag } from '../ports/saga-dispatcher.js';
4
- import { SagaStoreTag } from '../ports/saga-store.js';
5
- import { resumeSaga } from './run-saga.js';
6
- /**
7
- * One pass: find the instances nobody finished, claim each, and finish it.
8
- *
9
- * ⚠️ **`findStale` then `claimForResume`, never `findStale` then resume.** The
10
- * claim is a conditional write, so an instance another replica already took no
11
- * longer matches and is skipped. Without it two sweepers would walk one flow
12
- * together, and the attempt ceiling would count two attempts per tick.
13
- *
14
- * Failures are logged, per instance and around the pass, never raised: one flow
15
- * that cannot be resumed must not abandon the flows behind it, and a store that
16
- * is briefly unreachable must not kill the daemon that calls this.
17
- */ export const resumeStaleSagas = ({ definitions, staleAfterMs, maxResumeAttempts })=>Effect.gen(function*() {
18
- const store = yield* SagaStoreTag;
19
- const byName = new Map(definitions.map((definition)=>[
20
- definition.name,
21
- definition
22
- ]));
23
- for (const found of yield* store.findStale(staleAfterMs)){
24
- const definition = byName.get(found.definition);
25
- if (definition === undefined) {
26
- // Nothing here can finish a flow it cannot read, and settling it would
27
- // be a guess about its steps — so it is surfaced and left alone.
28
- yield* Effect.logError('stale saga names an unknown definition').pipe(Effect.annotateLogs({
29
- sagaId: found.sagaId,
30
- definition: found.definition
31
- }));
32
- continue;
33
- }
34
- const claimed = yield* store.claimForResume(found.sagaId, staleAfterMs);
35
- if (claimed === undefined) continue;
36
- yield* resumeSaga({
37
- instance: claimed,
38
- definition,
39
- maxResumeAttempts
40
- }).pipe(Effect.tap((result)=>Effect.logInfo('resumed a saga instance').pipe(Effect.annotateLogs({
41
- sagaId: claimed.sagaId,
42
- definition: claimed.definition,
43
- resumedFrom: claimed.state,
44
- settled: result.state
45
- }))), Effect.catch((error)=>Effect.logError('resuming a saga instance failed').pipe(Effect.annotateLogs({
46
- sagaId: claimed.sagaId,
47
- error: String(error)
48
- }))));
49
- }
50
- }).pipe(Effect.catch((error)=>Effect.logError('saga resume sweep failed').pipe(Effect.annotateLogs({
51
- error: String(error)
52
- }))));
53
- /**
54
- * Runs {@link resumeStaleSagas} every `intervalMs` as a daemon, and stops it on
55
- * shutdown.
56
- *
57
- * `stop-intake`, not `flush`: the sweep writes the store and dispatches, so it
58
- * has to stop before the clients it goes through do.
59
- */ export const startSagaResume = (options)=>Effect.gen(function*() {
60
- const store = yield* SagaStoreTag;
61
- const dispatcher = yield* SagaDispatcherTag;
62
- const shutdown = yield* ShutdownRegistryTag;
63
- // Resolved once at boot and provided to every pass, so the daemon needs
64
- // nothing from the context it outlives.
65
- const pass = resumeStaleSagas(options).pipe(Effect.provideService(SagaStoreTag, store), Effect.provideService(SagaDispatcherTag, dispatcher));
66
- const daemon = yield* Effect.forkDetach(pass.pipe(Effect.delay(Duration.millis(options.intervalMs)), Effect.forever));
67
- yield* shutdown.register({
68
- name: 'saga-resume-sweep',
69
- phase: 'stop-intake',
70
- run: Fiber.interrupt(daemon).pipe(Effect.asVoid)
71
- });
72
- });
73
-
74
- //# sourceMappingURL=resume-sweep.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../src/engine/resume-sweep.ts"],"sourcesContent":["import { ShutdownRegistryTag } from '@entifix/business';\nimport { Duration, Effect, Fiber } from 'effect';\n\nimport type { SagaDefinition } from '../contracts/saga-definition.js';\nimport { SagaDispatcherTag } from '../ports/saga-dispatcher.js';\nimport { SagaStoreTag } from '../ports/saga-store.js';\nimport { resumeSaga } from './run-saga.js';\n\nexport interface ResumeSweepOptions {\n /** Every flow this process can finish, by `definition.name`. */\n readonly definitions: readonly SagaDefinition[];\n /**\n * How long an instance may sit untouched before its coordinator is presumed\n * gone.\n *\n * ⚠️ **Must stay above the longest a step legitimately takes.** `updatedAt`\n * is re-stamped before every dispatch, so a slow participant keeps an instance\n * fresh — but a step slower than this window is resumed underneath the\n * coordinator still waiting on it, and only the participants' inboxes stop\n * that from being two side effects.\n */\n readonly staleAfterMs: number;\n /** Past this many sweeps, an instance settles `STRANDED` instead. */\n readonly maxResumeAttempts: number;\n}\n\n/**\n * One pass: find the instances nobody finished, claim each, and finish it.\n *\n * ⚠️ **`findStale` then `claimForResume`, never `findStale` then resume.** The\n * claim is a conditional write, so an instance another replica already took no\n * longer matches and is skipped. Without it two sweepers would walk one flow\n * together, and the attempt ceiling would count two attempts per tick.\n *\n * Failures are logged, per instance and around the pass, never raised: one flow\n * that cannot be resumed must not abandon the flows behind it, and a store that\n * is briefly unreachable must not kill the daemon that calls this.\n */\nexport const resumeStaleSagas = ({\n definitions,\n staleAfterMs,\n maxResumeAttempts,\n}: ResumeSweepOptions): Effect.Effect<\n void,\n never,\n SagaStoreTag | SagaDispatcherTag\n> =>\n Effect.gen(function* () {\n const store = yield* SagaStoreTag;\n const byName = new Map(\n definitions.map(definition => [definition.name, definition]),\n );\n\n for (const found of yield* store.findStale(staleAfterMs)) {\n const definition = byName.get(found.definition);\n if (definition === undefined) {\n // Nothing here can finish a flow it cannot read, and settling it would\n // be a guess about its steps — so it is surfaced and left alone.\n yield* Effect.logError('stale saga names an unknown definition').pipe(\n Effect.annotateLogs({\n sagaId: found.sagaId,\n definition: found.definition,\n }),\n );\n continue;\n }\n\n const claimed = yield* store.claimForResume(found.sagaId, staleAfterMs);\n if (claimed === undefined) continue;\n\n yield* resumeSaga({\n instance: claimed,\n definition,\n maxResumeAttempts,\n }).pipe(\n Effect.tap(result =>\n Effect.logInfo('resumed a saga instance').pipe(\n Effect.annotateLogs({\n sagaId: claimed.sagaId,\n definition: claimed.definition,\n resumedFrom: claimed.state,\n settled: result.state,\n }),\n ),\n ),\n Effect.catch(error =>\n Effect.logError('resuming a saga instance failed').pipe(\n Effect.annotateLogs({\n sagaId: claimed.sagaId,\n error: String(error),\n }),\n ),\n ),\n );\n }\n }).pipe(\n Effect.catch(error =>\n Effect.logError('saga resume sweep failed').pipe(\n Effect.annotateLogs({ error: String(error) }),\n ),\n ),\n );\n\n/**\n * Runs {@link resumeStaleSagas} every `intervalMs` as a daemon, and stops it on\n * shutdown.\n *\n * `stop-intake`, not `flush`: the sweep writes the store and dispatches, so it\n * has to stop before the clients it goes through do.\n */\nexport const startSagaResume = (\n options: ResumeSweepOptions & { readonly intervalMs: number },\n): Effect.Effect<\n void,\n never,\n SagaStoreTag | SagaDispatcherTag | ShutdownRegistryTag\n> =>\n Effect.gen(function* () {\n const store = yield* SagaStoreTag;\n const dispatcher = yield* SagaDispatcherTag;\n const shutdown = yield* ShutdownRegistryTag;\n\n // Resolved once at boot and provided to every pass, so the daemon needs\n // nothing from the context it outlives.\n const pass = resumeStaleSagas(options).pipe(\n Effect.provideService(SagaStoreTag, store),\n Effect.provideService(SagaDispatcherTag, dispatcher),\n );\n\n const daemon = yield* Effect.forkDetach(\n pass.pipe(\n Effect.delay(Duration.millis(options.intervalMs)),\n Effect.forever,\n ),\n );\n\n yield* shutdown.register({\n name: 'saga-resume-sweep',\n phase: 'stop-intake',\n run: Fiber.interrupt(daemon).pipe(Effect.asVoid),\n });\n });\n"],"names":["ShutdownRegistryTag","Duration","Effect","Fiber","SagaDispatcherTag","SagaStoreTag","resumeSaga","resumeStaleSagas","definitions","staleAfterMs","maxResumeAttempts","gen","store","byName","Map","map","definition","name","found","findStale","get","undefined","logError","pipe","annotateLogs","sagaId","claimed","claimForResume","instance","tap","result","logInfo","resumedFrom","state","settled","catch","error","String","startSagaResume","options","dispatcher","shutdown","pass","provideService","daemon","forkDetach","delay","millis","intervalMs","forever","register","phase","run","interrupt","asVoid"],"mappings":"AAAA,SAASA,mBAAmB,QAAQ,oBAAoB;AACxD,SAASC,QAAQ,EAAEC,MAAM,EAAEC,KAAK,QAAQ,SAAS;AAGjD,SAASC,iBAAiB,QAAQ,8BAA8B;AAChE,SAASC,YAAY,QAAQ,yBAAyB;AACtD,SAASC,UAAU,QAAQ,gBAAgB;AAoB3C;;;;;;;;;;;CAWC,GACD,OAAO,MAAMC,mBAAmB,CAAC,EAC/BC,WAAW,EACXC,YAAY,EACZC,iBAAiB,EACE,GAKnBR,OAAOS,GAAG,CAAC;QACT,MAAMC,QAAQ,OAAOP;QACrB,MAAMQ,SAAS,IAAIC,IACjBN,YAAYO,GAAG,CAACC,CAAAA,aAAc;gBAACA,WAAWC,IAAI;gBAAED;aAAW;QAG7D,KAAK,MAAME,SAAS,OAAON,MAAMO,SAAS,CAACV,cAAe;YACxD,MAAMO,aAAaH,OAAOO,GAAG,CAACF,MAAMF,UAAU;YAC9C,IAAIA,eAAeK,WAAW;gBAC5B,uEAAuE;gBACvE,iEAAiE;gBACjE,OAAOnB,OAAOoB,QAAQ,CAAC,0CAA0CC,IAAI,CACnErB,OAAOsB,YAAY,CAAC;oBAClBC,QAAQP,MAAMO,MAAM;oBACpBT,YAAYE,MAAMF,UAAU;gBAC9B;gBAEF;YACF;YAEA,MAAMU,UAAU,OAAOd,MAAMe,cAAc,CAACT,MAAMO,MAAM,EAAEhB;YAC1D,IAAIiB,YAAYL,WAAW;YAE3B,OAAOf,WAAW;gBAChBsB,UAAUF;gBACVV;gBACAN;YACF,GAAGa,IAAI,CACLrB,OAAO2B,GAAG,CAACC,CAAAA,SACT5B,OAAO6B,OAAO,CAAC,2BAA2BR,IAAI,CAC5CrB,OAAOsB,YAAY,CAAC;oBAClBC,QAAQC,QAAQD,MAAM;oBACtBT,YAAYU,QAAQV,UAAU;oBAC9BgB,aAAaN,QAAQO,KAAK;oBAC1BC,SAASJ,OAAOG,KAAK;gBACvB,MAGJ/B,OAAOiC,KAAK,CAACC,CAAAA,QACXlC,OAAOoB,QAAQ,CAAC,mCAAmCC,IAAI,CACrDrB,OAAOsB,YAAY,CAAC;oBAClBC,QAAQC,QAAQD,MAAM;oBACtBW,OAAOC,OAAOD;gBAChB;QAIR;IACF,GAAGb,IAAI,CACLrB,OAAOiC,KAAK,CAACC,CAAAA,QACXlC,OAAOoB,QAAQ,CAAC,4BAA4BC,IAAI,CAC9CrB,OAAOsB,YAAY,CAAC;YAAEY,OAAOC,OAAOD;QAAO,MAG/C;AAEJ;;;;;;CAMC,GACD,OAAO,MAAME,kBAAkB,CAC7BC,UAMArC,OAAOS,GAAG,CAAC;QACT,MAAMC,QAAQ,OAAOP;QACrB,MAAMmC,aAAa,OAAOpC;QAC1B,MAAMqC,WAAW,OAAOzC;QAExB,wEAAwE;QACxE,wCAAwC;QACxC,MAAM0C,OAAOnC,iBAAiBgC,SAAShB,IAAI,CACzCrB,OAAOyC,cAAc,CAACtC,cAAcO,QACpCV,OAAOyC,cAAc,CAACvC,mBAAmBoC;QAG3C,MAAMI,SAAS,OAAO1C,OAAO2C,UAAU,CACrCH,KAAKnB,IAAI,CACPrB,OAAO4C,KAAK,CAAC7C,SAAS8C,MAAM,CAACR,QAAQS,UAAU,IAC/C9C,OAAO+C,OAAO;QAIlB,OAAOR,SAASS,QAAQ,CAAC;YACvBjC,MAAM;YACNkC,OAAO;YACPC,KAAKjD,MAAMkD,SAAS,CAACT,QAAQrB,IAAI,CAACrB,OAAOoD,MAAM;QACjD;IACF,GAAG"}
@@ -1,54 +0,0 @@
1
- import type { StoreFailure } from '@entifix/core';
2
- import { Effect } from 'effect';
3
- import { type SagaDefinition, type SagaInputs, type SagaStepInput, type SagaStepOutcome } from '../contracts/saga-definition.js';
4
- import { SagaDispatcherTag } from '../ports/saga-dispatcher.js';
5
- import { type SagaInstance, SagaStoreTag } from '../ports/saga-store.js';
6
- export type { SagaInputs, SagaStepInput };
7
- export interface RunSagaOptions {
8
- readonly sagaId: string;
9
- readonly definition: SagaDefinition;
10
- readonly inputs: SagaInputs;
11
- }
12
- /** How a run ended. */
13
- export interface SagaResult {
14
- readonly state: 'COMPLETED' | 'COMPENSATED' | 'STRANDED';
15
- readonly outcomes: readonly SagaStepOutcome[];
16
- readonly error?: string;
17
- }
18
- /**
19
- * Start a flow and walk it to a terminal state.
20
- *
21
- * ⚠️ **Synchronous, and that is the buyer's requirement.** A checkout needs a
22
- * yes/no now, so this answers the settled result. What {@link resumeSaga} adds
23
- * is durability *behind* that answer: if this process dies mid-walk, the record
24
- * it has been writing all along is enough for another one to finish the flow.
25
- */
26
- export declare const runSaga: (options: RunSagaOptions) => Effect.Effect<SagaResult, StoreFailure, SagaDispatcherTag | SagaStoreTag>;
27
- export interface ResumeSagaOptions {
28
- readonly instance: SagaInstance;
29
- readonly definition: SagaDefinition;
30
- /** Past this many sweeps, the instance is surfaced instead of retried. */
31
- readonly maxResumeAttempts: number;
32
- }
33
- /**
34
- * Finish a flow another coordinator abandoned.
35
- *
36
- * ⚠️ **Where to re-enter is derived, never stored.** A resume point written
37
- * beside the outcomes would be a second record of the same fact, free to
38
- * disagree with them; the outcomes already say what happened, and
39
- * `beginStep`-before-dispatch means `stepIndex` says what was attempted. The
40
- * four cases are exhaustive:
41
- *
42
- * - the step at `stepIndex` recorded no outcome — the process died during the
43
- * dispatch, so **re-dispatch it**. Safe because `sagaCommandId` is stable
44
- * across attempts and every participant claims it in its own command inbox,
45
- * so calls that did land are recognised as replays rather than repeated.
46
- * - it recorded a successful outcome — the process died between
47
- * `recordOutcome` and the next `beginStep`, so **start at the one after**.
48
- * - it recorded a refusal — the process died deciding what to do about it, so
49
- * **re-enter that decision**: unwind, or strand if the pivot had committed.
50
- * - the instance is `COMPENSATING` — it died mid-unwind, so **continue the
51
- * unwind**, skipping steps already marked `compensated`.
52
- */
53
- export declare const resumeSaga: (options: ResumeSagaOptions) => Effect.Effect<SagaResult, StoreFailure, SagaDispatcherTag | SagaStoreTag>;
54
- //# sourceMappingURL=run-saga.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"run-saga.d.ts","sourceRoot":"","sources":["../../src/engine/run-saga.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAe,MAAM,eAAe,CAAC;AAC/D,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAEhC,OAAO,EAIL,KAAK,cAAc,EACnB,KAAK,UAAU,EAEf,KAAK,aAAa,EAClB,KAAK,eAAe,EACrB,MAAM,iCAAiC,CAAC;AACzC,OAAO,EAAE,iBAAiB,EAAE,MAAM,6BAA6B,CAAC;AAChE,OAAO,EACL,KAAK,YAAY,EAEjB,YAAY,EACb,MAAM,wBAAwB,CAAC;AAGhC,YAAY,EAAE,UAAU,EAAE,aAAa,EAAE,CAAC;AAa1C,MAAM,WAAW,cAAc;IAC7B,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,UAAU,EAAE,cAAc,CAAC;IACpC,QAAQ,CAAC,MAAM,EAAE,UAAU,CAAC;CAC7B;AAED,uBAAuB;AACvB,MAAM,WAAW,UAAU;IACzB,QAAQ,CAAC,KAAK,EAAE,WAAW,GAAG,aAAa,GAAG,UAAU,CAAC;IACzD,QAAQ,CAAC,QAAQ,EAAE,SAAS,eAAe,EAAE,CAAC;IAC9C,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC;CACzB;AAseD;;;;;;;GAOG;AACH,eAAO,MAAM,OAAO,GAClB,SAAS,cAAc,KACtB,MAAM,CAAC,MAAM,CAAC,UAAU,EAAE,YAAY,EAAE,iBAAiB,GAAG,YAAY,CAmBvE,CAAC;AAEL,MAAM,WAAW,iBAAiB;IAChC,QAAQ,CAAC,QAAQ,EAAE,YAAY,CAAC;IAChC,QAAQ,CAAC,UAAU,EAAE,cAAc,CAAC;IACpC,0EAA0E;IAC1E,QAAQ,CAAC,iBAAiB,EAAE,MAAM,CAAC;CACpC;AAED;;;;;;;;;;;;;;;;;;;GAmBG;AACH,eAAO,MAAM,UAAU,GACrB,SAAS,iBAAiB,KACzB,MAAM,CAAC,MAAM,CAAC,UAAU,EAAE,YAAY,EAAE,iBAAiB,GAAG,YAAY,CA6FvE,CAAC"}