@graphrefly/graphrefly 0.34.0 → 0.36.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-3U7IIQB2.js +1 -0
- package/dist/{chunk-YDWTVO4E.js → chunk-44QWWUA3.js} +1 -1
- package/dist/chunk-5CPPC75H.js +1 -0
- package/dist/chunk-5CZ3KIRJ.js +1 -0
- package/dist/chunk-5KPIYVCC.js +7 -0
- package/dist/{chunk-WBWBY6LI.js → chunk-5RTZ6DXG.js} +1 -1
- package/dist/{chunk-IPNJDNE7.js → chunk-5Z3AFBN7.js} +1 -1
- package/dist/{chunk-C5DINHNP.js → chunk-6G5YD37E.js} +1 -1
- package/dist/{chunk-TONEKQM3.js → chunk-7LYIKMW5.js} +1 -1
- package/dist/chunk-A5HZZYRK.js +1 -0
- package/dist/{chunk-CJMFZXIZ.js → chunk-AACJX2L7.js} +1 -1
- package/dist/chunk-AQC53OWG.js +1 -0
- package/dist/chunk-CE72X3WO.js +1 -0
- package/dist/chunk-CGA5RXO6.js +1 -0
- package/dist/chunk-D5RFJOZ2.js +1 -0
- package/dist/chunk-DBPFMCVH.js +1 -0
- package/dist/chunk-F36TA3ET.js +1 -0
- 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-GAOX6OPT.js → chunk-I57VSGRB.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-K5ZXJPWU.js +5 -0
- package/dist/{chunk-TZLEMGAK.js → chunk-KCE6WWJE.js} +2 -2
- package/dist/chunk-KL7CILPL.js +1 -0
- package/dist/chunk-KUVDFOJH.js +1 -0
- package/dist/{chunk-PBN426RU.js → chunk-LO3LO2TO.js} +1 -1
- package/dist/chunk-MQZWA3DF.js +1 -0
- package/dist/chunk-MYFR67PY.js +18 -0
- package/dist/{chunk-65WWQ5CB.js → chunk-N2GCKKKH.js} +5 -5
- package/dist/{chunk-KN2UMFT6.js → chunk-PCD2MU7X.js} +1 -1
- package/dist/{chunk-SFIM774L.js → chunk-PYEIPRSZ.js} +1 -1
- package/dist/chunk-Q7EUZ6NN.js +1 -0
- package/dist/{chunk-U2T2XWDA.js → chunk-QKUWS7CO.js} +1 -1
- package/dist/{chunk-Q46YJCQH.js → chunk-T6RPUERH.js} +1 -1
- package/dist/chunk-TQSTS3BY.js +1 -0
- package/dist/chunk-VN6RDSK2.js +1 -0
- package/dist/{chunk-UF746BQ4.js → chunk-XINLP35X.js} +1 -1
- package/dist/{chunk-A3GDELMY.js → chunk-YBA5N4XY.js} +7 -7
- package/dist/{chunk-INXDSJRC.js → chunk-YOUAVGHJ.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 +18 -18
- 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-2URa-V4S.d.cts +461 -0
- package/dist/{index-Ccv_61jG.d.cts → index-33mF4XyU.d.cts} +110 -27
- 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-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-CQtnGFrZ.d.cts → index-BC-xjOrd.d.cts} +7 -7
- package/dist/{index-ClKm7CFB.d.cts → index-BFuVcqL8.d.cts} +1 -1
- package/dist/index-BTJxM-wZ.d.ts +292 -0
- package/dist/{index-Jgl7ev9I.d.cts → index-BVNGEX7d.d.cts} +9 -9
- 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-zA1uVtk0.d.ts → index-BiomL7AW.d.ts} +1 -1
- package/dist/{index-BWiX5foT.d.ts → index-BjWZARLy.d.ts} +1 -1
- package/dist/{index-RJX4snyi.d.cts → index-BlRVj-7Q.d.cts} +21 -21
- package/dist/{index-Ds3Rz9m9.d.cts → index-BsZlbHM5.d.cts} +3 -3
- 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-p0bkNfby.d.cts → index-C4ig7whw.d.cts} +3 -3
- package/dist/{index-BRisOxlx.d.ts → index-CDvC1m5p.d.ts} +1 -1
- 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-Ced0dphF.d.ts → index-CVhBdCMf.d.ts} +9 -9
- package/dist/{index-b4a6Sg0R.d.ts → index-CZAixNU3.d.ts} +4 -4
- package/dist/index-Cjrpx2Mg.d.cts +171 -0
- 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-BUtCR0k6.d.ts → index-CsD0fqnO.d.ts} +7 -7
- package/dist/{index-ChZvMC4M.d.cts → index-CvUrRb4m.d.cts} +7 -7
- 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-nP13Qe6T.d.ts → index-DFe2Pk2u.d.ts} +1 -1
- package/dist/{index-IxinNgAH.d.cts → index-DHv2M7s8.d.cts} +16 -15
- package/dist/{index-Cn3taOmp.d.cts → index-DKp1CIbG.d.cts} +2 -2
- package/dist/{index-CoR-tOZA.d.cts → index-DLyQC5Ww.d.ts} +8 -7
- package/dist/{index-CNxdDb2e.d.ts → index-DSSsxS7B.d.ts} +3 -3
- package/dist/{index-DheNs40A.d.ts → index-DXSLMoma.d.ts} +2 -2
- package/dist/{index-BVTjuKeP.d.cts → index-D_QQ_dTD.d.cts} +1 -1
- 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-B5eS17Bz.d.ts → index-DtSVSKnd.d.ts} +47 -32
- package/dist/{index-Bi4ZP6Hc.d.ts → index-DxxvGTXp.d.ts} +110 -27
- package/dist/index-DzCQt2FJ.d.cts +292 -0
- package/dist/{index-D80nGRb9.d.ts → index-DzYTXMBz.d.ts} +3 -3
- package/dist/index-EfPb77rT.d.cts +26 -0
- package/dist/{index-B-KCkW4M.d.cts → index-GaW6Welt.d.cts} +4 -4
- package/dist/{index-D23g00HE.d.cts → index-HCp5ua_i.d.cts} +4 -4
- package/dist/{index-DupIl9wI.d.ts → index-JYtN9uqM.d.ts} +1 -1
- package/dist/index-KeBhbNg3.d.ts +461 -0
- package/dist/{index-BpjQanLs.d.cts → index-PluovH45.d.cts} +2 -2
- package/dist/{index-CbCNoogR.d.ts → index-Pu1Wa7en.d.ts} +16 -15
- package/dist/{index-ZIQaKIdY.d.cts → index-RJIY7QVW.d.cts} +47 -32
- 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-3L3RC3VJ.d.ts → index-isdlyeeO.d.ts} +7 -7
- package/dist/index-jA_OwwNg.d.ts +26 -0
- package/dist/{index-BFHpNSsV.d.ts → index-k67aNfqC.d.cts} +8 -7
- package/dist/index-kBUQj-rT.d.ts +171 -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-BlLBWSZ2.d.cts +120 -0
- package/dist/pipeline-graph-DdBoRu37.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-ScpWyqny.d.cts +196 -0
- package/dist/reactive-log-jirQsxMY.d.ts +196 -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,461 @@
|
|
|
1
|
+
import { a as Node } from './node-fSc-hCv8.cjs';
|
|
2
|
+
import { R as ReactiveLogBundle } from './reactive-log-ScpWyqny.cjs';
|
|
3
|
+
import { AppendLogStorageTier } from './extra/storage-tiers.cjs';
|
|
4
|
+
import { a as GraphOptions, G as Graph } from './graph-kTltt95s.cjs';
|
|
5
|
+
import { B as BaseAuditRecord } from './imperative-audit-ahAE65a9.cjs';
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* CQRS patterns (roadmap §4.5).
|
|
9
|
+
*
|
|
10
|
+
* Composition layer over reactiveLog (3.2), pipeline/sagas (4.1), event bus (4.2),
|
|
11
|
+
* projections (4.3). Guards (1.5) enforce command/query boundary.
|
|
12
|
+
*
|
|
13
|
+
* - `cqrs(name, opts?)` → `CqrsGraph` — top-level factory
|
|
14
|
+
* - `CqrsGraph.command(name, handler)` — write-only node; guard rejects `observe`
|
|
15
|
+
* - `CqrsGraph.event(name)` — backed by `reactiveLog`; append-only
|
|
16
|
+
* - `CqrsGraph.projection(name, events, reducer, initial)` — read-only derived; guard rejects `write`
|
|
17
|
+
* - `CqrsGraph.saga(name, events, handler)` — event-driven side effects
|
|
18
|
+
*/
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* Immutable envelope for events emitted by command handlers.
|
|
22
|
+
*
|
|
23
|
+
* **Wave C.1 Unit 17 (locked 2026-04-24):** Extended ES standard fields —
|
|
24
|
+
* `aggregateId` / `aggregateVersion` for per-aggregate streams; correlation /
|
|
25
|
+
* causation IDs for distributed tracing; `metadata` for free-form context.
|
|
26
|
+
* Optional `handlerVersion` (Audit 5) traces which handler version produced
|
|
27
|
+
* the event.
|
|
28
|
+
*
|
|
29
|
+
* `seq` is a per-graph monotonic counter that provides stable ordering when
|
|
30
|
+
* multiple events share the same `timestampNs` (same wall-clock tick).
|
|
31
|
+
*/
|
|
32
|
+
type CqrsEvent<T = unknown> = {
|
|
33
|
+
type: string;
|
|
34
|
+
payload: T;
|
|
35
|
+
/** Wall-clock nanoseconds (via `wallClockNs()`). */
|
|
36
|
+
timestampNs: number;
|
|
37
|
+
/** Monotonic sequence within this CqrsGraph instance. */
|
|
38
|
+
seq: number;
|
|
39
|
+
/** Aggregate identifier (per-aggregate streams). */
|
|
40
|
+
aggregateId?: string;
|
|
41
|
+
/** Per-aggregate monotonic version (set when `aggregateId` is provided). */
|
|
42
|
+
aggregateVersion?: number;
|
|
43
|
+
/** Distributed-trace correlation id. */
|
|
44
|
+
correlationId?: string;
|
|
45
|
+
/** Causation chain id (this event was caused by event `causationId`). */
|
|
46
|
+
causationId?: string;
|
|
47
|
+
/** Free-form metadata frozen at append. */
|
|
48
|
+
metadata?: Readonly<Record<string, unknown>>;
|
|
49
|
+
/** V0 identity of the event log node at append time (§6.0b). */
|
|
50
|
+
v0?: {
|
|
51
|
+
id: string;
|
|
52
|
+
version: number;
|
|
53
|
+
};
|
|
54
|
+
/** Handler version stamped on emit (Audit 5). */
|
|
55
|
+
handlerVersion?: {
|
|
56
|
+
id: string;
|
|
57
|
+
version: string | number;
|
|
58
|
+
};
|
|
59
|
+
};
|
|
60
|
+
/** Compile-time event-map registry: `{ "orderPlaced": OrderPayload, ... }`. */
|
|
61
|
+
type CqrsEventMap = Record<string, unknown>;
|
|
62
|
+
/** Recommended `keyOf` for CQRS event-store storage tiers (Audit 4). */
|
|
63
|
+
declare const cqrsEventKeyOf: (e: CqrsEvent) => string;
|
|
64
|
+
interface DispatchRecord<T = unknown> extends BaseAuditRecord {
|
|
65
|
+
readonly commandName: string;
|
|
66
|
+
readonly payload: T;
|
|
67
|
+
readonly status: "success" | "failed";
|
|
68
|
+
readonly error?: unknown;
|
|
69
|
+
readonly errorType?: string;
|
|
70
|
+
/**
|
|
71
|
+
* Event names emitted by the handler.
|
|
72
|
+
* - `status: "success"`: events that persisted in the event log.
|
|
73
|
+
* - `status: "failed"`: events the handler ATTEMPTED to emit before throwing;
|
|
74
|
+
* they were rolled back and did NOT persist. Documents the failed attempt's
|
|
75
|
+
* intentions for debugging handler logic. The actual event log shows only
|
|
76
|
+
* what's durable.
|
|
77
|
+
*/
|
|
78
|
+
readonly emittedEvents?: readonly string[];
|
|
79
|
+
}
|
|
80
|
+
declare const dispatchKeyOf: <T>(r: DispatchRecord<T>) => string;
|
|
81
|
+
interface SagaInvocation<T = unknown> extends BaseAuditRecord {
|
|
82
|
+
readonly eventType: string;
|
|
83
|
+
readonly status: "success" | "failed";
|
|
84
|
+
readonly error?: unknown;
|
|
85
|
+
readonly errorType?: string;
|
|
86
|
+
readonly aggregateId?: string;
|
|
87
|
+
readonly event?: CqrsEvent<T>;
|
|
88
|
+
}
|
|
89
|
+
declare const sagaInvocationKeyOf: <T>(i: SagaInvocation<T>) => string;
|
|
90
|
+
/**
|
|
91
|
+
* Saga registration result (M10) — a typed bundle replacing the prior
|
|
92
|
+
* `Node<unknown>` return that side-attached `_saga` via an unsafe cast.
|
|
93
|
+
*
|
|
94
|
+
* `node` is the saga's effect node (subscribe to observe processing
|
|
95
|
+
* activity). `invocations` is the per-event-type audit log; `audit` aliases
|
|
96
|
+
* `invocations` (Audit 2 `.audit` duplication). `cursors` exposes the
|
|
97
|
+
* per-event-type cursor state nodes for monitoring / testing.
|
|
98
|
+
*
|
|
99
|
+
* @category patterns
|
|
100
|
+
*/
|
|
101
|
+
interface SagaController<T = unknown> {
|
|
102
|
+
readonly node: Node<unknown>;
|
|
103
|
+
readonly invocations: ReactiveLogBundle<SagaInvocation<T>>;
|
|
104
|
+
readonly audit: ReactiveLogBundle<SagaInvocation<T>>;
|
|
105
|
+
readonly cursors: {
|
|
106
|
+
readonly [eventName: string]: Node<number>;
|
|
107
|
+
};
|
|
108
|
+
}
|
|
109
|
+
type CommandActions = {
|
|
110
|
+
/** Append an event to a named event log (bypasses event guard). */
|
|
111
|
+
emit: (eventName: string, payload: unknown) => void;
|
|
112
|
+
};
|
|
113
|
+
/**
|
|
114
|
+
* Command handler receives the dispatch payload and actions to emit events.
|
|
115
|
+
*
|
|
116
|
+
* **Purity:** Handlers should not mutate the payload. Event emission via
|
|
117
|
+
* `actions.emit()` is the only sanctioned side effect.
|
|
118
|
+
*/
|
|
119
|
+
type CommandHandler<T = unknown> = (payload: T, actions: CommandActions) => void;
|
|
120
|
+
/**
|
|
121
|
+
* Projection reducer folds events into a read model.
|
|
122
|
+
*
|
|
123
|
+
* **Purity contract:** Reducers MUST be pure — return a new state value
|
|
124
|
+
* without mutating `state` or any event.
|
|
125
|
+
*
|
|
126
|
+
* - In **`"replay"`** mode the `state` parameter is always the original
|
|
127
|
+
* `initial` value (full event-sourcing replay on every recompute).
|
|
128
|
+
* - In **`"scan"`** mode the `state` parameter is the _previous_ output
|
|
129
|
+
* (incremental fold); `events` contains only the events appended since
|
|
130
|
+
* the last computation.
|
|
131
|
+
*/
|
|
132
|
+
type ProjectionReducer<TState = unknown, TEvent = unknown> = (state: TState, events: readonly CqrsEvent<TEvent>[]) => TState;
|
|
133
|
+
/**
|
|
134
|
+
* Snapshot integration for {@link ProjectionOptions}.
|
|
135
|
+
*
|
|
136
|
+
* `load` is called once at projection construction and the returned value
|
|
137
|
+
* seeds the initial state. `save` (optional) is called after each reducer
|
|
138
|
+
* run, debounced by `saveDebounceMs` (default 1000 ms) and capped by
|
|
139
|
+
* `saveEvery` (default 1000 events).
|
|
140
|
+
*/
|
|
141
|
+
type ProjectionSnapshotOpts<TState> = {
|
|
142
|
+
/** Load a previously-saved state. `undefined` → start from `initial`. */
|
|
143
|
+
load: () => TState | undefined | Promise<TState | undefined>;
|
|
144
|
+
/** Persist the current state. Called after reducer; may be async. */
|
|
145
|
+
save?: (state: TState) => void | Promise<void>;
|
|
146
|
+
/**
|
|
147
|
+
* Debounce window (ms) before `save` fires after the last event. Default 1000.
|
|
148
|
+
*/
|
|
149
|
+
saveDebounceMs?: number;
|
|
150
|
+
/**
|
|
151
|
+
* Force a save after every Nth state change regardless of debounce.
|
|
152
|
+
* Default 1000. Both knobs compose: save fires at whichever condition is
|
|
153
|
+
* met first.
|
|
154
|
+
*/
|
|
155
|
+
saveEvery?: number;
|
|
156
|
+
};
|
|
157
|
+
/**
|
|
158
|
+
* Options for {@link CqrsGraph.projection}.
|
|
159
|
+
*
|
|
160
|
+
* **Wave C.3 Unit 21 (locked 2026-04-24):**
|
|
161
|
+
* - `mode: "scan"` (default) — incremental fold; `"replay"` — full replay
|
|
162
|
+
* each wave.
|
|
163
|
+
* - `snapshot` — load/save integration for cold-start + auto-checkpoint.
|
|
164
|
+
* - `freezeInputs` (default `true`) — freeze event arrays before passing
|
|
165
|
+
* to reducer (purity enforcement).
|
|
166
|
+
* - `rebuild()` / `reset()` on the returned {@link ProjectionController}.
|
|
167
|
+
*
|
|
168
|
+
* @category patterns
|
|
169
|
+
*/
|
|
170
|
+
type ProjectionOptions<TState> = {
|
|
171
|
+
name: string;
|
|
172
|
+
events: readonly string[];
|
|
173
|
+
reducer: ProjectionReducer<TState>;
|
|
174
|
+
initial: TState;
|
|
175
|
+
/**
|
|
176
|
+
* Fold strategy. Default `"scan"` (incremental). `"replay"` = full replay.
|
|
177
|
+
*
|
|
178
|
+
* **Scan-mode ordering caveat:** scan-mode assumes monotonic per-stream
|
|
179
|
+
* arrival order. When multiple event streams are merged for a projection,
|
|
180
|
+
* events arriving with a `timestampNs` earlier than the current sort cursor
|
|
181
|
+
* are skipped from the incremental sweep. This is an acceptable trade-off
|
|
182
|
+
* for incremental fold; use `mode: "replay"` for strict cross-stream
|
|
183
|
+
* ordering.
|
|
184
|
+
*/
|
|
185
|
+
mode?: "replay" | "scan";
|
|
186
|
+
/** Snapshot integration for rebuild + auto-checkpoint. */
|
|
187
|
+
snapshot?: ProjectionSnapshotOpts<TState>;
|
|
188
|
+
/**
|
|
189
|
+
* Freeze event arrays before passing to reducer (default `true`).
|
|
190
|
+
* Set to `false` only if your reducer intentionally mutates the input
|
|
191
|
+
* (strongly discouraged — prefer immutable reducers).
|
|
192
|
+
*/
|
|
193
|
+
freezeInputs?: boolean;
|
|
194
|
+
};
|
|
195
|
+
/**
|
|
196
|
+
* Controller returned by {@link CqrsGraph.projection}.
|
|
197
|
+
*
|
|
198
|
+
* `node` is the reactive read model. `rebuild()` performs a paginated
|
|
199
|
+
* cold-storage replay (requires `attachEventStorage` tiers). `reset()`
|
|
200
|
+
* reloads from `snapshot.load()` and re-folds the live event log on top.
|
|
201
|
+
*
|
|
202
|
+
* @category patterns
|
|
203
|
+
*/
|
|
204
|
+
interface ProjectionController<TState> {
|
|
205
|
+
readonly node: Node<TState>;
|
|
206
|
+
/**
|
|
207
|
+
* Async paginated rebuild from attached storage tiers. Throws
|
|
208
|
+
* {@link RebuildError} on adapter / decode / reducer failure.
|
|
209
|
+
*
|
|
210
|
+
* @param opts.fromTier - Storage tier to read from (default: first attached).
|
|
211
|
+
* @param opts.pageSize - Entries per page (default 1000).
|
|
212
|
+
*/
|
|
213
|
+
rebuild(opts?: {
|
|
214
|
+
fromTier?: AppendLogStorageTier<CqrsEvent>;
|
|
215
|
+
pageSize?: number;
|
|
216
|
+
}): Promise<TState>;
|
|
217
|
+
/**
|
|
218
|
+
* Reload from `snapshot.load()` (if configured) and re-fold the live
|
|
219
|
+
* in-memory event log on top. Returns the rebuilt state. No-op on the
|
|
220
|
+
* reactive node if the state is unchanged.
|
|
221
|
+
*/
|
|
222
|
+
reset(): Promise<TState>;
|
|
223
|
+
}
|
|
224
|
+
type SagaHandler<T = unknown> = (event: CqrsEvent<T>) => void;
|
|
225
|
+
type CqrsOptions = {
|
|
226
|
+
graph?: GraphOptions;
|
|
227
|
+
/** Bounded retention for event streams; default 1024 (cross-cutting). */
|
|
228
|
+
retainedLimit?: number;
|
|
229
|
+
/** Freeze command payloads on dispatch (default `true`). */
|
|
230
|
+
freezeCommandPayload?: boolean;
|
|
231
|
+
/** Freeze event payloads on emit (default `true`). */
|
|
232
|
+
freezeEventPayload?: boolean;
|
|
233
|
+
/** LRU eviction threshold for per-aggregate streams (default 10_000). */
|
|
234
|
+
maxAggregates?: number;
|
|
235
|
+
};
|
|
236
|
+
type CommandRegistration<TPayload = unknown> = {
|
|
237
|
+
handler: CommandHandler<TPayload>;
|
|
238
|
+
emits?: readonly string[];
|
|
239
|
+
handlerVersion?: {
|
|
240
|
+
id: string;
|
|
241
|
+
version: string | number;
|
|
242
|
+
};
|
|
243
|
+
};
|
|
244
|
+
type DispatchOptions = {
|
|
245
|
+
correlationId?: string;
|
|
246
|
+
causationId?: string;
|
|
247
|
+
metadata?: Record<string, unknown>;
|
|
248
|
+
/**
|
|
249
|
+
* Optimistic-concurrency check: if set, dispatch verifies the aggregate
|
|
250
|
+
* (identified by `aggregateId`) is at this version. On mismatch, dispatch
|
|
251
|
+
* throws {@link OptimisticConcurrencyError} BEFORE the handler runs.
|
|
252
|
+
*
|
|
253
|
+
* Requires `aggregateId` to be set. Without it the check is a no-op.
|
|
254
|
+
*/
|
|
255
|
+
expectedAggregateVersion?: number;
|
|
256
|
+
/**
|
|
257
|
+
* Aggregate this dispatch targets. Events emitted by the handler that
|
|
258
|
+
* also carry this `aggregateId` participate in per-aggregate versioning
|
|
259
|
+
* and LRU eviction (see {@link CqrsOptions.maxAggregates}). Events whose
|
|
260
|
+
* handler-supplied `aggregateId` differs from the dispatch's `aggregateId`
|
|
261
|
+
* are emitted untouched (their own `aggregateVersion` is computed from
|
|
262
|
+
* their own aggregate's stream).
|
|
263
|
+
*/
|
|
264
|
+
aggregateId?: string;
|
|
265
|
+
};
|
|
266
|
+
type SagaOptions = {
|
|
267
|
+
aggregateId?: string;
|
|
268
|
+
errorPolicy?: "advance" | "hold";
|
|
269
|
+
handlerVersion?: {
|
|
270
|
+
id: string;
|
|
271
|
+
version: string | number;
|
|
272
|
+
};
|
|
273
|
+
};
|
|
274
|
+
/**
|
|
275
|
+
* Eviction record emitted on `aggregateEvictions` when an aggregate's
|
|
276
|
+
* per-aggregate stream is removed under `maxAggregates` LRU pressure. The
|
|
277
|
+
* eviction does NOT delete events from the fan-in stream — only the
|
|
278
|
+
* per-aggregate dedicated stream and its version counter.
|
|
279
|
+
*/
|
|
280
|
+
interface AggregateEvictionRecord {
|
|
281
|
+
readonly aggregateId: string;
|
|
282
|
+
readonly type: string;
|
|
283
|
+
readonly t_ns: number;
|
|
284
|
+
/** The version count the aggregate reached before eviction (for diagnostics). */
|
|
285
|
+
readonly lastVersion: number;
|
|
286
|
+
}
|
|
287
|
+
declare class CqrsGraph<EM extends CqrsEventMap = Record<string, unknown>> extends Graph {
|
|
288
|
+
/** Fan-in event streams (one per type, all aggregates merged). */
|
|
289
|
+
private readonly _eventLogs;
|
|
290
|
+
/**
|
|
291
|
+
* Per-aggregate event streams: type → aggregateId → entry. Used for
|
|
292
|
+
* `event(type, aggregateId)` dual-form access and per-aggregate version
|
|
293
|
+
* tracking. Only populated when an event with `aggregateId` is emitted.
|
|
294
|
+
*/
|
|
295
|
+
private readonly _eventLogsByAggregate;
|
|
296
|
+
/** Per-aggregate version counters: `${type}::${aggregateId}` → current version. */
|
|
297
|
+
private readonly _aggregateVersions;
|
|
298
|
+
/**
|
|
299
|
+
* LRU access order for `${type}::${aggregateId}`. Map insertion order
|
|
300
|
+
* tracks recency — `delete` + `set` on access moves to the end.
|
|
301
|
+
*/
|
|
302
|
+
private readonly _aggregateLru;
|
|
303
|
+
private readonly _commandRegs;
|
|
304
|
+
private readonly _projections;
|
|
305
|
+
private readonly _sagas;
|
|
306
|
+
private readonly _keepaliveDisposers;
|
|
307
|
+
private _seq;
|
|
308
|
+
private readonly _retainedLimit;
|
|
309
|
+
private readonly _freezeCommandPayload;
|
|
310
|
+
private readonly _freezeEventPayload;
|
|
311
|
+
private readonly _maxAggregates;
|
|
312
|
+
private readonly _dispatchSeqCursor;
|
|
313
|
+
/** Audit log of every command dispatch (Audit 2). */
|
|
314
|
+
readonly dispatches: ReactiveLogBundle<DispatchRecord>;
|
|
315
|
+
/** Alias for {@link CqrsGraph.dispatches} (Audit 2 `.audit` duplication). */
|
|
316
|
+
readonly audit: ReactiveLogBundle<DispatchRecord>;
|
|
317
|
+
/** Per-aggregate LRU eviction observability; secondary log to `dispatches`. */
|
|
318
|
+
readonly aggregateEvictions: ReactiveLogBundle<AggregateEvictionRecord>;
|
|
319
|
+
constructor(name: string, opts?: CqrsOptions);
|
|
320
|
+
/**
|
|
321
|
+
* Read the current per-aggregate version (last emitted `aggregateVersion`
|
|
322
|
+
* for that `(type, aggregateId)` pair). Returns `0` if no events have been
|
|
323
|
+
* emitted yet for this aggregate. Useful for callers preparing
|
|
324
|
+
* {@link DispatchOptions.expectedAggregateVersion}.
|
|
325
|
+
*/
|
|
326
|
+
aggregateVersion(type: string, aggregateId: string): number;
|
|
327
|
+
/** LRU touch — moves the key to the end of the access order. */
|
|
328
|
+
private _touchAggregate;
|
|
329
|
+
/**
|
|
330
|
+
* Evict the oldest aggregate streams (least-recently-touched) until the
|
|
331
|
+
* aggregate count is back within `_maxAggregates`. Emits one
|
|
332
|
+
* `AggregateEvictionRecord` per eviction. The fan-in stream is NOT touched
|
|
333
|
+
* — events stay in the type-level log; only the per-aggregate stream and
|
|
334
|
+
* version counter are removed.
|
|
335
|
+
*/
|
|
336
|
+
private _enforceAggregateLru;
|
|
337
|
+
destroy(): void;
|
|
338
|
+
/** Tiers attached via {@link attachEventStorage}; auto-wired into future event streams. */
|
|
339
|
+
private readonly _attachedEventTiers;
|
|
340
|
+
private readonly _attachedTierDisposers;
|
|
341
|
+
/**
|
|
342
|
+
* Wire append-log storage tiers for ALL CQRS event streams — both currently
|
|
343
|
+
* registered AND any future streams created via `event(name)` /
|
|
344
|
+
* `event(name, aggregateId)` / handler emit. (M4 fix.)
|
|
345
|
+
*
|
|
346
|
+
* Returns a disposer that releases all storage subscriptions wired by this
|
|
347
|
+
* call (including those for streams that were created after the call).
|
|
348
|
+
*/
|
|
349
|
+
attachEventStorage(tiers: readonly AppendLogStorageTier<CqrsEvent>[]): () => void;
|
|
350
|
+
/** Wire newly-created event stream into all currently-attached tier sets. */
|
|
351
|
+
private _autoWireStreamStorage;
|
|
352
|
+
private _bumpDispatchSeq;
|
|
353
|
+
/**
|
|
354
|
+
* Register a named event stream backed by `reactiveLog`.
|
|
355
|
+
* Guard denies external `write` — only commands append internally.
|
|
356
|
+
*/
|
|
357
|
+
event(name: string): Node<readonly CqrsEvent[]>;
|
|
358
|
+
event(name: string, aggregateId: string): Node<readonly CqrsEvent[]>;
|
|
359
|
+
/**
|
|
360
|
+
* Get-or-create the per-aggregate event stream for `(type, aggregateId)`.
|
|
361
|
+
* Mounts the stream as a sibling node named `<type>_<aggregateId>` so it
|
|
362
|
+
* appears in `describe()`. LRU access is touched on every call.
|
|
363
|
+
*/
|
|
364
|
+
private _ensureAggregateStream;
|
|
365
|
+
/** Try `resolve(path)`; return `undefined` instead of throwing on missing. */
|
|
366
|
+
private resolveOptional;
|
|
367
|
+
/** Internal: append to an event log, auto-registering if needed. */
|
|
368
|
+
private _appendEvent;
|
|
369
|
+
/**
|
|
370
|
+
* Register a command with its handler. Guard denies `observe` (write-only).
|
|
371
|
+
* Use `dispatch(name, payload)` to execute.
|
|
372
|
+
*
|
|
373
|
+
* The command node carries dynamic `meta.error` — a reactive companion
|
|
374
|
+
* that holds the last handler error (or `null` on success).
|
|
375
|
+
*/
|
|
376
|
+
command<T = unknown>(name: string, handlerOrReg: CommandHandler<T> | CommandRegistration<T>): Node<T>;
|
|
377
|
+
/**
|
|
378
|
+
* Execute a registered command. Wraps the entire dispatch in `batch()` so
|
|
379
|
+
* the command node DATA and all emitted events settle atomically.
|
|
380
|
+
*
|
|
381
|
+
* If the handler throws, `meta.error` on the command node is set to the
|
|
382
|
+
* error and the exception is re-thrown.
|
|
383
|
+
*/
|
|
384
|
+
dispatch<T = unknown>(commandName: string, payload: T, opts?: DispatchOptions): void;
|
|
385
|
+
/**
|
|
386
|
+
* Register a read-only projection derived from event streams.
|
|
387
|
+
* Guard denies `write` — value is computed from events only.
|
|
388
|
+
*
|
|
389
|
+
* **Wave C.3 Unit 21 (locked 2026-04-24):**
|
|
390
|
+
* - Object-bag signature replaces the positional `(name, events, reducer, initial)` form.
|
|
391
|
+
* - `mode: "scan"` (default) — incremental fold; `"replay"` — full replay each wave.
|
|
392
|
+
* - `snapshot` integration for cold-start load + auto-checkpoint save.
|
|
393
|
+
* - `freezeInputs` (default `true`) — freeze the event array before passing to reducer.
|
|
394
|
+
* - Returns `ProjectionController<TState>` with `.node`, `.rebuild()`, `.reset()`.
|
|
395
|
+
*
|
|
396
|
+
* Fan-in across `events` is implemented by depending on all event-type fan-in
|
|
397
|
+
* nodes directly, which preserves `describe()` edges (e.g. `orderPlaced →
|
|
398
|
+
* orderCount`). Events are sorted by `(timestampNs, seq, aggregateId)` before
|
|
399
|
+
* passing to the reducer (Option-3 cross-aggregate ordering, C.3).
|
|
400
|
+
*/
|
|
401
|
+
projection<TState>(opts: ProjectionOptions<TState>): ProjectionController<TState>;
|
|
402
|
+
/**
|
|
403
|
+
* Register an event-driven side effect. Runs handler for each **new** event
|
|
404
|
+
* from the specified streams (tracks last-processed entry count per stream).
|
|
405
|
+
*
|
|
406
|
+
* The saga node carries dynamic `meta.error` — a reactive companion that
|
|
407
|
+
* holds the last handler error (or `null` on success). Handler errors do
|
|
408
|
+
* not propagate out of the saga run (the event cursor still advances so
|
|
409
|
+
* the same entry is not delivered twice).
|
|
410
|
+
*/
|
|
411
|
+
saga<T = unknown>(name: string, eventNames: readonly string[], handler: SagaHandler<T>, opts?: SagaOptions): SagaController<T>;
|
|
412
|
+
}
|
|
413
|
+
/**
|
|
414
|
+
* Create a CQRS graph container.
|
|
415
|
+
*
|
|
416
|
+
* @example
|
|
417
|
+
* ```ts
|
|
418
|
+
* const app = cqrs("orders");
|
|
419
|
+
* app.event("orderPlaced");
|
|
420
|
+
* app.command("placeOrder", (payload, { emit }) => {
|
|
421
|
+
* emit("orderPlaced", { orderId: payload.id, amount: payload.amount });
|
|
422
|
+
* });
|
|
423
|
+
* const { node: orderCount } = app.projection({
|
|
424
|
+
* name: "orderCount",
|
|
425
|
+
* events: ["orderPlaced"],
|
|
426
|
+
* reducer: (_s, events) => events.length,
|
|
427
|
+
* initial: 0,
|
|
428
|
+
* });
|
|
429
|
+
* app.dispatch("placeOrder", { id: "1", amount: 100 });
|
|
430
|
+
* ```
|
|
431
|
+
*/
|
|
432
|
+
declare function cqrs<EM extends CqrsEventMap = Record<string, unknown>>(name: string, opts?: CqrsOptions): CqrsGraph<EM>;
|
|
433
|
+
|
|
434
|
+
type index_AggregateEvictionRecord = AggregateEvictionRecord;
|
|
435
|
+
type index_CommandActions = CommandActions;
|
|
436
|
+
type index_CommandHandler<T = unknown> = CommandHandler<T>;
|
|
437
|
+
type index_CommandRegistration<TPayload = unknown> = CommandRegistration<TPayload>;
|
|
438
|
+
type index_CqrsEvent<T = unknown> = CqrsEvent<T>;
|
|
439
|
+
type index_CqrsEventMap = CqrsEventMap;
|
|
440
|
+
type index_CqrsGraph<EM extends CqrsEventMap = Record<string, unknown>> = CqrsGraph<EM>;
|
|
441
|
+
declare const index_CqrsGraph: typeof CqrsGraph;
|
|
442
|
+
type index_CqrsOptions = CqrsOptions;
|
|
443
|
+
type index_DispatchOptions = DispatchOptions;
|
|
444
|
+
type index_DispatchRecord<T = unknown> = DispatchRecord<T>;
|
|
445
|
+
type index_ProjectionController<TState> = ProjectionController<TState>;
|
|
446
|
+
type index_ProjectionOptions<TState> = ProjectionOptions<TState>;
|
|
447
|
+
type index_ProjectionReducer<TState = unknown, TEvent = unknown> = ProjectionReducer<TState, TEvent>;
|
|
448
|
+
type index_ProjectionSnapshotOpts<TState> = ProjectionSnapshotOpts<TState>;
|
|
449
|
+
type index_SagaController<T = unknown> = SagaController<T>;
|
|
450
|
+
type index_SagaHandler<T = unknown> = SagaHandler<T>;
|
|
451
|
+
type index_SagaInvocation<T = unknown> = SagaInvocation<T>;
|
|
452
|
+
type index_SagaOptions = SagaOptions;
|
|
453
|
+
declare const index_cqrs: typeof cqrs;
|
|
454
|
+
declare const index_cqrsEventKeyOf: typeof cqrsEventKeyOf;
|
|
455
|
+
declare const index_dispatchKeyOf: typeof dispatchKeyOf;
|
|
456
|
+
declare const index_sagaInvocationKeyOf: typeof sagaInvocationKeyOf;
|
|
457
|
+
declare namespace index {
|
|
458
|
+
export { type index_AggregateEvictionRecord as AggregateEvictionRecord, type index_CommandActions as CommandActions, type index_CommandHandler as CommandHandler, type index_CommandRegistration as CommandRegistration, type index_CqrsEvent as CqrsEvent, type index_CqrsEventMap as CqrsEventMap, index_CqrsGraph as CqrsGraph, type index_CqrsOptions as CqrsOptions, type index_DispatchOptions as DispatchOptions, type index_DispatchRecord as DispatchRecord, type index_ProjectionController as ProjectionController, type index_ProjectionOptions as ProjectionOptions, type index_ProjectionReducer as ProjectionReducer, type index_ProjectionSnapshotOpts as ProjectionSnapshotOpts, type index_SagaController as SagaController, type index_SagaHandler as SagaHandler, type index_SagaInvocation as SagaInvocation, type index_SagaOptions as SagaOptions, index_cqrs as cqrs, index_cqrsEventKeyOf as cqrsEventKeyOf, index_dispatchKeyOf as dispatchKeyOf, index_sagaInvocationKeyOf as sagaInvocationKeyOf };
|
|
459
|
+
}
|
|
460
|
+
|
|
461
|
+
export { type AggregateEvictionRecord as A, type CqrsEventMap as C, type DispatchOptions as D, type ProjectionController as P, type SagaController as S, type CqrsEvent as a, CqrsGraph as b, type CqrsOptions as c, type CommandActions as d, type CommandHandler as e, type CommandRegistration as f, type DispatchRecord as g, type ProjectionOptions as h, index as i, type ProjectionReducer as j, type ProjectionSnapshotOpts as k, type SagaHandler as l, type SagaInvocation as m, type SagaOptions as n, cqrs as o, cqrsEventKeyOf as p, dispatchKeyOf as q, sagaInvocationKeyOf as s };
|
|
@@ -1,22 +1,11 @@
|
|
|
1
|
-
import { a as Node } from './node-
|
|
2
|
-
import { G as Graph, a as GraphOptions } from './graph-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
* Messaging patterns (roadmap §4.2).
|
|
6
|
-
*
|
|
7
|
-
* Pulsar-inspired messaging primitives modeled as graph factories:
|
|
8
|
-
* - `topic()` for append-only topic streams with a retained window.
|
|
9
|
-
* - `subscription()` for cursor-based consumers.
|
|
10
|
-
* - `topicBridge()` for autonomous topic-to-topic relay.
|
|
11
|
-
* - `messagingHub()` for a lazy topic registry.
|
|
12
|
-
*
|
|
13
|
-
* Job queue / job flow primitives live in `patterns/job-queue` — they are a
|
|
14
|
-
* distinct domain that happens to share reactive-log / reactive-map
|
|
15
|
-
* infrastructure with topics.
|
|
16
|
-
*/
|
|
1
|
+
import { a as Node } from './node-fSc-hCv8.cjs';
|
|
2
|
+
import { G as Graph, a as GraphOptions } from './graph-kTltt95s.cjs';
|
|
3
|
+
import { R as ReactiveLogBundle } from './reactive-log-ScpWyqny.cjs';
|
|
4
|
+
import { AppendLogStorageTier } from './extra/storage-tiers.cjs';
|
|
17
5
|
|
|
18
6
|
type TopicOptions = {
|
|
19
7
|
graph?: GraphOptions;
|
|
8
|
+
/** Bounded retention; default 1024 per cross-cutting policy (Audit 2/4). */
|
|
20
9
|
retainedLimit?: number;
|
|
21
10
|
};
|
|
22
11
|
declare class TopicGraph<T> extends Graph {
|
|
@@ -42,14 +31,48 @@ declare class TopicGraph<T> extends Graph {
|
|
|
42
31
|
readonly hasLatest: Node<boolean>;
|
|
43
32
|
constructor(name: string, opts?: TopicOptions);
|
|
44
33
|
publish(value: T): void;
|
|
34
|
+
/**
|
|
35
|
+
* Wire one or more append-log storage tiers (Audit 4). Each tier receives
|
|
36
|
+
* appended events per wave; rollback honors the wave-as-transaction model.
|
|
37
|
+
*
|
|
38
|
+
* Named `attachEventStorage` (not `attachStorage`) to avoid colliding with
|
|
39
|
+
* the inherited {@link Graph.attachSnapshotStorage} which takes the
|
|
40
|
+
* snapshot-based `StorageTier[]` shape.
|
|
41
|
+
*
|
|
42
|
+
* @returns Disposer.
|
|
43
|
+
*/
|
|
44
|
+
attachEventStorage(tiers: readonly AppendLogStorageTier<T>[]): () => void;
|
|
45
45
|
retained(): readonly T[];
|
|
46
|
+
/** Internal log bundle — used by TopicBridgeGraph for `attach`. */
|
|
47
|
+
get _logBundle(): ReactiveLogBundle<T>;
|
|
46
48
|
}
|
|
47
49
|
type SubscriptionOptions = {
|
|
48
50
|
graph?: GraphOptions;
|
|
51
|
+
/**
|
|
52
|
+
* Starting cursor position.
|
|
53
|
+
* @deprecated Use `from` instead.
|
|
54
|
+
*/
|
|
49
55
|
cursor?: number;
|
|
56
|
+
/**
|
|
57
|
+
* Starting position for the subscription.
|
|
58
|
+
* - `"retained"` (default) — cursor starts at 0; consumer sees all retained history.
|
|
59
|
+
* - `"now"` — cursor starts at current topic length; consumer ignores history.
|
|
60
|
+
* - `number` — explicit cursor position.
|
|
61
|
+
*/
|
|
62
|
+
from?: "now" | "retained" | number;
|
|
63
|
+
/**
|
|
64
|
+
* When this signal node emits DATA, the subscription auto-advances cursor
|
|
65
|
+
* to current `available.length`. Useful for "ack everything when X happens"
|
|
66
|
+
* patterns. The reactive edge `advanceOn → cursor` is visible in `explain()`.
|
|
67
|
+
*/
|
|
68
|
+
advanceOn?: Node<unknown>;
|
|
69
|
+
};
|
|
70
|
+
/** Result of {@link SubscriptionGraph.pullAndAck}. */
|
|
71
|
+
type PullAndAckResult<T> = {
|
|
72
|
+
items: readonly T[];
|
|
73
|
+
cursor: number;
|
|
50
74
|
};
|
|
51
75
|
declare class SubscriptionGraph<T> extends Graph {
|
|
52
|
-
readonly source: Node<readonly T[]>;
|
|
53
76
|
readonly cursor: Node<number>;
|
|
54
77
|
readonly available: Node<readonly T[]>;
|
|
55
78
|
/**
|
|
@@ -61,24 +84,74 @@ declare class SubscriptionGraph<T> extends Graph {
|
|
|
61
84
|
* still wires the data dependency across graph boundaries. D1(e).
|
|
62
85
|
*/
|
|
63
86
|
readonly topic: TopicGraph<T>;
|
|
87
|
+
private _disposed;
|
|
64
88
|
constructor(name: string, topicGraph: TopicGraph<T>, opts?: SubscriptionOptions);
|
|
65
89
|
ack(count?: number): number;
|
|
66
|
-
pull(limit?: number
|
|
67
|
-
|
|
68
|
-
|
|
90
|
+
pull(limit?: number): readonly T[];
|
|
91
|
+
/**
|
|
92
|
+
* Atomic pull-and-acknowledge. Returns `{ items, cursor }` where `cursor`
|
|
93
|
+
* is the new cursor position after advancing. Under single-threaded JS the
|
|
94
|
+
* snapshot and advance are atomic; PY callers use a per-subscription Lock.
|
|
95
|
+
*
|
|
96
|
+
* Replaces `pull(limit, { ack: true })`.
|
|
97
|
+
*/
|
|
98
|
+
pullAndAck(limit?: number): PullAndAckResult<T>;
|
|
99
|
+
/**
|
|
100
|
+
* Release internal subscriptions and mark the subscription torn-down.
|
|
101
|
+
* Subsequent `pull`, `pullAndAck`, `ack` return empty / current cursor.
|
|
102
|
+
* Emits COMPLETE on `cursor` so derived consumers (e.g. `available`) see
|
|
103
|
+
* the termination signal. Also drains `addDisposer` callbacks (including
|
|
104
|
+
* the `keepalive(advancePump)` subscription) so no keepalive leak occurs.
|
|
105
|
+
*/
|
|
106
|
+
dispose(): void;
|
|
69
107
|
}
|
|
70
108
|
type TopicBridgeOptions<TIn, TOut> = {
|
|
71
109
|
graph?: GraphOptions;
|
|
72
110
|
cursor?: number;
|
|
73
111
|
maxPerPump?: number;
|
|
112
|
+
/**
|
|
113
|
+
* Optional transform/filter applied to each item before republishing.
|
|
114
|
+
*
|
|
115
|
+
* **At-most-once with silent drop:** when `map` returns `undefined`, the
|
|
116
|
+
* input is consumed from the source cursor but NOT republished. Filtered
|
|
117
|
+
* items are not retained for retry. If you need filter-with-retry
|
|
118
|
+
* semantics, do the filtering in a downstream subscription on the bridged
|
|
119
|
+
* output rather than in the `map` function.
|
|
120
|
+
*/
|
|
74
121
|
map?: (value: TIn) => TOut | undefined;
|
|
75
122
|
};
|
|
76
123
|
declare class TopicBridgeGraph<TIn, TOut = TIn> extends Graph {
|
|
77
124
|
private readonly _sourceSub;
|
|
78
|
-
private readonly _target;
|
|
79
125
|
readonly bridgedCount: Node<number>;
|
|
126
|
+
/**
|
|
127
|
+
* Emits each mapped batch as DATA — gives downstream observers a reactive
|
|
128
|
+
* stream of bridged values. Also the link target for `target._log.attach`.
|
|
129
|
+
*/
|
|
130
|
+
readonly output: Node<readonly TOut[]>;
|
|
80
131
|
constructor(name: string, sourceTopic: TopicGraph<TIn>, targetTopic: TopicGraph<TOut>, opts?: TopicBridgeOptions<TIn, TOut>);
|
|
81
132
|
}
|
|
133
|
+
/**
|
|
134
|
+
* Private pure data structure managing a named set of {@link TopicGraph}
|
|
135
|
+
* instances. Extracted from {@link MessagingHubGraph} for separation of
|
|
136
|
+
* concerns (B.2 Unit 14 lock: D — split into TopicRegistry + facade).
|
|
137
|
+
*
|
|
138
|
+
* Reusable if other domain consumers (e.g. cqrs.eventLogs) want a shared
|
|
139
|
+
* topic registry later.
|
|
140
|
+
*
|
|
141
|
+
* @internal
|
|
142
|
+
*/
|
|
143
|
+
declare class TopicRegistry {
|
|
144
|
+
private readonly _map;
|
|
145
|
+
/** Reactive monotonic version counter. Advances on topic create/remove. */
|
|
146
|
+
readonly version: Node<number>;
|
|
147
|
+
constructor(versionNode: Node<number>);
|
|
148
|
+
get size(): number;
|
|
149
|
+
has(name: string): boolean;
|
|
150
|
+
get<T>(name: string): TopicGraph<T> | undefined;
|
|
151
|
+
set<T>(name: string, t: TopicGraph<T>): void;
|
|
152
|
+
delete(name: string): boolean;
|
|
153
|
+
keys(): IterableIterator<string>;
|
|
154
|
+
}
|
|
82
155
|
type MessagingHubOptions = {
|
|
83
156
|
graph?: GraphOptions;
|
|
84
157
|
/**
|
|
@@ -93,6 +166,9 @@ type MessagingHubOptions = {
|
|
|
93
166
|
* instances with retention + cursor semantics. Topics are created on first
|
|
94
167
|
* access; `removeTopic(name)` unmounts and tears down via {@link Graph.remove}.
|
|
95
168
|
*
|
|
169
|
+
* Internally delegates to {@link TopicRegistry} for topic map management
|
|
170
|
+
* (B.2 Unit 14 lock: D facade split).
|
|
171
|
+
*
|
|
96
172
|
* **Relationship to `pubsub()` in `src/extra/pubsub.ts`:** `pubsub` is a
|
|
97
173
|
* lightweight last-value state hub (no retention, no cursors). `MessagingHubGraph`
|
|
98
174
|
* is the full messaging hub — retained message logs, cursor-based subscriptions,
|
|
@@ -101,12 +177,11 @@ type MessagingHubOptions = {
|
|
|
101
177
|
* @category patterns
|
|
102
178
|
*/
|
|
103
179
|
declare class MessagingHubGraph extends Graph {
|
|
104
|
-
private readonly
|
|
105
|
-
|
|
180
|
+
private readonly _registry;
|
|
181
|
+
/** Reactive monotonic version counter — advances on topic create/remove. */
|
|
182
|
+
readonly version: Node<number>;
|
|
106
183
|
private readonly _defaultTopicOptions;
|
|
107
184
|
constructor(name: string, opts?: MessagingHubOptions);
|
|
108
|
-
/** Monotonic counter advancing on topic create/remove. */
|
|
109
|
-
get version(): number;
|
|
110
185
|
/** Number of topics currently in the hub. */
|
|
111
186
|
get size(): number;
|
|
112
187
|
/** Checks topic existence without creating. */
|
|
@@ -181,12 +256,18 @@ declare function messagingHub(name: string, opts?: MessagingHubOptions): Messagi
|
|
|
181
256
|
declare function subscription<T>(name: string, topicGraph: TopicGraph<T>, opts?: SubscriptionOptions): SubscriptionGraph<T>;
|
|
182
257
|
/**
|
|
183
258
|
* Creates an autonomous cursor-based topic relay graph.
|
|
259
|
+
*
|
|
260
|
+
* When `opts.map` is provided, items where `map` returns `undefined` are
|
|
261
|
+
* consumed from the source cursor but NOT republished (at-most-once with
|
|
262
|
+
* silent drop). For filter-with-retry semantics, apply the filter in a
|
|
263
|
+
* downstream subscription on the bridge's `output` node instead.
|
|
184
264
|
*/
|
|
185
265
|
declare function topicBridge<TIn, TOut = TIn>(name: string, sourceTopic: TopicGraph<TIn>, targetTopic: TopicGraph<TOut>, opts?: TopicBridgeOptions<TIn, TOut>): TopicBridgeGraph<TIn, TOut>;
|
|
186
266
|
|
|
187
267
|
type index_MessagingHubGraph = MessagingHubGraph;
|
|
188
268
|
declare const index_MessagingHubGraph: typeof MessagingHubGraph;
|
|
189
269
|
type index_MessagingHubOptions = MessagingHubOptions;
|
|
270
|
+
type index_PullAndAckResult<T> = PullAndAckResult<T>;
|
|
190
271
|
type index_SubscriptionGraph<T> = SubscriptionGraph<T>;
|
|
191
272
|
declare const index_SubscriptionGraph: typeof SubscriptionGraph;
|
|
192
273
|
type index_SubscriptionOptions = SubscriptionOptions;
|
|
@@ -196,12 +277,14 @@ type index_TopicBridgeOptions<TIn, TOut> = TopicBridgeOptions<TIn, TOut>;
|
|
|
196
277
|
type index_TopicGraph<T> = TopicGraph<T>;
|
|
197
278
|
declare const index_TopicGraph: typeof TopicGraph;
|
|
198
279
|
type index_TopicOptions = TopicOptions;
|
|
280
|
+
type index_TopicRegistry = TopicRegistry;
|
|
281
|
+
declare const index_TopicRegistry: typeof TopicRegistry;
|
|
199
282
|
declare const index_messagingHub: typeof messagingHub;
|
|
200
283
|
declare const index_subscription: typeof subscription;
|
|
201
284
|
declare const index_topic: typeof topic;
|
|
202
285
|
declare const index_topicBridge: typeof topicBridge;
|
|
203
286
|
declare namespace index {
|
|
204
|
-
export { index_MessagingHubGraph as MessagingHubGraph, type index_MessagingHubOptions as MessagingHubOptions, index_SubscriptionGraph as SubscriptionGraph, type index_SubscriptionOptions as SubscriptionOptions, index_TopicBridgeGraph as TopicBridgeGraph, type index_TopicBridgeOptions as TopicBridgeOptions, index_TopicGraph as TopicGraph, type index_TopicOptions as TopicOptions, index_messagingHub as messagingHub, index_subscription as subscription, index_topic as topic, index_topicBridge as topicBridge };
|
|
287
|
+
export { index_MessagingHubGraph as MessagingHubGraph, type index_MessagingHubOptions as MessagingHubOptions, type index_PullAndAckResult as PullAndAckResult, index_SubscriptionGraph as SubscriptionGraph, type index_SubscriptionOptions as SubscriptionOptions, index_TopicBridgeGraph as TopicBridgeGraph, type index_TopicBridgeOptions as TopicBridgeOptions, index_TopicGraph as TopicGraph, type index_TopicOptions as TopicOptions, index_TopicRegistry as TopicRegistry, index_messagingHub as messagingHub, index_subscription as subscription, index_topic as topic, index_topicBridge as topicBridge };
|
|
205
288
|
}
|
|
206
289
|
|
|
207
|
-
export { MessagingHubGraph as M, SubscriptionGraph as S, TopicGraph as T, type MessagingHubOptions as a, type SubscriptionOptions as b, TopicBridgeGraph as c, type TopicBridgeOptions as d, type TopicOptions as e,
|
|
290
|
+
export { MessagingHubGraph as M, type PullAndAckResult as P, SubscriptionGraph as S, TopicGraph as T, type MessagingHubOptions as a, type SubscriptionOptions as b, TopicBridgeGraph as c, type TopicBridgeOptions as d, type TopicOptions as e, TopicRegistry as f, topicBridge as g, index as i, messagingHub as m, subscription as s, topic as t };
|