@graphrefly/graphrefly 0.38.0 → 0.39.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/budget-gate-CmmVtasH.d.ts +115 -0
- package/dist/budget-gate-DiP_nK0n.d.cts +115 -0
- package/dist/{cascading-BsJ4GbnS.d.ts → cascading-BzuxW0_w.d.cts} +2 -2
- package/dist/{cascading-B25wxpRa.d.cts → cascading-g2_rhhaM.d.ts} +2 -2
- package/dist/chunk-35JTVPOX.js +1 -0
- package/dist/chunk-3G5U5QNE.js +5 -0
- package/dist/{chunk-PHXZRR6C.js → chunk-4I45FVQS.js} +1 -1
- package/dist/chunk-5LK7XMEV.js +1 -0
- package/dist/{chunk-FWGIZP3W.js → chunk-5XRI6RM3.js} +1 -1
- package/dist/chunk-73PBQNST.js +1 -0
- package/dist/chunk-7JRF5YEK.js +3 -0
- package/dist/{chunk-4BDQXBXE.js → chunk-7NZMZJMW.js} +1 -1
- package/dist/chunk-7QFRK3N3.js +84 -0
- package/dist/{chunk-POCWFIJ7.js → chunk-7SD73DS6.js} +1 -1
- package/dist/{chunk-NBGPXQSP.js → chunk-A6ZSKGUG.js} +1 -1
- package/dist/{chunk-7KZZLWZ6.js → chunk-AU7YTQX7.js} +1 -1
- package/dist/chunk-C72GO4IZ.js +1 -0
- package/dist/{chunk-B5S7KTGP.js → chunk-CGDMTXSY.js} +1 -1
- package/dist/chunk-D27JNOLZ.js +1 -0
- package/dist/chunk-D47YVDR5.js +1 -0
- package/dist/chunk-EWF7KCDJ.js +61 -0
- package/dist/{chunk-IBGE62GZ.js → chunk-GEAO3TL3.js} +1 -1
- package/dist/chunk-GX5LSSRE.js +1 -0
- package/dist/{chunk-O245YLM5.js → chunk-HAWKGIXM.js} +1 -1
- package/dist/chunk-HX3EGQ5Z.js +1 -0
- package/dist/{chunk-RZ5HKPGI.js → chunk-IA7DUNGB.js} +1 -1
- package/dist/{chunk-K5C67OGE.js → chunk-INH6FS2G.js} +2 -2
- package/dist/chunk-INHC33EH.js +1 -0
- package/dist/chunk-IUB4NYI2.js +1 -0
- package/dist/{chunk-UVLZX2OU.js → chunk-JNMC2WJ6.js} +1 -1
- package/dist/{chunk-O2BLVQU4.js → chunk-KD4NHLMU.js} +1 -1
- package/dist/chunk-L6NSJVJZ.js +1 -0
- package/dist/{chunk-6773HURD.js → chunk-L7WY6TZS.js} +1 -1
- package/dist/chunk-LQNOXGET.js +1 -0
- package/dist/chunk-MC4UYY2X.js +1 -0
- package/dist/{chunk-6KZZ6XQE.js → chunk-N7UIBZCW.js} +1 -1
- package/dist/chunk-NQI2C36M.js +1 -0
- package/dist/chunk-R75BMDLA.js +1 -0
- package/dist/chunk-RF3QZP6D.js +1 -0
- package/dist/{chunk-NV63VQHI.js → chunk-S2U57TFC.js} +1 -1
- package/dist/{chunk-SP5O2MIX.js → chunk-SC7BQDNP.js} +1 -1
- package/dist/{chunk-6VFC334U.js → chunk-TFPZLQ5H.js} +1 -1
- package/dist/chunk-VJJLIEAL.js +1 -0
- package/dist/{chunk-FAYEMS5M.js → chunk-WHIZM6JV.js} +1 -1
- package/dist/chunk-XEUANKBO.js +43 -0
- package/dist/{chunk-DSOVKKTI.js → chunk-XQ55HO5N.js} +1 -1
- package/dist/chunk-ZJ7SM3G2.js +1 -0
- package/dist/{chunk-TMVY7OWG.js → chunk-ZOX3LBRV.js} +1 -1
- package/dist/compat/index.cjs +9 -13
- package/dist/compat/index.d.cts +16 -16
- package/dist/compat/index.d.ts +16 -16
- package/dist/compat/index.js +1 -1
- package/dist/compat/jotai/index.d.cts +2 -2
- package/dist/compat/jotai/index.d.ts +2 -2
- package/dist/compat/nanostores/index.d.cts +2 -2
- package/dist/compat/nanostores/index.d.ts +2 -2
- package/dist/compat/nestjs/index.cjs +7 -11
- package/dist/compat/nestjs/index.d.cts +8 -8
- package/dist/compat/nestjs/index.d.ts +8 -8
- package/dist/compat/nestjs/index.js +1 -1
- package/dist/compat/react/index.d.cts +2 -2
- package/dist/compat/react/index.d.ts +2 -2
- package/dist/compat/solid/index.d.cts +2 -2
- package/dist/compat/solid/index.d.ts +2 -2
- package/dist/compat/svelte/index.d.cts +2 -2
- package/dist/compat/svelte/index.d.ts +2 -2
- package/dist/compat/vue/index.d.cts +2 -2
- package/dist/compat/vue/index.d.ts +2 -2
- package/dist/compat/zustand/index.cjs +3 -7
- package/dist/compat/zustand/index.d.cts +4 -4
- package/dist/compat/zustand/index.d.ts +4 -4
- package/dist/compat/zustand/index.js +1 -1
- package/dist/{composite-CgG0MqHm.d.cts → composite-CKd0e2vz.d.cts} +2 -2
- package/dist/{composite-DTOlDuch.d.ts → composite-DGatA-JK.d.ts} +2 -2
- package/dist/core/index.cjs +1 -1
- package/dist/core/index.d.cts +4 -4
- package/dist/core/index.d.ts +4 -4
- package/dist/core/index.js +1 -1
- package/dist/extra/browser.d.cts +1 -1
- package/dist/extra/browser.d.ts +1 -1
- package/dist/extra/index.cjs +16 -20
- package/dist/extra/index.d.cts +11 -9
- package/dist/extra/index.d.ts +11 -9
- package/dist/extra/index.js +1 -1
- package/dist/extra/node.cjs +2 -2
- package/dist/extra/node.d.cts +1 -1
- package/dist/extra/node.d.ts +1 -1
- package/dist/extra/node.js +1 -1
- package/dist/extra/operators.cjs +1 -1
- package/dist/extra/operators.d.cts +1 -1
- package/dist/extra/operators.d.ts +1 -1
- package/dist/extra/operators.js +1 -1
- package/dist/extra/reactive.cjs +1 -1
- package/dist/extra/reactive.d.cts +3 -3
- package/dist/extra/reactive.d.ts +3 -3
- package/dist/extra/reactive.js +1 -1
- package/dist/extra/render/index.cjs +5 -0
- package/dist/extra/render/index.d.cts +183 -0
- package/dist/extra/render/index.d.ts +183 -0
- package/dist/extra/render/index.js +1 -0
- package/dist/extra/sources.cjs +1 -1
- package/dist/extra/sources.d.cts +1 -1
- package/dist/extra/sources.d.ts +1 -1
- package/dist/extra/sources.js +1 -1
- package/dist/extra/storage-browser.d.cts +1 -1
- package/dist/extra/storage-browser.d.ts +1 -1
- package/dist/{fallback-axI2cXwt.d.cts → fallback-8JYU8tlT.d.cts} +1 -1
- package/dist/{fallback-DuEXfA4F.d.ts → fallback-CMZl39L5.d.ts} +1 -1
- package/dist/graph/index.cjs +7 -7
- package/dist/graph/index.d.cts +5 -5
- package/dist/graph/index.d.ts +5 -5
- package/dist/graph/index.js +1 -1
- package/dist/{graph-BjW1taJl.d.ts → graph-30XSgtVX.d.ts} +76 -100
- package/dist/{graph-CHsVwf9S.d.cts → graph-BUwMAxJI.d.cts} +76 -100
- package/dist/{index-CIcu6fIR.d.ts → index-2n8Eai6M.d.ts} +1 -1
- package/dist/{index-CrlHFsiT.d.ts → index-89FczVZ_.d.ts} +41 -85
- package/dist/{index-CM-i58FY.d.cts → index-8R1vzNOx.d.cts} +9 -9
- package/dist/{index-CDvC1m5p.d.ts → index-B2RUoIUz.d.ts} +1 -1
- package/dist/{index-BFaALJxR.d.ts → index-B41Asm7D.d.ts} +10 -8
- package/dist/{index-D-HZ7sP4.d.ts → index-B9fmw5n2.d.ts} +4 -6
- package/dist/{index-Bn0uZEL4.d.ts → index-BAlaVimV.d.ts} +9 -9
- package/dist/{index-DJVQ-t07.d.ts → index-BC9VybQs.d.ts} +41 -48
- package/dist/{index-5dNRlW7J.d.ts → index-BEHmxORq.d.ts} +11 -11
- package/dist/{index-DJNAWzcH.d.cts → index-BJ26eEjs.d.cts} +26 -19
- package/dist/{index-BiomL7AW.d.ts → index-BJSZxSFX.d.ts} +1 -1
- package/dist/{index-Czk3r0yA.d.cts → index-BKMdnYnk.d.ts} +56 -54
- package/dist/{index-BsZk9T8y.d.ts → index-BM9szD8n.d.cts} +14 -6
- package/dist/{index-BmWuVdER.d.ts → index-BUPVld1w.d.ts} +2 -2
- package/dist/{index-BwOsJfLJ.d.ts → index-BXd6OMEy.d.ts} +3 -3
- package/dist/index-BhUaMYm_.d.ts +113 -0
- package/dist/{index-BpMZzX9P.d.cts → index-BndG0cpK.d.cts} +3 -3
- package/dist/{index-AUqWe_fX.d.ts → index-Br3WnqEn.d.ts} +81 -9
- package/dist/{index-BhzwpIJc.d.cts → index-BskfDoZ_.d.ts} +14 -6
- package/dist/{index-D9vBTuzo.d.ts → index-C19qqa38.d.ts} +4 -4
- package/dist/{index-B-ORMr3k.d.ts → index-C7VV_qOs.d.ts} +4 -4
- package/dist/{index-BWUMIt7J.d.cts → index-CIRG8Hxp.d.cts} +11 -11
- package/dist/{index-B3D_z0Z6.d.cts → index-CL7oilfm.d.cts} +1 -1
- package/dist/{index-ML6vHKXK.d.ts → index-CPhBvRJU.d.ts} +1 -1
- package/dist/{index-CQsqqEVz.d.cts → index-CWHtYmSh.d.cts} +1 -1
- package/dist/{index-DKrIuF-r.d.ts → index-Cey6VTnX.d.ts} +8 -5
- package/dist/{resilience-BWP2c7Af.d.cts → index-CmqiJZKM.d.ts} +141 -23
- package/dist/{index-JYtN9uqM.d.ts → index-CoM4rzyB.d.ts} +1 -1
- package/dist/{index-C56XZiDe.d.cts → index-CpLpJb6A.d.cts} +8 -5
- package/dist/{index-BjWZARLy.d.ts → index-Ctb7_2sG.d.ts} +1 -1
- package/dist/index-CusEP3Sv.d.ts +210 -0
- package/dist/{resilience-Bys63Cpd.d.ts → index-CwP_KAMS.d.cts} +141 -23
- package/dist/{index-BFuVcqL8.d.cts → index-D3ayz3hy.d.cts} +1 -1
- package/dist/{index-Bpr0Pwgl.d.cts → index-DCbE8fFM.d.cts} +3 -3
- package/dist/{index-CAbHN_rP.d.cts → index-DIHcMLr6.d.cts} +1 -1
- package/dist/index-DINuaZlJ.d.cts +210 -0
- package/dist/{index-9xhIaM-w.d.cts → index-DOBLxOti.d.cts} +1 -1
- package/dist/{index-Di7OdwlO.d.ts → index-DQUVq1_d.d.ts} +37 -90
- package/dist/{index-BgzPO43H.d.cts → index-DTtBpuQy.d.cts} +4 -6
- package/dist/{index-D_QQ_dTD.d.cts → index-DYTBbF8T.d.cts} +1 -1
- package/dist/{index-UsU9ptzs.d.cts → index-DlgHqQxW.d.cts} +81 -9
- package/dist/{index-DTDVDzhA.d.ts → index-DlrWu9Hs.d.cts} +56 -54
- package/dist/{index-B2IUcH13.d.cts → index-DoYc8BWK.d.cts} +41 -48
- package/dist/{index-BUFCHvOR.d.ts → index-DszPlZzK.d.ts} +3 -3
- package/dist/{index-BqcgiSQg.d.cts → index-DyM4tFAe.d.cts} +10 -8
- package/dist/{index-CAV-3RpJ.d.cts → index-FVoPvhAu.d.cts} +4 -4
- package/dist/{index-Ckil6miL.d.cts → index-H_I66pav.d.cts} +2 -2
- package/dist/{index-C-3UXnHT.d.cts → index-IwFqHxCs.d.cts} +2 -2
- package/dist/index-K-vl_c6A.d.cts +113 -0
- package/dist/{index-CijfwEWx.d.ts → index-KlZ_ZUip.d.cts} +3 -3
- package/dist/{index-Bub6x_D4.d.cts → index-L8XI8Zql.d.cts} +37 -90
- package/dist/{index-DeSsvHDD.d.cts → index-MxYuWOrf.d.cts} +3 -3
- package/dist/{index-CpZKtdMw.d.cts → index-PgwvGWa1.d.cts} +1 -1
- package/dist/{index-Vz7KPfgz.d.ts → index-PlJ3MraE.d.ts} +1 -1
- package/dist/{index-BI1wMfyc.d.ts → index-PqbnoScQ.d.ts} +3 -3
- package/dist/{index-BsgxnHN8.d.cts → index-PsVHpPwP.d.cts} +3 -3
- package/dist/{index-D-B7U42V.d.cts → index-WyFKER-c.d.ts} +3 -3
- package/dist/{index-DY2f2b9z.d.ts → index-eaQuGJnv.d.ts} +3 -3
- package/dist/{index-DqICM_I7.d.ts → index-iTX5IqSP.d.ts} +67 -9
- package/dist/{index-Byp771zP.d.ts → index-jKLph6cu.d.ts} +2 -2
- package/dist/{index-CEVzBWeB.d.ts → index-jr6PuSBt.d.ts} +26 -19
- package/dist/{index-BkQqf1EF.d.cts → index-mNwgxC21.d.cts} +67 -9
- package/dist/{index-BaSy4L6w.d.cts → index-pVDQcbar.d.cts} +41 -85
- package/dist/{index-D7-RSD93.d.cts → index-xZYcDqFH.d.cts} +4 -4
- package/dist/{index-8OxXae3g.d.ts → index-yLt-aPMp.d.ts} +1 -1
- package/dist/{index-CqSJ25A9.d.cts → index-z8WFPVI8.d.cts} +1 -1
- package/dist/index.cjs +63 -59
- package/dist/index.d.cts +48 -47
- package/dist/index.d.ts +48 -47
- package/dist/index.js +1 -1
- package/dist/{meta-DreaEM_a.d.cts → meta-Ct9nqQS5.d.cts} +11 -7
- package/dist/{meta-BYqlATmg.d.ts → meta-D8OyedKp.d.ts} +11 -7
- package/dist/{node-fSc-hCv8.d.cts → node-BYInONRr.d.cts} +3 -3
- package/dist/{node-fSc-hCv8.d.ts → node-BYInONRr.d.ts} +3 -3
- package/dist/{observable-Cqty11jG.d.cts → observable-DMIlYJV1.d.cts} +1 -1
- package/dist/{observable-EAV_rNfM.d.ts → observable-DO8DDEzv.d.ts} +1 -1
- package/dist/patterns/ai/browser.cjs +5 -5
- package/dist/patterns/ai/browser.d.cts +4 -4
- package/dist/patterns/ai/browser.d.ts +4 -4
- package/dist/patterns/ai/browser.js +1 -1
- package/dist/patterns/ai/index.cjs +16 -20
- package/dist/patterns/ai/index.d.cts +17 -17
- package/dist/patterns/ai/index.d.ts +17 -17
- package/dist/patterns/ai/index.js +1 -1
- package/dist/patterns/ai/node.cjs +1 -1
- package/dist/patterns/ai/node.d.cts +4 -4
- package/dist/patterns/ai/node.d.ts +4 -4
- package/dist/patterns/ai/node.js +1 -1
- package/dist/patterns/audit/index.cjs +3 -7
- package/dist/patterns/audit/index.d.cts +6 -6
- package/dist/patterns/audit/index.d.ts +6 -6
- package/dist/patterns/audit/index.js +1 -1
- package/dist/patterns/cqrs/index.cjs +3 -7
- package/dist/patterns/cqrs/index.d.cts +6 -6
- package/dist/patterns/cqrs/index.d.ts +6 -6
- package/dist/patterns/cqrs/index.js +1 -1
- package/dist/patterns/demo-shell/index.cjs +5 -8
- package/dist/patterns/demo-shell/index.d.cts +5 -5
- package/dist/patterns/demo-shell/index.d.ts +5 -5
- package/dist/patterns/demo-shell/index.js +1 -1
- package/dist/patterns/domain-templates/index.cjs +3 -7
- package/dist/patterns/domain-templates/index.d.cts +4 -4
- package/dist/patterns/domain-templates/index.d.ts +4 -4
- package/dist/patterns/domain-templates/index.js +1 -1
- package/dist/patterns/graphspec/index.cjs +37 -37
- package/dist/patterns/graphspec/index.d.cts +5 -5
- package/dist/patterns/graphspec/index.d.ts +5 -5
- package/dist/patterns/graphspec/index.js +1 -1
- package/dist/patterns/guarded-execution/index.cjs +3 -7
- package/dist/patterns/guarded-execution/index.d.cts +7 -7
- package/dist/patterns/guarded-execution/index.d.ts +7 -7
- package/dist/patterns/guarded-execution/index.js +1 -1
- package/dist/patterns/harness/index.cjs +8 -12
- package/dist/patterns/harness/index.d.cts +12 -12
- package/dist/patterns/harness/index.d.ts +12 -12
- package/dist/patterns/harness/index.js +1 -1
- package/dist/patterns/job-queue/index.cjs +3 -7
- package/dist/patterns/job-queue/index.d.cts +6 -6
- package/dist/patterns/job-queue/index.d.ts +6 -6
- package/dist/patterns/job-queue/index.js +1 -1
- package/dist/patterns/lens/index.cjs +3 -7
- package/dist/patterns/lens/index.d.cts +6 -6
- package/dist/patterns/lens/index.d.ts +6 -6
- package/dist/patterns/lens/index.js +1 -1
- package/dist/patterns/memory/index.cjs +3 -7
- package/dist/patterns/memory/index.d.cts +6 -6
- package/dist/patterns/memory/index.d.ts +6 -6
- package/dist/patterns/memory/index.js +1 -1
- package/dist/patterns/messaging/index.cjs +3 -7
- package/dist/patterns/messaging/index.d.cts +5 -5
- package/dist/patterns/messaging/index.d.ts +5 -5
- package/dist/patterns/messaging/index.js +1 -1
- package/dist/patterns/orchestration/index.cjs +3 -7
- package/dist/patterns/orchestration/index.d.cts +8 -8
- package/dist/patterns/orchestration/index.d.ts +8 -8
- package/dist/patterns/orchestration/index.js +1 -1
- package/dist/patterns/process/index.cjs +1 -1
- package/dist/patterns/process/index.d.cts +7 -7
- package/dist/patterns/process/index.d.ts +7 -7
- package/dist/patterns/process/index.js +1 -1
- package/dist/patterns/reactive-layout/index.cjs +4 -8
- package/dist/patterns/reactive-layout/index.d.cts +5 -5
- package/dist/patterns/reactive-layout/index.d.ts +5 -5
- package/dist/patterns/reactive-layout/index.js +1 -1
- package/dist/patterns/reduction/index.cjs +3 -7
- package/dist/patterns/reduction/index.d.cts +4 -4
- package/dist/patterns/reduction/index.d.ts +4 -4
- package/dist/patterns/reduction/index.js +1 -1
- package/dist/patterns/refine-loop/index.cjs +5 -9
- package/dist/patterns/refine-loop/index.d.cts +6 -6
- package/dist/patterns/refine-loop/index.d.ts +6 -6
- package/dist/patterns/refine-loop/index.js +1 -1
- package/dist/patterns/resilient-pipeline/index.cjs +1 -1
- package/dist/patterns/resilient-pipeline/index.d.cts +4 -8
- package/dist/patterns/resilient-pipeline/index.d.ts +4 -8
- package/dist/patterns/resilient-pipeline/index.js +1 -1
- package/dist/patterns/surface/index.cjs +12 -16
- package/dist/patterns/surface/index.d.cts +6 -6
- package/dist/patterns/surface/index.d.ts +6 -6
- package/dist/patterns/surface/index.js +1 -1
- package/dist/{pipeline-graph-DuHpXSOn.d.cts → pipeline-graph-BQPr2Lqs.d.cts} +34 -17
- package/dist/{pipeline-graph-9JBbmRxA.d.ts → pipeline-graph-D8vKcO_p.d.ts} +34 -17
- package/dist/{reactive-layout-BMLDB4Vd.d.cts → reactive-layout-8CSc0tiA.d.cts} +2 -2
- package/dist/{reactive-layout-D-tRiNhg.d.ts → reactive-layout-DkTXxtSy.d.ts} +2 -2
- package/dist/{reactive-log-BgWSA1fg.d.ts → reactive-log-BlAsPLl2.d.ts} +2 -2
- package/dist/{reactive-log-C3IMAGpT.d.cts → reactive-log-_zeEnB9H.d.cts} +2 -2
- package/dist/{reactive-map-DmgeADH8.d.cts → reactive-map-B2qfD3hb.d.cts} +1 -1
- package/dist/{reactive-map-CHyeCf4D.d.ts → reactive-map-jFIsE6Kt.d.ts} +1 -1
- package/dist/resilience-HTF2LBRS.js +1 -0
- package/dist/{sugar-D13E2M_z.d.ts → sugar-BhfjgetH.d.ts} +1 -1
- package/dist/{sugar-DgaGJcI6.d.cts → sugar-DzePN5-g.d.cts} +1 -1
- package/dist/{topology-tree-jrZue3ao.d.cts → topology-tree-B5Ngw3j0.d.cts} +1 -1
- package/dist/{topology-tree-D47-nI6Z.d.ts → topology-tree-BtvbgMXJ.d.ts} +1 -1
- package/dist/{types-BMSGPlpO.d.cts → types-1Dhoi7HM.d.cts} +1 -1
- package/dist/{types-CidcBDuk.d.ts → types-39jk0kaV.d.ts} +1 -1
- package/package.json +11 -1
- package/dist/chunk-2YFDSYEF.js +0 -1
- package/dist/chunk-5BGFS2XH.js +0 -1
- package/dist/chunk-CMTN3KPT.js +0 -80
- package/dist/chunk-DQJLC6YY.js +0 -1
- package/dist/chunk-G7JN6LCB.js +0 -1
- package/dist/chunk-KJEAIIIY.js +0 -43
- package/dist/chunk-LV3ACS5J.js +0 -1
- package/dist/chunk-NN3QPJ6U.js +0 -1
- package/dist/chunk-NSAZ6PR6.js +0 -1
- package/dist/chunk-O32GJOUJ.js +0 -1
- package/dist/chunk-QEVSIVSF.js +0 -1
- package/dist/chunk-QMC2PLNM.js +0 -7
- package/dist/chunk-QOJFR6GS.js +0 -1
- package/dist/chunk-SFK7MN7S.js +0 -1
- package/dist/chunk-TB7JKSVS.js +0 -61
- package/dist/chunk-UAXFKMAG.js +0 -1
- package/dist/chunk-XIMFHEKV.js +0 -1
- package/dist/chunk-XLMYQB6F.js +0 -1
- package/dist/chunk-XLYF4LBH.js +0 -1
- package/dist/imperative-audit-ahAE65a9.d.cts +0 -28
- package/dist/imperative-audit-ahAE65a9.d.ts +0 -28
- package/dist/index-CpdnP-0y.d.cts +0 -186
- package/dist/index-DOU1Ee_k.d.ts +0 -186
- package/dist/resilience-LGBK236C.js +0 -1
|
@@ -1,17 +1,19 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
1
|
+
import { N as Node } from './node-BYInONRr.cjs';
|
|
2
|
+
import { B as BaseAuditRecord } from './index-DINuaZlJ.cjs';
|
|
3
|
+
import { a as ReactiveLogBundle } from './reactive-log-_zeEnB9H.cjs';
|
|
4
|
+
import { G as Graph } from './graph-BUwMAxJI.cjs';
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
7
|
* Memory patterns (roadmap §4.3) — public-face Phase-4 primitives audited under
|
|
8
8
|
* `archive/docs/SESSION-public-face-blocks-review.md` (Wave A, locked 2026-04-25).
|
|
9
9
|
*
|
|
10
|
-
*
|
|
11
|
-
*
|
|
12
|
-
*
|
|
13
|
-
*
|
|
14
|
-
*
|
|
10
|
+
* Three primitives (the pure `decay` helper was promoted to `extra/utils/decay.ts`
|
|
11
|
+
* per Tier 2.2 and is no longer re-exported here; `lightCollection` was folded
|
|
12
|
+
* into `collection({ranked:false})` per Tier 2.3 and is no longer a separate
|
|
13
|
+
* factory):
|
|
14
|
+
* - {@link collection} / {@link CollectionGraph} — keyed memory store with
|
|
15
|
+
* optional decay-aware ranking. Pass `{ ranked: false }` for the previous
|
|
16
|
+
* `lightCollection` shape (Map + LRU + audit, no scoring).
|
|
15
17
|
* - {@link vectorIndex} / {@link VectorIndexGraph} — reactive vector store with
|
|
16
18
|
* optional HNSW backend, retention, and reactive {@link VectorIndexGraph.searchNode}.
|
|
17
19
|
* - {@link knowledgeGraph} / {@link KnowledgeGraph} — entities + typed edges with
|
|
@@ -29,23 +31,6 @@ import { B as BaseAuditRecord } from './imperative-audit-ahAE65a9.cjs';
|
|
|
29
31
|
* @module
|
|
30
32
|
*/
|
|
31
33
|
|
|
32
|
-
/**
|
|
33
|
-
* Exponential decay with floor: `score = max(minScore, baseScore * exp(-ratePerSecond * ageSeconds))`.
|
|
34
|
-
*
|
|
35
|
-
* Tolerant fallbacks (deliberate for use inside reactive derived fns):
|
|
36
|
-
* - non-finite `baseScore` → `minScore`
|
|
37
|
-
* - non-positive `ageSeconds` (incl. clock skew) → `max(minScore, baseScore)` (no decay)
|
|
38
|
-
* - non-positive `ratePerSecond` → `max(minScore, baseScore)` (no decay; rate=0 disables)
|
|
39
|
-
*
|
|
40
|
-
* Underflow boundary: `Math.exp(-745) === 0`. For very long ages × rates the
|
|
41
|
-
* result clamps to `minScore`; if you need slow decay over years, choose a
|
|
42
|
-
* smaller `ratePerSecond` rather than relying on graceful underflow.
|
|
43
|
-
*
|
|
44
|
-
* Half-life conversion: `ratePerSecond = Math.LN2 / halfLifeSeconds`.
|
|
45
|
-
*
|
|
46
|
-
* @category memory
|
|
47
|
-
*/
|
|
48
|
-
declare function decay(baseScore: number, ageSeconds: number, ratePerSecond: number, minScore?: number): number;
|
|
49
34
|
/**
|
|
50
35
|
* Cosine similarity over `(a, b)`. When lengths differ, the shorter is
|
|
51
36
|
* implicitly zero-padded to the longer length. Returns `0` if either vector
|
|
@@ -66,66 +51,11 @@ declare function decay(baseScore: number, ageSeconds: number, ratePerSecond: num
|
|
|
66
51
|
declare function cosineSimilarity(a: readonly number[], b: readonly number[]): number;
|
|
67
52
|
/** Public alias for the `Node | value` shape accepted by reactive read factories. */
|
|
68
53
|
type NodeOrValue<T> = T | Node<T>;
|
|
69
|
-
type
|
|
54
|
+
type CollectionEntry<T> = {
|
|
70
55
|
readonly id: string;
|
|
71
56
|
readonly value: T;
|
|
72
57
|
readonly createdAtNs: number;
|
|
73
58
|
readonly lastAccessNs: number;
|
|
74
|
-
};
|
|
75
|
-
type LightCollectionOptions = {
|
|
76
|
-
name?: string;
|
|
77
|
-
maxSize?: number;
|
|
78
|
-
};
|
|
79
|
-
interface LightCollectionAuditRecord extends BaseAuditRecord {
|
|
80
|
-
readonly action: "upsert" | "remove" | "clear";
|
|
81
|
-
readonly id?: string;
|
|
82
|
-
}
|
|
83
|
-
type LightCollectionBundle<T> = {
|
|
84
|
-
readonly entries: Node<ReadonlyMap<string, LightCollectionEntry<T>>>;
|
|
85
|
-
readonly events: ReactiveLogBundle<LightCollectionAuditRecord>;
|
|
86
|
-
upsert: (id: string, value: T) => void;
|
|
87
|
-
remove: (id: string) => void;
|
|
88
|
-
clear: () => void;
|
|
89
|
-
itemNode: (id: NodeOrValue<string>) => Node<LightCollectionEntry<T> | undefined>;
|
|
90
|
-
hasNode: (id: NodeOrValue<string>) => Node<boolean>;
|
|
91
|
-
};
|
|
92
|
-
/**
|
|
93
|
-
* Reactive Map of {@link LightCollectionEntry} with native LRU eviction by
|
|
94
|
-
* `maxSize`. Backed by `reactiveMap` so iteration order, snapshot delivery,
|
|
95
|
-
* and copy-on-write semantics match the rest of the data-structure tier.
|
|
96
|
-
*
|
|
97
|
-
* **No-Graph composition.** `bundle.entries` is a detached `state()` — mount
|
|
98
|
-
* manually with `parent.add(bundle.entries)` for `describe()` / `lens.flow`
|
|
99
|
-
* coverage.
|
|
100
|
-
*
|
|
101
|
-
* **`createdAtNs` preservation.** Re-upserting an existing id keeps the
|
|
102
|
-
* original `createdAtNs`; only `lastAccessNs` advances. Eviction is purely
|
|
103
|
-
* LRU-by-`lastAccessNs` (newest wins) via `reactiveMap`'s native `maxSize`.
|
|
104
|
-
*
|
|
105
|
-
* **No imperative reads.** Per the no-imperative-reads policy: subscribe to
|
|
106
|
-
* `entries` for the live snapshot, or use `itemNode(id)` / `hasNode(id)` for
|
|
107
|
-
* single-key reactive reads. For one-shot snapshots use `firstValueFrom` or
|
|
108
|
-
* `node.cache` after `awaitSettled`.
|
|
109
|
-
*
|
|
110
|
-
* **Audit log freeze contract.** Mutations are wrapped via `lightMutation`,
|
|
111
|
-
* which deep-freezes args at entry by default (per the Audit 2 framework).
|
|
112
|
-
* That means the `value` you pass to `upsert(id, value)` is frozen by the
|
|
113
|
-
* time it lands in `LightCollectionEntry.value`. If you store mutable
|
|
114
|
-
* payloads and need them mutable post-upsert, opt out via `lightMutation`'s
|
|
115
|
-
* `freeze: false` (currently internal — not exposed on the bundle; if you
|
|
116
|
-
* hit this, file in `docs/optimizations.md`).
|
|
117
|
-
*
|
|
118
|
-
* **Audit no-op records.** Mutations record an audit entry even when the
|
|
119
|
-
* impl was a no-op (`remove(id)` for a missing id, `clear()` on empty store).
|
|
120
|
-
* The framework records attempts, not state changes — this is intentional
|
|
121
|
-
* (see `_internal/imperative-audit.ts` rationale). Audit consumers that
|
|
122
|
-
* reconstruct state by replaying records can ignore no-op redundant entries
|
|
123
|
-
* without losing correctness.
|
|
124
|
-
*
|
|
125
|
-
* @category memory
|
|
126
|
-
*/
|
|
127
|
-
declare function lightCollection<T>(opts?: LightCollectionOptions): LightCollectionBundle<T>;
|
|
128
|
-
type CollectionEntry<T> = LightCollectionEntry<T> & {
|
|
129
59
|
readonly baseScore: number;
|
|
130
60
|
};
|
|
131
61
|
type RankedCollectionEntry<T> = CollectionEntry<T> & {
|
|
@@ -134,11 +64,22 @@ type RankedCollectionEntry<T> = CollectionEntry<T> & {
|
|
|
134
64
|
type CollectionScoreFn<T> = (value: T) => number;
|
|
135
65
|
type CollectionOptions<T> = {
|
|
136
66
|
maxSize?: number;
|
|
67
|
+
/**
|
|
68
|
+
* Whether to expose a live decay-aware `ranked` node + `rescore` mutator.
|
|
69
|
+
* Default `true`. Pass `false` to fold in the previous `lightCollection`
|
|
70
|
+
* shape — entries are still keyed/audited/LRU-evicted, but the timer-driven
|
|
71
|
+
* `ranked` + scoring machinery is skipped. `ranked` then resolves to a
|
|
72
|
+
* static empty array Node and `rescore()` is a no-op (so callers writing
|
|
73
|
+
* type-generic code don't need to special-case the unranked path).
|
|
74
|
+
*/
|
|
75
|
+
ranked?: boolean;
|
|
137
76
|
/**
|
|
138
77
|
* Produces a base score at insert/update time. Static fn or a reactive
|
|
139
78
|
* `Node<(value: T) => number>` — when supplied as a Node, `ranked` re-derives
|
|
140
79
|
* whenever the score fn changes, but `baseScore` on each entry is only
|
|
141
80
|
* recomputed via {@link CollectionGraph.rescore}. Default `() => 1`.
|
|
81
|
+
*
|
|
82
|
+
* Ignored when `ranked: false` (entries record `baseScore: 0`).
|
|
142
83
|
*/
|
|
143
84
|
score?: CollectionScoreFn<T> | Node<CollectionScoreFn<T>>;
|
|
144
85
|
/**
|
|
@@ -146,6 +87,8 @@ type CollectionOptions<T> = {
|
|
|
146
87
|
* positive, `ranked` becomes fully reactive on time via a `fromTimer` source
|
|
147
88
|
* (cadence auto-derived from `decayRate` unless overridden via
|
|
148
89
|
* `refreshIntervalMs`). Half-life: `ratePerSecond = Math.LN2 / halfLifeSeconds`.
|
|
90
|
+
*
|
|
91
|
+
* Ignored when `ranked: false`.
|
|
149
92
|
*/
|
|
150
93
|
decayRate?: number;
|
|
151
94
|
/** Minimum score floor after decay. Default `0`. */
|
|
@@ -164,6 +107,11 @@ interface CollectionAuditRecord extends BaseAuditRecord {
|
|
|
164
107
|
type CollectionGraph<T> = Graph & {
|
|
165
108
|
readonly events: ReactiveLogBundle<CollectionAuditRecord>;
|
|
166
109
|
readonly items: Node<ReadonlyMap<string, CollectionEntry<T>>>;
|
|
110
|
+
/**
|
|
111
|
+
* Live decay-aware ranking, sorted by score descending. When the
|
|
112
|
+
* collection was constructed with `ranked: false`, this is a static
|
|
113
|
+
* empty-array Node (kept for type uniformity).
|
|
114
|
+
*/
|
|
167
115
|
readonly ranked: Node<readonly RankedCollectionEntry<T>[]>;
|
|
168
116
|
readonly size: Node<number>;
|
|
169
117
|
upsert: (id: string, value: T, opts?: {
|
|
@@ -175,9 +123,14 @@ type CollectionGraph<T> = Graph & {
|
|
|
175
123
|
* Recompute every entry's `baseScore` via the latest score fn. O(N). Useful
|
|
176
124
|
* when a reactive `score` Node has emitted a new fn and the caller wants
|
|
177
125
|
* existing entries re-scored without an explicit re-upsert.
|
|
126
|
+
*
|
|
127
|
+
* No-op (still records an audit entry) when constructed with
|
|
128
|
+
* `ranked: false`.
|
|
178
129
|
*/
|
|
179
130
|
rescore: () => void;
|
|
180
131
|
itemNode: (id: NodeOrValue<string>) => Node<CollectionEntry<T> | undefined>;
|
|
132
|
+
/** Reactive `true` once the entry exists; tracks upsert / remove. */
|
|
133
|
+
hasNode: (id: NodeOrValue<string>) => Node<boolean>;
|
|
181
134
|
};
|
|
182
135
|
/**
|
|
183
136
|
* Scored memory store with live decay-aware ranking.
|
|
@@ -402,10 +355,6 @@ type index_KnowledgeEdge<TRelation extends string = string> = KnowledgeEdge<TRel
|
|
|
402
355
|
type index_KnowledgeGraph<TEntity, TRelation extends string = string> = KnowledgeGraph<TEntity, TRelation>;
|
|
403
356
|
type index_KnowledgeGraphAuditRecord = KnowledgeGraphAuditRecord;
|
|
404
357
|
type index_KnowledgeGraphOptions = KnowledgeGraphOptions;
|
|
405
|
-
type index_LightCollectionAuditRecord = LightCollectionAuditRecord;
|
|
406
|
-
type index_LightCollectionBundle<T> = LightCollectionBundle<T>;
|
|
407
|
-
type index_LightCollectionEntry<T> = LightCollectionEntry<T>;
|
|
408
|
-
type index_LightCollectionOptions = LightCollectionOptions;
|
|
409
358
|
type index_NodeOrValue<T> = NodeOrValue<T>;
|
|
410
359
|
type index_RankedCollectionEntry<T> = RankedCollectionEntry<T>;
|
|
411
360
|
type index_VectorBackend = VectorBackend;
|
|
@@ -416,12 +365,10 @@ type index_VectorRecord<TMeta> = VectorRecord<TMeta>;
|
|
|
416
365
|
type index_VectorSearchResult<TMeta> = VectorSearchResult<TMeta>;
|
|
417
366
|
declare const index_collection: typeof collection;
|
|
418
367
|
declare const index_cosineSimilarity: typeof cosineSimilarity;
|
|
419
|
-
declare const index_decay: typeof decay;
|
|
420
368
|
declare const index_knowledgeGraph: typeof knowledgeGraph;
|
|
421
|
-
declare const index_lightCollection: typeof lightCollection;
|
|
422
369
|
declare const index_vectorIndex: typeof vectorIndex;
|
|
423
370
|
declare namespace index {
|
|
424
|
-
export { type index_CollectionAuditRecord as CollectionAuditRecord, type index_CollectionEntry as CollectionEntry, type index_CollectionGraph as CollectionGraph, type index_CollectionOptions as CollectionOptions, type index_CollectionScoreFn as CollectionScoreFn, type index_HnswAdapter as HnswAdapter, type index_KnowledgeEdge as KnowledgeEdge, type index_KnowledgeGraph as KnowledgeGraph, type index_KnowledgeGraphAuditRecord as KnowledgeGraphAuditRecord, type index_KnowledgeGraphOptions as KnowledgeGraphOptions, type
|
|
371
|
+
export { type index_CollectionAuditRecord as CollectionAuditRecord, type index_CollectionEntry as CollectionEntry, type index_CollectionGraph as CollectionGraph, type index_CollectionOptions as CollectionOptions, type index_CollectionScoreFn as CollectionScoreFn, type index_HnswAdapter as HnswAdapter, type index_KnowledgeEdge as KnowledgeEdge, type index_KnowledgeGraph as KnowledgeGraph, type index_KnowledgeGraphAuditRecord as KnowledgeGraphAuditRecord, type index_KnowledgeGraphOptions as KnowledgeGraphOptions, type index_NodeOrValue as NodeOrValue, type index_RankedCollectionEntry as RankedCollectionEntry, type index_VectorBackend as VectorBackend, type index_VectorIndexAuditRecord as VectorIndexAuditRecord, type index_VectorIndexGraph as VectorIndexGraph, type index_VectorIndexOptions as VectorIndexOptions, type index_VectorRecord as VectorRecord, type index_VectorSearchResult as VectorSearchResult, index_collection as collection, index_cosineSimilarity as cosineSimilarity, index_knowledgeGraph as knowledgeGraph, index_vectorIndex as vectorIndex };
|
|
425
372
|
}
|
|
426
373
|
|
|
427
|
-
export { type
|
|
374
|
+
export { type CollectionGraph as C, type HnswAdapter as H, type KnowledgeGraph as K, type NodeOrValue as N, type RankedCollectionEntry as R, type VectorSearchResult as V, type VectorIndexGraph as a, type CollectionAuditRecord as b, type CollectionEntry as c, type CollectionOptions as d, type CollectionScoreFn as e, type KnowledgeEdge as f, type KnowledgeGraphAuditRecord as g, type KnowledgeGraphOptions as h, index as i, type VectorBackend as j, type VectorIndexAuditRecord as k, type VectorIndexOptions as l, type VectorRecord as m, collection as n, cosineSimilarity as o, knowledgeGraph as p, vectorIndex as v };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import { A as AutoTrackOptions, D as DerivedFn, a as DynamicFn, E as EffectFn, P as PipeOperator, b as ProducerFn, T as TrackFn, c as autoTrackNode, d as derived, e as dynamicNode, f as effect, p as pipe, g as producer, s as state } from './sugar-
|
|
1
|
+
import { M as Messages, A as Actor, C as COMPLETE, f as COMPLETE_MSG, g as COMPLETE_ONLY_BATCH, D as DATA, h as DEFAULT_ACTOR, i as DIRTY, j as DIRTY_MSG, k as DIRTY_ONLY_BATCH, l as DepRecord, E as ERROR, F as FnCtx, m as GlobalInspectorEvent, n as GlobalInspectorHook, o as GraphReFlyConfig, G as GuardAction, p as GuardDenied, q as GuardDeniedDetails, H as HashFn, I as INVALIDATE, r as INVALIDATE_MSG, s as INVALIDATE_ONLY_BATCH, t as Message, u as MessageContext, v as MessageTypeRegistration, w as MessageTypeRegistrationInput, N as Node, c as NodeActions, x as NodeCtx, e as NodeDescribeKind, y as NodeFn, d as NodeFnCleanup, b as NodeGuard, z as NodeImpl, B as NodeInspectorHook, J as NodeInspectorHookEvent, a as NodeOptions, K as NodeSink, L as NodeStatus, O as NodeTransportOptions, Q as NodeVersionInfo, R as OnMessageHandler, S as OnSubscribeHandler, T as PAUSE, U as PolicyAllow, W as PolicyDeny, P as PolicyRuleData, X as RESOLVED, Y as RESOLVED_MSG, Z as RESOLVED_ONLY_BATCH, _ as RESUME, $ as RigorRecorder, a0 as START, a1 as START_MSG, a2 as SubscribeContext, a3 as TEARDOWN, a4 as TEARDOWN_MSG, a5 as TEARDOWN_ONLY_BATCH, a6 as V0, a7 as V1, V as VersioningLevel, a8 as VersioningOptions, a9 as accessHintForGuard, aa as advanceVersion, ab as configure, ac as createVersioning, ad as defaultConfig, ae as defaultHash, af as isV1, ag as node, ah as normalizeActor, ai as policy, aj as policyFromRules, ak as registerBuiltins } from './node-BYInONRr.cjs';
|
|
2
|
+
import { a as DescribeDetail, b as DescribeField, D as DescribeNodeOutput, f as factoryTag, p as placeholderArgs, r as resolveDescribeFields } from './meta-Ct9nqQS5.cjs';
|
|
3
|
+
import { A as AutoTrackOptions, D as DerivedFn, a as DynamicFn, E as EffectFn, P as PipeOperator, b as ProducerFn, T as TrackFn, c as autoTrackNode, d as derived, e as dynamicNode, f as effect, p as pipe, g as producer, s as state } from './sugar-DzePN5-g.cjs';
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* Batch deferral for tier-3+ messages, plus per-node emit coalescing inside
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { C as CatchOptions, a as ClassifyResult, D as Decision, b as DecisionAction, G as GateController, c as GateOptions, P as PipelineGraph, S as StepRef, T as TerminalCause, d as decisionKeyOf, p as pipelineGraph } from './pipeline-graph-
|
|
1
|
+
import { C as CatchOptions, a as ClassifyResult, D as Decision, b as DecisionAction, G as GateController, c as GateOptions, P as PipelineGraph, S as StepRef, T as TerminalCause, d as decisionKeyOf, p as pipelineGraph } from './pipeline-graph-D8vKcO_p.js';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* Orchestration patterns (roadmap §4.1).
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { N as Node } from './node-BYInONRr.js';
|
|
2
2
|
import { NodeInput } from './extra/sources.js';
|
|
3
|
-
import { a as GraphOptions, G as Graph } from './graph-
|
|
4
|
-
import { T as TopicGraph } from './index-
|
|
3
|
+
import { a as GraphOptions, G as Graph } from './graph-30XSgtVX.js';
|
|
4
|
+
import { T as TopicGraph } from './index-DszPlZzK.js';
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
7
|
* refineLoop — universal prompt/artifact optimization loop as a reactive Graph.
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { N as Node } from './node-BYInONRr.cjs';
|
|
2
2
|
import { NodeInput } from './extra/sources.cjs';
|
|
3
|
-
import { a as GraphOptions, G as Graph } from './graph-
|
|
4
|
-
import { T as TopicGraph } from './index-
|
|
3
|
+
import { a as GraphOptions, G as Graph } from './graph-BUwMAxJI.cjs';
|
|
4
|
+
import { T as TopicGraph } from './index-BndG0cpK.cjs';
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
7
|
* refineLoop — universal prompt/artifact optimization loop as a reactive Graph.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { j as CompileSpecOptions, G as GraphSpec, c as GraphSpecCatalog, C as CatalogFnEntry, a as CatalogSourceEntry, b as ConfigFieldSchema, F as FnFactory, d as GraphSpecFeedbackEdge, e as GraphSpecNode, f as GraphSpecTemplate, g as GraphSpecTemplateRef, h as GraphSpecValidation, S as SourceFactory } from './index-
|
|
2
|
-
import { G as Graph,
|
|
3
|
-
import { KvStorageTier } from './extra/storage-tiers.
|
|
1
|
+
import { j as CompileSpecOptions, G as GraphSpec, c as GraphSpecCatalog, C as CatalogFnEntry, a as CatalogSourceEntry, b as ConfigFieldSchema, F as FnFactory, d as GraphSpecFeedbackEdge, e as GraphSpecNode, f as GraphSpecTemplate, g as GraphSpecTemplateRef, h as GraphSpecValidation, S as SourceFactory } from './index-BKMdnYnk.js';
|
|
2
|
+
import { G as Graph, p as GraphNodeFactory, n as GraphDiffResult } from './graph-30XSgtVX.js';
|
|
3
|
+
import { KvStorageTier } from './extra/storage-tiers.js';
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* Surface: create a graph from a {@link GraphSpec} (§9.3-core).
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import { A as AutoTrackOptions, D as DerivedFn, a as DynamicFn, E as EffectFn, P as PipeOperator, b as ProducerFn, T as TrackFn, c as autoTrackNode, d as derived, e as dynamicNode, f as effect, p as pipe, g as producer, s as state } from './sugar-
|
|
1
|
+
import { M as Messages, A as Actor, C as COMPLETE, f as COMPLETE_MSG, g as COMPLETE_ONLY_BATCH, D as DATA, h as DEFAULT_ACTOR, i as DIRTY, j as DIRTY_MSG, k as DIRTY_ONLY_BATCH, l as DepRecord, E as ERROR, F as FnCtx, m as GlobalInspectorEvent, n as GlobalInspectorHook, o as GraphReFlyConfig, G as GuardAction, p as GuardDenied, q as GuardDeniedDetails, H as HashFn, I as INVALIDATE, r as INVALIDATE_MSG, s as INVALIDATE_ONLY_BATCH, t as Message, u as MessageContext, v as MessageTypeRegistration, w as MessageTypeRegistrationInput, N as Node, c as NodeActions, x as NodeCtx, e as NodeDescribeKind, y as NodeFn, d as NodeFnCleanup, b as NodeGuard, z as NodeImpl, B as NodeInspectorHook, J as NodeInspectorHookEvent, a as NodeOptions, K as NodeSink, L as NodeStatus, O as NodeTransportOptions, Q as NodeVersionInfo, R as OnMessageHandler, S as OnSubscribeHandler, T as PAUSE, U as PolicyAllow, W as PolicyDeny, P as PolicyRuleData, X as RESOLVED, Y as RESOLVED_MSG, Z as RESOLVED_ONLY_BATCH, _ as RESUME, $ as RigorRecorder, a0 as START, a1 as START_MSG, a2 as SubscribeContext, a3 as TEARDOWN, a4 as TEARDOWN_MSG, a5 as TEARDOWN_ONLY_BATCH, a6 as V0, a7 as V1, V as VersioningLevel, a8 as VersioningOptions, a9 as accessHintForGuard, aa as advanceVersion, ab as configure, ac as createVersioning, ad as defaultConfig, ae as defaultHash, af as isV1, ag as node, ah as normalizeActor, ai as policy, aj as policyFromRules, ak as registerBuiltins } from './node-BYInONRr.js';
|
|
2
|
+
import { a as DescribeDetail, b as DescribeField, D as DescribeNodeOutput, f as factoryTag, p as placeholderArgs, r as resolveDescribeFields } from './meta-D8OyedKp.js';
|
|
3
|
+
import { A as AutoTrackOptions, D as DerivedFn, a as DynamicFn, E as EffectFn, P as PipeOperator, b as ProducerFn, T as TrackFn, c as autoTrackNode, d as derived, e as dynamicNode, f as effect, p as pipe, g as producer, s as state } from './sugar-BhfjgetH.js';
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* Batch deferral for tier-3+ messages, plus per-node emit coalescing inside
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { NodeInput } from './extra/sources.js';
|
|
2
|
-
import {
|
|
3
|
-
import { L as LLMAdapter } from './types-
|
|
4
|
-
import { T as TopicGraph, M as MessagingHubGraph } from './index-
|
|
5
|
-
import { E as Evaluator, D as DatasetItem, a as EvalResult$1, R as RefineStrategy, b as RefineLoopOptions, c as RefineStatus } from './index-
|
|
6
|
-
import { G as Graph,
|
|
7
|
-
import { G as GateController } from './pipeline-graph-
|
|
8
|
-
import { J as JobQueueGraph } from './index-
|
|
2
|
+
import { N as Node } from './node-BYInONRr.js';
|
|
3
|
+
import { L as LLMAdapter } from './types-39jk0kaV.js';
|
|
4
|
+
import { T as TopicGraph, M as MessagingHubGraph } from './index-DszPlZzK.js';
|
|
5
|
+
import { E as Evaluator, D as DatasetItem, a as EvalResult$1, R as RefineStrategy, b as RefineLoopOptions, c as RefineStatus } from './index-PqbnoScQ.js';
|
|
6
|
+
import { G as Graph, t as GraphProfileResult, s as GraphProfileOptions } from './graph-30XSgtVX.js';
|
|
7
|
+
import { G as GateController } from './pipeline-graph-D8vKcO_p.js';
|
|
8
|
+
import { J as JobQueueGraph } from './index-C19qqa38.js';
|
|
9
9
|
|
|
10
10
|
/**
|
|
11
11
|
* Strategy model and priority scoring (roadmap §9.0).
|
|
@@ -843,6 +843,59 @@ interface NotifyEffectOptions {
|
|
|
843
843
|
*/
|
|
844
844
|
declare function notifyEffect<T>(topic: TopicGraph<T>, transport: NotifyTransport<T>, opts?: NotifyEffectOptions): Node<unknown>;
|
|
845
845
|
|
|
846
|
+
/**
|
|
847
|
+
* `effectivenessTracker` — action×context → success rate tracker.
|
|
848
|
+
*
|
|
849
|
+
* Demoted from `patterns/reduction` to `patterns/harness/` per Tier 2.3
|
|
850
|
+
* (consolidation plan §1 Rule 6). The only in-tree consumer is the harness
|
|
851
|
+
* strategy model, so the primitive moves alongside it. Building-block status
|
|
852
|
+
* is dropped: this is a harness-shaped preset (a small composition over
|
|
853
|
+
* `reactiveMap` with attempt-counting semantics) rather than an orthogonal
|
|
854
|
+
* primitive.
|
|
855
|
+
*
|
|
856
|
+
* @module
|
|
857
|
+
*/
|
|
858
|
+
|
|
859
|
+
/** A single effectiveness record for an action×context pair. */
|
|
860
|
+
type EffectivenessEntry = {
|
|
861
|
+
readonly key: string;
|
|
862
|
+
readonly attempts: number;
|
|
863
|
+
readonly successes: number;
|
|
864
|
+
readonly successRate: number;
|
|
865
|
+
};
|
|
866
|
+
/** Snapshot shape for the effectiveness tracker node. */
|
|
867
|
+
type EffectivenessSnapshot = ReadonlyMap<string, EffectivenessEntry>;
|
|
868
|
+
/** Bundle returned by {@link effectivenessTracker}. */
|
|
869
|
+
interface EffectivenessTrackerBundle {
|
|
870
|
+
/** Reactive node — current effectiveness map snapshot. */
|
|
871
|
+
readonly node: Node<EffectivenessSnapshot>;
|
|
872
|
+
/** Record a completed action (success or failure). */
|
|
873
|
+
record(key: string, success: boolean): void;
|
|
874
|
+
/** Look up effectiveness for a specific key. */
|
|
875
|
+
lookup(key: string): EffectivenessEntry | undefined;
|
|
876
|
+
/** Tear down internal keepalive subscriptions. */
|
|
877
|
+
dispose(): void;
|
|
878
|
+
}
|
|
879
|
+
/** Options for {@link effectivenessTracker}. */
|
|
880
|
+
type EffectivenessTrackerOptions = {
|
|
881
|
+
/** Name for the reactive map (default "effectiveness-entries"). */
|
|
882
|
+
name?: string;
|
|
883
|
+
};
|
|
884
|
+
/**
|
|
885
|
+
* Generic action×context → success rate tracker.
|
|
886
|
+
*
|
|
887
|
+
* Generalized from the harness `strategyModel` pattern. Tracks attempts and
|
|
888
|
+
* successes per string key, exposes a reactive snapshot node, and provides
|
|
889
|
+
* `record()` / `lookup()` methods.
|
|
890
|
+
*
|
|
891
|
+
* Use cases: A/B testing, routing optimization, cache policy tuning, retry
|
|
892
|
+
* strategy selection — any domain that tracks effectiveness per action.
|
|
893
|
+
*
|
|
894
|
+
* @param opts - Optional configuration.
|
|
895
|
+
* @returns Bundle with reactive node, record(), lookup(), dispose().
|
|
896
|
+
*/
|
|
897
|
+
declare function effectivenessTracker(opts?: EffectivenessTrackerOptions): EffectivenessTrackerBundle;
|
|
898
|
+
|
|
846
899
|
/**
|
|
847
900
|
* evalVerifier — re-run the affected eval tasks against the execute-stage
|
|
848
901
|
* artifact instead of asking an LLM to opine on the fix.
|
|
@@ -1335,6 +1388,10 @@ declare const index_DEFAULT_SEVERITY_WEIGHTS: typeof DEFAULT_SEVERITY_WEIGHTS;
|
|
|
1335
1388
|
declare const index_DEFAULT_TRIAGE_PROMPT: typeof DEFAULT_TRIAGE_PROMPT;
|
|
1336
1389
|
declare const index_DEFAULT_VERIFY_PROMPT: typeof DEFAULT_VERIFY_PROMPT;
|
|
1337
1390
|
type index_DispatchActuatorConfig<R> = DispatchActuatorConfig<R>;
|
|
1391
|
+
type index_EffectivenessEntry = EffectivenessEntry;
|
|
1392
|
+
type index_EffectivenessSnapshot = EffectivenessSnapshot;
|
|
1393
|
+
type index_EffectivenessTrackerBundle = EffectivenessTrackerBundle;
|
|
1394
|
+
type index_EffectivenessTrackerOptions = EffectivenessTrackerOptions;
|
|
1338
1395
|
type index_ErrorClass = ErrorClass;
|
|
1339
1396
|
type index_ErrorClassifier = ErrorClassifier;
|
|
1340
1397
|
type index_EvalDelta = EvalDelta;
|
|
@@ -1396,6 +1453,7 @@ declare const index_defaultErrorClassifier: typeof defaultErrorClassifier;
|
|
|
1396
1453
|
declare const index_defaultLlmExecutor: typeof defaultLlmExecutor;
|
|
1397
1454
|
declare const index_defaultLlmVerifier: typeof defaultLlmVerifier;
|
|
1398
1455
|
declare const index_dispatchActuator: typeof dispatchActuator;
|
|
1456
|
+
declare const index_effectivenessTracker: typeof effectivenessTracker;
|
|
1399
1457
|
declare const index_evalIntakeBridge: typeof evalIntakeBridge;
|
|
1400
1458
|
declare const index_evalSource: typeof evalSource;
|
|
1401
1459
|
declare const index_evalVerifier: typeof evalVerifier;
|
|
@@ -1410,7 +1468,7 @@ declare const index_resolvePromptFn: typeof resolvePromptFn;
|
|
|
1410
1468
|
declare const index_strategyKey: typeof strategyKey;
|
|
1411
1469
|
declare const index_strategyModel: typeof strategyModel;
|
|
1412
1470
|
declare namespace index {
|
|
1413
|
-
export { type index_ActuatorApplyFn as ActuatorApplyFn, type index_ActuatorExecutorConfig as ActuatorExecutorConfig, type index_ActuatorResult as ActuatorResult, type index_AutoSolidifyConfig as AutoSolidifyConfig, type index_CodeChange as CodeChange, type index_CodeChangeBridgeOptions as CodeChangeBridgeOptions, index_DEFAULT_DECAY_RATE as DEFAULT_DECAY_RATE, index_DEFAULT_EXECUTE_PROMPT as DEFAULT_EXECUTE_PROMPT, index_DEFAULT_QUEUE_CONFIGS as DEFAULT_QUEUE_CONFIGS, index_DEFAULT_SEVERITY_WEIGHTS as DEFAULT_SEVERITY_WEIGHTS, index_DEFAULT_TRIAGE_PROMPT as DEFAULT_TRIAGE_PROMPT, index_DEFAULT_VERIFY_PROMPT as DEFAULT_VERIFY_PROMPT, type index_DispatchActuatorConfig as DispatchActuatorConfig, type index_ErrorClass as ErrorClass, type index_ErrorClassifier as ErrorClassifier, type index_EvalDelta as EvalDelta, type index_EvalIntakeBridgeOptions as EvalIntakeBridgeOptions, type index_EvalJudgeScore as EvalJudgeScore, type index_EvalResult as EvalResult, type index_EvalTaskDelta as EvalTaskDelta, type index_EvalTaskResult as EvalTaskResult, type index_EvalVerifierConfig as EvalVerifierConfig, type index_EvalVerifierSummary as EvalVerifierSummary, type index_ExecuteOutput as ExecuteOutput, type index_ExecutePromptFn as ExecutePromptFn, type index_ExecutionResult as ExecutionResult, type index_HarnessEvalPairConfig as HarnessEvalPairConfig, type index_HarnessExecutor as HarnessExecutor, index_HarnessGraph as HarnessGraph, type index_HarnessLoopOptions as HarnessLoopOptions, type index_HarnessProfileResult as HarnessProfileResult, type index_HarnessTraceHandle as HarnessTraceHandle, type index_HarnessTraceOptions as HarnessTraceOptions, type index_HarnessVerifier as HarnessVerifier, type index_IntakeBridgeOptions as IntakeBridgeOptions, type index_IntakeItem as IntakeItem, type index_IntakeSource as IntakeSource, type index_Intervention as Intervention, type index_KnownIntakeSource as KnownIntakeSource, type index_LintError as LintError, type index_NotifyEffectOptions as NotifyEffectOptions, type index_NotifyTransport as NotifyTransport, type index_PrioritySignals as PrioritySignals, index_QUEUE_NAMES as QUEUE_NAMES, type index_QueueConfig as QueueConfig, type index_QueueRoute as QueueRoute, type index_RefineExecutorConfig as RefineExecutorConfig, type index_RefineExecutorResult as RefineExecutorResult, type index_RootCause as RootCause, type index_Severity as Severity, type index_StrategyEntry as StrategyEntry, type index_StrategyKey as StrategyKey, type index_StrategyModelBundle as StrategyModelBundle, type index_StrategySnapshot as StrategySnapshot, type index_TestFailure as TestFailure, type index_TraceDetail as TraceDetail, type index_TraceEvent as TraceEvent, type index_TraceEventType as TraceEventType, type index_TriagePromptFn as TriagePromptFn, type index_TriagedItem as TriagedItem, type index_VerifyOutput as VerifyOutput, type index_VerifyPromptFn as VerifyPromptFn, type index_VerifyResult as VerifyResult, index_actuatorExecutor as actuatorExecutor, index_affectedTaskFilter as affectedTaskFilter, index_autoSolidify as autoSolidify, index_beforeAfterCompare as beforeAfterCompare, index_codeChangeBridge as codeChangeBridge, index_createIntakeBridge as createIntakeBridge, index_defaultErrorClassifier as defaultErrorClassifier, index_defaultLlmExecutor as defaultLlmExecutor, index_defaultLlmVerifier as defaultLlmVerifier, index_dispatchActuator as dispatchActuator, index_evalIntakeBridge as evalIntakeBridge, index_evalSource as evalSource, index_evalVerifier as evalVerifier, index_harnessEvalPair as harnessEvalPair, index_harnessLoop as harnessLoop, index_harnessProfile as harnessProfile, index_harnessTrace as harnessTrace, index_notifyEffect as notifyEffect, index_priorityScore as priorityScore, index_refineExecutor as refineExecutor, index_resolvePromptFn as resolvePromptFn, index_strategyKey as strategyKey, index_strategyModel as strategyModel };
|
|
1471
|
+
export { type index_ActuatorApplyFn as ActuatorApplyFn, type index_ActuatorExecutorConfig as ActuatorExecutorConfig, type index_ActuatorResult as ActuatorResult, type index_AutoSolidifyConfig as AutoSolidifyConfig, type index_CodeChange as CodeChange, type index_CodeChangeBridgeOptions as CodeChangeBridgeOptions, index_DEFAULT_DECAY_RATE as DEFAULT_DECAY_RATE, index_DEFAULT_EXECUTE_PROMPT as DEFAULT_EXECUTE_PROMPT, index_DEFAULT_QUEUE_CONFIGS as DEFAULT_QUEUE_CONFIGS, index_DEFAULT_SEVERITY_WEIGHTS as DEFAULT_SEVERITY_WEIGHTS, index_DEFAULT_TRIAGE_PROMPT as DEFAULT_TRIAGE_PROMPT, index_DEFAULT_VERIFY_PROMPT as DEFAULT_VERIFY_PROMPT, type index_DispatchActuatorConfig as DispatchActuatorConfig, type index_EffectivenessEntry as EffectivenessEntry, type index_EffectivenessSnapshot as EffectivenessSnapshot, type index_EffectivenessTrackerBundle as EffectivenessTrackerBundle, type index_EffectivenessTrackerOptions as EffectivenessTrackerOptions, type index_ErrorClass as ErrorClass, type index_ErrorClassifier as ErrorClassifier, type index_EvalDelta as EvalDelta, type index_EvalIntakeBridgeOptions as EvalIntakeBridgeOptions, type index_EvalJudgeScore as EvalJudgeScore, type index_EvalResult as EvalResult, type index_EvalTaskDelta as EvalTaskDelta, type index_EvalTaskResult as EvalTaskResult, type index_EvalVerifierConfig as EvalVerifierConfig, type index_EvalVerifierSummary as EvalVerifierSummary, type index_ExecuteOutput as ExecuteOutput, type index_ExecutePromptFn as ExecutePromptFn, type index_ExecutionResult as ExecutionResult, type index_HarnessEvalPairConfig as HarnessEvalPairConfig, type index_HarnessExecutor as HarnessExecutor, index_HarnessGraph as HarnessGraph, type index_HarnessLoopOptions as HarnessLoopOptions, type index_HarnessProfileResult as HarnessProfileResult, type index_HarnessTraceHandle as HarnessTraceHandle, type index_HarnessTraceOptions as HarnessTraceOptions, type index_HarnessVerifier as HarnessVerifier, type index_IntakeBridgeOptions as IntakeBridgeOptions, type index_IntakeItem as IntakeItem, type index_IntakeSource as IntakeSource, type index_Intervention as Intervention, type index_KnownIntakeSource as KnownIntakeSource, type index_LintError as LintError, type index_NotifyEffectOptions as NotifyEffectOptions, type index_NotifyTransport as NotifyTransport, type index_PrioritySignals as PrioritySignals, index_QUEUE_NAMES as QUEUE_NAMES, type index_QueueConfig as QueueConfig, type index_QueueRoute as QueueRoute, type index_RefineExecutorConfig as RefineExecutorConfig, type index_RefineExecutorResult as RefineExecutorResult, type index_RootCause as RootCause, type index_Severity as Severity, type index_StrategyEntry as StrategyEntry, type index_StrategyKey as StrategyKey, type index_StrategyModelBundle as StrategyModelBundle, type index_StrategySnapshot as StrategySnapshot, type index_TestFailure as TestFailure, type index_TraceDetail as TraceDetail, type index_TraceEvent as TraceEvent, type index_TraceEventType as TraceEventType, type index_TriagePromptFn as TriagePromptFn, type index_TriagedItem as TriagedItem, type index_VerifyOutput as VerifyOutput, type index_VerifyPromptFn as VerifyPromptFn, type index_VerifyResult as VerifyResult, index_actuatorExecutor as actuatorExecutor, index_affectedTaskFilter as affectedTaskFilter, index_autoSolidify as autoSolidify, index_beforeAfterCompare as beforeAfterCompare, index_codeChangeBridge as codeChangeBridge, index_createIntakeBridge as createIntakeBridge, index_defaultErrorClassifier as defaultErrorClassifier, index_defaultLlmExecutor as defaultLlmExecutor, index_defaultLlmVerifier as defaultLlmVerifier, index_dispatchActuator as dispatchActuator, index_effectivenessTracker as effectivenessTracker, index_evalIntakeBridge as evalIntakeBridge, index_evalSource as evalSource, index_evalVerifier as evalVerifier, index_harnessEvalPair as harnessEvalPair, index_harnessLoop as harnessLoop, index_harnessProfile as harnessProfile, index_harnessTrace as harnessTrace, index_notifyEffect as notifyEffect, index_priorityScore as priorityScore, index_refineExecutor as refineExecutor, index_resolvePromptFn as resolvePromptFn, index_strategyKey as strategyKey, index_strategyModel as strategyModel };
|
|
1414
1472
|
}
|
|
1415
1473
|
|
|
1416
|
-
export { type
|
|
1474
|
+
export { type RootCause as $, type ActuatorApplyFn as A, type ExecutionResult as B, type CodeChange as C, DEFAULT_DECAY_RATE as D, type EffectivenessEntry as E, type HarnessExecutor as F, HarnessGraph as G, type HarnessEvalPairConfig as H, type HarnessLoopOptions as I, type HarnessProfileResult as J, type HarnessTraceHandle as K, type HarnessTraceOptions as L, type HarnessVerifier as M, type IntakeBridgeOptions as N, type IntakeItem as O, type IntakeSource as P, type Intervention as Q, type KnownIntakeSource as R, type LintError as S, type NotifyEffectOptions as T, type NotifyTransport as U, type PrioritySignals as V, QUEUE_NAMES as W, type QueueConfig as X, type QueueRoute as Y, type RefineExecutorConfig as Z, type RefineExecutorResult as _, type ActuatorExecutorConfig as a, type Severity as a0, type StrategyEntry as a1, type StrategyKey as a2, type StrategyModelBundle as a3, type StrategySnapshot as a4, type TestFailure as a5, type TraceDetail as a6, type TraceEvent as a7, type TraceEventType as a8, type TriagePromptFn as a9, strategyKey as aA, strategyModel as aB, type TriagedItem as aa, type VerifyOutput as ab, type VerifyPromptFn as ac, type VerifyResult as ad, actuatorExecutor as ae, affectedTaskFilter as af, autoSolidify as ag, beforeAfterCompare as ah, codeChangeBridge as ai, createIntakeBridge as aj, defaultErrorClassifier as ak, defaultLlmExecutor as al, defaultLlmVerifier as am, dispatchActuator as an, effectivenessTracker as ao, evalIntakeBridge as ap, evalSource as aq, evalVerifier as ar, harnessEvalPair as as, harnessLoop as at, harnessProfile as au, harnessTrace as av, notifyEffect as aw, priorityScore as ax, refineExecutor as ay, resolvePromptFn as az, type ActuatorResult as b, type AutoSolidifyConfig as c, type CodeChangeBridgeOptions as d, DEFAULT_EXECUTE_PROMPT as e, DEFAULT_QUEUE_CONFIGS as f, DEFAULT_SEVERITY_WEIGHTS as g, DEFAULT_TRIAGE_PROMPT as h, index as i, DEFAULT_VERIFY_PROMPT as j, type DispatchActuatorConfig as k, type EffectivenessSnapshot as l, type EffectivenessTrackerBundle as m, type EffectivenessTrackerOptions as n, type ErrorClass as o, type ErrorClassifier as p, type EvalDelta as q, type EvalIntakeBridgeOptions as r, type EvalJudgeScore as s, type EvalResult as t, type EvalTaskDelta as u, type EvalTaskResult as v, type EvalVerifierConfig as w, type EvalVerifierSummary as x, type ExecuteOutput as y, type ExecutePromptFn as z };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { a as GraphOptions, G as Graph } from './graph-
|
|
1
|
+
import { N as Node } from './node-BYInONRr.js';
|
|
2
|
+
import { a as GraphOptions, G as Graph } from './graph-30XSgtVX.js';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* Domain templates (roadmap §8.2).
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { B as BaseAuditRecord } from './index-CusEP3Sv.js';
|
|
2
|
+
import { a as ReactiveLogBundle } from './reactive-log-BlAsPLl2.js';
|
|
2
3
|
import { NodeInput } from './extra/sources.js';
|
|
3
4
|
import { AppendLogStorageTier } from './extra/storage-tiers.js';
|
|
4
|
-
import {
|
|
5
|
-
import { C as CqrsEventMap, a as CqrsEvent, b as CqrsGraph } from './index-BFaALJxR.js';
|
|
5
|
+
import { C as CqrsEventMap, a as CqrsEvent, b as CqrsGraph } from './index-B41Asm7D.js';
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
8
|
* Process Manager pattern (Phase 7 — roadmap §4.6, Audit 3 — locked 2026-04-24).
|
|
@@ -35,14 +35,21 @@ import { C as CqrsEventMap, a as CqrsEvent, b as CqrsGraph } from './index-BFaAL
|
|
|
35
35
|
/**
|
|
36
36
|
* Discriminated union returned by each step handler.
|
|
37
37
|
*
|
|
38
|
-
* - `"
|
|
39
|
-
* schedule a future synthetic event.
|
|
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"`.
|
|
40
41
|
* - `"terminate"` — workflow complete; instance moves to `"terminated"`.
|
|
41
|
-
*
|
|
42
|
-
*
|
|
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".
|
|
43
50
|
*/
|
|
44
51
|
type ProcessStepResult<TState> = {
|
|
45
|
-
|
|
52
|
+
outcome: "success";
|
|
46
53
|
state: TState;
|
|
47
54
|
emit?: readonly {
|
|
48
55
|
type: string;
|
|
@@ -50,7 +57,7 @@ type ProcessStepResult<TState> = {
|
|
|
50
57
|
}[];
|
|
51
58
|
schedule?: ProcessSchedule;
|
|
52
59
|
} | {
|
|
53
|
-
|
|
60
|
+
outcome: "terminate";
|
|
54
61
|
state: TState;
|
|
55
62
|
emit?: readonly {
|
|
56
63
|
type: string;
|
|
@@ -58,7 +65,7 @@ type ProcessStepResult<TState> = {
|
|
|
58
65
|
}[];
|
|
59
66
|
reason?: string;
|
|
60
67
|
} | {
|
|
61
|
-
|
|
68
|
+
outcome: "failure";
|
|
62
69
|
error: unknown;
|
|
63
70
|
};
|
|
64
71
|
/**
|
|
@@ -79,19 +86,19 @@ type ProcessSchedule = {
|
|
|
79
86
|
*/
|
|
80
87
|
type ProcessStep<TState, EM extends CqrsEventMap, K extends keyof EM & string> = (state: TState, event: CqrsEvent<EM[K]>) => NodeInput<ProcessStepResult<TState>>;
|
|
81
88
|
/**
|
|
82
|
-
* Compensation handler. Runs when a step returns `
|
|
89
|
+
* Compensation handler. Runs when a step returns `outcome: "failure"`, throws, or
|
|
83
90
|
* when `cancel(correlationId)` is called on a running instance.
|
|
84
91
|
*
|
|
85
92
|
* Should undo any side effects performed by prior steps (refund, cancel
|
|
86
93
|
* reservation, etc.). Errors thrown inside compensate are swallowed and
|
|
87
|
-
* recorded in the audit log with `status: "
|
|
94
|
+
* recorded in the audit log with `status: "errored"` to prevent cascading
|
|
88
95
|
* failure loops.
|
|
89
96
|
*/
|
|
90
97
|
type ProcessCompensate<TState> = (state: TState, error: unknown) => NodeInput<void>;
|
|
91
98
|
/**
|
|
92
99
|
* Audit record for a single process instance state transition.
|
|
93
100
|
*
|
|
94
|
-
* Every status change (start → running → terminated /
|
|
101
|
+
* Every status change (start → running → terminated / errored / compensated)
|
|
95
102
|
* appends one record. `correlationId` is the stable process key.
|
|
96
103
|
*
|
|
97
104
|
* Extends {@link BaseAuditRecord} so records carry `t_ns` / `seq` /
|
|
@@ -103,7 +110,7 @@ interface ProcessInstance<TState> extends BaseAuditRecord {
|
|
|
103
110
|
/** Most-recent instance state at this transition. */
|
|
104
111
|
readonly state: TState;
|
|
105
112
|
/** Current lifecycle status after this transition. */
|
|
106
|
-
readonly status: "running" | "terminated" | "
|
|
113
|
+
readonly status: "running" | "terminated" | "errored" | "compensated";
|
|
107
114
|
/** Wall-clock nanoseconds when `start()` was called. */
|
|
108
115
|
readonly startedAt: number;
|
|
109
116
|
/** Wall-clock nanoseconds of this transition. */
|
|
@@ -137,13 +144,13 @@ interface ProcessManagerOpts<TState, EM extends CqrsEventMap> {
|
|
|
137
144
|
[K in keyof EM & string]?: ProcessStep<TState, EM, K>;
|
|
138
145
|
};
|
|
139
146
|
/**
|
|
140
|
-
* Optional compensation handler. Runs on step `
|
|
147
|
+
* Optional compensation handler. Runs on step `outcome: "failure"` / step throw
|
|
141
148
|
* and on explicit `cancel()`. If omitted, instances fail silently with
|
|
142
|
-
* status `"
|
|
149
|
+
* status `"errored"` instead of `"compensated"`.
|
|
143
150
|
*/
|
|
144
151
|
readonly compensate?: ProcessCompensate<TState>;
|
|
145
152
|
/**
|
|
146
|
-
* Optional predicate called after each `"
|
|
153
|
+
* Optional predicate called after each `"success"` step. When it returns
|
|
147
154
|
* `true`, the instance is moved to `"terminated"` immediately without
|
|
148
155
|
* waiting for a `"terminate"` step result.
|
|
149
156
|
*/
|
|
@@ -245,10 +252,10 @@ interface ProcessManagerResult<TState> {
|
|
|
245
252
|
* watching: ["orderPlaced", "paymentReceived"],
|
|
246
253
|
* steps: {
|
|
247
254
|
* orderPlaced(state, event) {
|
|
248
|
-
* return {
|
|
255
|
+
* return { outcome: "success", state: { ...state, orderId: event.payload.orderId } };
|
|
249
256
|
* },
|
|
250
257
|
* paymentReceived(state, event) {
|
|
251
|
-
* return {
|
|
258
|
+
* return { outcome: "terminate", state: { ...state, total: event.payload.amount } };
|
|
252
259
|
* },
|
|
253
260
|
* },
|
|
254
261
|
* compensate(state, _error) {
|