@theokit/sdk 5.11.0 → 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 +110 -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-5DOR5T3E.cjs.map → agent-BVKIUP7F.cjs.map} +1 -1
- package/dist/{agent-XMkGzff_.d.cts → agent-CVzDy_Oj.d.ts} +17 -8
- package/dist/{agent-CmKwSyyD.d.ts → agent-Cn0sphpA.d.cts} +17 -8
- package/dist/agent-IG7BP6GN.js +62 -0
- package/dist/{agent-GWKRARAL.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-7Y23B7XX.js → chunk-4GUFNDZR.js} +5 -5
- package/dist/{chunk-7Y23B7XX.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-4PHSVR2R.js → chunk-BJ7BPLQK.js} +207 -108
- 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-YEHQ3SIC.cjs → chunk-CGH4BCIY.cjs} +11 -11
- package/dist/{chunk-YEHQ3SIC.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-HI3W37FY.js → chunk-H7G65PNI.js} +5 -5
- package/dist/{chunk-HI3W37FY.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-5H2GJXGC.cjs → chunk-IO4RI5ZJ.cjs} +24 -24
- package/dist/{chunk-5H2GJXGC.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-BZKF7TXX.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-Z5BAFHPU.js → chunk-NJBJ3CUG.js} +6 -6
- package/dist/{chunk-Z5BAFHPU.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-NP362THY.cjs +164 -0
- 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-5OHB5HJF.cjs → chunk-Q6WT5535.cjs} +521 -422
- 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-74OA5DIM.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-N7ZIPW2N.cjs → chunk-YOVZMN4P.cjs} +8 -8
- package/dist/{chunk-N7ZIPW2N.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-ZJAYFSVI.js +158 -0
- 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-F2UDGZCN.js.map → compact-session-3U2JYTVG.js.map} +1 -1
- package/dist/{compact-session-2AETONOS.cjs → compact-session-NM56BREJ.cjs} +24 -24
- package/dist/{compact-session-2AETONOS.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-W4UKACYJ.cjs → inject-session-JVTZNQF6.cjs} +9 -9
- package/dist/{inject-session-W4UKACYJ.cjs.map → inject-session-JVTZNQF6.cjs.map} +1 -1
- package/dist/{inject-session-E5UDFVLI.js → inject-session-THABTKJY.js} +7 -7
- package/dist/{inject-session-E5UDFVLI.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 +5 -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 +26 -22
- package/docs/harness-capability-map.md +4 -4
- package/package.json +1 -1
- package/dist/agent-5DOR5T3E.cjs +0 -71
- package/dist/agent-GWKRARAL.js +0 -62
- package/dist/agent-session-store-ODD3IZCW.js +0 -6
- package/dist/agent-session-store-SVEJHSUA.cjs +0 -23
- package/dist/chunk-4PHSVR2R.js.map +0 -1
- package/dist/chunk-5OHB5HJF.cjs.map +0 -1
- package/dist/chunk-6LHQPOMI.cjs.map +0 -1
- package/dist/chunk-74OA5DIM.js.map +0 -1
- package/dist/chunk-B5MHRQJZ.js.map +0 -1
- package/dist/chunk-BZKF7TXX.cjs.map +0 -1
- package/dist/chunk-CZJ6Q7CW.js.map +0 -1
- package/dist/chunk-SGC7LSHF.cjs +0 -18
- package/dist/chunk-TE6XVTOA.js +0 -115
- package/dist/chunk-TE6XVTOA.js.map +0 -1
- package/dist/chunk-UNFBHV46.cjs.map +0 -1
- package/dist/chunk-WPO3VCY4.cjs +0 -121
- package/dist/chunk-WPO3VCY4.cjs.map +0 -1
- package/dist/compact-session-F2UDGZCN.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
|
@@ -1,42 +1,42 @@
|
|
|
1
|
-
import { submit, emitRunEvent } from './chunk-
|
|
2
|
-
import { enqueueSessionWrite, hydrateSession, persistTurnToTranscript, flushSessionWrites, appendSessionMessage, getSessionMessages, discardSession, clearSession } from './chunk-
|
|
3
|
-
import { IndexManager } from './chunk-
|
|
4
|
-
import { currentPersonalityContext, warnPersonalitySwitchInsideFork } from './chunk-
|
|
1
|
+
import { submit, emitRunEvent } from './chunk-HWMGR3HA.js';
|
|
2
|
+
import { enqueueSessionWrite, hydrateSession, persistTurnToTranscript, flushSessionWrites, appendSessionMessage, getSessionMessages, discardSession, clearSession } from './chunk-4GUFNDZR.js';
|
|
3
|
+
import { IndexManager } from './chunk-2C24NSNV.js';
|
|
4
|
+
import { currentPersonalityContext, warnPersonalitySwitchInsideFork } from './chunk-HJ2LV464.js';
|
|
5
5
|
import { extractCodePlugins } from './chunk-2SFBB54R.js';
|
|
6
|
-
import { createOpenAiCompatibleRuntime } from './chunk-
|
|
7
|
-
import { persistActiveMemoryTranscript } from './chunk-
|
|
8
|
-
import { resolveMaxFacts, writeSessionSummary, resolveMemoryRoot, MEMORY_KINDS, appendFact, readFacts, legacyMemoryJsonPath, memoryMdPath, appendFactToMarkdown } from './chunk-
|
|
9
|
-
import { FsSessionStore } from './chunk-
|
|
10
|
-
import { discoverProviderPlugins, validateApiKeyShape, getConfiguredBaseUrl, httpRequest, isFixtureApiKey, presentProviderCredentialEnvVars, buildDefaultSummarizer, shouldUseRealLocalRuntime, parseSseStream, CircuitBreaker, resolveRunProvider, mergeExplicitApiKey, resolveProviderChain, abortError, tryFirstEvent, relayStream, renderToolResultContentText } from './chunk-
|
|
6
|
+
import { createOpenAiCompatibleRuntime } from './chunk-H7G65PNI.js';
|
|
7
|
+
import { persistActiveMemoryTranscript } from './chunk-QK2ERTO3.js';
|
|
8
|
+
import { resolveMaxFacts, writeSessionSummary, resolveMemoryRoot, MEMORY_KINDS, appendFact, readFacts, legacyMemoryJsonPath, memoryMdPath, appendFactToMarkdown } from './chunk-DF77RBF4.js';
|
|
9
|
+
import { FsSessionStore } from './chunk-AB4OPJLD.js';
|
|
10
|
+
import { discoverProviderPlugins, validateApiKeyShape, getConfiguredBaseUrl, httpRequest, isFixtureApiKey, presentProviderCredentialEnvVars, buildDefaultSummarizer, shouldUseRealLocalRuntime, parseSseStream, CircuitBreaker, resolveRunProvider, mergeExplicitApiKey, resolveProviderChain, abortError, tryFirstEvent, relayStream, renderToolResultContentText } from './chunk-XJ4C4NFX.js';
|
|
11
11
|
import { resolveChildEnv } from './chunk-HKCKOAIO.js';
|
|
12
|
-
import { DEFAULT_MAX_BYTES_PER_FILE, runDiscovery, truncateWithMarker } from './chunk-
|
|
13
|
-
import { warnFailureOnce, loadHookConfig, warnOnce } from './chunk-
|
|
14
|
-
import { readVersionedJson, writeVersionedJson } from './chunk-
|
|
12
|
+
import { DEFAULT_MAX_BYTES_PER_FILE, runDiscovery, truncateWithMarker } from './chunk-KCM3RMKR.js';
|
|
13
|
+
import { warnFailureOnce, loadHookConfig, warnOnce } from './chunk-XJ3WU5CZ.js';
|
|
14
|
+
import { readVersionedJson, writeVersionedJson } from './chunk-OLJOI4LK.js';
|
|
15
15
|
import { toJsonSchema } from './chunk-7I5Z3UBJ.js';
|
|
16
16
|
import { sanitizeToolInput } from './chunk-FJWQP6EE.js';
|
|
17
|
-
import { withInheritedSubAgentCredentials, subAgentToolsFromDefinitions } from './chunk-
|
|
17
|
+
import { withInheritedSubAgentCredentials, subAgentToolsFromDefinitions } from './chunk-VZGE7NAI.js';
|
|
18
18
|
import { setAgentFacade } from './chunk-6X6ID4MO.js';
|
|
19
|
-
import { escapeBlockBody, buildSkillsBlock, discoverSkills, stripSkillFrontmatter } from './chunk-
|
|
19
|
+
import { escapeBlockBody, buildSkillsBlock, discoverSkills, stripSkillFrontmatter } from './chunk-NHOEXFZT.js';
|
|
20
20
|
import { withToolWhitelist, checkToolWhitelist } from './chunk-SAGRF4IB.js';
|
|
21
|
-
import { validateArtifactPath, PathTraversalError, safePathJoin } from './chunk-
|
|
21
|
+
import { validateArtifactPath, PathTraversalError, safePathJoin } from './chunk-PKRPV3R7.js';
|
|
22
22
|
import { insideRoot, atOrInsideRoot } from './chunk-UKMBRMGT.js';
|
|
23
|
-
import { mapWithConcurrency } from './chunk-
|
|
24
|
-
import { expandTilde, defaultBaseDir } from './chunk-
|
|
25
|
-
import { withFileLock } from './chunk-
|
|
23
|
+
import { mapWithConcurrency } from './chunk-ORLTGPOS.js';
|
|
24
|
+
import { expandTilde, defaultBaseDir } from './chunk-XESYJ4JC.js';
|
|
25
|
+
import { withFileLock } from './chunk-354F3OF5.js';
|
|
26
26
|
import { withCwdMutex } from './chunk-Q5EWJPRY.js';
|
|
27
|
-
import { sweepStaleAtomicTemps, atomicWriteJson } from './chunk-
|
|
28
|
-
import { loadSubagents, pluginBundleDirs } from './chunk-
|
|
29
|
-
import { reportUndeclaredSources, theokitConfigRoot, undefinedVariablesIn, getTheokitHome, adapterForConfigPath, adaptersForSurface, projectConfigRoots, pluginBundleRoots } from './chunk-
|
|
30
|
-
import { readWorkspaceDir, parseSimpleYaml } from './chunk-
|
|
31
|
-
import { resolveEffectiveContextWindow, CONTEXT_WINDOW_FLOOR, CONTEXT_WINDOW_MARGIN } from './chunk-
|
|
32
|
-
import { isAnthropicFamilyModel } from './chunk-
|
|
27
|
+
import { sweepStaleAtomicTemps, atomicWriteJson } from './chunk-M4U24U6G.js';
|
|
28
|
+
import { loadSubagents, pluginBundleDirs } from './chunk-RN3XDZGS.js';
|
|
29
|
+
import { reportUndeclaredSources, theokitConfigRoot, undefinedVariablesIn, getTheokitHome, adapterForConfigPath, adaptersForSurface, projectConfigRoots, pluginBundleRoots } from './chunk-YMVTUV5K.js';
|
|
30
|
+
import { readWorkspaceDir, parseSimpleYaml } from './chunk-Q7UG242V.js';
|
|
31
|
+
import { resolveEffectiveContextWindow, CONTEXT_WINDOW_FLOOR, CONTEXT_WINDOW_MARGIN } from './chunk-SZQFCHU6.js';
|
|
32
|
+
import { isAnthropicFamilyModel } from './chunk-2SFLLOMN.js';
|
|
33
33
|
import { parseModelId } from './chunk-R7WIIPUR.js';
|
|
34
|
-
import { getProviderProfile } from './chunk-
|
|
35
|
-
import { getCatalogModelInfo, isPatchedModelKey } from './chunk-
|
|
34
|
+
import { getProviderProfile } from './chunk-NKQVLWDF.js';
|
|
35
|
+
import { getCatalogModelInfo, isPatchedModelKey } from './chunk-5HSMH2ZZ.js';
|
|
36
36
|
import { globalSingleton } from './chunk-AGACYRJ2.js';
|
|
37
37
|
import { boundFetch } from './chunk-Q7GYMXVC.js';
|
|
38
|
-
import { AgentRunError, coerceToKnownAgentRunErrorCode, UnknownAgentError, ConfigurationError, AuthenticationError, AgentDisposedError, UnsupportedRunOperationError, NetworkError, TheokitAgentError } from './chunk-
|
|
39
|
-
import { diag, resolveApiKey, API_KEY_ENV_VAR, redactSecrets, diagFailure } from './chunk-
|
|
38
|
+
import { AgentRunError, coerceToKnownAgentRunErrorCode, UnknownAgentError, ConfigurationError, AuthenticationError, AgentDisposedError, UnsupportedRunOperationError, NetworkError, TheokitAgentError } from './chunk-TNFOU6SB.js';
|
|
39
|
+
import { diag, resolveApiKey, API_KEY_ENV_VAR, redactSecrets, diagFailure } from './chunk-3OY6H3I7.js';
|
|
40
40
|
import { stat, mkdir, readFile, readdir, access, unlink } from 'fs/promises';
|
|
41
41
|
import { randomUUID, createHash } from 'crypto';
|
|
42
42
|
import { join, dirname, resolve, relative, isAbsolute } from 'path';
|
|
@@ -161,7 +161,7 @@ async function agentGenerate(agent, agentModel, agentApiKey, agentLocal, input,
|
|
|
161
161
|
const { output, maxRetries, errorStrategy, ...sendOptions } = options;
|
|
162
162
|
const run = await agent.send(input, sendOptions);
|
|
163
163
|
const result = await run.wait();
|
|
164
|
-
const { generateObjectImpl, GenerateObjectError } = await import('./generate-object-
|
|
164
|
+
const { generateObjectImpl, GenerateObjectError } = await import('./generate-object-S7MNVF2V.js');
|
|
165
165
|
const answer = structurableAnswerOrThrow(result, GenerateObjectError);
|
|
166
166
|
const { getAgentFacade } = await import('./agent-factory-registry-ZVTABLEY.js');
|
|
167
167
|
const facade = getAgentFacade();
|
|
@@ -245,9 +245,39 @@ function isLocalAgentId(id) {
|
|
|
245
245
|
return id.startsWith(PREFIX.localAgent);
|
|
246
246
|
}
|
|
247
247
|
|
|
248
|
+
// src/internal/runtime/lifecycle/throw-on-error-run.ts
|
|
249
|
+
var innerRuns = /* @__PURE__ */ new WeakMap();
|
|
250
|
+
function wrapRunWithThrowOnError(run) {
|
|
251
|
+
let settled;
|
|
252
|
+
const rejectingWait = () => {
|
|
253
|
+
settled ??= run.wait().then(rejectOnTypedFailure);
|
|
254
|
+
return settled;
|
|
255
|
+
};
|
|
256
|
+
const view = new Proxy(run, {
|
|
257
|
+
get(target, prop, receiver) {
|
|
258
|
+
if (prop === "wait") return rejectingWait;
|
|
259
|
+
return Reflect.get(target, prop, receiver);
|
|
260
|
+
}
|
|
261
|
+
});
|
|
262
|
+
innerRuns.set(view, run);
|
|
263
|
+
return view;
|
|
264
|
+
}
|
|
265
|
+
function readRunResolving(run) {
|
|
266
|
+
return (innerRuns.get(run) ?? run).wait();
|
|
267
|
+
}
|
|
268
|
+
function rejectOnTypedFailure(result) {
|
|
269
|
+
const cause = result.status === "error" ? result.error?.cause : void 0;
|
|
270
|
+
if (cause !== void 0) throw cause;
|
|
271
|
+
return result;
|
|
272
|
+
}
|
|
273
|
+
|
|
248
274
|
// src/internal/runtime/model-selection.ts
|
|
249
275
|
function normalizeModel(m) {
|
|
250
|
-
if (m === void 0
|
|
276
|
+
if (m === void 0) return m;
|
|
277
|
+
if (typeof m !== "string") {
|
|
278
|
+
refuseEmptyThinkingParam(m);
|
|
279
|
+
return m;
|
|
280
|
+
}
|
|
251
281
|
const id = m.trim();
|
|
252
282
|
if (id.length === 0) {
|
|
253
283
|
throw new ConfigurationError(
|
|
@@ -257,6 +287,17 @@ function normalizeModel(m) {
|
|
|
257
287
|
}
|
|
258
288
|
return { id };
|
|
259
289
|
}
|
|
290
|
+
function refuseEmptyThinkingParam(selection) {
|
|
291
|
+
for (const param of selection.params ?? []) {
|
|
292
|
+
const value = param.value;
|
|
293
|
+
if (param.id === "thinking" && (typeof value !== "string" || value.trim().length === 0)) {
|
|
294
|
+
throw new ConfigurationError(
|
|
295
|
+
'model.params "thinking" needs a non-empty reasoning effort (for example "low" or "high"); leave the param out to request no reasoning',
|
|
296
|
+
{ code: "invalid_model_param" }
|
|
297
|
+
);
|
|
298
|
+
}
|
|
299
|
+
}
|
|
300
|
+
}
|
|
260
301
|
|
|
261
302
|
// src/internal/plugins/enabled-names.ts
|
|
262
303
|
function isPluginArray(plugins) {
|
|
@@ -1250,6 +1291,21 @@ function applyExtraRunFields(base, script) {
|
|
|
1250
1291
|
return { ...base, ...script.extraRunFields };
|
|
1251
1292
|
}
|
|
1252
1293
|
|
|
1294
|
+
// src/internal/runtime/typed-run-error.ts
|
|
1295
|
+
function toTypedRunErrorDetail(detail) {
|
|
1296
|
+
if (detail === void 0) return void 0;
|
|
1297
|
+
if (hasTypedCause(detail)) return detail;
|
|
1298
|
+
const { cause } = detail;
|
|
1299
|
+
const wrapped = new UnknownAgentError(detail.message, {
|
|
1300
|
+
...detail.code !== void 0 ? { code: detail.code } : {},
|
|
1301
|
+
...cause !== void 0 ? { cause } : {}
|
|
1302
|
+
});
|
|
1303
|
+
return { ...detail, cause: wrapped };
|
|
1304
|
+
}
|
|
1305
|
+
function hasTypedCause(detail) {
|
|
1306
|
+
return detail.cause instanceof TheokitAgentError;
|
|
1307
|
+
}
|
|
1308
|
+
|
|
1253
1309
|
// src/internal/runtime/fixtures/fixture-run-base.ts
|
|
1254
1310
|
function prepareRunContext(message) {
|
|
1255
1311
|
const userText = typeof message === "string" ? message : message.text;
|
|
@@ -1436,7 +1492,7 @@ var FixtureRunBase = class {
|
|
|
1436
1492
|
base.result = this.script.result;
|
|
1437
1493
|
}
|
|
1438
1494
|
if (status === "error" && this.script.errorDetail !== void 0) {
|
|
1439
|
-
base.error = this.script.errorDetail;
|
|
1495
|
+
base.error = toTypedRunErrorDetail(this.script.errorDetail);
|
|
1440
1496
|
}
|
|
1441
1497
|
applyScriptMetrics(base, this.script);
|
|
1442
1498
|
return this.extendRunResult(applyExtraRunFields(base, this.script));
|
|
@@ -1848,10 +1904,13 @@ var CloudAgent = class _CloudAgent {
|
|
|
1848
1904
|
reject(err);
|
|
1849
1905
|
return;
|
|
1850
1906
|
}
|
|
1851
|
-
resolve(run);
|
|
1907
|
+
resolve(this.options.throwOnError === true ? wrapRunWithThrowOnError(run) : run);
|
|
1852
1908
|
const mutexTimeoutMs = Number(process.env.THEOKIT_CLOUD_SEND_MUTEX_TIMEOUT_MS) || 3e5;
|
|
1853
1909
|
try {
|
|
1854
|
-
await Promise.race([
|
|
1910
|
+
await Promise.race([
|
|
1911
|
+
readRunResolving(run),
|
|
1912
|
+
new Promise((r) => setTimeout(r, mutexTimeoutMs))
|
|
1913
|
+
]);
|
|
1855
1914
|
} catch {
|
|
1856
1915
|
}
|
|
1857
1916
|
});
|
|
@@ -2926,7 +2985,7 @@ async function runPostRunLifecycle(inputs) {
|
|
|
2926
2985
|
} = inputs;
|
|
2927
2986
|
let result;
|
|
2928
2987
|
try {
|
|
2929
|
-
result = await run
|
|
2988
|
+
result = await readRunResolving(run);
|
|
2930
2989
|
} catch {
|
|
2931
2990
|
try {
|
|
2932
2991
|
const partial = await safeConversation(run);
|
|
@@ -3140,7 +3199,7 @@ function defineTool(spec) {
|
|
|
3140
3199
|
}
|
|
3141
3200
|
|
|
3142
3201
|
// src/internal/runtime/system-prompt/native-reasoning.ts
|
|
3143
|
-
var NATIVE_REASONING_PARAM_IDS = /* @__PURE__ */ new Set(["thinking"
|
|
3202
|
+
var NATIVE_REASONING_PARAM_IDS = /* @__PURE__ */ new Set(["thinking"]);
|
|
3144
3203
|
var REASONING_PREAMBLE = "Think step by step before answering: use the `think` tool to reason through each step, validate your work, then answer. Reason about magnitude before comparing numbers.";
|
|
3145
3204
|
function createThinkTool() {
|
|
3146
3205
|
return Tool.create({
|
|
@@ -3161,7 +3220,7 @@ function warnDoubleReasoningOnce() {
|
|
|
3161
3220
|
if (warned.has("double-reasoning")) return;
|
|
3162
3221
|
warned.add("double-reasoning");
|
|
3163
3222
|
diag(
|
|
3164
|
-
"[theokit-sdk] `reasoning: true` skipped \u2014 a native reasoning model is configured (model.params thinking
|
|
3223
|
+
"[theokit-sdk] `reasoning: true` skipped \u2014 a native reasoning model is configured (model.params thinking); native reasoning wins. Remove one to silence.\n"
|
|
3165
3224
|
);
|
|
3166
3225
|
}
|
|
3167
3226
|
function reasoningActive(reasoning, model) {
|
|
@@ -5970,6 +6029,7 @@ function registerLoopError(ctx, cause) {
|
|
|
5970
6029
|
async function consumeStreamEvent(inputs, reasoning, event) {
|
|
5971
6030
|
if (event.type === "text_delta") {
|
|
5972
6031
|
const text = event.text ?? "";
|
|
6032
|
+
if (text.length > 0) await closeReasoningOnce(inputs, reasoning);
|
|
5973
6033
|
await emitTextDeltaCallback(inputs, text);
|
|
5974
6034
|
return text;
|
|
5975
6035
|
}
|
|
@@ -5982,7 +6042,14 @@ async function consumeStreamEvent(inputs, reasoning, event) {
|
|
|
5982
6042
|
return "";
|
|
5983
6043
|
}
|
|
5984
6044
|
async function runCollectorLoop(generator, inputs, ctx, partial) {
|
|
5985
|
-
const reasoning = {
|
|
6045
|
+
const reasoning = {
|
|
6046
|
+
text: "",
|
|
6047
|
+
startedAt: void 0,
|
|
6048
|
+
lastAt: void 0,
|
|
6049
|
+
signature: void 0,
|
|
6050
|
+
closed: false,
|
|
6051
|
+
durationMs: 0
|
|
6052
|
+
};
|
|
5986
6053
|
let errored = false;
|
|
5987
6054
|
let finishValue;
|
|
5988
6055
|
let thinking;
|
|
@@ -6011,17 +6078,24 @@ async function consumeReasoningDelta(inputs, reasoning, delta) {
|
|
|
6011
6078
|
await accumulateReasoning(inputs, reasoning, delta.text);
|
|
6012
6079
|
}
|
|
6013
6080
|
async function accumulateReasoning(inputs, reasoning, text) {
|
|
6014
|
-
|
|
6081
|
+
const now = Date.now();
|
|
6082
|
+
if (reasoning.startedAt === void 0) reasoning.startedAt = now;
|
|
6083
|
+
if (!reasoning.closed) reasoning.lastAt = now;
|
|
6015
6084
|
reasoning.text += text;
|
|
6016
6085
|
await emitReasoningDeltaCallback(inputs, text);
|
|
6017
6086
|
}
|
|
6087
|
+
async function closeReasoningOnce(inputs, reasoning) {
|
|
6088
|
+
if (reasoning.closed || reasoning.text.length === 0) return;
|
|
6089
|
+
reasoning.closed = true;
|
|
6090
|
+
reasoning.durationMs = (reasoning.lastAt ?? 0) - (reasoning.startedAt ?? 0);
|
|
6091
|
+
await emitThinkingCompletedCallback(inputs, reasoning.durationMs);
|
|
6092
|
+
}
|
|
6018
6093
|
async function finalizeReasoning(inputs, ctx, reasoning) {
|
|
6019
6094
|
if (reasoning.text.length === 0) return void 0;
|
|
6020
|
-
|
|
6095
|
+
await closeReasoningOnce(inputs, reasoning);
|
|
6021
6096
|
ctx.events.push(
|
|
6022
|
-
buildThinkingEvent(inputs, reasoning.text,
|
|
6097
|
+
buildThinkingEvent(inputs, reasoning.text, reasoning.durationMs, reasoning.signature)
|
|
6023
6098
|
);
|
|
6024
|
-
await emitThinkingCompletedCallback(inputs, thinkingDurationMs);
|
|
6025
6099
|
return {
|
|
6026
6100
|
type: "thinking",
|
|
6027
6101
|
text: reasoning.text,
|
|
@@ -6860,25 +6934,22 @@ async function runIteration(inputs, ctx) {
|
|
|
6860
6934
|
function trackTurnUsage(inputs, llmOutput) {
|
|
6861
6935
|
const tracker = inputs.budgetTracker;
|
|
6862
6936
|
if (tracker === void 0) return;
|
|
6863
|
-
const
|
|
6864
|
-
|
|
6865
|
-
|
|
6937
|
+
const model = inputs.model.id ?? "auto";
|
|
6938
|
+
trackEvent(tracker, { tokens: promptTokens(llmOutput), model, type: "input" });
|
|
6939
|
+
trackEvent(tracker, { tokens: llmOutput.outputTokens ?? 0, model, type: "output" });
|
|
6940
|
+
}
|
|
6941
|
+
function promptTokens(llmOutput) {
|
|
6942
|
+
return (llmOutput.inputTokens ?? 0) + (llmOutput.cacheReadTokens ?? 0) + (llmOutput.cacheWriteTokens ?? 0);
|
|
6943
|
+
}
|
|
6944
|
+
function trackEvent(tracker, event) {
|
|
6945
|
+
if (event.tokens <= 0) return;
|
|
6866
6946
|
try {
|
|
6867
|
-
|
|
6868
|
-
|
|
6869
|
-
|
|
6870
|
-
|
|
6871
|
-
|
|
6872
|
-
|
|
6873
|
-
}
|
|
6874
|
-
if (outputT > 0) {
|
|
6875
|
-
tracker.track({
|
|
6876
|
-
tokens: outputT,
|
|
6877
|
-
model: modelId,
|
|
6878
|
-
type: "output"
|
|
6879
|
-
});
|
|
6880
|
-
}
|
|
6881
|
-
} catch {
|
|
6947
|
+
tracker.track(event);
|
|
6948
|
+
} catch (err) {
|
|
6949
|
+
const why = err instanceof Error ? err.message : String(err);
|
|
6950
|
+
diagFailure(
|
|
6951
|
+
`[theokit-sdk] BudgetTracker.track threw (type=${event.type}, model=${event.model}, tokens=${event.tokens}): ${why}`
|
|
6952
|
+
);
|
|
6882
6953
|
}
|
|
6883
6954
|
}
|
|
6884
6955
|
async function transformLlmOutputText(inputs, text, ctx) {
|
|
@@ -6951,6 +7022,32 @@ async function inspectDoomLoop(inputs, ctx, toolCalls) {
|
|
|
6951
7022
|
return "continue";
|
|
6952
7023
|
}
|
|
6953
7024
|
|
|
7025
|
+
// src/internal/concurrency/abort-utils.ts
|
|
7026
|
+
function anySignal(signals) {
|
|
7027
|
+
const filtered = signals.filter((s) => s !== void 0);
|
|
7028
|
+
if (filtered.length === 0) {
|
|
7029
|
+
return new AbortController().signal;
|
|
7030
|
+
}
|
|
7031
|
+
if (filtered.length === 1) {
|
|
7032
|
+
return filtered[0];
|
|
7033
|
+
}
|
|
7034
|
+
if (typeof AbortSignal.any === "function") {
|
|
7035
|
+
return AbortSignal.any(filtered);
|
|
7036
|
+
}
|
|
7037
|
+
return ponyfillAny(filtered);
|
|
7038
|
+
}
|
|
7039
|
+
function ponyfillAny(signals) {
|
|
7040
|
+
const ctrl = new AbortController();
|
|
7041
|
+
for (const s of signals) {
|
|
7042
|
+
if (s.aborted) {
|
|
7043
|
+
ctrl.abort(s.reason);
|
|
7044
|
+
return ctrl.signal;
|
|
7045
|
+
}
|
|
7046
|
+
s.addEventListener("abort", () => ctrl.abort(s.reason), { once: true });
|
|
7047
|
+
}
|
|
7048
|
+
return ctrl.signal;
|
|
7049
|
+
}
|
|
7050
|
+
|
|
6954
7051
|
// src/internal/llm/fallback-client.ts
|
|
6955
7052
|
var FallbackLlmClient = class {
|
|
6956
7053
|
constructor(clients) {
|
|
@@ -7705,6 +7802,13 @@ var RealLocalRun = class extends FixtureRunBase {
|
|
|
7705
7802
|
ownsMcpClients;
|
|
7706
7803
|
/** theokit#148 — what a delegated child inherits from this parent, scoped to the loop. */
|
|
7707
7804
|
inheritedCredentials;
|
|
7805
|
+
/**
|
|
7806
|
+
* B-495 — the run's own abort, composed into the signal the loop hands to the LLM fetch and the
|
|
7807
|
+
* tool executors, so `cancel()` stops the request and not only the status. A TypeScript `private`
|
|
7808
|
+
* field, never a JS `#private` one: the run wrappers are Proxies that call `cancel()` with `this`
|
|
7809
|
+
* bound to the Proxy, where reading a `#private` field throws.
|
|
7810
|
+
*/
|
|
7811
|
+
cancelController = new AbortController();
|
|
7708
7812
|
constructor(options, buildInputs, ownsMcpClients, inheritedCredentials) {
|
|
7709
7813
|
super(options);
|
|
7710
7814
|
this.buildInputs = buildInputs;
|
|
@@ -7716,6 +7820,11 @@ var RealLocalRun = class extends FixtureRunBase {
|
|
|
7716
7820
|
void this.driveLoop();
|
|
7717
7821
|
}, 0);
|
|
7718
7822
|
}
|
|
7823
|
+
cancel() {
|
|
7824
|
+
if (this.terminated) return Promise.resolve();
|
|
7825
|
+
this.cancelController.abort();
|
|
7826
|
+
return super.cancel();
|
|
7827
|
+
}
|
|
7719
7828
|
notifyImmediately() {
|
|
7720
7829
|
return true;
|
|
7721
7830
|
}
|
|
@@ -7759,7 +7868,9 @@ var RealLocalRun = class extends FixtureRunBase {
|
|
|
7759
7868
|
liveDelivered = /* @__PURE__ */ new Set();
|
|
7760
7869
|
async executeAgentLoop(inputs) {
|
|
7761
7870
|
let textStreamedSinceLastMessage = false;
|
|
7871
|
+
inputs.signal = anySignal([inputs.signal, this.cancelController.signal]);
|
|
7762
7872
|
inputs.onLoopEvent = (event) => {
|
|
7873
|
+
if (this.terminated) return;
|
|
7763
7874
|
this.liveDelivered.add(event);
|
|
7764
7875
|
this.script.events.push(event);
|
|
7765
7876
|
const carriesText = event.type === "assistant" && event.message.content.some((b) => b.type === "text");
|
|
@@ -7775,11 +7886,13 @@ var RealLocalRun = class extends FixtureRunBase {
|
|
|
7775
7886
|
};
|
|
7776
7887
|
const callerOnDelta = inputs.onDelta;
|
|
7777
7888
|
inputs.onDelta = (delta) => {
|
|
7889
|
+
if (this.terminated) return;
|
|
7778
7890
|
callerOnDelta?.(delta);
|
|
7779
7891
|
if (delta.update.type === "text-delta") textStreamedSinceLastMessage = true;
|
|
7780
7892
|
this.pushTimeline({ kind: "delta", update: delta.update });
|
|
7781
7893
|
};
|
|
7782
7894
|
try {
|
|
7895
|
+
if (this.terminated) return;
|
|
7783
7896
|
const runLoop = () => inputs.activeTools !== void 0 ? withToolWhitelist(new Set(inputs.activeTools), () => runAgentLoop(inputs)) : runAgentLoop(inputs);
|
|
7784
7897
|
const output = await withInheritedSubAgentCredentials(this.inheritedCredentials, runLoop);
|
|
7785
7898
|
this.applyAgentLoopOutput(output);
|
|
@@ -7788,11 +7901,7 @@ var RealLocalRun = class extends FixtureRunBase {
|
|
|
7788
7901
|
this.emitErrorEvent(cause, "Agent loop failed", "", "agent_loop_failed");
|
|
7789
7902
|
this.transitionTo("error");
|
|
7790
7903
|
} finally {
|
|
7791
|
-
if (this.ownsMcpClients)
|
|
7792
|
-
for (const client of inputs.mcp.values()) {
|
|
7793
|
-
await client.close().catch(() => void 0);
|
|
7794
|
-
}
|
|
7795
|
-
}
|
|
7904
|
+
if (this.ownsMcpClients) await closeOwnedMcpClients(inputs);
|
|
7796
7905
|
}
|
|
7797
7906
|
}
|
|
7798
7907
|
/**
|
|
@@ -7804,6 +7913,7 @@ var RealLocalRun = class extends FixtureRunBase {
|
|
|
7804
7913
|
* Finding-B fix (sdk-error-packaging v1.1): set-once errorDetail copy.
|
|
7805
7914
|
*/
|
|
7806
7915
|
applyAgentLoopOutput(output) {
|
|
7916
|
+
if (this.terminated) return;
|
|
7807
7917
|
this.deliverUndeliveredEvents(output.events);
|
|
7808
7918
|
this.script.conversation.push(...output.conversation);
|
|
7809
7919
|
if (output.result.length > 0) this.script.result = output.result;
|
|
@@ -7851,6 +7961,18 @@ var RealLocalRun = class extends FixtureRunBase {
|
|
|
7851
7961
|
this.notifyNewEvents();
|
|
7852
7962
|
}
|
|
7853
7963
|
};
|
|
7964
|
+
async function closeOwnedMcpClients(inputs) {
|
|
7965
|
+
for (const [name, client] of inputs.mcp.entries()) {
|
|
7966
|
+
try {
|
|
7967
|
+
await client.close();
|
|
7968
|
+
} catch (cause) {
|
|
7969
|
+
const why = cause instanceof Error ? cause.message : String(cause);
|
|
7970
|
+
diagFailure(
|
|
7971
|
+
`[theokit-sdk] MCP server ${name} failed to close; its process may still be running: ${why}`
|
|
7972
|
+
);
|
|
7973
|
+
}
|
|
7974
|
+
}
|
|
7975
|
+
}
|
|
7854
7976
|
|
|
7855
7977
|
// src/internal/local-agent/local-agent-dispatch.ts
|
|
7856
7978
|
function buildRealRunOptions(args) {
|
|
@@ -9341,9 +9463,9 @@ async function localAgentUsePersonality(agent, name, opts) {
|
|
|
9341
9463
|
// src/internal/local-agent/local-agent-runtime-extensions.ts
|
|
9342
9464
|
function localAgentRunUntil(agent, goal, options) {
|
|
9343
9465
|
async function* wrap() {
|
|
9344
|
-
const { runUntilImpl } = await import('./run-until-
|
|
9466
|
+
const { runUntilImpl } = await import('./run-until-G6BW2DWM.js');
|
|
9345
9467
|
const buildDeps = async () => {
|
|
9346
|
-
const { judgeCallImpl } = await import('./judge-call-
|
|
9468
|
+
const { judgeCallImpl } = await import('./judge-call-4LR4IFVT.js');
|
|
9347
9469
|
const { getAgentFacade } = await import('./agent-factory-registry-ZVTABLEY.js');
|
|
9348
9470
|
const create = getAgentFacade().create;
|
|
9349
9471
|
return {
|
|
@@ -9376,7 +9498,7 @@ async function* localAgentStreamToCompletion(agent, message, options) {
|
|
|
9376
9498
|
async function localAgentFork(parent, options) {
|
|
9377
9499
|
const { forkAgentImpl } = await import('./fork-agent-S2EPIML7.js');
|
|
9378
9500
|
const { getAgentFacade } = await import('./agent-factory-registry-ZVTABLEY.js');
|
|
9379
|
-
const { withPersonalityContext } = await import('./context-
|
|
9501
|
+
const { withPersonalityContext } = await import('./context-7EBZST3L.js');
|
|
9380
9502
|
const create = getAgentFacade().create;
|
|
9381
9503
|
return withPersonalityContext(
|
|
9382
9504
|
{ slug: parent.personalitySlugSnapshot, isFork: true },
|
|
@@ -9405,32 +9527,6 @@ async function persistMemoryFactIfWritePrompt(workspaceCwd, memoryConfig, userTe
|
|
|
9405
9527
|
}
|
|
9406
9528
|
}
|
|
9407
9529
|
|
|
9408
|
-
// src/internal/concurrency/abort-utils.ts
|
|
9409
|
-
function anySignal(signals) {
|
|
9410
|
-
const filtered = signals.filter((s) => s !== void 0);
|
|
9411
|
-
if (filtered.length === 0) {
|
|
9412
|
-
return new AbortController().signal;
|
|
9413
|
-
}
|
|
9414
|
-
if (filtered.length === 1) {
|
|
9415
|
-
return filtered[0];
|
|
9416
|
-
}
|
|
9417
|
-
if (typeof AbortSignal.any === "function") {
|
|
9418
|
-
return AbortSignal.any(filtered);
|
|
9419
|
-
}
|
|
9420
|
-
return ponyfillAny(filtered);
|
|
9421
|
-
}
|
|
9422
|
-
function ponyfillAny(signals) {
|
|
9423
|
-
const ctrl = new AbortController();
|
|
9424
|
-
for (const s of signals) {
|
|
9425
|
-
if (s.aborted) {
|
|
9426
|
-
ctrl.abort(s.reason);
|
|
9427
|
-
return ctrl.signal;
|
|
9428
|
-
}
|
|
9429
|
-
s.addEventListener("abort", () => ctrl.abort(s.reason), { once: true });
|
|
9430
|
-
}
|
|
9431
|
-
return ctrl.signal;
|
|
9432
|
-
}
|
|
9433
|
-
|
|
9434
9530
|
// src/internal/runtime/lifecycle/wrap-completion-check-run.ts
|
|
9435
9531
|
function wrapRunWithCompletionCheck(args) {
|
|
9436
9532
|
const check = args.completionCheck;
|
|
@@ -9950,7 +10046,7 @@ async function executeSendLocked(inputs, message, options) {
|
|
|
9950
10046
|
function buildCompletionCheckDeps() {
|
|
9951
10047
|
return {
|
|
9952
10048
|
judge: async (ctx, opts) => {
|
|
9953
|
-
const { judgeCallImpl } = await import('./judge-call-
|
|
10049
|
+
const { judgeCallImpl } = await import('./judge-call-4LR4IFVT.js');
|
|
9954
10050
|
const { getAgentFacade } = await import('./agent-factory-registry-ZVTABLEY.js');
|
|
9955
10051
|
return judgeCallImpl(ctx, opts, { create: getAgentFacade().create });
|
|
9956
10052
|
}
|
|
@@ -10004,7 +10100,7 @@ function registerRunAsTask(run, agentId, taskOpt, userText) {
|
|
|
10004
10100
|
},
|
|
10005
10101
|
{ once: true }
|
|
10006
10102
|
);
|
|
10007
|
-
const result = await run
|
|
10103
|
+
const result = await readRunResolving(run);
|
|
10008
10104
|
ctx.emit({ status: result.status, runId: run.id });
|
|
10009
10105
|
return { status: result.status, result: result.result };
|
|
10010
10106
|
},
|
|
@@ -10265,7 +10361,7 @@ var LocalAgent = class {
|
|
|
10265
10361
|
return;
|
|
10266
10362
|
}
|
|
10267
10363
|
if (options.task !== void 0) registerRunAsTask(run, this.agentId, options.task, userText);
|
|
10268
|
-
resolve(run);
|
|
10364
|
+
resolve(callerView(run, this.options.throwOnError));
|
|
10269
10365
|
try {
|
|
10270
10366
|
await runPostRunLifecycle({
|
|
10271
10367
|
run,
|
|
@@ -10469,6 +10565,9 @@ var LocalAgent = class {
|
|
|
10469
10565
|
return localAgentStreamToCompletion(this, message, options);
|
|
10470
10566
|
}
|
|
10471
10567
|
};
|
|
10568
|
+
function callerView(run, throwOnError) {
|
|
10569
|
+
return throwOnError === true ? wrapRunWithThrowOnError(run) : run;
|
|
10570
|
+
}
|
|
10472
10571
|
function resolveCwd(cwd) {
|
|
10473
10572
|
return (Array.isArray(cwd) ? cwd[0] : cwd) ?? process.cwd();
|
|
10474
10573
|
}
|
|
@@ -10822,7 +10921,7 @@ var Agent = class _Agent {
|
|
|
10822
10921
|
* @public
|
|
10823
10922
|
*/
|
|
10824
10923
|
static async prompt(message, options) {
|
|
10825
|
-
const agent = await _Agent.create(options);
|
|
10924
|
+
const agent = await _Agent.create({ ...options, throwOnError: false });
|
|
10826
10925
|
try {
|
|
10827
10926
|
const run = await agent.send(message);
|
|
10828
10927
|
const result = await run.wait();
|
|
@@ -10884,7 +10983,7 @@ var Agent = class _Agent {
|
|
|
10884
10983
|
* @public
|
|
10885
10984
|
*/
|
|
10886
10985
|
static async generateObject(options) {
|
|
10887
|
-
const { generateObjectImpl } = await import('./generate-object-
|
|
10986
|
+
const { generateObjectImpl } = await import('./generate-object-S7MNVF2V.js');
|
|
10888
10987
|
return generateObjectImpl(options, {
|
|
10889
10988
|
create: (opts) => _Agent.create(opts),
|
|
10890
10989
|
delete: (agentId) => _Agent.delete(agentId)
|
|
@@ -10908,7 +11007,7 @@ var Agent = class _Agent {
|
|
|
10908
11007
|
delete: (agentId) => _Agent.delete(agentId)
|
|
10909
11008
|
};
|
|
10910
11009
|
async function* wrapper() {
|
|
10911
|
-
streamObjectImport ??= import('./stream-object-
|
|
11010
|
+
streamObjectImport ??= import('./stream-object-R6SMYV4R.js');
|
|
10912
11011
|
const { streamObjectImpl } = await streamObjectImport;
|
|
10913
11012
|
yield* streamObjectImpl(options, deps);
|
|
10914
11013
|
}
|
|
@@ -10932,7 +11031,7 @@ var Agent = class _Agent {
|
|
|
10932
11031
|
* @public
|
|
10933
11032
|
*/
|
|
10934
11033
|
static async batch(prompts, options) {
|
|
10935
|
-
const { batchImpl } = await import('./batch-
|
|
11034
|
+
const { batchImpl } = await import('./batch-EP3FCL6D.js');
|
|
10936
11035
|
return batchImpl(prompts, options, { create: (opts) => _Agent.create(opts) });
|
|
10937
11036
|
}
|
|
10938
11037
|
/**
|
|
@@ -11084,7 +11183,7 @@ var Agent = class _Agent {
|
|
|
11084
11183
|
*/
|
|
11085
11184
|
static async compact(agentId, options = {}) {
|
|
11086
11185
|
const reg = await requireLocalAgent(agentId, "compact");
|
|
11087
|
-
const { compactSessionTranscript, buildDefaultSummarizer: buildDefaultSummarizer2 } = await import('./compact-session-
|
|
11186
|
+
const { compactSessionTranscript, buildDefaultSummarizer: buildDefaultSummarizer2 } = await import('./compact-session-3U2JYTVG.js');
|
|
11088
11187
|
const { cwd, model, store } = await openLocalStore(reg);
|
|
11089
11188
|
return enqueueSessionWrite(
|
|
11090
11189
|
cwd,
|
|
@@ -11114,7 +11213,7 @@ var Agent = class _Agent {
|
|
|
11114
11213
|
*/
|
|
11115
11214
|
static async injectSessionTurn(agentId, turn) {
|
|
11116
11215
|
const reg = await requireLocalAgent(agentId, "injectSessionTurn");
|
|
11117
|
-
const { injectSessionTurn } = await import('./inject-session-
|
|
11216
|
+
const { injectSessionTurn } = await import('./inject-session-THABTKJY.js');
|
|
11118
11217
|
const { cwd, model, store } = await openLocalStore(reg);
|
|
11119
11218
|
await injectSessionTurn({
|
|
11120
11219
|
store,
|
|
@@ -11144,7 +11243,7 @@ var Agent = class _Agent {
|
|
|
11144
11243
|
*/
|
|
11145
11244
|
static async transcript(agentId) {
|
|
11146
11245
|
const reg = await requireLocalAgent(agentId, "transcript");
|
|
11147
|
-
const { readSessionMessages } = await import('./agent-session-store-
|
|
11246
|
+
const { readSessionMessages } = await import('./agent-session-store-22GKA7O4.js');
|
|
11148
11247
|
const { store } = await openLocalStore(reg);
|
|
11149
11248
|
return readSessionMessages(store, agentId);
|
|
11150
11249
|
}
|
|
@@ -11165,7 +11264,7 @@ var Agent = class _Agent {
|
|
|
11165
11264
|
*/
|
|
11166
11265
|
static async describe(agentId) {
|
|
11167
11266
|
const agent = await getRegisteredAgentOrThrow(agentId);
|
|
11168
|
-
const { loadSubagents: loadSubagents2 } = await import('./subagents-loader-
|
|
11267
|
+
const { loadSubagents: loadSubagents2 } = await import('./subagents-loader-Z744TAKD.js');
|
|
11169
11268
|
const settingSources = agent.options.local?.settingSources;
|
|
11170
11269
|
const subagents = await loadSubagents2(
|
|
11171
11270
|
agent.cwd ?? process.cwd(),
|
|
@@ -11264,13 +11363,13 @@ async function openLocalStore(reg) {
|
|
|
11264
11363
|
const cwd = reg.cwd ?? process.cwd();
|
|
11265
11364
|
const optModel = reg.options.model;
|
|
11266
11365
|
const model = reg.model?.id ?? (typeof optModel === "string" ? optModel : optModel?.id) ?? "unknown";
|
|
11267
|
-
const { FsSessionStore: FsSessionStore2 } = await import('./fs-session-store-
|
|
11268
|
-
const { defaultBaseDir: defaultBaseDir2, expandTilde: expandTilde2 } = await import('./session-transcript-
|
|
11366
|
+
const { FsSessionStore: FsSessionStore2 } = await import('./fs-session-store-6ZCCJX3K.js');
|
|
11367
|
+
const { defaultBaseDir: defaultBaseDir2, expandTilde: expandTilde2 } = await import('./session-transcript-BSHZYYY6.js');
|
|
11269
11368
|
const configuredSessionDir = reg.options.local?.sessionDir ?? reg.options.local?.baseDir;
|
|
11270
11369
|
const baseDir = configuredSessionDir !== void 0 ? expandTilde2(configuredSessionDir) : defaultBaseDir2();
|
|
11271
11370
|
return { cwd, model, store: new FsSessionStore2({ baseDir, cwd }) };
|
|
11272
11371
|
}
|
|
11273
11372
|
|
|
11274
11373
|
export { Agent, AgentBuilder, DEFAULT_AGENTIC_MODEL_ID, MEMORY_EMBEDDING_ADAPTERS, Tool, ToolError, UsageAccumulator, computeCost, generateCronId, getPricingEntry, managedSettingsPathFor, openRouterMemoryEmbeddingProviderAdapter, readManagedSettings, resolveSessionDir };
|
|
11275
|
-
//# sourceMappingURL=chunk-
|
|
11276
|
-
//# sourceMappingURL=chunk-
|
|
11374
|
+
//# sourceMappingURL=chunk-BJ7BPLQK.js.map
|
|
11375
|
+
//# sourceMappingURL=chunk-BJ7BPLQK.js.map
|