@graphrefly/graphrefly 0.45.0 → 0.46.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/README.md +1 -2
- package/dist/_internal-B23BagFd.d.cts +33 -0
- package/dist/_internal-B23BagFd.d.ts +33 -0
- package/dist/adaptive-rate-limiter-Dch_xYIi.d.cts +111 -0
- package/dist/adaptive-rate-limiter-Dch_xYIi.d.ts +111 -0
- package/dist/agents-C0Ji9ldU.d.cts +629 -0
- package/dist/agents-C9zexT7I.d.ts +629 -0
- package/dist/audit-BAXb3VOg.d.ts +246 -0
- package/dist/audit-C_bPfkqS.d.cts +246 -0
- package/dist/backoff-7KIK3WQW.js +24 -0
- package/dist/backoff-7KIK3WQW.js.map +1 -0
- package/dist/backoff-Bnb9OoPh.d.cts +6 -0
- package/dist/backoff-Bnb9OoPh.d.ts +6 -0
- package/dist/base/composition/index.cjs +811 -0
- package/dist/base/composition/index.cjs.map +1 -0
- package/dist/base/composition/index.d.cts +469 -0
- package/dist/base/composition/index.d.ts +469 -0
- package/dist/base/composition/index.js +40 -0
- package/dist/base/composition/index.js.map +1 -0
- package/dist/base/index.cjs +6336 -0
- package/dist/base/index.cjs.map +1 -0
- package/dist/base/index.d.cts +22 -0
- package/dist/base/index.d.ts +22 -0
- package/dist/base/index.js +259 -0
- package/dist/base/index.js.map +1 -0
- package/dist/base/io/index.cjs +3270 -0
- package/dist/base/io/index.cjs.map +1 -0
- package/dist/base/io/index.d.cts +2245 -0
- package/dist/base/io/index.d.ts +2245 -0
- package/dist/base/io/index.js +117 -0
- package/dist/base/io/index.js.map +1 -0
- package/dist/base/meta/index.cjs +43 -0
- package/dist/base/meta/index.cjs.map +1 -0
- package/dist/base/meta/index.d.cts +45 -0
- package/dist/base/meta/index.d.ts +45 -0
- package/dist/base/meta/index.js +13 -0
- package/dist/base/meta/index.js.map +1 -0
- package/dist/base/mutation/index.cjs +200 -0
- package/dist/base/mutation/index.cjs.map +1 -0
- package/dist/base/mutation/index.d.cts +177 -0
- package/dist/base/mutation/index.d.ts +177 -0
- package/dist/base/mutation/index.js +22 -0
- package/dist/base/mutation/index.js.map +1 -0
- package/dist/base/render/index.cjs +1120 -0
- package/dist/base/render/index.cjs.map +1 -0
- package/dist/base/render/index.d.cts +227 -0
- package/dist/base/render/index.d.ts +227 -0
- package/dist/base/render/index.js +24 -0
- package/dist/base/render/index.js.map +1 -0
- package/dist/base/sources/browser/index.cjs +172 -0
- package/dist/base/sources/browser/index.cjs.map +1 -0
- package/dist/base/sources/browser/index.d.cts +84 -0
- package/dist/base/sources/browser/index.d.ts +84 -0
- package/dist/base/sources/browser/index.js +151 -0
- package/dist/base/sources/browser/index.js.map +1 -0
- package/dist/base/sources/event/index.cjs +98 -0
- package/dist/base/sources/event/index.cjs.map +1 -0
- package/dist/base/sources/event/index.d.cts +91 -0
- package/dist/base/sources/event/index.d.ts +91 -0
- package/dist/base/sources/event/index.js +13 -0
- package/dist/base/sources/event/index.js.map +1 -0
- package/dist/base/sources/index.cjs +755 -0
- package/dist/base/sources/index.cjs.map +1 -0
- package/dist/base/sources/index.d.cts +357 -0
- package/dist/base/sources/index.d.ts +357 -0
- package/dist/base/sources/index.js +42 -0
- package/dist/base/sources/index.js.map +1 -0
- package/dist/base/sources/node/index.cjs +320 -0
- package/dist/base/sources/node/index.cjs.map +1 -0
- package/dist/base/sources/node/index.d.cts +185 -0
- package/dist/base/sources/node/index.d.ts +185 -0
- package/dist/base/sources/node/index.js +306 -0
- package/dist/base/sources/node/index.js.map +1 -0
- package/dist/base/utils/index.cjs +37 -0
- package/dist/base/utils/index.cjs.map +1 -0
- package/dist/base/utils/index.d.cts +37 -0
- package/dist/base/utils/index.d.ts +37 -0
- package/dist/base/utils/index.js +11 -0
- package/dist/base/utils/index.js.map +1 -0
- package/dist/base/worker/index.cjs +548 -0
- package/dist/base/worker/index.cjs.map +1 -0
- package/dist/base/worker/index.d.cts +207 -0
- package/dist/base/worker/index.d.ts +207 -0
- package/dist/base/worker/index.js +20 -0
- package/dist/base/worker/index.js.map +1 -0
- package/dist/breaker-C9skL3d8.d.ts +175 -0
- package/dist/breaker-ugSdq54q.d.cts +175 -0
- package/dist/cascading-CSSbKGrJ.d.ts +199 -0
- package/dist/cascading-baGkiihI.d.cts +199 -0
- package/dist/chunk-255UCBG4.js +58 -0
- package/dist/chunk-255UCBG4.js.map +1 -0
- package/dist/chunk-2LO3EL4W.js +1 -0
- package/dist/chunk-2LO3EL4W.js.map +1 -0
- package/dist/chunk-2OB3CEJS.js +1065 -0
- package/dist/chunk-2OB3CEJS.js.map +1 -0
- package/dist/chunk-36NMM65U.js +144 -0
- package/dist/chunk-36NMM65U.js.map +1 -0
- package/dist/chunk-3CEXCBN6.js +1 -0
- package/dist/chunk-3CEXCBN6.js.map +1 -0
- package/dist/chunk-3MUSLI6E.js +105 -0
- package/dist/chunk-3MUSLI6E.js.map +1 -0
- package/dist/chunk-3PSLNJDU.js +884 -0
- package/dist/chunk-3PSLNJDU.js.map +1 -0
- package/dist/chunk-3QZY5BI7.js +92 -0
- package/dist/chunk-3QZY5BI7.js.map +1 -0
- package/dist/chunk-42FQ27MQ.js +594 -0
- package/dist/chunk-42FQ27MQ.js.map +1 -0
- package/dist/chunk-4GYMCUDZ.js +1085 -0
- package/dist/chunk-4GYMCUDZ.js.map +1 -0
- package/dist/chunk-4S53H2KR.js +382 -0
- package/dist/chunk-4S53H2KR.js.map +1 -0
- package/dist/chunk-4XCHZRUJ.js +128 -0
- package/dist/chunk-4XCHZRUJ.js.map +1 -0
- package/dist/chunk-5THCXDWY.js +725 -0
- package/dist/chunk-5THCXDWY.js.map +1 -0
- package/dist/chunk-6XZYT4SW.js +256 -0
- package/dist/chunk-6XZYT4SW.js.map +1 -0
- package/dist/chunk-7EGRP2VX.js +76 -0
- package/dist/chunk-7EGRP2VX.js.map +1 -0
- package/dist/chunk-A7KV5UK4.js +150 -0
- package/dist/chunk-A7KV5UK4.js.map +1 -0
- package/dist/chunk-APY2SS5X.js +156 -0
- package/dist/chunk-APY2SS5X.js.map +1 -0
- package/dist/chunk-AZDQPQ3V.js +66 -0
- package/dist/chunk-AZDQPQ3V.js.map +1 -0
- package/dist/chunk-BU3SEFA5.js +90 -0
- package/dist/chunk-BU3SEFA5.js.map +1 -0
- package/dist/chunk-BXGZFGZ4.js +189 -0
- package/dist/chunk-BXGZFGZ4.js.map +1 -0
- package/dist/chunk-CGHORL6G.js +579 -0
- package/dist/chunk-CGHORL6G.js.map +1 -0
- package/dist/chunk-CXANAIZU.js +530 -0
- package/dist/chunk-CXANAIZU.js.map +1 -0
- package/dist/chunk-CZQHCKKG.js +1 -0
- package/dist/chunk-CZQHCKKG.js.map +1 -0
- package/dist/chunk-DKNHAICT.js +133 -0
- package/dist/chunk-DKNHAICT.js.map +1 -0
- package/dist/chunk-DM4OMPWK.js +584 -0
- package/dist/chunk-DM4OMPWK.js.map +1 -0
- package/dist/chunk-DMSNO6ZB.js +452 -0
- package/dist/chunk-DMSNO6ZB.js.map +1 -0
- package/dist/chunk-E5OZPDIW.js +229 -0
- package/dist/chunk-E5OZPDIW.js.map +1 -0
- package/dist/chunk-EVYY4X5A.js +509 -0
- package/dist/chunk-EVYY4X5A.js.map +1 -0
- package/dist/chunk-FDFD67UO.js +1 -0
- package/dist/chunk-FDFD67UO.js.map +1 -0
- package/dist/chunk-FMPF42Q4.js +13 -0
- package/dist/chunk-FMPF42Q4.js.map +1 -0
- package/dist/chunk-FR6RGA3B.js +1277 -0
- package/dist/chunk-FR6RGA3B.js.map +1 -0
- package/dist/chunk-FW23JYNQ.js +454 -0
- package/dist/chunk-FW23JYNQ.js.map +1 -0
- package/dist/chunk-GBCENOLN.js +1575 -0
- package/dist/chunk-GBCENOLN.js.map +1 -0
- package/dist/chunk-HL7HUJIX.js +1 -0
- package/dist/chunk-HL7HUJIX.js.map +1 -0
- package/dist/chunk-HULCUY35.js +2508 -0
- package/dist/chunk-HULCUY35.js.map +1 -0
- package/dist/chunk-IHTWQEDR.js +169 -0
- package/dist/chunk-IHTWQEDR.js.map +1 -0
- package/dist/chunk-IJRR6YAI.js +128 -0
- package/dist/chunk-IJRR6YAI.js.map +1 -0
- package/dist/chunk-JGFRAFDL.js +221 -0
- package/dist/chunk-JGFRAFDL.js.map +1 -0
- package/dist/chunk-KIIXR252.js +211 -0
- package/dist/chunk-KIIXR252.js.map +1 -0
- package/dist/chunk-KN3H5CNT.js +11 -0
- package/dist/chunk-KN3H5CNT.js.map +1 -0
- package/dist/chunk-KPG3DGLA.js +1 -0
- package/dist/chunk-KPG3DGLA.js.map +1 -0
- package/dist/chunk-KRNQ6RGQ.js +1 -0
- package/dist/chunk-KRNQ6RGQ.js.map +1 -0
- package/dist/chunk-LBAJK24K.js +1071 -0
- package/dist/chunk-LBAJK24K.js.map +1 -0
- package/dist/chunk-MLTPJMH6.js +417 -0
- package/dist/chunk-MLTPJMH6.js.map +1 -0
- package/dist/chunk-N3SZ7BMH.js +95 -0
- package/dist/chunk-N3SZ7BMH.js.map +1 -0
- package/dist/chunk-NDUD3IMO.js +540 -0
- package/dist/chunk-NDUD3IMO.js.map +1 -0
- package/dist/chunk-NY2PYHNC.js +873 -0
- package/dist/chunk-NY2PYHNC.js.map +1 -0
- package/dist/chunk-O3MT7DYI.js +225 -0
- package/dist/chunk-O3MT7DYI.js.map +1 -0
- package/dist/chunk-OCUDSN63.js +2386 -0
- package/dist/chunk-OCUDSN63.js.map +1 -0
- package/dist/chunk-OIWU3NYV.js +199 -0
- package/dist/chunk-OIWU3NYV.js.map +1 -0
- package/dist/chunk-OO5BM6CJ.js +1153 -0
- package/dist/chunk-OO5BM6CJ.js.map +1 -0
- package/dist/chunk-OQUIJT7A.js +1 -0
- package/dist/chunk-OQUIJT7A.js.map +1 -0
- package/dist/chunk-P5LBT622.js +105 -0
- package/dist/chunk-P5LBT622.js.map +1 -0
- package/dist/chunk-PKGQG5QQ.js +519 -0
- package/dist/chunk-PKGQG5QQ.js.map +1 -0
- package/dist/chunk-PKPO3JTZ.js +561 -0
- package/dist/chunk-PKPO3JTZ.js.map +1 -0
- package/dist/chunk-PL5UDIQ5.js +118 -0
- package/dist/chunk-PL5UDIQ5.js.map +1 -0
- package/dist/chunk-PZWISPIQ.js +432 -0
- package/dist/chunk-PZWISPIQ.js.map +1 -0
- package/dist/chunk-Q3EYOCZB.js +510 -0
- package/dist/chunk-Q3EYOCZB.js.map +1 -0
- package/dist/chunk-QMBYUVRL.js +15 -0
- package/dist/chunk-QMBYUVRL.js.map +1 -0
- package/dist/chunk-RAGGHLCV.js +200 -0
- package/dist/chunk-RAGGHLCV.js.map +1 -0
- package/dist/chunk-RGL53X5G.js +574 -0
- package/dist/chunk-RGL53X5G.js.map +1 -0
- package/dist/chunk-RJOG4IJU.js +1039 -0
- package/dist/chunk-RJOG4IJU.js.map +1 -0
- package/dist/chunk-SOOKUYVM.js +403 -0
- package/dist/chunk-SOOKUYVM.js.map +1 -0
- package/dist/chunk-T5BN5KG7.js +1 -0
- package/dist/chunk-T5BN5KG7.js.map +1 -0
- package/dist/chunk-TP7244Y6.js +207 -0
- package/dist/chunk-TP7244Y6.js.map +1 -0
- package/dist/chunk-TSBFTJKM.js +57 -0
- package/dist/chunk-TSBFTJKM.js.map +1 -0
- package/dist/chunk-URQ2CBBF.js +143 -0
- package/dist/chunk-URQ2CBBF.js.map +1 -0
- package/dist/chunk-W2BOPXTI.js +1 -0
- package/dist/chunk-W2BOPXTI.js.map +1 -0
- package/dist/chunk-WKSWLSCX.js +207 -0
- package/dist/chunk-WKSWLSCX.js.map +1 -0
- package/dist/chunk-Y52CS6YA.js +88 -0
- package/dist/chunk-Y52CS6YA.js.map +1 -0
- package/dist/chunk-YCBUWK77.js +92 -0
- package/dist/chunk-YCBUWK77.js.map +1 -0
- package/dist/chunk-YJ4U2D2C.js +314 -0
- package/dist/chunk-YJ4U2D2C.js.map +1 -0
- package/dist/chunk-Z4YXAUDN.js +239 -0
- package/dist/chunk-Z4YXAUDN.js.map +1 -0
- package/dist/chunk-Z6EGP5D7.js +92 -0
- package/dist/chunk-Z6EGP5D7.js.map +1 -0
- package/dist/compat/index.cjs +3083 -2
- package/dist/compat/index.cjs.map +1 -1
- package/dist/compat/index.d.cts +116 -1
- package/dist/compat/index.d.ts +116 -1
- package/dist/compat/index.js +175 -2
- package/dist/compat/index.js.map +1 -1
- package/dist/compat/jotai/index.cjs +130 -2
- package/dist/compat/jotai/index.cjs.map +1 -1
- package/dist/compat/jotai/index.d.cts +2 -1
- package/dist/compat/jotai/index.d.ts +2 -1
- package/dist/compat/jotai/index.js +7 -2
- package/dist/compat/jotai/index.js.map +1 -1
- package/dist/compat/nanostores/index.cjs +186 -2
- package/dist/compat/nanostores/index.cjs.map +1 -1
- package/dist/compat/nanostores/index.d.cts +2 -1
- package/dist/compat/nanostores/index.d.ts +2 -1
- package/dist/compat/nanostores/index.js +21 -2
- package/dist/compat/nanostores/index.js.map +1 -1
- package/dist/compat/nestjs/index.cjs +2224 -2
- package/dist/compat/nestjs/index.cjs.map +1 -1
- package/dist/compat/nestjs/index.d.cts +10 -1
- package/dist/compat/nestjs/index.d.ts +10 -1
- package/dist/compat/nestjs/index.js +77 -2
- package/dist/compat/nestjs/index.js.map +1 -1
- package/dist/compat/react/index.cjs +95 -2
- package/dist/compat/react/index.cjs.map +1 -1
- package/dist/compat/react/index.d.cts +2 -1
- package/dist/compat/react/index.d.ts +2 -1
- package/dist/compat/react/index.js +11 -2
- package/dist/compat/react/index.js.map +1 -1
- package/dist/compat/solid/index.cjs +82 -2
- package/dist/compat/solid/index.cjs.map +1 -1
- package/dist/compat/solid/index.d.cts +2 -1
- package/dist/compat/solid/index.d.ts +2 -1
- package/dist/compat/solid/index.js +11 -2
- package/dist/compat/solid/index.js.map +1 -1
- package/dist/compat/svelte/index.cjs +85 -2
- package/dist/compat/svelte/index.cjs.map +1 -1
- package/dist/compat/svelte/index.d.cts +2 -1
- package/dist/compat/svelte/index.d.ts +2 -1
- package/dist/compat/svelte/index.js +11 -2
- package/dist/compat/svelte/index.js.map +1 -1
- package/dist/compat/vue/index.cjs +100 -2
- package/dist/compat/vue/index.cjs.map +1 -1
- package/dist/compat/vue/index.d.cts +3 -1
- package/dist/compat/vue/index.d.ts +3 -1
- package/dist/compat/vue/index.js +11 -2
- package/dist/compat/vue/index.js.map +1 -1
- package/dist/compat/zustand/index.cjs +50 -2
- package/dist/compat/zustand/index.cjs.map +1 -1
- package/dist/compat/zustand/index.d.cts +2 -1
- package/dist/compat/zustand/index.d.ts +2 -1
- package/dist/compat/zustand/index.js +7 -2
- package/dist/compat/zustand/index.js.map +1 -1
- package/dist/distill-De6Rnn15.d.cts +48 -0
- package/dist/distill-De6Rnn15.d.ts +48 -0
- package/dist/external-register-CWyroXb_.d.cts +138 -0
- package/dist/external-register-CWyroXb_.d.ts +138 -0
- package/dist/fallback-Bx46zqky.d.cts +243 -0
- package/dist/fallback-pIWW8A2d.d.ts +243 -0
- package/dist/guarded-execution-BcdtxeBk.d.ts +207 -0
- package/dist/guarded-execution-C-3hnP6A.d.cts +207 -0
- package/dist/index-5SU_O78r.d.cts +754 -0
- package/dist/index-B6pxYJzO.d.cts +36 -0
- package/dist/index-B6pxYJzO.d.ts +36 -0
- package/dist/index-BFsng6v1.d.cts +44 -0
- package/dist/index-BFsng6v1.d.ts +44 -0
- package/dist/index-Bg-LwEt-.d.cts +45 -0
- package/dist/index-Bg-LwEt-.d.ts +45 -0
- package/dist/index-Brp888t0.d.cts +127 -0
- package/dist/index-Brp888t0.d.ts +127 -0
- package/dist/index-CDfk6jHN.d.cts +37 -0
- package/dist/index-CDfk6jHN.d.ts +37 -0
- package/dist/index-CEXCtYYJ.d.ts +754 -0
- package/dist/index-DLAxYaN5.d.cts +169 -0
- package/dist/index-DLAxYaN5.d.ts +169 -0
- package/dist/index-DeWbQzMe.d.cts +34 -0
- package/dist/index-DeWbQzMe.d.ts +34 -0
- package/dist/index-dX9IzPqj.d.cts +86 -0
- package/dist/index-dX9IzPqj.d.ts +86 -0
- package/dist/index.cjs +25950 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +56 -42
- package/dist/index.d.ts +56 -42
- package/dist/index.js +849 -0
- package/dist/index.js.map +1 -1
- package/dist/layout-types-B5aiHYgk.d.cts +72 -0
- package/dist/layout-types-B5aiHYgk.d.ts +72 -0
- package/dist/memory-composers-BryDrRBX.d.cts +529 -0
- package/dist/memory-composers-CVQqPYEV.d.ts +529 -0
- package/dist/observable-BXQoW1P-.d.cts +36 -0
- package/dist/observable-BXQoW1P-.d.ts +36 -0
- package/dist/pipeline-graph-Ce47CB6Y.d.cts +145 -0
- package/dist/pipeline-graph-DXCwY9vG.d.ts +145 -0
- package/dist/presets/ai/index.cjs +4377 -0
- package/dist/presets/ai/index.cjs.map +1 -0
- package/dist/presets/ai/index.d.cts +98 -0
- package/dist/presets/ai/index.d.ts +98 -0
- package/dist/presets/ai/index.js +54 -0
- package/dist/presets/ai/index.js.map +1 -0
- package/dist/presets/harness/index.cjs +5929 -0
- package/dist/presets/harness/index.cjs.map +1 -0
- package/dist/presets/harness/index.d.cts +566 -0
- package/dist/presets/harness/index.d.ts +566 -0
- package/dist/presets/harness/index.js +71 -0
- package/dist/presets/harness/index.js.map +1 -0
- package/dist/presets/index.cjs +9782 -0
- package/dist/presets/index.cjs.map +1 -0
- package/dist/presets/index.d.cts +28 -0
- package/dist/presets/index.d.ts +28 -0
- package/dist/presets/index.js +129 -0
- package/dist/presets/index.js.map +1 -0
- package/dist/presets/inspect/index.cjs +1087 -0
- package/dist/presets/inspect/index.cjs.map +1 -0
- package/dist/presets/inspect/index.d.cts +172 -0
- package/dist/presets/inspect/index.d.ts +172 -0
- package/dist/presets/inspect/index.js +21 -0
- package/dist/presets/inspect/index.js.map +1 -0
- package/dist/presets/resilience/index.cjs +1593 -0
- package/dist/presets/resilience/index.cjs.map +1 -0
- package/dist/presets/resilience/index.d.cts +205 -0
- package/dist/presets/resilience/index.d.ts +205 -0
- package/dist/presets/resilience/index.js +18 -0
- package/dist/presets/resilience/index.js.map +1 -0
- package/dist/rate-limiter-CEALq4N1.d.ts +559 -0
- package/dist/rate-limiter-DpVbSYdH.d.cts +559 -0
- package/dist/reactive-layout-fswlBUvX.d.cts +195 -0
- package/dist/reactive-layout-fswlBUvX.d.ts +195 -0
- package/dist/retry-BDbRZ_gx.d.ts +125 -0
- package/dist/retry-DWuhjvsA.d.cts +125 -0
- package/dist/solutions/index.cjs +8200 -0
- package/dist/solutions/index.cjs.map +1 -0
- package/dist/solutions/index.d.cts +23 -0
- package/dist/solutions/index.d.ts +23 -0
- package/dist/solutions/index.js +55 -0
- package/dist/solutions/index.js.map +1 -0
- package/dist/spawnable-5mDY501F.d.cts +746 -0
- package/dist/spawnable-D3lR0oQu.d.ts +746 -0
- package/dist/status-U-rUI79b.d.cts +84 -0
- package/dist/status-U-rUI79b.d.ts +84 -0
- package/dist/timeout-U5O4ESK3.js +12 -0
- package/dist/timeout-U5O4ESK3.js.map +1 -0
- package/dist/types-BB5Lw-pB.d.cts +442 -0
- package/dist/types-BB5Lw-pB.d.ts +442 -0
- package/dist/types-CJWIMJiZ.d.ts +548 -0
- package/dist/types-vCq7ShIm.d.cts +548 -0
- package/dist/utils/ai/browser.cjs +2169 -0
- package/dist/utils/ai/browser.cjs.map +1 -0
- package/dist/utils/ai/browser.d.cts +129 -0
- package/dist/utils/ai/browser.d.ts +129 -0
- package/dist/utils/ai/browser.js +255 -0
- package/dist/utils/ai/browser.js.map +1 -0
- package/dist/utils/ai/index.cjs +8468 -0
- package/dist/utils/ai/index.cjs.map +1 -0
- package/dist/utils/ai/index.d.cts +1777 -0
- package/dist/utils/ai/index.d.ts +1777 -0
- package/dist/utils/ai/index.js +173 -0
- package/dist/utils/ai/index.js.map +1 -0
- package/dist/utils/ai/node.cjs +648 -0
- package/dist/utils/ai/node.cjs.map +1 -0
- package/dist/utils/ai/node.d.cts +57 -0
- package/dist/utils/ai/node.d.ts +57 -0
- package/dist/utils/ai/node.js +84 -0
- package/dist/utils/ai/node.js.map +1 -0
- package/dist/utils/cqrs/index.cjs +1036 -0
- package/dist/utils/cqrs/index.cjs.map +1 -0
- package/dist/utils/cqrs/index.d.cts +438 -0
- package/dist/utils/cqrs/index.d.ts +438 -0
- package/dist/utils/cqrs/index.js +18 -0
- package/dist/utils/cqrs/index.js.map +1 -0
- package/dist/utils/demo-shell/index.cjs +865 -0
- package/dist/utils/demo-shell/index.cjs.map +1 -0
- package/dist/utils/demo-shell/index.d.cts +90 -0
- package/dist/utils/demo-shell/index.d.ts +90 -0
- package/dist/utils/demo-shell/index.js +13 -0
- package/dist/utils/demo-shell/index.js.map +1 -0
- package/dist/utils/domain-templates/index.cjs +732 -0
- package/dist/utils/domain-templates/index.cjs.map +1 -0
- package/dist/utils/domain-templates/index.d.cts +214 -0
- package/dist/utils/domain-templates/index.d.ts +214 -0
- package/dist/utils/domain-templates/index.js +17 -0
- package/dist/utils/domain-templates/index.js.map +1 -0
- package/dist/utils/graphspec/index.cjs +1174 -0
- package/dist/utils/graphspec/index.cjs.map +1 -0
- package/dist/utils/graphspec/index.d.cts +449 -0
- package/dist/utils/graphspec/index.d.ts +449 -0
- package/dist/utils/graphspec/index.js +35 -0
- package/dist/utils/graphspec/index.js.map +1 -0
- package/dist/utils/harness/index.cjs +656 -0
- package/dist/utils/harness/index.cjs.map +1 -0
- package/dist/utils/harness/index.d.cts +542 -0
- package/dist/utils/harness/index.d.ts +542 -0
- package/dist/utils/harness/index.js +56 -0
- package/dist/utils/harness/index.js.map +1 -0
- package/dist/utils/index.cjs +17609 -0
- package/dist/utils/index.cjs.map +1 -0
- package/dist/utils/index.d.cts +96 -0
- package/dist/utils/index.d.ts +96 -0
- package/dist/utils/index.js +514 -0
- package/dist/utils/index.js.map +1 -0
- package/dist/utils/inspect/index.cjs +807 -0
- package/dist/utils/inspect/index.cjs.map +1 -0
- package/dist/utils/inspect/index.d.cts +123 -0
- package/dist/utils/inspect/index.d.ts +123 -0
- package/dist/utils/inspect/index.js +30 -0
- package/dist/utils/inspect/index.js.map +1 -0
- package/dist/utils/job-queue/index.cjs +717 -0
- package/dist/utils/job-queue/index.cjs.map +1 -0
- package/dist/utils/job-queue/index.d.cts +200 -0
- package/dist/utils/job-queue/index.d.ts +200 -0
- package/dist/utils/job-queue/index.js +18 -0
- package/dist/utils/job-queue/index.js.map +1 -0
- package/dist/utils/memory/index.cjs +1451 -0
- package/dist/utils/memory/index.cjs.map +1 -0
- package/dist/utils/memory/index.d.cts +582 -0
- package/dist/utils/memory/index.d.ts +582 -0
- package/dist/utils/memory/index.js +19 -0
- package/dist/utils/memory/index.js.map +1 -0
- package/dist/utils/messaging/index.cjs +666 -0
- package/dist/utils/messaging/index.cjs.map +1 -0
- package/dist/utils/messaging/index.d.cts +562 -0
- package/dist/utils/messaging/index.d.ts +562 -0
- package/dist/utils/messaging/index.js +50 -0
- package/dist/utils/messaging/index.js.map +1 -0
- package/dist/utils/orchestration/index.cjs +876 -0
- package/dist/utils/orchestration/index.cjs.map +1 -0
- package/dist/utils/orchestration/index.d.cts +233 -0
- package/dist/utils/orchestration/index.d.ts +233 -0
- package/dist/utils/orchestration/index.js +19 -0
- package/dist/utils/orchestration/index.js.map +1 -0
- package/dist/utils/process/index.cjs +743 -0
- package/dist/utils/process/index.cjs.map +1 -0
- package/dist/utils/process/index.d.cts +411 -0
- package/dist/utils/process/index.d.ts +411 -0
- package/dist/utils/process/index.js +14 -0
- package/dist/utils/process/index.js.map +1 -0
- package/dist/utils/reactive-layout/index.cjs +1607 -0
- package/dist/utils/reactive-layout/index.cjs.map +1 -0
- package/dist/utils/reactive-layout/index.d.cts +492 -0
- package/dist/utils/reactive-layout/index.d.ts +492 -0
- package/dist/utils/reactive-layout/index.js +52 -0
- package/dist/utils/reactive-layout/index.js.map +1 -0
- package/dist/utils/reduction/index.cjs +203 -0
- package/dist/utils/reduction/index.cjs.map +1 -0
- package/dist/utils/reduction/index.d.cts +102 -0
- package/dist/utils/reduction/index.d.ts +102 -0
- package/dist/utils/reduction/index.js +14 -0
- package/dist/utils/reduction/index.js.map +1 -0
- package/dist/utils/resilience/index.cjs +1617 -0
- package/dist/utils/resilience/index.cjs.map +1 -0
- package/dist/utils/resilience/index.d.cts +9 -0
- package/dist/utils/resilience/index.d.ts +9 -0
- package/dist/utils/resilience/index.js +44 -0
- package/dist/utils/resilience/index.js.map +1 -0
- package/dist/utils/surface/index.cjs +1070 -0
- package/dist/utils/surface/index.cjs.map +1 -0
- package/dist/utils/surface/index.d.cts +240 -0
- package/dist/utils/surface/index.d.ts +240 -0
- package/dist/utils/surface/index.js +30 -0
- package/dist/utils/surface/index.js.map +1 -0
- package/dist/utils/topology-view/index.cjs +620 -0
- package/dist/utils/topology-view/index.cjs.map +1 -0
- package/dist/utils/topology-view/index.d.cts +68 -0
- package/dist/utils/topology-view/index.d.ts +68 -0
- package/dist/utils/topology-view/index.js +11 -0
- package/dist/utils/topology-view/index.js.map +1 -0
- package/package.json +293 -237
- package/dist/core/index.cjs +0 -21
- package/dist/core/index.cjs.map +0 -1
- package/dist/core/index.d.cts +0 -1
- package/dist/core/index.d.ts +0 -1
- package/dist/core/index.js +0 -3
- package/dist/core/index.js.map +0 -1
- package/dist/extra/browser.cjs +0 -21
- package/dist/extra/browser.cjs.map +0 -1
- package/dist/extra/browser.d.cts +0 -1
- package/dist/extra/browser.d.ts +0 -1
- package/dist/extra/browser.js +0 -3
- package/dist/extra/browser.js.map +0 -1
- package/dist/extra/index.cjs +0 -21
- package/dist/extra/index.cjs.map +0 -1
- package/dist/extra/index.d.cts +0 -1
- package/dist/extra/index.d.ts +0 -1
- package/dist/extra/index.js +0 -3
- package/dist/extra/index.js.map +0 -1
- package/dist/extra/node.cjs +0 -21
- package/dist/extra/node.cjs.map +0 -1
- package/dist/extra/node.d.cts +0 -1
- package/dist/extra/node.d.ts +0 -1
- package/dist/extra/node.js +0 -3
- package/dist/extra/node.js.map +0 -1
- package/dist/extra/operators.cjs +0 -21
- package/dist/extra/operators.cjs.map +0 -1
- package/dist/extra/operators.d.cts +0 -1
- package/dist/extra/operators.d.ts +0 -1
- package/dist/extra/operators.js +0 -3
- package/dist/extra/operators.js.map +0 -1
- package/dist/extra/reactive.cjs +0 -21
- package/dist/extra/reactive.cjs.map +0 -1
- package/dist/extra/reactive.d.cts +0 -1
- package/dist/extra/reactive.d.ts +0 -1
- package/dist/extra/reactive.js +0 -3
- package/dist/extra/reactive.js.map +0 -1
- package/dist/extra/render/index.cjs +0 -21
- package/dist/extra/render/index.cjs.map +0 -1
- package/dist/extra/render/index.d.cts +0 -1
- package/dist/extra/render/index.d.ts +0 -1
- package/dist/extra/render/index.js +0 -3
- package/dist/extra/render/index.js.map +0 -1
- package/dist/extra/sources.cjs +0 -21
- package/dist/extra/sources.cjs.map +0 -1
- package/dist/extra/sources.d.cts +0 -1
- package/dist/extra/sources.d.ts +0 -1
- package/dist/extra/sources.js +0 -3
- package/dist/extra/sources.js.map +0 -1
- package/dist/extra/storage-browser.cjs +0 -21
- package/dist/extra/storage-browser.cjs.map +0 -1
- package/dist/extra/storage-browser.d.cts +0 -1
- package/dist/extra/storage-browser.d.ts +0 -1
- package/dist/extra/storage-browser.js +0 -3
- package/dist/extra/storage-browser.js.map +0 -1
- package/dist/extra/storage-core.cjs +0 -21
- package/dist/extra/storage-core.cjs.map +0 -1
- package/dist/extra/storage-core.d.cts +0 -1
- package/dist/extra/storage-core.d.ts +0 -1
- package/dist/extra/storage-core.js +0 -3
- package/dist/extra/storage-core.js.map +0 -1
- package/dist/extra/storage-node.cjs +0 -21
- package/dist/extra/storage-node.cjs.map +0 -1
- package/dist/extra/storage-node.d.cts +0 -1
- package/dist/extra/storage-node.d.ts +0 -1
- package/dist/extra/storage-node.js +0 -3
- package/dist/extra/storage-node.js.map +0 -1
- package/dist/extra/storage-tiers-browser.cjs +0 -21
- package/dist/extra/storage-tiers-browser.cjs.map +0 -1
- package/dist/extra/storage-tiers-browser.d.cts +0 -1
- package/dist/extra/storage-tiers-browser.d.ts +0 -1
- package/dist/extra/storage-tiers-browser.js +0 -3
- package/dist/extra/storage-tiers-browser.js.map +0 -1
- package/dist/extra/storage-tiers-node.cjs +0 -21
- package/dist/extra/storage-tiers-node.cjs.map +0 -1
- package/dist/extra/storage-tiers-node.d.cts +0 -1
- package/dist/extra/storage-tiers-node.d.ts +0 -1
- package/dist/extra/storage-tiers-node.js +0 -3
- package/dist/extra/storage-tiers-node.js.map +0 -1
- package/dist/extra/storage-tiers.cjs +0 -21
- package/dist/extra/storage-tiers.cjs.map +0 -1
- package/dist/extra/storage-tiers.d.cts +0 -1
- package/dist/extra/storage-tiers.d.ts +0 -1
- package/dist/extra/storage-tiers.js +0 -3
- package/dist/extra/storage-tiers.js.map +0 -1
- package/dist/extra/storage-wal.cjs +0 -21
- package/dist/extra/storage-wal.cjs.map +0 -1
- package/dist/extra/storage-wal.d.cts +0 -1
- package/dist/extra/storage-wal.d.ts +0 -1
- package/dist/extra/storage-wal.js +0 -3
- package/dist/extra/storage-wal.js.map +0 -1
- package/dist/graph/index.cjs +0 -21
- package/dist/graph/index.cjs.map +0 -1
- package/dist/graph/index.d.cts +0 -1
- package/dist/graph/index.d.ts +0 -1
- package/dist/graph/index.js +0 -3
- package/dist/graph/index.js.map +0 -1
- package/dist/patterns/ai/browser.cjs +0 -21
- package/dist/patterns/ai/browser.cjs.map +0 -1
- package/dist/patterns/ai/browser.d.cts +0 -1
- package/dist/patterns/ai/browser.d.ts +0 -1
- package/dist/patterns/ai/browser.js +0 -3
- package/dist/patterns/ai/browser.js.map +0 -1
- package/dist/patterns/ai/index.cjs +0 -21
- package/dist/patterns/ai/index.cjs.map +0 -1
- package/dist/patterns/ai/index.d.cts +0 -1
- package/dist/patterns/ai/index.d.ts +0 -1
- package/dist/patterns/ai/index.js +0 -3
- package/dist/patterns/ai/index.js.map +0 -1
- package/dist/patterns/ai/node.cjs +0 -21
- package/dist/patterns/ai/node.cjs.map +0 -1
- package/dist/patterns/ai/node.d.cts +0 -1
- package/dist/patterns/ai/node.d.ts +0 -1
- package/dist/patterns/ai/node.js +0 -3
- package/dist/patterns/ai/node.js.map +0 -1
- package/dist/patterns/cqrs/index.cjs +0 -21
- package/dist/patterns/cqrs/index.cjs.map +0 -1
- package/dist/patterns/cqrs/index.d.cts +0 -1
- package/dist/patterns/cqrs/index.d.ts +0 -1
- package/dist/patterns/cqrs/index.js +0 -3
- package/dist/patterns/cqrs/index.js.map +0 -1
- package/dist/patterns/demo-shell/index.cjs +0 -21
- package/dist/patterns/demo-shell/index.cjs.map +0 -1
- package/dist/patterns/demo-shell/index.d.cts +0 -1
- package/dist/patterns/demo-shell/index.d.ts +0 -1
- package/dist/patterns/demo-shell/index.js +0 -3
- package/dist/patterns/demo-shell/index.js.map +0 -1
- package/dist/patterns/domain-templates/index.cjs +0 -21
- package/dist/patterns/domain-templates/index.cjs.map +0 -1
- package/dist/patterns/domain-templates/index.d.cts +0 -1
- package/dist/patterns/domain-templates/index.d.ts +0 -1
- package/dist/patterns/domain-templates/index.js +0 -3
- package/dist/patterns/domain-templates/index.js.map +0 -1
- package/dist/patterns/graphspec/index.cjs +0 -21
- package/dist/patterns/graphspec/index.cjs.map +0 -1
- package/dist/patterns/graphspec/index.d.cts +0 -1
- package/dist/patterns/graphspec/index.d.ts +0 -1
- package/dist/patterns/graphspec/index.js +0 -3
- package/dist/patterns/graphspec/index.js.map +0 -1
- package/dist/patterns/harness/index.cjs +0 -21
- package/dist/patterns/harness/index.cjs.map +0 -1
- package/dist/patterns/harness/index.d.cts +0 -1
- package/dist/patterns/harness/index.d.ts +0 -1
- package/dist/patterns/harness/index.js +0 -3
- package/dist/patterns/harness/index.js.map +0 -1
- package/dist/patterns/inspect/index.cjs +0 -21
- package/dist/patterns/inspect/index.cjs.map +0 -1
- package/dist/patterns/inspect/index.d.cts +0 -1
- package/dist/patterns/inspect/index.d.ts +0 -1
- package/dist/patterns/inspect/index.js +0 -3
- package/dist/patterns/inspect/index.js.map +0 -1
- package/dist/patterns/job-queue/index.cjs +0 -21
- package/dist/patterns/job-queue/index.cjs.map +0 -1
- package/dist/patterns/job-queue/index.d.cts +0 -1
- package/dist/patterns/job-queue/index.d.ts +0 -1
- package/dist/patterns/job-queue/index.js +0 -3
- package/dist/patterns/job-queue/index.js.map +0 -1
- package/dist/patterns/memory/index.cjs +0 -21
- package/dist/patterns/memory/index.cjs.map +0 -1
- package/dist/patterns/memory/index.d.cts +0 -1
- package/dist/patterns/memory/index.d.ts +0 -1
- package/dist/patterns/memory/index.js +0 -3
- package/dist/patterns/memory/index.js.map +0 -1
- package/dist/patterns/messaging/index.cjs +0 -21
- package/dist/patterns/messaging/index.cjs.map +0 -1
- package/dist/patterns/messaging/index.d.cts +0 -1
- package/dist/patterns/messaging/index.d.ts +0 -1
- package/dist/patterns/messaging/index.js +0 -3
- package/dist/patterns/messaging/index.js.map +0 -1
- package/dist/patterns/orchestration/index.cjs +0 -21
- package/dist/patterns/orchestration/index.cjs.map +0 -1
- package/dist/patterns/orchestration/index.d.cts +0 -1
- package/dist/patterns/orchestration/index.d.ts +0 -1
- package/dist/patterns/orchestration/index.js +0 -3
- package/dist/patterns/orchestration/index.js.map +0 -1
- package/dist/patterns/process/index.cjs +0 -21
- package/dist/patterns/process/index.cjs.map +0 -1
- package/dist/patterns/process/index.d.cts +0 -1
- package/dist/patterns/process/index.d.ts +0 -1
- package/dist/patterns/process/index.js +0 -3
- package/dist/patterns/process/index.js.map +0 -1
- package/dist/patterns/reactive-layout/index.cjs +0 -21
- package/dist/patterns/reactive-layout/index.cjs.map +0 -1
- package/dist/patterns/reactive-layout/index.d.cts +0 -1
- package/dist/patterns/reactive-layout/index.d.ts +0 -1
- package/dist/patterns/reactive-layout/index.js +0 -3
- package/dist/patterns/reactive-layout/index.js.map +0 -1
- package/dist/patterns/reduction/index.cjs +0 -21
- package/dist/patterns/reduction/index.cjs.map +0 -1
- package/dist/patterns/reduction/index.d.cts +0 -1
- package/dist/patterns/reduction/index.d.ts +0 -1
- package/dist/patterns/reduction/index.js +0 -3
- package/dist/patterns/reduction/index.js.map +0 -1
- package/dist/patterns/surface/index.cjs +0 -21
- package/dist/patterns/surface/index.cjs.map +0 -1
- package/dist/patterns/surface/index.d.cts +0 -1
- package/dist/patterns/surface/index.d.ts +0 -1
- package/dist/patterns/surface/index.js +0 -3
- package/dist/patterns/surface/index.js.map +0 -1
- package/dist/patterns/topology-view/index.cjs +0 -21
- package/dist/patterns/topology-view/index.cjs.map +0 -1
- package/dist/patterns/topology-view/index.d.cts +0 -1
- package/dist/patterns/topology-view/index.d.ts +0 -1
- package/dist/patterns/topology-view/index.js +0 -3
- package/dist/patterns/topology-view/index.js.map +0 -1
- package/dist/testing/index.cjs +0 -21
- package/dist/testing/index.cjs.map +0 -1
- package/dist/testing/index.d.cts +0 -1
- package/dist/testing/index.d.ts +0 -1
- package/dist/testing/index.js +0 -3
- package/dist/testing/index.js.map +0 -1
|
@@ -0,0 +1,529 @@
|
|
|
1
|
+
import { Node } from '@graphrefly/pure-ts/core';
|
|
2
|
+
import { Graph, GraphOptions, GraphCheckpointRecord, GraphAttachStorageOptions } from '@graphrefly/pure-ts/graph';
|
|
3
|
+
import { a as ChatMessage, k as ToolDefinition, j as ToolCall } from './types-BB5Lw-pB.cjs';
|
|
4
|
+
import { StorageHandle, SnapshotStorageTier, ReactiveMapBundle, NodeInput } from '@graphrefly/pure-ts/extra';
|
|
5
|
+
import { D as DistillBundle, a as DistillOptions, E as Extraction } from './distill-De6Rnn15.cjs';
|
|
6
|
+
import { VectorSearchResult, CollectionGraph, collection, VectorIndexGraph, KnowledgeGraph } from './utils/memory/index.cjs';
|
|
7
|
+
|
|
8
|
+
type ChatStreamOptions = {
|
|
9
|
+
graph?: GraphOptions;
|
|
10
|
+
maxMessages?: number;
|
|
11
|
+
};
|
|
12
|
+
declare class ChatStreamGraph extends Graph {
|
|
13
|
+
private readonly _log;
|
|
14
|
+
readonly messages: Node<readonly ChatMessage[]>;
|
|
15
|
+
/**
|
|
16
|
+
* Most recently appended message. Stays in the protocol SENTINEL state
|
|
17
|
+
* (`cache === undefined`, no DATA emitted) until the first append, then
|
|
18
|
+
* tracks the latest entry. Per COMPOSITION-GUIDE §1a, the SENTINEL is
|
|
19
|
+
* the canonical "no value yet" signal — consumers detect empty via
|
|
20
|
+
* `data[i] === undefined` inside reactive fns or `latest.cache === undefined`
|
|
21
|
+
* outside. No `T | null` placeholder, no `hasLatest` companion.
|
|
22
|
+
*/
|
|
23
|
+
readonly latest: Node<ChatMessage>;
|
|
24
|
+
readonly messageCount: Node<number>;
|
|
25
|
+
constructor(name: string, opts?: ChatStreamOptions);
|
|
26
|
+
append(role: ChatMessage["role"], content: string, extra?: Partial<ChatMessage>): void;
|
|
27
|
+
appendToolResult(callId: string, content: string): void;
|
|
28
|
+
clear(): void;
|
|
29
|
+
allMessages(): readonly ChatMessage[];
|
|
30
|
+
}
|
|
31
|
+
declare function chatStream(name: string, opts?: ChatStreamOptions): ChatStreamGraph;
|
|
32
|
+
|
|
33
|
+
type ToolRegistryOptions = {
|
|
34
|
+
graph?: GraphOptions;
|
|
35
|
+
};
|
|
36
|
+
/**
|
|
37
|
+
* `ToolRegistryGraph` — name-keyed registry of {@link ToolDefinition}s.
|
|
38
|
+
*
|
|
39
|
+
* **Reactive-only execution.** The only execution path is
|
|
40
|
+
* {@link executeReactive}, which returns a `Node<unknown>` for the handler
|
|
41
|
+
* result. Composing factories (`toolExecution`, `agentLoop`) consume it
|
|
42
|
+
* directly inside `retrySource` / `switchMap` chains. There is intentionally
|
|
43
|
+
* no imperative `execute()` Promise method — the registry was originally a
|
|
44
|
+
* dual-boundary class (imperative + reactive) and the imperative path was
|
|
45
|
+
* the only thing in the codebase bridging through `Promise.resolve().then()`
|
|
46
|
+
* to feed `fromAny`. Removing it left every consumer on a single
|
|
47
|
+
* reactive-all-the-way path with real abort propagation.
|
|
48
|
+
*
|
|
49
|
+
* For non-reactive callers (debug scripts, one-shot tests), bridge with
|
|
50
|
+
* `awaitSettled(toolRegistry.executeReactive(name, args))`.
|
|
51
|
+
*
|
|
52
|
+
* **Wave A Unit 6 refactor:** internal storage migrated from `state<Map>`
|
|
53
|
+
* (O(N) Map-copy per mutation) to `ReactiveMapBundle<string, ToolDefinition>`
|
|
54
|
+
* (O(1) mutations + version counter).
|
|
55
|
+
*/
|
|
56
|
+
declare class ToolRegistryGraph extends Graph {
|
|
57
|
+
readonly definitions: Node<ReadonlyMap<string, ToolDefinition>>;
|
|
58
|
+
readonly schemas: Node<readonly ToolDefinition[]>;
|
|
59
|
+
private readonly _bundle;
|
|
60
|
+
constructor(name: string, opts?: ToolRegistryOptions);
|
|
61
|
+
register(tool: ToolDefinition): void;
|
|
62
|
+
unregister(name: string): void;
|
|
63
|
+
/**
|
|
64
|
+
* Reactive execution — returns a `Node<unknown>` that emits the handler
|
|
65
|
+
* result. The returned node is a `producer` that:
|
|
66
|
+
*
|
|
67
|
+
* 1. Mints a per-call `AbortController` whose `signal` is threaded into
|
|
68
|
+
* the handler call AND into `fromAny` (so a `fromPromise` /
|
|
69
|
+
* `fromAsyncIter` inner abandons cleanly when the consumer
|
|
70
|
+
* unsubscribes).
|
|
71
|
+
* 2. Runs `tool.handler(args, {signal})` inside a try/catch — a
|
|
72
|
+
* synchronous throw surfaces as `[[ERROR, err]]` downstream instead
|
|
73
|
+
* of escaping the producer.
|
|
74
|
+
* 3. Forwards every message from the inner `fromAny` chain to the
|
|
75
|
+
* producer's outputs.
|
|
76
|
+
* 4. On teardown (subscriber count drops to zero, e.g. `switchMap`
|
|
77
|
+
* supersede) calls `ac.abort()` and unsubscribes the inner.
|
|
78
|
+
* Signal-aware handlers (e.g. `fetch(url, {signal})`) actually stop.
|
|
79
|
+
*
|
|
80
|
+
* Each call mints a fresh node tied to a fresh `handler(args, ...)`
|
|
81
|
+
* invocation — call `executeReactive` again for repeated invocations.
|
|
82
|
+
*
|
|
83
|
+
* @throws `Error` synchronously when `name` is not registered (no node is
|
|
84
|
+
* constructed — the caller gets a pre-wiring failure rather than a
|
|
85
|
+
* silent ERROR wave on an empty graph).
|
|
86
|
+
*/
|
|
87
|
+
executeReactive(name: string, args: Record<string, unknown>): Node<unknown>;
|
|
88
|
+
getDefinition(name: string): ToolDefinition | undefined;
|
|
89
|
+
}
|
|
90
|
+
declare function toolRegistry(name: string, opts?: ToolRegistryOptions): ToolRegistryGraph;
|
|
91
|
+
|
|
92
|
+
/**
|
|
93
|
+
* `toolExecution` — reactive per-tool-call executor with retry + rescue.
|
|
94
|
+
*
|
|
95
|
+
* Lifted from the inlined `executeToolReactively` helper inside `agent-loop.ts`
|
|
96
|
+
* so it can be consumed standalone by any caller with a reactive `toolCalls`
|
|
97
|
+
* batch — not just `agentLoop`. The shape is: one input `Node<readonly
|
|
98
|
+
* ToolCall[]>` + a `ToolRegistryGraph` → one output `Node<readonly
|
|
99
|
+
* ToolResult[]>`. Each call maps to a per-call `retrySource(executeReactive)`
|
|
100
|
+
* → optional `rescue` chain that emits the handler result on success, or a
|
|
101
|
+
* JSON-wrapped `{ error }` payload on terminal failure so the LLM can see the
|
|
102
|
+
* error as tool output and decide whether to try again via another tool call.
|
|
103
|
+
*
|
|
104
|
+
* **Cancellation.** `executeReactive` mints a per-call `AbortController` and
|
|
105
|
+
* threads its signal into the handler call. When `switchMap` supersedes the
|
|
106
|
+
* inner (a fresh `toolCalls` batch arrives) or the outer graph tears down,
|
|
107
|
+
* the per-call node unsubscribes and `ac.abort()` fires. Signal-aware
|
|
108
|
+
* handlers (`fetch(url, {signal})`, child-process kill, DB cancel) actually
|
|
109
|
+
* stop in-flight work; handlers that ignore the signal still complete to
|
|
110
|
+
* their original termination, but their result is discarded.
|
|
111
|
+
*
|
|
112
|
+
* @module
|
|
113
|
+
*/
|
|
114
|
+
|
|
115
|
+
/** A single tool execution outcome: `{id, content}` where content is a JSON string. */
|
|
116
|
+
interface ToolResult {
|
|
117
|
+
readonly id: string;
|
|
118
|
+
readonly content: string;
|
|
119
|
+
}
|
|
120
|
+
type ToolExecutionOptions = {
|
|
121
|
+
/**
|
|
122
|
+
* Reactive tool-call batch. Each non-empty emission triggers a fresh
|
|
123
|
+
* per-call execution fan-out; superseding emissions cancel the prior fan.
|
|
124
|
+
*/
|
|
125
|
+
toolCalls: Node<readonly ToolCall[]>;
|
|
126
|
+
/** Registry that resolves tool name → handler. */
|
|
127
|
+
tools: ToolRegistryGraph;
|
|
128
|
+
/**
|
|
129
|
+
* Retry count per individual tool call. `retrySource({count: N})` retries
|
|
130
|
+
* up to N times on error (N retries = N+1 total attempts). Default: 1.
|
|
131
|
+
*/
|
|
132
|
+
retryCount?: number;
|
|
133
|
+
/**
|
|
134
|
+
* How to surface a terminal error after retries are exhausted.
|
|
135
|
+
* - `"rescue"` (default): emit `{id, content: JSON.stringify({error})}`
|
|
136
|
+
* so the LLM sees the failure as structured tool output and can decide
|
|
137
|
+
* how to react. Sibling calls in the same batch continue to their own
|
|
138
|
+
* completion; one call's failure does not affect the others.
|
|
139
|
+
* - `"propagate"`: let the ERROR propagate downstream. **Blast radius:**
|
|
140
|
+
* the per-batch `derived` join auto-errors when any per-call node
|
|
141
|
+
* terminates with ERROR, so one call's failure discards every sibling's
|
|
142
|
+
* DATA (even ones that already settled with a valid ToolResult). Use
|
|
143
|
+
* `"propagate"` only when a single tool failure should be fatal for the
|
|
144
|
+
* whole batch; prefer `"rescue"` when you want the LLM to see partial
|
|
145
|
+
* results plus per-call error markers.
|
|
146
|
+
*/
|
|
147
|
+
onError?: "rescue" | "propagate";
|
|
148
|
+
};
|
|
149
|
+
/**
|
|
150
|
+
* Reactive executor for a batch of LLM tool calls.
|
|
151
|
+
*
|
|
152
|
+
* Each DATA emission on `toolCalls` dispatches a fresh per-call fan-out: for
|
|
153
|
+
* every call in the batch, construct a `retrySource(fromAny(tools.execute(
|
|
154
|
+
* name, args)))` node, optionally `rescue` it into a JSON error shape, and
|
|
155
|
+
* join the results via a `derived` whose first-run gate waits for every call
|
|
156
|
+
* to settle before emitting the batch. Empty batches (`calls.length === 0`)
|
|
157
|
+
* are a caller-side invariant violation (the upstream gate should emit
|
|
158
|
+
* RESOLVED for empty batches, not DATA) and trigger a loud error — callers
|
|
159
|
+
* that want to accept empty batches should upstream-filter them first.
|
|
160
|
+
*
|
|
161
|
+
* Reference-equality + content-equality dedup is applied to the output batch
|
|
162
|
+
* so duplicate re-emissions from a completing retrySource don't propagate.
|
|
163
|
+
*
|
|
164
|
+
* @param opts - `{ toolCalls, tools, retryCount?, onError? }`.
|
|
165
|
+
* @returns `Node<readonly ToolResult[]>` — one ToolResult per input ToolCall.
|
|
166
|
+
*/
|
|
167
|
+
declare function toolExecution(opts: ToolExecutionOptions): Node<readonly ToolResult[]>;
|
|
168
|
+
|
|
169
|
+
type RetrievalQuery = {
|
|
170
|
+
readonly text?: string;
|
|
171
|
+
readonly vector?: readonly number[];
|
|
172
|
+
readonly entityIds?: readonly string[];
|
|
173
|
+
/**
|
|
174
|
+
* Optional hierarchical context breadcrumb — e.g.
|
|
175
|
+
* `["projects", "auth", "tokens"]`. When both the query and a candidate
|
|
176
|
+
* entry supply a `context`, the retrieval pipeline applies a score boost
|
|
177
|
+
* proportional to `contextWeight` for entries whose context overlaps
|
|
178
|
+
* (shared prefix). Entries or queries without `context` are scored
|
|
179
|
+
* flatly (backward-compatible).
|
|
180
|
+
*/
|
|
181
|
+
readonly context?: readonly string[];
|
|
182
|
+
};
|
|
183
|
+
type RetrievalPipelineOptions<TMem> = {
|
|
184
|
+
/** Max candidates from vector search (default 20). */
|
|
185
|
+
topK?: number;
|
|
186
|
+
/** KG expansion depth in hops (default 1). */
|
|
187
|
+
graphDepth?: number;
|
|
188
|
+
/** Token budget for final packing (default 2000). */
|
|
189
|
+
budget?: number;
|
|
190
|
+
/** Cost function for budget packing. */
|
|
191
|
+
cost: (mem: TMem) => number;
|
|
192
|
+
/** Score function for ranking. */
|
|
193
|
+
score: (mem: TMem, context: unknown) => number;
|
|
194
|
+
/**
|
|
195
|
+
* Optional accessor: extracts the hierarchical context breadcrumb from a
|
|
196
|
+
* memory entry. Used with {@link RetrievalQuery.context} and
|
|
197
|
+
* `contextWeight` to boost entries whose context overlaps the query.
|
|
198
|
+
* Entries that don't expose context stay at flat behavior.
|
|
199
|
+
*/
|
|
200
|
+
contextOf?: (mem: TMem) => readonly string[] | undefined;
|
|
201
|
+
/**
|
|
202
|
+
* Boost multiplier applied to a candidate's score when its `context`
|
|
203
|
+
* shares a prefix with the query's `context`. Score is multiplied by
|
|
204
|
+
* `(1 + contextWeight * sharedDepth / queryDepth)`. Default: 0 (no
|
|
205
|
+
* context boost).
|
|
206
|
+
*/
|
|
207
|
+
contextWeight?: number;
|
|
208
|
+
};
|
|
209
|
+
/** A single entry in the retrieval result, with causal trace metadata. */
|
|
210
|
+
type RetrievalEntry<TMem> = {
|
|
211
|
+
readonly key: string;
|
|
212
|
+
readonly value: TMem;
|
|
213
|
+
readonly score: number;
|
|
214
|
+
readonly sources: ReadonlyArray<"vector" | "graph" | "store">;
|
|
215
|
+
/**
|
|
216
|
+
* Hierarchical context breadcrumb for this entry, when
|
|
217
|
+
* `RetrievalPipelineOptions.contextOf` is supplied and returns a value.
|
|
218
|
+
*/
|
|
219
|
+
readonly context?: readonly string[];
|
|
220
|
+
};
|
|
221
|
+
/** Causal trace for a retrieval run. */
|
|
222
|
+
type RetrievalTrace<TMem> = {
|
|
223
|
+
readonly vectorCandidates: ReadonlyArray<VectorSearchResult<TMem>>;
|
|
224
|
+
readonly graphExpanded: ReadonlyArray<string>;
|
|
225
|
+
readonly ranked: ReadonlyArray<RetrievalEntry<TMem>>;
|
|
226
|
+
readonly packed: ReadonlyArray<RetrievalEntry<TMem>>;
|
|
227
|
+
};
|
|
228
|
+
|
|
229
|
+
type MemoryTier = "permanent" | "active" | "archived";
|
|
230
|
+
type MemoryTiersOptions<TMem> = {
|
|
231
|
+
/** Exponential decay rate per second for active tier.
|
|
232
|
+
* Default: 7-day half-life ≈ ln(2)/(7×86400) ≈ 0.00000114. */
|
|
233
|
+
decayRate?: number;
|
|
234
|
+
/** Max entries in the active tier before archiving lowest-scored (default 1000). */
|
|
235
|
+
maxActive?: number;
|
|
236
|
+
/** Score threshold below which active entries get archived (default 0.1). */
|
|
237
|
+
archiveThreshold?: number;
|
|
238
|
+
/** Predicate: true → entry belongs in permanent tier (default: never). */
|
|
239
|
+
permanentFilter?: (key: string, mem: TMem) => boolean;
|
|
240
|
+
/** Storage tier for the archive. Omit to disable archiving. */
|
|
241
|
+
archiveTier?: SnapshotStorageTier<GraphCheckpointRecord>;
|
|
242
|
+
/** Options forwarded to `graph.attachSnapshotStorage` for the archive tier. */
|
|
243
|
+
archiveStorageOptions?: GraphAttachStorageOptions;
|
|
244
|
+
};
|
|
245
|
+
|
|
246
|
+
type MemoryTiersBundle<TMem> = {
|
|
247
|
+
/**
|
|
248
|
+
* Permanent tier: never evicted. Backed by a `collection({ranked:false})`
|
|
249
|
+
* Graph (Tier 2.3 — was previously a `LightCollectionBundle`; the no-Graph
|
|
250
|
+
* bundle shape was folded into the unified `CollectionGraph`).
|
|
251
|
+
*/
|
|
252
|
+
readonly permanent: CollectionGraph<TMem>;
|
|
253
|
+
/** Active entries node (reactive, holds ReadonlyMap). */
|
|
254
|
+
readonly activeEntries: Node<unknown>;
|
|
255
|
+
/** Archive storage handle (null if no tier configured). */
|
|
256
|
+
readonly archiveHandle: StorageHandle | null;
|
|
257
|
+
/** Classify a key into its current tier. */
|
|
258
|
+
tierOf: (key: string) => MemoryTier;
|
|
259
|
+
/** Move a key to the permanent tier. */
|
|
260
|
+
markPermanent: (key: string, value: TMem) => void;
|
|
261
|
+
};
|
|
262
|
+
|
|
263
|
+
interface MemoryWithVectorsOptions<TMem> {
|
|
264
|
+
/** Optional Graph identity — passed through to the underlying `Graph` ctor. */
|
|
265
|
+
graph?: GraphOptions;
|
|
266
|
+
/** Subgraph name. Default: `"memory-vectors"`. */
|
|
267
|
+
name?: string;
|
|
268
|
+
/** The substrate distill store to index. */
|
|
269
|
+
store: DistillBundle<TMem>;
|
|
270
|
+
/** Embedding dimension. Must match the `embedFn` output length. */
|
|
271
|
+
dimension: number;
|
|
272
|
+
/** Extract an embedding vector for a memory entry. */
|
|
273
|
+
embedFn: (mem: TMem) => readonly number[] | undefined;
|
|
274
|
+
}
|
|
275
|
+
/**
|
|
276
|
+
* Graph subclass that attaches a vector index to a `DistillBundle`. The inner
|
|
277
|
+
* `VectorIndexGraph` is mounted at `"vectorIndex"`; an internal effect
|
|
278
|
+
* subscribes to the substrate store and re-indexes on every change.
|
|
279
|
+
*
|
|
280
|
+
* Mirrors `AuditTrailGraph` / `PolicyGateGraph` shape — fully self-contained,
|
|
281
|
+
* teardown via the Graph's `destroy()` cascade.
|
|
282
|
+
*/
|
|
283
|
+
declare class MemoryWithVectorsGraph<TMem> extends Graph {
|
|
284
|
+
readonly vectors: VectorIndexGraph<TMem>;
|
|
285
|
+
constructor(opts: MemoryWithVectorsOptions<TMem>);
|
|
286
|
+
}
|
|
287
|
+
/**
|
|
288
|
+
* Attach a vector index to a `DistillBundle`. Indexes every entry in the
|
|
289
|
+
* store as it changes. Returns the `MemoryWithVectorsGraph` whose `vectors`
|
|
290
|
+
* field exposes the underlying `VectorIndexGraph`.
|
|
291
|
+
*
|
|
292
|
+
* Teardown is handled by `Graph.destroy()` — typically inherited via
|
|
293
|
+
* mounting the result on a parent graph (see `agentMemory`).
|
|
294
|
+
*/
|
|
295
|
+
declare function memoryWithVectors<TMem>(opts: MemoryWithVectorsOptions<TMem>): MemoryWithVectorsGraph<TMem>;
|
|
296
|
+
interface MemoryWithKGOptions<TMem> {
|
|
297
|
+
/** Optional Graph identity. */
|
|
298
|
+
graph?: GraphOptions;
|
|
299
|
+
/** Subgraph name. Default: `"memory-kg"`. */
|
|
300
|
+
name?: string;
|
|
301
|
+
/** The substrate distill store to index. */
|
|
302
|
+
store: DistillBundle<TMem>;
|
|
303
|
+
/** Inner KnowledgeGraph name. Default: `${name}-kg`. */
|
|
304
|
+
kgName?: string;
|
|
305
|
+
/**
|
|
306
|
+
* Mount path within this Graph for the KnowledgeGraph. Default:
|
|
307
|
+
* `"knowledge-kg"` (B5c — symmetric with the outer `knowledge` mount so
|
|
308
|
+
* describe paths render `knowledge::knowledge-kg::*`).
|
|
309
|
+
*/
|
|
310
|
+
mountPath?: string;
|
|
311
|
+
/**
|
|
312
|
+
* Extract entities + relations for a memory entry. Omit to mount an empty
|
|
313
|
+
* KG without an indexer effect — caller upserts entities / relations
|
|
314
|
+
* directly on the `kg` field.
|
|
315
|
+
*/
|
|
316
|
+
entityFn?: (key: string, mem: TMem) => {
|
|
317
|
+
entities?: Array<{
|
|
318
|
+
id: string;
|
|
319
|
+
value: unknown;
|
|
320
|
+
}>;
|
|
321
|
+
relations?: Array<{
|
|
322
|
+
from: string;
|
|
323
|
+
to: string;
|
|
324
|
+
relation: string;
|
|
325
|
+
weight?: number;
|
|
326
|
+
}>;
|
|
327
|
+
} | undefined;
|
|
328
|
+
}
|
|
329
|
+
/**
|
|
330
|
+
* Graph subclass that attaches a knowledge graph alongside a `DistillBundle`.
|
|
331
|
+
* Mounts the inner `KnowledgeGraph` at `mountPath` (default `"knowledge-kg"`); when
|
|
332
|
+
* `entityFn` is provided, an indexer effect populates entities/relations on
|
|
333
|
+
* every store change.
|
|
334
|
+
*/
|
|
335
|
+
declare class MemoryWithKGGraph<TMem> extends Graph {
|
|
336
|
+
readonly kg: KnowledgeGraph<unknown, string>;
|
|
337
|
+
constructor(opts: MemoryWithKGOptions<TMem>);
|
|
338
|
+
}
|
|
339
|
+
/**
|
|
340
|
+
* Attach a knowledge graph alongside a `DistillBundle`. Returns the
|
|
341
|
+
* `MemoryWithKGGraph` whose `kg` field exposes the inner `KnowledgeGraph`.
|
|
342
|
+
*/
|
|
343
|
+
declare function memoryWithKG<TMem>(opts: MemoryWithKGOptions<TMem>): MemoryWithKGGraph<TMem>;
|
|
344
|
+
/**
|
|
345
|
+
* Full options for {@link memoryWithTiers} (Tier 4.1 B + 4.3 B refactor,
|
|
346
|
+
* 2026-04-29). Combines tier-policy options with the distill-side options
|
|
347
|
+
* needed to construct the underlying store — `memoryWithTiers` is the
|
|
348
|
+
* **construction site** for the distill bundle so it can wire
|
|
349
|
+
* `reactiveMap.retention` into the store at construction (eliminating the
|
|
350
|
+
* §7 feedback cycle the previous `tierClassifier` effect carried).
|
|
351
|
+
*/
|
|
352
|
+
type MemoryWithTiersOptions<TRaw, TMem> = MemoryTiersOptions<TMem> & Omit<DistillOptions<TMem>, "mapOptions" | "score" | "context"> & {
|
|
353
|
+
/** Optional Graph identity. */
|
|
354
|
+
graph?: GraphOptions;
|
|
355
|
+
/** Subgraph name. Default: `"memory-tiers"`. */
|
|
356
|
+
name?: string;
|
|
357
|
+
/** Raw source feeding distill. */
|
|
358
|
+
source: NodeInput<TRaw>;
|
|
359
|
+
/** Reactive extraction wiring (same shape as `distill`). */
|
|
360
|
+
extractFn: (raw: Node<TRaw>, existing: Node<ReadonlyMap<string, TMem>>) => NodeInput<Extraction<TMem>>;
|
|
361
|
+
/** Score function — same signature as `agentMemory.score`. */
|
|
362
|
+
score: (mem: TMem, context: unknown) => number;
|
|
363
|
+
/** Optional reactive context node (passed to `score`). */
|
|
364
|
+
context?: NodeInput<unknown>;
|
|
365
|
+
};
|
|
366
|
+
/**
|
|
367
|
+
* Graph subclass attaching 3-tier storage (active / archived / permanent) to
|
|
368
|
+
* a fresh distill store, wiring `reactiveMap.retention` at construction so
|
|
369
|
+
* archival happens synchronously inside the substrate's mutation pipeline
|
|
370
|
+
* (no §7 feedback cycle). Promotes `permanentKeys` and `entryCreatedAtNs` to
|
|
371
|
+
* reactive maps registered on this graph (Tier 4.3 B — Unit 7 Q3) so
|
|
372
|
+
* `describe()` / `explain()` can walk to "why was X archived?".
|
|
373
|
+
*
|
|
374
|
+
* Public-face fields:
|
|
375
|
+
* - `store` — the distill bundle (construction site, exposed for downstream
|
|
376
|
+
* composers).
|
|
377
|
+
* - `tiers` — tier classification + permanent promotion handles.
|
|
378
|
+
* - `compact`, `size` — alias for `store.compact` / `store.size` (registered
|
|
379
|
+
* under their canonical names so `describe()` keys match `agentMemory`'s
|
|
380
|
+
* pre-migration layout).
|
|
381
|
+
*/
|
|
382
|
+
declare class MemoryWithTiersGraph<TRaw, TMem> extends Graph {
|
|
383
|
+
readonly store: DistillBundle<TMem>;
|
|
384
|
+
readonly tiers: MemoryTiersBundle<TMem>;
|
|
385
|
+
readonly compact: Node<Array<{
|
|
386
|
+
key: string;
|
|
387
|
+
value: TMem;
|
|
388
|
+
score: number;
|
|
389
|
+
}>>;
|
|
390
|
+
readonly size: Node<number>;
|
|
391
|
+
readonly permanent: ReturnType<typeof collection<TMem>>;
|
|
392
|
+
readonly permanentKeys: ReactiveMapBundle<string, true>;
|
|
393
|
+
readonly entryCreatedAtNs: ReactiveMapBundle<string, number>;
|
|
394
|
+
constructor(opts: MemoryWithTiersOptions<TRaw, TMem>);
|
|
395
|
+
}
|
|
396
|
+
/**
|
|
397
|
+
* Attach 3-tier storage (active / archived / permanent) over a fresh distill
|
|
398
|
+
* store. Returns a `MemoryWithTiersGraph` whose `store` and `tiers` fields
|
|
399
|
+
* mirror the previous bundle shape.
|
|
400
|
+
*
|
|
401
|
+
* **API shape** (Class B audit, 2026-04-30 — breaking change vs.
|
|
402
|
+
* pre-migration): the factory takes a single opts bag including `source`
|
|
403
|
+
* and `extractFn`. The bundle is exposed as `result.store` for downstream
|
|
404
|
+
* composers (vectors / KG / retrieval).
|
|
405
|
+
*
|
|
406
|
+
* - `permanentFilter`-matching entries score `Infinity` in retention →
|
|
407
|
+
* never archived. Independent permanent-promotion effect upserts them
|
|
408
|
+
* into the `permanent` collection.
|
|
409
|
+
* - Below-threshold entries → retention archives synchronously.
|
|
410
|
+
* - Over-`maxActive` entries → retention's `maxSize` evicts lowest-scored.
|
|
411
|
+
*/
|
|
412
|
+
declare function memoryWithTiers<TRaw, TMem>(opts: MemoryWithTiersOptions<TRaw, TMem>): MemoryWithTiersGraph<TRaw, TMem>;
|
|
413
|
+
interface MemoryRetrievalOptions<TMem> {
|
|
414
|
+
/** Optional Graph identity. */
|
|
415
|
+
graph?: GraphOptions;
|
|
416
|
+
/** Subgraph name. Default: `"memory-retrieval"`. */
|
|
417
|
+
name?: string;
|
|
418
|
+
/** The substrate distill store. */
|
|
419
|
+
store: DistillBundle<TMem>;
|
|
420
|
+
/** Optional vector index for similarity search. */
|
|
421
|
+
vectors?: VectorIndexGraph<TMem> | null;
|
|
422
|
+
/** Optional knowledge graph for entity-relation expansion. */
|
|
423
|
+
kg?: KnowledgeGraph<unknown, string> | null;
|
|
424
|
+
/** Score function (same shape as `agentMemory.score`). */
|
|
425
|
+
score: (mem: TMem, context: unknown) => number;
|
|
426
|
+
/** Cost function for budget packing. */
|
|
427
|
+
cost: (mem: TMem) => number;
|
|
428
|
+
/** Token / cost budget. Default 2000. */
|
|
429
|
+
budget?: number;
|
|
430
|
+
/** Top-K vector candidates. Default 20. */
|
|
431
|
+
topK?: number;
|
|
432
|
+
/** KG expansion depth in hops. Default 1. */
|
|
433
|
+
graphDepth?: number;
|
|
434
|
+
/** Hierarchical-context boost weight. Default 0. */
|
|
435
|
+
contextWeight?: number;
|
|
436
|
+
/** Hierarchical-context accessor for entries. */
|
|
437
|
+
contextOf?: (mem: TMem) => readonly string[] | undefined;
|
|
438
|
+
/** Optional reactive context node (passed to `score`). */
|
|
439
|
+
context?: NodeInput<unknown>;
|
|
440
|
+
}
|
|
441
|
+
/**
|
|
442
|
+
* Graph subclass that builds the retrieval pipeline (vector + KG + budget
|
|
443
|
+
* packing) over a `DistillBundle` and optional vectors / kg substrates.
|
|
444
|
+
*
|
|
445
|
+
* **C1 rework (2026-04-30):** retrieval is reactive-only. Each
|
|
446
|
+
* `retrieveReactive(input)` call constructs its own per-input subgraph
|
|
447
|
+
* mounted at `retrieve_${id}` with named nodes `context`, `result`, and
|
|
448
|
+
* `projection`. Subgraphs register their own scoped disposers so teardown
|
|
449
|
+
* is local to the per-call mount.
|
|
450
|
+
*
|
|
451
|
+
* **QA F-9 (2026-04-30):** the shared `retrieval` / `retrievalTrace`
|
|
452
|
+
* state-node mirrors are dropped — they were last-writer-wins under
|
|
453
|
+
* concurrent `retrieveReactive(...)` calls. Consumers must subscribe to
|
|
454
|
+
* the per-call `projection` node directly. One-shot consumers use
|
|
455
|
+
* `awaitSettled(retrieveReactive(input))`.
|
|
456
|
+
*
|
|
457
|
+
* **QA F-6 (2026-04-30):** the per-call `result` derived declares
|
|
458
|
+
* `vectors.entries` / `kg.adjacencyOut` / `kg.adjacencyIn` as deps when
|
|
459
|
+
* configured, so a vector upsert / KG mutation re-runs retrieval even
|
|
460
|
+
* when the query / context / store-snapshot are unchanged. Resolves the
|
|
461
|
+
* §28 closure-mirror gap where these `.cache` reads were undeclared.
|
|
462
|
+
*/
|
|
463
|
+
declare class MemoryRetrievalGraph<TMem> extends Graph {
|
|
464
|
+
private readonly _store;
|
|
465
|
+
private readonly _vectors;
|
|
466
|
+
private readonly _kg;
|
|
467
|
+
private readonly _opts;
|
|
468
|
+
private readonly _contextNode;
|
|
469
|
+
private readonly _topK;
|
|
470
|
+
private readonly _graphDepth;
|
|
471
|
+
private readonly _budget;
|
|
472
|
+
private readonly _contextWeight;
|
|
473
|
+
private _retrieveSeq;
|
|
474
|
+
constructor(opts: MemoryRetrievalOptions<TMem>);
|
|
475
|
+
private _runRetrieval;
|
|
476
|
+
/**
|
|
477
|
+
* Reactive consumer API — chain into the graph.
|
|
478
|
+
*
|
|
479
|
+
* Each call constructs its own per-input subgraph mounted at
|
|
480
|
+
* `retrieve_${id}` (auto-incrementing within this MemoryRetrievalGraph
|
|
481
|
+
* instance) with named nodes:
|
|
482
|
+
*
|
|
483
|
+
* - `context` — `fromAny(queryInput)` projection (so the input node is
|
|
484
|
+
* visible to `describe()` even when callers pass a raw value).
|
|
485
|
+
* - `result` — pure derived `{ packed, trace }`.
|
|
486
|
+
* - `projection` — the packed-array node returned to the caller.
|
|
487
|
+
*
|
|
488
|
+
* `result` declares the substrate's `store.entries`, the optional
|
|
489
|
+
* `context` Node, the local `context` projection, and (when configured)
|
|
490
|
+
* `vectors.entries` / `kg.adjacencyOut` / `kg.adjacencyIn` as deps —
|
|
491
|
+
* so vector upserts and KG mutations re-trigger retrieval even when
|
|
492
|
+
* the input is unchanged.
|
|
493
|
+
*
|
|
494
|
+
* **Lifecycle contract (DS-13.5.C, 2026-05-01).** The per-call subgraph
|
|
495
|
+
* stays mounted while the returned `projection` has at least one
|
|
496
|
+
* subscriber. When the last subscriber unsubscribes, projection's
|
|
497
|
+
* `deactivate` cleanup hook fires (canonical "last unsubscribe" signal
|
|
498
|
+
* via the existing `NodeFnCleanup.onDeactivation` protocol), which calls
|
|
499
|
+
* `parent.remove(retrieve_${id})` and tears the per-call topology
|
|
500
|
+
* down via TEARDOWN cascade (post-DS-13.5.A Q16, COMPLETE auto-precedes).
|
|
501
|
+
*
|
|
502
|
+
* **Single-shot lifecycle.** This auto-unmount is keyed to the FIRST
|
|
503
|
+
* last-unsubscribe event — projection is non-resubscribable from the
|
|
504
|
+
* caller's perspective. Callers who need to subscribe / unsubscribe /
|
|
505
|
+
* re-subscribe should hold a long-lived subscription externally (e.g.
|
|
506
|
+
* `keepalive(projection)`) or call `retrieveReactive(...)` again to
|
|
507
|
+
* mount a fresh per-call subgraph.
|
|
508
|
+
*
|
|
509
|
+
* **Caller obligation.** Either subscribe to `projection` (and
|
|
510
|
+
* eventually unsubscribe to trigger cleanup) OR drop the returned
|
|
511
|
+
* reference without subscribing — in the no-subscribe case the
|
|
512
|
+
* subgraph is dormant (no compute fires) and a parent `destroy()`
|
|
513
|
+
* cascade reclaims it. Holding `projection` without subscribing AND
|
|
514
|
+
* without ever destroying the parent is the leak case the JSDoc above
|
|
515
|
+
* the C1 rework covers.
|
|
516
|
+
*
|
|
517
|
+
* One-shot callers use `awaitSettled(retrieveReactive(input))`.
|
|
518
|
+
*/
|
|
519
|
+
retrieveReactive(queryInput: NodeInput<RetrievalQuery | null>): Node<ReadonlyArray<RetrievalEntry<TMem>>>;
|
|
520
|
+
}
|
|
521
|
+
/**
|
|
522
|
+
* Build the retrieval pipeline (vector + KG + budget packing) over a
|
|
523
|
+
* `DistillBundle` and optional `vectors` / `kg` substrates. Returns a
|
|
524
|
+
* `MemoryRetrievalGraph` exposing `retrieval` / `retrievalTrace` reactive
|
|
525
|
+
* state and the `retrieveReactive(input)` consumer method.
|
|
526
|
+
*/
|
|
527
|
+
declare function memoryRetrieval<TMem>(opts: MemoryRetrievalOptions<TMem>): MemoryRetrievalGraph<TMem>;
|
|
528
|
+
|
|
529
|
+
export { ChatStreamGraph as C, MemoryRetrievalGraph as M, type RetrievalEntry as R, type ToolExecutionOptions as T, type ChatStreamOptions as a, type MemoryRetrievalOptions as b, type MemoryTier as c, type MemoryTiersBundle as d, type MemoryTiersOptions as e, MemoryWithKGGraph as f, type MemoryWithKGOptions as g, MemoryWithTiersGraph as h, type MemoryWithTiersOptions as i, MemoryWithVectorsGraph as j, type MemoryWithVectorsOptions as k, type RetrievalPipelineOptions as l, type RetrievalQuery as m, type RetrievalTrace as n, ToolRegistryGraph as o, type ToolRegistryOptions as p, type ToolResult as q, chatStream as r, memoryRetrieval as s, memoryWithKG as t, memoryWithTiers as u, memoryWithVectors as v, toolExecution as w, toolRegistry as x };
|