@theokit/sdk 4.62.0 → 4.63.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 +97 -0
- package/dist/a2a/index.cjs +2 -2
- package/dist/a2a/index.js +1 -1
- package/dist/{agent-DIu6FooJ.d.ts → agent-BFno7Sfn.d.ts} +36 -21
- package/dist/agent-WK7MKIMH.cjs +66 -0
- package/dist/{agent-VYPUO4UB.cjs.map → agent-WK7MKIMH.cjs.map} +1 -1
- package/dist/{agent-D3Xr_-6Z.d.cts → agent-X0DKA943.d.cts} +36 -21
- package/dist/agent-YWMBM7LX.js +57 -0
- package/dist/{agent-NVBFTY5H.js.map → agent-YWMBM7LX.js.map} +1 -1
- package/dist/agent-session-store-6EL5NPA4.cjs +24 -0
- package/dist/{agent-session-store-WAKLOKWK.cjs.map → agent-session-store-6EL5NPA4.cjs.map} +1 -1
- package/dist/agent-session-store-OPGRB4XM.js +7 -0
- package/dist/{agent-session-store-G2BMUZQV.js.map → agent-session-store-OPGRB4XM.js.map} +1 -1
- package/dist/auth/index.cjs +18 -18
- package/dist/auth/index.js +6 -6
- package/dist/{batch-ND32UKZS.cjs → batch-BXYTW2DP.cjs} +27 -27
- package/dist/{batch-ND32UKZS.cjs.map → batch-BXYTW2DP.cjs.map} +1 -1
- package/dist/{batch-2TGJMNCJ.js → batch-L4ZXS46M.js} +10 -10
- package/dist/{batch-2TGJMNCJ.js.map → batch-L4ZXS46M.js.map} +1 -1
- package/dist/{chunk-VF7EWVDG.js → chunk-2GUYQR5P.js} +3 -3
- package/dist/{chunk-VF7EWVDG.js.map → chunk-2GUYQR5P.js.map} +1 -1
- package/dist/{chunk-J2UROOIG.cjs → chunk-2HVF2WJY.cjs} +8 -8
- package/dist/{chunk-J2UROOIG.cjs.map → chunk-2HVF2WJY.cjs.map} +1 -1
- package/dist/{chunk-44MBDIHG.js → chunk-2QDYBS2A.js} +3 -3
- package/dist/{chunk-44MBDIHG.js.map → chunk-2QDYBS2A.js.map} +1 -1
- package/dist/{chunk-NGESVVJN.cjs → chunk-3FFAEAUJ.cjs} +17 -17
- package/dist/{chunk-NGESVVJN.cjs.map → chunk-3FFAEAUJ.cjs.map} +1 -1
- package/dist/{chunk-GWC3HADL.cjs → chunk-3NSS2OIZ.cjs} +4 -4
- package/dist/{chunk-GWC3HADL.cjs.map → chunk-3NSS2OIZ.cjs.map} +1 -1
- package/dist/{chunk-CV7XMBHP.js → chunk-3O42QOMJ.js} +3 -3
- package/dist/{chunk-CV7XMBHP.js.map → chunk-3O42QOMJ.js.map} +1 -1
- package/dist/{chunk-IWBGCBR6.cjs → chunk-4CLOXP6H.cjs} +4 -4
- package/dist/{chunk-IWBGCBR6.cjs.map → chunk-4CLOXP6H.cjs.map} +1 -1
- package/dist/{chunk-YEXA3PGR.js → chunk-4FFBAUFS.js} +5 -5
- package/dist/{chunk-YEXA3PGR.js.map → chunk-4FFBAUFS.js.map} +1 -1
- package/dist/{chunk-HY57ULY2.cjs → chunk-4PYZ5AX3.cjs} +5 -5
- package/dist/{chunk-HY57ULY2.cjs.map → chunk-4PYZ5AX3.cjs.map} +1 -1
- package/dist/{chunk-OC4NTGMN.js → chunk-4QZSA2HJ.js} +3 -3
- package/dist/{chunk-OC4NTGMN.js.map → chunk-4QZSA2HJ.js.map} +1 -1
- package/dist/{chunk-K3FW2XZD.cjs → chunk-4ZHTIJNE.cjs} +9 -9
- package/dist/{chunk-K3FW2XZD.cjs.map → chunk-4ZHTIJNE.cjs.map} +1 -1
- package/dist/{chunk-BUIK7GUA.cjs → chunk-5HEG4CQH.cjs} +8 -8
- package/dist/{chunk-BUIK7GUA.cjs.map → chunk-5HEG4CQH.cjs.map} +1 -1
- package/dist/{chunk-SKXBJ2NU.cjs → chunk-5VB22SYX.cjs} +7 -54
- package/dist/chunk-5VB22SYX.cjs.map +1 -0
- package/dist/{chunk-5USCYPPI.cjs → chunk-6HKGLTJI.cjs} +8 -8
- package/dist/{chunk-5USCYPPI.cjs.map → chunk-6HKGLTJI.cjs.map} +1 -1
- package/dist/chunk-6RKUO7AW.cjs +864 -0
- package/dist/chunk-6RKUO7AW.cjs.map +1 -0
- package/dist/{chunk-5JLFFPCH.js → chunk-7YGCPMGB.js} +4 -4
- package/dist/{chunk-5JLFFPCH.js.map → chunk-7YGCPMGB.js.map} +1 -1
- package/dist/{chunk-SUKXXLWD.js → chunk-A46SWMIF.js} +6 -6
- package/dist/{chunk-SUKXXLWD.js.map → chunk-A46SWMIF.js.map} +1 -1
- package/dist/{chunk-F7AQV62G.js → chunk-A4JVILQU.js} +5 -5
- package/dist/{chunk-F7AQV62G.js.map → chunk-A4JVILQU.js.map} +1 -1
- package/dist/chunk-A4RAL2ER.cjs +51 -0
- package/dist/chunk-A4RAL2ER.cjs.map +1 -0
- package/dist/{chunk-44JAAH4X.js → chunk-B3IMEBOA.js} +3 -3
- package/dist/{chunk-44JAAH4X.js.map → chunk-B3IMEBOA.js.map} +1 -1
- package/dist/{chunk-QDED6YO6.cjs → chunk-B4EOJWOY.cjs} +5 -5
- package/dist/{chunk-QDED6YO6.cjs.map → chunk-B4EOJWOY.cjs.map} +1 -1
- package/dist/{chunk-YJDH3CKG.js → chunk-BP46RJ5X.js} +5 -5
- package/dist/{chunk-YJDH3CKG.js.map → chunk-BP46RJ5X.js.map} +1 -1
- package/dist/{chunk-QRSUA2CV.js → chunk-BU4KFWXF.js} +3 -3
- package/dist/{chunk-QRSUA2CV.js.map → chunk-BU4KFWXF.js.map} +1 -1
- package/dist/{chunk-IBYRA5PM.js → chunk-BVJJ3DRV.js} +6 -6
- package/dist/{chunk-IBYRA5PM.js.map → chunk-BVJJ3DRV.js.map} +1 -1
- package/dist/{chunk-AQLGBKNT.js → chunk-BZRFXJHA.js} +3 -3
- package/dist/{chunk-AQLGBKNT.js.map → chunk-BZRFXJHA.js.map} +1 -1
- package/dist/{chunk-UQGQFBRL.js → chunk-C3NT3PVE.js} +3 -3
- package/dist/{chunk-UQGQFBRL.js.map → chunk-C3NT3PVE.js.map} +1 -1
- package/dist/{chunk-UC3HT2S4.js → chunk-C72AZW7J.js} +3 -3
- package/dist/{chunk-UC3HT2S4.js.map → chunk-C72AZW7J.js.map} +1 -1
- package/dist/{chunk-WNTAPVU5.cjs → chunk-CQBXOJ6U.cjs} +13 -13
- package/dist/{chunk-WNTAPVU5.cjs.map → chunk-CQBXOJ6U.cjs.map} +1 -1
- package/dist/{chunk-T7XEKOVW.js → chunk-D4CUGAKZ.js} +3 -3
- package/dist/{chunk-T7XEKOVW.js.map → chunk-D4CUGAKZ.js.map} +1 -1
- package/dist/chunk-DKD3MH6A.js +194 -0
- package/dist/chunk-DKD3MH6A.js.map +1 -0
- package/dist/{chunk-YXGAW7BB.js → chunk-DN2PACRI.js} +10 -10
- package/dist/{chunk-YXGAW7BB.js.map → chunk-DN2PACRI.js.map} +1 -1
- package/dist/{chunk-XSX2UU6Y.cjs → chunk-DXGZ2NUG.cjs} +10 -10
- package/dist/{chunk-XSX2UU6Y.cjs.map → chunk-DXGZ2NUG.cjs.map} +1 -1
- package/dist/{chunk-NUKRL3I6.cjs → chunk-EG4QM7ZJ.cjs} +18 -2
- package/dist/chunk-EG4QM7ZJ.cjs.map +1 -0
- package/dist/chunk-GEEXBYFL.js +831 -0
- package/dist/chunk-GEEXBYFL.js.map +1 -0
- package/dist/chunk-GKEFRLU7.cjs +21 -0
- package/dist/chunk-GKEFRLU7.cjs.map +1 -0
- package/dist/{chunk-NIRE5CNO.cjs → chunk-HCZD23VS.cjs} +13 -13
- package/dist/{chunk-NIRE5CNO.cjs.map → chunk-HCZD23VS.cjs.map} +1 -1
- package/dist/chunk-HOXVQ5FR.cjs +201 -0
- package/dist/chunk-HOXVQ5FR.cjs.map +1 -0
- package/dist/{chunk-QARJGQSA.js → chunk-HS7AVXTF.js} +3 -3
- package/dist/{chunk-QARJGQSA.js.map → chunk-HS7AVXTF.js.map} +1 -1
- package/dist/{chunk-4I55V454.cjs → chunk-I6HGWHPU.cjs} +4 -4
- package/dist/{chunk-4I55V454.cjs.map → chunk-I6HGWHPU.cjs.map} +1 -1
- package/dist/{chunk-T73NA43R.js → chunk-IPYYKCRC.js} +3 -3
- package/dist/{chunk-T73NA43R.js.map → chunk-IPYYKCRC.js.map} +1 -1
- package/dist/{chunk-6OBIWHDR.cjs → chunk-ITYQ6VBP.cjs} +24 -365
- package/dist/chunk-ITYQ6VBP.cjs.map +1 -0
- package/dist/chunk-JPBKYL3B.cjs +18 -0
- package/dist/{chunk-6HTXPPHK.cjs.map → chunk-JPBKYL3B.cjs.map} +1 -1
- package/dist/{chunk-MZ2FGBLZ.js → chunk-K5OJUYSZ.js} +4 -4
- package/dist/{chunk-MZ2FGBLZ.js.map → chunk-K5OJUYSZ.js.map} +1 -1
- package/dist/{chunk-SKOCYA55.js → chunk-KIH6IZ43.js} +90 -88
- package/dist/chunk-KIH6IZ43.js.map +1 -0
- package/dist/{chunk-EI2Q7SJ5.cjs → chunk-KQ7TS7WW.cjs} +10 -10
- package/dist/{chunk-EI2Q7SJ5.cjs.map → chunk-KQ7TS7WW.cjs.map} +1 -1
- package/dist/{chunk-RUDY2GTT.js → chunk-KQRW2GPZ.js} +5 -5
- package/dist/{chunk-RUDY2GTT.js.map → chunk-KQRW2GPZ.js.map} +1 -1
- package/dist/{chunk-P5LCASTC.cjs → chunk-KYAJINUI.cjs} +125 -125
- package/dist/{chunk-P5LCASTC.cjs.map → chunk-KYAJINUI.cjs.map} +1 -1
- package/dist/{chunk-CQ2TQ32Y.js → chunk-LWGSI6M3.js} +5 -50
- package/dist/chunk-LWGSI6M3.js.map +1 -0
- package/dist/{chunk-ZHPWGIUX.js → chunk-LXI4XZEC.js} +5 -5
- package/dist/{chunk-ZHPWGIUX.js.map → chunk-LXI4XZEC.js.map} +1 -1
- package/dist/{chunk-AG5JPQIY.js → chunk-LXQ6HKPS.js} +3 -3
- package/dist/{chunk-AG5JPQIY.js.map → chunk-LXQ6HKPS.js.map} +1 -1
- package/dist/{chunk-ROYPRJH4.cjs → chunk-LYRDF5TQ.cjs} +9 -9
- package/dist/{chunk-ROYPRJH4.cjs.map → chunk-LYRDF5TQ.cjs.map} +1 -1
- package/dist/{chunk-G24KZRSA.js → chunk-N2U4AZGB.js} +3 -3
- package/dist/{chunk-G24KZRSA.js.map → chunk-N2U4AZGB.js.map} +1 -1
- package/dist/{chunk-4ERPXIVB.js → chunk-O73J46PV.js} +5 -5
- package/dist/{chunk-4ERPXIVB.js.map → chunk-O73J46PV.js.map} +1 -1
- package/dist/{chunk-F3YZMOAU.cjs → chunk-O7DK5PBJ.cjs} +4 -4
- package/dist/{chunk-F3YZMOAU.cjs.map → chunk-O7DK5PBJ.cjs.map} +1 -1
- package/dist/{chunk-Z4BCLVTI.cjs → chunk-O7LZFG6O.cjs} +5 -5
- package/dist/{chunk-Z4BCLVTI.cjs.map → chunk-O7LZFG6O.cjs.map} +1 -1
- package/dist/{chunk-3YJNUKYN.cjs → chunk-OHLDPWTA.cjs} +15 -15
- package/dist/{chunk-3YJNUKYN.cjs.map → chunk-OHLDPWTA.cjs.map} +1 -1
- package/dist/{chunk-FUL2I7G5.js → chunk-OSEG74VJ.js} +8 -8
- package/dist/{chunk-FUL2I7G5.js.map → chunk-OSEG74VJ.js.map} +1 -1
- package/dist/{chunk-UCBJBJ27.js → chunk-PUAEFLYK.js} +4 -4
- package/dist/{chunk-UCBJBJ27.js.map → chunk-PUAEFLYK.js.map} +1 -1
- package/dist/{chunk-CWHTMNNK.cjs → chunk-Q7LPTOD6.cjs} +24 -24
- package/dist/{chunk-CWHTMNNK.cjs.map → chunk-Q7LPTOD6.cjs.map} +1 -1
- package/dist/{chunk-2C72DXQF.cjs → chunk-RFMBZPOW.cjs} +9 -9
- package/dist/{chunk-2C72DXQF.cjs.map → chunk-RFMBZPOW.cjs.map} +1 -1
- package/dist/{chunk-NLTVXLGT.js → chunk-RFXWMRFC.js} +3 -3
- package/dist/{chunk-NLTVXLGT.js.map → chunk-RFXWMRFC.js.map} +1 -1
- package/dist/{chunk-2DG7KW4L.cjs → chunk-RMWTPV3M.cjs} +8 -8
- package/dist/{chunk-2DG7KW4L.cjs.map → chunk-RMWTPV3M.cjs.map} +1 -1
- package/dist/{chunk-P6A3M6VD.cjs → chunk-SZVR77EJ.cjs} +10 -10
- package/dist/{chunk-P6A3M6VD.cjs.map → chunk-SZVR77EJ.cjs.map} +1 -1
- package/dist/{chunk-3E77SX4H.js → chunk-TAZVKYWJ.js} +3 -3
- package/dist/{chunk-3E77SX4H.js.map → chunk-TAZVKYWJ.js.map} +1 -1
- package/dist/{chunk-WKRSH2VR.js → chunk-U6IFHFWK.js} +3 -3
- package/dist/{chunk-WKRSH2VR.js.map → chunk-U6IFHFWK.js.map} +1 -1
- package/dist/{chunk-I6TGFUCO.cjs → chunk-UALX2J2Q.cjs} +4 -4
- package/dist/{chunk-I6TGFUCO.cjs.map → chunk-UALX2J2Q.cjs.map} +1 -1
- package/dist/{chunk-XN7NOENA.js → chunk-UBDMVMBZ.js} +5 -5
- package/dist/{chunk-XN7NOENA.js.map → chunk-UBDMVMBZ.js.map} +1 -1
- package/dist/{chunk-QEKI3YKI.js → chunk-UEXIJTLC.js} +14 -349
- package/dist/chunk-UEXIJTLC.js.map +1 -0
- package/dist/{chunk-DQKERTND.cjs → chunk-UGT7GK7I.cjs} +11 -11
- package/dist/{chunk-DQKERTND.cjs.map → chunk-UGT7GK7I.cjs.map} +1 -1
- package/dist/{chunk-FKMUFNQE.js → chunk-UMP6OJIM.js} +4 -4
- package/dist/{chunk-FKMUFNQE.js.map → chunk-UMP6OJIM.js.map} +1 -1
- package/dist/{chunk-AEOZTXVW.js → chunk-UNYXQ4M5.js} +3 -3
- package/dist/{chunk-AEOZTXVW.js.map → chunk-UNYXQ4M5.js.map} +1 -1
- package/dist/{chunk-2BDH744Z.js → chunk-UTSRIDKZ.js} +3 -3
- package/dist/{chunk-2BDH744Z.js.map → chunk-UTSRIDKZ.js.map} +1 -1
- package/dist/{chunk-2ADR2GSO.cjs → chunk-UU36SHFY.cjs} +5 -5
- package/dist/{chunk-2ADR2GSO.cjs.map → chunk-UU36SHFY.cjs.map} +1 -1
- package/dist/{chunk-R3UPQFKK.cjs → chunk-V2BOS4WF.cjs} +9 -9
- package/dist/{chunk-R3UPQFKK.cjs.map → chunk-V2BOS4WF.cjs.map} +1 -1
- package/dist/chunk-WE22OXQA.js +48 -0
- package/dist/chunk-WE22OXQA.js.map +1 -0
- package/dist/{chunk-Q4CMI2LP.js → chunk-WLQNMXQE.js} +5 -5
- package/dist/{chunk-Q4CMI2LP.js.map → chunk-WLQNMXQE.js.map} +1 -1
- package/dist/{chunk-XWL6O3SW.cjs → chunk-WNO3C3N2.cjs} +4 -4
- package/dist/{chunk-XWL6O3SW.cjs.map → chunk-WNO3C3N2.cjs.map} +1 -1
- package/dist/{chunk-T7O6K6PX.js → chunk-XEQ3TM66.js} +18 -3
- package/dist/chunk-XEQ3TM66.js.map +1 -0
- package/dist/{chunk-BVZW2B5V.cjs → chunk-XJCXEKMD.cjs} +4 -4
- package/dist/{chunk-BVZW2B5V.cjs.map → chunk-XJCXEKMD.cjs.map} +1 -1
- package/dist/{chunk-JTB5Q42C.cjs → chunk-XL7Q7HB2.cjs} +4 -4
- package/dist/{chunk-JTB5Q42C.cjs.map → chunk-XL7Q7HB2.cjs.map} +1 -1
- package/dist/chunk-XO4SOZN6.js +19 -0
- package/dist/chunk-XO4SOZN6.js.map +1 -0
- package/dist/{chunk-CQGYNZ3K.cjs → chunk-XWTLIGO3.cjs} +4 -4
- package/dist/{chunk-CQGYNZ3K.cjs.map → chunk-XWTLIGO3.cjs.map} +1 -1
- package/dist/{chunk-6SBW4QR2.cjs → chunk-YML4ME27.cjs} +11 -11
- package/dist/{chunk-6SBW4QR2.cjs.map → chunk-YML4ME27.cjs.map} +1 -1
- package/dist/{chunk-P6H23T43.cjs → chunk-ZCIRZE37.cjs} +11 -11
- package/dist/{chunk-P6H23T43.cjs.map → chunk-ZCIRZE37.cjs.map} +1 -1
- package/dist/{chunk-QI7WE46I.cjs → chunk-ZLQSWSJ2.cjs} +11 -11
- package/dist/{chunk-QI7WE46I.cjs.map → chunk-ZLQSWSJ2.cjs.map} +1 -1
- package/dist/{chunk-AH6WD7JR.cjs → chunk-ZMRD5DZQ.cjs} +362 -360
- package/dist/chunk-ZMRD5DZQ.cjs.map +1 -0
- package/dist/{chunk-ILCGLTSA.cjs → chunk-ZSWPZ23K.cjs} +4 -4
- package/dist/{chunk-ILCGLTSA.cjs.map → chunk-ZSWPZ23K.cjs.map} +1 -1
- package/dist/{chunk-IDCKSLYH.js → chunk-ZZMZWBR6.js} +3 -3
- package/dist/{chunk-IDCKSLYH.js.map → chunk-ZZMZWBR6.js.map} +1 -1
- package/dist/compact-session-QV57KR66.cjs +59 -0
- package/dist/{compact-session-GJXJD73F.cjs.map → compact-session-QV57KR66.cjs.map} +1 -1
- package/dist/compact-session-RIGOWC4Y.js +22 -0
- package/dist/{compact-session-TSMQOIHO.js.map → compact-session-RIGOWC4Y.js.map} +1 -1
- package/dist/compaction.cjs +17 -17
- package/dist/compaction.js +4 -4
- package/dist/concurrency.cjs +7 -7
- package/dist/concurrency.js +5 -5
- package/dist/context-AGQ3DIZU.cjs +24 -0
- package/dist/{context-LCKNH2XI.cjs.map → context-AGQ3DIZU.cjs.map} +1 -1
- package/dist/context-GQRFBCLP.js +7 -0
- package/dist/{context-MZSKGKYR.js.map → context-GQRFBCLP.js.map} +1 -1
- package/dist/{cron-BcWmzWzT.d.cts → cron-BuiRPrvt.d.cts} +1 -1
- package/dist/{cron-De6hzWCF.d.ts → cron-C2SIi31n.d.ts} +1 -1
- package/dist/cron.cjs +37 -35
- package/dist/cron.d.cts +2 -2
- package/dist/cron.d.ts +2 -2
- package/dist/cron.js +36 -34
- package/dist/errors.cjs +22 -22
- package/dist/errors.js +3 -3
- package/dist/eval.cjs +42 -40
- package/dist/eval.cjs.map +1 -1
- package/dist/eval.js +36 -34
- package/dist/eval.js.map +1 -1
- package/dist/{executor-ZERJ3DGN.cjs → executor-6CYCA7MI.cjs} +25 -25
- package/dist/{executor-ZERJ3DGN.cjs.map → executor-6CYCA7MI.cjs.map} +1 -1
- package/dist/{executor-BMEHFOXZ.js → executor-QSEC3MRH.js} +8 -8
- package/dist/{executor-BMEHFOXZ.js.map → executor-QSEC3MRH.js.map} +1 -1
- package/dist/filesystem/index.cjs +8 -8
- package/dist/filesystem/index.js +4 -4
- package/dist/fs-session-store-4PIHT5UX.cjs +20 -0
- package/dist/{fs-session-store-XZ7ZTB3A.cjs.map → fs-session-store-4PIHT5UX.cjs.map} +1 -1
- package/dist/fs-session-store-NM6YSTE2.js +11 -0
- package/dist/{fs-session-store-4BHGIWRE.js.map → fs-session-store-NM6YSTE2.js.map} +1 -1
- package/dist/generate-object-GUNAUVBX.js +8 -0
- package/dist/{generate-object-N5MDZUJI.js.map → generate-object-GUNAUVBX.js.map} +1 -1
- package/dist/generate-object-R7HTMW7F.cjs +21 -0
- package/dist/{generate-object-PGSP5U7N.cjs.map → generate-object-R7HTMW7F.cjs.map} +1 -1
- package/dist/index-manager-RBDHP3PM.js +17 -0
- package/dist/{index-manager-AHAYJ33H.js.map → index-manager-RBDHP3PM.js.map} +1 -1
- package/dist/index-manager-UZBF22BJ.cjs +26 -0
- package/dist/{index-manager-RHPFVFSC.cjs.map → index-manager-UZBF22BJ.cjs.map} +1 -1
- package/dist/index.cjs +146 -319
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +8 -3
- package/dist/index.d.ts +8 -3
- package/dist/index.js +62 -235
- package/dist/index.js.map +1 -1
- package/dist/{inject-session-ZCQUB3IT.js → inject-session-DAR7OUCW.js} +8 -8
- package/dist/{inject-session-ZCQUB3IT.js.map → inject-session-DAR7OUCW.js.map} +1 -1
- package/dist/{inject-session-PPSO2IDD.cjs → inject-session-WQKMC3GR.cjs} +10 -10
- package/dist/{inject-session-PPSO2IDD.cjs.map → inject-session-WQKMC3GR.cjs.map} +1 -1
- package/dist/internal/memory/active-memory.d.ts +8 -1
- package/dist/internal/memory/adapters/index.cjs +9 -9
- package/dist/internal/memory/adapters/index.js +8 -8
- package/dist/internal/memory/dreaming/diary.d.ts +39 -2
- package/dist/internal/memory/index-db.d.ts +44 -1
- package/dist/internal/memory/index-manager-contract.d.ts +10 -0
- package/dist/internal/memory/index-manager-helpers.d.ts +20 -1
- package/dist/internal/memory/index-manager.d.ts +1 -1
- package/dist/internal/memory/lance-index.d.ts +15 -1
- package/dist/internal/memory/migrate-sqlite-to-lance.d.ts +43 -0
- package/dist/internal/memory/storage/index.cjs +101 -18
- package/dist/internal/memory/storage/index.d.cts +11 -1
- package/dist/internal/memory/storage/index.d.ts +11 -1
- package/dist/internal/memory/storage/index.js +10 -7
- package/dist/internal/memory/storage/markdown-store.d.cts +13 -42
- package/dist/internal/memory/storage/markdown-store.d.ts +13 -42
- package/dist/internal/memory/storage/memory-root.d.cts +93 -0
- package/dist/internal/memory/storage/memory-root.d.ts +93 -0
- package/dist/internal/memory/storage/session-loader.d.cts +35 -1
- package/dist/internal/memory/storage/session-loader.d.ts +35 -1
- package/dist/internal/memory/storage/session-summary-writer.d.cts +50 -2
- package/dist/internal/memory/storage/session-summary-writer.d.ts +50 -2
- package/dist/internal/memory/storage/transcript-store.d.cts +38 -1
- package/dist/internal/memory/storage/transcript-store.d.ts +38 -1
- package/dist/internal/memory/storage/wiki-loader.d.cts +27 -2
- package/dist/internal/memory/storage/wiki-loader.d.ts +27 -2
- package/dist/internal/memory/tools.d.ts +8 -1
- package/dist/internal/memory/types.d.ts +5 -0
- package/dist/internal/persistence/index.cjs +29 -28
- package/dist/internal/persistence/index.cjs.map +1 -1
- package/dist/internal/persistence/index.js +8 -7
- package/dist/internal/persistence/index.js.map +1 -1
- package/dist/internal/persistence/session-dir.d.cts +0 -15
- package/dist/internal/persistence/session-dir.d.ts +0 -15
- package/dist/internal/runtime/memory/memory-store.d.ts +2 -2
- package/dist/internal/security/index.cjs +14 -14
- package/dist/internal/security/index.js +4 -4
- package/dist/judge-call-LAHMBJ57.cjs +23 -0
- package/dist/{judge-call-EGYRC2RE.cjs.map → judge-call-LAHMBJ57.cjs.map} +1 -1
- package/dist/judge-call-LVXABPS3.js +6 -0
- package/dist/{judge-call-DWHAJATE.js.map → judge-call-LVXABPS3.js.map} +1 -1
- package/dist/mcp-auth.cjs +15 -15
- package/dist/mcp-auth.js +5 -5
- package/dist/models.cjs +22 -22
- package/dist/models.js +7 -7
- package/dist/path-safety.cjs +11 -11
- package/dist/path-safety.js +4 -4
- package/dist/persistence.cjs +33 -32
- package/dist/persistence.cjs.map +1 -1
- package/dist/persistence.js +10 -9
- package/dist/persistence.js.map +1 -1
- package/dist/project.cjs +6 -6
- package/dist/project.js +4 -4
- package/dist/providers.cjs +9 -9
- package/dist/providers.js +7 -7
- package/dist/registry-75W33OGL.js +10 -0
- package/dist/{registry-VFP3WWQP.js.map → registry-75W33OGL.js.map} +1 -1
- package/dist/registry-V7BDQ6QB.cjs +47 -0
- package/dist/{registry-VFKX7WOP.cjs.map → registry-V7BDQ6QB.cjs.map} +1 -1
- package/dist/retry.cjs +5 -5
- package/dist/retry.js +4 -4
- package/dist/sandbox/index.cjs +7 -7
- package/dist/sandbox/index.js +3 -3
- package/dist/server/errors-envelope.cjs +15 -15
- package/dist/server/errors-envelope.js +4 -4
- package/dist/session-transcript-6WNITKRE.cjs +63 -0
- package/dist/{session-transcript-HF5GEU5M.cjs.map → session-transcript-6WNITKRE.cjs.map} +1 -1
- package/dist/session-transcript-XAEKW6P7.js +6 -0
- package/dist/{session-transcript-P462ZRHX.js.map → session-transcript-XAEKW6P7.js.map} +1 -1
- package/dist/skills.cjs +8 -8
- package/dist/skills.js +6 -6
- package/dist/stream-object-UF4QRQRU.js +8 -0
- package/dist/{stream-object-L57K4OFS.js.map → stream-object-UF4QRQRU.js.map} +1 -1
- package/dist/stream-object-ZJTQNKY3.cjs +21 -0
- package/dist/{stream-object-BUCF5PHO.cjs.map → stream-object-ZJTQNKY3.cjs.map} +1 -1
- package/dist/subagents-loader-CRT5LLL3.js +8 -0
- package/dist/{subagents-loader-6ATCDEKN.js.map → subagents-loader-CRT5LLL3.js.map} +1 -1
- package/dist/subagents-loader-YEUFFPAL.cjs +17 -0
- package/dist/{subagents-loader-X5QKODCL.cjs.map → subagents-loader-YEUFFPAL.cjs.map} +1 -1
- package/dist/subagents-loader.cjs +7 -7
- package/dist/subagents-loader.d.cts +1 -1
- package/dist/subagents-loader.d.ts +1 -1
- package/dist/subagents-loader.js +5 -5
- package/dist/subscription/index.cjs +4 -4
- package/dist/subscription/index.js +3 -3
- package/dist/task-store.cjs +8 -8
- package/dist/task-store.js +5 -5
- package/dist/types/agent.d.ts +11 -0
- package/dist/types/memory-provider.d.ts +8 -0
- package/dist/workflow.cjs +28 -28
- package/dist/workflow.js +7 -7
- package/docs/error-codes.md +10 -9
- package/docs/harness-capability-map.md +57 -17
- package/docs/memory-decisions.md +44 -7
- package/package.json +1 -1
- package/dist/agent-NVBFTY5H.js +0 -55
- package/dist/agent-VYPUO4UB.cjs +0 -64
- package/dist/agent-session-store-G2BMUZQV.js +0 -7
- package/dist/agent-session-store-WAKLOKWK.cjs +0 -24
- package/dist/chunk-2UCFUSPW.cjs +0 -468
- package/dist/chunk-2UCFUSPW.cjs.map +0 -1
- package/dist/chunk-6HTXPPHK.cjs +0 -18
- package/dist/chunk-6OBIWHDR.cjs.map +0 -1
- package/dist/chunk-AH6WD7JR.cjs.map +0 -1
- package/dist/chunk-CQ2TQ32Y.js.map +0 -1
- package/dist/chunk-NUKRL3I6.cjs.map +0 -1
- package/dist/chunk-QEKI3YKI.js.map +0 -1
- package/dist/chunk-SKOCYA55.js.map +0 -1
- package/dist/chunk-SKXBJ2NU.cjs.map +0 -1
- package/dist/chunk-T7O6K6PX.js.map +0 -1
- package/dist/chunk-WCLDJSMY.js +0 -456
- package/dist/chunk-WCLDJSMY.js.map +0 -1
- package/dist/compact-session-GJXJD73F.cjs +0 -59
- package/dist/compact-session-TSMQOIHO.js +0 -22
- package/dist/context-LCKNH2XI.cjs +0 -24
- package/dist/context-MZSKGKYR.js +0 -7
- package/dist/fs-session-store-4BHGIWRE.js +0 -11
- package/dist/fs-session-store-XZ7ZTB3A.cjs +0 -20
- package/dist/generate-object-N5MDZUJI.js +0 -8
- package/dist/generate-object-PGSP5U7N.cjs +0 -21
- package/dist/index-manager-AHAYJ33H.js +0 -16
- package/dist/index-manager-RHPFVFSC.cjs +0 -25
- package/dist/judge-call-DWHAJATE.js +0 -6
- package/dist/judge-call-EGYRC2RE.cjs +0 -23
- package/dist/registry-VFKX7WOP.cjs +0 -47
- package/dist/registry-VFP3WWQP.js +0 -10
- package/dist/session-transcript-HF5GEU5M.cjs +0 -63
- package/dist/session-transcript-P462ZRHX.js +0 -6
- package/dist/stream-object-BUCF5PHO.cjs +0 -21
- package/dist/stream-object-L57K4OFS.js +0 -8
- package/dist/subagents-loader-6ATCDEKN.js +0 -8
- package/dist/subagents-loader-X5QKODCL.cjs +0 -17
|
@@ -1,2 +1,27 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
import type { MemoryRoot } from "./memory-root.js";
|
|
2
|
+
/**
|
|
3
|
+
* Wiki supplement discovery (ADR Phase 10 of memory-system-peer-project-parity).
|
|
4
|
+
*
|
|
5
|
+
* Wiki files live under `.theokit/memory/wiki/*.md`. They are READ-ONLY —
|
|
6
|
+
* the SDK never writes here. Each indexed chunk carries `source="wiki"` so
|
|
7
|
+
* `memory_search { corpus: "wiki" }` and `corpus: "all"` can scope hits.
|
|
8
|
+
*
|
|
9
|
+
* Shared with `@theokit/sdk-memory` through the semver-exempt `internal/memory-store`
|
|
10
|
+
* sub-path, so it carries no internal-visibility tag. `stripInternal` matches that tag as TEXT
|
|
11
|
+
* anywhere in the block, so naming it here — even in backticks, even to say it is absent — deletes
|
|
12
|
+
* this symbol from the published declarations and forces the satellite back onto a copy. Measured:
|
|
13
|
+
* the first draft of this very note did exactly that. See #430 and #463.
|
|
14
|
+
*/
|
|
15
|
+
export interface WikiFile {
|
|
16
|
+
absolutePath: string;
|
|
17
|
+
relPath: string;
|
|
18
|
+
}
|
|
19
|
+
/** `<memory root>/wiki`. Takes the RESOLVED ROOT — see `storage/memory-root.ts` (#463). */
|
|
20
|
+
export declare function wikiDir(root: MemoryRoot): string;
|
|
21
|
+
/**
|
|
22
|
+
* Every wiki supplement under `<memory root>/wiki`, as `{ absolutePath, relPath }` records.
|
|
23
|
+
*
|
|
24
|
+
* Returns `[]` when the directory does not exist. These are read-only supplements the indexer tags
|
|
25
|
+
* with `source="wiki"`, so `memory_search({ corpus: "wiki" })` can scope to them.
|
|
26
|
+
*/
|
|
27
|
+
export declare function discoverWikiFiles(root: MemoryRoot): Promise<WikiFile[]>;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { MemoryIndex } from "./memory-index.js";
|
|
2
|
+
import type { MemoryRoot } from "./storage/memory-root.js";
|
|
2
3
|
export interface MemoryTool extends MemoryToolJson {
|
|
3
4
|
execute(input: Record<string, unknown>): Promise<string>;
|
|
4
5
|
}
|
|
@@ -9,6 +10,12 @@ export interface MemorySearchToolOptions {
|
|
|
9
10
|
}
|
|
10
11
|
export declare function createMemorySearchTool(opts: MemorySearchToolOptions): MemoryTool;
|
|
11
12
|
export interface MemoryGetToolOptions {
|
|
12
|
-
|
|
13
|
+
/**
|
|
14
|
+
* The RESOLVED memory root the tool may read inside — not a cwd (#463).
|
|
15
|
+
*
|
|
16
|
+
* This guard used to derive its own root from `cwd` while `appendFact` wrote somewhere else, so
|
|
17
|
+
* a relocated memory was unreadable by the tool whose whole job is reading memory.
|
|
18
|
+
*/
|
|
19
|
+
root: MemoryRoot;
|
|
13
20
|
}
|
|
14
21
|
export declare function createMemoryGetTool(opts: MemoryGetToolOptions): MemoryTool;
|
|
@@ -4,6 +4,11 @@ export interface MemoryConfig {
|
|
|
4
4
|
userId?: string;
|
|
5
5
|
scope?: "agent" | "user" | "team";
|
|
6
6
|
storePath?: string;
|
|
7
|
+
/**
|
|
8
|
+
* Absolute path (or `~/`-prefixed) of the memory root. Defaults to `<cwd>/.theokit/memory`.
|
|
9
|
+
* See `storage/memory-root.ts` for why a relative value is refused rather than resolved.
|
|
10
|
+
*/
|
|
11
|
+
directory?: string;
|
|
7
12
|
}
|
|
8
13
|
/**
|
|
9
14
|
* What a fact IS, which is what decides whether it ages (#389).
|
|
@@ -1,15 +1,16 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var chunkVTYY7XL5_cjs = require('../../chunk-VTYY7XL5.cjs');
|
|
4
|
-
var
|
|
5
|
-
var
|
|
6
|
-
var
|
|
4
|
+
var chunk2HVF2WJY_cjs = require('../../chunk-2HVF2WJY.cjs');
|
|
5
|
+
var chunkA4RAL2ER_cjs = require('../../chunk-A4RAL2ER.cjs');
|
|
6
|
+
var chunk5VB22SYX_cjs = require('../../chunk-5VB22SYX.cjs');
|
|
7
|
+
var chunkUU36SHFY_cjs = require('../../chunk-UU36SHFY.cjs');
|
|
7
8
|
var chunkZF2LDKQQ_cjs = require('../../chunk-ZF2LDKQQ.cjs');
|
|
8
|
-
var
|
|
9
|
+
var chunkUALX2J2Q_cjs = require('../../chunk-UALX2J2Q.cjs');
|
|
9
10
|
var chunkAQO3NSRG_cjs = require('../../chunk-AQO3NSRG.cjs');
|
|
10
|
-
require('../../chunk-
|
|
11
|
-
require('../../chunk-
|
|
12
|
-
require('../../chunk-
|
|
11
|
+
require('../../chunk-4ZHTIJNE.cjs');
|
|
12
|
+
require('../../chunk-XL7Q7HB2.cjs');
|
|
13
|
+
require('../../chunk-EG4QM7ZJ.cjs');
|
|
13
14
|
var promises = require('fs/promises');
|
|
14
15
|
|
|
15
16
|
async function createExclusive(path, data, options) {
|
|
@@ -43,55 +44,55 @@ Object.defineProperty(exports, "PersistenceSchema", {
|
|
|
43
44
|
});
|
|
44
45
|
Object.defineProperty(exports, "migrateSchema", {
|
|
45
46
|
enumerable: true,
|
|
46
|
-
get: function () { return
|
|
47
|
+
get: function () { return chunk2HVF2WJY_cjs.migrateSchema; }
|
|
47
48
|
});
|
|
48
49
|
Object.defineProperty(exports, "readVersionedJson", {
|
|
49
50
|
enumerable: true,
|
|
50
|
-
get: function () { return
|
|
51
|
+
get: function () { return chunk2HVF2WJY_cjs.readVersionedJson; }
|
|
51
52
|
});
|
|
52
53
|
Object.defineProperty(exports, "writeVersionedJson", {
|
|
53
54
|
enumerable: true,
|
|
54
|
-
get: function () { return
|
|
55
|
+
get: function () { return chunk2HVF2WJY_cjs.writeVersionedJson; }
|
|
55
56
|
});
|
|
56
|
-
Object.defineProperty(exports, "
|
|
57
|
+
Object.defineProperty(exports, "containsCjk", {
|
|
57
58
|
enumerable: true,
|
|
58
|
-
get: function () { return
|
|
59
|
+
get: function () { return chunkA4RAL2ER_cjs.containsCjk; }
|
|
59
60
|
});
|
|
60
|
-
Object.defineProperty(exports, "
|
|
61
|
+
Object.defineProperty(exports, "sanitizeFts5Query", {
|
|
61
62
|
enumerable: true,
|
|
62
|
-
get: function () { return
|
|
63
|
+
get: function () { return chunkA4RAL2ER_cjs.sanitizeFts5Query; }
|
|
63
64
|
});
|
|
64
|
-
Object.defineProperty(exports, "
|
|
65
|
+
Object.defineProperty(exports, "applyWalWithFallback", {
|
|
65
66
|
enumerable: true,
|
|
66
|
-
get: function () { return
|
|
67
|
+
get: function () { return chunk5VB22SYX_cjs.applyWalWithFallback; }
|
|
67
68
|
});
|
|
68
|
-
Object.defineProperty(exports, "
|
|
69
|
+
Object.defineProperty(exports, "isCorruptionError", {
|
|
69
70
|
enumerable: true,
|
|
70
|
-
get: function () { return
|
|
71
|
+
get: function () { return chunk5VB22SYX_cjs.isCorruptionError; }
|
|
71
72
|
});
|
|
72
|
-
Object.defineProperty(exports, "
|
|
73
|
+
Object.defineProperty(exports, "openSqliteResilient", {
|
|
73
74
|
enumerable: true,
|
|
74
|
-
get: function () { return
|
|
75
|
+
get: function () { return chunk5VB22SYX_cjs.openSqliteResilient; }
|
|
75
76
|
});
|
|
76
77
|
Object.defineProperty(exports, "JsonlParseError", {
|
|
77
78
|
enumerable: true,
|
|
78
|
-
get: function () { return
|
|
79
|
+
get: function () { return chunkUU36SHFY_cjs.JsonlParseError; }
|
|
79
80
|
});
|
|
80
81
|
Object.defineProperty(exports, "appendJsonl", {
|
|
81
82
|
enumerable: true,
|
|
82
|
-
get: function () { return
|
|
83
|
+
get: function () { return chunkUU36SHFY_cjs.appendJsonl; }
|
|
83
84
|
});
|
|
84
85
|
Object.defineProperty(exports, "loadJsonl", {
|
|
85
86
|
enumerable: true,
|
|
86
|
-
get: function () { return
|
|
87
|
+
get: function () { return chunkUU36SHFY_cjs.loadJsonl; }
|
|
87
88
|
});
|
|
88
89
|
Object.defineProperty(exports, "readJsonlIds", {
|
|
89
90
|
enumerable: true,
|
|
90
|
-
get: function () { return
|
|
91
|
+
get: function () { return chunkUU36SHFY_cjs.readJsonlIds; }
|
|
91
92
|
});
|
|
92
93
|
Object.defineProperty(exports, "withFileLock", {
|
|
93
94
|
enumerable: true,
|
|
94
|
-
get: function () { return
|
|
95
|
+
get: function () { return chunkUU36SHFY_cjs.withFileLock; }
|
|
95
96
|
});
|
|
96
97
|
Object.defineProperty(exports, "withCwdMutex", {
|
|
97
98
|
enumerable: true,
|
|
@@ -99,15 +100,15 @@ Object.defineProperty(exports, "withCwdMutex", {
|
|
|
99
100
|
});
|
|
100
101
|
Object.defineProperty(exports, "atomicWriteJson", {
|
|
101
102
|
enumerable: true,
|
|
102
|
-
get: function () { return
|
|
103
|
+
get: function () { return chunkUALX2J2Q_cjs.atomicWriteJson; }
|
|
103
104
|
});
|
|
104
105
|
Object.defineProperty(exports, "atomicWriteText", {
|
|
105
106
|
enumerable: true,
|
|
106
|
-
get: function () { return
|
|
107
|
+
get: function () { return chunkUALX2J2Q_cjs.atomicWriteText; }
|
|
107
108
|
});
|
|
108
109
|
Object.defineProperty(exports, "replaceFileAtomic", {
|
|
109
110
|
enumerable: true,
|
|
110
|
-
get: function () { return
|
|
111
|
+
get: function () { return chunkUALX2J2Q_cjs.replaceFileAtomic; }
|
|
111
112
|
});
|
|
112
113
|
Object.defineProperty(exports, "displayTheokitHome", {
|
|
113
114
|
enumerable: true,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/internal/persistence/exclusive-create.ts","../../../src/internal/persistence/sqlite-cas.ts"],"names":["open"],"mappings":"
|
|
1
|
+
{"version":3,"sources":["../../../src/internal/persistence/exclusive-create.ts","../../../src/internal/persistence/sqlite-cas.ts"],"names":["open"],"mappings":";;;;;;;;;;;;;;;AAwDA,eAAsB,eAAA,CACpB,IAAA,EACA,IAAA,EACA,OAAA,EACkB;AAClB,EAAA,MAAM,IAAA,GAAO,SAAS,IAAA,IAAQ,GAAA;AAC9B,EAAA,IAAI;AACF,IAAA,MAAM,MAAA,GAAS,MAAMA,aAAA,CAAK,IAAA,EAAM,MAAM,IAAI,CAAA;AAC1C,IAAA,IAAI;AACF,MAAA,MAAM,MAAA,CAAO,UAAU,IAAI,CAAA;AAC3B,MAAA,OAAO,IAAA;AAAA,IACT,CAAA,SAAE;AACA,MAAA,MAAM,OAAO,KAAA,EAAM;AAAA,IACrB;AAAA,EACF,SAAS,GAAA,EAAK;AACZ,IAAA,IAAK,GAAA,CAA8B,SAAS,QAAA,EAAU;AACpD,MAAA,OAAO,KAAA;AAAA,IACT;AACA,IAAA,MAAM,GAAA;AAAA,EACR;AACF;;;ACdO,SAAS,SAAA,CACd,EAAA,EACA,GAAA,EACA,MAAA,EACA,kBAA0B,CAAA,EACjB;AACT,EAAA,MAAM,IAAA,GAAO,EAAA,CAAG,OAAA,CAAQ,GAAG,CAAA;AAC3B,EAAA,MAAM,MAAA,GAAS,IAAA,CAAK,GAAA,CAAI,GAAI,MAAoB,CAAA;AAChD,EAAA,OAAO,OAAO,OAAA,KAAY,eAAA;AAC5B","file":"index.cjs","sourcesContent":["/**\n * O_EXCL exclusive file creation (ADR D82).\n *\n * `createExclusive(path, data, { mode })` creates a file in a single\n * syscall (`open(path, \"wx\", mode)`). Returns `true` if created, `false`\n * if it already existed (EEXIST swallowed — caller decides). All other\n * errors propagate.\n *\n * Default mode is 0o600 (owner-only) — EC-2 fix from edge-case review:\n * token files, lockfiles, and PID files MUST NOT default to world-\n * readable 0o644 under typical umask 022. Callers writing non-sensitive\n * files can pass `mode: 0o644` explicitly.\n *\n * NFS not honoring O_EXCL is documented (D61 — same stance as\n * `withFileLock`); the SDK target is ext4/APFS/NTFS.\n *\n * @internal\n */\n\nimport { open } from \"node:fs/promises\";\n\nexport interface CreateExclusiveOptions {\n /** Unix mode for the new file (default 0o600 — owner-only). */\n mode?: number;\n}\n\n/**\n * Create `path` holding `data`, but only if it does not exist yet. Returns `true` when this call\n * created it, `false` when it was already there.\n *\n * The check and the create are one `open(path, \"wx\")` syscall, so of N processes racing to create\n * the same path exactly one gets `true` — no window between testing and writing. The content is\n * written after the create, so the `false` branch tells you the file exists, not that another\n * writer has finished filling it.\n *\n * Only `EEXIST` becomes `false`. Every other error propagates: a missing parent directory is\n * `ENOENT`, an unwritable one `EACCES`. This never creates directories.\n *\n * The file is created with mode 0600 unless `options.mode` says otherwise, and the mode is\n * subject to the process umask. That default is deliberate — the callers are token files,\n * lockfiles and PID files, and 0644 under a typical umask would make them world-readable.\n *\n * **Choosing between this and the locks.** `createExclusive` claims a NAME once and is the right\n * tool for first-writer-wins: seeding a config, electing a single owner, writing a credential\n * exactly once. It cannot guard repeated updates, because a file that already exists always loses.\n * For read-modify-write on a path several writers touch, take a lock instead —\n * {@link withFileLock} across processes, `withCwdMutex` when the writers are all in this one. For\n * an in-place update guarded by a version column in SQLite, `casUpdate` is the equivalent\n * primitive.\n *\n * Atomicity is the filesystem's `O_EXCL`, which NFS does not reliably honor; the SDK targets\n * ext4, APFS and NTFS.\n *\n * Semver-exempt: reachable via the `@theokit/sdk/internal/persistence` sub-path, which the package\n * declares in `exports` but does NOT cover with its semver contract.\n */\nexport async function createExclusive(\n path: string,\n data: string | Uint8Array,\n options?: CreateExclusiveOptions,\n): Promise<boolean> {\n const mode = options?.mode ?? 0o600;\n try {\n const handle = await open(path, \"wx\", mode);\n try {\n await handle.writeFile(data);\n return true;\n } finally {\n await handle.close();\n }\n } catch (err) {\n if ((err as NodeJS.ErrnoException).code === \"EEXIST\") {\n return false;\n }\n throw err;\n }\n}\n","/**\n * SQLite optimistic compare-and-swap (ADR D83).\n *\n * `casUpdate(db, sql, params, expectedChanges)` executes a prepared\n * UPDATE and returns true if `result.changes === expectedChanges`.\n * Caller provides the full SQL (including `WHERE version = ?` predicate);\n * helper does NOT generate SQL — DRY at the level of \"wrap the\n * convention\", not \"build queries\".\n *\n * Use case canonical (Hermes `kanban_db.py:1922-1934`):\n *\n * const won = casUpdate(\n * db,\n * \"UPDATE registry SET status = ?, version = version + 1 WHERE id = ? AND version = ?\",\n * [\"running\", \"agent-foo\", 3],\n * );\n * if (!won) { ... re-read and retry ... }\n *\n * Helper does NOT retry — caller responsible for backoff (avoids hidden\n * loops). Helper does NOT cache prepared statements — `better-sqlite3`\n * caches internally; SDK use is one-shot per mutation, not hot loops.\n *\n * NOTE — no internal-visibility tag in this block. `tsconfig.base.json` sets `stripInternal: true`,\n * and TypeScript scans EVERY leading comment range of the declaration that follows, including the\n * import right below this one. The tag that used to sit here deleted that import from the emitted\n * `.d.ts`, leaving the types it binds unresolvable for any consumer running type-aware lint\n * (usetheodev/theokit-sdk#283 records the same trap on a declaration).\n */\n\nimport type Database from \"better-sqlite3\";\n\ntype DatabaseInstance = InstanceType<typeof Database>;\n\n/**\n * Run an UPDATE and report whether it changed exactly the number of rows you expected — the\n * optimistic-concurrency equivalent of taking a lock.\n *\n * `sql` is yours, in full, including the guard that makes it a compare-and-swap: the\n * `WHERE ... AND version = ?` predicate and the `SET version = version + 1` that closes it. This\n * function generates nothing. It prepares the statement, runs it with `params`, and compares\n * `changes` against `expectedChanges` (default 1).\n *\n * `false` means the guard did not match — someone else moved the row first, or the id does not\n * exist. Those two are indistinguishable here; if you need to tell them apart, re-read the row.\n * A `false` return means NOTHING was written, so the caller owns the re-read-and-retry, with\n * whatever backoff it wants. There is no retry loop hidden in here, by design.\n *\n * SQL errors propagate — bad syntax, a closed database, a constraint violation, a busy writer.\n * Only the row-count mismatch is reported as `false`.\n *\n * Runs as a single implicit transaction, so no explicit BEGIN is needed for one statement. Wrap\n * the call yourself when the swap has to commit together with other writes.\n *\n * **Choosing between this and the locks.** `casUpdate` never blocks and never waits: the loser\n * finds out immediately and decides what to do. Prefer it when the contended state is already a\n * row with a version column. When the contended state is a FILE, there is no version column to\n * swap on — use `withFileLock` across processes, or `withCwdMutex` within one. When the goal is\n * to create something exactly once rather than update it, `createExclusive` is the primitive.\n *\n * Semver-exempt: reachable via the `@theokit/sdk/internal/persistence` sub-path, which the package\n * declares in `exports` but does NOT cover with its semver contract.\n */\nexport function casUpdate(\n db: DatabaseInstance,\n sql: string,\n params: ReadonlyArray<unknown>,\n expectedChanges: number = 1,\n): boolean {\n const stmt = db.prepare(sql);\n const result = stmt.run(...(params as unknown[]));\n return result.changes === expectedChanges;\n}\n"]}
|
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
export { PersistenceSchema } from '../../chunk-HY66GLM6.js';
|
|
2
|
-
export { migrateSchema, readVersionedJson, writeVersionedJson } from '../../chunk-
|
|
3
|
-
export {
|
|
4
|
-
export {
|
|
2
|
+
export { migrateSchema, readVersionedJson, writeVersionedJson } from '../../chunk-PUAEFLYK.js';
|
|
3
|
+
export { containsCjk, sanitizeFts5Query } from '../../chunk-WE22OXQA.js';
|
|
4
|
+
export { applyWalWithFallback, isCorruptionError, openSqliteResilient } from '../../chunk-LWGSI6M3.js';
|
|
5
|
+
export { JsonlParseError, appendJsonl, loadJsonl, readJsonlIds, withFileLock } from '../../chunk-3O42QOMJ.js';
|
|
5
6
|
export { withCwdMutex } from '../../chunk-Q5EWJPRY.js';
|
|
6
|
-
export { atomicWriteJson, atomicWriteText, replaceFileAtomic } from '../../chunk-
|
|
7
|
+
export { atomicWriteJson, atomicWriteText, replaceFileAtomic } from '../../chunk-2GUYQR5P.js';
|
|
7
8
|
export { displayTheokitHome, getProfilesRoot, getTheokitHome } from '../../chunk-UFLD2HEV.js';
|
|
8
|
-
import '../../chunk-
|
|
9
|
-
import '../../chunk-
|
|
10
|
-
import '../../chunk-
|
|
9
|
+
import '../../chunk-ZZMZWBR6.js';
|
|
10
|
+
import '../../chunk-D4CUGAKZ.js';
|
|
11
|
+
import '../../chunk-XEQ3TM66.js';
|
|
11
12
|
import { open } from 'fs/promises';
|
|
12
13
|
|
|
13
14
|
async function createExclusive(path, data, options) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/internal/persistence/exclusive-create.ts","../../../src/internal/persistence/sqlite-cas.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"sources":["../../../src/internal/persistence/exclusive-create.ts","../../../src/internal/persistence/sqlite-cas.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAwDA,eAAsB,eAAA,CACpB,IAAA,EACA,IAAA,EACA,OAAA,EACkB;AAClB,EAAA,MAAM,IAAA,GAAO,SAAS,IAAA,IAAQ,GAAA;AAC9B,EAAA,IAAI;AACF,IAAA,MAAM,MAAA,GAAS,MAAM,IAAA,CAAK,IAAA,EAAM,MAAM,IAAI,CAAA;AAC1C,IAAA,IAAI;AACF,MAAA,MAAM,MAAA,CAAO,UAAU,IAAI,CAAA;AAC3B,MAAA,OAAO,IAAA;AAAA,IACT,CAAA,SAAE;AACA,MAAA,MAAM,OAAO,KAAA,EAAM;AAAA,IACrB;AAAA,EACF,SAAS,GAAA,EAAK;AACZ,IAAA,IAAK,GAAA,CAA8B,SAAS,QAAA,EAAU;AACpD,MAAA,OAAO,KAAA;AAAA,IACT;AACA,IAAA,MAAM,GAAA;AAAA,EACR;AACF;;;ACdO,SAAS,SAAA,CACd,EAAA,EACA,GAAA,EACA,MAAA,EACA,kBAA0B,CAAA,EACjB;AACT,EAAA,MAAM,IAAA,GAAO,EAAA,CAAG,OAAA,CAAQ,GAAG,CAAA;AAC3B,EAAA,MAAM,MAAA,GAAS,IAAA,CAAK,GAAA,CAAI,GAAI,MAAoB,CAAA;AAChD,EAAA,OAAO,OAAO,OAAA,KAAY,eAAA;AAC5B","file":"index.js","sourcesContent":["/**\n * O_EXCL exclusive file creation (ADR D82).\n *\n * `createExclusive(path, data, { mode })` creates a file in a single\n * syscall (`open(path, \"wx\", mode)`). Returns `true` if created, `false`\n * if it already existed (EEXIST swallowed — caller decides). All other\n * errors propagate.\n *\n * Default mode is 0o600 (owner-only) — EC-2 fix from edge-case review:\n * token files, lockfiles, and PID files MUST NOT default to world-\n * readable 0o644 under typical umask 022. Callers writing non-sensitive\n * files can pass `mode: 0o644` explicitly.\n *\n * NFS not honoring O_EXCL is documented (D61 — same stance as\n * `withFileLock`); the SDK target is ext4/APFS/NTFS.\n *\n * @internal\n */\n\nimport { open } from \"node:fs/promises\";\n\nexport interface CreateExclusiveOptions {\n /** Unix mode for the new file (default 0o600 — owner-only). */\n mode?: number;\n}\n\n/**\n * Create `path` holding `data`, but only if it does not exist yet. Returns `true` when this call\n * created it, `false` when it was already there.\n *\n * The check and the create are one `open(path, \"wx\")` syscall, so of N processes racing to create\n * the same path exactly one gets `true` — no window between testing and writing. The content is\n * written after the create, so the `false` branch tells you the file exists, not that another\n * writer has finished filling it.\n *\n * Only `EEXIST` becomes `false`. Every other error propagates: a missing parent directory is\n * `ENOENT`, an unwritable one `EACCES`. This never creates directories.\n *\n * The file is created with mode 0600 unless `options.mode` says otherwise, and the mode is\n * subject to the process umask. That default is deliberate — the callers are token files,\n * lockfiles and PID files, and 0644 under a typical umask would make them world-readable.\n *\n * **Choosing between this and the locks.** `createExclusive` claims a NAME once and is the right\n * tool for first-writer-wins: seeding a config, electing a single owner, writing a credential\n * exactly once. It cannot guard repeated updates, because a file that already exists always loses.\n * For read-modify-write on a path several writers touch, take a lock instead —\n * {@link withFileLock} across processes, `withCwdMutex` when the writers are all in this one. For\n * an in-place update guarded by a version column in SQLite, `casUpdate` is the equivalent\n * primitive.\n *\n * Atomicity is the filesystem's `O_EXCL`, which NFS does not reliably honor; the SDK targets\n * ext4, APFS and NTFS.\n *\n * Semver-exempt: reachable via the `@theokit/sdk/internal/persistence` sub-path, which the package\n * declares in `exports` but does NOT cover with its semver contract.\n */\nexport async function createExclusive(\n path: string,\n data: string | Uint8Array,\n options?: CreateExclusiveOptions,\n): Promise<boolean> {\n const mode = options?.mode ?? 0o600;\n try {\n const handle = await open(path, \"wx\", mode);\n try {\n await handle.writeFile(data);\n return true;\n } finally {\n await handle.close();\n }\n } catch (err) {\n if ((err as NodeJS.ErrnoException).code === \"EEXIST\") {\n return false;\n }\n throw err;\n }\n}\n","/**\n * SQLite optimistic compare-and-swap (ADR D83).\n *\n * `casUpdate(db, sql, params, expectedChanges)` executes a prepared\n * UPDATE and returns true if `result.changes === expectedChanges`.\n * Caller provides the full SQL (including `WHERE version = ?` predicate);\n * helper does NOT generate SQL — DRY at the level of \"wrap the\n * convention\", not \"build queries\".\n *\n * Use case canonical (Hermes `kanban_db.py:1922-1934`):\n *\n * const won = casUpdate(\n * db,\n * \"UPDATE registry SET status = ?, version = version + 1 WHERE id = ? AND version = ?\",\n * [\"running\", \"agent-foo\", 3],\n * );\n * if (!won) { ... re-read and retry ... }\n *\n * Helper does NOT retry — caller responsible for backoff (avoids hidden\n * loops). Helper does NOT cache prepared statements — `better-sqlite3`\n * caches internally; SDK use is one-shot per mutation, not hot loops.\n *\n * NOTE — no internal-visibility tag in this block. `tsconfig.base.json` sets `stripInternal: true`,\n * and TypeScript scans EVERY leading comment range of the declaration that follows, including the\n * import right below this one. The tag that used to sit here deleted that import from the emitted\n * `.d.ts`, leaving the types it binds unresolvable for any consumer running type-aware lint\n * (usetheodev/theokit-sdk#283 records the same trap on a declaration).\n */\n\nimport type Database from \"better-sqlite3\";\n\ntype DatabaseInstance = InstanceType<typeof Database>;\n\n/**\n * Run an UPDATE and report whether it changed exactly the number of rows you expected — the\n * optimistic-concurrency equivalent of taking a lock.\n *\n * `sql` is yours, in full, including the guard that makes it a compare-and-swap: the\n * `WHERE ... AND version = ?` predicate and the `SET version = version + 1` that closes it. This\n * function generates nothing. It prepares the statement, runs it with `params`, and compares\n * `changes` against `expectedChanges` (default 1).\n *\n * `false` means the guard did not match — someone else moved the row first, or the id does not\n * exist. Those two are indistinguishable here; if you need to tell them apart, re-read the row.\n * A `false` return means NOTHING was written, so the caller owns the re-read-and-retry, with\n * whatever backoff it wants. There is no retry loop hidden in here, by design.\n *\n * SQL errors propagate — bad syntax, a closed database, a constraint violation, a busy writer.\n * Only the row-count mismatch is reported as `false`.\n *\n * Runs as a single implicit transaction, so no explicit BEGIN is needed for one statement. Wrap\n * the call yourself when the swap has to commit together with other writes.\n *\n * **Choosing between this and the locks.** `casUpdate` never blocks and never waits: the loser\n * finds out immediately and decides what to do. Prefer it when the contended state is already a\n * row with a version column. When the contended state is a FILE, there is no version column to\n * swap on — use `withFileLock` across processes, or `withCwdMutex` within one. When the goal is\n * to create something exactly once rather than update it, `createExclusive` is the primitive.\n *\n * Semver-exempt: reachable via the `@theokit/sdk/internal/persistence` sub-path, which the package\n * declares in `exports` but does NOT cover with its semver contract.\n */\nexport function casUpdate(\n db: DatabaseInstance,\n sql: string,\n params: ReadonlyArray<unknown>,\n expectedChanges: number = 1,\n): boolean {\n const stmt = db.prepare(sql);\n const result = stmt.run(...(params as unknown[]));\n return result.changes === expectedChanges;\n}\n"]}
|
|
@@ -1,16 +1 @@
|
|
|
1
|
-
/** The subset of `LocalOptions` this resolver reads. */
|
|
2
|
-
interface SessionDirOptions {
|
|
3
|
-
sessionDir?: string;
|
|
4
|
-
baseDir?: string;
|
|
5
|
-
}
|
|
6
|
-
/**
|
|
7
|
-
* The session directory the caller ASKED for, or `undefined` when they asked for nothing.
|
|
8
|
-
*
|
|
9
|
-
* {@link resolveSessionDir} always answers with a path, falling back to the default home — which is
|
|
10
|
-
* the right answer for "where do transcripts go" and the wrong one for "did this consumer opt into
|
|
11
|
-
* sharing state with the Claude Code CLI". Memory writes need the second question, and the two
|
|
12
|
-
* accepted names for the option live here, so asking it anywhere else would put a copy of that
|
|
13
|
-
* knowledge somewhere it can drift.
|
|
14
|
-
*/
|
|
15
|
-
export declare function explicitSessionDir(local: SessionDirOptions | undefined): string | undefined;
|
|
16
1
|
export {};
|
|
@@ -1,16 +1 @@
|
|
|
1
|
-
/** The subset of `LocalOptions` this resolver reads. */
|
|
2
|
-
interface SessionDirOptions {
|
|
3
|
-
sessionDir?: string;
|
|
4
|
-
baseDir?: string;
|
|
5
|
-
}
|
|
6
|
-
/**
|
|
7
|
-
* The session directory the caller ASKED for, or `undefined` when they asked for nothing.
|
|
8
|
-
*
|
|
9
|
-
* {@link resolveSessionDir} always answers with a path, falling back to the default home — which is
|
|
10
|
-
* the right answer for "where do transcripts go" and the wrong one for "did this consumer opt into
|
|
11
|
-
* sharing state with the Claude Code CLI". Memory writes need the second question, and the two
|
|
12
|
-
* accepted names for the option live here, so asking it anywhere else would put a copy of that
|
|
13
|
-
* knowledge somewhere it can drift.
|
|
14
|
-
*/
|
|
15
|
-
export declare function explicitSessionDir(local: SessionDirOptions | undefined): string | undefined;
|
|
16
1
|
export {};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { type MemoryConfig, type MemoryFact, redactSecrets } from "../../memory/types.js";
|
|
2
2
|
export { redactSecrets };
|
|
3
|
-
export declare function readMemoryFacts(cwd: string, config: MemoryConfig
|
|
4
|
-
export declare function appendMemoryFact(cwd: string, config: MemoryConfig, fact: MemoryFact
|
|
3
|
+
export declare function readMemoryFacts(cwd: string, config: MemoryConfig): Promise<MemoryFact[]>;
|
|
4
|
+
export declare function appendMemoryFact(cwd: string, config: MemoryConfig, fact: MemoryFact): Promise<void>;
|
|
@@ -1,53 +1,53 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
require('../../chunk-MUUQ2WFJ.cjs');
|
|
4
|
-
var
|
|
4
|
+
var chunkV2BOS4WF_cjs = require('../../chunk-V2BOS4WF.cjs');
|
|
5
5
|
require('../../chunk-VKJ7V7EB.cjs');
|
|
6
|
-
require('../../chunk-
|
|
7
|
-
var
|
|
8
|
-
require('../../chunk-
|
|
6
|
+
require('../../chunk-4ZHTIJNE.cjs');
|
|
7
|
+
var chunkXL7Q7HB2_cjs = require('../../chunk-XL7Q7HB2.cjs');
|
|
8
|
+
require('../../chunk-EG4QM7ZJ.cjs');
|
|
9
9
|
|
|
10
10
|
|
|
11
11
|
|
|
12
12
|
Object.defineProperty(exports, "ForbiddenPathError", {
|
|
13
13
|
enumerable: true,
|
|
14
|
-
get: function () { return
|
|
14
|
+
get: function () { return chunkV2BOS4WF_cjs.ForbiddenPathError; }
|
|
15
15
|
});
|
|
16
16
|
Object.defineProperty(exports, "PathTraversalError", {
|
|
17
17
|
enumerable: true,
|
|
18
|
-
get: function () { return
|
|
18
|
+
get: function () { return chunkV2BOS4WF_cjs.PathTraversalError; }
|
|
19
19
|
});
|
|
20
20
|
Object.defineProperty(exports, "assertNoSymlinkEscape", {
|
|
21
21
|
enumerable: true,
|
|
22
|
-
get: function () { return
|
|
22
|
+
get: function () { return chunkV2BOS4WF_cjs.assertNoSymlinkEscape; }
|
|
23
23
|
});
|
|
24
24
|
Object.defineProperty(exports, "isForbiddenPath", {
|
|
25
25
|
enumerable: true,
|
|
26
|
-
get: function () { return
|
|
26
|
+
get: function () { return chunkV2BOS4WF_cjs.isForbiddenPath; }
|
|
27
27
|
});
|
|
28
28
|
Object.defineProperty(exports, "safePathJoin", {
|
|
29
29
|
enumerable: true,
|
|
30
|
-
get: function () { return
|
|
30
|
+
get: function () { return chunkV2BOS4WF_cjs.safePathJoin; }
|
|
31
31
|
});
|
|
32
32
|
Object.defineProperty(exports, "sanitizeIdentifier", {
|
|
33
33
|
enumerable: true,
|
|
34
|
-
get: function () { return
|
|
34
|
+
get: function () { return chunkV2BOS4WF_cjs.sanitizeIdentifier; }
|
|
35
35
|
});
|
|
36
36
|
Object.defineProperty(exports, "validateArtifactPath", {
|
|
37
37
|
enumerable: true,
|
|
38
|
-
get: function () { return
|
|
38
|
+
get: function () { return chunkV2BOS4WF_cjs.validateArtifactPath; }
|
|
39
39
|
});
|
|
40
40
|
Object.defineProperty(exports, "addPattern", {
|
|
41
41
|
enumerable: true,
|
|
42
|
-
get: function () { return
|
|
42
|
+
get: function () { return chunkXL7Q7HB2_cjs.addPattern; }
|
|
43
43
|
});
|
|
44
44
|
Object.defineProperty(exports, "maskToken", {
|
|
45
45
|
enumerable: true,
|
|
46
|
-
get: function () { return
|
|
46
|
+
get: function () { return chunkXL7Q7HB2_cjs.maskToken; }
|
|
47
47
|
});
|
|
48
48
|
Object.defineProperty(exports, "redactSecrets", {
|
|
49
49
|
enumerable: true,
|
|
50
|
-
get: function () { return
|
|
50
|
+
get: function () { return chunkXL7Q7HB2_cjs.redactSecrets; }
|
|
51
51
|
});
|
|
52
52
|
//# sourceMappingURL=index.cjs.map
|
|
53
53
|
//# sourceMappingURL=index.cjs.map
|
|
@@ -1,8 +1,8 @@
|
|
|
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-HS7AVXTF.js';
|
|
3
3
|
import '../../chunk-RIAM53CP.js';
|
|
4
|
-
import '../../chunk-
|
|
5
|
-
export { addPattern, maskToken, redactSecrets } from '../../chunk-
|
|
6
|
-
import '../../chunk-
|
|
4
|
+
import '../../chunk-ZZMZWBR6.js';
|
|
5
|
+
export { addPattern, maskToken, redactSecrets } from '../../chunk-D4CUGAKZ.js';
|
|
6
|
+
import '../../chunk-XEQ3TM66.js';
|
|
7
7
|
//# sourceMappingURL=index.js.map
|
|
8
8
|
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var chunk3NSS2OIZ_cjs = require('./chunk-3NSS2OIZ.cjs');
|
|
4
|
+
require('./chunk-4ZHTIJNE.cjs');
|
|
5
|
+
require('./chunk-XL7Q7HB2.cjs');
|
|
6
|
+
require('./chunk-EG4QM7ZJ.cjs');
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
Object.defineProperty(exports, "JudgeCredentialError", {
|
|
11
|
+
enumerable: true,
|
|
12
|
+
get: function () { return chunk3NSS2OIZ_cjs.JudgeCredentialError; }
|
|
13
|
+
});
|
|
14
|
+
Object.defineProperty(exports, "composeJudgePrompt", {
|
|
15
|
+
enumerable: true,
|
|
16
|
+
get: function () { return chunk3NSS2OIZ_cjs.composeJudgePrompt; }
|
|
17
|
+
});
|
|
18
|
+
Object.defineProperty(exports, "judgeCallImpl", {
|
|
19
|
+
enumerable: true,
|
|
20
|
+
get: function () { return chunk3NSS2OIZ_cjs.judgeCallImpl; }
|
|
21
|
+
});
|
|
22
|
+
//# sourceMappingURL=judge-call-LAHMBJ57.cjs.map
|
|
23
|
+
//# sourceMappingURL=judge-call-LAHMBJ57.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":[],"names":[],"mappings":"","file":"judge-call-
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"judge-call-LAHMBJ57.cjs"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export { JudgeCredentialError, composeJudgePrompt, judgeCallImpl } from './chunk-IPYYKCRC.js';
|
|
2
|
+
import './chunk-ZZMZWBR6.js';
|
|
3
|
+
import './chunk-D4CUGAKZ.js';
|
|
4
|
+
import './chunk-XEQ3TM66.js';
|
|
5
|
+
//# sourceMappingURL=judge-call-LVXABPS3.js.map
|
|
6
|
+
//# sourceMappingURL=judge-call-LVXABPS3.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":[],"names":[],"mappings":"","file":"judge-call-
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"judge-call-LVXABPS3.js"}
|
package/dist/mcp-auth.cjs
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
var
|
|
5
|
-
var
|
|
6
|
-
require('./chunk-
|
|
7
|
-
var
|
|
3
|
+
var chunkUALX2J2Q_cjs = require('./chunk-UALX2J2Q.cjs');
|
|
4
|
+
var chunkXJCXEKMD_cjs = require('./chunk-XJCXEKMD.cjs');
|
|
5
|
+
var chunk4ZHTIJNE_cjs = require('./chunk-4ZHTIJNE.cjs');
|
|
6
|
+
require('./chunk-XL7Q7HB2.cjs');
|
|
7
|
+
var chunkEG4QM7ZJ_cjs = require('./chunk-EG4QM7ZJ.cjs');
|
|
8
8
|
var crypto = require('crypto');
|
|
9
9
|
var http = require('http');
|
|
10
10
|
var promises = require('readline/promises');
|
|
@@ -44,7 +44,7 @@ function tryRequireKeytar() {
|
|
|
44
44
|
cachedKeytar = r("keytar");
|
|
45
45
|
} catch {
|
|
46
46
|
if (!keytarWarned) {
|
|
47
|
-
|
|
47
|
+
chunkEG4QM7ZJ_cjs.diag(
|
|
48
48
|
`[theokit-sdk] keytar not installed; MCP OAuth tokens will be stored in ${storeFilePath()} (chmod 600 where POSIX). Install \`keytar\` for OS keychain storage.
|
|
49
49
|
`
|
|
50
50
|
);
|
|
@@ -74,7 +74,7 @@ async function setTokens(serverName, tokens) {
|
|
|
74
74
|
}
|
|
75
75
|
}
|
|
76
76
|
allTokens[serverName] = tokens;
|
|
77
|
-
await
|
|
77
|
+
await chunkUALX2J2Q_cjs.atomicWriteJson(filePath, allTokens);
|
|
78
78
|
try {
|
|
79
79
|
fs.chmodSync(filePath, 384);
|
|
80
80
|
} catch {
|
|
@@ -93,7 +93,7 @@ async function getTokens(serverName) {
|
|
|
93
93
|
}
|
|
94
94
|
const filePath = storeFilePath();
|
|
95
95
|
if (!fs.existsSync(filePath)) return void 0;
|
|
96
|
-
|
|
96
|
+
chunkXJCXEKMD_cjs.assertSecureModes(path.dirname(filePath), filePath);
|
|
97
97
|
try {
|
|
98
98
|
const all = JSON.parse(fs.readFileSync(filePath, "utf8"));
|
|
99
99
|
return all[serverName];
|
|
@@ -134,7 +134,7 @@ async function refreshAccessToken(serverName, clientId, refreshToken, oauth) {
|
|
|
134
134
|
body: body.toString()
|
|
135
135
|
});
|
|
136
136
|
if (!response.ok) {
|
|
137
|
-
throw new
|
|
137
|
+
throw new chunk4ZHTIJNE_cjs.ConfigurationError(`OAuth refresh failed: HTTP ${response.status}`, {
|
|
138
138
|
code: "oauth_refresh_failed"
|
|
139
139
|
});
|
|
140
140
|
}
|
|
@@ -180,7 +180,7 @@ async function runPkceFlow(serverName, clientId, scopes, oauth) {
|
|
|
180
180
|
authUrl.searchParams.set("code_challenge", challenge);
|
|
181
181
|
authUrl.searchParams.set("code_challenge_method", "S256");
|
|
182
182
|
authUrl.searchParams.set("state", state);
|
|
183
|
-
|
|
183
|
+
chunkEG4QM7ZJ_cjs.diag(
|
|
184
184
|
`
|
|
185
185
|
[theokit-sdk] OAuth required for MCP server "${serverName}".
|
|
186
186
|
Open this URL to authenticate:
|
|
@@ -190,7 +190,7 @@ Open this URL to authenticate:
|
|
|
190
190
|
);
|
|
191
191
|
const { code, state: returnedState } = await codeWaiter;
|
|
192
192
|
if (returnedState !== state) {
|
|
193
|
-
throw new
|
|
193
|
+
throw new chunk4ZHTIJNE_cjs.ConfigurationError(
|
|
194
194
|
"OAuth state mismatch \u2014 possible CSRF attempt; aborting token exchange.",
|
|
195
195
|
{ code: "oauth_state_mismatch" }
|
|
196
196
|
);
|
|
@@ -209,7 +209,7 @@ Open this URL to authenticate:
|
|
|
209
209
|
});
|
|
210
210
|
if (!response.ok) {
|
|
211
211
|
const errText = await response.text();
|
|
212
|
-
throw new
|
|
212
|
+
throw new chunk4ZHTIJNE_cjs.ConfigurationError(
|
|
213
213
|
`OAuth token exchange failed: HTTP ${response.status}: ${errText.slice(0, 200)}`,
|
|
214
214
|
{ code: "oauth_token_exchange_failed" }
|
|
215
215
|
);
|
|
@@ -255,7 +255,7 @@ async function openLocalhostCallback(expectedState, timeoutMs) {
|
|
|
255
255
|
});
|
|
256
256
|
server.listen(0, "127.0.0.1");
|
|
257
257
|
const timeoutHandle = setTimeout(() => {
|
|
258
|
-
rejectCode?.(new
|
|
258
|
+
rejectCode?.(new chunk4ZHTIJNE_cjs.ConfigurationError("OAuth flow timed out", { code: "oauth_timeout" }));
|
|
259
259
|
}, timeoutMs);
|
|
260
260
|
await new Promise((r) => {
|
|
261
261
|
if (server.listening) r();
|
|
@@ -264,7 +264,7 @@ async function openLocalhostCallback(expectedState, timeoutMs) {
|
|
|
264
264
|
const address = server.address();
|
|
265
265
|
if (typeof address !== "object" || address === null) {
|
|
266
266
|
server.close();
|
|
267
|
-
throw new
|
|
267
|
+
throw new chunk4ZHTIJNE_cjs.ConfigurationError("OAuth localhost callback failed to bind", {
|
|
268
268
|
code: "oauth_bind_failed"
|
|
269
269
|
});
|
|
270
270
|
}
|
|
@@ -300,7 +300,7 @@ async function readCodeFromStdin(expectedState, timeoutMs) {
|
|
|
300
300
|
}).catch(reject);
|
|
301
301
|
setTimeout(() => {
|
|
302
302
|
rl.close();
|
|
303
|
-
reject(new
|
|
303
|
+
reject(new chunk4ZHTIJNE_cjs.ConfigurationError("OAuth manual input timed out", { code: "oauth_timeout" }));
|
|
304
304
|
}, timeoutMs);
|
|
305
305
|
});
|
|
306
306
|
return promise;
|
package/dist/mcp-auth.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { atomicWriteJson } from './chunk-
|
|
2
|
-
import { assertSecureModes } from './chunk-
|
|
3
|
-
import { ConfigurationError } from './chunk-
|
|
4
|
-
import './chunk-
|
|
5
|
-
import { diag } from './chunk-
|
|
1
|
+
import { atomicWriteJson } from './chunk-2GUYQR5P.js';
|
|
2
|
+
import { assertSecureModes } from './chunk-C3NT3PVE.js';
|
|
3
|
+
import { ConfigurationError } from './chunk-ZZMZWBR6.js';
|
|
4
|
+
import './chunk-D4CUGAKZ.js';
|
|
5
|
+
import { diag } from './chunk-XEQ3TM66.js';
|
|
6
6
|
import { randomBytes, createHash } from 'crypto';
|
|
7
7
|
import { createServer } from 'http';
|
|
8
8
|
import { createInterface } from 'readline/promises';
|