@theokit/sdk 4.53.0 → 4.53.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +8 -8
- package/LICENSE +2 -2
- package/README.md +5 -5
- package/bin/theokit-migrate-config.mjs +11 -2
- package/dist/{agent-BiCINq25.d.ts → agent-B9HXlwID.d.ts} +21 -8
- package/dist/agent-FFVV4U5N.js +50 -0
- package/dist/{agent-ZAGG6ZBS.js.map → agent-FFVV4U5N.js.map} +1 -1
- package/dist/agent-YLAHVHEH.cjs +59 -0
- package/dist/{agent-JX5SBYDE.cjs.map → agent-YLAHVHEH.cjs.map} +1 -1
- package/dist/{agent-Zta1kvGH.d.cts → agent-nLqeXKIX.d.cts} +21 -8
- package/dist/agent-session-store-DUGBAX5V.cjs +23 -0
- package/dist/{agent-session-store-EPX2WQI4.cjs.map → agent-session-store-DUGBAX5V.cjs.map} +1 -1
- package/dist/agent-session-store-TNCGL5RN.js +6 -0
- package/dist/{agent-session-store-JMU7ASDB.js.map → agent-session-store-TNCGL5RN.js.map} +1 -1
- package/dist/agent.d.ts +16 -1
- package/dist/auth/index.cjs +18 -18
- package/dist/auth/index.cjs.map +1 -1
- package/dist/auth/index.d.cts +1 -1
- package/dist/auth/index.d.ts +1 -1
- package/dist/auth/index.js +6 -6
- package/dist/auth/index.js.map +1 -1
- package/dist/{batch-NLIS4QTW.js → batch-UPKN4SG6.js} +9 -9
- package/dist/{batch-NLIS4QTW.js.map → batch-UPKN4SG6.js.map} +1 -1
- package/dist/{batch-WQ3AJCDV.cjs → batch-ZEFN5SO7.cjs} +26 -26
- package/dist/{batch-WQ3AJCDV.cjs.map → batch-ZEFN5SO7.cjs.map} +1 -1
- package/dist/{chunk-2QMK627M.cjs → chunk-2D43RD5D.cjs} +8 -8
- package/dist/{chunk-2QMK627M.cjs.map → chunk-2D43RD5D.cjs.map} +1 -1
- package/dist/{chunk-DM6Y5B2G.cjs → chunk-2FYEVT2B.cjs} +121 -121
- package/dist/{chunk-DM6Y5B2G.cjs.map → chunk-2FYEVT2B.cjs.map} +1 -1
- package/dist/{chunk-BBZYXVLZ.cjs → chunk-2ZPEDVLM.cjs} +2 -2
- package/dist/chunk-2ZPEDVLM.cjs.map +1 -0
- package/dist/{chunk-T6QUCG7L.cjs → chunk-3BK6YR5P.cjs} +4 -4
- package/dist/{chunk-T6QUCG7L.cjs.map → chunk-3BK6YR5P.cjs.map} +1 -1
- package/dist/{chunk-23VZBRDQ.js → chunk-3V7UJLQT.js} +3 -3
- package/dist/chunk-3V7UJLQT.js.map +1 -0
- package/dist/{chunk-ITQ4NO4P.js → chunk-3WVMJY7F.js} +3 -3
- package/dist/{chunk-ITQ4NO4P.js.map → chunk-3WVMJY7F.js.map} +1 -1
- package/dist/{chunk-RAACTJ7C.cjs → chunk-3X6PM7DU.cjs} +4 -4
- package/dist/{chunk-RAACTJ7C.cjs.map → chunk-3X6PM7DU.cjs.map} +1 -1
- package/dist/{chunk-DEZ75ET5.js → chunk-4Q4K4WB5.js} +3 -3
- package/dist/{chunk-DEZ75ET5.js.map → chunk-4Q4K4WB5.js.map} +1 -1
- package/dist/{chunk-4X3SBHPK.js → chunk-5F5NWKPN.js} +20 -4
- package/dist/chunk-5F5NWKPN.js.map +1 -0
- package/dist/{chunk-NUEL6RCZ.cjs → chunk-5YKNEMXR.cjs} +4 -4
- package/dist/chunk-5YKNEMXR.cjs.map +1 -0
- package/dist/{chunk-3YYDHUNH.cjs → chunk-665SFFFR.cjs} +11 -11
- package/dist/{chunk-3YYDHUNH.cjs.map → chunk-665SFFFR.cjs.map} +1 -1
- package/dist/{chunk-CHVSMEKM.js → chunk-6AZDM6LK.js} +3 -3
- package/dist/chunk-6AZDM6LK.js.map +1 -0
- package/dist/{chunk-AMYY3JHQ.cjs → chunk-ADLLFY3H.cjs} +9 -9
- package/dist/{chunk-AMYY3JHQ.cjs.map → chunk-ADLLFY3H.cjs.map} +1 -1
- package/dist/{chunk-634YVZLU.js → chunk-B6HOIWQ6.js} +5 -5
- package/dist/{chunk-634YVZLU.js.map → chunk-B6HOIWQ6.js.map} +1 -1
- package/dist/{chunk-EQMLJ52C.cjs → chunk-BDTVFIPB.cjs} +26 -26
- package/dist/{chunk-EQMLJ52C.cjs.map → chunk-BDTVFIPB.cjs.map} +1 -1
- package/dist/{chunk-UJ3SXRZZ.js → chunk-BERBYXFH.js} +3 -3
- package/dist/{chunk-UJ3SXRZZ.js.map → chunk-BERBYXFH.js.map} +1 -1
- package/dist/{chunk-KZBB4YKU.js → chunk-BFYGJGC5.js} +3 -3
- package/dist/{chunk-KZBB4YKU.js.map → chunk-BFYGJGC5.js.map} +1 -1
- package/dist/{chunk-SXSPMRSV.cjs → chunk-BM6N4KHO.cjs} +21 -3
- package/dist/chunk-BM6N4KHO.cjs.map +1 -0
- package/dist/{chunk-2CFEET3Y.cjs → chunk-C4H6PB5J.cjs} +4 -4
- package/dist/chunk-C4H6PB5J.cjs.map +1 -0
- package/dist/{chunk-NFATC6ZF.cjs → chunk-C5DEO6OI.cjs} +4 -4
- package/dist/{chunk-NFATC6ZF.cjs.map → chunk-C5DEO6OI.cjs.map} +1 -1
- package/dist/{chunk-EUBGGYPH.cjs → chunk-CZ2GKKYL.cjs} +5 -5
- package/dist/{chunk-EUBGGYPH.cjs.map → chunk-CZ2GKKYL.cjs.map} +1 -1
- package/dist/{chunk-I732VEDW.js → chunk-D24WJWN2.js} +3 -3
- package/dist/{chunk-I732VEDW.js.map → chunk-D24WJWN2.js.map} +1 -1
- package/dist/{chunk-3R4ZCQAZ.cjs → chunk-D75S2X6I.cjs} +5 -5
- package/dist/{chunk-3R4ZCQAZ.cjs.map → chunk-D75S2X6I.cjs.map} +1 -1
- package/dist/{chunk-5XXUYU3M.js → chunk-DGOG5NXR.js} +3 -3
- package/dist/{chunk-5XXUYU3M.js.map → chunk-DGOG5NXR.js.map} +1 -1
- package/dist/{chunk-RTLUZKDL.cjs → chunk-E7FJOO4G.cjs} +11 -11
- package/dist/{chunk-RTLUZKDL.cjs.map → chunk-E7FJOO4G.cjs.map} +1 -1
- package/dist/{chunk-BWGXYOBZ.cjs → chunk-ELKO4ZLR.cjs} +4 -4
- package/dist/{chunk-BWGXYOBZ.cjs.map → chunk-ELKO4ZLR.cjs.map} +1 -1
- package/dist/{chunk-FBZMSLDC.cjs → chunk-EZ2YEF4F.cjs} +4 -4
- package/dist/{chunk-FBZMSLDC.cjs.map → chunk-EZ2YEF4F.cjs.map} +1 -1
- package/dist/{chunk-2VFZQEDW.cjs → chunk-F77UENR6.cjs} +343 -324
- package/dist/chunk-F77UENR6.cjs.map +1 -0
- package/dist/{chunk-OZXPA3ME.js → chunk-FFM3SJTQ.js} +4 -4
- package/dist/{chunk-OZXPA3ME.js.map → chunk-FFM3SJTQ.js.map} +1 -1
- package/dist/{chunk-PLUCC4N5.js → chunk-FIOCJYLA.js} +3 -3
- package/dist/{chunk-PLUCC4N5.js.map → chunk-FIOCJYLA.js.map} +1 -1
- package/dist/{chunk-Z5U2JGEK.cjs → chunk-FOXKFTVZ.cjs} +11 -11
- package/dist/{chunk-Z5U2JGEK.cjs.map → chunk-FOXKFTVZ.cjs.map} +1 -1
- package/dist/{chunk-K42QGAKM.cjs → chunk-FPYT5WZP.cjs} +10 -10
- package/dist/{chunk-K42QGAKM.cjs.map → chunk-FPYT5WZP.cjs.map} +1 -1
- package/dist/{chunk-NZOR3N4E.js → chunk-G3JWXOGY.js} +78 -58
- package/dist/chunk-G3JWXOGY.js.map +1 -0
- package/dist/{chunk-DHVNJYTO.js → chunk-GBBDINFK.js} +3 -3
- package/dist/{chunk-DHVNJYTO.js.map → chunk-GBBDINFK.js.map} +1 -1
- package/dist/{chunk-V45L2OYP.cjs → chunk-GD63JPGC.cjs} +9 -9
- package/dist/{chunk-V45L2OYP.cjs.map → chunk-GD63JPGC.cjs.map} +1 -1
- package/dist/{chunk-I5OTK2RP.js → chunk-GOVJO4YE.js} +5 -5
- package/dist/{chunk-I5OTK2RP.js.map → chunk-GOVJO4YE.js.map} +1 -1
- package/dist/{chunk-CZHPR2G7.cjs → chunk-HAWE74GQ.cjs} +8 -8
- package/dist/{chunk-CZHPR2G7.cjs.map → chunk-HAWE74GQ.cjs.map} +1 -1
- package/dist/{chunk-KIX45IKP.js → chunk-HE4BIAOS.js} +4 -4
- package/dist/{chunk-KIX45IKP.js.map → chunk-HE4BIAOS.js.map} +1 -1
- package/dist/{chunk-AM2CNBKE.js → chunk-HKCKOAIO.js} +2 -2
- package/dist/chunk-HKCKOAIO.js.map +1 -0
- package/dist/{chunk-2YWWPCGX.js → chunk-HSQ5Q3I5.js} +10 -12
- package/dist/chunk-HSQ5Q3I5.js.map +1 -0
- package/dist/{chunk-QLAWEGTZ.cjs → chunk-JIQRXKTA.cjs} +7 -7
- package/dist/chunk-JIQRXKTA.cjs.map +1 -0
- package/dist/{chunk-EFXJ5C7X.js → chunk-KSWHTR54.js} +5 -5
- package/dist/{chunk-EFXJ5C7X.js.map → chunk-KSWHTR54.js.map} +1 -1
- package/dist/{chunk-6PTCKXD3.js → chunk-LD4MOBFX.js} +8 -8
- package/dist/{chunk-6PTCKXD3.js.map → chunk-LD4MOBFX.js.map} +1 -1
- package/dist/{chunk-2YGIBOUH.cjs → chunk-LPVIRJVF.cjs} +9 -9
- package/dist/chunk-LPVIRJVF.cjs.map +1 -0
- package/dist/{chunk-2Y5NO2SY.js → chunk-LS3LMQ23.js} +9 -9
- package/dist/{chunk-2Y5NO2SY.js.map → chunk-LS3LMQ23.js.map} +1 -1
- package/dist/{chunk-N43XLTHZ.js → chunk-LTSTGCL6.js} +3 -3
- package/dist/{chunk-N43XLTHZ.js.map → chunk-LTSTGCL6.js.map} +1 -1
- package/dist/{chunk-W4FV7JBH.js → chunk-MSFLYJDY.js} +4 -4
- package/dist/chunk-MSFLYJDY.js.map +1 -0
- package/dist/{chunk-C4EU627W.js → chunk-N5CR3TJZ.js} +4 -4
- package/dist/{chunk-C4EU627W.js.map → chunk-N5CR3TJZ.js.map} +1 -1
- package/dist/{chunk-HTK54K2J.js → chunk-NZL4BNFQ.js} +3 -3
- package/dist/{chunk-HTK54K2J.js.map → chunk-NZL4BNFQ.js.map} +1 -1
- package/dist/{chunk-T5ZWI3MC.cjs → chunk-OUOXM36O.cjs} +11 -11
- package/dist/{chunk-T5ZWI3MC.cjs.map → chunk-OUOXM36O.cjs.map} +1 -1
- package/dist/{chunk-BXVSBYGW.js → chunk-OY7O3Q6R.js} +5 -5
- package/dist/{chunk-BXVSBYGW.js.map → chunk-OY7O3Q6R.js.map} +1 -1
- package/dist/{chunk-L7EGRCKJ.js → chunk-PBZ7HMBP.js} +4 -4
- package/dist/{chunk-L7EGRCKJ.js.map → chunk-PBZ7HMBP.js.map} +1 -1
- package/dist/{chunk-OIBHY6JQ.js → chunk-PGP7IOJ2.js} +4 -4
- package/dist/{chunk-OIBHY6JQ.js.map → chunk-PGP7IOJ2.js.map} +1 -1
- package/dist/{chunk-R7TKOQMJ.js → chunk-POWRZSK4.js} +3 -3
- package/dist/{chunk-R7TKOQMJ.js.map → chunk-POWRZSK4.js.map} +1 -1
- package/dist/{chunk-R3CKCRK3.cjs → chunk-Q4RESANI.cjs} +4 -4
- package/dist/{chunk-R3CKCRK3.cjs.map → chunk-Q4RESANI.cjs.map} +1 -1
- package/dist/{chunk-QN5N3ZVT.cjs → chunk-QBTVATSF.cjs} +25 -24
- package/dist/chunk-QBTVATSF.cjs.map +1 -0
- package/dist/{chunk-ZSJPRPN7.js → chunk-R5YZACGK.js} +3 -3
- package/dist/{chunk-ZSJPRPN7.js.map → chunk-R5YZACGK.js.map} +1 -1
- package/dist/{chunk-ADVZIC43.cjs → chunk-RAHSWE5C.cjs} +10 -10
- package/dist/{chunk-ADVZIC43.cjs.map → chunk-RAHSWE5C.cjs.map} +1 -1
- package/dist/{chunk-NOS7PTKP.js → chunk-SEL2ZQMT.js} +7 -7
- package/dist/{chunk-NOS7PTKP.js.map → chunk-SEL2ZQMT.js.map} +1 -1
- package/dist/{chunk-XWCTBGYK.js → chunk-SK4QLUBK.js} +3 -3
- package/dist/chunk-SK4QLUBK.js.map +1 -0
- package/dist/{chunk-XRI6DXPZ.js → chunk-SSDD676S.js} +3 -3
- package/dist/chunk-SSDD676S.js.map +1 -0
- package/dist/{chunk-E3OCRJU6.cjs → chunk-SVO5WPZX.cjs} +11 -11
- package/dist/{chunk-E3OCRJU6.cjs.map → chunk-SVO5WPZX.cjs.map} +1 -1
- package/dist/{chunk-44IISBRZ.cjs → chunk-SZHU7A5B.cjs} +4 -4
- package/dist/{chunk-44IISBRZ.cjs.map → chunk-SZHU7A5B.cjs.map} +1 -1
- package/dist/{chunk-TR4V2LHV.cjs → chunk-TTJ54H3E.cjs} +5 -5
- package/dist/{chunk-TR4V2LHV.cjs.map → chunk-TTJ54H3E.cjs.map} +1 -1
- package/dist/{chunk-HI4ZW62S.js → chunk-U4UJHOSH.js} +4 -4
- package/dist/chunk-U4UJHOSH.js.map +1 -0
- package/dist/{chunk-XGYI2KQH.js → chunk-UFIXH26P.js} +4 -4
- package/dist/{chunk-XGYI2KQH.js.map → chunk-UFIXH26P.js.map} +1 -1
- package/dist/{chunk-JJZ4NIAG.js → chunk-V26QVGUG.js} +7 -6
- package/dist/chunk-V26QVGUG.js.map +1 -0
- package/dist/{chunk-3SHW7XKK.js → chunk-V6HWJQQV.js} +6 -5
- package/dist/chunk-V6HWJQQV.js.map +1 -0
- package/dist/{chunk-MV4TOCUK.js → chunk-VC5ABJXC.js} +3 -3
- package/dist/{chunk-MV4TOCUK.js.map → chunk-VC5ABJXC.js.map} +1 -1
- package/dist/{chunk-33L2NVTJ.cjs → chunk-VF7X6HDR.cjs} +8 -8
- package/dist/chunk-VF7X6HDR.cjs.map +1 -0
- package/dist/{chunk-7HQVDLFI.cjs → chunk-VGPXHHF3.cjs} +11 -9
- package/dist/chunk-VGPXHHF3.cjs.map +1 -0
- package/dist/{chunk-BC5EUG7R.cjs → chunk-VUKQL3L2.cjs} +18 -20
- package/dist/chunk-VUKQL3L2.cjs.map +1 -0
- package/dist/{chunk-PVBANCWU.cjs → chunk-VW6M4B3Z.cjs} +5 -5
- package/dist/{chunk-PVBANCWU.cjs.map → chunk-VW6M4B3Z.cjs.map} +1 -1
- package/dist/{chunk-KNZU4YO5.cjs → chunk-WQ53UQL4.cjs} +4 -4
- package/dist/{chunk-KNZU4YO5.cjs.map → chunk-WQ53UQL4.cjs.map} +1 -1
- package/dist/{chunk-6DCTL32L.cjs → chunk-XPR366DL.cjs} +17 -17
- package/dist/{chunk-6DCTL32L.cjs.map → chunk-XPR366DL.cjs.map} +1 -1
- package/dist/{chunk-7TB5U7RK.js → chunk-XROIW6BH.js} +6 -6
- package/dist/{chunk-7TB5U7RK.js.map → chunk-XROIW6BH.js.map} +1 -1
- package/dist/{chunk-ECPL5RV6.cjs → chunk-Y4AXQOT4.cjs} +8 -8
- package/dist/{chunk-ECPL5RV6.cjs.map → chunk-Y4AXQOT4.cjs.map} +1 -1
- package/dist/{chunk-E6T264NS.js → chunk-Y4I4EQFK.js} +3 -3
- package/dist/{chunk-E6T264NS.js.map → chunk-Y4I4EQFK.js.map} +1 -1
- package/dist/{chunk-FUASIT3E.cjs → chunk-ZN2DGEY3.cjs} +15 -15
- package/dist/{chunk-FUASIT3E.cjs.map → chunk-ZN2DGEY3.cjs.map} +1 -1
- package/dist/{chunk-YTO5BRBD.cjs → chunk-ZT57WTUJ.cjs} +8 -8
- package/dist/chunk-ZT57WTUJ.cjs.map +1 -0
- package/dist/compact-session-4MNKNMO2.js +21 -0
- package/dist/{compact-session-EJ36VH5I.js.map → compact-session-4MNKNMO2.js.map} +1 -1
- package/dist/compact-session-EPFBQ46Z.cjs +58 -0
- package/dist/{compact-session-6GKIS4SD.cjs.map → compact-session-EPFBQ46Z.cjs.map} +1 -1
- package/dist/compaction.cjs +16 -16
- package/dist/compaction.js +3 -3
- package/dist/concurrency.cjs +6 -6
- package/dist/concurrency.js +4 -4
- package/dist/context-7USNN6LP.cjs +22 -0
- package/dist/{context-4HGPCOH6.cjs.map → context-7USNN6LP.cjs.map} +1 -1
- package/dist/context-ENXZNF6J.js +5 -0
- package/dist/{context-DCECDKWN.js.map → context-ENXZNF6J.js.map} +1 -1
- package/dist/{cron-DyWQsEG6.d.ts → cron-BMjgFH-_.d.ts} +1 -1
- package/dist/{cron-DgHJnMAK.d.cts → cron-DFDdCdMM.d.cts} +1 -1
- package/dist/cron.cjs +33 -33
- package/dist/cron.d.cts +2 -2
- package/dist/cron.d.ts +2 -2
- package/dist/cron.js +32 -32
- package/dist/errors.cjs +21 -21
- package/dist/errors.js +2 -2
- package/dist/eval.cjs +43 -43
- package/dist/eval.js +33 -33
- package/dist/{executor-4SW7QGZ4.cjs → executor-2Z3LGG3I.cjs} +24 -24
- package/dist/{executor-4SW7QGZ4.cjs.map → executor-2Z3LGG3I.cjs.map} +1 -1
- package/dist/{executor-3CGPLVJL.js → executor-2Z6XJJJG.js} +7 -7
- package/dist/{executor-3CGPLVJL.js.map → executor-2Z6XJJJG.js.map} +1 -1
- package/dist/filesystem/index.cjs +7 -7
- package/dist/filesystem/index.js +3 -3
- package/dist/fs-session-store-R5FD3EN6.js +10 -0
- package/dist/{fs-session-store-LIKYT24K.js.map → fs-session-store-R5FD3EN6.js.map} +1 -1
- package/dist/fs-session-store-VVY2AHWG.cjs +19 -0
- package/dist/{fs-session-store-VXXDIBGM.cjs.map → fs-session-store-VVY2AHWG.cjs.map} +1 -1
- package/dist/generate-object-AVXOJK2I.cjs +20 -0
- package/dist/{generate-object-E465DX5I.cjs.map → generate-object-AVXOJK2I.cjs.map} +1 -1
- package/dist/generate-object-WQRCXFD2.js +7 -0
- package/dist/{generate-object-TVQCW2IZ.js.map → generate-object-WQRCXFD2.js.map} +1 -1
- package/dist/index-manager-VRU3A2YL.cjs +21 -0
- package/dist/{index-manager-HGGL4DD5.cjs.map → index-manager-VRU3A2YL.cjs.map} +1 -1
- package/dist/index-manager-WS7TVKUW.js +12 -0
- package/dist/{index-manager-EA6FGIQG.js.map → index-manager-WS7TVKUW.js.map} +1 -1
- package/dist/index.cjs +143 -135
- package/dist/index.d.cts +64 -8
- package/dist/index.d.ts +64 -8
- package/dist/index.js +45 -45
- package/dist/{inject-session-67SF65FC.cjs → inject-session-AUQLBDRS.cjs} +9 -9
- package/dist/{inject-session-67SF65FC.cjs.map → inject-session-AUQLBDRS.cjs.map} +1 -1
- package/dist/{inject-session-HO7FYVCX.js → inject-session-GMBMJVNZ.js} +7 -7
- package/dist/{inject-session-HO7FYVCX.js.map → inject-session-GMBMJVNZ.js.map} +1 -1
- package/dist/internal/auth/auth-types.d.ts +1 -1
- package/dist/internal/auth/oauth-device.d.ts +2 -2
- package/dist/internal/local-agent/mcp-pool.d.ts +2 -4
- package/dist/internal/mcp/oauth.d.ts +14 -1
- package/dist/internal/mcp/token-storage.d.ts +18 -1
- package/dist/internal/memory/adapters/index.cjs +8 -8
- package/dist/internal/memory/adapters/index.js +7 -7
- package/dist/internal/persistence/atomic-write.d.cts +93 -0
- package/dist/internal/persistence/atomic-write.d.ts +93 -0
- package/dist/internal/persistence/file-lock.d.cts +13 -1
- package/dist/internal/persistence/file-lock.d.ts +13 -1
- package/dist/internal/persistence/fts5-sanitize.d.cts +9 -1
- package/dist/internal/persistence/fts5-sanitize.d.ts +9 -1
- package/dist/internal/persistence/index.cjs +25 -25
- package/dist/internal/persistence/index.js +6 -6
- package/dist/internal/persistence/session-dir.d.cts +1 -0
- package/dist/internal/persistence/session-dir.d.ts +1 -0
- package/dist/internal/persistence/session-writer.d.cts +13 -0
- package/dist/internal/persistence/session-writer.d.ts +13 -0
- package/dist/internal/persistence/sqlite-wal.d.cts +9 -1
- package/dist/internal/persistence/sqlite-wal.d.ts +9 -1
- package/dist/internal/providers/builtin/cerebras.d.ts +2 -2
- package/dist/internal/providers/builtin/deepinfra.d.ts +1 -1
- package/dist/internal/providers/catalog-source-models-dev.d.ts +1 -1
- package/dist/internal/runtime/lifecycle/env-policy.d.ts +1 -3
- package/dist/internal/security/index.cjs +13 -13
- package/dist/internal/security/index.js +3 -3
- package/dist/internal/security/path-guard.d.cts +61 -0
- package/dist/internal/security/path-guard.d.ts +61 -0
- package/dist/internal/session/compact-session.d.ts +2 -2
- package/dist/internal/telemetry/tracer.d.ts +24 -0
- package/dist/judge-call-G5SGV2M2.cjs +22 -0
- package/dist/{judge-call-GVIJWQVE.cjs.map → judge-call-G5SGV2M2.cjs.map} +1 -1
- package/dist/judge-call-MDIPTBJI.js +5 -0
- package/dist/{judge-call-QMKGC2ZK.js.map → judge-call-MDIPTBJI.js.map} +1 -1
- package/dist/mcp-auth.cjs +14 -14
- package/dist/mcp-auth.cjs.map +1 -1
- package/dist/mcp-auth.js +4 -4
- package/dist/mcp-auth.js.map +1 -1
- package/dist/models.cjs +22 -22
- package/dist/models.cjs.map +1 -1
- package/dist/models.js +7 -7
- package/dist/models.js.map +1 -1
- package/dist/path-safety.cjs +10 -10
- package/dist/path-safety.js +3 -3
- package/dist/persistence.cjs +28 -28
- package/dist/persistence.js +8 -8
- package/dist/project.cjs +5 -5
- package/dist/project.js +3 -3
- package/dist/registry-63ASMXT4.cjs +46 -0
- package/dist/{registry-UBY26R4I.cjs.map → registry-63ASMXT4.cjs.map} +1 -1
- package/dist/registry-O7FJ2MPM.js +9 -0
- package/dist/{registry-GC7BQMSV.js.map → registry-O7FJ2MPM.js.map} +1 -1
- package/dist/retry.cjs +4 -4
- package/dist/retry.js +3 -3
- package/dist/sandbox/bwrap.d.cts +1 -2
- package/dist/sandbox/bwrap.d.ts +1 -2
- package/dist/sandbox/index.cjs +20 -20
- package/dist/sandbox/index.cjs.map +1 -1
- package/dist/sandbox/index.js +5 -5
- package/dist/sandbox/index.js.map +1 -1
- package/dist/server/errors-envelope.cjs +14 -14
- package/dist/server/errors-envelope.js +3 -3
- package/dist/session-transcript-DOM3UTXR.cjs +50 -0
- package/dist/{session-transcript-TNAJ4O3M.cjs.map → session-transcript-DOM3UTXR.cjs.map} +1 -1
- package/dist/session-transcript-RAKEK76V.js +5 -0
- package/dist/{session-transcript-SKIRBEJE.js.map → session-transcript-RAKEK76V.js.map} +1 -1
- package/dist/skills.cjs +7 -7
- package/dist/skills.js +5 -5
- package/dist/stream-object-L3Q7PBMF.cjs +20 -0
- package/dist/{stream-object-T4DAMNVB.cjs.map → stream-object-L3Q7PBMF.cjs.map} +1 -1
- package/dist/stream-object-ZYXWS4B2.js +7 -0
- package/dist/{stream-object-QMNR3YFF.js.map → stream-object-ZYXWS4B2.js.map} +1 -1
- package/dist/subagents-loader-I56GSKAQ.js +6 -0
- package/dist/{subagents-loader-WN2SB6PV.js.map → subagents-loader-I56GSKAQ.js.map} +1 -1
- package/dist/subagents-loader-VRW73QQT.cjs +15 -0
- package/dist/{subagents-loader-3CXBQWWY.cjs.map → subagents-loader-VRW73QQT.cjs.map} +1 -1
- package/dist/subagents-loader.cjs +6 -6
- package/dist/subagents-loader.d.cts +1 -1
- package/dist/subagents-loader.d.ts +1 -1
- package/dist/subagents-loader.js +4 -4
- package/dist/subscription/index.cjs +3 -3
- package/dist/subscription/index.js +2 -2
- package/dist/task-store.cjs +7 -7
- package/dist/task-store.js +4 -4
- package/dist/types/agent.d.ts +19 -6
- package/dist/types/provider-profile.d.ts +2 -2
- package/dist/workflow.cjs +27 -27
- package/dist/workflow.js +6 -6
- package/package.json +18 -18
- package/dist/agent-JX5SBYDE.cjs +0 -59
- package/dist/agent-ZAGG6ZBS.js +0 -50
- package/dist/agent-session-store-EPX2WQI4.cjs +0 -23
- package/dist/agent-session-store-JMU7ASDB.js +0 -6
- package/dist/chunk-23VZBRDQ.js.map +0 -1
- package/dist/chunk-2CFEET3Y.cjs.map +0 -1
- package/dist/chunk-2VFZQEDW.cjs.map +0 -1
- package/dist/chunk-2YGIBOUH.cjs.map +0 -1
- package/dist/chunk-2YWWPCGX.js.map +0 -1
- package/dist/chunk-33L2NVTJ.cjs.map +0 -1
- package/dist/chunk-3SHW7XKK.js.map +0 -1
- package/dist/chunk-4X3SBHPK.js.map +0 -1
- package/dist/chunk-7HQVDLFI.cjs.map +0 -1
- package/dist/chunk-AM2CNBKE.js.map +0 -1
- package/dist/chunk-BBZYXVLZ.cjs.map +0 -1
- package/dist/chunk-BC5EUG7R.cjs.map +0 -1
- package/dist/chunk-CHVSMEKM.js.map +0 -1
- package/dist/chunk-HI4ZW62S.js.map +0 -1
- package/dist/chunk-JJZ4NIAG.js.map +0 -1
- package/dist/chunk-NUEL6RCZ.cjs.map +0 -1
- package/dist/chunk-NZOR3N4E.js.map +0 -1
- package/dist/chunk-QLAWEGTZ.cjs.map +0 -1
- package/dist/chunk-QN5N3ZVT.cjs.map +0 -1
- package/dist/chunk-SXSPMRSV.cjs.map +0 -1
- package/dist/chunk-W4FV7JBH.js.map +0 -1
- package/dist/chunk-XRI6DXPZ.js.map +0 -1
- package/dist/chunk-XWCTBGYK.js.map +0 -1
- package/dist/chunk-YTO5BRBD.cjs.map +0 -1
- package/dist/compact-session-6GKIS4SD.cjs +0 -58
- package/dist/compact-session-EJ36VH5I.js +0 -21
- package/dist/context-4HGPCOH6.cjs +0 -22
- package/dist/context-DCECDKWN.js +0 -5
- package/dist/fs-session-store-LIKYT24K.js +0 -10
- package/dist/fs-session-store-VXXDIBGM.cjs +0 -19
- package/dist/generate-object-E465DX5I.cjs +0 -20
- package/dist/generate-object-TVQCW2IZ.js +0 -7
- package/dist/index-manager-EA6FGIQG.js +0 -12
- package/dist/index-manager-HGGL4DD5.cjs +0 -21
- package/dist/judge-call-GVIJWQVE.cjs +0 -22
- package/dist/judge-call-QMKGC2ZK.js +0 -5
- package/dist/registry-GC7BQMSV.js +0 -9
- package/dist/registry-UBY26R4I.cjs +0 -46
- package/dist/session-transcript-SKIRBEJE.js +0 -5
- package/dist/session-transcript-TNAJ4O3M.cjs +0 -50
- package/dist/stream-object-QMNR3YFF.js +0 -7
- package/dist/stream-object-T4DAMNVB.cjs +0 -20
- package/dist/subagents-loader-3CXBQWWY.cjs +0 -15
- package/dist/subagents-loader-WN2SB6PV.js +0 -6
- package/docs/error-codes.md +0 -179
- package/docs/harness-capability-map.md +0 -304
package/dist/index.d.cts
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { T as TheokitAgentError, B as BudgetOptions, a as BudgetHandle, b as BudgetSnapshot, E as ErrorMetadata } from './errors-BSoXcl3F.cjs';
|
|
2
2
|
export { A as AgentDisposedError, c as AgentRunError, d as AgentRunErrorCode, e as AuthenticationError, f as BudgetExceedEvent, g as BudgetExceededError, h as BudgetLimit, i as BudgetMode, j as BudgetScope, k as BudgetThresholdEvent, l as BudgetWindow, C as ConfigurationError, m as ErrorCode, I as IntegrationNotConnectedError, n as InvalidTaskIdError, M as MemoryAdapterError, o as MemoryAdapterErrorCode, N as NetworkError, R as RateLimitError, p as TaskNotFoundError, U as UnknownAgentError, q as UnsupportedBudgetOperationError, r as UnsupportedRunOperationError, s as UnsupportedTaskOperationError, t as isTransientError } from './errors-BSoXcl3F.cjs';
|
|
3
|
-
import { A as AgentOptions, L as LocalOptions, P as ProviderRoutingSettings, S as SystemPromptResolver, C as CloudOptions, M as MemorySettings, a as AgentDefinition, b as ContextSettings, c as PluginsSettings, d as SkillsSettings, e as SDKAgent, f as ListAgentsOptions, g as ListResult, h as SDKAgentInfo, G as GetAgentOptions, i as ListRunsOptions, j as GetRunOptions, k as AgentOperationOptions, l as AgentDescription, m as Plugin$1, n as ProviderProfile, I as InlineSkill, J as JudgeResult, o as GoalOptions, p as GoalEvent, q as GoalResult, B as BudgetTracker, r as MemoryProvider, s as MemoryId, t as PreToolCallDecision, u as SDKProvider } from './agent-
|
|
4
|
-
export { v as ActiveMemoryPassArgs, w as ActiveMemoryPassResult, x as AgentMemory, y as AgentSubagentDescription, z as AgentToolDescription, D as BudgetCheck, E as BudgetTotal, F as BudgetUsageEvent, H as CloudEnv, K as CloudRepo, N as ContextBudget, O as ContextManagerKind, Q as ContextSnapshot, R as ContextSource, T as ContextSourceStatus, U as CreateSkillSpec, V as HookName, W as InvalidateCacheOptions, X as MemoryAdapter, Y as MemoryAdapterCapabilities, Z as MemoryContext, _ as MemoryFact, $ as MemoryProviderHandle, a0 as MemoryProviderInitOptions, a1 as MemoryRevision, a2 as MemoryToolSchema, a3 as MemoryTurnMessage, a4 as PersonalityPreset, a5 as PluginContext, a6 as PostAssistantReplyContext, a7 as PostToolCallContext, a8 as PreToolCallContext, a9 as PreUserSendContext, aa as PreUserSendResult, ab as ProviderCapability, ac as ProviderRoute, ad as ProviderTransform, ae as ProviderTransformContext, af as RecordSessionSummaryArgs, ag as ResolvedProviderRoute, ah as RunUntilIterator, ai as SDKAgentPlugins, aj as SDKAgentSkillDetail, ak as SDKAgentSkills, al as SDKArtifact, am as SDKContextManager, an as SDKPluginMetadata, ao as SDKProvidersManager, ap as SessionLifecycleContext, aq as SessionRecord, ar as SessionStore, as as SettingSource, at as Skill, au as SkillsResolver, av as SkillsResolverContext, aw as SystemPromptContext, ax as SystemPromptMemoryFact, ay as SystemPromptSkillRef, az as TelemetrySettings, aA as ToolCallSummary, aB as ToolResultTransformContext, aC as TransformContext, aD as Verdict } from './agent-
|
|
3
|
+
import { A as AgentOptions, L as LocalOptions, P as ProviderRoutingSettings, S as SystemPromptResolver, C as CloudOptions, M as MemorySettings, a as AgentDefinition, b as ContextSettings, c as PluginsSettings, d as SkillsSettings, e as SDKAgent, f as ListAgentsOptions, g as ListResult, h as SDKAgentInfo, G as GetAgentOptions, i as ListRunsOptions, j as GetRunOptions, k as AgentOperationOptions, l as AgentDescription, m as Plugin$1, n as ProviderProfile, I as InlineSkill, J as JudgeResult, o as GoalOptions, p as GoalEvent, q as GoalResult, B as BudgetTracker, r as MemoryProvider, s as MemoryId, t as PreToolCallDecision, u as SDKProvider } from './agent-nLqeXKIX.cjs';
|
|
4
|
+
export { v as ActiveMemoryPassArgs, w as ActiveMemoryPassResult, x as AgentMemory, y as AgentSubagentDescription, z as AgentToolDescription, D as BudgetCheck, E as BudgetTotal, F as BudgetUsageEvent, H as CloudEnv, K as CloudRepo, N as ContextBudget, O as ContextManagerKind, Q as ContextSnapshot, R as ContextSource, T as ContextSourceStatus, U as CreateSkillSpec, V as HookName, W as InvalidateCacheOptions, X as MemoryAdapter, Y as MemoryAdapterCapabilities, Z as MemoryContext, _ as MemoryFact, $ as MemoryProviderHandle, a0 as MemoryProviderInitOptions, a1 as MemoryRevision, a2 as MemoryToolSchema, a3 as MemoryTurnMessage, a4 as PersonalityPreset, a5 as PluginContext, a6 as PostAssistantReplyContext, a7 as PostToolCallContext, a8 as PreToolCallContext, a9 as PreUserSendContext, aa as PreUserSendResult, ab as ProviderCapability, ac as ProviderRoute, ad as ProviderTransform, ae as ProviderTransformContext, af as RecordSessionSummaryArgs, ag as ResolvedProviderRoute, ah as RunUntilIterator, ai as SDKAgentPlugins, aj as SDKAgentSkillDetail, ak as SDKAgentSkills, al as SDKArtifact, am as SDKContextManager, an as SDKPluginMetadata, ao as SDKProvidersManager, ap as SessionLifecycleContext, aq as SessionRecord, ar as SessionStore, as as SettingSource, at as Skill, au as SkillsResolver, av as SkillsResolverContext, aw as SystemPromptContext, ax as SystemPromptMemoryFact, ay as SystemPromptSkillRef, az as TelemetrySettings, aA as ToolCallSummary, aB as ToolResultTransformContext, aC as TransformContext, aD as Verdict } from './agent-nLqeXKIX.cjs';
|
|
5
5
|
import { R as RunResult, M as ModelSelection, C as CustomTool, a as McpServerConfig, T as ToolResultContentBlock, b as Run, P as Processor, c as PermissionMode, d as PermissionEngine, e as RunEventSink, S as SDKMessage } from './run-C8FBAC8o.cjs';
|
|
6
6
|
export { A as AgentConversationTurn, f as AssistantMessage, g as CompletionCheck, h as CompletionCheckResult, i as ConversationStep, j as ConversationTurn, k as CostBreakdown, l as CostSource, m as CostStatus, D as DoomLoopThresholds, G as GenerateOptions, n as GenerateRunResult, I as ImageBlock, o as InputProcessorContext, p as InteractionUpdate, q as McpAuthConfig, r as McpHttpServerConfig, s as McpOAuthConfig, t as McpStdioServerConfig, u as MessageOrigin, v as ModelParameterValue, O as OutputProcessorContext, w as PartialToolCallUpdate, x as PermissionAction, y as PermissionEngineOptions, z as PermissionRule, B as ProcessorControls, E as ProcessorTripwire, F as ProcessorViolation, H as RunCompactBoundaryEvent, J as RunCompletionCheckEvent, K as RunErrorDetail, L as RunEvent, N as RunGitInfo, Q as RunOperation, U as RunPermissionDeniedEvent, V as RunRateLimitEvent, W as RunStatus, X as RunTaskCompletedEvent, Y as RunTaskStartedEvent, Z as RunTaskUpdatedEvent, _ as RunTimelineEvent, $ as RunToCompletionOptions, a0 as RunToCompletionResult, a1 as RunToolProgressEvent, a2 as RunTripwireEvent, a3 as SDKAssistantMessage, a4 as SDKImage, a5 as SDKImageDimension, a6 as SDKObjectDelta, a7 as SDKRequestMessage, a8 as SDKStatusMessage, a9 as SDKSystemMessage, aa as SDKTaskMessage, ab as SDKThinkingMessage, ac as SDKToolUseMessage, ad as SDKUserMessage, ae as SDKUserMessageEvent, af as SendOptions, ag as ShellCommand, ah as ShellConversationTurn, ai as ShellOutput, aj as ShellOutputDeltaUpdate, ak as StepCompletedUpdate, al as StepStartedUpdate, am as StreamToCompletionResult, an as SummaryCompletedUpdate, ao as SummaryStartedUpdate, ap as SummaryUpdate, aq as TextBlock, ar as TextDeltaUpdate, as as ThinkingCompletedUpdate, at as ThinkingDeltaUpdate, au as ThinkingMessage, av as TokenDeltaUpdate, aw as TokenUsage, ax as ToolCall, ay as ToolCallCompletedUpdate, az as ToolCallStartedUpdate, aA as ToolContextMessage, aB as ToolResult, aC as ToolResultGuardOptions, aD as ToolUseBlock, aE as TurnEndedUpdate, aF as UserMessage, aG as UserMessageAppendedUpdate, aH as applyMode, aI as emitRunEvent } from './run-C8FBAC8o.cjs';
|
|
7
7
|
import * as zod from 'zod';
|
|
8
8
|
import { ZodType, z } from 'zod';
|
|
9
|
-
import { S as StepResult } from './cron-
|
|
10
|
-
export { C as Cron, a as CronCreateOptions, b as CronGetOptions, c as CronJob, d as CronJobStatus, e as CronListOptions, f as CronOperationOptions, g as CronRunOptions, h as CronRuntime, i as CronSchedulerStatus, j as CronStartOptions } from './cron-
|
|
9
|
+
import { S as StepResult } from './cron-DFDdCdMM.cjs';
|
|
10
|
+
export { C as Cron, a as CronCreateOptions, b as CronGetOptions, c as CronJob, d as CronJobStatus, e as CronListOptions, f as CronOperationOptions, g as CronRunOptions, h as CronRuntime, i as CronSchedulerStatus, j as CronStartOptions } from './cron-DFDdCdMM.cjs';
|
|
11
11
|
|
|
12
12
|
/**
|
|
13
13
|
* Public compaction / context-management helpers (M2-1, extended V3-3).
|
|
@@ -44,9 +44,9 @@ interface CompressibleMessage {
|
|
|
44
44
|
}
|
|
45
45
|
|
|
46
46
|
/**
|
|
47
|
-
* M50 (agent-builder) — session-transcript compaction
|
|
47
|
+
* M50 (agent-builder) — session-transcript compaction.
|
|
48
48
|
*
|
|
49
|
-
*
|
|
49
|
+
* The mechanism:
|
|
50
50
|
* - the replacement history = recent USER messages verbatim (newest→oldest under a token budget;
|
|
51
51
|
* prior summaries filtered by marker) + ONE summary message with a textual marker prefix,
|
|
52
52
|
* injected as `role:"user"` (`build_compacted_history`, compact.rs:589-663);
|
|
@@ -570,7 +570,22 @@ declare class Agent {
|
|
|
570
570
|
*/
|
|
571
571
|
static create(options: AgentOptions): Promise<SDKAgent>;
|
|
572
572
|
/**
|
|
573
|
-
* One-shot prompt: create an agent, send a single message, wait, dispose
|
|
573
|
+
* One-shot prompt: create an agent, send a single message, wait, **dispose**.
|
|
574
|
+
*
|
|
575
|
+
* `Agent.prompt` is STATIC and owns the agent's whole lifecycle. To send to an
|
|
576
|
+
* agent you already hold, use the instance method — `agent.send(message)` —
|
|
577
|
+
* which keeps the conversation and does not dispose anything:
|
|
578
|
+
*
|
|
579
|
+
* ```ts
|
|
580
|
+
* const agent = await Agent.create({ ... });
|
|
581
|
+
* const run = await agent.send("first"); // NOT agent.prompt(...)
|
|
582
|
+
* const run2 = await agent.send("follow-up"); // full context retained
|
|
583
|
+
* ```
|
|
584
|
+
*
|
|
585
|
+
* There is no `agent.prompt()` (#302). The natural sentence for the second
|
|
586
|
+
* operation is "prompt the agent", so it is the method people reach for; the
|
|
587
|
+
* two differ in whether the agent survives the call, which is why they do not
|
|
588
|
+
* share a name.
|
|
574
589
|
*
|
|
575
590
|
* When `options.throwOnError === true`, rejects with `AgentRunError` if
|
|
576
591
|
* the run terminates with `status: 'error'` (instead of resolving with the
|
|
@@ -1743,6 +1758,47 @@ declare class NoopMemoryProvider {
|
|
|
1743
1758
|
static create(): MemoryProvider;
|
|
1744
1759
|
}
|
|
1745
1760
|
|
|
1761
|
+
interface OTelSpan {
|
|
1762
|
+
setAttribute(key: string, value: string | number | boolean): void;
|
|
1763
|
+
setAttributes(attrs: Record<string, string | number | boolean | undefined>): void;
|
|
1764
|
+
addEvent(name: string, attrs?: Record<string, string | number | boolean>): void;
|
|
1765
|
+
setStatus(status: {
|
|
1766
|
+
code: number;
|
|
1767
|
+
message?: string;
|
|
1768
|
+
}): void;
|
|
1769
|
+
recordException(err: unknown): void;
|
|
1770
|
+
end(endTime?: number): void;
|
|
1771
|
+
spanContext(): {
|
|
1772
|
+
traceId: string;
|
|
1773
|
+
spanId: string;
|
|
1774
|
+
};
|
|
1775
|
+
isRecording(): boolean;
|
|
1776
|
+
}
|
|
1777
|
+
/**
|
|
1778
|
+
* Telemetry handle returned by {@link createTelemetry}. Callers use this to
|
|
1779
|
+
* start spans, add events, etc. When telemetry is disabled OR OTel is not
|
|
1780
|
+
* installed, every method is a safe no-op.
|
|
1781
|
+
*
|
|
1782
|
+
*/
|
|
1783
|
+
interface TelemetryHandle {
|
|
1784
|
+
readonly enabled: boolean;
|
|
1785
|
+
readonly includeContent: boolean;
|
|
1786
|
+
/** Start a span. Returns a no-op span if telemetry is disabled. */
|
|
1787
|
+
startSpan(name: string, attrs?: Record<string, string | number | boolean>): OTelSpan;
|
|
1788
|
+
/** Start a child span nested under `parent` (M3 #64). `undefined` parent →
|
|
1789
|
+
* a root span (parentless callers, or telemetry with no run span). */
|
|
1790
|
+
startChildSpan(parent: OTelSpan | undefined, name: string, attrs?: Record<string, string | number | boolean>): OTelSpan;
|
|
1791
|
+
/**
|
|
1792
|
+
* Record a histogram observation. T0.1 ships
|
|
1793
|
+
* `theokit_memory_recall_duration_ms`; downstream tasks add more.
|
|
1794
|
+
* No-op when telemetry is disabled or when `@opentelemetry/api`'s metrics
|
|
1795
|
+
* namespace is unavailable. ADR D34 — exporter errors are swallowed by `safe()`.
|
|
1796
|
+
*/
|
|
1797
|
+
recordHistogram(name: string, valueMs: number, attrs?: Record<string, string | number | boolean>): void;
|
|
1798
|
+
/** End all open spans on this handle (best-effort, used by Agent.dispose). */
|
|
1799
|
+
endAll(): void;
|
|
1800
|
+
}
|
|
1801
|
+
|
|
1746
1802
|
/**
|
|
1747
1803
|
* `JobQueue` — background job queue with status tracking, cancellation, and an
|
|
1748
1804
|
* optional concurrency bound.
|
|
@@ -3211,4 +3267,4 @@ interface WiringRecordInput<K extends string> {
|
|
|
3211
3267
|
*/
|
|
3212
3268
|
declare function recordWiring<K extends string>(input: WiringRecordInput<K>): Readonly<Record<K, WiredEntity>>;
|
|
3213
3269
|
|
|
3214
|
-
export { Agent, AgentBuilder, AgentDefinition, AgentDescription, AgentFactory, AgentOperationOptions, AgentOptions, type AgentPromptResult, type AgentRegistryOptions, type ApprovalDecision, type ApprovalInput, type ApprovalMode, type ApprovalOutcome, type ApprovalReason, type BatchItem, type BatchOptions, type BatchProgress, type BatchResult, type BlastRadiusDecision, type BlastRadiusInput, type BlastRadiusOutcome, type BlastRadiusReason, Budget, BudgetHandle, BudgetOptions, BudgetSnapshot, BudgetTracker, CloudOptions, ContextSettings, type CounterBudgetTrackerOptions, type CredentialInput, type CredentialReport, CustomTool, type DeclaredAction, type DeclaredLayer, type DeepPartial, type DefineProviderOptions, type DefineToolSpec, type DiagnosticsSink, type DreamingSweepOptions, type DreamingSweepResult, type EnvOptOut, type EnvReachabilityAudit, type EnvReachabilityInput, ErrorMetadata, EventBus, type EvictReason, GOAL_CONTINUATION_MARKER, GenerateObjectError, type GenerateObjectOptions, type GenerateObjectResult, GetAgentOptions, GetRunOptions, GoalEvent, type GoalLoopAgent, GoalOptions, GoalResult, InlineSkill, JobQueue, type JobQueueOptions, JudgeCredentialError, JudgeResult, type KeepReason, type KeptArtifact, LayerOrderError, type LayerValues, ListAgentsOptions, ListResult, ListRunsOptions, LiveAgentRegistry, LiveSessionError, type LiveSessionReason, LocalOptions, McpServerConfig, Memory, MemoryId, MemoryProvider, MemorySettings, type MigrateOptions, type MigrateResult, type ModelListItem, type ModelParameterDefinition, ModelSelection, type ModelVariant, NoopMemoryProvider, type NormalizedJsonSchema, PermissionEngine, type PermissionGate, type PermissionGateContext, type PermissionGateDecision, PermissionMode, PermissionPlugin, type PermissionPluginOptions, Plugin, PluginsSettings, PreToolCallDecision, Processor, Provider, ProviderProfile, ProviderRoutingSettings, type ReapPlan, type ReapPlanInput, type ReapableArtifact, type RetentionPolicy, RetentionPolicyError, Run, RunEventSink, RunResult, SDKAgent, SDKAgentInfo, SDKMessage, type SDKModel, SDKProvider, type SDKRepository, type SDKUser, SOVEREIGN_ENV_KEYS, Security, type SecurityFloorInput, type SessionMessage, type SessionMessagePart, type SessionScope, type ShareGptMessage, type ShareGptTrajectory, SkillReadTool, SkillsSettings, type SovereignEnvKey, Squad, type SquadOptions, type SquadRun, StreamObjectError, type StreamObjectEvent, type StreamObjectOptions, SystemPromptResolver, TASK_RESERVED_PREFIXES, Task, type TaskCancelResult, type TaskConfigureOptions, type TaskEvent, type TaskFilter, type TaskHandle, type TaskKind, type TaskState, type TaskStoreOptions, type TaskSubmitOptions, type TaskWorkContext, type TaskWorkFn, Theokit, TheokitAgentError, type TheokitRequestOptions, TokenLimiter, type TokenLimiterOptions, Tool, ToolError, ToolResultContentBlock, type TrustLevel, type TrustPosture, type TrustPostureInput, type TrustSource, UngatedCapabilityError, UnicodeNormalizer, type UnicodeNormalizerOptions, UsageAccumulator, type WiredEntity, type WiringRecordInput, type WithBlastRadius, applySecurityFloor, auditEnvReachability, chargeAndCheckThresholds, computeCost, createCounterBudgetTracker, decideApproval, describeAction, describeCredential, estimateTokens, evaluateBlastRadius, extractRawId, foldLayers, getPricingEntry, guardSessionDestruction, inferApiMode, isValidTaskId, loadProjectEnv, migrateSqliteToLance, mkMemoryId, normalizeSchema, normalizeUsage, planReaping, preflightCheck, recordWiring, resolveTrustPosture, runGoalLoop, scopedConversationId, sessionScopePrefix, setDiagnosticsSink, toShareGptTrajectory, verifyLayerOrdering, withBlastRadius, withCwdMutex };
|
|
3270
|
+
export { Agent, AgentBuilder, AgentDefinition, AgentDescription, AgentFactory, AgentOperationOptions, AgentOptions, type AgentPromptResult, type AgentRegistryOptions, type ApprovalDecision, type ApprovalInput, type ApprovalMode, type ApprovalOutcome, type ApprovalReason, type BatchItem, type BatchOptions, type BatchProgress, type BatchResult, type BlastRadiusDecision, type BlastRadiusInput, type BlastRadiusOutcome, type BlastRadiusReason, Budget, BudgetHandle, BudgetOptions, BudgetSnapshot, BudgetTracker, CloudOptions, ContextSettings, type CounterBudgetTrackerOptions, type CredentialInput, type CredentialReport, CustomTool, type DeclaredAction, type DeclaredLayer, type DeepPartial, type DefineProviderOptions, type DefineToolSpec, type DiagnosticsSink, type DreamingSweepOptions, type DreamingSweepResult, type EnvOptOut, type EnvReachabilityAudit, type EnvReachabilityInput, ErrorMetadata, EventBus, type EvictReason, GOAL_CONTINUATION_MARKER, GenerateObjectError, type GenerateObjectOptions, type GenerateObjectResult, GetAgentOptions, GetRunOptions, GoalEvent, type GoalLoopAgent, GoalOptions, GoalResult, InlineSkill, JobQueue, type JobQueueOptions, JudgeCredentialError, JudgeResult, type KeepReason, type KeptArtifact, LayerOrderError, type LayerValues, ListAgentsOptions, ListResult, ListRunsOptions, LiveAgentRegistry, LiveSessionError, type LiveSessionReason, LocalOptions, McpServerConfig, Memory, MemoryId, MemoryProvider, MemorySettings, type MigrateOptions, type MigrateResult, type ModelListItem, type ModelParameterDefinition, ModelSelection, type ModelVariant, NoopMemoryProvider, type NormalizedJsonSchema, type OTelSpan, PermissionEngine, type PermissionGate, type PermissionGateContext, type PermissionGateDecision, PermissionMode, PermissionPlugin, type PermissionPluginOptions, Plugin, PluginsSettings, PreToolCallDecision, Processor, Provider, ProviderProfile, ProviderRoutingSettings, type ReapPlan, type ReapPlanInput, type ReapableArtifact, type RetentionPolicy, RetentionPolicyError, Run, RunEventSink, RunResult, SDKAgent, SDKAgentInfo, SDKMessage, type SDKModel, SDKProvider, type SDKRepository, type SDKUser, SOVEREIGN_ENV_KEYS, Security, type SecurityFloorInput, type SessionMessage, type SessionMessagePart, type SessionScope, type ShareGptMessage, type ShareGptTrajectory, SkillReadTool, SkillsSettings, type SovereignEnvKey, Squad, type SquadOptions, type SquadRun, StreamObjectError, type StreamObjectEvent, type StreamObjectOptions, SystemPromptResolver, TASK_RESERVED_PREFIXES, Task, type TaskCancelResult, type TaskConfigureOptions, type TaskEvent, type TaskFilter, type TaskHandle, type TaskKind, type TaskState, type TaskStoreOptions, type TaskSubmitOptions, type TaskWorkContext, type TaskWorkFn, type TelemetryHandle, Theokit, TheokitAgentError, type TheokitRequestOptions, TokenLimiter, type TokenLimiterOptions, Tool, ToolError, ToolResultContentBlock, type TrustLevel, type TrustPosture, type TrustPostureInput, type TrustSource, UngatedCapabilityError, UnicodeNormalizer, type UnicodeNormalizerOptions, UsageAccumulator, type WiredEntity, type WiringRecordInput, type WithBlastRadius, applySecurityFloor, auditEnvReachability, chargeAndCheckThresholds, computeCost, createCounterBudgetTracker, decideApproval, describeAction, describeCredential, estimateTokens, evaluateBlastRadius, extractRawId, foldLayers, getPricingEntry, guardSessionDestruction, inferApiMode, isValidTaskId, loadProjectEnv, migrateSqliteToLance, mkMemoryId, normalizeSchema, normalizeUsage, planReaping, preflightCheck, recordWiring, resolveTrustPosture, runGoalLoop, scopedConversationId, sessionScopePrefix, setDiagnosticsSink, toShareGptTrajectory, verifyLayerOrdering, withBlastRadius, withCwdMutex };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { T as TheokitAgentError, B as BudgetOptions, a as BudgetHandle, b as BudgetSnapshot, E as ErrorMetadata } from './errors-CHllybaU.js';
|
|
2
2
|
export { A as AgentDisposedError, c as AgentRunError, d as AgentRunErrorCode, e as AuthenticationError, f as BudgetExceedEvent, g as BudgetExceededError, h as BudgetLimit, i as BudgetMode, j as BudgetScope, k as BudgetThresholdEvent, l as BudgetWindow, C as ConfigurationError, m as ErrorCode, I as IntegrationNotConnectedError, n as InvalidTaskIdError, M as MemoryAdapterError, o as MemoryAdapterErrorCode, N as NetworkError, R as RateLimitError, p as TaskNotFoundError, U as UnknownAgentError, q as UnsupportedBudgetOperationError, r as UnsupportedRunOperationError, s as UnsupportedTaskOperationError, t as isTransientError } from './errors-CHllybaU.js';
|
|
3
|
-
import { A as AgentOptions, L as LocalOptions, P as ProviderRoutingSettings, S as SystemPromptResolver, C as CloudOptions, M as MemorySettings, a as AgentDefinition, b as ContextSettings, c as PluginsSettings, d as SkillsSettings, e as SDKAgent, f as ListAgentsOptions, g as ListResult, h as SDKAgentInfo, G as GetAgentOptions, i as ListRunsOptions, j as GetRunOptions, k as AgentOperationOptions, l as AgentDescription, m as Plugin$1, n as ProviderProfile, I as InlineSkill, J as JudgeResult, o as GoalOptions, p as GoalEvent, q as GoalResult, B as BudgetTracker, r as MemoryProvider, s as MemoryId, t as PreToolCallDecision, u as SDKProvider } from './agent-
|
|
4
|
-
export { v as ActiveMemoryPassArgs, w as ActiveMemoryPassResult, x as AgentMemory, y as AgentSubagentDescription, z as AgentToolDescription, D as BudgetCheck, E as BudgetTotal, F as BudgetUsageEvent, H as CloudEnv, K as CloudRepo, N as ContextBudget, O as ContextManagerKind, Q as ContextSnapshot, R as ContextSource, T as ContextSourceStatus, U as CreateSkillSpec, V as HookName, W as InvalidateCacheOptions, X as MemoryAdapter, Y as MemoryAdapterCapabilities, Z as MemoryContext, _ as MemoryFact, $ as MemoryProviderHandle, a0 as MemoryProviderInitOptions, a1 as MemoryRevision, a2 as MemoryToolSchema, a3 as MemoryTurnMessage, a4 as PersonalityPreset, a5 as PluginContext, a6 as PostAssistantReplyContext, a7 as PostToolCallContext, a8 as PreToolCallContext, a9 as PreUserSendContext, aa as PreUserSendResult, ab as ProviderCapability, ac as ProviderRoute, ad as ProviderTransform, ae as ProviderTransformContext, af as RecordSessionSummaryArgs, ag as ResolvedProviderRoute, ah as RunUntilIterator, ai as SDKAgentPlugins, aj as SDKAgentSkillDetail, ak as SDKAgentSkills, al as SDKArtifact, am as SDKContextManager, an as SDKPluginMetadata, ao as SDKProvidersManager, ap as SessionLifecycleContext, aq as SessionRecord, ar as SessionStore, as as SettingSource, at as Skill, au as SkillsResolver, av as SkillsResolverContext, aw as SystemPromptContext, ax as SystemPromptMemoryFact, ay as SystemPromptSkillRef, az as TelemetrySettings, aA as ToolCallSummary, aB as ToolResultTransformContext, aC as TransformContext, aD as Verdict } from './agent-
|
|
3
|
+
import { A as AgentOptions, L as LocalOptions, P as ProviderRoutingSettings, S as SystemPromptResolver, C as CloudOptions, M as MemorySettings, a as AgentDefinition, b as ContextSettings, c as PluginsSettings, d as SkillsSettings, e as SDKAgent, f as ListAgentsOptions, g as ListResult, h as SDKAgentInfo, G as GetAgentOptions, i as ListRunsOptions, j as GetRunOptions, k as AgentOperationOptions, l as AgentDescription, m as Plugin$1, n as ProviderProfile, I as InlineSkill, J as JudgeResult, o as GoalOptions, p as GoalEvent, q as GoalResult, B as BudgetTracker, r as MemoryProvider, s as MemoryId, t as PreToolCallDecision, u as SDKProvider } from './agent-B9HXlwID.js';
|
|
4
|
+
export { v as ActiveMemoryPassArgs, w as ActiveMemoryPassResult, x as AgentMemory, y as AgentSubagentDescription, z as AgentToolDescription, D as BudgetCheck, E as BudgetTotal, F as BudgetUsageEvent, H as CloudEnv, K as CloudRepo, N as ContextBudget, O as ContextManagerKind, Q as ContextSnapshot, R as ContextSource, T as ContextSourceStatus, U as CreateSkillSpec, V as HookName, W as InvalidateCacheOptions, X as MemoryAdapter, Y as MemoryAdapterCapabilities, Z as MemoryContext, _ as MemoryFact, $ as MemoryProviderHandle, a0 as MemoryProviderInitOptions, a1 as MemoryRevision, a2 as MemoryToolSchema, a3 as MemoryTurnMessage, a4 as PersonalityPreset, a5 as PluginContext, a6 as PostAssistantReplyContext, a7 as PostToolCallContext, a8 as PreToolCallContext, a9 as PreUserSendContext, aa as PreUserSendResult, ab as ProviderCapability, ac as ProviderRoute, ad as ProviderTransform, ae as ProviderTransformContext, af as RecordSessionSummaryArgs, ag as ResolvedProviderRoute, ah as RunUntilIterator, ai as SDKAgentPlugins, aj as SDKAgentSkillDetail, ak as SDKAgentSkills, al as SDKArtifact, am as SDKContextManager, an as SDKPluginMetadata, ao as SDKProvidersManager, ap as SessionLifecycleContext, aq as SessionRecord, ar as SessionStore, as as SettingSource, at as Skill, au as SkillsResolver, av as SkillsResolverContext, aw as SystemPromptContext, ax as SystemPromptMemoryFact, ay as SystemPromptSkillRef, az as TelemetrySettings, aA as ToolCallSummary, aB as ToolResultTransformContext, aC as TransformContext, aD as Verdict } from './agent-B9HXlwID.js';
|
|
5
5
|
import { R as RunResult, M as ModelSelection, C as CustomTool, a as McpServerConfig, T as ToolResultContentBlock, b as Run, P as Processor, c as PermissionMode, d as PermissionEngine, e as RunEventSink, S as SDKMessage } from './run-C8FBAC8o.js';
|
|
6
6
|
export { A as AgentConversationTurn, f as AssistantMessage, g as CompletionCheck, h as CompletionCheckResult, i as ConversationStep, j as ConversationTurn, k as CostBreakdown, l as CostSource, m as CostStatus, D as DoomLoopThresholds, G as GenerateOptions, n as GenerateRunResult, I as ImageBlock, o as InputProcessorContext, p as InteractionUpdate, q as McpAuthConfig, r as McpHttpServerConfig, s as McpOAuthConfig, t as McpStdioServerConfig, u as MessageOrigin, v as ModelParameterValue, O as OutputProcessorContext, w as PartialToolCallUpdate, x as PermissionAction, y as PermissionEngineOptions, z as PermissionRule, B as ProcessorControls, E as ProcessorTripwire, F as ProcessorViolation, H as RunCompactBoundaryEvent, J as RunCompletionCheckEvent, K as RunErrorDetail, L as RunEvent, N as RunGitInfo, Q as RunOperation, U as RunPermissionDeniedEvent, V as RunRateLimitEvent, W as RunStatus, X as RunTaskCompletedEvent, Y as RunTaskStartedEvent, Z as RunTaskUpdatedEvent, _ as RunTimelineEvent, $ as RunToCompletionOptions, a0 as RunToCompletionResult, a1 as RunToolProgressEvent, a2 as RunTripwireEvent, a3 as SDKAssistantMessage, a4 as SDKImage, a5 as SDKImageDimension, a6 as SDKObjectDelta, a7 as SDKRequestMessage, a8 as SDKStatusMessage, a9 as SDKSystemMessage, aa as SDKTaskMessage, ab as SDKThinkingMessage, ac as SDKToolUseMessage, ad as SDKUserMessage, ae as SDKUserMessageEvent, af as SendOptions, ag as ShellCommand, ah as ShellConversationTurn, ai as ShellOutput, aj as ShellOutputDeltaUpdate, ak as StepCompletedUpdate, al as StepStartedUpdate, am as StreamToCompletionResult, an as SummaryCompletedUpdate, ao as SummaryStartedUpdate, ap as SummaryUpdate, aq as TextBlock, ar as TextDeltaUpdate, as as ThinkingCompletedUpdate, at as ThinkingDeltaUpdate, au as ThinkingMessage, av as TokenDeltaUpdate, aw as TokenUsage, ax as ToolCall, ay as ToolCallCompletedUpdate, az as ToolCallStartedUpdate, aA as ToolContextMessage, aB as ToolResult, aC as ToolResultGuardOptions, aD as ToolUseBlock, aE as TurnEndedUpdate, aF as UserMessage, aG as UserMessageAppendedUpdate, aH as applyMode, aI as emitRunEvent } from './run-C8FBAC8o.js';
|
|
7
7
|
import * as zod from 'zod';
|
|
8
8
|
import { ZodType, z } from 'zod';
|
|
9
|
-
import { S as StepResult } from './cron-
|
|
10
|
-
export { C as Cron, a as CronCreateOptions, b as CronGetOptions, c as CronJob, d as CronJobStatus, e as CronListOptions, f as CronOperationOptions, g as CronRunOptions, h as CronRuntime, i as CronSchedulerStatus, j as CronStartOptions } from './cron-
|
|
9
|
+
import { S as StepResult } from './cron-BMjgFH-_.js';
|
|
10
|
+
export { C as Cron, a as CronCreateOptions, b as CronGetOptions, c as CronJob, d as CronJobStatus, e as CronListOptions, f as CronOperationOptions, g as CronRunOptions, h as CronRuntime, i as CronSchedulerStatus, j as CronStartOptions } from './cron-BMjgFH-_.js';
|
|
11
11
|
|
|
12
12
|
/**
|
|
13
13
|
* Public compaction / context-management helpers (M2-1, extended V3-3).
|
|
@@ -44,9 +44,9 @@ interface CompressibleMessage {
|
|
|
44
44
|
}
|
|
45
45
|
|
|
46
46
|
/**
|
|
47
|
-
* M50 (agent-builder) — session-transcript compaction
|
|
47
|
+
* M50 (agent-builder) — session-transcript compaction.
|
|
48
48
|
*
|
|
49
|
-
*
|
|
49
|
+
* The mechanism:
|
|
50
50
|
* - the replacement history = recent USER messages verbatim (newest→oldest under a token budget;
|
|
51
51
|
* prior summaries filtered by marker) + ONE summary message with a textual marker prefix,
|
|
52
52
|
* injected as `role:"user"` (`build_compacted_history`, compact.rs:589-663);
|
|
@@ -570,7 +570,22 @@ declare class Agent {
|
|
|
570
570
|
*/
|
|
571
571
|
static create(options: AgentOptions): Promise<SDKAgent>;
|
|
572
572
|
/**
|
|
573
|
-
* One-shot prompt: create an agent, send a single message, wait, dispose
|
|
573
|
+
* One-shot prompt: create an agent, send a single message, wait, **dispose**.
|
|
574
|
+
*
|
|
575
|
+
* `Agent.prompt` is STATIC and owns the agent's whole lifecycle. To send to an
|
|
576
|
+
* agent you already hold, use the instance method — `agent.send(message)` —
|
|
577
|
+
* which keeps the conversation and does not dispose anything:
|
|
578
|
+
*
|
|
579
|
+
* ```ts
|
|
580
|
+
* const agent = await Agent.create({ ... });
|
|
581
|
+
* const run = await agent.send("first"); // NOT agent.prompt(...)
|
|
582
|
+
* const run2 = await agent.send("follow-up"); // full context retained
|
|
583
|
+
* ```
|
|
584
|
+
*
|
|
585
|
+
* There is no `agent.prompt()` (#302). The natural sentence for the second
|
|
586
|
+
* operation is "prompt the agent", so it is the method people reach for; the
|
|
587
|
+
* two differ in whether the agent survives the call, which is why they do not
|
|
588
|
+
* share a name.
|
|
574
589
|
*
|
|
575
590
|
* When `options.throwOnError === true`, rejects with `AgentRunError` if
|
|
576
591
|
* the run terminates with `status: 'error'` (instead of resolving with the
|
|
@@ -1743,6 +1758,47 @@ declare class NoopMemoryProvider {
|
|
|
1743
1758
|
static create(): MemoryProvider;
|
|
1744
1759
|
}
|
|
1745
1760
|
|
|
1761
|
+
interface OTelSpan {
|
|
1762
|
+
setAttribute(key: string, value: string | number | boolean): void;
|
|
1763
|
+
setAttributes(attrs: Record<string, string | number | boolean | undefined>): void;
|
|
1764
|
+
addEvent(name: string, attrs?: Record<string, string | number | boolean>): void;
|
|
1765
|
+
setStatus(status: {
|
|
1766
|
+
code: number;
|
|
1767
|
+
message?: string;
|
|
1768
|
+
}): void;
|
|
1769
|
+
recordException(err: unknown): void;
|
|
1770
|
+
end(endTime?: number): void;
|
|
1771
|
+
spanContext(): {
|
|
1772
|
+
traceId: string;
|
|
1773
|
+
spanId: string;
|
|
1774
|
+
};
|
|
1775
|
+
isRecording(): boolean;
|
|
1776
|
+
}
|
|
1777
|
+
/**
|
|
1778
|
+
* Telemetry handle returned by {@link createTelemetry}. Callers use this to
|
|
1779
|
+
* start spans, add events, etc. When telemetry is disabled OR OTel is not
|
|
1780
|
+
* installed, every method is a safe no-op.
|
|
1781
|
+
*
|
|
1782
|
+
*/
|
|
1783
|
+
interface TelemetryHandle {
|
|
1784
|
+
readonly enabled: boolean;
|
|
1785
|
+
readonly includeContent: boolean;
|
|
1786
|
+
/** Start a span. Returns a no-op span if telemetry is disabled. */
|
|
1787
|
+
startSpan(name: string, attrs?: Record<string, string | number | boolean>): OTelSpan;
|
|
1788
|
+
/** Start a child span nested under `parent` (M3 #64). `undefined` parent →
|
|
1789
|
+
* a root span (parentless callers, or telemetry with no run span). */
|
|
1790
|
+
startChildSpan(parent: OTelSpan | undefined, name: string, attrs?: Record<string, string | number | boolean>): OTelSpan;
|
|
1791
|
+
/**
|
|
1792
|
+
* Record a histogram observation. T0.1 ships
|
|
1793
|
+
* `theokit_memory_recall_duration_ms`; downstream tasks add more.
|
|
1794
|
+
* No-op when telemetry is disabled or when `@opentelemetry/api`'s metrics
|
|
1795
|
+
* namespace is unavailable. ADR D34 — exporter errors are swallowed by `safe()`.
|
|
1796
|
+
*/
|
|
1797
|
+
recordHistogram(name: string, valueMs: number, attrs?: Record<string, string | number | boolean>): void;
|
|
1798
|
+
/** End all open spans on this handle (best-effort, used by Agent.dispose). */
|
|
1799
|
+
endAll(): void;
|
|
1800
|
+
}
|
|
1801
|
+
|
|
1746
1802
|
/**
|
|
1747
1803
|
* `JobQueue` — background job queue with status tracking, cancellation, and an
|
|
1748
1804
|
* optional concurrency bound.
|
|
@@ -3211,4 +3267,4 @@ interface WiringRecordInput<K extends string> {
|
|
|
3211
3267
|
*/
|
|
3212
3268
|
declare function recordWiring<K extends string>(input: WiringRecordInput<K>): Readonly<Record<K, WiredEntity>>;
|
|
3213
3269
|
|
|
3214
|
-
export { Agent, AgentBuilder, AgentDefinition, AgentDescription, AgentFactory, AgentOperationOptions, AgentOptions, type AgentPromptResult, type AgentRegistryOptions, type ApprovalDecision, type ApprovalInput, type ApprovalMode, type ApprovalOutcome, type ApprovalReason, type BatchItem, type BatchOptions, type BatchProgress, type BatchResult, type BlastRadiusDecision, type BlastRadiusInput, type BlastRadiusOutcome, type BlastRadiusReason, Budget, BudgetHandle, BudgetOptions, BudgetSnapshot, BudgetTracker, CloudOptions, ContextSettings, type CounterBudgetTrackerOptions, type CredentialInput, type CredentialReport, CustomTool, type DeclaredAction, type DeclaredLayer, type DeepPartial, type DefineProviderOptions, type DefineToolSpec, type DiagnosticsSink, type DreamingSweepOptions, type DreamingSweepResult, type EnvOptOut, type EnvReachabilityAudit, type EnvReachabilityInput, ErrorMetadata, EventBus, type EvictReason, GOAL_CONTINUATION_MARKER, GenerateObjectError, type GenerateObjectOptions, type GenerateObjectResult, GetAgentOptions, GetRunOptions, GoalEvent, type GoalLoopAgent, GoalOptions, GoalResult, InlineSkill, JobQueue, type JobQueueOptions, JudgeCredentialError, JudgeResult, type KeepReason, type KeptArtifact, LayerOrderError, type LayerValues, ListAgentsOptions, ListResult, ListRunsOptions, LiveAgentRegistry, LiveSessionError, type LiveSessionReason, LocalOptions, McpServerConfig, Memory, MemoryId, MemoryProvider, MemorySettings, type MigrateOptions, type MigrateResult, type ModelListItem, type ModelParameterDefinition, ModelSelection, type ModelVariant, NoopMemoryProvider, type NormalizedJsonSchema, PermissionEngine, type PermissionGate, type PermissionGateContext, type PermissionGateDecision, PermissionMode, PermissionPlugin, type PermissionPluginOptions, Plugin, PluginsSettings, PreToolCallDecision, Processor, Provider, ProviderProfile, ProviderRoutingSettings, type ReapPlan, type ReapPlanInput, type ReapableArtifact, type RetentionPolicy, RetentionPolicyError, Run, RunEventSink, RunResult, SDKAgent, SDKAgentInfo, SDKMessage, type SDKModel, SDKProvider, type SDKRepository, type SDKUser, SOVEREIGN_ENV_KEYS, Security, type SecurityFloorInput, type SessionMessage, type SessionMessagePart, type SessionScope, type ShareGptMessage, type ShareGptTrajectory, SkillReadTool, SkillsSettings, type SovereignEnvKey, Squad, type SquadOptions, type SquadRun, StreamObjectError, type StreamObjectEvent, type StreamObjectOptions, SystemPromptResolver, TASK_RESERVED_PREFIXES, Task, type TaskCancelResult, type TaskConfigureOptions, type TaskEvent, type TaskFilter, type TaskHandle, type TaskKind, type TaskState, type TaskStoreOptions, type TaskSubmitOptions, type TaskWorkContext, type TaskWorkFn, Theokit, TheokitAgentError, type TheokitRequestOptions, TokenLimiter, type TokenLimiterOptions, Tool, ToolError, ToolResultContentBlock, type TrustLevel, type TrustPosture, type TrustPostureInput, type TrustSource, UngatedCapabilityError, UnicodeNormalizer, type UnicodeNormalizerOptions, UsageAccumulator, type WiredEntity, type WiringRecordInput, type WithBlastRadius, applySecurityFloor, auditEnvReachability, chargeAndCheckThresholds, computeCost, createCounterBudgetTracker, decideApproval, describeAction, describeCredential, estimateTokens, evaluateBlastRadius, extractRawId, foldLayers, getPricingEntry, guardSessionDestruction, inferApiMode, isValidTaskId, loadProjectEnv, migrateSqliteToLance, mkMemoryId, normalizeSchema, normalizeUsage, planReaping, preflightCheck, recordWiring, resolveTrustPosture, runGoalLoop, scopedConversationId, sessionScopePrefix, setDiagnosticsSink, toShareGptTrajectory, verifyLayerOrdering, withBlastRadius, withCwdMutex };
|
|
3270
|
+
export { Agent, AgentBuilder, AgentDefinition, AgentDescription, AgentFactory, AgentOperationOptions, AgentOptions, type AgentPromptResult, type AgentRegistryOptions, type ApprovalDecision, type ApprovalInput, type ApprovalMode, type ApprovalOutcome, type ApprovalReason, type BatchItem, type BatchOptions, type BatchProgress, type BatchResult, type BlastRadiusDecision, type BlastRadiusInput, type BlastRadiusOutcome, type BlastRadiusReason, Budget, BudgetHandle, BudgetOptions, BudgetSnapshot, BudgetTracker, CloudOptions, ContextSettings, type CounterBudgetTrackerOptions, type CredentialInput, type CredentialReport, CustomTool, type DeclaredAction, type DeclaredLayer, type DeepPartial, type DefineProviderOptions, type DefineToolSpec, type DiagnosticsSink, type DreamingSweepOptions, type DreamingSweepResult, type EnvOptOut, type EnvReachabilityAudit, type EnvReachabilityInput, ErrorMetadata, EventBus, type EvictReason, GOAL_CONTINUATION_MARKER, GenerateObjectError, type GenerateObjectOptions, type GenerateObjectResult, GetAgentOptions, GetRunOptions, GoalEvent, type GoalLoopAgent, GoalOptions, GoalResult, InlineSkill, JobQueue, type JobQueueOptions, JudgeCredentialError, JudgeResult, type KeepReason, type KeptArtifact, LayerOrderError, type LayerValues, ListAgentsOptions, ListResult, ListRunsOptions, LiveAgentRegistry, LiveSessionError, type LiveSessionReason, LocalOptions, McpServerConfig, Memory, MemoryId, MemoryProvider, MemorySettings, type MigrateOptions, type MigrateResult, type ModelListItem, type ModelParameterDefinition, ModelSelection, type ModelVariant, NoopMemoryProvider, type NormalizedJsonSchema, type OTelSpan, PermissionEngine, type PermissionGate, type PermissionGateContext, type PermissionGateDecision, PermissionMode, PermissionPlugin, type PermissionPluginOptions, Plugin, PluginsSettings, PreToolCallDecision, Processor, Provider, ProviderProfile, ProviderRoutingSettings, type ReapPlan, type ReapPlanInput, type ReapableArtifact, type RetentionPolicy, RetentionPolicyError, Run, RunEventSink, RunResult, SDKAgent, SDKAgentInfo, SDKMessage, type SDKModel, SDKProvider, type SDKRepository, type SDKUser, SOVEREIGN_ENV_KEYS, Security, type SecurityFloorInput, type SessionMessage, type SessionMessagePart, type SessionScope, type ShareGptMessage, type ShareGptTrajectory, SkillReadTool, SkillsSettings, type SovereignEnvKey, Squad, type SquadOptions, type SquadRun, StreamObjectError, type StreamObjectEvent, type StreamObjectOptions, SystemPromptResolver, TASK_RESERVED_PREFIXES, Task, type TaskCancelResult, type TaskConfigureOptions, type TaskEvent, type TaskFilter, type TaskHandle, type TaskKind, type TaskState, type TaskStoreOptions, type TaskSubmitOptions, type TaskWorkContext, type TaskWorkFn, type TelemetryHandle, Theokit, TheokitAgentError, type TheokitRequestOptions, TokenLimiter, type TokenLimiterOptions, Tool, ToolError, ToolResultContentBlock, type TrustLevel, type TrustPosture, type TrustPostureInput, type TrustSource, UngatedCapabilityError, UnicodeNormalizer, type UnicodeNormalizerOptions, UsageAccumulator, type WiredEntity, type WiringRecordInput, type WithBlastRadius, applySecurityFloor, auditEnvReachability, chargeAndCheckThresholds, computeCost, createCounterBudgetTracker, decideApproval, describeAction, describeCredential, estimateTokens, evaluateBlastRadius, extractRawId, foldLayers, getPricingEntry, guardSessionDestruction, inferApiMode, isValidTaskId, loadProjectEnv, migrateSqliteToLance, mkMemoryId, normalizeSchema, normalizeUsage, planReaping, preflightCheck, recordWiring, resolveTrustPosture, runGoalLoop, scopedConversationId, sessionScopePrefix, setDiagnosticsSink, toShareGptTrajectory, verifyLayerOrdering, withBlastRadius, withCwdMutex };
|
package/dist/index.js
CHANGED
|
@@ -1,31 +1,31 @@
|
|
|
1
1
|
export { GOAL_CONTINUATION_MARKER } from './chunk-PY2RQOA7.js';
|
|
2
|
-
export { JudgeCredentialError } from './chunk-
|
|
3
|
-
export { StreamObjectError } from './chunk-
|
|
4
|
-
export { GenerateObjectError } from './chunk-
|
|
5
|
-
import './chunk-
|
|
6
|
-
import { Workflow, agentStep } from './chunk-
|
|
7
|
-
import './chunk-
|
|
2
|
+
export { JudgeCredentialError } from './chunk-LTSTGCL6.js';
|
|
3
|
+
export { StreamObjectError } from './chunk-Y4I4EQFK.js';
|
|
4
|
+
export { GenerateObjectError } from './chunk-FIOCJYLA.js';
|
|
5
|
+
import './chunk-D24WJWN2.js';
|
|
6
|
+
import { Workflow, agentStep } from './chunk-LD4MOBFX.js';
|
|
7
|
+
import './chunk-BFYGJGC5.js';
|
|
8
8
|
import './chunk-CAH3G4IS.js';
|
|
9
|
-
export { Cron } from './chunk-
|
|
10
|
-
import { MEMORY_EMBEDDING_ADAPTERS,
|
|
11
|
-
export { Agent, AgentBuilder, Tool, ToolError, UsageAccumulator, computeCost, getPricingEntry } from './chunk-
|
|
12
|
-
import './chunk-
|
|
13
|
-
import './chunk-
|
|
9
|
+
export { Cron } from './chunk-V6HWJQQV.js';
|
|
10
|
+
import { MEMORY_EMBEDDING_ADAPTERS, DEFAULT_AGENTIC_MODEL_ID, Agent } from './chunk-G3JWXOGY.js';
|
|
11
|
+
export { Agent, AgentBuilder, Tool, ToolError, UsageAccumulator, computeCost, getPricingEntry } from './chunk-G3JWXOGY.js';
|
|
12
|
+
import './chunk-GOVJO4YE.js';
|
|
13
|
+
import './chunk-PGP7IOJ2.js';
|
|
14
14
|
import './chunk-2SFBB54R.js';
|
|
15
|
-
import { configure, submit, list, get, cancel, subscribe } from './chunk-
|
|
16
|
-
export { emitRunEvent } from './chunk-
|
|
15
|
+
import { configure, submit, list, get, cancel, subscribe } from './chunk-XROIW6BH.js';
|
|
16
|
+
export { emitRunEvent } from './chunk-XROIW6BH.js';
|
|
17
17
|
import './chunk-K2BQQ445.js';
|
|
18
|
-
import './chunk-
|
|
19
|
-
import { discoverProviderPlugins, shouldUseFixtureMode, isFixtureApiKey, httpRequest, mapOllamaTransportError, readErrorResponseBody, mapOllamaHttpError } from './chunk-
|
|
20
|
-
import './chunk-
|
|
18
|
+
import './chunk-B6HOIWQ6.js';
|
|
19
|
+
import { discoverProviderPlugins, shouldUseFixtureMode, isFixtureApiKey, httpRequest, mapOllamaTransportError, readErrorResponseBody, mapOllamaHttpError } from './chunk-LS3LMQ23.js';
|
|
20
|
+
import './chunk-GBBDINFK.js';
|
|
21
21
|
import './chunk-4QEC4CCS.js';
|
|
22
|
-
import './chunk-
|
|
23
|
-
import { lanceStoragePath, LanceIndex, readFactsFromMarkdown, defaultIndexPath, openMemoryDb, memoryDir } from './chunk-
|
|
24
|
-
import './chunk-
|
|
22
|
+
import './chunk-BERBYXFH.js';
|
|
23
|
+
import { lanceStoragePath, LanceIndex, readFactsFromMarkdown, defaultIndexPath, openMemoryDb, memoryDir } from './chunk-SEL2ZQMT.js';
|
|
24
|
+
import './chunk-HKCKOAIO.js';
|
|
25
25
|
import './chunk-34XOCZJO.js';
|
|
26
|
-
import './chunk-
|
|
27
|
-
import './chunk-
|
|
28
|
-
import './chunk-
|
|
26
|
+
import './chunk-PBZ7HMBP.js';
|
|
27
|
+
import './chunk-KSWHTR54.js';
|
|
28
|
+
import './chunk-FFM3SJTQ.js';
|
|
29
29
|
import './chunk-OXNYIMZZ.js';
|
|
30
30
|
import './chunk-FD2UT76F.js';
|
|
31
31
|
import './chunk-U54XCYG3.js';
|
|
@@ -34,32 +34,32 @@ import './chunk-RP5HQVLD.js';
|
|
|
34
34
|
import './chunk-6X6ID4MO.js';
|
|
35
35
|
import './chunk-4NAKHID5.js';
|
|
36
36
|
import './chunk-7AD3ZTZL.js';
|
|
37
|
-
import './chunk-
|
|
38
|
-
import './chunk-
|
|
39
|
-
import './chunk-
|
|
40
|
-
import './chunk-
|
|
41
|
-
import './chunk-
|
|
42
|
-
import './chunk-
|
|
37
|
+
import './chunk-3WVMJY7F.js';
|
|
38
|
+
import './chunk-R5YZACGK.js';
|
|
39
|
+
import './chunk-POWRZSK4.js';
|
|
40
|
+
import './chunk-N5CR3TJZ.js';
|
|
41
|
+
import './chunk-NZL4BNFQ.js';
|
|
42
|
+
import './chunk-MSFLYJDY.js';
|
|
43
43
|
import { withCwdMutex } from './chunk-2XLKLVVR.js';
|
|
44
44
|
export { withCwdMutex } from './chunk-2XLKLVVR.js';
|
|
45
|
-
|
|
45
|
+
export { TASK_RESERVED_PREFIXES, isValidTaskId } from './chunk-V26QVGUG.js';
|
|
46
46
|
import { toJsonSchema } from './chunk-4VPXM6UU.js';
|
|
47
|
-
import { replaceFileAtomic } from './chunk-
|
|
48
|
-
import './chunk-
|
|
49
|
-
import './chunk-
|
|
47
|
+
import { replaceFileAtomic } from './chunk-6AZDM6LK.js';
|
|
48
|
+
import './chunk-UFIXH26P.js';
|
|
49
|
+
import './chunk-HE4BIAOS.js';
|
|
50
50
|
import { parseModelId } from './chunk-X2FR4OIT.js';
|
|
51
|
-
import { registerBuiltins, listProviders, getCatalogCapabilities, getProviderProfile } from './chunk-
|
|
52
|
-
import './chunk-
|
|
53
|
-
import './chunk-
|
|
51
|
+
import { registerBuiltins, listProviders, getCatalogCapabilities, getProviderProfile } from './chunk-HSQ5Q3I5.js';
|
|
52
|
+
import './chunk-SSDD676S.js';
|
|
53
|
+
import './chunk-3V7UJLQT.js';
|
|
54
54
|
import './chunk-5NBUH3NO.js';
|
|
55
|
-
import './chunk-
|
|
56
|
-
import './chunk-
|
|
55
|
+
import './chunk-OY7O3Q6R.js';
|
|
56
|
+
import './chunk-SK4QLUBK.js';
|
|
57
57
|
import './chunk-RIAM53CP.js';
|
|
58
|
-
import './chunk-
|
|
59
|
-
import { BudgetExceededError, TheokitAgentError, MemoryAdapterError, AuthenticationError, ConfigurationError } from './chunk-
|
|
60
|
-
export { AgentDisposedError, AgentRunError, AuthenticationError, BudgetExceededError, ConfigurationError, IntegrationNotConnectedError, InvalidTaskIdError, MemoryAdapterError, NetworkError, RateLimitError, TaskNotFoundError, TheokitAgentError, UnknownAgentError, UnsupportedBudgetOperationError, UnsupportedRunOperationError, UnsupportedTaskOperationError, isTransientError } from './chunk-
|
|
61
|
-
import { diag, redactSecrets, addPattern } from './chunk-
|
|
62
|
-
export { setDiagnosticsSink } from './chunk-
|
|
58
|
+
import './chunk-DGOG5NXR.js';
|
|
59
|
+
import { BudgetExceededError, TheokitAgentError, MemoryAdapterError, AuthenticationError, ConfigurationError } from './chunk-U4UJHOSH.js';
|
|
60
|
+
export { AgentDisposedError, AgentRunError, AuthenticationError, BudgetExceededError, ConfigurationError, IntegrationNotConnectedError, InvalidTaskIdError, MemoryAdapterError, NetworkError, RateLimitError, TaskNotFoundError, TheokitAgentError, UnknownAgentError, UnsupportedBudgetOperationError, UnsupportedRunOperationError, UnsupportedTaskOperationError, isTransientError } from './chunk-U4UJHOSH.js';
|
|
61
|
+
import { diag, redactSecrets, addPattern, resolveApiKey } from './chunk-5F5NWKPN.js';
|
|
62
|
+
export { setDiagnosticsSink } from './chunk-5F5NWKPN.js';
|
|
63
63
|
import { createHash, randomUUID } from 'crypto';
|
|
64
64
|
import { z } from 'zod';
|
|
65
65
|
import { mkdir, readFile } from 'fs/promises';
|
|
@@ -782,7 +782,7 @@ function runGoalLoop(agent, goal, options, depsOverride) {
|
|
|
782
782
|
async function* wrap() {
|
|
783
783
|
const { runUntilImpl } = await import('./run-until-HEQOUVU6.js');
|
|
784
784
|
const deps = depsOverride ?? await (async () => {
|
|
785
|
-
const { judgeCallImpl } = await import('./judge-call-
|
|
785
|
+
const { judgeCallImpl } = await import('./judge-call-MDIPTBJI.js');
|
|
786
786
|
const { getAgentFacade } = await import('./agent-factory-registry-ZVTABLEY.js');
|
|
787
787
|
const create = getAgentFacade().create;
|
|
788
788
|
return {
|
|
@@ -1265,7 +1265,7 @@ var Memory = {
|
|
|
1265
1265
|
openArgs.embedding = await resolveEmbedding(opts.embedding, peer.MEMORY_EMBEDDING_ADAPTERS);
|
|
1266
1266
|
return await peer.IndexManager.open(openArgs);
|
|
1267
1267
|
}
|
|
1268
|
-
const { IndexManager } = await import('./index-manager-
|
|
1268
|
+
const { IndexManager } = await import('./index-manager-WS7TVKUW.js');
|
|
1269
1269
|
openArgs.embedding = await resolveEmbedding(opts.embedding, MEMORY_EMBEDDING_ADAPTERS);
|
|
1270
1270
|
return await IndexManager.open(openArgs);
|
|
1271
1271
|
},
|
|
@@ -1841,7 +1841,7 @@ function isBuiltAgent(m) {
|
|
|
1841
1841
|
return typeof m.send === "function";
|
|
1842
1842
|
}
|
|
1843
1843
|
async function materialize(def, index) {
|
|
1844
|
-
const { Agent: Agent2 } = await import('./agent-
|
|
1844
|
+
const { Agent: Agent2 } = await import('./agent-FFVV4U5N.js');
|
|
1845
1845
|
return Agent2.create({
|
|
1846
1846
|
// `AgentDefinition.model` admits the sentinel `'inherit'`, which is not a model id. Inheriting
|
|
1847
1847
|
// here means "declare nothing and let the default apply" — forwarding the literal would create
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunk2D43RD5D_cjs = require('./chunk-2D43RD5D.cjs');
|
|
4
4
|
var chunk4JBHSLQO_cjs = require('./chunk-4JBHSLQO.cjs');
|
|
5
|
-
require('./chunk-
|
|
6
|
-
var
|
|
7
|
-
require('./chunk-
|
|
8
|
-
require('./chunk-
|
|
5
|
+
require('./chunk-D75S2X6I.cjs');
|
|
6
|
+
var chunkY4AXQOT4_cjs = require('./chunk-Y4AXQOT4.cjs');
|
|
7
|
+
require('./chunk-C4H6PB5J.cjs');
|
|
8
|
+
require('./chunk-BM6N4KHO.cjs');
|
|
9
9
|
|
|
10
10
|
// src/internal/session/inject-session.ts
|
|
11
11
|
async function injectSessionTurn(opts) {
|
|
12
|
-
await
|
|
12
|
+
await chunk2D43RD5D_cjs.enqueueSessionWrite(opts.loc.cwd, opts.loc.agentId, async () => {
|
|
13
13
|
const prior = await opts.store.readRecords(opts.loc.agentId);
|
|
14
|
-
const transcript =
|
|
14
|
+
const transcript = chunkY4AXQOT4_cjs.SessionTranscript.fromRecords(prior, {
|
|
15
15
|
cwd: opts.loc.cwd,
|
|
16
16
|
sessionId: opts.sessionId,
|
|
17
17
|
model: opts.loc.model ?? "unknown"
|
|
@@ -24,5 +24,5 @@ async function injectSessionTurn(opts) {
|
|
|
24
24
|
}
|
|
25
25
|
|
|
26
26
|
exports.injectSessionTurn = injectSessionTurn;
|
|
27
|
-
//# sourceMappingURL=inject-session-
|
|
28
|
-
//# sourceMappingURL=inject-session-
|
|
27
|
+
//# sourceMappingURL=inject-session-AUQLBDRS.cjs.map
|
|
28
|
+
//# sourceMappingURL=inject-session-AUQLBDRS.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/internal/session/inject-session.ts"],"names":["enqueueSessionWrite","SessionTranscript","invalidateSessionCache"],"mappings":";;;;;;;;;;AAWA,eAAsB,kBAAkB,IAAA,EAMtB;AAChB,EAAA,MAAMA,sCAAoB,IAAA,CAAK,GAAA,CAAI,KAAK,IAAA,CAAK,GAAA,CAAI,SAAS,YAAY;AACpE,IAAA,MAAM,QAAQ,MAAM,IAAA,CAAK,MAAM,WAAA,CAAY,IAAA,CAAK,IAAI,OAAO,CAAA;AAC3D,IAAA,MAAM,UAAA,GAAaC,mCAAA,CAAkB,WAAA,CAAY,KAAA,EAAO;AAAA,MACtD,GAAA,EAAK,KAAK,GAAA,CAAI,GAAA;AAAA,MACd,WAAW,IAAA,CAAK,SAAA;AAAA,MAChB,KAAA,EAAO,IAAA,CAAK,GAAA,CAAI,KAAA,IAAS;AAAA,KAC1B,CAAA;AACD,IAAA,UAAA,CAAW,cAAA,CAAe,KAAK,QAAQ,CAAA;AACvC,IAAA,UAAA,CAAW,mBAAA,CAAoB,EAAE,IAAA,EAAM,IAAA,CAAK,eAAe,CAAA;AAC3D,IAAA,MAAM,IAAA,CAAK,KAAA,CAAM,aAAA,CAAc,IAAA,CAAK,GAAA,CAAI,OAAA,EAAS,UAAA,CAAW,OAAA,EAAQ,CAAE,KAAA,CAAM,KAAA,CAAM,MAAM,CAAC,CAAA;AACzF,IAAAC,wCAAA,CAAuB,IAAA,CAAK,GAAA,CAAI,GAAA,EAAK,IAAA,CAAK,IAAI,OAAO,CAAA;AAAA,EACvD,CAAC,CAAA;AACH","file":"inject-session-
|
|
1
|
+
{"version":3,"sources":["../src/internal/session/inject-session.ts"],"names":["enqueueSessionWrite","SessionTranscript","invalidateSessionCache"],"mappings":";;;;;;;;;;AAWA,eAAsB,kBAAkB,IAAA,EAMtB;AAChB,EAAA,MAAMA,sCAAoB,IAAA,CAAK,GAAA,CAAI,KAAK,IAAA,CAAK,GAAA,CAAI,SAAS,YAAY;AACpE,IAAA,MAAM,QAAQ,MAAM,IAAA,CAAK,MAAM,WAAA,CAAY,IAAA,CAAK,IAAI,OAAO,CAAA;AAC3D,IAAA,MAAM,UAAA,GAAaC,mCAAA,CAAkB,WAAA,CAAY,KAAA,EAAO;AAAA,MACtD,GAAA,EAAK,KAAK,GAAA,CAAI,GAAA;AAAA,MACd,WAAW,IAAA,CAAK,SAAA;AAAA,MAChB,KAAA,EAAO,IAAA,CAAK,GAAA,CAAI,KAAA,IAAS;AAAA,KAC1B,CAAA;AACD,IAAA,UAAA,CAAW,cAAA,CAAe,KAAK,QAAQ,CAAA;AACvC,IAAA,UAAA,CAAW,mBAAA,CAAoB,EAAE,IAAA,EAAM,IAAA,CAAK,eAAe,CAAA;AAC3D,IAAA,MAAM,IAAA,CAAK,KAAA,CAAM,aAAA,CAAc,IAAA,CAAK,GAAA,CAAI,OAAA,EAAS,UAAA,CAAW,OAAA,EAAQ,CAAE,KAAA,CAAM,KAAA,CAAM,MAAM,CAAC,CAAA;AACzF,IAAAC,wCAAA,CAAuB,IAAA,CAAK,GAAA,CAAI,GAAA,EAAK,IAAA,CAAK,IAAI,OAAO,CAAA;AAAA,EACvD,CAAC,CAAA;AACH","file":"inject-session-AUQLBDRS.cjs","sourcesContent":["/**\n * M51 (agent-builder) — inject a SYNTHETIC user+assistant pair into a session's persisted transcript\n * WITHOUT running an LLM turn. This is the Codex review-exit mechanism (`exit_success.xml` appended to\n * the parent thread history so follow-ups like \"fix finding 2\" work): the pair chains onto the DAG\n * leaf (M50 pattern) and the in-memory cache is invalidated so the NEXT send re-hydrates with it.\n */\nimport type { SessionStore } from \"../../types/session-store.js\";\nimport { SessionTranscript } from \"../persistence/session-transcript.js\";\nimport { enqueueSessionWrite, invalidateSessionCache } from \"./agent-session.js\";\nimport type { CompactLocation } from \"./compact-session.js\";\n\nexport async function injectSessionTurn(opts: {\n store: SessionStore;\n loc: CompactLocation;\n sessionId: string;\n userText: string;\n assistantText: string;\n}): Promise<void> {\n await enqueueSessionWrite(opts.loc.cwd, opts.loc.agentId, async () => {\n const prior = await opts.store.readRecords(opts.loc.agentId);\n const transcript = SessionTranscript.fromRecords(prior, {\n cwd: opts.loc.cwd,\n sessionId: opts.sessionId,\n model: opts.loc.model ?? \"unknown\",\n });\n transcript.appendUserTurn(opts.userText);\n transcript.appendAssistantTurn({ text: opts.assistantText });\n await opts.store.appendRecords(opts.loc.agentId, transcript.records().slice(prior.length));\n invalidateSessionCache(opts.loc.cwd, opts.loc.agentId);\n });\n}\n"]}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { enqueueSessionWrite } from './chunk-
|
|
1
|
+
import { enqueueSessionWrite } from './chunk-GOVJO4YE.js';
|
|
2
2
|
import { invalidateSessionCache } from './chunk-4QEC4CCS.js';
|
|
3
|
-
import './chunk-
|
|
4
|
-
import { SessionTranscript } from './chunk-
|
|
5
|
-
import './chunk-
|
|
6
|
-
import './chunk-
|
|
3
|
+
import './chunk-BERBYXFH.js';
|
|
4
|
+
import { SessionTranscript } from './chunk-N5CR3TJZ.js';
|
|
5
|
+
import './chunk-6AZDM6LK.js';
|
|
6
|
+
import './chunk-5F5NWKPN.js';
|
|
7
7
|
|
|
8
8
|
// src/internal/session/inject-session.ts
|
|
9
9
|
async function injectSessionTurn(opts) {
|
|
@@ -22,5 +22,5 @@ async function injectSessionTurn(opts) {
|
|
|
22
22
|
}
|
|
23
23
|
|
|
24
24
|
export { injectSessionTurn };
|
|
25
|
-
//# sourceMappingURL=inject-session-
|
|
26
|
-
//# sourceMappingURL=inject-session-
|
|
25
|
+
//# sourceMappingURL=inject-session-GMBMJVNZ.js.map
|
|
26
|
+
//# sourceMappingURL=inject-session-GMBMJVNZ.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/internal/session/inject-session.ts"],"names":[],"mappings":";;;;;;;;AAWA,eAAsB,kBAAkB,IAAA,EAMtB;AAChB,EAAA,MAAM,oBAAoB,IAAA,CAAK,GAAA,CAAI,KAAK,IAAA,CAAK,GAAA,CAAI,SAAS,YAAY;AACpE,IAAA,MAAM,QAAQ,MAAM,IAAA,CAAK,MAAM,WAAA,CAAY,IAAA,CAAK,IAAI,OAAO,CAAA;AAC3D,IAAA,MAAM,UAAA,GAAa,iBAAA,CAAkB,WAAA,CAAY,KAAA,EAAO;AAAA,MACtD,GAAA,EAAK,KAAK,GAAA,CAAI,GAAA;AAAA,MACd,WAAW,IAAA,CAAK,SAAA;AAAA,MAChB,KAAA,EAAO,IAAA,CAAK,GAAA,CAAI,KAAA,IAAS;AAAA,KAC1B,CAAA;AACD,IAAA,UAAA,CAAW,cAAA,CAAe,KAAK,QAAQ,CAAA;AACvC,IAAA,UAAA,CAAW,mBAAA,CAAoB,EAAE,IAAA,EAAM,IAAA,CAAK,eAAe,CAAA;AAC3D,IAAA,MAAM,IAAA,CAAK,KAAA,CAAM,aAAA,CAAc,IAAA,CAAK,GAAA,CAAI,OAAA,EAAS,UAAA,CAAW,OAAA,EAAQ,CAAE,KAAA,CAAM,KAAA,CAAM,MAAM,CAAC,CAAA;AACzF,IAAA,sBAAA,CAAuB,IAAA,CAAK,GAAA,CAAI,GAAA,EAAK,IAAA,CAAK,IAAI,OAAO,CAAA;AAAA,EACvD,CAAC,CAAA;AACH","file":"inject-session-
|
|
1
|
+
{"version":3,"sources":["../src/internal/session/inject-session.ts"],"names":[],"mappings":";;;;;;;;AAWA,eAAsB,kBAAkB,IAAA,EAMtB;AAChB,EAAA,MAAM,oBAAoB,IAAA,CAAK,GAAA,CAAI,KAAK,IAAA,CAAK,GAAA,CAAI,SAAS,YAAY;AACpE,IAAA,MAAM,QAAQ,MAAM,IAAA,CAAK,MAAM,WAAA,CAAY,IAAA,CAAK,IAAI,OAAO,CAAA;AAC3D,IAAA,MAAM,UAAA,GAAa,iBAAA,CAAkB,WAAA,CAAY,KAAA,EAAO;AAAA,MACtD,GAAA,EAAK,KAAK,GAAA,CAAI,GAAA;AAAA,MACd,WAAW,IAAA,CAAK,SAAA;AAAA,MAChB,KAAA,EAAO,IAAA,CAAK,GAAA,CAAI,KAAA,IAAS;AAAA,KAC1B,CAAA;AACD,IAAA,UAAA,CAAW,cAAA,CAAe,KAAK,QAAQ,CAAA;AACvC,IAAA,UAAA,CAAW,mBAAA,CAAoB,EAAE,IAAA,EAAM,IAAA,CAAK,eAAe,CAAA;AAC3D,IAAA,MAAM,IAAA,CAAK,KAAA,CAAM,aAAA,CAAc,IAAA,CAAK,GAAA,CAAI,OAAA,EAAS,UAAA,CAAW,OAAA,EAAQ,CAAE,KAAA,CAAM,KAAA,CAAM,MAAM,CAAC,CAAA;AACzF,IAAA,sBAAA,CAAuB,IAAA,CAAK,GAAA,CAAI,GAAA,EAAK,IAAA,CAAK,IAAI,OAAO,CAAA;AAAA,EACvD,CAAC,CAAA;AACH","file":"inject-session-GMBMJVNZ.js","sourcesContent":["/**\n * M51 (agent-builder) — inject a SYNTHETIC user+assistant pair into a session's persisted transcript\n * WITHOUT running an LLM turn. This is the Codex review-exit mechanism (`exit_success.xml` appended to\n * the parent thread history so follow-ups like \"fix finding 2\" work): the pair chains onto the DAG\n * leaf (M50 pattern) and the in-memory cache is invalidated so the NEXT send re-hydrates with it.\n */\nimport type { SessionStore } from \"../../types/session-store.js\";\nimport { SessionTranscript } from \"../persistence/session-transcript.js\";\nimport { enqueueSessionWrite, invalidateSessionCache } from \"./agent-session.js\";\nimport type { CompactLocation } from \"./compact-session.js\";\n\nexport async function injectSessionTurn(opts: {\n store: SessionStore;\n loc: CompactLocation;\n sessionId: string;\n userText: string;\n assistantText: string;\n}): Promise<void> {\n await enqueueSessionWrite(opts.loc.cwd, opts.loc.agentId, async () => {\n const prior = await opts.store.readRecords(opts.loc.agentId);\n const transcript = SessionTranscript.fromRecords(prior, {\n cwd: opts.loc.cwd,\n sessionId: opts.sessionId,\n model: opts.loc.model ?? \"unknown\",\n });\n transcript.appendUserTurn(opts.userText);\n transcript.appendAssistantTurn({ text: opts.assistantText });\n await opts.store.appendRecords(opts.loc.agentId, transcript.records().slice(prior.length));\n invalidateSessionCache(opts.loc.cwd, opts.loc.agentId);\n });\n}\n"]}
|
|
@@ -39,7 +39,7 @@ export interface StoredOAuthCredential {
|
|
|
39
39
|
account_id?: string;
|
|
40
40
|
}
|
|
41
41
|
export type StoredCredential = StoredApiCredential | StoredOAuthCredential;
|
|
42
|
-
/** A provider's OAuth endpoints + client identity. Passed in (provider-agnostic
|
|
42
|
+
/** A provider's OAuth endpoints + client identity. Passed in (provider-agnostic). */
|
|
43
43
|
export interface OAuthProviderConfig {
|
|
44
44
|
provider: string;
|
|
45
45
|
authorizeEndpoint: string;
|
|
@@ -35,7 +35,7 @@ export declare function openaiDeviceLogin(config: OpenAIDeviceConfig, deps: Devi
|
|
|
35
35
|
verificationUri: string;
|
|
36
36
|
}) => void;
|
|
37
37
|
}): Promise<OAuthTokens>;
|
|
38
|
-
/** JWT id/access-token claims we read to attribute an account.
|
|
38
|
+
/** JWT id/access-token claims we read to attribute an account. */
|
|
39
39
|
interface IdTokenClaims {
|
|
40
40
|
chatgpt_account_id?: string;
|
|
41
41
|
organizations?: Array<{
|
|
@@ -47,7 +47,7 @@ interface IdTokenClaims {
|
|
|
47
47
|
}
|
|
48
48
|
/** Decode a JWT's claim set (no signature verification — used only to read a self-reported account id). */
|
|
49
49
|
export declare function parseJwtClaims(token: string): IdTokenClaims | undefined;
|
|
50
|
-
/** Best-effort account id from an id/access token's claims (OpenAI/ChatGPT shape).
|
|
50
|
+
/** Best-effort account id from an id/access token's claims (OpenAI/ChatGPT shape). */
|
|
51
51
|
export declare function extractAccountId(tokens: {
|
|
52
52
|
id_token?: string;
|
|
53
53
|
access_token?: string;
|
|
@@ -2,10 +2,8 @@
|
|
|
2
2
|
* M77 — session-scoped MCP client pool.
|
|
3
3
|
*
|
|
4
4
|
* `buildMcpMap` (`real-local-run.ts`) builds a fresh `McpClient` on every run, so each `send` pays
|
|
5
|
-
* spawn + handshake again: 193 / 138 / 134 ms per turn, measured. The
|
|
6
|
-
* session
|
|
7
|
-
* (`codex-rs/core/src/state/service.rs:51-58`), next to a field commented *"Session-scoped model
|
|
8
|
-
* client shared across turns"*, and REPLACES the runtime rather than rebuilding it.
|
|
5
|
+
* spawn + handshake again: 193 / 138 / 134 ms per turn, measured. The runtime is therefore anchored at
|
|
6
|
+
* the session and REPLACED rather than rebuilt.
|
|
9
7
|
*
|
|
10
8
|
* theokit#155: pooling the client OBJECT was never enough — the turn also has to stop closing what
|
|
11
9
|
* it does not own. See `runOwnsMcpClients` (`real-local-run.ts`) and the idempotent
|
|
@@ -1 +1,14 @@
|
|
|
1
|
-
|
|
1
|
+
import type { McpOAuthConfig } from "../../types/mcp.js";
|
|
2
|
+
import { type OAuthTokens } from "./token-storage.js";
|
|
3
|
+
/**
|
|
4
|
+
* Refresh an access token using `refresh_token`. Throws on failure.
|
|
5
|
+
*
|
|
6
|
+
*/
|
|
7
|
+
export declare function refreshAccessToken(serverName: string, clientId: string, refreshToken: string, oauth: McpOAuthConfig): Promise<OAuthTokens>;
|
|
8
|
+
/**
|
|
9
|
+
* Run the full PKCE flow. Generates verifier+challenge+state, opens the
|
|
10
|
+
* authorization URL (browser or manual print), waits for the callback
|
|
11
|
+
* (localhost or stdin), exchanges code for tokens.
|
|
12
|
+
*
|
|
13
|
+
*/
|
|
14
|
+
export declare function runPkceFlow(serverName: string, clientId: string, scopes: string[] | undefined, oauth: McpOAuthConfig): Promise<OAuthTokens>;
|
|
@@ -1 +1,18 @@
|
|
|
1
|
-
|
|
1
|
+
/**
|
|
2
|
+
* Persist tokens for `serverName`. Tries keychain first, falls back to file
|
|
3
|
+
* with chmod 600 (POSIX). Idempotent.
|
|
4
|
+
*
|
|
5
|
+
*/
|
|
6
|
+
export declare function setTokens(serverName: string, tokens: OAuthTokens): Promise<void>;
|
|
7
|
+
/**
|
|
8
|
+
* Retrieve tokens for `serverName`. Returns undefined if absent.
|
|
9
|
+
*
|
|
10
|
+
*/
|
|
11
|
+
export declare function getTokens(serverName: string): Promise<OAuthTokens | undefined>;
|
|
12
|
+
/**
|
|
13
|
+
* Serialize concurrent refresh attempts per server (EC-9). If a refresh is
|
|
14
|
+
* already in flight for the same `serverName`, the second caller awaits
|
|
15
|
+
* the same Promise.
|
|
16
|
+
*
|
|
17
|
+
*/
|
|
18
|
+
export declare function lockedRefresh(serverName: string, refreshFn: () => Promise<OAuthTokens>): Promise<OAuthTokens>;
|
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
require('../../../chunk-
|
|
3
|
+
var chunkRAHSWE5C_cjs = require('../../../chunk-RAHSWE5C.cjs');
|
|
4
|
+
require('../../../chunk-SVO5WPZX.cjs');
|
|
5
5
|
var chunk2RW7K6FN_cjs = require('../../../chunk-2RW7K6FN.cjs');
|
|
6
6
|
require('../../../chunk-MUUQ2WFJ.cjs');
|
|
7
|
-
require('../../../chunk-
|
|
8
|
-
require('../../../chunk-
|
|
9
|
-
require('../../../chunk-
|
|
7
|
+
require('../../../chunk-WQ53UQL4.cjs');
|
|
8
|
+
require('../../../chunk-C5DEO6OI.cjs');
|
|
9
|
+
require('../../../chunk-ZT57WTUJ.cjs');
|
|
10
10
|
require('../../../chunk-VKJ7V7EB.cjs');
|
|
11
|
-
require('../../../chunk-
|
|
12
|
-
require('../../../chunk-
|
|
11
|
+
require('../../../chunk-LPVIRJVF.cjs');
|
|
12
|
+
require('../../../chunk-BM6N4KHO.cjs');
|
|
13
13
|
|
|
14
14
|
|
|
15
15
|
|
|
16
16
|
Object.defineProperty(exports, "createOpenAiCompatibleRuntime", {
|
|
17
17
|
enumerable: true,
|
|
18
|
-
get: function () { return
|
|
18
|
+
get: function () { return chunkRAHSWE5C_cjs.createOpenAiCompatibleRuntime; }
|
|
19
19
|
});
|
|
20
20
|
Object.defineProperty(exports, "LruEmbeddingCache", {
|
|
21
21
|
enumerable: true,
|