@theokit/sdk 5.11.1 → 5.12.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +87 -0
- package/dist/a2a/index.cjs +8 -8
- package/dist/a2a/index.js +3 -3
- package/dist/agent-BVKIUP7F.cjs +71 -0
- package/dist/{agent-OKP4LHG2.cjs.map → agent-BVKIUP7F.cjs.map} +1 -1
- package/dist/{agent-CmKwSyyD.d.ts → agent-CVzDy_Oj.d.ts} +17 -8
- package/dist/{agent-XMkGzff_.d.cts → agent-Cn0sphpA.d.cts} +17 -8
- package/dist/agent-IG7BP6GN.js +62 -0
- package/dist/{agent-DFV52V6E.js.map → agent-IG7BP6GN.js.map} +1 -1
- package/dist/agent-prims-CZyxfCmS.d.cts +206 -0
- package/dist/agent-prims-CZyxfCmS.d.ts +206 -0
- package/dist/agent-session-store-22GKA7O4.js +6 -0
- package/dist/{agent-session-store-ODD3IZCW.js.map → agent-session-store-22GKA7O4.js.map} +1 -1
- package/dist/agent-session-store-WP6NGDVX.cjs +23 -0
- package/dist/{agent-session-store-SVEJHSUA.cjs.map → agent-session-store-WP6NGDVX.cjs.map} +1 -1
- package/dist/auth/index.cjs +33 -33
- package/dist/auth/index.js +6 -6
- package/dist/{batch-427O54FQ.js → batch-EP3FCL6D.js} +9 -9
- package/dist/{batch-427O54FQ.js.map → batch-EP3FCL6D.js.map} +1 -1
- package/dist/{batch-U4SO4RLX.cjs → batch-IZ5EDKJ5.cjs} +29 -29
- package/dist/{batch-U4SO4RLX.cjs.map → batch-IZ5EDKJ5.cjs.map} +1 -1
- package/dist/{chunk-IIYJMXYW.cjs → chunk-27V5I2WW.cjs} +4 -4
- package/dist/{chunk-IIYJMXYW.cjs.map → chunk-27V5I2WW.cjs.map} +1 -1
- package/dist/{chunk-DPY2M74T.js → chunk-2C24NSNV.js} +5 -5
- package/dist/{chunk-DPY2M74T.js.map → chunk-2C24NSNV.js.map} +1 -1
- package/dist/{chunk-7F7XE6CM.js → chunk-2S4HQCDF.js} +3 -3
- package/dist/{chunk-7F7XE6CM.js.map → chunk-2S4HQCDF.js.map} +1 -1
- package/dist/{chunk-LZJXEPEQ.js → chunk-2SFLLOMN.js} +3 -3
- package/dist/{chunk-LZJXEPEQ.js.map → chunk-2SFLLOMN.js.map} +1 -1
- package/dist/{chunk-RGQICWFU.js → chunk-354F3OF5.js} +3 -3
- package/dist/{chunk-RGQICWFU.js.map → chunk-354F3OF5.js.map} +1 -1
- package/dist/{chunk-TX56N7FR.js → chunk-3FSBE4PS.js} +4 -4
- package/dist/{chunk-TX56N7FR.js.map → chunk-3FSBE4PS.js.map} +1 -1
- package/dist/{chunk-RQMCOFAI.cjs → chunk-3HA7N2BB.cjs} +8 -8
- package/dist/{chunk-RQMCOFAI.cjs.map → chunk-3HA7N2BB.cjs.map} +1 -1
- package/dist/{chunk-GM54F4FE.cjs → chunk-3KIUY67P.cjs} +9 -9
- package/dist/{chunk-GM54F4FE.cjs.map → chunk-3KIUY67P.cjs.map} +1 -1
- package/dist/{chunk-CZJ6Q7CW.js → chunk-3OY6H3I7.js} +66 -7
- package/dist/chunk-3OY6H3I7.js.map +1 -0
- package/dist/{chunk-ZWACQM5U.cjs → chunk-3WKWBYPO.cjs} +9 -9
- package/dist/{chunk-ZWACQM5U.cjs.map → chunk-3WKWBYPO.cjs.map} +1 -1
- package/dist/{chunk-Q34EBNYG.js → chunk-4GUFNDZR.js} +5 -5
- package/dist/{chunk-Q34EBNYG.js.map → chunk-4GUFNDZR.js.map} +1 -1
- package/dist/{chunk-XDUGSTYJ.cjs → chunk-4YD2WI57.cjs} +15 -15
- package/dist/{chunk-XDUGSTYJ.cjs.map → chunk-4YD2WI57.cjs.map} +1 -1
- package/dist/{chunk-SKDNCTXG.cjs → chunk-5A4UFBHW.cjs} +15 -15
- package/dist/{chunk-SKDNCTXG.cjs.map → chunk-5A4UFBHW.cjs.map} +1 -1
- package/dist/{chunk-SUVCHX4L.js → chunk-5AR6O7GW.js} +3 -3
- package/dist/{chunk-SUVCHX4L.js.map → chunk-5AR6O7GW.js.map} +1 -1
- package/dist/{chunk-SVCPJRUB.js → chunk-5HSMH2ZZ.js} +6 -6
- package/dist/{chunk-SVCPJRUB.js.map → chunk-5HSMH2ZZ.js.map} +1 -1
- package/dist/{chunk-GTX6FEDP.js → chunk-5IRDK5BC.js} +3 -3
- package/dist/{chunk-GTX6FEDP.js.map → chunk-5IRDK5BC.js.map} +1 -1
- package/dist/{chunk-H3CVJSFC.js → chunk-5IUDICRK.js} +3 -3
- package/dist/{chunk-H3CVJSFC.js.map → chunk-5IUDICRK.js.map} +1 -1
- package/dist/{chunk-FYEHYQ7T.cjs → chunk-6CXRYPG7.cjs} +15 -15
- package/dist/{chunk-FYEHYQ7T.cjs.map → chunk-6CXRYPG7.cjs.map} +1 -1
- package/dist/{chunk-NQVWSSX2.cjs → chunk-6OCJWGVD.cjs} +12 -12
- package/dist/{chunk-NQVWSSX2.cjs.map → chunk-6OCJWGVD.cjs.map} +1 -1
- package/dist/{chunk-MPR2ISL2.cjs → chunk-6XQLTQB6.cjs} +4 -4
- package/dist/{chunk-MPR2ISL2.cjs.map → chunk-6XQLTQB6.cjs.map} +1 -1
- package/dist/{chunk-72CPLZPC.cjs → chunk-7INPXUJI.cjs} +5 -5
- package/dist/{chunk-72CPLZPC.cjs.map → chunk-7INPXUJI.cjs.map} +1 -1
- package/dist/{chunk-HG5LKFG7.cjs → chunk-7WARNHWW.cjs} +16 -16
- package/dist/{chunk-HG5LKFG7.cjs.map → chunk-7WARNHWW.cjs.map} +1 -1
- package/dist/{chunk-KIKKTW5O.cjs → chunk-7YUPSBDV.cjs} +4 -4
- package/dist/{chunk-KIKKTW5O.cjs.map → chunk-7YUPSBDV.cjs.map} +1 -1
- package/dist/{chunk-IZDDSLL2.js → chunk-AB4OPJLD.js} +6 -6
- package/dist/{chunk-IZDDSLL2.js.map → chunk-AB4OPJLD.js.map} +1 -1
- package/dist/{chunk-XERM7PDQ.js → chunk-AGO5S5WD.js} +3 -3
- package/dist/{chunk-XERM7PDQ.js.map → chunk-AGO5S5WD.js.map} +1 -1
- package/dist/{chunk-ZWFTECOE.js → chunk-AHKS3DKI.js} +3 -3
- package/dist/{chunk-ZWFTECOE.js.map → chunk-AHKS3DKI.js.map} +1 -1
- package/dist/{chunk-ECD6ER3E.cjs → chunk-AIZ6WXSL.cjs} +4 -4
- package/dist/{chunk-ECD6ER3E.cjs.map → chunk-AIZ6WXSL.cjs.map} +1 -1
- package/dist/{chunk-KO6SHCEH.js → chunk-AQW54OWQ.js} +3 -3
- package/dist/{chunk-KO6SHCEH.js.map → chunk-AQW54OWQ.js.map} +1 -1
- package/dist/{chunk-P22BZE7G.cjs → chunk-AT2PESXB.cjs} +7 -7
- package/dist/{chunk-P22BZE7G.cjs.map → chunk-AT2PESXB.cjs.map} +1 -1
- package/dist/{chunk-MHIBYKWA.js → chunk-BJ7BPLQK.js} +131 -72
- package/dist/chunk-BJ7BPLQK.js.map +1 -0
- package/dist/{chunk-HV4V63CO.js → chunk-BO3PV3OP.js} +4 -4
- package/dist/{chunk-HV4V63CO.js.map → chunk-BO3PV3OP.js.map} +1 -1
- package/dist/{chunk-7NQ7HJ3E.cjs → chunk-BRWI4HLK.cjs} +6 -6
- package/dist/{chunk-7NQ7HJ3E.cjs.map → chunk-BRWI4HLK.cjs.map} +1 -1
- package/dist/{chunk-GHHIJEFX.cjs → chunk-BWYC7RZG.cjs} +9 -9
- package/dist/{chunk-GHHIJEFX.cjs.map → chunk-BWYC7RZG.cjs.map} +1 -1
- package/dist/{chunk-UNFBHV46.cjs → chunk-CEGU5AVD.cjs} +9 -9
- package/dist/chunk-CEGU5AVD.cjs.map +1 -0
- package/dist/{chunk-JV7JA7BM.cjs → chunk-CGH4BCIY.cjs} +11 -11
- package/dist/{chunk-JV7JA7BM.cjs.map → chunk-CGH4BCIY.cjs.map} +1 -1
- package/dist/{chunk-L3C6CCBG.cjs → chunk-CWQPQTUZ.cjs} +21 -21
- package/dist/{chunk-L3C6CCBG.cjs.map → chunk-CWQPQTUZ.cjs.map} +1 -1
- package/dist/{chunk-X3LOJJMO.js → chunk-DF77RBF4.js} +9 -9
- package/dist/{chunk-X3LOJJMO.js.map → chunk-DF77RBF4.js.map} +1 -1
- package/dist/{chunk-GMSRRJ53.js → chunk-EEK7S77K.js} +3 -3
- package/dist/{chunk-GMSRRJ53.js.map → chunk-EEK7S77K.js.map} +1 -1
- package/dist/{chunk-NKIQTLFA.cjs → chunk-EQ5IDL6W.cjs} +4 -4
- package/dist/{chunk-NKIQTLFA.cjs.map → chunk-EQ5IDL6W.cjs.map} +1 -1
- package/dist/{chunk-D5KXKBEN.cjs → chunk-FEAWEBWN.cjs} +5 -5
- package/dist/{chunk-D5KXKBEN.cjs.map → chunk-FEAWEBWN.cjs.map} +1 -1
- package/dist/{chunk-NJSIAJEK.cjs → chunk-FLDMPVUC.cjs} +4 -4
- package/dist/{chunk-NJSIAJEK.cjs.map → chunk-FLDMPVUC.cjs.map} +1 -1
- package/dist/{chunk-ASK2OQM5.cjs → chunk-G7XBVM3T.cjs} +5 -5
- package/dist/{chunk-ASK2OQM5.cjs.map → chunk-G7XBVM3T.cjs.map} +1 -1
- package/dist/{chunk-U27XHOEF.js → chunk-H7G65PNI.js} +5 -5
- package/dist/{chunk-U27XHOEF.js.map → chunk-H7G65PNI.js.map} +1 -1
- package/dist/{chunk-JW3GVLM6.cjs → chunk-H7HD6RXO.cjs} +4 -4
- package/dist/{chunk-JW3GVLM6.cjs.map → chunk-H7HD6RXO.cjs.map} +1 -1
- package/dist/{chunk-ZHWKT2NI.js → chunk-HJ2LV464.js} +3 -3
- package/dist/{chunk-ZHWKT2NI.js.map → chunk-HJ2LV464.js.map} +1 -1
- package/dist/{chunk-KGZ66JVZ.cjs → chunk-HN4IKB6X.cjs} +14 -14
- package/dist/{chunk-KGZ66JVZ.cjs.map → chunk-HN4IKB6X.cjs.map} +1 -1
- package/dist/{chunk-XKMVJ443.js → chunk-HWMGR3HA.js} +6 -6
- package/dist/{chunk-XKMVJ443.js.map → chunk-HWMGR3HA.js.map} +1 -1
- package/dist/{chunk-EQ5NCH2Y.cjs → chunk-IO4RI5ZJ.cjs} +24 -24
- package/dist/{chunk-EQ5NCH2Y.cjs.map → chunk-IO4RI5ZJ.cjs.map} +1 -1
- package/dist/{chunk-OLSEWLK5.cjs → chunk-IOFMRS6T.cjs} +6 -6
- package/dist/{chunk-OLSEWLK5.cjs.map → chunk-IOFMRS6T.cjs.map} +1 -1
- package/dist/{chunk-7QJYKVP6.js → chunk-KCM3RMKR.js} +3 -3
- package/dist/{chunk-7QJYKVP6.js.map → chunk-KCM3RMKR.js.map} +1 -1
- package/dist/{chunk-7KIN3L2S.js → chunk-KU5O7WPK.js} +3 -3
- package/dist/{chunk-7KIN3L2S.js.map → chunk-KU5O7WPK.js.map} +1 -1
- package/dist/{chunk-J5623RIV.cjs → chunk-KX5QXLBS.cjs} +10 -10
- package/dist/{chunk-J5623RIV.cjs.map → chunk-KX5QXLBS.cjs.map} +1 -1
- package/dist/{chunk-J6GXS5A2.cjs → chunk-L7JPXZ2C.cjs} +17 -17
- package/dist/{chunk-J6GXS5A2.cjs.map → chunk-L7JPXZ2C.cjs.map} +1 -1
- package/dist/{chunk-P7NNKEWO.cjs → chunk-L7V4DDIE.cjs} +4 -4
- package/dist/{chunk-P7NNKEWO.cjs.map → chunk-L7V4DDIE.cjs.map} +1 -1
- package/dist/chunk-LO6LIUZ6.cjs +18 -0
- package/dist/{chunk-SGC7LSHF.cjs.map → chunk-LO6LIUZ6.cjs.map} +1 -1
- package/dist/{chunk-P5N3Q2NH.cjs → chunk-LSWHDOCL.cjs} +192 -148
- package/dist/chunk-LSWHDOCL.cjs.map +1 -0
- package/dist/{chunk-3JHIFQ4I.js → chunk-M4U24U6G.js} +3 -3
- package/dist/{chunk-3JHIFQ4I.js.map → chunk-M4U24U6G.js.map} +1 -1
- package/dist/{chunk-GGRPAQ3B.js → chunk-MLGETTYX.js} +5 -5
- package/dist/{chunk-GGRPAQ3B.js.map → chunk-MLGETTYX.js.map} +1 -1
- package/dist/{chunk-XZHJYSPB.js → chunk-MLJDW2YK.js} +4 -4
- package/dist/{chunk-XZHJYSPB.js.map → chunk-MLJDW2YK.js.map} +1 -1
- package/dist/{chunk-5Q4RTLMP.js → chunk-MS3TQSXU.js} +3 -3
- package/dist/{chunk-5Q4RTLMP.js.map → chunk-MS3TQSXU.js.map} +1 -1
- package/dist/{chunk-W2ZVTEOD.js → chunk-MSEL5E5P.js} +6 -6
- package/dist/{chunk-W2ZVTEOD.js.map → chunk-MSEL5E5P.js.map} +1 -1
- package/dist/{chunk-ZAM7BJXJ.cjs → chunk-MSW7LB2V.cjs} +5 -5
- package/dist/{chunk-ZAM7BJXJ.cjs.map → chunk-MSW7LB2V.cjs.map} +1 -1
- package/dist/{chunk-7HUCU3KK.js → chunk-NHOEXFZT.js} +5 -5
- package/dist/{chunk-7HUCU3KK.js.map → chunk-NHOEXFZT.js.map} +1 -1
- package/dist/{chunk-6G4IRQUD.js → chunk-NJBJ3CUG.js} +6 -6
- package/dist/{chunk-6G4IRQUD.js.map → chunk-NJBJ3CUG.js.map} +1 -1
- package/dist/{chunk-I2ORT6QD.js → chunk-NKQVLWDF.js} +3 -3
- package/dist/{chunk-I2ORT6QD.js.map → chunk-NKQVLWDF.js.map} +1 -1
- package/dist/{chunk-N7KS3TIR.cjs → chunk-NP362THY.cjs} +28 -15
- package/dist/chunk-NP362THY.cjs.map +1 -0
- package/dist/{chunk-NWS2CS3Y.cjs → chunk-NWWTYBD3.cjs} +5 -5
- package/dist/{chunk-NWS2CS3Y.cjs.map → chunk-NWWTYBD3.cjs.map} +1 -1
- package/dist/{chunk-SVQIW5RJ.js → chunk-OLJOI4LK.js} +4 -4
- package/dist/{chunk-SVQIW5RJ.js.map → chunk-OLJOI4LK.js.map} +1 -1
- package/dist/{chunk-7JAKO3NM.js → chunk-ORLTGPOS.js} +3 -3
- package/dist/{chunk-7JAKO3NM.js.map → chunk-ORLTGPOS.js.map} +1 -1
- package/dist/{chunk-5DD4NJN3.js → chunk-PKRPV3R7.js} +3 -3
- package/dist/{chunk-5DD4NJN3.js.map → chunk-PKRPV3R7.js.map} +1 -1
- package/dist/{chunk-R5YPDAKD.cjs → chunk-POBZXULR.cjs} +4 -4
- package/dist/{chunk-R5YPDAKD.cjs.map → chunk-POBZXULR.cjs.map} +1 -1
- package/dist/{chunk-35KBC4BX.cjs → chunk-Q6WT5535.cjs} +446 -387
- package/dist/chunk-Q6WT5535.cjs.map +1 -0
- package/dist/{chunk-MQGSOKR3.js → chunk-Q7UG242V.js} +3 -3
- package/dist/{chunk-MQGSOKR3.js.map → chunk-Q7UG242V.js.map} +1 -1
- package/dist/{chunk-XKZFIP7Z.cjs → chunk-QG4SXZ2A.cjs} +4 -4
- package/dist/{chunk-XKZFIP7Z.cjs.map → chunk-QG4SXZ2A.cjs.map} +1 -1
- package/dist/{chunk-NAGPKWOD.cjs → chunk-QISSETTG.cjs} +4 -4
- package/dist/{chunk-NAGPKWOD.cjs.map → chunk-QISSETTG.cjs.map} +1 -1
- package/dist/{chunk-OR6XIWLB.js → chunk-QK2ERTO3.js} +4 -4
- package/dist/{chunk-OR6XIWLB.js.map → chunk-QK2ERTO3.js.map} +1 -1
- package/dist/{chunk-ZDYDBXSD.js → chunk-RN3XDZGS.js} +6 -6
- package/dist/{chunk-ZDYDBXSD.js.map → chunk-RN3XDZGS.js.map} +1 -1
- package/dist/{chunk-6LHQPOMI.cjs → chunk-RNXXYF22.cjs} +66 -7
- package/dist/chunk-RNXXYF22.cjs.map +1 -0
- package/dist/{chunk-TMKTSYDS.cjs → chunk-RS7YQR4X.cjs} +6 -6
- package/dist/{chunk-TMKTSYDS.cjs.map → chunk-RS7YQR4X.cjs.map} +1 -1
- package/dist/{chunk-HU666T3Q.cjs → chunk-S46WJTDL.cjs} +14 -14
- package/dist/{chunk-HU666T3Q.cjs.map → chunk-S46WJTDL.cjs.map} +1 -1
- package/dist/{chunk-ZD66GFH5.cjs → chunk-SDZ4XDWS.cjs} +35 -35
- package/dist/{chunk-ZD66GFH5.cjs.map → chunk-SDZ4XDWS.cjs.map} +1 -1
- package/dist/{chunk-ZJZ7LV3A.js → chunk-SV63WTA2.js} +3 -3
- package/dist/{chunk-ZJZ7LV3A.js.map → chunk-SV63WTA2.js.map} +1 -1
- package/dist/{chunk-CQYBJOB2.cjs → chunk-SXH37C7X.cjs} +4 -4
- package/dist/{chunk-CQYBJOB2.cjs.map → chunk-SXH37C7X.cjs.map} +1 -1
- package/dist/{chunk-GMRFAX4I.js → chunk-SZQFCHU6.js} +4 -4
- package/dist/{chunk-GMRFAX4I.js.map → chunk-SZQFCHU6.js.map} +1 -1
- package/dist/{chunk-6PB5AQCY.cjs → chunk-TLVI2OQK.cjs} +16 -16
- package/dist/{chunk-6PB5AQCY.cjs.map → chunk-TLVI2OQK.cjs.map} +1 -1
- package/dist/{chunk-B5MHRQJZ.js → chunk-TNFOU6SB.js} +3 -3
- package/dist/chunk-TNFOU6SB.js.map +1 -0
- package/dist/{chunk-N6OEX5TN.cjs → chunk-UDAKAE4Z.cjs} +16 -16
- package/dist/{chunk-N6OEX5TN.cjs.map → chunk-UDAKAE4Z.cjs.map} +1 -1
- package/dist/{chunk-26NEAJ6T.js → chunk-VVGFZQZC.js} +4 -4
- package/dist/{chunk-26NEAJ6T.js.map → chunk-VVGFZQZC.js.map} +1 -1
- package/dist/{chunk-XCQ432OX.js → chunk-VZGE7NAI.js} +3 -3
- package/dist/{chunk-XCQ432OX.js.map → chunk-VZGE7NAI.js.map} +1 -1
- package/dist/{chunk-C7GKRGKN.cjs → chunk-WDVG5R2Q.cjs} +19 -19
- package/dist/{chunk-C7GKRGKN.cjs.map → chunk-WDVG5R2Q.cjs.map} +1 -1
- package/dist/{chunk-FTZTZBCU.js → chunk-XESYJ4JC.js} +4 -4
- package/dist/{chunk-FTZTZBCU.js.map → chunk-XESYJ4JC.js.map} +1 -1
- package/dist/{chunk-OPAKPEPG.js → chunk-XJ3WU5CZ.js} +5 -5
- package/dist/{chunk-OPAKPEPG.js.map → chunk-XJ3WU5CZ.js.map} +1 -1
- package/dist/{chunk-BBJ77S62.js → chunk-XJ4C4NFX.js} +64 -20
- package/dist/chunk-XJ4C4NFX.js.map +1 -0
- package/dist/{chunk-AY43232P.js → chunk-XRPMZ7TO.js} +4 -4
- package/dist/{chunk-AY43232P.js.map → chunk-XRPMZ7TO.js.map} +1 -1
- package/dist/{chunk-X6DUEDAF.js → chunk-XZKIAENA.js} +3 -3
- package/dist/{chunk-X6DUEDAF.js.map → chunk-XZKIAENA.js.map} +1 -1
- package/dist/{chunk-X7EUUHXU.js → chunk-YMVTUV5K.js} +3 -3
- package/dist/{chunk-X7EUUHXU.js.map → chunk-YMVTUV5K.js.map} +1 -1
- package/dist/{chunk-3JANYJYS.cjs → chunk-YOVZMN4P.cjs} +8 -8
- package/dist/{chunk-3JANYJYS.cjs.map → chunk-YOVZMN4P.cjs.map} +1 -1
- package/dist/{chunk-TY56BKSK.cjs → chunk-YQ3XC6C2.cjs} +4 -4
- package/dist/{chunk-TY56BKSK.cjs.map → chunk-YQ3XC6C2.cjs.map} +1 -1
- package/dist/{chunk-JLIRFWUG.js → chunk-ZJAYFSVI.js} +22 -9
- package/dist/chunk-ZJAYFSVI.js.map +1 -0
- package/dist/{chunk-MU7IAA7G.js → chunk-ZLFFDPXC.js} +9 -9
- package/dist/{chunk-MU7IAA7G.js.map → chunk-ZLFFDPXC.js.map} +1 -1
- package/dist/{chunk-JLRLCBJ4.cjs → chunk-ZOFRNNZD.cjs} +4 -4
- package/dist/{chunk-JLRLCBJ4.cjs.map → chunk-ZOFRNNZD.cjs.map} +1 -1
- package/dist/{chunk-MPQJE3G4.cjs → chunk-ZWLFHSON.cjs} +15 -15
- package/dist/{chunk-MPQJE3G4.cjs.map → chunk-ZWLFHSON.cjs.map} +1 -1
- package/dist/compact-session-3U2JYTVG.js +25 -0
- package/dist/{compact-session-4HAUP3HK.js.map → compact-session-3U2JYTVG.js.map} +1 -1
- package/dist/{compact-session-Y56D3S57.cjs → compact-session-NM56BREJ.cjs} +24 -24
- package/dist/{compact-session-Y56D3S57.cjs.map → compact-session-NM56BREJ.cjs.map} +1 -1
- package/dist/compaction.cjs +18 -18
- package/dist/compaction.js +3 -3
- package/dist/concurrency.cjs +6 -6
- package/dist/concurrency.js +4 -4
- package/dist/context/index.cjs +9 -9
- package/dist/context/index.js +6 -6
- package/dist/context-4RSI3AXT.cjs +24 -0
- package/dist/{context-B5J4GX2F.cjs.map → context-4RSI3AXT.cjs.map} +1 -1
- package/dist/context-7EBZST3L.js +7 -0
- package/dist/{context-3FZRAO5K.js.map → context-7EBZST3L.js.map} +1 -1
- package/dist/{cron-Blj6wMYg.d.cts → cron-BWDYetbq.d.cts} +2 -2
- package/dist/{cron-BPccQCO8.d.ts → cron-CHn-F0fC.d.ts} +2 -2
- package/dist/cron.cjs +42 -42
- package/dist/cron.d.cts +4 -4
- package/dist/cron.d.ts +4 -4
- package/dist/cron.js +41 -41
- package/dist/{errors-BWOJeWTZ.d.cts → errors-BiDQFWTG.d.cts} +10 -7
- package/dist/{errors-DDvG18IB.d.ts → errors-Pf22PJJ-.d.ts} +10 -7
- package/dist/errors.cjs +23 -23
- package/dist/errors.d.cts +2 -3
- package/dist/errors.d.ts +2 -3
- package/dist/errors.js +2 -2
- package/dist/eval.cjs +54 -54
- package/dist/eval.js +42 -42
- package/dist/{executor-3NI7KNL4.js → executor-3D2UDJHW.js} +8 -8
- package/dist/{executor-3NI7KNL4.js.map → executor-3D2UDJHW.js.map} +1 -1
- package/dist/{executor-2SUGI3ZT.cjs → executor-HKHT4CWS.cjs} +26 -26
- package/dist/{executor-2SUGI3ZT.cjs.map → executor-HKHT4CWS.cjs.map} +1 -1
- package/dist/filesystem/index.cjs +12 -12
- package/dist/filesystem/index.js +3 -3
- package/dist/fs-session-store-6ZCCJX3K.js +11 -0
- package/dist/{fs-session-store-3VI4CPTX.js.map → fs-session-store-6ZCCJX3K.js.map} +1 -1
- package/dist/fs-session-store-S2AXVJIX.cjs +20 -0
- package/dist/{fs-session-store-IQ6PEHYF.cjs.map → fs-session-store-S2AXVJIX.cjs.map} +1 -1
- package/dist/generate-object-S7MNVF2V.js +7 -0
- package/dist/{generate-object-NTKAWE7D.js.map → generate-object-S7MNVF2V.js.map} +1 -1
- package/dist/generate-object-XBWD2PU7.cjs +20 -0
- package/dist/{generate-object-YHTWG5DB.cjs.map → generate-object-XBWD2PU7.cjs.map} +1 -1
- package/dist/index-manager-HO456AVW.cjs +27 -0
- package/dist/{index-manager-YGXRFJMZ.cjs.map → index-manager-HO456AVW.cjs.map} +1 -1
- package/dist/index-manager-QDH56FER.js +18 -0
- package/dist/{index-manager-JVYIVTZG.js.map → index-manager-QDH56FER.js.map} +1 -1
- package/dist/index.cjs +172 -172
- package/dist/index.d.cts +9 -9
- package/dist/index.d.ts +9 -9
- package/dist/index.js +59 -59
- package/dist/{inject-session-R73PRM7B.cjs → inject-session-JVTZNQF6.cjs} +9 -9
- package/dist/{inject-session-R73PRM7B.cjs.map → inject-session-JVTZNQF6.cjs.map} +1 -1
- package/dist/{inject-session-LJX5JGV5.js → inject-session-THABTKJY.js} +7 -7
- package/dist/{inject-session-LJX5JGV5.js.map → inject-session-THABTKJY.js.map} +1 -1
- package/dist/interactive/index.cjs +4 -4
- package/dist/interactive/index.js +2 -2
- package/dist/internal/budget/normalize-usage.d.ts +5 -1
- package/dist/internal/error-mappers/openai-compatible.d.ts +3 -1
- package/dist/internal/memory/adapters/index.cjs +8 -8
- package/dist/internal/memory/adapters/index.js +7 -7
- package/dist/internal/memory/storage/index.cjs +42 -42
- package/dist/internal/memory/storage/index.js +10 -10
- package/dist/internal/persistence/index.cjs +25 -25
- package/dist/internal/persistence/index.js +8 -8
- package/dist/internal/providers/catalog-schema.d.ts +1 -1
- package/dist/internal/runtime/lifecycle/throw-on-error-run.d.ts +18 -0
- package/dist/internal/runtime/model-selection.d.ts +1 -1
- package/dist/internal/runtime/system-prompt/native-reasoning.d.ts +2 -2
- package/dist/internal/runtime/typed-run-error.d.ts +16 -0
- package/dist/internal/security/index.cjs +13 -13
- package/dist/internal/security/index.js +3 -3
- package/dist/judge-call-4LR4IFVT.js +5 -0
- package/dist/{judge-call-LOL5FQEX.js.map → judge-call-4LR4IFVT.js.map} +1 -1
- package/dist/judge-call-ZTUQMQRL.cjs +22 -0
- package/dist/{judge-call-AQQYK6VT.cjs.map → judge-call-ZTUQMQRL.cjs.map} +1 -1
- package/dist/mcp-auth.cjs +14 -14
- package/dist/mcp-auth.js +4 -4
- package/dist/models.cjs +22 -22
- package/dist/models.js +8 -8
- package/dist/oauth-transaction-store-OMX436YB.cjs +38 -0
- package/dist/{oauth-transaction-store-ZINDV7AF.cjs.map → oauth-transaction-store-OMX436YB.cjs.map} +1 -1
- package/dist/oauth-transaction-store-U34YLEGP.js +5 -0
- package/dist/{oauth-transaction-store-NP2YHZ6D.js.map → oauth-transaction-store-U34YLEGP.js.map} +1 -1
- package/dist/path-safety.cjs +10 -10
- package/dist/path-safety.js +3 -3
- package/dist/persistence.cjs +31 -31
- package/dist/persistence.js +10 -10
- package/dist/project.cjs +5 -5
- package/dist/project.js +3 -3
- package/dist/providers.cjs +9 -9
- package/dist/providers.js +7 -7
- package/dist/registry-5TDAF7RK.js +9 -0
- package/dist/{registry-5FK42CRV.js.map → registry-5TDAF7RK.js.map} +1 -1
- package/dist/registry-W7TSCLQO.cjs +46 -0
- package/dist/{registry-BVTNO73E.cjs.map → registry-W7TSCLQO.cjs.map} +1 -1
- package/dist/retry.cjs +4 -4
- package/dist/retry.js +3 -3
- package/dist/{run-until-DG2KXWB2.cjs → run-until-4KHVF7YC.cjs} +8 -4
- package/dist/run-until-4KHVF7YC.cjs.map +1 -0
- package/dist/{run-until-6D6TQ4JN.js → run-until-G6BW2DWM.js} +8 -4
- package/dist/run-until-G6BW2DWM.js.map +1 -0
- package/dist/sandbox/index.cjs +22 -22
- package/dist/sandbox/index.js +4 -4
- package/dist/{run-DsA5Ip2i.d.cts → sdk-agent-4-dXI2GS.d.cts} +1500 -753
- package/dist/{run-DsA5Ip2i.d.ts → sdk-agent-CTOJlWA_.d.ts} +1500 -753
- package/dist/server/auth/index.cjs +22 -22
- package/dist/server/auth/index.js +7 -7
- package/dist/server/errors-envelope.cjs +14 -14
- package/dist/server/errors-envelope.d.cts +2 -3
- package/dist/server/errors-envelope.d.ts +2 -3
- package/dist/server/errors-envelope.js +3 -3
- package/dist/session-transcript-7TZ6HXSX.cjs +62 -0
- package/dist/{session-transcript-RACG7BK2.cjs.map → session-transcript-7TZ6HXSX.cjs.map} +1 -1
- package/dist/session-transcript-BSHZYYY6.js +5 -0
- package/dist/{session-transcript-AR7IBICT.js.map → session-transcript-BSHZYYY6.js.map} +1 -1
- package/dist/skills.cjs +8 -8
- package/dist/skills.js +5 -5
- package/dist/stream-object-R6SMYV4R.js +7 -0
- package/dist/{stream-object-QAEHG4YO.js.map → stream-object-R6SMYV4R.js.map} +1 -1
- package/dist/stream-object-TEEK3CAX.cjs +20 -0
- package/dist/{stream-object-TKVGGA54.cjs.map → stream-object-TEEK3CAX.cjs.map} +1 -1
- package/dist/subagents-loader-TXOA5EJJ.cjs +16 -0
- package/dist/{subagents-loader-5TZCAIYQ.cjs.map → subagents-loader-TXOA5EJJ.cjs.map} +1 -1
- package/dist/subagents-loader-Z744TAKD.js +7 -0
- package/dist/{subagents-loader-PEV3PD4Q.js.map → subagents-loader-Z744TAKD.js.map} +1 -1
- package/dist/subagents-loader.cjs +7 -7
- package/dist/subagents-loader.d.cts +4 -3
- package/dist/subagents-loader.d.ts +4 -3
- package/dist/subagents-loader.js +5 -5
- package/dist/subscription/index.cjs +3 -3
- package/dist/subscription/index.js +2 -2
- package/dist/task-store.cjs +7 -7
- package/dist/task-store.js +4 -4
- package/dist/types/agent-prims.d.ts +16 -0
- package/dist/types/agent.d.ts +15 -6
- package/dist/types/run.d.ts +14 -14
- package/dist/workflow.cjs +27 -27
- package/dist/workflow.d.cts +2 -2
- package/dist/workflow.d.ts +2 -2
- package/dist/workflow.js +6 -6
- package/docs/error-codes.md +24 -23
- package/docs/harness-capability-map.md +4 -4
- package/package.json +1 -1
- package/dist/agent-DFV52V6E.js +0 -62
- package/dist/agent-OKP4LHG2.cjs +0 -71
- package/dist/agent-session-store-ODD3IZCW.js +0 -6
- package/dist/agent-session-store-SVEJHSUA.cjs +0 -23
- package/dist/chunk-35KBC4BX.cjs.map +0 -1
- package/dist/chunk-6LHQPOMI.cjs.map +0 -1
- package/dist/chunk-B5MHRQJZ.js.map +0 -1
- package/dist/chunk-BBJ77S62.js.map +0 -1
- package/dist/chunk-CZJ6Q7CW.js.map +0 -1
- package/dist/chunk-JLIRFWUG.js.map +0 -1
- package/dist/chunk-MHIBYKWA.js.map +0 -1
- package/dist/chunk-N7KS3TIR.cjs.map +0 -1
- package/dist/chunk-P5N3Q2NH.cjs.map +0 -1
- package/dist/chunk-SGC7LSHF.cjs +0 -18
- package/dist/chunk-UNFBHV46.cjs.map +0 -1
- package/dist/compact-session-4HAUP3HK.js +0 -25
- package/dist/context-3FZRAO5K.js +0 -7
- package/dist/context-B5J4GX2F.cjs +0 -24
- package/dist/fs-session-store-3VI4CPTX.js +0 -11
- package/dist/fs-session-store-IQ6PEHYF.cjs +0 -20
- package/dist/generate-object-NTKAWE7D.js +0 -7
- package/dist/generate-object-YHTWG5DB.cjs +0 -20
- package/dist/index-manager-JVYIVTZG.js +0 -18
- package/dist/index-manager-YGXRFJMZ.cjs +0 -27
- package/dist/judge-call-AQQYK6VT.cjs +0 -22
- package/dist/judge-call-LOL5FQEX.js +0 -5
- package/dist/oauth-transaction-store-NP2YHZ6D.js +0 -5
- package/dist/oauth-transaction-store-ZINDV7AF.cjs +0 -38
- package/dist/registry-5FK42CRV.js +0 -9
- package/dist/registry-BVTNO73E.cjs +0 -46
- package/dist/run-until-6D6TQ4JN.js.map +0 -1
- package/dist/run-until-DG2KXWB2.cjs.map +0 -1
- package/dist/sdk-agent-dNwjwCt5.d.cts +0 -940
- package/dist/sdk-agent-wEOLXD3F.d.ts +0 -940
- package/dist/session-transcript-AR7IBICT.js +0 -5
- package/dist/session-transcript-RACG7BK2.cjs +0 -62
- package/dist/stream-object-QAEHG4YO.js +0 -7
- package/dist/stream-object-TKVGGA54.cjs +0 -20
- package/dist/subagents-loader-5TZCAIYQ.cjs +0 -16
- package/dist/subagents-loader-PEV3PD4Q.js +0 -7
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,92 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 5.12.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [#763](https://github.com/usetheokit/theokit-sdk/pull/763) [`473616d`](https://github.com/usetheokit/theokit-sdk/commit/473616d2585f11c9c2878a47e17665111279388a) Thanks [@usetheodev](https://github.com/usetheodev)! - `@theokit/acp` and `@theokit/sdk-handoff` keep answering in their protocol when the consumer's agent was created with `throwOnError: true`. When a failed run's `run.wait()` rejects, the ACP handler picks the stop reason from the rejected error's own canonical code (`metadata.code`, else `code`), and the handoff dispatcher replies with `(Handoff target <id> returned status=error: <message>)` using the error's message. This is close to what a resolved error run produces, but not identical: when the run's detail code came from another writer (`agent_loop_failed`, for instance), the error's own code and message are used instead. Any rejection from a run whose status is not `"error"`, such as an abort or an output-processor failure on a finished run, propagates unchanged.
|
|
8
|
+
|
|
9
|
+
`@theokit/sdk`: a failed run's `result.error.cause` is now always a `TheokitAgentError`, and `RunErrorDetail.cause` is typed that way. A failure with no SDK error behind it (a budget denial, the iteration limit, a hook, a cloud run failure, a non-SDK exception) carries an `UnknownAgentError` with the run's message and code, holding the original value at its own `cause`. `result.error.message` and `result.error.code` are unchanged.
|
|
10
|
+
|
|
11
|
+
`AgentOptions.throwOnError` now reaches the run itself, as its doc comment promised. `run.wait()` rejects with `result.error.cause`, and so do `agent.generate`, `agent.fork` and `agent.runToCompletion`. `agent.runUntil` and `agent.streamToCompletion` throw it from their iterator, and `Agent.batch` returns it as the failed item's `error`. A workflow `agentStep`, a cron task and an `Eval` row keep recording the failure, now with the typed error's class name, code or message. `Agent.prompt` still rejects with `AgentRunError`, whose `cause` is the typed error. Cancelled and finished runs still resolve, the `postRun` hook still fires on a failed run, and a run nobody awaits raises no unhandled rejection.
|
|
12
|
+
|
|
13
|
+
### Patch Changes
|
|
14
|
+
|
|
15
|
+
- [#751](https://github.com/usetheokit/theokit-sdk/pull/751) [`eb80ccd`](https://github.com/usetheokit/theokit-sdk/commit/eb80ccda362b0783e21b3ac24ccab4aa262985b5) Thanks [@usetheodev](https://github.com/usetheodev)! - A `BudgetTracker` whose `track()` throws no longer loses the turn's other event, and the failure is
|
|
16
|
+
reported. The agent loop used to call `track()` for the input and the output events inside one `try`
|
|
17
|
+
with an empty `catch`. An input event that threw skipped the output event, and nothing said so, so a
|
|
18
|
+
`maxTokens` or USD ceiling counted less than the run spent. Each event now gets its own call, and a
|
|
19
|
+
throw is reported through the diagnostics sink, or on stderr when no sink is installed. The message
|
|
20
|
+
names the event type, the model id, the token count and the error. The turn still finishes.
|
|
21
|
+
|
|
22
|
+
- [#751](https://github.com/usetheokit/theokit-sdk/pull/751) [`3547789`](https://github.com/usetheokit/theokit-sdk/commit/35477896d43d8e61f75f0a797556af8bba6bde88) Thanks [@usetheodev](https://github.com/usetheodev)! - A chat-completions stream whose usage carries a negative, non-finite or non-numeric `prompt_tokens`, `cached_tokens` or cache-write count no longer reports that count as 0. The field is left out of the turn's usage and the SDK writes `provider reported an unusable inputTokens (…)` (or `cacheReadTokens`, `cacheWriteTokens`) to the diagnostics sink, as it already did for every other malformed count, so a proxy sending a broken usage object is no longer billed and budgeted as a turn with no input. `normalizeUsage` still reads such a count as 0. (B-412)
|
|
23
|
+
|
|
24
|
+
- [#764](https://github.com/usetheokit/theokit-sdk/pull/764) [`cc5c001`](https://github.com/usetheokit/theokit-sdk/commit/cc5c0011555b56857c1f75f521d2883b470ce0af) Thanks [@usetheodev](https://github.com/usetheodev)! - A `thinking` entry in `model.params` with an empty value is now refused instead of silently
|
|
25
|
+
turning reasoning off. `Agent.create` and a `send` model override throw a `ConfigurationError` with
|
|
26
|
+
code `invalid_model_param` before any request when the `thinking` value is empty, whitespace only,
|
|
27
|
+
missing or not a string, and the message names the param. It used to be accepted, and the chat
|
|
28
|
+
request went out with neither `reasoning_effort` nor `reasoning`, so a UI filling the value from an
|
|
29
|
+
unset setting lost reasoning with no signal. To request no reasoning, leave the `thinking` param
|
|
30
|
+
out. A non-empty value such as `"high"` is forwarded as before.
|
|
31
|
+
|
|
32
|
+
- [#765](https://github.com/usetheokit/theokit-sdk/pull/765) [`6bb4105`](https://github.com/usetheokit/theokit-sdk/commit/6bb410578b631d8db9fb1caf68fab8952f588091) Thanks [@usetheodev](https://github.com/usetheodev)! - A provider error's `metadata.raw` no longer carries the start of a credential that sat across the
|
|
33
|
+
2048-character cut. The body used to be cut first and redacted after, so a key cut short of the
|
|
34
|
+
length its pattern needs matched nothing: 12 characters of an `sk-` key, or the key lines of a PEM
|
|
35
|
+
block before the cut, reached `metadata.raw` in clear. The whole body is now redacted and the
|
|
36
|
+
redacted text is cut. Two visible differences follow. A body that redaction shrinks to 2048
|
|
37
|
+
characters or fewer comes back whole, with no `…`. And when the text is still longer, the cut can
|
|
38
|
+
fall inside a mask such as `sk-V2w...y5Z6`, which leaves part of the mask and never more of the key
|
|
39
|
+
than the mask itself shows. Redaction reads the whole body, however long, because any bound on
|
|
40
|
+
what it reads would leave a credential cut by that bound in clear. A pattern registered with
|
|
41
|
+
`Security.addPattern` now sees the whole error body, not the first 2048 characters, so it should
|
|
42
|
+
stay linear in its input. The cut also no longer splits a surrogate pair, such as an emoji, at the
|
|
43
|
+
2048th character.
|
|
44
|
+
|
|
45
|
+
- [#752](https://github.com/usetheokit/theokit-sdk/pull/752) [`cd6dc55`](https://github.com/usetheokit/theokit-sdk/commit/cd6dc555272002965e620267472a09d12d6d49f0) Thanks [@usetheodev](https://github.com/usetheodev)! - An OpenAI-compatible provider's HTTP 400 now ends the run with a `ConfigurationError` whose message says what the provider rejected. OpenRouter answers a model id it does not know with `nosuchvendor/nosuch-model-xyz is not a valid model ID`, and until now the message was only `openrouter API error: invalid_request (HTTP 400)`, so neither the error nor `result.error.message` named the model or the parameter. The 400 message now ends with the provider's `error.message`, for example `openrouter API error: invalid_request (HTTP 400): Expected max_tokens to be at least 1`. The class, the error `code` and `isRetryable` do not change.
|
|
46
|
+
|
|
47
|
+
The provider's text goes through the same secret redaction as `metadata.raw` and is cut at 512 characters, ending with `…` when it is longer. The missing-model 404 message, which already carried the provider's text, gets the same redaction and cap. Every other status (401, 403, 408, 429, 5xx and the rest) keeps its message as it was. Code that compared a 400 message by equality will now see a longer string.
|
|
48
|
+
|
|
49
|
+
- [#753](https://github.com/usetheokit/theokit-sdk/pull/753) [`38ad578`](https://github.com/usetheokit/theokit-sdk/commit/38ad578a4025c66c6b250810164a27c10563ba4b) Thanks [@usetheodev](https://github.com/usetheodev)! - `Security.redact` (and `redactSecrets` on the `@theokit/sdk/internal/security` subpath) no longer
|
|
50
|
+
blocks the event loop on a long run of `eyJ` it cannot complete as a JWT. The JWT pattern was a regex
|
|
51
|
+
that retried from every `eyJ` of such a run, so its time grew with the square of the run: 224000
|
|
52
|
+
characters of `eyJa` took over two minutes, and a string half filled by that run 20 to 40 seconds.
|
|
53
|
+
Callers that redact unbounded text, such as the session transcript, span attributes or a provider
|
|
54
|
+
error body, stalled for that long. JWTs are now found by a scan that reads each run of characters at
|
|
55
|
+
most three times, and the same inputs return in under 100 ms. What gets masked, and how, is
|
|
56
|
+
unchanged.
|
|
57
|
+
|
|
58
|
+
- [#754](https://github.com/usetheokit/theokit-sdk/pull/754) [`c46f6a4`](https://github.com/usetheokit/theokit-sdk/commit/c46f6a40e700d154ea10dc7c820ee7a33f2c3fb4) Thanks [@usetheodev](https://github.com/usetheodev)! - `redactSecrets` no longer stalls on text that holds many PEM `BEGIN ... PRIVATE KEY` headers with no matching `END` header. Such input used to take seconds for a few hundred KB, because the PEM pattern searched to the end of the string once per header; PEM blocks are now found in one linear pass, so the same input takes milliseconds. What gets masked is unchanged.
|
|
59
|
+
|
|
60
|
+
- [#751](https://github.com/usetheokit/theokit-sdk/pull/751) [`eb80ccd`](https://github.com/usetheokit/theokit-sdk/commit/eb80ccda362b0783e21b3ac24ccab4aa262985b5) Thanks [@usetheodev](https://github.com/usetheodev)! - On the OpenAI Responses API, `usage.inputTokens` is now the uncached part of the prompt, as it
|
|
61
|
+
already was on the Anthropic and Chat Completions clients. The client used to pass `input_tokens`
|
|
62
|
+
through as it came, and that total already includes the cache read and cache write buckets. A turn
|
|
63
|
+
that hit the prompt cache therefore counted its cached tokens twice: once in `inputTokens` and once
|
|
64
|
+
in `cacheReadTokens` / `cacheWriteTokens`.
|
|
65
|
+
|
|
66
|
+
Things a caller can observe on a cached turn through a provider whose `apiMode` is
|
|
67
|
+
`"responses_api"`, the built-in `openai-chatgpt` (Codex) provider among them:
|
|
68
|
+
|
|
69
|
+
- `RunResult.usage.inputTokens`, the `inputTokens` attribute of the `llm.call` span and the
|
|
70
|
+
`theokit_llm_tokens` histogram are lower by the cached tokens.
|
|
71
|
+
- The run's computed cost no longer bills the cached tokens a second time at the full input
|
|
72
|
+
price.
|
|
73
|
+
- A `BudgetTracker` input event carries the prompt once, so a `maxTokens` ceiling no longer trips
|
|
74
|
+
early. A USD tracker still prices the cached tokens of that event at the input rate, so it trips
|
|
75
|
+
less early than before but still early. For a prompt of 11 tokens with 3 read from the cache and
|
|
76
|
+
5 written to it, the event reports 11, where it reported 19 before.
|
|
77
|
+
|
|
78
|
+
- [#767](https://github.com/usetheokit/theokit-sdk/pull/767) [`5696d56`](https://github.com/usetheokit/theokit-sdk/commit/5696d567fe34229a70ebf9f1c6df82e1dc289ae1) Thanks [@usetheodev](https://github.com/usetheodev)! - The unknown-provider error lists the registered provider names in locale order instead of UTF-16 code
|
|
79
|
+
unit order, so a mixed-case name such as `alpha` is no longer listed after `Zeta`. Builtin names are
|
|
80
|
+
lowercase ASCII, so their order does not change.
|
|
81
|
+
|
|
82
|
+
- [#764](https://github.com/usetheokit/theokit-sdk/pull/764) [`ce11001`](https://github.com/usetheokit/theokit-sdk/commit/ce110011cbff61ac4381ae4b040af295debc9989) Thanks [@usetheodev](https://github.com/usetheodev)! - A `model.params` entry with id `reasoning` or `reasoning_effort` no longer switches off
|
|
83
|
+
`reasoning: true`. Only `thinking` is sent to the provider as a reasoning effort, so these two ids
|
|
84
|
+
used to count as native reasoning without being forwarded: the run got neither the provider effort
|
|
85
|
+
nor the reasoning preamble and `think` tool, and no error. `reasoning: true` now applies to such a
|
|
86
|
+
model. To request native reasoning, use `{ id: "thinking", value: "high" }`.
|
|
87
|
+
|
|
88
|
+
- [#760](https://github.com/usetheokit/theokit-sdk/pull/760) [`67390b6`](https://github.com/usetheokit/theokit-sdk/commit/67390b65bc3af25082dabc02d8d53a9f5c286349) Thanks [@usetheodev](https://github.com/usetheodev)! - When a route's provider names no registered profile and no fallback provider resolves, the run now fails with a message that says so. With `providers.routes: [{ capability: "chat", provider: "no-such-provider" }]`, the run used to end with a `ConfigurationError` telling you to set `ANTHROPIC_API_KEY` or `OPENAI_API_KEY` / `OPENROUTER_API_KEY`, even when a key was set. The message now reads `No provider client could be resolved: "no-such-provider" is not a known provider. Registered providers: …`, with the registered names sorted. A provider that a plugin registered is listed too. A provider registered with uppercase letters (for example `AcmeAI`) cannot be routed to, because routes look provider names up in lowercase; the message now says that and names the lowercase spelling to register, instead of calling the name unknown while listing it. An alias registered with uppercase letters gets the same message, naming the provider it belongs to. The class (`ConfigurationError`), the code (`provider_unresolved`) and the opening phrase `No provider client could be resolved` are unchanged, and a registered provider with no key still gets the credentials message, word for word. An unregistered provider next to a fallback that resolves still runs on the fallback, as before.
|
|
89
|
+
|
|
3
90
|
## 5.11.1
|
|
4
91
|
|
|
5
92
|
### Patch Changes
|
package/dist/a2a/index.cjs
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkH7HD6RXO_cjs = require('../chunk-H7HD6RXO.cjs');
|
|
4
4
|
require('../chunk-NINIJCHU.cjs');
|
|
5
|
-
var
|
|
6
|
-
var
|
|
5
|
+
var chunkCEGU5AVD_cjs = require('../chunk-CEGU5AVD.cjs');
|
|
6
|
+
var chunkRNXXYF22_cjs = require('../chunk-RNXXYF22.cjs');
|
|
7
7
|
|
|
8
8
|
// src/a2a/agent-mailbox.ts
|
|
9
9
|
var AgentMailbox = class {
|
|
@@ -35,7 +35,7 @@ var AgentMailbox = class {
|
|
|
35
35
|
};
|
|
36
36
|
|
|
37
37
|
// src/a2a/message-bus.ts
|
|
38
|
-
var A2APeerNotRegisteredError = class extends
|
|
38
|
+
var A2APeerNotRegisteredError = class extends chunkCEGU5AVD_cjs.TheokitAgentError {
|
|
39
39
|
constructor(to) {
|
|
40
40
|
super(`Agent "${to}" not registered on MessageBus`, {
|
|
41
41
|
code: "a2a_peer_not_registered",
|
|
@@ -47,7 +47,7 @@ var A2APeerNotRegisteredError = class extends chunkUNFBHV46_cjs.TheokitAgentErro
|
|
|
47
47
|
name = "A2APeerNotRegisteredError";
|
|
48
48
|
code = "a2a_peer_not_registered";
|
|
49
49
|
};
|
|
50
|
-
var A2ARequestTimeoutError = class extends
|
|
50
|
+
var A2ARequestTimeoutError = class extends chunkCEGU5AVD_cjs.TheokitAgentError {
|
|
51
51
|
constructor(to, timeoutMs) {
|
|
52
52
|
super(`A2A request timeout: ${to} did not respond within ${timeoutMs}ms`, {
|
|
53
53
|
code: "a2a_request_timeout",
|
|
@@ -84,7 +84,7 @@ var MessageBus = class {
|
|
|
84
84
|
};
|
|
85
85
|
void Promise.resolve(handler(message)).catch((cause) => {
|
|
86
86
|
const reason = cause instanceof Error ? cause.message : String(cause);
|
|
87
|
-
|
|
87
|
+
chunkRNXXYF22_cjs.diag(`[theokit-sdk] a2a: handler for "${to}" failed on a fire-and-forget send: ${reason}
|
|
88
88
|
`);
|
|
89
89
|
});
|
|
90
90
|
}
|
|
@@ -124,11 +124,11 @@ var MessageBus = class {
|
|
|
124
124
|
|
|
125
125
|
Object.defineProperty(exports, "MaxDelegationDepthError", {
|
|
126
126
|
enumerable: true,
|
|
127
|
-
get: function () { return
|
|
127
|
+
get: function () { return chunkH7HD6RXO_cjs.MaxDelegationDepthError; }
|
|
128
128
|
});
|
|
129
129
|
Object.defineProperty(exports, "SubAgent", {
|
|
130
130
|
enumerable: true,
|
|
131
|
-
get: function () { return
|
|
131
|
+
get: function () { return chunkH7HD6RXO_cjs.SubAgent; }
|
|
132
132
|
});
|
|
133
133
|
exports.A2APeerNotRegisteredError = A2APeerNotRegisteredError;
|
|
134
134
|
exports.A2ARequestTimeoutError = A2ARequestTimeoutError;
|
package/dist/a2a/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
export { MaxDelegationDepthError, SubAgent } from '../chunk-
|
|
1
|
+
export { MaxDelegationDepthError, SubAgent } from '../chunk-VZGE7NAI.js';
|
|
2
2
|
import '../chunk-6X6ID4MO.js';
|
|
3
|
-
import { TheokitAgentError } from '../chunk-
|
|
4
|
-
import { diag } from '../chunk-
|
|
3
|
+
import { TheokitAgentError } from '../chunk-TNFOU6SB.js';
|
|
4
|
+
import { diag } from '../chunk-3OY6H3I7.js';
|
|
5
5
|
|
|
6
6
|
// src/a2a/agent-mailbox.ts
|
|
7
7
|
var AgentMailbox = class {
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var chunkQ6WT5535_cjs = require('./chunk-Q6WT5535.cjs');
|
|
4
|
+
require('./chunk-L7JPXZ2C.cjs');
|
|
5
|
+
require('./chunk-YOVZMN4P.cjs');
|
|
6
|
+
require('./chunk-BUUUWQMB.cjs');
|
|
7
|
+
require('./chunk-CWQPQTUZ.cjs');
|
|
8
|
+
require('./chunk-7YUPSBDV.cjs');
|
|
9
|
+
require('./chunk-BV2MWEMV.cjs');
|
|
10
|
+
require('./chunk-CGH4BCIY.cjs');
|
|
11
|
+
require('./chunk-GHX4P3V2.cjs');
|
|
12
|
+
require('./chunk-RS7YQR4X.cjs');
|
|
13
|
+
require('./chunk-SDZ4XDWS.cjs');
|
|
14
|
+
require('./chunk-6OCJWGVD.cjs');
|
|
15
|
+
require('./chunk-LSWHDOCL.cjs');
|
|
16
|
+
require('./chunk-SXH37C7X.cjs');
|
|
17
|
+
require('./chunk-YJNYDJ2T.cjs');
|
|
18
|
+
require('./chunk-NP362THY.cjs');
|
|
19
|
+
require('./chunk-QOGNZMHD.cjs');
|
|
20
|
+
require('./chunk-MSW7LB2V.cjs');
|
|
21
|
+
require('./chunk-2ZPEDVLM.cjs');
|
|
22
|
+
require('./chunk-QG4SXZ2A.cjs');
|
|
23
|
+
require('./chunk-UDAKAE4Z.cjs');
|
|
24
|
+
require('./chunk-KRD3GQAA.cjs');
|
|
25
|
+
require('./chunk-3HA7N2BB.cjs');
|
|
26
|
+
require('./chunk-MUUQ2WFJ.cjs');
|
|
27
|
+
require('./chunk-AA27GEYS.cjs');
|
|
28
|
+
require('./chunk-YSTXFWQE.cjs');
|
|
29
|
+
require('./chunk-FRITRLZQ.cjs');
|
|
30
|
+
require('./chunk-H7HD6RXO.cjs');
|
|
31
|
+
require('./chunk-NINIJCHU.cjs');
|
|
32
|
+
require('./chunk-7WARNHWW.cjs');
|
|
33
|
+
require('./chunk-SWALPLFQ.cjs');
|
|
34
|
+
require('./chunk-IJ7M6GOG.cjs');
|
|
35
|
+
require('./chunk-3KIUY67P.cjs');
|
|
36
|
+
require('./chunk-SA6K24NB.cjs');
|
|
37
|
+
require('./chunk-27V5I2WW.cjs');
|
|
38
|
+
require('./chunk-FLDMPVUC.cjs');
|
|
39
|
+
require('./chunk-EQ5IDL6W.cjs');
|
|
40
|
+
require('./chunk-3WKWBYPO.cjs');
|
|
41
|
+
require('./chunk-A4RAL2ER.cjs');
|
|
42
|
+
require('./chunk-AT2PESXB.cjs');
|
|
43
|
+
require('./chunk-POBZXULR.cjs');
|
|
44
|
+
require('./chunk-G7XBVM3T.cjs');
|
|
45
|
+
require('./chunk-ZF2LDKQQ.cjs');
|
|
46
|
+
require('./chunk-BWYC7RZG.cjs');
|
|
47
|
+
require('./chunk-ZOFRNNZD.cjs');
|
|
48
|
+
require('./chunk-WDVG5R2Q.cjs');
|
|
49
|
+
require('./chunk-YQ3XC6C2.cjs');
|
|
50
|
+
require('./chunk-6XQLTQB6.cjs');
|
|
51
|
+
require('./chunk-KX5QXLBS.cjs');
|
|
52
|
+
require('./chunk-NWWTYBD3.cjs');
|
|
53
|
+
require('./chunk-3EE6LVWT.cjs');
|
|
54
|
+
require('./chunk-LO6LIUZ6.cjs');
|
|
55
|
+
require('./chunk-S46WJTDL.cjs');
|
|
56
|
+
require('./chunk-NVXXWAU7.cjs');
|
|
57
|
+
require('./chunk-5A4UFBHW.cjs');
|
|
58
|
+
require('./chunk-QISSETTG.cjs');
|
|
59
|
+
require('./chunk-IOFMRS6T.cjs');
|
|
60
|
+
require('./chunk-EHD25JBZ.cjs');
|
|
61
|
+
require('./chunk-CEGU5AVD.cjs');
|
|
62
|
+
require('./chunk-RNXXYF22.cjs');
|
|
63
|
+
|
|
64
|
+
|
|
65
|
+
|
|
66
|
+
Object.defineProperty(exports, "Agent", {
|
|
67
|
+
enumerable: true,
|
|
68
|
+
get: function () { return chunkQ6WT5535_cjs.Agent; }
|
|
69
|
+
});
|
|
70
|
+
//# sourceMappingURL=agent-BVKIUP7F.cjs.map
|
|
71
|
+
//# sourceMappingURL=agent-BVKIUP7F.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":[],"names":[],"mappings":"","file":"agent-
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"agent-BVKIUP7F.cjs"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { M as ModelSelection, C as CustomTool,
|
|
1
|
+
import { W as MemoryFact, T as MemoryAdapter, V as MemoryContext, aU as SystemPromptSkillRef, M as McpServerConfig, C as ContextSettings, P as ProviderRoutingSettings, a as PluginsSettings, c as Processor, S as SDKAgent } from './sdk-agent-CTOJlWA_.js';
|
|
2
|
+
import { M as ModelSelection, C as CustomTool, P as PermissionMode } from './agent-prims-CZyxfCmS.js';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* Owner: `src/` (1 of 2 importers). Derived from the import graph, not
|
|
@@ -1559,11 +1559,20 @@ interface AgentOptions {
|
|
|
1559
1559
|
apiKey?: string;
|
|
1560
1560
|
name?: string;
|
|
1561
1561
|
/**
|
|
1562
|
-
* When `true`,
|
|
1563
|
-
*
|
|
1564
|
-
*
|
|
1565
|
-
*
|
|
1566
|
-
*
|
|
1562
|
+
* When `true`, a failed run is surfaced as an error instead of resolving with
|
|
1563
|
+
* `{ status: 'error' }`. The error is `result.error.cause`, the typed
|
|
1564
|
+
* {@link TheokitAgentError} behind the failure:
|
|
1565
|
+
*
|
|
1566
|
+
* - `run.wait()`, `agent.generate`, `agent.fork` and `agent.runToCompletion`
|
|
1567
|
+
* reject with it.
|
|
1568
|
+
* - `agent.runUntil` and `agent.streamToCompletion` throw it from their iterator.
|
|
1569
|
+
* - `Agent.batch` returns it as the failed item's `error`.
|
|
1570
|
+
* - A workflow `agentStep`, a cron task and an `Eval` row keep recording the
|
|
1571
|
+
* failure, with its class name, code or message.
|
|
1572
|
+
* - `Agent.prompt` alone wraps it in `AgentRunError`, whose `cause` is the typed error.
|
|
1573
|
+
*
|
|
1574
|
+
* Cancelled and finished runs still resolve. A run with `status: 'error'` but no
|
|
1575
|
+
* `result.error` (malformed RunResult) also resolves.
|
|
1567
1576
|
*
|
|
1568
1577
|
* Default `false` (backwards-compatible).
|
|
1569
1578
|
*
|
|
@@ -1678,7 +1687,7 @@ interface AgentOptions {
|
|
|
1678
1687
|
* auto-attached, turning a non-reasoning model into a reason -> act ->
|
|
1679
1688
|
* observe loop (same model; reuses the existing tool loop). Default `false` —
|
|
1680
1689
|
* byte-identical behaviour when unset. Inert (with a one-time warn) when a
|
|
1681
|
-
* native reasoning model is configured (`model.params: [{ id: "thinking" }]`),
|
|
1690
|
+
* native reasoning model is configured (`model.params: [{ id: "thinking", value: "high" }]`),
|
|
1682
1691
|
* so native and prompt-based reasoning never stack. See `ReasoningTools` in `@theokit/sdk-tools`.
|
|
1683
1692
|
*/
|
|
1684
1693
|
reasoning?: boolean;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { M as ModelSelection, C as CustomTool,
|
|
1
|
+
import { W as MemoryFact, T as MemoryAdapter, V as MemoryContext, aU as SystemPromptSkillRef, M as McpServerConfig, C as ContextSettings, P as ProviderRoutingSettings, a as PluginsSettings, c as Processor, S as SDKAgent } from './sdk-agent-4-dXI2GS.cjs';
|
|
2
|
+
import { M as ModelSelection, C as CustomTool, P as PermissionMode } from './agent-prims-CZyxfCmS.cjs';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* Owner: `src/` (1 of 2 importers). Derived from the import graph, not
|
|
@@ -1559,11 +1559,20 @@ interface AgentOptions {
|
|
|
1559
1559
|
apiKey?: string;
|
|
1560
1560
|
name?: string;
|
|
1561
1561
|
/**
|
|
1562
|
-
* When `true`,
|
|
1563
|
-
*
|
|
1564
|
-
*
|
|
1565
|
-
*
|
|
1566
|
-
*
|
|
1562
|
+
* When `true`, a failed run is surfaced as an error instead of resolving with
|
|
1563
|
+
* `{ status: 'error' }`. The error is `result.error.cause`, the typed
|
|
1564
|
+
* {@link TheokitAgentError} behind the failure:
|
|
1565
|
+
*
|
|
1566
|
+
* - `run.wait()`, `agent.generate`, `agent.fork` and `agent.runToCompletion`
|
|
1567
|
+
* reject with it.
|
|
1568
|
+
* - `agent.runUntil` and `agent.streamToCompletion` throw it from their iterator.
|
|
1569
|
+
* - `Agent.batch` returns it as the failed item's `error`.
|
|
1570
|
+
* - A workflow `agentStep`, a cron task and an `Eval` row keep recording the
|
|
1571
|
+
* failure, with its class name, code or message.
|
|
1572
|
+
* - `Agent.prompt` alone wraps it in `AgentRunError`, whose `cause` is the typed error.
|
|
1573
|
+
*
|
|
1574
|
+
* Cancelled and finished runs still resolve. A run with `status: 'error'` but no
|
|
1575
|
+
* `result.error` (malformed RunResult) also resolves.
|
|
1567
1576
|
*
|
|
1568
1577
|
* Default `false` (backwards-compatible).
|
|
1569
1578
|
*
|
|
@@ -1678,7 +1687,7 @@ interface AgentOptions {
|
|
|
1678
1687
|
* auto-attached, turning a non-reasoning model into a reason -> act ->
|
|
1679
1688
|
* observe loop (same model; reuses the existing tool loop). Default `false` —
|
|
1680
1689
|
* byte-identical behaviour when unset. Inert (with a one-time warn) when a
|
|
1681
|
-
* native reasoning model is configured (`model.params: [{ id: "thinking" }]`),
|
|
1690
|
+
* native reasoning model is configured (`model.params: [{ id: "thinking", value: "high" }]`),
|
|
1682
1691
|
* so native and prompt-based reasoning never stack. See `ReasoningTools` in `@theokit/sdk-tools`.
|
|
1683
1692
|
*/
|
|
1684
1693
|
reasoning?: boolean;
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
export { Agent } from './chunk-BJ7BPLQK.js';
|
|
2
|
+
import './chunk-HWMGR3HA.js';
|
|
3
|
+
import './chunk-4GUFNDZR.js';
|
|
4
|
+
import './chunk-K2BQQ445.js';
|
|
5
|
+
import './chunk-2C24NSNV.js';
|
|
6
|
+
import './chunk-HJ2LV464.js';
|
|
7
|
+
import './chunk-2SFBB54R.js';
|
|
8
|
+
import './chunk-H7G65PNI.js';
|
|
9
|
+
import './chunk-H73MEMQB.js';
|
|
10
|
+
import './chunk-QK2ERTO3.js';
|
|
11
|
+
import './chunk-DF77RBF4.js';
|
|
12
|
+
import './chunk-AB4OPJLD.js';
|
|
13
|
+
import './chunk-XJ4C4NFX.js';
|
|
14
|
+
import './chunk-5AR6O7GW.js';
|
|
15
|
+
import './chunk-2XC6KDJM.js';
|
|
16
|
+
import './chunk-ZJAYFSVI.js';
|
|
17
|
+
import './chunk-24MGQDK3.js';
|
|
18
|
+
import './chunk-AGO5S5WD.js';
|
|
19
|
+
import './chunk-HKCKOAIO.js';
|
|
20
|
+
import './chunk-KCM3RMKR.js';
|
|
21
|
+
import './chunk-XJ3WU5CZ.js';
|
|
22
|
+
import './chunk-KVNWIAO4.js';
|
|
23
|
+
import './chunk-OLJOI4LK.js';
|
|
24
|
+
import './chunk-FD2UT76F.js';
|
|
25
|
+
import './chunk-7I5Z3UBJ.js';
|
|
26
|
+
import './chunk-FJWQP6EE.js';
|
|
27
|
+
import './chunk-NAF4L3T6.js';
|
|
28
|
+
import './chunk-VZGE7NAI.js';
|
|
29
|
+
import './chunk-6X6ID4MO.js';
|
|
30
|
+
import './chunk-NHOEXFZT.js';
|
|
31
|
+
import './chunk-4QCJAJAG.js';
|
|
32
|
+
import './chunk-SAGRF4IB.js';
|
|
33
|
+
import './chunk-PKRPV3R7.js';
|
|
34
|
+
import './chunk-UKMBRMGT.js';
|
|
35
|
+
import './chunk-ORLTGPOS.js';
|
|
36
|
+
import './chunk-AHKS3DKI.js';
|
|
37
|
+
import './chunk-5IRDK5BC.js';
|
|
38
|
+
import './chunk-XESYJ4JC.js';
|
|
39
|
+
import './chunk-WE22OXQA.js';
|
|
40
|
+
import './chunk-MLJDW2YK.js';
|
|
41
|
+
import './chunk-KU5O7WPK.js';
|
|
42
|
+
import './chunk-354F3OF5.js';
|
|
43
|
+
import './chunk-Q5EWJPRY.js';
|
|
44
|
+
import './chunk-MLGETTYX.js';
|
|
45
|
+
import './chunk-M4U24U6G.js';
|
|
46
|
+
import './chunk-RN3XDZGS.js';
|
|
47
|
+
import './chunk-YMVTUV5K.js';
|
|
48
|
+
import './chunk-Q7UG242V.js';
|
|
49
|
+
import './chunk-SZQFCHU6.js';
|
|
50
|
+
import './chunk-2SFLLOMN.js';
|
|
51
|
+
import './chunk-R7WIIPUR.js';
|
|
52
|
+
import './chunk-NKQVLWDF.js';
|
|
53
|
+
import './chunk-5HSMH2ZZ.js';
|
|
54
|
+
import './chunk-AGACYRJ2.js';
|
|
55
|
+
import './chunk-3FSBE4PS.js';
|
|
56
|
+
import './chunk-MS3TQSXU.js';
|
|
57
|
+
import './chunk-5IUDICRK.js';
|
|
58
|
+
import './chunk-Q7GYMXVC.js';
|
|
59
|
+
import './chunk-TNFOU6SB.js';
|
|
60
|
+
import './chunk-3OY6H3I7.js';
|
|
61
|
+
//# sourceMappingURL=agent-IG7BP6GN.js.map
|
|
62
|
+
//# sourceMappingURL=agent-IG7BP6GN.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":[],"names":[],"mappings":"","file":"agent-
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"agent-IG7BP6GN.js"}
|
|
@@ -0,0 +1,206 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Owner: `src/` (2 of 7 importers). Derived from the import graph, not declared —
|
|
3
|
+
* `tests/lint/types-name-their-owner.test.ts` re-derives it.
|
|
4
|
+
*
|
|
5
|
+
* Leaf module for content-block types shared by `messages.ts` (assistant/user
|
|
6
|
+
* content) and `agent-prims.ts` (`CustomTool` handler results). Kept
|
|
7
|
+
* import-free so both can depend on it WITHOUT the `agent-prims ↔ messages`
|
|
8
|
+
* cycle (#7).
|
|
9
|
+
*
|
|
10
|
+
* @public
|
|
11
|
+
*/
|
|
12
|
+
/**
|
|
13
|
+
* Plain text content block emitted by the assistant or user, or returned by a
|
|
14
|
+
* tool.
|
|
15
|
+
*
|
|
16
|
+
* @public
|
|
17
|
+
*/
|
|
18
|
+
interface TextBlock {
|
|
19
|
+
type: "text";
|
|
20
|
+
text: string;
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* SE7 — a base64-encoded image block a tool can hand back as (part of) its
|
|
24
|
+
* result or its `ToolError`. `media_type` is a MIME type (e.g. `"image/png"`);
|
|
25
|
+
* `data` is the base64 payload without a data-URL prefix.
|
|
26
|
+
*
|
|
27
|
+
* Note: when a tool builds this from model- or user-influenced input, treat
|
|
28
|
+
* `media_type` as UNTRUSTED — validate/allow-list it before rendering it in a
|
|
29
|
+
* log or UI (it could carry newlines / control chars). The SDK only forwards it
|
|
30
|
+
* (JSON-serialized onto the wire) and never executes or path-joins it.
|
|
31
|
+
*
|
|
32
|
+
* @public
|
|
33
|
+
*/
|
|
34
|
+
interface ImageBlock {
|
|
35
|
+
type: "image";
|
|
36
|
+
source: {
|
|
37
|
+
type: "base64";
|
|
38
|
+
media_type: string;
|
|
39
|
+
data: string;
|
|
40
|
+
};
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* SE7 — structured content a tool result may carry: text and/or images. A tool
|
|
44
|
+
* `handler` may return this (success) and a `ToolError` may carry it (failure).
|
|
45
|
+
* Block-capable provider wires forward it natively; string-only provider wires
|
|
46
|
+
* flatten text and fail fast on an image.
|
|
47
|
+
*
|
|
48
|
+
* @public
|
|
49
|
+
*/
|
|
50
|
+
type ToolResultContentBlock = TextBlock | ImageBlock;
|
|
51
|
+
|
|
52
|
+
/**
|
|
53
|
+
* Owner: `internal/agent-loop/` (3 of 11 importers). Derived from the import graph, not
|
|
54
|
+
* declared — `tests/lint/types-name-their-owner.test.ts` re-derives it.
|
|
55
|
+
*
|
|
56
|
+
* Type-leaf — primitives shared between `agent.ts`, `run.ts`, and
|
|
57
|
+
* `messages.ts`. Extracted to break LOW type-only cycles #5 and #7
|
|
58
|
+
* (audit `architecture-output/final_report.md`) per plan
|
|
59
|
+
* arch-review-fixes-2026-06-06 § Phase 4 / T4.1 (D438).
|
|
60
|
+
*
|
|
61
|
+
* Public surface unchanged — `types/agent.ts` re-exports these from this
|
|
62
|
+
* leaf so `import type { ModelSelection, CustomTool } from "@theokit/sdk"`
|
|
63
|
+
* keeps resolving.
|
|
64
|
+
*
|
|
65
|
+
* @public
|
|
66
|
+
*/
|
|
67
|
+
/**
|
|
68
|
+
* One slot in a {@link ModelSelection.params} array.
|
|
69
|
+
*
|
|
70
|
+
* The `thinking` param sets the reasoning effort and takes a non-empty value, for example
|
|
71
|
+
* `{ id: "thinking", value: "high" }`. An empty or whitespace-only value is refused with a
|
|
72
|
+
* `ConfigurationError` (code `invalid_model_param`) at `Agent.create` and at a `send` override,
|
|
73
|
+
* before any request. To request no reasoning, leave the `thinking` param out.
|
|
74
|
+
*
|
|
75
|
+
* @public
|
|
76
|
+
*/
|
|
77
|
+
interface ModelParameterValue {
|
|
78
|
+
id: string;
|
|
79
|
+
value: string;
|
|
80
|
+
}
|
|
81
|
+
/**
|
|
82
|
+
* Identifies a model plus optional per-model parameters (e.g. reasoning effort).
|
|
83
|
+
*
|
|
84
|
+
* Use `Theokit.models.list()` to discover valid ids and parameter definitions.
|
|
85
|
+
*
|
|
86
|
+
* @public
|
|
87
|
+
*/
|
|
88
|
+
interface ModelSelection {
|
|
89
|
+
id: string;
|
|
90
|
+
params?: ModelParameterValue[];
|
|
91
|
+
/**
|
|
92
|
+
* M94 — the model's context window, in tokens. Becomes the window resolver's `override`.
|
|
93
|
+
*
|
|
94
|
+
* It exists for models with NO catalog entry: without it, a 400k model was budgeted against the
|
|
95
|
+
* 128k floor and compacted ~3x more than it needed to. A value above what the catalog knows is
|
|
96
|
+
* clamped — declaring 10M does not blow past the provider.
|
|
97
|
+
*/
|
|
98
|
+
contextWindow?: number;
|
|
99
|
+
/**
|
|
100
|
+
* #332 — the endpoint THIS model should reach, for OpenAI-compatible and local servers.
|
|
101
|
+
*
|
|
102
|
+
* Without it the base URL came only from a process-wide env var (`OLLAMA_HOST`) or the provider
|
|
103
|
+
* profile's shipped default, so every `ollama/*` model in a process shared one host — an app
|
|
104
|
+
* could not run a small model on localhost and a large one on a GPU box.
|
|
105
|
+
*
|
|
106
|
+
* It outranks the env var deliberately: with the env var winning, whoever set it for one model
|
|
107
|
+
* would keep hijacking every other one, which is the same bug wearing a hat.
|
|
108
|
+
*
|
|
109
|
+
* Leaving it unset keeps the zero-config path exactly as it was — `ollama/qwen2.5:3b` still
|
|
110
|
+
* resolves to `http://localhost:11434` from the profile, with no key and no setup.
|
|
111
|
+
*/
|
|
112
|
+
url?: string;
|
|
113
|
+
}
|
|
114
|
+
/**
|
|
115
|
+
* SE12 — a read-only, text-only projection of one turn of the run's conversation,
|
|
116
|
+
* exposed to a tool handler via `ctx.messages`. Content is flattened to text; tool
|
|
117
|
+
* calls / results and non-text parts are dropped, and turns that project to empty
|
|
118
|
+
* text are omitted. Consumed by `defineSubAgent`'s `messageFilter` to forward
|
|
119
|
+
* (a subset of) the supervisor transcript to a subagent.
|
|
120
|
+
*
|
|
121
|
+
* `role` includes `"system"` for type-completeness with the wire message shape,
|
|
122
|
+
* but the system prompt travels on a separate request field — a `"system"` entry
|
|
123
|
+
* does NOT appear in the current projection.
|
|
124
|
+
*
|
|
125
|
+
* @public
|
|
126
|
+
*/
|
|
127
|
+
interface ToolContextMessage {
|
|
128
|
+
role: "system" | "user" | "assistant";
|
|
129
|
+
content: string;
|
|
130
|
+
}
|
|
131
|
+
/**
|
|
132
|
+
* Local function tool declared per-agent via {@link AgentOptions.tools}. The
|
|
133
|
+
* handler runs in-process; no MCP server is involved. The SDK serializes
|
|
134
|
+
* `name`, `description`, and `inputSchema` into the model's tool catalog.
|
|
135
|
+
*
|
|
136
|
+
* Handlers MUST be re-passed on `Agent.resume()` because closures cannot be
|
|
137
|
+
* persisted. The tool catalog (name + description + schema) is NOT serialized.
|
|
138
|
+
*
|
|
139
|
+
* @public
|
|
140
|
+
*/
|
|
141
|
+
interface CustomTool {
|
|
142
|
+
/**
|
|
143
|
+
* Tool name surfaced to the LLM. Must match `^[a-zA-Z][a-zA-Z0-9_-]{0,63}$`
|
|
144
|
+
* and must not collide with `shell`, `memory_search`, `memory_get`, or any
|
|
145
|
+
* `mcp_*` prefix (reserved for the SDK's built-in tools).
|
|
146
|
+
*/
|
|
147
|
+
name: string;
|
|
148
|
+
/** Description surfaced to the LLM. Required — drives tool-selection accuracy. */
|
|
149
|
+
description: string;
|
|
150
|
+
/** JSON Schema (Draft-7 subset) describing the `input` argument. Must be `type: "object"`. */
|
|
151
|
+
inputSchema: Record<string, unknown>;
|
|
152
|
+
/**
|
|
153
|
+
* Local handler invoked when the model emits `tool_use` for this tool.
|
|
154
|
+
* Returns a string OR structured content blocks (SE7 — text + image, e.g. a
|
|
155
|
+
* screenshot) that become the `tool_result.content` surfaced back to the
|
|
156
|
+
* model. Throws → SDK converts to `tool_result` with `isError: true` and the
|
|
157
|
+
* error `message` as content; throw a `ToolError` to carry a clean message or
|
|
158
|
+
* multimodal error content. #65 — an optional 2nd `ToolContext` argument
|
|
159
|
+
* carries the run's `AbortSignal`; single-argument handlers are unaffected. M7
|
|
160
|
+
* — the same `ctx` also carries an optional user `context` (provided once via
|
|
161
|
+
* `SendOptions.context`), so shared config like a `projectRoot` is read by
|
|
162
|
+
* every tool instead of baked into each factory. SE12 — `ctx.messages` is a
|
|
163
|
+
* read-only, text-only projection of the current turn's transcript (see
|
|
164
|
+
* {@link ToolContextMessage}); `defineSubAgent`'s `messageFilter` consumes it.
|
|
165
|
+
* #119 — `ctx.threadId` is the run's session identity (the key passed to
|
|
166
|
+
* `Agent.getOrCreate(sessionId, …)`, or the agent's own id), so a stateful tool
|
|
167
|
+
* shared across sessions can scope its state per session instead of leaking it.
|
|
168
|
+
*/
|
|
169
|
+
handler: (input: Record<string, unknown>, ctx?: {
|
|
170
|
+
signal?: AbortSignal;
|
|
171
|
+
context?: unknown;
|
|
172
|
+
messages?: readonly ToolContextMessage[];
|
|
173
|
+
threadId?: string;
|
|
174
|
+
}) => string | ToolResultContentBlock[] | Promise<string | ToolResultContentBlock[]>;
|
|
175
|
+
}
|
|
176
|
+
/**
|
|
177
|
+
* How the permission engine treats the UNMATCHED verdict.
|
|
178
|
+
*
|
|
179
|
+
* - `default` — ask.
|
|
180
|
+
* - `plan` — read-only.
|
|
181
|
+
* - `acceptEdits` — auto-approve the unmatched verdict, but still honour an explicit `ask` rule.
|
|
182
|
+
* - `bypass` (alias `bypassPermissions`, the Anthropic-exact name) — everything allowed EXCEPT an
|
|
183
|
+
* explicit `deny`. Never asks.
|
|
184
|
+
*
|
|
185
|
+
* G7 / DIP — defined in this type leaf rather than in `permission-engine.ts`, which is a RUNTIME
|
|
186
|
+
* module. `types/agent.ts`, `types/run.ts` and `types/plugin.ts` all need the union, and each one
|
|
187
|
+
* used to reach into the engine for it: three of the nine violations the `types-dont-import-runtime`
|
|
188
|
+
* rule reported the moment it was able to see type-only edges at all. The engine re-exports it, so
|
|
189
|
+
* `import type { PermissionMode } from "@theokit/sdk"` is unchanged.
|
|
190
|
+
*
|
|
191
|
+
* @public
|
|
192
|
+
*/
|
|
193
|
+
type PermissionMode = "default" | "plan" | "acceptEdits" | "bypass" | "bypassPermissions";
|
|
194
|
+
/**
|
|
195
|
+
* Operations that may or may not be supported on a given `Run`, or on
|
|
196
|
+
* its parent agent. Kept in this leaf so `errors.ts` can name it without
|
|
197
|
+
* importing `types/run.ts`, which imports `errors.ts`.
|
|
198
|
+
*
|
|
199
|
+
* Runtime-specific availability — query at runtime with `run.supports(op)` and
|
|
200
|
+
* read the human reason via `run.unsupportedReason(op)`.
|
|
201
|
+
*
|
|
202
|
+
* @public
|
|
203
|
+
*/
|
|
204
|
+
type RunOperation = "stream" | "wait" | "cancel" | "conversation" | "listArtifacts" | "downloadArtifact" | "runUntil" | "runToCompletion" | "streamToCompletion" | "fork" | "usePersonality" | "workflow";
|
|
205
|
+
|
|
206
|
+
export type { CustomTool as C, ImageBlock as I, ModelSelection as M, PermissionMode as P, RunOperation as R, ToolResultContentBlock as T, ModelParameterValue as a, TextBlock as b, ToolContextMessage as c };
|