@theokit/sdk 4.52.1 → 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 +48 -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-RDHK6MVT.js.map → agent-FFVV4U5N.js.map} +1 -1
- package/dist/agent-YLAHVHEH.cjs +59 -0
- package/dist/{agent-U2R2R5JP.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 +29 -28
- 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 -5
- 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-CY7MIMI4.cjs → chunk-2D43RD5D.cjs} +8 -8
- package/dist/{chunk-CY7MIMI4.cjs.map → chunk-2D43RD5D.cjs.map} +1 -1
- package/dist/{chunk-WLESQ3ZQ.cjs → chunk-2FYEVT2B.cjs} +121 -121
- package/dist/{chunk-WLESQ3ZQ.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-3V7UJLQT.js +147 -0
- 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-5YKNEMXR.cjs +155 -0
- 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-J4RY5DTI.js → chunk-B6HOIWQ6.js} +5 -5
- package/dist/{chunk-J4RY5DTI.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-6GS7JI64.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-KELIQH7K.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-42PLABFU.js → chunk-GOVJO4YE.js} +5 -5
- package/dist/{chunk-42PLABFU.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-V2EJLKGA.js → chunk-HSQ5Q3I5.js} +10 -11
- 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-M5EK7N6R.js → chunk-LS3LMQ23.js} +9 -9
- package/dist/{chunk-M5EK7N6R.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-NACDF3PK.js → chunk-NZL4BNFQ.js} +4 -4
- package/dist/chunk-NZL4BNFQ.js.map +1 -0
- package/dist/{chunk-OI6RHLGC.cjs → chunk-OUOXM36O.cjs} +11 -11
- package/dist/{chunk-OI6RHLGC.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-ZNEE4WWQ.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-SSDD676S.js +171 -0
- 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-SDJYLCJK.cjs → chunk-TTJ54H3E.cjs} +6 -6
- package/dist/chunk-TTJ54H3E.cjs.map +1 -0
- 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-GNPI5IWZ.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-VF7X6HDR.cjs +177 -0
- 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-T6ZCG5AP.cjs → chunk-VUKQL3L2.cjs} +18 -19
- 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-XLXC2CZN.js.map → compact-session-4MNKNMO2.js.map} +1 -1
- package/dist/compact-session-EPFBQ46Z.cjs +58 -0
- package/dist/{compact-session-FBVWO6B3.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 -32
- package/dist/cron.d.cts +2 -2
- package/dist/cron.d.ts +2 -2
- package/dist/cron.js +32 -31
- package/dist/errors.cjs +21 -21
- package/dist/errors.js +2 -2
- package/dist/eval.cjs +43 -42
- package/dist/eval.cjs.map +1 -1
- package/dist/eval.js +33 -32
- package/dist/eval.js.map +1 -1
- 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-2TF3ZWMT.js.map → fs-session-store-R5FD3EN6.js.map} +1 -1
- package/dist/fs-session-store-VVY2AHWG.cjs +19 -0
- package/dist/{fs-session-store-TL4RJTXZ.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 -134
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +64 -8
- package/dist/index.d.ts +64 -8
- package/dist/index.js +45 -44
- package/dist/index.js.map +1 -1
- package/dist/{inject-session-UBAQ7I3G.cjs → inject-session-AUQLBDRS.cjs} +9 -9
- package/dist/{inject-session-UBAQ7I3G.cjs.map → inject-session-AUQLBDRS.cjs.map} +1 -1
- package/dist/{inject-session-UEH5MAKU.js → inject-session-GMBMJVNZ.js} +7 -7
- package/dist/{inject-session-UEH5MAKU.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 -0
- package/dist/internal/mcp/token-storage.d.ts +18 -0
- 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/persistence/transcript-ops.d.cts +6 -7
- package/dist/internal/persistence/transcript-ops.d.ts +6 -7
- 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 +299 -0
- package/dist/mcp-auth.cjs.map +1 -0
- package/dist/mcp-auth.d.cts +17 -0
- package/dist/mcp-auth.d.ts +17 -0
- package/dist/mcp-auth.js +292 -0
- package/dist/mcp-auth.js.map +1 -0
- package/dist/models.cjs +22 -21
- package/dist/models.cjs.map +1 -1
- package/dist/models.js +7 -6
- 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 +38 -29
- package/dist/persistence.cjs.map +1 -1
- package/dist/persistence.js +18 -9
- package/dist/persistence.js.map +1 -1
- 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 +28 -18
- package/dist/agent-RDHK6MVT.js +0 -49
- package/dist/agent-U2R2R5JP.cjs +0 -58
- package/dist/agent-session-store-EPX2WQI4.cjs +0 -23
- package/dist/agent-session-store-JMU7ASDB.js +0 -6
- package/dist/chunk-2CFEET3Y.cjs.map +0 -1
- package/dist/chunk-2YGIBOUH.cjs.map +0 -1
- package/dist/chunk-4X3SBHPK.js.map +0 -1
- package/dist/chunk-6GS7JI64.cjs.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-BKRTYDVN.js +0 -312
- package/dist/chunk-BKRTYDVN.js.map +0 -1
- package/dist/chunk-CHVSMEKM.js.map +0 -1
- package/dist/chunk-GNPI5IWZ.js.map +0 -1
- package/dist/chunk-HI4ZW62S.js.map +0 -1
- package/dist/chunk-JJZ4NIAG.js.map +0 -1
- package/dist/chunk-KELIQH7K.js.map +0 -1
- package/dist/chunk-NACDF3PK.js.map +0 -1
- package/dist/chunk-QLAWEGTZ.cjs.map +0 -1
- package/dist/chunk-SDJYLCJK.cjs.map +0 -1
- package/dist/chunk-SXSPMRSV.cjs.map +0 -1
- package/dist/chunk-T6ZCG5AP.cjs.map +0 -1
- package/dist/chunk-V2EJLKGA.js.map +0 -1
- package/dist/chunk-W4FV7JBH.js.map +0 -1
- package/dist/chunk-XK54DTRF.cjs +0 -325
- package/dist/chunk-XK54DTRF.cjs.map +0 -1
- package/dist/chunk-XWCTBGYK.js.map +0 -1
- package/dist/chunk-YTO5BRBD.cjs.map +0 -1
- package/dist/chunk-ZNEE4WWQ.cjs.map +0 -1
- package/dist/compact-session-FBVWO6B3.cjs +0 -57
- package/dist/compact-session-XLXC2CZN.js +0 -20
- package/dist/context-4HGPCOH6.cjs +0 -22
- package/dist/context-DCECDKWN.js +0 -5
- package/dist/fs-session-store-2TF3ZWMT.js +0 -10
- package/dist/fs-session-store-TL4RJTXZ.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
|
@@ -88,4 +88,17 @@ export interface SessionWriterLease {
|
|
|
88
88
|
* detect. Tying the renewal to a real write means the record tracks **progress**, not mere existence.
|
|
89
89
|
*/
|
|
90
90
|
export declare const HEARTBEAT_WINDOW_MS = 30000;
|
|
91
|
+
/**
|
|
92
|
+
* Does the session have a writer **right now**? A query that does NOT take the lease.
|
|
93
|
+
*
|
|
94
|
+
* M95 — it exists because asking by taking creates the very contention it meant to detect: two
|
|
95
|
+
* processes querying a **free** session at the same time made one of them lose, and the consumer
|
|
96
|
+
* forked for no reason. Measured in adversarial review: `RACE: spurious forks = 1`.
|
|
97
|
+
*
|
|
98
|
+
* It is a snapshot, not a guarantee: between the query and the real acquisition someone may take
|
|
99
|
+
* the session. Callers needing the guarantee use {@link acquireSessionWriter}; callers needing to
|
|
100
|
+
* **decide an id before opening anything** use this, and handle the race where it shows up.
|
|
101
|
+
*
|
|
102
|
+
*/
|
|
103
|
+
export declare function sessionHasWriter(sessionPath: string): boolean;
|
|
91
104
|
export declare function acquireSessionWriter(sessionPath: string): Promise<SessionWriterLease>;
|
|
@@ -88,4 +88,17 @@ export interface SessionWriterLease {
|
|
|
88
88
|
* detect. Tying the renewal to a real write means the record tracks **progress**, not mere existence.
|
|
89
89
|
*/
|
|
90
90
|
export declare const HEARTBEAT_WINDOW_MS = 30000;
|
|
91
|
+
/**
|
|
92
|
+
* Does the session have a writer **right now**? A query that does NOT take the lease.
|
|
93
|
+
*
|
|
94
|
+
* M95 — it exists because asking by taking creates the very contention it meant to detect: two
|
|
95
|
+
* processes querying a **free** session at the same time made one of them lose, and the consumer
|
|
96
|
+
* forked for no reason. Measured in adversarial review: `RACE: spurious forks = 1`.
|
|
97
|
+
*
|
|
98
|
+
* It is a snapshot, not a guarantee: between the query and the real acquisition someone may take
|
|
99
|
+
* the session. Callers needing the guarantee use {@link acquireSessionWriter}; callers needing to
|
|
100
|
+
* **decide an id before opening anything** use this, and handle the race where it shows up.
|
|
101
|
+
*
|
|
102
|
+
*/
|
|
103
|
+
export declare function sessionHasWriter(sessionPath: string): boolean;
|
|
91
104
|
export declare function acquireSessionWriter(sessionPath: string): Promise<SessionWriterLease>;
|
|
@@ -1 +1,9 @@
|
|
|
1
|
-
|
|
1
|
+
/**
|
|
2
|
+
* Apply WAL mode with DELETE fallback. Idempotent — safe to call multiple
|
|
3
|
+
* times on the same connection.
|
|
4
|
+
*
|
|
5
|
+
* @param db any `pragma()`-capable SQLite handle (e.g., `better-sqlite3`)
|
|
6
|
+
* @param label short identifier used in the warning (e.g., "memory-index")
|
|
7
|
+
*
|
|
8
|
+
*/
|
|
9
|
+
export declare function applyWalWithFallback(db: PragmaCapable, label: string): WalApplyResult;
|
|
@@ -1 +1,9 @@
|
|
|
1
|
-
|
|
1
|
+
/**
|
|
2
|
+
* Apply WAL mode with DELETE fallback. Idempotent — safe to call multiple
|
|
3
|
+
* times on the same connection.
|
|
4
|
+
*
|
|
5
|
+
* @param db any `pragma()`-capable SQLite handle (e.g., `better-sqlite3`)
|
|
6
|
+
* @param label short identifier used in the warning (e.g., "memory-index")
|
|
7
|
+
*
|
|
8
|
+
*/
|
|
9
|
+
export declare function applyWalWithFallback(db: PragmaCapable, label: string): WalApplyResult;
|
|
@@ -71,15 +71,14 @@ export interface ReadJsonlTailOptions {
|
|
|
71
71
|
/** Maximum records to return, counted from the END. */
|
|
72
72
|
readonly maxRecords?: number;
|
|
73
73
|
/** Stop once a line contains this marker (exclusive). */
|
|
74
|
+
/**
|
|
75
|
+
* Start the window AFTER the last record whose `subtype` (or `type`) equals this.
|
|
76
|
+
*
|
|
77
|
+
* Matched STRUCTURALLY since T2.5. It used to be `line.includes(marker)`, so any message
|
|
78
|
+
* mentioning the marker in its text truncated the read — silently, with a successful return.
|
|
79
|
+
*/
|
|
74
80
|
readonly sinceMarker?: string;
|
|
75
81
|
/** Test-only: also report how many bytes were read, to prove the read is not whole-file. */
|
|
76
82
|
readonly _stats?: boolean;
|
|
77
83
|
}
|
|
78
|
-
/**
|
|
79
|
-
* Read the LAST records of a JSONL file without loading the whole thing.
|
|
80
|
-
*
|
|
81
|
-
* Reads fixed-size chunks backwards from EOF until enough newlines have been seen. A session
|
|
82
|
-
* transcript grows without bound; loading megabytes to show the last three turns is the cost this
|
|
83
|
-
* exists to avoid — and a `slice` over a full read would be that same cost with a better name.
|
|
84
|
-
*/
|
|
85
84
|
export declare function readJsonlTail<T = Record<string, unknown>>(path: string, options?: ReadJsonlTailOptions): T[];
|
|
@@ -71,15 +71,14 @@ export interface ReadJsonlTailOptions {
|
|
|
71
71
|
/** Maximum records to return, counted from the END. */
|
|
72
72
|
readonly maxRecords?: number;
|
|
73
73
|
/** Stop once a line contains this marker (exclusive). */
|
|
74
|
+
/**
|
|
75
|
+
* Start the window AFTER the last record whose `subtype` (or `type`) equals this.
|
|
76
|
+
*
|
|
77
|
+
* Matched STRUCTURALLY since T2.5. It used to be `line.includes(marker)`, so any message
|
|
78
|
+
* mentioning the marker in its text truncated the read — silently, with a successful return.
|
|
79
|
+
*/
|
|
74
80
|
readonly sinceMarker?: string;
|
|
75
81
|
/** Test-only: also report how many bytes were read, to prove the read is not whole-file. */
|
|
76
82
|
readonly _stats?: boolean;
|
|
77
83
|
}
|
|
78
|
-
/**
|
|
79
|
-
* Read the LAST records of a JSONL file without loading the whole thing.
|
|
80
|
-
*
|
|
81
|
-
* Reads fixed-size chunks backwards from EOF until enough newlines have been seen. A session
|
|
82
|
-
* transcript grows without bound; loading megabytes to show the last three turns is the cost this
|
|
83
|
-
* exists to avoid — and a `slice` over a full read would be that same cost with a better name.
|
|
84
|
-
*/
|
|
85
84
|
export declare function readJsonlTail<T = Record<string, unknown>>(path: string, options?: ReadJsonlTailOptions): T[];
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* M45 — Cerebras.
|
|
3
|
-
*
|
|
2
|
+
* M45 — Cerebras. The integration header value is theokit's own: the header attributes TRAFFIC.
|
|
3
|
+
* Models per models.dev (2026-07 snapshot).
|
|
4
4
|
*/
|
|
5
5
|
export declare const CEREBRAS: import("../types.js").ProviderProfile;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
/** M45 — DeepInfra. OpenAI-compat surface under /v1/openai (models.dev `deepinfra
|
|
1
|
+
/** M45 — DeepInfra. OpenAI-compat surface under /v1/openai (models.dev `deepinfra`). */
|
|
2
2
|
export declare const DEEPINFRA: import("../types.js").ProviderProfile;
|
|
@@ -16,7 +16,7 @@ export interface RefreshModelCatalogResult {
|
|
|
16
16
|
/** How many models were patched into the index. */
|
|
17
17
|
models: number;
|
|
18
18
|
}
|
|
19
|
-
/** The cache file for a source URL (custom URLs get a hash-suffixed name
|
|
19
|
+
/** The cache file for a source URL (custom URLs get a hash-suffixed name). */
|
|
20
20
|
export declare function cachePathFor(url: string): string;
|
|
21
21
|
/**
|
|
22
22
|
* Load an existing disk cache into the index (called by refresh when fresh, or opportunistically by a
|
|
@@ -3,9 +3,7 @@
|
|
|
3
3
|
*
|
|
4
4
|
* Every subprocess the SDK spawns previously inherited the FULL `process.env`,
|
|
5
5
|
* so API keys, tokens and passwords leaked into hook scripts and shell tools.
|
|
6
|
-
* `resolveChildEnv` computes the env a child receives under an explicit policy
|
|
7
|
-
* modeled on codex's `ShellEnvironmentPolicy`
|
|
8
|
-
* (reference: codex/codex-rs/protocol/src/shell_environment.rs).
|
|
6
|
+
* `resolveChildEnv` computes the env a child receives under an explicit policy.
|
|
9
7
|
*
|
|
10
8
|
* Modes:
|
|
11
9
|
* - `inherit-scrubbed` (DEFAULT) — inherit all parent vars EXCEPT secret-like
|
|
@@ -1,52 +1,52 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
require('../../chunk-MUUQ2WFJ.cjs');
|
|
4
|
-
var
|
|
4
|
+
var chunkZT57WTUJ_cjs = require('../../chunk-ZT57WTUJ.cjs');
|
|
5
5
|
require('../../chunk-VKJ7V7EB.cjs');
|
|
6
|
-
require('../../chunk-
|
|
7
|
-
var
|
|
6
|
+
require('../../chunk-LPVIRJVF.cjs');
|
|
7
|
+
var chunkBM6N4KHO_cjs = require('../../chunk-BM6N4KHO.cjs');
|
|
8
8
|
|
|
9
9
|
|
|
10
10
|
|
|
11
11
|
Object.defineProperty(exports, "ForbiddenPathError", {
|
|
12
12
|
enumerable: true,
|
|
13
|
-
get: function () { return
|
|
13
|
+
get: function () { return chunkZT57WTUJ_cjs.ForbiddenPathError; }
|
|
14
14
|
});
|
|
15
15
|
Object.defineProperty(exports, "PathTraversalError", {
|
|
16
16
|
enumerable: true,
|
|
17
|
-
get: function () { return
|
|
17
|
+
get: function () { return chunkZT57WTUJ_cjs.PathTraversalError; }
|
|
18
18
|
});
|
|
19
19
|
Object.defineProperty(exports, "assertNoSymlinkEscape", {
|
|
20
20
|
enumerable: true,
|
|
21
|
-
get: function () { return
|
|
21
|
+
get: function () { return chunkZT57WTUJ_cjs.assertNoSymlinkEscape; }
|
|
22
22
|
});
|
|
23
23
|
Object.defineProperty(exports, "isForbiddenPath", {
|
|
24
24
|
enumerable: true,
|
|
25
|
-
get: function () { return
|
|
25
|
+
get: function () { return chunkZT57WTUJ_cjs.isForbiddenPath; }
|
|
26
26
|
});
|
|
27
27
|
Object.defineProperty(exports, "safePathJoin", {
|
|
28
28
|
enumerable: true,
|
|
29
|
-
get: function () { return
|
|
29
|
+
get: function () { return chunkZT57WTUJ_cjs.safePathJoin; }
|
|
30
30
|
});
|
|
31
31
|
Object.defineProperty(exports, "sanitizeIdentifier", {
|
|
32
32
|
enumerable: true,
|
|
33
|
-
get: function () { return
|
|
33
|
+
get: function () { return chunkZT57WTUJ_cjs.sanitizeIdentifier; }
|
|
34
34
|
});
|
|
35
35
|
Object.defineProperty(exports, "validateArtifactPath", {
|
|
36
36
|
enumerable: true,
|
|
37
|
-
get: function () { return
|
|
37
|
+
get: function () { return chunkZT57WTUJ_cjs.validateArtifactPath; }
|
|
38
38
|
});
|
|
39
39
|
Object.defineProperty(exports, "addPattern", {
|
|
40
40
|
enumerable: true,
|
|
41
|
-
get: function () { return
|
|
41
|
+
get: function () { return chunkBM6N4KHO_cjs.addPattern; }
|
|
42
42
|
});
|
|
43
43
|
Object.defineProperty(exports, "maskToken", {
|
|
44
44
|
enumerable: true,
|
|
45
|
-
get: function () { return
|
|
45
|
+
get: function () { return chunkBM6N4KHO_cjs.maskToken; }
|
|
46
46
|
});
|
|
47
47
|
Object.defineProperty(exports, "redactSecrets", {
|
|
48
48
|
enumerable: true,
|
|
49
|
-
get: function () { return
|
|
49
|
+
get: function () { return chunkBM6N4KHO_cjs.redactSecrets; }
|
|
50
50
|
});
|
|
51
51
|
//# sourceMappingURL=index.cjs.map
|
|
52
52
|
//# sourceMappingURL=index.cjs.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import '../../chunk-FD2UT76F.js';
|
|
2
|
-
export { ForbiddenPathError, PathTraversalError, assertNoSymlinkEscape, isForbiddenPath, safePathJoin, sanitizeIdentifier, validateArtifactPath } from '../../chunk-
|
|
2
|
+
export { ForbiddenPathError, PathTraversalError, assertNoSymlinkEscape, isForbiddenPath, safePathJoin, sanitizeIdentifier, validateArtifactPath } from '../../chunk-SK4QLUBK.js';
|
|
3
3
|
import '../../chunk-RIAM53CP.js';
|
|
4
|
-
import '../../chunk-
|
|
5
|
-
export { addPattern, maskToken, redactSecrets } from '../../chunk-
|
|
4
|
+
import '../../chunk-U4UJHOSH.js';
|
|
5
|
+
export { addPattern, maskToken, redactSecrets } from '../../chunk-5F5NWKPN.js';
|
|
6
6
|
//# sourceMappingURL=index.js.map
|
|
7
7
|
//# sourceMappingURL=index.js.map
|
|
@@ -18,6 +18,15 @@
|
|
|
18
18
|
* @internal
|
|
19
19
|
*/
|
|
20
20
|
import { ConfigurationError } from "../../errors.js";
|
|
21
|
+
/**
|
|
22
|
+
* Thrown when a path operation would escape its allowed base directory.
|
|
23
|
+
* Extends `ConfigurationError` (no new error hierarchy per ADR D65).
|
|
24
|
+
*
|
|
25
|
+
*/
|
|
26
|
+
export declare class PathTraversalError extends ConfigurationError {
|
|
27
|
+
readonly name: string;
|
|
28
|
+
constructor(input: string, resolvedPath: string);
|
|
29
|
+
}
|
|
21
30
|
/**
|
|
22
31
|
* Thrown when an agent tool is asked to read or write a sensitive path
|
|
23
32
|
* that the blocklist forbids (`.env`, `.git/`, `node_modules/`, `.theo/`,
|
|
@@ -32,6 +41,33 @@ export declare class ForbiddenPathError extends ConfigurationError {
|
|
|
32
41
|
readonly name: string;
|
|
33
42
|
constructor(path: string);
|
|
34
43
|
}
|
|
44
|
+
/**
|
|
45
|
+
* Join `base` with `...parts` and ensure the resolved absolute path stays
|
|
46
|
+
* under `base`. Resolves FIRST, then prefix-checks (ADR D80) — prevents
|
|
47
|
+
* normalized-escape bypasses like `subdir/.\\./bar`.
|
|
48
|
+
*
|
|
49
|
+
* Returns the safe absolute path. Throws `PathTraversalError` if escape.
|
|
50
|
+
*
|
|
51
|
+
*/
|
|
52
|
+
export declare function safePathJoin(base: string, ...parts: string[]): string;
|
|
53
|
+
/**
|
|
54
|
+
* Assert that `path` — including every directory component in the chain —
|
|
55
|
+
* stays under `base` after symlink resolution. No-op when nothing on the
|
|
56
|
+
* path exists yet.
|
|
57
|
+
*
|
|
58
|
+
* Two-bug history:
|
|
59
|
+
* 1. **EC-1** (original fix, kept): a multi-level symlink chain A → B → C
|
|
60
|
+
* must be resolved end-to-end. `realpathSync` does this in 1 syscall.
|
|
61
|
+
* 2. **Defence-in-depth** (added v1.x): the previous implementation only
|
|
62
|
+
* called `lstatSync(path)` on the terminal component. If an INTERMEDIATE
|
|
63
|
+
* directory was a symlink (`base/inner-symlink → /outside`), `lstat` on
|
|
64
|
+
* `base/inner-symlink/file.txt` followed the symlink and reported the
|
|
65
|
+
* regular file — escape went undetected. Fix: walk up to the nearest
|
|
66
|
+
* existing ancestor and `realpath` THAT, then re-attach the suffix and
|
|
67
|
+
* check the result against the canonical base.
|
|
68
|
+
*
|
|
69
|
+
*/
|
|
70
|
+
export declare function assertNoSymlinkEscape(path: string, base: string): void;
|
|
35
71
|
/**
|
|
36
72
|
* Decide whether a project-relative path points to a known-sensitive file
|
|
37
73
|
* that a coding agent must not read or write.
|
|
@@ -57,3 +93,28 @@ export declare function isForbiddenPath(input: string): boolean;
|
|
|
57
93
|
export declare function sanitizeIdentifier(input: string, options?: {
|
|
58
94
|
maxLen?: number;
|
|
59
95
|
}): string;
|
|
96
|
+
/**
|
|
97
|
+
* Convert ANY opaque id (agent id, run id, conversation id, namespace, email,
|
|
98
|
+
* arbitrary string) into a deterministic, filesystem-safe filename component.
|
|
99
|
+
*
|
|
100
|
+
* Unlike {@link sanitizeIdentifier} (which THROWS on non-conforming input),
|
|
101
|
+
* this is a total function: it NEVER throws on a non-empty string. It returns
|
|
102
|
+
* the lowercased id verbatim when it already matches the safe grammar
|
|
103
|
+
* `^[a-z0-9][a-z0-9-_]*$` and fits `maxLen` (so UUIDs, hashes, and slugs stay
|
|
104
|
+
* human-readable), otherwise a deterministic `h-<16 hex>` sha256 token
|
|
105
|
+
* (collision-resistant and always a valid filename). The output charset is
|
|
106
|
+
* always `[a-z0-9_-]`, safe as a literal path segment on every filesystem.
|
|
107
|
+
*
|
|
108
|
+
* @param id - any opaque identifier (must be a non-empty string)
|
|
109
|
+
* @param options.maxLen - max length for the passthrough branch (default 128).
|
|
110
|
+
* Ids longer than this are hashed; the hash token itself is always short.
|
|
111
|
+
* @throws ConfigurationError (code `invalid_filename_id`) only on empty input.
|
|
112
|
+
*
|
|
113
|
+
* @example
|
|
114
|
+
* safeFilenameForId("550e8400-e29b-41d4-a716-446655440000") // passthrough
|
|
115
|
+
* safeFilenameForId("user@example.com") // "h-<16hex>"
|
|
116
|
+
*
|
|
117
|
+
*/
|
|
118
|
+
export declare function safeFilenameForId(id: string, options?: {
|
|
119
|
+
maxLen?: number;
|
|
120
|
+
}): string;
|
|
@@ -18,6 +18,15 @@
|
|
|
18
18
|
* @internal
|
|
19
19
|
*/
|
|
20
20
|
import { ConfigurationError } from "../../errors.js";
|
|
21
|
+
/**
|
|
22
|
+
* Thrown when a path operation would escape its allowed base directory.
|
|
23
|
+
* Extends `ConfigurationError` (no new error hierarchy per ADR D65).
|
|
24
|
+
*
|
|
25
|
+
*/
|
|
26
|
+
export declare class PathTraversalError extends ConfigurationError {
|
|
27
|
+
readonly name: string;
|
|
28
|
+
constructor(input: string, resolvedPath: string);
|
|
29
|
+
}
|
|
21
30
|
/**
|
|
22
31
|
* Thrown when an agent tool is asked to read or write a sensitive path
|
|
23
32
|
* that the blocklist forbids (`.env`, `.git/`, `node_modules/`, `.theo/`,
|
|
@@ -32,6 +41,33 @@ export declare class ForbiddenPathError extends ConfigurationError {
|
|
|
32
41
|
readonly name: string;
|
|
33
42
|
constructor(path: string);
|
|
34
43
|
}
|
|
44
|
+
/**
|
|
45
|
+
* Join `base` with `...parts` and ensure the resolved absolute path stays
|
|
46
|
+
* under `base`. Resolves FIRST, then prefix-checks (ADR D80) — prevents
|
|
47
|
+
* normalized-escape bypasses like `subdir/.\\./bar`.
|
|
48
|
+
*
|
|
49
|
+
* Returns the safe absolute path. Throws `PathTraversalError` if escape.
|
|
50
|
+
*
|
|
51
|
+
*/
|
|
52
|
+
export declare function safePathJoin(base: string, ...parts: string[]): string;
|
|
53
|
+
/**
|
|
54
|
+
* Assert that `path` — including every directory component in the chain —
|
|
55
|
+
* stays under `base` after symlink resolution. No-op when nothing on the
|
|
56
|
+
* path exists yet.
|
|
57
|
+
*
|
|
58
|
+
* Two-bug history:
|
|
59
|
+
* 1. **EC-1** (original fix, kept): a multi-level symlink chain A → B → C
|
|
60
|
+
* must be resolved end-to-end. `realpathSync` does this in 1 syscall.
|
|
61
|
+
* 2. **Defence-in-depth** (added v1.x): the previous implementation only
|
|
62
|
+
* called `lstatSync(path)` on the terminal component. If an INTERMEDIATE
|
|
63
|
+
* directory was a symlink (`base/inner-symlink → /outside`), `lstat` on
|
|
64
|
+
* `base/inner-symlink/file.txt` followed the symlink and reported the
|
|
65
|
+
* regular file — escape went undetected. Fix: walk up to the nearest
|
|
66
|
+
* existing ancestor and `realpath` THAT, then re-attach the suffix and
|
|
67
|
+
* check the result against the canonical base.
|
|
68
|
+
*
|
|
69
|
+
*/
|
|
70
|
+
export declare function assertNoSymlinkEscape(path: string, base: string): void;
|
|
35
71
|
/**
|
|
36
72
|
* Decide whether a project-relative path points to a known-sensitive file
|
|
37
73
|
* that a coding agent must not read or write.
|
|
@@ -57,3 +93,28 @@ export declare function isForbiddenPath(input: string): boolean;
|
|
|
57
93
|
export declare function sanitizeIdentifier(input: string, options?: {
|
|
58
94
|
maxLen?: number;
|
|
59
95
|
}): string;
|
|
96
|
+
/**
|
|
97
|
+
* Convert ANY opaque id (agent id, run id, conversation id, namespace, email,
|
|
98
|
+
* arbitrary string) into a deterministic, filesystem-safe filename component.
|
|
99
|
+
*
|
|
100
|
+
* Unlike {@link sanitizeIdentifier} (which THROWS on non-conforming input),
|
|
101
|
+
* this is a total function: it NEVER throws on a non-empty string. It returns
|
|
102
|
+
* the lowercased id verbatim when it already matches the safe grammar
|
|
103
|
+
* `^[a-z0-9][a-z0-9-_]*$` and fits `maxLen` (so UUIDs, hashes, and slugs stay
|
|
104
|
+
* human-readable), otherwise a deterministic `h-<16 hex>` sha256 token
|
|
105
|
+
* (collision-resistant and always a valid filename). The output charset is
|
|
106
|
+
* always `[a-z0-9_-]`, safe as a literal path segment on every filesystem.
|
|
107
|
+
*
|
|
108
|
+
* @param id - any opaque identifier (must be a non-empty string)
|
|
109
|
+
* @param options.maxLen - max length for the passthrough branch (default 128).
|
|
110
|
+
* Ids longer than this are hashed; the hash token itself is always short.
|
|
111
|
+
* @throws ConfigurationError (code `invalid_filename_id`) only on empty input.
|
|
112
|
+
*
|
|
113
|
+
* @example
|
|
114
|
+
* safeFilenameForId("550e8400-e29b-41d4-a716-446655440000") // passthrough
|
|
115
|
+
* safeFilenameForId("user@example.com") // "h-<16hex>"
|
|
116
|
+
*
|
|
117
|
+
*/
|
|
118
|
+
export declare function safeFilenameForId(id: string, options?: {
|
|
119
|
+
maxLen?: number;
|
|
120
|
+
}): string;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* M50 (agent-builder) — session-transcript compaction
|
|
2
|
+
* M50 (agent-builder) — session-transcript compaction.
|
|
3
3
|
*
|
|
4
|
-
*
|
|
4
|
+
* The mechanism:
|
|
5
5
|
* - the replacement history = recent USER messages verbatim (newest→oldest under a token budget;
|
|
6
6
|
* prior summaries filtered by marker) + ONE summary message with a textual marker prefix,
|
|
7
7
|
* injected as `role:"user"` (`build_compacted_history`, compact.rs:589-663);
|
|
@@ -14,6 +14,30 @@ export interface OTelSpan {
|
|
|
14
14
|
};
|
|
15
15
|
isRecording(): boolean;
|
|
16
16
|
}
|
|
17
|
+
/**
|
|
18
|
+
* Telemetry handle returned by {@link createTelemetry}. Callers use this to
|
|
19
|
+
* start spans, add events, etc. When telemetry is disabled OR OTel is not
|
|
20
|
+
* installed, every method is a safe no-op.
|
|
21
|
+
*
|
|
22
|
+
*/
|
|
23
|
+
export interface TelemetryHandle {
|
|
24
|
+
readonly enabled: boolean;
|
|
25
|
+
readonly includeContent: boolean;
|
|
26
|
+
/** Start a span. Returns a no-op span if telemetry is disabled. */
|
|
27
|
+
startSpan(name: string, attrs?: Record<string, string | number | boolean>): OTelSpan;
|
|
28
|
+
/** Start a child span nested under `parent` (M3 #64). `undefined` parent →
|
|
29
|
+
* a root span (parentless callers, or telemetry with no run span). */
|
|
30
|
+
startChildSpan(parent: OTelSpan | undefined, name: string, attrs?: Record<string, string | number | boolean>): OTelSpan;
|
|
31
|
+
/**
|
|
32
|
+
* Record a histogram observation. T0.1 ships
|
|
33
|
+
* `theokit_memory_recall_duration_ms`; downstream tasks add more.
|
|
34
|
+
* No-op when telemetry is disabled or when `@opentelemetry/api`'s metrics
|
|
35
|
+
* namespace is unavailable. ADR D34 — exporter errors are swallowed by `safe()`.
|
|
36
|
+
*/
|
|
37
|
+
recordHistogram(name: string, valueMs: number, attrs?: Record<string, string | number | boolean>): void;
|
|
38
|
+
/** End all open spans on this handle (best-effort, used by Agent.dispose). */
|
|
39
|
+
endAll(): void;
|
|
40
|
+
}
|
|
17
41
|
export declare const NOOP_SPAN: OTelSpan;
|
|
18
42
|
/** Exported for tests — resets the OTel cache and the warning-once latch. */
|
|
19
43
|
export declare function _resetTelemetryCacheForTests(): void;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var chunkELKO4ZLR_cjs = require('./chunk-ELKO4ZLR.cjs');
|
|
4
|
+
require('./chunk-LPVIRJVF.cjs');
|
|
5
|
+
require('./chunk-BM6N4KHO.cjs');
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
Object.defineProperty(exports, "JudgeCredentialError", {
|
|
10
|
+
enumerable: true,
|
|
11
|
+
get: function () { return chunkELKO4ZLR_cjs.JudgeCredentialError; }
|
|
12
|
+
});
|
|
13
|
+
Object.defineProperty(exports, "composeJudgePrompt", {
|
|
14
|
+
enumerable: true,
|
|
15
|
+
get: function () { return chunkELKO4ZLR_cjs.composeJudgePrompt; }
|
|
16
|
+
});
|
|
17
|
+
Object.defineProperty(exports, "judgeCallImpl", {
|
|
18
|
+
enumerable: true,
|
|
19
|
+
get: function () { return chunkELKO4ZLR_cjs.judgeCallImpl; }
|
|
20
|
+
});
|
|
21
|
+
//# sourceMappingURL=judge-call-G5SGV2M2.cjs.map
|
|
22
|
+
//# sourceMappingURL=judge-call-G5SGV2M2.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":[],"names":[],"mappings":"","file":"judge-call-
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"judge-call-G5SGV2M2.cjs"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":[],"names":[],"mappings":"","file":"judge-call-
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"judge-call-MDIPTBJI.js"}
|