@graphrefly/graphrefly 0.28.0 → 0.30.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-D9WG1-9L.d.ts → cascading-BszPheHD.d.ts} +1 -1
- package/dist/{cascading-B-5zmAUv.d.cts → cascading-dNCtjW8j.d.cts} +1 -1
- package/dist/{chunk-OAWLCNJJ.js → chunk-2GQREQ6C.js} +1 -1
- package/dist/{chunk-DBGGMN3D.js → chunk-33FA6V4B.js} +1 -1
- package/dist/chunk-3NEPQO2E.js +43 -0
- package/dist/{chunk-UWJE5FQA.js → chunk-4C2OR2GH.js} +11 -11
- package/dist/chunk-4JJCCD5S.js +2 -0
- package/dist/{chunk-GHJJR5P4.js → chunk-4OFIQ66T.js} +1 -1
- package/dist/{chunk-PIOGHC63.js → chunk-567NWZ3T.js} +1 -1
- package/dist/chunk-5JDE5JHE.js +1 -0
- package/dist/{chunk-ETWTCCJI.js → chunk-5Z4HDCO6.js} +1 -1
- package/dist/{chunk-Y2EMPB3I.js → chunk-73Z3W2RN.js} +1 -1
- package/dist/{chunk-CRXTH3SH.js → chunk-7JDLFI6N.js} +1 -1
- package/dist/{chunk-DQA3UIQ2.js → chunk-7TDOES3L.js} +1 -1
- package/dist/{chunk-LBTDSCCO.js → chunk-AMBYCIOH.js} +1 -1
- package/dist/{chunk-D7A7DBE4.js → chunk-AUY2YKCO.js} +1 -1
- package/dist/{chunk-FNYWM6JC.js → chunk-AV3PIDFQ.js} +1 -1
- package/dist/{chunk-UMBIDLJ4.js → chunk-BA5URFYW.js} +1 -1
- package/dist/chunk-BKPLTBL5.js +1 -0
- package/dist/{chunk-UPXUCFMX.js → chunk-BZP5T4X6.js} +1 -1
- package/dist/{chunk-WQ2BN6X6.js → chunk-DDPYNMGG.js} +1 -1
- package/dist/{chunk-LQ3Y5NJS.js → chunk-GJR3P6JG.js} +1 -1
- package/dist/{chunk-3R5HFPX7.js → chunk-GLSM33ZM.js} +1 -1
- package/dist/{chunk-2FOAM3OR.js → chunk-GNCBXARM.js} +1 -1
- package/dist/{chunk-K2GNMCQT.js → chunk-ISCENNXS.js} +1 -1
- package/dist/{chunk-UPHHLMHE.js → chunk-IUK4EFCE.js} +1 -1
- package/dist/{chunk-ERLIRFPA.js → chunk-KA6MMXIY.js} +1 -1
- package/dist/{chunk-2PMCKKRK.js → chunk-KASHOCF5.js} +1 -1
- package/dist/chunk-LI3E75VE.js +64 -0
- package/dist/chunk-MGKAO4EK.js +7 -0
- package/dist/{chunk-ZV2DXV5A.js → chunk-NSG4C6BF.js} +1 -1
- package/dist/{chunk-4GKB4OUJ.js → chunk-OL33ZI6R.js} +1 -1
- package/dist/{chunk-76A3HVQE.js → chunk-P7JXGKDO.js} +1 -1
- package/dist/{chunk-U3AICJKU.js → chunk-RD52SNH2.js} +1 -1
- package/dist/{chunk-CWLN3X3N.js → chunk-SHYH5SXV.js} +1 -1
- package/dist/{chunk-VTPVOGHH.js → chunk-SLMYTGTU.js} +1 -1
- package/dist/{chunk-OYHGKYQM.js → chunk-T5SHIKJD.js} +1 -1
- package/dist/{chunk-VPYBOXVT.js → chunk-TWMEGG45.js} +1 -1
- package/dist/chunk-VIEUJSTT.js +1 -0
- package/dist/{chunk-SC3U7ETD.js → chunk-VWPRPPKR.js} +1 -1
- package/dist/chunk-W4TSQ6RJ.js +1 -0
- package/dist/{chunk-OBKQQA5I.js → chunk-WANIEEKV.js} +1 -1
- package/dist/{chunk-XAUNPIMX.js → chunk-XHVB6G6M.js} +1 -1
- package/dist/{chunk-MIQTDPY4.js → chunk-XQAXYVXX.js} +1 -1
- package/dist/{chunk-MTTAAPCK.js → chunk-Y32RJO24.js} +1 -1
- package/dist/{chunk-S35VARIR.js → chunk-Y36UZ5VS.js} +1 -1
- package/dist/compat/index.cjs +13 -12
- package/dist/compat/index.d.cts +14 -14
- package/dist/compat/index.d.ts +14 -14
- 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 +13 -12
- package/dist/compat/nestjs/index.d.cts +6 -6
- package/dist/compat/nestjs/index.d.ts +6 -6
- 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 +7 -6
- 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/{composite-BhbKHbOS.d.ts → composite-DGspwCqk.d.ts} +2 -2
- package/dist/{composite-B-xqw4Kk.d.cts → composite-nrRumJ7l.d.cts} +2 -2
- package/dist/core/index.cjs +1 -1
- package/dist/core/index.d.cts +4 -4
- package/dist/core/index.d.ts +4 -4
- package/dist/core/index.js +1 -1
- 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 +20 -19
- package/dist/extra/index.d.cts +9 -9
- package/dist/extra/index.d.ts +9 -9
- package/dist/extra/index.js +1 -1
- package/dist/extra/node.cjs +3 -3
- 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 +1 -1
- package/dist/extra/operators.d.ts +1 -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/sources.cjs +1 -1
- 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/graph/index.cjs +7 -6
- 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-D48Qw9Cg.d.cts → graph-C4Uxwv0T.d.cts} +22 -6
- package/dist/{graph-BZGRXwOm.d.ts → graph-CWeI0aHd.d.ts} +22 -6
- package/dist/{index-u15meRxL.d.cts → index-9iguV3bF.d.cts} +2 -2
- package/dist/{index-DyxjtScX.d.cts → index-B-z8WaSd.d.cts} +2 -2
- package/dist/{index-BgyGlizc.d.ts → index-B2HBxvMb.d.ts} +4 -4
- package/dist/{index-CzobVSMr.d.ts → index-B5iVOD7w.d.ts} +2 -2
- package/dist/{index-rX8HBM5h.d.cts → index-B8Aj_z8S.d.cts} +2 -2
- package/dist/{index-D-YB-Vl3.d.ts → index-BANwzwBV.d.ts} +3 -3
- package/dist/{index-HDpJe9hX.d.ts → index-BBINVimG.d.ts} +3 -3
- package/dist/{index-8FSVk4Uf.d.ts → index-BEpRsvhg.d.ts} +4 -4
- package/dist/{index-CHEswufn.d.cts → index-BHu_Wba0.d.cts} +4 -4
- package/dist/{index-ZftwfxJM.d.ts → index-BJHQUCZx.d.ts} +7 -7
- package/dist/{index-DUqMOlKZ.d.cts → index-BS220yqj.d.cts} +7 -7
- package/dist/{index-BWJV63ti.d.ts → index-BX22kvjh.d.ts} +1 -1
- package/dist/{index-DfyOkTvs.d.ts → index-BXbQUn4n.d.ts} +2 -2
- package/dist/{index-O6TgGUBV.d.cts → index-BpFWP7Bq.d.cts} +3 -3
- package/dist/{index-BxJ86YZZ.d.cts → index-Bs3-LC83.d.cts} +3 -3
- package/dist/{index-DiOXyAwt.d.ts → index-Bvi5uJxX.d.ts} +1 -1
- package/dist/{index-Bqachn9_.d.ts → index-ByPnK85n.d.ts} +1 -1
- package/dist/{index-CRO83MmV.d.cts → index-BydMDMf7.d.cts} +1 -1
- package/dist/{index-ROpQmGjE.d.ts → index-C5Ghnp5B.d.ts} +3 -3
- package/dist/{index-umtoWT8K.d.ts → index-C6NBfXj-.d.ts} +6 -5
- package/dist/{index-pXrDMpRO.d.cts → index-C98oJsEs.d.cts} +2 -2
- package/dist/{index-B2pwesl9.d.cts → index-CDK5RsV5.d.cts} +1 -1
- package/dist/{index-Czq6ynh8.d.ts → index-CFW32Dy1.d.ts} +3 -3
- package/dist/{index-Cyojz0AE.d.cts → index-CIXaiYDE.d.cts} +1 -1
- package/dist/{index-Oi8d8w4R.d.cts → index-CRAkoq-y.d.cts} +1 -1
- package/dist/{index-CpgYhnrG.d.ts → index-Cc8VQIgL.d.ts} +2 -2
- package/dist/{index-vscRDkjW.d.cts → index-CcpEvuPl.d.cts} +2 -2
- package/dist/{index-BpA5c4G9.d.ts → index-CfFYyLR8.d.ts} +4 -4
- package/dist/{index-9oDeHH2u.d.cts → index-ClB7TCfL.d.cts} +2 -2
- package/dist/{index-BHvIquRZ.d.ts → index-ClgKmOHe.d.ts} +592 -492
- package/dist/{index-DpHe5e0Q.d.ts → index-CotRMjtJ.d.ts} +2 -2
- package/dist/{index-B1AmmSlb.d.ts → index-CrC7urhX.d.ts} +1 -1
- package/dist/{index-B0c4cmIO.d.ts → index-CvS9IuTG.d.ts} +2 -2
- package/dist/{index-rHJSKsU8.d.cts → index-Cy7eFeIX.d.cts} +2 -2
- package/dist/{index-BVHOrDwO.d.ts → index-D0C_USMR.d.ts} +1 -1
- package/dist/{index-DEwTb_fm.d.cts → index-D6ajK8Mh.d.cts} +592 -492
- package/dist/{index-DL-rYJrx.d.cts → index-D7XxY1Ff.d.cts} +1 -1
- package/dist/{index-DAlweici.d.ts → index-D9HrBx2J.d.ts} +2 -2
- package/dist/{index-fM6y00vT.d.cts → index-D9Y_u6BG.d.cts} +3 -3
- package/dist/{index-DcXZBF5a.d.cts → index-DBQUKh59.d.cts} +4 -4
- package/dist/{index-D_NwnRYS.d.cts → index-DDo-eqQ4.d.cts} +1 -1
- package/dist/{index-m-yHof5p.d.ts → index-DGb1awva.d.ts} +4 -4
- package/dist/{index-DxsnAMWD.d.cts → index-DR3gf_DG.d.cts} +9 -9
- package/dist/{index-dtN7YA2x.d.cts → index-DVNLe3pS.d.cts} +3 -3
- package/dist/{index-Btib9rsU.d.ts → index-Dljd76bC.d.ts} +275 -9
- package/dist/{index-DP4ZTkdw.d.ts → index-DnrZghBB.d.ts} +3 -3
- package/dist/{index-DaLJvH8Z.d.ts → index-Docdiu9a.d.ts} +3 -3
- package/dist/{index-BpIFjILY.d.cts → index-DylQCKEL.d.cts} +4 -4
- package/dist/{index-B_agccPe.d.cts → index-FBqTfL_S.d.cts} +1 -1
- package/dist/{index-DraikLjn.d.ts → index-FrYrV-Vf.d.ts} +2 -2
- package/dist/{index-sm373fsH.d.ts → index-IZ3l_vQ9.d.ts} +2 -2
- package/dist/{index-BwM9BEkt.d.ts → index-Ip3q9T9x.d.ts} +1 -1
- package/dist/{index-CloUk1kY.d.ts → index-RQg6lTrN.d.ts} +9 -9
- package/dist/{index-CEXXwWVH.d.cts → index-SSGqF8mI.d.cts} +2 -2
- package/dist/{index-rnwQly8X.d.cts → index-UZO988ox.d.cts} +6 -5
- package/dist/{index-C73n7lo-.d.cts → index-iBp74eGU.d.cts} +3 -3
- package/dist/{index-tbf2gKHd.d.cts → index-lKuLYmHO.d.cts} +3 -3
- package/dist/{index-CMn8S8Hw.d.ts → index-wIx1Jisk.d.ts} +1 -1
- package/dist/{index-cByzxQIC.d.cts → index-yIdWFo2b.d.cts} +4 -4
- package/dist/{index-RukJ4DLS.d.cts → index-ybtSyjWB.d.cts} +275 -9
- package/dist/index.cjs +53 -52
- package/dist/index.d.cts +42 -42
- package/dist/index.d.ts +42 -42
- package/dist/index.js +1 -1
- package/dist/{meta-CwesDrMD.d.ts → meta-BMwx3ExI.d.ts} +1 -1
- package/dist/{meta-Cgj6zeji.d.cts → meta-COtmHLwT.d.cts} +1 -1
- package/dist/{node-Cc1TniY8.d.ts → node-BVV7G1bq.d.cts} +59 -2
- package/dist/{node-Cc1TniY8.d.cts → node-BVV7G1bq.d.ts} +59 -2
- package/dist/{observable-glXQoGj2.d.cts → observable-BrUAPeH_.d.cts} +1 -1
- package/dist/{observable-Ct-gJ9jI.d.ts → observable-ITikPXz3.d.ts} +1 -1
- package/dist/patterns/ai/browser.d.cts +3 -3
- package/dist/patterns/ai/browser.d.ts +3 -3
- package/dist/patterns/ai/browser.js +1 -1
- package/dist/patterns/ai/index.cjs +25 -24
- package/dist/patterns/ai/index.d.cts +15 -15
- package/dist/patterns/ai/index.d.ts +15 -15
- package/dist/patterns/ai/index.js +1 -1
- package/dist/patterns/ai/node.d.cts +1 -1
- package/dist/patterns/ai/node.d.ts +1 -1
- package/dist/patterns/ai/node.js +1 -1
- package/dist/patterns/audit/index.cjs +7 -6
- package/dist/patterns/audit/index.d.cts +5 -5
- package/dist/patterns/audit/index.d.ts +5 -5
- package/dist/patterns/audit/index.js +1 -1
- package/dist/patterns/cqrs/index.cjs +7 -6
- package/dist/patterns/cqrs/index.d.cts +4 -4
- package/dist/patterns/cqrs/index.d.ts +4 -4
- package/dist/patterns/cqrs/index.js +1 -1
- package/dist/patterns/demo-shell/index.cjs +8 -7
- 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 +7 -6
- 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 +26 -25
- package/dist/patterns/graphspec/index.d.cts +4 -4
- package/dist/patterns/graphspec/index.d.ts +4 -4
- package/dist/patterns/graphspec/index.js +1 -1
- package/dist/patterns/guarded-execution/index.cjs +7 -6
- package/dist/patterns/guarded-execution/index.d.cts +6 -6
- package/dist/patterns/guarded-execution/index.d.ts +6 -6
- package/dist/patterns/guarded-execution/index.js +1 -1
- package/dist/patterns/harness/index.cjs +11 -10
- package/dist/patterns/harness/index.d.cts +10 -7
- package/dist/patterns/harness/index.d.ts +10 -7
- package/dist/patterns/harness/index.js +1 -1
- package/dist/patterns/job-queue/index.cjs +7 -6
- package/dist/patterns/job-queue/index.d.cts +4 -4
- package/dist/patterns/job-queue/index.d.ts +4 -4
- package/dist/patterns/job-queue/index.js +1 -1
- package/dist/patterns/lens/index.cjs +7 -6
- package/dist/patterns/lens/index.d.cts +6 -6
- package/dist/patterns/lens/index.d.ts +6 -6
- package/dist/patterns/lens/index.js +1 -1
- package/dist/patterns/memory/index.cjs +7 -6
- package/dist/patterns/memory/index.d.cts +4 -4
- package/dist/patterns/memory/index.d.ts +4 -4
- package/dist/patterns/memory/index.js +1 -1
- package/dist/patterns/messaging/index.cjs +7 -6
- package/dist/patterns/messaging/index.d.cts +4 -4
- package/dist/patterns/messaging/index.d.ts +4 -4
- package/dist/patterns/messaging/index.js +1 -1
- package/dist/patterns/orchestration/index.cjs +7 -6
- package/dist/patterns/orchestration/index.d.cts +5 -5
- package/dist/patterns/orchestration/index.d.ts +5 -5
- package/dist/patterns/orchestration/index.js +1 -1
- package/dist/patterns/reactive-layout/index.cjs +8 -7
- 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 +7 -6
- 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/refine-loop/index.cjs +9 -8
- package/dist/patterns/refine-loop/index.d.cts +5 -5
- package/dist/patterns/refine-loop/index.d.ts +5 -5
- package/dist/patterns/refine-loop/index.js +1 -1
- package/dist/patterns/resilient-pipeline/index.cjs +1 -1
- package/dist/patterns/resilient-pipeline/index.d.cts +6 -6
- package/dist/patterns/resilient-pipeline/index.d.ts +6 -6
- package/dist/patterns/resilient-pipeline/index.js +1 -1
- package/dist/patterns/surface/index.cjs +14 -13
- package/dist/patterns/surface/index.d.cts +5 -5
- package/dist/patterns/surface/index.d.ts +5 -5
- package/dist/patterns/surface/index.js +1 -1
- package/dist/{reactive-layout-CpYb5qLP.d.cts → reactive-layout-5oEn8lHM.d.cts} +2 -2
- package/dist/{reactive-layout-D8u4wuUR.d.ts → reactive-layout-BAr6-_o5.d.ts} +2 -2
- package/dist/{reactive-log-DPzuUDj5.d.cts → reactive-log-5jFeNRmd.d.cts} +1 -1
- package/dist/{reactive-log-YuH9VYN8.d.ts → reactive-log-BOJDCI5x.d.ts} +1 -1
- package/dist/{reactive-map-CdbNoSgP.d.ts → reactive-map-BvDrRuwt.d.ts} +1 -1
- package/dist/{reactive-map-DUeRmb9d.d.cts → reactive-map-CmlPPKHN.d.cts} +1 -1
- package/dist/{resilience-CGRzhnD3.d.ts → resilience-CludlzcP.d.ts} +1 -1
- package/dist/{resilience-Ba5-b4WD.d.cts → resilience-Q6Bt_7y0.d.cts} +1 -1
- package/dist/{resilience-QAHKANT5.js → resilience-XRUF267O.js} +1 -1
- package/dist/{sugar-BV0htudb.d.cts → sugar-BHbAACDG.d.ts} +10 -12
- package/dist/{sugar-Dtyrq2_q.d.ts → sugar-CqR6DJ7v.d.cts} +10 -12
- package/dist/{topology-tree-DROUdq5B.d.cts → topology-tree-CVREibAc.d.cts} +1 -1
- package/dist/{topology-tree-CYHOwQZ_.d.ts → topology-tree-CkjojcB6.d.ts} +1 -1
- package/package.json +1 -1
- package/dist/chunk-6V3SEX2I.js +0 -1
- package/dist/chunk-7H6LGFUG.js +0 -64
- package/dist/chunk-CKCSDI7T.js +0 -6
- package/dist/chunk-QWAPKG3O.js +0 -2
- package/dist/chunk-RHESUC3V.js +0 -43
- package/dist/chunk-V6YQICXZ.js +0 -1
- package/dist/chunk-Z4HDAS2Q.js +0 -1
- package/dist/chunk-ZB5EHBIO.js +0 -1
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import { a as Node, A as Actor } from './node-Cc1TniY8.cjs';
|
|
2
|
-
import { D as DistillBundle, E as Extraction } from './composite-B-xqw4Kk.cjs';
|
|
3
|
-
import { NodeInput } from './extra/sources.cjs';
|
|
4
|
-
import { StorageHandle, StorageTier } from './extra/storage-core.cjs';
|
|
5
|
-
import { G as Graph, a as GraphOptions, h as GraphAttachStorageOptions } from './graph-D48Qw9Cg.cjs';
|
|
6
|
-
import { V as VectorIndexBundle, K as KnowledgeGraphGraph, L as LightCollectionBundle, a as VectorSearchResult } from './index-tbf2gKHd.cjs';
|
|
7
|
-
import { T as TopicGraph } from './index-DyxjtScX.cjs';
|
|
8
|
-
import { G as GateController, a as GateOptions } from './index-dtN7YA2x.cjs';
|
|
9
1
|
import { T as TokenUsage, L as LLMAdapter, P as PricingFn, C as ChatMessage, a as LLMInvokeOptions, d as ToolDefinition, b as LLMResponse, c as ToolCall, e as CapabilitiesRegistry, M as ModelCapabilities, f as ModelFeatures, g as ModelLimits, h as ModelPricing, i as PriceBreakdown, j as PricingRegistry, R as Rate, S as StreamDelta, k as TieredRate, l as composePricing, m as computePrice, n as createCapabilitiesRegistry, o as createPricingRegistry, r as registryPricing, z as zeroPrice } from './types-O3GzJY2U.cjs';
|
|
10
|
-
import { a as CascadeExhaustionReport, A as AdapterProvider, b as AdapterTier, d as AllTiersExhaustedError, C as CascadingLlmAdapterOptions, e as CreateAdapterOptions, O as OpenAICompatAdapterOptions, f as OpenAICompatPreset, g as OpenAISdkLike, h as cascadingLlmAdapter, c as createAdapter, o as openAICompatAdapter } from './cascading-
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
2
|
+
import { a as CascadeExhaustionReport, A as AdapterProvider, b as AdapterTier, d as AllTiersExhaustedError, C as CascadingLlmAdapterOptions, e as CreateAdapterOptions, O as OpenAICompatAdapterOptions, f as OpenAICompatPreset, g as OpenAISdkLike, h as cascadingLlmAdapter, c as createAdapter, o as openAICompatAdapter } from './cascading-dNCtjW8j.cjs';
|
|
3
|
+
import { a as Node, A as Actor } from './node-BVV7G1bq.cjs';
|
|
4
|
+
import { R as ReactiveLogBundle } from './reactive-log-5jFeNRmd.cjs';
|
|
5
|
+
import { a as CircuitBreakerOptions, e as CircuitBreaker, f as CircuitOpenError } from './resilience-Q6Bt_7y0.cjs';
|
|
6
|
+
import { NodeInput } from './extra/sources.cjs';
|
|
13
7
|
import { F as FallbackAdapterOptions, a as FallbackFixture, b as FallbackMissError, c as FallbackMissPolicy, R as ReplayCacheKeyContext, d as ReplayCacheMissError, e as ReplayCacheMode, W as WithReplayCacheOptions, f as canonicalJson, g as fallbackAdapter, w as withReplayCache } from './fallback-BaTS7vVY.cjs';
|
|
8
|
+
import { G as Graph, a as GraphOptions, h as GraphAttachStorageOptions } from './graph-C4Uxwv0T.cjs';
|
|
9
|
+
import { T as TopicGraph } from './index-B-z8WaSd.cjs';
|
|
10
|
+
import { G as GateController, a as GateOptions } from './index-DVNLe3pS.cjs';
|
|
11
|
+
import { D as DistillBundle, E as Extraction } from './composite-nrRumJ7l.cjs';
|
|
12
|
+
import { V as VectorSearchResult, L as LightCollectionBundle, a as VectorIndexBundle, K as KnowledgeGraphGraph } from './index-lKuLYmHO.cjs';
|
|
13
|
+
import { StorageHandle, StorageTier } from './extra/storage-core.cjs';
|
|
14
14
|
|
|
15
15
|
/**
|
|
16
16
|
* Observable adapter wrapper — the "inverted statistics" surface.
|
|
@@ -785,27 +785,33 @@ declare function googleAdapter(opts?: GoogleAdapterOptions): LLMAdapter;
|
|
|
785
785
|
declare function dryRunPreset(): LLMAdapter;
|
|
786
786
|
|
|
787
787
|
/**
|
|
788
|
-
*
|
|
788
|
+
* `fromLLM` — reactive LLM invocation sugar.
|
|
789
789
|
*
|
|
790
|
-
*
|
|
791
|
-
* agentic memory. Composed from core + extra + Phase 3–4.3 primitives.
|
|
790
|
+
* @module
|
|
792
791
|
*/
|
|
793
792
|
|
|
794
|
-
type
|
|
793
|
+
type FromLLMOptions = {
|
|
794
|
+
name?: string;
|
|
795
|
+
model?: string;
|
|
796
|
+
temperature?: number;
|
|
797
|
+
maxTokens?: number;
|
|
798
|
+
tools?: readonly ToolDefinition[];
|
|
799
|
+
systemPrompt?: string;
|
|
800
|
+
};
|
|
795
801
|
/**
|
|
796
|
-
*
|
|
797
|
-
*
|
|
802
|
+
* Reactive LLM invocation adapter. Returns a derived node that re-invokes
|
|
803
|
+
* the LLM whenever the messages dep changes.
|
|
804
|
+
*
|
|
805
|
+
* Uses `switchMap` internally — new invocations cancel stale in-flight ones.
|
|
798
806
|
*/
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
readonly index: number;
|
|
808
|
-
};
|
|
807
|
+
declare function fromLLM(adapter: LLMAdapter, messages: NodeInput<readonly ChatMessage[]>, opts?: FromLLMOptions): Node<LLMResponse | null>;
|
|
808
|
+
|
|
809
|
+
/**
|
|
810
|
+
* `frozenContext` — prefix-cache-friendly snapshot of upstream context.
|
|
811
|
+
*
|
|
812
|
+
* @module
|
|
813
|
+
*/
|
|
814
|
+
|
|
809
815
|
type FrozenContextOptions = {
|
|
810
816
|
/**
|
|
811
817
|
* Reactive signal that triggers re-materialization. Each `DATA` emission
|
|
@@ -849,21 +855,60 @@ type FrozenContextOptions = {
|
|
|
849
855
|
* @category patterns.ai
|
|
850
856
|
*/
|
|
851
857
|
declare function frozenContext<T>(source: NodeInput<T>, opts?: FrozenContextOptions): Node<T | null>;
|
|
852
|
-
|
|
858
|
+
|
|
859
|
+
/**
|
|
860
|
+
* `promptNode` — universal LLM transform as a reactive derived node.
|
|
861
|
+
*
|
|
862
|
+
* @module
|
|
863
|
+
*/
|
|
864
|
+
|
|
865
|
+
type PromptNodeOptions = {
|
|
853
866
|
name?: string;
|
|
854
867
|
model?: string;
|
|
855
868
|
temperature?: number;
|
|
856
869
|
maxTokens?: number;
|
|
857
|
-
|
|
870
|
+
/** Output format — `"json"` attempts JSON.parse on the response. Default: `"text"`. */
|
|
871
|
+
format?: "text" | "json";
|
|
872
|
+
/** Number of retries on transient errors. Default: 0. */
|
|
873
|
+
retries?: number;
|
|
874
|
+
/** Cache LLM responses for identical inputs. Default: false. */
|
|
875
|
+
cache?: boolean;
|
|
858
876
|
systemPrompt?: string;
|
|
877
|
+
meta?: Record<string, unknown>;
|
|
859
878
|
};
|
|
860
879
|
/**
|
|
861
|
-
*
|
|
862
|
-
* the LLM whenever
|
|
880
|
+
* Universal LLM transform: wraps a prompt template + model adapter into a reactive derived node.
|
|
881
|
+
* Re-invokes the LLM whenever any dep changes. Suitable for triage, QA, hypothesis, parity, etc.
|
|
863
882
|
*
|
|
864
|
-
*
|
|
883
|
+
* @param adapter - LLM adapter (provider-agnostic).
|
|
884
|
+
* @param deps - Input nodes whose values feed the prompt.
|
|
885
|
+
* @param prompt - Static string or template function receiving dep values.
|
|
886
|
+
* @param opts - Optional configuration.
|
|
887
|
+
* @returns `Node` emitting LLM responses (string or parsed JSON).
|
|
865
888
|
*/
|
|
866
|
-
declare function
|
|
889
|
+
declare function promptNode<T = string>(adapter: LLMAdapter, deps: readonly Node<unknown>[], prompt: string | ((...depValues: unknown[]) => string), opts?: PromptNodeOptions): Node<T | null>;
|
|
890
|
+
|
|
891
|
+
/**
|
|
892
|
+
* `streamingPromptNode` + `gatedStream` — streaming LLM transforms, plus the
|
|
893
|
+
* shared `StreamChunk` shape.
|
|
894
|
+
*
|
|
895
|
+
* @module
|
|
896
|
+
*/
|
|
897
|
+
|
|
898
|
+
/**
|
|
899
|
+
* A single chunk from any streaming source (LLM tokens, WebSocket, SSE, file tail).
|
|
900
|
+
* Generic enough for any streaming source, not just LLM.
|
|
901
|
+
*/
|
|
902
|
+
type StreamChunk = {
|
|
903
|
+
/** Identifier for the stream source (adapter name, URL, etc.). */
|
|
904
|
+
readonly source: string;
|
|
905
|
+
/** This chunk's content. */
|
|
906
|
+
readonly token: string;
|
|
907
|
+
/** Full accumulated text so far. */
|
|
908
|
+
readonly accumulated: string;
|
|
909
|
+
/** 0-based chunk counter. */
|
|
910
|
+
readonly index: number;
|
|
911
|
+
};
|
|
867
912
|
type StreamingPromptNodeOptions = {
|
|
868
913
|
name?: string;
|
|
869
914
|
model?: string;
|
|
@@ -890,38 +935,95 @@ type StreamingPromptNodeHandle<T> = {
|
|
|
890
935
|
* previous in-flight stream is canceled automatically via `switchMap`.
|
|
891
936
|
*
|
|
892
937
|
* Each token chunk is published to a {@link TopicGraph} as a {@link StreamChunk}.
|
|
893
|
-
* Extractors can mount on the topic independently (see
|
|
938
|
+
* Extractors can mount on the topic independently (see `streamExtractor`).
|
|
894
939
|
* Zero overhead if nobody subscribes to the stream topic.
|
|
895
940
|
*
|
|
896
|
-
* The `output` node emits the final parsed result (like
|
|
941
|
+
* The `output` node emits the final parsed result (like `promptNode`).
|
|
897
942
|
* The async boundary is handled by `fromAny` (spec §5.10 compliant).
|
|
898
943
|
*/
|
|
899
944
|
declare function streamingPromptNode<T = string>(adapter: LLMAdapter, deps: readonly Node<unknown>[], prompt: string | ((...depValues: unknown[]) => string), opts?: StreamingPromptNodeOptions): StreamingPromptNodeHandle<T>;
|
|
945
|
+
type GatedStreamOptions = StreamingPromptNodeOptions & {
|
|
946
|
+
/** Gate options (maxPending, startOpen). */
|
|
947
|
+
gate?: Omit<GateOptions, "meta">;
|
|
948
|
+
};
|
|
900
949
|
/**
|
|
901
|
-
*
|
|
902
|
-
|
|
950
|
+
* Bundle returned by {@link gatedStream}.
|
|
951
|
+
*/
|
|
952
|
+
type GatedStreamHandle<T> = {
|
|
953
|
+
/** Final parsed result (after gate approval). */
|
|
954
|
+
output: Node<T | null>;
|
|
955
|
+
/** Live stream topic — subscribe to `stream.latest` for chunks. */
|
|
956
|
+
stream: TopicGraph<StreamChunk>;
|
|
957
|
+
/** Gate controller — approve, reject (aborts in-flight stream), modify. */
|
|
958
|
+
gate: GateController<T | null>;
|
|
959
|
+
/** Tear down everything. */
|
|
960
|
+
dispose: () => void;
|
|
961
|
+
};
|
|
962
|
+
/**
|
|
963
|
+
* Streaming LLM transform with human-in-the-loop gate integration.
|
|
903
964
|
*
|
|
904
|
-
*
|
|
905
|
-
*
|
|
906
|
-
*
|
|
965
|
+
* Composes {@link streamingPromptNode} with `gate` so that:
|
|
966
|
+
* - `gate.reject()` discards the pending value **and** aborts the in-flight
|
|
967
|
+
* stream (cancels the `AbortController`).
|
|
968
|
+
* - `gate.modify()` transforms the pending value before forwarding downstream.
|
|
969
|
+
* - `gate.approve()` forwards the final result as normal.
|
|
907
970
|
*
|
|
908
|
-
*
|
|
909
|
-
*
|
|
910
|
-
*
|
|
911
|
-
*
|
|
971
|
+
* The abort-on-reject works by toggling an internal cancel signal that causes
|
|
972
|
+
* the `switchMap` inside `streamingPromptNode` to restart with an empty message
|
|
973
|
+
* list, which triggers the `AbortController.abort()` in the async generator's
|
|
974
|
+
* `finally` block.
|
|
912
975
|
*/
|
|
913
|
-
declare function
|
|
976
|
+
declare function gatedStream<T = string>(graph: Graph, name: string, adapter: LLMAdapter, deps: readonly Node<unknown>[], prompt: string | ((...depValues: unknown[]) => string), opts?: GatedStreamOptions): GatedStreamHandle<T>;
|
|
977
|
+
|
|
978
|
+
/**
|
|
979
|
+
* `systemPromptBuilder` — assembles a reactive system prompt from sections.
|
|
980
|
+
*
|
|
981
|
+
* @module
|
|
982
|
+
*/
|
|
983
|
+
|
|
984
|
+
/**
|
|
985
|
+
* Assembles a system prompt from reactive sections. Each section is a
|
|
986
|
+
* `NodeInput<string>` — the prompt updates when any section changes.
|
|
987
|
+
*/
|
|
988
|
+
type SystemPromptHandle = Node<string> & {
|
|
989
|
+
dispose: () => void;
|
|
990
|
+
};
|
|
991
|
+
declare function systemPromptBuilder(sections: readonly NodeInput<string>[], opts?: {
|
|
992
|
+
separator?: string;
|
|
914
993
|
name?: string;
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
994
|
+
}): SystemPromptHandle;
|
|
995
|
+
|
|
996
|
+
/**
|
|
997
|
+
* Cost meter extractor — counts chunks, characters, and estimates token usage.
|
|
998
|
+
* @module
|
|
999
|
+
*/
|
|
1000
|
+
|
|
1001
|
+
/** A cost meter reading from the stream. */
|
|
1002
|
+
type CostMeterReading = {
|
|
1003
|
+
readonly chunkCount: number;
|
|
1004
|
+
readonly charCount: number;
|
|
1005
|
+
readonly estimatedTokens: number;
|
|
1006
|
+
};
|
|
1007
|
+
type CostMeterOptions = {
|
|
1008
|
+
/** Characters per token approximation. Default: 4 (GPT-family). */
|
|
1009
|
+
charsPerToken?: number;
|
|
1010
|
+
name?: string;
|
|
1011
|
+
};
|
|
1012
|
+
/**
|
|
1013
|
+
* Mounts a cost meter on a streaming topic. Counts chunks, characters, and
|
|
1014
|
+
* estimates token count. Compose with `budgetGate` for hard-stop when LLM
|
|
1015
|
+
* output exceeds budget mid-generation.
|
|
1016
|
+
*
|
|
1017
|
+
* Default structural equals suppresses DATA emission when two consecutive
|
|
1018
|
+
* readings are identical (same chunk count + char count + token estimate).
|
|
1019
|
+
*/
|
|
1020
|
+
declare function costMeterExtractor(streamTopic: TopicGraph<StreamChunk>, opts?: CostMeterOptions): Node<CostMeterReading>;
|
|
1021
|
+
|
|
1022
|
+
/**
|
|
1023
|
+
* Keyword-flag extractor — scans accumulated stream text for configured patterns.
|
|
1024
|
+
* @module
|
|
1025
|
+
*/
|
|
1026
|
+
|
|
925
1027
|
/** A keyword match detected in the stream. */
|
|
926
1028
|
type KeywordFlag = {
|
|
927
1029
|
readonly label: string;
|
|
@@ -955,6 +1057,43 @@ type KeywordFlagExtractorOptions = {
|
|
|
955
1057
|
* suppresses DATA emission when no new flags were found this chunk.
|
|
956
1058
|
*/
|
|
957
1059
|
declare function keywordFlagExtractor(streamTopic: TopicGraph<StreamChunk>, opts: KeywordFlagExtractorOptions): Node<readonly KeywordFlag[]>;
|
|
1060
|
+
|
|
1061
|
+
/**
|
|
1062
|
+
* Generic stream extractor — mounts an extract function on a streaming topic.
|
|
1063
|
+
* @module
|
|
1064
|
+
*/
|
|
1065
|
+
|
|
1066
|
+
/**
|
|
1067
|
+
* Mounts an extractor function on a streaming topic. Returns a derived node
|
|
1068
|
+
* that emits extracted values as chunks arrive.
|
|
1069
|
+
*
|
|
1070
|
+
* `extractFn` receives the accumulated text from the latest chunk and returns
|
|
1071
|
+
* the extracted value, or `null` if nothing detected yet. This is the building
|
|
1072
|
+
* block for keyword flags, tool call detection, cost metering, etc.
|
|
1073
|
+
*
|
|
1074
|
+
* @param streamTopic - The stream topic to extract from.
|
|
1075
|
+
* @param extractFn - `(accumulated: string) => T | null`.
|
|
1076
|
+
* @param opts - Optional name.
|
|
1077
|
+
* @returns Derived node emitting extracted values.
|
|
1078
|
+
*/
|
|
1079
|
+
declare function streamExtractor<T>(streamTopic: TopicGraph<StreamChunk>, extractFn: (accumulated: string) => T | null, opts?: {
|
|
1080
|
+
name?: string;
|
|
1081
|
+
/**
|
|
1082
|
+
* Optional structural equals for the extractor output. When two
|
|
1083
|
+
* consecutive chunks produce structurally-equal outputs, the framework
|
|
1084
|
+
* emits `RESOLVED` instead of `DATA`, saving downstream work. Default:
|
|
1085
|
+
* reference equality (`Object.is`). The library cannot know your
|
|
1086
|
+
* output shape — supply this when your `extractFn` returns structured
|
|
1087
|
+
* objects or arrays.
|
|
1088
|
+
*/
|
|
1089
|
+
equals?: (a: T | null, b: T | null) => boolean;
|
|
1090
|
+
}): Node<T | null>;
|
|
1091
|
+
|
|
1092
|
+
/**
|
|
1093
|
+
* Tool-call extractor — scans accumulated stream text for complete JSON tool call objects.
|
|
1094
|
+
* @module
|
|
1095
|
+
*/
|
|
1096
|
+
|
|
958
1097
|
/** A tool call detected in the stream. */
|
|
959
1098
|
type ExtractedToolCall = {
|
|
960
1099
|
readonly name: string;
|
|
@@ -978,44 +1117,12 @@ type ExtractedToolCall = {
|
|
|
978
1117
|
declare function toolCallExtractor(streamTopic: TopicGraph<StreamChunk>, opts?: {
|
|
979
1118
|
name?: string;
|
|
980
1119
|
}): Node<readonly ExtractedToolCall[]>;
|
|
981
|
-
|
|
982
|
-
type CostMeterReading = {
|
|
983
|
-
readonly chunkCount: number;
|
|
984
|
-
readonly charCount: number;
|
|
985
|
-
readonly estimatedTokens: number;
|
|
986
|
-
};
|
|
987
|
-
type CostMeterOptions = {
|
|
988
|
-
/** Characters per token approximation. Default: 4 (GPT-family). */
|
|
989
|
-
charsPerToken?: number;
|
|
990
|
-
name?: string;
|
|
991
|
-
};
|
|
992
|
-
/**
|
|
993
|
-
* Mounts a cost meter on a streaming topic. Counts chunks, characters, and
|
|
994
|
-
* estimates token count. Compose with `budgetGate` for hard-stop when LLM
|
|
995
|
-
* output exceeds budget mid-generation.
|
|
996
|
-
*
|
|
997
|
-
* Default structural equals suppresses DATA emission when two consecutive
|
|
998
|
-
* readings are identical (same chunk count + char count + token estimate).
|
|
999
|
-
*/
|
|
1000
|
-
declare function costMeterExtractor(streamTopic: TopicGraph<StreamChunk>, opts?: CostMeterOptions): Node<CostMeterReading>;
|
|
1001
|
-
/** Options for {@link redactor}. */
|
|
1002
|
-
type RedactorOptions = {
|
|
1003
|
-
name?: string;
|
|
1004
|
-
};
|
|
1120
|
+
|
|
1005
1121
|
/**
|
|
1006
|
-
*
|
|
1007
|
-
*
|
|
1008
|
-
* Returns a derived node emitting a sanitized `StreamChunk` on every chunk:
|
|
1009
|
-
* `accumulated` and `token` have matched substrings replaced by `replaceFn`.
|
|
1010
|
-
* The default `replaceFn` replaces with `"[REDACTED]"`.
|
|
1011
|
-
*
|
|
1012
|
-
* Compose with `contentGate` for in-flight safety pipelines.
|
|
1013
|
-
*
|
|
1014
|
-
* @param streamTopic - Streaming topic to monitor.
|
|
1015
|
-
* @param patterns - Array of RegExps to match against accumulated text.
|
|
1016
|
-
* @param replaceFn - Replacement producer (default: always `"[REDACTED]"`).
|
|
1122
|
+
* Content gate — classifies accumulated stream text as allow / review / block.
|
|
1123
|
+
* @module
|
|
1017
1124
|
*/
|
|
1018
|
-
|
|
1125
|
+
|
|
1019
1126
|
/** Content safety decision. */
|
|
1020
1127
|
type ContentDecision = "allow" | "block" | "review";
|
|
1021
1128
|
/** Options for {@link contentGate}. */
|
|
@@ -1046,63 +1153,201 @@ type ContentGateOptions = {
|
|
|
1046
1153
|
* @param threshold - Score at which output becomes "review" or "block".
|
|
1047
1154
|
*/
|
|
1048
1155
|
declare function contentGate(streamTopic: TopicGraph<StreamChunk>, classifier: ((accumulated: string) => number) | Node<number>, threshold: number, opts?: ContentGateOptions): Node<ContentDecision>;
|
|
1049
|
-
|
|
1050
|
-
/** Gate options (maxPending, startOpen). */
|
|
1051
|
-
gate?: Omit<GateOptions, "meta">;
|
|
1052
|
-
};
|
|
1156
|
+
|
|
1053
1157
|
/**
|
|
1054
|
-
*
|
|
1158
|
+
* Redactor — stream extractor that replaces matched patterns in accumulated text.
|
|
1159
|
+
* @module
|
|
1055
1160
|
*/
|
|
1056
|
-
|
|
1057
|
-
|
|
1058
|
-
|
|
1059
|
-
|
|
1060
|
-
stream: TopicGraph<StreamChunk>;
|
|
1061
|
-
/** Gate controller — approve, reject (aborts in-flight stream), modify. */
|
|
1062
|
-
gate: GateController<T | null>;
|
|
1063
|
-
/** Tear down everything. */
|
|
1064
|
-
dispose: () => void;
|
|
1161
|
+
|
|
1162
|
+
/** Options for {@link redactor}. */
|
|
1163
|
+
type RedactorOptions = {
|
|
1164
|
+
name?: string;
|
|
1065
1165
|
};
|
|
1066
1166
|
/**
|
|
1067
|
-
*
|
|
1167
|
+
* Stream extractor that replaces matched patterns in the accumulated text.
|
|
1068
1168
|
*
|
|
1069
|
-
*
|
|
1070
|
-
*
|
|
1071
|
-
*
|
|
1072
|
-
* - `gate.modify()` transforms the pending value before forwarding downstream.
|
|
1073
|
-
* - `gate.approve()` forwards the final result as normal.
|
|
1169
|
+
* Returns a derived node emitting a sanitized `StreamChunk` on every chunk:
|
|
1170
|
+
* `accumulated` and `token` have matched substrings replaced by `replaceFn`.
|
|
1171
|
+
* The default `replaceFn` replaces with `"[REDACTED]"`.
|
|
1074
1172
|
*
|
|
1075
|
-
*
|
|
1076
|
-
*
|
|
1077
|
-
*
|
|
1078
|
-
*
|
|
1173
|
+
* Compose with `contentGate` for in-flight safety pipelines.
|
|
1174
|
+
*
|
|
1175
|
+
* @param streamTopic - Streaming topic to monitor.
|
|
1176
|
+
* @param patterns - Array of RegExps to match against accumulated text.
|
|
1177
|
+
* @param replaceFn - Replacement producer (default: always `"[REDACTED]"`).
|
|
1079
1178
|
*/
|
|
1080
|
-
declare function
|
|
1081
|
-
|
|
1082
|
-
|
|
1179
|
+
declare function redactor(streamTopic: TopicGraph<StreamChunk>, patterns: RegExp[], replaceFn?: (match: string, pattern: RegExp) => string, opts?: RedactorOptions): Node<StreamChunk>;
|
|
1180
|
+
|
|
1181
|
+
type ChatStreamOptions = {
|
|
1182
|
+
graph?: GraphOptions;
|
|
1183
|
+
maxMessages?: number;
|
|
1184
|
+
};
|
|
1185
|
+
declare class ChatStreamGraph extends Graph {
|
|
1186
|
+
private readonly _log;
|
|
1187
|
+
readonly messages: Node<readonly ChatMessage[]>;
|
|
1188
|
+
readonly latest: Node<ChatMessage | null>;
|
|
1189
|
+
readonly messageCount: Node<number>;
|
|
1190
|
+
constructor(name: string, opts?: ChatStreamOptions);
|
|
1191
|
+
append(role: ChatMessage["role"], content: string, extra?: Partial<ChatMessage>): void;
|
|
1192
|
+
appendToolResult(callId: string, content: string): void;
|
|
1193
|
+
clear(): void;
|
|
1194
|
+
allMessages(): readonly ChatMessage[];
|
|
1195
|
+
}
|
|
1196
|
+
declare function chatStream(name: string, opts?: ChatStreamOptions): ChatStreamGraph;
|
|
1197
|
+
|
|
1198
|
+
type ToolRegistryOptions = {
|
|
1199
|
+
graph?: GraphOptions;
|
|
1200
|
+
};
|
|
1201
|
+
declare class ToolRegistryGraph extends Graph {
|
|
1202
|
+
readonly definitions: Node<ReadonlyMap<string, ToolDefinition>>;
|
|
1203
|
+
readonly schemas: Node<readonly ToolDefinition[]>;
|
|
1204
|
+
constructor(name: string, opts?: ToolRegistryOptions);
|
|
1205
|
+
register(tool: ToolDefinition): void;
|
|
1206
|
+
unregister(name: string): void;
|
|
1207
|
+
execute(name: string, args: Record<string, unknown>): Promise<unknown>;
|
|
1208
|
+
getDefinition(name: string): ToolDefinition | undefined;
|
|
1209
|
+
}
|
|
1210
|
+
declare function toolRegistry(name: string, opts?: ToolRegistryOptions): ToolRegistryGraph;
|
|
1211
|
+
|
|
1212
|
+
/**
|
|
1213
|
+
* Reactive agent loop — autonomous multi-turn LLM agent with tool execution.
|
|
1214
|
+
*/
|
|
1215
|
+
type AgentLoopStatus = "idle" | "thinking" | "acting" | "done" | "error";
|
|
1216
|
+
|
|
1217
|
+
type AgentLoopOptions = {
|
|
1218
|
+
graph?: GraphOptions;
|
|
1219
|
+
adapter: LLMAdapter;
|
|
1220
|
+
tools?: readonly ToolDefinition[];
|
|
1221
|
+
systemPrompt?: string;
|
|
1222
|
+
maxTurns?: number;
|
|
1223
|
+
stopWhen?: (response: LLMResponse) => boolean;
|
|
1224
|
+
onToolCall?: (call: ToolCall) => void;
|
|
1225
|
+
maxMessages?: number;
|
|
1083
1226
|
model?: string;
|
|
1084
1227
|
temperature?: number;
|
|
1085
1228
|
maxTokens?: number;
|
|
1086
|
-
/**
|
|
1087
|
-
|
|
1088
|
-
|
|
1089
|
-
|
|
1090
|
-
|
|
1091
|
-
|
|
1092
|
-
|
|
1093
|
-
|
|
1229
|
+
/**
|
|
1230
|
+
* Reactive tool-call splice (COMPOSITION-GUIDE §31 "interception is security").
|
|
1231
|
+
* When set, the raw `toolCalls` node is piped through this transform before
|
|
1232
|
+
* reaching the executor. The transform is a pure reactive composition —
|
|
1233
|
+
* `(calls: Node<readonly ToolCall[]>) => Node<readonly ToolCall[]>` — so the
|
|
1234
|
+
* gate is visible in `describe()` / `explain()` as a real edge (no hidden
|
|
1235
|
+
* imperative wraps; §24).
|
|
1236
|
+
*
|
|
1237
|
+
* Typical uses:
|
|
1238
|
+
* - **Filter / block** — `derived([calls, policy], ([raw, p]) => raw.filter(p))`
|
|
1239
|
+
* - **Throttle / debounce** — `throttle(calls, windowMs)`
|
|
1240
|
+
* - **Human-in-the-loop approval** — pipe through a `gate` controller so
|
|
1241
|
+
* calls wait for human approval before reaching the executor.
|
|
1242
|
+
*
|
|
1243
|
+
* The public `agent.toolCalls` node surfaces the POST-intercept stream, so
|
|
1244
|
+
* audit / telemetry consumers see what the executor actually runs. The raw
|
|
1245
|
+
* pre-intercept stream is not exposed — tests that need it should run
|
|
1246
|
+
* without `interceptToolCalls` set (the identity case).
|
|
1247
|
+
*/
|
|
1248
|
+
interceptToolCalls?: (calls: Node<readonly ToolCall[]>) => Node<readonly ToolCall[]>;
|
|
1094
1249
|
};
|
|
1250
|
+
/** A single tool execution outcome: `{id, content}` where content is a JSON string. */
|
|
1251
|
+
interface ToolResult {
|
|
1252
|
+
readonly id: string;
|
|
1253
|
+
readonly content: string;
|
|
1254
|
+
}
|
|
1095
1255
|
/**
|
|
1096
|
-
*
|
|
1097
|
-
* Re-invokes the LLM whenever any dep changes. Suitable for triage, QA, hypothesis, parity, etc.
|
|
1256
|
+
* Reactive agent loop.
|
|
1098
1257
|
*
|
|
1099
|
-
*
|
|
1100
|
-
*
|
|
1101
|
-
*
|
|
1102
|
-
*
|
|
1103
|
-
*
|
|
1258
|
+
* The loop is a reactive state machine wired entirely from graph primitives:
|
|
1259
|
+
* `chat.messages` + `tools.schemas` + gating state feed a `promptInput`
|
|
1260
|
+
* derived; `switchMap` turns non-null inputs into an LLM invocation via
|
|
1261
|
+
* `fromAny(adapter.invoke(...))`. The LLM response drives chat writes and
|
|
1262
|
+
* status transitions via effects. Tool calls flow through a reactive
|
|
1263
|
+
* executor (`retrySource` + `rescue`) that retries once on error and
|
|
1264
|
+
* surfaces terminal errors as JSON-shaped `ToolResult` payloads for the
|
|
1265
|
+
* LLM to react to.
|
|
1266
|
+
*
|
|
1267
|
+
* **No imperative control flow inside the reactive layer** (spec §5.8-5.12):
|
|
1268
|
+
* no `while` loops, no manual `await adapter.invoke`, no polling.
|
|
1269
|
+
* `agent.run()` is a thin `awaitSettled` bridge so callers can still `await`
|
|
1270
|
+
* the loop if they want a Promise.
|
|
1271
|
+
*
|
|
1272
|
+
* Public surface:
|
|
1273
|
+
* - `chat` / `tools` — subgraphs (imperative `append` / `execute` at boundary)
|
|
1274
|
+
* - `status` / `turn` / `aborted` — state nodes with explicit initials
|
|
1275
|
+
* - `lastResponse` / `toolCalls` / `toolResults` — reactive outputs (SENTINEL until first emission; callers use `awaitSettled` / `subscribe`)
|
|
1276
|
+
* - `run(userMessage?, signal?)` — optional user append + Promise bridge
|
|
1277
|
+
* - `abort()` — imperative abort shim; flips `aborted` state
|
|
1104
1278
|
*/
|
|
1105
|
-
declare
|
|
1279
|
+
declare class AgentLoopGraph extends Graph {
|
|
1280
|
+
readonly chat: ChatStreamGraph;
|
|
1281
|
+
readonly tools: ToolRegistryGraph;
|
|
1282
|
+
/** Current agent status. `initial: "idle"` — always has a real value. */
|
|
1283
|
+
readonly status: Node<AgentLoopStatus>;
|
|
1284
|
+
/** Turn count (completed LLM invocations this run). `initial: 0`. */
|
|
1285
|
+
readonly turn: Node<number>;
|
|
1286
|
+
/** Aborted flag; flipped by `abort()` or external `AbortSignal`. `initial: false`. */
|
|
1287
|
+
readonly aborted: Node<boolean>;
|
|
1288
|
+
/**
|
|
1289
|
+
* Most recent LLM response. State-backed mirror driven by the response
|
|
1290
|
+
* effect. `initial: null` — subscribers can read the cache synchronously;
|
|
1291
|
+
* `awaitSettled(lastResponse)` or `firstWhere(lastResponse, v => v != null)`
|
|
1292
|
+
* bridges to the first non-null value as a Promise.
|
|
1293
|
+
*/
|
|
1294
|
+
readonly lastResponse: Node<LLMResponse | null>;
|
|
1295
|
+
/** Tool-call batch emitted by the most recent LLM response. SENTINEL. */
|
|
1296
|
+
readonly toolCalls: Node<readonly ToolCall[]>;
|
|
1297
|
+
/** Tool-result batch (one entry per call) after reactive execution. SENTINEL. */
|
|
1298
|
+
readonly toolResults: Node<readonly ToolResult[]>;
|
|
1299
|
+
/** @deprecated Use `turn` instead. Pre-1.0 rename — this alias will be removed. */
|
|
1300
|
+
readonly turnCount: Node<number>;
|
|
1301
|
+
private readonly _terminalResult;
|
|
1302
|
+
private readonly _disposeRunWiring;
|
|
1303
|
+
/**
|
|
1304
|
+
* Per-agent monotonic run counter. Incremented at the start of every
|
|
1305
|
+
* `run()` call; stamped onto `_terminalResult`'s DATA emissions so a
|
|
1306
|
+
* caller's `awaitSettled` predicate resolves only on the matching run
|
|
1307
|
+
* (prevents stale-resolution under re-entrant-ish composition).
|
|
1308
|
+
*/
|
|
1309
|
+
private _runVersion;
|
|
1310
|
+
/** Guards against overlapping `run()` calls. */
|
|
1311
|
+
private _running;
|
|
1312
|
+
/**
|
|
1313
|
+
* Abort controller for the currently-running `adapter.invoke`. Minted per
|
|
1314
|
+
* switchMap project; aborted when the reactive `aborted` node flips true
|
|
1315
|
+
* OR when the caller's external `AbortSignal` fires. Threaded into
|
|
1316
|
+
* `adapter.invoke({ signal })` AND `fromAny(promise, { signal })`, so the
|
|
1317
|
+
* reactive layer sees ERROR when the wire call is cancelled.
|
|
1318
|
+
*/
|
|
1319
|
+
private _currentAbortController;
|
|
1320
|
+
constructor(name: string, opts: AgentLoopOptions);
|
|
1321
|
+
/**
|
|
1322
|
+
* Bridge to `Promise<LLMResponse>` over the reactive pipeline.
|
|
1323
|
+
*
|
|
1324
|
+
* - If `userMessage` is provided, appends it as a user message and
|
|
1325
|
+
* transitions status to `"thinking"` to kick the loop.
|
|
1326
|
+
* - If `signal` is provided, binds it to the reactive `aborted` node
|
|
1327
|
+
* AND threads into `adapter.invoke({ signal })` so the wire call can
|
|
1328
|
+
* cancel mid-flight. The reactive `aborted` state + effect 3 guarantee
|
|
1329
|
+
* that even an adapter that ignores `signal` will stop emitting into
|
|
1330
|
+
* the agent graph.
|
|
1331
|
+
* - Resolves when `status === "done"` with the final LLM response.
|
|
1332
|
+
* Rejects with `AbortError` when the abort signal fires pre-response.
|
|
1333
|
+
* Rejects with the stage error when `status === "error"`.
|
|
1334
|
+
*
|
|
1335
|
+
* **Concurrency:** `run()` refuses to overlap with a pending call on the
|
|
1336
|
+
* same agent. Attempting to call `run()` while a previous `run()` is still
|
|
1337
|
+
* in-flight throws a `RangeError` immediately. Each call increments an
|
|
1338
|
+
* internal `_runVersion` and filters `_terminalResult` emissions by that
|
|
1339
|
+
* version — belt-and-suspenders against stale resolution.
|
|
1340
|
+
*/
|
|
1341
|
+
run(userMessage?: string, signal?: AbortSignal): Promise<LLMResponse | null>;
|
|
1342
|
+
/**
|
|
1343
|
+
* Flip the reactive `aborted` state. Equivalent to setting an external
|
|
1344
|
+
* `AbortSignal` — the pipeline observes and transitions to `"done"`.
|
|
1345
|
+
*/
|
|
1346
|
+
abort(): void;
|
|
1347
|
+
destroy(): void;
|
|
1348
|
+
}
|
|
1349
|
+
declare function agentLoop(name: string, opts: AgentLoopOptions): AgentLoopGraph;
|
|
1350
|
+
|
|
1106
1351
|
/**
|
|
1107
1352
|
* Options for {@link handoff}.
|
|
1108
1353
|
*/
|
|
@@ -1164,35 +1409,7 @@ type HandoffOptions = {
|
|
|
1164
1409
|
* @category patterns.ai
|
|
1165
1410
|
*/
|
|
1166
1411
|
declare function handoff<T>(from: NodeInput<T | null>, toFactory: (input: Node<T>) => Node<T | null>, opts?: HandoffOptions): Node<T | null>;
|
|
1167
|
-
|
|
1168
|
-
graph?: GraphOptions;
|
|
1169
|
-
maxMessages?: number;
|
|
1170
|
-
};
|
|
1171
|
-
declare class ChatStreamGraph extends Graph {
|
|
1172
|
-
private readonly _log;
|
|
1173
|
-
readonly messages: Node<readonly ChatMessage[]>;
|
|
1174
|
-
readonly latest: Node<ChatMessage | null>;
|
|
1175
|
-
readonly messageCount: Node<number>;
|
|
1176
|
-
constructor(name: string, opts?: ChatStreamOptions);
|
|
1177
|
-
append(role: ChatMessage["role"], content: string, extra?: Partial<ChatMessage>): void;
|
|
1178
|
-
appendToolResult(callId: string, content: string): void;
|
|
1179
|
-
clear(): void;
|
|
1180
|
-
allMessages(): readonly ChatMessage[];
|
|
1181
|
-
}
|
|
1182
|
-
declare function chatStream(name: string, opts?: ChatStreamOptions): ChatStreamGraph;
|
|
1183
|
-
type ToolRegistryOptions = {
|
|
1184
|
-
graph?: GraphOptions;
|
|
1185
|
-
};
|
|
1186
|
-
declare class ToolRegistryGraph extends Graph {
|
|
1187
|
-
readonly definitions: Node<ReadonlyMap<string, ToolDefinition>>;
|
|
1188
|
-
readonly schemas: Node<readonly ToolDefinition[]>;
|
|
1189
|
-
constructor(name: string, opts?: ToolRegistryOptions);
|
|
1190
|
-
register(tool: ToolDefinition): void;
|
|
1191
|
-
unregister(name: string): void;
|
|
1192
|
-
execute(name: string, args: Record<string, unknown>): Promise<unknown>;
|
|
1193
|
-
getDefinition(name: string): ToolDefinition | undefined;
|
|
1194
|
-
}
|
|
1195
|
-
declare function toolRegistry(name: string, opts?: ToolRegistryOptions): ToolRegistryGraph;
|
|
1412
|
+
|
|
1196
1413
|
/**
|
|
1197
1414
|
* Options for {@link toolSelector}.
|
|
1198
1415
|
*/
|
|
@@ -1229,37 +1446,7 @@ interface ToolSelectorOptions {
|
|
|
1229
1446
|
* ```
|
|
1230
1447
|
*/
|
|
1231
1448
|
declare function toolSelector(allTools: NodeInput<readonly ToolDefinition[]>, constraints: readonly NodeInput<(tool: ToolDefinition) => boolean>[], opts?: ToolSelectorOptions): Node<readonly ToolDefinition[]>;
|
|
1232
|
-
|
|
1233
|
-
* Assembles a system prompt from reactive sections. Each section is a
|
|
1234
|
-
* `NodeInput<string>` — the prompt updates when any section changes.
|
|
1235
|
-
*/
|
|
1236
|
-
type SystemPromptHandle = Node<string> & {
|
|
1237
|
-
dispose: () => void;
|
|
1238
|
-
};
|
|
1239
|
-
declare function systemPromptBuilder(sections: readonly NodeInput<string>[], opts?: {
|
|
1240
|
-
separator?: string;
|
|
1241
|
-
name?: string;
|
|
1242
|
-
}): SystemPromptHandle;
|
|
1243
|
-
type LLMExtractorOptions = {
|
|
1244
|
-
adapter: LLMAdapter;
|
|
1245
|
-
model?: string;
|
|
1246
|
-
temperature?: number;
|
|
1247
|
-
maxTokens?: number;
|
|
1248
|
-
};
|
|
1249
|
-
/**
|
|
1250
|
-
* Returns an `extractFn` callback for `distill()` that invokes an LLM to
|
|
1251
|
-
* extract structured memories from raw input.
|
|
1252
|
-
*
|
|
1253
|
-
* The system prompt should instruct the LLM to return JSON matching
|
|
1254
|
-
* `Extraction<TMem>` shape: `{ upsert: [{ key, value }], remove?: [key] }`.
|
|
1255
|
-
*/
|
|
1256
|
-
declare function llmExtractor<TRaw, TMem>(systemPrompt: string, opts: LLMExtractorOptions): (raw: TRaw, existing: ReadonlyMap<string, TMem>) => NodeInput<Extraction<TMem>>;
|
|
1257
|
-
type LLMConsolidatorOptions = LLMExtractorOptions;
|
|
1258
|
-
/**
|
|
1259
|
-
* Returns a `consolidateFn` callback for `distill()` that invokes an LLM to
|
|
1260
|
-
* cluster and merge related memories.
|
|
1261
|
-
*/
|
|
1262
|
-
declare function llmConsolidator<TMem>(systemPrompt: string, opts: LLMConsolidatorOptions): (entries: ReadonlyMap<string, TMem>) => NodeInput<Extraction<TMem>>;
|
|
1449
|
+
|
|
1263
1450
|
/** Scores for the three admission dimensions. Each 0–1. */
|
|
1264
1451
|
type AdmissionScores = {
|
|
1265
1452
|
readonly persistence: number;
|
|
@@ -1282,34 +1469,7 @@ type AdmissionScore3DOptions = {
|
|
|
1282
1469
|
* and personalValue, then applies thresholds.
|
|
1283
1470
|
*/
|
|
1284
1471
|
declare function admissionFilter3D(opts?: AdmissionScore3DOptions): (raw: unknown) => boolean;
|
|
1285
|
-
|
|
1286
|
-
type MemoryTiersOptions<TMem> = {
|
|
1287
|
-
/** Exponential decay rate per second for active tier.
|
|
1288
|
-
* Default: 7-day half-life ≈ ln(2)/(7×86400) ≈ 0.00000114. */
|
|
1289
|
-
decayRate?: number;
|
|
1290
|
-
/** Max entries in the active tier before archiving lowest-scored (default 1000). */
|
|
1291
|
-
maxActive?: number;
|
|
1292
|
-
/** Score threshold below which active entries get archived (default 0.1). */
|
|
1293
|
-
archiveThreshold?: number;
|
|
1294
|
-
/** Predicate: true → entry belongs in permanent tier (default: never). */
|
|
1295
|
-
permanentFilter?: (key: string, mem: TMem) => boolean;
|
|
1296
|
-
/** Storage tier for the archive. Omit to disable archiving. */
|
|
1297
|
-
archiveTier?: StorageTier;
|
|
1298
|
-
/** Options forwarded to `graph.attachStorage` for the archive tier. */
|
|
1299
|
-
archiveStorageOptions?: GraphAttachStorageOptions;
|
|
1300
|
-
};
|
|
1301
|
-
type MemoryTiersBundle<TMem> = {
|
|
1302
|
-
/** Permanent tier: never evicted. */
|
|
1303
|
-
readonly permanent: LightCollectionBundle<TMem>;
|
|
1304
|
-
/** Active entries node (reactive, holds ReadonlyMap). */
|
|
1305
|
-
readonly activeEntries: Node<unknown>;
|
|
1306
|
-
/** Archive storage handle (null if no tier configured). */
|
|
1307
|
-
readonly archiveHandle: StorageHandle | null;
|
|
1308
|
-
/** Classify a key into its current tier. */
|
|
1309
|
-
tierOf: (key: string) => MemoryTier;
|
|
1310
|
-
/** Move a key to the permanent tier. */
|
|
1311
|
-
markPermanent: (key: string, value: TMem) => void;
|
|
1312
|
-
};
|
|
1472
|
+
|
|
1313
1473
|
type RetrievalQuery = {
|
|
1314
1474
|
readonly text?: string;
|
|
1315
1475
|
readonly vector?: readonly number[];
|
|
@@ -1369,6 +1529,38 @@ type RetrievalTrace<TMem> = {
|
|
|
1369
1529
|
readonly ranked: ReadonlyArray<RetrievalEntry<TMem>>;
|
|
1370
1530
|
readonly packed: ReadonlyArray<RetrievalEntry<TMem>>;
|
|
1371
1531
|
};
|
|
1532
|
+
|
|
1533
|
+
type MemoryTier = "permanent" | "active" | "archived";
|
|
1534
|
+
type MemoryTiersOptions<TMem> = {
|
|
1535
|
+
/** Exponential decay rate per second for active tier.
|
|
1536
|
+
* Default: 7-day half-life ≈ ln(2)/(7×86400) ≈ 0.00000114. */
|
|
1537
|
+
decayRate?: number;
|
|
1538
|
+
/** Max entries in the active tier before archiving lowest-scored (default 1000). */
|
|
1539
|
+
maxActive?: number;
|
|
1540
|
+
/** Score threshold below which active entries get archived (default 0.1). */
|
|
1541
|
+
archiveThreshold?: number;
|
|
1542
|
+
/** Predicate: true → entry belongs in permanent tier (default: never). */
|
|
1543
|
+
permanentFilter?: (key: string, mem: TMem) => boolean;
|
|
1544
|
+
/** Storage tier for the archive. Omit to disable archiving. */
|
|
1545
|
+
archiveTier?: StorageTier;
|
|
1546
|
+
/** Options forwarded to `graph.attachStorage` for the archive tier. */
|
|
1547
|
+
archiveStorageOptions?: GraphAttachStorageOptions;
|
|
1548
|
+
};
|
|
1549
|
+
/** @internal */
|
|
1550
|
+
declare const DEFAULT_DECAY_RATE: number;
|
|
1551
|
+
type MemoryTiersBundle<TMem> = {
|
|
1552
|
+
/** Permanent tier: never evicted. */
|
|
1553
|
+
readonly permanent: LightCollectionBundle<TMem>;
|
|
1554
|
+
/** Active entries node (reactive, holds ReadonlyMap). */
|
|
1555
|
+
readonly activeEntries: Node<unknown>;
|
|
1556
|
+
/** Archive storage handle (null if no tier configured). */
|
|
1557
|
+
readonly archiveHandle: StorageHandle | null;
|
|
1558
|
+
/** Classify a key into its current tier. */
|
|
1559
|
+
tierOf: (key: string) => MemoryTier;
|
|
1560
|
+
/** Move a key to the permanent tier. */
|
|
1561
|
+
markPermanent: (key: string, value: TMem) => void;
|
|
1562
|
+
};
|
|
1563
|
+
|
|
1372
1564
|
type AgentMemoryOptions<TMem = unknown> = {
|
|
1373
1565
|
graph?: GraphOptions;
|
|
1374
1566
|
/** LLM adapter for extraction and consolidation. */
|
|
@@ -1397,269 +1589,120 @@ type AgentMemoryOptions<TMem = unknown> = {
|
|
|
1397
1589
|
vectorDimensions?: number;
|
|
1398
1590
|
/**
|
|
1399
1591
|
* B12: optional accessor for an entry's hierarchical context breadcrumb
|
|
1400
|
-
* (e.g. `["projects", "auth", "tokens"]`). When supplied alongside
|
|
1401
|
-
* `contextWeight > 0`, retrieval applies a score boost for entries whose
|
|
1402
|
-
* context shares a prefix with the query's `context`. Entries without
|
|
1403
|
-
* a breadcrumb are scored flatly.
|
|
1404
|
-
*/
|
|
1405
|
-
contextOf?: (mem: TMem) => readonly string[] | undefined;
|
|
1406
|
-
/**
|
|
1407
|
-
* B12: hierarchical context boost multiplier. Score is scaled by
|
|
1408
|
-
* `(1 + contextWeight * sharedDepth / queryDepth)` when both the query
|
|
1409
|
-
* and entry supply a `context`. Default: 0.
|
|
1410
|
-
*/
|
|
1411
|
-
contextWeight?: number;
|
|
1412
|
-
/** Extract embedding vector from a memory entry (enables vector index). */
|
|
1413
|
-
embedFn?: (mem: TMem) => readonly number[] | undefined;
|
|
1414
|
-
/** Enable knowledge graph for entity/relation tracking. */
|
|
1415
|
-
enableKnowledgeGraph?: boolean;
|
|
1416
|
-
/** Extract entities and relations from a memory entry. */
|
|
1417
|
-
entityFn?: (key: string, mem: TMem) => {
|
|
1418
|
-
entities?: Array<{
|
|
1419
|
-
id: string;
|
|
1420
|
-
value: unknown;
|
|
1421
|
-
}>;
|
|
1422
|
-
relations?: Array<{
|
|
1423
|
-
from: string;
|
|
1424
|
-
to: string;
|
|
1425
|
-
relation: string;
|
|
1426
|
-
weight?: number;
|
|
1427
|
-
}>;
|
|
1428
|
-
} | undefined;
|
|
1429
|
-
/** 3-tier storage configuration. Omit to use single-tier (existing behavior). */
|
|
1430
|
-
tiers?: MemoryTiersOptions<TMem>;
|
|
1431
|
-
/** Retrieval pipeline configuration. Requires vector index or knowledge graph. */
|
|
1432
|
-
retrieval?: {
|
|
1433
|
-
/** Max candidates from vector search (default 20). */
|
|
1434
|
-
topK?: number;
|
|
1435
|
-
/** KG expansion depth in hops (default 1). */
|
|
1436
|
-
graphDepth?: number;
|
|
1437
|
-
};
|
|
1438
|
-
/** Periodic reflection/consolidation configuration. */
|
|
1439
|
-
reflection?: {
|
|
1440
|
-
/** Interval in ms between consolidation runs (default 300_000 = 5 min). */
|
|
1441
|
-
interval?: number;
|
|
1442
|
-
/** Enable/disable periodic reflection (default true when consolidateFn is available). */
|
|
1443
|
-
enabled?: boolean;
|
|
1444
|
-
};
|
|
1445
|
-
};
|
|
1446
|
-
type AgentMemoryGraph<TMem = unknown> = Graph & {
|
|
1447
|
-
readonly distillBundle: DistillBundle<TMem>;
|
|
1448
|
-
readonly compact: Node<Array<{
|
|
1449
|
-
key: string;
|
|
1450
|
-
value: TMem;
|
|
1451
|
-
score: number;
|
|
1452
|
-
}>>;
|
|
1453
|
-
readonly size: Node<number>;
|
|
1454
|
-
/** Vector index bundle (null if not enabled). */
|
|
1455
|
-
readonly vectors: VectorIndexBundle<TMem> | null;
|
|
1456
|
-
/** Knowledge graph (null if not enabled). */
|
|
1457
|
-
readonly kg: KnowledgeGraphGraph<unknown, string> | null;
|
|
1458
|
-
/** Memory tiers bundle (null if not configured). */
|
|
1459
|
-
readonly memoryTiers: MemoryTiersBundle<TMem> | null;
|
|
1460
|
-
/** Retrieval result node (null if no retrieval pipeline configured). */
|
|
1461
|
-
readonly retrieval: Node<ReadonlyArray<RetrievalEntry<TMem>>> | null;
|
|
1462
|
-
/** Latest retrieval trace for observability (null if no retrieval pipeline). */
|
|
1463
|
-
readonly retrievalTrace: Node<RetrievalTrace<TMem> | null> | null;
|
|
1464
|
-
/**
|
|
1465
|
-
* Execute a retrieval query (null if no retrieval pipeline).
|
|
1466
|
-
*
|
|
1467
|
-
* **Synchronous consumer API** — returns the result immediately and batch-writes
|
|
1468
|
-
* `retrieval` and `retrievalTrace` state nodes for observers. Reads the store
|
|
1469
|
-
* snapshot and context value **at call time** (external-boundary read).
|
|
1470
|
-
*
|
|
1471
|
-
* **Do not call from inside a reactive fn body** (derived fn, subscribe callback,
|
|
1472
|
-
* effect body). The cache reads would become transitive protocol violations and
|
|
1473
|
-
* may observe wave-progressive rather than wave-final state.
|
|
1474
|
-
*
|
|
1475
|
-
* **Caller-batch caveat:** if invoked inside a caller's `batch(() => ...)` alongside
|
|
1476
|
-
* upstream store mutations, the store snapshot reflects what has been committed to
|
|
1477
|
-
* `store.entries.cache` at call time. State-backed stores update cache synchronously
|
|
1478
|
-
* so batched inserts are visible; derived-backed store transforms may defer. If you
|
|
1479
|
-
* need fresh state after batched mutations, call `retrieve` after the batch returns.
|
|
1480
|
-
*/
|
|
1481
|
-
readonly retrieve: ((query: RetrievalQuery) => ReadonlyArray<RetrievalEntry<TMem>>) | null;
|
|
1482
|
-
/**
|
|
1483
|
-
* Reactive sibling of {@link retrieve}. Given a reactive
|
|
1484
|
-
* `RetrievalQuery | null` source, returns a `Node` emitting the packed
|
|
1485
|
-
* retrieval results. Composable with graph topology — subscribe it,
|
|
1486
|
-
* chain it into `promptNode`, or switchMap over a user-input node.
|
|
1487
|
-
* Null when no retrieval pipeline is configured.
|
|
1488
|
-
*/
|
|
1489
|
-
readonly retrieveReactive: ((queryInput: NodeInput<RetrievalQuery | null>) => Node<ReadonlyArray<RetrievalEntry<TMem>>>) | null;
|
|
1490
|
-
};
|
|
1491
|
-
declare function agentMemory<TMem = unknown>(name: string, source: NodeInput<unknown>, opts: AgentMemoryOptions<TMem>): AgentMemoryGraph<TMem>;
|
|
1492
|
-
type AgentLoopOptions = {
|
|
1493
|
-
graph?: GraphOptions;
|
|
1494
|
-
adapter: LLMAdapter;
|
|
1495
|
-
tools?: readonly ToolDefinition[];
|
|
1496
|
-
systemPrompt?: string;
|
|
1497
|
-
maxTurns?: number;
|
|
1498
|
-
stopWhen?: (response: LLMResponse) => boolean;
|
|
1499
|
-
onToolCall?: (call: ToolCall) => void;
|
|
1500
|
-
maxMessages?: number;
|
|
1501
|
-
model?: string;
|
|
1502
|
-
temperature?: number;
|
|
1503
|
-
maxTokens?: number;
|
|
1504
|
-
/**
|
|
1505
|
-
* Reactive tool-call splice (COMPOSITION-GUIDE §31 "interception is security").
|
|
1506
|
-
* When set, the raw `toolCalls` node is piped through this transform before
|
|
1507
|
-
* reaching the executor. The transform is a pure reactive composition —
|
|
1508
|
-
* `(calls: Node<readonly ToolCall[]>) => Node<readonly ToolCall[]>` — so the
|
|
1509
|
-
* gate is visible in `describe()` / `explain()` as a real edge (no hidden
|
|
1510
|
-
* imperative wraps; §24).
|
|
1511
|
-
*
|
|
1512
|
-
* Typical uses:
|
|
1513
|
-
* - **Filter / block** — `derived([calls, policy], ([raw, p]) => raw.filter(p))`
|
|
1514
|
-
* - **Throttle / debounce** — `throttle(calls, windowMs)`
|
|
1515
|
-
* - **Human-in-the-loop approval** — pipe through a `gate` controller so
|
|
1516
|
-
* calls wait for human approval before reaching the executor.
|
|
1517
|
-
*
|
|
1518
|
-
* The public `agent.toolCalls` node surfaces the POST-intercept stream, so
|
|
1519
|
-
* audit / telemetry consumers see what the executor actually runs. The raw
|
|
1520
|
-
* pre-intercept stream is not exposed — tests that need it should run
|
|
1521
|
-
* without `interceptToolCalls` set (the identity case).
|
|
1522
|
-
*/
|
|
1523
|
-
interceptToolCalls?: (calls: Node<readonly ToolCall[]>) => Node<readonly ToolCall[]>;
|
|
1524
|
-
};
|
|
1525
|
-
/** A single tool execution outcome: `{id, content}` where content is a JSON string. */
|
|
1526
|
-
interface ToolResult {
|
|
1527
|
-
readonly id: string;
|
|
1528
|
-
readonly content: string;
|
|
1529
|
-
}
|
|
1530
|
-
/**
|
|
1531
|
-
* Reactive agent loop.
|
|
1532
|
-
*
|
|
1533
|
-
* The loop is a reactive state machine wired entirely from graph primitives:
|
|
1534
|
-
* `chat.messages` + `tools.schemas` + gating state feed a `promptInput`
|
|
1535
|
-
* derived; `switchMap` turns non-null inputs into an LLM invocation via
|
|
1536
|
-
* `fromAny(adapter.invoke(...))`. The LLM response drives chat writes and
|
|
1537
|
-
* status transitions via effects. Tool calls flow through a reactive
|
|
1538
|
-
* executor (`retrySource` + `rescue`) that retries once on error and
|
|
1539
|
-
* surfaces terminal errors as JSON-shaped `ToolResult` payloads for the
|
|
1540
|
-
* LLM to react to.
|
|
1541
|
-
*
|
|
1542
|
-
* **No imperative control flow inside the reactive layer** (spec §5.8-5.12):
|
|
1543
|
-
* no `while` loops, no manual `await adapter.invoke`, no polling.
|
|
1544
|
-
* `agent.run()` is a thin `awaitSettled` bridge so callers can still `await`
|
|
1545
|
-
* the loop if they want a Promise.
|
|
1546
|
-
*
|
|
1547
|
-
* Public surface:
|
|
1548
|
-
* - `chat` / `tools` — subgraphs (imperative `append` / `execute` at boundary)
|
|
1549
|
-
* - `status` / `turn` / `aborted` — state nodes with explicit initials
|
|
1550
|
-
* - `lastResponse` / `toolCalls` / `toolResults` — reactive outputs (SENTINEL until first emission; callers use `awaitSettled` / `subscribe`)
|
|
1551
|
-
* - `run(userMessage?, signal?)` — optional user append + Promise bridge
|
|
1552
|
-
* - `abort()` — imperative abort shim; flips `aborted` state
|
|
1553
|
-
*/
|
|
1554
|
-
declare class AgentLoopGraph extends Graph {
|
|
1555
|
-
readonly chat: ChatStreamGraph;
|
|
1556
|
-
readonly tools: ToolRegistryGraph;
|
|
1557
|
-
/** Current agent status. `initial: "idle"` — always has a real value. */
|
|
1558
|
-
readonly status: Node<AgentLoopStatus>;
|
|
1559
|
-
/** Turn count (completed LLM invocations this run). `initial: 0`. */
|
|
1560
|
-
readonly turn: Node<number>;
|
|
1561
|
-
/** Aborted flag; flipped by `abort()` or external `AbortSignal`. `initial: false`. */
|
|
1562
|
-
readonly aborted: Node<boolean>;
|
|
1563
|
-
/**
|
|
1564
|
-
* Most recent LLM response. State-backed mirror driven by the response
|
|
1565
|
-
* effect. `initial: null` — subscribers can read the cache synchronously;
|
|
1566
|
-
* `awaitSettled(lastResponse)` or `firstWhere(lastResponse, v => v != null)`
|
|
1567
|
-
* bridges to the first non-null value as a Promise.
|
|
1568
|
-
*/
|
|
1569
|
-
readonly lastResponse: Node<LLMResponse | null>;
|
|
1570
|
-
/** Tool-call batch emitted by the most recent LLM response. SENTINEL. */
|
|
1571
|
-
readonly toolCalls: Node<readonly ToolCall[]>;
|
|
1572
|
-
/** Tool-result batch (one entry per call) after reactive execution. SENTINEL. */
|
|
1573
|
-
readonly toolResults: Node<readonly ToolResult[]>;
|
|
1574
|
-
/** @deprecated Use `turn` instead. Pre-1.0 rename — this alias will be removed. */
|
|
1575
|
-
readonly turnCount: Node<number>;
|
|
1576
|
-
private readonly _terminalResult;
|
|
1577
|
-
private readonly _disposeRunWiring;
|
|
1578
|
-
/**
|
|
1579
|
-
* Per-agent monotonic run counter. Incremented at the start of every
|
|
1580
|
-
* `run()` call; stamped onto `_terminalResult`'s DATA emissions so a
|
|
1581
|
-
* caller's `awaitSettled` predicate resolves only on the matching run
|
|
1582
|
-
* (prevents stale-resolution under re-entrant-ish composition).
|
|
1592
|
+
* (e.g. `["projects", "auth", "tokens"]`). When supplied alongside
|
|
1593
|
+
* `contextWeight > 0`, retrieval applies a score boost for entries whose
|
|
1594
|
+
* context shares a prefix with the query's `context`. Entries without
|
|
1595
|
+
* a breadcrumb are scored flatly.
|
|
1583
1596
|
*/
|
|
1584
|
-
|
|
1585
|
-
/** Guards against overlapping `run()` calls. */
|
|
1586
|
-
private _running;
|
|
1597
|
+
contextOf?: (mem: TMem) => readonly string[] | undefined;
|
|
1587
1598
|
/**
|
|
1588
|
-
*
|
|
1589
|
-
*
|
|
1590
|
-
*
|
|
1591
|
-
* `adapter.invoke({ signal })` AND `fromAny(promise, { signal })`, so the
|
|
1592
|
-
* reactive layer sees ERROR when the wire call is cancelled.
|
|
1599
|
+
* B12: hierarchical context boost multiplier. Score is scaled by
|
|
1600
|
+
* `(1 + contextWeight * sharedDepth / queryDepth)` when both the query
|
|
1601
|
+
* and entry supply a `context`. Default: 0.
|
|
1593
1602
|
*/
|
|
1594
|
-
|
|
1595
|
-
|
|
1603
|
+
contextWeight?: number;
|
|
1604
|
+
/** Extract embedding vector from a memory entry (enables vector index). */
|
|
1605
|
+
embedFn?: (mem: TMem) => readonly number[] | undefined;
|
|
1606
|
+
/** Enable knowledge graph for entity/relation tracking. */
|
|
1607
|
+
enableKnowledgeGraph?: boolean;
|
|
1608
|
+
/** Extract entities and relations from a memory entry. */
|
|
1609
|
+
entityFn?: (key: string, mem: TMem) => {
|
|
1610
|
+
entities?: Array<{
|
|
1611
|
+
id: string;
|
|
1612
|
+
value: unknown;
|
|
1613
|
+
}>;
|
|
1614
|
+
relations?: Array<{
|
|
1615
|
+
from: string;
|
|
1616
|
+
to: string;
|
|
1617
|
+
relation: string;
|
|
1618
|
+
weight?: number;
|
|
1619
|
+
}>;
|
|
1620
|
+
} | undefined;
|
|
1621
|
+
/** 3-tier storage configuration. Omit to use single-tier (existing behavior). */
|
|
1622
|
+
tiers?: MemoryTiersOptions<TMem>;
|
|
1623
|
+
/** Retrieval pipeline configuration. Requires vector index or knowledge graph. */
|
|
1624
|
+
retrieval?: {
|
|
1625
|
+
/** Max candidates from vector search (default 20). */
|
|
1626
|
+
topK?: number;
|
|
1627
|
+
/** KG expansion depth in hops (default 1). */
|
|
1628
|
+
graphDepth?: number;
|
|
1629
|
+
};
|
|
1630
|
+
/** Periodic reflection/consolidation configuration. */
|
|
1631
|
+
reflection?: {
|
|
1632
|
+
/** Interval in ms between consolidation runs (default 300_000 = 5 min). */
|
|
1633
|
+
interval?: number;
|
|
1634
|
+
/** Enable/disable periodic reflection (default true when consolidateFn is available). */
|
|
1635
|
+
enabled?: boolean;
|
|
1636
|
+
};
|
|
1637
|
+
};
|
|
1638
|
+
type AgentMemoryGraph<TMem = unknown> = Graph & {
|
|
1639
|
+
readonly distillBundle: DistillBundle<TMem>;
|
|
1640
|
+
readonly compact: Node<Array<{
|
|
1641
|
+
key: string;
|
|
1642
|
+
value: TMem;
|
|
1643
|
+
score: number;
|
|
1644
|
+
}>>;
|
|
1645
|
+
readonly size: Node<number>;
|
|
1646
|
+
/** Vector index bundle (null if not enabled). */
|
|
1647
|
+
readonly vectors: VectorIndexBundle<TMem> | null;
|
|
1648
|
+
/** Knowledge graph (null if not enabled). */
|
|
1649
|
+
readonly kg: KnowledgeGraphGraph<unknown, string> | null;
|
|
1650
|
+
/** Memory tiers bundle (null if not configured). */
|
|
1651
|
+
readonly memoryTiers: MemoryTiersBundle<TMem> | null;
|
|
1652
|
+
/** Retrieval result node (null if no retrieval pipeline configured). */
|
|
1653
|
+
readonly retrieval: Node<ReadonlyArray<RetrievalEntry<TMem>>> | null;
|
|
1654
|
+
/** Latest retrieval trace for observability (null if no retrieval pipeline). */
|
|
1655
|
+
readonly retrievalTrace: Node<RetrievalTrace<TMem> | null> | null;
|
|
1596
1656
|
/**
|
|
1597
|
-
*
|
|
1657
|
+
* Execute a retrieval query (null if no retrieval pipeline).
|
|
1598
1658
|
*
|
|
1599
|
-
*
|
|
1600
|
-
*
|
|
1601
|
-
*
|
|
1602
|
-
* AND threads into `adapter.invoke({ signal })` so the wire call can
|
|
1603
|
-
* cancel mid-flight. The reactive `aborted` state + effect 3 guarantee
|
|
1604
|
-
* that even an adapter that ignores `signal` will stop emitting into
|
|
1605
|
-
* the agent graph.
|
|
1606
|
-
* - Resolves when `status === "done"` with the final LLM response.
|
|
1607
|
-
* Rejects with `AbortError` when the abort signal fires pre-response.
|
|
1608
|
-
* Rejects with the stage error when `status === "error"`.
|
|
1659
|
+
* **Synchronous consumer API** — returns the result immediately and batch-writes
|
|
1660
|
+
* `retrieval` and `retrievalTrace` state nodes for observers. Reads the store
|
|
1661
|
+
* snapshot and context value **at call time** (external-boundary read).
|
|
1609
1662
|
*
|
|
1610
|
-
* **
|
|
1611
|
-
*
|
|
1612
|
-
*
|
|
1613
|
-
*
|
|
1614
|
-
*
|
|
1663
|
+
* **Do not call from inside a reactive fn body** (derived fn, subscribe callback,
|
|
1664
|
+
* effect body). The cache reads would become transitive protocol violations and
|
|
1665
|
+
* may observe wave-progressive rather than wave-final state.
|
|
1666
|
+
*
|
|
1667
|
+
* **Caller-batch caveat:** if invoked inside a caller's `batch(() => ...)` alongside
|
|
1668
|
+
* upstream store mutations, the store snapshot reflects what has been committed to
|
|
1669
|
+
* `store.entries.cache` at call time. State-backed stores update cache synchronously
|
|
1670
|
+
* so batched inserts are visible; derived-backed store transforms may defer. If you
|
|
1671
|
+
* need fresh state after batched mutations, call `retrieve` after the batch returns.
|
|
1615
1672
|
*/
|
|
1616
|
-
|
|
1673
|
+
readonly retrieve: ((query: RetrievalQuery) => ReadonlyArray<RetrievalEntry<TMem>>) | null;
|
|
1617
1674
|
/**
|
|
1618
|
-
*
|
|
1619
|
-
* `
|
|
1675
|
+
* Reactive sibling of {@link retrieve}. Given a reactive
|
|
1676
|
+
* `RetrievalQuery | null` source, returns a `Node` emitting the packed
|
|
1677
|
+
* retrieval results. Composable with graph topology — subscribe it,
|
|
1678
|
+
* chain it into `promptNode`, or switchMap over a user-input node.
|
|
1679
|
+
* Null when no retrieval pipeline is configured.
|
|
1620
1680
|
*/
|
|
1621
|
-
|
|
1622
|
-
destroy(): void;
|
|
1623
|
-
}
|
|
1624
|
-
declare function agentLoop(name: string, opts: AgentLoopOptions): AgentLoopGraph;
|
|
1625
|
-
/** OpenAI function-calling tool schema. */
|
|
1626
|
-
type OpenAIToolSchema = {
|
|
1627
|
-
readonly type: "function";
|
|
1628
|
-
readonly function: {
|
|
1629
|
-
readonly name: string;
|
|
1630
|
-
readonly description: string;
|
|
1631
|
-
readonly parameters: Record<string, unknown>;
|
|
1632
|
-
};
|
|
1633
|
-
};
|
|
1634
|
-
/** MCP (Model Context Protocol) tool schema. */
|
|
1635
|
-
type McpToolSchema = {
|
|
1636
|
-
readonly name: string;
|
|
1637
|
-
readonly description: string;
|
|
1638
|
-
readonly inputSchema: Record<string, unknown>;
|
|
1681
|
+
readonly retrieveReactive: ((queryInput: NodeInput<RetrievalQuery | null>) => Node<ReadonlyArray<RetrievalEntry<TMem>>>) | null;
|
|
1639
1682
|
};
|
|
1640
|
-
|
|
1641
|
-
|
|
1642
|
-
|
|
1643
|
-
|
|
1644
|
-
|
|
1645
|
-
|
|
1646
|
-
|
|
1647
|
-
readonly definitions: readonly ToolDefinition[];
|
|
1683
|
+
declare function agentMemory<TMem = unknown>(name: string, source: NodeInput<unknown>, opts: AgentMemoryOptions<TMem>): AgentMemoryGraph<TMem>;
|
|
1684
|
+
|
|
1685
|
+
type LLMExtractorOptions = {
|
|
1686
|
+
adapter: LLMAdapter;
|
|
1687
|
+
model?: string;
|
|
1688
|
+
temperature?: number;
|
|
1689
|
+
maxTokens?: number;
|
|
1648
1690
|
};
|
|
1649
1691
|
/**
|
|
1650
|
-
*
|
|
1651
|
-
*
|
|
1652
|
-
* Knobs are state nodes whose `meta.access` is `"llm"`, `"both"`, or absent
|
|
1653
|
-
* (default: writable). Each knob becomes a tool that calls `graph.set()`.
|
|
1654
|
-
*
|
|
1655
|
-
* Speaks **domain language** (spec §5.4): the returned schemas use node names
|
|
1656
|
-
* and meta descriptions — no protocol internals exposed.
|
|
1692
|
+
* Returns an `extractFn` callback for `distill()` that invokes an LLM to
|
|
1693
|
+
* extract structured memories from raw input.
|
|
1657
1694
|
*
|
|
1658
|
-
*
|
|
1659
|
-
*
|
|
1660
|
-
* @returns OpenAI, MCP, and GraphReFly tool schemas.
|
|
1695
|
+
* The system prompt should instruct the LLM to return JSON matching
|
|
1696
|
+
* `Extraction<TMem>` shape: `{ upsert: [{ key, value }], remove?: [key] }`.
|
|
1661
1697
|
*/
|
|
1662
|
-
declare function
|
|
1698
|
+
declare function llmExtractor<TRaw, TMem>(systemPrompt: string, opts: LLMExtractorOptions): (raw: TRaw, existing: ReadonlyMap<string, TMem>) => NodeInput<Extraction<TMem>>;
|
|
1699
|
+
type LLMConsolidatorOptions = LLMExtractorOptions;
|
|
1700
|
+
/**
|
|
1701
|
+
* Returns a `consolidateFn` callback for `distill()` that invokes an LLM to
|
|
1702
|
+
* cluster and merge related memories.
|
|
1703
|
+
*/
|
|
1704
|
+
declare function llmConsolidator<TMem>(systemPrompt: string, opts: LLMConsolidatorOptions): (entries: ReadonlyMap<string, TMem>) => NodeInput<Extraction<TMem>>;
|
|
1705
|
+
|
|
1663
1706
|
type GaugesAsContextOptions = {
|
|
1664
1707
|
/** Group gauges by `meta.tags` (default true). */
|
|
1665
1708
|
groupByTags?: boolean;
|
|
@@ -1691,25 +1734,7 @@ type GaugesAsContextOptions = {
|
|
|
1691
1734
|
* @returns A formatted string ready for system prompt injection.
|
|
1692
1735
|
*/
|
|
1693
1736
|
declare function gaugesAsContext(graph: Graph, actor?: Actor, options?: GaugesAsContextOptions): string;
|
|
1694
|
-
|
|
1695
|
-
type GraphDefValidation = {
|
|
1696
|
-
readonly valid: boolean;
|
|
1697
|
-
readonly errors: readonly string[];
|
|
1698
|
-
};
|
|
1699
|
-
/**
|
|
1700
|
-
* Validate an LLM-generated graph definition before passing to
|
|
1701
|
-
* `Graph.fromSnapshot()`.
|
|
1702
|
-
*
|
|
1703
|
-
* Checks:
|
|
1704
|
-
* - Required fields: `name`, `nodes`, `edges`
|
|
1705
|
-
* - Node types are valid enum values
|
|
1706
|
-
* - Edge `from`/`to` reference existing nodes
|
|
1707
|
-
* - No duplicate edge entries
|
|
1708
|
-
*
|
|
1709
|
-
* @param def - The graph definition to validate (parsed JSON).
|
|
1710
|
-
* @returns Validation result with errors array.
|
|
1711
|
-
*/
|
|
1712
|
-
declare function validateGraphDef(def: unknown): GraphDefValidation;
|
|
1737
|
+
|
|
1713
1738
|
type GraphFromSpecOptions = {
|
|
1714
1739
|
model?: string;
|
|
1715
1740
|
temperature?: number;
|
|
@@ -1732,6 +1757,46 @@ type GraphFromSpecOptions = {
|
|
|
1732
1757
|
* @throws On invalid LLM output or validation failure.
|
|
1733
1758
|
*/
|
|
1734
1759
|
declare function graphFromSpec(naturalLanguage: string, adapter: LLMAdapter, opts?: GraphFromSpecOptions): Promise<Graph>;
|
|
1760
|
+
|
|
1761
|
+
/** OpenAI function-calling tool schema. */
|
|
1762
|
+
type OpenAIToolSchema = {
|
|
1763
|
+
readonly type: "function";
|
|
1764
|
+
readonly function: {
|
|
1765
|
+
readonly name: string;
|
|
1766
|
+
readonly description: string;
|
|
1767
|
+
readonly parameters: Record<string, unknown>;
|
|
1768
|
+
};
|
|
1769
|
+
};
|
|
1770
|
+
/** MCP (Model Context Protocol) tool schema. */
|
|
1771
|
+
type McpToolSchema = {
|
|
1772
|
+
readonly name: string;
|
|
1773
|
+
readonly description: string;
|
|
1774
|
+
readonly inputSchema: Record<string, unknown>;
|
|
1775
|
+
};
|
|
1776
|
+
/** Result of {@link knobsAsTools}. */
|
|
1777
|
+
type KnobsAsToolsResult = {
|
|
1778
|
+
/** OpenAI function-calling tool schemas. */
|
|
1779
|
+
readonly openai: readonly OpenAIToolSchema[];
|
|
1780
|
+
/** MCP tool schemas. */
|
|
1781
|
+
readonly mcp: readonly McpToolSchema[];
|
|
1782
|
+
/** GraphReFly ToolDefinitions with handlers that call `graph.set()`. */
|
|
1783
|
+
readonly definitions: readonly ToolDefinition[];
|
|
1784
|
+
};
|
|
1785
|
+
/**
|
|
1786
|
+
* Derive tool schemas from a graph's writable (knob) nodes.
|
|
1787
|
+
*
|
|
1788
|
+
* Knobs are state nodes whose `meta.access` is `"llm"`, `"both"`, or absent
|
|
1789
|
+
* (default: writable). Each knob becomes a tool that calls `graph.set()`.
|
|
1790
|
+
*
|
|
1791
|
+
* Speaks **domain language** (spec §5.4): the returned schemas use node names
|
|
1792
|
+
* and meta descriptions — no protocol internals exposed.
|
|
1793
|
+
*
|
|
1794
|
+
* @param graph - The graph to introspect.
|
|
1795
|
+
* @param actor - Optional actor for guard-scoped describe.
|
|
1796
|
+
* @returns OpenAI, MCP, and GraphReFly tool schemas.
|
|
1797
|
+
*/
|
|
1798
|
+
declare function knobsAsTools(graph: Graph, actor?: Actor): KnobsAsToolsResult;
|
|
1799
|
+
|
|
1735
1800
|
/** A single operation in a strategy plan. */
|
|
1736
1801
|
type StrategyOperation = {
|
|
1737
1802
|
readonly type: "add_node";
|
|
@@ -1788,6 +1853,40 @@ type SuggestStrategyOptions = {
|
|
|
1788
1853
|
*/
|
|
1789
1854
|
declare function suggestStrategy(graph: Graph, problem: string, adapter: LLMAdapter, opts?: SuggestStrategyOptions): Promise<StrategyPlan>;
|
|
1790
1855
|
|
|
1856
|
+
/** Validation result from {@link validateGraphDef}. */
|
|
1857
|
+
type GraphDefValidation = {
|
|
1858
|
+
readonly valid: boolean;
|
|
1859
|
+
readonly errors: readonly string[];
|
|
1860
|
+
};
|
|
1861
|
+
/**
|
|
1862
|
+
* Validate an LLM-generated graph definition before passing to
|
|
1863
|
+
* `Graph.fromSnapshot()`.
|
|
1864
|
+
*
|
|
1865
|
+
* Checks:
|
|
1866
|
+
* - Required fields: `name`, `nodes`, `edges`
|
|
1867
|
+
* - Node types are valid enum values
|
|
1868
|
+
* - Edge `from`/`to` reference existing nodes
|
|
1869
|
+
* - No duplicate edge entries
|
|
1870
|
+
*
|
|
1871
|
+
* @param def - The graph definition to validate (parsed JSON).
|
|
1872
|
+
* @returns Validation result with errors array.
|
|
1873
|
+
*/
|
|
1874
|
+
declare function validateGraphDef(def: unknown): GraphDefValidation;
|
|
1875
|
+
|
|
1876
|
+
/**
|
|
1877
|
+
* AI surface patterns (roadmap §4.4).
|
|
1878
|
+
*
|
|
1879
|
+
* Domain-layer factories for LLM-backed agents, chat, tool registries, and
|
|
1880
|
+
* agentic memory. Composed from core + extra + Phase 3–4.3 primitives.
|
|
1881
|
+
*
|
|
1882
|
+
* This file is the public barrel — it re-exports symbols from the sibling
|
|
1883
|
+
* folders (`prompts/`, `extractors/`, `safety/`, `agents/`, `memory/`,
|
|
1884
|
+
* `graph-integration/`, and the existing `adapters/` tree). No implementation
|
|
1885
|
+
* code lives here; see each sibling folder for the actual primitives.
|
|
1886
|
+
*
|
|
1887
|
+
* @module
|
|
1888
|
+
*/
|
|
1889
|
+
|
|
1791
1890
|
declare const index_AdapterProvider: typeof AdapterProvider;
|
|
1792
1891
|
type index_AdapterStats = AdapterStats;
|
|
1793
1892
|
declare const index_AdapterTier: typeof AdapterTier;
|
|
@@ -1821,6 +1920,7 @@ type index_ContentGateOptions = ContentGateOptions;
|
|
|
1821
1920
|
type index_CostMeterOptions = CostMeterOptions;
|
|
1822
1921
|
type index_CostMeterReading = CostMeterReading;
|
|
1823
1922
|
declare const index_CreateAdapterOptions: typeof CreateAdapterOptions;
|
|
1923
|
+
declare const index_DEFAULT_DECAY_RATE: typeof DEFAULT_DECAY_RATE;
|
|
1824
1924
|
type index_DryRunAdapterOptions = DryRunAdapterOptions;
|
|
1825
1925
|
type index_ExtractedToolCall = ExtractedToolCall;
|
|
1826
1926
|
declare const index_FallbackAdapterOptions: typeof FallbackAdapterOptions;
|
|
@@ -1951,7 +2051,7 @@ declare const index_withRetry: typeof withRetry;
|
|
|
1951
2051
|
declare const index_withTimeout: typeof withTimeout;
|
|
1952
2052
|
declare const index_zeroPrice: typeof zeroPrice;
|
|
1953
2053
|
declare namespace index {
|
|
1954
|
-
export { index_AdapterProvider as AdapterProvider, type index_AdapterStats as AdapterStats, index_AdapterTier as AdapterTier, type index_AdmissionScore3DOptions as AdmissionScore3DOptions, type index_AdmissionScores as AdmissionScores, index_AgentLoopGraph as AgentLoopGraph, type index_AgentLoopOptions as AgentLoopOptions, type index_AgentLoopStatus as AgentLoopStatus, type index_AgentMemoryGraph as AgentMemoryGraph, type index_AgentMemoryOptions as AgentMemoryOptions, index_AllTiersExhaustedError as AllTiersExhaustedError, type index_AnthropicAdapterOptions as AnthropicAdapterOptions, type index_AnthropicSdkLike as AnthropicSdkLike, type index_BudgetCaps as BudgetCaps, index_BudgetExhaustedError as BudgetExhaustedError, type index_BudgetGateBundle as BudgetGateBundle, type index_BudgetTotals as BudgetTotals, type index_CallStatsEvent as CallStatsEvent, index_CapabilitiesRegistry as CapabilitiesRegistry, index_CascadeExhaustionReport as CascadeExhaustionReport, index_CascadingLlmAdapterOptions as CascadingLlmAdapterOptions, index_ChatMessage as ChatMessage, index_ChatStreamGraph as ChatStreamGraph, type index_ChatStreamOptions as ChatStreamOptions, index_CircuitOpenError as CircuitOpenError, type index_ContentDecision as ContentDecision, type index_ContentGateOptions as ContentGateOptions, type index_CostMeterOptions as CostMeterOptions, type index_CostMeterReading as CostMeterReading, index_CreateAdapterOptions as CreateAdapterOptions, type index_DryRunAdapterOptions as DryRunAdapterOptions, type index_ExtractedToolCall as ExtractedToolCall, index_FallbackAdapterOptions as FallbackAdapterOptions, index_FallbackFixture as FallbackFixture, index_FallbackMissError as FallbackMissError, index_FallbackMissPolicy as FallbackMissPolicy, type index_FromLLMOptions as FromLLMOptions, type index_FrozenContextOptions as FrozenContextOptions, type index_GatedStreamHandle as GatedStreamHandle, type index_GatedStreamOptions as GatedStreamOptions, type index_GaugesAsContextOptions as GaugesAsContextOptions, type index_GoogleAdapterOptions as GoogleAdapterOptions, type index_GoogleSdkLike as GoogleSdkLike, type index_GraphDefValidation as GraphDefValidation, type index_GraphFromSpecOptions as GraphFromSpecOptions, type index_HandoffOptions as HandoffOptions, type index_HttpErrorLike as HttpErrorLike, type index_KeywordFlag as KeywordFlag, type index_KeywordFlagExtractorOptions as KeywordFlagExtractorOptions, type index_KnobsAsToolsResult as KnobsAsToolsResult, index_LLMAdapter as LLMAdapter, type index_LLMConsolidatorOptions as LLMConsolidatorOptions, type index_LLMExtractorOptions as LLMExtractorOptions, index_LLMInvokeOptions as LLMInvokeOptions, index_LLMResponse as LLMResponse, index_LLMTimeoutError as LLMTimeoutError, type index_McpToolSchema as McpToolSchema, type index_MemoryTier as MemoryTier, type index_MemoryTiersBundle as MemoryTiersBundle, type index_MemoryTiersOptions as MemoryTiersOptions, index_ModelCapabilities as ModelCapabilities, index_ModelFeatures as ModelFeatures, index_ModelLimits as ModelLimits, index_ModelPricing as ModelPricing, index_OpenAICompatAdapterOptions as OpenAICompatAdapterOptions, index_OpenAICompatPreset as OpenAICompatPreset, index_OpenAISdkLike as OpenAISdkLike, type index_OpenAIToolSchema as OpenAIToolSchema, index_PriceBreakdown as PriceBreakdown, index_PricingFn as PricingFn, index_PricingRegistry as PricingRegistry, type index_PromptNodeOptions as PromptNodeOptions, index_Rate as Rate, type index_RedactorOptions as RedactorOptions, index_ReplayCacheKeyContext as ReplayCacheKeyContext, index_ReplayCacheMissError as ReplayCacheMissError, index_ReplayCacheMode as ReplayCacheMode, type index_ResilientAdapterBundle as ResilientAdapterBundle, type index_ResilientAdapterOptions as ResilientAdapterOptions, type index_RetrievalEntry as RetrievalEntry, type index_RetrievalPipelineOptions as RetrievalPipelineOptions, type index_RetrievalQuery as RetrievalQuery, type index_RetrievalTrace as RetrievalTrace, type index_StrategyOperation as StrategyOperation, type index_StrategyPlan as StrategyPlan, type index_StreamChunk as StreamChunk, index_StreamDelta as StreamDelta, type index_StreamingPromptNodeHandle as StreamingPromptNodeHandle, type index_StreamingPromptNodeOptions as StreamingPromptNodeOptions, type index_SuggestStrategyOptions as SuggestStrategyOptions, type index_SystemPromptHandle as SystemPromptHandle, index_TieredRate as TieredRate, index_TokenUsage as TokenUsage, index_ToolCall as ToolCall, index_ToolDefinition as ToolDefinition, index_ToolRegistryGraph as ToolRegistryGraph, type index_ToolRegistryOptions as ToolRegistryOptions, type index_ToolResult as ToolResult, type index_ToolSelectorOptions as ToolSelectorOptions, type index_WithBreakerOptions as WithBreakerOptions, type index_WithBudgetGateOptions as WithBudgetGateOptions, type index_WithDryRunBundle as WithDryRunBundle, type index_WithDryRunOptions as WithDryRunOptions, type index_WithRateLimiterOptions as WithRateLimiterOptions, index_WithReplayCacheOptions as WithReplayCacheOptions, type index_WithRetryOptions as WithRetryOptions, index_admissionFilter3D as admissionFilter3D, index_agentLoop as agentLoop, index_agentMemory as agentMemory, index_anthropicAdapter as anthropicAdapter, index_canonicalJson as canonicalJson, index_cascadingLlmAdapter as cascadingLlmAdapter, index_chatStream as chatStream, index_composePricing as composePricing, index_computePrice as computePrice, index_contentGate as contentGate, index_costMeterExtractor as costMeterExtractor, index_createAdapter as createAdapter, index_createCapabilitiesRegistry as createCapabilitiesRegistry, index_createPricingRegistry as createPricingRegistry, index_dryRunAdapter as dryRunAdapter, index_dryRunPreset as dryRunPreset, index_fallbackAdapter as fallbackAdapter, index_fromLLM as fromLLM, index_frozenContext as frozenContext, index_gatedStream as gatedStream, index_gaugesAsContext as gaugesAsContext, index_googleAdapter as googleAdapter, index_graphFromSpec as graphFromSpec, index_handoff as handoff, index_keywordFlagExtractor as keywordFlagExtractor, index_knobsAsTools as knobsAsTools, index_llmConsolidator as llmConsolidator, index_llmExtractor as llmExtractor, index_observableAdapter as observableAdapter, index_openAICompatAdapter as openAICompatAdapter, index_parseRateLimitFromError as parseRateLimitFromError, index_promptNode as promptNode, index_redactor as redactor, index_registryPricing as registryPricing, index_resilientAdapter as resilientAdapter, index_streamExtractor as streamExtractor, index_streamingPromptNode as streamingPromptNode, index_suggestStrategy as suggestStrategy, index_systemPromptBuilder as systemPromptBuilder, index_toolCallExtractor as toolCallExtractor, index_toolRegistry as toolRegistry, index_toolSelector as toolSelector, index_validateGraphDef as validateGraphDef, index_withBreaker as withBreaker, index_withBudgetGate as withBudgetGate, index_withDryRun as withDryRun, index_withRateLimiter as withRateLimiter, index_withReplayCache as withReplayCache, index_withRetry as withRetry, index_withTimeout as withTimeout, index_zeroPrice as zeroPrice };
|
|
2054
|
+
export { index_AdapterProvider as AdapterProvider, type index_AdapterStats as AdapterStats, index_AdapterTier as AdapterTier, type index_AdmissionScore3DOptions as AdmissionScore3DOptions, type index_AdmissionScores as AdmissionScores, index_AgentLoopGraph as AgentLoopGraph, type index_AgentLoopOptions as AgentLoopOptions, type index_AgentLoopStatus as AgentLoopStatus, type index_AgentMemoryGraph as AgentMemoryGraph, type index_AgentMemoryOptions as AgentMemoryOptions, index_AllTiersExhaustedError as AllTiersExhaustedError, type index_AnthropicAdapterOptions as AnthropicAdapterOptions, type index_AnthropicSdkLike as AnthropicSdkLike, type index_BudgetCaps as BudgetCaps, index_BudgetExhaustedError as BudgetExhaustedError, type index_BudgetGateBundle as BudgetGateBundle, type index_BudgetTotals as BudgetTotals, type index_CallStatsEvent as CallStatsEvent, index_CapabilitiesRegistry as CapabilitiesRegistry, index_CascadeExhaustionReport as CascadeExhaustionReport, index_CascadingLlmAdapterOptions as CascadingLlmAdapterOptions, index_ChatMessage as ChatMessage, index_ChatStreamGraph as ChatStreamGraph, type index_ChatStreamOptions as ChatStreamOptions, index_CircuitOpenError as CircuitOpenError, type index_ContentDecision as ContentDecision, type index_ContentGateOptions as ContentGateOptions, type index_CostMeterOptions as CostMeterOptions, type index_CostMeterReading as CostMeterReading, index_CreateAdapterOptions as CreateAdapterOptions, index_DEFAULT_DECAY_RATE as DEFAULT_DECAY_RATE, type index_DryRunAdapterOptions as DryRunAdapterOptions, type index_ExtractedToolCall as ExtractedToolCall, index_FallbackAdapterOptions as FallbackAdapterOptions, index_FallbackFixture as FallbackFixture, index_FallbackMissError as FallbackMissError, index_FallbackMissPolicy as FallbackMissPolicy, type index_FromLLMOptions as FromLLMOptions, type index_FrozenContextOptions as FrozenContextOptions, type index_GatedStreamHandle as GatedStreamHandle, type index_GatedStreamOptions as GatedStreamOptions, type index_GaugesAsContextOptions as GaugesAsContextOptions, type index_GoogleAdapterOptions as GoogleAdapterOptions, type index_GoogleSdkLike as GoogleSdkLike, type index_GraphDefValidation as GraphDefValidation, type index_GraphFromSpecOptions as GraphFromSpecOptions, type index_HandoffOptions as HandoffOptions, type index_HttpErrorLike as HttpErrorLike, type index_KeywordFlag as KeywordFlag, type index_KeywordFlagExtractorOptions as KeywordFlagExtractorOptions, type index_KnobsAsToolsResult as KnobsAsToolsResult, index_LLMAdapter as LLMAdapter, type index_LLMConsolidatorOptions as LLMConsolidatorOptions, type index_LLMExtractorOptions as LLMExtractorOptions, index_LLMInvokeOptions as LLMInvokeOptions, index_LLMResponse as LLMResponse, index_LLMTimeoutError as LLMTimeoutError, type index_McpToolSchema as McpToolSchema, type index_MemoryTier as MemoryTier, type index_MemoryTiersBundle as MemoryTiersBundle, type index_MemoryTiersOptions as MemoryTiersOptions, index_ModelCapabilities as ModelCapabilities, index_ModelFeatures as ModelFeatures, index_ModelLimits as ModelLimits, index_ModelPricing as ModelPricing, index_OpenAICompatAdapterOptions as OpenAICompatAdapterOptions, index_OpenAICompatPreset as OpenAICompatPreset, index_OpenAISdkLike as OpenAISdkLike, type index_OpenAIToolSchema as OpenAIToolSchema, index_PriceBreakdown as PriceBreakdown, index_PricingFn as PricingFn, index_PricingRegistry as PricingRegistry, type index_PromptNodeOptions as PromptNodeOptions, index_Rate as Rate, type index_RedactorOptions as RedactorOptions, index_ReplayCacheKeyContext as ReplayCacheKeyContext, index_ReplayCacheMissError as ReplayCacheMissError, index_ReplayCacheMode as ReplayCacheMode, type index_ResilientAdapterBundle as ResilientAdapterBundle, type index_ResilientAdapterOptions as ResilientAdapterOptions, type index_RetrievalEntry as RetrievalEntry, type index_RetrievalPipelineOptions as RetrievalPipelineOptions, type index_RetrievalQuery as RetrievalQuery, type index_RetrievalTrace as RetrievalTrace, type index_StrategyOperation as StrategyOperation, type index_StrategyPlan as StrategyPlan, type index_StreamChunk as StreamChunk, index_StreamDelta as StreamDelta, type index_StreamingPromptNodeHandle as StreamingPromptNodeHandle, type index_StreamingPromptNodeOptions as StreamingPromptNodeOptions, type index_SuggestStrategyOptions as SuggestStrategyOptions, type index_SystemPromptHandle as SystemPromptHandle, index_TieredRate as TieredRate, index_TokenUsage as TokenUsage, index_ToolCall as ToolCall, index_ToolDefinition as ToolDefinition, index_ToolRegistryGraph as ToolRegistryGraph, type index_ToolRegistryOptions as ToolRegistryOptions, type index_ToolResult as ToolResult, type index_ToolSelectorOptions as ToolSelectorOptions, type index_WithBreakerOptions as WithBreakerOptions, type index_WithBudgetGateOptions as WithBudgetGateOptions, type index_WithDryRunBundle as WithDryRunBundle, type index_WithDryRunOptions as WithDryRunOptions, type index_WithRateLimiterOptions as WithRateLimiterOptions, index_WithReplayCacheOptions as WithReplayCacheOptions, type index_WithRetryOptions as WithRetryOptions, index_admissionFilter3D as admissionFilter3D, index_agentLoop as agentLoop, index_agentMemory as agentMemory, index_anthropicAdapter as anthropicAdapter, index_canonicalJson as canonicalJson, index_cascadingLlmAdapter as cascadingLlmAdapter, index_chatStream as chatStream, index_composePricing as composePricing, index_computePrice as computePrice, index_contentGate as contentGate, index_costMeterExtractor as costMeterExtractor, index_createAdapter as createAdapter, index_createCapabilitiesRegistry as createCapabilitiesRegistry, index_createPricingRegistry as createPricingRegistry, index_dryRunAdapter as dryRunAdapter, index_dryRunPreset as dryRunPreset, index_fallbackAdapter as fallbackAdapter, index_fromLLM as fromLLM, index_frozenContext as frozenContext, index_gatedStream as gatedStream, index_gaugesAsContext as gaugesAsContext, index_googleAdapter as googleAdapter, index_graphFromSpec as graphFromSpec, index_handoff as handoff, index_keywordFlagExtractor as keywordFlagExtractor, index_knobsAsTools as knobsAsTools, index_llmConsolidator as llmConsolidator, index_llmExtractor as llmExtractor, index_observableAdapter as observableAdapter, index_openAICompatAdapter as openAICompatAdapter, index_parseRateLimitFromError as parseRateLimitFromError, index_promptNode as promptNode, index_redactor as redactor, index_registryPricing as registryPricing, index_resilientAdapter as resilientAdapter, index_streamExtractor as streamExtractor, index_streamingPromptNode as streamingPromptNode, index_suggestStrategy as suggestStrategy, index_systemPromptBuilder as systemPromptBuilder, index_toolCallExtractor as toolCallExtractor, index_toolRegistry as toolRegistry, index_toolSelector as toolSelector, index_validateGraphDef as validateGraphDef, index_withBreaker as withBreaker, index_withBudgetGate as withBudgetGate, index_withDryRun as withDryRun, index_withRateLimiter as withRateLimiter, index_withReplayCache as withReplayCache, index_withRetry as withRetry, index_withTimeout as withTimeout, index_zeroPrice as zeroPrice };
|
|
1955
2055
|
}
|
|
1956
2056
|
|
|
1957
|
-
export { type
|
|
2057
|
+
export { type RetrievalQuery as $, type AdapterStats as A, type BudgetCaps as B, type CallStatsEvent as C, DEFAULT_DECAY_RATE as D, type ExtractedToolCall as E, type FromLLMOptions as F, type GatedStreamHandle as G, type GraphFromSpecOptions as H, type HandoffOptions as I, type HttpErrorLike as J, type KeywordFlag as K, type KeywordFlagExtractorOptions as L, type KnobsAsToolsResult as M, type LLMConsolidatorOptions as N, type LLMExtractorOptions as O, LLMTimeoutError as P, type McpToolSchema as Q, type MemoryTier as R, type MemoryTiersBundle as S, type MemoryTiersOptions as T, type OpenAIToolSchema as U, type PromptNodeOptions as V, type RedactorOptions as W, type ResilientAdapterBundle as X, type ResilientAdapterOptions as Y, type RetrievalEntry as Z, type RetrievalPipelineOptions as _, type AdmissionScore3DOptions as a, type RetrievalTrace as a0, type StrategyOperation as a1, type StrategyPlan as a2, type StreamChunk as a3, type StreamingPromptNodeHandle as a4, type StreamingPromptNodeOptions as a5, type SuggestStrategyOptions as a6, type SystemPromptHandle as a7, ToolRegistryGraph as a8, type ToolRegistryOptions as a9, llmConsolidator as aA, llmExtractor as aB, observableAdapter as aC, parseRateLimitFromError as aD, promptNode as aE, redactor as aF, resilientAdapter as aG, streamExtractor as aH, streamingPromptNode as aI, suggestStrategy as aJ, systemPromptBuilder as aK, toolCallExtractor as aL, toolRegistry as aM, toolSelector as aN, validateGraphDef as aO, withBreaker as aP, withBudgetGate as aQ, withDryRun as aR, withRateLimiter as aS, withRetry as aT, withTimeout as aU, type ToolResult as aa, type ToolSelectorOptions as ab, type WithBreakerOptions as ac, type WithBudgetGateOptions as ad, type WithDryRunBundle as ae, type WithDryRunOptions as af, type WithRateLimiterOptions as ag, type WithRetryOptions as ah, admissionFilter3D as ai, agentLoop as aj, agentMemory as ak, anthropicAdapter as al, chatStream as am, contentGate as an, costMeterExtractor as ao, dryRunAdapter as ap, dryRunPreset as aq, fromLLM as ar, frozenContext as as, gatedStream as at, gaugesAsContext as au, googleAdapter as av, graphFromSpec as aw, handoff as ax, keywordFlagExtractor as ay, knobsAsTools as az, type AdmissionScores as b, AgentLoopGraph as c, type AgentLoopOptions as d, type AgentLoopStatus as e, type AgentMemoryGraph as f, type AgentMemoryOptions as g, type AnthropicAdapterOptions as h, index as i, type AnthropicSdkLike as j, BudgetExhaustedError as k, type BudgetGateBundle as l, type BudgetTotals as m, ChatStreamGraph as n, type ChatStreamOptions as o, type ContentDecision as p, type ContentGateOptions as q, type CostMeterOptions as r, type CostMeterReading as s, type DryRunAdapterOptions as t, type FrozenContextOptions as u, type GatedStreamOptions as v, type GaugesAsContextOptions as w, type GoogleAdapterOptions as x, type GoogleSdkLike as y, type GraphDefValidation as z };
|