@graphrefly/graphrefly 0.43.0 → 0.45.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/README.md +21 -17
- package/dist/compat/index.cjs +20 -10
- package/dist/compat/index.cjs.map +1 -0
- package/dist/compat/index.d.cts +1 -22
- package/dist/compat/index.d.ts +1 -22
- package/dist/compat/index.js +3 -1
- package/dist/compat/index.js.map +1 -0
- package/dist/compat/jotai/index.cjs +21 -1
- package/dist/compat/jotai/index.cjs.map +1 -0
- package/dist/compat/jotai/index.d.cts +1 -2
- package/dist/compat/jotai/index.d.ts +1 -2
- package/dist/compat/jotai/index.js +3 -1
- package/dist/compat/jotai/index.js.map +1 -0
- package/dist/compat/nanostores/index.cjs +21 -1
- package/dist/compat/nanostores/index.cjs.map +1 -0
- package/dist/compat/nanostores/index.d.cts +1 -2
- package/dist/compat/nanostores/index.d.ts +1 -2
- package/dist/compat/nanostores/index.js +3 -1
- package/dist/compat/nanostores/index.js.map +1 -0
- package/dist/compat/nestjs/index.cjs +20 -10
- package/dist/compat/nestjs/index.cjs.map +1 -0
- package/dist/compat/nestjs/index.d.cts +1 -13
- package/dist/compat/nestjs/index.d.ts +1 -13
- package/dist/compat/nestjs/index.js +3 -1
- package/dist/compat/nestjs/index.js.map +1 -0
- package/dist/compat/react/index.cjs +21 -1
- package/dist/compat/react/index.cjs.map +1 -0
- package/dist/compat/react/index.d.cts +1 -2
- package/dist/compat/react/index.d.ts +1 -2
- package/dist/compat/react/index.js +3 -1
- package/dist/compat/react/index.js.map +1 -0
- package/dist/compat/solid/index.cjs +21 -1
- package/dist/compat/solid/index.cjs.map +1 -0
- package/dist/compat/solid/index.d.cts +1 -2
- package/dist/compat/solid/index.d.ts +1 -2
- package/dist/compat/solid/index.js +3 -1
- package/dist/compat/solid/index.js.map +1 -0
- package/dist/compat/svelte/index.cjs +21 -1
- package/dist/compat/svelte/index.cjs.map +1 -0
- package/dist/compat/svelte/index.d.cts +1 -2
- package/dist/compat/svelte/index.d.ts +1 -2
- package/dist/compat/svelte/index.js +3 -1
- package/dist/compat/svelte/index.js.map +1 -0
- package/dist/compat/vue/index.cjs +21 -1
- package/dist/compat/vue/index.cjs.map +1 -0
- package/dist/compat/vue/index.d.cts +1 -3
- package/dist/compat/vue/index.d.ts +1 -3
- package/dist/compat/vue/index.js +3 -1
- package/dist/compat/vue/index.js.map +1 -0
- package/dist/compat/zustand/index.cjs +21 -3
- package/dist/compat/zustand/index.cjs.map +1 -0
- package/dist/compat/zustand/index.d.cts +1 -6
- package/dist/compat/zustand/index.d.ts +1 -6
- package/dist/compat/zustand/index.js +3 -1
- package/dist/compat/zustand/index.js.map +1 -0
- package/dist/core/index.cjs +21 -1
- package/dist/core/index.cjs.map +1 -0
- package/dist/core/index.d.cts +1 -4
- package/dist/core/index.d.ts +1 -4
- package/dist/core/index.js +3 -1
- package/dist/core/index.js.map +1 -0
- package/dist/extra/browser.cjs +21 -1
- package/dist/extra/browser.cjs.map +1 -0
- package/dist/extra/browser.d.cts +1 -4
- package/dist/extra/browser.d.ts +1 -4
- package/dist/extra/browser.js +3 -1
- package/dist/extra/browser.js.map +1 -0
- package/dist/extra/index.cjs +20 -19
- package/dist/extra/index.cjs.map +1 -0
- package/dist/extra/index.d.cts +1 -17
- package/dist/extra/index.d.ts +1 -17
- package/dist/extra/index.js +3 -1
- package/dist/extra/index.js.map +1 -0
- package/dist/extra/node.cjs +21 -2
- package/dist/extra/node.cjs.map +1 -0
- package/dist/extra/node.d.cts +1 -187
- package/dist/extra/node.d.ts +1 -187
- package/dist/extra/node.js +3 -2
- package/dist/extra/node.js.map +1 -0
- package/dist/extra/operators.cjs +21 -1
- package/dist/extra/operators.cjs.map +1 -0
- package/dist/extra/operators.d.cts +1 -950
- package/dist/extra/operators.d.ts +1 -950
- package/dist/extra/operators.js +3 -1
- package/dist/extra/operators.js.map +1 -0
- package/dist/extra/reactive.cjs +21 -1
- package/dist/extra/reactive.cjs.map +1 -0
- package/dist/extra/reactive.d.cts +1 -353
- package/dist/extra/reactive.d.ts +1 -353
- package/dist/extra/reactive.js +3 -1
- package/dist/extra/reactive.js.map +1 -0
- package/dist/extra/render/index.cjs +21 -5
- package/dist/extra/render/index.cjs.map +1 -0
- package/dist/extra/render/index.d.cts +1 -183
- package/dist/extra/render/index.d.ts +1 -183
- package/dist/extra/render/index.js +3 -1
- package/dist/extra/render/index.js.map +1 -0
- package/dist/extra/sources.cjs +21 -3
- package/dist/extra/sources.cjs.map +1 -0
- package/dist/extra/sources.d.cts +1 -584
- package/dist/extra/sources.d.ts +1 -584
- package/dist/extra/sources.js +3 -1
- package/dist/extra/sources.js.map +1 -0
- package/dist/extra/storage-browser.cjs +21 -1
- package/dist/extra/storage-browser.cjs.map +1 -0
- package/dist/extra/storage-browser.d.cts +1 -37
- package/dist/extra/storage-browser.d.ts +1 -37
- package/dist/extra/storage-browser.js +3 -1
- package/dist/extra/storage-browser.js.map +1 -0
- package/dist/extra/storage-core.cjs +21 -1
- package/dist/extra/storage-core.cjs.map +1 -0
- package/dist/extra/storage-core.d.cts +1 -28
- package/dist/extra/storage-core.d.ts +1 -28
- package/dist/extra/storage-core.js +3 -1
- package/dist/extra/storage-core.js.map +1 -0
- package/dist/extra/storage-node.cjs +20 -0
- package/dist/extra/storage-node.cjs.map +1 -0
- package/dist/extra/storage-node.d.cts +1 -2
- package/dist/extra/storage-node.d.ts +1 -2
- package/dist/extra/storage-node.js +3 -0
- package/dist/extra/storage-node.js.map +1 -0
- package/dist/extra/storage-tiers-browser.cjs +21 -1
- package/dist/extra/storage-tiers-browser.cjs.map +1 -0
- package/dist/extra/storage-tiers-browser.d.cts +1 -120
- package/dist/extra/storage-tiers-browser.d.ts +1 -120
- package/dist/extra/storage-tiers-browser.js +3 -1
- package/dist/extra/storage-tiers-browser.js.map +1 -0
- package/dist/extra/storage-tiers-node.cjs +21 -1
- package/dist/extra/storage-tiers-node.cjs.map +1 -0
- package/dist/extra/storage-tiers-node.d.cts +1 -210
- package/dist/extra/storage-tiers-node.d.ts +1 -210
- package/dist/extra/storage-tiers-node.js +3 -1
- package/dist/extra/storage-tiers-node.js.map +1 -0
- package/dist/extra/storage-tiers.cjs +21 -1
- package/dist/extra/storage-tiers.cjs.map +1 -0
- package/dist/extra/storage-tiers.d.cts +1 -412
- package/dist/extra/storage-tiers.d.ts +1 -412
- package/dist/extra/storage-tiers.js +3 -1
- package/dist/extra/storage-tiers.js.map +1 -0
- package/dist/extra/storage-wal.cjs +21 -0
- package/dist/extra/storage-wal.cjs.map +1 -0
- package/dist/extra/storage-wal.d.cts +1 -0
- package/dist/extra/storage-wal.d.ts +1 -0
- package/dist/extra/storage-wal.js +3 -0
- package/dist/extra/storage-wal.js.map +1 -0
- package/dist/graph/index.cjs +21 -7
- package/dist/graph/index.cjs.map +1 -0
- package/dist/graph/index.d.cts +1 -7
- package/dist/graph/index.d.ts +1 -7
- package/dist/graph/index.js +3 -1
- package/dist/graph/index.js.map +1 -0
- package/dist/index.cjs +20 -227
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +45 -96
- package/dist/index.d.ts +45 -96
- package/dist/index.js +3 -1
- package/dist/index.js.map +1 -0
- package/dist/patterns/ai/browser.cjs +20 -7
- package/dist/patterns/ai/browser.cjs.map +1 -0
- package/dist/patterns/ai/browser.d.cts +1 -127
- package/dist/patterns/ai/browser.d.ts +1 -127
- package/dist/patterns/ai/browser.js +3 -3
- package/dist/patterns/ai/browser.js.map +1 -0
- package/dist/patterns/ai/index.cjs +20 -73
- package/dist/patterns/ai/index.cjs.map +1 -0
- package/dist/patterns/ai/index.d.cts +1 -21
- package/dist/patterns/ai/index.d.ts +1 -21
- package/dist/patterns/ai/index.js +3 -1
- package/dist/patterns/ai/index.js.map +1 -0
- package/dist/patterns/ai/node.cjs +21 -1
- package/dist/patterns/ai/node.cjs.map +1 -0
- package/dist/patterns/ai/node.d.cts +1 -59
- package/dist/patterns/ai/node.d.ts +1 -59
- package/dist/patterns/ai/node.js +3 -1
- package/dist/patterns/ai/node.js.map +1 -0
- package/dist/patterns/cqrs/index.cjs +21 -3
- package/dist/patterns/cqrs/index.cjs.map +1 -0
- package/dist/patterns/cqrs/index.d.cts +1 -8
- package/dist/patterns/cqrs/index.d.ts +1 -8
- package/dist/patterns/cqrs/index.js +3 -1
- package/dist/patterns/cqrs/index.js.map +1 -0
- package/dist/patterns/demo-shell/index.cjs +21 -5
- package/dist/patterns/demo-shell/index.cjs.map +1 -0
- package/dist/patterns/demo-shell/index.d.cts +1 -7
- package/dist/patterns/demo-shell/index.d.ts +1 -7
- package/dist/patterns/demo-shell/index.js +3 -1
- package/dist/patterns/demo-shell/index.js.map +1 -0
- package/dist/patterns/domain-templates/index.cjs +21 -3
- package/dist/patterns/domain-templates/index.cjs.map +1 -0
- package/dist/patterns/domain-templates/index.d.cts +1 -6
- package/dist/patterns/domain-templates/index.d.ts +1 -6
- package/dist/patterns/domain-templates/index.js +3 -1
- package/dist/patterns/domain-templates/index.js.map +1 -0
- package/dist/patterns/graphspec/index.cjs +21 -86
- package/dist/patterns/graphspec/index.cjs.map +1 -0
- package/dist/patterns/graphspec/index.d.cts +1 -8
- package/dist/patterns/graphspec/index.d.ts +1 -8
- package/dist/patterns/graphspec/index.js +3 -1
- package/dist/patterns/graphspec/index.js.map +1 -0
- package/dist/patterns/harness/index.cjs +21 -48
- package/dist/patterns/harness/index.cjs.map +1 -0
- package/dist/patterns/harness/index.d.cts +1 -14
- package/dist/patterns/harness/index.d.ts +1 -14
- package/dist/patterns/harness/index.js +3 -1
- package/dist/patterns/harness/index.js.map +1 -0
- package/dist/patterns/inspect/index.cjs +21 -3
- package/dist/patterns/inspect/index.cjs.map +1 -0
- package/dist/patterns/inspect/index.d.cts +1 -9
- package/dist/patterns/inspect/index.d.ts +1 -9
- package/dist/patterns/inspect/index.js +3 -1
- package/dist/patterns/inspect/index.js.map +1 -0
- package/dist/patterns/job-queue/index.cjs +21 -3
- package/dist/patterns/job-queue/index.cjs.map +1 -0
- package/dist/patterns/job-queue/index.d.cts +1 -9
- package/dist/patterns/job-queue/index.d.ts +1 -9
- package/dist/patterns/job-queue/index.js +3 -1
- package/dist/patterns/job-queue/index.js.map +1 -0
- package/dist/patterns/memory/index.cjs +21 -3
- package/dist/patterns/memory/index.cjs.map +1 -0
- package/dist/patterns/memory/index.d.cts +1 -8
- package/dist/patterns/memory/index.d.ts +1 -8
- package/dist/patterns/memory/index.js +3 -1
- package/dist/patterns/memory/index.js.map +1 -0
- package/dist/patterns/messaging/index.cjs +21 -3
- package/dist/patterns/messaging/index.cjs.map +1 -0
- package/dist/patterns/messaging/index.d.cts +1 -7
- package/dist/patterns/messaging/index.d.ts +1 -7
- package/dist/patterns/messaging/index.js +3 -1
- package/dist/patterns/messaging/index.js.map +1 -0
- package/dist/patterns/orchestration/index.cjs +21 -3
- package/dist/patterns/orchestration/index.cjs.map +1 -0
- package/dist/patterns/orchestration/index.d.cts +1 -9
- package/dist/patterns/orchestration/index.d.ts +1 -9
- package/dist/patterns/orchestration/index.js +3 -1
- package/dist/patterns/orchestration/index.js.map +1 -0
- package/dist/patterns/process/index.cjs +21 -1
- package/dist/patterns/process/index.cjs.map +1 -0
- package/dist/patterns/process/index.d.cts +1 -10
- package/dist/patterns/process/index.d.ts +1 -10
- package/dist/patterns/process/index.js +3 -1
- package/dist/patterns/process/index.js.map +1 -0
- package/dist/patterns/reactive-layout/index.cjs +21 -4
- package/dist/patterns/reactive-layout/index.cjs.map +1 -0
- package/dist/patterns/reactive-layout/index.d.cts +1 -7
- package/dist/patterns/reactive-layout/index.d.ts +1 -7
- package/dist/patterns/reactive-layout/index.js +3 -1
- package/dist/patterns/reactive-layout/index.js.map +1 -0
- package/dist/patterns/reduction/index.cjs +21 -3
- package/dist/patterns/reduction/index.cjs.map +1 -0
- package/dist/patterns/reduction/index.d.cts +1 -6
- package/dist/patterns/reduction/index.d.ts +1 -6
- package/dist/patterns/reduction/index.js +3 -1
- package/dist/patterns/reduction/index.js.map +1 -0
- package/dist/patterns/surface/index.cjs +21 -13
- package/dist/patterns/surface/index.cjs.map +1 -0
- package/dist/patterns/surface/index.d.cts +1 -9
- package/dist/patterns/surface/index.d.ts +1 -9
- package/dist/patterns/surface/index.js +3 -1
- package/dist/patterns/surface/index.js.map +1 -0
- package/dist/patterns/topology-view/index.cjs +21 -0
- package/dist/patterns/topology-view/index.cjs.map +1 -0
- package/dist/patterns/topology-view/index.d.cts +1 -0
- package/dist/patterns/topology-view/index.d.ts +1 -0
- package/dist/patterns/topology-view/index.js +3 -0
- package/dist/patterns/topology-view/index.js.map +1 -0
- package/dist/testing/index.cjs +21 -0
- package/dist/testing/index.cjs.map +1 -0
- package/dist/testing/index.d.cts +1 -0
- package/dist/testing/index.d.ts +1 -0
- package/dist/testing/index.js +3 -0
- package/dist/testing/index.js.map +1 -0
- package/package.json +608 -584
- package/dist/backoff-HPZMEZNF.js +0 -1
- package/dist/cascading-CH-_VwG9.d.cts +0 -199
- package/dist/cascading-OgKQZjsa.d.ts +0 -199
- package/dist/chunk-35JTVPOX.js +0 -1
- package/dist/chunk-3G5U5QNE.js +0 -5
- package/dist/chunk-3XDYJRYU.js +0 -1
- package/dist/chunk-4I45FVQS.js +0 -1
- package/dist/chunk-4VVTGLXJ.js +0 -1
- package/dist/chunk-4YAN45KM.js +0 -1
- package/dist/chunk-5QDBSZBV.js +0 -1
- package/dist/chunk-626TESAC.js +0 -3
- package/dist/chunk-6HOSXQKF.js +0 -1
- package/dist/chunk-6QZNQS5B.js +0 -1
- package/dist/chunk-C72GO4IZ.js +0 -1
- package/dist/chunk-CE72X3WO.js +0 -1
- package/dist/chunk-CK2E7BTU.js +0 -1
- package/dist/chunk-CLD3F4R5.js +0 -1
- package/dist/chunk-CUNIRONA.js +0 -1
- package/dist/chunk-D27JNOLZ.js +0 -1
- package/dist/chunk-D5RFJOZ2.js +0 -1
- package/dist/chunk-EBW4V6JN.js +0 -1
- package/dist/chunk-ESMPEKEV.js +0 -1
- package/dist/chunk-F3IGTWCQ.js +0 -1
- package/dist/chunk-F672GV32.js +0 -1
- package/dist/chunk-FDQGFWLF.js +0 -1
- package/dist/chunk-FG4TKHMC.js +0 -1
- package/dist/chunk-GPW2V3RE.js +0 -1
- package/dist/chunk-I7IGYPSL.js +0 -1
- package/dist/chunk-INQD2KRQ.js +0 -1
- package/dist/chunk-JNWRYDJN.js +0 -1
- package/dist/chunk-JQFH2DV6.js +0 -1
- package/dist/chunk-K2Q24F5T.js +0 -1
- package/dist/chunk-KGKJCHEK.js +0 -1
- package/dist/chunk-KRH66M4O.js +0 -1
- package/dist/chunk-KVV66NN2.js +0 -1
- package/dist/chunk-L6NSJVJZ.js +0 -1
- package/dist/chunk-LYCLF26R.js +0 -1
- package/dist/chunk-NNKJUORL.js +0 -1
- package/dist/chunk-NON4NLIC.js +0 -45
- package/dist/chunk-O2BLLH7M.js +0 -18
- package/dist/chunk-OCKEEPRJ.js +0 -2
- package/dist/chunk-OFZG3TB3.js +0 -9
- package/dist/chunk-OYJKFY7V.js +0 -1
- package/dist/chunk-P6C4WHZO.js +0 -5
- package/dist/chunk-PT7W5FCD.js +0 -5
- package/dist/chunk-Q4U3A3L5.js +0 -1
- package/dist/chunk-QE4IGY7I.js +0 -61
- package/dist/chunk-QYADASLV.js +0 -1
- package/dist/chunk-QYVXF7GW.js +0 -1
- package/dist/chunk-S3EEIPO7.js +0 -1
- package/dist/chunk-SUWT3ZON.js +0 -1
- package/dist/chunk-TPKQW72B.js +0 -1
- package/dist/chunk-TSOYJ743.js +0 -1
- package/dist/chunk-TZQPPQEQ.js +0 -1
- package/dist/chunk-V5A7M7RJ.js +0 -1
- package/dist/chunk-VIMF6LGM.js +0 -1
- package/dist/chunk-VJLMUKOI.js +0 -1
- package/dist/chunk-VN6RDSK2.js +0 -1
- package/dist/chunk-VNC3TMVY.js +0 -1
- package/dist/chunk-VOPGGIL7.js +0 -1
- package/dist/chunk-VQ4A6T2A.js +0 -1
- package/dist/chunk-XG62INFA.js +0 -1
- package/dist/chunk-Y4NI3X7O.js +0 -84
- package/dist/content-addressed-storage-4-ST1tYk.d.cts +0 -124
- package/dist/content-addressed-storage-DuYMjV7o.d.ts +0 -124
- package/dist/decay-2ZukgQ4o.d.cts +0 -112
- package/dist/decay-CdEBmDIs.d.ts +0 -112
- package/dist/fallback-CqYVLL6X.d.ts +0 -250
- package/dist/fallback-Ctlj2tMY.d.cts +0 -250
- package/dist/graph-7VguS7a4.d.ts +0 -1668
- package/dist/graph-C4SHb3Ly.d.cts +0 -1668
- package/dist/index-0rKFCVFp.d.cts +0 -557
- package/dist/index-B-i4_g3k.d.ts +0 -651
- package/dist/index-B5iz82A3.d.cts +0 -2655
- package/dist/index-BAOD98JD.d.cts +0 -754
- package/dist/index-BG0BN3PB.d.ts +0 -44
- package/dist/index-BJX94aud.d.cts +0 -34
- package/dist/index-BP8a88zx.d.ts +0 -385
- package/dist/index-BTQtTb_H.d.cts +0 -301
- package/dist/index-BVpm6noz.d.cts +0 -36
- package/dist/index-Bc41FuHp.d.cts +0 -291
- package/dist/index-BdGtBX-X.d.cts +0 -515
- package/dist/index-Bf7eqeSF.d.ts +0 -113
- package/dist/index-BiX1Nkgx.d.cts +0 -1844
- package/dist/index-BoLv_OfD.d.cts +0 -651
- package/dist/index-BojK2fwH.d.cts +0 -299
- package/dist/index-BsT7F2et.d.ts +0 -291
- package/dist/index-BwLvVVsy.d.cts +0 -189
- package/dist/index-C59mYFKp.d.ts +0 -121
- package/dist/index-C7O6r5fV.d.ts +0 -37
- package/dist/index-C9kSENB4.d.cts +0 -127
- package/dist/index-C9pjcz3l.d.cts +0 -209
- package/dist/index-CAC_rNzm.d.ts +0 -189
- package/dist/index-CCq87F7t.d.ts +0 -127
- package/dist/index-CDXc9zKM.d.cts +0 -26
- package/dist/index-CJK1JkYy.d.ts +0 -36
- package/dist/index-CLon-IWF.d.cts +0 -374
- package/dist/index-COD1kVoS.d.cts +0 -468
- package/dist/index-CPT7C_f1.d.ts +0 -374
- package/dist/index-CQG3D1cp.d.ts +0 -468
- package/dist/index-CZQXo5tH.d.ts +0 -209
- package/dist/index-CZjOhcBy.d.cts +0 -113
- package/dist/index-ChOyVLKm.d.cts +0 -86
- package/dist/index-CvrqGfNS.d.ts +0 -34
- package/dist/index-D-AEQVLo.d.ts +0 -2655
- package/dist/index-D4Y1cMG0.d.ts +0 -26
- package/dist/index-DBHK8O6H.d.ts +0 -301
- package/dist/index-DBevwHj_.d.ts +0 -515
- package/dist/index-DIOoAZUX.d.ts +0 -45
- package/dist/index-DSZ3ZCHF.d.ts +0 -3402
- package/dist/index-Dgs8zcj7.d.ts +0 -102
- package/dist/index-Dh_HJ82K.d.ts +0 -299
- package/dist/index-Dhc7a7Xo.d.cts +0 -102
- package/dist/index-Dmqp7KjD.d.ts +0 -86
- package/dist/index-Dn-wI9g4.d.ts +0 -231
- package/dist/index-Du7u1lSf.d.cts +0 -385
- package/dist/index-DwigL4lY.d.ts +0 -1844
- package/dist/index-DyR7eU5S.d.cts +0 -779
- package/dist/index-JZUPJIJy.d.ts +0 -779
- package/dist/index-K0_0eR8g.d.ts +0 -557
- package/dist/index-O16yXPK4.d.cts +0 -3402
- package/dist/index-O7fucFrU.d.cts +0 -121
- package/dist/index-RV_yDjOX.d.cts +0 -198
- package/dist/index-cm1GNcWE.d.ts +0 -754
- package/dist/index-f5IivDUX.d.cts +0 -37
- package/dist/index-hHcaFlJX.d.cts +0 -45
- package/dist/index-tJoTcnHh.d.cts +0 -231
- package/dist/index-wAzD9yVj.d.ts +0 -198
- package/dist/index-z96luz5O.d.cts +0 -44
- package/dist/meta-BgVAsg9j.d.ts +0 -102
- package/dist/meta-vE8bxW1E.d.cts +0 -102
- package/dist/node-ClS5yC-B.d.cts +0 -1347
- package/dist/node-ClS5yC-B.d.ts +0 -1347
- package/dist/observable-BsBzUrcI.d.ts +0 -36
- package/dist/observable-DLGPPtb8.d.cts +0 -36
- package/dist/pipeline-graph-DPqKDk59.d.cts +0 -137
- package/dist/pipeline-graph-loP57TBA.d.ts +0 -137
- package/dist/reactive-layout-Dsvob4zD.d.cts +0 -183
- package/dist/reactive-layout-v7KPvxoc.d.ts +0 -183
- package/dist/reactive-log-B00laMSQ.d.cts +0 -223
- package/dist/reactive-log-BezYsbA_.d.ts +0 -223
- package/dist/reactive-map-48mnZ-nu.d.cts +0 -296
- package/dist/reactive-map-BVVPdvmi.d.ts +0 -296
- package/dist/resilience-YIWPK4YC.js +0 -1
- package/dist/sugar-DLwvMr3F.d.ts +0 -223
- package/dist/sugar-DyVGtczU.d.cts +0 -223
- package/dist/topology-tree-BNGvuG82.d.ts +0 -25
- package/dist/topology-tree-BSdfSwMi.d.cts +0 -25
- package/dist/types-B1jDWVsM.d.cts +0 -442
- package/dist/types-DkzUUs0H.d.ts +0 -442
package/dist/index-CQG3D1cp.d.ts
DELETED
|
@@ -1,468 +0,0 @@
|
|
|
1
|
-
import { N as Node } from './node-ClS5yC-B.js';
|
|
2
|
-
import { B as BaseAuditRecord } from './index-CZQXo5tH.js';
|
|
3
|
-
import { a as ReactiveLogBundle } from './reactive-log-BezYsbA_.js';
|
|
4
|
-
import { AppendLogStorageTier } from './extra/storage-tiers.js';
|
|
5
|
-
import { a as GraphOptions, G as Graph } from './graph-7VguS7a4.js';
|
|
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
|
-
/** Action result. Tier 1.6.2 canonical enum (renamed from `status`). */
|
|
68
|
-
readonly outcome: "success" | "failure";
|
|
69
|
-
readonly error?: unknown;
|
|
70
|
-
readonly errorType?: string;
|
|
71
|
-
/**
|
|
72
|
-
* Event names emitted by the handler.
|
|
73
|
-
* - `outcome: "success"`: events that persisted in the event log.
|
|
74
|
-
* - `outcome: "failure"`: events the handler ATTEMPTED to emit before throwing;
|
|
75
|
-
* they were rolled back and did NOT persist. Documents the failed attempt's
|
|
76
|
-
* intentions for debugging handler logic. The actual event log shows only
|
|
77
|
-
* what's durable.
|
|
78
|
-
*/
|
|
79
|
-
readonly emittedEvents?: readonly string[];
|
|
80
|
-
}
|
|
81
|
-
declare const dispatchKeyOf: <T>(r: DispatchRecord<T>) => string;
|
|
82
|
-
interface SagaInvocation<T = unknown> extends BaseAuditRecord {
|
|
83
|
-
readonly eventType: string;
|
|
84
|
-
/** Action result. Tier 1.6.2 canonical enum (renamed from `status`). */
|
|
85
|
-
readonly outcome: "success" | "failure";
|
|
86
|
-
readonly error?: unknown;
|
|
87
|
-
readonly errorType?: string;
|
|
88
|
-
readonly aggregateId?: string;
|
|
89
|
-
readonly event?: CqrsEvent<T>;
|
|
90
|
-
}
|
|
91
|
-
declare const sagaInvocationKeyOf: <T>(i: SagaInvocation<T>) => string;
|
|
92
|
-
/**
|
|
93
|
-
* Saga registration result (M10) — a typed bundle replacing the prior
|
|
94
|
-
* `Node<unknown>` return that side-attached `_saga` via an unsafe cast.
|
|
95
|
-
*
|
|
96
|
-
* `node` is the saga's effect node (subscribe to observe processing
|
|
97
|
-
* activity). `invocations` is the per-event-type audit log; `audit` aliases
|
|
98
|
-
* `invocations` (Audit 2 `.audit` duplication). `cursors` exposes the
|
|
99
|
-
* per-event-type cursor state nodes for monitoring / testing.
|
|
100
|
-
*
|
|
101
|
-
* @category patterns
|
|
102
|
-
*/
|
|
103
|
-
interface SagaController<T = unknown> {
|
|
104
|
-
readonly node: Node<unknown>;
|
|
105
|
-
readonly invocations: ReactiveLogBundle<SagaInvocation<T>>;
|
|
106
|
-
readonly audit: ReactiveLogBundle<SagaInvocation<T>>;
|
|
107
|
-
readonly cursors: {
|
|
108
|
-
readonly [eventName: string]: Node<number>;
|
|
109
|
-
};
|
|
110
|
-
}
|
|
111
|
-
type CommandActions = {
|
|
112
|
-
/** Append an event to a named event log (bypasses event guard). */
|
|
113
|
-
emit: (eventName: string, payload: unknown) => void;
|
|
114
|
-
};
|
|
115
|
-
/**
|
|
116
|
-
* Command handler receives the dispatch payload and actions to emit events.
|
|
117
|
-
*
|
|
118
|
-
* **Purity:** Handlers should not mutate the payload. Event emission via
|
|
119
|
-
* `actions.emit()` is the only sanctioned side effect.
|
|
120
|
-
*/
|
|
121
|
-
type CommandHandler<T = unknown> = (payload: T, actions: CommandActions) => void;
|
|
122
|
-
/**
|
|
123
|
-
* Projection reducer folds events into a read model.
|
|
124
|
-
*
|
|
125
|
-
* **Purity contract:** Reducers MUST be pure — return a new state value
|
|
126
|
-
* without mutating `state` or any event.
|
|
127
|
-
*
|
|
128
|
-
* - In **`"replay"`** mode the `state` parameter is always the original
|
|
129
|
-
* `initial` value (full event-sourcing replay on every recompute).
|
|
130
|
-
* - In **`"scan"`** mode the `state` parameter is the _previous_ output
|
|
131
|
-
* (incremental fold); `events` contains only the events appended since
|
|
132
|
-
* the last computation.
|
|
133
|
-
*/
|
|
134
|
-
type ProjectionReducer<TState = unknown, TEvent = unknown> = (state: TState, events: readonly CqrsEvent<TEvent>[]) => TState;
|
|
135
|
-
/**
|
|
136
|
-
* Snapshot integration for {@link ProjectionOptions}.
|
|
137
|
-
*
|
|
138
|
-
* `load` is called once at projection construction and the returned value
|
|
139
|
-
* seeds the initial state. `save` (optional) is called after each reducer
|
|
140
|
-
* run, debounced by `saveDebounceMs` (default 1000 ms) and capped by
|
|
141
|
-
* `saveEvery` (default 1000 events).
|
|
142
|
-
*/
|
|
143
|
-
type ProjectionSnapshotOpts<TState> = {
|
|
144
|
-
/** Load a previously-saved state. `undefined` → start from `initial`. */
|
|
145
|
-
load: () => TState | undefined | Promise<TState | undefined>;
|
|
146
|
-
/** Persist the current state. Called after reducer; may be async. */
|
|
147
|
-
save?: (state: TState) => void | Promise<void>;
|
|
148
|
-
/**
|
|
149
|
-
* Debounce window (ms) before `save` fires after the last event. Default 1000.
|
|
150
|
-
*/
|
|
151
|
-
saveDebounceMs?: number;
|
|
152
|
-
/**
|
|
153
|
-
* Force a save after every Nth state change regardless of debounce.
|
|
154
|
-
* Default 1000. Both knobs compose: save fires at whichever condition is
|
|
155
|
-
* met first.
|
|
156
|
-
*/
|
|
157
|
-
saveEvery?: number;
|
|
158
|
-
};
|
|
159
|
-
/**
|
|
160
|
-
* Options for {@link CqrsGraph.projection}.
|
|
161
|
-
*
|
|
162
|
-
* **Wave C.3 Unit 21 (locked 2026-04-24):**
|
|
163
|
-
* - `mode: "scan"` (default) — incremental fold; `"replay"` — full replay
|
|
164
|
-
* each wave.
|
|
165
|
-
* - `snapshot` — load/save integration for cold-start + auto-checkpoint.
|
|
166
|
-
* - `freezeInputs` (default `true`) — freeze event arrays before passing
|
|
167
|
-
* to reducer (purity enforcement).
|
|
168
|
-
* - `rebuild()` / `reset()` on the returned {@link ProjectionController}.
|
|
169
|
-
*
|
|
170
|
-
* @category patterns
|
|
171
|
-
*/
|
|
172
|
-
type ProjectionOptions<TState> = {
|
|
173
|
-
name: string;
|
|
174
|
-
events: readonly string[];
|
|
175
|
-
reducer: ProjectionReducer<TState>;
|
|
176
|
-
initial: TState;
|
|
177
|
-
/**
|
|
178
|
-
* Fold strategy. Default `"scan"` (incremental). `"replay"` = full replay.
|
|
179
|
-
*
|
|
180
|
-
* **Scan-mode ordering caveat:** scan-mode assumes monotonic per-stream
|
|
181
|
-
* arrival order. When multiple event streams are merged for a projection,
|
|
182
|
-
* events arriving with a `timestampNs` earlier than the current sort cursor
|
|
183
|
-
* are skipped from the incremental sweep. This is an acceptable trade-off
|
|
184
|
-
* for incremental fold; use `mode: "replay"` for strict cross-stream
|
|
185
|
-
* ordering.
|
|
186
|
-
*/
|
|
187
|
-
mode?: "replay" | "scan";
|
|
188
|
-
/** Snapshot integration for rebuild + auto-checkpoint. */
|
|
189
|
-
snapshot?: ProjectionSnapshotOpts<TState>;
|
|
190
|
-
/**
|
|
191
|
-
* Freeze event arrays before passing to reducer (default `true`).
|
|
192
|
-
* Set to `false` only if your reducer intentionally mutates the input
|
|
193
|
-
* (strongly discouraged — prefer immutable reducers).
|
|
194
|
-
*/
|
|
195
|
-
freezeInputs?: boolean;
|
|
196
|
-
};
|
|
197
|
-
/**
|
|
198
|
-
* Controller returned by {@link CqrsGraph.projection}.
|
|
199
|
-
*
|
|
200
|
-
* `node` is the reactive read model. `rebuild()` performs a paginated
|
|
201
|
-
* cold-storage replay (requires `attachEventStorage` tiers). `reset()`
|
|
202
|
-
* reloads from `snapshot.load()` and re-folds the live event log on top.
|
|
203
|
-
*
|
|
204
|
-
* @category patterns
|
|
205
|
-
*/
|
|
206
|
-
interface ProjectionController<TState> {
|
|
207
|
-
readonly node: Node<TState>;
|
|
208
|
-
/**
|
|
209
|
-
* Async paginated rebuild from attached storage tiers. Throws
|
|
210
|
-
* {@link RebuildError} on adapter / decode / reducer failure.
|
|
211
|
-
*
|
|
212
|
-
* @param opts.fromTier - Storage tier to read from (default: first attached).
|
|
213
|
-
* @param opts.pageSize - Entries per page (default 1000).
|
|
214
|
-
*/
|
|
215
|
-
rebuild(opts?: {
|
|
216
|
-
fromTier?: AppendLogStorageTier<CqrsEvent>;
|
|
217
|
-
pageSize?: number;
|
|
218
|
-
}): Promise<TState>;
|
|
219
|
-
/**
|
|
220
|
-
* Reload from `snapshot.load()` (if configured) and re-fold the live
|
|
221
|
-
* in-memory event log on top. Returns the rebuilt state. No-op on the
|
|
222
|
-
* reactive node if the state is unchanged.
|
|
223
|
-
*/
|
|
224
|
-
reset(): Promise<TState>;
|
|
225
|
-
}
|
|
226
|
-
type SagaHandler<T = unknown> = (event: CqrsEvent<T>) => void;
|
|
227
|
-
type CqrsOptions = {
|
|
228
|
-
graph?: GraphOptions;
|
|
229
|
-
/** Bounded retention for event streams; default 1024 (cross-cutting). */
|
|
230
|
-
retainedLimit?: number;
|
|
231
|
-
/** Freeze command payloads on dispatch (default `true`). */
|
|
232
|
-
freezeCommandPayload?: boolean;
|
|
233
|
-
/** Freeze event payloads on emit (default `true`). */
|
|
234
|
-
freezeEventPayload?: boolean;
|
|
235
|
-
/** LRU eviction threshold for per-aggregate streams (default 10_000). */
|
|
236
|
-
maxAggregates?: number;
|
|
237
|
-
};
|
|
238
|
-
type CommandRegistration<TPayload = unknown> = {
|
|
239
|
-
handler: CommandHandler<TPayload>;
|
|
240
|
-
emits?: readonly string[];
|
|
241
|
-
handlerVersion?: {
|
|
242
|
-
id: string;
|
|
243
|
-
version: string | number;
|
|
244
|
-
};
|
|
245
|
-
};
|
|
246
|
-
type DispatchOptions = {
|
|
247
|
-
correlationId?: string;
|
|
248
|
-
causationId?: string;
|
|
249
|
-
metadata?: Record<string, unknown>;
|
|
250
|
-
/**
|
|
251
|
-
* Optimistic-concurrency check: if set, dispatch verifies the aggregate
|
|
252
|
-
* (identified by `aggregateId`) is at this version. On mismatch, dispatch
|
|
253
|
-
* throws {@link OptimisticConcurrencyError} BEFORE the handler runs.
|
|
254
|
-
*
|
|
255
|
-
* Requires `aggregateId` to be set. Without it the check is a no-op.
|
|
256
|
-
*/
|
|
257
|
-
expectedAggregateVersion?: number;
|
|
258
|
-
/**
|
|
259
|
-
* Aggregate this dispatch targets. Events emitted by the handler that
|
|
260
|
-
* also carry this `aggregateId` participate in per-aggregate versioning
|
|
261
|
-
* and LRU eviction (see {@link CqrsOptions.maxAggregates}). Events whose
|
|
262
|
-
* handler-supplied `aggregateId` differs from the dispatch's `aggregateId`
|
|
263
|
-
* are emitted untouched (their own `aggregateVersion` is computed from
|
|
264
|
-
* their own aggregate's stream).
|
|
265
|
-
*/
|
|
266
|
-
aggregateId?: string;
|
|
267
|
-
};
|
|
268
|
-
type SagaOptions = {
|
|
269
|
-
aggregateId?: string;
|
|
270
|
-
errorPolicy?: "advance" | "hold";
|
|
271
|
-
handlerVersion?: {
|
|
272
|
-
id: string;
|
|
273
|
-
version: string | number;
|
|
274
|
-
};
|
|
275
|
-
};
|
|
276
|
-
/**
|
|
277
|
-
* Eviction record emitted on `aggregateEvictions` when an aggregate's
|
|
278
|
-
* per-aggregate stream is removed under `maxAggregates` LRU pressure. The
|
|
279
|
-
* eviction does NOT delete events from the fan-in stream — only the
|
|
280
|
-
* per-aggregate dedicated stream and its version counter.
|
|
281
|
-
*/
|
|
282
|
-
interface AggregateEvictionRecord {
|
|
283
|
-
readonly aggregateId: string;
|
|
284
|
-
readonly type: string;
|
|
285
|
-
readonly t_ns: number;
|
|
286
|
-
/** The version count the aggregate reached before eviction (for diagnostics). */
|
|
287
|
-
readonly lastVersion: number;
|
|
288
|
-
}
|
|
289
|
-
declare class CqrsGraph<EM extends CqrsEventMap = Record<string, unknown>> extends Graph {
|
|
290
|
-
/** Fan-in event streams (one per type, all aggregates merged). */
|
|
291
|
-
private readonly _eventLogs;
|
|
292
|
-
/**
|
|
293
|
-
* Per-aggregate event streams: type → aggregateId → entry. Used for
|
|
294
|
-
* `event(type, aggregateId)` dual-form access and per-aggregate version
|
|
295
|
-
* tracking. Only populated when an event with `aggregateId` is emitted.
|
|
296
|
-
*/
|
|
297
|
-
private readonly _eventLogsByAggregate;
|
|
298
|
-
/** Per-aggregate version counters: `${type}::${aggregateId}` → current version. */
|
|
299
|
-
private readonly _aggregateVersions;
|
|
300
|
-
/**
|
|
301
|
-
* LRU access order for `${type}::${aggregateId}`. Map insertion order
|
|
302
|
-
* tracks recency — `delete` + `set` on access moves to the end.
|
|
303
|
-
*/
|
|
304
|
-
private readonly _aggregateLru;
|
|
305
|
-
private readonly _commandRegs;
|
|
306
|
-
private readonly _projections;
|
|
307
|
-
private readonly _sagas;
|
|
308
|
-
private readonly _keepaliveDisposers;
|
|
309
|
-
private _seq;
|
|
310
|
-
private readonly _retainedLimit;
|
|
311
|
-
private readonly _freezeCommandPayload;
|
|
312
|
-
private readonly _freezeEventPayload;
|
|
313
|
-
private readonly _maxAggregates;
|
|
314
|
-
private readonly _dispatchSeqCursor;
|
|
315
|
-
/** Audit log of every command dispatch (Audit 2). */
|
|
316
|
-
readonly dispatches: ReactiveLogBundle<DispatchRecord>;
|
|
317
|
-
/** Alias for {@link CqrsGraph.dispatches} (Audit 2 `.audit` duplication). */
|
|
318
|
-
readonly audit: ReactiveLogBundle<DispatchRecord>;
|
|
319
|
-
/** Per-aggregate LRU eviction observability; secondary log to `dispatches`. */
|
|
320
|
-
readonly aggregateEvictions: ReactiveLogBundle<AggregateEvictionRecord>;
|
|
321
|
-
constructor(name: string, opts?: CqrsOptions);
|
|
322
|
-
/**
|
|
323
|
-
* Read the current per-aggregate version (last emitted `aggregateVersion`
|
|
324
|
-
* for that `(type, aggregateId)` pair). Returns `0` if no events have been
|
|
325
|
-
* emitted yet for this aggregate. Useful for callers preparing
|
|
326
|
-
* {@link DispatchOptions.expectedAggregateVersion}.
|
|
327
|
-
*/
|
|
328
|
-
aggregateVersion(type: string, aggregateId: string): number;
|
|
329
|
-
/** LRU touch — moves the key to the end of the access order. */
|
|
330
|
-
private _touchAggregate;
|
|
331
|
-
/**
|
|
332
|
-
* Evict the oldest aggregate streams (least-recently-touched) until the
|
|
333
|
-
* aggregate count is back within `_maxAggregates`. Emits one
|
|
334
|
-
* `AggregateEvictionRecord` per eviction. The fan-in stream is NOT touched
|
|
335
|
-
* — events stay in the type-level log; only the per-aggregate stream and
|
|
336
|
-
* version counter are removed.
|
|
337
|
-
*/
|
|
338
|
-
private _enforceAggregateLru;
|
|
339
|
-
destroy(): void;
|
|
340
|
-
/** Tiers attached via {@link attachEventStorage}; auto-wired into future event streams. */
|
|
341
|
-
private readonly _attachedEventTiers;
|
|
342
|
-
private readonly _attachedTierDisposers;
|
|
343
|
-
/**
|
|
344
|
-
* Wire append-log storage tiers for ALL CQRS event streams — both currently
|
|
345
|
-
* registered AND any future streams created via `event(name)` /
|
|
346
|
-
* `event(name, aggregateId)` / handler emit. (M4 fix.)
|
|
347
|
-
*
|
|
348
|
-
* Returns a disposer that releases all storage subscriptions wired by this
|
|
349
|
-
* call (including those for streams that were created after the call).
|
|
350
|
-
*/
|
|
351
|
-
attachEventStorage(tiers: readonly AppendLogStorageTier<CqrsEvent>[]): () => void;
|
|
352
|
-
/** Wire newly-created event stream into all currently-attached tier sets. */
|
|
353
|
-
private _autoWireStreamStorage;
|
|
354
|
-
/**
|
|
355
|
-
* Register a named event stream backed by `reactiveLog`.
|
|
356
|
-
* Guard denies external `write` — only commands append internally.
|
|
357
|
-
*/
|
|
358
|
-
event(name: string): Node<readonly CqrsEvent[]>;
|
|
359
|
-
event(name: string, aggregateId: string): Node<readonly CqrsEvent[]>;
|
|
360
|
-
/**
|
|
361
|
-
* Get-or-create the per-aggregate event stream for `(type, aggregateId)`.
|
|
362
|
-
* Mounts the stream as a sibling node named `<type>_<aggregateId>` so it
|
|
363
|
-
* appears in `describe()`. LRU access is touched on every call.
|
|
364
|
-
*/
|
|
365
|
-
private _ensureAggregateStream;
|
|
366
|
-
/** Try `resolve(path)`; return `undefined` instead of throwing on missing. */
|
|
367
|
-
private resolveOptional;
|
|
368
|
-
/** Internal: append to an event log, auto-registering if needed. */
|
|
369
|
-
private _appendEvent;
|
|
370
|
-
/**
|
|
371
|
-
* Register a command with its handler. Guard denies `observe` (write-only).
|
|
372
|
-
* Use `dispatch(name, payload)` to execute.
|
|
373
|
-
*
|
|
374
|
-
* The command node carries dynamic `meta.error` — a reactive companion
|
|
375
|
-
* that holds the last handler error (or `null` on success).
|
|
376
|
-
*/
|
|
377
|
-
command<T = unknown>(name: string, handlerOrReg: CommandHandler<T> | CommandRegistration<T>): Node<T>;
|
|
378
|
-
/**
|
|
379
|
-
* Execute a registered command. Wraps the entire dispatch in `batch()` so
|
|
380
|
-
* the command node DATA and all emitted events settle atomically.
|
|
381
|
-
*
|
|
382
|
-
* If the handler throws, `meta.error` on the command node is set to the
|
|
383
|
-
* error and the exception is re-thrown.
|
|
384
|
-
*
|
|
385
|
-
* **Tier 8 / COMPOSITION-GUIDE §35:** dispatch routes through the shared
|
|
386
|
-
* {@link wrapMutation} framework so freeze / rollback-on-throw / seq-cursor
|
|
387
|
-
* advance / audit-record stamping flow through one centralized helper.
|
|
388
|
-
* Failure records emit OUTSIDE the rolled-back batch (M5 / C4 invariants
|
|
389
|
-
* preserved by the framework).
|
|
390
|
-
*/
|
|
391
|
-
dispatch<T = unknown>(commandName: string, payload: T, opts?: DispatchOptions): void;
|
|
392
|
-
/**
|
|
393
|
-
* Register a read-only projection derived from event streams.
|
|
394
|
-
* Guard denies `write` — value is computed from events only.
|
|
395
|
-
*
|
|
396
|
-
* **Wave C.3 Unit 21 (locked 2026-04-24):**
|
|
397
|
-
* - Object-bag signature replaces the positional `(name, events, reducer, initial)` form.
|
|
398
|
-
* - `mode: "scan"` (default) — incremental fold; `"replay"` — full replay each wave.
|
|
399
|
-
* - `snapshot` integration for cold-start load + auto-checkpoint save.
|
|
400
|
-
* - `freezeInputs` (default `true`) — freeze the event array before passing to reducer.
|
|
401
|
-
* - Returns `ProjectionController<TState>` with `.node`, `.rebuild()`, `.reset()`.
|
|
402
|
-
*
|
|
403
|
-
* Fan-in across `events` is implemented by depending on all event-type fan-in
|
|
404
|
-
* nodes directly, which preserves `describe()` edges (e.g. `orderPlaced →
|
|
405
|
-
* orderCount`). Events are sorted by `(timestampNs, seq, aggregateId)` before
|
|
406
|
-
* passing to the reducer (Option-3 cross-aggregate ordering, C.3).
|
|
407
|
-
*/
|
|
408
|
-
projection<TState>(opts: ProjectionOptions<TState>): ProjectionController<TState>;
|
|
409
|
-
/**
|
|
410
|
-
* Register an event-driven side effect. Runs handler for each **new** event
|
|
411
|
-
* from the specified streams (tracks last-processed entry count per stream).
|
|
412
|
-
*
|
|
413
|
-
* The saga node carries dynamic `meta.error` — a reactive companion that
|
|
414
|
-
* holds the last handler error (or `null` on success). Handler errors do
|
|
415
|
-
* not propagate out of the saga run (the event cursor still advances so
|
|
416
|
-
* the same entry is not delivered twice).
|
|
417
|
-
*/
|
|
418
|
-
saga<T = unknown>(name: string, eventNames: readonly string[], handler: SagaHandler<T>, opts?: SagaOptions): SagaController<T>;
|
|
419
|
-
}
|
|
420
|
-
/**
|
|
421
|
-
* Create a CQRS graph container.
|
|
422
|
-
*
|
|
423
|
-
* @example
|
|
424
|
-
* ```ts
|
|
425
|
-
* const app = cqrs("orders");
|
|
426
|
-
* app.event("orderPlaced");
|
|
427
|
-
* app.command("placeOrder", (payload, { emit }) => {
|
|
428
|
-
* emit("orderPlaced", { orderId: payload.id, amount: payload.amount });
|
|
429
|
-
* });
|
|
430
|
-
* const { node: orderCount } = app.projection({
|
|
431
|
-
* name: "orderCount",
|
|
432
|
-
* events: ["orderPlaced"],
|
|
433
|
-
* reducer: (_s, events) => events.length,
|
|
434
|
-
* initial: 0,
|
|
435
|
-
* });
|
|
436
|
-
* app.dispatch("placeOrder", { id: "1", amount: 100 });
|
|
437
|
-
* ```
|
|
438
|
-
*/
|
|
439
|
-
declare function cqrs<EM extends CqrsEventMap = Record<string, unknown>>(name: string, opts?: CqrsOptions): CqrsGraph<EM>;
|
|
440
|
-
|
|
441
|
-
type index_AggregateEvictionRecord = AggregateEvictionRecord;
|
|
442
|
-
type index_CommandActions = CommandActions;
|
|
443
|
-
type index_CommandHandler<T = unknown> = CommandHandler<T>;
|
|
444
|
-
type index_CommandRegistration<TPayload = unknown> = CommandRegistration<TPayload>;
|
|
445
|
-
type index_CqrsEvent<T = unknown> = CqrsEvent<T>;
|
|
446
|
-
type index_CqrsEventMap = CqrsEventMap;
|
|
447
|
-
type index_CqrsGraph<EM extends CqrsEventMap = Record<string, unknown>> = CqrsGraph<EM>;
|
|
448
|
-
declare const index_CqrsGraph: typeof CqrsGraph;
|
|
449
|
-
type index_CqrsOptions = CqrsOptions;
|
|
450
|
-
type index_DispatchOptions = DispatchOptions;
|
|
451
|
-
type index_DispatchRecord<T = unknown> = DispatchRecord<T>;
|
|
452
|
-
type index_ProjectionController<TState> = ProjectionController<TState>;
|
|
453
|
-
type index_ProjectionOptions<TState> = ProjectionOptions<TState>;
|
|
454
|
-
type index_ProjectionReducer<TState = unknown, TEvent = unknown> = ProjectionReducer<TState, TEvent>;
|
|
455
|
-
type index_ProjectionSnapshotOpts<TState> = ProjectionSnapshotOpts<TState>;
|
|
456
|
-
type index_SagaController<T = unknown> = SagaController<T>;
|
|
457
|
-
type index_SagaHandler<T = unknown> = SagaHandler<T>;
|
|
458
|
-
type index_SagaInvocation<T = unknown> = SagaInvocation<T>;
|
|
459
|
-
type index_SagaOptions = SagaOptions;
|
|
460
|
-
declare const index_cqrs: typeof cqrs;
|
|
461
|
-
declare const index_cqrsEventKeyOf: typeof cqrsEventKeyOf;
|
|
462
|
-
declare const index_dispatchKeyOf: typeof dispatchKeyOf;
|
|
463
|
-
declare const index_sagaInvocationKeyOf: typeof sagaInvocationKeyOf;
|
|
464
|
-
declare namespace index {
|
|
465
|
-
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 };
|
|
466
|
-
}
|
|
467
|
-
|
|
468
|
-
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 };
|
package/dist/index-CZQXo5tH.d.ts
DELETED
|
@@ -1,209 +0,0 @@
|
|
|
1
|
-
import { b as NodeGuard, N as Node } from './node-ClS5yC-B.js';
|
|
2
|
-
import { G as Graph } from './graph-7VguS7a4.js';
|
|
3
|
-
import { R as ReactiveLogOptions, a as ReactiveLogBundle } from './reactive-log-BezYsbA_.js';
|
|
4
|
-
|
|
5
|
-
/**
|
|
6
|
-
* Audited-mutation framework (Audit 2 — locked 2026-04-24; promoted to
|
|
7
|
-
* `extra/mutation/` per consolidation plan §1, Tier 2.2).
|
|
8
|
-
*
|
|
9
|
-
* Phase-4 primitives share the same shape: imperative mutation methods +
|
|
10
|
-
* closure state + reactive audit log + freeze-at-entry + rollback-on-throw.
|
|
11
|
-
* This module factors out the common machinery so each primitive becomes
|
|
12
|
-
* declarative wiring over typed audit records:
|
|
13
|
-
* - `approvalGate`, `pipeline.approvalGate` (Wave A.2 Unit 8)
|
|
14
|
-
* - `JobQueueGraph` (Wave B.3 Unit 15)
|
|
15
|
-
* - `CqrsGraph.dispatch` (Wave C.2 Unit 20)
|
|
16
|
-
* - `CqrsGraph.saga` (Wave C.3 Unit 22)
|
|
17
|
-
* - `processManager` (Wave 7)
|
|
18
|
-
*/
|
|
19
|
-
|
|
20
|
-
/**
|
|
21
|
-
* Bounded increment for a self-owned counter state node.
|
|
22
|
-
*
|
|
23
|
-
* Reads `counter.cache`, bumps by 1 if under `cap`, writes back. Returns
|
|
24
|
-
* `false` when the cap is reached. Documented P3 exception: the counter is
|
|
25
|
-
* not a declared dep of the caller — it's a private budget read+written from
|
|
26
|
-
* a single call site. This helper keeps the `.cache` access in one named
|
|
27
|
-
* place.
|
|
28
|
-
*
|
|
29
|
-
* **Safety today:**
|
|
30
|
-
* 1. Single-threaded JS runner never invokes the caller concurrently.
|
|
31
|
-
* 2. `counter.down` writes the cache synchronously before returning, so
|
|
32
|
-
* synchronous re-entry through a downstream publish reads the
|
|
33
|
-
* freshly-incremented value — no double-count.
|
|
34
|
-
*
|
|
35
|
-
* **Future risk:** under a free-threaded runner (PY no-GIL or hypothetical
|
|
36
|
-
* concurrent TS runner), two concurrent firings could still race. Revisit
|
|
37
|
-
* when that surfaces.
|
|
38
|
-
*/
|
|
39
|
-
declare function tryIncrementBounded(counter: Node<number>, cap: number): boolean;
|
|
40
|
-
/** Shared base shape for every audit record. Per-primitive types extend this. */
|
|
41
|
-
interface BaseAuditRecord {
|
|
42
|
-
readonly t_ns: number;
|
|
43
|
-
readonly seq?: number;
|
|
44
|
-
readonly handlerVersion?: {
|
|
45
|
-
id: string;
|
|
46
|
-
version: string | number;
|
|
47
|
-
};
|
|
48
|
-
}
|
|
49
|
-
/**
|
|
50
|
-
* Allow `observe` and `signal`; deny external `write` on the audit log so
|
|
51
|
-
* consumers can subscribe + signal-bridge but cannot inject fake records.
|
|
52
|
-
*/
|
|
53
|
-
declare const DEFAULT_AUDIT_GUARD: NodeGuard;
|
|
54
|
-
type AuditLogOpts<R extends BaseAuditRecord> = {
|
|
55
|
-
name: string;
|
|
56
|
-
/** Bounded retention; default 1024 per Audit 2 / cross-cutting bounded-default policy. */
|
|
57
|
-
retainedLimit?: number;
|
|
58
|
-
/** Override the default audit guard. */
|
|
59
|
-
guard?: NodeGuard;
|
|
60
|
-
/** Mount the audit `entries` Node under this graph (and activate withLatest). */
|
|
61
|
-
graph?: Graph;
|
|
62
|
-
/** Pass-through to {@link reactiveLog}. */
|
|
63
|
-
versioning?: ReactiveLogOptions<R>["versioning"];
|
|
64
|
-
};
|
|
65
|
-
/**
|
|
66
|
-
* Build a reactive audit log with sane defaults: bounded retention, deny-write
|
|
67
|
-
* guard, `withLatest()` companions activated. Returns the {@link ReactiveLogBundle}
|
|
68
|
-
* directly — primitives expose this as `<primitive>.events` / `.decisions` /
|
|
69
|
-
* `.dispatches` / `.invocations` and alias it as `.audit`.
|
|
70
|
-
*
|
|
71
|
-
* @category internal
|
|
72
|
-
*/
|
|
73
|
-
declare function createAuditLog<R extends BaseAuditRecord>(opts: AuditLogOpts<R>): ReactiveLogBundle<R>;
|
|
74
|
-
type FailureMeta = {
|
|
75
|
-
t_ns: number;
|
|
76
|
-
seq?: number;
|
|
77
|
-
errorType: string;
|
|
78
|
-
};
|
|
79
|
-
type SuccessMeta = {
|
|
80
|
-
t_ns: number;
|
|
81
|
-
seq?: number;
|
|
82
|
-
};
|
|
83
|
-
/** Common opts shared by both tiers. */
|
|
84
|
-
type MutationOpts<TArgs extends readonly unknown[], TResult, R extends BaseAuditRecord> = {
|
|
85
|
-
/**
|
|
86
|
-
* Optional audit log. When omitted, the wrapper still provides freeze /
|
|
87
|
-
* seq-advance / rollback-on-throw (`wrapMutation`) but skips audit-record
|
|
88
|
-
* emission entirely — useful for primitives that want centralized mutation
|
|
89
|
-
* semantics without a dedicated audit log surface (e.g. `Topic.publish`).
|
|
90
|
-
* Pair with `onSuccess` / `onFailure` to emit records.
|
|
91
|
-
*/
|
|
92
|
-
audit?: ReactiveLogBundle<R>;
|
|
93
|
-
/** Build the success record from the action's args + result + meta. */
|
|
94
|
-
onSuccess?: (args: TArgs, result: TResult, meta: SuccessMeta) => R | undefined;
|
|
95
|
-
/** Build the failure record from the args + error + meta. */
|
|
96
|
-
onFailure?: (args: TArgs, error: unknown, meta: FailureMeta) => R | undefined;
|
|
97
|
-
/** Freeze inputs at entry (default `true`). Pass `false` for hot paths. */
|
|
98
|
-
freeze?: boolean;
|
|
99
|
-
/** Optional sequence cursor — auto-advanced and stamped onto records. */
|
|
100
|
-
seq?: Node<number>;
|
|
101
|
-
/** Optional handler version — stamped into the record (Audit 5). */
|
|
102
|
-
handlerVersion?: {
|
|
103
|
-
id: string;
|
|
104
|
-
version: string | number;
|
|
105
|
-
};
|
|
106
|
-
};
|
|
107
|
-
type WrapMutationOpts<TArgs extends readonly unknown[], TResult, R extends BaseAuditRecord> = MutationOpts<TArgs, TResult, R>;
|
|
108
|
-
type LightMutationOpts<TArgs extends readonly unknown[], TResult, R extends BaseAuditRecord> = MutationOpts<TArgs, TResult, R>;
|
|
109
|
-
declare function bumpCursor(seq: Node<number>): number;
|
|
110
|
-
/**
|
|
111
|
-
* Build a record via the supplied builder, stamp `handlerVersion` if present,
|
|
112
|
-
* and append it to the audit log. `undefined` records are skipped (callers
|
|
113
|
-
* pass an `onSuccess` / `onFailure` that returns `undefined` to opt out per
|
|
114
|
-
* call).
|
|
115
|
-
*
|
|
116
|
-
* @category internal
|
|
117
|
-
*/
|
|
118
|
-
declare function appendAudit<TArgs extends readonly unknown[], TValue, R extends BaseAuditRecord, M extends SuccessMeta | FailureMeta>(audit: ReactiveLogBundle<R>, builder: (args: TArgs, value: TValue, meta: M) => R | undefined, args: TArgs, value: TValue, meta: M, handlerVersion?: {
|
|
119
|
-
id: string;
|
|
120
|
-
version: string | number;
|
|
121
|
-
}): void;
|
|
122
|
-
/**
|
|
123
|
-
* Substrate-tier wrapper: run `action`, optionally append a typed audit record
|
|
124
|
-
* on success or failure, advance an optional `seq` cursor. No batch frame —
|
|
125
|
-
* this is the hot-path-friendly variant for atomic single-write mutations.
|
|
126
|
-
*
|
|
127
|
-
* Behavior contract:
|
|
128
|
-
* 1. Freeze args at entry (default `true`; opt out with `freeze: false` for
|
|
129
|
-
* hot paths — e.g. wrapping `vectorIndex.upsert(id, vector[768], meta)`
|
|
130
|
-
* where the deep-freeze of a 768-dim vector is a measurable tax).
|
|
131
|
-
* 2. Bump `seq` (if provided) BEFORE the action runs. There is no batch frame,
|
|
132
|
-
* so the bump persists even on throw — the failure-audit record stamps the
|
|
133
|
-
* same `seq` so audit consumers see a contiguous sequence.
|
|
134
|
-
* 3. Run `action(args)`. On success, if `audit` is provided AND `onSuccess`
|
|
135
|
-
* is set, `appendAudit(onSuccess, ...)`.
|
|
136
|
-
* 4. On throw, if `audit` is provided AND `onFailure` is set,
|
|
137
|
-
* `appendAudit(onFailure, ...)` then re-throw. When `audit` is omitted the
|
|
138
|
-
* wrapper still provides freeze + seq + re-throw semantics — useful for
|
|
139
|
-
* primitives that want centralized mutation contracts without an audit log
|
|
140
|
-
* surface (e.g. `Topic.publish`).
|
|
141
|
-
*
|
|
142
|
-
* **Distinguish from {@link wrapMutation}:** `wrapMutation` opens a `batch()`
|
|
143
|
-
* frame (rollback-on-throw, seq advance discarded on rollback) and is the
|
|
144
|
-
* right choice when the action runs a user-supplied handler or a multi-step
|
|
145
|
-
* sequence that could leave inconsistent state mid-throw.
|
|
146
|
-
*
|
|
147
|
-
* **Cursor / log alignment caveat (substrate-tier):** `seq` is bumped BEFORE
|
|
148
|
-
* `action()` runs, and the audit-log append happens AFTER. There is no batch
|
|
149
|
-
* frame, so a synchronous subscriber to `seq` that fires between the two —
|
|
150
|
-
* including a subscriber on `audit.entries` itself if the substrate causes
|
|
151
|
-
* it to fire transitively — observes `seq=N` while the corresponding record
|
|
152
|
-
* is not yet in the log. Audit consumers that join `seq` and `audit.entries`
|
|
153
|
-
* reactively must tolerate this one-tick lag, or use {@link wrapMutation}
|
|
154
|
-
* (whose `batch()` frame defers downstream delivery until commit, so cursor
|
|
155
|
-
* and log appear together to subscribers). The same caveat applies to
|
|
156
|
-
* **re-entrant** invocation: if an `audit.entries` / `seq` subscriber
|
|
157
|
-
* triggers another `lightMutation`, the inner record can land on the log
|
|
158
|
-
* before the outer call's success/failure record.
|
|
159
|
-
*
|
|
160
|
-
* @category internal
|
|
161
|
-
*/
|
|
162
|
-
declare function lightMutation<TArgs extends readonly unknown[], TResult, R extends BaseAuditRecord>(action: (...args: TArgs) => TResult, opts: LightMutationOpts<TArgs, TResult, R>): (...args: TArgs) => TResult;
|
|
163
|
-
/**
|
|
164
|
-
* Orchestration-tier wrapper: like {@link lightMutation} but adds a `batch()`
|
|
165
|
-
* frame around the action so an in-flight throw rolls back partial state.
|
|
166
|
-
*
|
|
167
|
-
* Behavior contract:
|
|
168
|
-
* 1. Freeze args at entry (default `true`).
|
|
169
|
-
* 2. Open a batch frame (rollback-on-throw via core batch — Audit 2 #6).
|
|
170
|
-
* 3. Bump `seq` INSIDE the batch so a framework-level rollback discards the
|
|
171
|
-
* cursor advance (cursor stays in sync with audit log). M5.
|
|
172
|
-
* 4. Run `action(args)` and capture result.
|
|
173
|
-
* 5. On success: if `audit` is provided AND `onSuccess` is set,
|
|
174
|
-
* `appendAudit(onSuccess, ...)` inside the batch.
|
|
175
|
-
* 6. On throw: catch OUTSIDE the batch so the failure record (if any) emits
|
|
176
|
-
* in a fresh transaction after rollback — it persists. Re-throw so callers
|
|
177
|
-
* see the failure. When `audit` is omitted the wrapper still provides
|
|
178
|
-
* batch + freeze + rollback + re-throw semantics — useful for primitives
|
|
179
|
-
* that want orchestration-tier mutation contracts without an audit log
|
|
180
|
-
* surface.
|
|
181
|
-
*
|
|
182
|
-
* **Distinguish from the file-private `wrapMutation` in
|
|
183
|
-
* `src/extra/reactive-map.ts:540`:** that helper is a transactional wrapper
|
|
184
|
-
* for the reactiveMap version counter (`pre/post-version` snapshot diffing,
|
|
185
|
-
* read vs. mutation gating). Different concern, file-private, not exported.
|
|
186
|
-
* This `wrapMutation` is the public Phase-4 audit framework.
|
|
187
|
-
*
|
|
188
|
-
* @category internal
|
|
189
|
-
*/
|
|
190
|
-
declare function wrapMutation<TArgs extends readonly unknown[], TResult, R extends BaseAuditRecord>(action: (...args: TArgs) => TResult, opts: WrapMutationOpts<TArgs, TResult, R>): (...args: TArgs) => TResult;
|
|
191
|
-
/**
|
|
192
|
-
* Promote a closure counter to a state node mounted under `graph`.
|
|
193
|
-
* Replaces ad-hoc `let _seq = 0` patterns with a node observable in
|
|
194
|
-
* `describe()` and persistable via storage tiers.
|
|
195
|
-
*
|
|
196
|
-
* @category internal
|
|
197
|
-
*/
|
|
198
|
-
declare function registerCursor(graph: Graph, name: string, initial?: number): Node<number>;
|
|
199
|
-
/**
|
|
200
|
-
* Promote a closure `Map<K, number>` to N state nodes (one per key) mounted
|
|
201
|
-
* under `<graph>::<name>::<key>`. Used by saga (per-event-type cursor).
|
|
202
|
-
*
|
|
203
|
-
* @category internal
|
|
204
|
-
*/
|
|
205
|
-
declare function registerCursorMap<K extends string>(graph: Graph, name: string, keys: readonly K[], initial?: number): {
|
|
206
|
-
readonly [P in K]: Node<number>;
|
|
207
|
-
};
|
|
208
|
-
|
|
209
|
-
export { type AuditLogOpts as A, type BaseAuditRecord as B, DEFAULT_AUDIT_GUARD as D, type FailureMeta as F, type LightMutationOpts as L, type MutationOpts as M, type SuccessMeta as S, type WrapMutationOpts as W, appendAudit as a, bumpCursor as b, createAuditLog as c, registerCursorMap as d, lightMutation as l, registerCursor as r, tryIncrementBounded as t, wrapMutation as w };
|