@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,426 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Owner: `internal/workflow/` (15 of 19 importers). Derived from the import graph, not declared —
|
|
3
|
+
* `tests/lint/types-name-their-owner.test.ts` re-derives it.
|
|
4
|
+
*
|
|
5
|
+
* Public type contract for `Workflow.create / .run / .resume` (Adoption
|
|
6
|
+
* Roadmap #5; ADRs D230-D248).
|
|
7
|
+
*
|
|
8
|
+
* Step types form a discriminated union by `kind`. Helper factory functions
|
|
9
|
+
* (`fn()`, `agentStep()`) live in `workflow.ts` and hide the discriminator
|
|
10
|
+
* from end users.
|
|
11
|
+
*
|
|
12
|
+
* @public
|
|
13
|
+
*/
|
|
14
|
+
import type { ZodType } from "zod";
|
|
15
|
+
import type { SDKAgent } from "./agent.js";
|
|
16
|
+
import type { MessageOrigin } from "./run.js";
|
|
17
|
+
/**
|
|
18
|
+
* Any node of a committed workflow, discriminated by `kind`.
|
|
19
|
+
*
|
|
20
|
+
* Build these with the helpers rather than by hand: `fn()` and `agentStep()` set the discriminator,
|
|
21
|
+
* validate the id, and parse the retry policy at construction — where a mistake is cheap — while the
|
|
22
|
+
* builder methods `.parallel()`, `.branch()`, `.foreach()`, `.dowhile()`, `.sleep()` and `.suspend()`
|
|
23
|
+
* cover the remaining variants and mint a positional default id (`parallel_0`, `branch_1`, ...) when
|
|
24
|
+
* you do not pass one.
|
|
25
|
+
*
|
|
26
|
+
* Every id, nested ones included, must match `^[a-z0-9][a-z0-9_-]*$` case-insensitively and be at
|
|
27
|
+
* most 64 characters, and must be unique across the whole workflow. `.commit()` walks the tree —
|
|
28
|
+
* parallel branches, branch predicates, the fallback, and the inner step of a `foreach`/`dowhile` —
|
|
29
|
+
* and throws {@link WorkflowDuplicateStepIdError} on the second occurrence.
|
|
30
|
+
*/
|
|
31
|
+
export type Step = FnStep | AgentStep | ParallelStep | BranchStep | ForeachStep | DowhileStep | SleepStep | SuspendStep;
|
|
32
|
+
/** A pure function step. */
|
|
33
|
+
export interface FnStep {
|
|
34
|
+
readonly kind: "fn";
|
|
35
|
+
readonly id: string;
|
|
36
|
+
readonly fn: (input: unknown, ctx: StepContext) => Promise<unknown> | unknown;
|
|
37
|
+
readonly inputSchema?: ZodType;
|
|
38
|
+
readonly outputSchema?: ZodType;
|
|
39
|
+
readonly retry?: RetryPolicy;
|
|
40
|
+
/**
|
|
41
|
+
* @deprecated NOT IMPLEMENTED. Setting this does not enable saga rollback — it arms
|
|
42
|
+
* `WorkflowCompensateNotImplementedError`, so the step FAILS at run time and the message tells you
|
|
43
|
+
* to remove it. A field whose only effect is to make the step fail is worse than an absent field,
|
|
44
|
+
* because the type invites it and the cost is discovered in production.
|
|
45
|
+
*
|
|
46
|
+
* Kept rather than removed because `FnStep` is published and dropping a member is a major-version
|
|
47
|
+
* decision. The deprecation is the part that reaches a caller at the point of use: an editor
|
|
48
|
+
* strikes it through, which the D238 comment that stood here ("slot reserved") did not.
|
|
49
|
+
*/
|
|
50
|
+
readonly compensate?: (input: unknown, output: unknown, error: Error) => Promise<void> | void;
|
|
51
|
+
}
|
|
52
|
+
/** An agent.send-driven step. */
|
|
53
|
+
export interface AgentStep {
|
|
54
|
+
readonly kind: "agent";
|
|
55
|
+
readonly id: string;
|
|
56
|
+
readonly agent: SDKAgent;
|
|
57
|
+
readonly promptTemplate: string | ((input: unknown) => string);
|
|
58
|
+
readonly retry?: RetryPolicy;
|
|
59
|
+
/**
|
|
60
|
+
* SE3 — provenance stamped onto this step's `agent.send()` (forwarded to
|
|
61
|
+
* `RunResult.origin`). Squad sets `{ kind: "peer", from: "agent-<i-1>" }` on
|
|
62
|
+
* every step after the first so a peer-driven turn is attributable.
|
|
63
|
+
*/
|
|
64
|
+
readonly origin?: MessageOrigin;
|
|
65
|
+
}
|
|
66
|
+
/** N concurrent branches, each its own mini-step-list. */
|
|
67
|
+
export interface ParallelStep {
|
|
68
|
+
readonly kind: "parallel";
|
|
69
|
+
readonly id: string;
|
|
70
|
+
readonly branches: ReadonlyArray<ReadonlyArray<Step>>;
|
|
71
|
+
readonly concurrency?: number;
|
|
72
|
+
readonly errorPolicy?: "fail-fast" | "collect";
|
|
73
|
+
}
|
|
74
|
+
/** First-match-wins predicates + optional fallback. */
|
|
75
|
+
export interface BranchStep {
|
|
76
|
+
readonly kind: "branch";
|
|
77
|
+
readonly id: string;
|
|
78
|
+
readonly predicates: ReadonlyArray<readonly [(input: unknown) => boolean | Promise<boolean>, ReadonlyArray<Step>]>;
|
|
79
|
+
readonly fallback?: ReadonlyArray<Step>;
|
|
80
|
+
}
|
|
81
|
+
/** Map a step over an upstream array output. */
|
|
82
|
+
export interface ForeachStep {
|
|
83
|
+
readonly kind: "foreach";
|
|
84
|
+
readonly id: string;
|
|
85
|
+
/** ID of an upstream top-level step whose output is iterable. */
|
|
86
|
+
readonly iterableFrom: string;
|
|
87
|
+
readonly step: Step;
|
|
88
|
+
readonly concurrency?: number;
|
|
89
|
+
}
|
|
90
|
+
/** Loop a step until condFn returns false. */
|
|
91
|
+
export interface DowhileStep {
|
|
92
|
+
readonly kind: "dowhile";
|
|
93
|
+
readonly id: string;
|
|
94
|
+
readonly step: Step;
|
|
95
|
+
readonly condFn: (output: unknown, iteration: number) => boolean | Promise<boolean>;
|
|
96
|
+
readonly maxIterations?: number;
|
|
97
|
+
}
|
|
98
|
+
/** Pause for a fixed duration. */
|
|
99
|
+
export interface SleepStep {
|
|
100
|
+
readonly kind: "sleep";
|
|
101
|
+
readonly id: string;
|
|
102
|
+
readonly durationMs: number;
|
|
103
|
+
}
|
|
104
|
+
/** Standalone explicit suspend point. */
|
|
105
|
+
export interface SuspendStep {
|
|
106
|
+
readonly kind: "suspend";
|
|
107
|
+
readonly id: string;
|
|
108
|
+
readonly payloadSchema?: ZodType;
|
|
109
|
+
}
|
|
110
|
+
/**
|
|
111
|
+
* theokit#161 — one step of a workflow, as a reflection surface sees it.
|
|
112
|
+
*
|
|
113
|
+
* `id` and `kind` are the only fields every step variant shares, and they are what a reflection
|
|
114
|
+
* endpoint renders. Everything else a step carries is an executable — a predicate, a condition, an
|
|
115
|
+
* agent, a prompt template — which cannot cross a process boundary and means nothing to a caller
|
|
116
|
+
* enumerating shape.
|
|
117
|
+
*
|
|
118
|
+
* @public
|
|
119
|
+
*/
|
|
120
|
+
export interface WorkflowStepDescription {
|
|
121
|
+
readonly id: string;
|
|
122
|
+
readonly kind: Step["kind"];
|
|
123
|
+
/**
|
|
124
|
+
* Nested steps, for the variants that contain them: `parallel` (all branches, flattened — the
|
|
125
|
+
* branch grouping is a scheduling detail, not shape a reader needs), `branch` (each predicate's
|
|
126
|
+
* steps plus the fallback), `foreach` and `dowhile` (their single inner step).
|
|
127
|
+
*
|
|
128
|
+
* Absent for leaf steps. A flat list would misreport a parallel or branching workflow as linear.
|
|
129
|
+
*/
|
|
130
|
+
readonly steps?: readonly WorkflowStepDescription[];
|
|
131
|
+
}
|
|
132
|
+
/**
|
|
133
|
+
* theokit#161 — the read-only shape of a committed workflow.
|
|
134
|
+
*
|
|
135
|
+
* Returned by `Workflow.describe()`. There is deliberately NO workflow registry to enumerate: a
|
|
136
|
+
* `Workflow` is a value the caller constructs and holds, so the caller already knows which ones
|
|
137
|
+
* exist. What it lacked was a way to DESCRIBE one. A registry would have added process-global state
|
|
138
|
+
* that nothing ever releases, to re-answer a question the host can answer itself.
|
|
139
|
+
*
|
|
140
|
+
* @public
|
|
141
|
+
*/
|
|
142
|
+
export interface WorkflowDescription {
|
|
143
|
+
readonly name: string;
|
|
144
|
+
readonly steps: readonly WorkflowStepDescription[];
|
|
145
|
+
}
|
|
146
|
+
/** D237 — retry policy applied per fn/agent step. */
|
|
147
|
+
export interface RetryPolicy {
|
|
148
|
+
/** Total attempts (MIN 1, MAX 20). `1` = no retry. */
|
|
149
|
+
readonly maxAttempts: number;
|
|
150
|
+
readonly initialBackoffMs?: number;
|
|
151
|
+
readonly backoffCoefficient?: number;
|
|
152
|
+
readonly maximumBackoffMs?: number;
|
|
153
|
+
readonly nonRetryableErrors?: ReadonlyArray<string>;
|
|
154
|
+
}
|
|
155
|
+
/** D247 — context handed to every step.fn. */
|
|
156
|
+
export interface StepContext {
|
|
157
|
+
readonly runId: string;
|
|
158
|
+
readonly signal: AbortSignal;
|
|
159
|
+
readonly log: {
|
|
160
|
+
debug: (msg: string, attrs?: Record<string, unknown>) => void;
|
|
161
|
+
info: (msg: string, attrs?: Record<string, unknown>) => void;
|
|
162
|
+
warn: (msg: string, attrs?: Record<string, unknown>) => void;
|
|
163
|
+
};
|
|
164
|
+
/** Pause the workflow; resume via `Workflow.resume({...})`. */
|
|
165
|
+
readonly suspend: (payload?: unknown) => Promise<never>;
|
|
166
|
+
/**
|
|
167
|
+
* SE29 — the workflow's shared state (from `WorkflowOptions.initialState`,
|
|
168
|
+
* mutated by {@link setState}), visible to every subsequent step in the run.
|
|
169
|
+
* `undefined` when no `initialState`/`setState` has run. Persisted across
|
|
170
|
+
* suspend/resume.
|
|
171
|
+
*/
|
|
172
|
+
readonly state: unknown;
|
|
173
|
+
/**
|
|
174
|
+
* SE29 — update the shared state for subsequent steps. Validated against
|
|
175
|
+
* `WorkflowOptions.stateSchema` when set (a mismatch throws
|
|
176
|
+
* {@link WorkflowStateError}, which fails the step/run — Rule 8).
|
|
177
|
+
*/
|
|
178
|
+
readonly setState: (next: unknown) => void;
|
|
179
|
+
}
|
|
180
|
+
/**
|
|
181
|
+
* The outcome of one step, appended to `WorkflowRun.stepResults` in execution order.
|
|
182
|
+
*
|
|
183
|
+
* A failing step does not throw out of `run()`. It lands here with `status: "failed"` and its error
|
|
184
|
+
* flattened to `{ name, message }` — the thrown instance is gone by the time a caller sees it, so
|
|
185
|
+
* match on `error.name` and never on `instanceof`.
|
|
186
|
+
*
|
|
187
|
+
* `"skipped"` occurs only for a `branch` step whose predicates all returned false and which declared
|
|
188
|
+
* no fallback; its `output` is the step input, passed through unchanged. `"suspended"` marks the step
|
|
189
|
+
* that called `StepContext.suspend()`, is always the last entry of the run, and carries no output.
|
|
190
|
+
*
|
|
191
|
+
* `attempts` means different things per kind. For `fn` and `agent` it counts execution attempts: 1
|
|
192
|
+
* without a `retry` policy, and 0 when the step failed before its body ran — an `inputSchema`
|
|
193
|
+
* rejection, a prompt template that threw, a `compensate` v1 refuses, or a cloud agent. For `dowhile`
|
|
194
|
+
* it counts loop iterations instead.
|
|
195
|
+
*/
|
|
196
|
+
export interface StepResult {
|
|
197
|
+
readonly stepId: string;
|
|
198
|
+
readonly kind: Step["kind"];
|
|
199
|
+
readonly status: "completed" | "failed" | "skipped" | "suspended";
|
|
200
|
+
readonly attempts: number;
|
|
201
|
+
readonly durationMs: number;
|
|
202
|
+
readonly output?: unknown;
|
|
203
|
+
readonly error?: {
|
|
204
|
+
name: string;
|
|
205
|
+
message: string;
|
|
206
|
+
};
|
|
207
|
+
}
|
|
208
|
+
/**
|
|
209
|
+
* The terminal record of one run — what `Workflow.run()` resolves to, what `Workflow.resume()`
|
|
210
|
+
* returns, and what the `result` promise of `Workflow.stream()` settles with.
|
|
211
|
+
*
|
|
212
|
+
* Read `status`; do not rely on `catch`. A step that throws does not reject the promise, it ends the
|
|
213
|
+
* run with `status: "failed"` and the error in `error`. Only `completed` populates `output`; `failed`
|
|
214
|
+
* and `cancelled` (an aborted `signal`) populate `error`; `suspended` populates neither and means a
|
|
215
|
+
* snapshot exists under `id` for `Workflow.resume()`. `running` is part of the union for the benefit
|
|
216
|
+
* of a host tracking a run in flight — the executor only ever assembles a terminal one.
|
|
217
|
+
*
|
|
218
|
+
* `stepResults` is cumulative across a resume: the executor seeds it with the snapshot's prior
|
|
219
|
+
* results, so the record of a resumed run covers the steps that ran before the suspend as well.
|
|
220
|
+
*/
|
|
221
|
+
export interface WorkflowRun<TOutput = unknown> {
|
|
222
|
+
readonly id: string;
|
|
223
|
+
readonly name: string;
|
|
224
|
+
readonly status: "running" | "completed" | "failed" | "suspended" | "cancelled";
|
|
225
|
+
readonly output?: TOutput;
|
|
226
|
+
readonly error?: {
|
|
227
|
+
name: string;
|
|
228
|
+
message: string;
|
|
229
|
+
};
|
|
230
|
+
readonly startedAt: number;
|
|
231
|
+
readonly endedAt?: number;
|
|
232
|
+
readonly stepResults: ReadonlyArray<StepResult>;
|
|
233
|
+
}
|
|
234
|
+
/**
|
|
235
|
+
* The persisted state of a suspended run: written when a step calls `StepContext.suspend()`, read
|
|
236
|
+
* back by `Workflow.resume()`. Callers never construct one — the type is exported so a host can
|
|
237
|
+
* inspect what the persistence backend wrote.
|
|
238
|
+
*
|
|
239
|
+
* Snapshots are single-shot. `resume()` deletes the snapshot before re-entering the executor, so the
|
|
240
|
+
* same one cannot be resumed twice; a second attempt raises
|
|
241
|
+
* {@link WorkflowSnapshotNotFoundError}.
|
|
242
|
+
*
|
|
243
|
+
* Everything reachable from here must survive `JSON.stringify` — the store serializes on save even
|
|
244
|
+
* for the memory backend, and raises `WorkflowNotSerializableError` rather than letting a `TypeError`
|
|
245
|
+
* escape. That rules out BigInt, circular references and class instances in step outputs, in
|
|
246
|
+
* `accumulatedInput` and in `state`.
|
|
247
|
+
*
|
|
248
|
+
* `currentStepId` is the suspending step, and resume continues from the step AFTER it. A workflow
|
|
249
|
+
* definition edited between suspend and resume therefore either fails with
|
|
250
|
+
* `WorkflowResumeStepNotFoundError` (the id is gone) or resumes at a position the author did not
|
|
251
|
+
* intend (the id moved).
|
|
252
|
+
*/
|
|
253
|
+
export interface WorkflowSnapshot {
|
|
254
|
+
/** v1 = pre-SE29 (no `state`); v2 = SE29 (carries `state`). Resume reads both. */
|
|
255
|
+
readonly _schemaVersion: 1 | 2;
|
|
256
|
+
readonly runId: string;
|
|
257
|
+
readonly workflowName: string;
|
|
258
|
+
readonly currentStepId: string;
|
|
259
|
+
readonly suspendedPayload?: unknown;
|
|
260
|
+
readonly stepResults: ReadonlyArray<StepResult>;
|
|
261
|
+
readonly accumulatedInput: unknown;
|
|
262
|
+
/** SE29 — shared state captured at suspend (v2). Absent on a v1 snapshot. */
|
|
263
|
+
readonly state?: unknown;
|
|
264
|
+
readonly suspendedAt: number;
|
|
265
|
+
}
|
|
266
|
+
/**
|
|
267
|
+
* SE28 — a step-level workflow event emitted by `Workflow.stream()` as top-level
|
|
268
|
+
* steps run. Coarse-grained (one event per top-level step; nested
|
|
269
|
+
* parallel/branch/foreach emit as their single wrapping step), distinct from the
|
|
270
|
+
* token-delta agent stream. Discriminate on `type`.
|
|
271
|
+
*
|
|
272
|
+
* @public
|
|
273
|
+
*/
|
|
274
|
+
export type WorkflowEvent = {
|
|
275
|
+
readonly type: "step_started";
|
|
276
|
+
readonly stepId: string;
|
|
277
|
+
} | {
|
|
278
|
+
readonly type: "step_completed";
|
|
279
|
+
readonly stepId: string;
|
|
280
|
+
readonly output: unknown;
|
|
281
|
+
} | {
|
|
282
|
+
readonly type: "step_failed";
|
|
283
|
+
readonly stepId: string;
|
|
284
|
+
readonly error: {
|
|
285
|
+
readonly name: string;
|
|
286
|
+
readonly message: string;
|
|
287
|
+
};
|
|
288
|
+
} | {
|
|
289
|
+
readonly type: "workflow_suspended";
|
|
290
|
+
readonly stepId: string;
|
|
291
|
+
} | {
|
|
292
|
+
readonly type: "workflow_completed";
|
|
293
|
+
};
|
|
294
|
+
/**
|
|
295
|
+
* SE28 — the async iterator returned by `Workflow.stream()`. Yields
|
|
296
|
+
* {@link WorkflowEvent}s in execution order; `result` resolves to the same
|
|
297
|
+
* terminal {@link WorkflowRun} the `run()` path returns (the authoritative
|
|
298
|
+
* outcome — the stream ends when the run terminates).
|
|
299
|
+
*
|
|
300
|
+
* @public
|
|
301
|
+
*/
|
|
302
|
+
export type WorkflowStream<TOutput = unknown> = AsyncIterableIterator<WorkflowEvent> & {
|
|
303
|
+
readonly result: Promise<WorkflowRun<TOutput>>;
|
|
304
|
+
};
|
|
305
|
+
/**
|
|
306
|
+
* Where suspend snapshots are kept. Omitting `WorkflowOptions.persistence` selects the same store
|
|
307
|
+
* `backend: "memory"` selects explicitly.
|
|
308
|
+
*
|
|
309
|
+
* `"memory"` is one process-wide map shared by every workflow, so a run suspended under it can only
|
|
310
|
+
* be resumed by the process that suspended it, and only until it exits. `"json"` writes one
|
|
311
|
+
* `{runId}.json` per snapshot into `dir` through an atomic write and survives a restart. Any suspend
|
|
312
|
+
* point that waits on a human or an external system needs `"json"`; `"memory"` is for tests and for
|
|
313
|
+
* suspends resolved within the same process.
|
|
314
|
+
*
|
|
315
|
+
* `dir` is required when `backend` is `"json"` and ignored otherwise — `Workflow.create()` rejects
|
|
316
|
+
* the options up front when it is missing or empty, rather than failing at the first suspend.
|
|
317
|
+
*/
|
|
318
|
+
export interface WorkflowPersistenceOptions {
|
|
319
|
+
readonly backend: "memory" | "json";
|
|
320
|
+
/** Required for `backend: "json"`. */
|
|
321
|
+
readonly dir?: string;
|
|
322
|
+
}
|
|
323
|
+
/**
|
|
324
|
+
* Configuration for `Workflow.create()`, validated by Zod before the builder is handed back: a `name`
|
|
325
|
+
* outside 1..128 characters, or `persistence.backend: "json"` without a `dir`, throws there rather
|
|
326
|
+
* than at run time.
|
|
327
|
+
*
|
|
328
|
+
* `name` is an observability and error-message label, not an identity. Two workflows may share one;
|
|
329
|
+
* the identity behind the single-flight lock is minted per `.commit()` call, so two separately
|
|
330
|
+
* committed workflows never block each other however they are named.
|
|
331
|
+
*
|
|
332
|
+
* The three schemas are independent and each optional: `inputSchema` guards `run(input)` before step
|
|
333
|
+
* 1, `outputSchema` guards the final value on the completed path only (a suspended or failed run
|
|
334
|
+
* skips it), and `stateSchema` guards `initialState` plus every `StepContext.setState()` call. All
|
|
335
|
+
* three must be synchronous — a schema carrying an async refinement is reported as a validation
|
|
336
|
+
* failure with that explanation, never awaited.
|
|
337
|
+
*/
|
|
338
|
+
export interface WorkflowOptions {
|
|
339
|
+
readonly name: string;
|
|
340
|
+
readonly persistence?: WorkflowPersistenceOptions;
|
|
341
|
+
/**
|
|
342
|
+
* SE27 — Zod schema for the WHOLE workflow's input. When set, `run(input)`
|
|
343
|
+
* validates `input` BEFORE step 1; a mismatch yields `status: "failed"` with a
|
|
344
|
+
* typed {@link WorkflowInputError} in `error` (fail-fast, no step runs, no
|
|
345
|
+
* silent coerce). Absent ⇒ no whole-workflow input validation (unchanged).
|
|
346
|
+
*/
|
|
347
|
+
readonly inputSchema?: ZodType;
|
|
348
|
+
/**
|
|
349
|
+
* SE27 — Zod schema for the workflow's final output. When set, the terminal
|
|
350
|
+
* `completed` output is validated before `WorkflowRun.output` is populated; a
|
|
351
|
+
* mismatch yields `status: "failed"` with a typed {@link WorkflowOutputError}.
|
|
352
|
+
* Only validated on the `completed` path (suspended/failed runs skip it).
|
|
353
|
+
*/
|
|
354
|
+
readonly outputSchema?: ZodType;
|
|
355
|
+
/**
|
|
356
|
+
* SE29 — Zod schema for the workflow's shared state (see `StepContext.state` /
|
|
357
|
+
* `setState`). When set, `initialState` and every `setState(next)` are
|
|
358
|
+
* validated against it (a mismatch throws {@link WorkflowStateError}). When
|
|
359
|
+
* `initialState` is absent, `state` starts as `undefined` and validation fires
|
|
360
|
+
* on the first `setState` call.
|
|
361
|
+
*/
|
|
362
|
+
readonly stateSchema?: ZodType;
|
|
363
|
+
/**
|
|
364
|
+
* SE29 — the initial shared state, seeded onto `StepContext.state` before
|
|
365
|
+
* step 1. Validated against `stateSchema` when both are set. Persisted across
|
|
366
|
+
* suspend/resume.
|
|
367
|
+
*/
|
|
368
|
+
readonly initialState?: unknown;
|
|
369
|
+
/** Internal — minted at `.commit()`. Not user-facing. */
|
|
370
|
+
readonly workflowId?: string;
|
|
371
|
+
}
|
|
372
|
+
/**
|
|
373
|
+
* Per-run options for `Workflow.run()` and `Workflow.stream()`.
|
|
374
|
+
*
|
|
375
|
+
* `signal` is combined with the run's internal single-flight signal and reaches every step through
|
|
376
|
+
* `StepContext.signal`. The executor itself checks it at step boundaries, so a step that ignores the
|
|
377
|
+
* signal runs to completion before the run reports `status: "cancelled"` — a step doing long I/O
|
|
378
|
+
* should pass `ctx.signal` down to make abort prompt.
|
|
379
|
+
*
|
|
380
|
+
* `runId` is minted per call (`wfr-` plus 8 hex) unless you pass it, which is why concurrent runs of
|
|
381
|
+
* one workflow do not interfere. Pinning it buys a deterministic id for resume, and buys the
|
|
382
|
+
* single-flight lock with it: starting a second run of the same committed workflow under a `runId`
|
|
383
|
+
* that is still in flight throws {@link WorkflowAlreadyRunningError}.
|
|
384
|
+
*/
|
|
385
|
+
export interface WorkflowRunOptions {
|
|
386
|
+
readonly signal?: AbortSignal;
|
|
387
|
+
/** Override run ID for deterministic resume (advanced; default = mintRunId). */
|
|
388
|
+
readonly runId?: string;
|
|
389
|
+
/**
|
|
390
|
+
* Opt-in Task wrapping (ADRs D363, D374). Registers the workflow run
|
|
391
|
+
* as a `Task` (kind="workflow") with a `wf-` namespaced id (D368,
|
|
392
|
+
* EC-5). The task transitions terminal when `Workflow.run` resolves.
|
|
393
|
+
*
|
|
394
|
+
* Auto-id: `wf-{runId}`.
|
|
395
|
+
*
|
|
396
|
+
* @public
|
|
397
|
+
*/
|
|
398
|
+
readonly task?: true | {
|
|
399
|
+
id?: string;
|
|
400
|
+
meta?: Record<string, unknown>;
|
|
401
|
+
};
|
|
402
|
+
}
|
|
403
|
+
/**
|
|
404
|
+
* Arguments for `Workflow.resume()`.
|
|
405
|
+
*
|
|
406
|
+
* `workflow` is typed structurally as `{ run }`, but resume needs more than `run`: it reads the
|
|
407
|
+
* committed steps and options off the instance and throws a plain `Error` — "Workflow.resume requires
|
|
408
|
+
* an instance from Workflow.create().commit()" — for anything else. Pass the same committed
|
|
409
|
+
* `Workflow` the suspended run came from, not a stand-in.
|
|
410
|
+
*
|
|
411
|
+
* `runId` selects the snapshot. An id with no snapshot throws
|
|
412
|
+
* {@link WorkflowSnapshotNotFoundError}.
|
|
413
|
+
*
|
|
414
|
+
* `payload` becomes the input of the step after the suspend point, and is parsed against the
|
|
415
|
+
* suspending step's `payloadSchema` first when it declared one (a mismatch throws out of `resume`).
|
|
416
|
+
* Omit it to resume from the accumulated input captured in the snapshot instead — the two are
|
|
417
|
+
* alternatives, not a merge.
|
|
418
|
+
*/
|
|
419
|
+
export interface WorkflowResumeOptions<TI = unknown> {
|
|
420
|
+
readonly runId: string;
|
|
421
|
+
readonly workflow: {
|
|
422
|
+
run: (input: TI, opts?: WorkflowRunOptions) => Promise<WorkflowRun>;
|
|
423
|
+
};
|
|
424
|
+
readonly payload?: unknown;
|
|
425
|
+
readonly signal?: AbortSignal;
|
|
426
|
+
}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* SE19 — expose a {@link Workflow} as an agent tool.
|
|
3
|
+
*
|
|
4
|
+
* Split out of `workflow.ts` because it answers a different question: that file is about BUILDING a
|
|
5
|
+
* workflow; this one is about handing a built workflow to an agent as a callable. The file-size gate
|
|
6
|
+
* is what surfaced the seam, and the seam is real — nothing here runs while steps are composed.
|
|
7
|
+
*
|
|
8
|
+
* Re-exported from `workflow.ts`, so `@theokit/sdk/workflow` is unchanged.
|
|
9
|
+
*
|
|
10
|
+
* NOTE ON THE MODULE TAG: this header deliberately carries no internal-visibility tag, and does not
|
|
11
|
+
* even name one — TypeScript attaches a file-leading docblock to the FIRST declaration below it, and
|
|
12
|
+
* `stripInternal: true` (tsconfig.base) then deletes that declaration from the emitted `.d.ts`.
|
|
13
|
+
* `tsc --noEmit` stays clean and the declaration rollup fails with `"X" is not exported by "..."`.
|
|
14
|
+
* Measured twice on this file on 2026-09-01: once with the tag, and again when the comment
|
|
15
|
+
* EXPLAINING the trap quoted the tag verbatim and re-armed it.
|
|
16
|
+
*/
|
|
17
|
+
import type { ZodType, z } from "zod";
|
|
18
|
+
import { TheokitAgentError } from "./errors.js";
|
|
19
|
+
import type { CustomTool } from "./types/agent.js";
|
|
20
|
+
import type { WorkflowRun } from "./types/workflow.js";
|
|
21
|
+
/**
|
|
22
|
+
* Raised by a {@link workflowAsTool} tool when the wrapped workflow run does not
|
|
23
|
+
* reach `status: "completed"` (a step failed, the run was cancelled/suspended).
|
|
24
|
+
* The dispatch converts it to a `tool_result(isError)`.
|
|
25
|
+
*
|
|
26
|
+
* @public
|
|
27
|
+
*/
|
|
28
|
+
export declare class WorkflowToolError extends TheokitAgentError {
|
|
29
|
+
readonly toolName: string;
|
|
30
|
+
readonly workflowStatus: string;
|
|
31
|
+
readonly workflowError?: {
|
|
32
|
+
name: string;
|
|
33
|
+
message: string;
|
|
34
|
+
} | undefined;
|
|
35
|
+
readonly name = "WorkflowToolError";
|
|
36
|
+
readonly code: "workflow_tool_failed";
|
|
37
|
+
constructor(toolName: string, workflowStatus: string, workflowError?: {
|
|
38
|
+
name: string;
|
|
39
|
+
message: string;
|
|
40
|
+
} | undefined);
|
|
41
|
+
}
|
|
42
|
+
/** Spec for {@link workflowAsTool}. `inputSchema` is the workflow's input shape (Zod). */
|
|
43
|
+
export interface WorkflowAsToolSpec<T extends ZodType> {
|
|
44
|
+
/** Tool name surfaced to the LLM. Same constraints as a `CustomTool.name`. */
|
|
45
|
+
name: string;
|
|
46
|
+
/** Description surfaced to the LLM — when the agent should trigger the workflow. */
|
|
47
|
+
description: string;
|
|
48
|
+
/** Zod schema for the workflow's input (a `Workflow` carries no top-level schema). */
|
|
49
|
+
inputSchema: T;
|
|
50
|
+
}
|
|
51
|
+
/**
|
|
52
|
+
* SE19 — expose a {@link Workflow} as an agent {@link CustomTool}, completing the
|
|
53
|
+
* "X as tools" trio (tools; agents-as-tools via `defineSubAgent`; workflows-as-tools).
|
|
54
|
+
* The handler validates the model's args against `spec.inputSchema`, runs the
|
|
55
|
+
* workflow, and returns its output (a string as-is, else JSON). A run that does not
|
|
56
|
+
* reach `status: "completed"` raises a typed {@link WorkflowToolError} (workflow
|
|
57
|
+
* step errors do NOT throw — they surface via `run.status === "failed"`).
|
|
58
|
+
*
|
|
59
|
+
* Accepts any `{ run }`-shaped workflow (structural), so it never imports the
|
|
60
|
+
* `Workflow` class directly.
|
|
61
|
+
*
|
|
62
|
+
* @public
|
|
63
|
+
*/
|
|
64
|
+
export declare function workflowAsTool<T extends ZodType, TOutput = unknown>(workflow: {
|
|
65
|
+
run: (input: z.infer<T>) => Promise<WorkflowRun<TOutput>>;
|
|
66
|
+
}, spec: WorkflowAsToolSpec<T>): CustomTool;
|
|
@@ -0,0 +1,164 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The workflow error hierarchy — runtime classes, deliberately NOT in `types/`.
|
|
3
|
+
*
|
|
4
|
+
* `types/index.ts` calls itself "the canonical public contract" and re-exports every sibling with
|
|
5
|
+
* `export type *`, which cannot carry a value; `.dependency-cruiser.cjs` restates the same rule as
|
|
6
|
+
* "src/types/* are pure type definitions". These twelve classes lived in `types/workflow.ts` anyway
|
|
7
|
+
* and reached consumers only because the DTS rollup hoists a declaration the runtime bundle never
|
|
8
|
+
* emitted — the shape that shipped #279 for `isValidTaskId`. `tests/lint/types-are-types-only.test.ts`
|
|
9
|
+
* is what stops it recurring.
|
|
10
|
+
*
|
|
11
|
+
* The home mirrors `task-errors.ts`: errors for one public surface, next to it, at the src root.
|
|
12
|
+
* Re-exported by name from `workflow.ts`, so `@theokit/sdk/workflow` is unchanged.
|
|
13
|
+
*
|
|
14
|
+
* @public
|
|
15
|
+
*/
|
|
16
|
+
import { TheokitAgentError } from "./errors-base.js";
|
|
17
|
+
import type { WorkflowRun } from "./types/workflow.js";
|
|
18
|
+
/**
|
|
19
|
+
* Thrown by `.commit()` when one step id appears twice anywhere in the workflow — including inside a
|
|
20
|
+
* parallel branch, a branch predicate, the fallback, and the inner step of a `foreach` or `dowhile`.
|
|
21
|
+
*
|
|
22
|
+
* Ids address steps in snapshots and on resume, so this is refused at build time rather than
|
|
23
|
+
* discovered mid-run. Workflows nested with `workflowStep()` are exempt: the child runs in its own
|
|
24
|
+
* executor with its own id-space, so its ids cannot collide with the parent's.
|
|
25
|
+
*/
|
|
26
|
+
export declare class WorkflowDuplicateStepIdError extends TheokitAgentError {
|
|
27
|
+
readonly stepId: string;
|
|
28
|
+
readonly name = "WorkflowDuplicateStepIdError";
|
|
29
|
+
constructor(stepId: string);
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* SE27 — the whole-workflow `inputSchema` rejected `run(input)` (before step 1).
|
|
33
|
+
* `detail` is a pre-formatted issues summary (a string, NOT Zod's `ZodIssue[]`).
|
|
34
|
+
*/
|
|
35
|
+
export declare class WorkflowInputError extends TheokitAgentError {
|
|
36
|
+
readonly workflowName: string;
|
|
37
|
+
readonly detail: string;
|
|
38
|
+
readonly name = "WorkflowInputError";
|
|
39
|
+
constructor(workflowName: string, detail: string);
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* SE27 — the whole-workflow `outputSchema` rejected the final output (on `completed`).
|
|
43
|
+
* `detail` is a pre-formatted issues summary (a string, NOT Zod's `ZodIssue[]`).
|
|
44
|
+
*/
|
|
45
|
+
export declare class WorkflowOutputError extends TheokitAgentError {
|
|
46
|
+
readonly workflowName: string;
|
|
47
|
+
readonly detail: string;
|
|
48
|
+
readonly name = "WorkflowOutputError";
|
|
49
|
+
constructor(workflowName: string, detail: string);
|
|
50
|
+
}
|
|
51
|
+
/**
|
|
52
|
+
* SE29 — `WorkflowOptions.stateSchema` rejected an `initialState` or a
|
|
53
|
+
* `setState(next)` call. `detail` is a pre-formatted issues summary.
|
|
54
|
+
*/
|
|
55
|
+
export declare class WorkflowStateError extends TheokitAgentError {
|
|
56
|
+
readonly workflowName: string;
|
|
57
|
+
readonly detail: string;
|
|
58
|
+
readonly name = "WorkflowStateError";
|
|
59
|
+
constructor(workflowName: string, detail: string);
|
|
60
|
+
}
|
|
61
|
+
/**
|
|
62
|
+
* SE30 — a nested workflow (via `workflowStep`) did not `complete`. A nested
|
|
63
|
+
* `suspended` is NOT resumable in v1 (resume continues AFTER the step, so the
|
|
64
|
+
* child would be skipped) — restructure with a top-level suspend. A nested
|
|
65
|
+
* `failed`/`cancelled` fails the parent step with the child's error attached.
|
|
66
|
+
*/
|
|
67
|
+
export declare class WorkflowNestedError extends TheokitAgentError {
|
|
68
|
+
readonly stepId: string;
|
|
69
|
+
readonly childName: string;
|
|
70
|
+
readonly childStatus: Exclude<WorkflowRun["status"], "completed">;
|
|
71
|
+
readonly childError?: {
|
|
72
|
+
name: string;
|
|
73
|
+
message: string;
|
|
74
|
+
} | undefined;
|
|
75
|
+
readonly name = "WorkflowNestedError";
|
|
76
|
+
constructor(stepId: string, childName: string, childStatus: Exclude<WorkflowRun["status"], "completed">, childError?: {
|
|
77
|
+
name: string;
|
|
78
|
+
message: string;
|
|
79
|
+
} | undefined);
|
|
80
|
+
}
|
|
81
|
+
/**
|
|
82
|
+
* Thrown out of `Workflow.run()` — one of the few workflow failures that rejects instead of arriving
|
|
83
|
+
* as `run.status === "failed"` — when the committed workflow already has a run in flight under the
|
|
84
|
+
* same run id.
|
|
85
|
+
*
|
|
86
|
+
* The lock key pairs the id minted at `.commit()` with the run id, not `WorkflowOptions.name`, so
|
|
87
|
+
* two workflows sharing a name are independent and concurrent runs with distinct minted ids never
|
|
88
|
+
* collide. In practice this only fires when a caller pins `WorkflowRunOptions.runId`, or resumes a
|
|
89
|
+
* run id that is still executing. The registry is an in-process map: a crash releases every lock, and
|
|
90
|
+
* it says nothing about runs in other processes.
|
|
91
|
+
*/
|
|
92
|
+
export declare class WorkflowAlreadyRunningError extends TheokitAgentError {
|
|
93
|
+
readonly workflowName: string;
|
|
94
|
+
readonly runId: string;
|
|
95
|
+
readonly name = "WorkflowAlreadyRunningError";
|
|
96
|
+
constructor(workflowName: string, runId: string);
|
|
97
|
+
}
|
|
98
|
+
/**
|
|
99
|
+
* Thrown by `Workflow.resume()` when no snapshot exists for the given run id.
|
|
100
|
+
*
|
|
101
|
+
* The message suggests configuring persistence, which is the common cause but not the only one. The
|
|
102
|
+
* run may never have suspended; it may have suspended under the default memory backend in a process
|
|
103
|
+
* that has since exited; or the snapshot may already have been consumed, since resume deletes it
|
|
104
|
+
* before re-entering the executor and a second resume of the same run id lands here.
|
|
105
|
+
*/
|
|
106
|
+
export declare class WorkflowSnapshotNotFoundError extends TheokitAgentError {
|
|
107
|
+
readonly runId: string;
|
|
108
|
+
readonly name = "WorkflowSnapshotNotFoundError";
|
|
109
|
+
constructor(runId: string);
|
|
110
|
+
}
|
|
111
|
+
/**
|
|
112
|
+
* Raised when a `dowhile` step's condition kept returning true past `maxIterations` (default 100).
|
|
113
|
+
*
|
|
114
|
+
* It does not escape `run()`: the step fails, the run ends `status: "failed"`, and the error reaches
|
|
115
|
+
* the caller flattened as `run.error` with `name: "WorkflowMaxIterationsExceededError"` — match on
|
|
116
|
+
* the name, the instance does not survive. The guard is evaluated before each iteration, so the inner
|
|
117
|
+
* step runs at most `maxIterations` times; raising the ceiling is a `maxIterations` on the step, and
|
|
118
|
+
* there is no global default to change.
|
|
119
|
+
*/
|
|
120
|
+
export declare class WorkflowMaxIterationsExceededError extends TheokitAgentError {
|
|
121
|
+
readonly stepId: string;
|
|
122
|
+
readonly maxIterations: number;
|
|
123
|
+
readonly name = "WorkflowMaxIterationsExceededError";
|
|
124
|
+
constructor(stepId: string, maxIterations: number);
|
|
125
|
+
}
|
|
126
|
+
/** EC-4 absorbed — JSON.stringify failed on snapshot payload. */
|
|
127
|
+
export declare class WorkflowNotSerializableError extends TheokitAgentError {
|
|
128
|
+
readonly stepId: string;
|
|
129
|
+
readonly underlying: Error;
|
|
130
|
+
readonly name = "WorkflowNotSerializableError";
|
|
131
|
+
constructor(stepId: string, underlying: Error);
|
|
132
|
+
}
|
|
133
|
+
/** EC-8 absorbed — `currentStepId` from snapshot not found in resumed workflow. */
|
|
134
|
+
export declare class WorkflowResumeStepNotFoundError extends TheokitAgentError {
|
|
135
|
+
readonly stepId: string;
|
|
136
|
+
readonly workflowName: string;
|
|
137
|
+
readonly name = "WorkflowResumeStepNotFoundError";
|
|
138
|
+
constructor(stepId: string, workflowName: string);
|
|
139
|
+
}
|
|
140
|
+
/**
|
|
141
|
+
* Aggregate failure from parallel branches.
|
|
142
|
+
*
|
|
143
|
+
* THE ONE PUBLIC WORKFLOW ERROR STILL OUTSIDE THE SDK HIERARCHY, deliberately. Its ten siblings were
|
|
144
|
+
* reparented onto `TheokitAgentError` so `isTransientError` — and therefore `Retry.create`'s default
|
|
145
|
+
* predicate — can see them at all. This one cannot follow without ceasing to be an `AggregateError`,
|
|
146
|
+
* and `instanceof AggregateError` plus the standard `errors` array is the whole reason a caller
|
|
147
|
+
* catches it: they want the branch failures, not a single message.
|
|
148
|
+
*
|
|
149
|
+
* The cost is stated rather than hidden: `isTransientError(err)` is `false` for this class, so a
|
|
150
|
+
* parallel step whose branches failed transiently is not retried by the SDK's own helper. Inspect
|
|
151
|
+
* `err.errors` and decide per branch — which is what an aggregate asks of a caller anyway, since
|
|
152
|
+
* "should this be retried" has no single answer when the branches failed for different reasons.
|
|
153
|
+
*/
|
|
154
|
+
export declare class WorkflowParallelError extends AggregateError {
|
|
155
|
+
readonly stepId: string;
|
|
156
|
+
readonly name = "WorkflowParallelError";
|
|
157
|
+
constructor(errors: ReadonlyArray<Error>, stepId: string);
|
|
158
|
+
}
|
|
159
|
+
/** D238 — saga engine not yet implemented. */
|
|
160
|
+
export declare class WorkflowCompensateNotImplementedError extends TheokitAgentError {
|
|
161
|
+
readonly stepId: string;
|
|
162
|
+
readonly name = "WorkflowCompensateNotImplementedError";
|
|
163
|
+
constructor(stepId: string);
|
|
164
|
+
}
|