@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,27 @@
|
|
|
1
|
+
import type { SDKMessage } from "../../types/messages.js";
|
|
2
|
+
import type { LlmContentPart, LlmToolCallPart } from "../llm/types.js";
|
|
3
|
+
import type { AgentLoopInputs, ResolvedTool } from "./types.js";
|
|
4
|
+
export type { ResolvedTool } from "./types.js";
|
|
5
|
+
/**
|
|
6
|
+
* T2.4 — Parallel tool dispatch with bounded concurrency (DR2 finding #4).
|
|
7
|
+
*
|
|
8
|
+
* Pre-T2.4 this was a serial `for...of` loop — each tool call awaited
|
|
9
|
+
* before the next. With N independent tools each taking Tms, total
|
|
10
|
+
* wall-clock was N×Tms. T2.4 switches to `Promise.all` with bounded
|
|
11
|
+
* concurrency via an inline semaphore (ADR D135 — in-house, no
|
|
12
|
+
* `p-limit` dep). Default cap is 4 concurrent tools; consumer
|
|
13
|
+
* overrides via `AgentLoopInputs.maxConcurrentTools`.
|
|
14
|
+
*
|
|
15
|
+
* Order preservation: `Promise.all` preserves input order in the
|
|
16
|
+
* resolved array regardless of which promise settles first — the
|
|
17
|
+
* LLM expects tool results in call order and this contract holds.
|
|
18
|
+
*
|
|
19
|
+
* Event array safety: `events` is append-only. In single-threaded
|
|
20
|
+
* JS (Node event loop), concurrent `.push()` calls from different
|
|
21
|
+
* microtask continuations do NOT interleave — each push is atomic.
|
|
22
|
+
* The order of events across tools becomes non-deterministic, but
|
|
23
|
+
* each individual tool's events are internally ordered.
|
|
24
|
+
*/
|
|
25
|
+
export declare function dispatchTools(inputs: AgentLoopInputs, tools: ResolvedTool[], toolCalls: LlmToolCallPart[], events: SDKMessage[], parentSpan?: ToolSpan): Promise<LlmContentPart[]>;
|
|
26
|
+
/** M3 #64 — the OTel span type threaded for tool-span nesting. */
|
|
27
|
+
type ToolSpan = ReturnType<NonNullable<AgentLoopInputs["telemetry"]>["startSpan"]> | undefined;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* #57 — content-level defense for tool results before they reach the LLM.
|
|
3
|
+
*
|
|
4
|
+
* Two opt-in behaviors, applied at the `transform_tool_result` seam (#65):
|
|
5
|
+
* - `delimit`: wrap untrusted tool output in explicit data boundaries
|
|
6
|
+
* ("spotlighting") so the model treats it as DATA, not instructions — the
|
|
7
|
+
* primary mitigation against tool-result prompt injection. Non-destructive:
|
|
8
|
+
* the content is preserved, only framed. A boundary marker appearing inside
|
|
9
|
+
* the content is neutralized so it cannot break out of the frame.
|
|
10
|
+
* - `redactPii`: replace common PII patterns (email, phone) with `[REDACTED]`.
|
|
11
|
+
*
|
|
12
|
+
* @internal
|
|
13
|
+
*/
|
|
14
|
+
import type { LlmContentPart } from "../llm/types.js";
|
|
15
|
+
export type { ToolResultGuardOptions } from "../../types/run.js";
|
|
16
|
+
/**
|
|
17
|
+
* Apply the tool-result guard to the tool_result parts of a content array. When
|
|
18
|
+
* neither behavior is enabled the array is returned unchanged (zero overhead).
|
|
19
|
+
*/
|
|
20
|
+
export declare function applyToolResultGuard(parts: readonly LlmContentPart[], opts: ToolResultGuardOptions): LlmContentPart[];
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* #58 — bound a single tool execution by the run's cancellation signal and an
|
|
3
|
+
* optional per-tool timeout, so a hung tool cannot wedge the agent loop and a
|
|
4
|
+
* cancelled run interrupts an in-flight tool.
|
|
5
|
+
*
|
|
6
|
+
* Stdlib only (`AbortSignal.any` / `AbortSignal.timeout`, Node ≥22.12).
|
|
7
|
+
*
|
|
8
|
+
* @internal
|
|
9
|
+
*/
|
|
10
|
+
export interface ToolRaceOptions {
|
|
11
|
+
/** The run's cancellation signal (`AgentLoopInputs.signal`). */
|
|
12
|
+
signal?: AbortSignal;
|
|
13
|
+
/** Per-tool timeout in ms. Omit for no timeout. */
|
|
14
|
+
timeoutMs?: number;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Race a tool execution against cancellation + an optional timeout. Returns the
|
|
18
|
+
* tool's result if it finishes first, or a typed aborted/timed-out `ToolResult`
|
|
19
|
+
* (exit 124) if the run is cancelled or the per-tool deadline elapses. When
|
|
20
|
+
* neither a signal nor a timeout is supplied, the execution is returned as-is
|
|
21
|
+
* (zero overhead, backward-compatible).
|
|
22
|
+
*/
|
|
23
|
+
export declare function raceToolExecution(exec: Promise<ToolResult>, opts: ToolRaceOptions): Promise<ToolResult>;
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import type { ConversationTurn } from "../../types/conversation.js";
|
|
2
|
+
import type { SDKMessage } from "../../types/messages.js";
|
|
3
|
+
import type { RunStatus } from "../../types/run.js";
|
|
4
|
+
/** SE7 — what a custom tool handler may return: a string or structured content blocks. */
|
|
5
|
+
export type ToolHandlerResult = string | import("../../types/content-blocks.js").ToolResultContentBlock[];
|
|
6
|
+
export interface AgentLoopOutput {
|
|
7
|
+
events: SDKMessage[];
|
|
8
|
+
finalStatus: RunStatus;
|
|
9
|
+
result: string;
|
|
10
|
+
conversation: ConversationTurn[];
|
|
11
|
+
/**
|
|
12
|
+
* Aggregated token usage across every LLM call in this loop (ADR D376).
|
|
13
|
+
* Populated whenever ≥1 LLM call completed — including partial-failure
|
|
14
|
+
* runs (EC-5). Undefined when zero LLM calls fired (e.g., abort before
|
|
15
|
+
* first send, or fixture-mode path that bypasses this loop).
|
|
16
|
+
*/
|
|
17
|
+
usage?: import("../../types/usage.js").TokenUsage;
|
|
18
|
+
/**
|
|
19
|
+
* Inferred pricing-based cost matching `usage` (ADR D377). Set when the
|
|
20
|
+
* model has a pricing entry in the registry; `cost.status` is
|
|
21
|
+
* `"estimated"` / `"unknown"` / `"included"` per D377.
|
|
22
|
+
*/
|
|
23
|
+
cost?: import("../../types/usage.js").CostBreakdown;
|
|
24
|
+
/**
|
|
25
|
+
* Structured error from transport / provider failure (Finding B fix).
|
|
26
|
+
* When set, `finalStatus === "error"`. Downstream surfaces (runtime,
|
|
27
|
+
* `RunResult.error`) copy this verbatim. NEVER leaks as an assistant
|
|
28
|
+
* message (the previous bug — sdk-error-packaging-fix-plan).
|
|
29
|
+
*/
|
|
30
|
+
error?: AgentLoopErrorDetail;
|
|
31
|
+
/**
|
|
32
|
+
* M1-2 (T2.2): true when the loop stopped at its iteration ceiling with the
|
|
33
|
+
* model still wanting to call tools (silent truncation). Copied verbatim onto
|
|
34
|
+
* `RunResult.stoppedAtIterationLimit`.
|
|
35
|
+
*/
|
|
36
|
+
stoppedAtIterationLimit?: boolean;
|
|
37
|
+
/**
|
|
38
|
+
* Doom-loop guard: true when the loop stopped because the model repeated IDENTICAL tool calls to
|
|
39
|
+
* the hard threshold. Copied verbatim onto `RunResult.stoppedByDoomLoop`; the continuation driver
|
|
40
|
+
* classifies it as a `no_progress` terminal (a controlled stop, not a truncation to re-send).
|
|
41
|
+
*/
|
|
42
|
+
stoppedByDoomLoop?: boolean;
|
|
43
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Usage + cost helpers extracted from `loop.ts` (ADRs D376/D377).
|
|
3
|
+
*
|
|
4
|
+
* - `accumulateUsage(usage, llmOutput)` — merge a single LLM turn's 5-bucket
|
|
5
|
+
* token counts into the per-loop {@link UsageAccumulator}. Early-returns
|
|
6
|
+
* when no bucket was populated (avoids spurious zero-step entries on
|
|
7
|
+
* pure-error turns).
|
|
8
|
+
* - `computeUsageCost(inputs, usage)` — resolve provider+model from the
|
|
9
|
+
* `model.id` prefix (with LlmClient.name fallback) and run the pricing
|
|
10
|
+
* registry lookup to produce the matching `CostBreakdown`. Returns
|
|
11
|
+
* `undefined` for the `auto` sentinel model.
|
|
12
|
+
*
|
|
13
|
+
* @internal
|
|
14
|
+
*/
|
|
15
|
+
import type { UsageAccumulator } from "../budget/usage-accumulator.js";
|
|
16
|
+
import type { AgentLoopInputs } from "./types.js";
|
|
17
|
+
export interface LlmTurnUsage {
|
|
18
|
+
inputTokens?: number;
|
|
19
|
+
outputTokens?: number;
|
|
20
|
+
cacheReadTokens?: number;
|
|
21
|
+
cacheWriteTokens?: number;
|
|
22
|
+
reasoningTokens?: number;
|
|
23
|
+
}
|
|
24
|
+
export declare function accumulateUsage(usage: UsageAccumulator, turn: LlmTurnUsage): void;
|
|
25
|
+
export declare function computeUsageCost(inputs: AgentLoopInputs, usage: TokenUsage): CostBreakdown | undefined;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* "Which provider issued this key?" — the pure prefix answer.
|
|
3
|
+
*
|
|
4
|
+
* Lives in `auth/` and not beside the local-run helper that used to own it, because the question is
|
|
5
|
+
* an auth question. The local-run path additionally refuses a provider it has no profile for; that
|
|
6
|
+
* is its policy, not part of this answer, so it stays there and composes with this.
|
|
7
|
+
*
|
|
8
|
+
* Lives under `internal/` by FOLDER, and is PUBLIC by contract — re-exported from
|
|
9
|
+
* `@theokit/sdk/auth`.
|
|
10
|
+
*
|
|
11
|
+
* Deliberately NOT tagged `@internal`: `tsconfig.base.json` sets `stripInternal: true`, so that tag
|
|
12
|
+
* deletes the declaration from every emitted `.d.ts`. The symbol then exists at runtime and cannot
|
|
13
|
+
* be imported with types — which is the exact defect this module was published to fix, reintroduced
|
|
14
|
+
* one layer down by a docblock. Measured: usetheodev/theokit-sdk#283.
|
|
15
|
+
*/
|
|
16
|
+
/**
|
|
17
|
+
* The provider whose key prefix matches, or `undefined` when none does.
|
|
18
|
+
*
|
|
19
|
+
* `undefined` means "cannot tell" and never a guess: a wrong guess here routes a real credential to
|
|
20
|
+
* the wrong endpoint. Whitespace-only and empty inputs are "cannot tell" too — they are what an
|
|
21
|
+
* empty prompt submits, not a key.
|
|
22
|
+
*/
|
|
23
|
+
export declare function providerFromApiKeyPrefix(apiKey: string | undefined): string | undefined;
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* T1.3 — API key boundary validation.
|
|
3
|
+
*
|
|
4
|
+
* `validateApiKeyShape(key, provider?)` runs at the create-agent boundary
|
|
5
|
+
* and rejects malformed inputs early (whitespace-only strings, sub-16-char
|
|
6
|
+
* fragments, embedded whitespace, missing-prefix shapes for providers that
|
|
7
|
+
* stamp a known prefix). The check is shape-only — it does NOT make a
|
|
8
|
+
* round-trip to the provider; live validation still happens at the first
|
|
9
|
+
* `fetch` against the provider URL.
|
|
10
|
+
*
|
|
11
|
+
* Exempted from shape validation:
|
|
12
|
+
* - fixture keys (prefix `theo_test_`) — used by SDK consumers' fixture-mode tests.
|
|
13
|
+
* - local-runtime mock key `"local"` — used by Ollama / LMStudio / llama.cpp
|
|
14
|
+
* sibling profiles (ADRs D182/D188/D189) whose `authType` is `"none"`.
|
|
15
|
+
*
|
|
16
|
+
* @internal
|
|
17
|
+
*/
|
|
18
|
+
export interface ApiKeyValidationFailure {
|
|
19
|
+
readonly malformed: true;
|
|
20
|
+
readonly reason: "empty" | "whitespace_only" | "too_short" | "embedded_whitespace" | "missing_known_prefix";
|
|
21
|
+
readonly message: string;
|
|
22
|
+
}
|
|
23
|
+
export interface ApiKeyValidationOk {
|
|
24
|
+
readonly malformed: false;
|
|
25
|
+
}
|
|
26
|
+
export type ApiKeyValidationResult = ApiKeyValidationOk | ApiKeyValidationFailure;
|
|
27
|
+
export interface ValidateApiKeyOptions {
|
|
28
|
+
/** Provider name (lowercase) for prefix sanity check. */
|
|
29
|
+
provider?: string;
|
|
30
|
+
/**
|
|
31
|
+
* When `false`, only OBVIOUSLY-malformed inputs (empty, whitespace-only,
|
|
32
|
+
* < 4 chars) are rejected. Set when the caller knows the value is just an
|
|
33
|
+
* identifier (e.g., `shouldUseRealLocalRuntime` mode where the real HTTP
|
|
34
|
+
* call uses an env credential instead of this `apiKey`).
|
|
35
|
+
*
|
|
36
|
+
* When `true` (default), the full shape check applies: 16-char minimum,
|
|
37
|
+
* provider-prefix sanity, no embedded whitespace.
|
|
38
|
+
*/
|
|
39
|
+
strict?: boolean;
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* Validate the shape of an API key. Returns a discriminated result; the
|
|
43
|
+
* boundary caller (`agent.ts createLocalAgent` / `createCloudAgent`) throws
|
|
44
|
+
* `AuthenticationError({code:"malformed_api_key"})` on failure.
|
|
45
|
+
*/
|
|
46
|
+
export declare function validateApiKeyShape(key: string | undefined, options?: ValidateApiKeyOptions | string): ApiKeyValidationResult;
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* "Does this process hold a REAL provider credential?" — one question, one home.
|
|
3
|
+
*
|
|
4
|
+
* It used to live in `runtime/fixtures/fixture-mode.ts`, a 229-line module answering three unrelated
|
|
5
|
+
* questions. This one spans AWS Bedrock (env var, access key, profile, `~/.aws/credentials` on
|
|
6
|
+
* disk), GCP Vertex (ADC), a stored OAuth credential read off disk, and three named provider env
|
|
7
|
+
* vars — a credential policy, filed under a name about test fixtures. Its dependency already pointed
|
|
8
|
+
* here: `internal/auth/credential-store.js`.
|
|
9
|
+
*
|
|
10
|
+
* Every predicate is SYNCHRONOUS and checks a signal, never a live endpoint. Probing would be async
|
|
11
|
+
* and would make a decision that belongs at request time — an unreachable Ollama or an expired token
|
|
12
|
+
* must surface as a typed error from the call, not as a silent fall-through to fixture data.
|
|
13
|
+
*
|
|
14
|
+
* @internal
|
|
15
|
+
*/
|
|
16
|
+
/**
|
|
17
|
+
* The provider credentials `shouldUseRealLocalRuntime` consults by name.
|
|
18
|
+
*
|
|
19
|
+
* Exported so the "Missing API key" refusal can name the ones the caller actually set (#338 item
|
|
20
|
+
* 5). The list used to live only inside the predicate below, which meant a caller with
|
|
21
|
+
* `OPENROUTER_API_KEY` set and `THEOKIT_API_KEY` unset was refused by a message naming neither —
|
|
22
|
+
* the SDK checks this exact variable a few lines down to decide the runtime, so the environment
|
|
23
|
+
* looks configured to the person who set it up. Reported as a three-hour diagnosis.
|
|
24
|
+
*
|
|
25
|
+
* One list, two readers: a variable added here is recognised by the predicate AND named by the
|
|
26
|
+
* error on the same commit, which is the only way the two stay in step.
|
|
27
|
+
*/
|
|
28
|
+
export declare const PROVIDER_CREDENTIAL_ENV_VARS: readonly string[];
|
|
29
|
+
/** Those of {@link PROVIDER_CREDENTIAL_ENV_VARS} that are non-empty in this process. */
|
|
30
|
+
export declare function presentProviderCredentialEnvVars(): readonly string[];
|
|
31
|
+
/**
|
|
32
|
+
* ADRs D286-D287: Bedrock green-lights real runtime when EITHER
|
|
33
|
+
* `AWS_BEARER_TOKEN_BEDROCK` is set explicitly OR the standard AWS
|
|
34
|
+
* credential chain (`AWS_ACCESS_KEY_ID` + `AWS_SECRET_ACCESS_KEY` /
|
|
35
|
+
* `AWS_PROFILE` / instance role) can mint a Bearer via
|
|
36
|
+
* `@aws/bedrock-token-generator`. We only check synchronous signals here;
|
|
37
|
+
* the actual token resolution happens lazily in
|
|
38
|
+
* `BedrockAnthropicClient.stream`.
|
|
39
|
+
*/
|
|
40
|
+
export declare function isAwsBedrockAuthAvailable(): boolean;
|
|
41
|
+
/**
|
|
42
|
+
* ADR D288: Vertex green-lights real runtime when EITHER
|
|
43
|
+
* `GOOGLE_APPLICATION_CREDENTIALS` is set OR `GOOGLE_CLOUD_PROJECT` is set
|
|
44
|
+
* (ADC will use gcloud user creds / metadata server). The actual token
|
|
45
|
+
* resolution happens lazily in `VertexAnthropicClient.stream` /
|
|
46
|
+
* `VertexGeminiClient.stream`.
|
|
47
|
+
*/
|
|
48
|
+
export declare function isGcpVertexAuthAvailable(): boolean;
|
|
49
|
+
/**
|
|
50
|
+
* ADR D182 / T1.2: **always `true`.** Zero-config local providers (`authType: "none"`) need no
|
|
51
|
+
* credential — Ollama defaults to localhost:11434, LM Studio to localhost:1234, llama.cpp to
|
|
52
|
+
* localhost:8080 — and the SDK ships Ollama as a builtin, so one is always nominally available.
|
|
53
|
+
* Nothing is probed here; probing would be async. If no daemon is up, the first real LLM call
|
|
54
|
+
* surfaces `ollama_unreachable` via the typed mapper.
|
|
55
|
+
*
|
|
56
|
+
* This used to say it returned true "when ANY of the documented local hosts is reachable in spirit",
|
|
57
|
+
* which reads as a probe and is not a testable statement. The body has always been `return true`.
|
|
58
|
+
* The distinction matters because of where this sits — see the note on the `||` chain in
|
|
59
|
+
* `shouldUseRealLocalRuntime`.
|
|
60
|
+
*/
|
|
61
|
+
export declare function isLocalNoAuthProviderAvailable(): boolean;
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
import { AuthenticationError } from "../../errors.js";
|
|
2
|
+
/**
|
|
3
|
+
* M42 — the SDK credential store. Promoted DOWN from agent-builder's hardened `agents/lib/credentials.ts`
|
|
4
|
+
* (M37), generalized from a closed `openrouter|anthropic|openai` union to an open `provider: string` and
|
|
5
|
+
* driven by a caller-supplied {@link CredentialStoreConfig} (no hardcoded `.agent-builder`/`auth.json` /
|
|
6
|
+
* `AGENT_BUILDER_HOME`). The security-critical file mechanics are ported VERBATIM (ADR D3 of the M42 plan):
|
|
7
|
+
* atomic O_EXCL + rename + fsync write, 0700/0600 mode gates, `env` is always a PARAMETER (never an ambient
|
|
8
|
+
* `process.env` read).
|
|
9
|
+
*
|
|
10
|
+
* The env-precedence + key-prefix-inference + declared-provider rungs of the agent-builder resolver are
|
|
11
|
+
* APP POLICY and deliberately stay UP in the consumer; this module owns only the on-disk store + the
|
|
12
|
+
* `api|oauth` discriminated union. See {@link resolveCredential} (SDK) for the store-read + refresh path.
|
|
13
|
+
*
|
|
14
|
+
* Re-exported from `@theokit/sdk/auth`, and therefore PUBLIC, under semver.
|
|
15
|
+
*
|
|
16
|
+
* NOTE — no internal-visibility tag in this block. `tsconfig.base.json` sets `stripInternal: true`,
|
|
17
|
+
* and TypeScript scans EVERY leading comment range of the declaration that follows, including the
|
|
18
|
+
* import right below this one. The tag that used to sit here deleted that import from the emitted
|
|
19
|
+
* `.d.ts`, leaving the types it binds unresolvable for any consumer running type-aware lint
|
|
20
|
+
* (usetheodev/theokit-sdk#283 records the same trap on a declaration).
|
|
21
|
+
*/
|
|
22
|
+
import type { CredentialStoreConfig, StoredCredential, StoredOAuthCredential } from "./types.js";
|
|
23
|
+
/** The store directory, honoring an optional `homeEnvVar` override. */
|
|
24
|
+
export declare function credentialHome(config: CredentialStoreConfig, env?: Record<string, string | undefined>): string;
|
|
25
|
+
/** The credential file path inside the (possibly overridden) store directory. */
|
|
26
|
+
export declare function authFilePath(config: CredentialStoreConfig, env?: Record<string, string | undefined>): string;
|
|
27
|
+
/**
|
|
28
|
+
* A credential problem the caller can act on. Never carries the key value.
|
|
29
|
+
*
|
|
30
|
+
* M78 — this used to extend bare `Error`, which quietly disabled classification for the entire auth
|
|
31
|
+
* path: `isTransientError` is `err instanceof TheokitAgentError && err.isRetryable === true`
|
|
32
|
+
* (`errors.ts:443`), so a credential failure could never be judged transient OR permanent. The
|
|
33
|
+
* predicate was not "forgotten" downstream — it was unusable there by construction.
|
|
34
|
+
*
|
|
35
|
+
* Extending `AuthenticationError` is ADDITIVE: the class still exists, still reports
|
|
36
|
+
* `name: "CredentialError"`, and every existing `instanceof CredentialError` stays true. It only
|
|
37
|
+
* gains ancestors. `AuthenticationError` pins `isRetryable: false`, so gaining the ability to be
|
|
38
|
+
* classified does NOT turn a revoked credential into a retry loop.
|
|
39
|
+
*
|
|
40
|
+
* The single reference does the same thing with one root type: Codex routes every domain failure
|
|
41
|
+
* through `CodexErr` with `is_retryable()` as a method (`protocol/src/error.rs:176`), rather than
|
|
42
|
+
* parallel classes extending the language's `Error`.
|
|
43
|
+
*/
|
|
44
|
+
export declare class CredentialError extends AuthenticationError {
|
|
45
|
+
readonly name: string;
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* The 0700-dir / 0600-file mode gates (ported verbatim). The DIRECTORY matters as much as the file:
|
|
49
|
+
* `mkdirSync(mode)` applies only at creation, so a pre-existing store dir keeps whatever mode it had, and a
|
|
50
|
+
* writable dir lets an attacker replace the credential file with a symlink to their own 0600 file — the
|
|
51
|
+
* agent then runs on THEIR account.
|
|
52
|
+
*/
|
|
53
|
+
export declare function assertSecureModes(dirPath: string, path: string): void;
|
|
54
|
+
/**
|
|
55
|
+
* Read the credential file. Absent ⇒ `undefined` (the normal case). Present-but-wrong is a typed error
|
|
56
|
+
* naming the file: a malformed credential store must not surface as a raw parse crash. Enforces the
|
|
57
|
+
* 0700 dir / 0600 file mode gates (ported verbatim — a writable dir lets an attacker swap the file for a
|
|
58
|
+
* symlink to their own account).
|
|
59
|
+
*/
|
|
60
|
+
export declare function readAuthFile(config: CredentialStoreConfig, env?: Record<string, string | undefined>): StoredCredential | undefined;
|
|
61
|
+
/**
|
|
62
|
+
* Read the stored OAuth credential (with its refresh token), or `undefined` when the store is absent or
|
|
63
|
+
* holds an api credential. The oauth engine needs the refresh token, which the resolved bearer does not
|
|
64
|
+
* carry. Enforces the same 0600/0700 gates as every other read.
|
|
65
|
+
*/
|
|
66
|
+
export declare function readStoredOAuth(config: CredentialStoreConfig, env?: Record<string, string | undefined>): StoredOAuthCredential | undefined;
|
|
67
|
+
/**
|
|
68
|
+
* Persist a credential atomically at mode `0600`. Ported VERBATIM (ADR D3): write to a random-named temp
|
|
69
|
+
* file in the same directory with `wx` (O_EXCL), fsync, close, chmod, then `rename` (atomic on POSIX) —
|
|
70
|
+
* so a crash mid-write leaves whatever was there untouched, and a pre-planted symlink cannot capture the
|
|
71
|
+
* key. The api variant persists the unchanged `{provider, api_key}` (back-compat, no `type` key); the
|
|
72
|
+
* oauth variant persists `{type:'oauth', provider, access, refresh, expires, account_id?}`.
|
|
73
|
+
*/
|
|
74
|
+
export declare function writeCredential(cred: {
|
|
75
|
+
provider: string;
|
|
76
|
+
apiKey: string;
|
|
77
|
+
} | StoredOAuthCredential, config: CredentialStoreConfig, env?: Record<string, string | undefined>): string;
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import type { DeviceCodeGrant, DeviceDeps, DeviceOAuthConfig, OAuthTokens, OpenAIDeviceConfig } from "./types.js";
|
|
2
|
+
/** Step 1 — request a device code. POSTs `{client_id, scope}` to the device endpoint. */
|
|
3
|
+
export declare function requestDeviceCode(config: DeviceOAuthConfig, deps: Pick<DeviceDeps, "fetch">): Promise<DeviceCodeGrant>;
|
|
4
|
+
/**
|
|
5
|
+
* Step 2 — poll the token endpoint until the user approves (or the code expires). Handles RFC 8628
|
|
6
|
+
* `authorization_pending` (keep waiting) and `slow_down` (back off), with an expiry deadline so it cannot
|
|
7
|
+
* spin forever.
|
|
8
|
+
*/
|
|
9
|
+
export declare function pollDeviceToken(config: DeviceOAuthConfig, grant: DeviceCodeGrant, deps: DeviceDeps): Promise<OAuthTokens>;
|
|
10
|
+
/**
|
|
11
|
+
* The full device login: request a code, hand the user the verification URL + user code via `onPrompt`
|
|
12
|
+
* (never printed here — the caller renders it, keeping this module output-free), then poll to completion.
|
|
13
|
+
*/
|
|
14
|
+
export declare function deviceLogin(config: DeviceOAuthConfig, deps: DeviceDeps, hooks: {
|
|
15
|
+
onPrompt: (p: {
|
|
16
|
+
userCode: string;
|
|
17
|
+
verificationUri: string;
|
|
18
|
+
expiresIn: number;
|
|
19
|
+
}) => void;
|
|
20
|
+
}): Promise<OAuthTokens>;
|
|
21
|
+
/** Step 1 (OpenAI) — request the user code. */
|
|
22
|
+
export declare function requestOpenAIUsercode(config: OpenAIDeviceConfig, deps: Pick<DeviceDeps, "fetch">): Promise<{
|
|
23
|
+
deviceAuthId: string;
|
|
24
|
+
userCode: string;
|
|
25
|
+
interval: number;
|
|
26
|
+
}>;
|
|
27
|
+
/**
|
|
28
|
+
* Step 2+3 (OpenAI) — poll for the authorization code (200 = ready; 403/404 = pending; else fail), then
|
|
29
|
+
* exchange it for tokens at the standard `/oauth/token` endpoint (reuses `exchangeCode`).
|
|
30
|
+
*/
|
|
31
|
+
export declare function openaiDeviceLogin(config: OpenAIDeviceConfig, deps: DeviceDeps, hooks: {
|
|
32
|
+
onPrompt: (p: {
|
|
33
|
+
userCode: string;
|
|
34
|
+
verificationUri: string;
|
|
35
|
+
}) => void;
|
|
36
|
+
}): Promise<OAuthTokens>;
|
|
37
|
+
/** JWT id/access-token claims we read to attribute an account. */
|
|
38
|
+
interface IdTokenClaims {
|
|
39
|
+
chatgpt_account_id?: string;
|
|
40
|
+
organizations?: Array<{
|
|
41
|
+
id: string;
|
|
42
|
+
}>;
|
|
43
|
+
"https://api.openai.com/auth"?: {
|
|
44
|
+
chatgpt_account_id?: string;
|
|
45
|
+
};
|
|
46
|
+
}
|
|
47
|
+
/** Decode a JWT's claim set (no signature verification — used only to read a self-reported account id). */
|
|
48
|
+
export declare function parseJwtClaims(token: string): IdTokenClaims | undefined;
|
|
49
|
+
/** Best-effort account id from an id/access token's claims (OpenAI/ChatGPT shape). */
|
|
50
|
+
export declare function extractAccountId(tokens: {
|
|
51
|
+
id_token?: string;
|
|
52
|
+
access_token?: string;
|
|
53
|
+
}): string | undefined;
|
|
54
|
+
export {};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { CredentialStoreConfig, HttpDeps, OAuthProviderConfig, OAuthTokens, ResolvedCredential } from "./types.js";
|
|
2
|
+
/** Exchange an authorization `code` (+ PKCE verifier) for the token pair. */
|
|
3
|
+
export declare function exchangeCode(config: OAuthProviderConfig, input: {
|
|
4
|
+
code: string;
|
|
5
|
+
verifier: string;
|
|
6
|
+
}, deps: HttpDeps): Promise<OAuthTokens>;
|
|
7
|
+
/** Swap a refresh token for a fresh access (and possibly rotated refresh) token. */
|
|
8
|
+
export declare function refreshOAuthTokens(config: OAuthProviderConfig, refresh: string, deps: HttpDeps): Promise<OAuthTokens>;
|
|
9
|
+
/** Persist a token triple to the store's oauth variant through the hardened 0600 writer. */
|
|
10
|
+
export declare function persistOAuthTokens(provider: string, tokens: OAuthTokens, store: CredentialStoreConfig, env?: Record<string, string | undefined>): string;
|
|
11
|
+
/**
|
|
12
|
+
* Return a credential guaranteed fresh enough to use. An `api` credential passes through untouched. An
|
|
13
|
+
* `oauth` credential still valid (beyond the skew window) passes through; an expired one is refreshed,
|
|
14
|
+
* re-persisted 0600, and returned with the new access token. Concurrent refreshes of the same store are
|
|
15
|
+
* coalesced (single-use refresh tokens); the rejected promise is evicted so a failure is not cached-poison.
|
|
16
|
+
*/
|
|
17
|
+
export declare function ensureFreshCredential(resolved: ResolvedCredential, opts: {
|
|
18
|
+
config: OAuthProviderConfig;
|
|
19
|
+
store: CredentialStoreConfig;
|
|
20
|
+
env?: Record<string, string | undefined>;
|
|
21
|
+
}, deps: HttpDeps): Promise<ResolvedCredential>;
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* M42 — `resolveCredential`: the public composition entrypoint over the credential store + oauth engine.
|
|
3
|
+
* Given a provider name + a {@link CredentialStoreConfig} (and, for oauth, an {@link OAuthProviderConfig}),
|
|
4
|
+
* read the store and return a FRESH `ResolvedCredential` — an api credential passes through by identity; an
|
|
5
|
+
* oauth credential is transparently refreshed when its access token is within the skew window. Returns
|
|
6
|
+
* `undefined` when the store holds no credential for `provider` (the caller then falls back to env / apiKeys).
|
|
7
|
+
*
|
|
8
|
+
* Mirrors agent-builder's `resolveFreshCredential` composition (store read → oauth → ensureFreshCredential),
|
|
9
|
+
* defaulting `fetch`/`now` to globals. This is the async surface an oauth provider's M41 `transform.fetch`
|
|
10
|
+
* calls at stream time, so a mid-turn token expiry refreshes without rebuilding the agent.
|
|
11
|
+
*
|
|
12
|
+
* Re-exported from `@theokit/sdk/auth`, and therefore PUBLIC, under semver.
|
|
13
|
+
*
|
|
14
|
+
* NOTE — no internal-visibility tag in this block. `tsconfig.base.json` sets `stripInternal: true`,
|
|
15
|
+
* and TypeScript scans EVERY leading comment range of the declaration that follows, including the
|
|
16
|
+
* import right below this one. The tag that used to sit here deleted that import from the emitted
|
|
17
|
+
* `.d.ts`, leaving the types it binds unresolvable for any consumer running type-aware lint
|
|
18
|
+
* (usetheodev/theokit-sdk#283 records the same trap on a declaration).
|
|
19
|
+
*/
|
|
20
|
+
import type { CredentialStoreConfig, OAuthProviderConfig, ResolvedCredential } from "./types.js";
|
|
21
|
+
/**
|
|
22
|
+
* Input to `resolveCredential`: which provider, which store, and what to inject.
|
|
23
|
+
*
|
|
24
|
+
* `env` and `deps` exist so nothing here reads ambient state. Omitting `env` does NOT fall back to
|
|
25
|
+
* `process.env` — the store's `homeEnvVar` override simply goes unread, so a credential written
|
|
26
|
+
* under a relocated home resolves as absent rather than as an error.
|
|
27
|
+
*
|
|
28
|
+
* `oauth` is required only to REFRESH an oauth credential. Without it an expired oauth entry cannot
|
|
29
|
+
* be renewed, and an api-key-only store needs it never.
|
|
30
|
+
*
|
|
31
|
+
* PUBLIC and under semver, despite the `internal/` directory: `src/auth/index.ts` re-exports this
|
|
32
|
+
* type, and `package.json` publishes that barrel as the '@theokit/sdk/auth' subpath. The directory
|
|
33
|
+
* name is not the authority — the `exports` map is. The semver-exempt class is the sub-paths
|
|
34
|
+
* declared under '@theokit/sdk/internal/*' ('internal/persistence', 'internal/security',
|
|
35
|
+
* 'internal/memory-adapters'); no `exports` entry reaches this file that way.
|
|
36
|
+
*/
|
|
37
|
+
export interface ResolveCredentialOptions {
|
|
38
|
+
/** The provider whose stored credential to resolve. */
|
|
39
|
+
provider: string;
|
|
40
|
+
/** Where the credential store lives. */
|
|
41
|
+
store: CredentialStoreConfig;
|
|
42
|
+
/** Env for the store's optional `homeEnvVar` override. Never an ambient read. */
|
|
43
|
+
env?: Record<string, string | undefined>;
|
|
44
|
+
/** Required to refresh an oauth credential; omit for an api-only store. */
|
|
45
|
+
oauth?: OAuthProviderConfig;
|
|
46
|
+
/** Injected HTTP + clock for deterministic tests; default globals. */
|
|
47
|
+
deps?: {
|
|
48
|
+
fetch?: typeof fetch;
|
|
49
|
+
now?: () => number;
|
|
50
|
+
};
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* Resolve a fresh credential for `provider` from the store, or `undefined` if the store holds none for it.
|
|
54
|
+
* oauth credentials are auto-refreshed when `opts.oauth` is supplied; api credentials pass through.
|
|
55
|
+
*/
|
|
56
|
+
export declare function resolveCredential(opts: ResolveCredentialOptions): Promise<ResolvedCredential | undefined>;
|