@theokit/sdk 0.0.0-compat-580-20260905204608
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/CHANGELOG.md +7923 -0
- package/LICENSE +201 -0
- package/README.md +114 -0
- package/dist/a2a/agent-mailbox.d.cts +54 -0
- package/dist/a2a/agent-mailbox.d.ts +54 -0
- package/dist/a2a/index.cjs +138 -0
- package/dist/a2a/index.cjs.map +1 -0
- package/dist/a2a/index.d.cts +10 -0
- package/dist/a2a/index.d.ts +10 -0
- package/dist/a2a/index.js +125 -0
- package/dist/a2a/index.js.map +1 -0
- package/dist/a2a/message-bus.d.cts +118 -0
- package/dist/a2a/message-bus.d.ts +118 -0
- package/dist/a2a/subagent.d.cts +231 -0
- package/dist/a2a/subagent.d.ts +231 -0
- package/dist/a2a/types.d.cts +45 -0
- package/dist/a2a/types.d.ts +45 -0
- package/dist/agent-ARLOD4JX.cjs +67 -0
- package/dist/agent-ARLOD4JX.cjs.map +1 -0
- package/dist/agent-C3KO5LKm.d.cts +1871 -0
- package/dist/agent-CvmTR9uf.d.ts +1871 -0
- package/dist/agent-N6WJ54ML.js +58 -0
- package/dist/agent-N6WJ54ML.js.map +1 -0
- package/dist/agent-builder.d.ts +72 -0
- package/dist/agent-factory-registry-UU46BUMU.cjs +16 -0
- package/dist/agent-factory-registry-UU46BUMU.cjs.map +1 -0
- package/dist/agent-factory-registry-ZVTABLEY.js +3 -0
- package/dist/agent-factory-registry-ZVTABLEY.js.map +1 -0
- package/dist/agent-factory.d.ts +24 -0
- package/dist/agent-generate.d.ts +12 -0
- package/dist/agent-session-store-AFML3AXC.js +6 -0
- package/dist/agent-session-store-AFML3AXC.js.map +1 -0
- package/dist/agent-session-store-MTSIY3MH.cjs +23 -0
- package/dist/agent-session-store-MTSIY3MH.cjs.map +1 -0
- package/dist/agent.d.ts +276 -0
- package/dist/auth/index.cjs +306 -0
- package/dist/auth/index.cjs.map +1 -0
- package/dist/auth/index.d.cts +34 -0
- package/dist/auth/index.d.ts +34 -0
- package/dist/auth/index.js +247 -0
- package/dist/auth/index.js.map +1 -0
- package/dist/batch-I6T6MXZO.cjs +263 -0
- package/dist/batch-I6T6MXZO.cjs.map +1 -0
- package/dist/batch-US4F6WPK.js +260 -0
- package/dist/batch-US4F6WPK.js.map +1 -0
- package/dist/chunk-24MGQDK3.js +31 -0
- package/dist/chunk-24MGQDK3.js.map +1 -0
- package/dist/chunk-24SYBZPL.cjs +121 -0
- package/dist/chunk-24SYBZPL.cjs.map +1 -0
- package/dist/chunk-2HPNT6HH.cjs +3373 -0
- package/dist/chunk-2HPNT6HH.cjs.map +1 -0
- package/dist/chunk-2SFBB54R.js +23 -0
- package/dist/chunk-2SFBB54R.js.map +1 -0
- package/dist/chunk-2WXHA33T.js +105 -0
- package/dist/chunk-2WXHA33T.js.map +1 -0
- package/dist/chunk-2XC6KDJM.js +22 -0
- package/dist/chunk-2XC6KDJM.js.map +1 -0
- package/dist/chunk-2XRAWOZZ.js +172 -0
- package/dist/chunk-2XRAWOZZ.js.map +1 -0
- package/dist/chunk-2ZPEDVLM.cjs +59 -0
- package/dist/chunk-2ZPEDVLM.cjs.map +1 -0
- package/dist/chunk-3EE6LVWT.cjs +29 -0
- package/dist/chunk-3EE6LVWT.cjs.map +1 -0
- package/dist/chunk-3JHIFQ4I.js +102 -0
- package/dist/chunk-3JHIFQ4I.js.map +1 -0
- package/dist/chunk-44I6UYVH.js +133 -0
- package/dist/chunk-44I6UYVH.js.map +1 -0
- package/dist/chunk-47TF32NQ.js +79 -0
- package/dist/chunk-47TF32NQ.js.map +1 -0
- package/dist/chunk-4A3SKJ53.cjs +297 -0
- package/dist/chunk-4A3SKJ53.cjs.map +1 -0
- package/dist/chunk-4HS6FFGL.cjs +433 -0
- package/dist/chunk-4HS6FFGL.cjs.map +1 -0
- package/dist/chunk-4MMWFSCD.js +25 -0
- package/dist/chunk-4MMWFSCD.js.map +1 -0
- package/dist/chunk-4NLCWGH7.cjs +177 -0
- package/dist/chunk-4NLCWGH7.cjs.map +1 -0
- package/dist/chunk-55GB6JYQ.js +208 -0
- package/dist/chunk-55GB6JYQ.js.map +1 -0
- package/dist/chunk-5WKQDIGO.js +136 -0
- package/dist/chunk-5WKQDIGO.js.map +1 -0
- package/dist/chunk-67SBTGMA.cjs +457 -0
- package/dist/chunk-67SBTGMA.cjs.map +1 -0
- package/dist/chunk-6LHQPOMI.cjs +193 -0
- package/dist/chunk-6LHQPOMI.cjs.map +1 -0
- package/dist/chunk-6M2OIS4Y.js +158 -0
- package/dist/chunk-6M2OIS4Y.js.map +1 -0
- package/dist/chunk-6PWOWXMC.js +121 -0
- package/dist/chunk-6PWOWXMC.js.map +1 -0
- package/dist/chunk-6X6ID4MO.js +20 -0
- package/dist/chunk-6X6ID4MO.js.map +1 -0
- package/dist/chunk-7A6535RA.cjs +231 -0
- package/dist/chunk-7A6535RA.cjs.map +1 -0
- package/dist/chunk-7FDKWDA2.cjs +135 -0
- package/dist/chunk-7FDKWDA2.cjs.map +1 -0
- package/dist/chunk-7I5Z3UBJ.js +10 -0
- package/dist/chunk-7I5Z3UBJ.js.map +1 -0
- package/dist/chunk-7JJ3A6AT.cjs +88 -0
- package/dist/chunk-7JJ3A6AT.cjs.map +1 -0
- package/dist/chunk-7SZAV6QG.js +593 -0
- package/dist/chunk-7SZAV6QG.js.map +1 -0
- package/dist/chunk-A4RAL2ER.cjs +51 -0
- package/dist/chunk-A4RAL2ER.cjs.map +1 -0
- package/dist/chunk-AA27GEYS.cjs +12 -0
- package/dist/chunk-AA27GEYS.cjs.map +1 -0
- package/dist/chunk-AAEZSPTC.js +133 -0
- package/dist/chunk-AAEZSPTC.js.map +1 -0
- package/dist/chunk-AGACYRJ2.js +11 -0
- package/dist/chunk-AGACYRJ2.js.map +1 -0
- package/dist/chunk-ALUN2B4W.js +356 -0
- package/dist/chunk-ALUN2B4W.js.map +1 -0
- package/dist/chunk-ANMJJD6D.cjs +18 -0
- package/dist/chunk-ANMJJD6D.cjs.map +1 -0
- package/dist/chunk-ATT276RD.cjs +173 -0
- package/dist/chunk-ATT276RD.cjs.map +1 -0
- package/dist/chunk-AW6F6HZR.js +166 -0
- package/dist/chunk-AW6F6HZR.js.map +1 -0
- package/dist/chunk-AWINL3ZC.js +109 -0
- package/dist/chunk-AWINL3ZC.js.map +1 -0
- package/dist/chunk-BJUJT5ED.cjs +186 -0
- package/dist/chunk-BJUJT5ED.cjs.map +1 -0
- package/dist/chunk-BUUUWQMB.cjs +34 -0
- package/dist/chunk-BUUUWQMB.cjs.map +1 -0
- package/dist/chunk-BV2MWEMV.cjs +26 -0
- package/dist/chunk-BV2MWEMV.cjs.map +1 -0
- package/dist/chunk-CFE6QF2Q.js +221 -0
- package/dist/chunk-CFE6QF2Q.js.map +1 -0
- package/dist/chunk-CZJ6Q7CW.js +183 -0
- package/dist/chunk-CZJ6Q7CW.js.map +1 -0
- package/dist/chunk-D3CCY3A2.cjs +10995 -0
- package/dist/chunk-D3CCY3A2.cjs.map +1 -0
- package/dist/chunk-D6POWE7E.cjs +210 -0
- package/dist/chunk-D6POWE7E.cjs.map +1 -0
- package/dist/chunk-DMRT67Y6.js +100 -0
- package/dist/chunk-DMRT67Y6.js.map +1 -0
- package/dist/chunk-DQZU7JK6.cjs +125 -0
- package/dist/chunk-DQZU7JK6.cjs.map +1 -0
- package/dist/chunk-EFMFILPG.js +77 -0
- package/dist/chunk-EFMFILPG.js.map +1 -0
- package/dist/chunk-EH6XD3FY.js +222 -0
- package/dist/chunk-EH6XD3FY.js.map +1 -0
- package/dist/chunk-EIQFAOFD.js +229 -0
- package/dist/chunk-EIQFAOFD.js.map +1 -0
- package/dist/chunk-EPSICJLZ.js +79 -0
- package/dist/chunk-EPSICJLZ.js.map +1 -0
- package/dist/chunk-EXTRW7GW.cjs +155 -0
- package/dist/chunk-EXTRW7GW.cjs.map +1 -0
- package/dist/chunk-FD2UT76F.js +3 -0
- package/dist/chunk-FD2UT76F.js.map +1 -0
- package/dist/chunk-FJWQP6EE.js +122 -0
- package/dist/chunk-FJWQP6EE.js.map +1 -0
- package/dist/chunk-FRITRLZQ.cjs +24 -0
- package/dist/chunk-FRITRLZQ.cjs.map +1 -0
- package/dist/chunk-FUSDYC2B.cjs +280 -0
- package/dist/chunk-FUSDYC2B.cjs.map +1 -0
- package/dist/chunk-G7BLGBRN.js +43 -0
- package/dist/chunk-G7BLGBRN.js.map +1 -0
- package/dist/chunk-GBCVPKHE.js +282 -0
- package/dist/chunk-GBCVPKHE.js.map +1 -0
- package/dist/chunk-GHX4P3V2.cjs +34 -0
- package/dist/chunk-GHX4P3V2.cjs.map +1 -0
- package/dist/chunk-GZV6AVRL.cjs +282 -0
- package/dist/chunk-GZV6AVRL.cjs.map +1 -0
- package/dist/chunk-H73MEMQB.js +31 -0
- package/dist/chunk-H73MEMQB.js.map +1 -0
- package/dist/chunk-HCT4HPCL.cjs +235 -0
- package/dist/chunk-HCT4HPCL.cjs.map +1 -0
- package/dist/chunk-HFEJE7AC.js +424 -0
- package/dist/chunk-HFEJE7AC.js.map +1 -0
- package/dist/chunk-HKCKOAIO.js +57 -0
- package/dist/chunk-HKCKOAIO.js.map +1 -0
- package/dist/chunk-HUFSABUZ.cjs +48 -0
- package/dist/chunk-HUFSABUZ.cjs.map +1 -0
- package/dist/chunk-HW7SEELD.cjs +46 -0
- package/dist/chunk-HW7SEELD.cjs.map +1 -0
- package/dist/chunk-HY66GLM6.js +13 -0
- package/dist/chunk-HY66GLM6.js.map +1 -0
- package/dist/chunk-I2PWY7VM.cjs +27 -0
- package/dist/chunk-I2PWY7VM.cjs.map +1 -0
- package/dist/chunk-IJ7M6GOG.cjs +28 -0
- package/dist/chunk-IJ7M6GOG.cjs.map +1 -0
- package/dist/chunk-IU5N5224.cjs +288 -0
- package/dist/chunk-IU5N5224.cjs.map +1 -0
- package/dist/chunk-IUMAQURF.js +130 -0
- package/dist/chunk-IUMAQURF.js.map +1 -0
- package/dist/chunk-J7J7J2GN.cjs +377 -0
- package/dist/chunk-J7J7J2GN.cjs.map +1 -0
- package/dist/chunk-JLRLCBJ4.cjs +108 -0
- package/dist/chunk-JLRLCBJ4.cjs.map +1 -0
- package/dist/chunk-JMDDYA22.js +171 -0
- package/dist/chunk-JMDDYA22.js.map +1 -0
- package/dist/chunk-JNAA4G4H.js +43 -0
- package/dist/chunk-JNAA4G4H.js.map +1 -0
- package/dist/chunk-JOFVLOFY.js +268 -0
- package/dist/chunk-JOFVLOFY.js.map +1 -0
- package/dist/chunk-K2BQQ445.js +30 -0
- package/dist/chunk-K2BQQ445.js.map +1 -0
- package/dist/chunk-K2VMFZQ5.js +487 -0
- package/dist/chunk-K2VMFZQ5.js.map +1 -0
- package/dist/chunk-K3NH62DG.js +3343 -0
- package/dist/chunk-K3NH62DG.js.map +1 -0
- package/dist/chunk-KGANQYP7.cjs +172 -0
- package/dist/chunk-KGANQYP7.cjs.map +1 -0
- package/dist/chunk-KRD3GQAA.cjs +71 -0
- package/dist/chunk-KRD3GQAA.cjs.map +1 -0
- package/dist/chunk-KTTHHYEW.cjs +45 -0
- package/dist/chunk-KTTHHYEW.cjs.map +1 -0
- package/dist/chunk-KVNWIAO4.js +68 -0
- package/dist/chunk-KVNWIAO4.js.map +1 -0
- package/dist/chunk-KVSAY6NZ.cjs +497 -0
- package/dist/chunk-KVSAY6NZ.cjs.map +1 -0
- package/dist/chunk-LOHMT36V.cjs +178 -0
- package/dist/chunk-LOHMT36V.cjs.map +1 -0
- package/dist/chunk-LX7SEXOQ.js +152 -0
- package/dist/chunk-LX7SEXOQ.js.map +1 -0
- package/dist/chunk-MUUQ2WFJ.cjs +4 -0
- package/dist/chunk-MUUQ2WFJ.cjs.map +1 -0
- package/dist/chunk-N6OOOYFZ.js +281 -0
- package/dist/chunk-N6OOOYFZ.js.map +1 -0
- package/dist/chunk-NAF4L3T6.js +22 -0
- package/dist/chunk-NAF4L3T6.js.map +1 -0
- package/dist/chunk-NINIJCHU.cjs +23 -0
- package/dist/chunk-NINIJCHU.cjs.map +1 -0
- package/dist/chunk-NJWYQWDL.js +43 -0
- package/dist/chunk-NJWYQWDL.js.map +1 -0
- package/dist/chunk-NQTD6QOW.cjs +226 -0
- package/dist/chunk-NQTD6QOW.cjs.map +1 -0
- package/dist/chunk-NQTNSHSB.cjs +843 -0
- package/dist/chunk-NQTNSHSB.cjs.map +1 -0
- package/dist/chunk-NVXXWAU7.cjs +13 -0
- package/dist/chunk-NVXXWAU7.cjs.map +1 -0
- package/dist/chunk-NYQ3IS7K.cjs +130 -0
- package/dist/chunk-NYQ3IS7K.cjs.map +1 -0
- package/dist/chunk-O6USDERH.js +165 -0
- package/dist/chunk-O6USDERH.js.map +1 -0
- package/dist/chunk-OBA6YK2R.cjs +8 -0
- package/dist/chunk-OBA6YK2R.cjs.map +1 -0
- package/dist/chunk-OQRGVTQF.js +169 -0
- package/dist/chunk-OQRGVTQF.js.map +1 -0
- package/dist/chunk-OR6XIWLB.js +19 -0
- package/dist/chunk-OR6XIWLB.js.map +1 -0
- package/dist/chunk-OYD3U3LY.js +10981 -0
- package/dist/chunk-OYD3U3LY.js.map +1 -0
- package/dist/chunk-PRZ3BES7.cjs +79 -0
- package/dist/chunk-PRZ3BES7.cjs.map +1 -0
- package/dist/chunk-PY2RQOA7.js +6 -0
- package/dist/chunk-PY2RQOA7.js.map +1 -0
- package/dist/chunk-Q5EWJPRY.js +18 -0
- package/dist/chunk-Q5EWJPRY.js.map +1 -0
- package/dist/chunk-QATRS7JD.cjs +158 -0
- package/dist/chunk-QATRS7JD.cjs.map +1 -0
- package/dist/chunk-QC55H6RJ.cjs +601 -0
- package/dist/chunk-QC55H6RJ.cjs.map +1 -0
- package/dist/chunk-QDM3OHUT.cjs +134 -0
- package/dist/chunk-QDM3OHUT.cjs.map +1 -0
- package/dist/chunk-QKLOP4VC.cjs +90 -0
- package/dist/chunk-QKLOP4VC.cjs.map +1 -0
- package/dist/chunk-QOGNZMHD.cjs +34 -0
- package/dist/chunk-QOGNZMHD.cjs.map +1 -0
- package/dist/chunk-QWD3CZWE.cjs +108 -0
- package/dist/chunk-QWD3CZWE.cjs.map +1 -0
- package/dist/chunk-QWD4RDZ3.cjs +136 -0
- package/dist/chunk-QWD4RDZ3.cjs.map +1 -0
- package/dist/chunk-QYLZQ43D.cjs +172 -0
- package/dist/chunk-QYLZQ43D.cjs.map +1 -0
- package/dist/chunk-R7WIIPUR.js +27 -0
- package/dist/chunk-R7WIIPUR.js.map +1 -0
- package/dist/chunk-RQMCOFAI.cjs +85 -0
- package/dist/chunk-RQMCOFAI.cjs.map +1 -0
- package/dist/chunk-SA6K24NB.cjs +25 -0
- package/dist/chunk-SA6K24NB.cjs.map +1 -0
- package/dist/chunk-SADXXGWU.js +809 -0
- package/dist/chunk-SADXXGWU.js.map +1 -0
- package/dist/chunk-SAGRF4IB.js +25 -0
- package/dist/chunk-SAGRF4IB.js.map +1 -0
- package/dist/chunk-SVQIW5RJ.js +81 -0
- package/dist/chunk-SVQIW5RJ.js.map +1 -0
- package/dist/chunk-TA3K7SBK.js +180 -0
- package/dist/chunk-TA3K7SBK.js.map +1 -0
- package/dist/chunk-TFG5IBZS.cjs +139 -0
- package/dist/chunk-TFG5IBZS.cjs.map +1 -0
- package/dist/chunk-TMKTSYDS.cjs +21 -0
- package/dist/chunk-TMKTSYDS.cjs.map +1 -0
- package/dist/chunk-UADQJBHR.cjs +172 -0
- package/dist/chunk-UADQJBHR.cjs.map +1 -0
- package/dist/chunk-UBR5PWD7.js +275 -0
- package/dist/chunk-UBR5PWD7.js.map +1 -0
- package/dist/chunk-UKMBRMGT.js +22 -0
- package/dist/chunk-UKMBRMGT.js.map +1 -0
- package/dist/chunk-V22DZIXO.js +147 -0
- package/dist/chunk-V22DZIXO.js.map +1 -0
- package/dist/chunk-VE6DFSKU.js +107 -0
- package/dist/chunk-VE6DFSKU.js.map +1 -0
- package/dist/chunk-VPK6PHIE.cjs +211 -0
- package/dist/chunk-VPK6PHIE.cjs.map +1 -0
- package/dist/chunk-VTYY7XL5.cjs +15 -0
- package/dist/chunk-VTYY7XL5.cjs.map +1 -0
- package/dist/chunk-VWUXIVEI.js +583 -0
- package/dist/chunk-VWUXIVEI.js.map +1 -0
- package/dist/chunk-WE22OXQA.js +48 -0
- package/dist/chunk-WE22OXQA.js.map +1 -0
- package/dist/chunk-WMWEI3NS.js +120 -0
- package/dist/chunk-WMWEI3NS.js.map +1 -0
- package/dist/chunk-WS5ULCL4.js +204 -0
- package/dist/chunk-WS5ULCL4.js.map +1 -0
- package/dist/chunk-XB4GI5RZ.js +115 -0
- package/dist/chunk-XB4GI5RZ.js.map +1 -0
- package/dist/chunk-XU6MLSC6.js +455 -0
- package/dist/chunk-XU6MLSC6.js.map +1 -0
- package/dist/chunk-XYFGKVZ7.js +15 -0
- package/dist/chunk-XYFGKVZ7.js.map +1 -0
- package/dist/chunk-Y2KYR2ED.cjs +118 -0
- package/dist/chunk-Y2KYR2ED.cjs.map +1 -0
- package/dist/chunk-YIFFF23U.cjs +109 -0
- package/dist/chunk-YIFFF23U.cjs.map +1 -0
- package/dist/chunk-YJNYDJ2T.cjs +27 -0
- package/dist/chunk-YJNYDJ2T.cjs.map +1 -0
- package/dist/chunk-YSTXFWQE.cjs +127 -0
- package/dist/chunk-YSTXFWQE.cjs.map +1 -0
- package/dist/chunk-Z2JFX372.cjs +595 -0
- package/dist/chunk-Z2JFX372.cjs.map +1 -0
- package/dist/chunk-Z3NTRKIC.cjs +111 -0
- package/dist/chunk-Z3NTRKIC.cjs.map +1 -0
- package/dist/chunk-ZF2LDKQQ.cjs +20 -0
- package/dist/chunk-ZF2LDKQQ.cjs.map +1 -0
- package/dist/client/index.cjs +73 -0
- package/dist/client/index.cjs.map +1 -0
- package/dist/client/index.d.cts +12 -0
- package/dist/client/index.d.ts +12 -0
- package/dist/client/index.js +71 -0
- package/dist/client/index.js.map +1 -0
- package/dist/client/theokit-client.d.cts +60 -0
- package/dist/client/theokit-client.d.ts +60 -0
- package/dist/client/types.d.cts +51 -0
- package/dist/client/types.d.ts +51 -0
- package/dist/compact-session-BHTPCIHA.cjs +61 -0
- package/dist/compact-session-BHTPCIHA.cjs.map +1 -0
- package/dist/compact-session-W4WLJTHA.js +24 -0
- package/dist/compact-session-W4WLJTHA.js.map +1 -0
- package/dist/compaction.cjs +66 -0
- package/dist/compaction.cjs.map +1 -0
- package/dist/compaction.d.cts +240 -0
- package/dist/compaction.d.ts +240 -0
- package/dist/compaction.js +5 -0
- package/dist/compaction.js.map +1 -0
- package/dist/concurrency.cjs +23 -0
- package/dist/concurrency.cjs.map +1 -0
- package/dist/concurrency.d.cts +22 -0
- package/dist/concurrency.d.ts +22 -0
- package/dist/concurrency.js +17 -0
- package/dist/concurrency.js.map +1 -0
- package/dist/context/index.cjs +37 -0
- package/dist/context/index.cjs.map +1 -0
- package/dist/context/index.d.cts +78 -0
- package/dist/context/index.d.ts +78 -0
- package/dist/context/index.js +20 -0
- package/dist/context/index.js.map +1 -0
- package/dist/context-4QOEWRDF.cjs +23 -0
- package/dist/context-4QOEWRDF.cjs.map +1 -0
- package/dist/context-Z3CFTT3H.js +6 -0
- package/dist/context-Z3CFTT3H.js.map +1 -0
- package/dist/create-skill.d.ts +40 -0
- package/dist/cron-C3PhZED0.d.cts +246 -0
- package/dist/cron-crfMMdAw.d.ts +246 -0
- package/dist/cron.cjs +68 -0
- package/dist/cron.cjs.map +1 -0
- package/dist/cron.d.cts +7 -0
- package/dist/cron.d.ts +7 -0
- package/dist/cron.js +59 -0
- package/dist/cron.js.map +1 -0
- package/dist/define-tool.d.ts +86 -0
- package/dist/errors-CLOAyuiv.d.ts +569 -0
- package/dist/errors-DrDEgyz1.d.cts +569 -0
- package/dist/errors-base-B5g01neU.d.cts +75 -0
- package/dist/errors-base-B5g01neU.d.ts +75 -0
- package/dist/errors-base.d.ts +73 -0
- package/dist/errors.cjs +89 -0
- package/dist/errors.cjs.map +1 -0
- package/dist/errors.d.cts +4 -0
- package/dist/errors.d.ts +4 -0
- package/dist/errors.js +4 -0
- package/dist/errors.js.map +1 -0
- package/dist/eval.cjs +1056 -0
- package/dist/eval.cjs.map +1 -0
- package/dist/eval.d.cts +77 -0
- package/dist/eval.d.ts +77 -0
- package/dist/eval.js +1042 -0
- package/dist/eval.js.map +1 -0
- package/dist/event-bus.d.ts +42 -0
- package/dist/executor-XQAOQOHD.cjs +993 -0
- package/dist/executor-XQAOQOHD.cjs.map +1 -0
- package/dist/executor-ZNDQDX6Q.js +989 -0
- package/dist/executor-ZNDQDX6Q.js.map +1 -0
- package/dist/filesystem/index.cjs +204 -0
- package/dist/filesystem/index.cjs.map +1 -0
- package/dist/filesystem/index.d.cts +12 -0
- package/dist/filesystem/index.d.ts +12 -0
- package/dist/filesystem/index.js +195 -0
- package/dist/filesystem/index.js.map +1 -0
- package/dist/filesystem/local-filesystem.d.cts +54 -0
- package/dist/filesystem/local-filesystem.d.ts +54 -0
- package/dist/filesystem/types.d.cts +136 -0
- package/dist/filesystem/types.d.ts +136 -0
- package/dist/fork-agent-S2EPIML7.js +61 -0
- package/dist/fork-agent-S2EPIML7.js.map +1 -0
- package/dist/fork-agent-WAEQI2DL.cjs +64 -0
- package/dist/fork-agent-WAEQI2DL.cjs.map +1 -0
- package/dist/fs-session-store-77JU46UZ.js +10 -0
- package/dist/fs-session-store-77JU46UZ.js.map +1 -0
- package/dist/fs-session-store-E4U3P56L.cjs +19 -0
- package/dist/fs-session-store-E4U3P56L.cjs.map +1 -0
- package/dist/generate-object-BXV7BZRP.js +7 -0
- package/dist/generate-object-BXV7BZRP.js.map +1 -0
- package/dist/generate-object-YBI2TDJ3.cjs +20 -0
- package/dist/generate-object-YBI2TDJ3.cjs.map +1 -0
- package/dist/generate-object.d.ts +111 -0
- package/dist/index-manager-3UNPYH34.cjs +26 -0
- package/dist/index-manager-3UNPYH34.cjs.map +1 -0
- package/dist/index-manager-W7FDMGEG.js +17 -0
- package/dist/index-manager-W7FDMGEG.js.map +1 -0
- package/dist/index.cjs +2487 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +4166 -0
- package/dist/index.d.ts +4166 -0
- package/dist/index.js +2289 -0
- package/dist/index.js.map +1 -0
- package/dist/inject-session-SUM6TDJF.js +27 -0
- package/dist/inject-session-SUM6TDJF.js.map +1 -0
- package/dist/inject-session-W6A46J3E.cjs +29 -0
- package/dist/inject-session-W6A46J3E.cjs.map +1 -0
- package/dist/interactive/index.cjs +35 -0
- package/dist/interactive/index.cjs.map +1 -0
- package/dist/interactive/index.d.cts +12 -0
- package/dist/interactive/index.d.ts +12 -0
- package/dist/interactive/index.js +30 -0
- package/dist/interactive/index.js.map +1 -0
- package/dist/interactive/types.d.cts +95 -0
- package/dist/interactive/types.d.ts +95 -0
- package/dist/internal/agent/batch.d.ts +11 -0
- package/dist/internal/agent/helpers.d.ts +1 -0
- package/dist/internal/agent-loop/budget-gate.d.ts +1 -0
- package/dist/internal/agent-loop/doom-loop-tracker.d.ts +22 -0
- package/dist/internal/agent-loop/live-events.d.ts +46 -0
- package/dist/internal/agent-loop/loop-context-init.d.ts +2 -0
- package/dist/internal/agent-loop/loop-finalize.d.ts +25 -0
- package/dist/internal/agent-loop/loop-llm-stream.d.ts +1 -0
- package/dist/internal/agent-loop/loop-thinking-steps.d.ts +28 -0
- package/dist/internal/agent-loop/loop.d.ts +7 -0
- package/dist/internal/agent-loop/message-builders.d.ts +21 -0
- package/dist/internal/agent-loop/replay-messages.d.ts +41 -0
- package/dist/internal/agent-loop/tool-dispatch.d.ts +27 -0
- package/dist/internal/agent-loop/tool-executors.d.ts +1 -0
- package/dist/internal/agent-loop/tool-result-guard.d.ts +20 -0
- package/dist/internal/agent-loop/tool-timeout.d.ts +23 -0
- package/dist/internal/agent-loop/types.d.ts +43 -0
- package/dist/internal/agent-loop/usage-and-cost.d.ts +25 -0
- package/dist/internal/auth/api-key-prefix.d.ts +23 -0
- package/dist/internal/auth/api-key-validator.d.ts +46 -0
- package/dist/internal/auth/credential-availability.d.ts +61 -0
- package/dist/internal/auth/credential-store.d.ts +77 -0
- package/dist/internal/auth/oauth-device.d.ts +54 -0
- package/dist/internal/auth/oauth-engine.d.ts +21 -0
- package/dist/internal/auth/resolve-credential.d.ts +56 -0
- package/dist/internal/auth/types.d.ts +175 -0
- package/dist/internal/base-url.d.ts +14 -0
- package/dist/internal/budget/compute-cost.d.ts +28 -0
- package/dist/internal/budget/pricing-registry.d.ts +36 -0
- package/dist/internal/budget/tracker/budget-tracker.d.ts +11 -0
- package/dist/internal/budget/tracker/budget.d.ts +34 -0
- package/dist/internal/budget/usage-accumulator.d.ts +46 -0
- package/dist/internal/cloud-agent/cloud-agent.d.ts +1 -0
- package/dist/internal/cloud-agent/cloud-config-serializer.d.ts +3 -0
- package/dist/internal/cloud-agent/cloud-run.d.ts +1 -0
- package/dist/internal/cloud-agent/cloud-tool-parity.d.ts +1 -0
- package/dist/internal/cloud-agent/index.d.ts +7 -0
- package/dist/internal/cloud-agent/real-cloud-run.d.ts +2 -0
- package/dist/internal/cloud-agent/types.d.ts +56 -0
- package/dist/internal/concurrency/abort-utils.d.ts +21 -0
- package/dist/internal/concurrency/async-local-storage.d.ts +20 -0
- package/dist/internal/concurrency/async-semaphore.d.ts +24 -0
- package/dist/internal/concurrency/delegation-depth.d.ts +27 -0
- package/dist/internal/concurrency/map-with-concurrency.d.ts +28 -0
- package/dist/internal/concurrency/subagent-credentials.d.ts +112 -0
- package/dist/internal/diagnostics.d.ts +69 -0
- package/dist/internal/emit-run-event.d.ts +16 -0
- package/dist/internal/env.d.ts +1 -0
- package/dist/internal/error-mappers/anthropic.d.ts +30 -0
- package/dist/internal/error-mappers/bedrock.d.ts +16 -0
- package/dist/internal/error-mappers/default-retriable.d.ts +1 -0
- package/dist/internal/error-mappers/ollama.d.ts +41 -0
- package/dist/internal/error-mappers/openai-compatible.d.ts +25 -0
- package/dist/internal/error-mappers/shared.d.ts +23 -0
- package/dist/internal/error-mappers/vertex.d.ts +15 -0
- package/dist/internal/eval/aggregate.d.ts +9 -0
- package/dist/internal/eval/assert.d.ts +27 -0
- package/dist/internal/eval/code-runner.d.ts +28 -0
- package/dist/internal/eval/dataset-iter.d.ts +9 -0
- package/dist/internal/eval/runner.d.ts +9 -0
- package/dist/internal/eval/single-flight.d.ts +17 -0
- package/dist/internal/eval/telemetry.d.ts +23 -0
- package/dist/internal/eval/trials.d.ts +19 -0
- package/dist/internal/global-singleton.d.ts +16 -0
- package/dist/internal/http.d.ts +1 -0
- package/dist/internal/ids.d.ts +1 -0
- package/dist/internal/judge/judge-call.d.ts +48 -0
- package/dist/internal/judge/parse-verdict.d.ts +11 -0
- package/dist/internal/llm/abort-error.d.ts +1 -0
- package/dist/internal/llm/anthropic-shared.d.ts +100 -0
- package/dist/internal/llm/anthropic.d.ts +9 -0
- package/dist/internal/llm/bedrock-anthropic.d.ts +36 -0
- package/dist/internal/llm/bedrock-token-cache.d.ts +18 -0
- package/dist/internal/llm/credential-pool-context.d.ts +11 -0
- package/dist/internal/llm/credential-pool-types.d.ts +22 -0
- package/dist/internal/llm/credential-pool.d.ts +18 -0
- package/dist/internal/llm/fallback-client.d.ts +1 -0
- package/dist/internal/llm/fault-injection.d.ts +50 -0
- package/dist/internal/llm/finish.d.ts +1 -0
- package/dist/internal/llm/hermes-tool-extract.d.ts +11 -0
- package/dist/internal/llm/model-capabilities.d.ts +40 -0
- package/dist/internal/llm/model-identifier.d.ts +58 -0
- package/dist/internal/llm/model-option.d.ts +38 -0
- package/dist/internal/llm/ollama-native.d.ts +27 -0
- package/dist/internal/llm/openai-messages.d.ts +2 -0
- package/dist/internal/llm/openai.d.ts +146 -0
- package/dist/internal/llm/pool-aware-client.d.ts +16 -0
- package/dist/internal/llm/prompt-cache-key.d.ts +1 -0
- package/dist/internal/llm/responses.d.ts +97 -0
- package/dist/internal/llm/retry.d.ts +22 -0
- package/dist/internal/llm/retrying-client.d.ts +53 -0
- package/dist/internal/llm/router.d.ts +40 -0
- package/dist/internal/llm/sse.d.ts +21 -0
- package/dist/internal/llm/stream-relay.d.ts +17 -0
- package/dist/internal/llm/tool-result-content.d.ts +40 -0
- package/dist/internal/llm/transport-error.d.ts +9 -0
- package/dist/internal/llm/types.d.ts +226 -0
- package/dist/internal/llm/vertex-anthropic.d.ts +40 -0
- package/dist/internal/llm/vertex-auth.d.ts +30 -0
- package/dist/internal/llm/vertex-gemini.d.ts +28 -0
- package/dist/internal/llm/vertex-router.d.ts +21 -0
- package/dist/internal/local-agent/index.d.ts +6 -0
- package/dist/internal/local-agent/local-agent-bootstrap.d.ts +37 -0
- package/dist/internal/local-agent/local-agent-capabilities.d.ts +38 -0
- package/dist/internal/local-agent/local-agent-dispatch.d.ts +57 -0
- package/dist/internal/local-agent/local-agent-invalidate.d.ts +1 -0
- package/dist/internal/local-agent/local-agent-lifecycle.d.ts +13 -0
- package/dist/internal/local-agent/local-agent-memory-direct.d.ts +12 -0
- package/dist/internal/local-agent/local-agent-memory-hooks.d.ts +41 -0
- package/dist/internal/local-agent/local-agent-memory-provider.d.ts +57 -0
- package/dist/internal/local-agent/local-agent-memory.d.ts +1 -0
- package/dist/internal/local-agent/local-agent-personality-extensions.d.ts +43 -0
- package/dist/internal/local-agent/local-agent-runtime-extensions.d.ts +13 -0
- package/dist/internal/local-agent/local-agent-send.d.ts +42 -0
- package/dist/internal/local-agent/local-agent-task-wrap.d.ts +11 -0
- package/dist/internal/local-agent/local-agent.d.ts +1 -0
- package/dist/internal/local-agent/local-option-keys.d.ts +2 -0
- package/dist/internal/local-agent/local-run.d.ts +1 -0
- package/dist/internal/local-agent/mcp-pool.d.ts +43 -0
- package/dist/internal/local-agent/real-local-run-mcp.d.ts +26 -0
- package/dist/internal/local-agent/real-local-run-options.d.ts +26 -0
- package/dist/internal/local-agent/real-local-run-provider.d.ts +13 -0
- package/dist/internal/local-agent/real-local-run-tools.d.ts +55 -0
- package/dist/internal/local-agent/real-local-run.d.ts +4 -0
- package/dist/internal/mcp/client.d.ts +16 -0
- package/dist/internal/mcp/handshake-timeout.d.ts +53 -0
- package/dist/internal/mcp/oauth.d.ts +19 -0
- package/dist/internal/mcp/token-storage.d.ts +52 -0
- package/dist/internal/memory/active-memory-cache.d.ts +10 -0
- package/dist/internal/memory/active-memory-types.d.ts +8 -0
- package/dist/internal/memory/active-memory.d.ts +56 -0
- package/dist/internal/memory/adapters/azure-openai-embedding.d.cts +2 -0
- package/dist/internal/memory/adapters/azure-openai-embedding.d.ts +2 -0
- package/dist/internal/memory/adapters/catalog.d.cts +1 -0
- package/dist/internal/memory/adapters/catalog.d.ts +1 -0
- package/dist/internal/memory/adapters/cohere-embedding.d.cts +2 -0
- package/dist/internal/memory/adapters/cohere-embedding.d.ts +2 -0
- package/dist/internal/memory/adapters/deepinfra-embedding.d.cts +2 -0
- package/dist/internal/memory/adapters/deepinfra-embedding.d.ts +2 -0
- package/dist/internal/memory/adapters/gemini-embedding.d.cts +2 -0
- package/dist/internal/memory/adapters/gemini-embedding.d.ts +2 -0
- package/dist/internal/memory/adapters/index.cjs +30 -0
- package/dist/internal/memory/adapters/index.cjs.map +1 -0
- package/dist/internal/memory/adapters/index.d.cts +18 -0
- package/dist/internal/memory/adapters/index.d.ts +18 -0
- package/dist/internal/memory/adapters/index.js +13 -0
- package/dist/internal/memory/adapters/index.js.map +1 -0
- package/dist/internal/memory/adapters/jina-embedding.d.cts +2 -0
- package/dist/internal/memory/adapters/jina-embedding.d.ts +2 -0
- package/dist/internal/memory/adapters/mistral-embedding.d.cts +2 -0
- package/dist/internal/memory/adapters/mistral-embedding.d.ts +2 -0
- package/dist/internal/memory/adapters/ollama-embedding.d.cts +34 -0
- package/dist/internal/memory/adapters/ollama-embedding.d.ts +34 -0
- package/dist/internal/memory/adapters/openai-compatible.d.cts +96 -0
- package/dist/internal/memory/adapters/openai-compatible.d.ts +96 -0
- package/dist/internal/memory/adapters/openai-embedding.d.cts +12 -0
- package/dist/internal/memory/adapters/openai-embedding.d.ts +12 -0
- package/dist/internal/memory/adapters/openrouter-embedding.d.cts +2 -0
- package/dist/internal/memory/adapters/openrouter-embedding.d.ts +2 -0
- package/dist/internal/memory/adapters/voyage-embedding.d.cts +2 -0
- package/dist/internal/memory/adapters/voyage-embedding.d.ts +2 -0
- package/dist/internal/memory/corpus-sync.d.ts +23 -0
- package/dist/internal/memory/dreaming/diary.d.ts +41 -0
- package/dist/internal/memory/dreaming/phases.d.ts +35 -0
- package/dist/internal/memory/dreaming/run.d.ts +10 -0
- package/dist/internal/memory/embedding-adapter.d.ts +42 -0
- package/dist/internal/memory/embedding-cache.d.ts +42 -0
- package/dist/internal/memory/escape-like-pattern.d.ts +22 -0
- package/dist/internal/memory/index-db.d.ts +67 -0
- package/dist/internal/memory/index-manager-contract.d.ts +48 -0
- package/dist/internal/memory/index-manager-dispatch.d.ts +23 -0
- package/dist/internal/memory/index-manager-helpers.d.ts +20 -0
- package/dist/internal/memory/index-manager.d.ts +44 -0
- package/dist/internal/memory/index-repository.d.ts +58 -0
- package/dist/internal/memory/index-schema.d.ts +21 -0
- package/dist/internal/memory/lance-index.d.ts +46 -0
- package/dist/internal/memory/lance-memory-adapter.d.ts +45 -0
- package/dist/internal/memory/memory-index.d.ts +67 -0
- package/dist/internal/memory/migrate-sqlite-to-lance.d.ts +58 -0
- package/dist/internal/memory/migration.d.ts +9 -0
- package/dist/internal/memory/sdk-memory-peer-loader.d.ts +74 -0
- package/dist/internal/memory/sqlite-vec-loader.d.ts +1 -0
- package/dist/internal/memory/storage/chunk-markdown.d.cts +2 -0
- package/dist/internal/memory/storage/chunk-markdown.d.ts +2 -0
- package/dist/internal/memory/storage/index.cjs +141 -0
- package/dist/internal/memory/storage/index.cjs.map +1 -0
- package/dist/internal/memory/storage/index.d.cts +28 -0
- package/dist/internal/memory/storage/index.d.ts +28 -0
- package/dist/internal/memory/storage/index.js +16 -0
- package/dist/internal/memory/storage/index.js.map +1 -0
- package/dist/internal/memory/storage/list-markdown.d.cts +1 -0
- package/dist/internal/memory/storage/list-markdown.d.ts +1 -0
- package/dist/internal/memory/storage/markdown-store.d.cts +48 -0
- package/dist/internal/memory/storage/markdown-store.d.ts +48 -0
- package/dist/internal/memory/storage/memory-file.d.cts +90 -0
- package/dist/internal/memory/storage/memory-file.d.ts +90 -0
- package/dist/internal/memory/storage/memory-root.d.cts +119 -0
- package/dist/internal/memory/storage/memory-root.d.ts +119 -0
- package/dist/internal/memory/storage/reader.d.cts +8 -0
- package/dist/internal/memory/storage/reader.d.ts +8 -0
- package/dist/internal/memory/storage/session-loader.d.cts +35 -0
- package/dist/internal/memory/storage/session-loader.d.ts +35 -0
- package/dist/internal/memory/storage/session-summary-writer.d.cts +50 -0
- package/dist/internal/memory/storage/session-summary-writer.d.ts +50 -0
- package/dist/internal/memory/storage/threat-scan.d.cts +62 -0
- package/dist/internal/memory/storage/threat-scan.d.ts +62 -0
- package/dist/internal/memory/storage/transcript-store.d.cts +38 -0
- package/dist/internal/memory/storage/transcript-store.d.ts +38 -0
- package/dist/internal/memory/storage/wiki-loader.d.cts +27 -0
- package/dist/internal/memory/storage/wiki-loader.d.ts +27 -0
- package/dist/internal/memory/tools.d.ts +21 -0
- package/dist/internal/memory/types.d.ts +78 -0
- package/dist/internal/memory/vec-index.d.ts +28 -0
- package/dist/internal/persistence/atomic-write.d.cts +107 -0
- package/dist/internal/persistence/atomic-write.d.ts +107 -0
- package/dist/internal/persistence/cwd-mutex.d.cts +35 -0
- package/dist/internal/persistence/cwd-mutex.d.ts +35 -0
- package/dist/internal/persistence/exclusive-create.d.cts +53 -0
- package/dist/internal/persistence/exclusive-create.d.ts +53 -0
- package/dist/internal/persistence/file-lock.d.cts +54 -0
- package/dist/internal/persistence/file-lock.d.ts +54 -0
- package/dist/internal/persistence/fs-session-store.d.cts +68 -0
- package/dist/internal/persistence/fs-session-store.d.ts +68 -0
- package/dist/internal/persistence/fts5-sanitize.d.cts +44 -0
- package/dist/internal/persistence/fts5-sanitize.d.ts +44 -0
- package/dist/internal/persistence/index.cjs +127 -0
- package/dist/internal/persistence/index.cjs.map +1 -0
- package/dist/internal/persistence/index.d.cts +33 -0
- package/dist/internal/persistence/index.d.ts +33 -0
- package/dist/internal/persistence/index.js +40 -0
- package/dist/internal/persistence/index.js.map +1 -0
- package/dist/internal/persistence/jsonl.d.cts +43 -0
- package/dist/internal/persistence/jsonl.d.ts +43 -0
- package/dist/internal/persistence/markdown-config-loader.d.cts +35 -0
- package/dist/internal/persistence/markdown-config-loader.d.ts +35 -0
- package/dist/internal/persistence/pagination.d.cts +21 -0
- package/dist/internal/persistence/pagination.d.ts +21 -0
- package/dist/internal/persistence/paths.d.cts +137 -0
- package/dist/internal/persistence/paths.d.ts +137 -0
- package/dist/internal/persistence/persistence-schema.d.cts +29 -0
- package/dist/internal/persistence/persistence-schema.d.ts +29 -0
- package/dist/internal/persistence/schema-version.d.cts +227 -0
- package/dist/internal/persistence/schema-version.d.ts +227 -0
- package/dist/internal/persistence/session-artifacts.d.cts +27 -0
- package/dist/internal/persistence/session-artifacts.d.ts +27 -0
- package/dist/internal/persistence/session-dir.d.cts +1 -0
- package/dist/internal/persistence/session-dir.d.ts +1 -0
- package/dist/internal/persistence/session-transcript.d.cts +128 -0
- package/dist/internal/persistence/session-transcript.d.ts +128 -0
- package/dist/internal/persistence/session-writer.d.cts +104 -0
- package/dist/internal/persistence/session-writer.d.ts +104 -0
- package/dist/internal/persistence/sqlite-cas.d.cts +61 -0
- package/dist/internal/persistence/sqlite-cas.d.ts +61 -0
- package/dist/internal/persistence/sqlite-open.d.cts +61 -0
- package/dist/internal/persistence/sqlite-open.d.ts +61 -0
- package/dist/internal/persistence/sqlite-wal.d.cts +54 -0
- package/dist/internal/persistence/sqlite-wal.d.ts +54 -0
- package/dist/internal/persistence/transcript-ops.d.cts +99 -0
- package/dist/internal/persistence/transcript-ops.d.ts +99 -0
- package/dist/internal/personality/context.d.ts +17 -0
- package/dist/internal/personality/registry.d.ts +17 -0
- package/dist/internal/personality/store.d.ts +27 -0
- package/dist/internal/personality/switch.d.ts +36 -0
- package/dist/internal/personality/types.d.ts +18 -0
- package/dist/internal/plugins/context.d.cts +21 -0
- package/dist/internal/plugins/context.d.ts +21 -0
- package/dist/internal/plugins/enabled-names.d.cts +1 -0
- package/dist/internal/plugins/enabled-names.d.ts +1 -0
- package/dist/internal/plugins/index.d.cts +9 -0
- package/dist/internal/plugins/index.d.ts +9 -0
- package/dist/internal/plugins/lifecycle.d.cts +15 -0
- package/dist/internal/plugins/lifecycle.d.ts +15 -0
- package/dist/internal/plugins/manager.d.cts +57 -0
- package/dist/internal/plugins/manager.d.ts +57 -0
- package/dist/internal/plugins/plugin-guards.d.cts +13 -0
- package/dist/internal/plugins/plugin-guards.d.ts +13 -0
- package/dist/internal/plugins/types.d.cts +26 -0
- package/dist/internal/plugins/types.d.ts +26 -0
- package/dist/internal/providers/builtin/anthropic.d.ts +2 -0
- package/dist/internal/providers/builtin/bedrock.d.ts +25 -0
- package/dist/internal/providers/builtin/cerebras.d.ts +5 -0
- package/dist/internal/providers/builtin/cohere.d.ts +8 -0
- package/dist/internal/providers/builtin/deepinfra.d.ts +2 -0
- package/dist/internal/providers/builtin/gemini.d.ts +10 -0
- package/dist/internal/providers/builtin/google.d.ts +6 -0
- package/dist/internal/providers/builtin/groq.d.ts +2 -0
- package/dist/internal/providers/builtin/index.d.ts +20 -0
- package/dist/internal/providers/builtin/llamacpp.d.ts +1 -0
- package/dist/internal/providers/builtin/lmstudio.d.ts +1 -0
- package/dist/internal/providers/builtin/mistral.d.ts +2 -0
- package/dist/internal/providers/builtin/ollama.d.ts +17 -0
- package/dist/internal/providers/builtin/openai-chatgpt.d.ts +14 -0
- package/dist/internal/providers/builtin/openai-compatible.d.ts +1 -0
- package/dist/internal/providers/builtin/openai.d.ts +2 -0
- package/dist/internal/providers/builtin/openrouter.d.ts +2 -0
- package/dist/internal/providers/builtin/perplexity.d.ts +5 -0
- package/dist/internal/providers/builtin/together.d.ts +2 -0
- package/dist/internal/providers/builtin/vertex.d.ts +27 -0
- package/dist/internal/providers/builtin/xai.d.ts +2 -0
- package/dist/internal/providers/catalog-loader.d.ts +55 -0
- package/dist/internal/providers/catalog-schema.d.ts +202 -0
- package/dist/internal/providers/catalog-source-models-dev.d.ts +80 -0
- package/dist/internal/providers/discovery.d.ts +14 -0
- package/dist/internal/providers/index.d.ts +8 -0
- package/dist/internal/providers/register-plugin-providers.d.ts +22 -0
- package/dist/internal/providers/registry.d.ts +13 -0
- package/dist/internal/providers/types.d.ts +11 -0
- package/dist/internal/retry/circuit-breaker.d.ts +26 -0
- package/dist/internal/retry/with-retry.d.ts +40 -0
- package/dist/internal/runtime/compat/compat-config-file.d.ts +31 -0
- package/dist/internal/runtime/compat/foreign-config-sources.d.ts +139 -0
- package/dist/internal/runtime/compression/compression-attempt.d.ts +24 -0
- package/dist/internal/runtime/compression/compression-config.d.ts +33 -0
- package/dist/internal/runtime/compression/compression-decision.d.ts +10 -0
- package/dist/internal/runtime/compression/compression-helpers.d.ts +18 -0
- package/dist/internal/runtime/compression/compression-model-registry.d.ts +41 -0
- package/dist/internal/runtime/compression/compression-summarizer.d.ts +34 -0
- package/dist/internal/runtime/config/default-model.d.ts +1 -0
- package/dist/internal/runtime/config/providers-manager.d.ts +1 -0
- package/dist/internal/runtime/config/workspace-dir.d.ts +9 -0
- package/dist/internal/runtime/context/context-aggregator.d.ts +26 -0
- package/dist/internal/runtime/context/context-discovery-runner.d.ts +80 -0
- package/dist/internal/runtime/context/context-discovery.d.ts +79 -0
- package/dist/internal/runtime/context/context-frontmatter.d.ts +16 -0
- package/dist/internal/runtime/context/context-glob.d.ts +1 -0
- package/dist/internal/runtime/context/context-import-resolver.d.ts +41 -0
- package/dist/internal/runtime/context/context-loaders.d.ts +42 -0
- package/dist/internal/runtime/context/context-manager.d.ts +28 -0
- package/dist/internal/runtime/context/context-mdc-parser.d.ts +25 -0
- package/dist/internal/runtime/context/context-rules-frontmatter.d.ts +99 -0
- package/dist/internal/runtime/context/context-yaml-lite.d.ts +26 -0
- package/dist/internal/runtime/context/project-instructions.d.ts +66 -0
- package/dist/internal/runtime/context/yaml-frontmatter.d.ts +20 -0
- package/dist/internal/runtime/fixtures/fixture-events.d.ts +12 -0
- package/dist/internal/runtime/fixtures/fixture-mode.d.ts +24 -0
- package/dist/internal/runtime/fixtures/fixture-responder.d.ts +1 -0
- package/dist/internal/runtime/fixtures/fixture-run-base.d.ts +96 -0
- package/dist/internal/runtime/fixtures/fixture-scripts.d.ts +21 -0
- package/dist/internal/runtime/fixtures/types.d.ts +1 -0
- package/dist/internal/runtime/hooks/hooks-executor.d.ts +49 -0
- package/dist/internal/runtime/hooks/hooks-source.d.ts +35 -0
- package/dist/internal/runtime/lifecycle/context-budget-event.d.ts +25 -0
- package/dist/internal/runtime/lifecycle/env-policy.d.ts +29 -0
- package/dist/internal/runtime/lifecycle/fork-agent.d.ts +15 -0
- package/dist/internal/runtime/lifecycle/goal-marker.d.ts +13 -0
- package/dist/internal/runtime/lifecycle/post-run-lifecycle.d.ts +16 -0
- package/dist/internal/runtime/lifecycle/run-to-completion.d.ts +22 -0
- package/dist/internal/runtime/lifecycle/run-until.d.ts +21 -0
- package/dist/internal/runtime/lifecycle/spawn-collect.d.ts +8 -0
- package/dist/internal/runtime/lifecycle/stream-to-completion.d.ts +31 -0
- package/dist/internal/runtime/lifecycle/wrap-completion-check-run.d.ts +30 -0
- package/dist/internal/runtime/memory-glue/memory-provider.d.ts +11 -0
- package/dist/internal/runtime/memory-glue/memory-store.d.ts +4 -0
- package/dist/internal/runtime/memory-glue/select-facts.d.ts +63 -0
- package/dist/internal/runtime/model-selection.d.ts +14 -0
- package/dist/internal/runtime/plugin-loader/plugin-bundles.d.ts +22 -0
- package/dist/internal/runtime/plugin-loader/plugin-frontmatter.d.ts +17 -0
- package/dist/internal/runtime/plugin-loader/plugins-manager.d.ts +1 -0
- package/dist/internal/runtime/processors/run-processors.d.ts +10 -0
- package/dist/internal/runtime/processors/tripwire-run.d.ts +16 -0
- package/dist/internal/runtime/processors/wrap-output-run.d.ts +18 -0
- package/dist/internal/runtime/registry/agent-factory-registry.d.ts +19 -0
- package/dist/internal/runtime/registry/agent-registry-contract.d.ts +31 -0
- package/dist/internal/runtime/registry/agent-registry-store.d.ts +75 -0
- package/dist/internal/runtime/registry/agent-registry.d.ts +6 -0
- package/dist/internal/runtime/registry/live-agent-registry.d.ts +132 -0
- package/dist/internal/runtime/registry/run-registry.d.ts +4 -0
- package/dist/internal/runtime/skills/discover-skills.d.ts +103 -0
- package/dist/internal/runtime/skills/skill-frontmatter.d.ts +6 -0
- package/dist/internal/runtime/skills/skills-block.d.ts +18 -0
- package/dist/internal/runtime/skills/skills-manager.d.ts +1 -0
- package/dist/internal/runtime/skills/subagent-tool-scope.d.ts +25 -0
- package/dist/internal/runtime/skills/subagents-loader.d.ts +1 -0
- package/dist/internal/runtime/system-prompt/escape.d.ts +1 -0
- package/dist/internal/runtime/system-prompt/local-assembly.d.ts +2 -0
- package/dist/internal/runtime/system-prompt/native-reasoning.d.ts +25 -0
- package/dist/internal/runtime/system-prompt/pipeline.d.ts +1 -0
- package/dist/internal/runtime/system-prompt/safe-call.d.ts +1 -0
- package/dist/internal/runtime/system-prompt/sources/active-memory-provider.d.ts +1 -0
- package/dist/internal/runtime/system-prompt/sources/base-provider.d.ts +1 -0
- package/dist/internal/runtime/system-prompt/sources/context-provider.d.ts +1 -0
- package/dist/internal/runtime/system-prompt/sources/memory-provider.d.ts +6 -0
- package/dist/internal/runtime/system-prompt/sources/reasoning-provider.d.ts +1 -0
- package/dist/internal/runtime/system-prompt/sources/skills-provider.d.ts +1 -0
- package/dist/internal/runtime/system-prompt/system-prompt.d.ts +1 -0
- package/dist/internal/runtime/system-prompt/types.d.ts +5 -0
- package/dist/internal/runtime/tools/shell-tool.d.ts +7 -0
- package/dist/internal/runtime/validation/validate-agent-options.d.ts +1 -0
- package/dist/internal/runtime/validation/validate-response.d.ts +18 -0
- package/dist/internal/scorers/levenshtein.d.ts +11 -0
- package/dist/internal/scorers/llm-judge.d.ts +41 -0
- package/dist/internal/security/index.cjs +52 -0
- package/dist/internal/security/index.cjs.map +1 -0
- package/dist/internal/security/index.d.cts +19 -0
- package/dist/internal/security/index.d.ts +19 -0
- package/dist/internal/security/index.js +7 -0
- package/dist/internal/security/index.js.map +1 -0
- package/dist/internal/security/path-containment.d.cts +24 -0
- package/dist/internal/security/path-containment.d.ts +24 -0
- package/dist/internal/security/path-guard.d.cts +166 -0
- package/dist/internal/security/path-guard.d.ts +166 -0
- package/dist/internal/security/redact.d.cts +74 -0
- package/dist/internal/security/redact.d.ts +74 -0
- package/dist/internal/security/test-reset.d.cts +10 -0
- package/dist/internal/security/test-reset.d.ts +10 -0
- package/dist/internal/session/agent-session-store.d.ts +65 -0
- package/dist/internal/session/agent-session.d.ts +48 -0
- package/dist/internal/session/compact-session.d.ts +97 -0
- package/dist/internal/session/index.d.ts +7 -0
- package/dist/internal/session/inject-session.d.ts +15 -0
- package/dist/internal/session/session-cache.d.ts +31 -0
- package/dist/internal/session/types.d.ts +46 -0
- package/dist/internal/structured-output-helpers.d.ts +54 -0
- package/dist/internal/task/registry.d.ts +60 -0
- package/dist/internal/task/ring-buffer.d.ts +10 -0
- package/dist/internal/task/store.d.ts +145 -0
- package/dist/internal/task/subscribe.d.ts +15 -0
- package/dist/internal/task/task-id.d.ts +22 -0
- package/dist/internal/task/task-run-event-bridge.d.ts +10 -0
- package/dist/internal/task/telemetry.d.ts +27 -0
- package/dist/internal/telemetry/adapter-registry.d.ts +12 -0
- package/dist/internal/telemetry/adapters/arize.d.ts +2 -0
- package/dist/internal/telemetry/adapters/braintrust.d.ts +7 -0
- package/dist/internal/telemetry/adapters/datadog.d.ts +2 -0
- package/dist/internal/telemetry/adapters/langfuse.d.ts +2 -0
- package/dist/internal/telemetry/adapters/langsmith.d.ts +7 -0
- package/dist/internal/telemetry/adapters/posthog.d.ts +2 -0
- package/dist/internal/telemetry/adapters/sentry.d.ts +2 -0
- package/dist/internal/telemetry/safe-require.d.ts +1 -0
- package/dist/internal/telemetry/span-names.d.ts +10 -0
- package/dist/internal/telemetry/tracer-loader.d.ts +20 -0
- package/dist/internal/telemetry/tracer.d.ts +57 -0
- package/dist/internal/tool-dispatch/repair-middleware.d.ts +34 -0
- package/dist/internal/tool-dispatch/strip-think.d.ts +22 -0
- package/dist/internal/tool-registry/personality-filter.d.ts +37 -0
- package/dist/internal/workflow/ctx.d.ts +24 -0
- package/dist/internal/workflow/error-shape.d.ts +7 -0
- package/dist/internal/workflow/event-stream.d.ts +13 -0
- package/dist/internal/workflow/evented-executor.d.ts +42 -0
- package/dist/internal/workflow/executor-helpers.d.ts +30 -0
- package/dist/internal/workflow/executor.d.ts +16 -0
- package/dist/internal/workflow/retry-policy.d.ts +14 -0
- package/dist/internal/workflow/run-id.d.ts +9 -0
- package/dist/internal/workflow/scheduler.d.ts +23 -0
- package/dist/internal/workflow/single-flight.d.ts +18 -0
- package/dist/internal/workflow/snapshot-store.d.ts +23 -0
- package/dist/internal/workflow/step-agent.d.ts +12 -0
- package/dist/internal/workflow/step-branch.d.ts +10 -0
- package/dist/internal/workflow/step-dowhile.d.ts +8 -0
- package/dist/internal/workflow/step-execution.d.ts +25 -0
- package/dist/internal/workflow/step-fn.d.ts +10 -0
- package/dist/internal/workflow/step-foreach.d.ts +11 -0
- package/dist/internal/workflow/step-parallel.d.ts +17 -0
- package/dist/internal/workflow/step-sleep.d.ts +7 -0
- package/dist/internal/workflow/telemetry.d.ts +21 -0
- package/dist/internal/zod-to-json-schema.d.ts +11 -0
- package/dist/job-queue.d.ts +68 -0
- package/dist/judge-call-46M2E5FA.cjs +22 -0
- package/dist/judge-call-46M2E5FA.cjs.map +1 -0
- package/dist/judge-call-FGUNNWEI.js +5 -0
- package/dist/judge-call-FGUNNWEI.js.map +1 -0
- package/dist/mcp-auth.cjs +314 -0
- package/dist/mcp-auth.cjs.map +1 -0
- package/dist/mcp-auth.d.cts +19 -0
- package/dist/mcp-auth.d.ts +19 -0
- package/dist/mcp-auth.js +307 -0
- package/dist/mcp-auth.js.map +1 -0
- package/dist/messages.cjs +24 -0
- package/dist/messages.cjs.map +1 -0
- package/dist/messages.d.cts +33 -0
- package/dist/messages.d.ts +33 -0
- package/dist/messages.js +20 -0
- package/dist/messages.js.map +1 -0
- package/dist/models.cjs +295 -0
- package/dist/models.cjs.map +1 -0
- package/dist/models.d.cts +18 -0
- package/dist/models.d.ts +18 -0
- package/dist/models.js +286 -0
- package/dist/models.js.map +1 -0
- package/dist/oauth-transaction-store-5RIR6D5C.js +5 -0
- package/dist/oauth-transaction-store-5RIR6D5C.js.map +1 -0
- package/dist/oauth-transaction-store-SXIE57OD.cjs +38 -0
- package/dist/oauth-transaction-store-SXIE57OD.cjs.map +1 -0
- package/dist/path-safety.cjs +39 -0
- package/dist/path-safety.cjs.map +1 -0
- package/dist/path-safety.d.cts +16 -0
- package/dist/path-safety.d.ts +16 -0
- package/dist/path-safety.js +6 -0
- package/dist/path-safety.js.map +1 -0
- package/dist/permission-engine.d.ts +134 -0
- package/dist/persistence.cjs +197 -0
- package/dist/persistence.cjs.map +1 -0
- package/dist/persistence.d.cts +40 -0
- package/dist/persistence.d.ts +40 -0
- package/dist/persistence.js +100 -0
- package/dist/persistence.js.map +1 -0
- package/dist/project.cjs +45 -0
- package/dist/project.cjs.map +1 -0
- package/dist/project.d.cts +14 -0
- package/dist/project.d.ts +14 -0
- package/dist/project.js +42 -0
- package/dist/project.js.map +1 -0
- package/dist/provider-catalog.json +1295 -0
- package/dist/providers.cjs +23 -0
- package/dist/providers.cjs.map +1 -0
- package/dist/providers.d.cts +31 -0
- package/dist/providers.d.ts +31 -0
- package/dist/providers.js +10 -0
- package/dist/providers.js.map +1 -0
- package/dist/registry-BZQFYRTL.cjs +46 -0
- package/dist/registry-BZQFYRTL.cjs.map +1 -0
- package/dist/registry-DMWCJKRF.js +9 -0
- package/dist/registry-DMWCJKRF.js.map +1 -0
- package/dist/retry.cjs +14 -0
- package/dist/retry.cjs.map +1 -0
- package/dist/retry.d.cts +35 -0
- package/dist/retry.d.ts +35 -0
- package/dist/retry.js +5 -0
- package/dist/retry.js.map +1 -0
- package/dist/run-CTAdRU3U.d.cts +1813 -0
- package/dist/run-CTAdRU3U.d.ts +1813 -0
- package/dist/run-to-completion-DRO77625.js +3 -0
- package/dist/run-to-completion-DRO77625.js.map +1 -0
- package/dist/run-to-completion-X4OWM673.cjs +48 -0
- package/dist/run-to-completion-X4OWM673.cjs.map +1 -0
- package/dist/run-until-6D6TQ4JN.js +146 -0
- package/dist/run-until-6D6TQ4JN.js.map +1 -0
- package/dist/run-until-DG2KXWB2.cjs +149 -0
- package/dist/run-until-DG2KXWB2.cjs.map +1 -0
- package/dist/sandbox/bwrap.d.cts +112 -0
- package/dist/sandbox/bwrap.d.ts +112 -0
- package/dist/sandbox/index.cjs +495 -0
- package/dist/sandbox/index.cjs.map +1 -0
- package/dist/sandbox/index.d.cts +13 -0
- package/dist/sandbox/index.d.ts +13 -0
- package/dist/sandbox/index.js +451 -0
- package/dist/sandbox/index.js.map +1 -0
- package/dist/sandbox/linux-sandbox.d.cts +218 -0
- package/dist/sandbox/linux-sandbox.d.ts +218 -0
- package/dist/sandbox/local-sandbox.d.cts +66 -0
- package/dist/sandbox/local-sandbox.d.ts +66 -0
- package/dist/sandbox/provision.d.cts +60 -0
- package/dist/sandbox/provision.d.ts +60 -0
- package/dist/sandbox/seccomp.d.cts +16 -0
- package/dist/sandbox/seccomp.d.ts +16 -0
- package/dist/sandbox/shell-escape.d.cts +8 -0
- package/dist/sandbox/shell-escape.d.ts +8 -0
- package/dist/sandbox/types.d.cts +143 -0
- package/dist/sandbox/types.d.ts +143 -0
- package/dist/sanitize/coerce.d.cts +1 -0
- package/dist/sanitize/coerce.d.ts +1 -0
- package/dist/sanitize/index.cjs +12 -0
- package/dist/sanitize/index.cjs.map +1 -0
- package/dist/sanitize/index.d.cts +9 -0
- package/dist/sanitize/index.d.ts +9 -0
- package/dist/sanitize/index.js +3 -0
- package/dist/sanitize/index.js.map +1 -0
- package/dist/sanitize/sanitize-tool-input.d.cts +11 -0
- package/dist/sanitize/sanitize-tool-input.d.ts +11 -0
- package/dist/sanitize/types.d.cts +52 -0
- package/dist/sanitize/types.d.ts +52 -0
- package/dist/scorers.d.ts +181 -0
- package/dist/sdk-agent-BOiKqOgL.d.cts +940 -0
- package/dist/sdk-agent-D4a_BR_6.d.ts +940 -0
- package/dist/server/auth/errors.d.cts +54 -0
- package/dist/server/auth/errors.d.ts +54 -0
- package/dist/server/auth/index.cjs +210 -0
- package/dist/server/auth/index.cjs.map +1 -0
- package/dist/server/auth/index.d.cts +244 -0
- package/dist/server/auth/index.d.ts +244 -0
- package/dist/server/auth/index.js +189 -0
- package/dist/server/auth/index.js.map +1 -0
- package/dist/server/auth/oauth-transaction-store.d.cts +52 -0
- package/dist/server/auth/oauth-transaction-store.d.ts +52 -0
- package/dist/server/auth/orchestrator.d.cts +15 -0
- package/dist/server/auth/orchestrator.d.ts +15 -0
- package/dist/server/auth/types.d.cts +109 -0
- package/dist/server/auth/types.d.ts +109 -0
- package/dist/server/auth/validate-return-to.d.cts +27 -0
- package/dist/server/auth/validate-return-to.d.ts +27 -0
- package/dist/server/errors-envelope.cjs +101 -0
- package/dist/server/errors-envelope.cjs.map +1 -0
- package/dist/server/errors-envelope.d.cts +67 -0
- package/dist/server/errors-envelope.d.ts +67 -0
- package/dist/server/errors-envelope.js +95 -0
- package/dist/server/errors-envelope.js.map +1 -0
- package/dist/session-transcript-LGHSNVY5.cjs +62 -0
- package/dist/session-transcript-LGHSNVY5.cjs.map +1 -0
- package/dist/session-transcript-VTBTCGQX.js +5 -0
- package/dist/session-transcript-VTBTCGQX.js.map +1 -0
- package/dist/skills.cjs +25 -0
- package/dist/skills.cjs.map +1 -0
- package/dist/skills.d.cts +19 -0
- package/dist/skills.d.ts +19 -0
- package/dist/skills.js +8 -0
- package/dist/skills.js.map +1 -0
- package/dist/stream-object-HBFMIZLD.js +7 -0
- package/dist/stream-object-HBFMIZLD.js.map +1 -0
- package/dist/stream-object-QSKHISDJ.cjs +20 -0
- package/dist/stream-object-QSKHISDJ.cjs.map +1 -0
- package/dist/stream-object.d.ts +73 -0
- package/dist/stream-to-completion-QV5HCL3J.js +30 -0
- package/dist/stream-to-completion-QV5HCL3J.js.map +1 -0
- package/dist/stream-to-completion-SRISU5AB.cjs +32 -0
- package/dist/stream-to-completion-SRISU5AB.cjs.map +1 -0
- package/dist/subagents-loader-DOBTTICM.js +7 -0
- package/dist/subagents-loader-DOBTTICM.js.map +1 -0
- package/dist/subagents-loader-GEHYCMEX.cjs +16 -0
- package/dist/subagents-loader-GEHYCMEX.cjs.map +1 -0
- package/dist/subagents-loader.cjs +35 -0
- package/dist/subagents-loader.cjs.map +1 -0
- package/dist/subagents-loader.d.cts +90 -0
- package/dist/subagents-loader.d.ts +90 -0
- package/dist/subagents-loader.js +32 -0
- package/dist/subagents-loader.js.map +1 -0
- package/dist/subagents.cjs +18 -0
- package/dist/subagents.cjs.map +1 -0
- package/dist/subagents.d.cts +14 -0
- package/dist/subagents.d.ts +14 -0
- package/dist/subagents.js +15 -0
- package/dist/subagents.js.map +1 -0
- package/dist/subscription/define-subscription.d.cts +71 -0
- package/dist/subscription/define-subscription.d.ts +71 -0
- package/dist/subscription/index.cjs +408 -0
- package/dist/subscription/index.cjs.map +1 -0
- package/dist/subscription/index.d.cts +20 -0
- package/dist/subscription/index.d.ts +20 -0
- package/dist/subscription/index.js +400 -0
- package/dist/subscription/index.js.map +1 -0
- package/dist/subscription/internal/backpressure.d.cts +24 -0
- package/dist/subscription/internal/backpressure.d.ts +24 -0
- package/dist/subscription/internal/server-integration.d.cts +22 -0
- package/dist/subscription/internal/server-integration.d.ts +22 -0
- package/dist/subscription/internal/sse-encoder.d.cts +13 -0
- package/dist/subscription/internal/sse-encoder.d.ts +13 -0
- package/dist/subscription/internal/sse-parser.d.cts +15 -0
- package/dist/subscription/internal/sse-parser.d.ts +15 -0
- package/dist/subscription/internal/subscription-runtime.d.cts +21 -0
- package/dist/subscription/internal/subscription-runtime.d.ts +21 -0
- package/dist/subscription/internal/types.d.cts +11 -0
- package/dist/subscription/internal/types.d.ts +11 -0
- package/dist/subscription/internal/ws-adapter-node.d.cts +10 -0
- package/dist/subscription/internal/ws-adapter-node.d.ts +10 -0
- package/dist/subscription/theokit-subscribe.d.cts +54 -0
- package/dist/subscription/theokit-subscribe.d.ts +54 -0
- package/dist/subscription/types.d.cts +158 -0
- package/dist/subscription/types.d.ts +158 -0
- package/dist/task-errors.d.ts +58 -0
- package/dist/task-store.cjs +23 -0
- package/dist/task-store.cjs.map +1 -0
- package/dist/task-store.d.cts +10 -0
- package/dist/task-store.d.ts +10 -0
- package/dist/task-store.js +6 -0
- package/dist/task-store.js.map +1 -0
- package/dist/tool-error.d.ts +30 -0
- package/dist/types/agent-prims.d.ts +137 -0
- package/dist/types/agent.d.ts +947 -0
- package/dist/types/batch.d.ts +121 -0
- package/dist/types/budget-tracker.d.ts +80 -0
- package/dist/types/budget.d.ts +97 -0
- package/dist/types/content-blocks.d.ts +50 -0
- package/dist/types/context.d.ts +96 -0
- package/dist/types/conversation.d.ts +127 -0
- package/dist/types/cron.d.ts +172 -0
- package/dist/types/env-policy.d.ts +21 -0
- package/dist/types/eval.d.ts +255 -0
- package/dist/types/fork.d.ts +52 -0
- package/dist/types/goal-events.d.ts +144 -0
- package/dist/types/index.d.ts +19 -0
- package/dist/types/mcp.d.ts +90 -0
- package/dist/types/memory-adapter.d.ts +189 -0
- package/dist/types/memory-provider.d.ts +206 -0
- package/dist/types/messages-base.d.ts +24 -0
- package/dist/types/messages.d.ts +161 -0
- package/dist/types/plugin.d.ts +308 -0
- package/dist/types/processors.d.ts +87 -0
- package/dist/types/provider-profile.d.ts +116 -0
- package/dist/types/providers.d.ts +116 -0
- package/dist/types/run-events.d.ts +197 -0
- package/dist/types/run.d.ts +671 -0
- package/dist/types/sdk-agent.d.ts +342 -0
- package/dist/types/session-message.d.ts +62 -0
- package/dist/types/session-record.d.ts +103 -0
- package/dist/types/session-store.d.ts +104 -0
- package/dist/types/task.d.ts +146 -0
- package/dist/types/theokit.d.ts +73 -0
- package/dist/types/trajectory.d.ts +52 -0
- package/dist/types/updates.d.ts +184 -0
- package/dist/types/usage.d.ts +64 -0
- package/dist/types/workflow.d.ts +426 -0
- package/dist/workflow-as-tool.d.ts +66 -0
- package/dist/workflow-errors.d.ts +164 -0
- package/dist/workflow.cjs +100 -0
- package/dist/workflow.cjs.map +1 -0
- package/dist/workflow.d.cts +911 -0
- package/dist/workflow.d.ts +911 -0
- package/dist/workflow.js +11 -0
- package/dist/workflow.js.map +1 -0
- package/docs/adr/README.md +2604 -0
- package/docs/error-codes.md +253 -0
- package/docs/harness-capability-map.md +1435 -0
- package/docs/memory-decisions.md +265 -0
- package/package.json +455 -0
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `LocalAgent` constructor bootstrap helpers (extracted for G8 ≤400 LoC).
|
|
3
|
+
*
|
|
4
|
+
* Each helper builds one optional submanager from `AgentOptions` and
|
|
5
|
+
* the resolved workspace cwd. The constructor itself stays focused on
|
|
6
|
+
* the agentId / model wiring; submanager bootstrap is delegated here.
|
|
7
|
+
*
|
|
8
|
+
* @internal
|
|
9
|
+
*/
|
|
10
|
+
import { ProvidersManagerImpl } from "../runtime/config/providers-manager.js";
|
|
11
|
+
import { FileContextManager } from "../runtime/context/context-manager.js";
|
|
12
|
+
import { type PluginMetadata, PluginsManager } from "../runtime/plugin-loader/plugins-manager.js";
|
|
13
|
+
import { type SkillsHandle, SkillsManager } from "../runtime/skills/skills-manager.js";
|
|
14
|
+
export declare function registerLocalAgent(args: {
|
|
15
|
+
agentId: string;
|
|
16
|
+
model: ModelSelection | undefined;
|
|
17
|
+
options: AgentOptions;
|
|
18
|
+
workspaceCwd: string;
|
|
19
|
+
}): void;
|
|
20
|
+
export interface BootstrappedSubmanagers {
|
|
21
|
+
context?: FileContextManager;
|
|
22
|
+
providers?: ProvidersManagerImpl;
|
|
23
|
+
skillsManager?: SkillsManager;
|
|
24
|
+
skills?: SkillsHandle;
|
|
25
|
+
pluginsManager?: PluginsManager;
|
|
26
|
+
plugins?: {
|
|
27
|
+
list: () => Promise<PluginMetadata[]>;
|
|
28
|
+
};
|
|
29
|
+
}
|
|
30
|
+
interface BootstrapArgs {
|
|
31
|
+
options: AgentOptions;
|
|
32
|
+
workspaceCwd: string;
|
|
33
|
+
settingSourcesIncludeProject: boolean;
|
|
34
|
+
settingSourcesIncludePlugins: boolean;
|
|
35
|
+
}
|
|
36
|
+
export declare function bootstrapSubmanagers(args: BootstrapArgs): BootstrappedSubmanagers;
|
|
37
|
+
export {};
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* What a local agent cannot do, answered without throwing.
|
|
3
|
+
*
|
|
4
|
+
* `SDKAgent` is one interface over two runtimes, and a local agent genuinely has no artifacts — the
|
|
5
|
+
* LSP finding this closes is that `downloadArtifact` rejected with `UnsupportedRunOperationError`
|
|
6
|
+
* and nothing let a caller ASK first. `supports`/`unsupportedReason` are that question, and they
|
|
7
|
+
* live here rather than on the class because the answer is a property of the RUNTIME, not of any
|
|
8
|
+
* particular agent instance: it needs no field, no lock and no session.
|
|
9
|
+
*
|
|
10
|
+
* Kept a module and not a static on the class so `local-agent.ts` carries one fewer concern; the
|
|
11
|
+
* class keeps two one-line delegations, which is the surface `SDKAgent` requires.
|
|
12
|
+
*/
|
|
13
|
+
import type { AgentOperation, SDKArtifact } from "../../types/sdk-agent.js";
|
|
14
|
+
/** Whether the local runtime implements `operation`. */
|
|
15
|
+
export declare function localAgentSupports(operation: AgentOperation): boolean;
|
|
16
|
+
/** Why `operation` is unavailable, or `undefined` when it is available. */
|
|
17
|
+
export declare function localAgentUnsupportedReason(operation: AgentOperation): string | undefined;
|
|
18
|
+
/** A local agent has no artifacts, so the list is empty rather than an error. */
|
|
19
|
+
export declare function localAgentListArtifacts(): Promise<SDKArtifact[]>;
|
|
20
|
+
/**
|
|
21
|
+
* Downloading one IS an error, and a typed one — the asymmetry is deliberate. An empty list is a
|
|
22
|
+
* true answer about a local agent; a download is a request the runtime cannot honour, and
|
|
23
|
+
* `supports("downloadArtifact")` is how a caller finds that out without provoking the rejection.
|
|
24
|
+
*/
|
|
25
|
+
export declare function localAgentDownloadArtifact(): Promise<Buffer>;
|
|
26
|
+
/**
|
|
27
|
+
* The four answers as one object, so a consumer imports one name.
|
|
28
|
+
*
|
|
29
|
+
* Not decoration: `local-agent.ts` sits against a 400-line budget and a four-name import block costs
|
|
30
|
+
* five lines there. It is also the shape this package already uses for a namespace of related
|
|
31
|
+
* functions — see the static-namespace convention in `tests/lint/static-namespace-names-its-product.test.ts`.
|
|
32
|
+
*/
|
|
33
|
+
export declare const localAgentCapabilities: {
|
|
34
|
+
readonly supports: typeof localAgentSupports;
|
|
35
|
+
readonly unsupportedReason: typeof localAgentUnsupportedReason;
|
|
36
|
+
readonly listArtifacts: typeof localAgentListArtifacts;
|
|
37
|
+
readonly downloadArtifact: typeof localAgentDownloadArtifact;
|
|
38
|
+
};
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Dispatch helpers extracted from `LocalAgent` to keep its file under
|
|
3
|
+
* G8 (≤400 LoC). Builds the args for real-LLM and fixture run paths.
|
|
4
|
+
*
|
|
5
|
+
* @internal
|
|
6
|
+
*/
|
|
7
|
+
import type { AgentDefinition, AgentOptions, ModelSelection } from "../../types/agent.js";
|
|
8
|
+
import type { Run, SDKUserMessage, SendOptions } from "../../types/run.js";
|
|
9
|
+
import type { MemoryToolSpec } from "../agent-loop/types.js";
|
|
10
|
+
import type { PersonalityPreset } from "../personality/types.js";
|
|
11
|
+
import type { PluginManager } from "../plugins/manager.js";
|
|
12
|
+
import type { HooksExecutor } from "../runtime/hooks/hooks-executor.js";
|
|
13
|
+
import type { MemoryFact } from "../runtime/memory-glue/memory-store.js";
|
|
14
|
+
import { createRealLocalRun } from "./real-local-run.js";
|
|
15
|
+
export interface DispatchInputs {
|
|
16
|
+
agentId: string;
|
|
17
|
+
model: ModelSelection | undefined;
|
|
18
|
+
options: AgentOptions;
|
|
19
|
+
workspaceCwd: string;
|
|
20
|
+
hooksExecutor: HooksExecutor;
|
|
21
|
+
pluginManager: PluginManager;
|
|
22
|
+
resolvedSubagents: Record<string, AgentDefinition>;
|
|
23
|
+
settingSourcesIncludeProject: boolean;
|
|
24
|
+
}
|
|
25
|
+
export declare function buildRealRunOptions(args: {
|
|
26
|
+
inputs: DispatchInputs;
|
|
27
|
+
message: string | SDKUserMessage;
|
|
28
|
+
options: SendOptions;
|
|
29
|
+
systemPrompt: string | undefined;
|
|
30
|
+
priorMessages: ReadonlyArray<{
|
|
31
|
+
role: "user" | "assistant";
|
|
32
|
+
text: string;
|
|
33
|
+
}>;
|
|
34
|
+
memoryTools: ReadonlyArray<MemoryToolSpec> | undefined;
|
|
35
|
+
personalityToolWhitelist?: ReadonlyArray<string>;
|
|
36
|
+
personalityName?: string;
|
|
37
|
+
}): Parameters<typeof createRealLocalRun>[0];
|
|
38
|
+
export declare function createFixtureRunHelper(args: {
|
|
39
|
+
inputs: DispatchInputs;
|
|
40
|
+
message: string | SDKUserMessage;
|
|
41
|
+
options: SendOptions;
|
|
42
|
+
systemPrompt: string | undefined;
|
|
43
|
+
memoryFacts: ReadonlyArray<MemoryFact>;
|
|
44
|
+
}): Promise<Run>;
|
|
45
|
+
export declare function dispatchLocalRun(args: {
|
|
46
|
+
inputs: DispatchInputs;
|
|
47
|
+
message: string | SDKUserMessage;
|
|
48
|
+
sendOptions: SendOptions;
|
|
49
|
+
systemPrompt: string | undefined;
|
|
50
|
+
memoryFacts: ReadonlyArray<MemoryFact>;
|
|
51
|
+
priorMessages: ReadonlyArray<{
|
|
52
|
+
role: "user" | "assistant";
|
|
53
|
+
text: string;
|
|
54
|
+
}>;
|
|
55
|
+
memoryTools: ReadonlyArray<MemoryToolSpec> | undefined;
|
|
56
|
+
activePreset: PersonalityPreset | undefined;
|
|
57
|
+
}): Promise<Run>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Lifecycle helpers for {@link import("./local-agent.js").LocalAgent} — writer-lease
|
|
3
|
+
* acquisition/release, `dispose()` teardown, and `reload()` re-discovery.
|
|
4
|
+
*
|
|
5
|
+
* Extracted from `local-agent.ts` to keep that file under the 400-LoC guard (G8),
|
|
6
|
+
* mirroring `local-agent-runtime-extensions.ts`. The grouping is by CONCEPT, not by
|
|
7
|
+
* leftover: all four helpers below answer "what does this agent own outside a single
|
|
8
|
+
* run, and how is it handed back?" — the store lease, the pooled MCP clients, the
|
|
9
|
+
* pending disk writes, and the file-discovered submanagers.
|
|
10
|
+
*
|
|
11
|
+
* @internal
|
|
12
|
+
*/
|
|
13
|
+
export {};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `agent.memory` direct API implementation (T2.2, ADR D141 / D142).
|
|
3
|
+
*
|
|
4
|
+
* Builds an `AgentMemory` impl over whichever third-party adapters
|
|
5
|
+
* the `PluginManager` aggregated. Lazy-resolves the adapter list on
|
|
6
|
+
* first access (EC-I: `initialize()` fires exactly once on first
|
|
7
|
+
* write/recall). Multi-adapter fan-out for writes; merge + dedupe by
|
|
8
|
+
* content for recalls.
|
|
9
|
+
*
|
|
10
|
+
* @internal
|
|
11
|
+
*/
|
|
12
|
+
export {};
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Memory hook wiring for `LocalAgent.sendLocked` (T2.1, ADRs D141 / D145).
|
|
3
|
+
*
|
|
4
|
+
* Two helpers extracted to keep `local-agent.ts` under G8 (≤400 LoC):
|
|
5
|
+
* - `applyPreUserSendHook` — fires `pre_user_send`, caps recalled context
|
|
6
|
+
* at `maxRecallContextBytes` (EC-A), injects `<memory-context>` fence.
|
|
7
|
+
* - `wrapRunWithPostReplyHook` — Proxy-wraps the Run so
|
|
8
|
+
* `post_assistant_reply` fires once after `wait()` (fire-and-forget,
|
|
9
|
+
* errors → stderr per EC-O).
|
|
10
|
+
*
|
|
11
|
+
* @internal
|
|
12
|
+
*/
|
|
13
|
+
import type { Run, SDKUserMessage, SendOptions } from "../../types/run.js";
|
|
14
|
+
import type { PluginManager } from "../plugins/manager.js";
|
|
15
|
+
/**
|
|
16
|
+
* EC-A + EC-G + EC-H: fire `pre_user_send` hooks, cap recalled context,
|
|
17
|
+
* and prepend it as a `<memory-context>` fence around the original
|
|
18
|
+
* user text. Returns the (possibly wrapped) message preserving the
|
|
19
|
+
* `string | SDKUserMessage` shape the caller passed in.
|
|
20
|
+
*/
|
|
21
|
+
export declare function applyPreUserSendHook(args: {
|
|
22
|
+
pluginManager: PluginManager;
|
|
23
|
+
agentId: string;
|
|
24
|
+
options: AgentOptions;
|
|
25
|
+
original: string | SDKUserMessage;
|
|
26
|
+
userText: string;
|
|
27
|
+
sendOptions: SendOptions;
|
|
28
|
+
}): Promise<string | SDKUserMessage>;
|
|
29
|
+
/**
|
|
30
|
+
* Wrap a `Run` so `post_assistant_reply` fires once after `wait()`.
|
|
31
|
+
* Fire-and-forget — errors are surfaced to stderr (EC-O) so the caller
|
|
32
|
+
* never blocks on memory sync. Returns a Proxy preserving all other
|
|
33
|
+
* Run methods (stream, cancel, conversation).
|
|
34
|
+
*/
|
|
35
|
+
export declare function wrapRunWithPostReplyHook(args: {
|
|
36
|
+
pluginManager: PluginManager;
|
|
37
|
+
agentId: string;
|
|
38
|
+
options: AgentOptions;
|
|
39
|
+
run: Run;
|
|
40
|
+
userText: string;
|
|
41
|
+
}): Run;
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `createLocalAgentMemoryProvider` — bridges the legacy LocalAgentMemory
|
|
3
|
+
* rich impl (sdk-core's internal/memory/* subsystem) to the
|
|
4
|
+
* MemoryProvider port (SDK 2.0 Phase 1 physical Stage 2a — iter 19+).
|
|
5
|
+
*
|
|
6
|
+
* Goal: ONE memory path inside the kernel. Today there are TWO:
|
|
7
|
+
* 1. Legacy via `LocalAgentMemory` (when consumer didn't pass memoryProvider)
|
|
8
|
+
* 2. Port via `MemoryProvider` (when consumer passed memoryProvider in T1.3)
|
|
9
|
+
*
|
|
10
|
+
* This adapter wraps path 1 as a MemoryProvider, so the kernel can use
|
|
11
|
+
* the port uniformly. Stage 2b will refactor LocalAgent.send() to use
|
|
12
|
+
* the port + this adapter as default. Stage 3 will move the internal/
|
|
13
|
+
* memory/* sources to sdk-memory + ship a richer LanceDB-backed
|
|
14
|
+
* provider replacing this adapter.
|
|
15
|
+
*
|
|
16
|
+
* Why a separate file (not modifying LocalAgentMemory):
|
|
17
|
+
* - Preserves LocalAgentMemory's existing public API for callers that
|
|
18
|
+
* haven't migrated to the port yet.
|
|
19
|
+
* - Adapter pattern: the rich logic stays where it is; the adapter
|
|
20
|
+
* translates between LocalAgentMemory's signature and the port's.
|
|
21
|
+
* - Allows incremental migration: kernel call sites move one at a
|
|
22
|
+
* time from `memoryGlue.X()` direct calls to `provider.X(handle)`
|
|
23
|
+
* calls.
|
|
24
|
+
*
|
|
25
|
+
* @internal — sdk-core's bridging glue. Replaced by sdk-memory rich impl
|
|
26
|
+
* in Stage 3.
|
|
27
|
+
*/
|
|
28
|
+
import type { MemoryProvider } from "../runtime/memory-glue/memory-provider.js";
|
|
29
|
+
import type { TelemetryHandle } from "../telemetry/tracer.js";
|
|
30
|
+
/**
|
|
31
|
+
* Options for `createLocalAgentMemoryProvider`. Mirrors what
|
|
32
|
+
* `LocalAgentMemory`'s constructor needs.
|
|
33
|
+
*/
|
|
34
|
+
export interface LocalAgentMemoryProviderOptions {
|
|
35
|
+
/** AgentOptions slice — required for memory subsystem config (cfg.memory). */
|
|
36
|
+
readonly agentOptions: AgentOptions;
|
|
37
|
+
/** Workspace cwd — used for `.theokit/memory/` paths. */
|
|
38
|
+
readonly workspaceCwd: string;
|
|
39
|
+
/** Agent id — required for per-agent cache + telemetry. */
|
|
40
|
+
readonly agentId: string;
|
|
41
|
+
/** Telemetry handle (optional) — forwarded to active-memory recall. */
|
|
42
|
+
readonly telemetry?: TelemetryHandle;
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* Build a `MemoryProvider` whose lifecycle methods delegate to an
|
|
46
|
+
* underlying `LocalAgentMemory` instance.
|
|
47
|
+
*
|
|
48
|
+
* Mapping:
|
|
49
|
+
* - `init()` → constructs LocalAgentMemory + warms tool cache via ensureTools()
|
|
50
|
+
* - `buildTools()` → wraps ensureTools() result, renaming `execute` to `handler`
|
|
51
|
+
* - `runActivePass()` → calls runActiveMemoryIfEnabled() with synthesized args;
|
|
52
|
+
* returns the summary as `systemPromptAdditions`
|
|
53
|
+
* - `sync()` → calls syncIfReady()
|
|
54
|
+
* - `dispose()` → no-op (LocalAgentMemory's caches are per-agent + GC'd
|
|
55
|
+
* when the agent is GC'd)
|
|
56
|
+
*/
|
|
57
|
+
export declare function createLocalAgentMemoryProvider(opts: LocalAgentMemoryProviderOptions): MemoryProvider;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Personality-preset runtime extensions for {@link LocalAgent}.
|
|
3
|
+
*
|
|
4
|
+
* Extracted from `local-agent.ts` to keep that file under the 400-LoC
|
|
5
|
+
* guard (G8). The functions here implement the personality-related
|
|
6
|
+
* behaviour declared by ADRs D160-D168:
|
|
7
|
+
*
|
|
8
|
+
* - `resolveActivePersonalityPreset` — read the active preset honoring
|
|
9
|
+
* the fork ALS snapshot (D168 / EC-A).
|
|
10
|
+
* - `ensurePersonalityRegistryIfNeeded` — lazy-load registry when ANY
|
|
11
|
+
* slug is active.
|
|
12
|
+
* - `applyPersonalityOverlay` — overlay preset body on the base prompt.
|
|
13
|
+
* - `localAgentUsePersonality` — the full `Agent.usePersonality` flow:
|
|
14
|
+
* fork-scope no-op, registry lazy-load, then delegate to
|
|
15
|
+
* `performPersonalitySwitch` under the per-agent send mutex (EC-E).
|
|
16
|
+
*
|
|
17
|
+
* @internal
|
|
18
|
+
*/
|
|
19
|
+
import { PersonalityRegistry } from "../personality/registry.js";
|
|
20
|
+
import type { PersonalityStore } from "../personality/store.js";
|
|
21
|
+
/**
|
|
22
|
+
* What `localAgentUsePersonality` needs from the agent — the narrow-target shape
|
|
23
|
+
* `LocalAgentDisposeTarget` established in `local-agent-lifecycle.ts`.
|
|
24
|
+
*
|
|
25
|
+
* It replaced an eleven-member args bag carrying TWO callbacks bound straight back to the caller's
|
|
26
|
+
* own members: `invalidateCache` and an `onRegistryLoaded` whose only job was to write
|
|
27
|
+
* `personalityRegistry` back. An extraction that hands its dependencies back as closures has
|
|
28
|
+
* relocated text without reducing coupling — the defect this file's own sibling avoids by taking
|
|
29
|
+
* the agent. `personalityRegistry` is mutable here on purpose: the lazy load assigns it directly,
|
|
30
|
+
* which is what the write-back callback was simulating.
|
|
31
|
+
*
|
|
32
|
+
* `disposed` is deliberately absent: the CALLER owns that flag and checks it, the same division
|
|
33
|
+
* `disposeLocalAgentSession` states — "the caller owns the `disposed` flag (idempotence guard)".
|
|
34
|
+
* Reaching into a private field to re-ask a question the caller already answered is what forced the
|
|
35
|
+
* bag to carry it.
|
|
36
|
+
*/
|
|
37
|
+
export interface LocalAgentPersonalityTarget {
|
|
38
|
+
readonly agentId: string;
|
|
39
|
+
readonly workspaceCwd: string;
|
|
40
|
+
readonly personalityStore: PersonalityStore;
|
|
41
|
+
personalityRegistry: PersonalityRegistry | undefined;
|
|
42
|
+
invalidateCache(reason: string): Promise<void>;
|
|
43
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Background-work runtime extensions for {@link LocalAgent} (T4.2 + T4.3).
|
|
3
|
+
*
|
|
4
|
+
* Extracted from `local-agent.ts` to keep that file under the 400-LoC
|
|
5
|
+
* guard (G8). The two helpers below implement
|
|
6
|
+
* `LocalAgent.runUntil(goal, options)` and `LocalAgent.fork(options)`
|
|
7
|
+
* by lazy-importing the implementation modules and resolving
|
|
8
|
+
* `Agent.create` through the DI registry (see
|
|
9
|
+
* `agent-factory-registry.ts` for the cycle-avoidance rationale).
|
|
10
|
+
*
|
|
11
|
+
* @internal
|
|
12
|
+
*/
|
|
13
|
+
export {};
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import type { SDKUserMessage, SendOptions } from "../../types/run.js";
|
|
2
|
+
import type { MemoryToolSpec } from "../agent-loop/types.js";
|
|
3
|
+
import type { MemoryProvider } from "../runtime/memory-glue/memory-provider.js";
|
|
4
|
+
import type { MemoryFact } from "../runtime/memory-glue/memory-store.js";
|
|
5
|
+
/**
|
|
6
|
+
* What one send needs assembled into a system prompt. The port took the same five values
|
|
7
|
+
* positionally, so the binding in `LocalAgent` read `(ut, bp, mf, ams, cp) => …` — five
|
|
8
|
+
* abbreviations relaying into a six-argument helper call.
|
|
9
|
+
*/
|
|
10
|
+
export interface SendAssemblyRequest {
|
|
11
|
+
readonly userText: string;
|
|
12
|
+
readonly baseSystemPrompt: string | undefined;
|
|
13
|
+
readonly memoryFacts: ReadonlyArray<MemoryFact>;
|
|
14
|
+
readonly activeMemorySummary: string | undefined;
|
|
15
|
+
readonly contextPaths: readonly string[] | undefined;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* The arguments of one dispatch, as a record.
|
|
19
|
+
*
|
|
20
|
+
* They were seven positional parameters declared TWICE — here and on `LocalAgent.dispatchRun` — kept
|
|
21
|
+
* in step by hand behind a `jscpd:ignore` pair, and relayed by
|
|
22
|
+
* `(msg, o, sp, mf, pm, mt, mp) => this.dispatchRun(msg, o, sp, mf, pm, mt, mp)`. The abbreviations
|
|
23
|
+
* were not carelessness: the arrow is one line because of the 400-LoC file budget, and a one-line
|
|
24
|
+
* arrow has no room for real names. `pm` there is `priorMessages` while `pm` in a sibling lambda two
|
|
25
|
+
* declarations up is `pluginManager`.
|
|
26
|
+
*
|
|
27
|
+
* One named type: the relay becomes `(args) => this.dispatchRun(args)`, which fits on one line
|
|
28
|
+
* without abbreviating anything, and the duplicate declaration — with the suppression that hid it —
|
|
29
|
+
* is gone.
|
|
30
|
+
*/
|
|
31
|
+
export interface DispatchRunArgs {
|
|
32
|
+
readonly message: string | SDKUserMessage;
|
|
33
|
+
readonly options: SendOptions;
|
|
34
|
+
readonly systemPrompt: string | undefined;
|
|
35
|
+
readonly memoryFacts: ReadonlyArray<MemoryFact>;
|
|
36
|
+
readonly priorMessages: ReadonlyArray<{
|
|
37
|
+
role: "user" | "assistant";
|
|
38
|
+
text: string;
|
|
39
|
+
}>;
|
|
40
|
+
readonly memoryTools: ReadonlyArray<MemoryToolSpec> | undefined;
|
|
41
|
+
readonly memoryProviderOverride?: MemoryProvider | undefined;
|
|
42
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* T3.2 — register a `Run` from `LocalAgent.send({ task: ... })` as a
|
|
3
|
+
* Task in the observable registry. Extracted from `local-agent.ts`
|
|
4
|
+
* to keep that file under the 400-LoC quality gate (G8).
|
|
5
|
+
*
|
|
6
|
+
* @internal
|
|
7
|
+
*/
|
|
8
|
+
export declare function registerRunAsTask(run: Run, agentId: string, taskOpt: true | {
|
|
9
|
+
id?: string;
|
|
10
|
+
meta?: Record<string, unknown>;
|
|
11
|
+
}, userText: string): void;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* M77 — session-scoped MCP client pool.
|
|
3
|
+
*
|
|
4
|
+
* `buildMcpMap` (`real-local-run.ts`) builds a fresh `McpClient` on every run, so each `send` pays
|
|
5
|
+
* spawn + handshake again: 193 / 138 / 134 ms per turn, measured. The runtime is therefore anchored at
|
|
6
|
+
* the session and REPLACED rather than rebuilt.
|
|
7
|
+
*
|
|
8
|
+
* theokit#155: pooling the client OBJECT was never enough — the turn also has to stop closing what
|
|
9
|
+
* it does not own. See `runOwnsMcpClients` (`real-local-run.ts`) and the idempotent
|
|
10
|
+
* `StdioMcpClient.initialize()`.
|
|
11
|
+
*
|
|
12
|
+
* Generic over the client type on purpose: this file knows about keys, reuse and idleness, and
|
|
13
|
+
* nothing about MCP. That keeps it unit-testable without spawning a server, and keeps `McpClient`'s
|
|
14
|
+
* reconnect machinery (`internal/mcp/client.ts:165-171` — `dropped` + a single shared
|
|
15
|
+
* `reconnectPromise` with full-jitter backoff) exactly where it already lives. The pool must not
|
|
16
|
+
* reimplement surviving a dead server; it must not throw that capability away either.
|
|
17
|
+
*
|
|
18
|
+
* @internal
|
|
19
|
+
*/
|
|
20
|
+
export declare class McpClientPool<C> {
|
|
21
|
+
private readonly entries;
|
|
22
|
+
private readonly idleTtlMs;
|
|
23
|
+
private readonly now;
|
|
24
|
+
constructor(options?: McpClientPoolOptions);
|
|
25
|
+
/**
|
|
26
|
+
* Return the pooled client for `(sessionId, serverName, config)`, creating it via `factory` on
|
|
27
|
+
* first use. Every call refreshes idleness — the TTL measures time SINCE LAST USE, not age.
|
|
28
|
+
*
|
|
29
|
+
* Synchronous by design: `createMcpClient` is itself synchronous (the handshake happens later, on
|
|
30
|
+
* `initialize`), so there is no `await` between the lookup and the insert and two concurrent runs
|
|
31
|
+
* in the same session cannot both miss the cache.
|
|
32
|
+
*/
|
|
33
|
+
acquire(sessionId: string, serverName: string, config: unknown, factory: () => C): C;
|
|
34
|
+
/**
|
|
35
|
+
* Close and forget every client of ONE session. Scoped deliberately: clearing the whole map would
|
|
36
|
+
* tear down the servers of every concurrent conversation.
|
|
37
|
+
*/
|
|
38
|
+
disposeSession(sessionId: string, close: (client: C) => void): void;
|
|
39
|
+
/** Close and forget every client idle for longer than the TTL. */
|
|
40
|
+
reapIdle(close: (client: C) => void): void;
|
|
41
|
+
/** Live pooled-client count — for observability and tests. */
|
|
42
|
+
size(): number;
|
|
43
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The MCP client pool behind `mcpLifecycle: 'session'`, and who owns a run's clients.
|
|
3
|
+
*
|
|
4
|
+
* MOVED HERE 2026-09-02 from `real-local-run.ts`. It is a process-wide resource with its own
|
|
5
|
+
* lifecycle rules — acquisition, idle reaping, per-session disposal — living inside a file whose
|
|
6
|
+
* other five concerns were about assembling one run. Ownership (`runOwnsMcpClients`) is derived in
|
|
7
|
+
* ONE place so `buildMcpMap` and the run's `finally` cannot disagree about who releases a client;
|
|
8
|
+
* keeping that guarantee is the reason the two functions travel together.
|
|
9
|
+
*
|
|
10
|
+
* @internal
|
|
11
|
+
*/
|
|
12
|
+
import { type McpClient } from "../mcp/client.js";
|
|
13
|
+
import type { CreateRealLocalRunOptions } from "./real-local-run-options.js";
|
|
14
|
+
/** M77 — release one session's pooled MCP clients. Called from `LocalAgent.dispose()`. */
|
|
15
|
+
export declare function disposeSessionMcpClients(agentId: string): void;
|
|
16
|
+
/**
|
|
17
|
+
* theokit#155 — does THIS RUN own the MCP clients it was handed?
|
|
18
|
+
*
|
|
19
|
+
* Under the default `'run'` lifecycle the client is built for this send and dies with it, so the
|
|
20
|
+
* run closes it. Under `'session'` the pool owns it: closing it at the end of the turn SIGTERMs the
|
|
21
|
+
* child process, and the next turn spawns a new one — which is exactly why the option measured
|
|
22
|
+
* 0 ms of savings. Ownership is derived here, once, so `buildMcpMap` and the run's `finally` cannot
|
|
23
|
+
* disagree about who releases the resource.
|
|
24
|
+
*/
|
|
25
|
+
export declare function runOwnsMcpClients(agentOptions: AgentOptions): boolean;
|
|
26
|
+
export declare function buildMcpMap(options: CreateRealLocalRunOptions): Map<string, McpClient>;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* What one local run is built from.
|
|
3
|
+
*
|
|
4
|
+
* Its own module because `real-local-run.ts` and the two files split out of it —
|
|
5
|
+
* `real-local-run-provider.ts` and `real-local-run-mcp.ts` — all take it, and having any of them own
|
|
6
|
+
* it makes the other two import back into it. madge caught exactly that: the first version of the
|
|
7
|
+
* split put the interface in `real-local-run.ts` and produced a `provider -> run -> provider` pair.
|
|
8
|
+
*
|
|
9
|
+
* A type-only cycle erases at compile and breaks no build, but it is the same design statement in
|
|
10
|
+
* the wrong direction as any other, and this repo has a rule about it (`.dependency-cruiser.cjs`
|
|
11
|
+
* G7a, and `types/agent-prims.ts`, which exists for the identical reason).
|
|
12
|
+
*
|
|
13
|
+
*
|
|
14
|
+
* `SessionMessage` comes from `types/session-message.ts` and NOT from the `internal/session/` barrel:
|
|
15
|
+
* that barrel reaches back here through `compact-session.ts`, and madge reported the loop the moment
|
|
16
|
+
* this file existed. Importing the declaring module instead of the barrel is the cheaper half of the
|
|
17
|
+
* same lesson `types/agent-prims.ts` records.
|
|
18
|
+
*
|
|
19
|
+
* NAMED `-options` RATHER THAN `-types`: `tests/lint/types-module-naming.test.ts` refuses a
|
|
20
|
+
* `X-types.ts` in a folder with no bare `types.ts` to distinguish it from, on the grounds that the
|
|
21
|
+
* prefix then carries no information. The gate caught this file on its first commit, which is what
|
|
22
|
+
* it is for.
|
|
23
|
+
*
|
|
24
|
+
* @internal
|
|
25
|
+
*/
|
|
26
|
+
export {};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Provider inference helpers for the real local run — extracted from
|
|
3
|
+
* `real-local-run.ts` to keep it within the G8 LoC budget and give the
|
|
4
|
+
* "which provider?" heuristics one cohesive home.
|
|
5
|
+
*
|
|
6
|
+
* The precedence diagnostic joined them for the same two reasons: it answers the same question
|
|
7
|
+
* ("which provider, and was that what the caller asked for?"), and adding it inline pushed
|
|
8
|
+
* `real-local-run.ts` to 411 LoC against the 400 budget. The gate asked for a split and this is
|
|
9
|
+
* where the split already lives.
|
|
10
|
+
*
|
|
11
|
+
* @internal
|
|
12
|
+
*/
|
|
13
|
+
export declare function warnProviderPrecedenceOnce(asked: string | undefined, used: string): void;
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Custom-tool assembly for the real local run (extracted from `real-local-run.ts`
|
|
3
|
+
* for the G8 LoC budget — SRP: everything that builds the effective tool catalog
|
|
4
|
+
* for a run lives here).
|
|
5
|
+
*
|
|
6
|
+
* Merges, in order: caller/agent `tools`, declarative subagent delegation tools
|
|
7
|
+
* (file-based + inline), plugin tools, and — SE37 — the internal `think` tool when
|
|
8
|
+
* `reasoning: true` (guarded against a native reasoning model). Binds parent
|
|
9
|
+
* credentials onto delegation tools and applies the personality whitelist.
|
|
10
|
+
*
|
|
11
|
+
* @internal
|
|
12
|
+
*/
|
|
13
|
+
import type { AgentDefinition, AgentOptions, BuiltinToolName, CustomTool, ModelSelection } from "../../types/agent.js";
|
|
14
|
+
import type { CustomToolSpec } from "../agent-loop/types.js";
|
|
15
|
+
/**
|
|
16
|
+
* Resolve the tool-catalog slice of `AgentLoopInputs` for this run: which custom tools the loop
|
|
17
|
+
* declares, and which SDK builtins it must NOT.
|
|
18
|
+
*
|
|
19
|
+
* Precedence for the custom half (matches the mcpServers semantics — "fully replaces, not merged"):
|
|
20
|
+
* - `sendOptions.tools === undefined` → fall back to `agentOptions.tools`
|
|
21
|
+
* - `sendOptions.tools = []` → explicitly clear (no custom tools)
|
|
22
|
+
* - `sendOptions.tools = [t1, ...]` → use exactly these for this run
|
|
23
|
+
*
|
|
24
|
+
* usetheokit/theokit-sdk#381 added the builtin half, and it is why this is no longer named for
|
|
25
|
+
* custom tools alone. It rides here rather than at the call site because the withhold list is
|
|
26
|
+
* part of the same answer — what this run declares to the model — and because a run that
|
|
27
|
+
* withholds nothing must produce the same `AgentLoopInputs` it produced before the option existed,
|
|
28
|
+
* which is easiest to guarantee where the rest of the catalog is already assembled.
|
|
29
|
+
*
|
|
30
|
+
* Note the two halves are independent: an agent with no custom tools at all can still withhold a
|
|
31
|
+
* builtin, so the "no tools" early return carries the withhold list out with it.
|
|
32
|
+
*
|
|
33
|
+
* ONE options record rather than eight positional parameters. Five of the eight were optional or
|
|
34
|
+
* nullable in adjacent slots — `ReadonlyArray<string> | undefined`, `string`, `string | undefined`,
|
|
35
|
+
* `Record | undefined`, `ModelSelection | undefined` — compatible enough that transposing two of
|
|
36
|
+
* them compiled. The single call site was already destructuring the same `CreateRealLocalRunOptions`
|
|
37
|
+
* value field by field, so the parameter list was re-deriving a record the caller held.
|
|
38
|
+
*/
|
|
39
|
+
export interface RunToolCatalogInputs {
|
|
40
|
+
readonly agentOptions: AgentOptions;
|
|
41
|
+
readonly sendOptions: {
|
|
42
|
+
tools?: CustomTool[];
|
|
43
|
+
} | undefined;
|
|
44
|
+
readonly pluginManager: import("../plugins/manager.js").PluginManager | undefined;
|
|
45
|
+
readonly personalityToolWhitelist: ReadonlyArray<string> | undefined;
|
|
46
|
+
readonly agentId: string;
|
|
47
|
+
readonly personalityName: string | undefined;
|
|
48
|
+
readonly subagents: Record<string, AgentDefinition> | undefined;
|
|
49
|
+
/** The per-send override applied, NOT `agentOptions.model` — they differ on an override. */
|
|
50
|
+
readonly effectiveModel: ModelSelection | undefined;
|
|
51
|
+
}
|
|
52
|
+
export declare function buildRunToolCatalogInput({ agentOptions, sendOptions, pluginManager, personalityToolWhitelist, agentId, personalityName, subagents, effectiveModel, }: RunToolCatalogInputs): {
|
|
53
|
+
customTools?: ReadonlyArray<CustomToolSpec>;
|
|
54
|
+
withheldBuiltinTools?: ReadonlyArray<BuiltinToolName>;
|
|
55
|
+
};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { Run } from "../../types/run.js";
|
|
2
|
+
export type { CreateRealLocalRunOptions } from "./real-local-run-options.js";
|
|
3
|
+
import type { CreateRealLocalRunOptions } from "./real-local-run-options.js";
|
|
4
|
+
export declare function createRealLocalRun(options: CreateRealLocalRunOptions): Run;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { McpServerConfig } from "../../types/mcp.js";
|
|
2
|
+
export interface McpToolCallResult {
|
|
3
|
+
content: Array<{
|
|
4
|
+
type: "text";
|
|
5
|
+
text: string;
|
|
6
|
+
}>;
|
|
7
|
+
isError?: boolean;
|
|
8
|
+
}
|
|
9
|
+
export interface McpClient {
|
|
10
|
+
readonly name: string;
|
|
11
|
+
initialize(): Promise<void>;
|
|
12
|
+
listTools(): Promise<McpTool[]>;
|
|
13
|
+
callTool(name: string, args: Record<string, unknown>): Promise<McpToolCallResult>;
|
|
14
|
+
close(): Promise<void>;
|
|
15
|
+
}
|
|
16
|
+
export declare function createMcpClient(name: string, config: McpServerConfig, fetchImpl?: typeof fetch): McpClient;
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Which deadline applies to one MCP call.
|
|
3
|
+
*
|
|
4
|
+
* Extracted from `BaseMcpClient.timeoutFor` — where it was a private method, and therefore only
|
|
5
|
+
* reachable through integration tests that spawn child processes and race a hand-picked millisecond
|
|
6
|
+
* count against the cost of starting Node. It is a pure function of three values and now says so.
|
|
7
|
+
*
|
|
8
|
+
* @internal
|
|
9
|
+
*/
|
|
10
|
+
/**
|
|
11
|
+
* Floor for the `initialize` handshake, whatever `requestTimeoutMs` says.
|
|
12
|
+
*
|
|
13
|
+
* Sized against what the handshake actually pays for — spawning a child process and waiting for a
|
|
14
|
+
* server to come up — rather than against a steady-state RPC.
|
|
15
|
+
*/
|
|
16
|
+
export declare const HANDSHAKE_FLOOR_MS = 10000;
|
|
17
|
+
export interface HandshakeTimeoutInput {
|
|
18
|
+
/** The JSON-RPC method about to be sent. */
|
|
19
|
+
readonly method: string;
|
|
20
|
+
/** Whether the client is inside its own reconnect cycle. */
|
|
21
|
+
readonly reconnecting: boolean;
|
|
22
|
+
/** The caller's `requestTimeoutMs`, already defaulted. */
|
|
23
|
+
readonly requestTimeoutMs: number;
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* The deadline for one RPC. The reconnect handshake gets a floor; everything else gets
|
|
27
|
+
* `requestTimeoutMs`.
|
|
28
|
+
*
|
|
29
|
+
* `requestTimeoutMs` sizes a STEADY-STATE request. `initialize` is not one — it is preceded by a
|
|
30
|
+
* process spawn and the server's own startup, and the caller who set a tight request budget was
|
|
31
|
+
* sizing latency, not process creation. Binding both to that number made a tight budget silently
|
|
32
|
+
* unable to CONNECT, and worse, unable to RECONNECT: `reconnect()` spawns a fresh child and calls
|
|
33
|
+
* `initialize()`, so every one of its attempts tried to fit a spawn into a steady-state budget,
|
|
34
|
+
* exhausted the loop and surfaced `mcp_disconnected` — precisely the wedge the bounded-retry loop
|
|
35
|
+
* exists to prevent.
|
|
36
|
+
*
|
|
37
|
+
* A FLOOR, not a replacement: a caller who deliberately sets a LARGER request timeout keeps it.
|
|
38
|
+
* That clause was prose until 2026-09-02 — `Math.max` could have been a bare `HANDSHAKE_FLOOR_MS`
|
|
39
|
+
* and all three integration tests stayed green. `tests/internal/mcp/handshake-timeout.test.ts` is
|
|
40
|
+
* the oracle for it now.
|
|
41
|
+
*
|
|
42
|
+
* SCOPED TO THE RECONNECT HANDSHAKE, not to the first connect, and the difference is which failure
|
|
43
|
+
* is visible. A caller whose `requestTimeoutMs` is too small to connect at ALL finds out
|
|
44
|
+
* immediately, at the call they made, and that is their explicit choice to correct — an existing
|
|
45
|
+
* test pins it (`client-timeout.test.ts`: a silent server rejects within 2s at 150ms, and a floor on
|
|
46
|
+
* first connect would make it wait the floor instead). The reconnect is the SDK's own recovery,
|
|
47
|
+
* which the caller never sized and never sees until a drop happens.
|
|
48
|
+
*
|
|
49
|
+
* A floor on every METHOD would also be wrong for a third reason: it would turn `requestTimeoutMs`
|
|
50
|
+
* into a suggestion, which is a worse defect than the one it fixes. Both halves of the condition
|
|
51
|
+
* matter — the method AND the flag — so an ordinary call mid-reconnect keeps the caller's budget.
|
|
52
|
+
*/
|
|
53
|
+
export declare function handshakeAwareTimeout(input: HandshakeTimeoutInput): number;
|