@graphrefly/graphrefly 0.26.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 -49
- 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 -82
- 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 -3
- package/dist/core/index.d.ts +4 -3
- 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 -5
- package/dist/extra/index.d.ts +13 -5
- package/dist/extra/index.js +1 -375
- 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-6tZ5jEzr.d.cts → graph-BZGRXwOm.d.ts} +134 -31
- package/dist/{graph-DQ69XU0g.d.ts → graph-D48Qw9Cg.d.cts} +134 -31
- package/dist/index-8FSVk4Uf.d.ts +135 -0
- package/dist/index-9oDeHH2u.d.cts +291 -0
- package/dist/index-B0c4cmIO.d.ts +207 -0
- package/dist/{index-CDAjUFIv.d.ts → index-B1AmmSlb.d.ts} +1 -1
- package/dist/{index-Bd_fwmLf.d.cts → index-B2pwesl9.d.cts} +1 -1
- package/dist/index-BHvIquRZ.d.ts +1957 -0
- package/dist/{index-CPgZ5wRl.d.ts → index-BVHOrDwO.d.ts} +1 -1
- package/dist/{index-DrISNAOm.d.ts → index-BWJV63ti.d.ts} +1 -1
- package/dist/{index-B_IP40nB.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-qldRdbQw.d.ts → index-Bqachn9_.d.ts} +1 -1
- package/dist/index-Btib9rsU.d.ts +607 -0
- package/dist/{index-BYOHF0zP.d.ts → index-BwM9BEkt.d.ts} +1 -1
- package/dist/index-BxJ86YZZ.d.cts +105 -0
- package/dist/index-C73n7lo-.d.cts +251 -0
- package/dist/index-CEXXwWVH.d.cts +192 -0
- package/dist/index-CHEswufn.d.cts +163 -0
- package/dist/{index-xdGjv0nO.d.ts → index-CMn8S8Hw.d.ts} +1 -1
- package/dist/{index-QBpffFW-.d.cts → index-CRO83MmV.d.cts} +1 -1
- package/dist/{index-BjI6ty9z.d.ts → index-CloUk1kY.d.ts} +9 -9
- package/dist/index-CpgYhnrG.d.ts +291 -0
- package/dist/{index-CUyrtuOf.d.cts → index-Cyojz0AE.d.cts} +1 -1
- package/dist/{demo-shell-DEp-nMTl.d.ts → index-CzobVSMr.d.ts} +14 -14
- package/dist/index-Czq6ynh8.d.ts +143 -0
- package/dist/index-D-YB-Vl3.d.ts +195 -0
- package/dist/index-DAlweici.d.ts +231 -0
- package/dist/index-DEwTb_fm.d.cts +1957 -0
- package/dist/{index-DFhjO4Gg.d.cts → index-DL-rYJrx.d.cts} +1 -1
- package/dist/index-DP4ZTkdw.d.ts +139 -0
- package/dist/{index-BeIdBfcb.d.cts → index-DUqMOlKZ.d.cts} +200 -2366
- package/dist/{index-Bxb5ZYc9.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-CmnuOibw.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-BEfE8H_G.d.cts → index-DxsnAMWD.d.cts} +9 -9
- package/dist/index-DyxjtScX.d.cts +207 -0
- package/dist/index-HDpJe9hX.d.ts +251 -0
- package/dist/index-O6TgGUBV.d.cts +195 -0
- package/dist/{index-B4MP_8V_.d.cts → index-Oi8d8w4R.d.cts} +1 -1
- package/dist/{index-BW1z3BN9.d.ts → index-ROpQmGjE.d.ts} +30 -6
- package/dist/index-RukJ4DLS.d.cts +607 -0
- package/dist/{index-DdD5MVDL.d.ts → index-ZftwfxJM.d.ts} +200 -2366
- package/dist/{index-CuYwdKO-.d.ts → index-cByzxQIC.d.cts} +10 -195
- package/dist/index-dtN7YA2x.d.cts +143 -0
- package/dist/{index-C8mdwMXc.d.cts → index-fM6y00vT.d.cts} +30 -6
- package/dist/{index-_oMEWlDq.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-CUwyr1Kk.d.cts → index-rnwQly8X.d.cts} +147 -20
- package/dist/index-sm373fsH.d.ts +192 -0
- package/dist/index-tbf2gKHd.d.cts +139 -0
- package/dist/{demo-shell-26p5fVxn.d.cts → index-u15meRxL.d.cts} +14 -14
- package/dist/{index-eJ6T_qGM.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 -3756
- package/dist/index.d.ts +69 -3756
- package/dist/index.js +1 -7292
- package/dist/{meta-C0-8XW6Q.d.cts → meta-Cgj6zeji.d.cts} +5 -5
- package/dist/{meta-BGqSZ7mt.d.ts → meta-CwesDrMD.d.ts} +5 -5
- package/dist/{node-C_IBuvX2.d.cts → node-Cc1TniY8.d.cts} +36 -9
- package/dist/{node-C_IBuvX2.d.ts → node-Cc1TniY8.d.ts} +36 -9
- package/dist/{observable-DCk45RH5.d.ts → observable-Ct-gJ9jI.d.ts} +1 -1
- package/dist/{observable-Crr1jgzx.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-BaOQefHu.d.cts → reactive-layout-CpYb5qLP.d.cts} +2 -2
- package/dist/{reactive-layout-D9gejYXE.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/reactive-map-CdbNoSgP.d.ts +238 -0
- package/dist/reactive-map-DUeRmb9d.d.cts +238 -0
- 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-BV0htudb.d.cts +205 -0
- package/dist/sugar-Dtyrq2_q.d.ts +205 -0
- 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 +267 -7
- package/dist/chunk-3ZWCKRHX.js +0 -117
- package/dist/chunk-3ZWCKRHX.js.map +0 -1
- package/dist/chunk-6LDQFTYS.js +0 -102
- package/dist/chunk-6LDQFTYS.js.map +0 -1
- package/dist/chunk-7TAQJHQV.js +0 -103
- package/dist/chunk-7TAQJHQV.js.map +0 -1
- package/dist/chunk-AMCG74RZ.js +0 -7000
- package/dist/chunk-AMCG74RZ.js.map +0 -1
- package/dist/chunk-BVZYTZ5H.js +0 -599
- package/dist/chunk-BVZYTZ5H.js.map +0 -1
- package/dist/chunk-FQMKGR6L.js +0 -330
- package/dist/chunk-FQMKGR6L.js.map +0 -1
- package/dist/chunk-HXZEYDUR.js +0 -94
- package/dist/chunk-HXZEYDUR.js.map +0 -1
- package/dist/chunk-IZYUSJC7.js +0 -1369
- package/dist/chunk-IZYUSJC7.js.map +0 -1
- package/dist/chunk-J22W6HV3.js +0 -107
- package/dist/chunk-J22W6HV3.js.map +0 -1
- package/dist/chunk-JSCT3CR4.js +0 -38
- package/dist/chunk-JSCT3CR4.js.map +0 -1
- package/dist/chunk-JYXEWPH4.js +0 -62
- package/dist/chunk-JYXEWPH4.js.map +0 -1
- package/dist/chunk-LCE3GF5P.js +0 -866
- package/dist/chunk-LCE3GF5P.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-OHISZPOJ.js +0 -97
- package/dist/chunk-OHISZPOJ.js.map +0 -1
- package/dist/chunk-PHOUUNK7.js +0 -2291
- package/dist/chunk-PHOUUNK7.js.map +0 -1
- package/dist/chunk-RB6QPHJ7.js +0 -393
- package/dist/chunk-RB6QPHJ7.js.map +0 -1
- package/dist/chunk-SN4YWWYO.js +0 -171
- package/dist/chunk-SN4YWWYO.js.map +0 -1
- package/dist/chunk-SX52TAR4.js +0 -110
- package/dist/chunk-SX52TAR4.js.map +0 -1
- package/dist/chunk-THTWHNU4.js +0 -2712
- package/dist/chunk-THTWHNU4.js.map +0 -1
- package/dist/chunk-VYPWMZ6H.js +0 -98
- package/dist/chunk-VYPWMZ6H.js.map +0 -1
- package/dist/chunk-XGPU467M.js +0 -136
- package/dist/chunk-XGPU467M.js.map +0 -1
- package/dist/chunk-ZQMEI34O.js +0 -713
- package/dist/chunk-ZQMEI34O.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-C0ZXMaXO.d.cts +0 -392
- package/dist/index-CY2TljO4.d.ts +0 -392
- package/dist/index.cjs.map +0 -1
- package/dist/index.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/reactive-layout/index.cjs.map +0 -1
- package/dist/patterns/reactive-layout/index.js.map +0 -1
- package/dist/storage-BMycWEh2.d.ts +0 -190
- package/dist/storage-DiqWHzVI.d.cts +0 -190
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
import { a as Node } from './node-Cc1TniY8.js';
|
|
2
|
+
import { S as StatusValue, C as CircuitState, R as RateLimiterOptions, a as CircuitBreakerOptions, b as RetryOptions, F as FallbackInput, N as NS_PER_MS, c as NS_PER_SEC } from './resilience-CGRzhnD3.js';
|
|
3
|
+
import { B as BudgetConstraint } from './index-DpHe5e0Q.js';
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Resilience composition with correct nesting order (roadmap §9.0b).
|
|
7
|
+
*
|
|
8
|
+
* {@link resilientPipeline} composes the resilience primitives from
|
|
9
|
+
* `extra/resilience.ts` in the order discovered during the §9.1 eval runs:
|
|
10
|
+
*
|
|
11
|
+
* ```text
|
|
12
|
+
* rateLimit → budget → breaker → timeout → retry → fallback → status
|
|
13
|
+
* ```
|
|
14
|
+
*
|
|
15
|
+
* Note on retry/timeout ordering: `timeout` is applied BEFORE `retry` so each
|
|
16
|
+
* retry attempt resubscribes to a fresh deadline (per-attempt semantics). If
|
|
17
|
+
* `timeout` wrapped `retry`, a single deadline would apply to the entire
|
|
18
|
+
* retry chain — not what callers expect.
|
|
19
|
+
*
|
|
20
|
+
* Every step is optional — omit the option and that layer is skipped. The
|
|
21
|
+
* returned bundle exposes the final `Node<T>` plus the status/error/breaker
|
|
22
|
+
* companions so callers can wire them into dashboards, alerts, or
|
|
23
|
+
* {@link graphLens}.
|
|
24
|
+
*
|
|
25
|
+
* Subsumes the pre-1.0 `resilientFetch` template — that template becomes a
|
|
26
|
+
* preconfigured instance of this factory for the HTTP fetch case.
|
|
27
|
+
*
|
|
28
|
+
* @module
|
|
29
|
+
*/
|
|
30
|
+
|
|
31
|
+
/** Options for {@link resilientPipeline}. Every field is optional — omit to skip that layer. */
|
|
32
|
+
interface ResilientPipelineOptions<T> {
|
|
33
|
+
/** Admission control — at most `maxEvents` DATA per `windowNs`. See {@link rateLimiter}. */
|
|
34
|
+
rateLimit?: RateLimiterOptions;
|
|
35
|
+
/** Cost/constraint gate. See {@link budgetGate}. */
|
|
36
|
+
budget?: ReadonlyArray<BudgetConstraint>;
|
|
37
|
+
/** Circuit breaker — fail-fast when the downstream resource is unhealthy. See {@link circuitBreaker}. */
|
|
38
|
+
breaker?: CircuitBreakerOptions;
|
|
39
|
+
/**
|
|
40
|
+
* Behavior when the breaker is open:
|
|
41
|
+
* - `"skip"` — emit RESOLVED (default, lets downstream drop the beat)
|
|
42
|
+
* - `"error"` — emit a `CircuitOpenError` so `retry`/`fallback` can react
|
|
43
|
+
*
|
|
44
|
+
* Only used when `breaker` is provided.
|
|
45
|
+
*/
|
|
46
|
+
breakerOnOpen?: "skip" | "error";
|
|
47
|
+
/** Retry policy on terminal ERROR. See {@link retry}. */
|
|
48
|
+
retry?: RetryOptions;
|
|
49
|
+
/**
|
|
50
|
+
* Per-attempt deadline in milliseconds. Converted to ns internally. Omit to skip the timeout wrap.
|
|
51
|
+
*
|
|
52
|
+
* Specified in ms (not ns) because callers consistently think in millisecond deadlines;
|
|
53
|
+
* retry/breaker/ratelimit options take ns to match their primitives exactly.
|
|
54
|
+
*/
|
|
55
|
+
timeoutMs?: number;
|
|
56
|
+
/** Final fallback value emitted on terminal ERROR after retry exhausts. See {@link fallback}. */
|
|
57
|
+
fallback?: FallbackInput<T>;
|
|
58
|
+
/** Initial status reported by the status node. Default `"pending"`. */
|
|
59
|
+
initialStatus?: StatusValue;
|
|
60
|
+
}
|
|
61
|
+
/** Output bundle of {@link resilientPipeline}. */
|
|
62
|
+
interface ResilientPipelineBundle<T> {
|
|
63
|
+
/** The final resilient node. Subscribe to this for DATA emissions. */
|
|
64
|
+
node: Node<T>;
|
|
65
|
+
/** Live status: `"pending" | "active" | "completed" | "errored"`. */
|
|
66
|
+
status: Node<StatusValue>;
|
|
67
|
+
/** Last error payload, or `null` when not errored. */
|
|
68
|
+
error: Node<unknown | null>;
|
|
69
|
+
/** Breaker state when `opts.breaker` was provided; `undefined` otherwise. */
|
|
70
|
+
breakerState: Node<CircuitState> | undefined;
|
|
71
|
+
}
|
|
72
|
+
/**
|
|
73
|
+
* Compose a resilient pipeline around `source` in the canonical nesting
|
|
74
|
+
* order — `rateLimit → budget → breaker → timeout → retry → fallback → status`.
|
|
75
|
+
* Omit any option to skip that layer.
|
|
76
|
+
*
|
|
77
|
+
* @param source - Upstream node to wrap.
|
|
78
|
+
* @param opts - See {@link ResilientPipelineOptions}. All fields optional.
|
|
79
|
+
*
|
|
80
|
+
* @example
|
|
81
|
+
* ```ts
|
|
82
|
+
* const safeFetch = resilientPipeline(fetchNode, {
|
|
83
|
+
* rateLimit: { maxEvents: 10, windowNs: NS_PER_SEC },
|
|
84
|
+
* breaker: { failureThreshold: 5 },
|
|
85
|
+
* retry: { count: 3, backoff: "exponential" },
|
|
86
|
+
* timeoutMs: 10_000,
|
|
87
|
+
* fallback: null,
|
|
88
|
+
* });
|
|
89
|
+
* safeFetch.status.subscribe(msgs => console.log(msgs));
|
|
90
|
+
* ```
|
|
91
|
+
*
|
|
92
|
+
* @category patterns
|
|
93
|
+
*/
|
|
94
|
+
declare function resilientPipeline<T>(source: Node<T>, opts?: ResilientPipelineOptions<T>): ResilientPipelineBundle<T>;
|
|
95
|
+
|
|
96
|
+
declare const index_NS_PER_MS: typeof NS_PER_MS;
|
|
97
|
+
declare const index_NS_PER_SEC: typeof NS_PER_SEC;
|
|
98
|
+
type index_ResilientPipelineBundle<T> = ResilientPipelineBundle<T>;
|
|
99
|
+
type index_ResilientPipelineOptions<T> = ResilientPipelineOptions<T>;
|
|
100
|
+
declare const index_resilientPipeline: typeof resilientPipeline;
|
|
101
|
+
declare namespace index {
|
|
102
|
+
export { index_NS_PER_MS as NS_PER_MS, index_NS_PER_SEC as NS_PER_SEC, type index_ResilientPipelineBundle as ResilientPipelineBundle, type index_ResilientPipelineOptions as ResilientPipelineOptions, index_resilientPipeline as resilientPipeline };
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
export { type ResilientPipelineBundle as R, type ResilientPipelineOptions as a, index as i, resilientPipeline as r };
|
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
import { P as PolicyRuleData, a as Node, A as Actor } from './node-Cc1TniY8.cjs';
|
|
2
|
+
import { G as Graph, a as GraphOptions, b as GraphDescribeOptions, c as GraphDescribeOutput, D as DescribeFilter } from './graph-D48Qw9Cg.cjs';
|
|
3
|
+
import { P as PolicyEnforcerGraph, a as PolicyViolation } from './index-C73n7lo-.cjs';
|
|
4
|
+
import { T as TopicGraph } from './index-DyxjtScX.cjs';
|
|
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 };
|
|
@@ -0,0 +1,321 @@
|
|
|
1
|
+
import { a as Node } from './node-Cc1TniY8.js';
|
|
2
|
+
import { G as Graph } from './graph-BZGRXwOm.js';
|
|
3
|
+
import { L as LLMAdapter } from './types-u64Ose53.js';
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* LLM graph composition (roadmap §8.3).
|
|
7
|
+
*
|
|
8
|
+
* Declarative GraphSpec schema + compiler/decompiler for graph topology.
|
|
9
|
+
* The LLM designs graphs as JSON; compileSpec instantiates them; decompileGraph
|
|
10
|
+
* extracts them back. Templates support reusable subgraph patterns. Feedback
|
|
11
|
+
* edges express bounded cycles via §8.1 feedback().
|
|
12
|
+
*
|
|
13
|
+
* @module
|
|
14
|
+
*/
|
|
15
|
+
|
|
16
|
+
/** A single node declaration in a GraphSpec. */
|
|
17
|
+
type GraphSpecNode = {
|
|
18
|
+
/** Node kind: state, producer, derived, effect, operator. */
|
|
19
|
+
type: "state" | "producer" | "derived" | "effect" | "operator";
|
|
20
|
+
/** Dependency node names (for derived/effect/operator). */
|
|
21
|
+
deps?: string[];
|
|
22
|
+
/** Named function from the catalog (for derived/effect/operator/producer). */
|
|
23
|
+
fn?: string;
|
|
24
|
+
/** Named source from the catalog (for producer). */
|
|
25
|
+
source?: string;
|
|
26
|
+
/** Freeform config passed to the catalog fn/source factory. */
|
|
27
|
+
config?: Record<string, unknown>;
|
|
28
|
+
/** Initial value (for state nodes). */
|
|
29
|
+
initial?: unknown;
|
|
30
|
+
/** Human/LLM-readable metadata. */
|
|
31
|
+
meta?: Record<string, unknown>;
|
|
32
|
+
};
|
|
33
|
+
/** Template instantiation node — expanded at compile time. */
|
|
34
|
+
type GraphSpecTemplateRef = {
|
|
35
|
+
type: "template";
|
|
36
|
+
/** Name of the template to instantiate. */
|
|
37
|
+
template: string;
|
|
38
|
+
/** Parameter bindings: template param name → node name. */
|
|
39
|
+
bind: Record<string, string>;
|
|
40
|
+
};
|
|
41
|
+
/** A reusable subgraph pattern with parameter substitution. */
|
|
42
|
+
type GraphSpecTemplate = {
|
|
43
|
+
/** Parameter names (prefixed with $ in node refs). */
|
|
44
|
+
params: string[];
|
|
45
|
+
/** Node declarations within the template. */
|
|
46
|
+
nodes: Record<string, GraphSpecNode>;
|
|
47
|
+
/** Which node's output is the template's output. */
|
|
48
|
+
output: string;
|
|
49
|
+
};
|
|
50
|
+
/** A feedback edge: bounded cycle from condition to reentry. */
|
|
51
|
+
type GraphSpecFeedbackEdge = {
|
|
52
|
+
/** Node whose DATA triggers the feedback. */
|
|
53
|
+
from: string;
|
|
54
|
+
/** State node that receives the feedback value. */
|
|
55
|
+
to: string;
|
|
56
|
+
/** Max iterations before stopping (default: 10). */
|
|
57
|
+
maxIterations?: number;
|
|
58
|
+
};
|
|
59
|
+
/** Declarative graph topology for LLM composition (§8.3). */
|
|
60
|
+
type GraphSpec = {
|
|
61
|
+
/** Graph name. */
|
|
62
|
+
name: string;
|
|
63
|
+
/** Node declarations (keyed by node name). */
|
|
64
|
+
nodes: Record<string, GraphSpecNode | GraphSpecTemplateRef>;
|
|
65
|
+
/** Reusable subgraph templates. */
|
|
66
|
+
templates?: Record<string, GraphSpecTemplate>;
|
|
67
|
+
/** Feedback edges (bounded cycles). */
|
|
68
|
+
feedback?: GraphSpecFeedbackEdge[];
|
|
69
|
+
};
|
|
70
|
+
/**
|
|
71
|
+
* Factory for creating a derived/effect/operator node from catalog.
|
|
72
|
+
* Receives resolved dep nodes and the config from the spec.
|
|
73
|
+
*/
|
|
74
|
+
type FnFactory = (deps: Node<unknown>[], config: Record<string, unknown>) => Node<unknown>;
|
|
75
|
+
/**
|
|
76
|
+
* Factory for creating a producer node from catalog.
|
|
77
|
+
* Receives the config from the spec.
|
|
78
|
+
*/
|
|
79
|
+
type SourceFactory = (config: Record<string, unknown>) => Node<unknown>;
|
|
80
|
+
/** Simple config field descriptor for LLM prompt generation and validation. */
|
|
81
|
+
type ConfigFieldSchema = {
|
|
82
|
+
/** Human-readable type: "string", "number", "boolean", "string[]", etc. */
|
|
83
|
+
type: string;
|
|
84
|
+
/** Whether this field is required (default: true). */
|
|
85
|
+
required?: boolean;
|
|
86
|
+
/** Allowed values (enum constraint). */
|
|
87
|
+
enum?: readonly (string | number | boolean)[];
|
|
88
|
+
/** Human-readable description for LLM context. */
|
|
89
|
+
description?: string;
|
|
90
|
+
/** Default value if omitted. */
|
|
91
|
+
default?: unknown;
|
|
92
|
+
};
|
|
93
|
+
/**
|
|
94
|
+
* Rich catalog entry: bundles a runtime factory with LLM-facing metadata.
|
|
95
|
+
*
|
|
96
|
+
* The metadata is used to:
|
|
97
|
+
* 1. Auto-generate prompt text for {@link llmCompose} (replaces manual `catalogDescription`)
|
|
98
|
+
* 2. Validate LLM output in {@link validateSpec} (catch wrong fn names, invalid config)
|
|
99
|
+
* 3. Provide actionable error messages for {@link llmRefine} feedback loops
|
|
100
|
+
*
|
|
101
|
+
* Developers register ONE object; the library handles prompt generation and validation.
|
|
102
|
+
*/
|
|
103
|
+
type CatalogFnEntry = {
|
|
104
|
+
/** Runtime factory. */
|
|
105
|
+
factory: FnFactory;
|
|
106
|
+
/** One-line description for LLM prompt (what it does, not how). */
|
|
107
|
+
description: string;
|
|
108
|
+
/** Config field schemas. Keys are config field names. */
|
|
109
|
+
configSchema?: Record<string, ConfigFieldSchema>;
|
|
110
|
+
/** Example config objects (shown in prompt for complex fns). */
|
|
111
|
+
examples?: Record<string, unknown>[];
|
|
112
|
+
/** Category tags for grouping in prompt (e.g., "resilience", "reduction", "ai"). */
|
|
113
|
+
tags?: string[];
|
|
114
|
+
};
|
|
115
|
+
/** Rich catalog entry for producer sources. */
|
|
116
|
+
type CatalogSourceEntry = {
|
|
117
|
+
/** Runtime factory. */
|
|
118
|
+
factory: SourceFactory;
|
|
119
|
+
/** One-line description for LLM prompt. */
|
|
120
|
+
description: string;
|
|
121
|
+
/** Config field schemas. */
|
|
122
|
+
configSchema?: Record<string, ConfigFieldSchema>;
|
|
123
|
+
/** Example config objects. */
|
|
124
|
+
examples?: Record<string, unknown>[];
|
|
125
|
+
/** Category tags. */
|
|
126
|
+
tags?: string[];
|
|
127
|
+
};
|
|
128
|
+
/**
|
|
129
|
+
* Fn/source lookup table passed to compileSpec and llmCompose.
|
|
130
|
+
*
|
|
131
|
+
* Accepts both bare factories (backward-compatible) and rich {@link CatalogFnEntry}
|
|
132
|
+
* / {@link CatalogSourceEntry} objects. When rich entries are provided, the library
|
|
133
|
+
* auto-generates LLM prompts and validates LLM output against the catalog.
|
|
134
|
+
*/
|
|
135
|
+
type GraphSpecCatalog = {
|
|
136
|
+
fns?: Record<string, FnFactory | CatalogFnEntry>;
|
|
137
|
+
sources?: Record<string, SourceFactory | CatalogSourceEntry>;
|
|
138
|
+
};
|
|
139
|
+
/** Type guard: is this a rich catalog fn entry (vs bare factory)? */
|
|
140
|
+
declare function isRichFnEntry(entry: FnFactory | CatalogFnEntry): entry is CatalogFnEntry;
|
|
141
|
+
/** Type guard: is this a rich catalog source entry (vs bare factory)? */
|
|
142
|
+
declare function isRichSourceEntry(entry: SourceFactory | CatalogSourceEntry): entry is CatalogSourceEntry;
|
|
143
|
+
/** Extract the runtime factory from a catalog entry (rich or bare). */
|
|
144
|
+
declare function extractFnFactory(entry: FnFactory | CatalogFnEntry): FnFactory;
|
|
145
|
+
/** Extract the runtime factory from a catalog source entry (rich or bare). */
|
|
146
|
+
declare function extractSourceFactory(entry: SourceFactory | CatalogSourceEntry): SourceFactory;
|
|
147
|
+
/**
|
|
148
|
+
* Auto-generate catalog prompt text from rich catalog entries.
|
|
149
|
+
*
|
|
150
|
+
* Groups fns by tag, formats each as `- name: description. Config: { ... }`.
|
|
151
|
+
* Falls back to listing names only for bare factories.
|
|
152
|
+
*/
|
|
153
|
+
declare function generateCatalogPrompt(catalog: GraphSpecCatalog): string;
|
|
154
|
+
/**
|
|
155
|
+
* Validate a GraphSpec against a catalog.
|
|
156
|
+
*
|
|
157
|
+
* Checks that fn/source names reference actual catalog entries, and validates
|
|
158
|
+
* config fields against configSchema when rich entries are available.
|
|
159
|
+
* Returns additional errors beyond structural {@link validateSpec} checks.
|
|
160
|
+
*/
|
|
161
|
+
declare function validateSpecAgainstCatalog(spec: GraphSpec, catalog: GraphSpecCatalog): GraphSpecValidation;
|
|
162
|
+
/** Validation result from {@link validateSpec}. */
|
|
163
|
+
type GraphSpecValidation = {
|
|
164
|
+
valid: boolean;
|
|
165
|
+
errors: string[];
|
|
166
|
+
};
|
|
167
|
+
/**
|
|
168
|
+
* Validate a GraphSpec JSON object.
|
|
169
|
+
*
|
|
170
|
+
* Checks structural validity: required fields, node types, dep references,
|
|
171
|
+
* template references, feedback edge targets, self-cycles, and bind completeness.
|
|
172
|
+
*/
|
|
173
|
+
declare function validateSpec(spec: unknown): GraphSpecValidation;
|
|
174
|
+
/** Options for {@link compileSpec}. */
|
|
175
|
+
type CompileSpecOptions = {
|
|
176
|
+
/** Fn/source catalog for resolving named factories. */
|
|
177
|
+
catalog?: GraphSpecCatalog;
|
|
178
|
+
};
|
|
179
|
+
/**
|
|
180
|
+
* Instantiate a Graph from a GraphSpec.
|
|
181
|
+
*
|
|
182
|
+
* Handles template expansion (mounted subgraphs), feedback wiring via §8.1
|
|
183
|
+
* feedback(), node factory lookup from the catalog, and topology validation.
|
|
184
|
+
*
|
|
185
|
+
* @param spec - Declarative graph topology.
|
|
186
|
+
* @param opts - Catalog and compile options.
|
|
187
|
+
* @returns A running Graph.
|
|
188
|
+
* @throws On validation failure, missing catalog entries, or unresolvable deps.
|
|
189
|
+
*
|
|
190
|
+
* @category patterns
|
|
191
|
+
*/
|
|
192
|
+
declare function compileSpec(spec: GraphSpec, opts?: CompileSpecOptions): Graph;
|
|
193
|
+
/**
|
|
194
|
+
* Extract a GraphSpec from a running graph.
|
|
195
|
+
*
|
|
196
|
+
* Uses `describe({ detail: "standard" })` as a starting point, then enriches:
|
|
197
|
+
* - Feedback edges recovered from counter node meta (`feedbackFrom`/`feedbackTo`)
|
|
198
|
+
* - Template refs recovered from output node meta (`_templateName`/`_templateBind`)
|
|
199
|
+
* - Structural fingerprinting as fallback for 2+ identical mounted subgraphs
|
|
200
|
+
*
|
|
201
|
+
* @param graph - Running graph to decompile.
|
|
202
|
+
* @returns A GraphSpec representation.
|
|
203
|
+
*
|
|
204
|
+
* @category patterns
|
|
205
|
+
*/
|
|
206
|
+
declare function decompileGraph(graph: Graph): GraphSpec;
|
|
207
|
+
/** A single change in a spec diff. */
|
|
208
|
+
type SpecDiffEntry = {
|
|
209
|
+
type: "added" | "removed" | "changed";
|
|
210
|
+
path: string;
|
|
211
|
+
detail?: string;
|
|
212
|
+
};
|
|
213
|
+
/** Structural diff between two GraphSpecs. */
|
|
214
|
+
type SpecDiffResult = {
|
|
215
|
+
entries: SpecDiffEntry[];
|
|
216
|
+
summary: string;
|
|
217
|
+
};
|
|
218
|
+
/**
|
|
219
|
+
* Compute a structural diff between two GraphSpecs.
|
|
220
|
+
*
|
|
221
|
+
* Template-aware: reports "changed template definition" vs "changed
|
|
222
|
+
* instantiation bindings." No runtime needed — pure JSON comparison.
|
|
223
|
+
*
|
|
224
|
+
* @param specA - The "before" spec.
|
|
225
|
+
* @param specB - The "after" spec.
|
|
226
|
+
* @returns Diff entries and a human-readable summary.
|
|
227
|
+
*
|
|
228
|
+
* @category patterns
|
|
229
|
+
*/
|
|
230
|
+
declare function specDiff(specA: GraphSpec, specB: GraphSpec): SpecDiffResult;
|
|
231
|
+
/** Options for {@link llmCompose}. */
|
|
232
|
+
type LLMComposeOptions = {
|
|
233
|
+
model?: string;
|
|
234
|
+
temperature?: number;
|
|
235
|
+
maxTokens?: number;
|
|
236
|
+
/** Extra instructions appended to the system prompt. */
|
|
237
|
+
systemPromptExtra?: string;
|
|
238
|
+
/**
|
|
239
|
+
* Available fn/source catalog names for the LLM to reference.
|
|
240
|
+
* When omitted and `catalog` contains rich {@link CatalogFnEntry} entries,
|
|
241
|
+
* the prompt is auto-generated via {@link generateCatalogPrompt}.
|
|
242
|
+
*/
|
|
243
|
+
catalogDescription?: string;
|
|
244
|
+
/**
|
|
245
|
+
* Catalog for auto-prompt generation and catalog-aware validation.
|
|
246
|
+
* When rich entries are provided, the catalog prompt is auto-generated
|
|
247
|
+
* and LLM output is validated against fn/source names and config schemas.
|
|
248
|
+
*/
|
|
249
|
+
catalog?: GraphSpecCatalog;
|
|
250
|
+
/**
|
|
251
|
+
* Max auto-refine attempts when the LLM output fails catalog validation.
|
|
252
|
+
* Each attempt feeds the validation errors back to the LLM via llmRefine.
|
|
253
|
+
* Default: 0 (no auto-refine). Set to 2-3 for production use.
|
|
254
|
+
*/
|
|
255
|
+
maxAutoRefine?: number;
|
|
256
|
+
};
|
|
257
|
+
/**
|
|
258
|
+
* Ask an LLM to compose a GraphSpec from a natural-language problem description.
|
|
259
|
+
*
|
|
260
|
+
* The LLM generates a GraphSpec (with templates + feedback), validated before
|
|
261
|
+
* returning. The spec is for human review before compilation via compileSpec().
|
|
262
|
+
*
|
|
263
|
+
* @param problem - Natural language problem description.
|
|
264
|
+
* @param adapter - LLM adapter for the generation call.
|
|
265
|
+
* @param opts - Model options and catalog description.
|
|
266
|
+
* @returns A validated GraphSpec.
|
|
267
|
+
* @throws On invalid LLM output or validation failure.
|
|
268
|
+
*
|
|
269
|
+
* @category patterns
|
|
270
|
+
*/
|
|
271
|
+
declare function llmCompose(problem: string, adapter: LLMAdapter, opts?: LLMComposeOptions): Promise<GraphSpec>;
|
|
272
|
+
/** Options for {@link llmRefine}. */
|
|
273
|
+
type LLMRefineOptions = LLMComposeOptions;
|
|
274
|
+
/**
|
|
275
|
+
* Ask an LLM to modify an existing GraphSpec based on feedback or changed requirements.
|
|
276
|
+
*
|
|
277
|
+
* @param currentSpec - The current GraphSpec to modify.
|
|
278
|
+
* @param feedback - Natural language feedback or changed requirements.
|
|
279
|
+
* @param adapter - LLM adapter for the generation call.
|
|
280
|
+
* @param opts - Model options.
|
|
281
|
+
* @returns A new GraphSpec incorporating the feedback.
|
|
282
|
+
* @throws On invalid LLM output or validation failure.
|
|
283
|
+
*
|
|
284
|
+
* @category patterns
|
|
285
|
+
*/
|
|
286
|
+
declare function llmRefine(currentSpec: GraphSpec, feedback: string, adapter: LLMAdapter, opts?: LLMRefineOptions): Promise<GraphSpec>;
|
|
287
|
+
|
|
288
|
+
type index_CatalogFnEntry = CatalogFnEntry;
|
|
289
|
+
type index_CatalogSourceEntry = CatalogSourceEntry;
|
|
290
|
+
type index_CompileSpecOptions = CompileSpecOptions;
|
|
291
|
+
type index_ConfigFieldSchema = ConfigFieldSchema;
|
|
292
|
+
type index_FnFactory = FnFactory;
|
|
293
|
+
type index_GraphSpec = GraphSpec;
|
|
294
|
+
type index_GraphSpecCatalog = GraphSpecCatalog;
|
|
295
|
+
type index_GraphSpecFeedbackEdge = GraphSpecFeedbackEdge;
|
|
296
|
+
type index_GraphSpecNode = GraphSpecNode;
|
|
297
|
+
type index_GraphSpecTemplate = GraphSpecTemplate;
|
|
298
|
+
type index_GraphSpecTemplateRef = GraphSpecTemplateRef;
|
|
299
|
+
type index_GraphSpecValidation = GraphSpecValidation;
|
|
300
|
+
type index_LLMComposeOptions = LLMComposeOptions;
|
|
301
|
+
type index_LLMRefineOptions = LLMRefineOptions;
|
|
302
|
+
type index_SourceFactory = SourceFactory;
|
|
303
|
+
type index_SpecDiffEntry = SpecDiffEntry;
|
|
304
|
+
type index_SpecDiffResult = SpecDiffResult;
|
|
305
|
+
declare const index_compileSpec: typeof compileSpec;
|
|
306
|
+
declare const index_decompileGraph: typeof decompileGraph;
|
|
307
|
+
declare const index_extractFnFactory: typeof extractFnFactory;
|
|
308
|
+
declare const index_extractSourceFactory: typeof extractSourceFactory;
|
|
309
|
+
declare const index_generateCatalogPrompt: typeof generateCatalogPrompt;
|
|
310
|
+
declare const index_isRichFnEntry: typeof isRichFnEntry;
|
|
311
|
+
declare const index_isRichSourceEntry: typeof isRichSourceEntry;
|
|
312
|
+
declare const index_llmCompose: typeof llmCompose;
|
|
313
|
+
declare const index_llmRefine: typeof llmRefine;
|
|
314
|
+
declare const index_specDiff: typeof specDiff;
|
|
315
|
+
declare const index_validateSpec: typeof validateSpec;
|
|
316
|
+
declare const index_validateSpecAgainstCatalog: typeof validateSpecAgainstCatalog;
|
|
317
|
+
declare namespace index {
|
|
318
|
+
export { type index_CatalogFnEntry as CatalogFnEntry, type index_CatalogSourceEntry as CatalogSourceEntry, type index_CompileSpecOptions as CompileSpecOptions, type index_ConfigFieldSchema as ConfigFieldSchema, type index_FnFactory as FnFactory, type index_GraphSpec as GraphSpec, type index_GraphSpecCatalog as GraphSpecCatalog, type index_GraphSpecFeedbackEdge as GraphSpecFeedbackEdge, type index_GraphSpecNode as GraphSpecNode, type index_GraphSpecTemplate as GraphSpecTemplate, type index_GraphSpecTemplateRef as GraphSpecTemplateRef, type index_GraphSpecValidation as GraphSpecValidation, type index_LLMComposeOptions as LLMComposeOptions, type index_LLMRefineOptions as LLMRefineOptions, type index_SourceFactory as SourceFactory, type index_SpecDiffEntry as SpecDiffEntry, type index_SpecDiffResult as SpecDiffResult, index_compileSpec as compileSpec, index_decompileGraph as decompileGraph, index_extractFnFactory as extractFnFactory, index_extractSourceFactory as extractSourceFactory, index_generateCatalogPrompt as generateCatalogPrompt, index_isRichFnEntry as isRichFnEntry, index_isRichSourceEntry as isRichSourceEntry, index_llmCompose as llmCompose, index_llmRefine as llmRefine, index_specDiff as specDiff, index_validateSpec as validateSpec, index_validateSpecAgainstCatalog as validateSpecAgainstCatalog };
|
|
319
|
+
}
|
|
320
|
+
|
|
321
|
+
export { type CatalogFnEntry as C, type FnFactory as F, type GraphSpec as G, type LLMComposeOptions as L, type SourceFactory as S, type CatalogSourceEntry as a, type ConfigFieldSchema as b, type GraphSpecCatalog as c, type GraphSpecFeedbackEdge as d, type GraphSpecNode as e, type GraphSpecTemplate as f, type GraphSpecTemplateRef as g, type GraphSpecValidation as h, index as i, type CompileSpecOptions as j, type LLMRefineOptions as k, type SpecDiffEntry as l, type SpecDiffResult as m, compileSpec as n, decompileGraph as o, extractFnFactory as p, extractSourceFactory as q, generateCatalogPrompt as r, isRichFnEntry as s, isRichSourceEntry as t, llmCompose as u, llmRefine as v, specDiff as w, validateSpec as x, validateSpecAgainstCatalog as y };
|