@graphrefly/graphrefly 0.27.0 → 0.28.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/backoff-HPZMEZNF.js +1 -0
- package/dist/cascading-B-5zmAUv.d.cts +180 -0
- package/dist/cascading-D9WG1-9L.d.ts +180 -0
- package/dist/chunk-2FOAM3OR.js +1 -0
- package/dist/chunk-2PMCKKRK.js +1 -0
- package/dist/chunk-3JXNEPCD.js +2 -0
- package/dist/chunk-3R5HFPX7.js +78 -0
- package/dist/chunk-4GKB4OUJ.js +1 -0
- package/dist/chunk-4VVTGLXJ.js +1 -0
- package/dist/chunk-5QDBSZBV.js +1 -0
- package/dist/chunk-6QZNQS5B.js +1 -0
- package/dist/chunk-6V3SEX2I.js +1 -0
- package/dist/chunk-76A3HVQE.js +9 -0
- package/dist/chunk-7H6LGFUG.js +64 -0
- package/dist/chunk-CK2E7BTU.js +1 -0
- package/dist/chunk-CKCSDI7T.js +6 -0
- package/dist/chunk-CRXTH3SH.js +1 -0
- package/dist/chunk-CWLN3X3N.js +1 -0
- package/dist/chunk-D7A7DBE4.js +1 -0
- package/dist/chunk-DBGGMN3D.js +1 -0
- package/dist/chunk-DQA3UIQ2.js +1 -0
- package/dist/chunk-ERLIRFPA.js +1 -0
- package/dist/chunk-ESMPEKEV.js +1 -0
- package/dist/chunk-ETWTCCJI.js +1 -0
- package/dist/chunk-FNYWM6JC.js +1 -0
- package/dist/chunk-GHJJR5P4.js +1 -0
- package/dist/chunk-GPW2V3RE.js +1 -0
- package/dist/chunk-I6VIH3VA.js +1 -0
- package/dist/chunk-K2GNMCQT.js +1 -0
- package/dist/chunk-LBTDSCCO.js +3 -0
- package/dist/chunk-LQ3Y5NJS.js +1 -0
- package/dist/chunk-MIQTDPY4.js +5 -0
- package/dist/chunk-MTTAAPCK.js +1 -0
- package/dist/chunk-OAWLCNJJ.js +1 -0
- package/dist/chunk-OBKQQA5I.js +1 -0
- package/dist/chunk-OYHGKYQM.js +1 -0
- package/dist/chunk-PIOGHC63.js +1 -0
- package/dist/chunk-QWAPKG3O.js +2 -0
- package/dist/chunk-QYADASLV.js +1 -0
- package/dist/chunk-RHESUC3V.js +43 -0
- package/dist/chunk-S35VARIR.js +1 -0
- package/dist/chunk-SC3U7ETD.js +1 -0
- package/dist/chunk-U3AICJKU.js +1 -0
- package/dist/chunk-UMBIDLJ4.js +1 -0
- package/dist/chunk-UPHHLMHE.js +1 -0
- package/dist/chunk-UPXUCFMX.js +1 -0
- package/dist/chunk-UWJE5FQA.js +18 -0
- package/dist/chunk-V6YQICXZ.js +1 -0
- package/dist/chunk-VIMF6LGM.js +1 -0
- package/dist/chunk-VJLMUKOI.js +1 -0
- package/dist/chunk-VPYBOXVT.js +1 -0
- package/dist/chunk-VTPVOGHH.js +1 -0
- package/dist/chunk-WQ2BN6X6.js +1 -0
- package/dist/chunk-XAUNPIMX.js +1 -0
- package/dist/chunk-Y2EMPB3I.js +1 -0
- package/dist/chunk-Z4HDAS2Q.js +1 -0
- package/dist/chunk-ZB5EHBIO.js +1 -0
- package/dist/chunk-ZV2DXV5A.js +23 -0
- package/dist/compat/index.cjs +14 -7656
- package/dist/compat/index.d.cts +15 -14
- package/dist/compat/index.d.ts +15 -14
- package/dist/compat/index.js +1 -50
- package/dist/compat/jotai/index.cjs +1 -2048
- 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 -9
- package/dist/compat/nanostores/index.cjs +1 -2175
- 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 -23
- package/dist/compat/nestjs/index.cjs +14 -6782
- package/dist/compat/nestjs/index.d.cts +7 -6
- package/dist/compat/nestjs/index.d.ts +7 -6
- package/dist/compat/nestjs/index.js +1 -83
- package/dist/compat/react/index.cjs +1 -141
- package/dist/compat/react/index.d.cts +2 -2
- package/dist/compat/react/index.d.ts +2 -2
- package/dist/compat/react/index.js +1 -12
- package/dist/compat/solid/index.cjs +1 -128
- package/dist/compat/solid/index.d.cts +2 -2
- package/dist/compat/solid/index.d.ts +2 -2
- package/dist/compat/solid/index.js +1 -12
- package/dist/compat/svelte/index.cjs +1 -131
- package/dist/compat/svelte/index.d.cts +2 -2
- package/dist/compat/svelte/index.d.ts +2 -2
- package/dist/compat/svelte/index.js +1 -12
- package/dist/compat/vue/index.cjs +1 -146
- package/dist/compat/vue/index.d.cts +2 -2
- package/dist/compat/vue/index.d.ts +2 -2
- package/dist/compat/vue/index.js +1 -12
- package/dist/compat/zustand/index.cjs +6 -4931
- package/dist/compat/zustand/index.d.cts +5 -5
- package/dist/compat/zustand/index.d.ts +5 -5
- package/dist/compat/zustand/index.js +1 -12
- package/dist/composite-B-xqw4Kk.d.cts +69 -0
- package/dist/composite-BhbKHbOS.d.ts +69 -0
- package/dist/core/index.cjs +1 -2271
- package/dist/core/index.d.cts +4 -4
- package/dist/core/index.d.ts +4 -4
- package/dist/core/index.js +1 -110
- package/dist/extra/browser.cjs +1 -0
- package/dist/extra/browser.d.cts +3 -0
- package/dist/extra/browser.d.ts +3 -0
- package/dist/extra/browser.js +1 -0
- package/dist/extra/index.cjs +23 -9971
- package/dist/extra/index.d.cts +13 -6
- package/dist/extra/index.d.ts +13 -6
- package/dist/extra/index.js +1 -381
- package/dist/extra/node.cjs +3 -0
- package/dist/extra/node.d.cts +81 -0
- package/dist/extra/node.d.ts +81 -0
- package/dist/extra/node.js +2 -0
- package/dist/extra/operators.cjs +1 -0
- package/dist/extra/operators.d.cts +910 -0
- package/dist/extra/operators.d.ts +910 -0
- package/dist/extra/operators.js +1 -0
- package/dist/extra/reactive.cjs +1 -0
- package/dist/extra/reactive.d.cts +352 -0
- package/dist/extra/reactive.d.ts +352 -0
- package/dist/extra/reactive.js +1 -0
- package/dist/extra/sources.cjs +1 -2486
- package/dist/extra/sources.d.cts +6 -2
- package/dist/extra/sources.d.ts +6 -2
- package/dist/extra/sources.js +1 -57
- package/dist/extra/storage-browser.cjs +1 -0
- package/dist/extra/storage-browser.d.cts +71 -0
- package/dist/extra/storage-browser.d.ts +71 -0
- package/dist/extra/storage-browser.js +1 -0
- package/dist/extra/storage-core.cjs +1 -0
- package/dist/extra/storage-core.d.cts +98 -0
- package/dist/extra/storage-core.d.ts +98 -0
- package/dist/extra/storage-core.js +1 -0
- package/dist/extra/storage-node.cjs +2 -0
- package/dist/extra/storage-node.d.cts +60 -0
- package/dist/extra/storage-node.d.ts +60 -0
- package/dist/extra/storage-node.js +1 -0
- package/dist/fallback-BaTS7vVY.d.cts +258 -0
- package/dist/fallback-eOm3LNxP.d.ts +258 -0
- package/dist/graph/index.cjs +6 -5030
- package/dist/graph/index.d.cts +6 -5
- package/dist/graph/index.d.ts +6 -5
- package/dist/graph/index.js +1 -50
- package/dist/{graph-CCwGKLCm.d.ts → graph-BZGRXwOm.d.ts} +134 -31
- package/dist/{graph-DNCrvZSn.d.cts → graph-D48Qw9Cg.d.cts} +134 -31
- package/dist/index-8FSVk4Uf.d.ts +135 -0
- package/dist/index-9oDeHH2u.d.cts +291 -0
- package/dist/{messaging-XDoYablx.d.ts → index-B0c4cmIO.d.ts} +31 -93
- package/dist/{index-VdHQMPy1.d.ts → index-B1AmmSlb.d.ts} +1 -1
- package/dist/{index-VHqptjhu.d.cts → index-B2pwesl9.d.cts} +1 -1
- package/dist/index-BHvIquRZ.d.ts +1957 -0
- package/dist/{index-Dzk2hrlR.d.ts → index-BVHOrDwO.d.ts} +1 -1
- package/dist/{index-CxFrXH4m.d.ts → index-BWJV63ti.d.ts} +1 -1
- package/dist/{index-Xi3u0HCQ.d.cts → index-B_agccPe.d.cts} +1 -1
- package/dist/index-BgyGlizc.d.ts +163 -0
- package/dist/index-BpA5c4G9.d.ts +357 -0
- package/dist/index-BpIFjILY.d.cts +357 -0
- package/dist/{index-3lsddbbS.d.ts → index-Bqachn9_.d.ts} +1 -1
- package/dist/index-Btib9rsU.d.ts +607 -0
- package/dist/{index-wEn0eFe8.d.ts → index-BwM9BEkt.d.ts} +1 -1
- package/dist/index-BxJ86YZZ.d.cts +105 -0
- package/dist/{audit-DRlSzBu9.d.ts → index-C73n7lo-.d.cts} +27 -21
- package/dist/index-CEXXwWVH.d.cts +192 -0
- package/dist/index-CHEswufn.d.cts +163 -0
- package/dist/{index-C0svESO4.d.ts → index-CMn8S8Hw.d.ts} +1 -1
- package/dist/{index-ByQxazQJ.d.cts → index-CRO83MmV.d.cts} +1 -1
- package/dist/{index-BuEoe-Qu.d.ts → index-CloUk1kY.d.ts} +9 -9
- package/dist/index-CpgYhnrG.d.ts +291 -0
- package/dist/{index-DO_6JN9Z.d.cts → index-Cyojz0AE.d.cts} +1 -1
- package/dist/{demo-shell-BDkOptd6.d.ts → index-CzobVSMr.d.ts} +14 -14
- package/dist/index-Czq6ynh8.d.ts +143 -0
- package/dist/{index-BaSM3aYt.d.ts → index-D-YB-Vl3.d.ts} +3 -3
- package/dist/index-DAlweici.d.ts +231 -0
- package/dist/index-DEwTb_fm.d.cts +1957 -0
- package/dist/{index-DYme44FM.d.cts → index-DL-rYJrx.d.cts} +1 -1
- package/dist/{memory-li6FL5RM.d.ts → index-DP4ZTkdw.d.ts} +26 -26
- package/dist/{index-BwfLUNw4.d.ts → index-DUqMOlKZ.d.cts} +173 -2040
- package/dist/{index-B1tloyhO.d.cts → index-D_NwnRYS.d.cts} +1 -1
- package/dist/index-DaLJvH8Z.d.ts +105 -0
- package/dist/index-DcXZBF5a.d.cts +135 -0
- package/dist/index-DfyOkTvs.d.ts +321 -0
- package/dist/{index-B9B7_HEY.d.ts → index-DiOXyAwt.d.ts} +1 -1
- package/dist/index-DpHe5e0Q.d.ts +186 -0
- package/dist/index-DraikLjn.d.ts +86 -0
- package/dist/{index-D8wS_PeY.d.cts → index-DxsnAMWD.d.cts} +9 -9
- package/dist/{messaging-Gt4LPbyA.d.cts → index-DyxjtScX.d.cts} +31 -93
- package/dist/{audit-ClmqGOCx.d.cts → index-HDpJe9hX.d.ts} +27 -21
- package/dist/{index-DVGiGFGT.d.cts → index-O6TgGUBV.d.cts} +3 -3
- package/dist/{index-B6EhDnjH.d.cts → index-Oi8d8w4R.d.cts} +1 -1
- package/dist/{index-C8oil6M6.d.ts → index-ROpQmGjE.d.ts} +30 -6
- package/dist/index-RukJ4DLS.d.cts +607 -0
- package/dist/{index-BHlKbUwO.d.cts → index-ZftwfxJM.d.ts} +173 -2040
- package/dist/{index-BPVt8kqc.d.ts → index-cByzxQIC.d.cts} +10 -195
- package/dist/index-dtN7YA2x.d.cts +143 -0
- package/dist/{index-CI3DprxP.d.cts → index-fM6y00vT.d.cts} +30 -6
- package/dist/{index-DlLp-2Xn.d.cts → index-m-yHof5p.d.ts} +10 -195
- package/dist/index-pXrDMpRO.d.cts +231 -0
- package/dist/index-rHJSKsU8.d.cts +186 -0
- package/dist/index-rX8HBM5h.d.cts +321 -0
- package/dist/{index-CO8uBlUh.d.cts → index-rnwQly8X.d.cts} +147 -20
- package/dist/index-sm373fsH.d.ts +192 -0
- package/dist/{memory-C6Z2tGpC.d.cts → index-tbf2gKHd.d.cts} +26 -26
- package/dist/{demo-shell-Crid1WdR.d.cts → index-u15meRxL.d.cts} +14 -14
- package/dist/{index-B6D3QNSA.d.ts → index-umtoWT8K.d.ts} +147 -20
- package/dist/index-vscRDkjW.d.cts +86 -0
- package/dist/index.cjs +150 -24142
- package/dist/index.d.cts +69 -2099
- package/dist/index.d.ts +69 -2099
- package/dist/index.js +1 -3868
- package/dist/{meta-CbznRPYJ.d.ts → meta-Cgj6zeji.d.cts} +5 -5
- package/dist/{meta-BxCA7rcr.d.cts → meta-CwesDrMD.d.ts} +5 -5
- package/dist/{node-BmerH3kS.d.cts → node-Cc1TniY8.d.cts} +36 -9
- package/dist/{node-BmerH3kS.d.ts → node-Cc1TniY8.d.ts} +36 -9
- package/dist/{observable-BgGUwcqp.d.ts → observable-Ct-gJ9jI.d.ts} +1 -1
- package/dist/{observable-DJt_AxzQ.d.cts → observable-glXQoGj2.d.cts} +1 -1
- package/dist/patterns/ai/browser.cjs +25 -0
- package/dist/patterns/ai/browser.d.cts +127 -0
- package/dist/patterns/ai/browser.d.ts +127 -0
- package/dist/patterns/ai/browser.js +3 -0
- package/dist/patterns/ai/index.cjs +91 -0
- package/dist/patterns/ai/index.d.cts +17 -0
- package/dist/patterns/ai/index.d.ts +17 -0
- package/dist/patterns/ai/index.js +1 -0
- package/dist/patterns/ai/node.cjs +2 -0
- package/dist/patterns/ai/node.d.cts +58 -0
- package/dist/patterns/ai/node.d.ts +58 -0
- package/dist/patterns/ai/node.js +1 -0
- package/dist/patterns/audit/index.cjs +6 -0
- package/dist/patterns/audit/index.d.cts +6 -0
- package/dist/patterns/audit/index.d.ts +6 -0
- package/dist/patterns/audit/index.js +1 -0
- package/dist/patterns/cqrs/index.cjs +6 -0
- package/dist/patterns/cqrs/index.d.cts +5 -0
- package/dist/patterns/cqrs/index.d.ts +5 -0
- package/dist/patterns/cqrs/index.js +1 -0
- package/dist/patterns/demo-shell/index.cjs +7 -0
- package/dist/patterns/demo-shell/index.d.cts +6 -0
- package/dist/patterns/demo-shell/index.d.ts +6 -0
- package/dist/patterns/demo-shell/index.js +1 -0
- package/dist/patterns/domain-templates/index.cjs +6 -0
- package/dist/patterns/domain-templates/index.d.cts +5 -0
- package/dist/patterns/domain-templates/index.d.ts +5 -0
- package/dist/patterns/domain-templates/index.js +1 -0
- package/dist/patterns/graphspec/index.cjs +83 -0
- package/dist/patterns/graphspec/index.d.cts +7 -0
- package/dist/patterns/graphspec/index.d.ts +7 -0
- package/dist/patterns/graphspec/index.js +1 -0
- package/dist/patterns/guarded-execution/index.cjs +6 -0
- package/dist/patterns/guarded-execution/index.d.cts +7 -0
- package/dist/patterns/guarded-execution/index.d.ts +7 -0
- package/dist/patterns/guarded-execution/index.js +1 -0
- package/dist/patterns/harness/index.cjs +48 -0
- package/dist/patterns/harness/index.d.cts +8 -0
- package/dist/patterns/harness/index.d.ts +8 -0
- package/dist/patterns/harness/index.js +1 -0
- package/dist/patterns/job-queue/index.cjs +6 -0
- package/dist/patterns/job-queue/index.d.cts +5 -0
- package/dist/patterns/job-queue/index.d.ts +5 -0
- package/dist/patterns/job-queue/index.js +1 -0
- package/dist/patterns/lens/index.cjs +6 -0
- package/dist/patterns/lens/index.d.cts +7 -0
- package/dist/patterns/lens/index.d.ts +7 -0
- package/dist/patterns/lens/index.js +1 -0
- package/dist/patterns/memory/index.cjs +6 -0
- package/dist/patterns/memory/index.d.cts +5 -0
- package/dist/patterns/memory/index.d.ts +5 -0
- package/dist/patterns/memory/index.js +1 -0
- package/dist/patterns/messaging/index.cjs +6 -0
- package/dist/patterns/messaging/index.d.cts +5 -0
- package/dist/patterns/messaging/index.d.ts +5 -0
- package/dist/patterns/messaging/index.js +1 -0
- package/dist/patterns/orchestration/index.cjs +6 -0
- package/dist/patterns/orchestration/index.d.cts +6 -0
- package/dist/patterns/orchestration/index.d.ts +6 -0
- package/dist/patterns/orchestration/index.js +1 -0
- package/dist/patterns/reactive-layout/index.cjs +7 -6444
- package/dist/patterns/reactive-layout/index.d.cts +6 -6
- package/dist/patterns/reactive-layout/index.d.ts +6 -6
- package/dist/patterns/reactive-layout/index.js +1 -56
- package/dist/patterns/reduction/index.cjs +6 -0
- package/dist/patterns/reduction/index.d.cts +5 -0
- package/dist/patterns/reduction/index.d.ts +5 -0
- package/dist/patterns/reduction/index.js +1 -0
- package/dist/patterns/refine-loop/index.cjs +8 -0
- package/dist/patterns/refine-loop/index.d.cts +7 -0
- package/dist/patterns/refine-loop/index.d.ts +7 -0
- package/dist/patterns/refine-loop/index.js +1 -0
- package/dist/patterns/resilient-pipeline/index.cjs +1 -0
- package/dist/patterns/resilient-pipeline/index.d.cts +7 -0
- package/dist/patterns/resilient-pipeline/index.d.ts +7 -0
- package/dist/patterns/resilient-pipeline/index.js +1 -0
- package/dist/patterns/surface/index.cjs +14 -0
- package/dist/patterns/surface/index.d.cts +8 -0
- package/dist/patterns/surface/index.d.ts +8 -0
- package/dist/patterns/surface/index.js +1 -0
- package/dist/{reactive-layout-MQP--J3F.d.cts → reactive-layout-CpYb5qLP.d.cts} +2 -2
- package/dist/{reactive-layout-u5Ulnqag.d.ts → reactive-layout-D8u4wuUR.d.ts} +2 -2
- package/dist/reactive-log-DPzuUDj5.d.cts +190 -0
- package/dist/reactive-log-YuH9VYN8.d.ts +190 -0
- package/dist/{composite-aUCvjZVR.d.ts → reactive-map-CdbNoSgP.d.ts} +2 -67
- package/dist/{composite-C7PcQvcs.d.cts → reactive-map-DUeRmb9d.d.cts} +2 -67
- package/dist/resilience-Ba5-b4WD.d.cts +493 -0
- package/dist/resilience-CGRzhnD3.d.ts +493 -0
- package/dist/resilience-QAHKANT5.js +1 -0
- package/dist/{sugar-D02n5JjF.d.cts → sugar-BV0htudb.d.cts} +8 -4
- package/dist/{sugar-CCOxXK1e.d.ts → sugar-Dtyrq2_q.d.ts} +8 -4
- package/dist/topology-tree-CYHOwQZ_.d.ts +25 -0
- package/dist/topology-tree-DROUdq5B.d.cts +25 -0
- package/dist/types-O3GzJY2U.d.cts +401 -0
- package/dist/types-u64Ose53.d.ts +401 -0
- package/package.json +252 -22
- package/dist/ai-CaR_912Q.d.cts +0 -1033
- package/dist/ai-WlRltJV7.d.ts +0 -1033
- package/dist/chunk-3ZWCKRHX.js +0 -117
- package/dist/chunk-3ZWCKRHX.js.map +0 -1
- package/dist/chunk-7TAQJHQV.js +0 -103
- package/dist/chunk-7TAQJHQV.js.map +0 -1
- package/dist/chunk-APFNLIRG.js +0 -62
- package/dist/chunk-APFNLIRG.js.map +0 -1
- package/dist/chunk-AT5LKYNL.js +0 -395
- package/dist/chunk-AT5LKYNL.js.map +0 -1
- package/dist/chunk-BQ6RQQFF.js +0 -5087
- package/dist/chunk-BQ6RQQFF.js.map +0 -1
- package/dist/chunk-BVZYTZ5H.js +0 -599
- package/dist/chunk-BVZYTZ5H.js.map +0 -1
- package/dist/chunk-DST5DKZS.js +0 -1371
- package/dist/chunk-DST5DKZS.js.map +0 -1
- package/dist/chunk-GTE6PWRZ.js +0 -866
- package/dist/chunk-GTE6PWRZ.js.map +0 -1
- package/dist/chunk-HXZEYDUR.js +0 -94
- package/dist/chunk-HXZEYDUR.js.map +0 -1
- package/dist/chunk-J22W6HV3.js +0 -107
- package/dist/chunk-J22W6HV3.js.map +0 -1
- package/dist/chunk-J2VBW3DZ.js +0 -302
- package/dist/chunk-J2VBW3DZ.js.map +0 -1
- package/dist/chunk-JSCT3CR4.js +0 -38
- package/dist/chunk-JSCT3CR4.js.map +0 -1
- package/dist/chunk-JWBCY4NC.js +0 -330
- package/dist/chunk-JWBCY4NC.js.map +0 -1
- package/dist/chunk-K2AUJHVP.js +0 -2251
- package/dist/chunk-K2AUJHVP.js.map +0 -1
- package/dist/chunk-MJ2NKQQL.js +0 -119
- package/dist/chunk-MJ2NKQQL.js.map +0 -1
- package/dist/chunk-N6UR7YVY.js +0 -198
- package/dist/chunk-N6UR7YVY.js.map +0 -1
- package/dist/chunk-NC6S43JJ.js +0 -456
- package/dist/chunk-NC6S43JJ.js.map +0 -1
- package/dist/chunk-OFVJBJXR.js +0 -98
- package/dist/chunk-OFVJBJXR.js.map +0 -1
- package/dist/chunk-OHISZPOJ.js +0 -97
- package/dist/chunk-OHISZPOJ.js.map +0 -1
- package/dist/chunk-OU5CQKNW.js +0 -102
- package/dist/chunk-OU5CQKNW.js.map +0 -1
- package/dist/chunk-PF7GRZMW.js +0 -2712
- package/dist/chunk-PF7GRZMW.js.map +0 -1
- package/dist/chunk-PHOUUNK7.js +0 -2291
- package/dist/chunk-PHOUUNK7.js.map +0 -1
- package/dist/chunk-RNHBMHKA.js +0 -1665
- package/dist/chunk-RNHBMHKA.js.map +0 -1
- package/dist/chunk-SX52TAR4.js +0 -110
- package/dist/chunk-SX52TAR4.js.map +0 -1
- package/dist/chunk-VYPWMZ6H.js +0 -98
- package/dist/chunk-VYPWMZ6H.js.map +0 -1
- package/dist/chunk-WBZOVTYK.js +0 -171
- package/dist/chunk-WBZOVTYK.js.map +0 -1
- package/dist/chunk-WKNUIZOY.js +0 -354
- package/dist/chunk-WKNUIZOY.js.map +0 -1
- package/dist/chunk-X3VMZYBT.js +0 -713
- package/dist/chunk-X3VMZYBT.js.map +0 -1
- package/dist/chunk-X5R3GL6H.js +0 -525
- package/dist/chunk-X5R3GL6H.js.map +0 -1
- package/dist/chunk-XGPU467M.js +0 -136
- package/dist/chunk-XGPU467M.js.map +0 -1
- package/dist/compat/index.cjs.map +0 -1
- package/dist/compat/index.js.map +0 -1
- package/dist/compat/jotai/index.cjs.map +0 -1
- package/dist/compat/jotai/index.js.map +0 -1
- package/dist/compat/nanostores/index.cjs.map +0 -1
- package/dist/compat/nanostores/index.js.map +0 -1
- package/dist/compat/nestjs/index.cjs.map +0 -1
- package/dist/compat/nestjs/index.js.map +0 -1
- package/dist/compat/react/index.cjs.map +0 -1
- package/dist/compat/react/index.js.map +0 -1
- package/dist/compat/solid/index.cjs.map +0 -1
- package/dist/compat/solid/index.js.map +0 -1
- package/dist/compat/svelte/index.cjs.map +0 -1
- package/dist/compat/svelte/index.js.map +0 -1
- package/dist/compat/vue/index.cjs.map +0 -1
- package/dist/compat/vue/index.js.map +0 -1
- package/dist/compat/zustand/index.cjs.map +0 -1
- package/dist/compat/zustand/index.js.map +0 -1
- package/dist/core/index.cjs.map +0 -1
- package/dist/core/index.js.map +0 -1
- package/dist/extra/index.cjs.map +0 -1
- package/dist/extra/index.js.map +0 -1
- package/dist/extra/sources.cjs.map +0 -1
- package/dist/extra/sources.js.map +0 -1
- package/dist/graph/index.cjs.map +0 -1
- package/dist/graph/index.js.map +0 -1
- package/dist/index.cjs.map +0 -1
- package/dist/index.js.map +0 -1
- package/dist/patterns/ai.cjs +0 -7930
- package/dist/patterns/ai.cjs.map +0 -1
- package/dist/patterns/ai.d.cts +0 -10
- package/dist/patterns/ai.d.ts +0 -10
- package/dist/patterns/ai.js +0 -71
- package/dist/patterns/ai.js.map +0 -1
- package/dist/patterns/audit.cjs +0 -5805
- package/dist/patterns/audit.cjs.map +0 -1
- package/dist/patterns/audit.d.cts +0 -6
- package/dist/patterns/audit.d.ts +0 -6
- package/dist/patterns/audit.js +0 -29
- package/dist/patterns/audit.js.map +0 -1
- package/dist/patterns/demo-shell.cjs +0 -5604
- package/dist/patterns/demo-shell.cjs.map +0 -1
- package/dist/patterns/demo-shell.d.cts +0 -6
- package/dist/patterns/demo-shell.d.ts +0 -6
- package/dist/patterns/demo-shell.js +0 -15
- package/dist/patterns/demo-shell.js.map +0 -1
- package/dist/patterns/memory.cjs +0 -5283
- package/dist/patterns/memory.cjs.map +0 -1
- package/dist/patterns/memory.d.cts +0 -5
- package/dist/patterns/memory.d.ts +0 -5
- package/dist/patterns/memory.js +0 -20
- package/dist/patterns/memory.js.map +0 -1
- package/dist/patterns/reactive-layout/index.cjs.map +0 -1
- package/dist/patterns/reactive-layout/index.js.map +0 -1
- package/dist/storage-CMjUUuxn.d.ts +0 -190
- package/dist/storage-DdWlZo6U.d.cts +0 -190
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { A as Actor,
|
|
2
|
-
import { b as DescribeNodeOutput, D as DescribeDetail, a as DescribeField } from './meta-
|
|
3
|
-
import {
|
|
1
|
+
import { A as Actor, o as GraphReFlyConfig, V as VersioningLevel, a as Node, b as Messages, K as NodeSink } from './node-Cc1TniY8.cjs';
|
|
2
|
+
import { b as DescribeNodeOutput, D as DescribeDetail, a as DescribeField } from './meta-Cgj6zeji.cjs';
|
|
3
|
+
import { StorageTier, StorageHandle } from './extra/storage-core.cjs';
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* Causal walkback over a {@link Graph.describe} snapshot (roadmap §9.2).
|
|
@@ -29,8 +29,8 @@ interface CausalStep {
|
|
|
29
29
|
value?: unknown;
|
|
30
30
|
/** Hop distance from `from` (0 = `from`, N = `to`). */
|
|
31
31
|
hop: number;
|
|
32
|
-
/**
|
|
33
|
-
|
|
32
|
+
/** Annotation set via `graph.trace(path, annotation)` or `graph.add(node, { name: path, annotation })`, when present. */
|
|
33
|
+
annotation?: string;
|
|
34
34
|
/** Most recent guarded mutation, when known. */
|
|
35
35
|
lastMutation?: Readonly<{
|
|
36
36
|
actor: Actor;
|
|
@@ -274,9 +274,12 @@ type GraphDescribeOptions = {
|
|
|
274
274
|
* - `"pretty"` — human-readable plaintext (optionally colorized; see
|
|
275
275
|
* `colorize` / `indent` / `logger` / `includeEdges` / `includeSubgraphs`).
|
|
276
276
|
* - `"mermaid"` — Mermaid flowchart text.
|
|
277
|
+
* - `"mermaid-url"` — `https://mermaid.live/edit#base64:…` deep link (one
|
|
278
|
+
* clickable URL, opens the `"mermaid"` source in the mermaid.live editor).
|
|
279
|
+
* No network calls — the payload is encoded into the URL fragment.
|
|
277
280
|
* - `"d2"` — D2 diagram text.
|
|
278
281
|
*/
|
|
279
|
-
format?: "spec" | "json" | "pretty" | "mermaid" | "d2";
|
|
282
|
+
format?: "spec" | "json" | "pretty" | "mermaid" | "mermaid-url" | "d2";
|
|
280
283
|
/** Pretty/diagram render: direction for diagram formats (default `LR`). */
|
|
281
284
|
direction?: GraphDiagramDirection;
|
|
282
285
|
/** Pretty/JSON render: indent (default 2 for JSON, ignored for pretty). */
|
|
@@ -287,7 +290,23 @@ type GraphDescribeOptions = {
|
|
|
287
290
|
includeEdges?: boolean;
|
|
288
291
|
/** Pretty render: include a Subgraphs section (default `true`). */
|
|
289
292
|
includeSubgraphs?: boolean;
|
|
293
|
+
/**
|
|
294
|
+
* Reactive describe (D2): when `true`, return `{ node, dispose }` where `node`
|
|
295
|
+
* emits a fresh `GraphDescribeOutput` (or format string, if `format` is set)
|
|
296
|
+
* every time the graph state settles. Same coalescing as
|
|
297
|
+
* {@link Graph.explain} with `{ reactive: true }` — one recompute per
|
|
298
|
+
* outermost drain via the batch-flush hook, so large batched mutations
|
|
299
|
+
* don't amplify describe work per event.
|
|
300
|
+
*/
|
|
301
|
+
reactive?: boolean;
|
|
302
|
+
/** Reactive-only: name for the backing derived node (default `"describe"`). */
|
|
303
|
+
reactiveName?: string;
|
|
290
304
|
};
|
|
305
|
+
/** Handle returned by {@link Graph.describe} with `{ reactive: true }`. */
|
|
306
|
+
interface ReactiveDescribeHandle<T> {
|
|
307
|
+
readonly node: Node<T>;
|
|
308
|
+
dispose(): void;
|
|
309
|
+
}
|
|
291
310
|
/** JSON snapshot from {@link Graph.describe} (GRAPHREFLY-SPEC §3.6, Appendix B). */
|
|
292
311
|
type GraphDescribeOutput = {
|
|
293
312
|
name: string;
|
|
@@ -409,6 +428,19 @@ type GraphDiagramOptions = {
|
|
|
409
428
|
* drift between auto-checkpoint and one-shot persistence paths.
|
|
410
429
|
*/
|
|
411
430
|
declare const SNAPSHOT_VERSION = 1;
|
|
431
|
+
/**
|
|
432
|
+
* Encode a mermaid source string to a `https://mermaid.live/edit#base64:…`
|
|
433
|
+
* deep link. Round-trip with the mermaid.live editor's `/edit#base64:`
|
|
434
|
+
* share format — payload is `base64url(JSON({code, mermaid: {theme}, ...}))`.
|
|
435
|
+
*
|
|
436
|
+
* Exported so callers that already have rendered mermaid text (e.g. from
|
|
437
|
+
* `describe({ format: "mermaid" })`) can upgrade to a live-editor URL
|
|
438
|
+
* without re-rendering. Pairs with `describe({ format: "mermaid-url" })`.
|
|
439
|
+
*/
|
|
440
|
+
declare function mermaidLiveUrl(mermaidSrc: string, opts?: {
|
|
441
|
+
theme?: "default" | "dark" | "forest" | "neutral" | "base";
|
|
442
|
+
autoSync?: boolean;
|
|
443
|
+
}): string;
|
|
412
444
|
/**
|
|
413
445
|
* Option shapes that trigger structured-mode dispatch in {@link Graph.observe}.
|
|
414
446
|
* Presence of any of these fields (truthy) → returns {@link ObserveResult};
|
|
@@ -419,7 +451,7 @@ type StructuredTriggers = {
|
|
|
419
451
|
timeline?: true;
|
|
420
452
|
causal?: true;
|
|
421
453
|
derived?: true;
|
|
422
|
-
format?: "pretty" | "json";
|
|
454
|
+
format?: "pretty" | "json" | "stage-log";
|
|
423
455
|
detail?: "minimal" | "full";
|
|
424
456
|
};
|
|
425
457
|
/** {@link Graph.observe} on a single node or meta path — sink receives plain message batches. */
|
|
@@ -464,9 +496,15 @@ type ObserveOptions = {
|
|
|
464
496
|
detail?: ObserveDetail;
|
|
465
497
|
/**
|
|
466
498
|
* When set, auto-enables structured mode and attaches a logger.
|
|
467
|
-
* `"pretty"`
|
|
468
|
-
|
|
469
|
-
|
|
499
|
+
* - `"pretty"` — colored one-line output per event.
|
|
500
|
+
* - `"json"` — one JSON object per event.
|
|
501
|
+
* - `"stage-log"` — pipeline-stage-labeled output for multi-node
|
|
502
|
+
* observers. Auto-enables `timeline: true` so each line carries an
|
|
503
|
+
* elapsed-seconds offset from the subscription. Provide a
|
|
504
|
+
* {@link stageLabels} map to label each observed path; paths without a
|
|
505
|
+
* mapping fall back to the path string.
|
|
506
|
+
*/
|
|
507
|
+
format?: "pretty" | "json" | "stage-log";
|
|
470
508
|
/** Sink for rendered lines (`console.log` by default). Only used when `format` is set. */
|
|
471
509
|
logger?: (line: string, event: ObserveEvent) => void;
|
|
472
510
|
/** Keep only these event types in formatted output. Only used when `format` is set. */
|
|
@@ -475,6 +513,13 @@ type ObserveOptions = {
|
|
|
475
513
|
excludeTypes?: ObserveEvent["type"][];
|
|
476
514
|
/** Built-in color preset (`ansi` default) or explicit color tokens. Only used when `format` is set. */
|
|
477
515
|
theme?: ObserveThemeName | ObserveTheme;
|
|
516
|
+
/**
|
|
517
|
+
* Stage labels for `format: "stage-log"`. Keys are observe paths; values
|
|
518
|
+
* are short stage names (e.g. `{ "intake::latest": "INTAKE" }`). Paths
|
|
519
|
+
* without a mapping render under the path string itself. Ignored for
|
|
520
|
+
* other formats.
|
|
521
|
+
*/
|
|
522
|
+
stageLabels?: Record<string, string>;
|
|
478
523
|
/**
|
|
479
524
|
* Cap the `events` buffer. When set, the result uses a {@link RingBuffer}
|
|
480
525
|
* under the hood: oldest events are dropped on overflow. Unbounded when
|
|
@@ -531,6 +576,20 @@ interface ObserveEventBase {
|
|
|
531
576
|
in_batch?: boolean;
|
|
532
577
|
/** Monotonically increasing counter per subscribe-callback invocation. All events in one delivery share the same id. */
|
|
533
578
|
batch_id?: number;
|
|
579
|
+
/**
|
|
580
|
+
* Attribution for `data`/`error` events (B9 — actor threading). When
|
|
581
|
+
* the originating `node.down(...)` call supplied an `actor` via
|
|
582
|
+
* `NodeTransportOptions`, it's forwarded here as read from
|
|
583
|
+
* `Node.lastMutation`. Internal / unattributed writes stamp the
|
|
584
|
+
* library's `DEFAULT_ACTOR` (`{type: "system", id: ""}`) rather than
|
|
585
|
+
* being silently dropped, so downstream policy/audit consumers can
|
|
586
|
+
* evaluate policies against a well-formed actor in every case.
|
|
587
|
+
*
|
|
588
|
+
* Not populated for tier-1/tier-2 protocol events (`dirty`, `resolved`,
|
|
589
|
+
* `pause`, `resume`, `invalidate`, `teardown`) — those don't carry
|
|
590
|
+
* caller attribution.
|
|
591
|
+
*/
|
|
592
|
+
actor?: Actor;
|
|
534
593
|
}
|
|
535
594
|
/** Optional `causal` context present on `data`/`resolved`/`derived` events. */
|
|
536
595
|
interface ObserveCausalContext {
|
|
@@ -604,7 +663,7 @@ type ObserveTheme = Partial<Record<ObserveEvent["type"] | "path" | "reset", stri
|
|
|
604
663
|
* import { Graph, state } from "@graphrefly/graphrefly-ts";
|
|
605
664
|
*
|
|
606
665
|
* const g = new Graph("app");
|
|
607
|
-
* g.add("counter"
|
|
666
|
+
* g.add(state(0, { name: "counter" }));
|
|
608
667
|
* ```
|
|
609
668
|
*
|
|
610
669
|
* @category graph
|
|
@@ -693,12 +752,23 @@ declare class Graph {
|
|
|
693
752
|
* the node is torn down.
|
|
694
753
|
*
|
|
695
754
|
* Returns the registered node so callers can chain:
|
|
696
|
-
* `const counter = g.add("counter"
|
|
755
|
+
* `const counter = g.add(state(0, { name: "counter" }))`.
|
|
756
|
+
*
|
|
757
|
+
* **Signature:** `add(node, { name?, annotation? })`. Name lives in opts;
|
|
758
|
+
* falls back to `node.name` from the node's own options. Throws if neither
|
|
759
|
+
* is a non-empty string.
|
|
760
|
+
*
|
|
761
|
+
* The optional `opts.annotation` installs an initial
|
|
762
|
+
* `graph.trace(name, annotation)` entry — same effect as calling
|
|
763
|
+
* `graph.trace` right after, but reads naturally next to the registration.
|
|
697
764
|
*
|
|
698
|
-
* @param name - Local key (no `::`).
|
|
699
765
|
* @param node - Node instance to own.
|
|
766
|
+
* @param opts - `{ name?, annotation? }`.
|
|
700
767
|
*/
|
|
701
|
-
add<T extends Node>(
|
|
768
|
+
add<T extends Node>(node: T, opts?: {
|
|
769
|
+
name?: string;
|
|
770
|
+
annotation?: string;
|
|
771
|
+
}): T;
|
|
702
772
|
/**
|
|
703
773
|
* Bulk-apply a minimum versioning level to every currently-registered node
|
|
704
774
|
* in this graph (roadmap §6.0). `_applyVersioning` is monotonic — nodes
|
|
@@ -887,7 +957,14 @@ declare class Graph {
|
|
|
887
957
|
* ```
|
|
888
958
|
*/
|
|
889
959
|
describe(options: GraphDescribeOptions & {
|
|
890
|
-
|
|
960
|
+
reactive: true;
|
|
961
|
+
format: "json" | "pretty" | "mermaid" | "mermaid-url" | "d2";
|
|
962
|
+
}): ReactiveDescribeHandle<string>;
|
|
963
|
+
describe(options: GraphDescribeOptions & {
|
|
964
|
+
reactive: true;
|
|
965
|
+
}): ReactiveDescribeHandle<GraphDescribeOutput>;
|
|
966
|
+
describe(options: GraphDescribeOptions & {
|
|
967
|
+
format: "json" | "pretty" | "mermaid" | "mermaid-url" | "d2";
|
|
891
968
|
}): string;
|
|
892
969
|
describe(options?: GraphDescribeOptions): GraphDescribeOutput;
|
|
893
970
|
private _collectSubgraphs;
|
|
@@ -913,18 +990,38 @@ declare class Graph {
|
|
|
913
990
|
* each node's value, status, last-mutation actor, and reasoning annotation
|
|
914
991
|
* from {@link Graph.trace}. Wraps {@link explainPath} (roadmap §9.2).
|
|
915
992
|
*
|
|
993
|
+
* Same question, two answers:
|
|
994
|
+
* - **Static (default)** — `explain(from, to, opts?)` returns a single
|
|
995
|
+
* {@link CausalChain} snapshot of the graph at call time.
|
|
996
|
+
* - **Reactive** — `explain(from, to, { reactive: true, ... })` returns
|
|
997
|
+
* `{ node: Node<CausalChain>; dispose: () => void }`. The node
|
|
998
|
+
* recomputes whenever a `data` / `error` / `complete` / `teardown`
|
|
999
|
+
* event fires anywhere on the graph's structured observe stream, so
|
|
1000
|
+
* the chain stays live. Replaces the former `reactiveExplainPath`.
|
|
1001
|
+
*
|
|
916
1002
|
* @param from - Upstream node (the cause).
|
|
917
1003
|
* @param to - Downstream node (the effect).
|
|
918
1004
|
* @param opts - Optional `maxDepth` and `findCycle`. When `findCycle:true`
|
|
919
1005
|
* and `from === to`, returns the shortest cycle through other nodes
|
|
920
1006
|
* (useful for diagnosing feedback loops, COMPOSITION-GUIDE §7).
|
|
921
|
-
*
|
|
922
|
-
* live graph.
|
|
1007
|
+
* When `reactive: true`, also accepts `name?`.
|
|
923
1008
|
*/
|
|
924
1009
|
explain(from: string, to: string, opts?: {
|
|
925
1010
|
maxDepth?: number;
|
|
926
1011
|
findCycle?: boolean;
|
|
927
1012
|
}): CausalChain;
|
|
1013
|
+
explain(from: string, to: string, opts: {
|
|
1014
|
+
reactive: true;
|
|
1015
|
+
maxDepth?: number;
|
|
1016
|
+
findCycle?: boolean;
|
|
1017
|
+
name?: string;
|
|
1018
|
+
}): {
|
|
1019
|
+
node: Node<CausalChain>;
|
|
1020
|
+
dispose: () => void;
|
|
1021
|
+
};
|
|
1022
|
+
private _explainStatic;
|
|
1023
|
+
private _describeReactive;
|
|
1024
|
+
private _explainReactive;
|
|
928
1025
|
/**
|
|
929
1026
|
* @internal Collect all qualified paths in this graph tree matching a
|
|
930
1027
|
* glob pattern. Used by scoped autoCheckpoint subscription.
|
|
@@ -1144,22 +1241,28 @@ declare class Graph {
|
|
|
1144
1241
|
/**
|
|
1145
1242
|
* Unified reasoning trace: write annotations or read the ring buffer.
|
|
1146
1243
|
*
|
|
1147
|
-
*
|
|
1148
|
-
*
|
|
1149
|
-
*
|
|
1150
|
-
* `
|
|
1151
|
-
*
|
|
1152
|
-
*
|
|
1153
|
-
*
|
|
1154
|
-
|
|
1155
|
-
|
|
1244
|
+
* - `graph.trace("path", "annotation")` — attaches a reasoning annotation
|
|
1245
|
+
* to a node, capturing *why* an AI agent set a value. Overwrites the
|
|
1246
|
+
* current annotation (if any) and appends to the chronological ring.
|
|
1247
|
+
* Unknown paths are silently dropped (matching `observe` resilience).
|
|
1248
|
+
* No-op when `config.inspectorEnabled` is `false`.
|
|
1249
|
+
* - `graph.trace("path")` — returns the current annotation for `path`,
|
|
1250
|
+
* or `undefined` if none. Precedence: most recent `trace(path, ...)`
|
|
1251
|
+
* wins; if no trace call, whatever `graph.add(node, { name: "path", annotation })`
|
|
1252
|
+
* installed; otherwise `undefined`.
|
|
1253
|
+
* - `graph.trace()` — returns a chronological log of all write entries.
|
|
1254
|
+
* Returns `[]` when `config.inspectorEnabled` is `false`.
|
|
1255
|
+
*/
|
|
1256
|
+
trace(path: string, annotation: string, opts?: {
|
|
1156
1257
|
actor?: Actor;
|
|
1157
1258
|
}): void;
|
|
1259
|
+
trace(path: string): string | undefined;
|
|
1158
1260
|
trace(): readonly TraceEntry[];
|
|
1159
1261
|
/**
|
|
1160
|
-
* Latest
|
|
1161
|
-
*
|
|
1162
|
-
* field on each node entry
|
|
1262
|
+
* Latest annotation attached to `path` — via {@link Graph.trace} or via
|
|
1263
|
+
* {@link Graph.add}'s `{annotation}` option. Returns `undefined` if none.
|
|
1264
|
+
* `describe()` surfaces this via the `annotation` field on each node entry
|
|
1265
|
+
* (when present). Equivalent to `graph.trace(path)`.
|
|
1163
1266
|
*/
|
|
1164
1267
|
annotation(path: string): string | undefined;
|
|
1165
1268
|
/**
|
|
@@ -1186,7 +1289,7 @@ declare class Graph {
|
|
|
1186
1289
|
/** Entry in the reasoning trace ring buffer (roadmap 3.3). */
|
|
1187
1290
|
type TraceEntry = {
|
|
1188
1291
|
path: string;
|
|
1189
|
-
|
|
1292
|
+
annotation: string;
|
|
1190
1293
|
timestamp_ns: number;
|
|
1191
1294
|
/**
|
|
1192
1295
|
* Actor that produced the annotation (optional). Enables multi-agent
|
|
@@ -1316,4 +1419,4 @@ declare function reachable(described: GraphDescribeOutput, from: string, directi
|
|
|
1316
1419
|
}): ReachableResult;
|
|
1317
1420
|
declare function reachable(described: GraphDescribeOutput, from: string, direction: ReachableDirection, options?: ReachableOptions): string[];
|
|
1318
1421
|
|
|
1319
|
-
export { type ReachableOptions as A, type TraceEntry as B, type CausalChain as C, type DescribeFilter as D, type ExplainPathOptions as E, diffForWAL as F,
|
|
1422
|
+
export { type ReachableOptions as A, type TraceEntry as B, type CausalChain as C, type DescribeFilter as D, type ExplainPathOptions as E, diffForWAL as F, Graph as G, explainPath as H, graphProfile as I, mermaidLiveUrl as J, reachable as K, type NodeProfile as N, type ObserveDetail as O, type ReachableDirection as R, SNAPSHOT_VERSION as S, type TopologyEvent as T, type GraphOptions as a, type GraphDescribeOptions as b, type GraphDescribeOutput as c, type GraphPersistSnapshot as d, type CausalStep as e, GRAPH_META_SEGMENT as f, type GraphActorOptions as g, type GraphAttachStorageOptions as h, type GraphCheckpointRecord as i, type GraphDiagramDirection as j, type GraphDiagramOptions as k, type GraphDiffChange as l, type GraphDiffResult as m, type GraphFactoryContext as n, type GraphNodeFactory as o, type GraphObserveAll as p, type GraphObserveOne as q, type GraphProfileOptions as r, type GraphProfileResult as s, type GraphVersionChange as t, type GraphWALDiff as u, type ObserveEvent as v, type ObserveOptions as w, type ObserveResult as x, type ObserveTheme as y, type ObserveThemeName as z };
|
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
import { P as PolicyRuleData, a as Node, A as Actor } from './node-Cc1TniY8.js';
|
|
2
|
+
import { G as Graph, a as GraphOptions, b as GraphDescribeOptions, c as GraphDescribeOutput, D as DescribeFilter } from './graph-BZGRXwOm.js';
|
|
3
|
+
import { P as PolicyEnforcerGraph, a as PolicyViolation } from './index-HDpJe9hX.js';
|
|
4
|
+
import { T as TopicGraph } from './index-B0c4cmIO.js';
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Composable safety layer (roadmap §9.0b).
|
|
8
|
+
*
|
|
9
|
+
* {@link guardedExecution} wraps any {@link Graph} with:
|
|
10
|
+
*
|
|
11
|
+
* - {@link policyEnforcer} — reactive ABAC, policies stored as a `Node` so
|
|
12
|
+
* LLMs / humans can update them at runtime. Now with full transitive
|
|
13
|
+
* dynamic coverage via `watchTopologyTree`.
|
|
14
|
+
* - Scoped {@link GuardedExecutionGraph.scopedDescribe} — delegates to
|
|
15
|
+
* `target.describe({actor})` so callers see only what the actor is
|
|
16
|
+
* allowed to see.
|
|
17
|
+
* - The enforcer's `violations` topic is republished as `violations` on
|
|
18
|
+
* the wrapper, composable with {@link graphLens}.`health` alerts.
|
|
19
|
+
*
|
|
20
|
+
* V1 scope: policies + actor + scoped describe. Budget-as-option is NOT
|
|
21
|
+
* in V1 — it requires a cost-tracking design that hasn't landed yet.
|
|
22
|
+
* Callers who need a budget limit today append a budget-aware
|
|
23
|
+
* {@link PolicyRuleData} to the policies list (check current cost and
|
|
24
|
+
* `deny` when exhausted).
|
|
25
|
+
*
|
|
26
|
+
* @module
|
|
27
|
+
*/
|
|
28
|
+
|
|
29
|
+
/** Options for {@link guardedExecution}. */
|
|
30
|
+
interface GuardedExecutionOptions {
|
|
31
|
+
/**
|
|
32
|
+
* Policies enforced against every guarded write. Static list or a live
|
|
33
|
+
* `Node<readonly PolicyRuleData[]>` (LLM-updatable).
|
|
34
|
+
*
|
|
35
|
+
* **Deny-by-default gotcha:** the underlying `policyFromRules()` denies any
|
|
36
|
+
* action that matches no rule. An empty policies list in `mode: "enforce"`
|
|
37
|
+
* therefore blocks EVERY write AND every `observe` through the stacked
|
|
38
|
+
* guard — including `scopedDescribe()`. If you want a permissive base, add
|
|
39
|
+
* at least `{ effect: "allow", action: "*" }` and layer deny rules on top.
|
|
40
|
+
* In `mode: "audit"` no guards are stacked, so empty policies are safe.
|
|
41
|
+
*/
|
|
42
|
+
policies: readonly PolicyRuleData[] | Node<readonly PolicyRuleData[]>;
|
|
43
|
+
/**
|
|
44
|
+
* Actor whose perspective drives {@link GuardedExecutionGraph.scopedDescribe}
|
|
45
|
+
* and {@link GuardedExecutionGraph.describe} — when omitted, callers must
|
|
46
|
+
* pass `{actor}` explicitly or they get the target's raw describe.
|
|
47
|
+
*/
|
|
48
|
+
actor?: Actor;
|
|
49
|
+
/**
|
|
50
|
+
* `"enforce"` (default) — push guards onto target nodes so disallowed
|
|
51
|
+
* writes throw {@link GuardDenied}.
|
|
52
|
+
* `"audit"` — record would-be denials to the `violations` topic without
|
|
53
|
+
* blocking writes.
|
|
54
|
+
*/
|
|
55
|
+
mode?: "audit" | "enforce";
|
|
56
|
+
/** Ring-buffer cap for the `violations` topic. Default 1000 (inherited from policyEnforcer). */
|
|
57
|
+
violationsLimit?: number;
|
|
58
|
+
/** Wrapper graph name. Default `${target.name}_guarded`. */
|
|
59
|
+
name?: string;
|
|
60
|
+
/** Wrapper graph options. */
|
|
61
|
+
graph?: GraphOptions;
|
|
62
|
+
}
|
|
63
|
+
/**
|
|
64
|
+
* Wrapper over a target {@link Graph} providing reactive ABAC + scoped
|
|
65
|
+
* describe. Mounts a {@link PolicyEnforcerGraph} under `enforcer`.
|
|
66
|
+
*
|
|
67
|
+
* @category patterns
|
|
68
|
+
*/
|
|
69
|
+
declare class GuardedExecutionGraph extends Graph {
|
|
70
|
+
readonly enforcer: PolicyEnforcerGraph;
|
|
71
|
+
readonly violations: TopicGraph<PolicyViolation>;
|
|
72
|
+
private readonly _target;
|
|
73
|
+
private readonly _defaultActor;
|
|
74
|
+
constructor(target: Graph, opts: GuardedExecutionOptions);
|
|
75
|
+
/**
|
|
76
|
+
* Describe the **target** graph scoped to the configured actor. Returns
|
|
77
|
+
* only nodes the actor is permitted to see (via the target's node guards
|
|
78
|
+
* filtering `describe()` via `actor`).
|
|
79
|
+
*
|
|
80
|
+
* Pass `{actor}` in opts to override the configured actor for this call.
|
|
81
|
+
* Pass any standard {@link GraphDescribeOptions} fields (`detail`,
|
|
82
|
+
* `fields`, `filter`) — they apply to the target's describe.
|
|
83
|
+
*
|
|
84
|
+
* **Mode interaction:**
|
|
85
|
+
* - In `mode: "enforce"` (default), the enforcer stacks a policy-derived
|
|
86
|
+
* guard on every target node. `scopedDescribe({actor})` then filters by
|
|
87
|
+
* the AND of per-node guards AND the stacked policy guard.
|
|
88
|
+
* - In `mode: "audit"`, NO guards are stacked — `scopedDescribe` filters
|
|
89
|
+
* purely by the target's pre-existing per-node guards. If a target has
|
|
90
|
+
* no node-level guards, the policy rules you pass have no effect on
|
|
91
|
+
* visibility (they only populate the `violations` topic on writes).
|
|
92
|
+
*/
|
|
93
|
+
scopedDescribe(opts?: Omit<GraphDescribeOptions, "actor"> & {
|
|
94
|
+
actor?: Actor;
|
|
95
|
+
}): GraphDescribeOutput;
|
|
96
|
+
/** The wrapped graph (escape hatch for tooling). */
|
|
97
|
+
get target(): Graph;
|
|
98
|
+
}
|
|
99
|
+
/**
|
|
100
|
+
* Wrap a {@link Graph} with {@link policyEnforcer} plus a scoped describe
|
|
101
|
+
* lens. Returns a {@link GuardedExecutionGraph} that can be mounted, diffed,
|
|
102
|
+
* or composed with {@link graphLens}.
|
|
103
|
+
*
|
|
104
|
+
* @param target - The graph to guard.
|
|
105
|
+
* @param opts - See {@link GuardedExecutionOptions}.
|
|
106
|
+
*
|
|
107
|
+
* @example
|
|
108
|
+
* ```ts
|
|
109
|
+
* const guarded = guardedExecution(app, {
|
|
110
|
+
* actor: { type: "human", id: "alice" },
|
|
111
|
+
* policies: [
|
|
112
|
+
* { effect: "allow", action: "read", actorType: "human" },
|
|
113
|
+
* { effect: "deny", action: "write", pathPattern: "system::*" },
|
|
114
|
+
* ],
|
|
115
|
+
* mode: "enforce",
|
|
116
|
+
* });
|
|
117
|
+
*
|
|
118
|
+
* const view = guarded.scopedDescribe({ detail: "standard" });
|
|
119
|
+
* guarded.violations.events.subscribe(msgs => console.log("violations:", msgs));
|
|
120
|
+
* ```
|
|
121
|
+
*
|
|
122
|
+
* @category patterns
|
|
123
|
+
*/
|
|
124
|
+
declare function guardedExecution(target: Graph, opts: GuardedExecutionOptions): GuardedExecutionGraph;
|
|
125
|
+
|
|
126
|
+
declare const index_DescribeFilter: typeof DescribeFilter;
|
|
127
|
+
type index_GuardedExecutionGraph = GuardedExecutionGraph;
|
|
128
|
+
declare const index_GuardedExecutionGraph: typeof GuardedExecutionGraph;
|
|
129
|
+
type index_GuardedExecutionOptions = GuardedExecutionOptions;
|
|
130
|
+
declare const index_guardedExecution: typeof guardedExecution;
|
|
131
|
+
declare namespace index {
|
|
132
|
+
export { index_DescribeFilter as DescribeFilter, index_GuardedExecutionGraph as GuardedExecutionGraph, type index_GuardedExecutionOptions as GuardedExecutionOptions, index_guardedExecution as guardedExecution };
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
export { GuardedExecutionGraph as G, type GuardedExecutionOptions as a, guardedExecution as g, index as i };
|