@graphrefly/graphrefly 0.44.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 -3
- package/dist/core/index.d.ts +1 -3
- 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 -958
- package/dist/extra/operators.d.ts +1 -958
- 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 -95
- package/dist/index.d.ts +45 -95
- 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 -20
- package/dist/patterns/ai/index.d.ts +1 -20
- 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 -13
- package/dist/patterns/harness/index.d.ts +1 -13
- 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 -8
- package/dist/patterns/orchestration/index.d.ts +1 -8
- package/dist/patterns/orchestration/index.js +3 -1
- package/dist/patterns/orchestration/index.js.map +1 -0
- package/dist/patterns/process/index.cjs +21 -3
- 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-BglDkMdX.d.cts +0 -199
- package/dist/cascading-MFgxu7Yo.d.ts +0 -199
- package/dist/chunk-2T7U5EU6.js +0 -1
- package/dist/chunk-3G5U5QNE.js +0 -5
- package/dist/chunk-4VVTGLXJ.js +0 -1
- package/dist/chunk-5M4CCMMD.js +0 -45
- package/dist/chunk-5QDBSZBV.js +0 -1
- package/dist/chunk-5XJ6B66J.js +0 -1
- package/dist/chunk-6QZNQS5B.js +0 -1
- package/dist/chunk-6X7AFUJV.js +0 -9
- package/dist/chunk-7K6PWTDQ.js +0 -1
- package/dist/chunk-7LIAPXJB.js +0 -1
- package/dist/chunk-7WPU3UHQ.js +0 -1
- package/dist/chunk-A5WCQ5NO.js +0 -1
- package/dist/chunk-APPIWSGD.js +0 -84
- package/dist/chunk-BEZWM2SY.js +0 -1
- package/dist/chunk-C72GO4IZ.js +0 -1
- package/dist/chunk-CB676TKJ.js +0 -1
- package/dist/chunk-CE6TI2TL.js +0 -1
- package/dist/chunk-CE72X3WO.js +0 -1
- package/dist/chunk-CK2E7BTU.js +0 -1
- package/dist/chunk-CLVB32RD.js +0 -1
- package/dist/chunk-CRVT7D2P.js +0 -1
- package/dist/chunk-D5RFJOZ2.js +0 -1
- package/dist/chunk-D7GPHKFH.js +0 -1
- package/dist/chunk-DHRX7JX4.js +0 -2
- package/dist/chunk-ESMPEKEV.js +0 -1
- package/dist/chunk-F672GV32.js +0 -1
- package/dist/chunk-FZMYDOWV.js +0 -1
- package/dist/chunk-GHBWHMRZ.js +0 -1
- package/dist/chunk-GLERH466.js +0 -1
- package/dist/chunk-GPW2V3RE.js +0 -1
- package/dist/chunk-HIDYF36O.js +0 -1
- package/dist/chunk-HITNVN6B.js +0 -3
- package/dist/chunk-HY4DJBA7.js +0 -5
- package/dist/chunk-KZIEYVXN.js +0 -1
- package/dist/chunk-L6NSJVJZ.js +0 -1
- package/dist/chunk-N4MQX6JU.js +0 -18
- package/dist/chunk-N7FHEL4D.js +0 -1
- package/dist/chunk-NTEURFZH.js +0 -1
- package/dist/chunk-OIVP6KFV.js +0 -1
- package/dist/chunk-OPHBU3LG.js +0 -1
- package/dist/chunk-OYQOZP2F.js +0 -5
- package/dist/chunk-PTZK576G.js +0 -1
- package/dist/chunk-QYADASLV.js +0 -1
- package/dist/chunk-ST7UXLWR.js +0 -1
- package/dist/chunk-SVY7VUYU.js +0 -1
- package/dist/chunk-TK3NWWD4.js +0 -1
- package/dist/chunk-TSOYJ743.js +0 -1
- package/dist/chunk-UNGSTR4X.js +0 -61
- package/dist/chunk-VIMF6LGM.js +0 -1
- package/dist/chunk-VJLMUKOI.js +0 -1
- package/dist/chunk-VN6RDSK2.js +0 -1
- package/dist/chunk-VV4N5P64.js +0 -1
- package/dist/chunk-W3I423PS.js +0 -1
- package/dist/chunk-WJR24TAG.js +0 -1
- package/dist/chunk-XTGKMHSW.js +0 -1
- package/dist/chunk-YBB7ZGTY.js +0 -1
- package/dist/chunk-Z4NPUARF.js +0 -1
- package/dist/chunk-ZGNQRPDT.js +0 -1
- package/dist/chunk-ZKPSFFKU.js +0 -1
- package/dist/chunk-ZLV5SQSX.js +0 -1
- package/dist/content-addressed-storage-4-ST1tYk.d.cts +0 -124
- package/dist/content-addressed-storage-DuYMjV7o.d.ts +0 -124
- package/dist/decay-BvOWTZ00.d.ts +0 -112
- package/dist/decay-CFlLvXUT.d.cts +0 -112
- package/dist/fallback-74oxi34l.d.cts +0 -250
- package/dist/fallback-DUyyBTBK.d.ts +0 -250
- package/dist/graph-CWvEUQAq.d.cts +0 -1861
- package/dist/graph-D9LFnda9.d.ts +0 -1861
- package/dist/index-5k1T6jl0.d.cts +0 -121
- package/dist/index-9770hRuQ.d.cts +0 -779
- package/dist/index-B-_tFaqV.d.cts +0 -468
- package/dist/index-B17QddL1.d.cts +0 -374
- package/dist/index-B1F8Enjf.d.ts +0 -704
- package/dist/index-B5S8ULbU.d.ts +0 -515
- package/dist/index-B8YnZpIR.d.ts +0 -102
- package/dist/index-BHskSB8v.d.ts +0 -3413
- package/dist/index-BIYAkbAi.d.cts +0 -26
- package/dist/index-BQSKmbuG.d.cts +0 -127
- package/dist/index-BaQaY_IQ.d.cts +0 -231
- package/dist/index-BmZXHqkE.d.ts +0 -36
- package/dist/index-BoJ5JHxI.d.ts +0 -557
- package/dist/index-BocU7pqs.d.ts +0 -779
- package/dist/index-BrPrLl4e.d.cts +0 -86
- package/dist/index-BxNs2HB9.d.cts +0 -1858
- package/dist/index-Byu-OpX_.d.ts +0 -113
- package/dist/index-C1T3d7V-.d.cts +0 -704
- package/dist/index-C5ri2Axc.d.cts +0 -301
- package/dist/index-C5stwKcw.d.cts +0 -44
- package/dist/index-C9l6OEBL.d.ts +0 -26
- package/dist/index-CBBLl_rc.d.ts +0 -127
- package/dist/index-CBGUK09R.d.ts +0 -754
- package/dist/index-CC-AvFTy.d.cts +0 -557
- package/dist/index-CJF1URuX.d.ts +0 -121
- package/dist/index-CK29LV56.d.cts +0 -34
- package/dist/index-CMh5Rz1y.d.ts +0 -385
- package/dist/index-CPQlGA29.d.ts +0 -34
- package/dist/index-CR8QpwX8.d.ts +0 -2680
- package/dist/index-CS0LTlB8.d.cts +0 -385
- package/dist/index-CSOmP7xT.d.cts +0 -291
- package/dist/index-CYq8vAyV.d.ts +0 -291
- package/dist/index-CZ3r5Rxp.d.ts +0 -374
- package/dist/index-CasX6Pfq.d.cts +0 -358
- package/dist/index-CdAlHFEt.d.ts +0 -44
- package/dist/index-CdTelp1M.d.ts +0 -202
- package/dist/index-CeFiHtAg.d.ts +0 -468
- package/dist/index-Cj3WohTd.d.cts +0 -202
- package/dist/index-Climxqsu.d.cts +0 -754
- package/dist/index-Co7uli2l.d.cts +0 -3413
- package/dist/index-CviRnE4K.d.ts +0 -45
- package/dist/index-Cwv0KWcU.d.cts +0 -102
- package/dist/index-CzLVrjxn.d.ts +0 -231
- package/dist/index-D0aciIex.d.cts +0 -209
- package/dist/index-DHen9Klo.d.ts +0 -1858
- package/dist/index-DV_1YuVk.d.cts +0 -221
- package/dist/index-Dc4AYqrJ.d.cts +0 -515
- package/dist/index-Dgl1HpPn.d.ts +0 -86
- package/dist/index-DisjX8a-.d.ts +0 -221
- package/dist/index-UPSiS-X7.d.cts +0 -2680
- package/dist/index-Yq60JP3s.d.ts +0 -209
- package/dist/index-ZVQhLa2i.d.cts +0 -37
- package/dist/index-_6ODbuOu.d.cts +0 -45
- package/dist/index-hcDJ8PSI.d.cts +0 -36
- package/dist/index-nozs3fFC.d.ts +0 -301
- package/dist/index-p09KSrTN.d.ts +0 -358
- package/dist/index-sqkqlb1p.d.ts +0 -37
- package/dist/index-tRCxuAXF.d.cts +0 -113
- package/dist/node-kK3CvTrR.d.cts +0 -1347
- package/dist/node-kK3CvTrR.d.ts +0 -1347
- package/dist/observable-DWjNfLvC.d.ts +0 -36
- package/dist/observable-e3eiPPFy.d.cts +0 -36
- package/dist/pipeline-graph-CIKhynsF.d.cts +0 -142
- package/dist/pipeline-graph-Sgj0gCwn.d.ts +0 -142
- package/dist/reactive-layout-DOTs9P3X.d.ts +0 -183
- package/dist/reactive-layout-DgctbqZo.d.cts +0 -183
- package/dist/reactive-log-BKALbfal.d.ts +0 -223
- package/dist/reactive-log-DIGdYqQ6.d.cts +0 -223
- package/dist/reactive-map-CEFGp8TK.d.cts +0 -296
- package/dist/reactive-map-DS_SIAxv.d.ts +0 -296
- package/dist/resilience-6LYQJAC5.js +0 -1
- package/dist/sugar-DQjFmVqb.d.cts +0 -399
- package/dist/sugar-fhLIE7TT.d.ts +0 -399
- package/dist/topology-tree-Bcz27hpF.d.cts +0 -25
- package/dist/topology-tree-xvaD0fOX.d.ts +0 -25
- package/dist/types-C0_yquda.d.cts +0 -442
- package/dist/types-CWFysE9E.d.ts +0 -442
package/dist/index-p09KSrTN.d.ts
DELETED
|
@@ -1,358 +0,0 @@
|
|
|
1
|
-
import { B as BaseAuditRecord } from './index-Yq60JP3s.js';
|
|
2
|
-
import { a as ReactiveLogBundle } from './reactive-log-BKALbfal.js';
|
|
3
|
-
import { NodeInput } from './extra/sources.js';
|
|
4
|
-
import { AppendLogStorageTier, KvStorageTier } from './extra/storage-tiers.js';
|
|
5
|
-
import { C as CqrsEventMap, a as CqrsEvent, b as CqrsGraph } from './index-CeFiHtAg.js';
|
|
6
|
-
|
|
7
|
-
/**
|
|
8
|
-
* Process Manager pattern (Phase 7 — roadmap §4.6, Audit 3 — locked 2026-04-24).
|
|
9
|
-
*
|
|
10
|
-
* Reactive long-running workflow primitive over CQRS event nodes.
|
|
11
|
-
* Correlates events across aggregates, tracks per-instance state, supports
|
|
12
|
-
* retries with backoff, and runs compensation on failure or explicit cancel.
|
|
13
|
-
*
|
|
14
|
-
* ## Architecture
|
|
15
|
-
*
|
|
16
|
-
* - Per-instance state lives in a `Map<correlationId, TState>` closure (in-memory).
|
|
17
|
-
* The `_process_<name>_started` synthetic event is dispatched per `start()`
|
|
18
|
-
* for an event-sourced audit trail using `correlationId` as `aggregateId`.
|
|
19
|
-
* Cross-restart state recovery is opt-in via
|
|
20
|
-
* `opts.persistence.stateStorage` (kv-tier per-correlationId snapshot,
|
|
21
|
-
* Tier 6.5 3.5) plus an explicit `restore()` call after construction.
|
|
22
|
-
* - Watched-event subscriptions are imperative (coordinator role) — each
|
|
23
|
-
* watched CQRS event type is subscribed to via `entries.subscribe(...)`.
|
|
24
|
-
* These are NOT reactive node edges; the process manager is intentionally
|
|
25
|
-
* a coordinator that bridges reactive CQRS events into imperative instance logic.
|
|
26
|
-
* - Step execution uses `fromAny` to uniformly handle sync and async handlers.
|
|
27
|
-
* - Retry delays use `setTimeout` (same sanctioned pattern as `extra/resilience.ts`
|
|
28
|
-
* retry helper — this primitive is a coordinator, not a reactive pipeline stage).
|
|
29
|
-
* - Timer scheduling uses `fromTimer` from `extra/sources.ts` per spec §5.8.
|
|
30
|
-
* - Audit log uses `createAuditLog` per Audit 2.
|
|
31
|
-
*
|
|
32
|
-
* @module
|
|
33
|
-
*/
|
|
34
|
-
|
|
35
|
-
/**
|
|
36
|
-
* Discriminated union returned by each step handler.
|
|
37
|
-
*
|
|
38
|
-
* - `"success"` — step ran cleanly; update state, optionally emit
|
|
39
|
-
* side-effect events and schedule a future synthetic event. The process
|
|
40
|
-
* instance stays `"running"`.
|
|
41
|
-
* - `"terminate"` — workflow complete; instance moves to `"terminated"`.
|
|
42
|
-
* Process-specific extension to the canonical outcome enum.
|
|
43
|
-
* - `"failure"` — triggers compensation; instance moves to `"compensated"` /
|
|
44
|
-
* `"errored"`.
|
|
45
|
-
*
|
|
46
|
-
* Field name is `outcome` (matching `cqrs.DispatchRecord.outcome` and the
|
|
47
|
-
* canonical Tier 1.6.2 / 2.3 enum). `"success"` and `"failure"` are the
|
|
48
|
-
* canonical values; `"terminate"` is the process-specific extension for
|
|
49
|
-
* "early-return success".
|
|
50
|
-
*/
|
|
51
|
-
type ProcessStepResult<TState> = {
|
|
52
|
-
outcome: "success";
|
|
53
|
-
state: TState;
|
|
54
|
-
emit?: readonly {
|
|
55
|
-
type: string;
|
|
56
|
-
payload: unknown;
|
|
57
|
-
}[];
|
|
58
|
-
schedule?: ProcessSchedule;
|
|
59
|
-
} | {
|
|
60
|
-
outcome: "terminate";
|
|
61
|
-
state: TState;
|
|
62
|
-
emit?: readonly {
|
|
63
|
-
type: string;
|
|
64
|
-
payload: unknown;
|
|
65
|
-
}[];
|
|
66
|
-
reason?: string;
|
|
67
|
-
} | {
|
|
68
|
-
outcome: "failure";
|
|
69
|
-
error: unknown;
|
|
70
|
-
};
|
|
71
|
-
/**
|
|
72
|
-
* Schedule a synthetic timer event after `afterMs` milliseconds.
|
|
73
|
-
* When the timer fires, the synthetic event of `eventType` is routed to the
|
|
74
|
-
* matching step (if one is registered) for this correlationId.
|
|
75
|
-
*/
|
|
76
|
-
type ProcessSchedule = {
|
|
77
|
-
afterMs: number;
|
|
78
|
-
eventType: string;
|
|
79
|
-
};
|
|
80
|
-
/**
|
|
81
|
-
* Step handler signature.
|
|
82
|
-
*
|
|
83
|
-
* Receives the current instance state and the triggering CQRS event.
|
|
84
|
-
* Returns a {@link ProcessStepResult} — sync value, Promise, or any
|
|
85
|
-
* {@link NodeInput} consumed via `fromAny`.
|
|
86
|
-
*/
|
|
87
|
-
type ProcessStep<TState, EM extends CqrsEventMap, K extends keyof EM & string> = (state: TState, event: CqrsEvent<EM[K]>) => NodeInput<ProcessStepResult<TState>>;
|
|
88
|
-
/**
|
|
89
|
-
* Compensation handler. Runs when a step returns `outcome: "failure"`, throws, or
|
|
90
|
-
* when `cancel(correlationId)` is called on a running instance.
|
|
91
|
-
*
|
|
92
|
-
* Should undo any side effects performed by prior steps (refund, cancel
|
|
93
|
-
* reservation, etc.). Errors thrown inside compensate are swallowed and
|
|
94
|
-
* recorded in the audit log with `status: "errored"` to prevent cascading
|
|
95
|
-
* failure loops.
|
|
96
|
-
*/
|
|
97
|
-
type ProcessCompensate<TState> = (state: TState, error: unknown) => NodeInput<void>;
|
|
98
|
-
/**
|
|
99
|
-
* Audit record for a single process instance state transition.
|
|
100
|
-
*
|
|
101
|
-
* Every status change (start → running → terminated / errored / compensated)
|
|
102
|
-
* appends one record. `correlationId` is the stable process key.
|
|
103
|
-
*
|
|
104
|
-
* Extends {@link BaseAuditRecord} so records carry `t_ns` / `seq` /
|
|
105
|
-
* `handlerVersion` from the cross-cutting Audit 2 schema.
|
|
106
|
-
*/
|
|
107
|
-
interface ProcessInstance<TState> extends BaseAuditRecord {
|
|
108
|
-
/** Stable correlation key that identifies this process instance. */
|
|
109
|
-
readonly correlationId: string;
|
|
110
|
-
/** Most-recent instance state at this transition. */
|
|
111
|
-
readonly state: TState;
|
|
112
|
-
/** Current lifecycle status after this transition. */
|
|
113
|
-
readonly status: "running" | "terminated" | "errored" | "compensated";
|
|
114
|
-
/** Wall-clock nanoseconds when `start()` was called. */
|
|
115
|
-
readonly startedAt: number;
|
|
116
|
-
/** Wall-clock nanoseconds of this transition. */
|
|
117
|
-
readonly updatedAt: number;
|
|
118
|
-
/** Handler version stamped at transition time (Audit 5). */
|
|
119
|
-
readonly handlerVersion?: {
|
|
120
|
-
id: string;
|
|
121
|
-
version: string | number;
|
|
122
|
-
};
|
|
123
|
-
/** Optional human-readable reason for cancellation. Present only on `"compensated"` records produced by `cancel()`. */
|
|
124
|
-
readonly reason?: string;
|
|
125
|
-
}
|
|
126
|
-
/**
|
|
127
|
-
* Recommended `keyOf` for storage tiers keyed by correlationId (Audit 2).
|
|
128
|
-
*/
|
|
129
|
-
declare const processInstanceKeyOf: <TState>(i: ProcessInstance<TState>) => string;
|
|
130
|
-
/**
|
|
131
|
-
* Per-correlationId state snapshot persisted via
|
|
132
|
-
* {@link ProcessManagerOpts.persistence.stateStorage} (Tier 6.5 3.5,
|
|
133
|
-
* 2026-04-29). Captures the running instance's current state plus
|
|
134
|
-
* lifecycle metadata so a fresh `processManager` can resume in-flight
|
|
135
|
-
* workflows after restart via {@link ProcessManagerResult.restore}.
|
|
136
|
-
*
|
|
137
|
-
* Terminal records (`status` ∈ `"terminated" | "errored" | "compensated"`)
|
|
138
|
-
* are deleted from the kv tier on transition — only running instances
|
|
139
|
-
* persist between restarts.
|
|
140
|
-
*/
|
|
141
|
-
interface ProcessStateSnapshot<TState> {
|
|
142
|
-
readonly correlationId: string;
|
|
143
|
-
readonly state: TState;
|
|
144
|
-
readonly status: "running" | "terminated" | "errored" | "compensated";
|
|
145
|
-
readonly startedAt: number;
|
|
146
|
-
readonly updatedAt: number;
|
|
147
|
-
readonly handlerVersion?: {
|
|
148
|
-
id: string;
|
|
149
|
-
version: string | number;
|
|
150
|
-
};
|
|
151
|
-
}
|
|
152
|
-
/** Recommended `keyOf` for `KvStorageTier<ProcessStateSnapshot<...>>`. */
|
|
153
|
-
declare const processStateKeyOf: <TState>(s: ProcessStateSnapshot<TState>) => string;
|
|
154
|
-
/**
|
|
155
|
-
* Options for {@link processManager}.
|
|
156
|
-
*/
|
|
157
|
-
interface ProcessManagerOpts<TState, EM extends CqrsEventMap> {
|
|
158
|
-
/** Initial state value for every new process instance. */
|
|
159
|
-
readonly initial: TState;
|
|
160
|
-
/** CQRS event types to watch for correlation routing. */
|
|
161
|
-
readonly watching: readonly (keyof EM & string)[];
|
|
162
|
-
/**
|
|
163
|
-
* Per-event-type step handlers. A step is invoked when a watched event's
|
|
164
|
-
* `correlationId` matches a running instance and the event type is in
|
|
165
|
-
* `steps`. Events with no matching step are silently ignored.
|
|
166
|
-
*/
|
|
167
|
-
readonly steps: {
|
|
168
|
-
[K in keyof EM & string]?: ProcessStep<TState, EM, K>;
|
|
169
|
-
};
|
|
170
|
-
/**
|
|
171
|
-
* Optional compensation handler. Runs on step `outcome: "failure"` / step throw
|
|
172
|
-
* and on explicit `cancel()`. If omitted, instances fail silently with
|
|
173
|
-
* status `"errored"` instead of `"compensated"`.
|
|
174
|
-
*/
|
|
175
|
-
readonly compensate?: ProcessCompensate<TState>;
|
|
176
|
-
/**
|
|
177
|
-
* Optional predicate called after each `"success"` step. When it returns
|
|
178
|
-
* `true`, the instance is moved to `"terminated"` immediately without
|
|
179
|
-
* waiting for a `"terminate"` step result.
|
|
180
|
-
*/
|
|
181
|
-
readonly isTerminal?: (state: TState) => boolean;
|
|
182
|
-
/**
|
|
183
|
-
* Maximum number of retry attempts after a step throws (not counting the
|
|
184
|
-
* first attempt). Default: `0` (no retry — fail immediately on throw).
|
|
185
|
-
*/
|
|
186
|
-
readonly retryMax?: number;
|
|
187
|
-
/**
|
|
188
|
-
* Per-retry backoff delays in milliseconds. `backoffMs[i]` is the delay
|
|
189
|
-
* before attempt `i + 1`. If fewer entries than `retryMax`, the last entry
|
|
190
|
-
* is repeated. Default: `[0]` (no delay).
|
|
191
|
-
*
|
|
192
|
-
* **Implementation note:** retry delays are implemented with `setTimeout`
|
|
193
|
-
* (same sanctioned exception as `extra/resilience.ts`). This is a
|
|
194
|
-
* coordinator-layer primitive — `fromTimer` would require subscribing to
|
|
195
|
-
* an additional node per attempt, which would leak timer nodes without a
|
|
196
|
-
* clear disposal scope.
|
|
197
|
-
*/
|
|
198
|
-
readonly backoffMs?: readonly number[];
|
|
199
|
-
/** Handler version tag stamped onto audit records (Audit 5). */
|
|
200
|
-
readonly handlerVersion?: {
|
|
201
|
-
id: string;
|
|
202
|
-
version: string | number;
|
|
203
|
-
};
|
|
204
|
-
/** Optional persistence wiring (Audit 4). */
|
|
205
|
-
readonly persistence?: {
|
|
206
|
-
/**
|
|
207
|
-
* Wire the per-process synthetic state event stream to append-log tiers.
|
|
208
|
-
* Reuses `CqrsGraph.attachEventStorage` so events persist across restarts.
|
|
209
|
-
*/
|
|
210
|
-
eventStorage?: readonly AppendLogStorageTier<CqrsEvent>[];
|
|
211
|
-
/**
|
|
212
|
-
* Wire per-correlationId state snapshots to kv tiers (Tier 6.5 3.5,
|
|
213
|
-
* 2026-04-29). Each `start()` and step transition writes the running
|
|
214
|
-
* instance's state under its `correlationId`; terminal transitions
|
|
215
|
-
* (`terminated` / `errored` / `compensated`) `delete` the key. After
|
|
216
|
-
* restart, callers invoke {@link ProcessManagerResult.restore} to
|
|
217
|
-
* reload running instances from the first tier.
|
|
218
|
-
*
|
|
219
|
-
* Uses {@link KvStorageTier} (not snapshot tier) because per-instance
|
|
220
|
-
* state is N records keyed by correlationId, not a single global
|
|
221
|
-
* snapshot. {@link processStateKeyOf} is the recommended `keyOf`
|
|
222
|
-
* (already aligned with the kv tier's `save(key, value)` shape).
|
|
223
|
-
*
|
|
224
|
-
* Terminal records are NOT preserved — historical lifecycle is the
|
|
225
|
-
* audit log's job. State persistence covers crash-recovery only.
|
|
226
|
-
*/
|
|
227
|
-
stateStorage?: readonly KvStorageTier<ProcessStateSnapshot<TState>>[];
|
|
228
|
-
};
|
|
229
|
-
}
|
|
230
|
-
/**
|
|
231
|
-
* Result handle returned by {@link processManager}.
|
|
232
|
-
*/
|
|
233
|
-
interface ProcessManagerResult<TState> {
|
|
234
|
-
/**
|
|
235
|
-
* Reactive audit log of every process instance state transition.
|
|
236
|
-
* Every `start()`, step result, retry, cancellation, and compensation
|
|
237
|
-
* appends a {@link ProcessInstance} record.
|
|
238
|
-
*/
|
|
239
|
-
readonly instances: ReactiveLogBundle<ProcessInstance<TState>>;
|
|
240
|
-
/**
|
|
241
|
-
* Alias for {@link instances} (Audit 2 `.audit` duplication convention).
|
|
242
|
-
*/
|
|
243
|
-
readonly audit: ReactiveLogBundle<ProcessInstance<TState>>;
|
|
244
|
-
/**
|
|
245
|
-
* Start a new process instance identified by `correlationId`.
|
|
246
|
-
*
|
|
247
|
-
* Emits a synthetic `_process_<name>_started` event into the CQRS graph
|
|
248
|
-
* with `correlationId` as `aggregateId` so per-aggregate streams record
|
|
249
|
-
* the process lifecycle. If the correlationId already has an active
|
|
250
|
-
* (running) instance, this call is a no-op (idempotent).
|
|
251
|
-
*
|
|
252
|
-
* @param correlationId - Stable key for this workflow instance.
|
|
253
|
-
* @param initialPayload - Optional payload carried on the start event.
|
|
254
|
-
*/
|
|
255
|
-
start(correlationId: string, initialPayload?: unknown): void;
|
|
256
|
-
/**
|
|
257
|
-
* Cancel a running instance by correlationId.
|
|
258
|
-
*
|
|
259
|
-
* Triggers the `compensate` handler (if configured), then marks the
|
|
260
|
-
* instance as `"compensated"`. If the instance is not running, this is
|
|
261
|
-
* a no-op.
|
|
262
|
-
*
|
|
263
|
-
* @param correlationId - Instance to cancel.
|
|
264
|
-
* @param reason - Optional human-readable reason recorded in the audit log.
|
|
265
|
-
*/
|
|
266
|
-
cancel(correlationId: string, reason?: string): void;
|
|
267
|
-
/**
|
|
268
|
-
* Synchronous read of the current in-memory state for a correlationId.
|
|
269
|
-
* Returns `undefined` if the instance does not exist or has terminated.
|
|
270
|
-
*/
|
|
271
|
-
getState(correlationId: string): TState | undefined;
|
|
272
|
-
/**
|
|
273
|
-
* Restore running instances from the first {@link
|
|
274
|
-
* ProcessManagerOpts.persistence.stateStorage} tier (Tier 6.5 3.5,
|
|
275
|
-
* 2026-04-29). Loads every record in the tier and re-hydrates
|
|
276
|
-
* `instanceStates` / `activeInstances` / `startedAt` for any record
|
|
277
|
-
* whose `status === "running"`. Terminal records, if any persisted
|
|
278
|
-
* before delete fired, are silently skipped.
|
|
279
|
-
*
|
|
280
|
-
* Idempotent — calling twice doesn't double-restore (existing entries
|
|
281
|
-
* are overwritten). Returns the count of running instances rehydrated.
|
|
282
|
-
*
|
|
283
|
-
* No-op when no `stateStorage` tier is configured OR the first tier
|
|
284
|
-
* lacks a `list?` method (returns 0). Async because kv tier `load` /
|
|
285
|
-
* `list` may be async.
|
|
286
|
-
*/
|
|
287
|
-
restore(): Promise<number>;
|
|
288
|
-
/**
|
|
289
|
-
* Release all watched-event subscriptions and stop processing new events.
|
|
290
|
-
*
|
|
291
|
-
* After `dispose()`, subsequent `start()` and `cancel()` calls are no-ops.
|
|
292
|
-
* In-flight async steps complete naturally; no new steps are dispatched.
|
|
293
|
-
*/
|
|
294
|
-
dispose(): void;
|
|
295
|
-
}
|
|
296
|
-
/**
|
|
297
|
-
* Create a process manager that coordinates long-running reactive workflows
|
|
298
|
-
* over a {@link CqrsGraph}.
|
|
299
|
-
*
|
|
300
|
-
* Process instances are identified by `correlationId`. Events from the watched
|
|
301
|
-
* event types are routed to per-instance step handlers when the event's
|
|
302
|
-
* `correlationId` matches a running instance.
|
|
303
|
-
*
|
|
304
|
-
* ```ts
|
|
305
|
-
* const app = cqrs<{ orderPlaced: { orderId: string }; paymentReceived: { amount: number } }>("orders");
|
|
306
|
-
*
|
|
307
|
-
* const pm = processManager(app, "fulfillment", {
|
|
308
|
-
* initial: { step: "awaiting-payment", total: 0 },
|
|
309
|
-
* watching: ["orderPlaced", "paymentReceived"],
|
|
310
|
-
* steps: {
|
|
311
|
-
* orderPlaced(state, event) {
|
|
312
|
-
* return { outcome: "success", state: { ...state, orderId: event.payload.orderId } };
|
|
313
|
-
* },
|
|
314
|
-
* paymentReceived(state, event) {
|
|
315
|
-
* return { outcome: "terminate", state: { ...state, total: event.payload.amount } };
|
|
316
|
-
* },
|
|
317
|
-
* },
|
|
318
|
-
* compensate(state, _error) {
|
|
319
|
-
* // undo reservation, issue refund, etc.
|
|
320
|
-
* },
|
|
321
|
-
* retryMax: 2,
|
|
322
|
-
* backoffMs: [100, 500],
|
|
323
|
-
* });
|
|
324
|
-
*
|
|
325
|
-
* pm.start("order-123");
|
|
326
|
-
* app.dispatch("orderPlaced", { orderId: "order-123" }, { correlationId: "order-123" });
|
|
327
|
-
* ```
|
|
328
|
-
*
|
|
329
|
-
* @param cqrsGraph - The CQRS graph whose event streams the manager watches.
|
|
330
|
-
* @param name - Stable identifier for this process type; used for the
|
|
331
|
-
* synthetic event-type prefix `_process_<name>_*`. Currently emits
|
|
332
|
-
* `_process_<name>_started` per `start()`; the prefix is reserved for
|
|
333
|
-
* future `_state` / `_timer` channels.
|
|
334
|
-
* @param opts - Configuration: initial state, watched events, steps, retry,
|
|
335
|
-
* compensation, and optional persistence.
|
|
336
|
-
* @returns {@link ProcessManagerResult} with `instances` audit log and
|
|
337
|
-
* `start`, `cancel`, `getState` imperative controls.
|
|
338
|
-
*
|
|
339
|
-
* @category patterns
|
|
340
|
-
*/
|
|
341
|
-
declare function processManager<TState, EM extends CqrsEventMap = Record<string, unknown>>(cqrsGraph: CqrsGraph<EM>, name: string, opts: ProcessManagerOpts<TState, EM>): ProcessManagerResult<TState>;
|
|
342
|
-
|
|
343
|
-
type index_ProcessCompensate<TState> = ProcessCompensate<TState>;
|
|
344
|
-
type index_ProcessInstance<TState> = ProcessInstance<TState>;
|
|
345
|
-
type index_ProcessManagerOpts<TState, EM extends CqrsEventMap> = ProcessManagerOpts<TState, EM>;
|
|
346
|
-
type index_ProcessManagerResult<TState> = ProcessManagerResult<TState>;
|
|
347
|
-
type index_ProcessSchedule = ProcessSchedule;
|
|
348
|
-
type index_ProcessStateSnapshot<TState> = ProcessStateSnapshot<TState>;
|
|
349
|
-
type index_ProcessStep<TState, EM extends CqrsEventMap, K extends keyof EM & string> = ProcessStep<TState, EM, K>;
|
|
350
|
-
type index_ProcessStepResult<TState> = ProcessStepResult<TState>;
|
|
351
|
-
declare const index_processInstanceKeyOf: typeof processInstanceKeyOf;
|
|
352
|
-
declare const index_processManager: typeof processManager;
|
|
353
|
-
declare const index_processStateKeyOf: typeof processStateKeyOf;
|
|
354
|
-
declare namespace index {
|
|
355
|
-
export { type index_ProcessCompensate as ProcessCompensate, type index_ProcessInstance as ProcessInstance, type index_ProcessManagerOpts as ProcessManagerOpts, type index_ProcessManagerResult as ProcessManagerResult, type index_ProcessSchedule as ProcessSchedule, type index_ProcessStateSnapshot as ProcessStateSnapshot, type index_ProcessStep as ProcessStep, type index_ProcessStepResult as ProcessStepResult, index_processInstanceKeyOf as processInstanceKeyOf, index_processManager as processManager, index_processStateKeyOf as processStateKeyOf };
|
|
356
|
-
}
|
|
357
|
-
|
|
358
|
-
export { type ProcessCompensate as P, type ProcessInstance as a, type ProcessManagerOpts as b, type ProcessManagerResult as c, type ProcessSchedule as d, type ProcessStateSnapshot as e, type ProcessStep as f, type ProcessStepResult as g, processManager as h, index as i, processStateKeyOf as j, processInstanceKeyOf as p };
|
package/dist/index-sqkqlb1p.d.ts
DELETED
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
import { G as Graph } from './graph-D9LFnda9.js';
|
|
2
|
-
|
|
3
|
-
/** Zustand-compatible Store API. */
|
|
4
|
-
interface StoreApi<T> {
|
|
5
|
-
getState: () => T;
|
|
6
|
-
setState: (partial: T | Partial<T> | ((state: T) => T | Partial<T>), replace?: boolean) => void;
|
|
7
|
-
getInitialState: () => T;
|
|
8
|
-
subscribe: (listener: (state: T, prevState: T) => void) => () => void;
|
|
9
|
-
destroy: () => void;
|
|
10
|
-
}
|
|
11
|
-
/** Function type for initializing the store. */
|
|
12
|
-
type StateCreator<T> = (set: StoreApi<T>["setState"], get: StoreApi<T>["getState"], api: StoreApi<T>) => T;
|
|
13
|
-
/**
|
|
14
|
-
* Creates a Zustand-compatible store backed by a GraphReFly state node.
|
|
15
|
-
* returns an object that is both a Graph and a StoreApi.
|
|
16
|
-
*
|
|
17
|
-
* @example
|
|
18
|
-
* ```ts
|
|
19
|
-
* const store = create((set) => ({
|
|
20
|
-
* count: 0,
|
|
21
|
-
* inc: () => set((s) => ({ count: s.count + 1 }))
|
|
22
|
-
* }));
|
|
23
|
-
* store.getState().inc();
|
|
24
|
-
* ```
|
|
25
|
-
*
|
|
26
|
-
* @category compat
|
|
27
|
-
*/
|
|
28
|
-
declare function create<T extends object>(initializer: StateCreator<T>): Graph & StoreApi<T>;
|
|
29
|
-
|
|
30
|
-
type index_StateCreator<T> = StateCreator<T>;
|
|
31
|
-
type index_StoreApi<T> = StoreApi<T>;
|
|
32
|
-
declare const index_create: typeof create;
|
|
33
|
-
declare namespace index {
|
|
34
|
-
export { type index_StateCreator as StateCreator, type index_StoreApi as StoreApi, index_create as create };
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
export { type StateCreator as S, type StoreApi as a, create as c, index as i };
|
|
@@ -1,113 +0,0 @@
|
|
|
1
|
-
import { N as Node, a as NodeOptions } from './node-kK3CvTrR.cjs';
|
|
2
|
-
import { a as GraphOptions, G as Graph } from './graph-CWvEUQAq.cjs';
|
|
3
|
-
|
|
4
|
-
/**
|
|
5
|
-
* Reduction primitives (roadmap §8.1).
|
|
6
|
-
*
|
|
7
|
-
* Composable building blocks for taking heterogeneous massive inputs and producing
|
|
8
|
-
* prioritized, auditable, human-actionable output. Each primitive is either a Graph
|
|
9
|
-
* factory or a Node factory, built on top of core + extra primitives.
|
|
10
|
-
*
|
|
11
|
-
* @module
|
|
12
|
-
*/
|
|
13
|
-
|
|
14
|
-
type StepRef = string | Node<unknown>;
|
|
15
|
-
/** A named stage for {@link funnel}. */
|
|
16
|
-
type FunnelStage = {
|
|
17
|
-
/** Stage name (mounted as subgraph). */
|
|
18
|
-
name: string;
|
|
19
|
-
/** Builder: receives a sub-graph, should add an `"input"` and `"output"` node. */
|
|
20
|
-
build: (sub: Graph) => void;
|
|
21
|
-
};
|
|
22
|
-
/** Options for {@link funnel}. */
|
|
23
|
-
type FunnelOptions = GraphOptions & {
|
|
24
|
-
meta?: Record<string, unknown>;
|
|
25
|
-
};
|
|
26
|
-
/**
|
|
27
|
-
* Multi-source merge with sequential reduction stages.
|
|
28
|
-
*
|
|
29
|
-
* Sources are merged into a single stream. Each stage is a named subgraph
|
|
30
|
-
* (mounted via `graph.mount()`). Stages connect linearly:
|
|
31
|
-
* `merged → stage[0].input → stage[0].output → stage[1].input → ...`
|
|
32
|
-
*
|
|
33
|
-
* @param name - Graph name.
|
|
34
|
-
* @param sources - Input nodes to merge.
|
|
35
|
-
* @param stages - Sequential reduction stages.
|
|
36
|
-
* @param opts - Optional graph/meta options.
|
|
37
|
-
* @returns Graph with `"merged"` and mounted stage subgraphs.
|
|
38
|
-
*
|
|
39
|
-
* @category patterns
|
|
40
|
-
*/
|
|
41
|
-
declare function funnel<T>(name: string, sources: ReadonlyArray<Node<T>>, stages: ReadonlyArray<FunnelStage>, opts?: FunnelOptions): Graph;
|
|
42
|
-
/** Options for {@link feedback}. */
|
|
43
|
-
type FeedbackOptions = {
|
|
44
|
-
/** Maximum feedback iterations before stopping (default: 10). */
|
|
45
|
-
maxIterations?: number;
|
|
46
|
-
/** Optional budget gate node path for cost-bounded iteration. */
|
|
47
|
-
budgetNode?: StepRef;
|
|
48
|
-
meta?: Record<string, unknown>;
|
|
49
|
-
};
|
|
50
|
-
/**
|
|
51
|
-
* Introduce a bounded reactive cycle into an existing graph.
|
|
52
|
-
*
|
|
53
|
-
* When `condition` emits a non-null DATA value, the feedback effect routes it
|
|
54
|
-
* back to the `reentry` state node — creating a cycle. Bounded by
|
|
55
|
-
* `maxIterations` (default 10). The counter node (`__feedback_<condition>`)
|
|
56
|
-
* is the source of truth — reset it to 0 to allow more iterations.
|
|
57
|
-
*
|
|
58
|
-
* To remove the feedback cycle, call `graph.remove("__feedback_<condition>")`.
|
|
59
|
-
*
|
|
60
|
-
* @param graph - Existing graph to augment with a feedback cycle.
|
|
61
|
-
* @param condition - Path to a node whose DATA triggers feedback.
|
|
62
|
-
* @param reentry - Path to a state node that receives the feedback value.
|
|
63
|
-
* @param opts - Iteration bounds and metadata.
|
|
64
|
-
* @returns The same graph (mutated with feedback nodes added).
|
|
65
|
-
*
|
|
66
|
-
* @category patterns
|
|
67
|
-
*/
|
|
68
|
-
declare function feedback(graph: Graph, condition: string, reentry: string, opts?: FeedbackOptions): Graph;
|
|
69
|
-
/** A scored item with full breakdown. */
|
|
70
|
-
type ScoredItem<T = unknown> = {
|
|
71
|
-
/** Original value. */
|
|
72
|
-
value: T;
|
|
73
|
-
/** Final weighted score. */
|
|
74
|
-
score: number;
|
|
75
|
-
/** Per-signal breakdown: signal index → weighted contribution. */
|
|
76
|
-
breakdown: number[];
|
|
77
|
-
};
|
|
78
|
-
/** Options for {@link scorer}. */
|
|
79
|
-
type ScorerOptions = Omit<NodeOptions<unknown>, "describeKind" | "name" | "meta"> & {
|
|
80
|
-
meta?: Record<string, unknown>;
|
|
81
|
-
/** Custom scoring function per signal. Default: identity (signal value IS the score). */
|
|
82
|
-
scoreFns?: ReadonlyArray<(value: unknown) => number>;
|
|
83
|
-
};
|
|
84
|
-
/**
|
|
85
|
-
* Reactive multi-signal scoring with live weights.
|
|
86
|
-
*
|
|
87
|
-
* Each source emits items to score. Weights are reactive state nodes that
|
|
88
|
-
* LLM or human can adjust live. Output is sorted scored items with full
|
|
89
|
-
* breakdown.
|
|
90
|
-
*
|
|
91
|
-
* @param sources - Signal nodes (each emits a numeric score dimension).
|
|
92
|
-
* @param weights - Reactive weight nodes (one per source).
|
|
93
|
-
* @param opts - Optional node/meta options.
|
|
94
|
-
* @returns Node emitting scored output.
|
|
95
|
-
*
|
|
96
|
-
* @category patterns
|
|
97
|
-
*/
|
|
98
|
-
declare function scorer(sources: ReadonlyArray<Node<number>>, weights: ReadonlyArray<Node<number>>, opts?: ScorerOptions): Node<ScoredItem<number[]>>;
|
|
99
|
-
|
|
100
|
-
type index_FeedbackOptions = FeedbackOptions;
|
|
101
|
-
type index_FunnelOptions = FunnelOptions;
|
|
102
|
-
type index_FunnelStage = FunnelStage;
|
|
103
|
-
type index_ScoredItem<T = unknown> = ScoredItem<T>;
|
|
104
|
-
type index_ScorerOptions = ScorerOptions;
|
|
105
|
-
type index_StepRef = StepRef;
|
|
106
|
-
declare const index_feedback: typeof feedback;
|
|
107
|
-
declare const index_funnel: typeof funnel;
|
|
108
|
-
declare const index_scorer: typeof scorer;
|
|
109
|
-
declare namespace index {
|
|
110
|
-
export { type index_FeedbackOptions as FeedbackOptions, type index_FunnelOptions as FunnelOptions, type index_FunnelStage as FunnelStage, type index_ScoredItem as ScoredItem, type index_ScorerOptions as ScorerOptions, type index_StepRef as StepRef, index_feedback as feedback, index_funnel as funnel, index_scorer as scorer };
|
|
111
|
-
}
|
|
112
|
-
|
|
113
|
-
export { type FeedbackOptions as F, type ScoredItem as S, type FunnelOptions as a, type FunnelStage as b, type ScorerOptions as c, type StepRef as d, funnel as e, feedback as f, index as i, scorer as s };
|