@theokit/sdk 5.11.1 → 5.12.1
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 +115 -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-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-7NQ7HJ3E.cjs → chunk-EPANMGH7.cjs} +8 -7
- package/dist/chunk-EPANMGH7.cjs.map +1 -0
- 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-GMSRRJ53.js → chunk-NBNRQN6T.js} +5 -4
- package/dist/chunk-NBNRQN6T.js.map +1 -0
- 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 +114 -41
- package/dist/sandbox/index.cjs.map +1 -1
- package/dist/sandbox/index.js +99 -26
- package/dist/sandbox/index.js.map +1 -1
- package/dist/sandbox/linux-sandbox.d.cts +24 -4
- package/dist/sandbox/linux-sandbox.d.ts +24 -4
- package/dist/sandbox/seccomp-delivery.d.cts +46 -0
- package/dist/sandbox/seccomp-delivery.d.ts +46 -0
- 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 +5 -5
- 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-7NQ7HJ3E.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-GMSRRJ53.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/dist/chunk-SGC7LSHF.cjs
DELETED
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
var chunkHU666T3Q_cjs = require('./chunk-HU666T3Q.cjs');
|
|
4
|
-
|
|
5
|
-
// src/providers.ts
|
|
6
|
-
function listProviders2() {
|
|
7
|
-
chunkHU666T3Q_cjs.registerBuiltins();
|
|
8
|
-
return chunkHU666T3Q_cjs.listProviders();
|
|
9
|
-
}
|
|
10
|
-
function getProviderProfile2(name) {
|
|
11
|
-
chunkHU666T3Q_cjs.registerBuiltins();
|
|
12
|
-
return chunkHU666T3Q_cjs.getProviderProfile(name);
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
exports.getProviderProfile = getProviderProfile2;
|
|
16
|
-
exports.listProviders = listProviders2;
|
|
17
|
-
//# sourceMappingURL=chunk-SGC7LSHF.cjs.map
|
|
18
|
-
//# sourceMappingURL=chunk-SGC7LSHF.cjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/errors-base.ts","../src/internal/error-mappers/default-retriable.ts","../src/task-errors.ts","../src/errors.ts"],"names":["red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AAM,CAAA;AAAA,EAC9E;AACF","file":"chunk-UNFBHV46.cjs","sourcesContent":["/**\n * The root of the SDK error hierarchy, and the two types it is built from.\n *\n * A LEAF module on purpose: every other error in this package extends `TheokitAgentError`, and\n * `errors.ts` re-exports the ones that live in their own files. If the root lived in that catalogue,\n * each sibling would import it from a file that imports the sibling — a cycle madge reports and\n * `tests/architecture/no-cycles-at-all.test.ts` fails on. `types/messages-base.ts` exists for the\n * same reason, one layer over.\n *\n * Re-exported from `errors.ts`, so `@theokit/sdk/errors` is unchanged and consumers keep catching\n * `TheokitAgentError` from where the README tells them to.\n *\n * NOTE ON THE MODULE TAG: this header deliberately carries no internal-visibility tag, and does not\n * even name one — TypeScript attaches a file-leading docblock to the FIRST declaration below it, and\n * `stripInternal: true` (tsconfig.base) then deletes that declaration from the emitted `.d.ts`.\n * `tsc --noEmit` stays clean and the declaration rollup fails with `\"X\" is not exported by \"...\"`.\n * Measured twice on this file on 2026-09-01: once with the tag, and again when the comment\n * EXPLAINING the trap quoted the tag verbatim and re-armed it.\n */\n\n/**\n * Finite, machine-readable error codes for provider-originated errors\n * (ADR D66). Consumers can `switch (err.metadata?.code)` exhaustively\n * — adding a new variant is an explicit decision + test coverage.\n *\n * @public\n */\nexport type ErrorCode =\n | \"rate_limit\"\n | \"auth_failed\"\n | \"invalid_request\"\n | \"timeout\"\n | \"server_error\"\n | \"context_too_long\"\n | \"content_filtered\"\n | \"model_unavailable\"\n | \"network\"\n | \"quota_exceeded\"\n | \"unknown\";\n/**\n * Structured context for errors that originated from a provider HTTP\n * call (ADR D65). Lets callers retry with the right backoff (`retryAfter`),\n * surface actionable diagnostics (`provider`, `endpoint`), and inspect the\n * raw response body when needed (`raw`, capped at ~2KB by the mapper).\n *\n * @public\n */\nexport interface ErrorMetadata {\n /** Provider canonical name (e.g., `\"anthropic\"`, `\"openai\"`, `\"openrouter\"`, `\"gemini\"`). */\n provider: string;\n /** HTTP endpoint that failed (e.g., `\"/v1/messages\"`, `\"/v1/chat/completions\"`). */\n endpoint: string;\n /** Machine-readable error code (finite enum). */\n code: ErrorCode;\n /** HTTP status code if applicable. */\n statusCode?: number;\n /** Seconds to wait before retry, per provider's `retry-after` header (numeric form only). */\n retryAfter?: number;\n /** Raw response body for debugging (truncated to ~2KB by the mapper). */\n raw?: unknown;\n}\n/**\n * Base class for all errors thrown by `@theokit/sdk`.\n *\n * Use `isRetryable` to drive retry/backoff logic. `code` and `protoErrorCode`\n * are populated for server-originated errors when available. `metadata`\n * (ADR D65) carries structured `{ provider, endpoint, code, ... }` when\n * the error originated from a provider HTTP call.\n *\n * @public\n */\nexport class TheokitAgentError extends Error {\n override readonly name: string = \"TheokitAgentError\";\n readonly isRetryable: boolean;\n readonly code?: string;\n readonly protoErrorCode?: string;\n readonly metadata?: ErrorMetadata;\n\n constructor(\n message: string,\n options: {\n isRetryable?: boolean;\n code?: string;\n protoErrorCode?: string;\n cause?: unknown;\n metadata?: ErrorMetadata;\n } = {},\n ) {\n super(message, options.cause !== undefined ? { cause: options.cause } : undefined);\n this.isRetryable = options.isRetryable ?? false;\n if (options.code !== undefined) this.code = options.code;\n if (options.protoErrorCode !== undefined) this.protoErrorCode = options.protoErrorCode;\n if (options.metadata !== undefined) this.metadata = options.metadata;\n }\n}\n","/**\n * Default retryability verdict for an `AgentRunError` code.\n *\n * Extracted from `errors.ts` (G8 LoC budget — SRP). The parameter is typed\n * `string` (not the `AgentRunErrorCode` union) deliberately: this is a leaf\n * with NO import back into `errors.ts`, so it cannot form an import cycle. The\n * `default` branch makes the behavior identical to the typed switch.\n *\n * @internal\n */\nexport function defaultRetriableForCode(code: string): boolean {\n switch (code) {\n case \"rate_limit\":\n case \"timeout\":\n case \"server_error\":\n case \"network\":\n case \"provider_unreachable\":\n return true;\n default:\n return false;\n }\n}\n","/**\n * Errors raised by the Task API (`src/task.ts`).\n *\n * One actor, one module: these three are about task identity and task lifecycle, and they change\n * when the Task surface changes rather than when the agent-run surface does. They extend\n * `TheokitAgentError` like every other error in this package — the hierarchy is the contract, and\n * `tests/lint/every-error-is-in-the-hierarchy.test.ts` enforces it wherever the class lives.\n *\n * Re-exported from `errors.ts`, so `@theokit/sdk/errors` still names every error in one place.\n *\n * NOTE ON THE MODULE TAG: this header deliberately carries no internal-visibility tag, and does not\n * even name one — TypeScript attaches a file-leading docblock to the FIRST declaration below it, and\n * `stripInternal: true` (tsconfig.base) then deletes that declaration from the emitted `.d.ts`.\n * `tsc --noEmit` stays clean and the declaration rollup fails with `\"X\" is not exported by \"...\"`.\n * Measured twice on this file on 2026-09-01: once with the tag, and again when the comment\n * EXPLAINING the trap quoted the tag verbatim and re-armed it.\n */\n\nimport { TheokitAgentError } from \"./errors-base.js\";\n\n/**\n * Thrown when a user-supplied task ID violates the grammar\n * `^[a-z0-9][a-z0-9_-]*$` (D368) OR starts with a reserved adapter\n * prefix (`wf-` / `b-` / `cron-`, EC-5).\n *\n * @public\n */\nexport class InvalidTaskIdError extends TheokitAgentError {\n override readonly name: string = \"InvalidTaskIdError\";\n readonly taskId: string;\n\n constructor(message: string, taskId: string, options: { cause?: unknown } = {}) {\n super(message, {\n ...options,\n isRetryable: false,\n code: \"invalid_task_id\",\n });\n this.taskId = taskId;\n }\n}\n\n/**\n * Thrown when `Task.subscribe(id)` is called for a task that has been\n * evicted, never submitted, or evicted after retention (D373).\n *\n * @public\n */\nexport class TaskNotFoundError extends TheokitAgentError {\n override readonly name: string = \"TaskNotFoundError\";\n readonly taskId: string;\n\n constructor(taskId: string, options: { cause?: unknown } = {}) {\n super(`Task not found: ${taskId}`, {\n ...options,\n isRetryable: false,\n code: \"task_not_found\",\n });\n this.taskId = taskId;\n }\n}\n\n/**\n * Thrown when `CloudAgent` is asked to wrap a task (D370). Cloud\n * task observability is deferred until Theo PaaS GA.\n *\n * @public\n */\nexport class UnsupportedTaskOperationError extends TheokitAgentError {\n override readonly name: string = \"UnsupportedTaskOperationError\";\n readonly operation: string;\n\n constructor(operation: string, options: { cause?: unknown } = {}) {\n super(\n `Task operation \"${operation}\" is not supported on CloudAgent (pre-release; see ADR D370)`,\n {\n ...options,\n isRetryable: false,\n code: \"task_op_unsupported\",\n },\n );\n this.operation = operation;\n }\n}\n","/**\n * Published as `@theokit/sdk/errors`.\n */\n// The hierarchy ROOT lives in a leaf module so a sibling error module can extend it without\n// importing this catalogue — which is a cycle, since this file re-exports those siblings. Same\n// remedy as `types/messages-base.ts` for the same shape. Re-exported below, so\n// `@theokit/sdk/errors` is unchanged.\n\nimport { type ErrorCode, type ErrorMetadata, TheokitAgentError } from \"./errors-base.js\";\n\nexport type { ErrorCode, ErrorMetadata };\n// Re-exported by NAME rather than with `export ... from`, and the difference is not cosmetic:\n// rollup-plugin-dts refused the combined form with `\"ErrorCode\" is not exported by\n// \"src/errors-base.ts\"` while `tsc --noEmit` was clean — the same class of failure\n// `StructuredOutputError` below records, and the reason the declaration rollup has to be run\n// before believing a split is done.\nexport { TheokitAgentError };\n\nimport { readEnv } from \"./internal/env.js\";\nimport { defaultRetriableForCode } from \"./internal/error-mappers/default-retriable.js\";\nimport { redactSecrets } from \"./internal/security/redact.js\";\nimport type { RunOperation } from \"./types/run.js\";\n\n/**\n * T1.1 — closed literal union for `AgentRunError.code`. The previous\n * `(string & {})` escape hatch let arbitrary strings slip into the type\n * surface and defeated exhaustive `switch (code)` discrimination. This is\n * the canonical closed form. `AgentRunErrorCode` is re-aliased below for\n * source-level back-compat.\n *\n * Superset of {@link ErrorCode}, extended with codes that do NOT originate from a\n * provider HTTP response (Production-Readiness #3, ADR D311):\n *\n * - `quota_exceeded` — billing limit hit (provider 402 or signalled error)\n * - `tool_runtime_error` — custom tool handler threw inside dispatch\n * - `aborted` — caller's `AbortSignal` fired (Phase 4)\n * - `invalid_model` — model id rejected by provider (400 \"model not found\")\n * - `safety_blocked` — provider safety filter blocked req or resp\n * - `provider_unreachable` — DNS/TCP/timeout/5xx at transport boundary\n *\n * Adding a new code: append the literal here AND audit every `switch (err.code)`\n * in callers. Type-checker enforces the audit via the `default: assertNever(code)`\n * convention.\n *\n * @public\n */\nexport type KnownAgentRunErrorCode =\n | ErrorCode\n | \"quota_exceeded\"\n | \"tool_runtime_error\"\n | \"aborted\"\n | \"invalid_model\"\n | \"safety_blocked\"\n | \"provider_unreachable\";\n\n/**\n * Back-compat alias of {@link KnownAgentRunErrorCode}. Pre-T1.1 callers that\n * imported `AgentRunErrorCode` keep working; new code SHOULD prefer\n * `KnownAgentRunErrorCode` to make the closed-union intent explicit.\n *\n * @public\n */\nexport type AgentRunErrorCode = KnownAgentRunErrorCode;\n\n/** Snapshot of every known code at runtime — used by the boundary coercer. */\nconst KNOWN_AGENT_RUN_ERROR_CODES = new Set<string>([\n \"rate_limit\",\n \"auth_failed\",\n \"invalid_request\",\n \"timeout\",\n \"server_error\",\n \"context_too_long\",\n \"content_filtered\",\n \"model_unavailable\",\n \"network\",\n \"unknown\",\n \"quota_exceeded\",\n \"tool_runtime_error\",\n \"aborted\",\n \"invalid_model\",\n \"safety_blocked\",\n \"provider_unreachable\",\n]);\n\n/**\n * T1.1 boundary helper — coerce an arbitrary string (typically arriving from\n * a downstream `RunErrorDetail.code` or a deserialized cloud response) into a\n * `KnownAgentRunErrorCode`.\n *\n * A string that is not one of the known codes collapses to `\"unknown\"`, and so\n * does `undefined` — the parameter is optional precisely so a caller can forward\n * an absent `code` without a guard. The closed type contract therefore holds at\n * the boundary without forcing every caller to switch.\n *\n * This is the migration path the 4.x release notes point at for code that used\n * to rely on `AgentRunErrorCode` being an open string union.\n *\n * @public\n */\nexport function coerceToKnownAgentRunErrorCode(code: string | undefined): KnownAgentRunErrorCode {\n if (code !== undefined && KNOWN_AGENT_RUN_ERROR_CODES.has(code)) {\n return code as KnownAgentRunErrorCode;\n }\n return \"unknown\";\n}\n\n/**\n * Invalid API key, not logged in, insufficient permissions.\n *\n * @public\n */\nexport class AuthenticationError extends TheokitAgentError {\n override readonly name: string = \"AuthenticationError\";\n\n constructor(\n message: string,\n options: { code?: string; cause?: unknown; metadata?: ErrorMetadata } = {},\n ) {\n super(message, { ...options, isRetryable: false });\n }\n}\n\n/**\n * Too many requests or usage limits exceeded.\n *\n * @public\n */\nexport class RateLimitError extends TheokitAgentError {\n override readonly name: string = \"RateLimitError\";\n\n constructor(\n message: string,\n options: { code?: string; cause?: unknown; metadata?: ErrorMetadata } = {},\n ) {\n super(message, { ...options, isRetryable: true });\n }\n}\n\n/**\n * Invalid model, bad request parameters, malformed options.\n *\n * @public\n */\nexport class ConfigurationError extends TheokitAgentError {\n override readonly name: string = \"ConfigurationError\";\n\n constructor(\n message: string,\n options: { code?: string; cause?: unknown; metadata?: ErrorMetadata } = {},\n ) {\n super(message, { ...options, isRetryable: false });\n }\n}\n\n/**\n * Thrown when creating a cloud agent for a repo whose SCM provider is not\n * connected. Use `helpUrl` to point the user at the right reconnect flow.\n *\n * @public\n */\nexport class IntegrationNotConnectedError extends ConfigurationError {\n override readonly name: string = \"IntegrationNotConnectedError\";\n readonly provider: string;\n readonly helpUrl: string;\n\n constructor(\n message: string,\n options: {\n provider: string;\n helpUrl: string;\n code?: string;\n cause?: unknown;\n metadata?: ErrorMetadata;\n },\n ) {\n super(message, options);\n this.provider = options.provider;\n this.helpUrl = options.helpUrl;\n }\n}\n\n/**\n * Service unavailable, timeout, transport-level failure.\n *\n * @public\n */\nexport class NetworkError extends TheokitAgentError {\n override readonly name: string = \"NetworkError\";\n\n constructor(\n message: string,\n options: { code?: string; cause?: unknown; metadata?: ErrorMetadata } = {},\n ) {\n super(message, { ...options, isRetryable: true });\n }\n}\n\n/**\n * Catch-all for unclassified server or runtime errors.\n *\n * @public\n */\nexport class UnknownAgentError extends TheokitAgentError {\n override readonly name: string = \"UnknownAgentError\";\n\n constructor(\n message: string,\n options: { code?: string; cause?: unknown; metadata?: ErrorMetadata } = {},\n ) {\n super(message, { ...options, isRetryable: false });\n }\n}\n\n/**\n * Thrown by `Agent.prompt` (and helpers that go through `run.wait()`) when\n * the option `{ throwOnError: true }` is set and the run terminates with\n * `status: 'error'`. Carries the structured `RunResult.error` fields so\n * callers can `catch` once and branch on `code` / `provider` instead of\n * unwrapping the run.\n *\n * Extends {@link TheokitAgentError} per ADR D65 — no new hierarchy.\n *\n * @example\n * try {\n * await Agent.prompt(msg, { apiKey, model, throwOnError: true });\n * } catch (err) {\n * if (err instanceof AgentRunError && err.code === 'auth_failed') {\n * // bad key\n * }\n * }\n *\n * @public\n */\nexport class AgentRunError extends TheokitAgentError {\n override readonly name: string = \"AgentRunError\";\n readonly provider?: string;\n readonly raw?: string;\n /** Provider's request id (`x-request-id` / `request-id` header). Useful for support tickets. */\n readonly requestId?: string;\n /** SDK conversation id this error was raised inside. */\n readonly conversationId?: string;\n\n constructor(\n message: string,\n options: {\n code: AgentRunErrorCode;\n provider?: string;\n raw?: string;\n requestId?: string;\n conversationId?: string;\n retriable?: boolean;\n cause?: unknown;\n metadata?: ErrorMetadata;\n },\n ) {\n super(message, {\n code: options.code,\n cause: options.cause,\n metadata: options.metadata,\n // D311: most AgentRunErrors are not retriable (auth, validation, abort).\n // Provider mappers (D314) override per-status — explicit `retriable` wins\n // over the implicit default when supplied.\n isRetryable: options.retriable ?? defaultRetriableForCode(options.code),\n });\n if (options.provider !== undefined) this.provider = options.provider;\n if (options.raw !== undefined) this.raw = options.raw;\n if (options.requestId !== undefined) this.requestId = options.requestId;\n if (options.conversationId !== undefined) this.conversationId = options.conversationId;\n }\n\n /**\n * Production-Readiness #3 (ADR D311): alias for `isRetryable` exposed as\n * `retriable` to match the handoff contract. Future v2 will deprecate\n * `isRetryable` in favor of this.\n */\n get retriable(): boolean {\n return this.isRetryable;\n }\n\n /**\n * D312: provider's `Retry-After` header in **milliseconds**. Mappers store\n * the header value (seconds) in `metadata.retryAfter`; this getter\n * multiplies by 1000 so the result composes with `Date.now()`/`setTimeout`.\n *\n * Returns `undefined` when no hint was provided. `0` is a legitimate value\n * — use `=== undefined` check rather than truthy check.\n */\n get retryAfterMs(): number | undefined {\n if (this.metadata?.retryAfter === undefined) return undefined;\n return this.metadata.retryAfter * 1000;\n }\n\n /**\n * D313 + T1.5: alias for `metadata.raw`. Provider response body for\n * debugging. T1.5 wraps the value in `redactSecrets` at the getter\n * boundary so secret-shaped substrings (`sk-...`, Bearer JWTs, etc.) are\n * stripped before reaching the caller. Available but NEVER serialized\n * into `.message` (anti-leak invariant).\n */\n get providerError(): unknown {\n const raw = this.metadata?.raw;\n if (raw === undefined) return undefined;\n if (typeof raw === \"string\") return redactSecrets(raw);\n // Non-string raw (object/buffer) — stringify then redact.\n try {\n return redactSecrets(JSON.stringify(raw));\n } catch {\n return redactSecrets(String(raw));\n }\n }\n\n /**\n * T1.5 — sanitized JSON form. `metadata.raw` is OMITTED by default; opt\n * in via `THEOKIT_DEBUG_RAW_ERRORS=1` to surface the (redacted) raw\n * payload for diagnostics. Every other field stays accessible.\n *\n * The single env-var gate is read each call so operators can toggle at\n * runtime without restarting the process.\n */\n toJSON(): Record<string, unknown> {\n const json: Record<string, unknown> = {\n name: this.name,\n message: this.message,\n isRetryable: this.isRetryable,\n };\n addOptionalFields(json, this);\n const safeMeta = sanitizeMetadata(this.metadata);\n if (safeMeta !== undefined) json.metadata = safeMeta;\n return json;\n }\n}\n\nfunction addOptionalFields(json: Record<string, unknown>, err: AgentRunError): void {\n if (err.code !== undefined) json.code = err.code;\n if (err.provider !== undefined) json.provider = err.provider;\n if (err.requestId !== undefined) json.requestId = err.requestId;\n if (err.conversationId !== undefined) json.conversationId = err.conversationId;\n if (err.raw !== undefined) json.raw = redactSecrets(err.raw);\n}\n\nfunction sanitizeMetadata(meta: ErrorMetadata | undefined): ErrorMetadata | undefined {\n if (meta === undefined) return undefined;\n const { raw, ...rest } = meta;\n const debugRaw = readEnv(\"THEOKIT_DEBUG_RAW_ERRORS\") === \"1\";\n if (debugRaw && raw !== undefined) {\n const redactedRaw =\n typeof raw === \"string\" ? redactSecrets(raw) : redactSecrets(safeStringify(raw));\n return { ...rest, raw: redactedRaw } as ErrorMetadata;\n }\n return rest as ErrorMetadata;\n}\n\nfunction safeStringify(value: unknown): string {\n try {\n return JSON.stringify(value);\n } catch {\n return String(value);\n }\n}\n\n/**\n * Is this error transient (worth retrying)?\n *\n * Returns the SDK's own retryability verdict: every {@link TheokitAgentError}\n * subclass computes `isRetryable` at construction (rate-limit / network /\n * credential-pool-exhausted are retryable; auth / configuration / unsupported\n * are not), so this predicate is a single source of truth rather than a\n * re-derivation. Non-SDK errors return `false` conservatively — wrap a foreign\n * error in the appropriate SDK error first if you want it considered transient.\n * It never inspects `err.message`.\n *\n * @example\n * try {\n * await agent.send(message, { throwOnError: true });\n * } catch (err) {\n * if (isTransientError(err)) return retryWithBackoff();\n * throw err;\n * }\n *\n * @public\n */\nexport function isTransientError(err: unknown): boolean {\n return err instanceof TheokitAgentError && err.isRetryable === true;\n}\n\n/**\n * Thrown when a {@link Run} or agent operation is not available on the current\n * runtime. Check first with `run.supports(operation)`.\n *\n * Extends {@link TheokitAgentError} (so error-catching code that branches on\n * `instanceof TheokitAgentError` continues to work) but is never retryable —\n * an unsupported operation will not become supported on retry.\n *\n * @public\n */\nexport class UnsupportedRunOperationError extends TheokitAgentError {\n override readonly name: string = \"UnsupportedRunOperationError\";\n readonly operation: RunOperation;\n\n constructor(\n message: string,\n operation: RunOperation,\n options: { code?: string; cause?: unknown } = {},\n ) {\n super(message, {\n ...options,\n isRetryable: false,\n code: options.code ?? \"unsupported_run_operation\",\n });\n this.operation = operation;\n }\n}\n\n/**\n * Thrown when every credential in a per-provider pool is in cooldown\n * and no healthy key is available (ADR D133). The caller's\n * {@link import(\"./internal/llm/fallback-client.js\").FallbackLlmClient}\n * catches this and tries the next provider in the fallback chain.\n *\n * `metadata.nextRetryAt` (epoch ms) tells callers when the soonest\n * pool entry resumes — useful for manual retry scheduling.\n *\n * @public\n */\nexport class CredentialPoolExhaustedError extends TheokitAgentError {\n override readonly name: string = \"CredentialPoolExhaustedError\";\n readonly provider: string;\n readonly nextRetryAt: number | undefined;\n\n constructor(\n message: string,\n options: {\n provider: string;\n nextRetryAt?: number;\n code?: string;\n cause?: unknown;\n metadata?: ErrorMetadata;\n },\n ) {\n super(message, {\n ...options,\n isRetryable: true,\n code: options.code ?? \"credential_pool_exhausted\",\n });\n this.provider = options.provider;\n this.nextRetryAt = options.nextRetryAt;\n }\n}\n\n/**\n * Finite error codes specific to memory adapter operations (ADR D141).\n *\n * @public\n */\nexport type MemoryAdapterErrorCode =\n | \"auth_failed\"\n | \"rate_limited\"\n | \"not_found\"\n | \"network\"\n | \"invalid_input\"\n | \"unknown\";\n\n/**\n * Error raised by `@theokit-memory-*` adapters. Carries `adapterId`\n * so callers can branch on which provider failed (ADR D141).\n *\n * @public\n */\nexport class MemoryAdapterError extends TheokitAgentError {\n override readonly name: string = \"MemoryAdapterError\";\n readonly adapterId: string;\n\n constructor(\n message: string,\n options: {\n adapterId: string;\n code: MemoryAdapterErrorCode;\n cause?: unknown;\n metadata?: ErrorMetadata;\n },\n ) {\n super(message, {\n isRetryable: options.code === \"rate_limited\" || options.code === \"network\",\n code: options.code,\n ...(options.cause !== undefined ? { cause: options.cause } : {}),\n ...(options.metadata !== undefined ? { metadata: options.metadata } : {}),\n });\n this.adapterId = options.adapterId;\n }\n}\n\n/**\n * Thrown by `Budget` enforcement (ADR D386) when a `mode: \"block\"`\n * budget would be exceeded by the upcoming LLM call. The caller catches a\n * typed error to retry after the window resets, or surfaces it to the user.\n *\n * @public\n */\nexport class BudgetExceededError extends TheokitAgentError {\n override readonly name: string = \"BudgetExceededError\";\n readonly budgetName: string;\n readonly window: import(\"./types/budget.js\").BudgetWindow;\n readonly spentUsd: number;\n readonly limitUsd: number;\n readonly mode: import(\"./types/budget.js\").BudgetMode;\n\n constructor(args: {\n budgetName: string;\n window: import(\"./types/budget.js\").BudgetWindow;\n spentUsd: number;\n limitUsd: number;\n mode: import(\"./types/budget.js\").BudgetMode;\n cause?: unknown;\n }) {\n super(\n `Budget \"${args.budgetName}\" exceeded for window ${args.window}: spent $${args.spentUsd.toFixed(4)} > limit $${args.limitUsd.toFixed(4)}`,\n {\n ...(args.cause !== undefined ? { cause: args.cause } : {}),\n isRetryable: false,\n code: \"budget_exceeded\",\n },\n );\n this.budgetName = args.budgetName;\n this.window = args.window;\n this.spentUsd = args.spentUsd;\n this.limitUsd = args.limitUsd;\n this.mode = args.mode;\n }\n}\n\n/**\n * T1.6 — Thrown when a consumer calls `agent.send()` or any method\n * on an agent that has already been `dispose()`d. Pre-T1.6 this was\n * a generic `new Error(\"Agent has been disposed\")` — consumers\n * couldn't catch it without string-matching the message.\n *\n * @public\n */\nexport class AgentDisposedError extends TheokitAgentError {\n override readonly name: string = \"AgentDisposedError\";\n readonly agentId: string;\n\n constructor(agentId: string) {\n super(`Agent \"${agentId}\" has been disposed. Create a new agent or use Agent.resume().`, {\n isRetryable: false,\n code: \"agent_disposed\",\n });\n this.agentId = agentId;\n }\n}\n\n/**\n * Thrown when a budget operation is requested on a `CloudAgent` (D388). The cloud budget surface\n * waits for Theo PaaS GA, so the operation is not merely failing — it does not exist yet.\n *\n * Not retryable: `isRetryable` is `false`, and retrying cannot change the outcome until the\n * feature ships. Catch it by `instanceof`, or by `code === \"budget_op_unsupported\"` when the\n * error has crossed a serialization boundary that dropped the prototype. `operation` carries the\n * name that was refused and is interpolated into the message.\n *\n * The local agent does not raise this — the same call against a local agent runs the budget path\n * normally.\n *\n * @public\n */\nexport class UnsupportedBudgetOperationError extends TheokitAgentError {\n override readonly name: string = \"UnsupportedBudgetOperationError\";\n readonly operation: string;\n\n constructor(operation: string, options: { cause?: unknown } = {}) {\n super(\n `Budget operation \"${operation}\" is not supported on CloudAgent (pre-release; see ADR D388)`,\n {\n ...options,\n isRetryable: false,\n code: \"budget_op_unsupported\",\n },\n );\n this.operation = operation;\n }\n}\n\n/**\n * Why a structured-output call failed.\n *\n * A named union rather than a repeated inline one: the narrow form was written out at the class AND\n * in `agent-generate.ts`'s local type, so widening it meant finding both. One name, one edit.\n *\n * @public\n */\nexport type StructuredOutputErrorCode =\n /** The model did not call the forced output tool. The original meaning, unchanged. */\n | \"no_tool_call\"\n /** The tool was called and its arguments did not parse against the schema. */\n | \"parse_failed\"\n /** The agent run errored before there was an answer to structure. */\n | \"upstream_run_failed\"\n /** The agent run was cancelled before there was an answer to structure. */\n | \"run_cancelled\"\n /** The loop finished with tools only and produced no text to structure. */\n | \"no_text_answer\";\n\n/**\n * The failure contract shared by `generateObject` and `streamObject`.\n *\n * Both entry points run the same rule — up to `maxRetries` attempts; if the model never called the\n * output tool, fail as `no_tool_call`, naming the underlying run error when there was one; if the\n * schema never parsed, fail as `parse_failed` — and both declared their own error class for it, with\n * byte-identical user-facing strings. A change to the taxonomy or the wording had to be made twice,\n * or the two APIs would start describing the same failure differently.\n *\n * It extends `TheokitAgentError` because every typed error the SDK publishes does, and these two did\n * not: a consumer catching `TheokitAgentError` — the documented way to catch anything this SDK throws\n * — silently missed both, and neither carried `isRetryable`.\n *\n * It lives HERE rather than beside the two entry points because it is an error class and this is the\n * error module. The first home was `internal/structured-output-helpers.ts`, and rollup-plugin-dts\n * could not resolve it from there when bundling the root declaration — a failure `tsc --noEmit`\n * does not see, because it never runs the declaration rollup.\n *\n * `isRetryable` is false. Both codes mean the model did not produce the requested shape; the caller's\n * own `maxRetries` has already been spent by the time either is thrown, so an outer retry loop would\n * re-run a sequence that already gave up.\n *\n * The two public names stay DISTINCT subclasses rather than aliases of this one. Collapsing them\n * would make `streamObjectError instanceof GenerateObjectError` true, which is a semantic widening\n * nobody asked for; the duplication being removed is the contract, not the identity.\n *\n * @public\n */\n\nexport class StructuredOutputError extends TheokitAgentError {\n override readonly name: string = \"StructuredOutputError\";\n /**\n * Why the structuring failed.\n *\n * Three of these are new, and they name causes the SDK ALREADY distinguished in prose while\n * reporting all three as `no_tool_call`: an upstream run that errored, a run that was cancelled,\n * and a tool-only completion with no text to structure. Three tests asserted the byte-identical\n * oracle for three genuinely different setups — swap any two and all three still passed — because\n * the only thing that differed was the free-text message.\n *\n * `no_tool_call` keeps its original meaning: the model did not call the forced output tool.\n */\n override readonly code:\n | \"no_tool_call\"\n | \"parse_failed\"\n | \"upstream_run_failed\"\n | \"run_cancelled\"\n | \"no_text_answer\";\n\n constructor(\n code:\n | \"no_tool_call\"\n | \"parse_failed\"\n | \"upstream_run_failed\"\n | \"run_cancelled\"\n | \"no_text_answer\",\n message: string,\n cause?: unknown,\n ) {\n super(message, { code, isRetryable: false, ...(cause === undefined ? {} : { cause }) });\n this.code = code;\n }\n}\n\n// The three Task-API errors live beside the API they belong to (`task-errors.ts`), and are\n// re-exported here so `@theokit/sdk/errors` keeps naming every error in one place. They are one\n// ACTOR — the Task surface — not a slice cut to fit a line budget; the budget is what made the\n// grouping visible, and `StructuredOutputError` above shows the opposite case, a class that must\n// stay in this file because rollup-plugin-dts could not resolve it elsewhere.\nexport {\n InvalidTaskIdError,\n TaskNotFoundError,\n UnsupportedTaskOperationError,\n} from \"./task-errors.js\";\n\n/**\n * Compression of a conversation failed. Declared HERE rather than re-exported from the module\n * that throws it: this file is imported by 45 modules, and a re-export from `internal/` was the\n * only one in the file — it closed `errors -> summarizer -> compaction -> errors`, which madge\n * rejects. Every other domain error is declared in this file for the same reason.\n *\n * Thrown when the compression LLM call fails or returns an empty / ineffective summary. The\n * caller catches it and handles the ADR D440 failure mode: WARN, keep the original\n * conversation, bump the counter.\n *\n * A typed error nobody can import is a message string with extra ceremony:\n * `catch (e) { if (e instanceof CompressionFailedError) }` is the entire reason it exists rather\n * than a string comparison, and that line did not compile for any consumer before this export.\n *\n * @public\n */\nexport class CompressionFailedError extends TheokitAgentError {\n override readonly name = \"CompressionFailedError\";\n\n constructor(message: string, options: { cause?: unknown } = {}) {\n // Retryable: both throw sites are about ONE LLM call that failed or came back empty, which is\n // the transient shape the SDK's retry layer exists for.\n super(message, { ...options, code: \"compression_failed\", isRetryable: true });\n }\n}\n"]}
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
export { COMPACT_SUMMARY_MARKER, COMPACT_USER_MESSAGE_MAX_TOKENS, DEFAULT_PRE_COMPACT_TIMEOUT_MS, autoCompactIfNeeded, buildDefaultSummarizer, compactSessionTranscript, isCompactSummary, resolveSummarizerRoute, shouldAutoCompact } from './chunk-BBJ77S62.js';
|
|
2
|
-
import './chunk-SUVCHX4L.js';
|
|
3
|
-
import './chunk-2XC6KDJM.js';
|
|
4
|
-
import './chunk-JLIRFWUG.js';
|
|
5
|
-
import './chunk-24MGQDK3.js';
|
|
6
|
-
import './chunk-FD2UT76F.js';
|
|
7
|
-
import './chunk-FJWQP6EE.js';
|
|
8
|
-
import './chunk-NAF4L3T6.js';
|
|
9
|
-
import './chunk-5DD4NJN3.js';
|
|
10
|
-
import './chunk-UKMBRMGT.js';
|
|
11
|
-
import './chunk-FTZTZBCU.js';
|
|
12
|
-
import './chunk-Q5EWJPRY.js';
|
|
13
|
-
import './chunk-3JHIFQ4I.js';
|
|
14
|
-
import './chunk-GMRFAX4I.js';
|
|
15
|
-
import './chunk-R7WIIPUR.js';
|
|
16
|
-
import './chunk-SVCPJRUB.js';
|
|
17
|
-
import './chunk-AGACYRJ2.js';
|
|
18
|
-
import './chunk-TX56N7FR.js';
|
|
19
|
-
import './chunk-5Q4RTLMP.js';
|
|
20
|
-
import './chunk-H3CVJSFC.js';
|
|
21
|
-
import './chunk-Q7GYMXVC.js';
|
|
22
|
-
import './chunk-B5MHRQJZ.js';
|
|
23
|
-
import './chunk-CZJ6Q7CW.js';
|
|
24
|
-
//# sourceMappingURL=compact-session-4HAUP3HK.js.map
|
|
25
|
-
//# sourceMappingURL=compact-session-4HAUP3HK.js.map
|
package/dist/context-3FZRAO5K.js
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
export { currentPersonalityContext, warnPersonalitySwitchInsideFork, withPersonalityContext } from './chunk-ZHWKT2NI.js';
|
|
2
|
-
import './chunk-OPAKPEPG.js';
|
|
3
|
-
import './chunk-X7EUUHXU.js';
|
|
4
|
-
import './chunk-B5MHRQJZ.js';
|
|
5
|
-
import './chunk-CZJ6Q7CW.js';
|
|
6
|
-
//# sourceMappingURL=context-3FZRAO5K.js.map
|
|
7
|
-
//# sourceMappingURL=context-3FZRAO5K.js.map
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
var chunkKIKKTW5O_cjs = require('./chunk-KIKKTW5O.cjs');
|
|
4
|
-
require('./chunk-N6OEX5TN.cjs');
|
|
5
|
-
require('./chunk-TY56BKSK.cjs');
|
|
6
|
-
require('./chunk-UNFBHV46.cjs');
|
|
7
|
-
require('./chunk-6LHQPOMI.cjs');
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
Object.defineProperty(exports, "currentPersonalityContext", {
|
|
12
|
-
enumerable: true,
|
|
13
|
-
get: function () { return chunkKIKKTW5O_cjs.currentPersonalityContext; }
|
|
14
|
-
});
|
|
15
|
-
Object.defineProperty(exports, "warnPersonalitySwitchInsideFork", {
|
|
16
|
-
enumerable: true,
|
|
17
|
-
get: function () { return chunkKIKKTW5O_cjs.warnPersonalitySwitchInsideFork; }
|
|
18
|
-
});
|
|
19
|
-
Object.defineProperty(exports, "withPersonalityContext", {
|
|
20
|
-
enumerable: true,
|
|
21
|
-
get: function () { return chunkKIKKTW5O_cjs.withPersonalityContext; }
|
|
22
|
-
});
|
|
23
|
-
//# sourceMappingURL=context-B5J4GX2F.cjs.map
|
|
24
|
-
//# sourceMappingURL=context-B5J4GX2F.cjs.map
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
export { FsSessionStore } from './chunk-IZDDSLL2.js';
|
|
2
|
-
import './chunk-GTX6FEDP.js';
|
|
3
|
-
import './chunk-FTZTZBCU.js';
|
|
4
|
-
import './chunk-7KIN3L2S.js';
|
|
5
|
-
import './chunk-RGQICWFU.js';
|
|
6
|
-
import './chunk-Q5EWJPRY.js';
|
|
7
|
-
import './chunk-3JHIFQ4I.js';
|
|
8
|
-
import './chunk-B5MHRQJZ.js';
|
|
9
|
-
import './chunk-CZJ6Q7CW.js';
|
|
10
|
-
//# sourceMappingURL=fs-session-store-3VI4CPTX.js.map
|
|
11
|
-
//# sourceMappingURL=fs-session-store-3VI4CPTX.js.map
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
var chunkNQVWSSX2_cjs = require('./chunk-NQVWSSX2.cjs');
|
|
4
|
-
require('./chunk-NKIQTLFA.cjs');
|
|
5
|
-
require('./chunk-ZWACQM5U.cjs');
|
|
6
|
-
require('./chunk-R5YPDAKD.cjs');
|
|
7
|
-
require('./chunk-ASK2OQM5.cjs');
|
|
8
|
-
require('./chunk-ZF2LDKQQ.cjs');
|
|
9
|
-
require('./chunk-JLRLCBJ4.cjs');
|
|
10
|
-
require('./chunk-UNFBHV46.cjs');
|
|
11
|
-
require('./chunk-6LHQPOMI.cjs');
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
Object.defineProperty(exports, "FsSessionStore", {
|
|
16
|
-
enumerable: true,
|
|
17
|
-
get: function () { return chunkNQVWSSX2_cjs.FsSessionStore; }
|
|
18
|
-
});
|
|
19
|
-
//# sourceMappingURL=fs-session-store-IQ6PEHYF.cjs.map
|
|
20
|
-
//# sourceMappingURL=fs-session-store-IQ6PEHYF.cjs.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
export { GenerateObjectError, generateObjectImpl } from './chunk-26NEAJ6T.js';
|
|
2
|
-
import './chunk-KO6SHCEH.js';
|
|
3
|
-
import './chunk-7I5Z3UBJ.js';
|
|
4
|
-
import './chunk-B5MHRQJZ.js';
|
|
5
|
-
import './chunk-CZJ6Q7CW.js';
|
|
6
|
-
//# sourceMappingURL=generate-object-NTKAWE7D.js.map
|
|
7
|
-
//# sourceMappingURL=generate-object-NTKAWE7D.js.map
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
var chunkXDUGSTYJ_cjs = require('./chunk-XDUGSTYJ.cjs');
|
|
4
|
-
require('./chunk-D5KXKBEN.cjs');
|
|
5
|
-
require('./chunk-AA27GEYS.cjs');
|
|
6
|
-
require('./chunk-UNFBHV46.cjs');
|
|
7
|
-
require('./chunk-6LHQPOMI.cjs');
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
Object.defineProperty(exports, "GenerateObjectError", {
|
|
12
|
-
enumerable: true,
|
|
13
|
-
get: function () { return chunkXDUGSTYJ_cjs.GenerateObjectError; }
|
|
14
|
-
});
|
|
15
|
-
Object.defineProperty(exports, "generateObjectImpl", {
|
|
16
|
-
enumerable: true,
|
|
17
|
-
get: function () { return chunkXDUGSTYJ_cjs.generateObjectImpl; }
|
|
18
|
-
});
|
|
19
|
-
//# sourceMappingURL=generate-object-YHTWG5DB.cjs.map
|
|
20
|
-
//# sourceMappingURL=generate-object-YHTWG5DB.cjs.map
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
export { IndexManager } from './chunk-DPY2M74T.js';
|
|
2
|
-
import './chunk-H73MEMQB.js';
|
|
3
|
-
import './chunk-X3LOJJMO.js';
|
|
4
|
-
import './chunk-KVNWIAO4.js';
|
|
5
|
-
import './chunk-FD2UT76F.js';
|
|
6
|
-
import './chunk-4QCJAJAG.js';
|
|
7
|
-
import './chunk-5DD4NJN3.js';
|
|
8
|
-
import './chunk-UKMBRMGT.js';
|
|
9
|
-
import './chunk-FTZTZBCU.js';
|
|
10
|
-
import './chunk-WE22OXQA.js';
|
|
11
|
-
import './chunk-XZHJYSPB.js';
|
|
12
|
-
import './chunk-RGQICWFU.js';
|
|
13
|
-
import './chunk-Q5EWJPRY.js';
|
|
14
|
-
import './chunk-3JHIFQ4I.js';
|
|
15
|
-
import './chunk-B5MHRQJZ.js';
|
|
16
|
-
import './chunk-CZJ6Q7CW.js';
|
|
17
|
-
//# sourceMappingURL=index-manager-JVYIVTZG.js.map
|
|
18
|
-
//# sourceMappingURL=index-manager-JVYIVTZG.js.map
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
var chunkL3C6CCBG_cjs = require('./chunk-L3C6CCBG.cjs');
|
|
4
|
-
require('./chunk-GHX4P3V2.cjs');
|
|
5
|
-
require('./chunk-ZD66GFH5.cjs');
|
|
6
|
-
require('./chunk-KRD3GQAA.cjs');
|
|
7
|
-
require('./chunk-MUUQ2WFJ.cjs');
|
|
8
|
-
require('./chunk-SWALPLFQ.cjs');
|
|
9
|
-
require('./chunk-GM54F4FE.cjs');
|
|
10
|
-
require('./chunk-SA6K24NB.cjs');
|
|
11
|
-
require('./chunk-ZWACQM5U.cjs');
|
|
12
|
-
require('./chunk-A4RAL2ER.cjs');
|
|
13
|
-
require('./chunk-P22BZE7G.cjs');
|
|
14
|
-
require('./chunk-ASK2OQM5.cjs');
|
|
15
|
-
require('./chunk-ZF2LDKQQ.cjs');
|
|
16
|
-
require('./chunk-JLRLCBJ4.cjs');
|
|
17
|
-
require('./chunk-UNFBHV46.cjs');
|
|
18
|
-
require('./chunk-6LHQPOMI.cjs');
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
Object.defineProperty(exports, "IndexManager", {
|
|
23
|
-
enumerable: true,
|
|
24
|
-
get: function () { return chunkL3C6CCBG_cjs.IndexManager; }
|
|
25
|
-
});
|
|
26
|
-
//# sourceMappingURL=index-manager-YGXRFJMZ.cjs.map
|
|
27
|
-
//# sourceMappingURL=index-manager-YGXRFJMZ.cjs.map
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
var chunkECD6ER3E_cjs = require('./chunk-ECD6ER3E.cjs');
|
|
4
|
-
require('./chunk-UNFBHV46.cjs');
|
|
5
|
-
require('./chunk-6LHQPOMI.cjs');
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
Object.defineProperty(exports, "JudgeCredentialError", {
|
|
10
|
-
enumerable: true,
|
|
11
|
-
get: function () { return chunkECD6ER3E_cjs.JudgeCredentialError; }
|
|
12
|
-
});
|
|
13
|
-
Object.defineProperty(exports, "composeJudgePrompt", {
|
|
14
|
-
enumerable: true,
|
|
15
|
-
get: function () { return chunkECD6ER3E_cjs.composeJudgePrompt; }
|
|
16
|
-
});
|
|
17
|
-
Object.defineProperty(exports, "judgeCallImpl", {
|
|
18
|
-
enumerable: true,
|
|
19
|
-
get: function () { return chunkECD6ER3E_cjs.judgeCallImpl; }
|
|
20
|
-
});
|
|
21
|
-
//# sourceMappingURL=judge-call-AQQYK6VT.cjs.map
|
|
22
|
-
//# sourceMappingURL=judge-call-AQQYK6VT.cjs.map
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
export { AuthSecretTooShortError, COOKIE_NAME, __TESTING__deriveKey, clearTransaction, encodeTransaction, getTransaction, newTransaction } from './chunk-ZJZ7LV3A.js';
|
|
2
|
-
import './chunk-B5MHRQJZ.js';
|
|
3
|
-
import './chunk-CZJ6Q7CW.js';
|
|
4
|
-
//# sourceMappingURL=oauth-transaction-store-NP2YHZ6D.js.map
|
|
5
|
-
//# sourceMappingURL=oauth-transaction-store-NP2YHZ6D.js.map
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
var chunkP7NNKEWO_cjs = require('./chunk-P7NNKEWO.cjs');
|
|
4
|
-
require('./chunk-UNFBHV46.cjs');
|
|
5
|
-
require('./chunk-6LHQPOMI.cjs');
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
Object.defineProperty(exports, "AuthSecretTooShortError", {
|
|
10
|
-
enumerable: true,
|
|
11
|
-
get: function () { return chunkP7NNKEWO_cjs.AuthSecretTooShortError; }
|
|
12
|
-
});
|
|
13
|
-
Object.defineProperty(exports, "COOKIE_NAME", {
|
|
14
|
-
enumerable: true,
|
|
15
|
-
get: function () { return chunkP7NNKEWO_cjs.COOKIE_NAME; }
|
|
16
|
-
});
|
|
17
|
-
Object.defineProperty(exports, "__TESTING__deriveKey", {
|
|
18
|
-
enumerable: true,
|
|
19
|
-
get: function () { return chunkP7NNKEWO_cjs.__TESTING__deriveKey; }
|
|
20
|
-
});
|
|
21
|
-
Object.defineProperty(exports, "clearTransaction", {
|
|
22
|
-
enumerable: true,
|
|
23
|
-
get: function () { return chunkP7NNKEWO_cjs.clearTransaction; }
|
|
24
|
-
});
|
|
25
|
-
Object.defineProperty(exports, "encodeTransaction", {
|
|
26
|
-
enumerable: true,
|
|
27
|
-
get: function () { return chunkP7NNKEWO_cjs.encodeTransaction; }
|
|
28
|
-
});
|
|
29
|
-
Object.defineProperty(exports, "getTransaction", {
|
|
30
|
-
enumerable: true,
|
|
31
|
-
get: function () { return chunkP7NNKEWO_cjs.getTransaction; }
|
|
32
|
-
});
|
|
33
|
-
Object.defineProperty(exports, "newTransaction", {
|
|
34
|
-
enumerable: true,
|
|
35
|
-
get: function () { return chunkP7NNKEWO_cjs.newTransaction; }
|
|
36
|
-
});
|
|
37
|
-
//# sourceMappingURL=oauth-transaction-store-ZINDV7AF.cjs.map
|
|
38
|
-
//# sourceMappingURL=oauth-transaction-store-ZINDV7AF.cjs.map
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
export { __getSubscribersCountForTests, __resetTaskRegistryForTests, cancel, configure, get, list, submit, subscribe } from './chunk-XKMVJ443.js';
|
|
2
|
-
import './chunk-K2BQQ445.js';
|
|
3
|
-
import './chunk-ZWFTECOE.js';
|
|
4
|
-
import './chunk-GGRPAQ3B.js';
|
|
5
|
-
import './chunk-3JHIFQ4I.js';
|
|
6
|
-
import './chunk-B5MHRQJZ.js';
|
|
7
|
-
import './chunk-CZJ6Q7CW.js';
|
|
8
|
-
//# sourceMappingURL=registry-5FK42CRV.js.map
|
|
9
|
-
//# sourceMappingURL=registry-5FK42CRV.js.map
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
var chunkJ6GXS5A2_cjs = require('./chunk-J6GXS5A2.cjs');
|
|
4
|
-
require('./chunk-BUUUWQMB.cjs');
|
|
5
|
-
require('./chunk-NJSIAJEK.cjs');
|
|
6
|
-
require('./chunk-GHHIJEFX.cjs');
|
|
7
|
-
require('./chunk-JLRLCBJ4.cjs');
|
|
8
|
-
require('./chunk-UNFBHV46.cjs');
|
|
9
|
-
require('./chunk-6LHQPOMI.cjs');
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
Object.defineProperty(exports, "__getSubscribersCountForTests", {
|
|
14
|
-
enumerable: true,
|
|
15
|
-
get: function () { return chunkJ6GXS5A2_cjs.__getSubscribersCountForTests; }
|
|
16
|
-
});
|
|
17
|
-
Object.defineProperty(exports, "__resetTaskRegistryForTests", {
|
|
18
|
-
enumerable: true,
|
|
19
|
-
get: function () { return chunkJ6GXS5A2_cjs.__resetTaskRegistryForTests; }
|
|
20
|
-
});
|
|
21
|
-
Object.defineProperty(exports, "cancel", {
|
|
22
|
-
enumerable: true,
|
|
23
|
-
get: function () { return chunkJ6GXS5A2_cjs.cancel; }
|
|
24
|
-
});
|
|
25
|
-
Object.defineProperty(exports, "configure", {
|
|
26
|
-
enumerable: true,
|
|
27
|
-
get: function () { return chunkJ6GXS5A2_cjs.configure; }
|
|
28
|
-
});
|
|
29
|
-
Object.defineProperty(exports, "get", {
|
|
30
|
-
enumerable: true,
|
|
31
|
-
get: function () { return chunkJ6GXS5A2_cjs.get; }
|
|
32
|
-
});
|
|
33
|
-
Object.defineProperty(exports, "list", {
|
|
34
|
-
enumerable: true,
|
|
35
|
-
get: function () { return chunkJ6GXS5A2_cjs.list; }
|
|
36
|
-
});
|
|
37
|
-
Object.defineProperty(exports, "submit", {
|
|
38
|
-
enumerable: true,
|
|
39
|
-
get: function () { return chunkJ6GXS5A2_cjs.submit; }
|
|
40
|
-
});
|
|
41
|
-
Object.defineProperty(exports, "subscribe", {
|
|
42
|
-
enumerable: true,
|
|
43
|
-
get: function () { return chunkJ6GXS5A2_cjs.subscribe; }
|
|
44
|
-
});
|
|
45
|
-
//# sourceMappingURL=registry-BVTNO73E.cjs.map
|
|
46
|
-
//# sourceMappingURL=registry-BVTNO73E.cjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/internal/runtime/lifecycle/run-until.ts"],"names":[],"mappings":";;;AA+BA,IAAM,eAAA,GAAkB,yBAAA;AAOxB,IAAM,QAAA,GAAW,CAAC,MAAA,MAA+B;AAAA,EAC/C,IAAA,EAAM,eAAA;AAAA,EACN,MAAA,EAAQ,QAAA;AAAA,EACR;AACF,CAAA,CAAA;AAGA,gBAAuB,YAAA,CACrB,KAAA,EACA,IAAA,EACA,OAAA,EACA,IAAA,EAC6C;AAC7C,EAAA,MAAM,QAAA,GAAW,SAAS,QAAA,IAAY,EAAA;AACtC,EAAA,MAAM,QAAA,GAAW,SAAS,2BAAA,IAA+B,CAAA;AACzD,EAAA,MAAM,cAAc,OAAA,EAAS,WAAA;AAC7B,EAAA,MAAM,SAAS,OAAA,EAAS,MAAA;AAKxB,EAAA,MAAM,SAAA,GAAY,MAAe,MAAA,KAAW,MAAA,IAAa,MAAA,CAAO,OAAA;AAChE,EAAA,IAAI,IAAA,GAAO,CAAA;AACX,EAAA,IAAI,mBAAA,GAAsB,CAAA;AAC1B,EAAA,IAAI,UAAA,GAAa,CAAA;AACjB,EAAA,IAAI,YAAA,GAAe,EAAA;AAWnB,EAAA,MAAM,MAAA,GAAS,CAAC,MAAA,MAA8C;AAAA,IAC5D,MAAA;AAAA,IACA,SAAA,EAAW,IAAA;AAAA,IACX,UAAA;AAAA,IACA,eAAe,YAAA,IAAgB;AAAA,GACjC,CAAA;AAGA,EAAA,IAAI,WAAU,EAAG;AACf,IAAA,MAAM,SAAS,2CAA2C,CAAA;AAE1D,IAAA,OAAO,OAAO,QAAQ,CAAA;AAAA,EACxB;AAEA,EAAA,MAAM,EAAE,IAAA,EAAM,eAAA,EAAiB,MAAA,EAAQ,QAAA,EAAU,QAAQ,cAAA,EAAe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AAA,IACA,wBAAA;AAAA,IACA,kGAAA;AAAA,IACA,mGAAA;AAAA,IACA,2BAAA;AAAA,IACA,EAAA;AAAA,IACA,qBAAA;AAAA,IACA,kGAAA;AAAA,IACA,uGAAA;AAAA,IACA,EAAA;AAAA,IACA,mBAAA;AAAA,IACA,uGAAA;AAAA,IACA,oGAAA;AAAA,IACA,EAAA;AAAA,IACA,CAAA;AAAA,EAA4B,YAAA,CAAa,KAAA,CAAM,IAAK,CAAC,CAAA;AAAA,GACvD,CAAE,KAAK,IAAI,CAAA;AACb","file":"run-until-6D6TQ4JN.js","sourcesContent":["/**\n * Goal-driven Ralph loop (T3.2, ADRs D115-D121).\n *\n * `runUntilImpl` is an `AsyncGenerator<GoalEvent, GoalResult, void>`:\n * yields events as the loop progresses, returns the final result when\n * the goal completes, fails, or is paused. The auxiliary judge model is\n * injected via `deps.judge` so the generator stays free of the `Agent`\n * façade import.\n *\n * EC-C fix: pre-aborted signals emit only `[paused]`, not `[active, paused]`.\n * EC-D: `maxTurns: 0` is supported (vacuous yield active → failed).\n *\n * @internal\n */\n\nimport type { SDKAgent } from \"../../../types/agent.js\";\nimport type {\n GoalEvent,\n GoalOptions,\n GoalResult,\n JudgeResult,\n} from \"../../../types/goal-events.js\";\nimport type { JudgeContext, JudgeOptions } from \"../../judge/judge-call.js\";\nimport { GOAL_CONTINUATION_MARKER } from \"./goal-marker.js\";\n\n/** DI contract: the judge is the only external touchpoint. */\nexport interface RunUntilDeps {\n judge: (ctx: JudgeContext, opts?: JudgeOptions) => Promise<JudgeResult>;\n}\n\n/** The reason both in-loop abort checks report; the pre-loop one distinguishes itself. */\nconst ABORTED_MID_RUN = \"aborted via AbortSignal\";\n\n/**\n * The pause event, built in one place. Three sites emitted the same four-line literal with only the\n * reason varying — the same duplicated-knowledge shape as `finish` below, at the event boundary\n * instead of the result boundary.\n */\nconst pausedBy = (reason: string): GoalEvent => ({\n type: \"status_change\",\n status: \"paused\",\n reason,\n});\n\n// biome-ignore lint/complexity/noExcessiveCognitiveComplexity: the goal-loop interleaves turn-start, send, judge, continuation, abort-check and failure-bail — extracting the CONTROL FLOW into helpers harms that linear narrative, and this defends only that. What it never covered were the nine hand-built result literals and the three pause events, which moved to `finish` and `pausedBy` above: neither removes a branch. Measured 2026-09-01: 43 -> 31 cognitive, 150 -> 117 lines.\nexport async function* runUntilImpl(\n agent: SDKAgent,\n goal: string,\n options: GoalOptions | undefined,\n deps: RunUntilDeps,\n): AsyncGenerator<GoalEvent, GoalResult, void> {\n const maxTurns = options?.maxTurns ?? 20;\n const maxFails = options?.maxConsecutiveJudgeFailures ?? 3;\n const tokenBudget = options?.tokenBudget; // M55 — undefined ⇒ unlimited\n const signal = options?.signal;\n // Use a function (not direct property access) so TS does not narrow\n // `signal.aborted` to `false | undefined` after the initial check.\n // AbortSignal.aborted is a getter that can flip true between calls.\n // biome-ignore lint/complexity/useOptionalChain: optional-chain would re-narrow signal?.aborted to `false | undefined` after the first check, defeating the purpose of this helper.\n const isAborted = (): boolean => signal !== undefined && signal.aborted;\n let turn = 0;\n let consecutiveFailures = 0;\n let tokensUsed = 0; // M55 — the observed sum (0 when usage is absent — fail-open)\n let lastResponse = \"\";\n /**\n * The one place a `GoalResult` is built. Every exit went through the same four-field literal with\n * only the status varying, nine times, each restating the convention that an empty final response\n * collapses to `undefined` — duplicated KNOWLEDGE, so adding a field to `GoalResult` was a\n * nine-site edit where missing one produces a result wrong on a single branch.\n *\n * It is a closure over `turn`, `tokensUsed` and `lastResponse` rather than a module function\n * precisely so the call sites stay one word long: the biome-ignore below argues that the loop's\n * narrative must read linearly, and this removes no branch and moves no decision.\n */\n const finish = (status: GoalResult[\"status\"]): GoalResult => ({\n status,\n turnsUsed: turn,\n tokensUsed,\n finalResponse: lastResponse || undefined,\n });\n\n // EC-C: signal already aborted BEFORE first event → emit only [paused].\n if (isAborted()) {\n yield pausedBy(\"aborted via AbortSignal before first turn\");\n // `turn` is 0 and `lastResponse` is \"\" at this point, so this is the literal it replaces.\n return finish(\"paused\");\n }\n\n yield { type: \"status_change\", status: \"active\", reason: \"Goal started\" };\n\n while (turn < maxTurns) {\n if (isAborted()) {\n yield pausedBy(ABORTED_MID_RUN);\n return finish(\"paused\");\n }\n\n turn += 1;\n yield { type: \"turn_start\", turn, goal };\n\n const continuationPrompt = turn === 1 ? goal : composeContinuation(goal, lastResponse);\n\n const run = await agent.send(continuationPrompt);\n // M55 review HIGH — thread the abort INTO the in-flight run: without this, Esc mid-turn is\n // cosmetic (the turn keeps mutating the workspace until it finishes on its own). `run.cancel()`\n // aborts the stream + in-flight tool calls (types/run.ts contract).\n // Called directly, not through a hand-written shape. `SDKAgent.send()` returns `Promise<Run>`\n // and `Run.cancel(): Promise<void>` is declared in `types/run.ts` — the cast re-declared, less\n // precisely, what the compiler already knew, and `cancel?.()` through it meant a rename would\n // keep compiling while Esc mid-turn silently went back to being cosmetic. Which is the exact\n // defect the comment above says this was added to fix.\n const cancelOnAbort = (): void => {\n void run.cancel();\n };\n if (signal !== undefined) {\n if (signal.aborted) cancelOnAbort();\n else signal.addEventListener(\"abort\", cancelOnAbort, { once: true });\n }\n const result = await run.wait();\n if (signal !== undefined) signal.removeEventListener(\"abort\", cancelOnAbort);\n lastResponse = result.result ?? \"\";\n // M55 — token accounting fails open: it only sums when the run reports usage.\n const turnTokens = result.usage?.totalTokens;\n if (typeof turnTokens === \"number\") tokensUsed += turnTokens;\n // Re-check aborted right after the turn lands: a cancelled turn must NOT spend a judge call.\n if (isAborted()) {\n yield pausedBy(ABORTED_MID_RUN);\n return finish(\"paused\");\n }\n yield { type: \"agent_response\", turn, content: lastResponse };\n\n const judgeOpts: JudgeOptions = {};\n if (options?.judgeModel !== undefined) judgeOpts.judgeModel = options.judgeModel;\n if (options?.judgeApiKey !== undefined) judgeOpts.apiKey = options.judgeApiKey;\n // M80 — forwards the driven agent's model so the judge can derive when `judgeModel` is omitted.\n if (options?.agentModel !== undefined) judgeOpts.agentModel = options.agentModel;\n const judgeCtx: JudgeContext = { goal, lastResponse };\n if (options?.subgoals !== undefined) judgeCtx.subgoals = options.subgoals;\n const judgment = await deps.judge(judgeCtx, judgeOpts);\n yield {\n type: \"judge_verdict\",\n turn,\n verdict: judgment.verdict,\n reason: judgment.reason,\n parseFailed: judgment.parseFailed,\n };\n\n if (judgment.parseFailed) {\n consecutiveFailures += 1;\n if (consecutiveFailures >= maxFails) {\n yield {\n type: \"status_change\",\n status: \"failed\",\n reason: `judge model too unreliable (${consecutiveFailures} parse failures in a row)`,\n };\n return finish(\"failed\");\n }\n } else {\n consecutiveFailures = 0;\n }\n\n if (judgment.verdict === \"done\") {\n yield { type: \"status_change\", status: \"completed\", reason: judgment.reason };\n return finish(\"completed\");\n }\n // M80 — the missing arm. Without it, a judge recognizing impossibility could only say\n // \"continue\", and the loop repeated the same turn until it blew the budget — reporting `failed` on\n // a limit rather than `blocked` on impossibility. Two distinct causes with the same\n // visible outcome, and the consumer had to reconcile after the loop to tell them apart.\n if (judgment.verdict === \"blocked\") {\n yield { type: \"status_change\", status: \"blocked\", reason: judgment.reason };\n return finish(\"blocked\");\n }\n if (judgment.verdict === \"skipped\") {\n yield {\n type: \"status_change\",\n status: \"completed\",\n reason: `skipped: ${judgment.reason}`,\n };\n return finish(\"completed\");\n }\n\n // M55 — token-budget check AFTER the turn (Codex: gentle wind-down, stops the loop).\n if (tokenBudget !== undefined && tokensUsed >= tokenBudget) {\n yield {\n type: \"status_change\",\n status: \"budget_limited\",\n reason: `token budget (${tokenBudget}) reached: ${tokensUsed} used`,\n };\n return finish(\"budget_limited\");\n }\n\n yield { type: \"continuation\", turn, prompt: continuationPrompt };\n }\n\n yield {\n type: \"status_change\",\n status: \"failed\",\n reason: `max turns (${maxTurns}) exhausted`,\n };\n return finish(\"failed\");\n}\n\n/**\n * Build the continuation user message for turns 2+. Keeps last response\n * preview short so we don't bloat the prompt cache.\n *\n * @internal\n */\n\nexport function composeContinuation(goal: string, lastResponse: string): string {\n // M55 — Codex-faithful continuation (ext/goal templates/goals/continuation.md): keep the FULL\n // objective intact, work from current-state evidence, and audit completion requirement-by-requirement\n // before declaring done. Improves the quality of what the judge then evaluates.\n return [\n GOAL_CONTINUATION_MARKER,\n \"Continue working toward the active goal.\",\n \"\",\n `<objective>\\n${goal}\\n</objective>`,\n \"\",\n \"Continuation behavior:\",\n \"- This goal persists across turns. Keep the full objective intact; if it cannot be finished now,\",\n \" make concrete progress toward the real requested end state and do not redefine success around a\",\n \" smaller or easier task.\",\n \"\",\n \"Work from evidence:\",\n \"- Use the current worktree and external state as authoritative. Inspect the current state before\",\n \" relying on it. Improve, replace, or remove existing work as needed to satisfy the actual objective.\",\n \"\",\n \"Completion audit:\",\n \"- Before deciding the goal is achieved, treat completion as unproven and verify it against the actual\",\n \" current state, requirement by requirement. Treat uncertain or indirect evidence as not achieved.\",\n \"\",\n `Your last response was:\\n${lastResponse.slice(-1000)}`,\n ].join(\"\\n\");\n}\n"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/internal/runtime/lifecycle/run-until.ts"],"names":["GOAL_CONTINUATION_MARKER"],"mappings":";;;;;AA+BA,IAAM,eAAA,GAAkB,yBAAA;AAOxB,IAAM,QAAA,GAAW,CAAC,MAAA,MAA+B;AAAA,EAC/C,IAAA,EAAM,eAAA;AAAA,EACN,MAAA,EAAQ,QAAA;AAAA,EACR;AACF,CAAA,CAAA;AAGA,gBAAuB,YAAA,CACrB,KAAA,EACA,IAAA,EACA,OAAA,EACA,IAAA,EAC6C;AAC7C,EAAA,MAAM,QAAA,GAAW,SAAS,QAAA,IAAY,EAAA;AACtC,EAAA,MAAM,QAAA,GAAW,SAAS,2BAAA,IAA+B,CAAA;AACzD,EAAA,MAAM,cAAc,OAAA,EAAS,WAAA;AAC7B,EAAA,MAAM,SAAS,OAAA,EAAS,MAAA;AAKxB,EAAA,MAAM,SAAA,GAAY,MAAe,MAAA,KAAW,MAAA,IAAa,MAAA,CAAO,OAAA;AAChE,EAAA,IAAI,IAAA,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AO,gBAAgB,CAAA;AAAA,IAChC;AAEA,IAAA,MAAM,EAAE,IAAA,EAAM,cAAA,EAAgB,IAAA,EAAM,QAAQ,kBAAA,EAAmB;AAAA,EACjE;AAEA,EAAA,MAAM;AAAA,IACJ,IAAA,EAAM,eAAA;AAAA,IACN,MAAA,EAAQ,QAAA;AAAA,IACR,MAAA,EAAQ,cAAc,QAAQ,CAAA,WAAA;AAAA,GAChC;AACA,EAAA,OAAO,OAAO,QAAQ,CAAA;AACxB;AASO,SAAS,mBAAA,CAAoB,MAAc,YAAA,EAA8B;AAI9E,EAAA,OAAO;AAAA,IACLA,0CAAA;AAAA,IACA,0CAAA;AAAA,IACA,EAAA;AAAA,IACA,CAAA;AAAA,EAAgB,IAAI;AAAA,YAAA,CAAA;AAAA,IACpB,EAAA;AAAA,IACA,wBAAA;AAAA,IACA,kGAAA;AAAA,IACA,mGAAA;AAAA,IACA,2BAAA;AAAA,IACA,EAAA;AAAA,IACA,qBAAA;AAAA,IACA,kGAAA;AAAA,IACA,uGAAA;AAAA,IACA,EAAA;AAAA,IACA,mBAAA;AAAA,IACA,uGAAA;AAAA,IACA,oGAAA;AAAA,IACA,EAAA;AAAA,IACA,CAAA;AAAA,EAA4B,YAAA,CAAa,KAAA,CAAM,IAAK,CAAC,CAAA;AAAA,GACvD,CAAE,KAAK,IAAI,CAAA;AACb","file":"run-until-DG2KXWB2.cjs","sourcesContent":["/**\n * Goal-driven Ralph loop (T3.2, ADRs D115-D121).\n *\n * `runUntilImpl` is an `AsyncGenerator<GoalEvent, GoalResult, void>`:\n * yields events as the loop progresses, returns the final result when\n * the goal completes, fails, or is paused. The auxiliary judge model is\n * injected via `deps.judge` so the generator stays free of the `Agent`\n * façade import.\n *\n * EC-C fix: pre-aborted signals emit only `[paused]`, not `[active, paused]`.\n * EC-D: `maxTurns: 0` is supported (vacuous yield active → failed).\n *\n * @internal\n */\n\nimport type { SDKAgent } from \"../../../types/agent.js\";\nimport type {\n GoalEvent,\n GoalOptions,\n GoalResult,\n JudgeResult,\n} from \"../../../types/goal-events.js\";\nimport type { JudgeContext, JudgeOptions } from \"../../judge/judge-call.js\";\nimport { GOAL_CONTINUATION_MARKER } from \"./goal-marker.js\";\n\n/** DI contract: the judge is the only external touchpoint. */\nexport interface RunUntilDeps {\n judge: (ctx: JudgeContext, opts?: JudgeOptions) => Promise<JudgeResult>;\n}\n\n/** The reason both in-loop abort checks report; the pre-loop one distinguishes itself. */\nconst ABORTED_MID_RUN = \"aborted via AbortSignal\";\n\n/**\n * The pause event, built in one place. Three sites emitted the same four-line literal with only the\n * reason varying — the same duplicated-knowledge shape as `finish` below, at the event boundary\n * instead of the result boundary.\n */\nconst pausedBy = (reason: string): GoalEvent => ({\n type: \"status_change\",\n status: \"paused\",\n reason,\n});\n\n// biome-ignore lint/complexity/noExcessiveCognitiveComplexity: the goal-loop interleaves turn-start, send, judge, continuation, abort-check and failure-bail — extracting the CONTROL FLOW into helpers harms that linear narrative, and this defends only that. What it never covered were the nine hand-built result literals and the three pause events, which moved to `finish` and `pausedBy` above: neither removes a branch. Measured 2026-09-01: 43 -> 31 cognitive, 150 -> 117 lines.\nexport async function* runUntilImpl(\n agent: SDKAgent,\n goal: string,\n options: GoalOptions | undefined,\n deps: RunUntilDeps,\n): AsyncGenerator<GoalEvent, GoalResult, void> {\n const maxTurns = options?.maxTurns ?? 20;\n const maxFails = options?.maxConsecutiveJudgeFailures ?? 3;\n const tokenBudget = options?.tokenBudget; // M55 — undefined ⇒ unlimited\n const signal = options?.signal;\n // Use a function (not direct property access) so TS does not narrow\n // `signal.aborted` to `false | undefined` after the initial check.\n // AbortSignal.aborted is a getter that can flip true between calls.\n // biome-ignore lint/complexity/useOptionalChain: optional-chain would re-narrow signal?.aborted to `false | undefined` after the first check, defeating the purpose of this helper.\n const isAborted = (): boolean => signal !== undefined && signal.aborted;\n let turn = 0;\n let consecutiveFailures = 0;\n let tokensUsed = 0; // M55 — the observed sum (0 when usage is absent — fail-open)\n let lastResponse = \"\";\n /**\n * The one place a `GoalResult` is built. Every exit went through the same four-field literal with\n * only the status varying, nine times, each restating the convention that an empty final response\n * collapses to `undefined` — duplicated KNOWLEDGE, so adding a field to `GoalResult` was a\n * nine-site edit where missing one produces a result wrong on a single branch.\n *\n * It is a closure over `turn`, `tokensUsed` and `lastResponse` rather than a module function\n * precisely so the call sites stay one word long: the biome-ignore below argues that the loop's\n * narrative must read linearly, and this removes no branch and moves no decision.\n */\n const finish = (status: GoalResult[\"status\"]): GoalResult => ({\n status,\n turnsUsed: turn,\n tokensUsed,\n finalResponse: lastResponse || undefined,\n });\n\n // EC-C: signal already aborted BEFORE first event → emit only [paused].\n if (isAborted()) {\n yield pausedBy(\"aborted via AbortSignal before first turn\");\n // `turn` is 0 and `lastResponse` is \"\" at this point, so this is the literal it replaces.\n return finish(\"paused\");\n }\n\n yield { type: \"status_change\", status: \"active\", reason: \"Goal started\" };\n\n while (turn < maxTurns) {\n if (isAborted()) {\n yield pausedBy(ABORTED_MID_RUN);\n return finish(\"paused\");\n }\n\n turn += 1;\n yield { type: \"turn_start\", turn, goal };\n\n const continuationPrompt = turn === 1 ? goal : composeContinuation(goal, lastResponse);\n\n const run = await agent.send(continuationPrompt);\n // M55 review HIGH — thread the abort INTO the in-flight run: without this, Esc mid-turn is\n // cosmetic (the turn keeps mutating the workspace until it finishes on its own). `run.cancel()`\n // aborts the stream + in-flight tool calls (types/run.ts contract).\n // Called directly, not through a hand-written shape. `SDKAgent.send()` returns `Promise<Run>`\n // and `Run.cancel(): Promise<void>` is declared in `types/run.ts` — the cast re-declared, less\n // precisely, what the compiler already knew, and `cancel?.()` through it meant a rename would\n // keep compiling while Esc mid-turn silently went back to being cosmetic. Which is the exact\n // defect the comment above says this was added to fix.\n const cancelOnAbort = (): void => {\n void run.cancel();\n };\n if (signal !== undefined) {\n if (signal.aborted) cancelOnAbort();\n else signal.addEventListener(\"abort\", cancelOnAbort, { once: true });\n }\n const result = await run.wait();\n if (signal !== undefined) signal.removeEventListener(\"abort\", cancelOnAbort);\n lastResponse = result.result ?? \"\";\n // M55 — token accounting fails open: it only sums when the run reports usage.\n const turnTokens = result.usage?.totalTokens;\n if (typeof turnTokens === \"number\") tokensUsed += turnTokens;\n // Re-check aborted right after the turn lands: a cancelled turn must NOT spend a judge call.\n if (isAborted()) {\n yield pausedBy(ABORTED_MID_RUN);\n return finish(\"paused\");\n }\n yield { type: \"agent_response\", turn, content: lastResponse };\n\n const judgeOpts: JudgeOptions = {};\n if (options?.judgeModel !== undefined) judgeOpts.judgeModel = options.judgeModel;\n if (options?.judgeApiKey !== undefined) judgeOpts.apiKey = options.judgeApiKey;\n // M80 — forwards the driven agent's model so the judge can derive when `judgeModel` is omitted.\n if (options?.agentModel !== undefined) judgeOpts.agentModel = options.agentModel;\n const judgeCtx: JudgeContext = { goal, lastResponse };\n if (options?.subgoals !== undefined) judgeCtx.subgoals = options.subgoals;\n const judgment = await deps.judge(judgeCtx, judgeOpts);\n yield {\n type: \"judge_verdict\",\n turn,\n verdict: judgment.verdict,\n reason: judgment.reason,\n parseFailed: judgment.parseFailed,\n };\n\n if (judgment.parseFailed) {\n consecutiveFailures += 1;\n if (consecutiveFailures >= maxFails) {\n yield {\n type: \"status_change\",\n status: \"failed\",\n reason: `judge model too unreliable (${consecutiveFailures} parse failures in a row)`,\n };\n return finish(\"failed\");\n }\n } else {\n consecutiveFailures = 0;\n }\n\n if (judgment.verdict === \"done\") {\n yield { type: \"status_change\", status: \"completed\", reason: judgment.reason };\n return finish(\"completed\");\n }\n // M80 — the missing arm. Without it, a judge recognizing impossibility could only say\n // \"continue\", and the loop repeated the same turn until it blew the budget — reporting `failed` on\n // a limit rather than `blocked` on impossibility. Two distinct causes with the same\n // visible outcome, and the consumer had to reconcile after the loop to tell them apart.\n if (judgment.verdict === \"blocked\") {\n yield { type: \"status_change\", status: \"blocked\", reason: judgment.reason };\n return finish(\"blocked\");\n }\n if (judgment.verdict === \"skipped\") {\n yield {\n type: \"status_change\",\n status: \"completed\",\n reason: `skipped: ${judgment.reason}`,\n };\n return finish(\"completed\");\n }\n\n // M55 — token-budget check AFTER the turn (Codex: gentle wind-down, stops the loop).\n if (tokenBudget !== undefined && tokensUsed >= tokenBudget) {\n yield {\n type: \"status_change\",\n status: \"budget_limited\",\n reason: `token budget (${tokenBudget}) reached: ${tokensUsed} used`,\n };\n return finish(\"budget_limited\");\n }\n\n yield { type: \"continuation\", turn, prompt: continuationPrompt };\n }\n\n yield {\n type: \"status_change\",\n status: \"failed\",\n reason: `max turns (${maxTurns}) exhausted`,\n };\n return finish(\"failed\");\n}\n\n/**\n * Build the continuation user message for turns 2+. Keeps last response\n * preview short so we don't bloat the prompt cache.\n *\n * @internal\n */\n\nexport function composeContinuation(goal: string, lastResponse: string): string {\n // M55 — Codex-faithful continuation (ext/goal templates/goals/continuation.md): keep the FULL\n // objective intact, work from current-state evidence, and audit completion requirement-by-requirement\n // before declaring done. Improves the quality of what the judge then evaluates.\n return [\n GOAL_CONTINUATION_MARKER,\n \"Continue working toward the active goal.\",\n \"\",\n `<objective>\\n${goal}\\n</objective>`,\n \"\",\n \"Continuation behavior:\",\n \"- This goal persists across turns. Keep the full objective intact; if it cannot be finished now,\",\n \" make concrete progress toward the real requested end state and do not redefine success around a\",\n \" smaller or easier task.\",\n \"\",\n \"Work from evidence:\",\n \"- Use the current worktree and external state as authoritative. Inspect the current state before\",\n \" relying on it. Improve, replace, or remove existing work as needed to satisfy the actual objective.\",\n \"\",\n \"Completion audit:\",\n \"- Before deciding the goal is achieved, treat completion as unproven and verify it against the actual\",\n \" current state, requirement by requirement. Treat uncertain or indirect evidence as not achieved.\",\n \"\",\n `Your last response was:\\n${lastResponse.slice(-1000)}`,\n ].join(\"\\n\");\n}\n"]}
|