@graphrefly/graphrefly 0.43.0 → 0.44.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{cascading-CH-_VwG9.d.cts → cascading-BglDkMdX.d.cts} +2 -2
- package/dist/{cascading-OgKQZjsa.d.ts → cascading-MFgxu7Yo.d.ts} +2 -2
- package/dist/{chunk-KVV66NN2.js → chunk-2T7U5EU6.js} +1 -1
- package/dist/chunk-5M4CCMMD.js +45 -0
- package/dist/{chunk-I7IGYPSL.js → chunk-5XJ6B66J.js} +1 -1
- package/dist/{chunk-OFZG3TB3.js → chunk-6X7AFUJV.js} +1 -1
- package/dist/{chunk-EBW4V6JN.js → chunk-7K6PWTDQ.js} +1 -1
- package/dist/{chunk-D27JNOLZ.js → chunk-7LIAPXJB.js} +1 -1
- package/dist/{chunk-CLD3F4R5.js → chunk-7WPU3UHQ.js} +1 -1
- package/dist/{chunk-NNKJUORL.js → chunk-A5WCQ5NO.js} +1 -1
- package/dist/chunk-APPIWSGD.js +84 -0
- package/dist/{chunk-TZQPPQEQ.js → chunk-BEZWM2SY.js} +1 -1
- package/dist/{chunk-K2Q24F5T.js → chunk-CB676TKJ.js} +1 -1
- package/dist/{chunk-SUWT3ZON.js → chunk-CE6TI2TL.js} +1 -1
- package/dist/{chunk-VOPGGIL7.js → chunk-CLVB32RD.js} +1 -1
- package/dist/{chunk-V5A7M7RJ.js → chunk-CRVT7D2P.js} +1 -1
- package/dist/chunk-D7GPHKFH.js +1 -0
- package/dist/{chunk-OCKEEPRJ.js → chunk-DHRX7JX4.js} +1 -1
- package/dist/chunk-FZMYDOWV.js +1 -0
- package/dist/{chunk-35JTVPOX.js → chunk-GHBWHMRZ.js} +1 -1
- package/dist/{chunk-KGKJCHEK.js → chunk-GLERH466.js} +1 -1
- package/dist/{chunk-TPKQW72B.js → chunk-HIDYF36O.js} +1 -1
- package/dist/chunk-HITNVN6B.js +3 -0
- package/dist/{chunk-P6C4WHZO.js → chunk-HY4DJBA7.js} +1 -1
- package/dist/chunk-KZIEYVXN.js +1 -0
- package/dist/{chunk-O2BLLH7M.js → chunk-N4MQX6JU.js} +1 -1
- package/dist/{chunk-4YAN45KM.js → chunk-N7FHEL4D.js} +1 -1
- package/dist/chunk-NTEURFZH.js +1 -0
- package/dist/{chunk-OYJKFY7V.js → chunk-OIVP6KFV.js} +1 -1
- package/dist/{chunk-Q4U3A3L5.js → chunk-OPHBU3LG.js} +1 -1
- package/dist/{chunk-PT7W5FCD.js → chunk-OYQOZP2F.js} +1 -1
- package/dist/{chunk-6HOSXQKF.js → chunk-PTZK576G.js} +1 -1
- package/dist/{chunk-S3EEIPO7.js → chunk-ST7UXLWR.js} +1 -1
- package/dist/chunk-SVY7VUYU.js +1 -0
- package/dist/{chunk-QYVXF7GW.js → chunk-TK3NWWD4.js} +1 -1
- package/dist/chunk-UNGSTR4X.js +61 -0
- package/dist/{chunk-VQ4A6T2A.js → chunk-VV4N5P64.js} +1 -1
- package/dist/{chunk-FDQGFWLF.js → chunk-W3I423PS.js} +1 -1
- package/dist/{chunk-XG62INFA.js → chunk-WJR24TAG.js} +1 -1
- package/dist/{chunk-F3IGTWCQ.js → chunk-XTGKMHSW.js} +1 -1
- package/dist/{chunk-JQFH2DV6.js → chunk-YBB7ZGTY.js} +1 -1
- package/dist/{chunk-CUNIRONA.js → chunk-Z4NPUARF.js} +1 -1
- package/dist/{chunk-KRH66M4O.js → chunk-ZGNQRPDT.js} +1 -1
- package/dist/{chunk-JNWRYDJN.js → chunk-ZKPSFFKU.js} +1 -1
- package/dist/{chunk-FG4TKHMC.js → chunk-ZLV5SQSX.js} +1 -1
- package/dist/compat/index.cjs +5 -5
- package/dist/compat/index.d.cts +16 -16
- package/dist/compat/index.d.ts +16 -16
- package/dist/compat/index.js +1 -1
- package/dist/compat/jotai/index.cjs +1 -1
- package/dist/compat/jotai/index.d.cts +2 -2
- package/dist/compat/jotai/index.d.ts +2 -2
- package/dist/compat/jotai/index.js +1 -1
- package/dist/compat/nanostores/index.cjs +1 -1
- package/dist/compat/nanostores/index.d.cts +2 -2
- package/dist/compat/nanostores/index.d.ts +2 -2
- package/dist/compat/nanostores/index.js +1 -1
- package/dist/compat/nestjs/index.cjs +5 -5
- package/dist/compat/nestjs/index.d.cts +8 -8
- package/dist/compat/nestjs/index.d.ts +8 -8
- package/dist/compat/nestjs/index.js +1 -1
- package/dist/compat/react/index.d.cts +2 -2
- package/dist/compat/react/index.d.ts +2 -2
- package/dist/compat/solid/index.d.cts +2 -2
- package/dist/compat/solid/index.d.ts +2 -2
- package/dist/compat/svelte/index.d.cts +2 -2
- package/dist/compat/svelte/index.d.ts +2 -2
- package/dist/compat/vue/index.d.cts +2 -2
- package/dist/compat/vue/index.d.ts +2 -2
- package/dist/compat/zustand/index.cjs +3 -3
- package/dist/compat/zustand/index.d.cts +4 -4
- package/dist/compat/zustand/index.d.ts +4 -4
- package/dist/compat/zustand/index.js +1 -1
- package/dist/core/index.cjs +1 -1
- package/dist/core/index.d.cts +3 -4
- package/dist/core/index.d.ts +3 -4
- package/dist/core/index.js +1 -1
- package/dist/{decay-CdEBmDIs.d.ts → decay-BvOWTZ00.d.ts} +2 -2
- package/dist/{decay-2ZukgQ4o.d.cts → decay-CFlLvXUT.d.cts} +2 -2
- package/dist/extra/browser.cjs +1 -1
- package/dist/extra/browser.d.cts +1 -1
- package/dist/extra/browser.d.ts +1 -1
- package/dist/extra/browser.js +1 -1
- package/dist/extra/index.cjs +15 -15
- package/dist/extra/index.d.cts +10 -10
- package/dist/extra/index.d.ts +10 -10
- package/dist/extra/index.js +1 -1
- package/dist/extra/node.cjs +2 -2
- package/dist/extra/node.d.cts +1 -1
- package/dist/extra/node.d.ts +1 -1
- package/dist/extra/node.js +1 -1
- package/dist/extra/operators.cjs +1 -1
- package/dist/extra/operators.d.cts +9 -1
- package/dist/extra/operators.d.ts +9 -1
- package/dist/extra/operators.js +1 -1
- package/dist/extra/reactive.cjs +1 -1
- package/dist/extra/reactive.d.cts +3 -3
- package/dist/extra/reactive.d.ts +3 -3
- package/dist/extra/reactive.js +1 -1
- package/dist/extra/render/index.d.cts +3 -3
- package/dist/extra/render/index.d.ts +3 -3
- package/dist/extra/sources.cjs +3 -3
- package/dist/extra/sources.d.cts +1 -1
- package/dist/extra/sources.d.ts +1 -1
- package/dist/extra/sources.js +1 -1
- package/dist/extra/storage-browser.cjs +1 -1
- package/dist/extra/storage-browser.d.cts +1 -1
- package/dist/extra/storage-browser.d.ts +1 -1
- package/dist/extra/storage-browser.js +1 -1
- package/dist/{fallback-Ctlj2tMY.d.cts → fallback-74oxi34l.d.cts} +1 -1
- package/dist/{fallback-CqYVLL6X.d.ts → fallback-DUyyBTBK.d.ts} +1 -1
- package/dist/graph/index.cjs +7 -7
- package/dist/graph/index.d.cts +5 -5
- package/dist/graph/index.d.ts +5 -5
- package/dist/graph/index.js +1 -1
- package/dist/{graph-C4SHb3Ly.d.cts → graph-CWvEUQAq.d.cts} +196 -3
- package/dist/{graph-7VguS7a4.d.ts → graph-D9LFnda9.d.ts} +196 -3
- package/dist/{index-O7fucFrU.d.cts → index-5k1T6jl0.d.cts} +9 -9
- package/dist/{index-DyR7eU5S.d.cts → index-9770hRuQ.d.cts} +4 -4
- package/dist/{index-COD1kVoS.d.cts → index-B-_tFaqV.d.cts} +4 -4
- package/dist/{index-CLon-IWF.d.cts → index-B17QddL1.d.cts} +4 -4
- package/dist/{index-B-i4_g3k.d.ts → index-B1F8Enjf.d.ts} +61 -8
- package/dist/{index-DBevwHj_.d.ts → index-B5S8ULbU.d.ts} +3 -3
- package/dist/{index-Dgs8zcj7.d.ts → index-B8YnZpIR.d.ts} +2 -2
- package/dist/{index-DSZ3ZCHF.d.ts → index-BHskSB8v.d.ts} +28 -17
- package/dist/{index-CDXc9zKM.d.cts → index-BIYAkbAi.d.cts} +1 -1
- package/dist/{index-C9kSENB4.d.cts → index-BQSKmbuG.d.cts} +1 -1
- package/dist/{index-tJoTcnHh.d.cts → index-BaQaY_IQ.d.cts} +2 -2
- package/dist/{index-CJK1JkYy.d.ts → index-BmZXHqkE.d.ts} +1 -1
- package/dist/{index-K0_0eR8g.d.ts → index-BoJ5JHxI.d.ts} +3 -3
- package/dist/{index-JZUPJIJy.d.ts → index-BocU7pqs.d.ts} +4 -4
- package/dist/{index-ChOyVLKm.d.cts → index-BrPrLl4e.d.cts} +1 -1
- package/dist/{index-BiX1Nkgx.d.cts → index-BxNs2HB9.d.cts} +22 -8
- package/dist/{index-Bf7eqeSF.d.ts → index-Byu-OpX_.d.ts} +2 -2
- package/dist/{index-BoLv_OfD.d.cts → index-C1T3d7V-.d.cts} +61 -8
- package/dist/{index-BTQtTb_H.d.cts → index-C5ri2Axc.d.cts} +3 -3
- package/dist/{index-z96luz5O.d.cts → index-C5stwKcw.d.cts} +1 -1
- package/dist/{index-D4Y1cMG0.d.ts → index-C9l6OEBL.d.ts} +1 -1
- package/dist/{index-CCq87F7t.d.ts → index-CBBLl_rc.d.ts} +1 -1
- package/dist/{index-cm1GNcWE.d.ts → index-CBGUK09R.d.ts} +4 -4
- package/dist/{index-0rKFCVFp.d.cts → index-CC-AvFTy.d.cts} +3 -3
- package/dist/{index-C59mYFKp.d.ts → index-CJF1URuX.d.ts} +9 -9
- package/dist/{index-BJX94aud.d.cts → index-CK29LV56.d.cts} +1 -1
- package/dist/{index-BP8a88zx.d.ts → index-CMh5Rz1y.d.ts} +4 -4
- package/dist/{index-CvrqGfNS.d.ts → index-CPQlGA29.d.ts} +1 -1
- package/dist/{index-D-AEQVLo.d.ts → index-CR8QpwX8.d.ts} +49 -24
- package/dist/{index-Du7u1lSf.d.cts → index-CS0LTlB8.d.cts} +4 -4
- package/dist/{index-Bc41FuHp.d.cts → index-CSOmP7xT.d.cts} +2 -2
- package/dist/{index-BsT7F2et.d.ts → index-CYq8vAyV.d.ts} +2 -2
- package/dist/{index-CPT7C_f1.d.ts → index-CZ3r5Rxp.d.ts} +4 -4
- package/dist/{index-BojK2fwH.d.cts → index-CasX6Pfq.d.cts} +68 -9
- package/dist/{index-BG0BN3PB.d.ts → index-CdAlHFEt.d.ts} +1 -1
- package/dist/{index-wAzD9yVj.d.ts → index-CdTelp1M.d.ts} +8 -4
- package/dist/{index-CQG3D1cp.d.ts → index-CeFiHtAg.d.ts} +4 -4
- package/dist/{index-RV_yDjOX.d.cts → index-Cj3WohTd.d.cts} +8 -4
- package/dist/{index-BAOD98JD.d.cts → index-Climxqsu.d.cts} +4 -4
- package/dist/{index-O16yXPK4.d.cts → index-Co7uli2l.d.cts} +28 -17
- package/dist/{index-DIOoAZUX.d.ts → index-CviRnE4K.d.ts} +1 -1
- package/dist/{index-Dhc7a7Xo.d.cts → index-Cwv0KWcU.d.cts} +2 -2
- package/dist/{index-Dn-wI9g4.d.ts → index-CzLVrjxn.d.ts} +2 -2
- package/dist/{index-C9pjcz3l.d.cts → index-D0aciIex.d.cts} +3 -3
- package/dist/{index-DwigL4lY.d.ts → index-DHen9Klo.d.ts} +22 -8
- package/dist/{index-BwLvVVsy.d.cts → index-DV_1YuVk.d.cts} +40 -8
- package/dist/{index-BdGtBX-X.d.cts → index-Dc4AYqrJ.d.cts} +3 -3
- package/dist/{index-Dmqp7KjD.d.ts → index-Dgl1HpPn.d.ts} +1 -1
- package/dist/{index-CAC_rNzm.d.ts → index-DisjX8a-.d.ts} +40 -8
- package/dist/{index-B5iz82A3.d.cts → index-UPSiS-X7.d.cts} +49 -24
- package/dist/{index-CZQXo5tH.d.ts → index-Yq60JP3s.d.ts} +3 -3
- package/dist/{index-f5IivDUX.d.cts → index-ZVQhLa2i.d.cts} +1 -1
- package/dist/{index-hHcaFlJX.d.cts → index-_6ODbuOu.d.cts} +1 -1
- package/dist/{index-BVpm6noz.d.cts → index-hcDJ8PSI.d.cts} +1 -1
- package/dist/{index-DBHK8O6H.d.ts → index-nozs3fFC.d.ts} +3 -3
- package/dist/{index-Dh_HJ82K.d.ts → index-p09KSrTN.d.ts} +68 -9
- package/dist/{index-C7O6r5fV.d.ts → index-sqkqlb1p.d.ts} +1 -1
- package/dist/{index-CZjOhcBy.d.cts → index-tRCxuAXF.d.cts} +2 -2
- package/dist/index.cjs +48 -48
- package/dist/index.d.cts +42 -43
- package/dist/index.d.ts +42 -43
- package/dist/index.js +1 -1
- package/dist/{node-ClS5yC-B.d.cts → node-kK3CvTrR.d.cts} +1 -1
- package/dist/{node-ClS5yC-B.d.ts → node-kK3CvTrR.d.ts} +1 -1
- package/dist/{observable-BsBzUrcI.d.ts → observable-DWjNfLvC.d.ts} +1 -1
- package/dist/{observable-DLGPPtb8.d.cts → observable-e3eiPPFy.d.cts} +1 -1
- package/dist/patterns/ai/browser.cjs +5 -5
- package/dist/patterns/ai/browser.d.cts +4 -4
- package/dist/patterns/ai/browser.d.ts +4 -4
- package/dist/patterns/ai/browser.js +1 -1
- package/dist/patterns/ai/index.cjs +16 -16
- package/dist/patterns/ai/index.d.cts +16 -17
- package/dist/patterns/ai/index.d.ts +16 -17
- package/dist/patterns/ai/index.js +1 -1
- package/dist/patterns/ai/node.cjs +1 -1
- package/dist/patterns/ai/node.d.cts +4 -4
- package/dist/patterns/ai/node.d.ts +4 -4
- package/dist/patterns/ai/node.js +1 -1
- package/dist/patterns/cqrs/index.cjs +3 -3
- package/dist/patterns/cqrs/index.d.cts +6 -6
- package/dist/patterns/cqrs/index.d.ts +6 -6
- package/dist/patterns/cqrs/index.js +1 -1
- package/dist/patterns/demo-shell/index.cjs +5 -5
- package/dist/patterns/demo-shell/index.d.cts +5 -5
- package/dist/patterns/demo-shell/index.d.ts +5 -5
- package/dist/patterns/demo-shell/index.js +1 -1
- package/dist/patterns/domain-templates/index.cjs +3 -3
- package/dist/patterns/domain-templates/index.d.cts +4 -4
- package/dist/patterns/domain-templates/index.d.ts +4 -4
- package/dist/patterns/domain-templates/index.js +1 -1
- package/dist/patterns/graphspec/index.cjs +16 -16
- package/dist/patterns/graphspec/index.d.cts +5 -5
- package/dist/patterns/graphspec/index.d.ts +5 -5
- package/dist/patterns/graphspec/index.js +1 -1
- package/dist/patterns/harness/index.cjs +9 -9
- package/dist/patterns/harness/index.d.cts +10 -11
- package/dist/patterns/harness/index.d.ts +10 -11
- package/dist/patterns/harness/index.js +1 -1
- package/dist/patterns/inspect/index.cjs +3 -3
- package/dist/patterns/inspect/index.d.cts +7 -7
- package/dist/patterns/inspect/index.d.ts +7 -7
- package/dist/patterns/inspect/index.js +1 -1
- package/dist/patterns/job-queue/index.cjs +3 -3
- package/dist/patterns/job-queue/index.d.cts +6 -6
- package/dist/patterns/job-queue/index.d.ts +6 -6
- package/dist/patterns/job-queue/index.js +1 -1
- package/dist/patterns/memory/index.cjs +3 -3
- package/dist/patterns/memory/index.d.cts +6 -6
- package/dist/patterns/memory/index.d.ts +6 -6
- package/dist/patterns/memory/index.js +1 -1
- package/dist/patterns/messaging/index.cjs +3 -3
- package/dist/patterns/messaging/index.d.cts +5 -5
- package/dist/patterns/messaging/index.d.ts +5 -5
- package/dist/patterns/messaging/index.js +1 -1
- package/dist/patterns/orchestration/index.cjs +3 -3
- package/dist/patterns/orchestration/index.d.cts +6 -7
- package/dist/patterns/orchestration/index.d.ts +6 -7
- package/dist/patterns/orchestration/index.js +1 -1
- package/dist/patterns/process/index.cjs +3 -1
- package/dist/patterns/process/index.d.cts +7 -7
- package/dist/patterns/process/index.d.ts +7 -7
- package/dist/patterns/process/index.js +1 -1
- package/dist/patterns/reactive-layout/index.cjs +4 -4
- package/dist/patterns/reactive-layout/index.d.cts +5 -5
- package/dist/patterns/reactive-layout/index.d.ts +5 -5
- package/dist/patterns/reactive-layout/index.js +1 -1
- package/dist/patterns/reduction/index.cjs +3 -3
- package/dist/patterns/reduction/index.d.cts +4 -4
- package/dist/patterns/reduction/index.d.ts +4 -4
- package/dist/patterns/reduction/index.js +1 -1
- package/dist/patterns/surface/index.cjs +10 -10
- package/dist/patterns/surface/index.d.cts +6 -6
- package/dist/patterns/surface/index.d.ts +6 -6
- package/dist/patterns/surface/index.js +1 -1
- package/dist/{pipeline-graph-DPqKDk59.d.cts → pipeline-graph-CIKhynsF.d.cts} +11 -6
- package/dist/{pipeline-graph-loP57TBA.d.ts → pipeline-graph-Sgj0gCwn.d.ts} +11 -6
- package/dist/{reactive-layout-v7KPvxoc.d.ts → reactive-layout-DOTs9P3X.d.ts} +2 -2
- package/dist/{reactive-layout-Dsvob4zD.d.cts → reactive-layout-DgctbqZo.d.cts} +2 -2
- package/dist/{reactive-log-BezYsbA_.d.ts → reactive-log-BKALbfal.d.ts} +1 -1
- package/dist/{reactive-log-B00laMSQ.d.cts → reactive-log-DIGdYqQ6.d.cts} +1 -1
- package/dist/{reactive-map-48mnZ-nu.d.cts → reactive-map-CEFGp8TK.d.cts} +1 -1
- package/dist/{reactive-map-BVVPdvmi.d.ts → reactive-map-DS_SIAxv.d.ts} +1 -1
- package/dist/resilience-6LYQJAC5.js +1 -0
- package/dist/{sugar-DLwvMr3F.d.ts → sugar-DQjFmVqb.d.cts} +178 -2
- package/dist/{sugar-DyVGtczU.d.cts → sugar-fhLIE7TT.d.ts} +178 -2
- package/dist/{topology-tree-BSdfSwMi.d.cts → topology-tree-Bcz27hpF.d.cts} +1 -1
- package/dist/{topology-tree-BNGvuG82.d.ts → topology-tree-xvaD0fOX.d.ts} +1 -1
- package/dist/{types-B1jDWVsM.d.cts → types-C0_yquda.d.cts} +1 -1
- package/dist/{types-DkzUUs0H.d.ts → types-CWFysE9E.d.ts} +1 -1
- package/package.json +1 -1
- package/dist/chunk-3XDYJRYU.js +0 -1
- package/dist/chunk-4I45FVQS.js +0 -1
- package/dist/chunk-626TESAC.js +0 -3
- package/dist/chunk-INQD2KRQ.js +0 -1
- package/dist/chunk-LYCLF26R.js +0 -1
- package/dist/chunk-NON4NLIC.js +0 -45
- package/dist/chunk-QE4IGY7I.js +0 -61
- package/dist/chunk-VNC3TMVY.js +0 -1
- package/dist/chunk-Y4NI3X7O.js +0 -84
- package/dist/meta-BgVAsg9j.d.ts +0 -102
- package/dist/meta-vE8bxW1E.d.cts +0 -102
- package/dist/resilience-YIWPK4YC.js +0 -1
package/dist/chunk-Y4NI3X7O.js
DELETED
|
@@ -1,84 +0,0 @@
|
|
|
1
|
-
import{b as X}from"./chunk-CUNIRONA.js";import{h as Q,j as U}from"./chunk-626TESAC.js";import{E as z,F as W,G as Y,H as V}from"./chunk-LYCLF26R.js";import{b as ie}from"./chunk-QYADASLV.js";var he={};ie(he,{compileSpec:()=>ue,decompileSpec:()=>me,extractFnFactory:()=>te,extractSourceFactory:()=>ne,generateCatalogPrompt:()=>oe,isRichFnEntry:()=>T,isRichSourceEntry:()=>I,llmCompose:()=>ye,llmRefine:()=>ae,specDiff:()=>ge,validateSpec:()=>q,validateSpecAgainstCatalog:()=>K});function M(n){let e=n.meta?.factory;return typeof e=="string"?e:void 0}function C(n){let e=n.meta?.factoryArgs;return e!=null&&typeof e=="object"?e:{}}function Z(n){let e=C(n);return"initial"in e?e.initial:n.value}function T(n){return typeof n=="object"&&n!==null&&"factory"in n}function I(n){return typeof n=="object"&&n!==null&&"factory"in n}function te(n){return T(n)?n.factory:n}function ne(n){return I(n)?n.factory:n}function oe(n){let e=[];if(n.fns){let o=new Map;for(let[s,f]of Object.entries(n.fns)){let p=T(f)?f.tags?.[0]??"Other":"Other";o.has(p)||o.set(p,[]),o.get(p).push(ce(s,f))}for(let[s,f]of o)e.push(`${s}:
|
|
2
|
-
${f.join(`
|
|
3
|
-
`)}`)}if(n.sources){let o=[];for(let[s,f]of Object.entries(n.sources))o.push(pe(s,f));o.length>0&&e.push(`Sources:
|
|
4
|
-
${o.join(`
|
|
5
|
-
`)}`)}return e.join(`
|
|
6
|
-
|
|
7
|
-
`)}function ce(n,e){if(!T(e))return`- ${n}`;let o=`- ${n}: ${e.description}`;if(e.configSchema){let s=Object.entries(e.configSchema).map(([f,p])=>{let u=`${f}: ${p.type}`;return p.enum&&(u+=` (${p.enum.join("|")})`),p.required===!1&&(u+="?"),u});o+=`. Config: { ${s.join(", ")} }`}return o}function pe(n,e){if(!I(e))return`- ${n}`;let o=`- ${n}: ${e.description}`;if(e.configSchema){let s=Object.entries(e.configSchema).map(([f,p])=>{let u=`${f}: ${p.type}`;return p.required===!1&&(u+="?"),u});o+=`. Config: { ${s.join(", ")} }`}return o}function K(n,e){let o=[],s=new Set(Object.keys(e.fns??{})),f=new Set(Object.keys(e.sources??{}));for(let[p,u]of Object.entries(n.nodes)){if(u.type==="template")continue;let i=u,r=M(i);if(r==null)continue;let t=i.type==="producer";if(i.type==="state"&&r==="state")continue;if(t){let h=f.has(r),l=s.has(r);if(!h&&!l&&(f.size>0||s.size>0)){let b=J(r,f)??J(r,s);o.push(`Node "${p}": source "${r}" not found in catalog`+(b?`. Did you mean "${b}"?`:""))}}else if(s.size>0&&!s.has(r))if(f.has(r))o.push(`Node "${p}": fn "${r}" is a source, not a function. Use it as a producer source instead, or use a function from: ${[...s].join(", ")}`);else{let h=J(r,s);o.push(`Node "${p}": fn "${r}" not found in catalog`+(h?`. Did you mean "${h}"?`:""))}let m=C(i);if(!t&&e.fns?.[r]){let h=e.fns[r];if(T(h)&&h.configSchema){for(let[l,b]of Object.entries(h.configSchema))if(b.required!==!1&&!(l in m)&&o.push(`Node "${p}": config missing required field "${l}"`),l in m&&b.enum){let S=m[l];b.enum.includes(S)||o.push(`Node "${p}": config.${l} = ${JSON.stringify(S)}, expected one of: ${b.enum.join(", ")}`)}}}if(t&&e.sources?.[r]){let h=e.sources[r];if(I(h)&&h.configSchema){for(let[l,b]of Object.entries(h.configSchema))if(b.required!==!1&&!(l in m)&&o.push(`Node "${p}": config missing required field "${l}"`),l in m&&b.enum){let S=m[l];b.enum.includes(S)||o.push(`Node "${p}": config.${l} = ${JSON.stringify(S)}, expected one of: ${b.enum.join(", ")}`)}}}}if(n.templates)for(let[p,u]of Object.entries(n.templates))for(let[i,r]of Object.entries(u.nodes)){let t=M(r);if(t!=null&&!(r.type==="state"&&t==="state")&&r.type!=="producer"&&s.size>0&&!s.has(t)){let m=J(t,s);o.push(`Template "${p}" node "${i}": fn "${t}" not found in catalog`+(m?`. Did you mean "${m}"?`:""))}}return{valid:o.length===0,errors:o,warnings:[]}}function J(n,e){let o=null,s=1/0,f=n.toLowerCase();for(let p of e){let u=fe(f,p.toLowerCase());u<s&&u<=Math.max(3,Math.floor(n.length/2))&&(s=u,o=p)}return o}function fe(n,e){let o=n.length,s=e.length,f=Array.from({length:o+1},(p,u)=>Array.from({length:s+1},(i,r)=>u===0?r:r===0?u:0));for(let p=1;p<=o;p++)for(let u=1;u<=s;u++)f[p][u]=n[p-1]===e[u-1]?f[p-1][u-1]:1+Math.min(f[p-1][u],f[p][u-1],f[p-1][u-1]);return f[o][s]}var ee=new Set(["state","producer","derived","effect","operator","template"]),de=new Set(["state","producer","derived","effect","operator"]);function q(n){let e=[],o=[];if(n==null||typeof n!="object")return{valid:!1,errors:["GraphSpec must be a non-null object"],warnings:o};let s=n;if((typeof s.name!="string"||s.name.length===0)&&e.push("Missing or empty 'name' field"),s.nodes==null||typeof s.nodes!="object"||Array.isArray(s.nodes))return e.push("Missing or invalid 'nodes' field (must be an object)"),{valid:!1,errors:e,warnings:o};let f=new Set(Object.keys(s.nodes)),p=new Map,u=new Map;if(s.templates!=null&&typeof s.templates=="object"&&!Array.isArray(s.templates)){for(let[i,r]of Object.entries(s.templates))if(r!=null&&typeof r=="object"){let t=r;u.set(i,{params:Array.isArray(t.params)?t.params:[]})}}if(s.templates!=null)if(typeof s.templates!="object"||Array.isArray(s.templates))e.push("'templates' must be an object");else for(let[i,r]of Object.entries(s.templates)){if(r==null||typeof r!="object"){e.push(`Template "${i}": must be an object`);continue}let t=r;if(Array.isArray(t.params)||e.push(`Template "${i}": missing 'params' array`),t.nodes==null||typeof t.nodes!="object"||Array.isArray(t.nodes))e.push(`Template "${i}": missing or invalid 'nodes' object`);else{let m=new Set(Array.isArray(t.params)?t.params:[]),h=new Set(Object.keys(t.nodes));for(let[l,b]of Object.entries(t.nodes)){if(b==null||typeof b!="object"){e.push(`Template "${i}" node "${l}": must be an object`);continue}let S=b;if((typeof S.type!="string"||!de.has(S.type))&&e.push(`Template "${i}" node "${l}": invalid type`),Array.isArray(S.deps))for(let g of S.deps)!h.has(g)&&!m.has(g)&&e.push(`Template "${i}" node "${l}": dep "${g}" is not an inner node or param`)}typeof t.output!="string"?e.push(`Template "${i}": missing 'output' string`):t.nodes[t.output]||e.push(`Template "${i}": output "${t.output}" is not a declared node`)}}for(let[i,r]of Object.entries(s.nodes)){if(r==null||typeof r!="object"){e.push(`Node "${i}": must be an object`);continue}let t=r;if(typeof t.type!="string"||!ee.has(t.type)){e.push(`Node "${i}": invalid type "${String(t.type)}" (expected: ${[...ee].join(", ")})`);continue}if(p.set(i,t.type),t.type==="template")if(typeof t.template!="string"||!u.has(t.template))e.push(`Node "${i}": template "${String(t.template)}" not found in templates`);else if(t.bind==null||typeof t.bind!="object"||Array.isArray(t.bind))e.push(`Node "${i}": template ref requires 'bind' object`);else{let m=u.get(t.template),h=t.bind;for(let l of m.params)l in h||e.push(`Node "${i}": template param "${l}" is not bound (template "${t.template}")`);for(let[,l]of Object.entries(h))typeof l=="string"&&!f.has(l)&&e.push(`Node "${i}": bind target "${l}" does not reference an existing node`)}else{if(Array.isArray(t.deps))for(let m of t.deps)m===i?e.push(`Node "${i}": self-referencing dep`):f.has(m)||e.push(`Node "${i}": dep "${m}" does not reference an existing node`);(t.type==="derived"||t.type==="effect"||t.type==="operator")&&!Array.isArray(t.deps)&&e.push(`Node "${i}": ${t.type} node should have a 'deps' array`)}}if(s.feedback!=null)if(!Array.isArray(s.feedback))e.push("'feedback' must be an array");else for(let i=0;i<s.feedback.length;i++){let r=s.feedback[i];if(r==null||typeof r!="object"){e.push(`Feedback [${i}]: must be an object`);continue}let t=r;typeof t.from!="string"||!f.has(t.from)?e.push(`Feedback [${i}]: 'from' "${String(t.from)}" does not reference an existing node`):p.get(t.from)==="effect"&&o.push(`Feedback [${i}]: 'from' "${t.from}" is an effect node \u2014 effects emit no DATA, so the feedback edge will never fire. Did you mean a derived/state node upstream?`),typeof t.from=="string"&&t.from===t.to&&e.push(`Feedback [${i}]: 'from' and 'to' must be different nodes`),typeof t.to!="string"||!f.has(t.to)?e.push(`Feedback [${i}]: 'to' "${String(t.to)}" does not reference an existing node`):typeof t.to=="string"&&p.get(t.to)!=="state"&&e.push(`Feedback [${i}]: 'to' node "${t.to}" must be a state node (got "${p.get(t.to)??"unknown"}")`)}return{valid:e.length===0,errors:e,warnings:o}}function ue(n,e){let o=q(n);if(!o.valid)throw new Error(`compileSpec: invalid GraphSpec:
|
|
8
|
-
${o.errors.join(`
|
|
9
|
-
`)}`);let s=n.factory,f=n.factoryArgs;if(typeof s=="string"){let a=e?.catalog?.graphFactories?.[s];if(a)return a(f)}let p=e?.catalog??{},u=e?.onMissing??"placeholder",i=new U(n.name),r=n.templates??{},t=K(n,p);if(!t.valid)throw new Error(`compileSpec: catalog validation errors:
|
|
10
|
-
${t.errors.join(`
|
|
11
|
-
`)}`);let m=[],h=(a,d,y)=>{m.push({path:a,kind:d,name:y})},l=a=>{let d=p.fns?.[a];return d?te(d):void 0},b=a=>{let d=p.sources?.[a];return d?ne(d):void 0},S=a=>{if(!a)return;let d={};for(let[y,w]of Object.entries(a))y==="factory"||y==="factoryArgs"||(d[y]=w);return Object.keys(d).length>0?d:void 0},g=new Map,x=[];for(let[a,d]of Object.entries(n.nodes)){if(d.type==="template")continue;let y=d,w=M(y),k=C(y);if(y.type==="state"){let v=Z(y),R=z(v,{name:a,meta:S(y.meta)});i.add(R,{name:a}),g.set(a,R)}else if(y.type==="producer"){let v=w?b(w):void 0,R=w?l(w):void 0;if(v){let N=v(k);i.add(N,{name:a}),g.set(a,N)}else if(R){let N=R([],k);i.add(N,{name:a}),g.set(a,N)}else{w&&h(a,"source",w);let N=W(()=>{},{name:a,meta:{...S(y.meta),_specSource:w}});i.add(N,{name:a}),g.set(a,N)}}else x.push([a,y])}let L=!0,c=new Map(x);for(;c.size>0&&L;){L=!1;for(let[a,d]of[...c.entries()]){let y=d.deps??[];if(!y.every(F=>g.has(F)))continue;let w=y.map(F=>g.get(F)),k=M(d),v=C(d),R=k?l(k):void 0,N;R?N=R(w,v):d.type==="effect"?(k&&h(a,"fn",k),N=V(w,()=>{})):(k&&h(a,"fn",k),N=Y(w,F=>F[0])),i.add(N,{name:a}),g.set(a,N),c.delete(a),L=!0}}if(c.size>0){let a=[...c.keys()].sort().join(", ");throw new Error(`compileSpec: unresolvable deps for nodes: ${a}`)}for(let[a,d]of Object.entries(n.nodes)){if(d.type!=="template")continue;let y=d,w=r[y.template],k=new U(a),v=new Map,R=[];for(let[$,j]of Object.entries(w.nodes)){let P=(j.deps??[]).map(A=>A.startsWith("$")&&y.bind[A]?y.bind[A]:A),H={...j,deps:P},G=M(j),E=C(j);if(j.type==="state"){let A=Z(j),_=z(A,{name:$,meta:S(j.meta)});k.add(_,{name:$}),v.set($,_)}else if(j.type==="producer"){let A=G?b(G):void 0,_=G?l(G):void 0;if(A){let O=A(E);k.add(O,{name:$}),v.set($,O)}else if(_){let O=_([],E);k.add(O,{name:$}),v.set($,O)}else{G&&h(`${a}.${$}`,"source",G);let O=W(()=>{},{name:$,meta:{...S(j.meta),_specSource:G}});k.add(O,{name:$}),v.set($,O)}}else R.push([$,H])}let N=!0,F=new Map(R);for(;F.size>0&&N;){N=!1;for(let[$,j]of[...F.entries()]){let P=j.deps??[];if(!P.every(D=>v.has(D)||g.has(D)))continue;let G=P.map(D=>v.get(D)??g.get(D)),E=M(j),A=C(j),_=E?l(E):void 0,O;_?O=_(G,A):j.type==="effect"?(E&&h(`${a}.${$}`,"fn",E),O=V(G,()=>{})):(E&&h(`${a}.${$}`,"fn",E),O=Y(G,D=>D[0])),k.add(O,{name:$}),v.set($,O),F.delete($),N=!0}}if(F.size>0){let $=[...F.keys()].sort().join(", ");throw new Error(`compileSpec: template "${y.template}" has unresolvable deps: ${$}`)}i.mount(a,k);let B=`${a}::${w.output}`;g.set(a,i.resolve(B));try{let $=i.resolve(B);$.meta._templateName?.emit(y.template),$.meta._templateBind?.emit(y.bind)}catch{}}for(let a of n.feedback??[])X(i,a.from,a.to,{maxIterations:a.maxIterations});if(m.length>0){if(u==="error"){let a=m.map(d=>` - ${d.path}: missing ${d.kind} "${d.name}"`);throw new Error(`compileSpec: ${m.length} catalog entr${m.length===1?"y":"ies"} missing \u2014 pass them via opts.catalog or set opts.onMissing to "warn"/"placeholder":
|
|
12
|
-
${a.join(`
|
|
13
|
-
`)}`)}if(u==="warn"){let a=e?.onWarn??(d=>console.warn(d));for(let d of m)a(`compileSpec: ${d.path} references missing ${d.kind} "${d.name}" \u2014 substituted placeholder`)}}return i}var le=new Set(["reduction","reduction_type","_specFn","_specSource","_templateName","_templateBind","feedbackFrom","feedbackTo","_internal"]);function me(n){let e=n.describe({detail:"spec"}),o=`::${Q}::`,s=/^__feedback_(?!effect_)(.+)$/,f=[],p=new Set;for(let[r,t]of Object.entries(e.nodes))t.meta?.factory!=null&&!r.includes("::")&&p.add(r);let u={};for(let[r,t]of Object.entries(e.nodes)){if(r.includes(o))continue;let m=r.indexOf("::");if(m>0&&p.has(r.slice(0,m)))continue;if(s.exec(r)){let g=t.meta;g?.feedbackFrom&&g?.feedbackTo&&f.push({from:g.feedbackFrom,to:g.feedbackTo,...g.maxIterations?{maxIterations:g.maxIterations}:{}});continue}if(t.meta?._internal||r.startsWith("__feedback_effect_")||r.startsWith("__bridge_"))continue;let l=t.meta,b=l;if(l&&Object.keys(l).length>0){let g={};for(let[x,L]of Object.entries(l))le.has(x)||(g[x]=L);g.factory==="withStatus"?(delete g.status,delete g.error):g.factory==="withBreaker"?delete g.breakerState:g.factory==="verifiable"&&delete g.sourceVersion,b=Object.keys(g).length>0?g:void 0}let S={...t};b===void 0?delete S.meta:S.meta=b,u[r]=S}let i={...e,nodes:u};return delete i.expand,f.length>0&&(i.feedback=f),i}function ge(n,e){let o=[];n.name!==e.name&&o.push({type:"changed",path:"name",detail:`"${n.name}" \u2192 "${e.name}"`});let s=new Set(Object.keys(n.nodes)),f=new Set(Object.keys(e.nodes));for(let c of f)if(!s.has(c)){let a=e.nodes[c];o.push({type:"added",path:`nodes.${c}`,detail:`type: ${a.type}`})}for(let c of s)f.has(c)||o.push({type:"removed",path:`nodes.${c}`});for(let c of s){if(!f.has(c))continue;let a=n.nodes[c],d=e.nodes[c];if(JSON.stringify(a)!==JSON.stringify(d)){let y=[];a.type!==d.type&&y.push(`type: ${a.type} \u2192 ${d.type}`),JSON.stringify(a.deps)!==JSON.stringify(d.deps)&&y.push("deps changed");let w=a.type==="template"?void 0:M(a),k=d.type==="template"?void 0:M(d);w!==k&&y.push(`fn: ${w} \u2192 ${k}`);let v=a.type==="template"?void 0:C(a),R=d.type==="template"?void 0:C(d);JSON.stringify(v)!==JSON.stringify(R)&&y.push("config changed"),o.push({type:"changed",path:`nodes.${c}`,detail:y.join("; ")||"modified"})}}let p=n.templates??{},u=e.templates??{},i=new Set(Object.keys(p)),r=new Set(Object.keys(u));for(let c of r)i.has(c)||o.push({type:"added",path:`templates.${c}`});for(let c of i)r.has(c)||o.push({type:"removed",path:`templates.${c}`});for(let c of i)r.has(c)&&JSON.stringify(p[c])!==JSON.stringify(u[c])&&o.push({type:"changed",path:`templates.${c}`,detail:"template definition changed"});let t=n.feedback??[],m=e.feedback??[],h=new Set(t.map(c=>`${c.from}->${c.to}`)),l=new Set(m.map(c=>`${c.from}->${c.to}`));for(let c of m){let a=`${c.from}->${c.to}`;h.has(a)||o.push({type:"added",path:`feedback.${a}`,detail:`maxIterations: ${c.maxIterations??10}`})}for(let c of t){let a=`${c.from}->${c.to}`;l.has(a)||o.push({type:"removed",path:`feedback.${a}`})}for(let c of t){let a=`${c.from}->${c.to}`,d=m.find(y=>y.from===c.from&&y.to===c.to);d&&JSON.stringify(c)!==JSON.stringify(d)&&o.push({type:"changed",path:`feedback.${a}`,detail:`maxIterations: ${c.maxIterations??10} \u2192 ${d.maxIterations??10}`})}let b=o.filter(c=>c.type==="added").length,S=o.filter(c=>c.type==="removed").length,g=o.filter(c=>c.type==="changed").length,x=[];b&&x.push(`${b} added`),S&&x.push(`${S} removed`),g&&x.push(`${g} changed`);let L=x.length>0?x.join(", "):"no changes";return{entries:o,summary:L}}var se=`You are a graph architect for GraphReFly, a reactive graph protocol.
|
|
14
|
-
|
|
15
|
-
Given a natural-language description, produce a JSON GraphSpec with this structure:
|
|
16
|
-
|
|
17
|
-
{
|
|
18
|
-
"name": "<graph_name>",
|
|
19
|
-
"nodes": {
|
|
20
|
-
"<node_name>": {
|
|
21
|
-
"type": "state" | "derived" | "producer" | "effect",
|
|
22
|
-
"deps": ["<dep_node_name>", ...],
|
|
23
|
-
"value": <initial_value>,
|
|
24
|
-
"meta": {
|
|
25
|
-
"factory": "<catalog_factory_name>",
|
|
26
|
-
"factoryArgs": { ... },
|
|
27
|
-
"description": "<purpose>"
|
|
28
|
-
}
|
|
29
|
-
},
|
|
30
|
-
"<template_instance>": {
|
|
31
|
-
"type": "template",
|
|
32
|
-
"template": "<template_name>",
|
|
33
|
-
"bind": { "$param": "node_name" }
|
|
34
|
-
}
|
|
35
|
-
},
|
|
36
|
-
"templates": {
|
|
37
|
-
"<template_name>": {
|
|
38
|
-
"params": ["$param1", "$param2"],
|
|
39
|
-
"nodes": { ... },
|
|
40
|
-
"output": "<output_node>"
|
|
41
|
-
}
|
|
42
|
-
},
|
|
43
|
-
"feedback": [
|
|
44
|
-
{ "from": "<condition_node>", "to": "<state_node>", "maxIterations": 10 }
|
|
45
|
-
]
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
Rules:
|
|
49
|
-
- "state" nodes hold user/LLM-writable values (knobs). Stamp the initial value
|
|
50
|
-
in "meta.factoryArgs.initial" (or as the top-level "value" field \u2014 both work).
|
|
51
|
-
- "derived" nodes compute from deps using a catalog function named in
|
|
52
|
-
"meta.factory"; pass any config via "meta.factoryArgs".
|
|
53
|
-
- "effect" nodes produce side effects from deps; same meta.factory shape as derived.
|
|
54
|
-
- "producer" nodes generate values from a catalog source named in "meta.factory";
|
|
55
|
-
pass any config via "meta.factoryArgs".
|
|
56
|
-
- Use "templates" when the same subgraph pattern repeats (e.g., per-source resilience).
|
|
57
|
-
- Use "feedback" for bounded cycles where a derived value writes back to a state node.
|
|
58
|
-
- meta.description is required for every node.
|
|
59
|
-
- Return ONLY valid JSON, no markdown fences or commentary.`;function re(n){let e=n.match(/^```(?:json)?\s*([\s\S]*?)\s*```[\s\S]*$/);return e?e[1]:n}async function ye(n,e,o){let s=se,f=o?.catalogDescription??(o?.catalog?oe(o.catalog):void 0);f&&(s+=`
|
|
60
|
-
|
|
61
|
-
Available catalog (use ONLY these names):
|
|
62
|
-
${f}`),o?.systemPromptExtra&&(s+=`
|
|
63
|
-
|
|
64
|
-
${o.systemPromptExtra}`);let p=[{role:"system",content:s},{role:"user",content:n}],r=(await e.invoke(p,{model:o?.model,temperature:o?.temperature??0,maxTokens:o?.maxTokens})).content.trim();r.startsWith("```")&&(r=re(r));let t;try{t=JSON.parse(r)}catch{throw new Error(`llmCompose: LLM response is not valid JSON: ${r.slice(0,200)}`)}let m=q(t);if(!m.valid)throw new Error(`llmCompose: invalid GraphSpec:
|
|
65
|
-
${m.errors.join(`
|
|
66
|
-
`)}`);let h=t;if(o?.catalog){let l=o.maxAutoRefine??0;for(let b=0;b<=l;b++){let S=K(h,o.catalog);if(S.valid)break;if(b===l)throw new Error(`llmCompose: catalog validation failed after ${l} refine attempts:
|
|
67
|
-
${S.errors.join(`
|
|
68
|
-
`)}`);h=await ae(h,`Fix these catalog errors:
|
|
69
|
-
${S.errors.join(`
|
|
70
|
-
`)}
|
|
71
|
-
|
|
72
|
-
Use ONLY functions and sources from the catalog.`,e,{...o,catalogDescription:f})}}return h}async function ae(n,e,o,s){let f=se;s?.catalogDescription&&(f+=`
|
|
73
|
-
|
|
74
|
-
Available catalog:
|
|
75
|
-
${s.catalogDescription}`),s?.systemPromptExtra&&(f+=`
|
|
76
|
-
|
|
77
|
-
${s.systemPromptExtra}`);let p=[{role:"system",content:f},{role:"user",content:`Current GraphSpec:
|
|
78
|
-
${JSON.stringify(n,null,2)}
|
|
79
|
-
|
|
80
|
-
Modification request: ${e}
|
|
81
|
-
|
|
82
|
-
Return the complete modified GraphSpec as JSON.`}],r=(await o.invoke(p,{model:s?.model,temperature:s?.temperature??0,maxTokens:s?.maxTokens})).content.trim();r.startsWith("```")&&(r=re(r));let t;try{t=JSON.parse(r)}catch{throw new Error(`llmRefine: LLM response is not valid JSON: ${r.slice(0,200)}`)}let m=q(t);if(!m.valid)throw new Error(`llmRefine: invalid GraphSpec:
|
|
83
|
-
${m.errors.join(`
|
|
84
|
-
`)}`);return t}export{T as a,I as b,te as c,ne as d,oe as e,K as f,q as g,ue as h,me as i,ge as j,ye as k,ae as l,he as m};
|
package/dist/meta-BgVAsg9j.d.ts
DELETED
|
@@ -1,102 +0,0 @@
|
|
|
1
|
-
import { e as NodeDescribeKind, N as Node, A as Actor } from './node-ClS5yC-B.js';
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* JSON-shaped slice of a node for `Graph.describe()`
|
|
5
|
-
* (GRAPHREFLY-SPEC §3.6, Appendix B).
|
|
6
|
-
*/
|
|
7
|
-
type DescribeNodeOutput = {
|
|
8
|
-
type: NodeDescribeKind;
|
|
9
|
-
status?: Node["status"];
|
|
10
|
-
deps: string[];
|
|
11
|
-
meta?: Record<string, unknown>;
|
|
12
|
-
name?: string;
|
|
13
|
-
value?: unknown;
|
|
14
|
-
/** True when the node is in `"sentinel"` state (no value ever). */
|
|
15
|
-
sentinel?: boolean;
|
|
16
|
-
v?: {
|
|
17
|
-
id: string;
|
|
18
|
-
version: number;
|
|
19
|
-
cid?: string;
|
|
20
|
-
prev?: string | null;
|
|
21
|
-
};
|
|
22
|
-
guard?: string;
|
|
23
|
-
lastMutation?: Readonly<{
|
|
24
|
-
actor: Actor;
|
|
25
|
-
timestamp_ns: number;
|
|
26
|
-
}>;
|
|
27
|
-
/**
|
|
28
|
-
* Latest annotation attached via `graph.trace(path, annotation)` or via
|
|
29
|
-
* `graph.add(node, { name: path, annotation })`, when present. Populated by
|
|
30
|
-
* `Graph.describe` only — `describeNode` has no graph context.
|
|
31
|
-
*/
|
|
32
|
-
annotation?: string;
|
|
33
|
-
};
|
|
34
|
-
/**
|
|
35
|
-
* Detail level for progressive disclosure (Phase 3.3b).
|
|
36
|
-
*
|
|
37
|
-
* - `"minimal"` — `type`, `deps` only.
|
|
38
|
-
* - `"standard"` — minimal + `status`, `value`, `meta`, `v`.
|
|
39
|
-
* - `"full"` — every field.
|
|
40
|
-
* - `"spec"` — Tier 1.5.3 (Session A.1 lock + Phase 3 path (b)). Projects
|
|
41
|
-
* spec-relevant fields (`type`, `deps`, `meta` — including
|
|
42
|
-
* `meta.factory` / `meta.factoryArgs`) and strips runtime fields
|
|
43
|
-
* (`status`, `lastMutation`, `guard`, `sentinel`, `v`). **Retains
|
|
44
|
-
* `value` for state nodes only** so the seed initial value round-trips
|
|
45
|
-
* through `decompileSpec` → `compileSpec` without forcing every state
|
|
46
|
-
* constructor to spawn `meta.factory`/`factoryArgs` companion nodes.
|
|
47
|
-
* The output is structurally identical to the `GraphSpec` shape so
|
|
48
|
-
* `decompileSpec(g) === describe(g, { detail: "spec" })`.
|
|
49
|
-
*/
|
|
50
|
-
type DescribeDetail = "minimal" | "standard" | "full" | "spec";
|
|
51
|
-
/** Valid field names for `describe({ fields: [...] })`. */
|
|
52
|
-
type DescribeField = "type" | "status" | "value" | "deps" | "meta" | "v" | "guard" | "lastMutation" | `meta.${string}`;
|
|
53
|
-
/** Resolve which fields to include based on detail level or explicit field list. */
|
|
54
|
-
declare function resolveDescribeFields(detail?: DescribeDetail, fields?: readonly DescribeField[]): Set<string> | null;
|
|
55
|
-
/**
|
|
56
|
-
* Walk an arbitrary value, replacing non-JSON-serializable fields with
|
|
57
|
-
* descriptive string placeholders (Tier 1.5.3 Phase 2.5 — DG2=ii). Useful for
|
|
58
|
-
* `Graph.prototype.tagFactory(name, args)` when the factory's options include
|
|
59
|
-
* `LLMAdapter` instances, callbacks, or `Node`s that don't survive
|
|
60
|
-
* serialization. Output preserves structure for documentation / audit value;
|
|
61
|
-
* recipients of the spec see "<Node>" / "<function>" / etc. in place of the
|
|
62
|
-
* unserializable bits.
|
|
63
|
-
*
|
|
64
|
-
* Heuristics:
|
|
65
|
-
* - `null` / `undefined` / boolean / number / string — kept as-is.
|
|
66
|
-
* - `function` — `"<function>"`.
|
|
67
|
-
* - Object with `subscribe` method — `"<Node>"` (matches Node-shape duck check).
|
|
68
|
-
* - Array — recursed.
|
|
69
|
-
* - Plain object — recursed.
|
|
70
|
-
* - Anything else — `"<unserializable>"`.
|
|
71
|
-
*/
|
|
72
|
-
declare function placeholderArgs(opts: Record<string, unknown>): Record<string, unknown>;
|
|
73
|
-
/**
|
|
74
|
-
* Build a `meta` fragment that stamps a factory identifier and its construction
|
|
75
|
-
* arguments onto a node, so `describe({ detail: "spec" })` exposes enough
|
|
76
|
-
* information for `compileSpec` to recreate the node from the snapshot.
|
|
77
|
-
*
|
|
78
|
-
* Use inside node-producing factories at construction time:
|
|
79
|
-
*
|
|
80
|
-
* ```ts
|
|
81
|
-
* import { factoryTag } from "@graphrefly/graphrefly";
|
|
82
|
-
*
|
|
83
|
-
* export function rateLimiter<T>(source: NodeInput<T>, opts: RateLimiterOptions): Node<T> {
|
|
84
|
-
* return derived([fromAny(source)], fn, {
|
|
85
|
-
* name: "rate-limiter",
|
|
86
|
-
* meta: { ...factoryTag("rateLimiter", opts), domain: "resilience" },
|
|
87
|
-
* });
|
|
88
|
-
* }
|
|
89
|
-
* ```
|
|
90
|
-
*
|
|
91
|
-
* `factoryArgs` should be JSON-serializable so the spec round-trips through
|
|
92
|
-
* `decompileSpec → compileSpec`. Function-typed args break determinism — use
|
|
93
|
-
* the {@link COMPOSITION-GUIDE} §39 `meta.fnId` pattern for those.
|
|
94
|
-
*
|
|
95
|
-
* Tier 1.5.3 (Session A.1 lock).
|
|
96
|
-
*/
|
|
97
|
-
declare function factoryTag(factory: string, factoryArgs?: unknown): {
|
|
98
|
-
factory: string;
|
|
99
|
-
factoryArgs?: unknown;
|
|
100
|
-
};
|
|
101
|
-
|
|
102
|
-
export { type DescribeNodeOutput as D, type DescribeDetail as a, type DescribeField as b, factoryTag as f, placeholderArgs as p, resolveDescribeFields as r };
|
package/dist/meta-vE8bxW1E.d.cts
DELETED
|
@@ -1,102 +0,0 @@
|
|
|
1
|
-
import { e as NodeDescribeKind, N as Node, A as Actor } from './node-ClS5yC-B.cjs';
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* JSON-shaped slice of a node for `Graph.describe()`
|
|
5
|
-
* (GRAPHREFLY-SPEC §3.6, Appendix B).
|
|
6
|
-
*/
|
|
7
|
-
type DescribeNodeOutput = {
|
|
8
|
-
type: NodeDescribeKind;
|
|
9
|
-
status?: Node["status"];
|
|
10
|
-
deps: string[];
|
|
11
|
-
meta?: Record<string, unknown>;
|
|
12
|
-
name?: string;
|
|
13
|
-
value?: unknown;
|
|
14
|
-
/** True when the node is in `"sentinel"` state (no value ever). */
|
|
15
|
-
sentinel?: boolean;
|
|
16
|
-
v?: {
|
|
17
|
-
id: string;
|
|
18
|
-
version: number;
|
|
19
|
-
cid?: string;
|
|
20
|
-
prev?: string | null;
|
|
21
|
-
};
|
|
22
|
-
guard?: string;
|
|
23
|
-
lastMutation?: Readonly<{
|
|
24
|
-
actor: Actor;
|
|
25
|
-
timestamp_ns: number;
|
|
26
|
-
}>;
|
|
27
|
-
/**
|
|
28
|
-
* Latest annotation attached via `graph.trace(path, annotation)` or via
|
|
29
|
-
* `graph.add(node, { name: path, annotation })`, when present. Populated by
|
|
30
|
-
* `Graph.describe` only — `describeNode` has no graph context.
|
|
31
|
-
*/
|
|
32
|
-
annotation?: string;
|
|
33
|
-
};
|
|
34
|
-
/**
|
|
35
|
-
* Detail level for progressive disclosure (Phase 3.3b).
|
|
36
|
-
*
|
|
37
|
-
* - `"minimal"` — `type`, `deps` only.
|
|
38
|
-
* - `"standard"` — minimal + `status`, `value`, `meta`, `v`.
|
|
39
|
-
* - `"full"` — every field.
|
|
40
|
-
* - `"spec"` — Tier 1.5.3 (Session A.1 lock + Phase 3 path (b)). Projects
|
|
41
|
-
* spec-relevant fields (`type`, `deps`, `meta` — including
|
|
42
|
-
* `meta.factory` / `meta.factoryArgs`) and strips runtime fields
|
|
43
|
-
* (`status`, `lastMutation`, `guard`, `sentinel`, `v`). **Retains
|
|
44
|
-
* `value` for state nodes only** so the seed initial value round-trips
|
|
45
|
-
* through `decompileSpec` → `compileSpec` without forcing every state
|
|
46
|
-
* constructor to spawn `meta.factory`/`factoryArgs` companion nodes.
|
|
47
|
-
* The output is structurally identical to the `GraphSpec` shape so
|
|
48
|
-
* `decompileSpec(g) === describe(g, { detail: "spec" })`.
|
|
49
|
-
*/
|
|
50
|
-
type DescribeDetail = "minimal" | "standard" | "full" | "spec";
|
|
51
|
-
/** Valid field names for `describe({ fields: [...] })`. */
|
|
52
|
-
type DescribeField = "type" | "status" | "value" | "deps" | "meta" | "v" | "guard" | "lastMutation" | `meta.${string}`;
|
|
53
|
-
/** Resolve which fields to include based on detail level or explicit field list. */
|
|
54
|
-
declare function resolveDescribeFields(detail?: DescribeDetail, fields?: readonly DescribeField[]): Set<string> | null;
|
|
55
|
-
/**
|
|
56
|
-
* Walk an arbitrary value, replacing non-JSON-serializable fields with
|
|
57
|
-
* descriptive string placeholders (Tier 1.5.3 Phase 2.5 — DG2=ii). Useful for
|
|
58
|
-
* `Graph.prototype.tagFactory(name, args)` when the factory's options include
|
|
59
|
-
* `LLMAdapter` instances, callbacks, or `Node`s that don't survive
|
|
60
|
-
* serialization. Output preserves structure for documentation / audit value;
|
|
61
|
-
* recipients of the spec see "<Node>" / "<function>" / etc. in place of the
|
|
62
|
-
* unserializable bits.
|
|
63
|
-
*
|
|
64
|
-
* Heuristics:
|
|
65
|
-
* - `null` / `undefined` / boolean / number / string — kept as-is.
|
|
66
|
-
* - `function` — `"<function>"`.
|
|
67
|
-
* - Object with `subscribe` method — `"<Node>"` (matches Node-shape duck check).
|
|
68
|
-
* - Array — recursed.
|
|
69
|
-
* - Plain object — recursed.
|
|
70
|
-
* - Anything else — `"<unserializable>"`.
|
|
71
|
-
*/
|
|
72
|
-
declare function placeholderArgs(opts: Record<string, unknown>): Record<string, unknown>;
|
|
73
|
-
/**
|
|
74
|
-
* Build a `meta` fragment that stamps a factory identifier and its construction
|
|
75
|
-
* arguments onto a node, so `describe({ detail: "spec" })` exposes enough
|
|
76
|
-
* information for `compileSpec` to recreate the node from the snapshot.
|
|
77
|
-
*
|
|
78
|
-
* Use inside node-producing factories at construction time:
|
|
79
|
-
*
|
|
80
|
-
* ```ts
|
|
81
|
-
* import { factoryTag } from "@graphrefly/graphrefly";
|
|
82
|
-
*
|
|
83
|
-
* export function rateLimiter<T>(source: NodeInput<T>, opts: RateLimiterOptions): Node<T> {
|
|
84
|
-
* return derived([fromAny(source)], fn, {
|
|
85
|
-
* name: "rate-limiter",
|
|
86
|
-
* meta: { ...factoryTag("rateLimiter", opts), domain: "resilience" },
|
|
87
|
-
* });
|
|
88
|
-
* }
|
|
89
|
-
* ```
|
|
90
|
-
*
|
|
91
|
-
* `factoryArgs` should be JSON-serializable so the spec round-trips through
|
|
92
|
-
* `decompileSpec → compileSpec`. Function-typed args break determinism — use
|
|
93
|
-
* the {@link COMPOSITION-GUIDE} §39 `meta.fnId` pattern for those.
|
|
94
|
-
*
|
|
95
|
-
* Tier 1.5.3 (Session A.1 lock).
|
|
96
|
-
*/
|
|
97
|
-
declare function factoryTag(factory: string, factoryArgs?: unknown): {
|
|
98
|
-
factory: string;
|
|
99
|
-
factoryArgs?: unknown;
|
|
100
|
-
};
|
|
101
|
-
|
|
102
|
-
export { type DescribeNodeOutput as D, type DescribeDetail as a, type DescribeField as b, factoryTag as f, placeholderArgs as p, resolveDescribeFields as r };
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a,b,c,d,e,f,g,h,i,j,k,l,m,n}from"./chunk-VNC3TMVY.js";import"./chunk-L6NSJVJZ.js";import"./chunk-KVV66NN2.js";import"./chunk-3G5U5QNE.js";import"./chunk-C72GO4IZ.js";import"./chunk-626TESAC.js";import"./chunk-ESMPEKEV.js";import"./chunk-VOPGGIL7.js";import"./chunk-4VVTGLXJ.js";import"./chunk-35JTVPOX.js";import"./chunk-V5A7M7RJ.js";import"./chunk-LYCLF26R.js";import"./chunk-CK2E7BTU.js";import"./chunk-QYADASLV.js";export{e as CircuitOpenError,i as RateLimiterOverflowError,b as ResilientPipelineGraph,l as TimeoutError,a as budgetGate,f as circuitBreaker,m as fallback,j as rateLimiter,c as resilientPipeline,d as retry,n as timeout,h as tokenBucket,g as withBreaker,k as withStatus};
|