@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,97 @@
|
|
|
1
|
+
import type { LlmClient, LlmEvent, LlmFinish, LlmRequest } from "./types.js";
|
|
2
|
+
export interface ResponsesApiClientOptions {
|
|
3
|
+
apiKey: string;
|
|
4
|
+
/** e.g. `https://chatgpt.com/backend-api/codex`; the client POSTs `${baseUrl}/responses`. */
|
|
5
|
+
baseUrl?: string;
|
|
6
|
+
/** Static headers the profile declares (e.g. `ChatGPT-Account-Id`, `originator`). */
|
|
7
|
+
extraHeaders?: Record<string, string>;
|
|
8
|
+
/** Injected fetch (refresh-aware / dynamic headers). Defaults to global `fetch`. */
|
|
9
|
+
fetch?: typeof fetch;
|
|
10
|
+
providerName?: string;
|
|
11
|
+
/**
|
|
12
|
+
* usetheokit/theokit-sdk#383 — carry the model's ENCRYPTED reasoning across the rounds of a turn.
|
|
13
|
+
* Forwarded from `ProviderProfile.encryptedReasoning`; default off. See
|
|
14
|
+
* {@link ResponsesBodyOptions.encryptedReasoning} for what it puts on the wire and why it is
|
|
15
|
+
* opt-in rather than universal.
|
|
16
|
+
*/
|
|
17
|
+
encryptedReasoning?: boolean;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* usetheokit/theokit-sdk#383 — one reasoning item the model produced, as it must be replayed.
|
|
21
|
+
*
|
|
22
|
+
* `encrypted_content` is opaque ciphertext only the provider can read; the SDK never inspects it,
|
|
23
|
+
* never logs it, and never persists it. It exists to be handed straight back.
|
|
24
|
+
*/
|
|
25
|
+
interface ResponsesReasoningItem {
|
|
26
|
+
id: string;
|
|
27
|
+
encrypted_content: string;
|
|
28
|
+
}
|
|
29
|
+
/** Options that shape the request body beyond what an `LlmRequest` carries. */
|
|
30
|
+
export interface ResponsesBodyOptions {
|
|
31
|
+
/**
|
|
32
|
+
* usetheokit/theokit-sdk#383 — when `true`, add `include: ["reasoning.encrypted_content"]` and
|
|
33
|
+
* `reasoning.context: "all_turns"`, and replay the reasoning items captured from earlier rounds.
|
|
34
|
+
*
|
|
35
|
+
* **What it buys.** With `store: false` the provider keeps nothing between requests, so a model
|
|
36
|
+
* that reasoned its way to a tool call in round 1 starts round 2 with no memory of that reasoning
|
|
37
|
+
* and derives it again — paid for again, every round. `include` asks the provider to return the
|
|
38
|
+
* reasoning as ciphertext; replaying that ciphertext on the next request hands the chain of
|
|
39
|
+
* thought back. Codex does exactly this against the same endpoint (issue #383 captured the
|
|
40
|
+
* request), which is the evidence that the backend accepts both fields.
|
|
41
|
+
*
|
|
42
|
+
* **Why opt-in and not on for every `responses_api` provider.** `include` is a documented
|
|
43
|
+
* Responses-API field, but `reasoning.context` is not part of the public Responses API surface —
|
|
44
|
+
* it was observed on the ChatGPT Codex backend. A provider that validates its input strictly
|
|
45
|
+
* answers an unknown key with `400`, which turns a cost optimisation into a total outage for that
|
|
46
|
+
* provider. Scoping it to profiles that DECLARE support keeps every other provider's request
|
|
47
|
+
* byte-identical to what it was, and makes enabling it a statement someone made about a specific
|
|
48
|
+
* backend rather than a hope about all of them.
|
|
49
|
+
*/
|
|
50
|
+
encryptedReasoning?: boolean;
|
|
51
|
+
/**
|
|
52
|
+
* usetheokit/theokit-sdk#383 — reasoning items captured from earlier rounds, keyed by the
|
|
53
|
+
* `call_id` of the tool call each batch preceded.
|
|
54
|
+
*
|
|
55
|
+
* Keying on `call_id` is what keeps the replay ORDERED and self-correcting. The provider requires
|
|
56
|
+
* a reasoning item to sit immediately before the output it produced, and the conversation history
|
|
57
|
+
* the loop replays is the authority on which tool calls survived and in what order — so emitting
|
|
58
|
+
* each batch just before its own `function_call` reproduces the original sequence without the
|
|
59
|
+
* transport having to track conversation positions. A batch whose tool call is no longer in
|
|
60
|
+
* history is simply never emitted.
|
|
61
|
+
*/
|
|
62
|
+
reasoningByCallId?: ReadonlyMap<string, readonly ResponsesReasoningItem[]>;
|
|
63
|
+
}
|
|
64
|
+
/** Build the Responses-API request body from an `LlmRequest`. */
|
|
65
|
+
export declare function buildResponsesBody(request: LlmRequest, options?: ResponsesBodyOptions): Record<string, unknown>;
|
|
66
|
+
export declare class ResponsesApiClient implements LlmClient {
|
|
67
|
+
private readonly options;
|
|
68
|
+
readonly name: string;
|
|
69
|
+
private readonly baseUrl;
|
|
70
|
+
private readonly fetchImpl;
|
|
71
|
+
/**
|
|
72
|
+
* usetheokit/theokit-sdk#383 — reasoning ciphertext captured from earlier rounds, keyed by the
|
|
73
|
+
* `call_id` it preceded. Held on the CLIENT rather than threaded through `LlmRequest` because a
|
|
74
|
+
* round's reasoning is provider-shaped ciphertext with a provider-shaped ordering rule; the agent
|
|
75
|
+
* loop has no use for it and the same client instance serves every round of a turn. Insertion
|
|
76
|
+
* order is the eviction order (see {@link MAX_REMEMBERED_REASONING_CALLS}).
|
|
77
|
+
*/
|
|
78
|
+
private readonly reasoningByCallId;
|
|
79
|
+
constructor(options: ResponsesApiClientOptions);
|
|
80
|
+
/**
|
|
81
|
+
* usetheokit/theokit-sdk#383 — bind a batch of reasoning ciphertext to the tool call it produced,
|
|
82
|
+
* evicting the oldest binding once the cap is reached.
|
|
83
|
+
*/
|
|
84
|
+
private rememberReasoning;
|
|
85
|
+
/** Issues the streaming request. Separated so `stream()` reads as fetch → check → consume. */
|
|
86
|
+
private post;
|
|
87
|
+
/** Maps a non-2xx response to a typed error. Returns it rather than throwing, so the caller's
|
|
88
|
+
* control flow stays visible at the call site. */
|
|
89
|
+
private errorFor;
|
|
90
|
+
/**
|
|
91
|
+
* SSE frames → parsed events, stopping at `[DONE]`. A frame that is not JSON is skipped rather
|
|
92
|
+
* than fatal: a provider that emits a keep-alive or a comment frame must not end the response.
|
|
93
|
+
*/
|
|
94
|
+
private decode;
|
|
95
|
+
stream(request: LlmRequest, signal: AbortSignal): AsyncGenerator<LlmEvent, LlmFinish, void>;
|
|
96
|
+
}
|
|
97
|
+
export {};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* T3.4 — exponential backoff with full jitter for credential-pool retry.
|
|
3
|
+
*
|
|
4
|
+
* Why we need this: pre-T3.4 `pool-aware-client.ts:79-83` retried the
|
|
5
|
+
* SAME credential immediately on the first 429 without any wait. When
|
|
6
|
+
* every credential in the pool returned 429 (thundering herd against a
|
|
7
|
+
* shared quota), the client burned through all 5 retry attempts in <1ms,
|
|
8
|
+
* tripped `CredentialPoolExhaustedError`, and surfaced to the agent loop
|
|
9
|
+
* as a hard failure. The user-visible symptom was "all my keys are
|
|
10
|
+
* exhausted!" when in reality a 1-2s wait would have cleared the rate
|
|
11
|
+
* limit.
|
|
12
|
+
*
|
|
13
|
+
* AWS Architecture Blog "Exponential Backoff And Jitter" (Marc Brooker,
|
|
14
|
+
* 2015) demonstrates full jitter as the canonical pattern: `sleep =
|
|
15
|
+
* random_between(0, base * 2^attempt)`. We extend it with a hard cap
|
|
16
|
+
* (so a 32s sleep never blocks an interactive agent) and honor the
|
|
17
|
+
* provider's `Retry-After` hint when present — the hint always wins over
|
|
18
|
+
* the computed value when it falls within `[base, cap]`.
|
|
19
|
+
*
|
|
20
|
+
* @internal
|
|
21
|
+
*/
|
|
22
|
+
export {};
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import type { LlmClient, LlmEvent, LlmFinish, LlmRequest } from "./types.js";
|
|
2
|
+
/** Attempt ceiling. Fixed at 3 — M93's DoD names the number. */
|
|
3
|
+
export declare const MAX_ATTEMPTS = 3;
|
|
4
|
+
/**
|
|
5
|
+
* Is the error transient — that is, can retrying change the outcome?
|
|
6
|
+
*
|
|
7
|
+
* ## Delegates to `isTransientError`, and states what it subtracts
|
|
8
|
+
*
|
|
9
|
+
* The SDK **already** publishes `isTransientError` — documented as "a single source of truth rather
|
|
10
|
+
* than a re-derivation", with the explicit warning that "It never inspects `err.message`". The first
|
|
11
|
+
* version of this function ignored both: it re-derived, by regex over the message (`/\b4\d\d\b/`).
|
|
12
|
+
* Adversarial review measured the cost — `connect ECONNREFUSED 127.0.0.1:443` was classified as NOT
|
|
13
|
+
* transient, because the **port** matches the regex. The network errors retry exists for were
|
|
14
|
+
* exactly the ones excluded.
|
|
15
|
+
*
|
|
16
|
+
* Reinventing here violated parsimony rung 4 with the part already at hand. What remains of this
|
|
17
|
+
* function are **three subtractions** from the owner's verdict, each with a reason:
|
|
18
|
+
*
|
|
19
|
+
* | Subtraction | Why |
|
|
20
|
+
* |---|---|
|
|
21
|
+
* | `CredentialPoolExhaustedError` | the pool already spent its own attempt and rotation budget; `nextRetryAt` is tens of seconds out. Retrying would multiply the wait by `MAX_ATTEMPTS` with no chance of success. |
|
|
22
|
+
* | `code === "circuit_open"` | the breaker exists **in order to** fail fast; wrapping it in a retry undoes from outside the decision it just made. |
|
|
23
|
+
* | `RateLimitError` with 402 | a billing quota does not resolve in milliseconds — which is why the pool's `classifyAndDecide` rotates instead of waiting. |
|
|
24
|
+
*
|
|
25
|
+
* The first two came out of the review's measurements: with them treated as transient, the entire
|
|
26
|
+
* pool was retried 3x, and a 30 s wait became ~90 s.
|
|
27
|
+
*/
|
|
28
|
+
export declare function isRetriableError(err: unknown): boolean;
|
|
29
|
+
/**
|
|
30
|
+
* ## Why there is NO circuit breaker here
|
|
31
|
+
*
|
|
32
|
+
* The package's `CircuitBreaker` is **keyed by credential** (`recordSuccess(key)` /
|
|
33
|
+
* `recordTimeout(key)`): it exists so the pool can mark a key unhealthy and **skip** to another.
|
|
34
|
+
* With a single key there is nowhere to skip to, so a breaker here would record state nobody reads.
|
|
35
|
+
*
|
|
36
|
+
* Parsimony rung 1 — "does this need to exist?". No: it would be ceremony with resilience's name on
|
|
37
|
+
* it. What protects the single-key path is the attempt ceiling and the backoff, and both are below.
|
|
38
|
+
*/
|
|
39
|
+
export declare class RetryingLlmClient implements LlmClient {
|
|
40
|
+
#private;
|
|
41
|
+
constructor(inner: LlmClient, opts?: {
|
|
42
|
+
rng?: () => number;
|
|
43
|
+
});
|
|
44
|
+
/**
|
|
45
|
+
* The decorated client. Public by the same convention as `FaultInjectingLlmClient.inner`: the
|
|
46
|
+
* router's wiring tests assert `instanceof PoolAwareLlmClient` and need to see through the
|
|
47
|
+
* decorators. Without this, adding a decorator breaks tests whose intent is still valid — which is
|
|
48
|
+
* exactly what M93 did to 4 pre-existing tests.
|
|
49
|
+
*/
|
|
50
|
+
get inner(): LlmClient;
|
|
51
|
+
get name(): string;
|
|
52
|
+
stream(request: LlmRequest, signal: AbortSignal): AsyncGenerator<LlmEvent, LlmFinish, void>;
|
|
53
|
+
}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import type { CredentialPoolStrategy } from "./credential-pool-types.js";
|
|
2
|
+
import type { LlmClient } from "./types.js";
|
|
3
|
+
export interface ProviderRouterOptions {
|
|
4
|
+
primary: ProviderName;
|
|
5
|
+
fallback?: ProviderName[];
|
|
6
|
+
/** Credential pools per provider (ADRs D123-D133). Optional. */
|
|
7
|
+
apiKeys?: Record<string, string[]>;
|
|
8
|
+
/** Pool rotation strategy per provider. Optional; default `"fill_first"`. */
|
|
9
|
+
credentialPoolStrategy?: Record<string, CredentialPoolStrategy>;
|
|
10
|
+
/**
|
|
11
|
+
* Per-run opt-in leaked-dialect safe-parse derived from the chat route
|
|
12
|
+
* (theokit#58 follow-up). When `true`, the resolved profile is cloned with
|
|
13
|
+
* `extractToolCallsFromContent: true` so the OpenAI-compatible transport
|
|
14
|
+
* recovers Hermes `<function=…></tool_call>` dialect leaked as text. Applied
|
|
15
|
+
* to the resolved chain; fail-open, so a non-leaking provider is unaffected.
|
|
16
|
+
*/
|
|
17
|
+
extractToolCallsFromContent?: boolean;
|
|
18
|
+
/**
|
|
19
|
+
* SE2 — forwarded into the pool-aware client so a 429 retry surfaces a
|
|
20
|
+
* `rate_limit` RunEvent. Wired from `SendOptions.onRunEvent` at the run boundary.
|
|
21
|
+
*/
|
|
22
|
+
onRateLimit?: (info: {
|
|
23
|
+
attempt: number;
|
|
24
|
+
retryAfterMs?: number;
|
|
25
|
+
}) => void;
|
|
26
|
+
/**
|
|
27
|
+
* #332 — the endpoint THIS call should reach, from `ModelSelection.url`.
|
|
28
|
+
*
|
|
29
|
+
* It outranks the provider's base-URL env var deliberately. `OLLAMA_HOST` and friends are
|
|
30
|
+
* process-wide, so with the env var winning, whoever set it for one model would keep hijacking
|
|
31
|
+
* every other one — which is the bug this field exists to end, wearing a hat.
|
|
32
|
+
*/
|
|
33
|
+
baseUrl?: string;
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* Resolves the provider chain synchronously. Builtins are eagerly registered.
|
|
37
|
+
* Provider plugin discovery is expected to have run upfront (e.g., via
|
|
38
|
+
* Agent.create initialization) before this is called.
|
|
39
|
+
*/
|
|
40
|
+
export declare function resolveProviderChain(options: ProviderRouterOptions): LlmClient[];
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Minimal Server-Sent-Events parser. Consumes a fetch `Response` body
|
|
3
|
+
* stream and yields `{ event, data }` records as they arrive. Used by
|
|
4
|
+
* both the Anthropic and OpenAI streaming clients — neither vendor sends
|
|
5
|
+
* binary SSE so a simple text decoder is enough.
|
|
6
|
+
*
|
|
7
|
+
* @internal
|
|
8
|
+
*/
|
|
9
|
+
export interface SseRecord {
|
|
10
|
+
event: string;
|
|
11
|
+
data: string;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* M2 #61 — default idle timeout (ms) between SSE reads. "Idle" means *no bytes
|
|
15
|
+
* at all* arrive within the window — distinct from a slow-but-alive stream that
|
|
16
|
+
* keeps trickling chunks. A stalled upstream that handshakes then goes silent no
|
|
17
|
+
* longer hangs the AsyncGenerator forever; it rejects a typed NetworkError so
|
|
18
|
+
* FallbackLlmClient / retry can route it. Pass `0` to disable.
|
|
19
|
+
*/
|
|
20
|
+
export declare const DEFAULT_SSE_IDLE_MS = 60000;
|
|
21
|
+
export declare function parseSseStream(body: ReadableStream<Uint8Array> | null, signal: AbortSignal, idleTimeoutMs?: number): AsyncGenerator<SseRecord, void, void>;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shared streaming helpers for `LlmClient` wrappers
|
|
3
|
+
* (`FallbackLlmClient`, `PoolAwareLlmClient`).
|
|
4
|
+
*
|
|
5
|
+
* `tryFirstEvent` probes the first chunk of a stream to decide
|
|
6
|
+
* whether the handshake succeeded. If it raises an
|
|
7
|
+
* `AuthenticationError`/`RateLimitError`/`NetworkError`, the wrapper
|
|
8
|
+
* captures the typed error for routing (rotate vs fallback) WITHOUT
|
|
9
|
+
* starting the actual yield. Once the first event lands, the stream
|
|
10
|
+
* is committed and partial-output cannot be reverted.
|
|
11
|
+
*
|
|
12
|
+
* `relay` yields the prefetched first chunk and then forwards the
|
|
13
|
+
* remaining generator output verbatim.
|
|
14
|
+
*
|
|
15
|
+
* @internal
|
|
16
|
+
*/
|
|
17
|
+
export {};
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* SE7 — provider-agnostic helpers for structured tool-result content
|
|
3
|
+
* ({@link ToolResultContentBlock}). Named by CAPABILITY, not by provider:
|
|
4
|
+
*
|
|
5
|
+
* - `toBlockToolResultContent` — for a wire that ACCEPTS content blocks.
|
|
6
|
+
* - `toStringToolResultContent` — for a string-only wire (fail-fast on an image).
|
|
7
|
+
* - `renderToolResultContentText` — map the text parts through a fn (for the guard).
|
|
8
|
+
*
|
|
9
|
+
* @internal
|
|
10
|
+
*/
|
|
11
|
+
import type { ToolResultContentBlock } from "../../types/content-blocks.js";
|
|
12
|
+
/**
|
|
13
|
+
* For a block-capable provider wire: pass a string through unchanged, or forward
|
|
14
|
+
* the structured blocks as-is (text + image).
|
|
15
|
+
*
|
|
16
|
+
* This is an INTENTIONAL identity: `ToolResultContentBlock` is defined to be
|
|
17
|
+
* exactly the on-wire content-block shape that block-capable providers accept
|
|
18
|
+
* for a tool result — `{ type: "text", text }` and
|
|
19
|
+
* `{ type: "image", source: { type: "base64", media_type, data } }`. Because the
|
|
20
|
+
* SDK type already IS the wire shape, no transformation is needed; this function
|
|
21
|
+
* names that contract at the call site (and is the single seam to add a mapping
|
|
22
|
+
* later, if a block-capable wire ever diverges from this shape). Do NOT add
|
|
23
|
+
* SDK-internal fields to `ToolResultContentBlock` without updating this seam —
|
|
24
|
+
* they would otherwise be forwarded verbatim onto the wire.
|
|
25
|
+
*/
|
|
26
|
+
export declare function toBlockToolResultContent(content: string | ToolResultContentBlock[]): string | ToolResultContentBlock[];
|
|
27
|
+
/**
|
|
28
|
+
* For a string-only provider wire: pass a string through; flatten text-only
|
|
29
|
+
* blocks to a newline-joined string; **fail fast** with a typed
|
|
30
|
+
* {@link ConfigurationError} when an image block is present — that provider
|
|
31
|
+
* cannot carry an image in a tool result, and silently dropping it would hand
|
|
32
|
+
* the model a lie (per error-handling policy).
|
|
33
|
+
*/
|
|
34
|
+
export declare function toStringToolResultContent(content: string | ToolResultContentBlock[], providerName: string): string;
|
|
35
|
+
/**
|
|
36
|
+
* Apply `fn` to the text of a tool-result content (both the string form and the
|
|
37
|
+
* text blocks of the structured form); image blocks pass through untouched.
|
|
38
|
+
* Used by the tool-result guard so redaction/delimiting still covers text.
|
|
39
|
+
*/
|
|
40
|
+
export declare function renderToolResultContentText(content: string | ToolResultContentBlock[], fn: (text: string) => string): string | ToolResultContentBlock[];
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Wraps a socket failure in a {@link NetworkError}, preserving the cause.
|
|
3
|
+
*
|
|
4
|
+
* Returns the original error — unwrapped — when it is an abort or already an SDK error.
|
|
5
|
+
*/
|
|
6
|
+
export declare function wrapTransportError(err: unknown, ctx: {
|
|
7
|
+
providerId: string;
|
|
8
|
+
endpoint: string;
|
|
9
|
+
}): unknown;
|
|
@@ -0,0 +1,226 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Provider-agnostic LLM types used by the real agent loop. Each concrete
|
|
3
|
+
* provider client (`anthropic.ts`, `openai.ts`) accepts an `LlmRequest`
|
|
4
|
+
* and yields a stream of `LlmEvent`s plus a final `LlmFinish` shape that
|
|
5
|
+
* the agent loop converts into our `SDKMessage` events.
|
|
6
|
+
*
|
|
7
|
+
* Semver-exempt: nothing here is declared in `package.json` `exports`. These types are nonetheless
|
|
8
|
+
* reachable from published declarations through the type graph, so they must be EMITTED.
|
|
9
|
+
*
|
|
10
|
+
* NOTE — no internal-visibility tag in this block. `tsconfig.base.json` sets `stripInternal: true`,
|
|
11
|
+
* and TypeScript scans EVERY leading comment range of the declaration that follows. The tag that
|
|
12
|
+
* used to sit here deleted `LlmTool` from the emitted `.d.ts` while `LlmRequest`, which names it,
|
|
13
|
+
* survived — a declaration that does not compile for any consumer running type-aware lint.
|
|
14
|
+
*/
|
|
15
|
+
export interface LlmTool {
|
|
16
|
+
name: string;
|
|
17
|
+
description: string;
|
|
18
|
+
inputSchema: Record<string, unknown>;
|
|
19
|
+
}
|
|
20
|
+
export interface LlmTextPart {
|
|
21
|
+
type: "text";
|
|
22
|
+
text: string;
|
|
23
|
+
}
|
|
24
|
+
export interface LlmToolCallPart {
|
|
25
|
+
type: "tool_use";
|
|
26
|
+
id: string;
|
|
27
|
+
name: string;
|
|
28
|
+
input: Record<string, unknown>;
|
|
29
|
+
}
|
|
30
|
+
export interface LlmToolResultPart {
|
|
31
|
+
type: "tool_result";
|
|
32
|
+
toolUseId: string;
|
|
33
|
+
/**
|
|
34
|
+
* SE7 — a string (the common case) OR structured content blocks (text +
|
|
35
|
+
* image). Block-capable provider wires forward blocks natively; string-only
|
|
36
|
+
* wires flatten text and fail fast on an image (`toStringToolResultContent`).
|
|
37
|
+
*/
|
|
38
|
+
content: string | import("../../types/content-blocks.js").ToolResultContentBlock[];
|
|
39
|
+
isError?: boolean;
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* M35 (multimodal) — an image part in a user message. `source` mirrors the `ImageBlock` shape
|
|
43
|
+
* (`{ type: "base64", media_type, data }`) so provider adapters serialize it to their own image format
|
|
44
|
+
* (OpenAI/OpenRouter `image_url` with a data URL; Anthropic native base64 source).
|
|
45
|
+
*/
|
|
46
|
+
export interface LlmImagePart {
|
|
47
|
+
type: "image";
|
|
48
|
+
source: {
|
|
49
|
+
type: "base64";
|
|
50
|
+
media_type: string;
|
|
51
|
+
data: string;
|
|
52
|
+
} | {
|
|
53
|
+
type: "url";
|
|
54
|
+
url: string;
|
|
55
|
+
};
|
|
56
|
+
}
|
|
57
|
+
/**
|
|
58
|
+
* theokit#122 — an extended-thinking block, carried WITH its provider-issued signature.
|
|
59
|
+
*
|
|
60
|
+
* The signature is the whole reason this part exists. Anthropic requires a resumed conversation to
|
|
61
|
+
* replay each `thinking` block byte-identically, signature included; replaying the text alone is
|
|
62
|
+
* rejected with `400 "thinking blocks cannot be modified"` (anthropics/claude-code#63147). So a
|
|
63
|
+
* session that used extended thinking could be persisted but never resumed.
|
|
64
|
+
*
|
|
65
|
+
* `signature` is optional because not every provider issues one — the OpenAI-compatible reasoning
|
|
66
|
+
* channel streams `reasoning`/`reasoning_content` text with no signature at all. A part without a
|
|
67
|
+
* signature is display-only history; it must not be replayed to Anthropic as a thinking block.
|
|
68
|
+
*/
|
|
69
|
+
export interface LlmThinkingPart {
|
|
70
|
+
type: "thinking";
|
|
71
|
+
text: string;
|
|
72
|
+
signature?: string;
|
|
73
|
+
}
|
|
74
|
+
export type LlmContentPart = LlmTextPart | LlmToolCallPart | LlmToolResultPart | LlmImagePart | LlmThinkingPart;
|
|
75
|
+
export interface LlmMessage {
|
|
76
|
+
role: "system" | "user" | "assistant";
|
|
77
|
+
content: LlmContentPart[];
|
|
78
|
+
}
|
|
79
|
+
/**
|
|
80
|
+
* T3.5 — a single system-prompt block. Used by `LlmRequest.system` when the
|
|
81
|
+
* caller wants to opt into Anthropic prompt caching: each block whose
|
|
82
|
+
* `cacheable` is `true` gets the `cache_control: {type: 'ephemeral'}`
|
|
83
|
+
* annotation in the Anthropic wire body, which lets Anthropic bill
|
|
84
|
+
* subsequent same-content requests at the cache-read rate (1-3x discount).
|
|
85
|
+
*
|
|
86
|
+
* For providers that don't support prompt caching (OpenAI, OpenRouter, etc),
|
|
87
|
+
* the array is joined into a single string at the wire boundary so the
|
|
88
|
+
* upstream contract stays unchanged. Back-compat: `LlmRequest.system` still
|
|
89
|
+
* accepts a plain `string` (pre-T3.5 callers compile unchanged).
|
|
90
|
+
*/
|
|
91
|
+
export interface LlmSystemBlock {
|
|
92
|
+
text: string;
|
|
93
|
+
/** When `true`, ask the provider to cache this block (Anthropic only). */
|
|
94
|
+
cacheable?: boolean;
|
|
95
|
+
}
|
|
96
|
+
/**
|
|
97
|
+
* T3.6 — `LlmRequest.responseFormat` opt-in for OpenAI native structured
|
|
98
|
+
* outputs. When set, providers that support it emit the response strictly
|
|
99
|
+
* matching the schema (no parse retries; lower latency than the
|
|
100
|
+
* synthetic-tool fallback path).
|
|
101
|
+
*
|
|
102
|
+
* Two shapes:
|
|
103
|
+
* - `{ type: "json_schema", jsonSchema: { name, schema, strict? } }` —
|
|
104
|
+
* the canonical structured-outputs shape (`gpt-4o-2024-08-06+`).
|
|
105
|
+
* `strict` defaults to `true` (provider guarantees match).
|
|
106
|
+
* - `{ type: "json_object" }` — the legacy "JSON mode" hint (older
|
|
107
|
+
* OpenAI models). Returns JSON but does NOT guarantee schema match.
|
|
108
|
+
*
|
|
109
|
+
* Providers that don't support the field (Anthropic, Ollama) silently
|
|
110
|
+
* ignore it at the wire layer (`buildAnthropicCommonBody`,
|
|
111
|
+
* `buildOllamaChatBody`).
|
|
112
|
+
*/
|
|
113
|
+
export type LlmResponseFormat = {
|
|
114
|
+
type: "json_object";
|
|
115
|
+
} | {
|
|
116
|
+
type: "json_schema";
|
|
117
|
+
jsonSchema: {
|
|
118
|
+
name: string;
|
|
119
|
+
schema: Record<string, unknown>;
|
|
120
|
+
strict?: boolean;
|
|
121
|
+
};
|
|
122
|
+
};
|
|
123
|
+
export interface LlmRequest {
|
|
124
|
+
model: string;
|
|
125
|
+
system?: string | LlmSystemBlock[];
|
|
126
|
+
messages: LlmMessage[];
|
|
127
|
+
tools?: LlmTool[];
|
|
128
|
+
maxTokens?: number;
|
|
129
|
+
temperature?: number;
|
|
130
|
+
/** T3.6 — opt into native structured outputs (OpenAI-compat providers). */
|
|
131
|
+
responseFormat?: LlmResponseFormat;
|
|
132
|
+
/**
|
|
133
|
+
* Reasoning / extended-thinking request (issue #47). Derived from `ModelSelection.params` (the
|
|
134
|
+
* `thinking` param). The wire encoding is provider-specific: OpenRouter (and OpenAI-compatible
|
|
135
|
+
* passthroughs) use the unified `reasoning: { effort }` object; native OpenAI Chat Completions uses
|
|
136
|
+
* the top-level `reasoning_effort` string (see `buildOpenAIBody`). The model streams reasoning back
|
|
137
|
+
* as `delta.reasoning` (or `delta.reasoning_content` on some compat providers), surfaced as
|
|
138
|
+
* `reasoning_delta` events. `effort` is required once the object is present — an empty object would
|
|
139
|
+
* request nothing.
|
|
140
|
+
*/
|
|
141
|
+
reasoning?: {
|
|
142
|
+
effort: string;
|
|
143
|
+
};
|
|
144
|
+
/**
|
|
145
|
+
* Step-cap force-close: per-request tool gating. `"none"` tells the provider to emit no tool
|
|
146
|
+
* calls even when `tools` are present (forcing a text answer); `"required"` forces a tool call;
|
|
147
|
+
* `"auto"` (or omitted) is the default. Maps to OpenAI/OpenRouter `tool_choice`. The agent loop
|
|
148
|
+
* sets `"none"` on a final/ceiling round so a cached agent (whose tools cannot be un-registered)
|
|
149
|
+
* is still forced to produce a closing summary.
|
|
150
|
+
*/
|
|
151
|
+
toolChoice?: "auto" | "none" | "required";
|
|
152
|
+
/**
|
|
153
|
+
* usetheokit/theokit-sdk#383 — an opaque key identifying the conversation whose prompt prefix the
|
|
154
|
+
* provider may reuse across requests. Maps to the Responses-API `prompt_cache_key`.
|
|
155
|
+
*
|
|
156
|
+
* Set by the agent loop from the run's session identity and derived through
|
|
157
|
+
* `derivePromptCacheKey`, so it is STABLE across every round of a turn and every turn of a
|
|
158
|
+
* session, and DISTINCT between unrelated sessions. Both halves matter: a key that changes per
|
|
159
|
+
* round caches nothing, and a key shared across sessions asks the provider to match one
|
|
160
|
+
* conversation's prefix against another's.
|
|
161
|
+
*
|
|
162
|
+
* Absent ⇒ the field is omitted from the wire body (the pre-#383 request, byte for byte). It is
|
|
163
|
+
* a request-shaping hint only: no provider behaviour depends on its presence except the billing
|
|
164
|
+
* of the cached prefix.
|
|
165
|
+
*/
|
|
166
|
+
promptCacheKey?: string;
|
|
167
|
+
}
|
|
168
|
+
/**
|
|
169
|
+
* What a provider stream reports WHILE it is running. Tool calls are deliberately absent.
|
|
170
|
+
*
|
|
171
|
+
* theokit#144: this union used to declare `tool_use` and `stop` variants. Only two providers ever
|
|
172
|
+
* yielded them (`responses.ts`, `fault-injection.ts`), the loop's collector
|
|
173
|
+
* (`loop-llm-stream.ts`) never read them, and the tool calls they carried were duplicates of what
|
|
174
|
+
* `LlmFinish.toolCalls` already returned. So they were not a live tool channel — they were a
|
|
175
|
+
* declaration of one, which is worse: it told implementers a provider-level channel existed and
|
|
176
|
+
* cost `@theokit/agents` a workaround (holding every `text_delta` until the stream drained, which
|
|
177
|
+
* broke live token streaming on text-only turns — issue #47).
|
|
178
|
+
*
|
|
179
|
+
* Wiring them instead of deleting them was rejected: `openai.ts` and `anthropic.ts` cannot produce
|
|
180
|
+
* them at all (their tool calls only resolve at completion), so a live provider-level channel would
|
|
181
|
+
* exist on some providers and not others — a worse contract than a uniform one.
|
|
182
|
+
*
|
|
183
|
+
* **The canonical live tool channel is `onDelta`**: `tool-call-started` / `tool-call-completed`
|
|
184
|
+
* `InteractionUpdate`s, emitted by `runToolWithLifecycle` (`agent-loop/tool-dispatch.ts`) between
|
|
185
|
+
* LLM rounds. It is uniform across providers, carries a `callId` correlating the two ends, and
|
|
186
|
+
* fires before the post-tool answer text. `Run.events()` (theokit#140) merges it with the
|
|
187
|
+
* structural `SDKMessage`s into one ordered timeline.
|
|
188
|
+
*
|
|
189
|
+
* The stop reason is not an event either — it is returned once, on `LlmFinish.stopReason`.
|
|
190
|
+
*/
|
|
191
|
+
export type LlmEvent = {
|
|
192
|
+
type: "text_delta";
|
|
193
|
+
text: string;
|
|
194
|
+
} | {
|
|
195
|
+
type: "reasoning_delta";
|
|
196
|
+
text: string;
|
|
197
|
+
signature?: string;
|
|
198
|
+
} | {
|
|
199
|
+
type: "error";
|
|
200
|
+
message: string;
|
|
201
|
+
};
|
|
202
|
+
export type LlmStopReason = "end_turn" | "tool_use" | "max_tokens" | "stop_sequence" | "error";
|
|
203
|
+
export interface LlmFinish {
|
|
204
|
+
stopReason: LlmStopReason;
|
|
205
|
+
text: string;
|
|
206
|
+
toolCalls: LlmToolCallPart[];
|
|
207
|
+
inputTokens?: number;
|
|
208
|
+
outputTokens?: number;
|
|
209
|
+
/** Cache read tokens (Anthropic prompt caching / OpenAI cached). ADR D376. */
|
|
210
|
+
cacheReadTokens?: number;
|
|
211
|
+
/** Cache creation tokens (Anthropic only). ADR D376. */
|
|
212
|
+
cacheWriteTokens?: number;
|
|
213
|
+
/** Reasoning tokens (OpenAI o-series). ADR D376. */
|
|
214
|
+
reasoningTokens?: number;
|
|
215
|
+
/**
|
|
216
|
+
* theokit#122 — the turn's extended-thinking block, with the provider's signature when it issued
|
|
217
|
+
* one. Returned on the finish value rather than reconstructed from the `reasoning_delta` text,
|
|
218
|
+
* because the signature arrives once for the whole block and only the provider adapter knows
|
|
219
|
+
* which block it belongs to.
|
|
220
|
+
*/
|
|
221
|
+
thinking?: LlmThinkingPart;
|
|
222
|
+
}
|
|
223
|
+
export interface LlmClient {
|
|
224
|
+
readonly name: string;
|
|
225
|
+
stream(request: LlmRequest, signal: AbortSignal): AsyncGenerator<LlmEvent, LlmFinish, void>;
|
|
226
|
+
}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* GCP Vertex AI client for Anthropic Messages (Adoption Roadmap #8; ADRs
|
|
3
|
+
* D292, D293).
|
|
4
|
+
*
|
|
5
|
+
* v1 uses `:rawPredict` (non-streaming). Streaming via `:streamRawPredict`
|
|
6
|
+
* with SSE follows the same shape but is gated behind a future iteration —
|
|
7
|
+
* v1 returns the full response as a single delta to keep the streaming
|
|
8
|
+
* interface contract.
|
|
9
|
+
*
|
|
10
|
+
* Body massage (D292):
|
|
11
|
+
* - inject `anthropic_version: "vertex-2023-10-16"`
|
|
12
|
+
* - strip `model` from body (goes in URL)
|
|
13
|
+
* - strip `stream` from body
|
|
14
|
+
*
|
|
15
|
+
* Uses native `fetch` only — no `@anthropic-ai/vertex-sdk` (D294).
|
|
16
|
+
*
|
|
17
|
+
* @internal
|
|
18
|
+
*/
|
|
19
|
+
import type { LlmClient, LlmEvent, LlmFinish, LlmRequest } from "./types.js";
|
|
20
|
+
export interface VertexAnthropicClientOptions {
|
|
21
|
+
/** When undefined, resolved lazily via `resolveVertexProjectId()`. */
|
|
22
|
+
projectId?: string;
|
|
23
|
+
/** When undefined, resolved lazily via `resolveVertexLocation()`. */
|
|
24
|
+
location?: string;
|
|
25
|
+
/**
|
|
26
|
+
* OAuth access token. When provided, used as-is. When empty/undefined,
|
|
27
|
+
* resolved lazily per request via `resolveVertexAccessToken()` (D288).
|
|
28
|
+
*/
|
|
29
|
+
apiKey?: string;
|
|
30
|
+
fetch?: typeof fetch;
|
|
31
|
+
}
|
|
32
|
+
export declare class VertexAnthropicClient implements LlmClient {
|
|
33
|
+
private readonly options;
|
|
34
|
+
readonly name = "vertex_anthropic";
|
|
35
|
+
private readonly fetchImpl;
|
|
36
|
+
constructor(options: VertexAnthropicClientOptions);
|
|
37
|
+
private resolveProjectOrThrow;
|
|
38
|
+
private resolveTokenOrThrow;
|
|
39
|
+
stream(request: LlmRequest, signal: AbortSignal): AsyncGenerator<LlmEvent, LlmFinish, void>;
|
|
40
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Vertex AI access token + config resolution (ADRs D288, D295).
|
|
3
|
+
*
|
|
4
|
+
* Uses `google-auth-library` (required peer dep) for ADC discovery:
|
|
5
|
+
* 1. `GOOGLE_APPLICATION_CREDENTIALS` env (path to Service Account JSON)
|
|
6
|
+
* 2. `gcloud auth application-default login` cached credentials
|
|
7
|
+
* 3. Metadata server (GCE/GKE/Cloud Run/Cloud Functions)
|
|
8
|
+
* 4. Workload Identity Federation (WIF; configured via Service Account JSON)
|
|
9
|
+
*
|
|
10
|
+
* EC-3 absorbed: differentiate "peer dep missing" (throws ConfigurationError
|
|
11
|
+
* with install hint) from "no credentials in ADC chain" (returns undefined
|
|
12
|
+
* so caller can throw a clearer downstream error).
|
|
13
|
+
*
|
|
14
|
+
* @internal
|
|
15
|
+
*/
|
|
16
|
+
interface GoogleAuthClient {
|
|
17
|
+
getAccessToken: () => Promise<{
|
|
18
|
+
token: string | null;
|
|
19
|
+
}>;
|
|
20
|
+
}
|
|
21
|
+
export declare function resolveVertexAccessToken(): Promise<string | undefined>;
|
|
22
|
+
/** Resolve project id via env vars (env-only in v1). */
|
|
23
|
+
export declare function resolveVertexProjectId(): string | undefined;
|
|
24
|
+
/** Resolve Vertex location (region) from env; defaults to `us-central1`. */
|
|
25
|
+
export declare function resolveVertexLocation(): string;
|
|
26
|
+
/** Test seam — reset cached auth client. */
|
|
27
|
+
export declare function __resetVertexAuth(): void;
|
|
28
|
+
/** Test seam — inject a custom client for unit tests. */
|
|
29
|
+
export declare function __setVertexAuthClientForTests(client: GoogleAuthClient | undefined): void;
|
|
30
|
+
export {};
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* GCP Vertex AI Gemini client (Adoption Roadmap #8; ADR D291).
|
|
3
|
+
*
|
|
4
|
+
* Uses the **OpenAI-compat** endpoint:
|
|
5
|
+
* POST https://{LOCATION}-aiplatform.googleapis.com/v1/projects/{P}/locations/{L}/endpoints/openapi/chat/completions
|
|
6
|
+
*
|
|
7
|
+
* Wraps `OpenAIClient` with the Vertex baseUrl + lazy OAuth token from
|
|
8
|
+
* `google-auth-library` (D288). Limitation: Vertex silently drops
|
|
9
|
+
* unsupported OpenAI params (D264-style trade-off).
|
|
10
|
+
*
|
|
11
|
+
* @internal
|
|
12
|
+
*/
|
|
13
|
+
import type { LlmClient, LlmEvent, LlmFinish, LlmRequest } from "./types.js";
|
|
14
|
+
export interface VertexGeminiClientOptions {
|
|
15
|
+
/** When undefined, resolved lazily via `resolveVertexProjectId()`. */
|
|
16
|
+
projectId?: string;
|
|
17
|
+
/** When undefined, resolved lazily via `resolveVertexLocation()`. */
|
|
18
|
+
location?: string;
|
|
19
|
+
/** When non-empty, used as-is. Otherwise resolved lazily via ADC. */
|
|
20
|
+
apiKey?: string;
|
|
21
|
+
fetch?: typeof fetch;
|
|
22
|
+
}
|
|
23
|
+
export declare class VertexGeminiClient implements LlmClient {
|
|
24
|
+
private readonly options;
|
|
25
|
+
readonly name = "vertex_gemini";
|
|
26
|
+
constructor(options: VertexGeminiClientOptions);
|
|
27
|
+
stream(request: LlmRequest, signal: AbortSignal): AsyncGenerator<LlmEvent, LlmFinish, void>;
|
|
28
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Vertex AI dispatcher (Adoption Roadmap #8; ADRs D291, D292, D301).
|
|
3
|
+
*
|
|
4
|
+
* `selectTransport` doesn't see the model id (the credential resolution
|
|
5
|
+
* happens before request dispatch). This client inspects `request.model`
|
|
6
|
+
* at stream time and delegates to either `VertexGeminiClient` (OpenAI-compat
|
|
7
|
+
* for Gemini) or `VertexAnthropicClient` (`:rawPredict` for Claude).
|
|
8
|
+
*
|
|
9
|
+
* @internal
|
|
10
|
+
*/
|
|
11
|
+
import type { LlmClient, LlmEvent, LlmFinish, LlmRequest } from "./types.js";
|
|
12
|
+
export interface VertexRouterClientOptions {
|
|
13
|
+
apiKey?: string;
|
|
14
|
+
fetch?: typeof fetch;
|
|
15
|
+
}
|
|
16
|
+
export declare class VertexRouterClient implements LlmClient {
|
|
17
|
+
private readonly options;
|
|
18
|
+
readonly name = "vertex";
|
|
19
|
+
constructor(options: VertexRouterClientOptions);
|
|
20
|
+
stream(request: LlmRequest, signal: AbortSignal): AsyncGenerator<LlmEvent, LlmFinish, void>;
|
|
21
|
+
}
|