@graphrefly/graphrefly 0.43.0 → 0.44.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{cascading-CH-_VwG9.d.cts → cascading-BglDkMdX.d.cts} +2 -2
- package/dist/{cascading-OgKQZjsa.d.ts → cascading-MFgxu7Yo.d.ts} +2 -2
- package/dist/{chunk-KVV66NN2.js → chunk-2T7U5EU6.js} +1 -1
- package/dist/chunk-5M4CCMMD.js +45 -0
- package/dist/{chunk-I7IGYPSL.js → chunk-5XJ6B66J.js} +1 -1
- package/dist/{chunk-OFZG3TB3.js → chunk-6X7AFUJV.js} +1 -1
- package/dist/{chunk-EBW4V6JN.js → chunk-7K6PWTDQ.js} +1 -1
- package/dist/{chunk-D27JNOLZ.js → chunk-7LIAPXJB.js} +1 -1
- package/dist/{chunk-CLD3F4R5.js → chunk-7WPU3UHQ.js} +1 -1
- package/dist/{chunk-NNKJUORL.js → chunk-A5WCQ5NO.js} +1 -1
- package/dist/chunk-APPIWSGD.js +84 -0
- package/dist/{chunk-TZQPPQEQ.js → chunk-BEZWM2SY.js} +1 -1
- package/dist/{chunk-K2Q24F5T.js → chunk-CB676TKJ.js} +1 -1
- package/dist/{chunk-SUWT3ZON.js → chunk-CE6TI2TL.js} +1 -1
- package/dist/{chunk-VOPGGIL7.js → chunk-CLVB32RD.js} +1 -1
- package/dist/{chunk-V5A7M7RJ.js → chunk-CRVT7D2P.js} +1 -1
- package/dist/chunk-D7GPHKFH.js +1 -0
- package/dist/{chunk-OCKEEPRJ.js → chunk-DHRX7JX4.js} +1 -1
- package/dist/chunk-FZMYDOWV.js +1 -0
- package/dist/{chunk-35JTVPOX.js → chunk-GHBWHMRZ.js} +1 -1
- package/dist/{chunk-KGKJCHEK.js → chunk-GLERH466.js} +1 -1
- package/dist/{chunk-TPKQW72B.js → chunk-HIDYF36O.js} +1 -1
- package/dist/chunk-HITNVN6B.js +3 -0
- package/dist/{chunk-P6C4WHZO.js → chunk-HY4DJBA7.js} +1 -1
- package/dist/chunk-KZIEYVXN.js +1 -0
- package/dist/{chunk-O2BLLH7M.js → chunk-N4MQX6JU.js} +1 -1
- package/dist/{chunk-4YAN45KM.js → chunk-N7FHEL4D.js} +1 -1
- package/dist/chunk-NTEURFZH.js +1 -0
- package/dist/{chunk-OYJKFY7V.js → chunk-OIVP6KFV.js} +1 -1
- package/dist/{chunk-Q4U3A3L5.js → chunk-OPHBU3LG.js} +1 -1
- package/dist/{chunk-PT7W5FCD.js → chunk-OYQOZP2F.js} +1 -1
- package/dist/{chunk-6HOSXQKF.js → chunk-PTZK576G.js} +1 -1
- package/dist/{chunk-S3EEIPO7.js → chunk-ST7UXLWR.js} +1 -1
- package/dist/chunk-SVY7VUYU.js +1 -0
- package/dist/{chunk-QYVXF7GW.js → chunk-TK3NWWD4.js} +1 -1
- package/dist/chunk-UNGSTR4X.js +61 -0
- package/dist/{chunk-VQ4A6T2A.js → chunk-VV4N5P64.js} +1 -1
- package/dist/{chunk-FDQGFWLF.js → chunk-W3I423PS.js} +1 -1
- package/dist/{chunk-XG62INFA.js → chunk-WJR24TAG.js} +1 -1
- package/dist/{chunk-F3IGTWCQ.js → chunk-XTGKMHSW.js} +1 -1
- package/dist/{chunk-JQFH2DV6.js → chunk-YBB7ZGTY.js} +1 -1
- package/dist/{chunk-CUNIRONA.js → chunk-Z4NPUARF.js} +1 -1
- package/dist/{chunk-KRH66M4O.js → chunk-ZGNQRPDT.js} +1 -1
- package/dist/{chunk-JNWRYDJN.js → chunk-ZKPSFFKU.js} +1 -1
- package/dist/{chunk-FG4TKHMC.js → chunk-ZLV5SQSX.js} +1 -1
- package/dist/compat/index.cjs +5 -5
- 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.cjs +1 -1
- package/dist/compat/jotai/index.d.cts +2 -2
- package/dist/compat/jotai/index.d.ts +2 -2
- package/dist/compat/jotai/index.js +1 -1
- package/dist/compat/nanostores/index.cjs +1 -1
- package/dist/compat/nanostores/index.d.cts +2 -2
- package/dist/compat/nanostores/index.d.ts +2 -2
- package/dist/compat/nanostores/index.js +1 -1
- package/dist/compat/nestjs/index.cjs +5 -5
- 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 -3
- 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/core/index.cjs +1 -1
- package/dist/core/index.d.cts +3 -4
- package/dist/core/index.d.ts +3 -4
- package/dist/core/index.js +1 -1
- package/dist/{decay-CdEBmDIs.d.ts → decay-BvOWTZ00.d.ts} +2 -2
- package/dist/{decay-2ZukgQ4o.d.cts → decay-CFlLvXUT.d.cts} +2 -2
- package/dist/extra/browser.cjs +1 -1
- package/dist/extra/browser.d.cts +1 -1
- package/dist/extra/browser.d.ts +1 -1
- package/dist/extra/browser.js +1 -1
- package/dist/extra/index.cjs +15 -15
- package/dist/extra/index.d.cts +10 -10
- package/dist/extra/index.d.ts +10 -10
- 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 +9 -1
- package/dist/extra/operators.d.ts +9 -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.d.cts +3 -3
- package/dist/extra/render/index.d.ts +3 -3
- package/dist/extra/sources.cjs +3 -3
- 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.cjs +1 -1
- package/dist/extra/storage-browser.d.cts +1 -1
- package/dist/extra/storage-browser.d.ts +1 -1
- package/dist/extra/storage-browser.js +1 -1
- package/dist/{fallback-Ctlj2tMY.d.cts → fallback-74oxi34l.d.cts} +1 -1
- package/dist/{fallback-CqYVLL6X.d.ts → fallback-DUyyBTBK.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-C4SHb3Ly.d.cts → graph-CWvEUQAq.d.cts} +196 -3
- package/dist/{graph-7VguS7a4.d.ts → graph-D9LFnda9.d.ts} +196 -3
- package/dist/{index-O7fucFrU.d.cts → index-5k1T6jl0.d.cts} +9 -9
- package/dist/{index-DyR7eU5S.d.cts → index-9770hRuQ.d.cts} +4 -4
- package/dist/{index-COD1kVoS.d.cts → index-B-_tFaqV.d.cts} +4 -4
- package/dist/{index-CLon-IWF.d.cts → index-B17QddL1.d.cts} +4 -4
- package/dist/{index-B-i4_g3k.d.ts → index-B1F8Enjf.d.ts} +61 -8
- package/dist/{index-DBevwHj_.d.ts → index-B5S8ULbU.d.ts} +3 -3
- package/dist/{index-Dgs8zcj7.d.ts → index-B8YnZpIR.d.ts} +2 -2
- package/dist/{index-DSZ3ZCHF.d.ts → index-BHskSB8v.d.ts} +28 -17
- package/dist/{index-CDXc9zKM.d.cts → index-BIYAkbAi.d.cts} +1 -1
- package/dist/{index-C9kSENB4.d.cts → index-BQSKmbuG.d.cts} +1 -1
- package/dist/{index-tJoTcnHh.d.cts → index-BaQaY_IQ.d.cts} +2 -2
- package/dist/{index-CJK1JkYy.d.ts → index-BmZXHqkE.d.ts} +1 -1
- package/dist/{index-K0_0eR8g.d.ts → index-BoJ5JHxI.d.ts} +3 -3
- package/dist/{index-JZUPJIJy.d.ts → index-BocU7pqs.d.ts} +4 -4
- package/dist/{index-ChOyVLKm.d.cts → index-BrPrLl4e.d.cts} +1 -1
- package/dist/{index-BiX1Nkgx.d.cts → index-BxNs2HB9.d.cts} +22 -8
- package/dist/{index-Bf7eqeSF.d.ts → index-Byu-OpX_.d.ts} +2 -2
- package/dist/{index-BoLv_OfD.d.cts → index-C1T3d7V-.d.cts} +61 -8
- package/dist/{index-BTQtTb_H.d.cts → index-C5ri2Axc.d.cts} +3 -3
- package/dist/{index-z96luz5O.d.cts → index-C5stwKcw.d.cts} +1 -1
- package/dist/{index-D4Y1cMG0.d.ts → index-C9l6OEBL.d.ts} +1 -1
- package/dist/{index-CCq87F7t.d.ts → index-CBBLl_rc.d.ts} +1 -1
- package/dist/{index-cm1GNcWE.d.ts → index-CBGUK09R.d.ts} +4 -4
- package/dist/{index-0rKFCVFp.d.cts → index-CC-AvFTy.d.cts} +3 -3
- package/dist/{index-C59mYFKp.d.ts → index-CJF1URuX.d.ts} +9 -9
- package/dist/{index-BJX94aud.d.cts → index-CK29LV56.d.cts} +1 -1
- package/dist/{index-BP8a88zx.d.ts → index-CMh5Rz1y.d.ts} +4 -4
- package/dist/{index-CvrqGfNS.d.ts → index-CPQlGA29.d.ts} +1 -1
- package/dist/{index-D-AEQVLo.d.ts → index-CR8QpwX8.d.ts} +49 -24
- package/dist/{index-Du7u1lSf.d.cts → index-CS0LTlB8.d.cts} +4 -4
- package/dist/{index-Bc41FuHp.d.cts → index-CSOmP7xT.d.cts} +2 -2
- package/dist/{index-BsT7F2et.d.ts → index-CYq8vAyV.d.ts} +2 -2
- package/dist/{index-CPT7C_f1.d.ts → index-CZ3r5Rxp.d.ts} +4 -4
- package/dist/{index-BojK2fwH.d.cts → index-CasX6Pfq.d.cts} +68 -9
- package/dist/{index-BG0BN3PB.d.ts → index-CdAlHFEt.d.ts} +1 -1
- package/dist/{index-wAzD9yVj.d.ts → index-CdTelp1M.d.ts} +8 -4
- package/dist/{index-CQG3D1cp.d.ts → index-CeFiHtAg.d.ts} +4 -4
- package/dist/{index-RV_yDjOX.d.cts → index-Cj3WohTd.d.cts} +8 -4
- package/dist/{index-BAOD98JD.d.cts → index-Climxqsu.d.cts} +4 -4
- package/dist/{index-O16yXPK4.d.cts → index-Co7uli2l.d.cts} +28 -17
- package/dist/{index-DIOoAZUX.d.ts → index-CviRnE4K.d.ts} +1 -1
- package/dist/{index-Dhc7a7Xo.d.cts → index-Cwv0KWcU.d.cts} +2 -2
- package/dist/{index-Dn-wI9g4.d.ts → index-CzLVrjxn.d.ts} +2 -2
- package/dist/{index-C9pjcz3l.d.cts → index-D0aciIex.d.cts} +3 -3
- package/dist/{index-DwigL4lY.d.ts → index-DHen9Klo.d.ts} +22 -8
- package/dist/{index-BwLvVVsy.d.cts → index-DV_1YuVk.d.cts} +40 -8
- package/dist/{index-BdGtBX-X.d.cts → index-Dc4AYqrJ.d.cts} +3 -3
- package/dist/{index-Dmqp7KjD.d.ts → index-Dgl1HpPn.d.ts} +1 -1
- package/dist/{index-CAC_rNzm.d.ts → index-DisjX8a-.d.ts} +40 -8
- package/dist/{index-B5iz82A3.d.cts → index-UPSiS-X7.d.cts} +49 -24
- package/dist/{index-CZQXo5tH.d.ts → index-Yq60JP3s.d.ts} +3 -3
- package/dist/{index-f5IivDUX.d.cts → index-ZVQhLa2i.d.cts} +1 -1
- package/dist/{index-hHcaFlJX.d.cts → index-_6ODbuOu.d.cts} +1 -1
- package/dist/{index-BVpm6noz.d.cts → index-hcDJ8PSI.d.cts} +1 -1
- package/dist/{index-DBHK8O6H.d.ts → index-nozs3fFC.d.ts} +3 -3
- package/dist/{index-Dh_HJ82K.d.ts → index-p09KSrTN.d.ts} +68 -9
- package/dist/{index-C7O6r5fV.d.ts → index-sqkqlb1p.d.ts} +1 -1
- package/dist/{index-CZjOhcBy.d.cts → index-tRCxuAXF.d.cts} +2 -2
- package/dist/index.cjs +48 -48
- package/dist/index.d.cts +42 -43
- package/dist/index.d.ts +42 -43
- package/dist/index.js +1 -1
- package/dist/{node-ClS5yC-B.d.cts → node-kK3CvTrR.d.cts} +1 -1
- package/dist/{node-ClS5yC-B.d.ts → node-kK3CvTrR.d.ts} +1 -1
- package/dist/{observable-BsBzUrcI.d.ts → observable-DWjNfLvC.d.ts} +1 -1
- package/dist/{observable-DLGPPtb8.d.cts → observable-e3eiPPFy.d.cts} +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 -16
- package/dist/patterns/ai/index.d.cts +16 -17
- package/dist/patterns/ai/index.d.ts +16 -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/cqrs/index.cjs +3 -3
- 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 -5
- 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 -3
- 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 +16 -16
- 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/harness/index.cjs +9 -9
- package/dist/patterns/harness/index.d.cts +10 -11
- package/dist/patterns/harness/index.d.ts +10 -11
- package/dist/patterns/harness/index.js +1 -1
- package/dist/patterns/inspect/index.cjs +3 -3
- package/dist/patterns/inspect/index.d.cts +7 -7
- package/dist/patterns/inspect/index.d.ts +7 -7
- package/dist/patterns/inspect/index.js +1 -1
- package/dist/patterns/job-queue/index.cjs +3 -3
- 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/memory/index.cjs +3 -3
- 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 -3
- 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 -3
- package/dist/patterns/orchestration/index.d.cts +6 -7
- package/dist/patterns/orchestration/index.d.ts +6 -7
- package/dist/patterns/orchestration/index.js +1 -1
- package/dist/patterns/process/index.cjs +3 -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 -4
- 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 -3
- 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/surface/index.cjs +10 -10
- 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-DPqKDk59.d.cts → pipeline-graph-CIKhynsF.d.cts} +11 -6
- package/dist/{pipeline-graph-loP57TBA.d.ts → pipeline-graph-Sgj0gCwn.d.ts} +11 -6
- package/dist/{reactive-layout-v7KPvxoc.d.ts → reactive-layout-DOTs9P3X.d.ts} +2 -2
- package/dist/{reactive-layout-Dsvob4zD.d.cts → reactive-layout-DgctbqZo.d.cts} +2 -2
- package/dist/{reactive-log-BezYsbA_.d.ts → reactive-log-BKALbfal.d.ts} +1 -1
- package/dist/{reactive-log-B00laMSQ.d.cts → reactive-log-DIGdYqQ6.d.cts} +1 -1
- package/dist/{reactive-map-48mnZ-nu.d.cts → reactive-map-CEFGp8TK.d.cts} +1 -1
- package/dist/{reactive-map-BVVPdvmi.d.ts → reactive-map-DS_SIAxv.d.ts} +1 -1
- package/dist/resilience-6LYQJAC5.js +1 -0
- package/dist/{sugar-DLwvMr3F.d.ts → sugar-DQjFmVqb.d.cts} +178 -2
- package/dist/{sugar-DyVGtczU.d.cts → sugar-fhLIE7TT.d.ts} +178 -2
- package/dist/{topology-tree-BSdfSwMi.d.cts → topology-tree-Bcz27hpF.d.cts} +1 -1
- package/dist/{topology-tree-BNGvuG82.d.ts → topology-tree-xvaD0fOX.d.ts} +1 -1
- package/dist/{types-B1jDWVsM.d.cts → types-C0_yquda.d.cts} +1 -1
- package/dist/{types-DkzUUs0H.d.ts → types-CWFysE9E.d.ts} +1 -1
- package/package.json +1 -1
- package/dist/chunk-3XDYJRYU.js +0 -1
- package/dist/chunk-4I45FVQS.js +0 -1
- package/dist/chunk-626TESAC.js +0 -3
- package/dist/chunk-INQD2KRQ.js +0 -1
- package/dist/chunk-LYCLF26R.js +0 -1
- package/dist/chunk-NON4NLIC.js +0 -45
- package/dist/chunk-QE4IGY7I.js +0 -61
- package/dist/chunk-VNC3TMVY.js +0 -1
- package/dist/chunk-Y4NI3X7O.js +0 -84
- package/dist/meta-BgVAsg9j.d.ts +0 -102
- package/dist/meta-vE8bxW1E.d.cts +0 -102
- package/dist/resilience-YIWPK4YC.js +0 -1
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { N as Node, c as NodeActions } from './node-
|
|
2
|
-
import {
|
|
3
|
-
import { B as BaseAuditRecord } from './index-
|
|
4
|
-
import { a as ReactiveLogBundle } from './reactive-log-
|
|
5
|
-
import { G as Graph, a as GraphOptions } from './graph-
|
|
1
|
+
import { N as Node, c as NodeActions } from './node-kK3CvTrR.cjs';
|
|
2
|
+
import { a as DerivedFn } from './sugar-DQjFmVqb.cjs';
|
|
3
|
+
import { B as BaseAuditRecord } from './index-D0aciIex.cjs';
|
|
4
|
+
import { a as ReactiveLogBundle } from './reactive-log-DIGdYqQ6.cjs';
|
|
5
|
+
import { G as Graph, a as GraphOptions } from './graph-CWvEUQAq.cjs';
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
8
|
* PipelineGraph subclass (Wave A.1 Unit 1 — locked 2026-04-24).
|
|
@@ -55,7 +55,12 @@ interface GateOptions<T = unknown> {
|
|
|
55
55
|
};
|
|
56
56
|
}
|
|
57
57
|
interface GateController<T> {
|
|
58
|
-
|
|
58
|
+
/**
|
|
59
|
+
* The post-gate output node. Renamed from `node` (Tier 5.2 / EC6,
|
|
60
|
+
* 2026-04-29) to avoid shadowing `Graph.node(name)` when a gate is
|
|
61
|
+
* accessed off a `PipelineGraph` instance.
|
|
62
|
+
*/
|
|
63
|
+
readonly output: Node<T>;
|
|
59
64
|
readonly pending: Node<readonly T[]>;
|
|
60
65
|
readonly count: Node<number>;
|
|
61
66
|
readonly isOpen: Node<boolean>;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { N as Node, c as NodeActions } from './node-
|
|
2
|
-
import {
|
|
3
|
-
import { B as BaseAuditRecord } from './index-
|
|
4
|
-
import { a as ReactiveLogBundle } from './reactive-log-
|
|
5
|
-
import { G as Graph, a as GraphOptions } from './graph-
|
|
1
|
+
import { N as Node, c as NodeActions } from './node-kK3CvTrR.js';
|
|
2
|
+
import { a as DerivedFn } from './sugar-fhLIE7TT.js';
|
|
3
|
+
import { B as BaseAuditRecord } from './index-Yq60JP3s.js';
|
|
4
|
+
import { a as ReactiveLogBundle } from './reactive-log-BKALbfal.js';
|
|
5
|
+
import { G as Graph, a as GraphOptions } from './graph-D9LFnda9.js';
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
8
|
* PipelineGraph subclass (Wave A.1 Unit 1 — locked 2026-04-24).
|
|
@@ -55,7 +55,12 @@ interface GateOptions<T = unknown> {
|
|
|
55
55
|
};
|
|
56
56
|
}
|
|
57
57
|
interface GateController<T> {
|
|
58
|
-
|
|
58
|
+
/**
|
|
59
|
+
* The post-gate output node. Renamed from `node` (Tier 5.2 / EC6,
|
|
60
|
+
* 2026-04-29) to avoid shadowing `Graph.node(name)` when a gate is
|
|
61
|
+
* accessed off a `PipelineGraph` instance.
|
|
62
|
+
*/
|
|
63
|
+
readonly output: Node<T>;
|
|
59
64
|
readonly pending: Node<readonly T[]>;
|
|
60
65
|
readonly count: Node<number>;
|
|
61
66
|
readonly isOpen: Node<boolean>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { N as Node } from './node-
|
|
2
|
-
import { G as Graph } from './graph-
|
|
1
|
+
import { N as Node } from './node-kK3CvTrR.js';
|
|
2
|
+
import { G as Graph } from './graph-D9LFnda9.js';
|
|
3
3
|
|
|
4
4
|
/** Pluggable measurement backend. */
|
|
5
5
|
interface MeasurementAdapter {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { N as Node } from './node-
|
|
2
|
-
import { G as Graph } from './graph-
|
|
1
|
+
import { N as Node } from './node-kK3CvTrR.cjs';
|
|
2
|
+
import { G as Graph } from './graph-CWvEUQAq.cjs';
|
|
3
3
|
|
|
4
4
|
/** Pluggable measurement backend. */
|
|
5
5
|
interface MeasurementAdapter {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { V as VersioningLevel, b as NodeGuard, N as Node } from './node-
|
|
1
|
+
import { V as VersioningLevel, b as NodeGuard, N as Node } from './node-kK3CvTrR.js';
|
|
2
2
|
import { AppendLogStorageTier } from './extra/storage-tiers.js';
|
|
3
3
|
|
|
4
4
|
type ReactiveLogOptions<T> = {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { V as VersioningLevel, b as NodeGuard, N as Node } from './node-
|
|
1
|
+
import { V as VersioningLevel, b as NodeGuard, N as Node } from './node-kK3CvTrR.cjs';
|
|
2
2
|
import { AppendLogStorageTier } from './extra/storage-tiers.cjs';
|
|
3
3
|
|
|
4
4
|
type ReactiveLogOptions<T> = {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { N as Node, V as VersioningLevel, a as NodeOptions } from './node-
|
|
1
|
+
import { N as Node, V as VersioningLevel, a as NodeOptions } from './node-kK3CvTrR.cjs';
|
|
2
2
|
|
|
3
3
|
type ReactiveMapOptions<K, V> = {
|
|
4
4
|
/** Optional registry name for `describe()` / debugging. */
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { N as Node, V as VersioningLevel, a as NodeOptions } from './node-
|
|
1
|
+
import { N as Node, V as VersioningLevel, a as NodeOptions } from './node-kK3CvTrR.js';
|
|
2
2
|
|
|
3
3
|
type ReactiveMapOptions<K, V> = {
|
|
4
4
|
/** Optional registry name for `describe()` / debugging. */
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a,b,c,d,e,f,g,h,i,j,k,l,m,n}from"./chunk-D7GPHKFH.js";import"./chunk-L6NSJVJZ.js";import"./chunk-2T7U5EU6.js";import"./chunk-3G5U5QNE.js";import"./chunk-C72GO4IZ.js";import"./chunk-HITNVN6B.js";import"./chunk-ESMPEKEV.js";import"./chunk-CLVB32RD.js";import"./chunk-4VVTGLXJ.js";import"./chunk-GHBWHMRZ.js";import"./chunk-CRVT7D2P.js";import"./chunk-NTEURFZH.js";import"./chunk-CK2E7BTU.js";import"./chunk-QYADASLV.js";export{e as CircuitOpenError,i as RateLimiterOverflowError,b as ResilientPipelineGraph,l as TimeoutError,a as budgetGate,f as circuitBreaker,m as fallback,j as rateLimiter,c as resilientPipeline,d as retry,n as timeout,h as tokenBucket,g as withBreaker,k as withStatus};
|
|
@@ -1,4 +1,111 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { w as NodeDescribeKind, N as Node, A as Actor, F as FnCtx, c as NodeActions, y as NodeFnCleanup, a as NodeOptions } from './node-kK3CvTrR.cjs';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* JSON-shaped slice of a node for `Graph.describe()`
|
|
5
|
+
* (GRAPHREFLY-SPEC §3.6, Appendix B).
|
|
6
|
+
*/
|
|
7
|
+
type DescribeNodeOutput = {
|
|
8
|
+
type: NodeDescribeKind;
|
|
9
|
+
status?: Node["status"];
|
|
10
|
+
deps: string[];
|
|
11
|
+
meta?: Record<string, unknown>;
|
|
12
|
+
name?: string;
|
|
13
|
+
value?: unknown;
|
|
14
|
+
/** True when the node is in `"sentinel"` state (no value ever). */
|
|
15
|
+
sentinel?: boolean;
|
|
16
|
+
v?: {
|
|
17
|
+
id: string;
|
|
18
|
+
version: number;
|
|
19
|
+
cid?: string;
|
|
20
|
+
prev?: string | null;
|
|
21
|
+
};
|
|
22
|
+
guard?: string;
|
|
23
|
+
lastMutation?: Readonly<{
|
|
24
|
+
actor: Actor;
|
|
25
|
+
timestamp_ns: number;
|
|
26
|
+
}>;
|
|
27
|
+
/**
|
|
28
|
+
* Latest annotation attached via `graph.trace(path, annotation)` or via
|
|
29
|
+
* `graph.add(node, { name: path, annotation })`, when present. Populated by
|
|
30
|
+
* `Graph.describe` only — `describeNode` has no graph context.
|
|
31
|
+
*/
|
|
32
|
+
annotation?: string;
|
|
33
|
+
};
|
|
34
|
+
/**
|
|
35
|
+
* Detail level for progressive disclosure (Phase 3.3b).
|
|
36
|
+
*
|
|
37
|
+
* - `"minimal"` — `type`, `deps` only.
|
|
38
|
+
* - `"standard"` — minimal + `status`, `value`, `meta`, `v`.
|
|
39
|
+
* - `"full"` — every field.
|
|
40
|
+
* - `"spec"` — Tier 1.5.3 (Session A.1 lock + Phase 3 path (b)). Projects
|
|
41
|
+
* spec-relevant fields (`type`, `deps`, `meta` — including
|
|
42
|
+
* `meta.factory` / `meta.factoryArgs`) and strips runtime fields
|
|
43
|
+
* (`status`, `lastMutation`, `guard`, `sentinel`, `v`). **Retains
|
|
44
|
+
* `value` for state nodes only** so the seed initial value round-trips
|
|
45
|
+
* through `decompileSpec` → `compileSpec` without forcing every state
|
|
46
|
+
* constructor to spawn `meta.factory`/`factoryArgs` companion nodes.
|
|
47
|
+
* The output is structurally identical to the `GraphSpec` shape so
|
|
48
|
+
* `decompileSpec(g) === describe(g, { detail: "spec" })`.
|
|
49
|
+
*/
|
|
50
|
+
type DescribeDetail = "minimal" | "standard" | "full" | "spec";
|
|
51
|
+
/** Valid field names for `describe({ fields: [...] })`. */
|
|
52
|
+
type DescribeField = "type" | "status" | "value" | "deps" | "meta" | "v" | "guard" | "lastMutation" | `meta.${string}`;
|
|
53
|
+
/** Resolve which fields to include based on detail level or explicit field list. */
|
|
54
|
+
declare function resolveDescribeFields(detail?: DescribeDetail, fields?: readonly DescribeField[]): Set<string> | null;
|
|
55
|
+
/**
|
|
56
|
+
* Walk an arbitrary value, replacing non-JSON-serializable fields with
|
|
57
|
+
* descriptive string placeholders (Tier 1.5.3 Phase 2.5 — DG2=ii). Useful for
|
|
58
|
+
* `Graph.prototype.tagFactory(name, args)` when the factory's options include
|
|
59
|
+
* `LLMAdapter` instances, callbacks, or `Node`s that don't survive
|
|
60
|
+
* serialization. Output preserves structure for documentation / audit value;
|
|
61
|
+
* recipients of the spec see "<Node>" / "<function>" / etc. in place of the
|
|
62
|
+
* unserializable bits.
|
|
63
|
+
*
|
|
64
|
+
* Heuristics:
|
|
65
|
+
* - `null` / `undefined` / boolean / number / string — kept as-is.
|
|
66
|
+
* - `function` — `"<function>"`.
|
|
67
|
+
* - Object with `subscribe` method — `"<Node>"` (matches Node-shape duck check).
|
|
68
|
+
* - Array — recursed.
|
|
69
|
+
* - Plain object — recursed.
|
|
70
|
+
* - Anything else — `"<unserializable>"`.
|
|
71
|
+
*
|
|
72
|
+
* **`undefined`-key caveat (DF11, 2026-04-29 doc lock).** Keys whose value
|
|
73
|
+
* is `undefined` survive `placeholderArgs` (they are kept as-is per the
|
|
74
|
+
* heuristic above). However, `JSON.stringify` DROPS such keys at the
|
|
75
|
+
* serialization boundary, so a spec round-trip via `toJSONString` does
|
|
76
|
+
* not preserve them. Callers that need `undefined` to round-trip must
|
|
77
|
+
* substitute an explicit sentinel (e.g. `null`) before tagging — meta-
|
|
78
|
+
* vs-spec disagreement at the JSON boundary is otherwise inevitable.
|
|
79
|
+
*/
|
|
80
|
+
declare function placeholderArgs(opts: Record<string, unknown>): Record<string, unknown>;
|
|
81
|
+
/**
|
|
82
|
+
* Build a `meta` fragment that stamps a factory identifier and its construction
|
|
83
|
+
* arguments onto a node, so `describe({ detail: "spec" })` exposes enough
|
|
84
|
+
* information for `compileSpec` to recreate the node from the snapshot.
|
|
85
|
+
*
|
|
86
|
+
* Use inside node-producing factories at construction time:
|
|
87
|
+
*
|
|
88
|
+
* ```ts
|
|
89
|
+
* import { factoryTag } from "@graphrefly/graphrefly";
|
|
90
|
+
*
|
|
91
|
+
* export function rateLimiter<T>(source: NodeInput<T>, opts: RateLimiterOptions): Node<T> {
|
|
92
|
+
* return derived([fromAny(source)], fn, {
|
|
93
|
+
* name: "rate-limiter",
|
|
94
|
+
* meta: { ...factoryTag("rateLimiter", opts), domain: "resilience" },
|
|
95
|
+
* });
|
|
96
|
+
* }
|
|
97
|
+
* ```
|
|
98
|
+
*
|
|
99
|
+
* `factoryArgs` should be JSON-serializable so the spec round-trips through
|
|
100
|
+
* `decompileSpec → compileSpec`. Function-typed args break determinism — use
|
|
101
|
+
* the {@link COMPOSITION-GUIDE} §39 `meta.fnId` pattern for those.
|
|
102
|
+
*
|
|
103
|
+
* Tier 1.5.3 (Session A.1 lock).
|
|
104
|
+
*/
|
|
105
|
+
declare function factoryTag(factory: string, factoryArgs?: unknown): {
|
|
106
|
+
factory: string;
|
|
107
|
+
factoryArgs?: unknown;
|
|
108
|
+
};
|
|
2
109
|
|
|
3
110
|
/**
|
|
4
111
|
* Sugar constructors over the raw `node()` primitive.
|
|
@@ -96,6 +203,52 @@ type DerivedFn<T> = (data: readonly unknown[], ctx: FnCtx) => T | undefined | nu
|
|
|
96
203
|
* ```
|
|
97
204
|
*/
|
|
98
205
|
declare function derived<T = unknown>(deps: readonly Node[], fn: DerivedFn<T>, opts?: NodeOptions<T>): Node<T>;
|
|
206
|
+
/**
|
|
207
|
+
* Maps a tuple of `Node<V>`s to a tuple of `V`s. Used by {@link derivedT}
|
|
208
|
+
* and {@link effectT} to propagate dep value types into the callback's
|
|
209
|
+
* `data` parameter — eliminating per-callsite `as` casts.
|
|
210
|
+
*/
|
|
211
|
+
type NodeValues<TDeps extends readonly Node<unknown>[]> = {
|
|
212
|
+
readonly [K in keyof TDeps]: TDeps[K] extends Node<infer V> ? V : never;
|
|
213
|
+
};
|
|
214
|
+
/**
|
|
215
|
+
* Typed callback for {@link derivedT}. Each tuple element corresponds
|
|
216
|
+
* positionally to the matching dep's value type.
|
|
217
|
+
*/
|
|
218
|
+
type DerivedTFn<TDeps extends readonly Node<unknown>[], TOut> = (data: NodeValues<TDeps>, ctx: FnCtx) => TOut | undefined | null;
|
|
219
|
+
/**
|
|
220
|
+
* Typed callback for {@link effectT}. Each tuple element corresponds
|
|
221
|
+
* positionally to the matching dep's value type.
|
|
222
|
+
*/
|
|
223
|
+
type EffectTFn<TDeps extends readonly Node<unknown>[]> = (data: NodeValues<TDeps>, actions: NodeActions, ctx: FnCtx) => NodeFnCleanup | void;
|
|
224
|
+
/**
|
|
225
|
+
* Typed-tuple variant of {@link derived}. Use when the dep types matter at
|
|
226
|
+
* the callback boundary — `data` is inferred as a tuple of dep value types
|
|
227
|
+
* instead of `readonly unknown[]`.
|
|
228
|
+
*
|
|
229
|
+
* Same runtime semantics as {@link derived} (first-run gate, snapshot
|
|
230
|
+
* combine semantics, equals substitution).
|
|
231
|
+
*
|
|
232
|
+
* **`partial: true` is rejected at the type level (qa F-E, 2026-04-29).**
|
|
233
|
+
* Tuple slots in `NodeValues<TDeps>` resolve to `V` (never `V | undefined`),
|
|
234
|
+
* but `partial: true` lets fn run before every dep has fired. The two are
|
|
235
|
+
* unsound together — fn would receive `undefined` for an unfired dep but
|
|
236
|
+
* see it typed as `V`. Callers needing partial firing keep using untyped
|
|
237
|
+
* {@link derived} where `data` is `readonly unknown[]` and the
|
|
238
|
+
* `=== undefined` guard is sanctioned (COMPOSITION-GUIDE §3 partial-true
|
|
239
|
+
* exception).
|
|
240
|
+
*
|
|
241
|
+
* @example
|
|
242
|
+
* ```ts
|
|
243
|
+
* const a = state(1);
|
|
244
|
+
* const b = state("hi");
|
|
245
|
+
* // sum: number, label: string — no casts needed.
|
|
246
|
+
* const out = derivedT([a, b], ([sum, label]) => `${label}:${sum * 2}`);
|
|
247
|
+
* ```
|
|
248
|
+
*/
|
|
249
|
+
declare function derivedT<TDeps extends readonly Node<unknown>[], TOut>(deps: TDeps, fn: DerivedTFn<TDeps, TOut>, opts?: Omit<NodeOptions<TOut>, "partial"> & {
|
|
250
|
+
partial?: false;
|
|
251
|
+
}): Node<TOut>;
|
|
99
252
|
/**
|
|
100
253
|
* User-level effect compute: fires when deps settle. Return value is NOT
|
|
101
254
|
* auto-emitted — use `actions.emit(v)` / `actions.down(msgs)` explicitly if
|
|
@@ -105,6 +258,29 @@ declare function derived<T = unknown>(deps: readonly Node[], fn: DerivedFn<T>, o
|
|
|
105
258
|
* See {@link NodeFnCleanup}.
|
|
106
259
|
*/
|
|
107
260
|
type EffectFn = (data: readonly unknown[], actions: NodeActions, ctx: FnCtx) => NodeFnCleanup | void;
|
|
261
|
+
/**
|
|
262
|
+
* Typed-tuple variant of {@link effect}. Use when the dep types matter at
|
|
263
|
+
* the callback boundary — `data` is inferred as a tuple of dep value types
|
|
264
|
+
* instead of `readonly unknown[]`.
|
|
265
|
+
*
|
|
266
|
+
* Same runtime semantics as {@link effect} (first-run gate, no auto-emit,
|
|
267
|
+
* cleanup contract).
|
|
268
|
+
*
|
|
269
|
+
* **`partial: true` is rejected at the type level (qa F-E, 2026-04-29).**
|
|
270
|
+
* See {@link derivedT} for the soundness rationale.
|
|
271
|
+
*
|
|
272
|
+
* @example
|
|
273
|
+
* ```ts
|
|
274
|
+
* const user = state<User | null>(null);
|
|
275
|
+
* const cfg = state<Config>(defaultCfg);
|
|
276
|
+
* effectT([user, cfg], ([u, c]) => {
|
|
277
|
+
* if (u != null) hydrate(u, c);
|
|
278
|
+
* });
|
|
279
|
+
* ```
|
|
280
|
+
*/
|
|
281
|
+
declare function effectT<TDeps extends readonly Node<unknown>[]>(deps: TDeps, fn: EffectTFn<TDeps>, opts?: Omit<NodeOptions<unknown>, "partial"> & {
|
|
282
|
+
partial?: false;
|
|
283
|
+
}): Node<unknown>;
|
|
108
284
|
/**
|
|
109
285
|
* Runs a side-effect when deps settle. Return value is not auto-emitted.
|
|
110
286
|
*
|
|
@@ -220,4 +396,4 @@ type PipeOperator = (n: Node) => Node;
|
|
|
220
396
|
*/
|
|
221
397
|
declare function pipe(source: Node, ...ops: PipeOperator[]): Node;
|
|
222
398
|
|
|
223
|
-
export { type AutoTrackOptions as A, type
|
|
399
|
+
export { type AutoTrackOptions as A, type DescribeNodeOutput as D, type EffectFn as E, type NodeValues as N, type PipeOperator as P, type TrackFn as T, type DerivedFn as a, type DerivedTFn as b, type DescribeDetail as c, type DescribeField as d, type DynamicFn as e, type EffectTFn as f, type ProducerFn as g, autoTrackNode as h, derived as i, derivedT as j, dynamicNode as k, effect as l, effectT as m, factoryTag as n, placeholderArgs as o, pipe as p, producer as q, resolveDescribeFields as r, state as s };
|
|
@@ -1,4 +1,111 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { w as NodeDescribeKind, N as Node, A as Actor, F as FnCtx, c as NodeActions, y as NodeFnCleanup, a as NodeOptions } from './node-kK3CvTrR.js';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* JSON-shaped slice of a node for `Graph.describe()`
|
|
5
|
+
* (GRAPHREFLY-SPEC §3.6, Appendix B).
|
|
6
|
+
*/
|
|
7
|
+
type DescribeNodeOutput = {
|
|
8
|
+
type: NodeDescribeKind;
|
|
9
|
+
status?: Node["status"];
|
|
10
|
+
deps: string[];
|
|
11
|
+
meta?: Record<string, unknown>;
|
|
12
|
+
name?: string;
|
|
13
|
+
value?: unknown;
|
|
14
|
+
/** True when the node is in `"sentinel"` state (no value ever). */
|
|
15
|
+
sentinel?: boolean;
|
|
16
|
+
v?: {
|
|
17
|
+
id: string;
|
|
18
|
+
version: number;
|
|
19
|
+
cid?: string;
|
|
20
|
+
prev?: string | null;
|
|
21
|
+
};
|
|
22
|
+
guard?: string;
|
|
23
|
+
lastMutation?: Readonly<{
|
|
24
|
+
actor: Actor;
|
|
25
|
+
timestamp_ns: number;
|
|
26
|
+
}>;
|
|
27
|
+
/**
|
|
28
|
+
* Latest annotation attached via `graph.trace(path, annotation)` or via
|
|
29
|
+
* `graph.add(node, { name: path, annotation })`, when present. Populated by
|
|
30
|
+
* `Graph.describe` only — `describeNode` has no graph context.
|
|
31
|
+
*/
|
|
32
|
+
annotation?: string;
|
|
33
|
+
};
|
|
34
|
+
/**
|
|
35
|
+
* Detail level for progressive disclosure (Phase 3.3b).
|
|
36
|
+
*
|
|
37
|
+
* - `"minimal"` — `type`, `deps` only.
|
|
38
|
+
* - `"standard"` — minimal + `status`, `value`, `meta`, `v`.
|
|
39
|
+
* - `"full"` — every field.
|
|
40
|
+
* - `"spec"` — Tier 1.5.3 (Session A.1 lock + Phase 3 path (b)). Projects
|
|
41
|
+
* spec-relevant fields (`type`, `deps`, `meta` — including
|
|
42
|
+
* `meta.factory` / `meta.factoryArgs`) and strips runtime fields
|
|
43
|
+
* (`status`, `lastMutation`, `guard`, `sentinel`, `v`). **Retains
|
|
44
|
+
* `value` for state nodes only** so the seed initial value round-trips
|
|
45
|
+
* through `decompileSpec` → `compileSpec` without forcing every state
|
|
46
|
+
* constructor to spawn `meta.factory`/`factoryArgs` companion nodes.
|
|
47
|
+
* The output is structurally identical to the `GraphSpec` shape so
|
|
48
|
+
* `decompileSpec(g) === describe(g, { detail: "spec" })`.
|
|
49
|
+
*/
|
|
50
|
+
type DescribeDetail = "minimal" | "standard" | "full" | "spec";
|
|
51
|
+
/** Valid field names for `describe({ fields: [...] })`. */
|
|
52
|
+
type DescribeField = "type" | "status" | "value" | "deps" | "meta" | "v" | "guard" | "lastMutation" | `meta.${string}`;
|
|
53
|
+
/** Resolve which fields to include based on detail level or explicit field list. */
|
|
54
|
+
declare function resolveDescribeFields(detail?: DescribeDetail, fields?: readonly DescribeField[]): Set<string> | null;
|
|
55
|
+
/**
|
|
56
|
+
* Walk an arbitrary value, replacing non-JSON-serializable fields with
|
|
57
|
+
* descriptive string placeholders (Tier 1.5.3 Phase 2.5 — DG2=ii). Useful for
|
|
58
|
+
* `Graph.prototype.tagFactory(name, args)` when the factory's options include
|
|
59
|
+
* `LLMAdapter` instances, callbacks, or `Node`s that don't survive
|
|
60
|
+
* serialization. Output preserves structure for documentation / audit value;
|
|
61
|
+
* recipients of the spec see "<Node>" / "<function>" / etc. in place of the
|
|
62
|
+
* unserializable bits.
|
|
63
|
+
*
|
|
64
|
+
* Heuristics:
|
|
65
|
+
* - `null` / `undefined` / boolean / number / string — kept as-is.
|
|
66
|
+
* - `function` — `"<function>"`.
|
|
67
|
+
* - Object with `subscribe` method — `"<Node>"` (matches Node-shape duck check).
|
|
68
|
+
* - Array — recursed.
|
|
69
|
+
* - Plain object — recursed.
|
|
70
|
+
* - Anything else — `"<unserializable>"`.
|
|
71
|
+
*
|
|
72
|
+
* **`undefined`-key caveat (DF11, 2026-04-29 doc lock).** Keys whose value
|
|
73
|
+
* is `undefined` survive `placeholderArgs` (they are kept as-is per the
|
|
74
|
+
* heuristic above). However, `JSON.stringify` DROPS such keys at the
|
|
75
|
+
* serialization boundary, so a spec round-trip via `toJSONString` does
|
|
76
|
+
* not preserve them. Callers that need `undefined` to round-trip must
|
|
77
|
+
* substitute an explicit sentinel (e.g. `null`) before tagging — meta-
|
|
78
|
+
* vs-spec disagreement at the JSON boundary is otherwise inevitable.
|
|
79
|
+
*/
|
|
80
|
+
declare function placeholderArgs(opts: Record<string, unknown>): Record<string, unknown>;
|
|
81
|
+
/**
|
|
82
|
+
* Build a `meta` fragment that stamps a factory identifier and its construction
|
|
83
|
+
* arguments onto a node, so `describe({ detail: "spec" })` exposes enough
|
|
84
|
+
* information for `compileSpec` to recreate the node from the snapshot.
|
|
85
|
+
*
|
|
86
|
+
* Use inside node-producing factories at construction time:
|
|
87
|
+
*
|
|
88
|
+
* ```ts
|
|
89
|
+
* import { factoryTag } from "@graphrefly/graphrefly";
|
|
90
|
+
*
|
|
91
|
+
* export function rateLimiter<T>(source: NodeInput<T>, opts: RateLimiterOptions): Node<T> {
|
|
92
|
+
* return derived([fromAny(source)], fn, {
|
|
93
|
+
* name: "rate-limiter",
|
|
94
|
+
* meta: { ...factoryTag("rateLimiter", opts), domain: "resilience" },
|
|
95
|
+
* });
|
|
96
|
+
* }
|
|
97
|
+
* ```
|
|
98
|
+
*
|
|
99
|
+
* `factoryArgs` should be JSON-serializable so the spec round-trips through
|
|
100
|
+
* `decompileSpec → compileSpec`. Function-typed args break determinism — use
|
|
101
|
+
* the {@link COMPOSITION-GUIDE} §39 `meta.fnId` pattern for those.
|
|
102
|
+
*
|
|
103
|
+
* Tier 1.5.3 (Session A.1 lock).
|
|
104
|
+
*/
|
|
105
|
+
declare function factoryTag(factory: string, factoryArgs?: unknown): {
|
|
106
|
+
factory: string;
|
|
107
|
+
factoryArgs?: unknown;
|
|
108
|
+
};
|
|
2
109
|
|
|
3
110
|
/**
|
|
4
111
|
* Sugar constructors over the raw `node()` primitive.
|
|
@@ -96,6 +203,52 @@ type DerivedFn<T> = (data: readonly unknown[], ctx: FnCtx) => T | undefined | nu
|
|
|
96
203
|
* ```
|
|
97
204
|
*/
|
|
98
205
|
declare function derived<T = unknown>(deps: readonly Node[], fn: DerivedFn<T>, opts?: NodeOptions<T>): Node<T>;
|
|
206
|
+
/**
|
|
207
|
+
* Maps a tuple of `Node<V>`s to a tuple of `V`s. Used by {@link derivedT}
|
|
208
|
+
* and {@link effectT} to propagate dep value types into the callback's
|
|
209
|
+
* `data` parameter — eliminating per-callsite `as` casts.
|
|
210
|
+
*/
|
|
211
|
+
type NodeValues<TDeps extends readonly Node<unknown>[]> = {
|
|
212
|
+
readonly [K in keyof TDeps]: TDeps[K] extends Node<infer V> ? V : never;
|
|
213
|
+
};
|
|
214
|
+
/**
|
|
215
|
+
* Typed callback for {@link derivedT}. Each tuple element corresponds
|
|
216
|
+
* positionally to the matching dep's value type.
|
|
217
|
+
*/
|
|
218
|
+
type DerivedTFn<TDeps extends readonly Node<unknown>[], TOut> = (data: NodeValues<TDeps>, ctx: FnCtx) => TOut | undefined | null;
|
|
219
|
+
/**
|
|
220
|
+
* Typed callback for {@link effectT}. Each tuple element corresponds
|
|
221
|
+
* positionally to the matching dep's value type.
|
|
222
|
+
*/
|
|
223
|
+
type EffectTFn<TDeps extends readonly Node<unknown>[]> = (data: NodeValues<TDeps>, actions: NodeActions, ctx: FnCtx) => NodeFnCleanup | void;
|
|
224
|
+
/**
|
|
225
|
+
* Typed-tuple variant of {@link derived}. Use when the dep types matter at
|
|
226
|
+
* the callback boundary — `data` is inferred as a tuple of dep value types
|
|
227
|
+
* instead of `readonly unknown[]`.
|
|
228
|
+
*
|
|
229
|
+
* Same runtime semantics as {@link derived} (first-run gate, snapshot
|
|
230
|
+
* combine semantics, equals substitution).
|
|
231
|
+
*
|
|
232
|
+
* **`partial: true` is rejected at the type level (qa F-E, 2026-04-29).**
|
|
233
|
+
* Tuple slots in `NodeValues<TDeps>` resolve to `V` (never `V | undefined`),
|
|
234
|
+
* but `partial: true` lets fn run before every dep has fired. The two are
|
|
235
|
+
* unsound together — fn would receive `undefined` for an unfired dep but
|
|
236
|
+
* see it typed as `V`. Callers needing partial firing keep using untyped
|
|
237
|
+
* {@link derived} where `data` is `readonly unknown[]` and the
|
|
238
|
+
* `=== undefined` guard is sanctioned (COMPOSITION-GUIDE §3 partial-true
|
|
239
|
+
* exception).
|
|
240
|
+
*
|
|
241
|
+
* @example
|
|
242
|
+
* ```ts
|
|
243
|
+
* const a = state(1);
|
|
244
|
+
* const b = state("hi");
|
|
245
|
+
* // sum: number, label: string — no casts needed.
|
|
246
|
+
* const out = derivedT([a, b], ([sum, label]) => `${label}:${sum * 2}`);
|
|
247
|
+
* ```
|
|
248
|
+
*/
|
|
249
|
+
declare function derivedT<TDeps extends readonly Node<unknown>[], TOut>(deps: TDeps, fn: DerivedTFn<TDeps, TOut>, opts?: Omit<NodeOptions<TOut>, "partial"> & {
|
|
250
|
+
partial?: false;
|
|
251
|
+
}): Node<TOut>;
|
|
99
252
|
/**
|
|
100
253
|
* User-level effect compute: fires when deps settle. Return value is NOT
|
|
101
254
|
* auto-emitted — use `actions.emit(v)` / `actions.down(msgs)` explicitly if
|
|
@@ -105,6 +258,29 @@ declare function derived<T = unknown>(deps: readonly Node[], fn: DerivedFn<T>, o
|
|
|
105
258
|
* See {@link NodeFnCleanup}.
|
|
106
259
|
*/
|
|
107
260
|
type EffectFn = (data: readonly unknown[], actions: NodeActions, ctx: FnCtx) => NodeFnCleanup | void;
|
|
261
|
+
/**
|
|
262
|
+
* Typed-tuple variant of {@link effect}. Use when the dep types matter at
|
|
263
|
+
* the callback boundary — `data` is inferred as a tuple of dep value types
|
|
264
|
+
* instead of `readonly unknown[]`.
|
|
265
|
+
*
|
|
266
|
+
* Same runtime semantics as {@link effect} (first-run gate, no auto-emit,
|
|
267
|
+
* cleanup contract).
|
|
268
|
+
*
|
|
269
|
+
* **`partial: true` is rejected at the type level (qa F-E, 2026-04-29).**
|
|
270
|
+
* See {@link derivedT} for the soundness rationale.
|
|
271
|
+
*
|
|
272
|
+
* @example
|
|
273
|
+
* ```ts
|
|
274
|
+
* const user = state<User | null>(null);
|
|
275
|
+
* const cfg = state<Config>(defaultCfg);
|
|
276
|
+
* effectT([user, cfg], ([u, c]) => {
|
|
277
|
+
* if (u != null) hydrate(u, c);
|
|
278
|
+
* });
|
|
279
|
+
* ```
|
|
280
|
+
*/
|
|
281
|
+
declare function effectT<TDeps extends readonly Node<unknown>[]>(deps: TDeps, fn: EffectTFn<TDeps>, opts?: Omit<NodeOptions<unknown>, "partial"> & {
|
|
282
|
+
partial?: false;
|
|
283
|
+
}): Node<unknown>;
|
|
108
284
|
/**
|
|
109
285
|
* Runs a side-effect when deps settle. Return value is not auto-emitted.
|
|
110
286
|
*
|
|
@@ -220,4 +396,4 @@ type PipeOperator = (n: Node) => Node;
|
|
|
220
396
|
*/
|
|
221
397
|
declare function pipe(source: Node, ...ops: PipeOperator[]): Node;
|
|
222
398
|
|
|
223
|
-
export { type AutoTrackOptions as A, type
|
|
399
|
+
export { type AutoTrackOptions as A, type DescribeNodeOutput as D, type EffectFn as E, type NodeValues as N, type PipeOperator as P, type TrackFn as T, type DerivedFn as a, type DerivedTFn as b, type DescribeDetail as c, type DescribeField as d, type DynamicFn as e, type EffectTFn as f, type ProducerFn as g, autoTrackNode as h, derived as i, derivedT as j, dynamicNode as k, effect as l, effectT as m, factoryTag as n, placeholderArgs as o, pipe as p, producer as q, resolveDescribeFields as r, state as s };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@graphrefly/graphrefly",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.44.0",
|
|
4
4
|
"packageManager": "pnpm@10.33.0+sha512.10568bb4a6afb58c9eb3630da90cc9516417abebd3fabbe6739f0ae795728da1491e9db5a544c76ad8eb7570f5c4bb3d6c637b2cb41bfdcdb47fa823c8649319",
|
|
5
5
|
"description": "Reactive harness layer for agent workflows. Describe automations in plain language, trace every decision, enforce policies, persist checkpoints. Zero dependencies.",
|
|
6
6
|
"repository": {
|
package/dist/chunk-3XDYJRYU.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{c as B,d as G,f as v,h as W}from"./chunk-FDQGFWLF.js";import{a as L}from"./chunk-L6NSJVJZ.js";import{j as I}from"./chunk-626TESAC.js";import{b as D}from"./chunk-35JTVPOX.js";import{b as U}from"./chunk-KGKJCHEK.js";import{b as K}from"./chunk-TZQPPQEQ.js";import{b as Q}from"./chunk-JQFH2DV6.js";import{C as _,m as z}from"./chunk-V5A7M7RJ.js";import{D as P,G as N,m as f,p as $}from"./chunk-LYCLF26R.js";import{b as x,j as S}from"./chunk-CK2E7BTU.js";import{b as ee}from"./chunk-QYADASLV.js";var re={};ee(re,{JobFlowGraph:()=>w,JobQueueGraph:()=>y,jobEventKeyOf:()=>oe,jobFlow:()=>se,jobQueue:()=>V});var te=256,ne=1024;function F(p,e){if(!Number.isFinite(p)||!Number.isInteger(p)||p<0)throw new Error(`${e} must be a non-negative integer`);return p}function T(p,e){return L("job_queue",p,e)}var oe=p=>p.action,y=class extends I{_pending;_jobs;_seqCursor;pending;jobs;depth;events;audit;_enqueueImpl;_ackImpl;_nackImpl;_removeByIdImpl;constructor(e,n={}){super(e,n.graph),this._pending=U([],{name:"pending"}),this._jobs=K({name:"jobs"}),this.pending=this._pending.items,this.jobs=this._jobs.entries,this.add(this.pending,{name:"pending"}),this.add(this.jobs,{name:"jobs"}),this.depth=N([this.pending],([t])=>t.length,{name:"depth",describeKind:"derived",meta:T("queue_depth"),initial:0}),this.add(this.depth,{name:"depth"}),this.addDisposer(_(this.depth)),this.events=B({name:"events",retainedLimit:1024,graph:this}),this.audit=this.events,this._seqCursor=W(this,"seq",0),this._enqueueImpl=v((t,o)=>{let a=this._seqCursor.cache,s=o.id??`${this.name}-${a}`;if(this._jobs.get(s)!==void 0)throw new Error(`jobQueue("${this.name}"): duplicate job id "${s}"`);let u={id:s,payload:t,attempts:0,metadata:Object.freeze({...o.metadata??{}}),state:"queued"};return this._jobs.set(s,u),this._pending.append(s),s},{audit:this.events,seq:this._seqCursor,freeze:!1,onSuccess:([t],o,{t_ns:a,seq:s})=>({action:"enqueue",id:o,payload:t,t_ns:a,seq:s??0})}),this._ackImpl=v((t,o)=>{this._jobs.delete(t)},{audit:this.events,seq:this._seqCursor,freeze:!1,onSuccess:([t,o],a,{t_ns:s,seq:u})=>({action:"ack",id:t,attempts:o.attempts,t_ns:s,seq:u??0})}),this._nackImpl=v((t,o,a)=>{a?(this._jobs.set(t,{...o,state:"queued"}),this._pending.append(t)):this._jobs.delete(t)},{audit:this.events,seq:this._seqCursor,freeze:!1,onSuccess:([t,o],a,{t_ns:s,seq:u})=>({action:"nack",id:t,attempts:o.attempts,t_ns:s,seq:u??0})}),this._removeByIdImpl=v((t,o)=>{if(o.state==="queued"){let s=this.pending.cache.indexOf(t);s>=0&&this._pending.pop(s)}this._jobs.delete(t)},{audit:this.events,seq:this._seqCursor,freeze:!1,onSuccess:([t,o],a,{t_ns:s,seq:u})=>({action:"remove",id:t,attempts:o.attempts,t_ns:s,seq:u??0})})}attachEventStorage(e){return this.events.attachStorage(e)}enqueue(e,n={}){return this._enqueueImpl(e,n)}claim(e=1){let n=F(e,"job queue claim limit");if(n===0)return[];let t=[];for(;t.length<n&&this.pending.cache.length!==0;){let a=this._pending.pop(0),s=this._jobs.get(a);if(!s||s.state!=="queued")continue;let u={...s,state:"inflight",attempts:s.attempts+1};this._jobs.set(a,u),t.push(u),this.events.append({action:"claim",id:a,attempts:u.attempts,t_ns:$(),seq:G(this._seqCursor)})}return t}ack(e){let n=this._jobs.get(e);return!n||n.state!=="inflight"?!1:(this._ackImpl(e,n),!0)}nack(e,n={}){let t=this._jobs.get(e);return!t||t.state!=="inflight"?!1:(this._nackImpl(e,t,n.requeue??!0),!0)}removeById(e){let n=this._jobs.get(e);return n?(this._removeByIdImpl(e,n),!0):!1}consumeFrom(e,n){return e.subscribe(t=>{for(let o of t){if(o[0]!==x)continue;let a=o[1];this.enqueue(a,n?{metadata:n.metadata}:void 0)}})}},w=class extends I{_stageNames;_stageWorkFns;_queues=new Map;_completed;completed;completedCount;constructor(e,n={}){super(e,n.graph);let t=n.stages??["incoming","processing","done"],o=[],a=new Map,s=new Map;for(let r of t){let i=typeof r=="string"?r.trim():r.name.trim();typeof r!="string"&&r.work&&a.set(i,r.work),typeof r!="string"&&r.maxPerPump!=null&&s.set(i,Math.max(1,F(r.maxPerPump,`job flow stage "${i}" maxPerPump`))),o.push(i)}if(o.length<2)throw new Error(`jobFlow("${e}"): requires at least 2 stages`);if(new Set(o).size!==o.length)throw new Error(`jobFlow("${e}"): stage names must be unique`);this._stageNames=Object.freeze([...o]),this._stageWorkFns=a;for(let r of this._stageNames){let i=V(`${e}-${r}`);this._queues.set(r,i),this.mount(r,i)}this._completed=Q([],{name:"completed",maxSize:ne}),this.completed=this._completed.entries,this.add(this.completed,{name:"completed"}),this.completedCount=N([this.completed],([r])=>r.length,{name:"completedCount",describeKind:"derived",meta:T("job_flow_completed_count"),initial:0}),this.add(this.completedCount,{name:"completedCount"}),this.addDisposer(_(this.completedCount));let X=Math.max(1,F(n.maxPerPump??te,"job flow maxPerPump"));for(let r=0;r<this._stageNames.length;r+=1){let i=this._stageNames[r],l=this.queue(i),j=r+1<this._stageNames.length?this.queue(this._stageNames[r+1]):null,R=this._stageWorkFns.get(i),C=s.get(i)??X,M=j===null;if(R){let h=P([l.pending],()=>{let c=0;for(;c<C;){let g=l.claim(1);if(g.length===0)break;let d=g[0];if(!d)break;let q=[...d.metadata.job_flow_path??[],i],b;try{b=R(d)}catch{l.nack(d.id,{requeue:!1}),c+=1;continue}let k=z(b),E=!1,m;m=k.subscribe(Y=>{if(!E){for(let J of Y)if(J[0]===x){E=!0,m?m():Promise.resolve().then(()=>m?.());let A=J[1],O={...d.metadata,job_flow_path:q};if(M){let Z={...d,payload:A,metadata:Object.freeze(O)};f(()=>{l.ack(d.id),this._completed.append(Z)})}else f(()=>{l.ack(d.id),j.enqueue(A,{metadata:O})});return}else if(J[0]===S){E=!0,m?m():Promise.resolve().then(()=>m?.()),l.nack(d.id,{requeue:!1});return}}}),c+=1}},{name:`pump_${i}`,describeKind:"effect",meta:T("job_flow_pump",{stage:i,has_work:!0})});this.add(h,{name:`pump_${i}`}),this.addDisposer(_(h))}else{let h=P([l.pending],()=>{let c=0;for(;c<C;){let g=l.claim(1);if(g.length===0)break;let d=g[0];if(!d)break;let q=[...d.metadata.job_flow_path??[],i],b={...d.metadata,job_flow_path:q};if(M){let k={...d,metadata:Object.freeze(b)};f(()=>{l.ack(d.id),this._completed.append(k)})}else f(()=>{l.ack(d.id),j.enqueue(d.payload,{metadata:b})});c+=1}},{name:`pump_${i}`,describeKind:"effect",meta:T("job_flow_pump",{stage:i,has_work:!1})});this.add(h,{name:`pump_${i}`}),this.addDisposer(_(h))}}}stages(){return this._stageNames}queue(e){let n=this._queues.get(e);if(!n)throw new Error(`jobFlow("${this.name}"): unknown stage "${e}"`);return n}enqueue(e,n={}){return this.queue(this._stageNames[0]).enqueue(e,n)}retainedCompleted(){return this.completed.cache}};function V(p,e){return new y(p,e)}function se(p,e){let n=new w(p,e),{factory:t,factoryArgs:o,...a}=e??{};return n.tagFactory("jobFlow",D(a)),n}export{oe as a,y as b,w as c,V as d,se as e,re as f};
|
package/dist/chunk-4I45FVQS.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as w,b as U,c as K}from"./chunk-35JTVPOX.js";import{A as b,B as F,C as H,D as G,E as h,F as k,G as B,H as Y,I as v,J as P,K as W,i as q,j as z,k as g,m as S,n as C,o as I,p as M,q as _,r as u,s as J,t as Q,u as X,v as Z,w as L,x as m,y as x,z as V}from"./chunk-LYCLF26R.js";import{a as e,b as t,c as o,d as p,e as r,f as n,g as s,h as i,i as y,j as a,k as d,l as c,m as N,n as T,o as E,p as O,q as l,r as A,s as D,t as f,u as R}from"./chunk-CK2E7BTU.js";import{b as j}from"./chunk-QYADASLV.js";var $={};j($,{COMPLETE:()=>y,COMPLETE_MSG:()=>E,COMPLETE_ONLY_BATCH:()=>f,DATA:()=>t,DEFAULT_ACTOR:()=>q,DIRTY:()=>o,DIRTY_MSG:()=>d,DIRTY_ONLY_BATCH:()=>l,ERROR:()=>a,GraphReFlyConfig:()=>_,GuardDenied:()=>J,INVALIDATE:()=>r,INVALIDATE_MSG:()=>N,INVALIDATE_ONLY_BATCH:()=>D,NodeImpl:()=>H,PAUSE:()=>n,RESOLVED:()=>p,RESOLVED_MSG:()=>c,RESOLVED_ONLY_BATCH:()=>A,RESUME:()=>s,START:()=>e,START_MSG:()=>T,TEARDOWN:()=>i,TEARDOWN_MSG:()=>O,TEARDOWN_ONLY_BATCH:()=>R,accessHintForGuard:()=>Z,advanceVersion:()=>x,autoTrackNode:()=>P,batch:()=>S,configure:()=>F,createVersioning:()=>m,defaultConfig:()=>b,defaultHash:()=>L,derived:()=>B,downWithBatch:()=>C,dynamicNode:()=>v,effect:()=>Y,factoryTag:()=>K,isBatching:()=>g,isV1:()=>V,monotonicNs:()=>I,node:()=>G,normalizeActor:()=>z,pipe:()=>W,placeholderArgs:()=>U,policy:()=>Q,policyFromRules:()=>X,producer:()=>k,registerBuiltins:()=>u,resolveDescribeFields:()=>w,state:()=>h,wallClockNs:()=>M});export{$ as a};
|