@theokit/sdk 4.53.1 → 4.55.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +1184 -0
- package/README.md +9 -4
- package/dist/a2a/agent-mailbox.d.cts +27 -0
- package/dist/a2a/agent-mailbox.d.ts +27 -0
- package/dist/a2a/index.cjs +9 -4
- package/dist/a2a/index.cjs.map +1 -1
- package/dist/a2a/index.js +7 -2
- package/dist/a2a/index.js.map +1 -1
- package/dist/a2a/message-bus.d.cts +39 -0
- package/dist/a2a/message-bus.d.ts +39 -0
- package/dist/a2a/subagent.d.cts +68 -7
- package/dist/a2a/subagent.d.ts +68 -7
- package/dist/a2a/types.d.cts +26 -0
- package/dist/a2a/types.d.ts +26 -0
- package/dist/{agent-B9HXlwID.d.ts → agent-D3Xr_-6Z.d.cts} +245 -850
- package/dist/{agent-nLqeXKIX.d.cts → agent-DIu6FooJ.d.ts} +245 -850
- package/dist/agent-HDEVVUBS.js +52 -0
- package/dist/{agent-FFVV4U5N.js.map → agent-HDEVVUBS.js.map} +1 -1
- package/dist/agent-R2HOJFZJ.cjs +61 -0
- package/dist/{agent-YLAHVHEH.cjs.map → agent-R2HOJFZJ.cjs.map} +1 -1
- package/dist/agent-builder.d.ts +19 -0
- package/dist/agent-session-store-P6V3FINW.js +7 -0
- package/dist/{agent-session-store-TNCGL5RN.js.map → agent-session-store-P6V3FINW.js.map} +1 -1
- package/dist/agent-session-store-ZJ3JSRS4.cjs +24 -0
- package/dist/{agent-session-store-DUGBAX5V.cjs.map → agent-session-store-ZJ3JSRS4.cjs.map} +1 -1
- package/dist/agent.d.ts +9 -6
- package/dist/auth/index.cjs +52 -35
- package/dist/auth/index.cjs.map +1 -1
- package/dist/auth/index.js +26 -9
- package/dist/auth/index.js.map +1 -1
- package/dist/{batch-UPKN4SG6.js → batch-2TGJMNCJ.js} +14 -13
- package/dist/batch-2TGJMNCJ.js.map +1 -0
- package/dist/{batch-ZEFN5SO7.cjs → batch-ND32UKZS.cjs} +31 -30
- package/dist/batch-ND32UKZS.cjs.map +1 -0
- package/dist/{chunk-TTJ54H3E.cjs → chunk-2ADR2GSO.cjs} +8 -8
- package/dist/chunk-2ADR2GSO.cjs.map +1 -0
- package/dist/chunk-2BDH744Z.js +15 -0
- package/dist/chunk-2BDH744Z.js.map +1 -0
- package/dist/{chunk-VGPXHHF3.cjs → chunk-2C72DXQF.cjs} +63 -27
- package/dist/chunk-2C72DXQF.cjs.map +1 -0
- package/dist/{chunk-4Q4K4WB5.js → chunk-2D34UTDC.js} +20 -4
- package/dist/chunk-2D34UTDC.js.map +1 -0
- package/dist/{chunk-UFIXH26P.js → chunk-2QKTVKH3.js} +4 -4
- package/dist/{chunk-UFIXH26P.js.map → chunk-2QKTVKH3.js.map} +1 -1
- package/dist/{chunk-GBBDINFK.js → chunk-3E77SX4H.js} +4 -4
- package/dist/{chunk-GBBDINFK.js.map → chunk-3E77SX4H.js.map} +1 -1
- package/dist/{chunk-VYHJZVL5.cjs → chunk-3EE6LVWT.cjs} +2 -2
- package/dist/chunk-3EE6LVWT.cjs.map +1 -0
- package/dist/{chunk-5NBUH3NO.js → chunk-3OR54XG4.js} +2 -2
- package/dist/{chunk-C6Y6CWYD.cjs.map → chunk-3OR54XG4.js.map} +1 -1
- package/dist/{chunk-ZN2DGEY3.cjs → chunk-3YJNUKYN.cjs} +15 -15
- package/dist/{chunk-ZN2DGEY3.cjs.map → chunk-3YJNUKYN.cjs.map} +1 -1
- package/dist/{chunk-POWRZSK4.js → chunk-44JAAH4X.js} +3 -3
- package/dist/{chunk-POWRZSK4.js.map → chunk-44JAAH4X.js.map} +1 -1
- package/dist/{chunk-SSDD676S.js → chunk-44MBDIHG.js} +4 -4
- package/dist/{chunk-SSDD676S.js.map → chunk-44MBDIHG.js.map} +1 -1
- package/dist/{chunk-OY7O3Q6R.js → chunk-4ERPXIVB.js} +5 -5
- package/dist/{chunk-OY7O3Q6R.js.map → chunk-4ERPXIVB.js.map} +1 -1
- package/dist/{chunk-3BK6YR5P.cjs → chunk-4I55V454.cjs} +4 -4
- package/dist/{chunk-3BK6YR5P.cjs.map → chunk-4I55V454.cjs.map} +1 -1
- package/dist/{chunk-B4YA6BRS.cjs → chunk-4O5TGQBW.cjs} +30 -7
- package/dist/chunk-4O5TGQBW.cjs.map +1 -0
- package/dist/{chunk-4JBHSLQO.cjs → chunk-4OTIXDMU.cjs} +2 -2
- package/dist/{chunk-4JBHSLQO.cjs.map → chunk-4OTIXDMU.cjs.map} +1 -1
- package/dist/{chunk-C6Y6CWYD.cjs → chunk-52NKC5HT.cjs} +2 -2
- package/dist/chunk-52NKC5HT.cjs.map +1 -0
- package/dist/{chunk-665SFFFR.cjs → chunk-53CBTBWO.cjs} +11 -11
- package/dist/{chunk-665SFFFR.cjs.map → chunk-53CBTBWO.cjs.map} +1 -1
- package/dist/{chunk-FFM3SJTQ.js → chunk-5JLFFPCH.js} +4 -4
- package/dist/{chunk-FFM3SJTQ.js.map → chunk-5JLFFPCH.js.map} +1 -1
- package/dist/{chunk-34XOCZJO.js → chunk-5PHVENFV.js} +3 -3
- package/dist/chunk-5PHVENFV.js.map +1 -0
- package/dist/{chunk-BDTVFIPB.cjs → chunk-5UOVYM3P.cjs} +36 -31
- package/dist/chunk-5UOVYM3P.cjs.map +1 -0
- package/dist/{chunk-VF7X6HDR.cjs → chunk-5USCYPPI.cjs} +15 -15
- package/dist/{chunk-VF7X6HDR.cjs.map → chunk-5USCYPPI.cjs.map} +1 -1
- package/dist/chunk-6HTXPPHK.cjs +18 -0
- package/dist/chunk-6HTXPPHK.cjs.map +1 -0
- package/dist/{chunk-D24WJWN2.js → chunk-AEOZTXVW.js} +3 -3
- package/dist/{chunk-D24WJWN2.js.map → chunk-AEOZTXVW.js.map} +1 -1
- package/dist/{chunk-DGOG5NXR.js → chunk-AG5JPQIY.js} +3 -3
- package/dist/{chunk-DGOG5NXR.js.map → chunk-AG5JPQIY.js.map} +1 -1
- package/dist/{chunk-BFYGJGC5.js → chunk-AQLGBKNT.js} +3 -3
- package/dist/chunk-AQLGBKNT.js.map +1 -0
- package/dist/{chunk-7W7ZWMLQ.js → chunk-AWO27VRZ.js} +3 -3
- package/dist/chunk-AWO27VRZ.js.map +1 -0
- package/dist/{chunk-VYCKUKPA.cjs → chunk-B2J4ZMZL.cjs} +3 -2
- package/dist/chunk-B2J4ZMZL.cjs.map +1 -0
- package/dist/{chunk-BERBYXFH.js → chunk-BMAZLQQ4.js} +3 -3
- package/dist/{chunk-BERBYXFH.js.map → chunk-BMAZLQQ4.js.map} +1 -1
- package/dist/{chunk-5YKNEMXR.cjs → chunk-BVZW2B5V.cjs} +4 -4
- package/dist/chunk-BVZW2B5V.cjs.map +1 -0
- package/dist/{chunk-MSFLYJDY.js → chunk-CQ2TQ32Y.js} +4 -4
- package/dist/chunk-CQ2TQ32Y.js.map +1 -0
- package/dist/{chunk-C5DEO6OI.cjs → chunk-CQGYNZ3K.cjs} +4 -4
- package/dist/{chunk-C5DEO6OI.cjs.map → chunk-CQGYNZ3K.cjs.map} +1 -1
- package/dist/{chunk-D75S2X6I.cjs → chunk-CTCGWIUD.cjs} +5 -5
- package/dist/{chunk-D75S2X6I.cjs.map → chunk-CTCGWIUD.cjs.map} +1 -1
- package/dist/{chunk-NZL4BNFQ.js → chunk-CV7XMBHP.js} +4 -4
- package/dist/chunk-CV7XMBHP.js.map +1 -0
- package/dist/{chunk-SEL2ZQMT.js → chunk-DAPSQZT4.js} +15 -10
- package/dist/chunk-DAPSQZT4.js.map +1 -0
- package/dist/{chunk-SVO5WPZX.cjs → chunk-DQKERTND.cjs} +11 -11
- package/dist/{chunk-SVO5WPZX.cjs.map → chunk-DQKERTND.cjs.map} +1 -1
- package/dist/{chunk-N5CR3TJZ.js → chunk-DZBSJX6J.js} +4 -4
- package/dist/{chunk-N5CR3TJZ.js.map → chunk-DZBSJX6J.js.map} +1 -1
- package/dist/{chunk-RAHSWE5C.cjs → chunk-EI2Q7SJ5.cjs} +12 -12
- package/dist/chunk-EI2Q7SJ5.cjs.map +1 -0
- package/dist/{chunk-UCFONJBG.js → chunk-EPSICJLZ.js} +2 -2
- package/dist/{chunk-UCFONJBG.js.map → chunk-EPSICJLZ.js.map} +1 -1
- package/dist/{chunk-3X6PM7DU.cjs → chunk-F3YZMOAU.cjs} +8 -8
- package/dist/{chunk-3X6PM7DU.cjs.map → chunk-F3YZMOAU.cjs.map} +1 -1
- package/dist/{chunk-F77UENR6.cjs → chunk-F5WMX4EA.cjs} +586 -398
- package/dist/chunk-F5WMX4EA.cjs.map +1 -0
- package/dist/{chunk-HE4BIAOS.js → chunk-F7AQV62G.js} +5 -4
- package/dist/chunk-F7AQV62G.js.map +1 -0
- package/dist/{chunk-2RW7K6FN.cjs → chunk-GHX4P3V2.cjs} +2 -2
- package/dist/chunk-GHX4P3V2.cjs.map +1 -0
- package/dist/{chunk-B6HOIWQ6.js → chunk-GJ6RK75E.js} +5 -5
- package/dist/chunk-GJ6RK75E.js.map +1 -0
- package/dist/{chunk-FOXKFTVZ.cjs → chunk-GNT35C5U.cjs} +13 -13
- package/dist/chunk-GNT35C5U.cjs.map +1 -0
- package/dist/{chunk-4NAKHID5.js → chunk-GTKFV7O5.js} +2 -2
- package/dist/chunk-GTKFV7O5.js.map +1 -0
- package/dist/{chunk-ELKO4ZLR.cjs → chunk-GWC3HADL.cjs} +4 -4
- package/dist/{chunk-ELKO4ZLR.cjs.map → chunk-GWC3HADL.cjs.map} +1 -1
- package/dist/{chunk-OXNYIMZZ.js → chunk-H73MEMQB.js} +2 -2
- package/dist/chunk-H73MEMQB.js.map +1 -0
- package/dist/{chunk-E7FJOO4G.cjs → chunk-HJBMA5MB.cjs} +11 -11
- package/dist/{chunk-E7FJOO4G.cjs.map → chunk-HJBMA5MB.cjs.map} +1 -1
- package/dist/{chunk-2FYEVT2B.cjs → chunk-HLPSLDGL.cjs} +275 -160
- package/dist/chunk-HLPSLDGL.cjs.map +1 -0
- package/dist/{chunk-VW6M4B3Z.cjs → chunk-HY57ULY2.cjs} +5 -5
- package/dist/{chunk-VW6M4B3Z.cjs.map → chunk-HY57ULY2.cjs.map} +1 -1
- package/dist/{chunk-CAH3G4IS.js → chunk-HY66GLM6.js} +2 -2
- package/dist/chunk-HY66GLM6.js.map +1 -0
- package/dist/{chunk-G3JWXOGY.js → chunk-I5BE5M5L.js} +310 -122
- package/dist/chunk-I5BE5M5L.js.map +1 -0
- package/dist/{chunk-C4H6PB5J.cjs → chunk-I6TGFUCO.cjs} +4 -4
- package/dist/{chunk-C4H6PB5J.cjs.map → chunk-I6TGFUCO.cjs.map} +1 -1
- package/dist/{chunk-U4UJHOSH.js → chunk-IDCKSLYH.js} +3 -3
- package/dist/{chunk-U4UJHOSH.js.map → chunk-IDCKSLYH.js.map} +1 -1
- package/dist/{chunk-WQ53UQL4.cjs → chunk-ILCGLTSA.cjs} +4 -4
- package/dist/{chunk-WQ53UQL4.cjs.map → chunk-ILCGLTSA.cjs.map} +1 -1
- package/dist/{chunk-QBTVATSF.cjs → chunk-ITSSOVOB.cjs} +44 -47
- package/dist/chunk-ITSSOVOB.cjs.map +1 -0
- package/dist/{chunk-V6HWJQQV.js → chunk-IVNNSANC.js} +27 -30
- package/dist/chunk-IVNNSANC.js.map +1 -0
- package/dist/{chunk-SZHU7A5B.cjs → chunk-IWBGCBR6.cjs} +4 -4
- package/dist/{chunk-SZHU7A5B.cjs.map → chunk-IWBGCBR6.cjs.map} +1 -1
- package/dist/{chunk-Q4RESANI.cjs → chunk-J24VJOH3.cjs} +20 -4
- package/dist/chunk-J24VJOH3.cjs.map +1 -0
- package/dist/{chunk-Y4AXQOT4.cjs → chunk-JHPGF3FP.cjs} +8 -8
- package/dist/{chunk-Y4AXQOT4.cjs.map → chunk-JHPGF3FP.cjs.map} +1 -1
- package/dist/{chunk-BM6N4KHO.cjs → chunk-JTB5Q42C.cjs} +6 -22
- package/dist/chunk-JTB5Q42C.cjs.map +1 -0
- package/dist/{chunk-LPVIRJVF.cjs → chunk-K3FW2XZD.cjs} +9 -9
- package/dist/{chunk-LPVIRJVF.cjs.map → chunk-K3FW2XZD.cjs.map} +1 -1
- package/dist/{chunk-LS3LMQ23.js → chunk-MVAPK2BX.js} +162 -49
- package/dist/chunk-MVAPK2BX.js.map +1 -0
- package/dist/{chunk-XPR366DL.cjs → chunk-NGESVVJN.cjs} +17 -17
- package/dist/chunk-NGESVVJN.cjs.map +1 -0
- package/dist/{chunk-VUKQL3L2.cjs → chunk-NIRE5CNO.cjs} +20 -13
- package/dist/chunk-NIRE5CNO.cjs.map +1 -0
- package/dist/{chunk-VC5ABJXC.js → chunk-NLTVXLGT.js} +3 -3
- package/dist/{chunk-VC5ABJXC.js.map → chunk-NLTVXLGT.js.map} +1 -1
- package/dist/chunk-NUKRL3I6.cjs +23 -0
- package/dist/chunk-NUKRL3I6.cjs.map +1 -0
- package/dist/{chunk-R5YZACGK.js → chunk-OC4NTGMN.js} +3 -3
- package/dist/{chunk-R5YZACGK.js.map → chunk-OC4NTGMN.js.map} +1 -1
- package/dist/{chunk-GOVJO4YE.js → chunk-OHBIUXKM.js} +6 -6
- package/dist/chunk-OHBIUXKM.js.map +1 -0
- package/dist/{chunk-FPYT5WZP.cjs → chunk-P6A3M6VD.cjs} +10 -10
- package/dist/{chunk-FPYT5WZP.cjs.map → chunk-P6A3M6VD.cjs.map} +1 -1
- package/dist/{chunk-OKLYRPKL.cjs → chunk-Q47R5E2X.cjs} +8 -8
- package/dist/chunk-Q47R5E2X.cjs.map +1 -0
- package/dist/{chunk-HSQ5Q3I5.js → chunk-Q4CMI2LP.js} +12 -5
- package/dist/chunk-Q4CMI2LP.js.map +1 -0
- package/dist/{chunk-2XLKLVVR.js → chunk-Q5EWJPRY.js} +2 -2
- package/dist/chunk-Q5EWJPRY.js.map +1 -0
- package/dist/{chunk-SK4QLUBK.js → chunk-QARJGQSA.js} +16 -7
- package/dist/chunk-QARJGQSA.js.map +1 -0
- package/dist/{chunk-CZ2GKKYL.cjs → chunk-QDED6YO6.cjs} +5 -5
- package/dist/{chunk-CZ2GKKYL.cjs.map → chunk-QDED6YO6.cjs.map} +1 -1
- package/dist/{chunk-VK7MAV65.cjs → chunk-QKLOP4VC.cjs} +2 -2
- package/dist/{chunk-VK7MAV65.cjs.map → chunk-QKLOP4VC.cjs.map} +1 -1
- package/dist/{chunk-FIOCJYLA.js → chunk-QRSUA2CV.js} +3 -3
- package/dist/{chunk-FIOCJYLA.js.map → chunk-QRSUA2CV.js.map} +1 -1
- package/dist/{chunk-ZT57WTUJ.cjs → chunk-R3UPQFKK.cjs} +21 -12
- package/dist/chunk-R3UPQFKK.cjs.map +1 -0
- package/dist/{chunk-X2FR4OIT.js → chunk-R7WIIPUR.js} +2 -2
- package/dist/chunk-R7WIIPUR.js.map +1 -0
- package/dist/{chunk-RP5HQVLD.js → chunk-RNB4APBZ.js} +30 -7
- package/dist/chunk-RNB4APBZ.js.map +1 -0
- package/dist/{chunk-GD63JPGC.cjs → chunk-ROYPRJH4.cjs} +9 -9
- package/dist/{chunk-GD63JPGC.cjs.map → chunk-ROYPRJH4.cjs.map} +1 -1
- package/dist/{chunk-V26QVGUG.js → chunk-RUDY2GTT.js} +59 -23
- package/dist/chunk-RUDY2GTT.js.map +1 -0
- package/dist/{chunk-JIQRXKTA.cjs → chunk-SKXBJ2NU.cjs} +7 -7
- package/dist/chunk-SKXBJ2NU.cjs.map +1 -0
- package/dist/{chunk-XROIW6BH.js → chunk-SUKXXLWD.js} +6 -6
- package/dist/chunk-SUKXXLWD.js.map +1 -0
- package/dist/{chunk-LTSTGCL6.js → chunk-T73NA43R.js} +3 -3
- package/dist/{chunk-LTSTGCL6.js.map → chunk-T73NA43R.js.map} +1 -1
- package/dist/chunk-T7O6K6PX.js +20 -0
- package/dist/chunk-T7O6K6PX.js.map +1 -0
- package/dist/{chunk-5F5NWKPN.js → chunk-T7XEKOVW.js} +5 -20
- package/dist/chunk-T7XEKOVW.js.map +1 -0
- package/dist/{chunk-HAWE74GQ.cjs → chunk-U2AC6JUP.cjs} +8 -8
- package/dist/chunk-U2AC6JUP.cjs.map +1 -0
- package/dist/{chunk-3WVMJY7F.js → chunk-UC3HT2S4.js} +3 -3
- package/dist/{chunk-3WVMJY7F.js.map → chunk-UC3HT2S4.js.map} +1 -1
- package/dist/{chunk-PBZ7HMBP.js → chunk-UPRJR6IP.js} +4 -4
- package/dist/chunk-UPRJR6IP.js.map +1 -0
- package/dist/{chunk-3V7UJLQT.js → chunk-UQGQFBRL.js} +3 -3
- package/dist/chunk-UQGQFBRL.js.map +1 -0
- package/dist/{chunk-2D43RD5D.cjs → chunk-V2UUGUY4.cjs} +27 -27
- package/dist/chunk-V2UUGUY4.cjs.map +1 -0
- package/dist/{chunk-6AZDM6LK.js → chunk-VF7EWVDG.js} +3 -3
- package/dist/{chunk-6AZDM6LK.js.map → chunk-VF7EWVDG.js.map} +1 -1
- package/dist/{chunk-PNVDQL5Y.cjs → chunk-VTYY7XL5.cjs} +2 -2
- package/dist/chunk-VTYY7XL5.cjs.map +1 -0
- package/dist/{chunk-Y4I4EQFK.js → chunk-WKRSH2VR.js} +3 -3
- package/dist/{chunk-Y4I4EQFK.js.map → chunk-WKRSH2VR.js.map} +1 -1
- package/dist/{chunk-4QEC4CCS.js → chunk-WTMU7J4U.js} +2 -2
- package/dist/{chunk-4QEC4CCS.js.map → chunk-WTMU7J4U.js.map} +1 -1
- package/dist/{chunk-KSWHTR54.js → chunk-XN7NOENA.js} +6 -6
- package/dist/chunk-XN7NOENA.js.map +1 -0
- package/dist/{chunk-ADLLFY3H.cjs → chunk-XSX2UU6Y.cjs} +10 -9
- package/dist/chunk-XSX2UU6Y.cjs.map +1 -0
- package/dist/{chunk-LD4MOBFX.js → chunk-XV4IZNV4.js} +9 -9
- package/dist/chunk-XV4IZNV4.js.map +1 -0
- package/dist/{chunk-EZ2YEF4F.cjs → chunk-XWL6O3SW.cjs} +4 -4
- package/dist/chunk-XWL6O3SW.cjs.map +1 -0
- package/dist/{chunk-PGP7IOJ2.js → chunk-YMA4S2WO.js} +4 -4
- package/dist/{chunk-PGP7IOJ2.js.map → chunk-YMA4S2WO.js.map} +1 -1
- package/dist/{chunk-OUOXM36O.cjs → chunk-YPJ5NH5N.cjs} +11 -11
- package/dist/chunk-YPJ5NH5N.cjs.map +1 -0
- package/dist/{chunk-YLQQX5W2.cjs → chunk-ZF2LDKQQ.cjs} +2 -2
- package/dist/chunk-ZF2LDKQQ.cjs.map +1 -0
- package/dist/{chunk-L5YO6PWL.cjs → chunk-ZNW6V4Y6.cjs} +2 -2
- package/dist/chunk-ZNW6V4Y6.cjs.map +1 -0
- package/dist/client/index.cjs.map +1 -1
- package/dist/client/index.js.map +1 -1
- package/dist/client/theokit-client.d.cts +36 -0
- package/dist/client/theokit-client.d.ts +36 -0
- package/dist/client/types.d.cts +30 -0
- package/dist/client/types.d.ts +30 -0
- package/dist/compact-session-FUJDVF7B.js +22 -0
- package/dist/{compact-session-4MNKNMO2.js.map → compact-session-FUJDVF7B.js.map} +1 -1
- package/dist/compact-session-LEWF554G.cjs +59 -0
- package/dist/{compact-session-EPFBQ46Z.cjs.map → compact-session-LEWF554G.cjs.map} +1 -1
- package/dist/compaction.cjs +17 -16
- package/dist/compaction.d.cts +13 -13
- package/dist/compaction.d.ts +13 -13
- package/dist/compaction.js +4 -3
- package/dist/concurrency.cjs +7 -6
- package/dist/concurrency.cjs.map +1 -1
- package/dist/concurrency.js +5 -4
- package/dist/concurrency.js.map +1 -1
- package/dist/context/index.cjs +7 -7
- package/dist/context/index.js +3 -3
- package/dist/context-FDOON2DB.js +6 -0
- package/dist/{context-ENXZNF6J.js.map → context-FDOON2DB.js.map} +1 -1
- package/dist/context-VMIE4BMD.cjs +23 -0
- package/dist/{context-7USNN6LP.cjs.map → context-VMIE4BMD.cjs.map} +1 -1
- package/dist/cron-BcWmzWzT.d.cts +240 -0
- package/dist/cron-De6hzWCF.d.ts +240 -0
- package/dist/cron.cjs +43 -41
- package/dist/cron.d.cts +5 -3
- package/dist/cron.d.ts +5 -3
- package/dist/cron.js +42 -40
- package/dist/define-tool.d.ts +14 -6
- package/dist/{errors-BSoXcl3F.d.cts → errors-BgJH9PHi.d.cts} +39 -24
- package/dist/{errors-CHllybaU.d.ts → errors-C5fJUqLk.d.ts} +39 -24
- package/dist/errors.cjs +22 -21
- package/dist/errors.d.cts +2 -2
- package/dist/errors.d.ts +2 -2
- package/dist/errors.js +3 -2
- package/dist/eval.cjs +61 -58
- package/dist/eval.cjs.map +1 -1
- package/dist/eval.d.cts +38 -0
- package/dist/eval.d.ts +38 -0
- package/dist/eval.js +51 -48
- package/dist/eval.js.map +1 -1
- package/dist/event-bus.d.ts +16 -0
- package/dist/{executor-2Z6XJJJG.js → executor-BMEHFOXZ.js} +8 -7
- package/dist/executor-BMEHFOXZ.js.map +1 -0
- package/dist/{executor-2Z3LGG3I.cjs → executor-ZERJ3DGN.cjs} +25 -24
- package/dist/executor-ZERJ3DGN.cjs.map +1 -0
- package/dist/filesystem/index.cjs +8 -7
- package/dist/filesystem/index.cjs.map +1 -1
- package/dist/filesystem/index.js +4 -3
- package/dist/filesystem/index.js.map +1 -1
- package/dist/filesystem/local-filesystem.d.cts +18 -0
- package/dist/filesystem/local-filesystem.d.ts +18 -0
- package/dist/filesystem/types.d.cts +12 -0
- package/dist/filesystem/types.d.ts +12 -0
- package/dist/fs-session-store-3MOJQGP2.cjs +20 -0
- package/dist/{fs-session-store-VVY2AHWG.cjs.map → fs-session-store-3MOJQGP2.cjs.map} +1 -1
- package/dist/fs-session-store-IN7JTTXD.js +11 -0
- package/dist/{fs-session-store-R5FD3EN6.js.map → fs-session-store-IN7JTTXD.js.map} +1 -1
- package/dist/generate-object-N5MDZUJI.js +8 -0
- package/dist/{generate-object-WQRCXFD2.js.map → generate-object-N5MDZUJI.js.map} +1 -1
- package/dist/generate-object-PGSP5U7N.cjs +21 -0
- package/dist/{generate-object-AVXOJK2I.cjs.map → generate-object-PGSP5U7N.cjs.map} +1 -1
- package/dist/generate-object.d.ts +20 -0
- package/dist/index-manager-NG5YENWO.cjs +22 -0
- package/dist/{index-manager-VRU3A2YL.cjs.map → index-manager-NG5YENWO.cjs.map} +1 -1
- package/dist/index-manager-ZMRJ6ZII.js +13 -0
- package/dist/{index-manager-WS7TVKUW.js.map → index-manager-ZMRJ6ZII.js.map} +1 -1
- package/dist/index.cjs +169 -155
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +702 -54
- package/dist/index.d.ts +702 -54
- package/dist/index.js +61 -58
- package/dist/index.js.map +1 -1
- package/dist/{inject-session-GMBMJVNZ.js → inject-session-BJMJH5BX.js} +9 -8
- package/dist/inject-session-BJMJH5BX.js.map +1 -0
- package/dist/inject-session-WQGGMCQY.cjs +29 -0
- package/dist/inject-session-WQGGMCQY.cjs.map +1 -0
- package/dist/internal/auth/auth-types.d.ts +83 -1
- package/dist/internal/auth/credential-store.d.ts +34 -6
- package/dist/internal/auth/oauth-device.d.ts +0 -1
- package/dist/internal/auth/resolve-credential.d.ts +40 -0
- package/dist/internal/budget/tracker/budget.d.ts +12 -14
- package/dist/internal/budget/usage-accumulator.d.ts +15 -0
- package/dist/internal/llm/anthropic-shared.d.ts +8 -4
- package/dist/internal/llm/model-identifier.d.ts +26 -0
- package/dist/internal/llm/openai.d.ts +8 -0
- package/dist/internal/llm/prompt-cache-key.d.ts +1 -0
- package/dist/internal/llm/responses.d.ts +67 -1
- package/dist/internal/llm/router.d.ts +8 -0
- package/dist/internal/llm/types.d.ts +27 -1
- package/dist/internal/local-agent/real-local-run-provider.d.ts +8 -3
- package/dist/internal/local-agent/real-local-run-tools.d.ts +23 -4
- package/dist/internal/mcp/oauth.d.ts +5 -0
- package/dist/internal/mcp/token-storage.d.ts +34 -0
- package/dist/internal/memory/adapters/index.cjs +12 -11
- package/dist/internal/memory/adapters/index.d.cts +3 -1
- package/dist/internal/memory/adapters/index.d.ts +3 -1
- package/dist/internal/memory/adapters/index.js +9 -8
- package/dist/internal/memory/adapters/openai-compatible.d.cts +45 -0
- package/dist/internal/memory/adapters/openai-compatible.d.ts +45 -0
- package/dist/internal/memory/embedding-cache.d.ts +42 -1
- package/dist/internal/memory/escape-like-pattern.d.ts +22 -0
- package/dist/internal/memory/sqlite-vec-loader.d.ts +1 -3
- package/dist/internal/memory/storage/markdown-store.d.ts +0 -5
- package/dist/internal/persistence/cwd-mutex.d.cts +34 -0
- package/dist/internal/persistence/cwd-mutex.d.ts +34 -0
- package/dist/internal/persistence/exclusive-create.d.cts +31 -0
- package/dist/internal/persistence/exclusive-create.d.ts +31 -0
- package/dist/internal/persistence/file-lock.d.cts +28 -0
- package/dist/internal/persistence/file-lock.d.ts +28 -0
- package/dist/internal/persistence/fs-session-store.d.cts +3 -0
- package/dist/internal/persistence/fs-session-store.d.ts +3 -0
- package/dist/internal/persistence/fts5-sanitize.d.cts +20 -0
- package/dist/internal/persistence/fts5-sanitize.d.ts +20 -0
- package/dist/internal/persistence/index.cjs +40 -39
- package/dist/internal/persistence/index.cjs.map +1 -1
- package/dist/internal/persistence/index.d.cts +6 -1
- package/dist/internal/persistence/index.d.ts +6 -1
- package/dist/internal/persistence/index.js +9 -8
- package/dist/internal/persistence/index.js.map +1 -1
- package/dist/internal/persistence/paths.d.cts +54 -1
- package/dist/internal/persistence/paths.d.ts +54 -1
- package/dist/internal/persistence/persistence-schema.d.cts +9 -1
- package/dist/internal/persistence/persistence-schema.d.ts +9 -1
- package/dist/internal/persistence/schema-version.d.cts +215 -1
- package/dist/internal/persistence/schema-version.d.ts +215 -1
- package/dist/internal/persistence/session-writer.d.cts +7 -7
- package/dist/internal/persistence/session-writer.d.ts +7 -7
- package/dist/internal/persistence/sqlite-cas.d.cts +37 -1
- package/dist/internal/persistence/sqlite-cas.d.ts +37 -1
- package/dist/internal/persistence/sqlite-open.d.cts +14 -0
- package/dist/internal/persistence/sqlite-open.d.ts +14 -0
- package/dist/internal/persistence/sqlite-wal.d.cts +45 -0
- package/dist/internal/persistence/sqlite-wal.d.ts +45 -0
- package/dist/internal/persistence/transcript-ops.d.cts +7 -1
- package/dist/internal/persistence/transcript-ops.d.ts +7 -1
- package/dist/internal/plugins/types.d.cts +1 -1
- package/dist/internal/plugins/types.d.ts +1 -1
- package/dist/internal/providers/builtin/openai-chatgpt.d.ts +12 -0
- package/dist/internal/providers/catalog-loader.d.ts +8 -0
- package/dist/internal/providers/catalog-schema.d.ts +55 -0
- package/dist/internal/providers/catalog-source-models-dev.d.ts +36 -0
- package/dist/internal/runtime/concurrency/delegation-depth.d.ts +27 -0
- package/dist/internal/runtime/concurrency/subagent-credentials.d.ts +33 -1
- package/dist/internal/runtime/context/context-discovery-runner.d.ts +44 -0
- package/dist/internal/runtime/context/context-discovery.d.ts +58 -0
- package/dist/internal/runtime/context/context-rules-frontmatter.d.ts +70 -1
- package/dist/internal/runtime/fixtures/fixture-mode.d.ts +15 -1
- package/dist/internal/runtime/lifecycle/post-run-lifecycle.d.ts +15 -0
- package/dist/internal/runtime/registry/agent-registry-store.d.ts +12 -0
- package/dist/internal/runtime/registry/live-agent-registry.d.ts +37 -0
- package/dist/internal/scorers/llm-judge.d.ts +6 -1
- package/dist/internal/security/index.cjs +14 -13
- package/dist/internal/security/index.d.cts +4 -1
- package/dist/internal/security/index.d.ts +4 -1
- package/dist/internal/security/index.js +4 -3
- package/dist/internal/security/path-guard.d.cts +46 -0
- package/dist/internal/security/path-guard.d.ts +46 -0
- package/dist/internal/security/redact.d.cts +71 -0
- package/dist/internal/security/redact.d.ts +71 -0
- package/dist/internal/session/agent-session.d.ts +15 -4
- package/dist/internal/session/session-cache.d.ts +5 -0
- package/dist/internal/task/store.d.ts +91 -5
- package/dist/internal/telemetry/span-names.d.ts +0 -1
- package/dist/internal/telemetry/tracer.d.ts +14 -0
- package/dist/job-queue.d.ts +18 -0
- package/dist/judge-call-DWHAJATE.js +6 -0
- package/dist/{judge-call-MDIPTBJI.js.map → judge-call-DWHAJATE.js.map} +1 -1
- package/dist/judge-call-EGYRC2RE.cjs +23 -0
- package/dist/{judge-call-G5SGV2M2.cjs.map → judge-call-EGYRC2RE.cjs.map} +1 -1
- package/dist/mcp-auth.cjs +41 -25
- package/dist/mcp-auth.cjs.map +1 -1
- package/dist/mcp-auth.js +34 -18
- package/dist/mcp-auth.js.map +1 -1
- package/dist/models.cjs +42 -27
- package/dist/models.cjs.map +1 -1
- package/dist/models.js +25 -10
- package/dist/models.js.map +1 -1
- package/dist/oauth-transaction-store-BT4GLTLK.cjs +36 -0
- package/dist/{oauth-transaction-store-7CKHPQRN.cjs.map → oauth-transaction-store-BT4GLTLK.cjs.map} +1 -1
- package/dist/oauth-transaction-store-W52KVHQ4.js +3 -0
- package/dist/{oauth-transaction-store-W74I6EFD.js.map → oauth-transaction-store-W52KVHQ4.js.map} +1 -1
- package/dist/path-safety.cjs +11 -10
- package/dist/path-safety.js +4 -3
- package/dist/permission-engine.d.ts +55 -0
- package/dist/persistence.cjs +43 -42
- package/dist/persistence.cjs.map +1 -1
- package/dist/persistence.js +13 -12
- package/dist/persistence.js.map +1 -1
- package/dist/project.cjs +9 -8
- package/dist/project.cjs.map +1 -1
- package/dist/project.js +5 -4
- package/dist/project.js.map +1 -1
- package/dist/providers.cjs +23 -0
- package/dist/providers.cjs.map +1 -0
- package/dist/providers.d.cts +29 -0
- package/dist/providers.d.ts +29 -0
- package/dist/providers.js +10 -0
- package/dist/providers.js.map +1 -0
- package/dist/registry-VFKX7WOP.cjs +47 -0
- package/dist/{registry-63ASMXT4.cjs.map → registry-VFKX7WOP.cjs.map} +1 -1
- package/dist/registry-VFP3WWQP.js +10 -0
- package/dist/{registry-O7FJ2MPM.js.map → registry-VFP3WWQP.js.map} +1 -1
- package/dist/retry.cjs +5 -4
- package/dist/retry.js +4 -3
- package/dist/{run-C8FBAC8o.d.cts → run-BYSHf58D.d.cts} +185 -33
- package/dist/{run-C8FBAC8o.d.ts → run-BYSHf58D.d.ts} +185 -33
- package/dist/{run-to-completion-JDPIUKSH.js → run-to-completion-DRO77625.js} +3 -3
- package/dist/{run-to-completion-JDPIUKSH.js.map → run-to-completion-DRO77625.js.map} +1 -1
- package/dist/{run-to-completion-J73I6IY4.cjs → run-to-completion-X4OWM673.cjs} +13 -13
- package/dist/{run-to-completion-J73I6IY4.cjs.map → run-to-completion-X4OWM673.cjs.map} +1 -1
- package/dist/sandbox/bwrap.d.cts +27 -13
- package/dist/sandbox/bwrap.d.ts +27 -13
- package/dist/sandbox/index.cjs +20 -19
- package/dist/sandbox/index.cjs.map +1 -1
- package/dist/sandbox/index.js +5 -4
- package/dist/sandbox/index.js.map +1 -1
- package/dist/sandbox/linux-sandbox.d.cts +72 -0
- package/dist/sandbox/linux-sandbox.d.ts +72 -0
- package/dist/sandbox/local-sandbox.d.cts +41 -0
- package/dist/sandbox/local-sandbox.d.ts +41 -0
- package/dist/sandbox/seccomp.d.cts +6 -0
- package/dist/sandbox/seccomp.d.ts +6 -0
- package/dist/sandbox/types.d.cts +64 -0
- package/dist/sandbox/types.d.ts +64 -0
- package/dist/scorers.d.ts +38 -7
- package/dist/sdk-agent-D8qJVkuV.d.ts +860 -0
- package/dist/sdk-agent-DEoKhA8a.d.cts +860 -0
- package/dist/server/auth/errors.d.cts +1 -1
- package/dist/server/auth/errors.d.ts +1 -1
- package/dist/server/auth/index.cjs +29 -21
- package/dist/server/auth/index.cjs.map +1 -1
- package/dist/server/auth/index.d.cts +25 -15
- package/dist/server/auth/index.d.ts +25 -15
- package/dist/server/auth/index.js +15 -7
- package/dist/server/auth/index.js.map +1 -1
- package/dist/server/auth/oauth-transaction-store.d.cts +13 -1
- package/dist/server/auth/oauth-transaction-store.d.ts +13 -1
- package/dist/server/auth/orchestrator.d.cts +1 -1
- package/dist/server/auth/orchestrator.d.ts +1 -1
- package/dist/server/auth/types.d.cts +1 -1
- package/dist/server/auth/types.d.ts +1 -1
- package/dist/server/auth/validate-return-to.d.cts +21 -11
- package/dist/server/auth/validate-return-to.d.ts +21 -11
- package/dist/server/errors-envelope.cjs +15 -14
- package/dist/server/errors-envelope.cjs.map +1 -1
- package/dist/server/errors-envelope.d.cts +4 -4
- package/dist/server/errors-envelope.d.ts +4 -4
- package/dist/server/errors-envelope.js +4 -3
- package/dist/server/errors-envelope.js.map +1 -1
- package/dist/session-transcript-AKDYYGXQ.js +6 -0
- package/dist/{session-transcript-RAKEK76V.js.map → session-transcript-AKDYYGXQ.js.map} +1 -1
- package/dist/session-transcript-JXHFTB7G.cjs +51 -0
- package/dist/{session-transcript-DOM3UTXR.cjs.map → session-transcript-JXHFTB7G.cjs.map} +1 -1
- package/dist/skills.cjs +8 -7
- package/dist/skills.js +6 -5
- package/dist/stream-object-BUCF5PHO.cjs +21 -0
- package/dist/{stream-object-L3Q7PBMF.cjs.map → stream-object-BUCF5PHO.cjs.map} +1 -1
- package/dist/stream-object-L57K4OFS.js +8 -0
- package/dist/{stream-object-ZYXWS4B2.js.map → stream-object-L57K4OFS.js.map} +1 -1
- package/dist/{stream-to-completion-DFJ5T3BK.js → stream-to-completion-QV5HCL3J.js} +3 -3
- package/dist/{stream-to-completion-DFJ5T3BK.js.map → stream-to-completion-QV5HCL3J.js.map} +1 -1
- package/dist/{stream-to-completion-H2MHISSK.cjs → stream-to-completion-SRISU5AB.cjs} +10 -10
- package/dist/{stream-to-completion-H2MHISSK.cjs.map → stream-to-completion-SRISU5AB.cjs.map} +1 -1
- package/dist/subagents-loader-AZIXJ7D3.cjs +16 -0
- package/dist/{subagents-loader-VRW73QQT.cjs.map → subagents-loader-AZIXJ7D3.cjs.map} +1 -1
- package/dist/subagents-loader-J54ESLDV.js +7 -0
- package/dist/{subagents-loader-I56GSKAQ.js.map → subagents-loader-J54ESLDV.js.map} +1 -1
- package/dist/subagents-loader.cjs +7 -6
- package/dist/subagents-loader.cjs.map +1 -1
- package/dist/subagents-loader.d.cts +3 -2
- package/dist/subagents-loader.d.ts +3 -2
- package/dist/subagents-loader.js +5 -4
- package/dist/subagents-loader.js.map +1 -1
- package/dist/subscription/define-subscription.d.cts +1 -1
- package/dist/subscription/define-subscription.d.ts +1 -1
- package/dist/subscription/index.cjs +22 -9
- package/dist/subscription/index.cjs.map +1 -1
- package/dist/subscription/index.d.cts +1 -1
- package/dist/subscription/index.d.ts +1 -1
- package/dist/subscription/index.js +21 -8
- package/dist/subscription/index.js.map +1 -1
- package/dist/subscription/internal/adapter-types.d.cts +1 -1
- package/dist/subscription/internal/adapter-types.d.ts +1 -1
- package/dist/subscription/internal/server-integration.d.cts +1 -1
- package/dist/subscription/internal/server-integration.d.ts +1 -1
- package/dist/subscription/internal/sse-encoder.d.cts +1 -1
- package/dist/subscription/internal/sse-encoder.d.ts +1 -1
- package/dist/subscription/internal/sse-parser.d.cts +1 -1
- package/dist/subscription/internal/sse-parser.d.ts +1 -1
- package/dist/subscription/internal/subscription-runtime.d.cts +1 -1
- package/dist/subscription/internal/subscription-runtime.d.ts +1 -1
- package/dist/subscription/internal/ws-adapter-node.d.cts +1 -1
- package/dist/subscription/internal/ws-adapter-node.d.ts +1 -1
- package/dist/subscription/theokit-subscribe.d.cts +14 -1
- package/dist/subscription/theokit-subscribe.d.ts +14 -1
- package/dist/subscription/types.d.cts +19 -1
- package/dist/subscription/types.d.ts +19 -1
- package/dist/task-store.cjs +8 -7
- package/dist/task-store.js +5 -4
- package/dist/types/agent-prims.d.ts +14 -0
- package/dist/types/agent.d.ts +92 -11
- package/dist/types/batch.d.ts +7 -1
- package/dist/types/conversation.d.ts +18 -5
- package/dist/types/goal-events.d.ts +4 -8
- package/dist/types/memory-adapter.d.ts +12 -1
- package/dist/types/plugin.d.ts +101 -0
- package/dist/types/provider-profile.d.ts +32 -0
- package/dist/types/run-events.d.ts +28 -1
- package/dist/types/run.d.ts +35 -23
- package/dist/types/sdk-agent.d.ts +14 -0
- package/dist/types/session-record.d.ts +18 -1
- package/dist/types/task.d.ts +15 -1
- package/dist/types/theokit.d.ts +10 -1
- package/dist/types/updates.d.ts +35 -4
- package/dist/types/workflow.d.ts +155 -0
- package/dist/workflow.cjs +29 -28
- package/dist/workflow.d.cts +666 -17
- package/dist/workflow.d.ts +666 -17
- package/dist/workflow.js +8 -7
- package/docs/error-codes.md +215 -0
- package/docs/harness-capability-map.md +1358 -0
- package/package.json +29 -16
- package/bin/init-claude.mjs +0 -68
- package/claude-template/AGENTS.md +0 -157
- package/claude-template/CLAUDE.md +0 -66
- package/claude-template/dot-claude/rules/theokit-conventions.md +0 -32
- package/claude-template/dot-claude/settings.json +0 -16
- package/claude-template/dot-claude/skills/theokit-agent-core/SKILL.md +0 -209
- package/claude-template/dot-claude/skills/theokit-auth/SKILL.md +0 -102
- package/claude-template/dot-claude/skills/theokit-budget/SKILL.md +0 -176
- package/claude-template/dot-claude/skills/theokit-client/SKILL.md +0 -58
- package/claude-template/dot-claude/skills/theokit-compaction/SKILL.md +0 -102
- package/claude-template/dot-claude/skills/theokit-concurrency/SKILL.md +0 -68
- package/claude-template/dot-claude/skills/theokit-config/SKILL.md +0 -139
- package/claude-template/dot-claude/skills/theokit-cron/SKILL.md +0 -148
- package/claude-template/dot-claude/skills/theokit-di/SKILL.md +0 -233
- package/claude-template/dot-claude/skills/theokit-di-agent/SKILL.md +0 -294
- package/claude-template/dot-claude/skills/theokit-errors/SKILL.md +0 -172
- package/claude-template/dot-claude/skills/theokit-eval/SKILL.md +0 -179
- package/claude-template/dot-claude/skills/theokit-filesystem/SKILL.md +0 -74
- package/claude-template/dot-claude/skills/theokit-gateways/SKILL.md +0 -209
- package/claude-template/dot-claude/skills/theokit-memory/SKILL.md +0 -176
- package/claude-template/dot-claude/skills/theokit-messages/SKILL.md +0 -58
- package/claude-template/dot-claude/skills/theokit-models/SKILL.md +0 -79
- package/claude-template/dot-claude/skills/theokit-path-safety/SKILL.md +0 -60
- package/claude-template/dot-claude/skills/theokit-persistence/SKILL.md +0 -85
- package/claude-template/dot-claude/skills/theokit-project/SKILL.md +0 -55
- package/claude-template/dot-claude/skills/theokit-retry/SKILL.md +0 -50
- package/claude-template/dot-claude/skills/theokit-sandbox/SKILL.md +0 -93
- package/claude-template/dot-claude/skills/theokit-sanitize/SKILL.md +0 -66
- package/claude-template/dot-claude/skills/theokit-skills/SKILL.md +0 -68
- package/claude-template/dot-claude/skills/theokit-streaming/SKILL.md +0 -156
- package/claude-template/dot-claude/skills/theokit-subagents/SKILL.md +0 -109
- package/claude-template/dot-claude/skills/theokit-subscriptions/SKILL.md +0 -148
- package/claude-template/dot-claude/skills/theokit-task-store/SKILL.md +0 -75
- package/claude-template/dot-claude/skills/theokit-tools/SKILL.md +0 -170
- package/claude-template/dot-claude/skills/theokit-workflows/SKILL.md +0 -218
- package/dist/agent-FFVV4U5N.js +0 -50
- package/dist/agent-YLAHVHEH.cjs +0 -59
- package/dist/agent-session-store-DUGBAX5V.cjs +0 -23
- package/dist/agent-session-store-TNCGL5RN.js +0 -6
- package/dist/batch-UPKN4SG6.js.map +0 -1
- package/dist/batch-ZEFN5SO7.cjs.map +0 -1
- package/dist/chunk-2D43RD5D.cjs.map +0 -1
- package/dist/chunk-2FYEVT2B.cjs.map +0 -1
- package/dist/chunk-2RW7K6FN.cjs.map +0 -1
- package/dist/chunk-2XLKLVVR.js.map +0 -1
- package/dist/chunk-34XOCZJO.js.map +0 -1
- package/dist/chunk-3V7UJLQT.js.map +0 -1
- package/dist/chunk-4NAKHID5.js.map +0 -1
- package/dist/chunk-4Q4K4WB5.js.map +0 -1
- package/dist/chunk-5F5NWKPN.js.map +0 -1
- package/dist/chunk-5NBUH3NO.js.map +0 -1
- package/dist/chunk-5YKNEMXR.cjs.map +0 -1
- package/dist/chunk-7W7ZWMLQ.js.map +0 -1
- package/dist/chunk-ADLLFY3H.cjs.map +0 -1
- package/dist/chunk-B4YA6BRS.cjs.map +0 -1
- package/dist/chunk-B6HOIWQ6.js.map +0 -1
- package/dist/chunk-BDTVFIPB.cjs.map +0 -1
- package/dist/chunk-BFYGJGC5.js.map +0 -1
- package/dist/chunk-BM6N4KHO.cjs.map +0 -1
- package/dist/chunk-CAH3G4IS.js.map +0 -1
- package/dist/chunk-EZ2YEF4F.cjs.map +0 -1
- package/dist/chunk-F77UENR6.cjs.map +0 -1
- package/dist/chunk-FOXKFTVZ.cjs.map +0 -1
- package/dist/chunk-G3JWXOGY.js.map +0 -1
- package/dist/chunk-GOVJO4YE.js.map +0 -1
- package/dist/chunk-HAWE74GQ.cjs.map +0 -1
- package/dist/chunk-HE4BIAOS.js.map +0 -1
- package/dist/chunk-HSQ5Q3I5.js.map +0 -1
- package/dist/chunk-JIQRXKTA.cjs.map +0 -1
- package/dist/chunk-KSWHTR54.js.map +0 -1
- package/dist/chunk-L5YO6PWL.cjs.map +0 -1
- package/dist/chunk-LD4MOBFX.js.map +0 -1
- package/dist/chunk-LS3LMQ23.js.map +0 -1
- package/dist/chunk-MSFLYJDY.js.map +0 -1
- package/dist/chunk-NZL4BNFQ.js.map +0 -1
- package/dist/chunk-OKLYRPKL.cjs.map +0 -1
- package/dist/chunk-OUOXM36O.cjs.map +0 -1
- package/dist/chunk-OXNYIMZZ.js.map +0 -1
- package/dist/chunk-PBZ7HMBP.js.map +0 -1
- package/dist/chunk-PNVDQL5Y.cjs.map +0 -1
- package/dist/chunk-Q4RESANI.cjs.map +0 -1
- package/dist/chunk-QBTVATSF.cjs.map +0 -1
- package/dist/chunk-RAHSWE5C.cjs.map +0 -1
- package/dist/chunk-RP5HQVLD.js.map +0 -1
- package/dist/chunk-SEL2ZQMT.js.map +0 -1
- package/dist/chunk-SK4QLUBK.js.map +0 -1
- package/dist/chunk-TTJ54H3E.cjs.map +0 -1
- package/dist/chunk-V26QVGUG.js.map +0 -1
- package/dist/chunk-V6HWJQQV.js.map +0 -1
- package/dist/chunk-VGPXHHF3.cjs.map +0 -1
- package/dist/chunk-VUKQL3L2.cjs.map +0 -1
- package/dist/chunk-VYCKUKPA.cjs.map +0 -1
- package/dist/chunk-VYHJZVL5.cjs.map +0 -1
- package/dist/chunk-X2FR4OIT.js.map +0 -1
- package/dist/chunk-XPR366DL.cjs.map +0 -1
- package/dist/chunk-XROIW6BH.js.map +0 -1
- package/dist/chunk-YLQQX5W2.cjs.map +0 -1
- package/dist/chunk-ZT57WTUJ.cjs.map +0 -1
- package/dist/compact-session-4MNKNMO2.js +0 -21
- package/dist/compact-session-EPFBQ46Z.cjs +0 -58
- package/dist/context-7USNN6LP.cjs +0 -22
- package/dist/context-ENXZNF6J.js +0 -5
- package/dist/cron-BMjgFH-_.d.ts +0 -631
- package/dist/cron-DFDdCdMM.d.cts +0 -631
- package/dist/executor-2Z3LGG3I.cjs.map +0 -1
- package/dist/executor-2Z6XJJJG.js.map +0 -1
- package/dist/fs-session-store-R5FD3EN6.js +0 -10
- package/dist/fs-session-store-VVY2AHWG.cjs +0 -19
- package/dist/generate-object-AVXOJK2I.cjs +0 -20
- package/dist/generate-object-WQRCXFD2.js +0 -7
- package/dist/index-manager-VRU3A2YL.cjs +0 -21
- package/dist/index-manager-WS7TVKUW.js +0 -12
- package/dist/inject-session-AUQLBDRS.cjs +0 -28
- package/dist/inject-session-AUQLBDRS.cjs.map +0 -1
- package/dist/inject-session-GMBMJVNZ.js.map +0 -1
- package/dist/judge-call-G5SGV2M2.cjs +0 -22
- package/dist/judge-call-MDIPTBJI.js +0 -5
- package/dist/oauth-transaction-store-7CKHPQRN.cjs +0 -32
- package/dist/oauth-transaction-store-W74I6EFD.js +0 -3
- package/dist/registry-63ASMXT4.cjs +0 -46
- package/dist/registry-O7FJ2MPM.js +0 -9
- package/dist/session-transcript-DOM3UTXR.cjs +0 -50
- package/dist/session-transcript-RAKEK76V.js +0 -5
- package/dist/stream-object-L3Q7PBMF.cjs +0 -20
- package/dist/stream-object-ZYXWS4B2.js +0 -7
- package/dist/subagents-loader-I56GSKAQ.js +0 -6
- package/dist/subagents-loader-VRW73QQT.cjs +0 -15
package/dist/index.d.cts
CHANGED
|
@@ -1,13 +1,16 @@
|
|
|
1
|
-
import { T as TheokitAgentError, B as BudgetOptions, a as BudgetHandle, b as BudgetSnapshot, E as ErrorMetadata } from './errors-
|
|
2
|
-
export { A as AgentDisposedError, c as AgentRunError, d as AgentRunErrorCode, e as AuthenticationError, f as BudgetExceedEvent, g as BudgetExceededError, h as BudgetLimit, i as BudgetMode, j as BudgetScope, k as BudgetThresholdEvent, l as BudgetWindow, C as ConfigurationError, m as ErrorCode, I as IntegrationNotConnectedError, n as InvalidTaskIdError, M as MemoryAdapterError, o as MemoryAdapterErrorCode, N as NetworkError, R as RateLimitError, p as TaskNotFoundError, U as UnknownAgentError, q as UnsupportedBudgetOperationError, r as UnsupportedRunOperationError, s as UnsupportedTaskOperationError, t as isTransientError } from './errors-
|
|
3
|
-
import { A as AgentOptions, L as LocalOptions,
|
|
4
|
-
export {
|
|
5
|
-
import { R as RunResult, M as ModelSelection, C as CustomTool, a as McpServerConfig, T as ToolResultContentBlock, b as Run, P as Processor, c as PermissionMode, d as PermissionEngine, e as RunEventSink, S as SDKMessage } from './run-
|
|
6
|
-
export { A as AgentConversationTurn, f as AssistantMessage, g as CompletionCheck, h as CompletionCheckResult, i as ConversationStep, j as ConversationTurn, k as CostBreakdown, l as CostSource, m as CostStatus, D as DoomLoopThresholds, G as GenerateOptions, n as GenerateRunResult, I as ImageBlock, o as InputProcessorContext, p as InteractionUpdate, q as McpAuthConfig, r as McpHttpServerConfig, s as McpOAuthConfig, t as McpStdioServerConfig, u as MessageOrigin, v as ModelParameterValue, O as OutputProcessorContext, w as PartialToolCallUpdate, x as PermissionAction, y as PermissionEngineOptions, z as PermissionRule, B as ProcessorControls, E as ProcessorTripwire, F as ProcessorViolation, H as RunCompactBoundaryEvent, J as RunCompletionCheckEvent, K as RunErrorDetail, L as RunEvent, N as RunGitInfo, Q as RunOperation, U as RunPermissionDeniedEvent, V as RunRateLimitEvent, W as RunStatus, X as RunTaskCompletedEvent, Y as RunTaskStartedEvent, Z as RunTaskUpdatedEvent, _ as RunTimelineEvent, $ as RunToCompletionOptions, a0 as RunToCompletionResult, a1 as RunToolProgressEvent, a2 as RunTripwireEvent, a3 as SDKAssistantMessage, a4 as SDKImage, a5 as SDKImageDimension, a6 as SDKObjectDelta, a7 as SDKRequestMessage, a8 as SDKStatusMessage, a9 as SDKSystemMessage, aa as SDKTaskMessage, ab as SDKThinkingMessage, ac as SDKToolUseMessage, ad as SDKUserMessage, ae as SDKUserMessageEvent, af as SendOptions, ag as ShellCommand, ah as ShellConversationTurn, ai as ShellOutput, aj as ShellOutputDeltaUpdate, ak as StepCompletedUpdate, al as StepStartedUpdate, am as StreamToCompletionResult, an as SummaryCompletedUpdate, ao as SummaryStartedUpdate, ap as SummaryUpdate, aq as TextBlock, ar as TextDeltaUpdate, as as ThinkingCompletedUpdate, at as ThinkingDeltaUpdate, au as ThinkingMessage, av as TokenDeltaUpdate, aw as TokenUsage, ax as ToolCall, ay as ToolCallCompletedUpdate, az as ToolCallStartedUpdate, aA as ToolContextMessage, aB as ToolResult, aC as ToolResultGuardOptions, aD as ToolUseBlock, aE as TurnEndedUpdate, aF as UserMessage, aG as UserMessageAppendedUpdate, aH as applyMode, aI as emitRunEvent } from './run-
|
|
1
|
+
import { T as TheokitAgentError, B as BudgetOptions, a as BudgetHandle, b as BudgetSnapshot, E as ErrorMetadata } from './errors-BgJH9PHi.cjs';
|
|
2
|
+
export { A as AgentDisposedError, c as AgentRunError, d as AgentRunErrorCode, e as AuthenticationError, f as BudgetExceedEvent, g as BudgetExceededError, h as BudgetLimit, i as BudgetMode, j as BudgetScope, k as BudgetThresholdEvent, l as BudgetWindow, C as ConfigurationError, m as ErrorCode, I as IntegrationNotConnectedError, n as InvalidTaskIdError, M as MemoryAdapterError, o as MemoryAdapterErrorCode, N as NetworkError, R as RateLimitError, p as TaskNotFoundError, U as UnknownAgentError, q as UnsupportedBudgetOperationError, r as UnsupportedRunOperationError, s as UnsupportedTaskOperationError, t as isTransientError } from './errors-BgJH9PHi.cjs';
|
|
3
|
+
import { A as AgentOptions, L as LocalOptions, S as SystemPromptResolver, C as CloudOptions, M as MemorySettings, a as AgentDefinition, b as SkillsSettings, c as ListAgentsOptions, d as ListResult, e as SDKAgentInfo, G as GetAgentOptions, f as ListRunsOptions, g as GetRunOptions, h as AgentOperationOptions, i as AgentDescription, P as Plugin$1, j as ProviderProfile, I as InlineSkill, B as BudgetTracker, k as MemoryProvider, l as PreToolCallDecision } from './agent-D3Xr_-6Z.cjs';
|
|
4
|
+
export { m as ActiveMemoryPassArgs, n as ActiveMemoryPassResult, o as AgentSubagentDescription, p as AgentToolDescription, q as BudgetCheck, r as BudgetTotal, s as BudgetUsageEvent, t as BuiltinToolName, u as CloudEnv, v as CloudRepo, w as CreateSkillSpec, H as HookName, x as MemoryProviderFactory, y as MemoryProviderHandle, z as MemoryProviderInitOptions, D as PluginContext, E as PostAssistantReplyContext, F as PostToolCallContext, J as PreToolCallContext, K as PreUserSendContext, N as PreUserSendResult, O as ProviderTransform, Q as ProviderTransformContext, R as RecordSessionSummaryArgs, T as SessionLifecycleContext, U as SessionRecord, V as SessionStore, W as SettingSource, X as Skill, Y as SkillsResolver, Z as SkillsResolverContext, _ as SystemPromptContext, $ as SystemPromptMemoryFact, a0 as TelemetrySettings, a1 as ToolCallSummary, a2 as ToolResultTransformContext, a3 as TransformContext } from './agent-D3Xr_-6Z.cjs';
|
|
5
|
+
import { k as CostBreakdown, aw as TokenUsage, R as RunResult, M as ModelSelection, C as CustomTool, a as McpServerConfig, T as ToolResultContentBlock, b as Run, P as Processor, c as PermissionMode, d as PermissionEngine, e as RunEventSink, S as SDKMessage } from './run-BYSHf58D.cjs';
|
|
6
|
+
export { A as AgentConversationTurn, f as AssistantMessage, g as CompletionCheck, h as CompletionCheckResult, i as ConversationStep, j as ConversationTurn, k as CostBreakdown, l as CostSource, m as CostStatus, D as DoomLoopThresholds, G as GenerateOptions, n as GenerateRunResult, I as ImageBlock, o as InputProcessorContext, p as InteractionUpdate, q as McpAuthConfig, r as McpHttpServerConfig, s as McpOAuthConfig, t as McpStdioServerConfig, u as MessageOrigin, v as ModelParameterValue, O as OutputProcessorContext, w as PartialToolCallUpdate, x as PermissionAction, y as PermissionEngineOptions, z as PermissionRule, B as ProcessorControls, E as ProcessorTripwire, F as ProcessorViolation, H as RunCompactBoundaryEvent, J as RunCompletionCheckEvent, K as RunErrorDetail, L as RunEvent, N as RunGitInfo, Q as RunOperation, U as RunPermissionDeniedEvent, V as RunRateLimitEvent, W as RunStatus, X as RunTaskCompletedEvent, Y as RunTaskStartedEvent, Z as RunTaskUpdatedEvent, _ as RunTimelineEvent, $ as RunToCompletionOptions, a0 as RunToCompletionResult, a1 as RunToolProgressEvent, a2 as RunTripwireEvent, a3 as SDKAssistantMessage, a4 as SDKImage, a5 as SDKImageDimension, a6 as SDKObjectDelta, a7 as SDKRequestMessage, a8 as SDKStatusMessage, a9 as SDKSystemMessage, aa as SDKTaskMessage, ab as SDKThinkingMessage, ac as SDKToolUseMessage, ad as SDKUserMessage, ae as SDKUserMessageEvent, af as SendOptions, ag as ShellCommand, ah as ShellConversationTurn, ai as ShellOutput, aj as ShellOutputDeltaUpdate, ak as StepCompletedUpdate, al as StepStartedUpdate, am as StreamToCompletionResult, an as SummaryCompletedUpdate, ao as SummaryStartedUpdate, ap as SummaryUpdate, aq as TextBlock, ar as TextDeltaUpdate, as as ThinkingCompletedUpdate, at as ThinkingDeltaUpdate, au as ThinkingMessage, av as TokenDeltaUpdate, aw as TokenUsage, ax as ToolCall, ay as ToolCallCompletedUpdate, az as ToolCallStartedUpdate, aA as ToolContextMessage, aB as ToolResult, aC as ToolResultGuardOptions, aD as ToolUseBlock, aE as TurnEndedUpdate, aF as UserMessage, aG as UserMessageAppendedUpdate, aH as applyMode, aI as emitRunEvent } from './run-BYSHf58D.cjs';
|
|
7
7
|
import * as zod from 'zod';
|
|
8
8
|
import { ZodType, z } from 'zod';
|
|
9
|
-
import { S as
|
|
10
|
-
export {
|
|
9
|
+
import { P as ProviderRoutingSettings, S as SDKAgent, C as ContextSettings, a as PluginsSettings, J as JudgeResult, G as GoalOptions, b as GoalEvent, c as GoalResult, M as MemoryId, d as SDKProvider } from './sdk-agent-DEoKhA8a.cjs';
|
|
10
|
+
export { A as AgentMemory, e as ContextBudget, f as ContextManagerKind, g as ContextSnapshot, h as ContextSource, i as ContextSourceStatus, I as InvalidateCacheOptions, j as MemoryAdapter, k as MemoryAdapterCapabilities, l as MemoryContext, m as MemoryFact, n as MemoryRevision, o as MemoryToolSchema, p as MemoryTurnMessage, q as PersonalityPreset, r as ProviderCapability, s as ProviderRoute, R as ResolvedProviderRoute, t as RunUntilIterator, u as SDKAgentPlugins, v as SDKAgentSkillDetail, w as SDKAgentSkills, x as SDKArtifact, y as SDKContextManager, z as SDKPluginMetadata, B as SDKProvidersManager, D as SystemPromptSkillRef, V as Verdict } from './sdk-agent-DEoKhA8a.cjs';
|
|
11
|
+
export { C as Cron, a as CronCreateOptions, b as CronGetOptions, c as CronJob, d as CronJobStatus, e as CronListOptions, f as CronOperationOptions, g as CronRunOptions, h as CronRuntime, i as CronSchedulerStatus, j as CronStartOptions } from './cron-BcWmzWzT.cjs';
|
|
12
|
+
import { StepResult } from './workflow.cjs';
|
|
13
|
+
export { Workflow, agentStep, fn } from './workflow.cjs';
|
|
11
14
|
|
|
12
15
|
/**
|
|
13
16
|
* Public compaction / context-management helpers (M2-1, extended V3-3).
|
|
@@ -101,6 +104,12 @@ interface BatchOptions extends AgentOptions {
|
|
|
101
104
|
/**
|
|
102
105
|
* Maximum parallel agents. Default 4 (ADR D136). Must be a positive
|
|
103
106
|
* integer. Capped to `prompts.length` to avoid spinning idle workers.
|
|
107
|
+
*
|
|
108
|
+
* Bounds the WHOLE per-item lifecycle, including `onResult`: a prompt's
|
|
109
|
+
* concurrency slot is not released until its `onResult` callback (if any)
|
|
110
|
+
* has finished (B-110). A caller doing anything stateful in `onResult` —
|
|
111
|
+
* writing a file, appending to a shared buffer, rate-limiting an API — can
|
|
112
|
+
* rely on at most `concurrency` such callbacks running at once.
|
|
104
113
|
*/
|
|
105
114
|
concurrency?: number;
|
|
106
115
|
/** Optional filter applied post-collection. Return `false` to discard. */
|
|
@@ -108,7 +117,7 @@ interface BatchOptions extends AgentOptions {
|
|
|
108
117
|
/**
|
|
109
118
|
* Streaming callback fired once per completed prompt (success OR failure).
|
|
110
119
|
* Caller exceptions are caught + logged to stderr without poisoning
|
|
111
|
-
* the batch (EC-5).
|
|
120
|
+
* the batch (EC-5). Bounded by `concurrency` — see its doc.
|
|
112
121
|
*/
|
|
113
122
|
onResult?: (result: BatchResult) => void | Promise<void>;
|
|
114
123
|
/** Progress callback fired after each result. */
|
|
@@ -332,6 +341,25 @@ declare class GenerateObjectError extends Error {
|
|
|
332
341
|
constructor(code: "no_tool_call" | "parse_failed", message: string, cause?: unknown);
|
|
333
342
|
}
|
|
334
343
|
|
|
344
|
+
/**
|
|
345
|
+
* Terminal-method callbacks injected by `Agent.builder()` so that
|
|
346
|
+
* `agent-builder.ts` does NOT need a static import of `Agent` — keeps the
|
|
347
|
+
* dependency graph acyclic (G6).
|
|
348
|
+
*
|
|
349
|
+
* Exported, and NOT carrying the internal-visibility JSDoc tag, because
|
|
350
|
+
* `AgentBuilder` is `@public` and so is its constructor: `new AgentBuilder(deps)`
|
|
351
|
+
* is callable by anyone, which makes this parameter's type part of the published
|
|
352
|
+
* contract whether or not we intended it. Hiding it did not make it private — it
|
|
353
|
+
* made the emitted `.d.ts` say `constructor(deps?: AgentBuilderDeps)` with no such
|
|
354
|
+
* type in the file (#335). Prefer `Agent.builder()`, which injects these for you;
|
|
355
|
+
* this is the seam it uses, not an argument callers are expected to construct.
|
|
356
|
+
*
|
|
357
|
+
* @public
|
|
358
|
+
*/
|
|
359
|
+
interface AgentBuilderDeps {
|
|
360
|
+
create: (options: AgentOptions) => Promise<SDKAgent>;
|
|
361
|
+
getOrCreate: (agentId: string, options: AgentOptions) => Promise<SDKAgent>;
|
|
362
|
+
}
|
|
335
363
|
/**
|
|
336
364
|
* Fluent builder for {@link AgentOptions}. Chainable setters mutate internal
|
|
337
365
|
* state and return `this`. Three terminals:
|
|
@@ -403,6 +431,20 @@ declare class AgentBuilder {
|
|
|
403
431
|
*/
|
|
404
432
|
|
|
405
433
|
type EvictReason = "lru" | "idle" | "explicit";
|
|
434
|
+
/**
|
|
435
|
+
* Knobs for {@link LiveAgentRegistry.configure}.
|
|
436
|
+
*
|
|
437
|
+
* The three numeric fields are a partial reconfigure — one left out keeps its current value.
|
|
438
|
+
* `onEvict` is NOT: it is assigned on every call, so `configure({ maxAgents: 200 })` clears a
|
|
439
|
+
* listener registered earlier. Re-pass the listener whenever you reconfigure.
|
|
440
|
+
*
|
|
441
|
+
* Two values are load-bearing zeroes. `maxAgents: 0` disables caching entirely, so every lookup
|
|
442
|
+
* misses and every agent is rebuilt; `idleTimeoutMs: 0` keeps the cache but leaves LRU as the only
|
|
443
|
+
* eviction, because the sweep is not started at all below that threshold. Negative numbers are
|
|
444
|
+
* clamped rather than rejected — up to 1000ms for `sweepIntervalMs`, up to 0 for the other two.
|
|
445
|
+
*
|
|
446
|
+
* @public
|
|
447
|
+
*/
|
|
406
448
|
interface AgentRegistryOptions {
|
|
407
449
|
/**
|
|
408
450
|
* Maximum number of agents kept alive simultaneously. LRU eviction when
|
|
@@ -429,6 +471,29 @@ interface AgentRegistryOptions {
|
|
|
429
471
|
*/
|
|
430
472
|
onEvict?: (id: string, reason: EvictReason) => void;
|
|
431
473
|
}
|
|
474
|
+
/**
|
|
475
|
+
* An LRU-plus-idle cache of live `SDKAgent` instances, reached through `Agent.registry`.
|
|
476
|
+
*
|
|
477
|
+
* It exists for long-running servers that would otherwise build a fresh agent per conversation and
|
|
478
|
+
* never release one. Do not confuse it with the metadata registry in `agent-registry.ts`, which
|
|
479
|
+
* persists `RegisteredAgent` records to disk: that one is the address book, this one is the live
|
|
480
|
+
* cache, and they share nothing.
|
|
481
|
+
*
|
|
482
|
+
* The lifecycle rule that matters to callers: eviction — by LRU, by idle timeout, or by an explicit
|
|
483
|
+
* `evict` — calls `dispose()` on the agent. A reference you held onto before eviction is a disposed
|
|
484
|
+
* agent, not a detached one. `get` counts as a use and refreshes the entry's timestamp, so polling
|
|
485
|
+
* for an agent keeps it alive indefinitely.
|
|
486
|
+
*
|
|
487
|
+
* Idle eviction depends on a background sweep that only `configure` starts. A registry nobody
|
|
488
|
+
* configured caches with the documented defaults but evicts by LRU alone, so entries can sit past
|
|
489
|
+
* `idleTimeoutMs` indefinitely; call `configure` — even with no changes — to arm the sweep.
|
|
490
|
+
*
|
|
491
|
+
* Failures on the eviction path are swallowed and reported to the diagnostics channel — a throwing
|
|
492
|
+
* `dispose()` or a throwing `onEvict` listener must not stop the sweep. Configuration is
|
|
493
|
+
* process-wide and last-call-wins.
|
|
494
|
+
*
|
|
495
|
+
* @public
|
|
496
|
+
*/
|
|
432
497
|
declare class LiveAgentRegistry {
|
|
433
498
|
#private;
|
|
434
499
|
/**
|
|
@@ -685,24 +750,27 @@ declare class Agent {
|
|
|
685
750
|
*/
|
|
686
751
|
static getOrCreate(agentId: string, options: AgentOptions): Promise<SDKAgent>;
|
|
687
752
|
/**
|
|
688
|
-
* List agents (local or cloud). M107 — `cwd` is READ
|
|
689
|
-
* `limit`/`cursor`
|
|
753
|
+
* List agents (local or cloud). M107 — `cwd` is READ, not ignored. B-115 (2026-08-19) —
|
|
754
|
+
* `includeArchived` and `limit`/`cursor` are READ too now; see `ListAgentsOptions`'s doc for the
|
|
755
|
+
* pagination contract and why the unlimited (no `limit`) case is unaffected.
|
|
690
756
|
*
|
|
691
757
|
* @public
|
|
692
758
|
*/
|
|
693
759
|
static list(options?: ListAgentsOptions): Promise<ListResult<SDKAgentInfo>>;
|
|
694
760
|
/**
|
|
695
|
-
* Get metadata for a single agent.
|
|
761
|
+
* Get metadata for a single agent. B-115 (2026-08-19) — `cwd` is READ now (see
|
|
762
|
+
* `GetAgentOptions`'s doc); it used to be accepted and silently ignored.
|
|
696
763
|
*
|
|
697
764
|
* @public
|
|
698
765
|
*/
|
|
699
|
-
static get(agentId: string,
|
|
766
|
+
static get(agentId: string, options?: GetAgentOptions): Promise<SDKAgentInfo>;
|
|
700
767
|
/**
|
|
701
|
-
* List runs for an agent.
|
|
768
|
+
* List runs for an agent. B-115 (2026-08-19) — `cwd` and `limit`/`cursor` are READ now (see
|
|
769
|
+
* `ListRunsOptions`'s doc); they used to be accepted and silently ignored.
|
|
702
770
|
*
|
|
703
771
|
* @public
|
|
704
772
|
*/
|
|
705
|
-
static listRuns(agentId: string,
|
|
773
|
+
static listRuns(agentId: string, options?: ListRunsOptions): Promise<ListResult<Run>>;
|
|
706
774
|
/**
|
|
707
775
|
* Get a single run.
|
|
708
776
|
*
|
|
@@ -843,11 +911,35 @@ declare class AgentFactory {
|
|
|
843
911
|
*/
|
|
844
912
|
/** What the operator chose for everything not decided per tool. @public */
|
|
845
913
|
type ApprovalMode = "ask" | "never-ask" | "refuse-all";
|
|
846
|
-
/**
|
|
914
|
+
/**
|
|
915
|
+
* The three answers a policy can give: proceed, put the call in front of a human, or stop it.
|
|
916
|
+
*
|
|
917
|
+
* `ask` is not a softer `deny`. A surface with no way to reach a human must treat it as a refusal,
|
|
918
|
+
* because treating it as permission is how an unattended run approves everything it was meant to
|
|
919
|
+
* pause on.
|
|
920
|
+
*
|
|
921
|
+
* @public
|
|
922
|
+
*/
|
|
847
923
|
type ApprovalOutcome = "allow" | "ask" | "deny";
|
|
848
|
-
/**
|
|
924
|
+
/**
|
|
925
|
+
* Which rule produced the outcome.
|
|
926
|
+
*
|
|
927
|
+
* The `explicitly-` pair means a per-tool list decided it; the `mode-` triple means no list named
|
|
928
|
+
* the tool and the operator's mode decided instead. Worth rendering alongside the outcome: "you
|
|
929
|
+
* denied this tool" and "your mode refuses everything" send the operator to different settings.
|
|
930
|
+
*
|
|
931
|
+
* @public
|
|
932
|
+
*/
|
|
849
933
|
type ApprovalReason = "explicitly-allowed" | "explicitly-denied" | "mode-ask" | "mode-never-ask" | "mode-refuse-all";
|
|
850
|
-
/**
|
|
934
|
+
/**
|
|
935
|
+
* One tool call to decide on, plus the operator's configuration.
|
|
936
|
+
*
|
|
937
|
+
* `tool` is matched against `denied` and `allowed` by exact string equality — there is no pattern
|
|
938
|
+
* or prefix rule. Both lists default to empty, so with neither supplied every call is decided by
|
|
939
|
+
* `mode` alone.
|
|
940
|
+
*
|
|
941
|
+
* @public
|
|
942
|
+
*/
|
|
851
943
|
interface ApprovalInput {
|
|
852
944
|
readonly tool: string;
|
|
853
945
|
readonly mode: ApprovalMode;
|
|
@@ -856,7 +948,11 @@ interface ApprovalInput {
|
|
|
856
948
|
/** Tools the operator refused. Outranks `allowed` and every mode. */
|
|
857
949
|
readonly denied?: readonly string[];
|
|
858
950
|
}
|
|
859
|
-
/**
|
|
951
|
+
/**
|
|
952
|
+
* The answer, the rule that produced it, and the tool it was about.
|
|
953
|
+
*
|
|
954
|
+
* @public
|
|
955
|
+
*/
|
|
860
956
|
interface ApprovalDecision {
|
|
861
957
|
readonly outcome: ApprovalOutcome;
|
|
862
958
|
readonly reason: ApprovalReason;
|
|
@@ -864,6 +960,17 @@ interface ApprovalDecision {
|
|
|
864
960
|
readonly tool: string;
|
|
865
961
|
}
|
|
866
962
|
/**
|
|
963
|
+
* Decide one tool call against the operator's lists and mode.
|
|
964
|
+
*
|
|
965
|
+
* The precedence is fixed and each step short-circuits: `denied` is consulted first, then
|
|
966
|
+
* `allowed`, then `mode`. A tool named in BOTH lists is therefore denied — a contradictory config
|
|
967
|
+
* is read restrictively, because the usual cause is an allow-entry that outlived the denial meant
|
|
968
|
+
* to replace it.
|
|
969
|
+
*
|
|
970
|
+
* This answers only who said yes. What the call REACHES is a separate question with a separate
|
|
971
|
+
* policy — `evaluateBlastRadius` — and neither consults the other, so a product that wants both
|
|
972
|
+
* gates calls both and combines the outcomes itself.
|
|
973
|
+
*
|
|
867
974
|
* @returns the outcome, why it was reached, and the tool it was about.
|
|
868
975
|
* @public
|
|
869
976
|
*/
|
|
@@ -912,7 +1019,18 @@ interface DeclaredAction {
|
|
|
912
1019
|
*/
|
|
913
1020
|
readonly reversible: boolean;
|
|
914
1021
|
}
|
|
915
|
-
/**
|
|
1022
|
+
/**
|
|
1023
|
+
* The action to decide on, plus what the operator granted.
|
|
1024
|
+
*
|
|
1025
|
+
* `granted` is matched against `action.scope` by exact string equality: there is no prefix or
|
|
1026
|
+
* wildcard rule, so granting `cluster:prod` does not grant `cluster:prod:kube-system`. A product
|
|
1027
|
+
* that wants hierarchical scopes expands them itself before calling.
|
|
1028
|
+
*
|
|
1029
|
+
* `irreversibleAllowed` defaults to empty, so an irreversible action inside a granted scope asks
|
|
1030
|
+
* for approval unless its scope was pre-approved for destruction as well.
|
|
1031
|
+
*
|
|
1032
|
+
* @public
|
|
1033
|
+
*/
|
|
916
1034
|
interface BlastRadiusInput {
|
|
917
1035
|
readonly action: DeclaredAction;
|
|
918
1036
|
/** Scopes the operator granted reach to. Empty grants nothing — never everything. */
|
|
@@ -920,11 +1038,27 @@ interface BlastRadiusInput {
|
|
|
920
1038
|
/** Scopes where the operator pre-approved irreversible actions, so an unattended run can work. */
|
|
921
1039
|
readonly irreversibleAllowed?: readonly string[];
|
|
922
1040
|
}
|
|
923
|
-
/**
|
|
1041
|
+
/**
|
|
1042
|
+
* What the policy decided.
|
|
1043
|
+
*
|
|
1044
|
+
* `require-approval` means a human has to say yes before the action runs; a caller with no way to
|
|
1045
|
+
* ask must treat it as a refusal. `refuse` is not appealable through this policy at all — the
|
|
1046
|
+
* operator has to grant the scope first, which is deliberately a configuration change rather than
|
|
1047
|
+
* a prompt.
|
|
1048
|
+
*
|
|
1049
|
+
* @public
|
|
1050
|
+
*/
|
|
924
1051
|
type BlastRadiusOutcome = "allow" | "require-approval" | "refuse";
|
|
925
1052
|
/** Why the decision came out that way. Rendered to the operator and read by an audit. @public */
|
|
926
1053
|
type BlastRadiusReason = "within-granted-scope" | "irreversible" | "scope-not-granted" | "scope-undeclared";
|
|
927
|
-
/**
|
|
1054
|
+
/**
|
|
1055
|
+
* The outcome, the rule that produced it, and the scope it was decided about.
|
|
1056
|
+
*
|
|
1057
|
+
* `scope` echoes what the action declared, so it is the empty string when the reason is
|
|
1058
|
+
* `scope-undeclared` — the decision names what it saw rather than substituting a placeholder.
|
|
1059
|
+
*
|
|
1060
|
+
* @public
|
|
1061
|
+
*/
|
|
928
1062
|
interface BlastRadiusDecision {
|
|
929
1063
|
readonly outcome: BlastRadiusOutcome;
|
|
930
1064
|
readonly reason: BlastRadiusReason;
|
|
@@ -932,6 +1066,19 @@ interface BlastRadiusDecision {
|
|
|
932
1066
|
readonly scope: string;
|
|
933
1067
|
}
|
|
934
1068
|
/**
|
|
1069
|
+
* Decide one declared action against the scopes the operator granted.
|
|
1070
|
+
*
|
|
1071
|
+
* Four checks, in this order, each short-circuiting: an empty `scope` is refused as undeclared
|
|
1072
|
+
* before any comparison happens; a scope absent from `granted` is refused; an irreversible action
|
|
1073
|
+
* whose scope is not in `irreversibleAllowed` escalates to approval; anything left is allowed.
|
|
1074
|
+
*
|
|
1075
|
+
* Refusal outranking escalation is a decision, not an accident. Asking a human to approve a scope
|
|
1076
|
+
* the operator never granted trains them to approve by reflex, which is how an approval prompt
|
|
1077
|
+
* stops being a control.
|
|
1078
|
+
*
|
|
1079
|
+
* This decides reach only. Whether the operator permitted the tool at all is `decideApproval`, and
|
|
1080
|
+
* the two are independent.
|
|
1081
|
+
*
|
|
935
1082
|
* @returns the outcome with the reason and the scope it was decided on.
|
|
936
1083
|
* @public
|
|
937
1084
|
*/
|
|
@@ -1020,7 +1167,52 @@ declare function chargeAndCheckThresholds(name: string, actualUsd: number): Prom
|
|
|
1020
1167
|
* @internal
|
|
1021
1168
|
*/
|
|
1022
1169
|
type ApiMode = "anthropic_messages" | "openai_chat_completions" | "openai_responses";
|
|
1170
|
+
/**
|
|
1171
|
+
* Guess which usage shape a provider reports, from its name alone.
|
|
1172
|
+
*
|
|
1173
|
+
* Matching is case-insensitive and exact — `"anthropic"`, `"claude"` and `"bedrock_anthropic"`
|
|
1174
|
+
* give `"anthropic_messages"`; `"openai-codex"` and `"codex"` give `"openai_responses"`. Every
|
|
1175
|
+
* other name, including ones this SDK has never seen, falls through to
|
|
1176
|
+
* `"openai_chat_completions"`. There is no unknown result, so a wrong guess is silent: it is
|
|
1177
|
+
* read as a Chat Completions payload, whose fields are absent, and the tokens come back as 0.
|
|
1178
|
+
*
|
|
1179
|
+
* The default is right for the OpenAI-compatible majority (openai, openrouter, deepseek, and the
|
|
1180
|
+
* compat endpoints of google, ollama and lmstudio). When it is not, pass `apiMode` to
|
|
1181
|
+
* `normalizeUsage` explicitly instead of relying on the name.
|
|
1182
|
+
*/
|
|
1023
1183
|
declare function inferApiMode(provider: string): ApiMode;
|
|
1184
|
+
/**
|
|
1185
|
+
* Convert a provider's raw `usage` object into the SDK's canonical `TokenUsage`.
|
|
1186
|
+
*
|
|
1187
|
+
* Never throws and never reports failure. `null`, `undefined` and any non-object argument return
|
|
1188
|
+
* all-zero usage, which is indistinguishable from a real response that used no tokens — so this
|
|
1189
|
+
* is not the place to detect a malformed payload.
|
|
1190
|
+
*
|
|
1191
|
+
* `opts.apiMode` selects the reader; when omitted it is derived from `opts.provider` via
|
|
1192
|
+
* `inferApiMode`, whose fallback is Chat Completions. Pass it explicitly for any provider whose
|
|
1193
|
+
* name does not identify its wire shape.
|
|
1194
|
+
*
|
|
1195
|
+
* The shapes differ in one way that matters: Anthropic reports cache tokens in buckets separate
|
|
1196
|
+
* from `input_tokens`, while both OpenAI shapes report a prompt total that already includes
|
|
1197
|
+
* them. For the OpenAI readers the cache buckets are subtracted, so `inputTokens` is always the
|
|
1198
|
+
* uncached portion and `inputTokens + cacheReadTokens + cacheWriteTokens` reconstructs the
|
|
1199
|
+
* provider's prompt total. The subtraction is floored at 0, so a payload whose cache counts
|
|
1200
|
+
* exceed its prompt total yields 0 rather than a negative.
|
|
1201
|
+
*
|
|
1202
|
+
* Every field is coerced: numbers are truncated toward zero, numeric strings are parsed, negative
|
|
1203
|
+
* and non-finite values become 0, and anything else becomes 0.
|
|
1204
|
+
*
|
|
1205
|
+
* `totalTokens` is computed here as input + output + both cache buckets; a `total_tokens` the
|
|
1206
|
+
* provider sent is ignored. Reasoning tokens are reported separately but are NOT added again —
|
|
1207
|
+
* providers already count them inside output. `cacheReadTokens`, `cacheWriteTokens` and
|
|
1208
|
+
* `reasoningTokens` are omitted from the result when they are 0, so absent means zero, not
|
|
1209
|
+
* unknown.
|
|
1210
|
+
*
|
|
1211
|
+
* Chat Completions also accepts Anthropic-style top-level `cache_read_input_tokens` /
|
|
1212
|
+
* `cache_creation_input_tokens`, which OpenAI-compatible proxies emit when they route Claude.
|
|
1213
|
+
* The nested `prompt_tokens_details` values win; the top-level fields are consulted only when
|
|
1214
|
+
* those are 0 or missing.
|
|
1215
|
+
*/
|
|
1024
1216
|
declare function normalizeUsage(rawUsage: unknown, opts: {
|
|
1025
1217
|
provider: string;
|
|
1026
1218
|
apiMode?: ApiMode;
|
|
@@ -1080,6 +1272,21 @@ interface StepUsage {
|
|
|
1080
1272
|
cacheWriteTokens?: number;
|
|
1081
1273
|
reasoningTokens?: number;
|
|
1082
1274
|
}
|
|
1275
|
+
/**
|
|
1276
|
+
* Sums the per-step token counts of a multi-step run into one `TokenUsage`.
|
|
1277
|
+
*
|
|
1278
|
+
* Call `add` once per LLM finish, in any order, then `toTokenUsage` to read the total. The instance
|
|
1279
|
+
* is a running sum, not a snapshot: `toTokenUsage` may be called repeatedly and reflects everything
|
|
1280
|
+
* added so far, and there is no reset — start a new accumulator per run.
|
|
1281
|
+
*
|
|
1282
|
+
* Two shaping rules to expect in the output. The optional counters (cache read, cache write,
|
|
1283
|
+
* reasoning) are omitted entirely when they sum to zero rather than reported as `0`. And the
|
|
1284
|
+
* per-step `requests` array appears only when at least TWO steps were added, so a single-step run
|
|
1285
|
+
* carries totals alone.
|
|
1286
|
+
*
|
|
1287
|
+
* `totalTokens` is input plus output only — cache and reasoning counts are reported separately and
|
|
1288
|
+
* are not folded into it.
|
|
1289
|
+
*/
|
|
1083
1290
|
declare class UsageAccumulator {
|
|
1084
1291
|
private input;
|
|
1085
1292
|
private output;
|
|
@@ -1217,7 +1424,14 @@ declare class UnicodeNormalizer {
|
|
|
1217
1424
|
*
|
|
1218
1425
|
* @public
|
|
1219
1426
|
*/
|
|
1220
|
-
/**
|
|
1427
|
+
/**
|
|
1428
|
+
* One provider's credential lookup, as the product resolved it.
|
|
1429
|
+
*
|
|
1430
|
+
* `value` is the secret itself. It is hashed and dropped inside `describeCredential` — it never
|
|
1431
|
+
* reaches the report, and nothing here stores it.
|
|
1432
|
+
*
|
|
1433
|
+
* @public
|
|
1434
|
+
*/
|
|
1221
1435
|
interface CredentialInput {
|
|
1222
1436
|
/** The product's name for the provider. This module never knows one of its own. */
|
|
1223
1437
|
readonly provider: string;
|
|
@@ -1226,7 +1440,15 @@ interface CredentialInput {
|
|
|
1226
1440
|
/** Where it came from, in the product's vocabulary — `env`, `file`, `keychain`, `oauth`. */
|
|
1227
1441
|
readonly source: string;
|
|
1228
1442
|
}
|
|
1229
|
-
/**
|
|
1443
|
+
/**
|
|
1444
|
+
* A presence-only view of one credential, safe to print, log, or attach to a support bundle.
|
|
1445
|
+
*
|
|
1446
|
+
* `fingerprint` is the first eight hex characters of the SHA-256 of the trimmed secret: enough for
|
|
1447
|
+
* two people to agree they are holding the same key, and not a substring of it. It is absent
|
|
1448
|
+
* whenever `present` is false.
|
|
1449
|
+
*
|
|
1450
|
+
* @public
|
|
1451
|
+
*/
|
|
1230
1452
|
interface CredentialReport {
|
|
1231
1453
|
readonly provider: string;
|
|
1232
1454
|
readonly present: boolean;
|
|
@@ -1235,6 +1457,13 @@ interface CredentialReport {
|
|
|
1235
1457
|
readonly fingerprint?: string;
|
|
1236
1458
|
}
|
|
1237
1459
|
/**
|
|
1460
|
+
* Turn a resolved credential into something you can show a user.
|
|
1461
|
+
*
|
|
1462
|
+
* The value is trimmed before the emptiness test, so `undefined`, `""` and whitespace all report
|
|
1463
|
+
* `present: false` with no fingerprint. That matters because an environment variable that expanded
|
|
1464
|
+
* to nothing arrives as an empty string, and calling that "present" sends whoever is debugging to
|
|
1465
|
+
* hunt for a routing bug instead of a missing secret.
|
|
1466
|
+
*
|
|
1238
1467
|
* @returns a report safe to log, render and attach to a support bundle.
|
|
1239
1468
|
* @public
|
|
1240
1469
|
*/
|
|
@@ -1362,12 +1591,6 @@ interface SanitizeOptions {
|
|
|
1362
1591
|
maxDepth?: number;
|
|
1363
1592
|
}
|
|
1364
1593
|
|
|
1365
|
-
/**
|
|
1366
|
-
* Spec accepted by {@link defineTool}. `inputSchema` is a Zod schema; the
|
|
1367
|
-
* `handler` argument type is inferred via `z.infer<T>` — no `as` casts.
|
|
1368
|
-
*
|
|
1369
|
-
* @public
|
|
1370
|
-
*/
|
|
1371
1594
|
/**
|
|
1372
1595
|
* SE16 — the handler's return type. With no `outputSchema` the tool returns a
|
|
1373
1596
|
* plain `string` (pre-SE16 shape). With an `outputSchema` the handler returns the
|
|
@@ -1375,6 +1598,20 @@ interface SanitizeOptions {
|
|
|
1375
1598
|
* The `[O]` tuple wrap prevents distribution so `never` maps cleanly to `string`.
|
|
1376
1599
|
*/
|
|
1377
1600
|
type ToolHandlerReturn<O extends ZodType> = [O] extends [never] ? string : z.infer<O>;
|
|
1601
|
+
/**
|
|
1602
|
+
* Spec accepted by {@link Tool.create}. `inputSchema` is a Zod schema; the `handler` argument type
|
|
1603
|
+
* is inferred via `z.infer<T>` — no `as` casts.
|
|
1604
|
+
*
|
|
1605
|
+
* The two optional output fields do different jobs and compose. `outputSchema` changes what the
|
|
1606
|
+
* handler must RETURN (a structured value instead of a string) and validates it; `toModelOutput`
|
|
1607
|
+
* changes only what the MODEL sees in the tool result, while observability still receives the full
|
|
1608
|
+
* handler output. Set neither and the handler returns a plain string that goes to both.
|
|
1609
|
+
*
|
|
1610
|
+
* `zod` is referenced as a type only, so a consumer that never calls `Tool.create` does not need it
|
|
1611
|
+
* installed.
|
|
1612
|
+
*
|
|
1613
|
+
* @public
|
|
1614
|
+
*/
|
|
1378
1615
|
interface DefineToolSpec<T extends ZodType, O extends ZodType = never> {
|
|
1379
1616
|
/** Tool name surfaced to the LLM. Same constraints as {@link CustomTool.name}. */
|
|
1380
1617
|
name: string;
|
|
@@ -1470,7 +1707,16 @@ interface EnvOptOut {
|
|
|
1470
1707
|
/** What would make this opt-out obsolete. An opt-out with no exit is a permanent excuse. */
|
|
1471
1708
|
readonly exitCriterion: string;
|
|
1472
1709
|
}
|
|
1473
|
-
/**
|
|
1710
|
+
/**
|
|
1711
|
+
* The three lists the audit compares: every key the product declares, the subset an environment
|
|
1712
|
+
* variable can set, and the documented exemptions.
|
|
1713
|
+
*
|
|
1714
|
+
* All three are matched by exact string equality, and `reachable` and `optOuts` are read as subsets
|
|
1715
|
+
* of `keys` — an entry in either that is not in `keys` is what makes an opt-out stale, and an entry
|
|
1716
|
+
* in `reachable` that is not in `keys` is simply ignored.
|
|
1717
|
+
*
|
|
1718
|
+
* @public
|
|
1719
|
+
*/
|
|
1474
1720
|
interface EnvReachabilityInput {
|
|
1475
1721
|
/** Every configuration key the product declares. */
|
|
1476
1722
|
readonly keys: readonly string[];
|
|
@@ -1479,7 +1725,15 @@ interface EnvReachabilityInput {
|
|
|
1479
1725
|
/** Documented exemptions for keys that deliberately have no environment path. */
|
|
1480
1726
|
readonly optOuts: readonly EnvOptOut[];
|
|
1481
1727
|
}
|
|
1482
|
-
/**
|
|
1728
|
+
/**
|
|
1729
|
+
* The two failures, reported separately because they have opposite fixes.
|
|
1730
|
+
*
|
|
1731
|
+
* A key in `unreachable` needs either an environment path or a documented opt-out. A key in
|
|
1732
|
+
* `staleOptOuts` needs its opt-out DELETED — it exempts nothing, either because the key gained an
|
|
1733
|
+
* environment path or because the key no longer exists. Both lists empty is the passing state.
|
|
1734
|
+
*
|
|
1735
|
+
* @public
|
|
1736
|
+
*/
|
|
1483
1737
|
interface EnvReachabilityAudit {
|
|
1484
1738
|
/** Keys with neither an environment path nor a documented opt-out. */
|
|
1485
1739
|
readonly unreachable: readonly string[];
|
|
@@ -1487,6 +1741,15 @@ interface EnvReachabilityAudit {
|
|
|
1487
1741
|
readonly staleOptOuts: readonly string[];
|
|
1488
1742
|
}
|
|
1489
1743
|
/**
|
|
1744
|
+
* Answer both halves of the reachability question in one call.
|
|
1745
|
+
*
|
|
1746
|
+
* A key counts as covered when it is in `reachable` OR carries an opt-out, so an opt-out silences
|
|
1747
|
+
* the gap it was written for and nothing else. Assert on both returned lists: a suite that checks
|
|
1748
|
+
* only `unreachable` still passes while the opt-outs rot, which is the half everyone forgets.
|
|
1749
|
+
*
|
|
1750
|
+
* This performs no I/O and reads no environment. The caller supplies its own key vocabulary,
|
|
1751
|
+
* because a framework cannot enumerate a consumer's configuration keys.
|
|
1752
|
+
*
|
|
1490
1753
|
* @returns both axes, in the order the caller declared them — a stable order so a failure message
|
|
1491
1754
|
* does not change between runs for reasons unrelated to the code.
|
|
1492
1755
|
* @public
|
|
@@ -1500,6 +1763,22 @@ declare function auditEnvReachability(input: EnvReachabilityInput): EnvReachabil
|
|
|
1500
1763
|
* Each handler is try-caught (EC-2) so one failing handler cannot break others.
|
|
1501
1764
|
*/
|
|
1502
1765
|
type EventHandler<T> = (payload: T) => void;
|
|
1766
|
+
/**
|
|
1767
|
+
* A typed publish/subscribe bus, parameterised by a map of event name to payload type.
|
|
1768
|
+
*
|
|
1769
|
+
* `publish` is SYNCHRONOUS: handlers run in subscription order before it returns, so a slow handler
|
|
1770
|
+
* blocks the publisher. Each handler is invoked inside its own try/catch, so one that throws cannot
|
|
1771
|
+
* stop the others — the error is written to the diagnostics channel and counted on
|
|
1772
|
+
* `handlerErrorCount`. Assert on that counter in tests; a subscriber failing on every event is
|
|
1773
|
+
* otherwise invisible.
|
|
1774
|
+
*
|
|
1775
|
+
* `subscribe` returns the unsubscribe function, which is the only way to detach a handler — there
|
|
1776
|
+
* is no `off` taking the handler back. Handlers are held in a `Set` per event, so subscribing the
|
|
1777
|
+
* same function reference twice registers it once.
|
|
1778
|
+
*
|
|
1779
|
+
* Payload objects are passed by reference to every handler; nothing here copies them, so a handler
|
|
1780
|
+
* that mutates a payload mutates it for the handlers after it.
|
|
1781
|
+
*/
|
|
1503
1782
|
declare class EventBus<Events extends Record<string, unknown>> {
|
|
1504
1783
|
#private;
|
|
1505
1784
|
private handlers;
|
|
@@ -1727,6 +2006,40 @@ type DiagnosticsSink = (message: string) => void;
|
|
|
1727
2006
|
*/
|
|
1728
2007
|
declare function setDiagnosticsSink(next: DiagnosticsSink | undefined): void;
|
|
1729
2008
|
|
|
2009
|
+
/**
|
|
2010
|
+
* Run `fn` after every earlier `withCwdMutex` call for the same `key` has settled, and return
|
|
2011
|
+
* what `fn` returns.
|
|
2012
|
+
*
|
|
2013
|
+
* Calls with the same key run strictly in the order they were made — FIFO, never concurrent.
|
|
2014
|
+
* Calls with different keys never wait on each other. The key is an opaque string: two callers
|
|
2015
|
+
* serialize against each other exactly when they pass equal keys, so a shared key IS the
|
|
2016
|
+
* contract, and a mismatched one silently buys no protection at all.
|
|
2017
|
+
*
|
|
2018
|
+
* A rejection does not poison the queue. The next waiter runs whether the previous `fn` fulfilled
|
|
2019
|
+
* or rejected, and the rejection is delivered only to the caller whose `fn` threw. This function
|
|
2020
|
+
* neither retries nor swallows: the returned promise rejects with whatever `fn` rejected with.
|
|
2021
|
+
*
|
|
2022
|
+
* There is no timeout and no cancellation. An `fn` that never settles blocks that key for the
|
|
2023
|
+
* lifetime of the process.
|
|
2024
|
+
*
|
|
2025
|
+
* **Scope — this is an in-process lock only.** State is a module-scoped Map, so it serializes
|
|
2026
|
+
* callers that share one module instance and nothing else. Two processes, two worker threads, or
|
|
2027
|
+
* two copies of the SDK resolved into the same tree do not see each other's queue. When the
|
|
2028
|
+
* resource is a file that other processes can also write, use `withFileLock` from
|
|
2029
|
+
* `./file-lock.ts` instead — it takes an OS-level lock and layers this mutex underneath, so it
|
|
2030
|
+
* gives both guarantees. Reach for `withCwdMutex` directly when the shared state is in memory, or
|
|
2031
|
+
* when the file is one only this process touches.
|
|
2032
|
+
*
|
|
2033
|
+
* Extracted packages (`@theokit/sdk-budget`, `@theokit/sdk-memory`) import this from
|
|
2034
|
+
* `@theokit/sdk` rather than reimplementing it, precisely so the Map is the same one: a per-package
|
|
2035
|
+
* copy would give each package its own queue and let their writes race.
|
|
2036
|
+
*
|
|
2037
|
+
* The Map is module-scoped, so nothing survives a process restart or a fresh module instance, and
|
|
2038
|
+
* its entries are never removed — pass keys from a bounded set rather than from arbitrary input.
|
|
2039
|
+
* Signature and semantics will not change before sdk-core v3.0.
|
|
2040
|
+
*
|
|
2041
|
+
* @public
|
|
2042
|
+
*/
|
|
1730
2043
|
declare function withCwdMutex<T>(key: string, fn: () => Promise<T>): Promise<T>;
|
|
1731
2044
|
|
|
1732
2045
|
/**
|
|
@@ -1758,6 +2071,20 @@ declare class NoopMemoryProvider {
|
|
|
1758
2071
|
static create(): MemoryProvider;
|
|
1759
2072
|
}
|
|
1760
2073
|
|
|
2074
|
+
/**
|
|
2075
|
+
* The subset of the OpenTelemetry `Span` API this SDK calls.
|
|
2076
|
+
*
|
|
2077
|
+
* Structural, not nominal: a real `@opentelemetry/api` span satisfies it, and so does a test double
|
|
2078
|
+
* or a no-op. That is why it is exported — `@theokit/sdk-memory` previously kept a hand-written
|
|
2079
|
+
* mirror of this shape, and the two had already drifted (the mirror rejected `undefined` attribute
|
|
2080
|
+
* values this one accepts, and declared `end()` without its `endTime` parameter). Import this
|
|
2081
|
+
* instead of re-declaring it.
|
|
2082
|
+
*
|
|
2083
|
+
* Erased at build time, so importing it adds nothing to a bundle and does not require
|
|
2084
|
+
* `@opentelemetry/api` to be installed.
|
|
2085
|
+
*
|
|
2086
|
+
* @public
|
|
2087
|
+
*/
|
|
1761
2088
|
interface OTelSpan {
|
|
1762
2089
|
setAttribute(key: string, value: string | number | boolean): void;
|
|
1763
2090
|
setAttributes(attrs: Record<string, string | number | boolean | undefined>): void;
|
|
@@ -1825,6 +2152,24 @@ interface JobQueueOptions {
|
|
|
1825
2152
|
*/
|
|
1826
2153
|
maxConcurrency?: number;
|
|
1827
2154
|
}
|
|
2155
|
+
/**
|
|
2156
|
+
* An in-process queue of background jobs with status tracking, cancellation, and an optional
|
|
2157
|
+
* concurrency bound.
|
|
2158
|
+
*
|
|
2159
|
+
* `enqueue` returns a job id immediately and never throws for the job's own failure: a synchronous
|
|
2160
|
+
* throw inside the function becomes a rejection, and a rejection becomes `status: "failed"` with
|
|
2161
|
+
* the message on `job.error`. Poll `getJob(id)` or `list()` for outcomes — there is no completion
|
|
2162
|
+
* event and no promise to await.
|
|
2163
|
+
*
|
|
2164
|
+
* Cancellation is COOPERATIVE. `cancel` aborts the `AbortSignal` handed to the job function and
|
|
2165
|
+
* flips the status, but a function that ignores the signal keeps running to completion; its result
|
|
2166
|
+
* is then discarded, because a cancelled job never leaves the cancelled state. The concurrency slot
|
|
2167
|
+
* of a running job is freed at cancel time rather than when it eventually settles, so a job that
|
|
2168
|
+
* never settles cannot deadlock a bounded queue.
|
|
2169
|
+
*
|
|
2170
|
+
* State lives entirely in memory and grows without bound — nothing evicts finished jobs. This is a
|
|
2171
|
+
* queue for one process, not a durable one.
|
|
2172
|
+
*/
|
|
1828
2173
|
declare class JobQueue {
|
|
1829
2174
|
#private;
|
|
1830
2175
|
private jobs;
|
|
@@ -1870,13 +2215,30 @@ declare class JobQueue {
|
|
|
1870
2215
|
declare class LayerOrderError extends TheokitAgentError {
|
|
1871
2216
|
readonly name = "LayerOrderError";
|
|
1872
2217
|
}
|
|
1873
|
-
/**
|
|
2218
|
+
/**
|
|
2219
|
+
* One named layer in a precedence chain.
|
|
2220
|
+
*
|
|
2221
|
+
* `precedence` is optional and the two usages do not mix well: omit it everywhere to say "this
|
|
2222
|
+
* array is already in order", or supply it everywhere you want `verifyLayerOrdering` to check.
|
|
2223
|
+
* Entries without it are SKIPPED by that check rather than treated as zero, so a chain where only
|
|
2224
|
+
* some entries declare a number is verified only between those.
|
|
2225
|
+
*
|
|
2226
|
+
* @public
|
|
2227
|
+
*/
|
|
1874
2228
|
interface DeclaredLayer {
|
|
1875
2229
|
readonly layer: string;
|
|
1876
2230
|
/** Higher wins. Optional — omit it to mean "this array is already the order". */
|
|
1877
2231
|
readonly precedence?: number;
|
|
1878
2232
|
}
|
|
1879
|
-
/**
|
|
2233
|
+
/**
|
|
2234
|
+
* A declared layer together with the values it supplies.
|
|
2235
|
+
*
|
|
2236
|
+
* `foldLayers` consumes these in array order, so a later entry wins for the keys it mentions. A key
|
|
2237
|
+
* a layer does not mention — or mentions with `undefined` — leaves the earlier value standing;
|
|
2238
|
+
* there is no way for a layer to erase a key another layer set.
|
|
2239
|
+
*
|
|
2240
|
+
* @public
|
|
2241
|
+
*/
|
|
1880
2242
|
interface LayerValues extends DeclaredLayer {
|
|
1881
2243
|
readonly values: Readonly<Record<string, unknown>>;
|
|
1882
2244
|
}
|
|
@@ -1950,10 +2312,13 @@ interface MemoryIndexHandle {
|
|
|
1950
2312
|
close(): Promise<void> | void;
|
|
1951
2313
|
}
|
|
1952
2314
|
/**
|
|
1953
|
-
*
|
|
2315
|
+
* Inputs for {@link Memory.runDreamingSweep}.
|
|
1954
2316
|
*
|
|
1955
|
-
*
|
|
1956
|
-
*
|
|
2317
|
+
* `embedding` is required and has no default: the sweep scores cosine similarity between facts, so
|
|
2318
|
+
* without real embeddings there is nothing to dedup or cluster on. Both thresholds are cosine
|
|
2319
|
+
* similarity in [0, 1] and default to `0.95` for dedup and `0.75` for clustering — dedup is the
|
|
2320
|
+
* stricter of the two because merging two facts that were merely related is a data loss, while
|
|
2321
|
+
* failing to cluster them only costs a note.
|
|
1957
2322
|
*
|
|
1958
2323
|
* @public
|
|
1959
2324
|
*/
|
|
@@ -1975,6 +2340,18 @@ interface DreamingSweepOptions {
|
|
|
1975
2340
|
/** Cosine-similarity threshold for the clustering phase. Default `0.75`. */
|
|
1976
2341
|
clusterThreshold?: number;
|
|
1977
2342
|
}
|
|
2343
|
+
/**
|
|
2344
|
+
* What one dreaming sweep did.
|
|
2345
|
+
*
|
|
2346
|
+
* `status` is `"skipped"` when the workspace held no facts to work on and `"error"` when the sweep
|
|
2347
|
+
* failed; both come back with every counter at zero, so check `status` before reading a zero as
|
|
2348
|
+
* "there was nothing to consolidate". A failure is reported through this field rather than as a
|
|
2349
|
+
* rejection, which means a caller that only awaits the promise never learns the sweep did nothing.
|
|
2350
|
+
* `factsBefore` and `factsAfter` bracket the run, which is the pair to compare when you want to
|
|
2351
|
+
* know whether the sweep was worth running rather than how many operations it performed.
|
|
2352
|
+
*
|
|
2353
|
+
* @public
|
|
2354
|
+
*/
|
|
1978
2355
|
interface DreamingSweepResult {
|
|
1979
2356
|
status: "ok" | "skipped" | "error";
|
|
1980
2357
|
factsBefore: number;
|
|
@@ -2006,6 +2383,19 @@ interface OpenMemoryIndexOptions {
|
|
|
2006
2383
|
/** Default `"sqlite-vec"`. Set to `"lance"` to opt into LanceDB (peer dep). */
|
|
2007
2384
|
backend?: "sqlite-vec" | "lance";
|
|
2008
2385
|
}
|
|
2386
|
+
/**
|
|
2387
|
+
* Memory operations that run OUTSIDE an agent turn.
|
|
2388
|
+
*
|
|
2389
|
+
* Everything here is reachable without `Agent.create({ memory: ... })`, which is the point: opening
|
|
2390
|
+
* an index directly is how a CLI or a maintenance job inspects or rebuilds what the agent will
|
|
2391
|
+
* later read, and the dreaming sweep is maintenance that no `send()` triggers.
|
|
2392
|
+
*
|
|
2393
|
+
* Both operations route through the `@theokit/sdk-memory` peer package when it is installed and
|
|
2394
|
+
* fall back to the in-tree implementation when it is not. The fallback is not a degraded mode —
|
|
2395
|
+
* behaviour and thrown errors match — so consumers do not branch on which path ran.
|
|
2396
|
+
*
|
|
2397
|
+
* @public
|
|
2398
|
+
*/
|
|
2009
2399
|
declare const Memory: {
|
|
2010
2400
|
/**
|
|
2011
2401
|
* Open a memory index. Dispatches to SQLite-vec (default, zero deps) or
|
|
@@ -2214,7 +2604,16 @@ declare class PermissionPlugin {
|
|
|
2214
2604
|
* @public
|
|
2215
2605
|
*/
|
|
2216
2606
|
declare const SOVEREIGN_ENV_KEYS: readonly ["THEOKIT_HOME", "THEOKIT_AUTH_HOME", "THEOKIT_DIR_NAME", "THEOKIT_TRUSTED_PROVIDERS", "THEOKIT_REDACT_SECRETS", "THEOKIT_OAUTH_TX_SALT"];
|
|
2217
|
-
/**
|
|
2607
|
+
/**
|
|
2608
|
+
* The union of {@link SOVEREIGN_ENV_KEYS} entries — the variables a project-scoped `.env` may never
|
|
2609
|
+
* set.
|
|
2610
|
+
*
|
|
2611
|
+
* Derived from the array rather than written out, so adding a key in one place cannot leave the
|
|
2612
|
+
* type behind. Use it where a caller must name one of the protected variables and a plain `string`
|
|
2613
|
+
* would let a typo through silently.
|
|
2614
|
+
*
|
|
2615
|
+
* @public
|
|
2616
|
+
*/
|
|
2218
2617
|
type SovereignEnvKey = (typeof SOVEREIGN_ENV_KEYS)[number];
|
|
2219
2618
|
/** The mutable shape of `process.env`, narrowed so a caller can pass a plain object in tests. */
|
|
2220
2619
|
type MutableEnv = Record<string, string | undefined>;
|
|
@@ -2264,7 +2663,16 @@ declare function loadProjectEnv(env?: MutableEnv, load?: (() => void) | undefine
|
|
|
2264
2663
|
declare class RetentionPolicyError extends TheokitAgentError {
|
|
2265
2664
|
readonly name = "RetentionPolicyError";
|
|
2266
2665
|
}
|
|
2267
|
-
/**
|
|
2666
|
+
/**
|
|
2667
|
+
* One artifact the caller is considering deleting, described well enough to decide about.
|
|
2668
|
+
*
|
|
2669
|
+
* `id` is only ever compared for equality, so any stable identity works — a path, a session id, an
|
|
2670
|
+
* inode. `live` is the tri-state that carries the whole safety property: `"unknown"` means the
|
|
2671
|
+
* caller could not establish liveness, and it is honoured as a third answer rather than folded into
|
|
2672
|
+
* `false`.
|
|
2673
|
+
*
|
|
2674
|
+
* @public
|
|
2675
|
+
*/
|
|
2268
2676
|
interface ReapableArtifact {
|
|
2269
2677
|
readonly id: string;
|
|
2270
2678
|
/** Epoch milliseconds. Compared against an injected `nowMs`, never against a read clock. */
|
|
@@ -2276,7 +2684,16 @@ interface ReapableArtifact {
|
|
|
2276
2684
|
*/
|
|
2277
2685
|
readonly live: boolean | "unknown";
|
|
2278
2686
|
}
|
|
2279
|
-
/**
|
|
2687
|
+
/**
|
|
2688
|
+
* How long artifacts are kept and how many always survive.
|
|
2689
|
+
*
|
|
2690
|
+
* The two interact as a window plus a FLOOR, not as two independent allowances: `keepLast` rescues
|
|
2691
|
+
* artifacts only when the window and liveness together spared fewer than that many, and rescues
|
|
2692
|
+
* exactly enough to reach the count. Both are refused by `planReaping` rather than clamped when
|
|
2693
|
+
* they are not expressible — see its `@throws`.
|
|
2694
|
+
*
|
|
2695
|
+
* @public
|
|
2696
|
+
*/
|
|
2280
2697
|
interface RetentionPolicy {
|
|
2281
2698
|
/** Artifacts strictly older than this are candidates. The boundary itself is kept. */
|
|
2282
2699
|
readonly maxAgeMs: number;
|
|
@@ -2293,11 +2710,27 @@ interface RetentionPolicy {
|
|
|
2293
2710
|
}
|
|
2294
2711
|
/** Why an artifact survived. @public */
|
|
2295
2712
|
type KeepReason = "live" | "within-retention" | "keep-last";
|
|
2296
|
-
/**
|
|
2713
|
+
/**
|
|
2714
|
+
* An artifact that survived, carrying the reason it did.
|
|
2715
|
+
*
|
|
2716
|
+
* The reason is the one that spared it FIRST, in the order liveness, then the retention window,
|
|
2717
|
+
* then the floor — so a live artifact inside the window reports `"live"`, and `"keep-last"` only
|
|
2718
|
+
* appears on artifacts that had no reason of their own.
|
|
2719
|
+
*
|
|
2720
|
+
* @public
|
|
2721
|
+
*/
|
|
2297
2722
|
interface KeptArtifact extends ReapableArtifact {
|
|
2298
2723
|
readonly reason: KeepReason;
|
|
2299
2724
|
}
|
|
2300
|
-
/**
|
|
2725
|
+
/**
|
|
2726
|
+
* The decision, as three disjoint buckets whose union is exactly the input.
|
|
2727
|
+
*
|
|
2728
|
+
* Nothing is deleted by producing one of these — the plan IS the dry run, and executing it is a
|
|
2729
|
+
* separate act on a value you can read first. Delete only what is in `reap`; `undetermined` is not
|
|
2730
|
+
* a smaller `reap`, it is the set nobody could decide about.
|
|
2731
|
+
*
|
|
2732
|
+
* @public
|
|
2733
|
+
*/
|
|
2301
2734
|
interface ReapPlan {
|
|
2302
2735
|
/** Safe to delete. Everything here was decided, not defaulted. */
|
|
2303
2736
|
readonly reap: readonly ReapableArtifact[];
|
|
@@ -2305,13 +2738,39 @@ interface ReapPlan {
|
|
|
2305
2738
|
/** Liveness could not be established. Never deleted, never counted as kept. */
|
|
2306
2739
|
readonly undetermined: readonly ReapableArtifact[];
|
|
2307
2740
|
}
|
|
2308
|
-
/**
|
|
2741
|
+
/**
|
|
2742
|
+
* Everything `planReaping` needs: the candidates, the policy, and the current time.
|
|
2743
|
+
*
|
|
2744
|
+
* `nowMs` is a parameter rather than a clock read so the same input always produces the same plan —
|
|
2745
|
+
* which is what lets a caller compute a plan, show it, and execute it later against the same
|
|
2746
|
+
* decision instead of a freshly re-derived one.
|
|
2747
|
+
*
|
|
2748
|
+
* @public
|
|
2749
|
+
*/
|
|
2309
2750
|
interface ReapPlanInput {
|
|
2310
2751
|
readonly artifacts: readonly ReapableArtifact[];
|
|
2311
2752
|
readonly retention: RetentionPolicy;
|
|
2312
2753
|
/** Injected so the plan is reproducible and testable; this module never reads a clock. */
|
|
2313
2754
|
readonly nowMs: number;
|
|
2314
2755
|
}
|
|
2756
|
+
/**
|
|
2757
|
+
* Sort artifacts into keep, reap, and undetermined — and delete nothing.
|
|
2758
|
+
*
|
|
2759
|
+
* The order of decision is liveness, then the retention window, then the floor. An artifact whose
|
|
2760
|
+
* `live` is `"unknown"` leaves at the first step and is never considered again: it is not counted
|
|
2761
|
+
* toward `keepLast`, so a transient mount failure cannot satisfy "keep my last two" with artifacts
|
|
2762
|
+
* nobody confirmed while the confirmed ones are deleted.
|
|
2763
|
+
*
|
|
2764
|
+
* The window boundary belongs to the safe side. An artifact exactly `maxAgeMs` old is kept, so a
|
|
2765
|
+
* 30-day retention never means 29 depending on clock granularity.
|
|
2766
|
+
*
|
|
2767
|
+
* @returns the three buckets. Their union is exactly the input, each artifact counted once — the
|
|
2768
|
+
* invariant an operator reads the totals against.
|
|
2769
|
+
* @throws RetentionPolicyError when `maxAgeMs` is negative or not finite, or `keepLast` is negative
|
|
2770
|
+
* or not an integer. Nonsense is refused rather than clamped, because a clamped window on this
|
|
2771
|
+
* path deletes data the operator meant to keep.
|
|
2772
|
+
* @public
|
|
2773
|
+
*/
|
|
2315
2774
|
declare function planReaping(input: ReapPlanInput): ReapPlan;
|
|
2316
2775
|
|
|
2317
2776
|
/** The internal JSON-Schema shape the synthetic `output` tool consumes. */
|
|
@@ -2426,7 +2885,19 @@ declare class Security {
|
|
|
2426
2885
|
*
|
|
2427
2886
|
* @public
|
|
2428
2887
|
*/
|
|
2429
|
-
/**
|
|
2888
|
+
/**
|
|
2889
|
+
* The vocabulary, the layer names, and the values to resolve.
|
|
2890
|
+
*
|
|
2891
|
+
* Two orders matter and they are not the same one. The UNRESTRICTED layers — every key of `layers`
|
|
2892
|
+
* that is neither `override` nor listed in `restricted` — are resolved last-wins in the enumeration
|
|
2893
|
+
* order of the `layers` object. The RESTRICTED layers are applied in the order of the `restricted`
|
|
2894
|
+
* array, regardless of where they sit in `layers`. Put a layer in `restricted` and its position in
|
|
2895
|
+
* that array is what decides when it gets to tighten.
|
|
2896
|
+
*
|
|
2897
|
+
* A layer named in `restricted` but absent from `layers`, or present with `undefined`, is skipped.
|
|
2898
|
+
*
|
|
2899
|
+
* @public
|
|
2900
|
+
*/
|
|
2430
2901
|
interface SecurityFloorInput {
|
|
2431
2902
|
/**
|
|
2432
2903
|
* The vocabulary, ordered from most confined to least. Index is permissiveness, so
|
|
@@ -2444,6 +2915,23 @@ interface SecurityFloorInput {
|
|
|
2444
2915
|
readonly layers: Readonly<Record<string, string | undefined>>;
|
|
2445
2916
|
}
|
|
2446
2917
|
/**
|
|
2918
|
+
* Resolve a security-relevant setting so that a lower-trust layer can only tighten it.
|
|
2919
|
+
*
|
|
2920
|
+
* Two paths. When `layers[override]` holds a value, that value is returned VERBATIM and nothing
|
|
2921
|
+
* else is consulted — it is not checked against `permissiveness`, because validating the operator's
|
|
2922
|
+
* own flag belongs to the consumer that owns the vocabulary and the error message. Otherwise a
|
|
2923
|
+
* baseline is taken from the unrestricted layers, and each restricted layer in turn may lower it
|
|
2924
|
+
* and never raise it.
|
|
2925
|
+
*
|
|
2926
|
+
* Two consequences worth knowing before wiring this up. A value in a restricted layer that is not
|
|
2927
|
+
* in `permissiveness` is IGNORED rather than trusted, so a typo in a repository's config leaves the
|
|
2928
|
+
* baseline standing instead of becoming the effective setting. And the ceiling only ever descends:
|
|
2929
|
+
* once one restricted layer tightens, a later one cannot return to the baseline, even though it
|
|
2930
|
+
* could have chosen that value had it come first.
|
|
2931
|
+
*
|
|
2932
|
+
* When no layer supplied a value at all, the answer is `undefined` — the absence is reported rather
|
|
2933
|
+
* than filled in with the most confined member of the vocabulary.
|
|
2934
|
+
*
|
|
2447
2935
|
* @returns the resolved value, or `undefined` when no layer supplied one.
|
|
2448
2936
|
* @public
|
|
2449
2937
|
*/
|
|
@@ -2474,7 +2962,16 @@ declare function applySecurityFloor(input: SecurityFloorInput): string | undefin
|
|
|
2474
2962
|
|
|
2475
2963
|
/** Why the destruction was refused. @public */
|
|
2476
2964
|
type LiveSessionReason = "session-is-live" | "liveness-undetermined";
|
|
2477
|
-
/**
|
|
2965
|
+
/**
|
|
2966
|
+
* Raised by `guardSessionDestruction` instead of letting a session be destroyed.
|
|
2967
|
+
*
|
|
2968
|
+
* Read `reason` rather than the message when deciding what to do: `"session-is-live"` is fixed by
|
|
2969
|
+
* closing the other session, `"liveness-undetermined"` is fixed by making the liveness check work
|
|
2970
|
+
* again, and telling a user to close a session when nothing could be read sends them to close
|
|
2971
|
+
* nothing. `sessionId` carries the session the refusal was about.
|
|
2972
|
+
*
|
|
2973
|
+
* @public
|
|
2974
|
+
*/
|
|
2478
2975
|
declare class LiveSessionError extends TheokitAgentError {
|
|
2479
2976
|
readonly name = "LiveSessionError";
|
|
2480
2977
|
readonly sessionId: string;
|
|
@@ -2670,6 +3167,16 @@ interface TaskHandle {
|
|
|
2670
3167
|
* AbortController).
|
|
2671
3168
|
*/
|
|
2672
3169
|
readonly cancelRequested?: boolean;
|
|
3170
|
+
/**
|
|
3171
|
+
* Why the task was cancelled, when whoever cancelled it said. Free text, written alongside
|
|
3172
|
+
* `cancelledAt` for a `queued` task and alongside `cancelRequested` for a `running` one.
|
|
3173
|
+
*
|
|
3174
|
+
* Absent when no reason was given — an empty string is not a reason, and a default like
|
|
3175
|
+
* "cancelled" would put words in the operator's mouth. `theokit tasks cancel --reason` is what
|
|
3176
|
+
* writes it (#351); nothing in the runtime reads it, because it exists for the human reading the
|
|
3177
|
+
* registry later.
|
|
3178
|
+
*/
|
|
3179
|
+
readonly cancelReason?: string;
|
|
2673
3180
|
}
|
|
2674
3181
|
/** Query filter for `Task.list`. */
|
|
2675
3182
|
interface TaskFilter {
|
|
@@ -2677,7 +3184,11 @@ interface TaskFilter {
|
|
|
2677
3184
|
readonly kind?: TaskKind | readonly TaskKind[];
|
|
2678
3185
|
readonly submittedAfter?: number;
|
|
2679
3186
|
readonly submittedBefore?: number;
|
|
2680
|
-
/**
|
|
3187
|
+
/**
|
|
3188
|
+
* Defaults to 100. `JsonFileTaskStore` returns the newest matching tasks first and reads its
|
|
3189
|
+
* whole directory to find them (256 files at a time); page past this limit with
|
|
3190
|
+
* `submittedBefore` (#362).
|
|
3191
|
+
*/
|
|
2681
3192
|
readonly limit?: number;
|
|
2682
3193
|
}
|
|
2683
3194
|
/** Options for `Task.submit`. */
|
|
@@ -2746,6 +3257,15 @@ interface TaskWorkContext {
|
|
|
2746
3257
|
readonly signal: AbortSignal;
|
|
2747
3258
|
emit(payload: unknown): void;
|
|
2748
3259
|
}
|
|
3260
|
+
/**
|
|
3261
|
+
* The unit of work handed to {@link Task.submit}.
|
|
3262
|
+
*
|
|
3263
|
+
* It receives the context rather than raw arguments: `ctx.signal` aborts on cancel and should be
|
|
3264
|
+
* observed by anything long-running, and `ctx.emit(payload)` produces a `progress` event for
|
|
3265
|
+
* subscribers. May be synchronous — the return type allows a plain value as well as a promise.
|
|
3266
|
+
*
|
|
3267
|
+
* @public
|
|
3268
|
+
*/
|
|
2749
3269
|
type TaskWorkFn<T> = (ctx: TaskWorkContext) => Promise<T> | T;
|
|
2750
3270
|
/**
|
|
2751
3271
|
* Registry-level configuration. May only be applied BEFORE the first
|
|
@@ -2757,6 +3277,22 @@ interface TaskConfigureOptions {
|
|
|
2757
3277
|
readonly maxConcurrent?: number;
|
|
2758
3278
|
readonly retentionMs?: number;
|
|
2759
3279
|
}
|
|
3280
|
+
/**
|
|
3281
|
+
* Static facade over the process-wide task registry — the observability layer for asynchronous
|
|
3282
|
+
* work.
|
|
3283
|
+
*
|
|
3284
|
+
* Not instantiable: the constructor throws, and every operation is a static that delegates to one
|
|
3285
|
+
* in-process singleton. Tasks are an OPT-IN wrapper. `Agent.send`, `Agent.batch`, `Workflow.run`
|
|
3286
|
+
* and `Cron` fires only appear here when submitted with `{ task: true }`; work you submit yourself
|
|
3287
|
+
* goes through `Task.submit`.
|
|
3288
|
+
*
|
|
3289
|
+
* Two ordering constraints bite in practice. `Task.configure` must run before the first `submit` of
|
|
3290
|
+
* the process — a later call logs one line and is otherwise a no-op. And `Task.get` returning
|
|
3291
|
+
* `undefined` does not mean the id never existed: retention evicts terminal tasks, so an id can go
|
|
3292
|
+
* from known to unknown over time.
|
|
3293
|
+
*
|
|
3294
|
+
* @public
|
|
3295
|
+
*/
|
|
2760
3296
|
declare class Task {
|
|
2761
3297
|
private constructor();
|
|
2762
3298
|
/**
|
|
@@ -2887,7 +3423,16 @@ interface ModelListItem {
|
|
|
2887
3423
|
parameters?: ModelParameterDefinition[];
|
|
2888
3424
|
variants?: ModelVariant[];
|
|
2889
3425
|
}
|
|
2890
|
-
/**
|
|
3426
|
+
/**
|
|
3427
|
+
* Alias of {@link ModelListItem}, used where a model comes back from the Theokit platform rather
|
|
3428
|
+
* than from a catalog listing.
|
|
3429
|
+
*
|
|
3430
|
+
* It is the SAME type, not a narrowed one — the alias exists so platform-facing signatures read in
|
|
3431
|
+
* platform vocabulary alongside `SDKRepository` and `SDKUser`, and a value of either name is
|
|
3432
|
+
* assignable to the other.
|
|
3433
|
+
*
|
|
3434
|
+
* @public
|
|
3435
|
+
*/
|
|
2891
3436
|
type SDKModel = ModelListItem;
|
|
2892
3437
|
/**
|
|
2893
3438
|
* GitHub repository connected to the team. Cloud-only.
|
|
@@ -2999,17 +3544,56 @@ declare class Theokit {
|
|
|
2999
3544
|
* @public
|
|
3000
3545
|
*/
|
|
3001
3546
|
|
|
3002
|
-
/**
|
|
3547
|
+
/**
|
|
3548
|
+
* Symbol-keyed on purpose. THAT is what keeps the declaration out of a prompt: `Object.keys` and
|
|
3549
|
+
* `JSON.stringify` both ignore symbol keys, so a tool serialised on its way to the model carries
|
|
3550
|
+
* none of it. A string key would also risk colliding with a property the tool already has.
|
|
3551
|
+
*
|
|
3552
|
+
* Exported because the `@public` `WithBlastRadius<T>` below uses it as a COMPUTED
|
|
3553
|
+
* KEY. A computed key is part of the type it keys, so the emitted declaration
|
|
3554
|
+
* names this const — and a name the declaration file does not carry is a broken
|
|
3555
|
+
* reference (#335). `Symbol.for` keeps it a registry symbol, so an exported
|
|
3556
|
+
* binding does not weaken the property-hiding this comment describes: the value
|
|
3557
|
+
* was always retrievable by any code that knows the string.
|
|
3558
|
+
*
|
|
3559
|
+
* @public
|
|
3560
|
+
*/
|
|
3561
|
+
declare const DECLARED: unique symbol;
|
|
3562
|
+
/**
|
|
3563
|
+
* A tool that may carry a blast-radius declaration under {@link DECLARED}.
|
|
3564
|
+
*
|
|
3565
|
+
* The property is OPTIONAL in the type, so a plain tool is assignable to it and the type alone
|
|
3566
|
+
* never proves a declaration was made. `describeAction` is what tells the two apart at runtime.
|
|
3567
|
+
*
|
|
3568
|
+
* @public
|
|
3569
|
+
*/
|
|
3003
3570
|
type WithBlastRadius<T> = T & {
|
|
3004
3571
|
readonly [DECLARED]?: DeclaredAction;
|
|
3005
3572
|
};
|
|
3006
3573
|
/**
|
|
3574
|
+
* Declare what a tool reaches, for the approval layer rather than for the model.
|
|
3575
|
+
*
|
|
3576
|
+
* This MUTATES `tool` — it defines a symbol-keyed property on the object it was given and hands
|
|
3577
|
+
* the same reference back, so every existing reference to that tool sees the declaration too.
|
|
3578
|
+
* Calling it again on the same tool replaces the previous declaration; the property is
|
|
3579
|
+
* `configurable`, so re-declaring never throws.
|
|
3580
|
+
*
|
|
3581
|
+
* The declaration is invisible to `Object.keys` and `JSON.stringify` because the key is a symbol,
|
|
3582
|
+
* which is what keeps it out of anything serialised into a prompt.
|
|
3583
|
+
*
|
|
3007
3584
|
* @returns the same tool, with its action declared. The tool is not otherwise altered — the model
|
|
3008
3585
|
* must see exactly what it saw before.
|
|
3009
3586
|
* @public
|
|
3010
3587
|
*/
|
|
3011
3588
|
declare function withBlastRadius<T extends object>(tool: T, action: DeclaredAction): WithBlastRadius<T>;
|
|
3012
3589
|
/**
|
|
3590
|
+
* Read back the action a tool declared, if any.
|
|
3591
|
+
*
|
|
3592
|
+
* This is how an approval layer obtains the `action` for `evaluateBlastRadius`. An `undefined`
|
|
3593
|
+
* result means nobody has reviewed this tool's reach, which is a different fact from a tool that
|
|
3594
|
+
* declared a narrow scope — decide what to do with the unreviewed case explicitly rather than
|
|
3595
|
+
* treating it as harmless.
|
|
3596
|
+
*
|
|
3013
3597
|
* @returns the declared action, or `undefined` when the tool never declared one — NOT an empty
|
|
3014
3598
|
* action. "Never declared" and "declared as reaching nothing" are different facts, and collapsing
|
|
3015
3599
|
* them is how an unreviewed tool passes as harmless.
|
|
@@ -3158,11 +3742,27 @@ declare function toShareGptTrajectory(result: BatchResult, options?: {
|
|
|
3158
3742
|
*
|
|
3159
3743
|
* @public
|
|
3160
3744
|
*/
|
|
3161
|
-
/**
|
|
3745
|
+
/**
|
|
3746
|
+
* Whether a project directory may switch anything on.
|
|
3747
|
+
*
|
|
3748
|
+
* There is no middle level on purpose: `untrusted` means every declared capability is off, not
|
|
3749
|
+
* "some are off". A product that wants a partial grant expresses it by declaring fewer capabilities
|
|
3750
|
+
* for that call, not by inventing a third level here.
|
|
3751
|
+
*
|
|
3752
|
+
* @public
|
|
3753
|
+
*/
|
|
3162
3754
|
type TrustLevel = "trusted" | "untrusted";
|
|
3163
3755
|
/** Where the decision came from. @public */
|
|
3164
3756
|
type TrustSource = "env" | "store" | "default";
|
|
3165
|
-
/**
|
|
3757
|
+
/**
|
|
3758
|
+
* What the decision is made from: the capability vocabulary, a way to read the operator's record,
|
|
3759
|
+
* and an optional blanket override.
|
|
3760
|
+
*
|
|
3761
|
+
* `capabilities` is load-bearing rather than descriptive — the returned `allows` is built from
|
|
3762
|
+
* exactly this list, so a capability missing from it is a capability nothing gates.
|
|
3763
|
+
*
|
|
3764
|
+
* @public
|
|
3765
|
+
*/
|
|
3166
3766
|
interface TrustPostureInput<K extends string> {
|
|
3167
3767
|
/**
|
|
3168
3768
|
* Every capability a repository could switch on. `allows` is built from exactly this list — the
|
|
@@ -3181,14 +3781,36 @@ interface TrustPostureInput<K extends string> {
|
|
|
3181
3781
|
*/
|
|
3182
3782
|
readonly envOverride?: boolean;
|
|
3183
3783
|
}
|
|
3184
|
-
/**
|
|
3784
|
+
/**
|
|
3785
|
+
* The decision: the level, where it came from, and one boolean per declared capability.
|
|
3786
|
+
*
|
|
3787
|
+
* `allows` has exactly the keys of the `capabilities` list it was built from, so reading a
|
|
3788
|
+
* capability the caller never declared is a type error rather than a silent `undefined` that a
|
|
3789
|
+
* consumer would read as "not allowed".
|
|
3790
|
+
*
|
|
3791
|
+
* @public
|
|
3792
|
+
*/
|
|
3185
3793
|
interface TrustPosture<K extends string> {
|
|
3186
3794
|
readonly level: TrustLevel;
|
|
3187
3795
|
readonly source: TrustSource;
|
|
3188
3796
|
/** One entry per declared capability. Every value is `false` when the level is untrusted. */
|
|
3189
3797
|
readonly allows: Readonly<Record<K, boolean>>;
|
|
3190
3798
|
}
|
|
3191
|
-
/**
|
|
3799
|
+
/**
|
|
3800
|
+
* Decide what a project directory is allowed to switch on.
|
|
3801
|
+
*
|
|
3802
|
+
* Precedence: `envOverride === true` grants trust and SHORT-CIRCUITS — `isTrusted` is not called at
|
|
3803
|
+
* all, which matters because it may touch the filesystem. Otherwise `isTrusted()` is called exactly
|
|
3804
|
+
* once and its answer decides. `envOverride === false` is not a denial: it falls through to the
|
|
3805
|
+
* store like `undefined` does, so an unset or explicitly-off environment switch can never revoke a
|
|
3806
|
+
* directory the operator recorded as trusted.
|
|
3807
|
+
*
|
|
3808
|
+
* Every entry of `allows` is `false` whenever the level is untrusted, and the entries are generated
|
|
3809
|
+
* from `capabilities` rather than supplied per capability — that is what makes "nothing was left
|
|
3810
|
+
* ungated" a property of the call instead of a habit of the caller.
|
|
3811
|
+
*
|
|
3812
|
+
* @public
|
|
3813
|
+
*/
|
|
3192
3814
|
declare function resolveTrustPosture<K extends string>(input: TrustPostureInput<K>): TrustPosture<K>;
|
|
3193
3815
|
|
|
3194
3816
|
/**
|
|
@@ -3243,7 +3865,19 @@ interface WiredEntity {
|
|
|
3243
3865
|
*/
|
|
3244
3866
|
readonly suppressedByTrust: boolean;
|
|
3245
3867
|
}
|
|
3246
|
-
/**
|
|
3868
|
+
/**
|
|
3869
|
+
* The two halves of the observation: the gate that was applied, and what was handed to the builder.
|
|
3870
|
+
*
|
|
3871
|
+
* `requested` drives the shape of the record — the result has exactly its keys — while `posture`
|
|
3872
|
+
* only has to contain a gate for each of them. A posture that gates MORE than `requested` covers is
|
|
3873
|
+
* fine and normal; a posture that gates FEWER is refused, see `recordWiring`.
|
|
3874
|
+
*
|
|
3875
|
+
* Pass the values at the moment they go to the builder. Re-deriving them from configuration
|
|
3876
|
+
* afterwards would defeat the point: config is what was asked for, and the disagreement with what
|
|
3877
|
+
* was wired is the only thing this records.
|
|
3878
|
+
*
|
|
3879
|
+
* @public
|
|
3880
|
+
*/
|
|
3247
3881
|
interface WiringRecordInput<K extends string> {
|
|
3248
3882
|
/**
|
|
3249
3883
|
* The gate. Typically the output of `resolveTrustPosture`, which is what makes the name
|
|
@@ -3260,11 +3894,25 @@ interface WiringRecordInput<K extends string> {
|
|
|
3260
3894
|
readonly requested: Readonly<Record<K, readonly string[]>>;
|
|
3261
3895
|
}
|
|
3262
3896
|
/**
|
|
3897
|
+
* Record what a build actually wired, per capability.
|
|
3898
|
+
*
|
|
3899
|
+
* For each key of `requested`: `active` is a copy of the requested names when the posture allows
|
|
3900
|
+
* that capability and an empty array when it does not, `requested` is always a copy of what was
|
|
3901
|
+
* asked for, and `suppressedByTrust` is true only when the gate emptied a NON-EMPTY request. A
|
|
3902
|
+
* withheld capability that requested nothing reports `false`, because a flag that fires when
|
|
3903
|
+
* nothing happened is a flag readers learn to ignore.
|
|
3904
|
+
*
|
|
3905
|
+
* Pure and synchronous — it performs no I/O, which is what makes "this is not a second read of the
|
|
3906
|
+
* configuration" checkable rather than promised.
|
|
3907
|
+
*
|
|
3263
3908
|
* @returns one entry per key of `requested`, each a snapshot rather than a view of the caller's
|
|
3264
3909
|
* arrays — the record is read long after the build, and aliasing would make it answer with what
|
|
3265
3910
|
* the process holds now instead of with what was wired.
|
|
3911
|
+
* @throws UngatedCapabilityError when a key of `requested` has no entry in `posture.allows`. Absent
|
|
3912
|
+
* is not read as denied: reporting a capability nobody gates as suppressed would send the reader
|
|
3913
|
+
* looking for a trust setting that does not exist.
|
|
3266
3914
|
* @public
|
|
3267
3915
|
*/
|
|
3268
3916
|
declare function recordWiring<K extends string>(input: WiringRecordInput<K>): Readonly<Record<K, WiredEntity>>;
|
|
3269
3917
|
|
|
3270
|
-
export { Agent, AgentBuilder, AgentDefinition, AgentDescription, AgentFactory, AgentOperationOptions, AgentOptions, type AgentPromptResult, type AgentRegistryOptions, type ApprovalDecision, type ApprovalInput, type ApprovalMode, type ApprovalOutcome, type ApprovalReason, type BatchItem, type BatchOptions, type BatchProgress, type BatchResult, type BlastRadiusDecision, type BlastRadiusInput, type BlastRadiusOutcome, type BlastRadiusReason, Budget, BudgetHandle, BudgetOptions, BudgetSnapshot, BudgetTracker, CloudOptions, ContextSettings, type CounterBudgetTrackerOptions, type CredentialInput, type CredentialReport, CustomTool, type DeclaredAction, type DeclaredLayer, type DeepPartial, type DefineProviderOptions, type DefineToolSpec, type DiagnosticsSink, type DreamingSweepOptions, type DreamingSweepResult, type EnvOptOut, type EnvReachabilityAudit, type EnvReachabilityInput, ErrorMetadata, EventBus, type EvictReason, GOAL_CONTINUATION_MARKER, GenerateObjectError, type GenerateObjectOptions, type GenerateObjectResult, GetAgentOptions, GetRunOptions, GoalEvent, type GoalLoopAgent, GoalOptions, GoalResult, InlineSkill, JobQueue, type JobQueueOptions, JudgeCredentialError, JudgeResult, type KeepReason, type KeptArtifact, LayerOrderError, type LayerValues, ListAgentsOptions, ListResult, ListRunsOptions, LiveAgentRegistry, LiveSessionError, type LiveSessionReason, LocalOptions, McpServerConfig, Memory, MemoryId, MemoryProvider, MemorySettings, type MigrateOptions, type MigrateResult, type ModelListItem, type ModelParameterDefinition, ModelSelection, type ModelVariant, NoopMemoryProvider, type NormalizedJsonSchema, type OTelSpan, PermissionEngine, type PermissionGate, type PermissionGateContext, type PermissionGateDecision, PermissionMode, PermissionPlugin, type PermissionPluginOptions, Plugin, PluginsSettings, PreToolCallDecision, Processor, Provider, ProviderProfile, ProviderRoutingSettings, type ReapPlan, type ReapPlanInput, type ReapableArtifact, type RetentionPolicy, RetentionPolicyError, Run, RunEventSink, RunResult, SDKAgent, SDKAgentInfo, SDKMessage, type SDKModel, SDKProvider, type SDKRepository, type SDKUser, SOVEREIGN_ENV_KEYS, Security, type SecurityFloorInput, type SessionMessage, type SessionMessagePart, type SessionScope, type ShareGptMessage, type ShareGptTrajectory, SkillReadTool, SkillsSettings, type SovereignEnvKey, Squad, type SquadOptions, type SquadRun, StreamObjectError, type StreamObjectEvent, type StreamObjectOptions, SystemPromptResolver, TASK_RESERVED_PREFIXES, Task, type TaskCancelResult, type TaskConfigureOptions, type TaskEvent, type TaskFilter, type TaskHandle, type TaskKind, type TaskState, type TaskStoreOptions, type TaskSubmitOptions, type TaskWorkContext, type TaskWorkFn, type TelemetryHandle, Theokit, TheokitAgentError, type TheokitRequestOptions, TokenLimiter, type TokenLimiterOptions, Tool, ToolError, ToolResultContentBlock, type TrustLevel, type TrustPosture, type TrustPostureInput, type TrustSource, UngatedCapabilityError, UnicodeNormalizer, type UnicodeNormalizerOptions, UsageAccumulator, type WiredEntity, type WiringRecordInput, type WithBlastRadius, applySecurityFloor, auditEnvReachability, chargeAndCheckThresholds, computeCost, createCounterBudgetTracker, decideApproval, describeAction, describeCredential, estimateTokens, evaluateBlastRadius, extractRawId, foldLayers, getPricingEntry, guardSessionDestruction, inferApiMode, isValidTaskId, loadProjectEnv, migrateSqliteToLance, mkMemoryId, normalizeSchema, normalizeUsage, planReaping, preflightCheck, recordWiring, resolveTrustPosture, runGoalLoop, scopedConversationId, sessionScopePrefix, setDiagnosticsSink, toShareGptTrajectory, verifyLayerOrdering, withBlastRadius, withCwdMutex };
|
|
3918
|
+
export { Agent, AgentBuilder, AgentDefinition, type AgentDescription, AgentFactory, AgentOperationOptions, AgentOptions, type AgentPromptResult, type AgentRegistryOptions, type ApprovalDecision, type ApprovalInput, type ApprovalMode, type ApprovalOutcome, type ApprovalReason, type BatchItem, type BatchOptions, type BatchProgress, type BatchResult, type BlastRadiusDecision, type BlastRadiusInput, type BlastRadiusOutcome, type BlastRadiusReason, Budget, BudgetHandle, BudgetOptions, BudgetSnapshot, type BudgetTracker, CloudOptions, ContextSettings, type CounterBudgetTrackerOptions, type CredentialInput, type CredentialReport, type CustomTool, type DeclaredAction, type DeclaredLayer, type DeepPartial, type DefineProviderOptions, type DefineToolSpec, type DiagnosticsSink, type DreamingSweepOptions, type DreamingSweepResult, type EnvOptOut, type EnvReachabilityAudit, type EnvReachabilityInput, ErrorMetadata, EventBus, type EvictReason, GOAL_CONTINUATION_MARKER, GenerateObjectError, type GenerateObjectOptions, type GenerateObjectResult, GetAgentOptions, GetRunOptions, GoalEvent, type GoalLoopAgent, GoalOptions, GoalResult, InlineSkill, JobQueue, type JobQueueOptions, JudgeCredentialError, type JudgeResult, type KeepReason, type KeptArtifact, LayerOrderError, type LayerValues, ListAgentsOptions, ListResult, ListRunsOptions, type LiveAgentRegistry, LiveSessionError, type LiveSessionReason, LocalOptions, McpServerConfig, Memory, MemoryId, type MemoryProvider, MemorySettings, type MigrateOptions, type MigrateResult, type ModelListItem, type ModelParameterDefinition, ModelSelection, type ModelVariant, NoopMemoryProvider, type NormalizedJsonSchema, type OTelSpan, PermissionEngine, type PermissionGate, type PermissionGateContext, type PermissionGateDecision, PermissionMode, PermissionPlugin, type PermissionPluginOptions, Plugin, PluginsSettings, PreToolCallDecision, type Processor, Provider, type ProviderProfile, ProviderRoutingSettings, type ReapPlan, type ReapPlanInput, type ReapableArtifact, type RetentionPolicy, RetentionPolicyError, Run, RunEventSink, RunResult, type SDKAgent, SDKAgentInfo, SDKMessage, type SDKModel, SDKProvider, type SDKRepository, type SDKUser, SOVEREIGN_ENV_KEYS, Security, type SecurityFloorInput, type SessionMessage, type SessionMessagePart, type SessionScope, type ShareGptMessage, type ShareGptTrajectory, SkillReadTool, SkillsSettings, type SovereignEnvKey, Squad, type SquadOptions, type SquadRun, StreamObjectError, type StreamObjectEvent, type StreamObjectOptions, SystemPromptResolver, TASK_RESERVED_PREFIXES, Task, type TaskCancelResult, type TaskConfigureOptions, type TaskEvent, type TaskFilter, type TaskHandle, type TaskKind, type TaskState, type TaskStoreOptions, type TaskSubmitOptions, type TaskWorkContext, type TaskWorkFn, type TelemetryHandle, Theokit, TheokitAgentError, type TheokitRequestOptions, TokenLimiter, type TokenLimiterOptions, Tool, ToolError, type ToolResultContentBlock, type TrustLevel, type TrustPosture, type TrustPostureInput, type TrustSource, UngatedCapabilityError, UnicodeNormalizer, type UnicodeNormalizerOptions, UsageAccumulator, type WiredEntity, type WiringRecordInput, type WithBlastRadius, applySecurityFloor, auditEnvReachability, chargeAndCheckThresholds, computeCost, createCounterBudgetTracker, decideApproval, describeAction, describeCredential, estimateTokens, evaluateBlastRadius, extractRawId, foldLayers, getPricingEntry, guardSessionDestruction, inferApiMode, isValidTaskId, loadProjectEnv, migrateSqliteToLance, mkMemoryId, normalizeSchema, normalizeUsage, planReaping, preflightCheck, recordWiring, resolveTrustPosture, runGoalLoop, scopedConversationId, sessionScopePrefix, setDiagnosticsSink, toShareGptTrajectory, verifyLayerOrdering, withBlastRadius, withCwdMutex };
|