@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
|
@@ -0,0 +1,1358 @@
|
|
|
1
|
+
# Harness capability map
|
|
2
|
+
|
|
3
|
+
Every public symbol the TheoKit workspace publishes, and the exact specifier to import it from — every package, not only the one this file ships inside. **Generated from the built type declarations** by `tools/generate-capability-map.mjs` — do not edit by hand, and do not trust a copy of it that lives anywhere else.
|
|
4
|
+
|
|
5
|
+
A symbol listed under two specifiers is reachable from both, but that does NOT make the two interchangeable: a class emitted separately into a subpath entry is a distinct nominal type from the one in the root bundle, so passing one where the other is expected fails on a private field. When a symbol appears twice, import it and everything it is passed to from the SAME specifier.
|
|
6
|
+
|
|
7
|
+
1125 export(s) across 45 entry point(s).
|
|
8
|
+
|
|
9
|
+
## `@theokit/acp`
|
|
10
|
+
|
|
11
|
+
| Symbol | Kind | Summary |
|
|
12
|
+
|---|---|---|
|
|
13
|
+
| `AcpAgentInfo` | interface | Display info for the agent in an ACP host UI. |
|
|
14
|
+
| `AcpCapabilities` | interface | Overrides for the capabilities advertised in the ACP `initialize` handshake. |
|
|
15
|
+
| `AcpServerOptions` | interface | Options for {@link serveAcp } . |
|
|
16
|
+
| `AgentFactory` | type | Builds the agent that will serve one ACP session. |
|
|
17
|
+
| `AgentOrFactory` | type | What `serveAcp({ agent })` accepts. |
|
|
18
|
+
| `InvalidAgentError` | class | Thrown when `serveAcp({ agent })` is neither a function nor an object with `agentId` + `send`. |
|
|
19
|
+
| `PermissionMode` | type | How tool calls are gated before they execute (D355). |
|
|
20
|
+
| `PromptTooLargeError` | class | Raised when a prompt's accumulated size passes `maxPromptBytes` (D360). |
|
|
21
|
+
| `serveAcp` | function | Serve `options.agent` to an ACP host over JSON-RPC on stdio, blocking until the input stream ends. |
|
|
22
|
+
|
|
23
|
+
## `@theokit/cli`
|
|
24
|
+
|
|
25
|
+
| Symbol | Kind | Summary |
|
|
26
|
+
|---|---|---|
|
|
27
|
+
| `CLI_VERSION` | const | This package's semver, substituted at build time — what `theokit --version` prints. |
|
|
28
|
+
| `DatasetEntry` | interface | One evaluation case: the prompt sent to the agent, and an optional expected value handed to every scorer untouched (no comparison is performed for you). |
|
|
29
|
+
| `EvalConfig` | interface | The DEFAULT export of `eval.config.{ts,mjs}`. |
|
|
30
|
+
| `main` | function | Parse `argv` and run the matching subcommand, returning the process exit code instead of exiting. |
|
|
31
|
+
| `Score` | interface | Outcome of a single scoring decision. |
|
|
32
|
+
| `Scorer` | type | Grades one agent output. |
|
|
33
|
+
| `SDK_VERSION` | const | The `@theokit/sdk` semver this CLI was BUILT against — a concrete version, never `workspace:*`. |
|
|
34
|
+
|
|
35
|
+
## `@theokit/memory-honcho`
|
|
36
|
+
|
|
37
|
+
| Symbol | Kind | Summary |
|
|
38
|
+
|---|---|---|
|
|
39
|
+
| `HonchoAdapterOptions` | interface | Configuration accepted by the `honchoMemory(...)` factory. |
|
|
40
|
+
| `honchoMemory` | function | Wire Honcho as the agent's long-term memory. |
|
|
41
|
+
|
|
42
|
+
## `@theokit/memory-mem0`
|
|
43
|
+
|
|
44
|
+
| Symbol | Kind | Summary |
|
|
45
|
+
|---|---|---|
|
|
46
|
+
| `Mem0AdapterOptions` | interface | Configuration accepted by the `mem0Memory(...)` factory. |
|
|
47
|
+
| `mem0Memory` | function | Wire Mem0 cloud as the agent's long-term memory. |
|
|
48
|
+
|
|
49
|
+
## `@theokit/memory-supermemory`
|
|
50
|
+
|
|
51
|
+
| Symbol | Kind | Summary |
|
|
52
|
+
|---|---|---|
|
|
53
|
+
| `SupermemoryAdapterOptions` | interface | Configuration accepted by the `supermemoryMemory(...)` factory. |
|
|
54
|
+
| `supermemoryMemory` | function | Wire Supermemory as the agent's long-term memory. |
|
|
55
|
+
|
|
56
|
+
## `@theokit/sdk`
|
|
57
|
+
|
|
58
|
+
| Symbol | Kind | Summary |
|
|
59
|
+
|---|---|---|
|
|
60
|
+
| `ActiveMemoryPassArgs` | interface | Arguments for `MemoryProvider.runActivePass(...)`. |
|
|
61
|
+
| `ActiveMemoryPassResult` | interface | Result of `MemoryProvider.runActivePass(...)` — what the kernel injects into the LLM call. |
|
|
62
|
+
| `Agent` | class | Static façade for creating and managing Theo agents. |
|
|
63
|
+
| `AgentBuilder` | class | Fluent builder for {@link AgentOptions } . |
|
|
64
|
+
| `AgentConversationTurn` | interface | Agent turn: user message + assistant/tool/thinking steps. |
|
|
65
|
+
| `AgentDefinition` | interface | Subagent definition. |
|
|
66
|
+
| `AgentDescription` | interface | theokit#123 — the read-only introspection of a registered agent, returned by `Agent.describe()`. |
|
|
67
|
+
| `AgentDisposedError` | class | T1.6 — Thrown when a consumer calls `agent.send()` or any method on an agent that has already been `dispose()`d. |
|
|
68
|
+
| `AgentFactory` | class | Handle returned by {@link createAgentFactory } . |
|
|
69
|
+
| `AgentMemory` | interface | Direct memory API exposed on `SDKAgent.memory`. |
|
|
70
|
+
| `AgentOperationOptions` | interface | Options for archive/unarchive/delete. |
|
|
71
|
+
| `AgentOptions` | interface | Top-level options accepted by `Agent.create()`. |
|
|
72
|
+
| `AgentPromptResult` | type | Result of a one-shot {@link Agent.prompt } call. |
|
|
73
|
+
| `AgentRegistryOptions` | interface | Knobs for {@link LiveAgentRegistry.configure } . |
|
|
74
|
+
| `AgentRunError` | class | Thrown by `Agent.prompt` (and helpers that go through `run.wait()`) when the option `{ throwOnError: true }` is set and the run terminates with `status: 'error'`. |
|
|
75
|
+
| `AgentRunErrorCode` | type | Back-compat alias of {@link KnownAgentRunErrorCode } . |
|
|
76
|
+
| `agentStep` | function | Build an `AgentStep`. |
|
|
77
|
+
| `AgentSubagentDescription` | interface | theokit#123 — one subagent of a registered agent (what theokit-studio calls a workflow). |
|
|
78
|
+
| `AgentToolDescription` | interface | theokit#123 — one tool of a registered agent, as a reflection surface sees it. |
|
|
79
|
+
| `applyMode` | function | SE1 — apply a {@link PermissionMode } to a rule-engine verdict. |
|
|
80
|
+
| `applySecurityFloor` | function | Resolve a security-relevant setting so that a lower-trust layer can only tighten it. |
|
|
81
|
+
| `ApprovalDecision` | interface | The answer, the rule that produced it, and the tool it was about. |
|
|
82
|
+
| `ApprovalInput` | interface | One tool call to decide on, plus the operator's configuration. |
|
|
83
|
+
| `ApprovalMode` | type | What the operator chose for everything not decided per tool. |
|
|
84
|
+
| `ApprovalOutcome` | type | The three answers a policy can give: proceed, put the call in front of a human, or stop it. |
|
|
85
|
+
| `ApprovalReason` | type | Which rule produced the outcome. |
|
|
86
|
+
| `AssistantMessage` | interface | Plain assistant message in a conversation history. |
|
|
87
|
+
| `auditEnvReachability` | function | Answer both halves of the reachability question in one call. |
|
|
88
|
+
| `AuthenticationError` | class | Invalid API key, not logged in, insufficient permissions. |
|
|
89
|
+
| `BatchItem` | interface | Single prompt in a batch. |
|
|
90
|
+
| `BatchOptions` | interface | Options accepted by `Agent.batch`. |
|
|
91
|
+
| `BatchProgress` | interface | Live progress snapshot delivered to `onProgress`. |
|
|
92
|
+
| `BatchResult` | type | Per-prompt outcome. |
|
|
93
|
+
| `BlastRadiusDecision` | interface | The outcome, the rule that produced it, and the scope it was decided about. |
|
|
94
|
+
| `BlastRadiusInput` | interface | The action to decide on, plus what the operator granted. |
|
|
95
|
+
| `BlastRadiusOutcome` | type | What the policy decided. |
|
|
96
|
+
| `BlastRadiusReason` | type | Why the decision came out that way. |
|
|
97
|
+
| `Budget` | class | `Budget` — token cost enforcement primitive (Adoption Roadmap #1 post-Tasks, ADRs D375-D388). |
|
|
98
|
+
| `BudgetCheck` | interface | Decision the tracker returns on each iteration / pre-flight check. |
|
|
99
|
+
| `BudgetExceededError` | class | Thrown by `Budget` enforcement (ADR D386) when a `mode: "block"` budget would be exceeded by the upcoming LLM call. |
|
|
100
|
+
| `BudgetExceedEvent` | interface | Exceed event emitted at 100% across all modes. |
|
|
101
|
+
| `BudgetHandle` | interface | Returned by `Budget.create` and `Budget.get` — read-only view. |
|
|
102
|
+
| `BudgetLimit` | interface | A single limit; stacked in an array (D384, ANY exceeded blocks). |
|
|
103
|
+
| `BudgetMode` | type | Enforcement mode (D383). |
|
|
104
|
+
| `BudgetOptions` | interface | Options for `Budget.create`. |
|
|
105
|
+
| `BudgetScope` | type | Scope of a budget — where the charge is attributed. |
|
|
106
|
+
| `BudgetSnapshot` | interface | Per-window snapshot returned by `Budget.snapshot()`. |
|
|
107
|
+
| `BudgetThresholdEvent` | interface | Threshold event emitted at 80% and 95% in `warn` and `block` modes. |
|
|
108
|
+
| `BudgetTotal` | interface | Aggregate snapshot of usage so far. |
|
|
109
|
+
| `BudgetTracker` | interface | The kernel-facing contract. |
|
|
110
|
+
| `BudgetUsageEvent` | interface | Single usage event recorded during one LLM call. |
|
|
111
|
+
| `BudgetWindow` | type | Time window for a budget limit (D382 — UTC calendar-aligned). |
|
|
112
|
+
| `BuiltinToolName` | type | A tool the SDK declares to the model on its own initiative — not one the consumer passed in {@link AgentOptions.tools } , and not one an MCP server exposed. |
|
|
113
|
+
| `chargeAndCheckThresholds` | function | Charge the budget + dispatch threshold/exceed callbacks (EC-8 isolated). |
|
|
114
|
+
| `CloudEnv` | interface | Cloud execution environment. |
|
|
115
|
+
| `CloudOptions` | interface | Cloud agent configuration. |
|
|
116
|
+
| `CloudRepo` | interface | Repo to clone into a cloud agent's VM. |
|
|
117
|
+
| `CompletionCheck` | interface | SE34 — the per-send completion criterion (see {@link SendOptions.completionCheck } ). |
|
|
118
|
+
| `CompletionCheckResult` | interface | SE34 — the resolved per-send completion verdict (see {@link RunResult.completionCheck } ). |
|
|
119
|
+
| `computeCost` | function | Returns CostBreakdown with `status="estimated"`, `"unknown"`, or `"included"`. |
|
|
120
|
+
| `ConfigurationError` | class | Invalid model, bad request parameters, malformed options. |
|
|
121
|
+
| `ContextBudget` | interface | Token budget used by the context manager for a single agent. |
|
|
122
|
+
| `ContextManagerKind` | type | Context manager backend. |
|
|
123
|
+
| `ContextSettings` | interface | Context configuration accepted by `Agent.create()` via {@link AgentOptions.context } . |
|
|
124
|
+
| `ContextSnapshot` | interface | Result of `agent.context.snapshot()`. |
|
|
125
|
+
| `ContextSource` | interface | A single context source resolved by the context manager. |
|
|
126
|
+
| `ContextSourceStatus` | type | Inclusion state of a single context source in a {@link ContextSnapshot } . |
|
|
127
|
+
| `ConversationStep` | type | A single step inside an agent turn, discriminated by `type`: an assistant message, a tool call, the tool result that pairs with it, or a thinking block. |
|
|
128
|
+
| `ConversationTurn` | type | Structured per-turn view of a run. |
|
|
129
|
+
| `CostBreakdown` | interface | Cost breakdown attached to `RunResult.cost`. |
|
|
130
|
+
| `CostSource` | type | Source of the cost figure for caller-side audit. |
|
|
131
|
+
| `CostStatus` | type | Cost confidence level (D377). |
|
|
132
|
+
| `CounterBudgetTrackerOptions` | interface | Options for `createCounterBudgetTracker`. |
|
|
133
|
+
| `createCounterBudgetTracker` | function | Build a fresh tracker. |
|
|
134
|
+
| `CreateSkillSpec` | interface | Spec accepted by {@link createSkill } . |
|
|
135
|
+
| `CredentialInput` | interface | One provider's credential lookup, as the product resolved it. |
|
|
136
|
+
| `CredentialReport` | interface | A presence-only view of one credential, safe to print, log, or attach to a support bundle. |
|
|
137
|
+
| `Cron` | class | Static façade for scheduling Theo agent runs on a cron expression. |
|
|
138
|
+
| `CronCreateOptions` | interface | Options for `Cron.create()`. |
|
|
139
|
+
| `CronGetOptions` | interface | Options for `Cron.get()`. |
|
|
140
|
+
| `CronJob` | interface | Persistent cron-scheduled invocation of the Theo agent or a workflow. |
|
|
141
|
+
| `CronJobStatus` | type | Lifecycle state reported by `Cron.list()` / `Cron.get()`. |
|
|
142
|
+
| `CronListOptions` | type | Options for `Cron.list()`. |
|
|
143
|
+
| `CronOperationOptions` | interface | Options for `Cron.delete()` / `Cron.enable()` / `Cron.disable()`. |
|
|
144
|
+
| `CronRunOptions` | interface | Options for `Cron.run()` — manually trigger a job off-schedule. |
|
|
145
|
+
| `CronRuntime` | type | Runtime hosting a cron job. |
|
|
146
|
+
| `CronSchedulerStatus` | interface | Snapshot of the local scheduler returned by `Cron.status()`. |
|
|
147
|
+
| `CronStartOptions` | interface | Options for `Cron.start()` — activates the in-process scheduler for local jobs. |
|
|
148
|
+
| `CustomTool` | interface | Local function tool declared per-agent via {@link AgentOptions.tools } . |
|
|
149
|
+
| `decideApproval` | function | Decide one tool call against the operator's lists and mode. |
|
|
150
|
+
| `DeclaredAction` | interface | What an action reaches, and whether it can be taken back. |
|
|
151
|
+
| `DeclaredLayer` | interface | One named layer in a precedence chain. |
|
|
152
|
+
| `DeepPartial` | type | Recursive partial — `T` where every nested field becomes optional. |
|
|
153
|
+
| `DefineProviderOptions` | interface | Options for {@link defineProvider } . |
|
|
154
|
+
| `DefineToolSpec` | interface | Spec accepted by {@link Tool.create } . |
|
|
155
|
+
| `describeAction` | function | Read back the action a tool declared, if any. |
|
|
156
|
+
| `describeCredential` | function | Turn a resolved credential into something you can show a user. |
|
|
157
|
+
| `DiagnosticsSink` | type | Receives each diagnostic message already formatted, with the trailing `\n`. |
|
|
158
|
+
| `DoomLoopThresholds` | interface | Doom-loop guard thresholds (see {@link SendOptions.doomLoop } ). |
|
|
159
|
+
| `DreamingSweepOptions` | interface | Inputs for {@link Memory.runDreamingSweep } . |
|
|
160
|
+
| `DreamingSweepResult` | interface | What one dreaming sweep did. |
|
|
161
|
+
| `emitRunEvent` | function | SE2 — emit a {@link RunEvent } to an optional sink, swallowing any sink error so observability can never break the run (fail-safe, mirrors the EventBus EC-2 contract). |
|
|
162
|
+
| `EnvOptOut` | interface | A key deliberately left off the environment, with the reason and what would reverse it. |
|
|
163
|
+
| `EnvReachabilityAudit` | interface | The two failures, reported separately because they have opposite fixes. |
|
|
164
|
+
| `EnvReachabilityInput` | interface | The three lists the audit compares: every key the product declares, the subset an environment variable can set, and the documented exemptions. |
|
|
165
|
+
| `ErrorCode` | type | Finite, machine-readable error codes for provider-originated errors (ADR D66). |
|
|
166
|
+
| `ErrorMetadata` | interface | Structured context for errors that originated from a provider HTTP call (ADR D65). |
|
|
167
|
+
| `estimateTokens` | function | Approximate token count from string length. |
|
|
168
|
+
| `evaluateBlastRadius` | function | Decide one declared action against the scopes the operator granted. |
|
|
169
|
+
| `EventBus` | class | A typed publish/subscribe bus, parameterised by a map of event name to payload type. |
|
|
170
|
+
| `EvictReason` | type | Live-agent cache for production deploys (Production-Readiness #2, ADRs D307-D310). |
|
|
171
|
+
| `extractRawId` | function | Extract the raw provider id from a `MemoryId`, enforcing that the prefix matches `expectedAdapterId`. |
|
|
172
|
+
| `fn` | function | Build a `FnStep`. |
|
|
173
|
+
| `foldLayers` | function | Combine `entries` into one record. |
|
|
174
|
+
| `GenerateObjectError` | class | Typed error thrown by {@link Agent.generateObject } when the model refuses to call the synthetic `output` tool or when retries are exhausted. |
|
|
175
|
+
| `GenerateObjectOptions` | interface | Options accepted by {@link Agent.generateObject } . |
|
|
176
|
+
| `GenerateObjectResult` | interface | Successful return from {@link Agent.generateObject } . |
|
|
177
|
+
| `GenerateOptions` | interface | SE9 — options for the integrated structured-output method `agent.generate`: the {@link SendOptions } that drive the tool loop (phase 1) plus the required `output` Zod schema and structuring knobs (... |
|
|
178
|
+
| `GenerateRunResult` | interface | SE9 — result of `agent.generate`: the validated typed object plus the underlying tool-loop {@link RunResult } (status / usage / model) and the raw pre-parse input. |
|
|
179
|
+
| `GetAgentOptions` | interface | Options for `Agent.get()`. |
|
|
180
|
+
| `getPricingEntry` | function | Returns the pricing entry for a given `{provider, model}` route. |
|
|
181
|
+
| `GetRunOptions` | type | Options for `Agent.getRun()`. |
|
|
182
|
+
| `GOAL_CONTINUATION_MARKER` | const | The goal-loop's continuation marker — in a LEAF module, on purpose. |
|
|
183
|
+
| `GoalEvent` | type | Single event emitted while iterating a goal-driven loop — the public event type of {@link SDKAgent.runUntil } (ADRs D115-D117). |
|
|
184
|
+
| `GoalLoopAgent` | interface | The minimal surface the goal loop drives — anything that can send a prompt and wait for it. |
|
|
185
|
+
| `GoalOptions` | interface | Per-call configuration for `Agent.runUntil`. |
|
|
186
|
+
| `GoalResult` | interface | Return value of the `runUntil` async generator. |
|
|
187
|
+
| `guardSessionDestruction` | function | Throw unless `sessionId` is safe to destroy. |
|
|
188
|
+
| `HookName` | type | The fixed set of points a `"general"` plugin may attach to through `PluginContext.on`. |
|
|
189
|
+
| `ImageBlock` | interface | SE7 — a base64-encoded image block a tool can hand back as (part of) its result or its `ToolError`. |
|
|
190
|
+
| `inferApiMode` | function | Guess which usage shape a provider reports, from its name alone. |
|
|
191
|
+
| `InlineSkill` | interface | A code-defined skill (from {@link createSkill } ) — a {@link Skill } plus its inline body. |
|
|
192
|
+
| `InputProcessorContext` | interface | Context passed to {@link Processor.processInput } . |
|
|
193
|
+
| `IntegrationNotConnectedError` | class | Thrown when creating a cloud agent for a repo whose SCM provider is not connected. |
|
|
194
|
+
| `InteractionUpdate` | type | Lowest-level raw update from a run. |
|
|
195
|
+
| `InvalidateCacheOptions` | interface | Options for {@link SDKAgent.invalidateCache } . |
|
|
196
|
+
| `InvalidTaskIdError` | class | Thrown when a user-supplied task ID violates the grammar `^[a-z0-9][a-z0-9_-]*$` (D368) OR starts with a reserved adapter prefix (`wf-` / `b-` / `cron-`, EC-5). |
|
|
197
|
+
| `isTransientError` | function | Is this error transient (worth retrying)? |
|
|
198
|
+
| `isValidTaskId` | function | Validates a task ID against the public grammar + reserved prefixes. |
|
|
199
|
+
| `JobQueue` | class | An in-process queue of background jobs with status tracking, cancellation, and an optional concurrency bound. |
|
|
200
|
+
| `JobQueueOptions` | interface | #58 — construction options. |
|
|
201
|
+
| `JudgeCredentialError` | class | M80 — the judge's credential or model does not work: 401/404. |
|
|
202
|
+
| `JudgeResult` | interface | M80 — the result of a judge call, now public. |
|
|
203
|
+
| `KeepReason` | type | Why an artifact survived. |
|
|
204
|
+
| `KeptArtifact` | interface | An artifact that survived, carrying the reason it did. |
|
|
205
|
+
| `LayerOrderError` | class | Raised when a declared layer chain is not strictly ascending. |
|
|
206
|
+
| `LayerValues` | interface | A declared layer together with the values it supplies. |
|
|
207
|
+
| `ListAgentsOptions` | type | Options for `Agent.list()`. |
|
|
208
|
+
| `ListResult` | interface | Paginated list shape. |
|
|
209
|
+
| `ListRunsOptions` | interface | Options for `Agent.listRuns()`. |
|
|
210
|
+
| `LiveAgentRegistry` | class | An LRU-plus-idle cache of live `SDKAgent` instances, reached through `Agent.registry`. |
|
|
211
|
+
| `LiveSessionError` | class | Raised by `guardSessionDestruction` instead of letting a session be destroyed. |
|
|
212
|
+
| `LiveSessionReason` | type | Why the destruction was refused. |
|
|
213
|
+
| `loadProjectEnv` | function | Read the project's `.env` into `env`, then restore every {@link SOVEREIGN_ENV_KEYS } entry to the value it had BEFORE the load — including restoring it to absent. |
|
|
214
|
+
| `LocalOptions` | interface | Local agent configuration. |
|
|
215
|
+
| `McpAuthConfig` | interface | OAuth-style auth bundle for HTTP/SSE MCP servers. |
|
|
216
|
+
| `McpHttpServerConfig` | type | HTTP or SSE MCP server. |
|
|
217
|
+
| `McpOAuthConfig` | interface | OAuth 2.1 PKCE flow descriptor. |
|
|
218
|
+
| `McpServerConfig` | type | Union of MCP server configs. |
|
|
219
|
+
| `McpStdioServerConfig` | type | MCP server configuration accepted by `Agent.create()` and `agent.send()`. |
|
|
220
|
+
| `Memory` | const | Memory operations that run OUTSIDE an agent turn. |
|
|
221
|
+
| `MemoryAdapter` | interface | Portable third-party memory adapter contract. |
|
|
222
|
+
| `MemoryAdapterCapabilities` | interface | Statically declared adapter feature flags. |
|
|
223
|
+
| `MemoryAdapterError` | class | Error raised by `@theokit-memory-*` adapters. |
|
|
224
|
+
| `MemoryAdapterErrorCode` | type | Finite error codes specific to memory adapter operations (ADR D141). |
|
|
225
|
+
| `MemoryContext` | interface | Portable identity context. |
|
|
226
|
+
| `MemoryFact` | interface | A single memory fact returned by `recall` or `get`. |
|
|
227
|
+
| `MemoryId` | type | Branded provider memory ID. |
|
|
228
|
+
| `MemoryProvider` | interface | The kernel-facing contract. |
|
|
229
|
+
| `MemoryProviderFactory` | type | Memory provider factory shape (ADR D141). |
|
|
230
|
+
| `MemoryProviderHandle` | interface | Opaque handle returned by `init()`. |
|
|
231
|
+
| `MemoryProviderInitOptions` | interface | Options for `MemoryProvider.init(...)`. |
|
|
232
|
+
| `MemoryRevision` | interface | Versioned snapshot of a memory's history. |
|
|
233
|
+
| `MemorySettings` | interface | Memory configuration accepted by `Agent.create()` via {@link AgentOptions.memory } . |
|
|
234
|
+
| `MemoryToolSchema` | interface | OpenAI-format function-calling schema exposed to the LLM. |
|
|
235
|
+
| `MemoryTurnMessage` | interface | One assistant-turn message in the canonical `{role, content}` shape an adapter may receive instead of a flat string when writing a turn. |
|
|
236
|
+
| `MessageOrigin` | type | SE3 — provenance of the turn that produced a run: WHO triggered it. |
|
|
237
|
+
| `MigrateOptions` | interface | Options for {@link migrateSqliteToLance } . |
|
|
238
|
+
| `MigrateResult` | interface | Outcome of {@link migrateSqliteToLance } . |
|
|
239
|
+
| `migrateSqliteToLance` | function | Migrate the Memory index from SQLite to LanceDB. |
|
|
240
|
+
| `mkMemoryId` | function | Construct a branded `MemoryId` for an adapter. |
|
|
241
|
+
| `ModelListItem` | interface | Single model entry in the catalog. |
|
|
242
|
+
| `ModelParameterDefinition` | interface | Per-model parameter definition discovered from `Theokit.models.list()`. |
|
|
243
|
+
| `ModelParameterValue` | interface | One slot in a {@link ModelSelection.params } array. |
|
|
244
|
+
| `ModelSelection` | interface | Identifies a model plus optional per-model parameters (e.g. |
|
|
245
|
+
| `ModelVariant` | interface | Preset variant for a model — pre-filled parameter combinations. |
|
|
246
|
+
| `NetworkError` | class | Service unavailable, timeout, transport-level failure. |
|
|
247
|
+
| `NoopMemoryProvider` | class | SE36 — `NoopMemoryProvider.create` replaces `createNoopMemoryProvider` (ADR 0015). |
|
|
248
|
+
| `NormalizedJsonSchema` | type | The internal JSON-Schema shape the synthetic `output` tool consumes. |
|
|
249
|
+
| `normalizeSchema` | function | Normalize any supported schema to the internal JSON Schema. |
|
|
250
|
+
| `normalizeUsage` | function | Convert a provider's raw `usage` object into the SDK's canonical `TokenUsage`. |
|
|
251
|
+
| `OTelSpan` | interface | The subset of the OpenTelemetry `Span` API this SDK calls. |
|
|
252
|
+
| `OutputProcessorContext` | interface | Context passed to {@link Processor.processOutput } . |
|
|
253
|
+
| `PartialToolCallUpdate` | interface | Tool call arguments streaming in incrementally. |
|
|
254
|
+
| `PermissionAction` | type | `PermissionEngine` — first-match permission rules for tool invocations. |
|
|
255
|
+
| `PermissionEngine` | class | Ordered first-match permission rules for tool invocations — the policy object you hand to `PermissionPlugin.create()` to have it enforced. |
|
|
256
|
+
| `PermissionEngineOptions` | interface | Options for {@link PermissionEngine } . |
|
|
257
|
+
| `PermissionGate` | type | SE1 — the enriched `canUseTool` gate (the Anthropic-parity shape). |
|
|
258
|
+
| `PermissionGateContext` | interface | SE1 — context passed to the {@link PermissionGate } . |
|
|
259
|
+
| `PermissionGateDecision` | type | SE1 — the resolution of an `"ask"` verdict by the host gate. |
|
|
260
|
+
| `PermissionMode` | type | SE1 — a per-run permission MODE that adjusts the rule-engine verdict globally. |
|
|
261
|
+
| `PermissionPlugin` | class | SE36 — `PermissionPlugin.create` replaces `createPermissionPlugin` (ADR 0015). |
|
|
262
|
+
| `PermissionPluginOptions` | interface | Options for {@link createPermissionPlugin } . |
|
|
263
|
+
| `PermissionRule` | interface | One entry in a {@link PermissionEngine } 's ordered rule list. |
|
|
264
|
+
| `PersonalityPreset` | interface | Resolved personality preset surfaced via {@link SDKAgent.usePersonality } (Hermes #26, ADRs D160-D169). |
|
|
265
|
+
| `planReaping` | function | Sort artifacts into keep, reap, and undetermined — and delete nothing. |
|
|
266
|
+
| `Plugin` | type | SE36 — `Plugin.create` replaces `definePlugin` (ADR 0015). |
|
|
267
|
+
| `PluginContext` | interface | The registration surface passed to a `"general"` plugin's `register(ctx)`, and the plugin's only route into the agent. |
|
|
268
|
+
| `PluginsSettings` | interface | Plugins configuration accepted by `Agent.create()` via {@link AgentOptions.plugins } . |
|
|
269
|
+
| `PostAssistantReplyContext` | interface | Context passed to `post_assistant_reply` hook handlers (ADR D145). |
|
|
270
|
+
| `PostToolCallContext` | interface | #65 — context for the `post_tool_call` hook (fired after a tool runs). |
|
|
271
|
+
| `preflightCheck` | function | Throws BudgetExceededError if `mode === "block"` and any limit would be exceeded. |
|
|
272
|
+
| `PreToolCallContext` | interface | What a `pre_tool_call` handler is given: the tool about to run, the arguments the model produced for it, and the identity of the run asking. |
|
|
273
|
+
| `PreToolCallDecision` | interface | The veto a `pre_tool_call` handler returns to stop a tool call. |
|
|
274
|
+
| `PreUserSendContext` | interface | Context passed to `pre_user_send` hook handlers (ADR D145). |
|
|
275
|
+
| `PreUserSendResult` | interface | Optional result returned by `pre_user_send` handlers. |
|
|
276
|
+
| `Processor` | interface | A guardrail processor. |
|
|
277
|
+
| `ProcessorControls` | interface | Controls available to a processor while it runs: `abort()` stops the run with a tripwire; `warn()` reports a non-blocking violation and continues. |
|
|
278
|
+
| `ProcessorTripwire` | interface | The tripwire detail attached to {@link RunResult.tripwire } when a processor aborts, and carried by the `tripwire` run-event. |
|
|
279
|
+
| `ProcessorViolation` | interface | A policy violation surfaced to a processor's {@link Processor.onViolation } callback — on `abort()` (blocking) AND on `warn()` (non-blocking). |
|
|
280
|
+
| `Provider` | class | SE36 — uniform namespace API. |
|
|
281
|
+
| `ProviderCapability` | type | Capability slot a provider can fulfill. |
|
|
282
|
+
| `ProviderProfile` | interface | A data-only declaration of an LLM provider: its name, HTTP dialect, auth style, base URL and fallback models. |
|
|
283
|
+
| `ProviderRoute` | interface | A single user-declared routing rule. |
|
|
284
|
+
| `ProviderRoutingSettings` | interface | Provider routing configuration accepted by `Agent.create()` via {@link AgentOptions.providers } . |
|
|
285
|
+
| `ProviderTransform` | interface | M41 — the one OPTIONAL behavior seam on a provider profile. |
|
|
286
|
+
| `ProviderTransformContext` | interface | M41 (agent-builder provider framework) — the context a provider's `transform` receives per request. |
|
|
287
|
+
| `RateLimitError` | class | Too many requests or usage limits exceeded. |
|
|
288
|
+
| `ReapableArtifact` | interface | One artifact the caller is considering deleting, described well enough to decide about. |
|
|
289
|
+
| `ReapPlan` | interface | The decision, as three disjoint buckets whose union is exactly the input. |
|
|
290
|
+
| `ReapPlanInput` | interface | Everything `planReaping` needs: the candidates, the policy, and the current time. |
|
|
291
|
+
| `RecordSessionSummaryArgs` | interface | Arguments for `MemoryProvider.recordSessionSummary(...)` (SDK 2.0 Phase 1 physical Stage 3 prep — iter 27). |
|
|
292
|
+
| `recordWiring` | function | Record what a build actually wired, per capability. |
|
|
293
|
+
| `ResolvedProviderRoute` | interface | Resolved routing decision returned by `agent.providers.routes()`. |
|
|
294
|
+
| `resolveTrustPosture` | function | Decide what a project directory is allowed to switch on. |
|
|
295
|
+
| `RetentionPolicy` | interface | How long artifacts are kept and how many always survive. |
|
|
296
|
+
| `RetentionPolicyError` | class | Raised when a retention policy cannot be honoured as written. |
|
|
297
|
+
| `Run` | interface | Handle to a single prompt submission, returned by `agent.send()` before the model has answered. |
|
|
298
|
+
| `RunCompactBoundaryEvent` | interface | The conversation crossed a compaction boundary (history was summarized). |
|
|
299
|
+
| `RunCompletionCheckEvent` | interface | SE34 — the per-send completion check (`isTaskComplete`) produced a verdict. |
|
|
300
|
+
| `RunErrorDetail` | interface | Structured error attached to a {@link RunResult } when the underlying run transitioned to `"error"` status. |
|
|
301
|
+
| `RunEvent` | type | SE2 — typed runtime EVENT stream, ADDITIVE to the `SDKMessage` content stream. |
|
|
302
|
+
| `RunEventSink` | type | SE2 — the opt-in sink for {@link RunEvent } s. |
|
|
303
|
+
| `RunGitInfo` | interface | Git metadata attached to cloud runs. |
|
|
304
|
+
| `runGoalLoop` | function | Run the goal-driven loop (`send → judge → continuation`) over ANY `send → wait` surface. |
|
|
305
|
+
| `RunOperation` | type | Operations that may or may not be supported on a given {@link Run } , or on its parent agent. |
|
|
306
|
+
| `RunPermissionDeniedEvent` | interface | A tool call was DENIED before dispatch — by the permission gate/plugin (SE1), an operator file-hook `preToolUse`, or the fork tool-whitelist. |
|
|
307
|
+
| `RunRateLimitEvent` | interface | The provider returned a rate-limit (HTTP 429); the loop will back off + retry. |
|
|
308
|
+
| `RunResult` | interface | Terminal result of a {@link Run } . |
|
|
309
|
+
| `RunStatus` | type | Lifecycle status of a {@link Run } . |
|
|
310
|
+
| `RunTaskCompletedEvent` | interface | A background task/subagent finished. |
|
|
311
|
+
| `RunTaskStartedEvent` | interface | A background task/subagent started. |
|
|
312
|
+
| `RunTaskUpdatedEvent` | interface | A background task/subagent changed state. |
|
|
313
|
+
| `RunTimelineEvent` | type | theokit#140 - one element of {@link Run.events } : either a structural SDK message or a live delta. |
|
|
314
|
+
| `RunToCompletionOptions` | interface | Options for {@link SDKAgent.runToCompletion } (M1 Phase 3 — continuation driver). |
|
|
315
|
+
| `RunToCompletionResult` | interface | Result of {@link SDKAgent.runToCompletion } . |
|
|
316
|
+
| `RunToolProgressEvent` | interface | A tool call is being dispatched (before its result). |
|
|
317
|
+
| `RunTripwireEvent` | interface | SE24 — a guardrail processor called `abort()`; the run stops with a tripwire. |
|
|
318
|
+
| `RunUntilIterator` | type | Return type of {@link import ("../internal/local-agent/local-agent.js").LocalAgent.runUntil } . |
|
|
319
|
+
| `scopedConversationId` | function | M3 #62 — build a scope-namespaced conversation id (`"<scope>__<id>"`). |
|
|
320
|
+
| `SDKAgent` | interface | Handle returned by `Agent.create()` and `Agent.resume()`. |
|
|
321
|
+
| `SDKAgentInfo` | type | Metadata returned by `Agent.list()` and `Agent.get()`. |
|
|
322
|
+
| `SDKAgentPlugins` | interface | Public plugin listing handle exposed as `agent.plugins`. |
|
|
323
|
+
| `SDKAgentSkillDetail` | interface | A skill resolved WITH its body, returned by {@link SDKAgentSkills.get } . |
|
|
324
|
+
| `SDKAgentSkills` | interface | The skill handle exposed as `agent.skills`, present only when project-scoped skills are enabled (`settingSources: ["project"]`) or `skills.enabled` is set. |
|
|
325
|
+
| `SDKArtifact` | interface | Artifact produced inside an agent's workspace. |
|
|
326
|
+
| `SDKAssistantMessage` | interface | Model text output for this run. |
|
|
327
|
+
| `SDKContextManager` | interface | Public context manager handle exposed as `agent.context`. |
|
|
328
|
+
| `SDKImage` | type | Either a remote URL or inline base64 payload. |
|
|
329
|
+
| `SDKImageDimension` | interface | Dimensions of an inline image attachment. |
|
|
330
|
+
| `SDKMessage` | type | Discriminated union of all stream events. |
|
|
331
|
+
| `SDKModel` | type | Alias of {@link ModelListItem } , used where a model comes back from the Theokit platform rather than from a catalog listing. |
|
|
332
|
+
| `SDKObjectDelta` | interface | Partial object emitted during `Agent.streamObject<T>` streaming (ADR D45). |
|
|
333
|
+
| `SDKPluginMetadata` | interface | Public plugin metadata returned by `agent.plugins.list()`. |
|
|
334
|
+
| `SDKProvider` | interface | Provider catalog entry returned by `Theokit.providers.list()`. |
|
|
335
|
+
| `SDKProvidersManager` | interface | Public providers manager handle exposed as `agent.providers`. |
|
|
336
|
+
| `SDKRepository` | interface | GitHub repository connected to the team. |
|
|
337
|
+
| `SDKRequestMessage` | interface | Awaiting user input or approval. |
|
|
338
|
+
| `SDKStatusMessage` | interface | Cloud run lifecycle transitions. |
|
|
339
|
+
| `SDKSystemMessage` | interface | Init metadata. |
|
|
340
|
+
| `SDKTaskMessage` | interface | Task-level milestones and summaries. |
|
|
341
|
+
| `SDKThinkingMessage` | interface | Reasoning content. |
|
|
342
|
+
| `SDKToolUseMessage` | interface | Tool invocation lifecycle event. |
|
|
343
|
+
| `SDKUser` | interface | Account-level user info returned by `Theokit.me()`. |
|
|
344
|
+
| `SDKUserMessage` | interface | Structured form of `agent.send()`'s message argument. |
|
|
345
|
+
| `SDKUserMessageEvent` | interface | Echo of the user prompt for this run. |
|
|
346
|
+
| `Security` | class | Public security namespace (T2.1, ADR D68). |
|
|
347
|
+
| `SecurityFloorInput` | interface | The vocabulary, the layer names, and the values to resolve. |
|
|
348
|
+
| `SendOptions` | interface | Per-send overrides and callbacks. |
|
|
349
|
+
| `SessionLifecycleContext` | interface | #65 — context for the `on_session_start` / `on_session_end` hooks. |
|
|
350
|
+
| `SessionMessage` | interface | One turn of a session. |
|
|
351
|
+
| `SessionMessagePart` | type | One structured element of a {@link SessionMessage } . |
|
|
352
|
+
| `SessionRecord` | interface | One transcript record — a single line of the session JSONL file, and the unit the pluggable `SessionStore` seam reads and writes. |
|
|
353
|
+
| `SessionScope` | type | M3 #62 — session state scope. |
|
|
354
|
+
| `sessionScopePrefix` | function | M3 #62 — the id prefix (`"<scope>__"`) used to match a scope's conversations. |
|
|
355
|
+
| `SessionStore` | interface | The pluggable session-store seam. |
|
|
356
|
+
| `setDiagnosticsSink` | function | Installs (or removes, by passing `undefined`) the diagnostics destination. |
|
|
357
|
+
| `SettingSource` | type | Which on-disk settings layers a local agent loads. |
|
|
358
|
+
| `ShareGptMessage` | interface | One ShareGPT message in a conversation. |
|
|
359
|
+
| `ShareGptTrajectory` | interface | One full ShareGPT-format trajectory — a single conversation plus metadata. |
|
|
360
|
+
| `ShellCommand` | interface | Shell command executed during a run. |
|
|
361
|
+
| `ShellConversationTurn` | interface | Shell turn: a command and its output. |
|
|
362
|
+
| `ShellOutput` | interface | Output of a shell command. |
|
|
363
|
+
| `ShellOutputDeltaUpdate` | interface | Incremental output from a shell command running inside a run. |
|
|
364
|
+
| `Skill` | class | SE36 — `Skill.create` replaces `createSkill` (ADR 0015). |
|
|
365
|
+
| `SkillReadTool` | class | SE36 — `SkillReadTool.create` replaces `defineSkillReadTool` (ADR 0015). |
|
|
366
|
+
| `SkillsResolver` | type | SE22 — a resolver that produces {@link SkillsSettings } per run from runtime context (e.g. |
|
|
367
|
+
| `SkillsResolverContext` | interface | SE22 — context passed to a {@link SkillsResolver } . |
|
|
368
|
+
| `SkillsSettings` | interface | Skills configuration accepted by `Agent.create()` via {@link AgentOptions.skills } . |
|
|
369
|
+
| `SOVEREIGN_ENV_KEYS` | const | Variables a project-scoped source may never set. |
|
|
370
|
+
| `SovereignEnvKey` | type | The union of {@link SOVEREIGN_ENV_KEYS } entries — the variables a project-scoped `.env` may never set. |
|
|
371
|
+
| `Squad` | class | A sequential agent team produced by {@link createSquad } . |
|
|
372
|
+
| `SquadOptions` | interface | Options for {@link createSquad } . |
|
|
373
|
+
| `SquadRun` | interface | Result of a {@link Squad.run } . |
|
|
374
|
+
| `StepCompletedUpdate` | interface | Conversation step completed. |
|
|
375
|
+
| `StepStartedUpdate` | interface | Conversation step started. |
|
|
376
|
+
| `StreamObjectError` | class | Error thrown by {@link Agent.streamObject } when the model refuses to call the synthetic `output` tool or when all retries fail to produce a schema-valid object. |
|
|
377
|
+
| `StreamObjectEvent` | type | Event emitted by {@link Agent.streamObject } . |
|
|
378
|
+
| `StreamObjectOptions` | interface | Options accepted by {@link Agent.streamObject } . |
|
|
379
|
+
| `StreamToCompletionResult` | type | Result of {@link SDKAgent.streamToCompletion } (V3-4 — the STREAMING continuation driver). |
|
|
380
|
+
| `SummaryCompletedUpdate` | interface | Closes the bracket opened by {@link SummaryStartedUpdate } . |
|
|
381
|
+
| `SummaryStartedUpdate` | interface | Opens the bracket around a {@link SummaryUpdate } , for a UI that wants to show a pending state before the summary text exists. |
|
|
382
|
+
| `SummaryUpdate` | interface | A conversation summary produced during a run, delivered through `SendOptions.onDelta`. |
|
|
383
|
+
| `SystemPromptContext` | interface | Context passed to a {@link SystemPromptResolver } . |
|
|
384
|
+
| `SystemPromptMemoryFact` | interface | Public view of a recalled memory fact exposed to the system-prompt resolver. |
|
|
385
|
+
| `SystemPromptResolver` | type | Resolver function that produces the system prompt dynamically. |
|
|
386
|
+
| `SystemPromptSkillRef` | interface | Public skill metadata exposed to the system-prompt resolver. |
|
|
387
|
+
| `Task` | class | Static facade over the process-wide task registry — the observability layer for asynchronous work. |
|
|
388
|
+
| `TASK_RESERVED_PREFIXES` | const | Re-exported for adapter implementations + tests. |
|
|
389
|
+
| `TaskCancelResult` | interface | Result of `Task.cancel` (D365 — idempotent). |
|
|
390
|
+
| `TaskConfigureOptions` | interface | Registry-level configuration. |
|
|
391
|
+
| `TaskEvent` | type | Discriminated union of task lifecycle events (D366). |
|
|
392
|
+
| `TaskFilter` | interface | Query filter for `Task.list`. |
|
|
393
|
+
| `TaskHandle` | interface | Public read-only view of a task entry in the registry. |
|
|
394
|
+
| `TaskKind` | type | Discriminator of the runtime that produced a task (D374). |
|
|
395
|
+
| `TaskNotFoundError` | class | Thrown when `Task.subscribe(id)` is called for a task that has been evicted, never submitted, or evicted after retention (D373). |
|
|
396
|
+
| `TaskState` | type | Closed enum of the 5 lifecycle states (D362). |
|
|
397
|
+
| `TaskStoreOptions` | type | Options shape for `TaskStore` factory (D364). |
|
|
398
|
+
| `TaskSubmitOptions` | interface | Options for `Task.submit`. |
|
|
399
|
+
| `TaskWorkContext` | interface | `Task` — observable async work registry (Adoption Roadmap gap #2, ADRs D361-D374). |
|
|
400
|
+
| `TaskWorkFn` | type | The unit of work handed to {@link Task.submit } . |
|
|
401
|
+
| `TelemetryHandle` | interface | Telemetry handle returned by {@link createTelemetry } . |
|
|
402
|
+
| `TelemetrySettings` | interface | Telemetry configuration for an agent. |
|
|
403
|
+
| `TextBlock` | interface | Plain text content block emitted by the assistant or user, or returned by a tool. |
|
|
404
|
+
| `TextDeltaUpdate` | interface | Incremental text token from the assistant. |
|
|
405
|
+
| `Theokit` | class | Account-level and catalog reads. |
|
|
406
|
+
| `TheokitAgentError` | class | Base class for all errors thrown by `@theokit/sdk`. |
|
|
407
|
+
| `TheokitRequestOptions` | interface | Options shared by every `Theokit.*` request. |
|
|
408
|
+
| `ThinkingCompletedUpdate` | interface | Emitted when a reasoning block completes. |
|
|
409
|
+
| `ThinkingDeltaUpdate` | interface | Incremental reasoning token. |
|
|
410
|
+
| `ThinkingMessage` | interface | Reasoning step in a conversation history. |
|
|
411
|
+
| `TokenDeltaUpdate` | interface | Token count delta for usage tracking. |
|
|
412
|
+
| `TokenLimiter` | class | SE36 — `TokenLimiter.create` replaces `createTokenLimiter` (ADR 0015). |
|
|
413
|
+
| `TokenLimiterOptions` | interface | Options for {@link createTokenLimiter } . |
|
|
414
|
+
| `TokenUsage` | interface | Token usage observed during a Run. |
|
|
415
|
+
| `Tool` | class | SE36 — the uniform `X.create()` namespace API. |
|
|
416
|
+
| `ToolCall` | interface | Single tool call event. |
|
|
417
|
+
| `ToolCallCompletedUpdate` | interface | Tool call completed. |
|
|
418
|
+
| `ToolCallStartedUpdate` | interface | Tool call started — args committed. |
|
|
419
|
+
| `ToolCallSummary` | interface | M82 — one tool call of the turn, as seen by `transform_tool_result`. |
|
|
420
|
+
| `ToolContextMessage` | interface | SE12 — a read-only, text-only projection of one turn of the run's conversation, exposed to a tool handler via `ctx.messages`. |
|
|
421
|
+
| `ToolError` | class | Thrown from a tool `handler` to surface a failure to the model. |
|
|
422
|
+
| `ToolResult` | interface | Result of a tool invocation. |
|
|
423
|
+
| `ToolResultContentBlock` | type | SE7 — structured content a tool result may carry: text and/or images. |
|
|
424
|
+
| `ToolResultGuardOptions` | interface | Options for the tool-result guard (spotlighting + PII redaction on tool output). |
|
|
425
|
+
| `ToolResultTransformContext` | interface | M82 — context for `transform_tool_result`, the only tool-stage hook whose return value the SDK actually applies (`#runTransform` folds it; `#runFireAndForget` discards `post_tool_call`'s). |
|
|
426
|
+
| `ToolUseBlock` | interface | Tool invocation block emitted by the assistant. |
|
|
427
|
+
| `toShareGptTrajectory` | function | Convert a successful `BatchResult` to ShareGPT-format trajectory. |
|
|
428
|
+
| `TransformContext` | interface | #65 — context for the `transform_tool_result` / `transform_llm_output` hooks. |
|
|
429
|
+
| `TrustLevel` | type | Whether a project directory may switch anything on. |
|
|
430
|
+
| `TrustPosture` | interface | The decision: the level, where it came from, and one boolean per declared capability. |
|
|
431
|
+
| `TrustPostureInput` | interface | What the decision is made from: the capability vocabulary, a way to read the operator's record, and an optional blanket override. |
|
|
432
|
+
| `TrustSource` | type | Where the decision came from. |
|
|
433
|
+
| `TurnEndedUpdate` | interface | Turn ended with usage summary. |
|
|
434
|
+
| `UngatedCapabilityError` | class | Raised when a recorded capability has no entry in the gate. |
|
|
435
|
+
| `UnicodeNormalizer` | class | SE36 — `UnicodeNormalizer.create` replaces `createUnicodeNormalizer` (ADR 0015). |
|
|
436
|
+
| `UnicodeNormalizerOptions` | interface | Options for {@link createUnicodeNormalizer } . |
|
|
437
|
+
| `UnknownAgentError` | class | Catch-all for unclassified server or runtime errors. |
|
|
438
|
+
| `UnsupportedBudgetOperationError` | class | Thrown when a budget operation is requested on a `CloudAgent` (D388). |
|
|
439
|
+
| `UnsupportedRunOperationError` | class | Thrown when a {@link Run } or agent operation is not available on the current runtime. |
|
|
440
|
+
| `UnsupportedTaskOperationError` | class | Thrown when `CloudAgent` is asked to wrap a task (D370). |
|
|
441
|
+
| `UsageAccumulator` | class | Sums the per-step token counts of a multi-step run into one `TokenUsage`. |
|
|
442
|
+
| `UserMessage` | interface | User-authored message in a conversation history. |
|
|
443
|
+
| `UserMessageAppendedUpdate` | interface | User message appended to the conversation. |
|
|
444
|
+
| `Verdict` | type | M80 — the terminal verdicts a judge can return. |
|
|
445
|
+
| `verifyLayerOrdering` | function | Assert that each layer strictly outranks the one before it. |
|
|
446
|
+
| `WiredEntity` | interface | What one capability asked for, and what it got. |
|
|
447
|
+
| `WiringRecordInput` | interface | The two halves of the observation: the gate that was applied, and what was handed to the builder. |
|
|
448
|
+
| `withBlastRadius` | function | Declare what a tool reaches, for the approval layer rather than for the model. |
|
|
449
|
+
| `WithBlastRadius` | type | A tool that may carry a blast-radius declaration under {@link DECLARED } . |
|
|
450
|
+
| `withCwdMutex` | function | Run `fn` after every earlier `withCwdMutex` call for the same `key` has settled, and return what `fn` returns. |
|
|
451
|
+
| `Workflow` | class | A committed, immutable workflow: a fixed list of steps you can `run`, `stream` or `resume`. |
|
|
452
|
+
|
|
453
|
+
## `@theokit/sdk-budget`
|
|
454
|
+
|
|
455
|
+
| Symbol | Kind | Summary |
|
|
456
|
+
|---|---|---|
|
|
457
|
+
| `BUILTIN_PRICING` | const | The nine models this package prices out of the box, keyed by the exact `model` string a `BudgetUsageEvent` carries: four OpenAI, three Anthropic, two Google. |
|
|
458
|
+
| `charge` | function | Append `amountUsd` to the spend ledger for the budget called `name`, timestamped now. |
|
|
459
|
+
| `chargeAndCheckThresholds` | function | Record the ACTUAL cost of a completed call against a budget and fire its callbacks. |
|
|
460
|
+
| `computeUsdCost` | function | Compute USD cost for a single token event. |
|
|
461
|
+
| `createBudget` | function | Register a budget under `opts.name` and return its live handle. |
|
|
462
|
+
| `createUsdBudgetTracker` | function | Build a `BudgetTracker` that caps an agent run on tokens, on USD, or on both. |
|
|
463
|
+
| `defaultMode` | function | The mode a budget enforces, resolving the omitted case to `"warn"`. |
|
|
464
|
+
| `deleteBudget` | function | Remove a budget from the registry. |
|
|
465
|
+
| `formatCostUsd` | function | Render a USD cost for display. |
|
|
466
|
+
| `FormatCostUsdOptions` | interface | Options for {@link formatCostUsd } . |
|
|
467
|
+
| `getBudget` | function | The live handle for a registered budget, or `undefined` when the name is unknown. |
|
|
468
|
+
| `getBudgetOptionsRaw` | function | The stored {@link BudgetOptions } exactly as registered, or `undefined` when the name is unknown. |
|
|
469
|
+
| `inferApiMode` | function | Which usage dialect a provider reports in, inferred from its name. |
|
|
470
|
+
| `listBudgets` | function | Every budget registered in this process, in insertion order. |
|
|
471
|
+
| `ModelPricing` | interface | The two rates needed to price one model, in USD per 1,000,000 tokens. |
|
|
472
|
+
| `normalizeUsage` | function | Turn a provider's raw usage object into the SDK's canonical {@link TokenUsage } . |
|
|
473
|
+
| `preflightCheck` | function | Refuse an upcoming call that would push a `"block"`-mode budget past one of its limits. |
|
|
474
|
+
| `snapshotAll` | function | One row per budget PER WINDOW — a budget with three limits produces three rows, not one. |
|
|
475
|
+
| `spentIn` | function | Total USD recorded for `name` inside `window`, summed at call time. |
|
|
476
|
+
| `startOfDayUtc` | function | Midnight UTC of `now`'s day — the start of a `1d` budget window. |
|
|
477
|
+
| `startOfWeekUtc` | function | Midnight UTC on the MONDAY of `now`'s week — the start of a `1w` budget window. |
|
|
478
|
+
| `UsdBudgetTrackerOptions` | interface | Options for {@link createUsdBudgetTracker } . |
|
|
479
|
+
| `windowStartMs` | function | Inclusive start timestamp (ms) of `window`, as `spentIn` uses it to decide which charges count. |
|
|
480
|
+
|
|
481
|
+
## `@theokit/sdk-cache`
|
|
482
|
+
|
|
483
|
+
| Symbol | Kind | Summary |
|
|
484
|
+
|---|---|---|
|
|
485
|
+
| `Cache` | class | A semantic response cache: an exact-key lookup, then a vector-similarity lookup, over prompt/response pairs the caller has stored. |
|
|
486
|
+
| `CacheEmbedderRuntime` | interface | Embedder runtime shape — minimal subset of `EmbeddingRuntime` (D11) the Cache actually uses. |
|
|
487
|
+
| `CacheEntry` | interface | One cached prompt/response pair, as `Cache` stores it. |
|
|
488
|
+
| `CacheInvalidTtlError` | class | A TTL value that could not be parsed, thrown at configuration time rather than on first use. |
|
|
489
|
+
| `CachePersistenceOptions` | interface | Where cached entries live between process restarts. |
|
|
490
|
+
| `CacheSemanticOptions` | interface | Configuration for `Cache.semantic(...)`. |
|
|
491
|
+
| `CacheStats` | interface | Counters returned by `Cache.stats()`. |
|
|
492
|
+
| `CacheTTLConfig` | interface | How long entries live, and which prompts never become entries at all. |
|
|
493
|
+
| `createLexicalEmbedder` | function | Build the built-in lexical embedder — a zero-dependency, zero-cost `CacheEmbedderRuntime`. |
|
|
494
|
+
|
|
495
|
+
## `@theokit/sdk-handoff`
|
|
496
|
+
|
|
497
|
+
| Symbol | Kind | Summary |
|
|
498
|
+
|---|---|---|
|
|
499
|
+
| `AsPluginOptions` | interface | Options for {@link Handoff.asPlugin } . |
|
|
500
|
+
| `Handoff` | class | Peer-to-peer delegation: one agent hands the conversation to another and stops. |
|
|
501
|
+
| `HandoffDescriptor` | type | What `Handoff.create` returns: a target plus its options plus the resolved tool name. |
|
|
502
|
+
| `HandoffLoopError` | class | Thrown when a chain exceeds `maxHandoffDepth` (default 5). |
|
|
503
|
+
| `HandoffNameCollisionError` | class | Thrown when two targets of the same parent resolve to the same `transfer_to_*` name — the model would have no way to pick between them. |
|
|
504
|
+
| `HandoffOptions` | interface | Options accepted by `Handoff.create(target, opts?)`. |
|
|
505
|
+
| `HandoffPairLoopError` | class | Thrown when the same `sender -> receiver` pair fires twice inside one dispatch — the ping-pong guard, and the loop protection that actually fires in practice. |
|
|
506
|
+
| `HandoffReceiverDisposedError` | class | Thrown when the target agent was disposed before the handoff reached it — detected at dispatch time, since nothing unregisters the tool when an agent is disposed. |
|
|
507
|
+
| `HandoffSelfReferenceError` | class | Thrown when a target's `agentId` equals the parent's — self-handoff, which recurses forever. |
|
|
508
|
+
| `handoffTo` | function | Hand `message` to `target` right now and return its reply text — no LLM routing, no tool call. |
|
|
509
|
+
| `RECOMMENDED_HANDOFF_PROMPT_PREFIX` | const | Prose to prepend to a SENDING agent's `systemPrompt` so the model knows the `transfer_to_*` tools exist and what they mean. |
|
|
510
|
+
|
|
511
|
+
## `@theokit/sdk-handoff/internal/tool-injector`
|
|
512
|
+
|
|
513
|
+
| Symbol | Kind | Summary |
|
|
514
|
+
|---|---|---|
|
|
515
|
+
| `buildHandoffTool` | function | Build a `CustomTool` for one handoff descriptor. |
|
|
516
|
+
| `normalizeHandoffs` | function | Normalize each `handoffs[]` entry to a `HandoffDescriptor`. |
|
|
517
|
+
|
|
518
|
+
## `@theokit/sdk-memory`
|
|
519
|
+
|
|
520
|
+
| Symbol | Kind | Summary |
|
|
521
|
+
|---|---|---|
|
|
522
|
+
| `ActiveMemoryCache` | class | A bounded, TTL-expiring cache of recall results, so two identical sends in quick succession run one search. |
|
|
523
|
+
| `ActiveMemoryCacheOptions` | interface | TTL-bounded cache for `runActiveMemory` results. |
|
|
524
|
+
| `ActiveMemoryOptions` | interface | Tuning for one recall attempt. |
|
|
525
|
+
| `ActiveMemoryQueryMode` | type | How the recall query is built from the conversation. |
|
|
526
|
+
| `ActiveMemoryResult` | interface | Result of one recall attempt. |
|
|
527
|
+
| `ActiveMemoryStatus` | type | Outcome of one recall attempt. |
|
|
528
|
+
| `ActiveMemoryTranscript` | interface | Optional on-disk persistence for Active Memory recall transcripts (ADR D6). |
|
|
529
|
+
| `appendDiaryEntry` | function | Append one entry to the dream diary, creating the file with a `# Dream Diary` header when it does not exist yet. |
|
|
530
|
+
| `appendFact` | function | Append a fact, honouring the `enabled` gate on {@link MemoryConfig } : when memory is disabled the call resolves without touching disk. |
|
|
531
|
+
| `appendFactToMarkdown` | function | Append a fact to `MEMORY.md ## Facts`. |
|
|
532
|
+
| `assertValidBackend` | function | EC-1: runtime guard for `opts.backend`. |
|
|
533
|
+
| `azureOpenAiMemoryEmbeddingProviderAdapter` | const | Azure OpenAI embeddings. |
|
|
534
|
+
| `buildErrorMetadata` | function | Build an `ErrorMetadata` object with all optional fields included conditionally (no `undefined` keys in the output). |
|
|
535
|
+
| `CategorizedFact` | interface | A fact stored under a typed category. |
|
|
536
|
+
| `CategorizedMemory` | interface | A typed, category-partitioned markdown memory store. |
|
|
537
|
+
| `chunkMarkdown` | function | Split markdown into the chunks that get embedded and searched. |
|
|
538
|
+
| `ChunkMarkdownOptions` | interface | Split a markdown document into semantically meaningful chunks (ADR D1 of memory-system-peer-project-parity). |
|
|
539
|
+
| `CircuitBreaker` | class | Stops calling a recall path that keeps timing out. |
|
|
540
|
+
| `CircuitBreakerOptions` | interface | Consecutive-timeout circuit breaker for Active Memory recall. |
|
|
541
|
+
| `Cluster` | interface | A group of facts the REM phase judged related. |
|
|
542
|
+
| `ClusterResult` | interface | What {@link remPhase } produced. |
|
|
543
|
+
| `cohereMemoryEmbeddingProviderAdapter` | const | Cohere embeddings. |
|
|
544
|
+
| `CreateAdapterOptions` | interface | Per-call overrides handed to {@link MemoryEmbeddingProviderAdapter.create } . |
|
|
545
|
+
| `createCategorizedMemory` | function | Create a typed categorized memory store over the closed `categories` taxonomy. |
|
|
546
|
+
| `CreateCategorizedMemoryOptions` | interface | Options for {@link createCategorizedMemory } . |
|
|
547
|
+
| `createInMemoryMarkdownProvider` | function | Build a fresh `MemoryProvider` whose facts live in-process. |
|
|
548
|
+
| `createMemoryGetTool` | function | Build the `memory_get` tool, which reads an exact excerpt from a file under `<cwd>/.theokit/memory`. |
|
|
549
|
+
| `createMemorySearchTool` | function | Build the `memory_search` tool over an index that is already open. |
|
|
550
|
+
| `createOpenAiCompatibleRuntime` | function | Build an {@link EmbeddingRuntime } for a provider that speaks the OpenAI embedding wire — or, through `cfg.dialect`, one that deviates from it in a known way. |
|
|
551
|
+
| `createVectorIndex` | function | Create the `embeddings` vec0 virtual table at the given vector width, if it does not exist already. |
|
|
552
|
+
| `DedupResult` | interface | Dreaming/REM phase logic. |
|
|
553
|
+
| `deepinfraMemoryEmbeddingProviderAdapter` | const | Open-weight embedding models (BGE, E5, GTE, MiniLM) hosted by DeepInfra. |
|
|
554
|
+
| `deepPhase` | function | Deep phase — render consolidated markdown for the dreamed note. |
|
|
555
|
+
| `DEFAULT_AZURE_OPENAI_EMBEDDING_MODEL` | const | Azure OpenAI embedding adapter. |
|
|
556
|
+
| `DEFAULT_COHERE_EMBEDDING_MODEL` | const | Cohere embedding adapter — `POST /v2/embed` at `https://api.cohere.com`. |
|
|
557
|
+
| `DEFAULT_DEEPINFRA_EMBEDDING_MODEL` | const | DeepInfra embedding adapter — hosts open-source embedding models (BGE, E5, Jina, etc.) at pay-per-token. |
|
|
558
|
+
| `DEFAULT_GEMINI_EMBEDDING_MODEL` | const | Google Gemini embedding adapter — the OpenAI-compatible surface at `https://generativelanguage.googleapis.com/v1/embeddings`. |
|
|
559
|
+
| `DEFAULT_JINA_EMBEDDING_MODEL` | const | Jina AI embedding adapter — OpenAI-compatible at `https://api.jina.ai/v1/embeddings`. |
|
|
560
|
+
| `DEFAULT_MEMORY_READ_LINES` | const | Bounded read with truncation info (ADR D5 — `memory_get` foundation). |
|
|
561
|
+
| `DEFAULT_MISTRAL_EMBEDDING_MODEL` | const | Mistral embedding adapter — OpenAI-compatible REST surface (`POST /v1/embeddings` against `https://api.mistral.ai`). |
|
|
562
|
+
| `DEFAULT_OLLAMA_EMBEDDING_MODEL` | const | Model used when the caller names none: `nomic-embed-text`, 768 dimensions, roughly 274MB to pull. |
|
|
563
|
+
| `DEFAULT_OPENAI_EMBEDDING_MODEL` | const | OpenAI embedding adapter (ADR D3) — built on the shared OpenAI-compatible factory. |
|
|
564
|
+
| `DEFAULT_OPENROUTER_EMBEDDING_MODEL` | const | OpenRouter embedding adapter — routes through OpenRouter's `POST /api/v1/embeddings` endpoint (OpenAI-compatible request/response shape). |
|
|
565
|
+
| `DEFAULT_VOYAGE_EMBEDDING_MODEL` | const | Voyage AI embedding adapter — `POST /v1/embeddings` at `https://api.voyageai.com` with the OpenAI-compatible `{ model, input }` request shape. |
|
|
566
|
+
| `defaultIndexPath` | function | Where the SQLite index lives when the caller does not name a path: `<cwd>/.theokit/memory/.index/memory.sqlite`. |
|
|
567
|
+
| `DiaryEntry` | interface | Dream-diary append (ADR D7). |
|
|
568
|
+
| `diaryPath` | function | Path to the dream diary, `<memory root>/dream-diary.md`. |
|
|
569
|
+
| `discoverSessionFiles` | function | List the session summaries under `sessions/`, with each path expressed relative to the memory root so the index can store a stable `sessions/<id>.md`. |
|
|
570
|
+
| `discoverWikiFiles` | function | List the `.md` files directly under `wiki/`, with each path expressed relative to the memory root so the index can store a stable `wiki/<name>.md`. |
|
|
571
|
+
| `DreamingOptions` | interface | Dreaming sweep orchestrator (ADR D7 of memory-system-peer-project-parity). |
|
|
572
|
+
| `DreamingResult` | interface | What one sweep did. |
|
|
573
|
+
| `dropVectorIndex` | function | Drop the `embeddings` table, discarding every stored vector. |
|
|
574
|
+
| `EmbedAllArgs` | interface | Inputs for {@link embedMissingChunks } : the open database and the embedding runtime to call. |
|
|
575
|
+
| `EmbeddingCache` | interface | The cache contract the shared runtime writes through. |
|
|
576
|
+
| `EmbeddingDialect` | interface | theokit#159 — the three points where a provider may deviate from the OpenAI embedding wire. |
|
|
577
|
+
| `EmbeddingIdentity` | interface | The three facts that decide whether the vectors already stored are still usable: who produced them, with which model, at which width. |
|
|
578
|
+
| `EmbeddingRuntime` | interface | A live embedding provider, bound to one model. |
|
|
579
|
+
| `EmbeddingRuntimeStats` | interface | Counters accumulated by a runtime since it was created. |
|
|
580
|
+
| `embedMissingChunks` | function | Embed every chunk that doesn't yet have a vector. |
|
|
581
|
+
| `entryHash` | function | A sha256 over the five counts of an entry, as a hex string. |
|
|
582
|
+
| `geminiMemoryEmbeddingProviderAdapter` | const | Google Gemini embeddings through Google's OpenAI-compatible surface at `/v1beta/openai/embeddings`. |
|
|
583
|
+
| `identityMatches` | function | Compare two embedding identities field by field. |
|
|
584
|
+
| `IndexManager` | class | The default memory index: SQLite for storage, FTS5 for text matching, and sqlite-vec for vectors when an embedding runtime is supplied. |
|
|
585
|
+
| `IndexStatus` | interface | A snapshot of index health. |
|
|
586
|
+
| `isLanceAvailable` | function | Test helper for {@link LanceIndex } : indicates whether the Lance module is loadable in the current environment. |
|
|
587
|
+
| `isSqliteVecLoaded` | function | Check whether sqlite-vec is loaded by running a tiny version query. |
|
|
588
|
+
| `jinaMemoryEmbeddingProviderAdapter` | const | Jina AI embeddings, over the standard OpenAI wire. |
|
|
589
|
+
| `LanceFactRecord` | interface | One row of the Lance `facts` table, as it is stored. |
|
|
590
|
+
| `LanceIndex` | class | Lance-backed memory index. |
|
|
591
|
+
| `LanceMemoryAdapter` | class | Presents a `LanceIndex` as a {@link MemoryIndex } , so a consumer written against the SQLite index runs unchanged on `backend: "lance"`. |
|
|
592
|
+
| `LanceSearchHit` | interface | One Lance search result. |
|
|
593
|
+
| `LanceSearchOptions` | interface | Filters for `LanceIndex.search`. |
|
|
594
|
+
| `lanceStoragePath` | function | Test helper: re-export the storage path computation. |
|
|
595
|
+
| `legacyMemoryJsonPath` | function | Resolve the legacy JSON memory path used pre-ADR-D8 (kept for migration helpers + tests). |
|
|
596
|
+
| `lightPhase` | function | Light phase — drop facts whose embedding is too similar to one already kept. |
|
|
597
|
+
| `listNotes` | function | List the `.md` files directly under `notes/`. |
|
|
598
|
+
| `loadSqliteVecExtension` | function | Load the `sqlite-vec` extension into an opened SQLite connection. |
|
|
599
|
+
| `mapOpenAICompatibleError` | function | Turn a failed OpenAI-shaped HTTP response into the typed error the SDK throws. |
|
|
600
|
+
| `MEMORY_EMBEDDING_ADAPTERS` | const | Memory embedding adapter catalog, indexed by provider id. |
|
|
601
|
+
| `MemoryBackend` | type | Vector backend selector. |
|
|
602
|
+
| `MemoryChunk` | interface | A semantically meaningful slice of a markdown memory file, produced by `chunkMarkdown`. |
|
|
603
|
+
| `MemoryConfig` | interface | Per-agent memory configuration. |
|
|
604
|
+
| `MemoryDb` | interface | Thin wrapper around the SQLite driver. |
|
|
605
|
+
| `memoryDir` | function | The memory root for a workspace: `<cwd>/.theokit/memory`. |
|
|
606
|
+
| `MemoryEmbeddingProviderAdapter` | interface | Memory embedding provider adapter contract (ADR D3 of memory-system-peer-project-parity). |
|
|
607
|
+
| `MemoryFact` | interface | One remembered statement. |
|
|
608
|
+
| `MemoryFileEntry` | interface | Lightweight reference to a markdown file in the memory corpus. |
|
|
609
|
+
| `MemoryGetToolOptions` | interface | Options for {@link createMemoryGetTool } . |
|
|
610
|
+
| `MemoryIndex` | interface | The four operations both backends implement, and the type every consumer should hold. |
|
|
611
|
+
| `memoryMdPath` | function | Path to `MEMORY.md`, the single file holding the flat `## Facts` list. |
|
|
612
|
+
| `MemoryReadResult` | interface | Result of `reader.readFile`. |
|
|
613
|
+
| `MemorySearchHit` | interface | Memory index manager contract — leaf types shared by `index-manager.ts` (orchestrator), `index-manager-dispatch.ts` (backend dispatch), `lance-memory-adapter.ts` (Lance backend), and `memory-index.... |
|
|
614
|
+
| `MemorySearchToolOptions` | interface | Options for {@link createMemorySearchTool } . |
|
|
615
|
+
| `MemoryTool` | interface | A memory tool ready to hand to the agent loop: the JSON-serialisable description an LLM sees, plus the `execute` that runs it. |
|
|
616
|
+
| `MemoryToolJson` | interface | Memory tools (`memory_search` + `memory_get`) — ADR D5 of memory-system-peer-project-parity. |
|
|
617
|
+
| `META_KEY_DIMENSION` | const | `meta` table key holding the vector width the `embeddings` vec0 table was created with. |
|
|
618
|
+
| `META_KEY_MODEL` | const | `meta` table key holding the embedding model id the vectors were produced with. |
|
|
619
|
+
| `META_KEY_PROVIDER_ID` | const | `meta` table key holding the id of the embedding provider that produced the vectors currently on disk (for example `openai`, `ollama`). |
|
|
620
|
+
| `migrateLegacyJson` | function | Move facts from the pre-markdown JSON store into `MEMORY.md`, once. |
|
|
621
|
+
| `MigrateOptions` | interface | Migrate Memory.index from SQLite to LanceDB (ADR D44). |
|
|
622
|
+
| `MigrateResult` | interface | Outcome of {@link migrateSqliteToLance } . |
|
|
623
|
+
| `migrateSqliteToLance` | function | Run the migration. |
|
|
624
|
+
| `MigrationResult` | interface | Outcome of {@link migrateLegacyJson } . |
|
|
625
|
+
| `mistralMemoryEmbeddingProviderAdapter` | const | Mistral embeddings, over the standard OpenAI wire. |
|
|
626
|
+
| `NoteFile` | interface | One note discovered under `notes/`: its file name without the `.md` suffix, and its absolute path. |
|
|
627
|
+
| `notesDir` | function | Path to `<memory root>/notes`, where per-topic notes and the consolidated notes written by a dreaming sweep live. |
|
|
628
|
+
| `ollamaMemoryEmbeddingProviderAdapter` | const | Embeddings from a local Ollama instance — the only adapter in the catalog with `transport: "local"`, and the one to choose when the corpus must not leave the machine or when there is no API key to ... |
|
|
629
|
+
| `OpenAiCompatibleConfig` | interface | What one provider adapter tells {@link createOpenAiCompatibleRuntime } about its wire: where to POST, which environment variables carry the key and the base URL, which model to use by default, and ... |
|
|
630
|
+
| `openAiMemoryEmbeddingProviderAdapter` | const | OpenAI embeddings — `text-embedding-3-small` (1536), `text-embedding-3-large` (3072) and `text-embedding-ada-002` (1536). |
|
|
631
|
+
| `OpenDbOptions` | interface | Options for {@link openMemoryDb } . |
|
|
632
|
+
| `OpenIndexOptions` | interface | Options for `IndexManager.open`. |
|
|
633
|
+
| `openLanceIndex` | function | Lance-path open. |
|
|
634
|
+
| `OpenLanceOptions` | interface | Options for `LanceIndex.open`. |
|
|
635
|
+
| `openMemoryDb` | function | Open (or create) the SQLite memory index at `filePath`, applying the pragmas and creating the schema before returning. |
|
|
636
|
+
| `openRouterMemoryEmbeddingProviderAdapter` | const | Embeddings routed through OpenRouter, which lets one key reach several upstream providers. |
|
|
637
|
+
| `packVector` | function | Pack a Float32Array into a Buffer suitable for sqlite-vec BLOB binding. |
|
|
638
|
+
| `parseRetryAfter` | function | Parse `retry-after` header in numeric-seconds form. |
|
|
639
|
+
| `parseSearchOptions` | function | Common search-options parser used by both `IndexManager.search` and `LanceMemoryAdapter.search`. |
|
|
640
|
+
| `persistActiveMemoryTranscript` | function | Write one recall transcript to `<memory root>/transcripts/active-memory/<runId>.json`, creating the parent directories and replacing the file atomically. |
|
|
641
|
+
| `PRAGMA_STATEMENTS` | const | Non-WAL pragmas. |
|
|
642
|
+
| `readEmbeddingIdentity` | function | Read the embedding identity recorded in the `meta` table. |
|
|
643
|
+
| `readFacts` | function | Configuration-aware accessors honoring the existing MemoryConfig contract. |
|
|
644
|
+
| `readFactsFromMarkdown` | function | Read facts from `MEMORY.md`'s `## Facts` section. |
|
|
645
|
+
| `ReadFileOptions` | interface | Inputs for {@link readMemoryFileBounded } . |
|
|
646
|
+
| `readMemoryFileBounded` | function | Read a bounded slice of a text file and report what was left behind. |
|
|
647
|
+
| `redactSecrets` | function | Canonical credential-redaction primitive (ADR D68). |
|
|
648
|
+
| `remPhase` | function | REM phase — single-link agglomerative clustering by cosine similarity. |
|
|
649
|
+
| `renderDiaryEntry` | function | Render one entry as the markdown block {@link appendDiaryEntry } writes: an h2 heading carrying the ISO timestamp, then a bullet list of the counts, prefixed by the first eight hex characters of {@... |
|
|
650
|
+
| `resetMigrationStateForTests` | function | Test-only — reset the in-process migration flag map. |
|
|
651
|
+
| `runActiveMemory` | function | Run one blocking recall before the system prompt is assembled, and report what happened. |
|
|
652
|
+
| `RunActiveMemoryArgs` | interface | Everything {@link runActiveMemory } needs for one attempt. |
|
|
653
|
+
| `runDreamingSweep` | function | Run one consolidation sweep over `MEMORY.md`: drop near-duplicate facts, cluster what is left, write a consolidated note under `notes/`, and append a diary entry. |
|
|
654
|
+
| `SCHEMA_STATEMENTS` | const | SQLite schema for the memory index. |
|
|
655
|
+
| `SearchOptions` | interface | Search tuning. |
|
|
656
|
+
| `SessionFile` | interface | Session summary discovery (ADR D20). |
|
|
657
|
+
| `sessionsDir` | function | Path to `<memory root>/sessions`, where one markdown summary per finished run is written. |
|
|
658
|
+
| `SessionSummaryInput` | interface | Per-run session summary writer (ADR D20). |
|
|
659
|
+
| `sessionSummaryPath` | function | Path of the summary file for a run. |
|
|
660
|
+
| `SyncResult` | interface | What one `sync()` did. |
|
|
661
|
+
| `TenantContext` | interface | T4.9 — Tenant isolation context for cache key derivation. |
|
|
662
|
+
| `truncateRaw` | function | Truncate raw response body to ~2KB and redact known credential patterns so it can ride inside `ErrorMetadata.raw` without ballooning logs OR leaking tokens. |
|
|
663
|
+
| `upsertEmbedding` | function | Store the vector for one chunk, replacing any vector already held for it. |
|
|
664
|
+
| `VALID_BACKENDS` | const | Valid backend identifiers — runtime guard against TS-narrowing escapes (EC-1). |
|
|
665
|
+
| `VectorHitRow` | interface | One row of a vec0 KNN result: the chunk id and its raw distance from the query vector. |
|
|
666
|
+
| `vectorSearch` | function | Run a k-nearest-neighbour query against the `embeddings` table and return the matches ordered by ascending distance (closest first). |
|
|
667
|
+
| `voyageMemoryEmbeddingProviderAdapter` | const | Voyage AI embeddings, over the standard OpenAI wire. |
|
|
668
|
+
| `wikiDir` | function | Path to `<memory root>/wiki`, the read-only supplement directory. |
|
|
669
|
+
| `WikiFile` | interface | Wiki supplement discovery (ADR Phase 10 of memory-system-peer-project-parity). |
|
|
670
|
+
| `writeEmbeddingIdentity` | function | Record the embedding identity in the `meta` table, upserting each of the three keys. |
|
|
671
|
+
| `writeSessionSummary` | function | Write a session summary file. |
|
|
672
|
+
|
|
673
|
+
## `@theokit/sdk-pty`
|
|
674
|
+
|
|
675
|
+
| Symbol | Kind | Summary |
|
|
676
|
+
|---|---|---|
|
|
677
|
+
| `clampYield` | function | Bound the yield window to [ {@link YIELD_MIN_MS } , {@link YIELD_MAX_MS } ]. |
|
|
678
|
+
| `MaxSessionsError` | class | M77 — the {@link PtyInteractiveBackendOptions.maxSessions } ceiling was reached. |
|
|
679
|
+
| `PtyInteractiveBackend` | class | `InteractiveBackend` backed by a real pty, for programs that only behave correctly on a terminal. |
|
|
680
|
+
| `PtyInteractiveBackendOptions` | interface | Constructor options for {@link PtyInteractiveBackend } . |
|
|
681
|
+
| `YIELD_MAX_MS` | const | Ceiling for `StartInteractiveOptions.yieldMs`, clamped down. |
|
|
682
|
+
| `YIELD_MIN_MS` | const | Floor for `StartInteractiveOptions.yieldMs` — how long a call waits for the process to produce output before returning what it has. |
|
|
683
|
+
|
|
684
|
+
## `@theokit/sdk-tools`
|
|
685
|
+
|
|
686
|
+
| Symbol | Kind | Summary |
|
|
687
|
+
|---|---|---|
|
|
688
|
+
| `buildEnvContext` | function | Render a portable `<env>` orientation block. |
|
|
689
|
+
| `buildRepoMap` | function | Render a char-bounded, depth-limited directory tree. |
|
|
690
|
+
| `CatastrophicCommandError` | class | Thrown / reported when a command matches the catastrophic deny-list. |
|
|
691
|
+
| `catastrophicShellReason` | function | Return a human-readable reason when `command` is catastrophic/irreversible, or `null`. |
|
|
692
|
+
| `commandDenialReason` | function | The first deny reason across `policies` (deny-wins), or `null` if every policy allows. |
|
|
693
|
+
| `CommandPolicy` | type | A pure command-permission predicate: returns a non-empty deny reason, or `null` to allow. |
|
|
694
|
+
| `ContextMatchError` | class | Thrown by {@link replaceUnique } when the replacement cannot be made safely. |
|
|
695
|
+
| `ContextMatchReason` | type | Context-tolerant single-occurrence text matching (`seek_sequence` parity, ported from the AgentBuilder Codex clone, M10/M13). |
|
|
696
|
+
| `createApplyPatchTool` | function | Build the `apply_patch` tool over Codex's V4A patch grammar — one call that adds, updates, deletes and moves several files at once. |
|
|
697
|
+
| `CreateApplyPatchToolOptions` | interface | `apply_patch` — built-in tool for coding agents. |
|
|
698
|
+
| `createBraveWebSearchAdapter` | function | Build a `WebSearchCallback` backed by the Brave Search API. |
|
|
699
|
+
| `CreateBraveWebSearchAdapterOptions` | interface | Options for {@link createBraveWebSearchAdapter } . |
|
|
700
|
+
| `createCurrentTimeTool` | function | Build the `current_time` tool, so the model reads a clock instead of stating a date from training data. |
|
|
701
|
+
| `CreateCurrentTimeToolOptions` | interface | `current_time` — built-in tool for coding agents. |
|
|
702
|
+
| `createEditFileTool` | function | Build the `edit_file` tool: replace one occurrence of `old_string` with `new_string` in place, after copying the previous content to `<path>.bak`. |
|
|
703
|
+
| `CreateEditFileToolOptions` | interface | `edit_file` — built-in tool for coding agents. |
|
|
704
|
+
| `createGenericHttpSearchAdapter` | function | Build a `WebSearchCallback` backed by a generic HTTP search endpoint. |
|
|
705
|
+
| `CreateGenericHttpSearchAdapterOptions` | interface | Options for {@link createGenericHttpSearchAdapter } . |
|
|
706
|
+
| `createGitDiffTool` | function | Build the `git_diff` tool: `git diff --no-color` over the working tree, or the staged changes when the model passes `cached`. |
|
|
707
|
+
| `CreateGitDiffToolOptions` | interface | `git_diff` — built-in tool for coding agents. |
|
|
708
|
+
| `createGitStatusTool` | function | Build the `git_status` tool. |
|
|
709
|
+
| `CreateGitStatusToolOptions` | interface | `git_status` — built-in tool for coding agents. |
|
|
710
|
+
| `createGlobTool` | function | Build the `glob_files` tool: find files by the shape of their name. |
|
|
711
|
+
| `CreateGlobToolOptions` | interface | `glob_files` — built-in tool for coding agents. |
|
|
712
|
+
| `createInteractiveShellTool` | function | Start an interactive session; returns a `session_id` to drive with `write_stdin`. |
|
|
713
|
+
| `CreateInteractiveShellToolOptions` | interface | `interactive_shell` + `write_stdin` — built-in tools for driving an interactive session (a REPL, `git rebase -i`, any command that PROMPTS for stdin). |
|
|
714
|
+
| `createListDirTool` | function | Build the `list_dir` tool: the direct entries of one directory as `{ name, type }`. |
|
|
715
|
+
| `CreateListDirToolOptions` | interface | `list_dir` — built-in tool for coding agents. |
|
|
716
|
+
| `createPlanModeTool` | function | Build the `plan_mode` tool, which flips a flag and returns instruction text telling the model to outline before it edits. |
|
|
717
|
+
| `createQuestionTool` | function | Build the `question` tool: the agent stops, asks the user something, and the turn waits for the answer. |
|
|
718
|
+
| `createReadFileTool` | function | Build the `read_file` tool. |
|
|
719
|
+
| `CreateReadFileToolOptions` | interface | `read_file` — built-in tool for coding agents. |
|
|
720
|
+
| `createRunVitestTool` | function | Build the `run_vitest` tool: run the project's suite and return the counts rather than the log. |
|
|
721
|
+
| `CreateRunVitestToolOptions` | interface | `run_vitest` — built-in tool for coding agents. |
|
|
722
|
+
| `createSearchTextTool` | function | Build the `search_text` tool: scan file CONTENTS across the tree. |
|
|
723
|
+
| `CreateSearchTextToolOptions` | interface | `search_text` — built-in tool for coding agents. |
|
|
724
|
+
| `createSessionArtifactStore` | function | Create a generic artifact store rooted at `dir`. |
|
|
725
|
+
| `createShellTool` | function | Build the `shell_exec` tool: run a command through `/bin/sh -c` with `projectRoot` as the working directory. |
|
|
726
|
+
| `CreateShellToolOptions` | interface | `shell_exec` — built-in tool for coding agents. |
|
|
727
|
+
| `createTodolistTool` | function | Build the `todolist` tool: an in-memory checklist the agent keeps across the turns of one session. |
|
|
728
|
+
| `createUpdatePlanTool` | function | `update_plan` — built-in tool for coding agents. |
|
|
729
|
+
| `createViewImageTool` | function | Read an image from the project so the model can look at it. |
|
|
730
|
+
| `CreateViewImageToolOptions` | interface | Options for {@link createViewImageTool } . |
|
|
731
|
+
| `createWebFetchTool` | function | Build the `web_fetch` tool: retrieve one URL over HTTP or HTTPS and hand the model the body as text. |
|
|
732
|
+
| `CreateWebFetchToolOptions` | interface | `web_fetch` — built-in tool for coding agents. |
|
|
733
|
+
| `createWebSearchTool` | function | Build the `web_search` tool over a caller-supplied provider. |
|
|
734
|
+
| `CreateWebSearchToolOptions` | interface | Options for {@link createWebSearchTool } . |
|
|
735
|
+
| `createWriteFileTool` | function | Build the `write_file` tool. |
|
|
736
|
+
| `CreateWriteFileToolOptions` | interface | Options for {@link createWriteFileTool } . |
|
|
737
|
+
| `createWriteStdinTool` | function | Write to a live interactive session's stdin and read the output it produces. |
|
|
738
|
+
| `DEFAULT_MAX_IMAGE_BYTES` | const | Default ceiling: 5 MB on disk. |
|
|
739
|
+
| `DEFAULT_TOOL_GUIDANCE` | const | Curated hints for the common cross-tool error codes. |
|
|
740
|
+
| `denyCatastrophicCommands` | function | A policy that denies catastrophic commands by composing the M3-2 guardrail. |
|
|
741
|
+
| `EnvContextOptions` | interface | Options for {@link buildEnvContext } . |
|
|
742
|
+
| `formatCode` | function | Wrap code in a fenced code block with language tag. |
|
|
743
|
+
| `formatDiff` | function | Format a unified diff with +/- prefixes preserved. |
|
|
744
|
+
| `formatError` | function | Format an error message as a markdown block. |
|
|
745
|
+
| `formatFileList` | function | Format a list of file paths as a bulleted markdown list. |
|
|
746
|
+
| `injectGuidance` | function | Pure: parse a tool handler's JSON output and ADD a `guidance` hint when the result is an `{ ok: false, error }` object whose code has a hint and that does not already carry guidance. |
|
|
747
|
+
| `isBlockedIp` | function | True if `ip` is a blocked address (private/loopback/link-local/CGNAT/metadata/ reserved). |
|
|
748
|
+
| `isCommandAllowed` | function | `true` when no policy denies `command` (an empty policy array allows everything). |
|
|
749
|
+
| `PlanModeTool` | interface | The `plan_mode` tool object returned by the no-argument {@link createPlanModeTool } . |
|
|
750
|
+
| `PlanModeToolOptions` | interface | Options for the persistence-enabled {@link createPlanModeTool } overload. |
|
|
751
|
+
| `PlanModeToolWithStore` | interface | Plan-mode tool with opt-in artifact persistence (M4-4). |
|
|
752
|
+
| `PlanNode` | interface | A flat plan-render node — the stable shape a UI/plan layer consumes. |
|
|
753
|
+
| `QuestionTool` | interface | M76 — aligned with the SDK's `CustomTool`. |
|
|
754
|
+
| `QuestionToolOptions` | interface | `question` — interactive tool that asks the user a question and waits for a response. |
|
|
755
|
+
| `ReadTracker` | class | `ReadTracker` — SE32 read-before-write safety. |
|
|
756
|
+
| `ReasoningTools` | class | Reasoning scratchpad tools. |
|
|
757
|
+
| `RedirectBlockedError` | class | Thrown when a request is refused by the REDIRECT policy (the `maxRedirects` hop limit was exceeded) — a distinct event from {@link SsrfBlockedError } (a blocked host). |
|
|
758
|
+
| `renderToolList` | function | Render the agent's actual `CustomTool[]` — single source of truth, so an overridden/added/removed tool is reflected automatically. |
|
|
759
|
+
| `replaceUnique` | function | Return `content` with the single occurrence of `find` replaced by `replace`, using the two-stage context-tolerant matcher. |
|
|
760
|
+
| `RepoMapOptions` | interface | Repo-map / env-context builders for orienting an LLM coding agent (M3-3). |
|
|
761
|
+
| `resolveAndScreen` | function | Resolve `host` to ALL its addresses and screen each. |
|
|
762
|
+
| `ResolveAndScreenOptions` | interface | Options for {@link resolveAndScreen } . |
|
|
763
|
+
| `screenedFetch` | function | Fetch `url` with SSRF screening: screens the host (unless `allowPrivateHosts`), sets `redirect:"manual"`, and re-screens every redirect hop (rejecting a hop to a blocked host or a non-http(s) targe... |
|
|
764
|
+
| `ScreenedFetchOptions` | interface | Options for {@link screenedFetch } . |
|
|
765
|
+
| `SessionArtifactStore` | interface | A generic, id-keyed, atomic artifact store. |
|
|
766
|
+
| `SessionArtifactStoreOptions` | interface | Options for {@link createSessionArtifactStore } . |
|
|
767
|
+
| `SsrfBlockedError` | class | Thrown when a host/redirect resolves to a blocked (private/reserved) address. |
|
|
768
|
+
| `TodoItem` | interface | `todolist` — in-session task tracking for multi-step work. |
|
|
769
|
+
| `todoItemsToPlanNodes` | function | Convert structured todo items (from a `todolist` tool result's `items`, M4-5) into versioned `PlanNode`s for rendering. |
|
|
770
|
+
| `TodolistTool` | interface | The `todolist` tool object. |
|
|
771
|
+
| `ToolGuidanceMap` | type | Maps a tool error code to a short, LLM-actionable self-correction hint. |
|
|
772
|
+
| `truncateOutput` | function | Bound a block of tool output to `maxBytes`, spilling the full text to a file when it does not fit. |
|
|
773
|
+
| `TruncationMode` | type | How the middle is dropped when output exceeds the budget. |
|
|
774
|
+
| `TruncationOptions` | interface | Options for {@link truncateOutput } . |
|
|
775
|
+
| `TruncationResult` | interface | What {@link truncateOutput } returns. |
|
|
776
|
+
| `VitestSummary` | interface | The fields lifted from vitest's JSON report. |
|
|
777
|
+
| `WebSearchCallback` | type | The search provider {@link createWebSearchTool } calls. |
|
|
778
|
+
| `WebSearchResult` | interface | `web_search` — built-in tool for coding agents. |
|
|
779
|
+
| `withDefaultGuidance` | function | `withToolResultGuidance` pre-bound to {@link DEFAULT_TOOL_GUIDANCE } . |
|
|
780
|
+
| `withDescription` | function | Return a new `CustomTool` with `description` replaced. |
|
|
781
|
+
| `withName` | function | Return a new `CustomTool` exposed under a different `name`, sharing the SAME `inputSchema` + `handler` (alias parity). |
|
|
782
|
+
| `withShellExitGuidance` | function | Wrap `shell_exec` so a SOFT failure — `{ ok: true, exit_code != 0 }` (the TOOL ran, the COMMAND failed) — gains a `guidance` hint. |
|
|
783
|
+
| `withToolResultGuidance` | function | Wrap a `CustomTool` so its failed results gain a `guidance` hint from `guidance`. |
|
|
784
|
+
|
|
785
|
+
## `@theokit/sdk/a2a`
|
|
786
|
+
|
|
787
|
+
| Symbol | Kind | Summary |
|
|
788
|
+
|---|---|---|
|
|
789
|
+
| `A2AMessage` | interface | One message as a handler receives it. |
|
|
790
|
+
| `AgentMailbox` | class | One agent's endpoint on a {@link MessageBus } : registers `agentId` on construction and forwards inbound messages to the handler installed by `onMessage`. |
|
|
791
|
+
| `DelegationCompleteContext` | interface | Context passed to {@link SubAgentSpec.onDelegationComplete } after the child settles. |
|
|
792
|
+
| `DelegationCompleteDecision` | interface | Decision returned from {@link SubAgentSpec.onDelegationComplete } . |
|
|
793
|
+
| `DelegationStartContext` | interface | Context passed to {@link SubAgentSpec.onDelegationStart } before the child runs. |
|
|
794
|
+
| `DelegationStartDecision` | type | Decision returned from {@link SubAgentSpec.onDelegationStart } . |
|
|
795
|
+
| `MaxDelegationDepthError` | class | Raised by `SubAgent.create(spec, parentDepth)` when `parentDepth + 1` exceeds `spec.maxDelegationDepth` (default 3). |
|
|
796
|
+
| `MessageBus` | class | In-process router that delivers A2A messages between agents keyed by string id. |
|
|
797
|
+
| `MessageFilterArgs` | interface | Arguments passed to {@link SubAgentSpec.messageFilter } (SE12). |
|
|
798
|
+
| `MessageHandler` | type | What an agent does with an inbound {@link A2AMessage } . |
|
|
799
|
+
| `RequestOptions` | interface | Per-call knobs for {@link MessageBus.request } / `AgentMailbox.request`. |
|
|
800
|
+
| `SubAgent` | class | SE36 — `SubAgent.create` replaces `defineSubAgent` (ADR 0015). |
|
|
801
|
+
| `SubAgentSpec` | interface | The declaration of a delegating child agent, handed to `SubAgent.create(spec)`. |
|
|
802
|
+
| `ToolContextMessage` | interface | SE12 — a read-only, text-only projection of one turn of the run's conversation, exposed to a tool handler via `ctx.messages`. |
|
|
803
|
+
|
|
804
|
+
## `@theokit/sdk/auth`
|
|
805
|
+
|
|
806
|
+
| Symbol | Kind | Summary |
|
|
807
|
+
|---|---|---|
|
|
808
|
+
| `assertSecureModes` | function | The 0700-dir / 0600-file mode gates (ported verbatim). |
|
|
809
|
+
| `authFilePath` | function | The credential file path inside the (possibly overridden) store directory. |
|
|
810
|
+
| `CredentialError` | class | A credential problem the caller can act on. |
|
|
811
|
+
| `credentialHome` | function | The store directory, honoring an optional `homeEnvVar` override. |
|
|
812
|
+
| `CredentialStoreConfig` | interface | Where the credential store lives — the three path segments, plus an optional environment override. |
|
|
813
|
+
| `DeviceCodeGrant` | interface | The device authorization the user acts on. |
|
|
814
|
+
| `DeviceDeps` | interface | Injected effects for the device flow — deterministic in tests, real in production. |
|
|
815
|
+
| `deviceLogin` | function | The full device login: request a code, hand the user the verification URL + user code via `onPrompt` (never printed here — the caller renders it, keeping this module output-free), then poll to comp... |
|
|
816
|
+
| `DeviceOAuthConfig` | interface | A device-grant config: the OAuth config plus the RFC 8628 device authorization endpoint. |
|
|
817
|
+
| `ensureFreshCredential` | function | Return a credential guaranteed fresh enough to use. |
|
|
818
|
+
| `exchangeCode` | function | Exchange an authorization `code` (+ PKCE verifier) for the token pair. |
|
|
819
|
+
| `extractAccountId` | function | Best-effort account id from an id/access token's claims (OpenAI/ChatGPT shape). |
|
|
820
|
+
| `HttpDeps` | interface | Injected HTTP + clock effects — deterministic in tests, real in production. |
|
|
821
|
+
| `OAuthProviderConfig` | interface | A provider's OAuth endpoints + client identity. |
|
|
822
|
+
| `OAuthTokens` | interface | The token triple persisted to the store's oauth variant. |
|
|
823
|
+
| `OpenAIDeviceConfig` | interface | The OpenAI two-step device config: usercode + poll endpoints return an authorization_code (not tokens). |
|
|
824
|
+
| `openaiDeviceLogin` | function | Step 2+3 (OpenAI) — poll for the authorization code (200 = ready; 403/404 = pending; else fail), then exchange it for tokens at the standard `/oauth/token` endpoint (reuses `exchangeCode`). |
|
|
825
|
+
| `parseJwtClaims` | function | Decode a JWT's claim set (no signature verification — used only to read a self-reported account id). |
|
|
826
|
+
| `persistOAuthTokens` | function | Persist a token triple to the store's oauth variant through the hardened 0600 writer. |
|
|
827
|
+
| `pollDeviceToken` | function | Step 2 — poll the token endpoint until the user approves (or the code expires). |
|
|
828
|
+
| `providerFromApiKeyPrefix` | function | The provider whose key prefix matches, or `undefined` when none does. |
|
|
829
|
+
| `readAuthFile` | function | Read the credential file. |
|
|
830
|
+
| `readStoredOAuth` | function | Read the stored OAuth credential (with its refresh token), or `undefined` when the store is absent or holds an api credential. |
|
|
831
|
+
| `refreshOAuthTokens` | function | Swap a refresh token for a fresh access (and possibly rotated refresh) token. |
|
|
832
|
+
| `requestDeviceCode` | function | Step 1 — request a device code. |
|
|
833
|
+
| `requestOpenAIUsercode` | function | Step 1 (OpenAI) — request the user code. |
|
|
834
|
+
| `resolveCredential` | function | Resolve a fresh credential for `provider` from the store, or `undefined` if the store holds none for it. |
|
|
835
|
+
| `ResolveCredentialOptions` | interface | Input to `resolveCredential`: which provider, which store, and what to inject. |
|
|
836
|
+
| `ResolvedCredential` | interface | The flat bearer surface every consumer holds. |
|
|
837
|
+
| `StoredApiCredential` | interface | The API-key variant of the credential file, as it sits on disk. |
|
|
838
|
+
| `StoredCredential` | type | Whatever the credential file turned out to hold — the two variants are discriminated by `type`. |
|
|
839
|
+
| `StoredOAuthCredential` | interface | The OAuth variant of the credential file, as it sits on disk. |
|
|
840
|
+
| `writeCredential` | function | Persist a credential atomically at mode `0600`. |
|
|
841
|
+
|
|
842
|
+
## `@theokit/sdk/client`
|
|
843
|
+
|
|
844
|
+
| Symbol | Kind | Summary |
|
|
845
|
+
|---|---|---|
|
|
846
|
+
| `ClientOptions` | interface | Client SDK types (T20.2, ADR D454). |
|
|
847
|
+
| `SendResponse` | interface | Body of `POST <basePath>/send` as {@link TheoKitClient.send } resolves it. |
|
|
848
|
+
| `StreamEvent` | interface | One decoded SSE frame from {@link TheoKitClient.stream } : the JSON body of a `data:` line, with `type` promoted and every other key left open. |
|
|
849
|
+
| `TheoKitClient` | class | Browser-safe client for the legacy agent HTTP contract: `POST <basePath>/send` and `GET <basePath>/stream`. |
|
|
850
|
+
|
|
851
|
+
## `@theokit/sdk/compaction`
|
|
852
|
+
|
|
853
|
+
| Symbol | Kind | Summary |
|
|
854
|
+
|---|---|---|
|
|
855
|
+
| `ABSOLUTE_CONTEXT_WINDOW_CAP` | const | Absolute cap on a declared context window, applied when no catalog entry exists to compare against. |
|
|
856
|
+
| `buildCheckpoint` | function | Build a checkpoint marker turn (a `system` turn whose content starts with `marker`, default {@link CHECKPOINT_MARKER } ). |
|
|
857
|
+
| `CHECKPOINT_MARKER` | const | Sentinel prefix marking a conversation checkpoint turn. |
|
|
858
|
+
| `compactTranscript` | function | Compact a transcript. |
|
|
859
|
+
| `CompactTranscriptOptions` | interface | Options for {@link compactTranscript } . |
|
|
860
|
+
| `CompressibleMessage` | interface | Minimal message shape for compaction/compression input. |
|
|
861
|
+
| `CONTEXT_WINDOW_FLOOR` | const | M77 — the floor used ONLY when neither the catalog nor the caller knows the window. |
|
|
862
|
+
| `CONTEXT_WINDOW_MARGIN` | const | M77 — default safety margin on the context window. |
|
|
863
|
+
| `ContextWindowMarginError` | class | M77 — the margin is outside `(0, 1]`. |
|
|
864
|
+
| `ContextWindowSource` | type | Where the effective window came from — carried into the M77 structured event. |
|
|
865
|
+
| `EffectiveContextWindow` | interface | Result of {@link resolveEffectiveContextWindow } . |
|
|
866
|
+
| `EffectiveContextWindowInput` | interface | Input to {@link resolveEffectiveContextWindow } . |
|
|
867
|
+
| `estimateTokens` | function | Tokenizer-free token estimate via the conventional ~4-chars-per-token heuristic: `ceil(text.length / 4)`. |
|
|
868
|
+
| `FilterCheckpointOptions` | interface | Options for {@link filterFromLatestCheckpoint } . |
|
|
869
|
+
| `filterFromLatestCheckpoint` | function | Return the turns relative to the most recent checkpoint marker (all turns if none). |
|
|
870
|
+
| `isContextOverflowError` | function | True iff `err` is a {@link TheokitAgentError } (or subclass) reporting a context-window-exceeded condition (the typed `context_too_long` code). |
|
|
871
|
+
| `resolveEffectiveContextWindow` | function | Resolve the window to budget against — the fail-SAFE replacement for reading the catalog directly. |
|
|
872
|
+
| `shouldCompact` | function | Decide BEFORE sending whether to compact: `true` when the `estimated` token count leaves less than `buffer` headroom in the `contextWindow` (`estimated >= contextWindow - buffer`). |
|
|
873
|
+
| `ShouldCompactInput` | interface | Input to {@link shouldCompact } : an estimate, the model's window, and reserved headroom. |
|
|
874
|
+
| `SUMMARY_TEMPLATE` | const | The 7-section summary template handed to the `summarize` callback (theocode parity shape). |
|
|
875
|
+
|
|
876
|
+
## `@theokit/sdk/concurrency`
|
|
877
|
+
|
|
878
|
+
| Symbol | Kind | Summary |
|
|
879
|
+
|---|---|---|
|
|
880
|
+
| `AsyncSemaphore` | interface | Async-aware counting semaphore (ADR D135). |
|
|
881
|
+
| `mapWithConcurrency` | function | Map `fn` over `items` with bounded concurrency, preserving order. |
|
|
882
|
+
| `Semaphore` | class | SE36 — `Semaphore.create` replaces `createSemaphore` (ADR 0015). |
|
|
883
|
+
|
|
884
|
+
## `@theokit/sdk/context`
|
|
885
|
+
|
|
886
|
+
| Symbol | Kind | Summary |
|
|
887
|
+
|---|---|---|
|
|
888
|
+
| `DEFAULT_DISCOVERY_SPECS` | const | The context files theokit looks for out of the box, in the order they are concatenated. |
|
|
889
|
+
| `DiscoveryParser` | type | Parser to apply once file is read. |
|
|
890
|
+
| `DiscoveryRunnerOptions` | interface | Input to the context-discovery run: where to walk, how much of each file to keep, and which trust boundary an `@import` may not cross. |
|
|
891
|
+
| `DiscoveryScope` | type | Single filename ("AGENTS.md") or relative glob (".cursor/rules/*.mdc"). |
|
|
892
|
+
| `DiscoverySpec` | interface | One kind of context file the runner knows how to find and read. |
|
|
893
|
+
| `parseRules` | function | Split a `.theokit/rules/*.md` document into its frontmatter and its body. |
|
|
894
|
+
| `resolveContextImports` | function | Expand `@path` import directives in `content`, confined to `options.projectRoot`. |
|
|
895
|
+
| `ResolveContextImportsOptions` | interface | Options for {@link resolveContextImports } . |
|
|
896
|
+
| `runDiscovery` | function | Find, read and parse every context file the specs describe, and return them ready for the aggregator. |
|
|
897
|
+
| `shouldActivateRule` | function | Decide whether a parsed rule applies to this turn, given the files in scope. |
|
|
898
|
+
|
|
899
|
+
## `@theokit/sdk/cron`
|
|
900
|
+
|
|
901
|
+
| Symbol | Kind | Summary |
|
|
902
|
+
|---|---|---|
|
|
903
|
+
| `Cron` | class | Static façade for scheduling Theo agent runs on a cron expression. |
|
|
904
|
+
|
|
905
|
+
## `@theokit/sdk/errors`
|
|
906
|
+
|
|
907
|
+
| Symbol | Kind | Summary |
|
|
908
|
+
|---|---|---|
|
|
909
|
+
| `AgentDisposedError` | class | T1.6 — Thrown when a consumer calls `agent.send()` or any method on an agent that has already been `dispose()`d. |
|
|
910
|
+
| `AgentRunError` | class | Thrown by `Agent.prompt` (and helpers that go through `run.wait()`) when the option `{ throwOnError: true }` is set and the run terminates with `status: 'error'`. |
|
|
911
|
+
| `AgentRunErrorCode` | type | Back-compat alias of {@link KnownAgentRunErrorCode } . |
|
|
912
|
+
| `AuthenticationError` | class | Invalid API key, not logged in, insufficient permissions. |
|
|
913
|
+
| `BudgetExceededError` | class | Thrown by `Budget` enforcement (ADR D386) when a `mode: "block"` budget would be exceeded by the upcoming LLM call. |
|
|
914
|
+
| `coerceToKnownAgentRunErrorCode` | function | T1.1 boundary helper — coerce an arbitrary string (typically arriving from a downstream `RunErrorDetail.code` or a deserialized cloud response) into a `KnownAgentRunErrorCode`. |
|
|
915
|
+
| `ConfigurationError` | class | Invalid model, bad request parameters, malformed options. |
|
|
916
|
+
| `CredentialPoolExhaustedError` | class | Thrown when every credential in a per-provider pool is in cooldown and no healthy key is available (ADR D133). |
|
|
917
|
+
| `ErrorCode` | type | Finite, machine-readable error codes for provider-originated errors (ADR D66). |
|
|
918
|
+
| `ErrorMetadata` | interface | Structured context for errors that originated from a provider HTTP call (ADR D65). |
|
|
919
|
+
| `IntegrationNotConnectedError` | class | Thrown when creating a cloud agent for a repo whose SCM provider is not connected. |
|
|
920
|
+
| `InvalidTaskIdError` | class | Thrown when a user-supplied task ID violates the grammar `^[a-z0-9][a-z0-9_-]*$` (D368) OR starts with a reserved adapter prefix (`wf-` / `b-` / `cron-`, EC-5). |
|
|
921
|
+
| `isTransientError` | function | Is this error transient (worth retrying)? |
|
|
922
|
+
| `KnownAgentRunErrorCode` | type | T1.1 — closed literal union for `AgentRunError.code`. |
|
|
923
|
+
| `MemoryAdapterError` | class | Error raised by `@theokit-memory-*` adapters. |
|
|
924
|
+
| `MemoryAdapterErrorCode` | type | Finite error codes specific to memory adapter operations (ADR D141). |
|
|
925
|
+
| `NetworkError` | class | Service unavailable, timeout, transport-level failure. |
|
|
926
|
+
| `RateLimitError` | class | Too many requests or usage limits exceeded. |
|
|
927
|
+
| `TaskNotFoundError` | class | Thrown when `Task.subscribe(id)` is called for a task that has been evicted, never submitted, or evicted after retention (D373). |
|
|
928
|
+
| `TheokitAgentError` | class | Base class for all errors thrown by `@theokit/sdk`. |
|
|
929
|
+
| `UnknownAgentError` | class | Catch-all for unclassified server or runtime errors. |
|
|
930
|
+
| `UnsupportedBudgetOperationError` | class | Thrown when a budget operation is requested on a `CloudAgent` (D388). |
|
|
931
|
+
| `UnsupportedRunOperationError` | class | Thrown when a {@link Run } or agent operation is not available on the current runtime. |
|
|
932
|
+
| `UnsupportedTaskOperationError` | class | Thrown when `CloudAgent` is asked to wrap a task (D370). |
|
|
933
|
+
|
|
934
|
+
## `@theokit/sdk/eval`
|
|
935
|
+
|
|
936
|
+
| Symbol | Kind | Summary |
|
|
937
|
+
|---|---|---|
|
|
938
|
+
| `assertEval` | function | Assert a run meets every set threshold. |
|
|
939
|
+
| `captureArtifact` | function | Capture the working-tree diff of `repoDir` and check it reverse-applies. |
|
|
940
|
+
| `Dataset` | type | `Dataset` is either an array OR a factory returning a (sync or async) iterable (D210). |
|
|
941
|
+
| `DatasetEntry` | interface | A single dataset row — input prompt + optional reference + free-form metadata. |
|
|
942
|
+
| `Eval` | class | One eval definition — a dataset, at least one scorer, and the agent under test. |
|
|
943
|
+
| `EvalAgentOptions` | type | Inferred `Agent.create` options shape — avoid cycling through `AgentOptions` directly. |
|
|
944
|
+
| `EvalAggregate` | interface | Aggregate stats — the production-decision dashboard data (D211). |
|
|
945
|
+
| `EvalAlreadyRunningError` | class | D213 — single-flight guard for `Eval.run`. |
|
|
946
|
+
| `EvalHooks` | interface | Lifecycle hooks. |
|
|
947
|
+
| `EvalOptions` | interface | Public options for `Eval.create`. |
|
|
948
|
+
| `EvalPersistOptions` | interface | Crash-durable persistence for `eval.run(...)` (M6-1). |
|
|
949
|
+
| `EvalRowResult` | interface | Per-row outcome. |
|
|
950
|
+
| `EvalRun` | interface | Final run result — plain serializable JSON (D209). |
|
|
951
|
+
| `EvalRunOptions` | interface | Per-call options for `eval.run(...)`. |
|
|
952
|
+
| `EvalThresholdError` | class | Thrown by {@link assertEval } when a run misses one or more thresholds. |
|
|
953
|
+
| `EvalThresholdFailure` | interface | One unmet threshold, surfaced on `EvalThresholdError.failures`. |
|
|
954
|
+
| `EvalThresholds` | interface | Threshold contract for `assertEval(run, thresholds)` (SE41) — the CI gate. |
|
|
955
|
+
| `JsonlParseError` | class | Raised when a JSONL line is not valid JSON or is not a JSON object. |
|
|
956
|
+
| `loadJsonl` | function | Parse a JSONL file into rows. |
|
|
957
|
+
| `NamedScorer` | interface | A named scorer — produced by every `Scorers.*` factory. |
|
|
958
|
+
| `PerScorerStats` | interface | Per-scorer breakdown computed across all rows. |
|
|
959
|
+
| `Score` | interface | Outcome of a single scoring decision. |
|
|
960
|
+
| `Scorer` | type | Scorer signature (D207). |
|
|
961
|
+
| `Scorers` | const | The built-in scorer factories for {@link Eval } . |
|
|
962
|
+
| `VerifyGateOptions` | interface | Options for `Scorers.verifyGate` (M6-2) — grade a patch by running the project's tests in a provisioned repo and reading the exit code. |
|
|
963
|
+
|
|
964
|
+
## `@theokit/sdk/filesystem`
|
|
965
|
+
|
|
966
|
+
| Symbol | Kind | Summary |
|
|
967
|
+
|---|---|---|
|
|
968
|
+
| `FileNotFoundError` | class | A read/stat targeted a path that does not exist. |
|
|
969
|
+
| `FileStat` | interface | Structured file metadata. |
|
|
970
|
+
| `FilesystemBackend` | class | Pluggable filesystem backend. |
|
|
971
|
+
| `FilesystemConfig` | interface | Construction options shared by every {@link FilesystemBackend } . |
|
|
972
|
+
| `FilesystemError` | class | A filesystem I/O operation failed for a reason other than not-found / read-only / stale / security (e.g. |
|
|
973
|
+
| `FilesystemProvider` | type | A backend OR a per-request resolver of one. |
|
|
974
|
+
| `FilesystemReadOnlyError` | class | A write was attempted on a read-only backend. |
|
|
975
|
+
| `FilesystemSecurityError` | class | A path escaped the backend's `basePath` (traversal or symlink). |
|
|
976
|
+
| `LocalFilesystem` | class | {@link FilesystemBackend } over the real filesystem (`node:fs/promises`), with every path resolved inside `basePath` and escapes rejected. |
|
|
977
|
+
| `resolveFilesystem` | function | Resolve a {@link FilesystemProvider } to a concrete backend for `ctx`. |
|
|
978
|
+
| `StaleFileError` | class | SE32 — a write's `expectedMtime` did not match the file's current mtime: the file changed since it was last read, so the write would silently clobber. |
|
|
979
|
+
| `WriteFileOptions` | interface | Options a write may carry. |
|
|
980
|
+
|
|
981
|
+
## `@theokit/sdk/interactive`
|
|
982
|
+
|
|
983
|
+
| Symbol | Kind | Summary |
|
|
984
|
+
|---|---|---|
|
|
985
|
+
| `InteractiveBackend` | class | Pluggable interactive-session backend. |
|
|
986
|
+
| `InteractiveProvider` | type | A backend OR a per-request resolver of one — mirrors {@link FilesystemProvider } . |
|
|
987
|
+
| `InteractiveUnavailableError` | class | Thrown when the interactive path is requested but no backend can provide it (no provider injected, or a local backend whose native module / spawn failed). |
|
|
988
|
+
| `NoSuchSessionError` | class | Thrown (typed) when a write/kill targets an unknown or already-exited session, so callers branch on the type instead of string-matching a message. |
|
|
989
|
+
| `resolveInteractive` | function | Resolve an {@link InteractiveProvider } to a concrete backend for `ctx`. |
|
|
990
|
+
| `StartInteractiveOptions` | interface | Bounds a start call. |
|
|
991
|
+
| `StartInteractiveResult` | interface | Result of starting a session: its id + whatever the program printed on startup. |
|
|
992
|
+
| `WriteStdinOptions` | interface | Bounds a write call. |
|
|
993
|
+
| `WriteStdinResult` | interface | Result of writing to a session: the output produced during the yield window + liveness. |
|
|
994
|
+
|
|
995
|
+
## `@theokit/sdk/internal/memory-adapters`
|
|
996
|
+
|
|
997
|
+
| Symbol | Kind | Summary |
|
|
998
|
+
|---|---|---|
|
|
999
|
+
| `createOpenAiCompatibleRuntime` | function | Build an {@link EmbeddingRuntime } for a provider that speaks the OpenAI embedding wire — or, through `cfg.dialect`, one that deviates from it in a known way. |
|
|
1000
|
+
| `EmbeddingDialect` | interface | theokit#159 — the three points where a provider may deviate from the OpenAI embedding wire. |
|
|
1001
|
+
| `globalEmbeddingCache` | const | T4.4 — Process-wide singleton embedding cache (DR4 finding #4). |
|
|
1002
|
+
| `LruEmbeddingCache` | class | Bounded in-memory LRU cache for embeddings, keyed by `sha256(text)` (or any stable key the caller chooses). |
|
|
1003
|
+
| `OpenAiCompatibleConfig` | interface | What one provider adapter tells {@link createOpenAiCompatibleRuntime } about its wire: where to POST, which environment variables carry the key and the base URL, which model to use by default, and ... |
|
|
1004
|
+
|
|
1005
|
+
## `@theokit/sdk/internal/persistence`
|
|
1006
|
+
|
|
1007
|
+
| Symbol | Kind | Summary |
|
|
1008
|
+
|---|---|---|
|
|
1009
|
+
| `appendJsonl` | function | Append one record as a whole `\n`-terminated JSON line. |
|
|
1010
|
+
| `applyWalWithFallback` | function | Apply WAL mode with DELETE fallback. |
|
|
1011
|
+
| `atomicWriteJson` | function | Typed JSON atomic write helper. |
|
|
1012
|
+
| `AtomicWriteJsonOptions` | interface | Options for `atomicWriteJson`. |
|
|
1013
|
+
| `atomicWriteText` | function | Atomic text write. |
|
|
1014
|
+
| `casUpdate` | function | Run an UPDATE and report whether it changed exactly the number of rows you expected — the optimistic-concurrency equivalent of taking a lock. |
|
|
1015
|
+
| `containsCjk` | function | Report whether `text` holds at least one Chinese, Japanese or Korean character. |
|
|
1016
|
+
| `createExclusive` | function | Create `path` holding `data`, but only if it does not exist yet. |
|
|
1017
|
+
| `CreateExclusiveOptions` | interface | O_EXCL exclusive file creation (ADR D82). |
|
|
1018
|
+
| `displayTheokitHome` | function | The same path `getTheokitHome(cwd)` returns, shortened for display: the home directory prefix collapses to `~`, so `/home/ada/.theokit` prints as `~/.theokit`. |
|
|
1019
|
+
| `FileLockOptions` | interface | Retry and staleness tuning for `withFileLock`. |
|
|
1020
|
+
| `getProfilesRoot` | function | The directory holding every profile: always `~/.theokit/profiles`, from `os.homedir()`. |
|
|
1021
|
+
| `getTheokitHome` | function | Resolve the directory cwd-anchored SDK state lives in. |
|
|
1022
|
+
| `isCorruptionError` | function | True when an open error indicates an unreadable / corrupt database file. |
|
|
1023
|
+
| `JsonlParseError` | class | Raised when a JSONL line is not valid JSON or is not a JSON object. |
|
|
1024
|
+
| `loadJsonl` | function | Parse a JSONL file into rows. |
|
|
1025
|
+
| `migrateSchema` | function | Bring a SQLite database's `user_version` up to `currentVersion` by running the steps that sit between the two. |
|
|
1026
|
+
| `MigrateSchemaOptions` | interface | Arguments to `migrateSchema`. |
|
|
1027
|
+
| `MigrateSchemaResult` | interface | What `migrateSchema` did. |
|
|
1028
|
+
| `Migration` | interface | One forward migration step. |
|
|
1029
|
+
| `openSqliteResilient` | function | Open a SQLite file with WAL (+ DELETE fallback) and corruption recovery. |
|
|
1030
|
+
| `OpenSqliteResilientOptions` | interface | Input to {@link openSqliteResilient } . |
|
|
1031
|
+
| `PersistenceSchema` | const | `persistence?` opt-in JSON disk backend with `dir` required when chosen. |
|
|
1032
|
+
| `readJsonlIds` | function | Read the set of keys from an existing JSONL file for which `keyFn(parsed)` returns a non-empty string. |
|
|
1033
|
+
| `readVersionedJson` | function | Read a versioned JSON file, migrating or falling back rather than failing. |
|
|
1034
|
+
| `ReadVersionedJsonOptions` | interface | Arguments to `readVersionedJson`. |
|
|
1035
|
+
| `replaceFileAtomic` | function | Atomic file replacement: write content to a per-call unique tmp path, fsync, then rename over the target. |
|
|
1036
|
+
| `ResilientSqliteDb` | interface | Minimal SQLite handle surface every driver (`better-sqlite3`) exposes. |
|
|
1037
|
+
| `sanitizeFts5Query` | function | Six-step FTS5 query sanitizer. |
|
|
1038
|
+
| `SqliteLike` | interface | The three `better-sqlite3` methods this module actually uses, declared structurally so nothing here imports the driver. |
|
|
1039
|
+
| `VersionedJsonFile` | interface | The on-disk envelope: the payload under `data`, its schema version alongside it. |
|
|
1040
|
+
| `VersionedJsonMigrate` | type | Upgrade callback for `readVersionedJson`, invoked only when the stored version is BELOW the current one. |
|
|
1041
|
+
| `WalApplyResult` | interface | What journal mode a connection ended up in after `applyWalWithFallback`. |
|
|
1042
|
+
| `withCwdMutex` | function | Run `fn` after every earlier `withCwdMutex` call for the same `key` has settled, and return what `fn` returns. |
|
|
1043
|
+
| `withFileLock` | function | Run `fn` while holding an OS-level cross-process lock on `path`. |
|
|
1044
|
+
| `writeVersionedJson` | function | Write `data` wrapped in the version envelope, replacing the file atomically. |
|
|
1045
|
+
|
|
1046
|
+
## `@theokit/sdk/internal/security`
|
|
1047
|
+
|
|
1048
|
+
| Symbol | Kind | Summary |
|
|
1049
|
+
|---|---|---|
|
|
1050
|
+
| `addPattern` | function | Register an extra pattern for `redactSecrets` to mask, on top of the built-in vendor set. |
|
|
1051
|
+
| `assertNoSymlinkEscape` | function | Assert that `path` — including every directory component in the chain — stays under `base` after symlink resolution. |
|
|
1052
|
+
| `ForbiddenPathError` | class | Thrown when an agent tool is asked to read or write a sensitive path that the blocklist forbids (`.env`, `.git/`, `node_modules/`, `.theo/`, lock files). |
|
|
1053
|
+
| `isForbiddenPath` | function | Decide whether a project-relative path points to a known-sensitive file that a coding agent must not read or write. |
|
|
1054
|
+
| `maskToken` | function | Mask one string, keeping enough of it to be recognizable in a log. |
|
|
1055
|
+
| `PathTraversalError` | class | Thrown when a path operation would escape its allowed base directory. |
|
|
1056
|
+
| `redactSecrets` | function | Redact known credential patterns from `text`. |
|
|
1057
|
+
| `safePathJoin` | function | Join `base` with `...parts` and ensure the resolved absolute path stays under `base`. |
|
|
1058
|
+
| `sanitizeIdentifier` | function | Validate that `input` is a safe path component (skill name, agent ID, namespace, etc.) and return its lowercase form. |
|
|
1059
|
+
| `validateArtifactPath` | function | T1.4 — validate a relative artifact path string BEFORE it is used to look up a fixture or to fetch from PaaS. |
|
|
1060
|
+
|
|
1061
|
+
## `@theokit/sdk/mcp-auth`
|
|
1062
|
+
|
|
1063
|
+
| Symbol | Kind | Summary |
|
|
1064
|
+
|---|---|---|
|
|
1065
|
+
| `getTokens` | function | Retrieve tokens for `serverName`. |
|
|
1066
|
+
| `lockedRefresh` | function | Serialize concurrent refresh attempts per server (EC-9). |
|
|
1067
|
+
| `OAuthTokens` | interface | The OAuth tokens held for one MCP server. |
|
|
1068
|
+
| `refreshAccessToken` | function | Refresh an access token using `refresh_token`. |
|
|
1069
|
+
| `runPkceFlow` | function | Run the full PKCE flow. |
|
|
1070
|
+
| `setTokens` | function | Persist tokens for `serverName`. |
|
|
1071
|
+
|
|
1072
|
+
## `@theokit/sdk/messages`
|
|
1073
|
+
|
|
1074
|
+
| Symbol | Kind | Summary |
|
|
1075
|
+
|---|---|---|
|
|
1076
|
+
| `assistantText` | function | Concatenate the text of an assistant message's `TextBlock`s. |
|
|
1077
|
+
| `costAmountUsd` | function | Read the cost amount from a `CostBreakdown`, preserving the honesty contract (repo ADR `D377-cost-status-closed-enum.md`): `amountUsd` is `number \| undefined` where `undefined` means "cost unknown"... |
|
|
1078
|
+
| `extractToolUses` | function | Extract the `ToolUseBlock`s from an assistant message's content. |
|
|
1079
|
+
|
|
1080
|
+
## `@theokit/sdk/models`
|
|
1081
|
+
|
|
1082
|
+
| Symbol | Kind | Summary |
|
|
1083
|
+
|---|---|---|
|
|
1084
|
+
| `CatalogModel` | type | One model entry as it is stored in the vendored catalog and as models.dev publishes it. |
|
|
1085
|
+
| `CatalogModelCost` | type | Per-token pricing for one model, in USD per 1M tokens (models.dev's unit — not per token, and not per 1K). |
|
|
1086
|
+
| `getModelInfo` | function | The enriched per-model view (public via `@theokit/sdk/models`): index lookup by (possibly prefixed) id. |
|
|
1087
|
+
| `humanizeModelName` | function | Turn a model id into a best-effort human label: strip the routing/vendor prefix to the core model segment, split on `-`/`_`/`.`/whitespace, title-case each token (known acronyms upper-cased), and a... |
|
|
1088
|
+
| `Modality` | type | One input or output medium a model accepts or produces. |
|
|
1089
|
+
| `ModelCapabilities` | interface | Per-model capability shape. |
|
|
1090
|
+
| `ModelOption` | interface | A UI-friendly model option — the shape a `<select>`/dropdown consumes. |
|
|
1091
|
+
| `ParsedModelId` | interface | Model identifier parsing (T1.2 follow-up, ADR D182 zero-config UX). |
|
|
1092
|
+
| `parseModelId` | function | Split a model string into `{ provider, name }` at the FIRST `/`. |
|
|
1093
|
+
| `refreshModelCatalog` | function | Explicitly refresh the model catalog from models.dev (the ONLY network trigger in the subsystem). |
|
|
1094
|
+
| `RefreshModelCatalogOptions` | interface | Arguments to `refreshModelCatalog`, the SDK's only network trigger for model metadata. |
|
|
1095
|
+
| `RefreshModelCatalogResult` | interface | What `refreshModelCatalog` did. |
|
|
1096
|
+
| `resolveModelCapabilities` | function | Resolve per-model capability flags (vision/structured-output/tool-use/cache + `maxContextTokens`/`maxOutputTokens`) for a model id. |
|
|
1097
|
+
| `toModelOption` | function | Build a {@link ModelOption } (`{ value, label, provider }`) for a model id — a dropdown-ready entry composing {@link humanizeModelName } + `parseModelId`. |
|
|
1098
|
+
|
|
1099
|
+
## `@theokit/sdk/path-safety`
|
|
1100
|
+
|
|
1101
|
+
| Symbol | Kind | Summary |
|
|
1102
|
+
|---|---|---|
|
|
1103
|
+
| `assertNoSymlinkEscape` | function | Assert that `path` — including every directory component in the chain — stays under `base` after symlink resolution. |
|
|
1104
|
+
| `ForbiddenPathError` | class | Thrown when an agent tool is asked to read or write a sensitive path that the blocklist forbids (`.env`, `.git/`, `node_modules/`, `.theo/`, lock files). |
|
|
1105
|
+
| `isForbiddenPath` | function | Decide whether a project-relative path points to a known-sensitive file that a coding agent must not read or write. |
|
|
1106
|
+
| `PathTraversalError` | class | Thrown when a path operation would escape its allowed base directory. |
|
|
1107
|
+
| `safeFilenameForId` | function | Convert ANY opaque id (agent id, run id, conversation id, namespace, email, arbitrary string) into a deterministic, filesystem-safe filename component. |
|
|
1108
|
+
| `safePathJoin` | function | Join `base` with `...parts` and ensure the resolved absolute path stays under `base`. |
|
|
1109
|
+
| `sanitizeIdentifier` | function | Validate that `input` is a safe path component (skill name, agent ID, namespace, etc.) and return its lowercase form. |
|
|
1110
|
+
|
|
1111
|
+
## `@theokit/sdk/persistence`
|
|
1112
|
+
|
|
1113
|
+
| Symbol | Kind | Summary |
|
|
1114
|
+
|---|---|---|
|
|
1115
|
+
| `acquireSessionWriter` | function | Take the exclusive writer lease for `sessionPath`, or reject with {@link SessionBusyError } . |
|
|
1116
|
+
| `appendJsonl` | function | Append one record as a whole `\n`-terminated JSON line. |
|
|
1117
|
+
| `applyWalWithFallback` | function | Apply WAL mode with DELETE fallback. |
|
|
1118
|
+
| `atomicWriteJson` | function | Typed JSON atomic write helper. |
|
|
1119
|
+
| `AtomicWriteJsonOptions` | interface | Options for `atomicWriteJson`. |
|
|
1120
|
+
| `atomicWriteTempTarget` | function | U-9 — the file a leftover temp was replacing, or `undefined` if this is not one of ours. |
|
|
1121
|
+
| `atomicWriteText` | function | Atomic text write. |
|
|
1122
|
+
| `classifySessionArtifact` | function | U-1 — what is this entry, if it is one of ours? |
|
|
1123
|
+
| `encodeProjectDir` | function | Claude Code path convention: cwd with every non-alphanumeric replaced by `-`. |
|
|
1124
|
+
| `FileLockOptions` | interface | Retry and staleness tuning for `withFileLock`. |
|
|
1125
|
+
| `forkTranscript` | function | Copy `src` into `dst`, keeping the first `beforeRecordIndex` records. |
|
|
1126
|
+
| `ForkTranscriptOptions` | interface | Options for {@link forkTranscript } . |
|
|
1127
|
+
| `isCorruptionError` | function | True when an open error indicates an unreadable / corrupt database file. |
|
|
1128
|
+
| `JsonlParseError` | class | Raised when a JSONL line is not valid JSON or is not a JSON object. |
|
|
1129
|
+
| `LiveSessionError` | class | M81 — the target is a protected session (live pointer / most-recent transcript / active entry). |
|
|
1130
|
+
| `loadJsonl` | function | Parse a JSONL file into rows. |
|
|
1131
|
+
| `openSqliteResilient` | function | Open a SQLite file with WAL (+ DELETE fallback) and corruption recovery. |
|
|
1132
|
+
| `OpenSqliteResilientOptions` | interface | Input to {@link openSqliteResilient } . |
|
|
1133
|
+
| `PersistenceSchema` | const | `persistence?` opt-in JSON disk backend with `dir` required when chosen. |
|
|
1134
|
+
| `readJsonlIds` | function | Read the set of keys from an existing JSONL file for which `keyFn(parsed)` returns a non-empty string. |
|
|
1135
|
+
| `readJsonlTail` | function | Read the LAST records of a JSONL file without loading the whole thing. |
|
|
1136
|
+
| `ReadJsonlTailOptions` | interface | Options for {@link readJsonlTail } . |
|
|
1137
|
+
| `replaceFileAtomic` | function | Atomic file replacement: write content to a per-call unique tmp path, fsync, then rename over the target. |
|
|
1138
|
+
| `ResilientSqliteDb` | interface | Minimal SQLite handle surface every driver (`better-sqlite3`) exposes. |
|
|
1139
|
+
| `sanitizeFts5Query` | function | Six-step FTS5 query sanitizer. |
|
|
1140
|
+
| `SessionArtifact` | type | The kinds of file this SDK leaves in a project's transcript directory. |
|
|
1141
|
+
| `SessionBusyError` | class | M81 — another process already holds the writer lease for this session. |
|
|
1142
|
+
| `sessionHasWriter` | function | Does the session have a writer **right now**? |
|
|
1143
|
+
| `SessionWriterLease` | interface | A held writer lease. |
|
|
1144
|
+
| `TranscriptBlock` | type | A content block inside {@link TranscriptMessage } . |
|
|
1145
|
+
| `TranscriptMessage` | interface | The message body of a {@link SessionRecord } . |
|
|
1146
|
+
| `transcriptPath` | function | The `.jsonl` path for a session: `<baseDir>/projects/<encoded-cwd>/<safe-sessionId>.jsonl`. |
|
|
1147
|
+
| `transcriptRoot` | function | Root of the transcript state. |
|
|
1148
|
+
| `WalApplyResult` | interface | What journal mode a connection ended up in after `applyWalWithFallback`. |
|
|
1149
|
+
| `withCwdMutex` | function | Run `fn` after every earlier `withCwdMutex` call for the same `key` has settled, and return what `fn` returns. |
|
|
1150
|
+
| `withFileLock` | function | Run `fn` while holding an OS-level cross-process lock on `path`. |
|
|
1151
|
+
|
|
1152
|
+
## `@theokit/sdk/project`
|
|
1153
|
+
|
|
1154
|
+
| Symbol | Kind | Summary |
|
|
1155
|
+
|---|---|---|
|
|
1156
|
+
| `ProjectInstructionFile` | interface | One discovered project-instruction file. |
|
|
1157
|
+
| `ProjectInstructions` | interface | Result of {@link readProjectInstructions } . |
|
|
1158
|
+
| `ProjectInstructionScope` | type | How discovered instruction files are reduced to a single `content` string. |
|
|
1159
|
+
| `readProjectInstructions` | function | Read hierarchical project instructions by walking up from `cwd`. |
|
|
1160
|
+
| `ReadProjectInstructionsOptions` | interface | Options for {@link readProjectInstructions } . |
|
|
1161
|
+
| `writeProjectInstructions` | function | Write project instructions to `<cwd>/<filename>` atomically (temp + fsync + rename, via the shipped `replaceFileAtomic`). |
|
|
1162
|
+
| `WriteProjectInstructionsOptions` | interface | Options for {@link writeProjectInstructions } . |
|
|
1163
|
+
|
|
1164
|
+
## `@theokit/sdk/providers`
|
|
1165
|
+
|
|
1166
|
+
| Symbol | Kind | Summary |
|
|
1167
|
+
|---|---|---|
|
|
1168
|
+
| `getProviderProfile` | function | One provider by name or alias (`lm-studio` resolves to `lmstudio`), or `undefined` when nothing has registered it. |
|
|
1169
|
+
| `listProviders` | function | Every registered provider — builtins, the JSON catalog, and anything a plugin registered. |
|
|
1170
|
+
|
|
1171
|
+
## `@theokit/sdk/retry`
|
|
1172
|
+
|
|
1173
|
+
| Symbol | Kind | Summary |
|
|
1174
|
+
|---|---|---|
|
|
1175
|
+
| `Retry` | class | SE36 — `Retry.create` replaces `withRetry` (ADR 0015 / ADR-P2). |
|
|
1176
|
+
| `RetryOptions` | interface | Options for {@link withRetry } . |
|
|
1177
|
+
|
|
1178
|
+
## `@theokit/sdk/sandbox`
|
|
1179
|
+
|
|
1180
|
+
| Symbol | Kind | Summary |
|
|
1181
|
+
|---|---|---|
|
|
1182
|
+
| `allowlistedEnv` | function | Build the environment a confined command runs with after `--clearenv`: `PATH`, `HOME`, `LANG`, `LC_ALL`, `LC_CTYPE`, `TERM`, `USER`, `TMPDIR` and `SHELL`, copied from `source` (default `process.env... |
|
|
1183
|
+
| `buildBwrapArgv` | function | Pure argv builder. |
|
|
1184
|
+
| `buildSeccompFilter` | function | Build the cBPF seccomp program as a `Buffer` (each `sock_filter` = 8 bytes). |
|
|
1185
|
+
| `BwrapArgvOptions` | interface | Everything {@link buildBwrapArgv } needs besides the {@link SandboxMode } . |
|
|
1186
|
+
| `BwrapDetection` | type | Result of {@link detectBwrap } / {@link detectBwrapMemoized } , discriminated on `ok`: `{ ok: true, bin }` carries the absolute path of the validated `bwrap`, `{ ok: false, reason }` a human-readab... |
|
|
1187
|
+
| `BwrapProbes` | interface | Injectable probes — each mirrors one Codex availability check. |
|
|
1188
|
+
| `createSandboxBackend` | function | Honest factory: bwrap available + mode wants confinement → `LinuxSandbox` (kernel enforcement, running the VALIDATED absolute bin); `danger-full-access` → plain `LocalSandbox` silently (explicit op... |
|
|
1189
|
+
| `CreateSandboxBackendOptions` | interface | Options for `createSandboxBackend`, which probes for bubblewrap and returns a {@link LinuxSandbox } when confinement is genuinely available or a `LocalSandbox` when it is not — warning once when th... |
|
|
1190
|
+
| `detectBwrap` | function | Honest detection — fail-closed on every probe; NEVER throws (callers WARN + fall back). |
|
|
1191
|
+
| `detectBwrapMemoized` | function | `detectBwrap` with memoization — what production should call. |
|
|
1192
|
+
| `ExecuteResult` | interface | What a {@link SandboxBackend } returns for one command. |
|
|
1193
|
+
| `interactiveWrapCommand` | function | The composition the interactive path needs — the counterpart of `createSandboxBackend`. |
|
|
1194
|
+
| `InteractiveWrapOptions` | interface | Options for `interactiveWrapCommand`, the PTY counterpart of `createSandboxBackend`. |
|
|
1195
|
+
| `LinuxSandbox` | class | Kernel-confined backend for Linux hosts: a `LocalSandbox` whose commands are rewritten as `bwrap <policy flags> -- /bin/sh -c '<command>'` before they are spawned. |
|
|
1196
|
+
| `LocalSandbox` | class | Runs a command with `/bin/sh -c` on the host. |
|
|
1197
|
+
| `provisionRepo` | function | Clone `repoUrl` into `<sandbox workdir>/<instanceId>` and check out `ref`. |
|
|
1198
|
+
| `ProvisionRepoOptions` | interface | Options for {@link provisionRepo } . |
|
|
1199
|
+
| `realProbeCount` | function | How many real probes ran. |
|
|
1200
|
+
| `realProbes` | const | Real probes used in production. |
|
|
1201
|
+
| `RepoProvisionError` | class | Raised when cloning or checking out a repo fails. |
|
|
1202
|
+
| `resetBwrapMemo` | function | TEST seam — clears the memo. |
|
|
1203
|
+
| `resetInteractiveWarnLatch` | function | Reset for tests — the latch is module state and tests need isolation. |
|
|
1204
|
+
| `resetSandboxWarnLatch` | function | Test seam: reset the WARN-once latch. |
|
|
1205
|
+
| `resolveSandbox` | function | Resolve a {@link SandboxProvider } to a concrete backend for `ctx`. |
|
|
1206
|
+
| `resolveSandboxPosture` | function | MEDIUM-2: compute the posture so a surface (TUI footer) can show enforcement DURABLY instead of a one-shot warn. |
|
|
1207
|
+
| `restrictedSeccompPath` | function | M57 — exported so the interactive PTY backend reuses the SAME memoized x64-gated seccomp program. |
|
|
1208
|
+
| `SandboxBackend` | class | The execution capability handed to an agent tool, and the extension point for new environments. |
|
|
1209
|
+
| `SandboxConfig` | interface | Construction-time settings shared by every {@link SandboxBackend } . |
|
|
1210
|
+
| `SandboxMode` | type | Codex's three canonical modes. |
|
|
1211
|
+
| `SandboxNotAvailableError` | class | A backend cannot be used at all: its runtime is missing or unusable. |
|
|
1212
|
+
| `SandboxPosture` | interface | Durable sandbox posture for the UI — the honest answer to "am I kernel-enforced right now?". |
|
|
1213
|
+
| `SandboxProvider` | type | A backend OR a per-request resolver of one — mirrors `FilesystemProvider` / `InteractiveProvider`. |
|
|
1214
|
+
| `SandboxSecurityError` | class | A backend refused a command on policy grounds — the environment works, and it said no. |
|
|
1215
|
+
| `SeccompOptions` | interface | Input to {@link buildSeccompFilter } — the one axis the generated cBPF program varies on. |
|
|
1216
|
+
| `seccompPathForArch` | function | M63 — the restricted-network seccomp program is DETERMINISTIC, so write it ONCE per process and reuse the path across every LinuxSandbox (no per-instance temp accumulation). |
|
|
1217
|
+
| `wrapCommandForSandbox` | function | M57 — the single source of truth for the sandbox command wrap. |
|
|
1218
|
+
| `writableRootsFor` | function | U-6 — the roots a mode may write to, answerable WITHOUT spawning anything. |
|
|
1219
|
+
|
|
1220
|
+
## `@theokit/sdk/sanitize`
|
|
1221
|
+
|
|
1222
|
+
| Symbol | Kind | Summary |
|
|
1223
|
+
|---|---|---|
|
|
1224
|
+
| `SanitizeOptions` | interface | Options for {@link sanitizeToolInput } . |
|
|
1225
|
+
| `SanitizeResult` | interface | Result of {@link sanitizeToolInput } . |
|
|
1226
|
+
| `sanitizeToolInput` | function | Sanitize the raw arguments a model emitted for a tool call — trim (default), optionally coerce string values toward their expected type, optionally repair malformed JSON. |
|
|
1227
|
+
|
|
1228
|
+
## `@theokit/sdk/server/auth`
|
|
1229
|
+
|
|
1230
|
+
| Symbol | Kind | Summary |
|
|
1231
|
+
|---|---|---|
|
|
1232
|
+
| `Auth` | class | SE36 — `Auth.create` replaces `defineAuth` (ADR 0015). |
|
|
1233
|
+
| `AuthCallbackError` | class | Thrown during OAuth callback handling for state mismatches, expired transactions, missing query params, or provider 4xx/5xx errors. |
|
|
1234
|
+
| `AuthCancelledError` | class | Per v1.1 EC-1 MUST FIX — typed subclass of AuthCallbackError for the specific case where user declined consent at provider screen. |
|
|
1235
|
+
| `AuthConfigError` | class | Thrown at `defineAuth()` time when configuration is invalid (e.g., duplicate provider name, invalid email shape per EC-V1-12). |
|
|
1236
|
+
| `AuthOrchestrator` | interface | Returned by `defineAuth<TSession>(opts)` — 5-method orchestrator surface. |
|
|
1237
|
+
| `AuthProvider` | interface | Provider contract — each |
|
|
1238
|
+
| `AuthProviderNotFoundError` | class | Thrown at `startSignIn(providerName, ...)` or `finishSignIn(providerName, ...)` when the named provider is not registered in `providers[]`. |
|
|
1239
|
+
| `AuthResult` | interface | Per ADR D9 — provider profile types are provider-specific (not unified). |
|
|
1240
|
+
| `AuthSecretTooShortError` | class | T5.1 — Typed error thrown when an OAuth tx-cookie secret has < 32 bytes of entropy. |
|
|
1241
|
+
| `DefineAuthOptions` | interface | `defineAuth(opts)` configuration shape — Path C (Hybrid). |
|
|
1242
|
+
| `OAuthTransaction` | interface | Per ADR D5 — OAuth transaction state stored in encrypted HttpOnly cookie (cookie-state pattern). |
|
|
1243
|
+
| `SessionManager` | interface | SessionManager contract (matches theokit/packages/theo/src/server/auth/session.ts:49). |
|
|
1244
|
+
| `validateReturnTo` | function | Clamp a caller-supplied `returnTo` to a same-origin destination, falling back to `'/'` for anything else. |
|
|
1245
|
+
|
|
1246
|
+
## `@theokit/sdk/server/errors-envelope`
|
|
1247
|
+
|
|
1248
|
+
| Symbol | Kind | Summary |
|
|
1249
|
+
|---|---|---|
|
|
1250
|
+
| `fromEnvelope` | function | Hydrate an envelope back into the SDK class hierarchy. |
|
|
1251
|
+
| `MemoryAdapterError` | class | Error raised by `@theokit-memory-*` adapters. |
|
|
1252
|
+
| `TheokitErrorCode` | type | Canonical envelope code union for cross-layer SDK boundary. |
|
|
1253
|
+
| `TheokitErrorEnvelope` | interface | Envelope shape — structurally identical to theokit/server `TheoErrorEnvelope`. |
|
|
1254
|
+
| `toEnvelope` | function | Translate any SDK error (or arbitrary thrown value) into the canonical envelope shape at the wire boundary. |
|
|
1255
|
+
|
|
1256
|
+
## `@theokit/sdk/skills`
|
|
1257
|
+
|
|
1258
|
+
| Symbol | Kind | Summary |
|
|
1259
|
+
|---|---|---|
|
|
1260
|
+
| `buildSkillsBlock` | function | Render the `<skills>` system-prompt block from a skill list. |
|
|
1261
|
+
| `discoverSkills` | function | Discover `SKILL.md` skills under an arbitrary directory. |
|
|
1262
|
+
| `DiscoverSkillsOptions` | interface | Options for {@link discoverSkills } . |
|
|
1263
|
+
| `InvalidSkillInfo` | interface | Information passed to `onInvalidSkill` when a `SKILL.md` is present but its frontmatter is malformed (missing required field or invalid YAML). |
|
|
1264
|
+
| `Skill` | interface | A discovered skill's metadata. |
|
|
1265
|
+
|
|
1266
|
+
## `@theokit/sdk/subagents`
|
|
1267
|
+
|
|
1268
|
+
| Symbol | Kind | Summary |
|
|
1269
|
+
|---|---|---|
|
|
1270
|
+
| `subagentToolWhitelist` | function | Resolve a sub-agent's tool whitelist from its {@link AgentDefinition.tools } (M4-6). |
|
|
1271
|
+
| `withSubagentToolScope` | function | Run `fn` under the sub-agent's tool whitelist (M4-6). |
|
|
1272
|
+
|
|
1273
|
+
## `@theokit/sdk/subagents-loader`
|
|
1274
|
+
|
|
1275
|
+
| Symbol | Kind | Summary |
|
|
1276
|
+
|---|---|---|
|
|
1277
|
+
| `AgentDefinition` | interface | Subagent definition. |
|
|
1278
|
+
| `discoverSubagents` | function | Discover the subagents defined under `<cwd>/.theokit/agents/*.md`. |
|
|
1279
|
+
| `DiscoverSubagentsOptions` | interface | Options for {@link discoverSubagents } / {@link loadSubagentDefinition } . |
|
|
1280
|
+
| `loadSubagentDefinition` | function | Load ONE subagent definition by name, or `undefined` when it is not defined on disk. |
|
|
1281
|
+
| `SubagentSource` | type | Where subagent definitions may be read from. |
|
|
1282
|
+
|
|
1283
|
+
## `@theokit/sdk/subscription`
|
|
1284
|
+
|
|
1285
|
+
| Symbol | Kind | Summary |
|
|
1286
|
+
|---|---|---|
|
|
1287
|
+
| `DefineSubscriptionOptions` | interface | Options accepted by {@link defineSubscription } . |
|
|
1288
|
+
| `isTrackedEnvelope` | function | Type guard for {@link TrackedEnvelope } . |
|
|
1289
|
+
| `subscribe` | function | Subscribe to a typed subscription. |
|
|
1290
|
+
| `SubscribeOptions` | interface | Options accepted by `Theokit.subscribe(name, input, opts?)`. |
|
|
1291
|
+
| `Subscription` | class | SE36 — `Subscription.create` replaces `defineSubscription` (ADR 0015). |
|
|
1292
|
+
| `SubscriptionCtx` | interface | Context passed to a subscription `handler` on each invocation. |
|
|
1293
|
+
| `SubscriptionDescriptor` | interface | Descriptor returned by {@link Subscription.create } . |
|
|
1294
|
+
| `SubscriptionDisconnectError` | class | Thrown when a subscription transport disconnects unexpectedly AND the client did not opt out of reconnect. |
|
|
1295
|
+
| `SubscriptionError` | class | Base error for the subscription subsystem. |
|
|
1296
|
+
| `SubscriptionInputError` | class | Thrown when subscription input fails Zod schema validation. |
|
|
1297
|
+
| `SubscriptionTransport` | type | Transport selection for subscriptions. |
|
|
1298
|
+
| `tracked` | function | Mint a tracked envelope. |
|
|
1299
|
+
| `TrackedEnvelope` | type | Tracked envelope: `[id, payload]` tuple yielded by subscription handlers to advertise the resume token associated with the payload. |
|
|
1300
|
+
|
|
1301
|
+
## `@theokit/sdk/task-store`
|
|
1302
|
+
|
|
1303
|
+
| Symbol | Kind | Summary |
|
|
1304
|
+
|---|---|---|
|
|
1305
|
+
| `getTaskStoreFor` | function | Factory used by `TaskRegistry.configure` (D364). |
|
|
1306
|
+
| `InMemoryTaskStore` | class | Default `TaskStore` — a plain `Map` living in the current process. |
|
|
1307
|
+
| `JsonFileTaskStore` | class | Opt-in `TaskStore` that keeps one JSON file per task under `dir`, so another process can read the registry off disk. |
|
|
1308
|
+
| `TaskStore` | interface | Storage interface used by `TaskRegistry`. |
|
|
1309
|
+
|
|
1310
|
+
## `@theokit/sdk/workflow`
|
|
1311
|
+
|
|
1312
|
+
| Symbol | Kind | Summary |
|
|
1313
|
+
|---|---|---|
|
|
1314
|
+
| `__resetSnapshotStoresForTests` | function | Test seam — clear in-memory store between tests. |
|
|
1315
|
+
| `agentStep` | function | Build an `AgentStep`. |
|
|
1316
|
+
| `AgentStep` | interface | An agent.send-driven step. |
|
|
1317
|
+
| `BranchStep` | interface | First-match-wins predicates + optional fallback. |
|
|
1318
|
+
| `cloneWorkflow` | function | SE30 — clone a committed workflow under a new id/name. |
|
|
1319
|
+
| `DowhileStep` | interface | Loop a step until condFn returns false. |
|
|
1320
|
+
| `fn` | function | Build a `FnStep`. |
|
|
1321
|
+
| `FnStep` | interface | A pure function step. |
|
|
1322
|
+
| `ForeachStep` | interface | Map a step over an upstream array output. |
|
|
1323
|
+
| `ParallelStep` | interface | N concurrent branches, each its own mini-step-list. |
|
|
1324
|
+
| `RetryPolicy` | interface | D237 — retry policy applied per fn/agent step. |
|
|
1325
|
+
| `SleepStep` | interface | Pause for a fixed duration. |
|
|
1326
|
+
| `Step` | type | Any node of a committed workflow, discriminated by `kind`. |
|
|
1327
|
+
| `StepContext` | interface | D247 — context handed to every step.fn. |
|
|
1328
|
+
| `StepResult` | interface | The outcome of one step, appended to `WorkflowRun.stepResults` in execution order. |
|
|
1329
|
+
| `SuspendStep` | interface | Standalone explicit suspend point. |
|
|
1330
|
+
| `Workflow` | class | A committed, immutable workflow: a fixed list of steps you can `run`, `stream` or `resume`. |
|
|
1331
|
+
| `WorkflowAlreadyRunningError` | class | Thrown out of `Workflow.run()` — one of the few workflow failures that rejects instead of arriving as `run.status === "failed"` — when the committed workflow already has a run in flight under the s... |
|
|
1332
|
+
| `workflowAsTool` | function | SE19 — expose a {@link Workflow } as an agent {@link CustomTool } , completing the "X as tools" trio (tools; agents-as-tools via `defineSubAgent`; workflows-as-tools). |
|
|
1333
|
+
| `WorkflowAsToolSpec` | interface | Spec for {@link workflowAsTool } . |
|
|
1334
|
+
| `WorkflowBuilder` | class | Fluent step accumulator returned by {@link Workflow.create } . |
|
|
1335
|
+
| `WorkflowCompensateNotImplementedError` | class | D238 — saga engine not yet implemented. |
|
|
1336
|
+
| `WorkflowDescription` | interface | theokit#161 — the read-only shape of a committed workflow. |
|
|
1337
|
+
| `WorkflowDuplicateStepIdError` | class | Thrown by `.commit()` when one step id appears twice anywhere in the workflow — including inside a parallel branch, a branch predicate, the fallback, and the inner step of a `foreach` or `dowhile`. |
|
|
1338
|
+
| `WorkflowEvent` | type | SE28 — a step-level workflow event emitted by `Workflow.stream()` as top-level steps run. |
|
|
1339
|
+
| `WorkflowInputError` | class | SE27 — the whole-workflow `inputSchema` rejected `run(input)` (before step 1). |
|
|
1340
|
+
| `WorkflowMaxIterationsExceededError` | class | Raised when a `dowhile` step's condition kept returning true past `maxIterations` (default 100). |
|
|
1341
|
+
| `WorkflowNestedError` | class | SE30 — a nested workflow (via `workflowStep`) did not `complete`. |
|
|
1342
|
+
| `WorkflowNotSerializableError` | class | EC-4 absorbed — JSON.stringify failed on snapshot payload. |
|
|
1343
|
+
| `WorkflowOptions` | interface | Configuration for `Workflow.create()`, validated by Zod before the builder is handed back: a `name` outside 1..128 characters, or `persistence.backend: "json"` without a `dir`, throws there rather ... |
|
|
1344
|
+
| `WorkflowOutputError` | class | SE27 — the whole-workflow `outputSchema` rejected the final output (on `completed`). |
|
|
1345
|
+
| `WorkflowParallelError` | class | Aggregate failure from parallel branches. |
|
|
1346
|
+
| `WorkflowPersistenceOptions` | interface | Where suspend snapshots are kept. |
|
|
1347
|
+
| `WorkflowResumeOptions` | interface | Arguments for `Workflow.resume()`. |
|
|
1348
|
+
| `WorkflowResumeStepNotFoundError` | class | EC-8 absorbed — `currentStepId` from snapshot not found in resumed workflow. |
|
|
1349
|
+
| `WorkflowRun` | interface | The terminal record of one run — what `Workflow.run()` resolves to, what `Workflow.resume()` returns, and what the `result` promise of `Workflow.stream()` settles with. |
|
|
1350
|
+
| `WorkflowRunOptions` | interface | Per-run options for `Workflow.run()` and `Workflow.stream()`. |
|
|
1351
|
+
| `WorkflowSnapshot` | interface | The persisted state of a suspended run: written when a step calls `StepContext.suspend()`, read back by `Workflow.resume()`. |
|
|
1352
|
+
| `WorkflowSnapshotNotFoundError` | class | Thrown by `Workflow.resume()` when no snapshot exists for the given run id. |
|
|
1353
|
+
| `WorkflowStateError` | class | SE29 — `WorkflowOptions.stateSchema` rejected an `initialState` or a `setState(next)` call. |
|
|
1354
|
+
| `workflowStep` | function | SE30 — use a committed {@link Workflow } as a step inside another workflow. |
|
|
1355
|
+
| `WorkflowStepDescription` | interface | theokit#161 — one step of a workflow, as a reflection surface sees it. |
|
|
1356
|
+
| `WorkflowStream` | type | SE28 — the async iterator returned by `Workflow.stream()`. |
|
|
1357
|
+
| `WorkflowToolError` | class | Raised by a {@link workflowAsTool } tool when the wrapped workflow run does not reach `status: "completed"` (a step failed, the run was cancelled/suspended). |
|
|
1358
|
+
|