@graphrefly/graphrefly 0.34.0 → 0.35.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.
- package/dist/{cascading-DKIb6Pk8.d.cts → cascading-B25wxpRa.d.cts} +3 -3
- package/dist/{cascading-Bg0a4VSf.d.ts → cascading-BsJ4GbnS.d.ts} +3 -3
- package/dist/{chunk-TZLEMGAK.js → chunk-2Y3DKIZL.js} +2 -2
- package/dist/chunk-3OT7K33Q.js +1 -0
- package/dist/chunk-53XJ2S6D.js +1 -0
- package/dist/chunk-5CPPC75H.js +1 -0
- package/dist/chunk-5KPIYVCC.js +7 -0
- package/dist/{chunk-GAOX6OPT.js → chunk-5XZRCS2M.js} +1 -1
- package/dist/{chunk-C5DINHNP.js → chunk-6G5YD37E.js} +1 -1
- package/dist/{chunk-WBWBY6LI.js → chunk-6SVKZ7VI.js} +1 -1
- package/dist/chunk-A5HZZYRK.js +1 -0
- package/dist/chunk-BGEY3PXH.js +1 -0
- package/dist/chunk-CD4CB6S7.js +1 -0
- package/dist/chunk-CE72X3WO.js +1 -0
- package/dist/chunk-CUQFO6MT.js +1 -0
- package/dist/chunk-D5RFJOZ2.js +1 -0
- package/dist/{chunk-A3GDELMY.js → chunk-E5YSBQSF.js} +7 -7
- package/dist/{chunk-SFIM774L.js → chunk-EUE7ELFQ.js} +1 -1
- package/dist/chunk-F3IGTWCQ.js +1 -0
- package/dist/chunk-F672GV32.js +1 -0
- package/dist/{chunk-GCUYSIM4.js → chunk-GWOKTENT.js} +1 -1
- package/dist/{chunk-4NYSEUKV.js → chunk-J6TGRQUP.js} +1 -1
- package/dist/{chunk-4F564IPP.js → chunk-JJTF75VS.js} +1 -1
- package/dist/{chunk-BY4WKPKM.js → chunk-JUJEPZOI.js} +1 -1
- package/dist/{chunk-65WWQ5CB.js → chunk-M5UC63ZI.js} +5 -5
- package/dist/chunk-MQZWA3DF.js +1 -0
- package/dist/chunk-MYFR67PY.js +18 -0
- package/dist/{chunk-KN2UMFT6.js → chunk-PCD2MU7X.js} +1 -1
- package/dist/{chunk-YDWTVO4E.js → chunk-PIIUJIF7.js} +1 -1
- package/dist/chunk-PVUTRA5K.js +5 -0
- package/dist/chunk-Q7EUZ6NN.js +1 -0
- package/dist/chunk-RLMYS3XZ.js +1 -0
- package/dist/chunk-RRFOCAH6.js +1 -0
- package/dist/{chunk-Q46YJCQH.js → chunk-T6RPUERH.js} +1 -1
- package/dist/{chunk-IPNJDNE7.js → chunk-T7GWBGOO.js} +1 -1
- package/dist/{chunk-U2T2XWDA.js → chunk-U347KVM4.js} +1 -1
- package/dist/chunk-UAMWD4GG.js +1 -0
- package/dist/chunk-VN6RDSK2.js +1 -0
- package/dist/{chunk-CJMFZXIZ.js → chunk-W2ZU226Q.js} +1 -1
- package/dist/{chunk-UF746BQ4.js → chunk-XINLP35X.js} +1 -1
- package/dist/{chunk-TONEKQM3.js → chunk-XMDNNSMK.js} +1 -1
- package/dist/{chunk-INXDSJRC.js → chunk-YOUAVGHJ.js} +1 -1
- package/dist/chunk-YV2A2VWG.js +1 -0
- package/dist/{chunk-PBN426RU.js → chunk-ZGVA2SR5.js} +1 -1
- package/dist/compat/index.cjs +10 -10
- package/dist/compat/index.d.cts +17 -14
- package/dist/compat/index.d.ts +17 -14
- package/dist/compat/index.js +1 -1
- package/dist/compat/jotai/index.d.cts +2 -2
- package/dist/compat/jotai/index.d.ts +2 -2
- package/dist/compat/nanostores/index.d.cts +2 -2
- package/dist/compat/nanostores/index.d.ts +2 -2
- package/dist/compat/nestjs/index.cjs +12 -12
- package/dist/compat/nestjs/index.d.cts +9 -6
- package/dist/compat/nestjs/index.d.ts +9 -6
- package/dist/compat/nestjs/index.js +1 -1
- package/dist/compat/react/index.d.cts +2 -2
- package/dist/compat/react/index.d.ts +2 -2
- package/dist/compat/solid/index.d.cts +2 -2
- package/dist/compat/solid/index.d.ts +2 -2
- package/dist/compat/svelte/index.d.cts +2 -2
- package/dist/compat/svelte/index.d.ts +2 -2
- package/dist/compat/vue/index.d.cts +2 -2
- package/dist/compat/vue/index.d.ts +2 -2
- package/dist/compat/zustand/index.cjs +7 -7
- package/dist/compat/zustand/index.d.cts +5 -4
- package/dist/compat/zustand/index.d.ts +5 -4
- package/dist/compat/zustand/index.js +1 -1
- package/dist/{composite-BPDU_XV1.d.ts → composite-CT_mApQD.d.ts} +2 -2
- package/dist/{composite-CmvdhTJe.d.cts → composite-_XckYx2e.d.cts} +2 -2
- package/dist/{content-addressed-storage-DqIWCmZG.d.cts → content-addressed-storage-4-ST1tYk.d.cts} +5 -5
- package/dist/{content-addressed-storage-BUiREIuj.d.ts → content-addressed-storage-DuYMjV7o.d.ts} +5 -5
- package/dist/core/index.d.cts +4 -4
- package/dist/core/index.d.ts +4 -4
- package/dist/extra/browser.cjs +1 -1
- package/dist/extra/browser.d.cts +4 -3
- package/dist/extra/browser.d.ts +4 -3
- package/dist/extra/browser.js +1 -1
- package/dist/extra/index.cjs +19 -19
- package/dist/extra/index.d.cts +13 -12
- package/dist/extra/index.d.ts +13 -12
- package/dist/extra/index.js +1 -1
- package/dist/extra/node.cjs +2 -3
- package/dist/extra/node.d.cts +3 -3
- package/dist/extra/node.d.ts +3 -3
- package/dist/extra/node.js +2 -2
- package/dist/extra/operators.cjs +1 -1
- package/dist/extra/operators.d.cts +1 -1
- package/dist/extra/operators.d.ts +1 -1
- package/dist/extra/operators.js +1 -1
- package/dist/extra/reactive.cjs +1 -1
- package/dist/extra/reactive.d.cts +4 -3
- package/dist/extra/reactive.d.ts +4 -3
- package/dist/extra/reactive.js +1 -1
- package/dist/extra/sources.cjs +1 -1
- package/dist/extra/sources.d.cts +57 -2
- package/dist/extra/sources.d.ts +57 -2
- package/dist/extra/sources.js +1 -1
- package/dist/extra/storage-browser.cjs +1 -1
- package/dist/extra/storage-browser.d.cts +8 -42
- package/dist/extra/storage-browser.d.ts +8 -42
- package/dist/extra/storage-browser.js +1 -1
- package/dist/extra/storage-core.cjs +1 -1
- package/dist/extra/storage-core.d.cts +13 -83
- package/dist/extra/storage-core.d.ts +13 -83
- package/dist/extra/storage-core.js +1 -1
- package/dist/extra/storage-node.cjs +1 -2
- package/dist/extra/storage-node.d.cts +1 -59
- package/dist/extra/storage-node.d.ts +1 -59
- package/dist/extra/storage-node.js +0 -1
- package/dist/extra/storage-tiers-browser.cjs +1 -0
- package/dist/extra/storage-tiers-browser.d.cts +49 -0
- package/dist/extra/storage-tiers-browser.d.ts +49 -0
- package/dist/extra/storage-tiers-browser.js +1 -0
- package/dist/extra/storage-tiers-node.cjs +1 -0
- package/dist/extra/storage-tiers-node.d.cts +86 -0
- package/dist/extra/storage-tiers-node.d.ts +86 -0
- package/dist/extra/storage-tiers-node.js +1 -0
- package/dist/extra/storage-tiers.cjs +1 -0
- package/dist/extra/storage-tiers.d.cts +284 -0
- package/dist/extra/storage-tiers.d.ts +284 -0
- package/dist/extra/storage-tiers.js +1 -0
- package/dist/{fallback-mYSd8vQo.d.ts → fallback-DuEXfA4F.d.ts} +14 -14
- package/dist/{fallback-9YznPvPP.d.cts → fallback-axI2cXwt.d.cts} +14 -14
- package/dist/graph/index.cjs +3 -3
- package/dist/graph/index.d.cts +6 -5
- package/dist/graph/index.d.ts +6 -5
- package/dist/graph/index.js +1 -1
- package/dist/{graph-BROUZPG9.d.ts → graph-Cv-8x0ZI.d.ts} +28 -16
- package/dist/{graph-DaoydJ_u.d.cts → graph-kTltt95s.d.cts} +28 -16
- package/dist/imperative-audit-ahAE65a9.d.cts +28 -0
- package/dist/imperative-audit-ahAE65a9.d.ts +28 -0
- package/dist/{index-CI5fULSz.d.ts → index-8OxXae3g.d.ts} +1 -1
- package/dist/{index-CQ1gt4rn.d.cts → index-9xhIaM-w.d.cts} +1 -1
- package/dist/{index-DhWrMTI6.d.cts → index-B3D_z0Z6.d.cts} +1 -1
- package/dist/{index-Ccv_61jG.d.cts → index-B3Dfl5sS.d.cts} +110 -27
- package/dist/{index-Dia4yc2y.d.ts → index-B4s70vYf.d.ts} +4 -4
- package/dist/{index-Db21wuaD.d.ts → index-B5UR87KG.d.ts} +3 -3
- package/dist/{index-DuvQAU02.d.ts → index-BBdwz2BW.d.ts} +2 -2
- package/dist/{index-B5eS17Bz.d.ts → index-BEvsFlfH.d.ts} +47 -32
- package/dist/{index-BUtCR0k6.d.ts → index-BF-ssbJB.d.ts} +7 -7
- package/dist/{index-ClKm7CFB.d.cts → index-BFuVcqL8.d.cts} +1 -1
- package/dist/{index-BkfL5MXh.d.cts → index-BWH17rK_.d.cts} +3 -3
- package/dist/{index-CD7qmvSf.d.ts → index-BZ1V5GzX.d.ts} +3 -3
- package/dist/{index-BDEhWLF4.d.cts → index-BhkPzu-Z.d.cts} +4 -4
- package/dist/{index-CNxdDb2e.d.ts → index-Bilohojo.d.ts} +3 -3
- package/dist/{index-zA1uVtk0.d.ts → index-BiomL7AW.d.ts} +1 -1
- package/dist/{index-BWiX5foT.d.ts → index-BjWZARLy.d.ts} +1 -1
- package/dist/{index-IxinNgAH.d.cts → index-BkbawFkI.d.cts} +16 -15
- package/dist/{index-RJX4snyi.d.cts → index-BlRVj-7Q.d.cts} +21 -21
- package/dist/index-BpFwRAf9.d.cts +26 -0
- package/dist/{index-Ds3Rz9m9.d.cts → index-BsZlbHM5.d.cts} +3 -3
- package/dist/{index-BFHpNSsV.d.ts → index-BtY2QVDf.d.cts} +8 -7
- package/dist/{index-BsxqmV6u.d.ts → index-BuMzxRO2.d.ts} +2 -2
- package/dist/{index-C5uMGVJw.d.ts → index-BwYGLgmI.d.ts} +4 -4
- package/dist/{index-3L3RC3VJ.d.ts → index-C40wA8zt.d.ts} +7 -7
- package/dist/{index-Bi4ZP6Hc.d.ts → index-C9xF16gc.d.ts} +110 -27
- package/dist/index-CAIhFfws.d.ts +171 -0
- package/dist/{index-BRisOxlx.d.ts → index-CDvC1m5p.d.ts} +1 -1
- package/dist/index-CGKs5ixV.d.cts +287 -0
- package/dist/{index-ygRFoyrN.d.ts → index-CI_yjtua.d.ts} +2 -2
- package/dist/{index-DxEcY7Om.d.ts → index-CIcu6fIR.d.ts} +1 -1
- package/dist/{index-CQtnGFrZ.d.cts → index-CfOSES72.d.cts} +7 -7
- package/dist/{index-Bd2AjMQY.d.ts → index-Cot94_82.d.ts} +21 -21
- package/dist/{index-B1hFhK1K.d.cts → index-CpZKtdMw.d.cts} +1 -1
- package/dist/{index-BO6t0HjV.d.cts → index-CqSJ25A9.d.cts} +1 -1
- package/dist/{index-Jgl7ev9I.d.cts → index-CzC0G0C3.d.cts} +9 -9
- package/dist/{index-p0bkNfby.d.cts → index-D6JRP-1_.d.cts} +3 -3
- package/dist/{index-D23g00HE.d.cts → index-D7r_vd0b.d.cts} +4 -4
- package/dist/{index-Cp91Sxbo.d.cts → index-D8IyqHvT.d.cts} +3 -3
- package/dist/{index-iKsmdnq6.d.cts → index-D9qoEOj_.d.cts} +2 -2
- package/dist/index-DBmBtqAN.d.ts +461 -0
- package/dist/{index-nP13Qe6T.d.ts → index-DFe2Pk2u.d.ts} +1 -1
- package/dist/{index-Cn3taOmp.d.cts → index-DKp1CIbG.d.cts} +2 -2
- package/dist/{index-CoR-tOZA.d.cts → index-DSD6xnbT.d.ts} +8 -7
- package/dist/{index-DheNs40A.d.ts → index-DXSLMoma.d.ts} +2 -2
- package/dist/{index-ZIQaKIdY.d.cts → index-DXZsXxtU.d.cts} +47 -32
- package/dist/{index-BVTjuKeP.d.cts → index-D_QQ_dTD.d.cts} +1 -1
- package/dist/{index-ChZvMC4M.d.cts → index-DeyzuqAi.d.cts} +7 -7
- package/dist/{index-Chi9IiHJ.d.ts → index-DlccEIi3.d.ts} +3 -3
- package/dist/{index-DR3XqZlV.d.cts → index-DmtWMP0X.d.cts} +1 -1
- package/dist/{index-CbCNoogR.d.ts → index-Dp69u0ym.d.ts} +16 -15
- package/dist/{index-b4a6Sg0R.d.ts → index-DwNNufVa.d.ts} +4 -4
- package/dist/{index-D80nGRb9.d.ts → index-DzYTXMBz.d.ts} +3 -3
- package/dist/index-DzgS5uYi.d.ts +26 -0
- package/dist/{index-B-KCkW4M.d.cts → index-GaW6Welt.d.cts} +4 -4
- package/dist/{index-DupIl9wI.d.ts → index-JYtN9uqM.d.ts} +1 -1
- package/dist/{index-Ced0dphF.d.ts → index-KNAMYngu.d.ts} +9 -9
- package/dist/{index-BpjQanLs.d.cts → index-PluovH45.d.cts} +2 -2
- package/dist/index-Qq-G9B6g.d.cts +171 -0
- package/dist/{index-yJY9thRY.d.cts → index-XxSeddWP.d.cts} +2 -2
- package/dist/{index-C8_bnDBZ.d.cts → index-ZhKyR8co.d.cts} +3 -3
- package/dist/index-hXKhbfh-.d.ts +287 -0
- package/dist/index-zK_mN1D-.d.cts +461 -0
- package/dist/index.cjs +59 -59
- package/dist/index.d.cts +53 -49
- package/dist/index.d.ts +53 -49
- package/dist/index.js +1 -1
- package/dist/{meta-BdjSt8ky.d.cts → meta-BGO6C7K9.d.cts} +1 -1
- package/dist/{meta-CtDjj7cU.d.ts → meta-CC6EPdpK.d.ts} +1 -1
- package/dist/{node-8qx0kgYt.d.cts → node-fSc-hCv8.d.cts} +1 -1
- package/dist/{node-8qx0kgYt.d.ts → node-fSc-hCv8.d.ts} +1 -1
- package/dist/{observable-B6Ba-TTI.d.cts → observable-Cqty11jG.d.cts} +1 -1
- package/dist/{observable-DOniYM2B.d.ts → observable-EAV_rNfM.d.ts} +1 -1
- package/dist/patterns/ai/browser.cjs +5 -5
- package/dist/patterns/ai/browser.d.cts +4 -4
- package/dist/patterns/ai/browser.d.ts +4 -4
- package/dist/patterns/ai/browser.js +1 -1
- package/dist/patterns/ai/index.cjs +19 -19
- package/dist/patterns/ai/index.d.cts +19 -17
- package/dist/patterns/ai/index.d.ts +19 -17
- package/dist/patterns/ai/index.js +1 -1
- package/dist/patterns/ai/node.cjs +1 -2
- package/dist/patterns/ai/node.d.cts +9 -9
- package/dist/patterns/ai/node.d.ts +9 -9
- package/dist/patterns/ai/node.js +1 -1
- package/dist/patterns/audit/index.cjs +6 -6
- package/dist/patterns/audit/index.d.cts +7 -5
- package/dist/patterns/audit/index.d.ts +7 -5
- package/dist/patterns/audit/index.js +1 -1
- package/dist/patterns/cqrs/index.cjs +7 -7
- package/dist/patterns/cqrs/index.d.cts +7 -4
- package/dist/patterns/cqrs/index.d.ts +7 -4
- package/dist/patterns/cqrs/index.js +1 -1
- package/dist/patterns/demo-shell/index.cjs +8 -8
- package/dist/patterns/demo-shell/index.d.cts +6 -5
- package/dist/patterns/demo-shell/index.d.ts +6 -5
- package/dist/patterns/demo-shell/index.js +1 -1
- package/dist/patterns/domain-templates/index.cjs +5 -5
- package/dist/patterns/domain-templates/index.d.cts +5 -4
- package/dist/patterns/domain-templates/index.d.ts +5 -4
- package/dist/patterns/domain-templates/index.js +1 -1
- package/dist/patterns/graphspec/index.cjs +20 -20
- package/dist/patterns/graphspec/index.d.cts +6 -5
- package/dist/patterns/graphspec/index.d.ts +6 -5
- package/dist/patterns/graphspec/index.js +1 -1
- package/dist/patterns/guarded-execution/index.cjs +7 -7
- package/dist/patterns/guarded-execution/index.d.cts +8 -6
- package/dist/patterns/guarded-execution/index.d.ts +8 -6
- package/dist/patterns/guarded-execution/index.js +1 -1
- package/dist/patterns/harness/index.cjs +12 -12
- package/dist/patterns/harness/index.d.cts +13 -10
- package/dist/patterns/harness/index.d.ts +13 -10
- package/dist/patterns/harness/index.js +1 -1
- package/dist/patterns/job-queue/index.cjs +7 -7
- package/dist/patterns/job-queue/index.d.cts +8 -4
- package/dist/patterns/job-queue/index.d.ts +8 -4
- package/dist/patterns/job-queue/index.js +1 -1
- package/dist/patterns/lens/index.cjs +4 -4
- package/dist/patterns/lens/index.d.cts +7 -6
- package/dist/patterns/lens/index.d.ts +7 -6
- package/dist/patterns/lens/index.js +1 -1
- package/dist/patterns/memory/index.cjs +1 -1
- package/dist/patterns/memory/index.d.cts +5 -4
- package/dist/patterns/memory/index.d.ts +5 -4
- package/dist/patterns/memory/index.js +1 -1
- package/dist/patterns/messaging/index.cjs +7 -7
- package/dist/patterns/messaging/index.d.cts +6 -4
- package/dist/patterns/messaging/index.d.ts +6 -4
- package/dist/patterns/messaging/index.js +1 -1
- package/dist/patterns/orchestration/index.cjs +7 -7
- package/dist/patterns/orchestration/index.d.cts +8 -5
- package/dist/patterns/orchestration/index.d.ts +8 -5
- package/dist/patterns/orchestration/index.js +1 -1
- package/dist/patterns/process/index.cjs +1 -0
- package/dist/patterns/process/index.d.cts +10 -0
- package/dist/patterns/process/index.d.ts +10 -0
- package/dist/patterns/process/index.js +1 -0
- package/dist/patterns/reactive-layout/index.cjs +5 -5
- package/dist/patterns/reactive-layout/index.d.cts +6 -5
- package/dist/patterns/reactive-layout/index.d.ts +6 -5
- package/dist/patterns/reactive-layout/index.js +1 -1
- package/dist/patterns/reduction/index.cjs +1 -1
- package/dist/patterns/reduction/index.d.cts +5 -4
- package/dist/patterns/reduction/index.d.ts +5 -4
- package/dist/patterns/reduction/index.js +1 -1
- package/dist/patterns/refine-loop/index.cjs +8 -8
- package/dist/patterns/refine-loop/index.d.cts +7 -5
- package/dist/patterns/refine-loop/index.d.ts +7 -5
- package/dist/patterns/refine-loop/index.js +1 -1
- package/dist/patterns/resilient-pipeline/index.cjs +1 -1
- package/dist/patterns/resilient-pipeline/index.d.cts +7 -6
- package/dist/patterns/resilient-pipeline/index.d.ts +7 -6
- package/dist/patterns/resilient-pipeline/index.js +1 -1
- package/dist/patterns/surface/index.cjs +11 -11
- package/dist/patterns/surface/index.d.cts +7 -6
- package/dist/patterns/surface/index.d.ts +7 -6
- package/dist/patterns/surface/index.js +1 -1
- package/dist/pipeline-graph-B85HUrWg.d.cts +120 -0
- package/dist/pipeline-graph-HOTU4UG0.d.ts +120 -0
- package/dist/{reactive-layout-DBJ3Vz-m.d.ts → reactive-layout-Btv0-efV.d.ts} +2 -2
- package/dist/{reactive-layout-Dk9AOQb_.d.cts → reactive-layout-D9zqqaqK.d.cts} +2 -2
- package/dist/reactive-log-ByBb8g6A.d.ts +188 -0
- package/dist/reactive-log-CgbNqksB.d.cts +188 -0
- package/dist/{reactive-map-LjwjcFaW.d.ts → reactive-map-CHyeCf4D.d.ts} +1 -1
- package/dist/{reactive-map-Cm89Hk0c.d.cts → reactive-map-DmgeADH8.d.cts} +1 -1
- package/dist/{resilience-RjDIHZNZ.d.ts → resilience-BWP2c7Af.d.cts} +27 -45
- package/dist/{resilience-N_VtLf7W.d.cts → resilience-Bys63Cpd.d.ts} +27 -45
- package/dist/resilience-OBU472D2.js +1 -0
- package/dist/{sugar-CQkn_rxB.d.ts → sugar-D13E2M_z.d.ts} +1 -1
- package/dist/{sugar-DVEYhR7a.d.cts → sugar-DgaGJcI6.d.cts} +1 -1
- package/dist/{topology-tree-BB6oJxMz.d.cts → topology-tree-C50l9ARE.d.cts} +1 -1
- package/dist/{topology-tree-CAFOG5S5.d.ts → topology-tree-CJsT24DP.d.ts} +1 -1
- package/dist/{types-Cp_4coR_.d.cts → types-BMSGPlpO.d.cts} +1 -1
- package/dist/{types-B2LfBvNc.d.ts → types-CidcBDuk.d.ts} +1 -1
- package/package.json +41 -1
- package/dist/chunk-2JO6LXFT.js +0 -7
- package/dist/chunk-2LZ6DL45.js +0 -1
- package/dist/chunk-3JXNEPCD.js +0 -2
- package/dist/chunk-3Y4BXFFR.js +0 -1
- package/dist/chunk-55T3K37W.js +0 -1
- package/dist/chunk-6HQ6HVTF.js +0 -1
- package/dist/chunk-7Q2WPFQ7.js +0 -1
- package/dist/chunk-FKRPIRE6.js +0 -1
- package/dist/chunk-HTBOCKVD.js +0 -1
- package/dist/chunk-I6VIH3VA.js +0 -1
- package/dist/chunk-IB64M7VP.js +0 -1
- package/dist/chunk-IJFSR4NU.js +0 -1
- package/dist/chunk-LOF5HSD3.js +0 -18
- package/dist/chunk-T2TB37TW.js +0 -1
- package/dist/chunk-T7EQPKOP.js +0 -1
- package/dist/chunk-Y63GWRHO.js +0 -5
- package/dist/chunk-YUBV7EEE.js +0 -1
- package/dist/index-C2Dey3L-.d.cts +0 -152
- package/dist/index-ClJUZAOr.d.cts +0 -101
- package/dist/index-Cq7Uqgu4.d.ts +0 -192
- package/dist/index-Dtpr2FIB.d.ts +0 -101
- package/dist/index-HvJ90_tX.d.ts +0 -152
- package/dist/index-wcfc7W-f.d.cts +0 -192
- package/dist/reactive-log-CWC7jO4J.d.cts +0 -190
- package/dist/reactive-log-CqaBg8nf.d.ts +0 -190
- package/dist/resilience-7UZHSSGC.js +0 -1
- /package/dist/{chunk-L3KUKDZC.js → chunk-O32GJOUJ.js} +0 -0
|
@@ -0,0 +1,171 @@
|
|
|
1
|
+
import { a as Node } from './node-fSc-hCv8.cjs';
|
|
2
|
+
import { R as ReactiveLogBundle } from './reactive-log-CgbNqksB.cjs';
|
|
3
|
+
import { NodeInput } from './extra/sources.cjs';
|
|
4
|
+
import { AppendLogStorageTier } from './extra/storage-tiers.cjs';
|
|
5
|
+
import { G as Graph, a as GraphOptions } from './graph-kTltt95s.cjs';
|
|
6
|
+
import { B as BaseAuditRecord } from './imperative-audit-ahAE65a9.cjs';
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* Job queue patterns (roadmap §4.2).
|
|
10
|
+
*
|
|
11
|
+
* Queue / flow primitives modeled as graph factories:
|
|
12
|
+
* - `jobQueue()` — claim/ack/nack workflow with reactive depth.
|
|
13
|
+
* - `jobFlow()` — multi-stage queue chain.
|
|
14
|
+
*
|
|
15
|
+
* Topic / subscription / hub primitives live in `patterns/messaging`.
|
|
16
|
+
*/
|
|
17
|
+
|
|
18
|
+
type JobState = "queued" | "inflight";
|
|
19
|
+
type JobEnvelope<T> = {
|
|
20
|
+
id: string;
|
|
21
|
+
payload: T;
|
|
22
|
+
attempts: number;
|
|
23
|
+
metadata: Readonly<Record<string, unknown>>;
|
|
24
|
+
state: JobState;
|
|
25
|
+
};
|
|
26
|
+
/** Audit record for a job-queue mutation (Audit 2 cross-cutting). */
|
|
27
|
+
type JobEventAction = "enqueue" | "claim" | "ack" | "nack" | "remove";
|
|
28
|
+
interface JobEvent<T = unknown> extends BaseAuditRecord {
|
|
29
|
+
readonly action: JobEventAction;
|
|
30
|
+
readonly id: string;
|
|
31
|
+
readonly attempts?: number;
|
|
32
|
+
readonly payload?: T;
|
|
33
|
+
}
|
|
34
|
+
/** Recommended `keyOf` for keyed-storage adapters (Audit 2 #7). */
|
|
35
|
+
declare const jobEventKeyOf: <T>(e: JobEvent<T>) => string;
|
|
36
|
+
type JobQueueOptions = {
|
|
37
|
+
graph?: GraphOptions;
|
|
38
|
+
};
|
|
39
|
+
declare class JobQueueGraph<T> extends Graph {
|
|
40
|
+
private readonly _pending;
|
|
41
|
+
private readonly _jobs;
|
|
42
|
+
private readonly _seqCursor;
|
|
43
|
+
readonly pending: Node<readonly string[]>;
|
|
44
|
+
readonly jobs: Node<ReadonlyMap<string, JobEnvelope<T>>>;
|
|
45
|
+
readonly depth: Node<number>;
|
|
46
|
+
/** Audit log of every queue mutation (Audit 2). */
|
|
47
|
+
readonly events: ReactiveLogBundle<JobEvent<T>>;
|
|
48
|
+
/** Alias for {@link JobQueueGraph.events} — Audit 2 `.audit` duplication. */
|
|
49
|
+
readonly audit: ReactiveLogBundle<JobEvent<T>>;
|
|
50
|
+
constructor(name: string, opts?: JobQueueOptions);
|
|
51
|
+
private _bumpSeq;
|
|
52
|
+
/**
|
|
53
|
+
* Wire append-log storage tiers (Audit 4). Returns a disposer.
|
|
54
|
+
*
|
|
55
|
+
* Named `attachEventStorage` to avoid colliding with {@link Graph.attachSnapshotStorage}.
|
|
56
|
+
*/
|
|
57
|
+
attachEventStorage(tiers: readonly AppendLogStorageTier<JobEvent<T>>[]): () => void;
|
|
58
|
+
enqueue(payload: T, opts?: {
|
|
59
|
+
id?: string;
|
|
60
|
+
metadata?: Record<string, unknown>;
|
|
61
|
+
}): string;
|
|
62
|
+
claim(limit?: number): readonly JobEnvelope<T>[];
|
|
63
|
+
ack(id: string): boolean;
|
|
64
|
+
nack(id: string, opts?: {
|
|
65
|
+
requeue?: boolean;
|
|
66
|
+
}): boolean;
|
|
67
|
+
/**
|
|
68
|
+
* Remove a job by id regardless of its current state. Returns `true` if
|
|
69
|
+
* the job existed and was removed, `false` if no job has this id.
|
|
70
|
+
*
|
|
71
|
+
* `ack` only works on inflight; `nack` only works on inflight.
|
|
72
|
+
* `removeById` is the state-agnostic escape hatch — useful for
|
|
73
|
+
* audit/observability layers that enqueue but never claim, and need to
|
|
74
|
+
* finalize a job when an external decision (e.g. harness verify
|
|
75
|
+
* outcome) resolves it. Distinct name from the inherited
|
|
76
|
+
* {@link Graph.remove}, which removes a mounted child subgraph by path.
|
|
77
|
+
*
|
|
78
|
+
* When the job is in `queued` state, its id is also pulled from the
|
|
79
|
+
* `pending` list — depth + pending snapshot stay consistent.
|
|
80
|
+
*/
|
|
81
|
+
removeById(id: string): boolean;
|
|
82
|
+
/**
|
|
83
|
+
* Subscribe to a Node and enqueue each DATA payload into this queue.
|
|
84
|
+
* Returns a disposer that stops consuming when called.
|
|
85
|
+
*
|
|
86
|
+
* Used internally by {@link JobFlowGraph} for stage-to-stage wiring but
|
|
87
|
+
* also useful for users wiring an external source into a job queue.
|
|
88
|
+
*
|
|
89
|
+
* @param source - Node whose DATA values are enqueued.
|
|
90
|
+
* @param opts - Optional enqueue options (id generator, metadata prefix).
|
|
91
|
+
*/
|
|
92
|
+
consumeFrom(source: Node<T>, opts?: {
|
|
93
|
+
metadata?: Record<string, unknown>;
|
|
94
|
+
}): () => void;
|
|
95
|
+
}
|
|
96
|
+
/**
|
|
97
|
+
* Work function for a job flow stage. Receives the full job envelope,
|
|
98
|
+
* returns a `NodeInput<T>` — raw value (sync), Promise (async), or Node
|
|
99
|
+
* (composed pipeline). `fromAny` coerces any of these shapes.
|
|
100
|
+
*
|
|
101
|
+
* On error / rejection: the stage nacks the job (no requeue by default).
|
|
102
|
+
*/
|
|
103
|
+
type WorkFn<T> = (job: JobEnvelope<T>) => NodeInput<T>;
|
|
104
|
+
/**
|
|
105
|
+
* Stage definition for {@link JobFlowGraph}. Either a bare name string
|
|
106
|
+
* (no work hook, pure pass-through) or a full definition object.
|
|
107
|
+
*/
|
|
108
|
+
type StageDef<T> = string | {
|
|
109
|
+
name: string;
|
|
110
|
+
work?: WorkFn<T>;
|
|
111
|
+
handlerVersion?: {
|
|
112
|
+
id: string;
|
|
113
|
+
version: string | number;
|
|
114
|
+
};
|
|
115
|
+
};
|
|
116
|
+
type JobFlowOptions<T = unknown> = {
|
|
117
|
+
graph?: GraphOptions;
|
|
118
|
+
/**
|
|
119
|
+
* Stage definitions. Each stage is either a bare name string (pure
|
|
120
|
+
* pass-through) or a `{ name, work?, handlerVersion? }` object.
|
|
121
|
+
*
|
|
122
|
+
* For back-compat, `string[]` values behave as stages with no work hook.
|
|
123
|
+
*/
|
|
124
|
+
stages?: readonly StageDef<T>[];
|
|
125
|
+
maxPerPump?: number;
|
|
126
|
+
};
|
|
127
|
+
declare class JobFlowGraph<T> extends Graph {
|
|
128
|
+
private readonly _stageNames;
|
|
129
|
+
private readonly _stageWorkFns;
|
|
130
|
+
private readonly _queues;
|
|
131
|
+
private readonly _completed;
|
|
132
|
+
readonly completed: Node<readonly JobEnvelope<T>[]>;
|
|
133
|
+
readonly completedCount: Node<number>;
|
|
134
|
+
constructor(name: string, opts?: JobFlowOptions<T>);
|
|
135
|
+
stages(): readonly string[];
|
|
136
|
+
queue(stage: string): JobQueueGraph<T>;
|
|
137
|
+
enqueue(payload: T, opts?: {
|
|
138
|
+
id?: string;
|
|
139
|
+
metadata?: Record<string, unknown>;
|
|
140
|
+
}): string;
|
|
141
|
+
retainedCompleted(): readonly JobEnvelope<T>[];
|
|
142
|
+
}
|
|
143
|
+
/**
|
|
144
|
+
* Creates a Pulsar-inspired job queue graph with claim/ack/nack workflow.
|
|
145
|
+
*/
|
|
146
|
+
declare function jobQueue<T>(name: string, opts?: JobQueueOptions): JobQueueGraph<T>;
|
|
147
|
+
/**
|
|
148
|
+
* Creates an autonomous multi-stage queue chain graph.
|
|
149
|
+
*/
|
|
150
|
+
declare function jobFlow<T>(name: string, opts?: JobFlowOptions<T>): JobFlowGraph<T>;
|
|
151
|
+
|
|
152
|
+
type index_JobEnvelope<T> = JobEnvelope<T>;
|
|
153
|
+
type index_JobEvent<T = unknown> = JobEvent<T>;
|
|
154
|
+
type index_JobEventAction = JobEventAction;
|
|
155
|
+
type index_JobFlowGraph<T> = JobFlowGraph<T>;
|
|
156
|
+
declare const index_JobFlowGraph: typeof JobFlowGraph;
|
|
157
|
+
type index_JobFlowOptions<T = unknown> = JobFlowOptions<T>;
|
|
158
|
+
type index_JobQueueGraph<T> = JobQueueGraph<T>;
|
|
159
|
+
declare const index_JobQueueGraph: typeof JobQueueGraph;
|
|
160
|
+
type index_JobQueueOptions = JobQueueOptions;
|
|
161
|
+
type index_JobState = JobState;
|
|
162
|
+
type index_StageDef<T> = StageDef<T>;
|
|
163
|
+
type index_WorkFn<T> = WorkFn<T>;
|
|
164
|
+
declare const index_jobEventKeyOf: typeof jobEventKeyOf;
|
|
165
|
+
declare const index_jobFlow: typeof jobFlow;
|
|
166
|
+
declare const index_jobQueue: typeof jobQueue;
|
|
167
|
+
declare namespace index {
|
|
168
|
+
export { type index_JobEnvelope as JobEnvelope, type index_JobEvent as JobEvent, type index_JobEventAction as JobEventAction, index_JobFlowGraph as JobFlowGraph, type index_JobFlowOptions as JobFlowOptions, index_JobQueueGraph as JobQueueGraph, type index_JobQueueOptions as JobQueueOptions, type index_JobState as JobState, type index_StageDef as StageDef, type index_WorkFn as WorkFn, index_jobEventKeyOf as jobEventKeyOf, index_jobFlow as jobFlow, index_jobQueue as jobQueue };
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
export { JobQueueGraph as J, type StageDef as S, type WorkFn as W, type JobEnvelope as a, type JobEvent as b, type JobEventAction as c, JobFlowGraph as d, type JobFlowOptions as e, type JobQueueOptions as f, type JobState as g, jobFlow as h, index as i, jobEventKeyOf as j, jobQueue as k };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { a as Node, N as NodeOptions } from './node-
|
|
2
|
-
import { a as GraphOptions, G as Graph } from './graph-
|
|
1
|
+
import { a as Node, N as NodeOptions } from './node-fSc-hCv8.cjs';
|
|
2
|
+
import { a as GraphOptions, G as Graph } from './graph-kTltt95s.cjs';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* Reduction primitives (roadmap §8.1).
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { M as MeasurementAdapter, P as PreparedSegment, L as LineBreaksResult, C as CharPosition, a as LayoutCursor, I as Interval, b as LayoutLine, c as LayoutNextLineContext, d as LayoutNextLineResult, R as ReactiveLayoutBundle, e as ReactiveLayoutOptions, S as SegmentBreakKind, f as SegmentMeasureStats, g as analyzeAndMeasure, h as carveTextLineSlots, i as computeCharPositions, j as computeLineBreaks, l as layoutNextLine, r as reactiveLayout } from './reactive-layout-
|
|
2
|
-
import { a as Node } from './node-
|
|
3
|
-
import { G as Graph } from './graph-
|
|
1
|
+
import { M as MeasurementAdapter, P as PreparedSegment, L as LineBreaksResult, C as CharPosition, a as LayoutCursor, I as Interval, b as LayoutLine, c as LayoutNextLineContext, d as LayoutNextLineResult, R as ReactiveLayoutBundle, e as ReactiveLayoutOptions, S as SegmentBreakKind, f as SegmentMeasureStats, g as analyzeAndMeasure, h as carveTextLineSlots, i as computeCharPositions, j as computeLineBreaks, l as layoutNextLine, r as reactiveLayout } from './reactive-layout-D9zqqaqK.cjs';
|
|
2
|
+
import { a as Node } from './node-fSc-hCv8.cjs';
|
|
3
|
+
import { G as Graph } from './graph-kTltt95s.cjs';
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* MeasurementAdapter implementations (roadmap §7.1 — pluggable backends).
|
|
@@ -0,0 +1,287 @@
|
|
|
1
|
+
import { R as ReactiveLogBundle } from './reactive-log-ByBb8g6A.js';
|
|
2
|
+
import { NodeInput } from './extra/sources.js';
|
|
3
|
+
import { AppendLogStorageTier } from './extra/storage-tiers.js';
|
|
4
|
+
import { B as BaseAuditRecord } from './imperative-audit-ahAE65a9.js';
|
|
5
|
+
import { C as CqrsEventMap, a as CqrsEvent, b as CqrsGraph } from './index-DBmBtqAN.js';
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* Process Manager pattern (Phase 7 — roadmap §4.6, Audit 3 — locked 2026-04-24).
|
|
9
|
+
*
|
|
10
|
+
* Reactive long-running workflow primitive over CQRS event nodes.
|
|
11
|
+
* Correlates events across aggregates, tracks per-instance state, supports
|
|
12
|
+
* retries with backoff, and runs compensation on failure or explicit cancel.
|
|
13
|
+
*
|
|
14
|
+
* ## Architecture
|
|
15
|
+
*
|
|
16
|
+
* - Per-instance state lives in a `Map<correlationId, TState>` closure (in-memory),
|
|
17
|
+
* optionally event-sourced via synthetic `_process_<name>_state` events that
|
|
18
|
+
* use `correlationId` as `aggregateId`.
|
|
19
|
+
* - Watched-event subscriptions are imperative (coordinator role) — each
|
|
20
|
+
* watched CQRS event type is subscribed to via `entries.subscribe(...)`.
|
|
21
|
+
* These are NOT reactive node edges; the process manager is intentionally
|
|
22
|
+
* a coordinator that bridges reactive CQRS events into imperative instance logic.
|
|
23
|
+
* - Step execution uses `fromAny` to uniformly handle sync and async handlers.
|
|
24
|
+
* - Retry delays use `setTimeout` (same sanctioned pattern as `extra/resilience.ts`
|
|
25
|
+
* retry helper — this primitive is a coordinator, not a reactive pipeline stage).
|
|
26
|
+
* - Timer scheduling uses `fromTimer` from `extra/sources.ts` per spec §5.8.
|
|
27
|
+
* - Audit log uses `createAuditLog` per Audit 2.
|
|
28
|
+
*
|
|
29
|
+
* @module
|
|
30
|
+
*/
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
* Discriminated union returned by each step handler.
|
|
34
|
+
*
|
|
35
|
+
* - `"continue"` — update state, optionally emit side-effect events and
|
|
36
|
+
* schedule a future synthetic event.
|
|
37
|
+
* - `"terminate"` — workflow complete; instance moves to `"terminated"`.
|
|
38
|
+
* - `"fail"` — triggers compensation; instance moves to `"compensated"` /
|
|
39
|
+
* `"failed"`.
|
|
40
|
+
*/
|
|
41
|
+
type ProcessStepResult<TState> = {
|
|
42
|
+
kind: "continue";
|
|
43
|
+
state: TState;
|
|
44
|
+
emit?: readonly {
|
|
45
|
+
type: string;
|
|
46
|
+
payload: unknown;
|
|
47
|
+
}[];
|
|
48
|
+
schedule?: ProcessSchedule;
|
|
49
|
+
} | {
|
|
50
|
+
kind: "terminate";
|
|
51
|
+
state: TState;
|
|
52
|
+
emit?: readonly {
|
|
53
|
+
type: string;
|
|
54
|
+
payload: unknown;
|
|
55
|
+
}[];
|
|
56
|
+
reason?: string;
|
|
57
|
+
} | {
|
|
58
|
+
kind: "fail";
|
|
59
|
+
error: unknown;
|
|
60
|
+
};
|
|
61
|
+
/**
|
|
62
|
+
* Schedule a synthetic timer event after `afterMs` milliseconds.
|
|
63
|
+
* When the timer fires, the synthetic event of `eventType` is routed to the
|
|
64
|
+
* matching step (if one is registered) for this correlationId.
|
|
65
|
+
*/
|
|
66
|
+
type ProcessSchedule = {
|
|
67
|
+
afterMs: number;
|
|
68
|
+
eventType: string;
|
|
69
|
+
};
|
|
70
|
+
/**
|
|
71
|
+
* Step handler signature.
|
|
72
|
+
*
|
|
73
|
+
* Receives the current instance state and the triggering CQRS event.
|
|
74
|
+
* Returns a {@link ProcessStepResult} — sync value, Promise, or any
|
|
75
|
+
* {@link NodeInput} consumed via `fromAny`.
|
|
76
|
+
*/
|
|
77
|
+
type ProcessStep<TState, EM extends CqrsEventMap, K extends keyof EM & string> = (state: TState, event: CqrsEvent<EM[K]>) => NodeInput<ProcessStepResult<TState>>;
|
|
78
|
+
/**
|
|
79
|
+
* Compensation handler. Runs when a step returns `kind: "fail"`, throws, or
|
|
80
|
+
* when `cancel(correlationId)` is called on a running instance.
|
|
81
|
+
*
|
|
82
|
+
* Should undo any side effects performed by prior steps (refund, cancel
|
|
83
|
+
* reservation, etc.). Errors thrown inside compensate are swallowed and
|
|
84
|
+
* recorded in the audit log with `status: "failed"` to prevent cascading
|
|
85
|
+
* failure loops.
|
|
86
|
+
*/
|
|
87
|
+
type ProcessCompensate<TState> = (state: TState, error: unknown) => NodeInput<void>;
|
|
88
|
+
/**
|
|
89
|
+
* Audit record for a single process instance state transition.
|
|
90
|
+
*
|
|
91
|
+
* Every status change (start → running → terminated / failed / compensated)
|
|
92
|
+
* appends one record. `correlationId` is the stable process key.
|
|
93
|
+
*
|
|
94
|
+
* Extends {@link BaseAuditRecord} so records carry `t_ns` / `seq` /
|
|
95
|
+
* `handlerVersion` from the cross-cutting Audit 2 schema.
|
|
96
|
+
*/
|
|
97
|
+
interface ProcessInstance<TState> extends BaseAuditRecord {
|
|
98
|
+
/** Stable correlation key that identifies this process instance. */
|
|
99
|
+
readonly correlationId: string;
|
|
100
|
+
/** Most-recent instance state at this transition. */
|
|
101
|
+
readonly state: TState;
|
|
102
|
+
/** Current lifecycle status after this transition. */
|
|
103
|
+
readonly status: "running" | "terminated" | "failed" | "compensated";
|
|
104
|
+
/** Wall-clock nanoseconds when `start()` was called. */
|
|
105
|
+
readonly startedAt: number;
|
|
106
|
+
/** Wall-clock nanoseconds of this transition. */
|
|
107
|
+
readonly updatedAt: number;
|
|
108
|
+
/** Handler version stamped at transition time (Audit 5). */
|
|
109
|
+
readonly handlerVersion?: {
|
|
110
|
+
id: string;
|
|
111
|
+
version: string | number;
|
|
112
|
+
};
|
|
113
|
+
/** Optional human-readable reason for cancellation. Present only on `"compensated"` records produced by `cancel()`. */
|
|
114
|
+
readonly reason?: string;
|
|
115
|
+
}
|
|
116
|
+
/**
|
|
117
|
+
* Recommended `keyOf` for storage tiers keyed by correlationId (Audit 2).
|
|
118
|
+
*/
|
|
119
|
+
declare const processInstanceKeyOf: <TState>(i: ProcessInstance<TState>) => string;
|
|
120
|
+
/**
|
|
121
|
+
* Options for {@link processManager}.
|
|
122
|
+
*/
|
|
123
|
+
interface ProcessManagerOpts<TState, EM extends CqrsEventMap> {
|
|
124
|
+
/** Initial state value for every new process instance. */
|
|
125
|
+
readonly initial: TState;
|
|
126
|
+
/** CQRS event types to watch for correlation routing. */
|
|
127
|
+
readonly watching: readonly (keyof EM & string)[];
|
|
128
|
+
/**
|
|
129
|
+
* Per-event-type step handlers. A step is invoked when a watched event's
|
|
130
|
+
* `correlationId` matches a running instance and the event type is in
|
|
131
|
+
* `steps`. Events with no matching step are silently ignored.
|
|
132
|
+
*/
|
|
133
|
+
readonly steps: {
|
|
134
|
+
[K in keyof EM & string]?: ProcessStep<TState, EM, K>;
|
|
135
|
+
};
|
|
136
|
+
/**
|
|
137
|
+
* Optional compensation handler. Runs on step `kind: "fail"` / step throw
|
|
138
|
+
* and on explicit `cancel()`. If omitted, instances fail silently with
|
|
139
|
+
* status `"failed"` instead of `"compensated"`.
|
|
140
|
+
*/
|
|
141
|
+
readonly compensate?: ProcessCompensate<TState>;
|
|
142
|
+
/**
|
|
143
|
+
* Optional predicate called after each `"continue"` step. When it returns
|
|
144
|
+
* `true`, the instance is moved to `"terminated"` immediately without
|
|
145
|
+
* waiting for a `"terminate"` step result.
|
|
146
|
+
*/
|
|
147
|
+
readonly isTerminal?: (state: TState) => boolean;
|
|
148
|
+
/**
|
|
149
|
+
* Maximum number of retry attempts after a step throws (not counting the
|
|
150
|
+
* first attempt). Default: `0` (no retry — fail immediately on throw).
|
|
151
|
+
*/
|
|
152
|
+
readonly retryMax?: number;
|
|
153
|
+
/**
|
|
154
|
+
* Per-retry backoff delays in milliseconds. `backoffMs[i]` is the delay
|
|
155
|
+
* before attempt `i + 1`. If fewer entries than `retryMax`, the last entry
|
|
156
|
+
* is repeated. Default: `[0]` (no delay).
|
|
157
|
+
*
|
|
158
|
+
* **Implementation note:** retry delays are implemented with `setTimeout`
|
|
159
|
+
* (same sanctioned exception as `extra/resilience.ts`). This is a
|
|
160
|
+
* coordinator-layer primitive — `fromTimer` would require subscribing to
|
|
161
|
+
* an additional node per attempt, which would leak timer nodes without a
|
|
162
|
+
* clear disposal scope.
|
|
163
|
+
*/
|
|
164
|
+
readonly backoffMs?: readonly number[];
|
|
165
|
+
/** Handler version tag stamped onto audit records (Audit 5). */
|
|
166
|
+
readonly handlerVersion?: {
|
|
167
|
+
id: string;
|
|
168
|
+
version: string | number;
|
|
169
|
+
};
|
|
170
|
+
/** Optional persistence wiring (Audit 4). */
|
|
171
|
+
readonly persistence?: {
|
|
172
|
+
/**
|
|
173
|
+
* Wire the per-process synthetic state event stream to append-log tiers.
|
|
174
|
+
* Reuses `CqrsGraph.attachEventStorage` so events persist across restarts.
|
|
175
|
+
*/
|
|
176
|
+
eventStorage?: readonly AppendLogStorageTier<CqrsEvent>[];
|
|
177
|
+
};
|
|
178
|
+
}
|
|
179
|
+
/**
|
|
180
|
+
* Result handle returned by {@link processManager}.
|
|
181
|
+
*/
|
|
182
|
+
interface ProcessManagerResult<TState> {
|
|
183
|
+
/**
|
|
184
|
+
* Reactive audit log of every process instance state transition.
|
|
185
|
+
* Every `start()`, step result, retry, cancellation, and compensation
|
|
186
|
+
* appends a {@link ProcessInstance} record.
|
|
187
|
+
*/
|
|
188
|
+
readonly instances: ReactiveLogBundle<ProcessInstance<TState>>;
|
|
189
|
+
/**
|
|
190
|
+
* Alias for {@link instances} (Audit 2 `.audit` duplication convention).
|
|
191
|
+
*/
|
|
192
|
+
readonly audit: ReactiveLogBundle<ProcessInstance<TState>>;
|
|
193
|
+
/**
|
|
194
|
+
* Start a new process instance identified by `correlationId`.
|
|
195
|
+
*
|
|
196
|
+
* Emits a synthetic `_process_<name>_started` event into the CQRS graph
|
|
197
|
+
* with `correlationId` as `aggregateId` so per-aggregate streams record
|
|
198
|
+
* the process lifecycle. If the correlationId already has an active
|
|
199
|
+
* (running) instance, this call is a no-op (idempotent).
|
|
200
|
+
*
|
|
201
|
+
* @param correlationId - Stable key for this workflow instance.
|
|
202
|
+
* @param initialPayload - Optional payload carried on the start event.
|
|
203
|
+
*/
|
|
204
|
+
start(correlationId: string, initialPayload?: unknown): void;
|
|
205
|
+
/**
|
|
206
|
+
* Cancel a running instance by correlationId.
|
|
207
|
+
*
|
|
208
|
+
* Triggers the `compensate` handler (if configured), then marks the
|
|
209
|
+
* instance as `"compensated"`. If the instance is not running, this is
|
|
210
|
+
* a no-op.
|
|
211
|
+
*
|
|
212
|
+
* @param correlationId - Instance to cancel.
|
|
213
|
+
* @param reason - Optional human-readable reason recorded in the audit log.
|
|
214
|
+
*/
|
|
215
|
+
cancel(correlationId: string, reason?: string): void;
|
|
216
|
+
/**
|
|
217
|
+
* Synchronous read of the current in-memory state for a correlationId.
|
|
218
|
+
* Returns `undefined` if the instance does not exist or has terminated.
|
|
219
|
+
*/
|
|
220
|
+
getState(correlationId: string): TState | undefined;
|
|
221
|
+
/**
|
|
222
|
+
* Release all watched-event subscriptions and stop processing new events.
|
|
223
|
+
*
|
|
224
|
+
* After `dispose()`, subsequent `start()` and `cancel()` calls are no-ops.
|
|
225
|
+
* In-flight async steps complete naturally; no new steps are dispatched.
|
|
226
|
+
*/
|
|
227
|
+
dispose(): void;
|
|
228
|
+
}
|
|
229
|
+
/**
|
|
230
|
+
* Create a process manager that coordinates long-running reactive workflows
|
|
231
|
+
* over a {@link CqrsGraph}.
|
|
232
|
+
*
|
|
233
|
+
* Process instances are identified by `correlationId`. Events from the watched
|
|
234
|
+
* event types are routed to per-instance step handlers when the event's
|
|
235
|
+
* `correlationId` matches a running instance.
|
|
236
|
+
*
|
|
237
|
+
* ```ts
|
|
238
|
+
* const app = cqrs<{ orderPlaced: { orderId: string }; paymentReceived: { amount: number } }>("orders");
|
|
239
|
+
*
|
|
240
|
+
* const pm = processManager(app, "fulfillment", {
|
|
241
|
+
* initial: { step: "awaiting-payment", total: 0 },
|
|
242
|
+
* watching: ["orderPlaced", "paymentReceived"],
|
|
243
|
+
* steps: {
|
|
244
|
+
* orderPlaced(state, event) {
|
|
245
|
+
* return { kind: "continue", state: { ...state, orderId: event.payload.orderId } };
|
|
246
|
+
* },
|
|
247
|
+
* paymentReceived(state, event) {
|
|
248
|
+
* return { kind: "terminate", state: { ...state, total: event.payload.amount } };
|
|
249
|
+
* },
|
|
250
|
+
* },
|
|
251
|
+
* compensate(state, _error) {
|
|
252
|
+
* // undo reservation, issue refund, etc.
|
|
253
|
+
* },
|
|
254
|
+
* retryMax: 2,
|
|
255
|
+
* backoffMs: [100, 500],
|
|
256
|
+
* });
|
|
257
|
+
*
|
|
258
|
+
* pm.start("order-123");
|
|
259
|
+
* app.dispatch("orderPlaced", { orderId: "order-123" }, { correlationId: "order-123" });
|
|
260
|
+
* ```
|
|
261
|
+
*
|
|
262
|
+
* @param cqrsGraph - The CQRS graph whose event streams the manager watches.
|
|
263
|
+
* @param name - Stable identifier for this process type; used for synthetic
|
|
264
|
+
* event-type names (`_process_<name>_started`, `_process_<name>_state`).
|
|
265
|
+
* @param opts - Configuration: initial state, watched events, steps, retry,
|
|
266
|
+
* compensation, and optional persistence.
|
|
267
|
+
* @returns {@link ProcessManagerResult} with `instances` audit log and
|
|
268
|
+
* `start`, `cancel`, `getState` imperative controls.
|
|
269
|
+
*
|
|
270
|
+
* @category patterns
|
|
271
|
+
*/
|
|
272
|
+
declare function processManager<TState, EM extends CqrsEventMap = Record<string, unknown>>(cqrsGraph: CqrsGraph<EM>, name: string, opts: ProcessManagerOpts<TState, EM>): ProcessManagerResult<TState>;
|
|
273
|
+
|
|
274
|
+
type index_ProcessCompensate<TState> = ProcessCompensate<TState>;
|
|
275
|
+
type index_ProcessInstance<TState> = ProcessInstance<TState>;
|
|
276
|
+
type index_ProcessManagerOpts<TState, EM extends CqrsEventMap> = ProcessManagerOpts<TState, EM>;
|
|
277
|
+
type index_ProcessManagerResult<TState> = ProcessManagerResult<TState>;
|
|
278
|
+
type index_ProcessSchedule = ProcessSchedule;
|
|
279
|
+
type index_ProcessStep<TState, EM extends CqrsEventMap, K extends keyof EM & string> = ProcessStep<TState, EM, K>;
|
|
280
|
+
type index_ProcessStepResult<TState> = ProcessStepResult<TState>;
|
|
281
|
+
declare const index_processInstanceKeyOf: typeof processInstanceKeyOf;
|
|
282
|
+
declare const index_processManager: typeof processManager;
|
|
283
|
+
declare namespace index {
|
|
284
|
+
export { type index_ProcessCompensate as ProcessCompensate, type index_ProcessInstance as ProcessInstance, type index_ProcessManagerOpts as ProcessManagerOpts, type index_ProcessManagerResult as ProcessManagerResult, type index_ProcessSchedule as ProcessSchedule, type index_ProcessStep as ProcessStep, type index_ProcessStepResult as ProcessStepResult, index_processInstanceKeyOf as processInstanceKeyOf, index_processManager as processManager };
|
|
285
|
+
}
|
|
286
|
+
|
|
287
|
+
export { type ProcessCompensate as P, type ProcessInstance as a, type ProcessManagerOpts as b, type ProcessManagerResult as c, type ProcessSchedule as d, type ProcessStep as e, type ProcessStepResult as f, processManager as g, index as i, processInstanceKeyOf as p };
|