@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,49 +1,19 @@
|
|
|
1
1
|
import { type MemoryConfig, type MemoryFact } from "../types.js";
|
|
2
|
-
|
|
3
|
-
* The memory root for a workspace: `<cwd>/.theokit/memory`. Every other path here derives from it,
|
|
4
|
-
* and `memory_get` refuses to read outside it. Pure path computation — nothing is created on disk.
|
|
5
|
-
*/
|
|
6
|
-
export declare function memoryDir(cwd: string): string;
|
|
7
|
-
/**
|
|
8
|
-
* Where a NEW fact should be written.
|
|
9
|
-
*
|
|
10
|
-
* `.theokit/memory` by default, exactly as before. When the agent was given a `local.sessionDir`,
|
|
11
|
-
* it becomes `<sessionDir>/projects/<encoded-cwd>/memory` — the same place the transcript for that
|
|
12
|
-
* project goes, so a session and the memories recorded during it land beside each other.
|
|
13
|
-
*
|
|
14
|
-
* `local.sessionDir` is the switch because it is already the option this project documents for CLI
|
|
15
|
-
* interop: point it at `~/.claude` and the CLI can `--continue` a session this agent wrote. Someone
|
|
16
|
-
* who set it has said they share state with that CLI, and memory following is what the sentence
|
|
17
|
-
* already implied. It needs no new option, and nothing moves for anyone who never set it.
|
|
18
|
-
*
|
|
19
|
-
* Safe because of the rule this pairs with — WRITE ONE, READ ALL. {@link readFactsFromMarkdown}
|
|
20
|
-
* covers every location, so a consumer whose new facts move keeps every fact they already had. The
|
|
21
|
-
* change relocates where the next one lands; it orphans nothing.
|
|
22
|
-
*/
|
|
23
|
-
export declare function memoryWriteDir(cwd: string, sessionDir: string | undefined): string;
|
|
24
|
-
/**
|
|
25
|
-
* Where the Claude Code CLI keeps THIS project's memories.
|
|
26
|
-
*
|
|
27
|
-
* `<claudeHome>/projects/<encoded-cwd>/memory` — the same `encodeProjectDir` scheme the transcripts
|
|
28
|
-
* already use, which is why no new encoding is invented here. `CLAUDE_CONFIG_DIR` names the home
|
|
29
|
-
* when set (the CLI's own variable); `~/.claude` otherwise.
|
|
30
|
-
*
|
|
31
|
-
* Read, never written. Writing here by default would relocate every existing consumer's memories,
|
|
32
|
-
* and an additive change must not move what is already on disk — so this is the direction that
|
|
33
|
-
* costs nothing: a memory the CLI wrote becomes visible, and a memory the SDK wrote stays where the
|
|
34
|
-
* SDK put it.
|
|
35
|
-
*/
|
|
36
|
-
export declare function claudeProjectMemoryDir(cwd: string): string;
|
|
2
|
+
import { type MemoryLocationConfig, type MemoryRoot } from "./memory-root.js";
|
|
37
3
|
/**
|
|
38
4
|
* Path to `MEMORY.md`, the index that points at the per-memory files — and, in stores written before
|
|
39
5
|
* #389, the flat `## Facts` list itself. Pure path computation; the file may not exist.
|
|
6
|
+
*
|
|
7
|
+
* Takes the RESOLVED ROOT, not a `cwd`. Every path helper here does, so a caller that has not asked
|
|
8
|
+
* {@link resolveMemoryRoot} where memory lives does not compile — see `memory-root.ts` for the
|
|
9
|
+
* defect that made that the requirement (#463).
|
|
40
10
|
*/
|
|
41
|
-
export declare function memoryMdPath(
|
|
11
|
+
export declare function memoryMdPath(root: MemoryRoot): string;
|
|
42
12
|
/**
|
|
43
13
|
* Path to `<memory root>/notes`, where per-topic notes and the consolidated notes a dreaming sweep
|
|
44
14
|
* writes live. Pure path computation — the directory may not exist.
|
|
45
15
|
*/
|
|
46
|
-
export declare function notesDir(
|
|
16
|
+
export declare function notesDir(root: MemoryRoot): string;
|
|
47
17
|
/**
|
|
48
18
|
* Every memory in the store: the per-memory files, plus any legacy `## Facts` bullets still in
|
|
49
19
|
* `MEMORY.md`. Returns `[]` when the directory does not exist.
|
|
@@ -52,7 +22,7 @@ export declare function notesDir(cwd: string): string;
|
|
|
52
22
|
* repositories, and the store's own header invites editing them by hand — a converged writer that
|
|
53
23
|
* stopped reading them would delete what someone recorded, which is worse than the format it fixes.
|
|
54
24
|
*/
|
|
55
|
-
export declare function readFactsFromMarkdown(cwd: string,
|
|
25
|
+
export declare function readFactsFromMarkdown(cwd: string, config?: MemoryLocationConfig): Promise<MemoryFact[]>;
|
|
56
26
|
/**
|
|
57
27
|
* Write a fact as its own memory file and point the `MEMORY.md` index at it. Atomic + serialized.
|
|
58
28
|
*
|
|
@@ -65,13 +35,14 @@ export declare function appendFactToMarkdown(cwd: string, fact: MemoryFact, targ
|
|
|
65
35
|
* disabled the call resolves to `[]` without touching disk. Configuration-aware entry point;
|
|
66
36
|
* {@link readFactsFromMarkdown} is the same read without the gate.
|
|
67
37
|
*/
|
|
68
|
-
export declare function readFacts(cwd: string, config: MemoryConfig
|
|
38
|
+
export declare function readFacts(cwd: string, config: MemoryConfig): Promise<MemoryFact[]>;
|
|
69
39
|
/**
|
|
70
40
|
* Record a fact, honouring the `enabled` gate on {@link MemoryConfig}: when memory is disabled the
|
|
71
41
|
* call resolves without touching disk. Configuration-aware entry point;
|
|
72
42
|
* {@link appendFactToMarkdown} is the same write without the gate.
|
|
73
43
|
*
|
|
74
|
-
*
|
|
75
|
-
*
|
|
44
|
+
* The destination comes from `memory.directory` and from nothing else. It used to come from
|
|
45
|
+
* `local.sessionDir` — the option that names the TRANSCRIPT home — so one option answered two
|
|
46
|
+
* questions and only this call site heard the second answer (#463).
|
|
76
47
|
*/
|
|
77
|
-
export declare function appendFact(cwd: string, config: MemoryConfig, fact: MemoryFact
|
|
48
|
+
export declare function appendFact(cwd: string, config: MemoryConfig, fact: MemoryFact): Promise<void>;
|
|
@@ -1,49 +1,19 @@
|
|
|
1
1
|
import { type MemoryConfig, type MemoryFact } from "../types.js";
|
|
2
|
-
|
|
3
|
-
* The memory root for a workspace: `<cwd>/.theokit/memory`. Every other path here derives from it,
|
|
4
|
-
* and `memory_get` refuses to read outside it. Pure path computation — nothing is created on disk.
|
|
5
|
-
*/
|
|
6
|
-
export declare function memoryDir(cwd: string): string;
|
|
7
|
-
/**
|
|
8
|
-
* Where a NEW fact should be written.
|
|
9
|
-
*
|
|
10
|
-
* `.theokit/memory` by default, exactly as before. When the agent was given a `local.sessionDir`,
|
|
11
|
-
* it becomes `<sessionDir>/projects/<encoded-cwd>/memory` — the same place the transcript for that
|
|
12
|
-
* project goes, so a session and the memories recorded during it land beside each other.
|
|
13
|
-
*
|
|
14
|
-
* `local.sessionDir` is the switch because it is already the option this project documents for CLI
|
|
15
|
-
* interop: point it at `~/.claude` and the CLI can `--continue` a session this agent wrote. Someone
|
|
16
|
-
* who set it has said they share state with that CLI, and memory following is what the sentence
|
|
17
|
-
* already implied. It needs no new option, and nothing moves for anyone who never set it.
|
|
18
|
-
*
|
|
19
|
-
* Safe because of the rule this pairs with — WRITE ONE, READ ALL. {@link readFactsFromMarkdown}
|
|
20
|
-
* covers every location, so a consumer whose new facts move keeps every fact they already had. The
|
|
21
|
-
* change relocates where the next one lands; it orphans nothing.
|
|
22
|
-
*/
|
|
23
|
-
export declare function memoryWriteDir(cwd: string, sessionDir: string | undefined): string;
|
|
24
|
-
/**
|
|
25
|
-
* Where the Claude Code CLI keeps THIS project's memories.
|
|
26
|
-
*
|
|
27
|
-
* `<claudeHome>/projects/<encoded-cwd>/memory` — the same `encodeProjectDir` scheme the transcripts
|
|
28
|
-
* already use, which is why no new encoding is invented here. `CLAUDE_CONFIG_DIR` names the home
|
|
29
|
-
* when set (the CLI's own variable); `~/.claude` otherwise.
|
|
30
|
-
*
|
|
31
|
-
* Read, never written. Writing here by default would relocate every existing consumer's memories,
|
|
32
|
-
* and an additive change must not move what is already on disk — so this is the direction that
|
|
33
|
-
* costs nothing: a memory the CLI wrote becomes visible, and a memory the SDK wrote stays where the
|
|
34
|
-
* SDK put it.
|
|
35
|
-
*/
|
|
36
|
-
export declare function claudeProjectMemoryDir(cwd: string): string;
|
|
2
|
+
import { type MemoryLocationConfig, type MemoryRoot } from "./memory-root.js";
|
|
37
3
|
/**
|
|
38
4
|
* Path to `MEMORY.md`, the index that points at the per-memory files — and, in stores written before
|
|
39
5
|
* #389, the flat `## Facts` list itself. Pure path computation; the file may not exist.
|
|
6
|
+
*
|
|
7
|
+
* Takes the RESOLVED ROOT, not a `cwd`. Every path helper here does, so a caller that has not asked
|
|
8
|
+
* {@link resolveMemoryRoot} where memory lives does not compile — see `memory-root.ts` for the
|
|
9
|
+
* defect that made that the requirement (#463).
|
|
40
10
|
*/
|
|
41
|
-
export declare function memoryMdPath(
|
|
11
|
+
export declare function memoryMdPath(root: MemoryRoot): string;
|
|
42
12
|
/**
|
|
43
13
|
* Path to `<memory root>/notes`, where per-topic notes and the consolidated notes a dreaming sweep
|
|
44
14
|
* writes live. Pure path computation — the directory may not exist.
|
|
45
15
|
*/
|
|
46
|
-
export declare function notesDir(
|
|
16
|
+
export declare function notesDir(root: MemoryRoot): string;
|
|
47
17
|
/**
|
|
48
18
|
* Every memory in the store: the per-memory files, plus any legacy `## Facts` bullets still in
|
|
49
19
|
* `MEMORY.md`. Returns `[]` when the directory does not exist.
|
|
@@ -52,7 +22,7 @@ export declare function notesDir(cwd: string): string;
|
|
|
52
22
|
* repositories, and the store's own header invites editing them by hand — a converged writer that
|
|
53
23
|
* stopped reading them would delete what someone recorded, which is worse than the format it fixes.
|
|
54
24
|
*/
|
|
55
|
-
export declare function readFactsFromMarkdown(cwd: string,
|
|
25
|
+
export declare function readFactsFromMarkdown(cwd: string, config?: MemoryLocationConfig): Promise<MemoryFact[]>;
|
|
56
26
|
/**
|
|
57
27
|
* Write a fact as its own memory file and point the `MEMORY.md` index at it. Atomic + serialized.
|
|
58
28
|
*
|
|
@@ -65,13 +35,14 @@ export declare function appendFactToMarkdown(cwd: string, fact: MemoryFact, targ
|
|
|
65
35
|
* disabled the call resolves to `[]` without touching disk. Configuration-aware entry point;
|
|
66
36
|
* {@link readFactsFromMarkdown} is the same read without the gate.
|
|
67
37
|
*/
|
|
68
|
-
export declare function readFacts(cwd: string, config: MemoryConfig
|
|
38
|
+
export declare function readFacts(cwd: string, config: MemoryConfig): Promise<MemoryFact[]>;
|
|
69
39
|
/**
|
|
70
40
|
* Record a fact, honouring the `enabled` gate on {@link MemoryConfig}: when memory is disabled the
|
|
71
41
|
* call resolves without touching disk. Configuration-aware entry point;
|
|
72
42
|
* {@link appendFactToMarkdown} is the same write without the gate.
|
|
73
43
|
*
|
|
74
|
-
*
|
|
75
|
-
*
|
|
44
|
+
* The destination comes from `memory.directory` and from nothing else. It used to come from
|
|
45
|
+
* `local.sessionDir` — the option that names the TRANSCRIPT home — so one option answered two
|
|
46
|
+
* questions and only this call site heard the second answer (#463).
|
|
76
47
|
*/
|
|
77
|
-
export declare function appendFact(cwd: string, config: MemoryConfig, fact: MemoryFact
|
|
48
|
+
export declare function appendFact(cwd: string, config: MemoryConfig, fact: MemoryFact): Promise<void>;
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
import type { MemoryConfig } from "../types.js";
|
|
2
|
+
/**
|
|
3
|
+
* A path that {@link resolveMemoryRoot} produced — the only thing the subsystem's path helpers
|
|
4
|
+
* accept.
|
|
5
|
+
*
|
|
6
|
+
* The brand is what makes "every path derives from one resolution" a compiler rule rather than a
|
|
7
|
+
* convention. Both a `cwd` and a root are strings, so without it the helpers would go on accepting
|
|
8
|
+
* either, and the next one added would have the same even chance of taking the wrong one that
|
|
9
|
+
* produced #463 in the first place. It costs one cast, at the one place a caller legitimately has a
|
|
10
|
+
* directory that did not come from here.
|
|
11
|
+
*
|
|
12
|
+
* STRUCTURAL, not a `unique symbol`. A `unique symbol` brand is identity-based, and the d.ts
|
|
13
|
+
* bundler inlines the declaration into each package that re-exports it — so `@theokit/sdk-memory`
|
|
14
|
+
* ended up with a `MemoryRoot` its own compiler considered incompatible with the SDK's, on values
|
|
15
|
+
* that were the same string. A structural tag refuses a bare `string` exactly as well and survives
|
|
16
|
+
* the package boundary, which is where this type has to work.
|
|
17
|
+
*/
|
|
18
|
+
export type MemoryRoot = string & {
|
|
19
|
+
readonly __memoryRoot: "resolved";
|
|
20
|
+
};
|
|
21
|
+
/**
|
|
22
|
+
* Treat a directory as a memory root without resolving one.
|
|
23
|
+
*
|
|
24
|
+
* For the two honest cases: a test fixture, and a consumer opening an index against a store it
|
|
25
|
+
* located itself. Every other caller resolves.
|
|
26
|
+
*/
|
|
27
|
+
export declare function asMemoryRoot(dir: string): MemoryRoot;
|
|
28
|
+
/** Only `directory` is read; the full config is accepted so callers pass what they already hold. */
|
|
29
|
+
export type MemoryLocationConfig = Partial<MemoryConfig>;
|
|
30
|
+
/**
|
|
31
|
+
* The project store: `<cwd>/.theokit/memory`. The default root, and always a READ root even when
|
|
32
|
+
* the write root moved — see {@link memoryReadRoots}.
|
|
33
|
+
*/
|
|
34
|
+
export declare function projectMemoryDir(cwd: string): MemoryRoot;
|
|
35
|
+
/**
|
|
36
|
+
* Where the Claude Code CLI keeps THIS project's memories.
|
|
37
|
+
*
|
|
38
|
+
* `<claudeHome>/projects/<encoded-cwd>/memory` — the same `encodeProjectDir` scheme the transcripts
|
|
39
|
+
* already use, which is why no new encoding is invented here. `CLAUDE_CONFIG_DIR` names the home
|
|
40
|
+
* when set (the CLI's own variable); `~/.claude` otherwise.
|
|
41
|
+
*
|
|
42
|
+
* Read, never written. This is the half of the interop that decoupling the write MUST NOT cost: a
|
|
43
|
+
* memory the CLI recorded stays visible whatever `memory.directory` says.
|
|
44
|
+
*/
|
|
45
|
+
export declare function claudeProjectMemoryDir(cwd: string): MemoryRoot;
|
|
46
|
+
/**
|
|
47
|
+
* The memory root for this agent: `memory.directory` when set, the project store otherwise.
|
|
48
|
+
*
|
|
49
|
+
* `directory` must be absolute or start with `~/`, which is the contract the interop partner
|
|
50
|
+
* documents for the same option. A relative path is REFUSED rather than resolved against the
|
|
51
|
+
* process cwd: the two plausible bases (workspace vs process) put memory in two different places,
|
|
52
|
+
* and picking one silently is how a store ends up split across both.
|
|
53
|
+
*
|
|
54
|
+
* @throws {ConfigurationError} `invalid_memory_directory` — the value is blank or relative.
|
|
55
|
+
*/
|
|
56
|
+
export declare function resolveMemoryRoot(cwd: string, config?: MemoryLocationConfig): MemoryRoot;
|
|
57
|
+
/**
|
|
58
|
+
* The line limit the Claude Code CLI applies when it loads a `MEMORY.md`.
|
|
59
|
+
*
|
|
60
|
+
* Its number, not ours, and that is the point — see {@link indexBudgetWarning}.
|
|
61
|
+
*/
|
|
62
|
+
export declare const MEMORY_INDEX_MAX_LINES = 200;
|
|
63
|
+
/**
|
|
64
|
+
* The byte limit the Claude Code CLI applies when it loads a `MEMORY.md`, whichever it reaches
|
|
65
|
+
* first. Also its number — see {@link indexBudgetWarning}.
|
|
66
|
+
*/
|
|
67
|
+
export declare const MEMORY_INDEX_MAX_BYTES: number;
|
|
68
|
+
/**
|
|
69
|
+
* What to say about an index that the interop partner will truncate, or `undefined` when there is
|
|
70
|
+
* nothing true to say.
|
|
71
|
+
*
|
|
72
|
+
* **This is a statement about the PARTNER, not about us.** The CLI loads the first 200 lines / 25KB
|
|
73
|
+
* of `MEMORY.md` into every session and drops the rest in silence. We never load the index at all:
|
|
74
|
+
* the `<memory>` block is built from the per-memory FILES by `selectFactsForInjection`, ranked and
|
|
75
|
+
* capped, so our own recall does not degrade as the index grows. A warning that said "memory stops
|
|
76
|
+
* working" would be false here, and a warning that overstates is a warning somebody disables.
|
|
77
|
+
*
|
|
78
|
+
* It therefore speaks ONLY when the resolved root is the store the CLI reads. Anywhere else the
|
|
79
|
+
* index is ours, nobody truncates it, and the warning would be noise in every project that never
|
|
80
|
+
* opted into interop.
|
|
81
|
+
*
|
|
82
|
+
* Returns a string rather than emitting one: the caller decides what to do with it, and a pure
|
|
83
|
+
* function is testable without a filesystem or a captured stderr.
|
|
84
|
+
*/
|
|
85
|
+
export declare function indexBudgetWarning(index: string, root: string): string | undefined;
|
|
86
|
+
/**
|
|
87
|
+
* Every directory a read must cover, deduplicated and in precedence order.
|
|
88
|
+
*
|
|
89
|
+
* WRITE ONE, READ ALL — this is what keeps a configured `directory` from orphaning anything. The
|
|
90
|
+
* configured root comes first, the project store second so memories recorded before the move stay
|
|
91
|
+
* readable, and the CLI's store last so interop survives the write being decoupled from it.
|
|
92
|
+
*/
|
|
93
|
+
export declare function memoryReadRoots(cwd: string, config?: MemoryLocationConfig): readonly MemoryRoot[];
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
import type { MemoryConfig } from "../types.js";
|
|
2
|
+
/**
|
|
3
|
+
* A path that {@link resolveMemoryRoot} produced — the only thing the subsystem's path helpers
|
|
4
|
+
* accept.
|
|
5
|
+
*
|
|
6
|
+
* The brand is what makes "every path derives from one resolution" a compiler rule rather than a
|
|
7
|
+
* convention. Both a `cwd` and a root are strings, so without it the helpers would go on accepting
|
|
8
|
+
* either, and the next one added would have the same even chance of taking the wrong one that
|
|
9
|
+
* produced #463 in the first place. It costs one cast, at the one place a caller legitimately has a
|
|
10
|
+
* directory that did not come from here.
|
|
11
|
+
*
|
|
12
|
+
* STRUCTURAL, not a `unique symbol`. A `unique symbol` brand is identity-based, and the d.ts
|
|
13
|
+
* bundler inlines the declaration into each package that re-exports it — so `@theokit/sdk-memory`
|
|
14
|
+
* ended up with a `MemoryRoot` its own compiler considered incompatible with the SDK's, on values
|
|
15
|
+
* that were the same string. A structural tag refuses a bare `string` exactly as well and survives
|
|
16
|
+
* the package boundary, which is where this type has to work.
|
|
17
|
+
*/
|
|
18
|
+
export type MemoryRoot = string & {
|
|
19
|
+
readonly __memoryRoot: "resolved";
|
|
20
|
+
};
|
|
21
|
+
/**
|
|
22
|
+
* Treat a directory as a memory root without resolving one.
|
|
23
|
+
*
|
|
24
|
+
* For the two honest cases: a test fixture, and a consumer opening an index against a store it
|
|
25
|
+
* located itself. Every other caller resolves.
|
|
26
|
+
*/
|
|
27
|
+
export declare function asMemoryRoot(dir: string): MemoryRoot;
|
|
28
|
+
/** Only `directory` is read; the full config is accepted so callers pass what they already hold. */
|
|
29
|
+
export type MemoryLocationConfig = Partial<MemoryConfig>;
|
|
30
|
+
/**
|
|
31
|
+
* The project store: `<cwd>/.theokit/memory`. The default root, and always a READ root even when
|
|
32
|
+
* the write root moved — see {@link memoryReadRoots}.
|
|
33
|
+
*/
|
|
34
|
+
export declare function projectMemoryDir(cwd: string): MemoryRoot;
|
|
35
|
+
/**
|
|
36
|
+
* Where the Claude Code CLI keeps THIS project's memories.
|
|
37
|
+
*
|
|
38
|
+
* `<claudeHome>/projects/<encoded-cwd>/memory` — the same `encodeProjectDir` scheme the transcripts
|
|
39
|
+
* already use, which is why no new encoding is invented here. `CLAUDE_CONFIG_DIR` names the home
|
|
40
|
+
* when set (the CLI's own variable); `~/.claude` otherwise.
|
|
41
|
+
*
|
|
42
|
+
* Read, never written. This is the half of the interop that decoupling the write MUST NOT cost: a
|
|
43
|
+
* memory the CLI recorded stays visible whatever `memory.directory` says.
|
|
44
|
+
*/
|
|
45
|
+
export declare function claudeProjectMemoryDir(cwd: string): MemoryRoot;
|
|
46
|
+
/**
|
|
47
|
+
* The memory root for this agent: `memory.directory` when set, the project store otherwise.
|
|
48
|
+
*
|
|
49
|
+
* `directory` must be absolute or start with `~/`, which is the contract the interop partner
|
|
50
|
+
* documents for the same option. A relative path is REFUSED rather than resolved against the
|
|
51
|
+
* process cwd: the two plausible bases (workspace vs process) put memory in two different places,
|
|
52
|
+
* and picking one silently is how a store ends up split across both.
|
|
53
|
+
*
|
|
54
|
+
* @throws {ConfigurationError} `invalid_memory_directory` — the value is blank or relative.
|
|
55
|
+
*/
|
|
56
|
+
export declare function resolveMemoryRoot(cwd: string, config?: MemoryLocationConfig): MemoryRoot;
|
|
57
|
+
/**
|
|
58
|
+
* The line limit the Claude Code CLI applies when it loads a `MEMORY.md`.
|
|
59
|
+
*
|
|
60
|
+
* Its number, not ours, and that is the point — see {@link indexBudgetWarning}.
|
|
61
|
+
*/
|
|
62
|
+
export declare const MEMORY_INDEX_MAX_LINES = 200;
|
|
63
|
+
/**
|
|
64
|
+
* The byte limit the Claude Code CLI applies when it loads a `MEMORY.md`, whichever it reaches
|
|
65
|
+
* first. Also its number — see {@link indexBudgetWarning}.
|
|
66
|
+
*/
|
|
67
|
+
export declare const MEMORY_INDEX_MAX_BYTES: number;
|
|
68
|
+
/**
|
|
69
|
+
* What to say about an index that the interop partner will truncate, or `undefined` when there is
|
|
70
|
+
* nothing true to say.
|
|
71
|
+
*
|
|
72
|
+
* **This is a statement about the PARTNER, not about us.** The CLI loads the first 200 lines / 25KB
|
|
73
|
+
* of `MEMORY.md` into every session and drops the rest in silence. We never load the index at all:
|
|
74
|
+
* the `<memory>` block is built from the per-memory FILES by `selectFactsForInjection`, ranked and
|
|
75
|
+
* capped, so our own recall does not degrade as the index grows. A warning that said "memory stops
|
|
76
|
+
* working" would be false here, and a warning that overstates is a warning somebody disables.
|
|
77
|
+
*
|
|
78
|
+
* It therefore speaks ONLY when the resolved root is the store the CLI reads. Anywhere else the
|
|
79
|
+
* index is ours, nobody truncates it, and the warning would be noise in every project that never
|
|
80
|
+
* opted into interop.
|
|
81
|
+
*
|
|
82
|
+
* Returns a string rather than emitting one: the caller decides what to do with it, and a pure
|
|
83
|
+
* function is testable without a filesystem or a captured stderr.
|
|
84
|
+
*/
|
|
85
|
+
export declare function indexBudgetWarning(index: string, root: string): string | undefined;
|
|
86
|
+
/**
|
|
87
|
+
* Every directory a read must cover, deduplicated and in precedence order.
|
|
88
|
+
*
|
|
89
|
+
* WRITE ONE, READ ALL — this is what keeps a configured `directory` from orphaning anything. The
|
|
90
|
+
* configured root comes first, the project store second so memories recorded before the move stay
|
|
91
|
+
* readable, and the CLI's store last so interop survives the write being decoupled from it.
|
|
92
|
+
*/
|
|
93
|
+
export declare function memoryReadRoots(cwd: string, config?: MemoryLocationConfig): readonly MemoryRoot[];
|
|
@@ -1 +1,35 @@
|
|
|
1
|
-
|
|
1
|
+
import type { MemoryRoot } from "./memory-root.js";
|
|
2
|
+
/**
|
|
3
|
+
* Session summary discovery (ADR D20).
|
|
4
|
+
*
|
|
5
|
+
* Mirrors `wiki-loader.ts:discoverWikiFiles`: scans
|
|
6
|
+
* `.theokit/memory/sessions/*.md` and returns `SessionFile` records —
|
|
7
|
+
* `{ absolutePath, relPath }`. IndexManager tags each chunk with
|
|
8
|
+
* `source="sessions"` so `memory_search({ corpus: "sessions" })` filters
|
|
9
|
+
* them in.
|
|
10
|
+
*
|
|
11
|
+
* B-140: this said "returns `MemoryFileEntry`-shaped records" and that was
|
|
12
|
+
* not true — `MemoryFileEntry` carried four fields (`path`, `relPath`,
|
|
13
|
+
* `mtime`, `hash`) against this function's two, and even the path field was
|
|
14
|
+
* named differently. Nothing consumed the interface, so it was removed and
|
|
15
|
+
* the sentence now names the type the function actually returns. A docblock
|
|
16
|
+
* asserting agreement between two shapes is worth no more than the agreement.
|
|
17
|
+
*
|
|
18
|
+
* Shared with `@theokit/sdk-memory` through the semver-exempt `internal/memory-store`
|
|
19
|
+
* sub-path, so it carries no internal-visibility tag. `stripInternal` matches that tag as TEXT
|
|
20
|
+
* anywhere in the block, so naming it here — even in backticks, even to say it is absent — deletes
|
|
21
|
+
* this symbol from the published declarations and forces the satellite back onto a copy. Measured:
|
|
22
|
+
* the first draft of this very note did exactly that. See #430 and #463.
|
|
23
|
+
*/
|
|
24
|
+
export interface SessionFile {
|
|
25
|
+
absolutePath: string;
|
|
26
|
+
relPath: string;
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Every session summary under `<memory root>/sessions`, as `{ absolutePath, relPath }` records.
|
|
30
|
+
*
|
|
31
|
+
* Returns `[]` when the directory does not exist, so a workspace that has never finished a run is
|
|
32
|
+
* not an error. `IndexManager` tags what this returns with `source="sessions"`, which is what
|
|
33
|
+
* `memory_search({ corpus: "sessions" })` filters on.
|
|
34
|
+
*/
|
|
35
|
+
export declare function discoverSessionFiles(root: MemoryRoot): Promise<SessionFile[]>;
|
|
@@ -1 +1,35 @@
|
|
|
1
|
-
|
|
1
|
+
import type { MemoryRoot } from "./memory-root.js";
|
|
2
|
+
/**
|
|
3
|
+
* Session summary discovery (ADR D20).
|
|
4
|
+
*
|
|
5
|
+
* Mirrors `wiki-loader.ts:discoverWikiFiles`: scans
|
|
6
|
+
* `.theokit/memory/sessions/*.md` and returns `SessionFile` records —
|
|
7
|
+
* `{ absolutePath, relPath }`. IndexManager tags each chunk with
|
|
8
|
+
* `source="sessions"` so `memory_search({ corpus: "sessions" })` filters
|
|
9
|
+
* them in.
|
|
10
|
+
*
|
|
11
|
+
* B-140: this said "returns `MemoryFileEntry`-shaped records" and that was
|
|
12
|
+
* not true — `MemoryFileEntry` carried four fields (`path`, `relPath`,
|
|
13
|
+
* `mtime`, `hash`) against this function's two, and even the path field was
|
|
14
|
+
* named differently. Nothing consumed the interface, so it was removed and
|
|
15
|
+
* the sentence now names the type the function actually returns. A docblock
|
|
16
|
+
* asserting agreement between two shapes is worth no more than the agreement.
|
|
17
|
+
*
|
|
18
|
+
* Shared with `@theokit/sdk-memory` through the semver-exempt `internal/memory-store`
|
|
19
|
+
* sub-path, so it carries no internal-visibility tag. `stripInternal` matches that tag as TEXT
|
|
20
|
+
* anywhere in the block, so naming it here — even in backticks, even to say it is absent — deletes
|
|
21
|
+
* this symbol from the published declarations and forces the satellite back onto a copy. Measured:
|
|
22
|
+
* the first draft of this very note did exactly that. See #430 and #463.
|
|
23
|
+
*/
|
|
24
|
+
export interface SessionFile {
|
|
25
|
+
absolutePath: string;
|
|
26
|
+
relPath: string;
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Every session summary under `<memory root>/sessions`, as `{ absolutePath, relPath }` records.
|
|
30
|
+
*
|
|
31
|
+
* Returns `[]` when the directory does not exist, so a workspace that has never finished a run is
|
|
32
|
+
* not an error. `IndexManager` tags what this returns with `source="sessions"`, which is what
|
|
33
|
+
* `memory_search({ corpus: "sessions" })` filters on.
|
|
34
|
+
*/
|
|
35
|
+
export declare function discoverSessionFiles(root: MemoryRoot): Promise<SessionFile[]>;
|
|
@@ -1,2 +1,50 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
import type { MemoryRoot } from "./memory-root.js";
|
|
2
|
+
/**
|
|
3
|
+
* Per-run session summary writer (ADR D20).
|
|
4
|
+
*
|
|
5
|
+
* After every finished run, write a markdown summary to
|
|
6
|
+
* `.theokit/memory/sessions/<runId>.md`. IndexManager picks these up with
|
|
7
|
+
* `source="sessions"` so `memory_search({ corpus: "sessions" })` can recall
|
|
8
|
+
* past conversations.
|
|
9
|
+
*
|
|
10
|
+
* EC-9: only `status === "finished"` runs trigger a write. Cancelled/errored
|
|
11
|
+
* runs would otherwise pollute the recall corpus with partial transcripts.
|
|
12
|
+
*
|
|
13
|
+
* Shared with `@theokit/sdk-memory` through the semver-exempt `internal/memory-store`
|
|
14
|
+
* sub-path, so it carries no internal-visibility tag. `stripInternal` matches that tag as TEXT
|
|
15
|
+
* anywhere in the block, so naming it here — even in backticks, even to say it is absent — deletes
|
|
16
|
+
* this symbol from the published declarations and forces the satellite back onto a copy. Measured:
|
|
17
|
+
* the first draft of this very note did exactly that. See #430 and #463.
|
|
18
|
+
*/
|
|
19
|
+
export interface SessionSummaryInput {
|
|
20
|
+
/** The RESOLVED memory root, not a cwd — see `storage/memory-root.ts` (#463). */
|
|
21
|
+
memoryRoot: MemoryRoot;
|
|
22
|
+
runId: string;
|
|
23
|
+
agentId: string;
|
|
24
|
+
userText: string;
|
|
25
|
+
assistantText: string;
|
|
26
|
+
status: "finished" | "running" | "error" | "cancelled";
|
|
27
|
+
at: number;
|
|
28
|
+
}
|
|
29
|
+
/** `<memory root>/sessions`. Takes the RESOLVED ROOT — see `storage/memory-root.ts` (#463). */
|
|
30
|
+
export declare function sessionsDir(root: MemoryRoot): string;
|
|
31
|
+
/**
|
|
32
|
+
* The file one run's summary occupies: `<memory root>/sessions/<safe-id>.md`.
|
|
33
|
+
*
|
|
34
|
+
* The id passes through `safeFilenameForId`, so a UUID keeps its own name and anything else gets a
|
|
35
|
+
* deterministic `h-<16hex>` token. Deterministic matters more than readable here — a name that
|
|
36
|
+
* varied per call would orphan the summary it names.
|
|
37
|
+
*/
|
|
38
|
+
export declare function sessionSummaryPath(root: MemoryRoot, runId: string): string;
|
|
39
|
+
/**
|
|
40
|
+
* Write a session summary file. EC-9: a non-finished status returns early
|
|
41
|
+
* without touching disk. Secrets in both user and assistant text are
|
|
42
|
+
* redacted via the shared `redactSecrets` pattern.
|
|
43
|
+
*
|
|
44
|
+
* Shared with `@theokit/sdk-memory` through the semver-exempt `internal/memory-store`
|
|
45
|
+
* sub-path, so it carries no internal-visibility tag. `stripInternal` matches that tag as TEXT
|
|
46
|
+
* anywhere in the block, so naming it here — even in backticks, even to say it is absent — deletes
|
|
47
|
+
* this symbol from the published declarations and forces the satellite back onto a copy. Measured:
|
|
48
|
+
* the first draft of this very note did exactly that. See #430 and #463.
|
|
49
|
+
*/
|
|
50
|
+
export declare function writeSessionSummary(input: SessionSummaryInput): Promise<void>;
|
|
@@ -1,2 +1,50 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
import type { MemoryRoot } from "./memory-root.js";
|
|
2
|
+
/**
|
|
3
|
+
* Per-run session summary writer (ADR D20).
|
|
4
|
+
*
|
|
5
|
+
* After every finished run, write a markdown summary to
|
|
6
|
+
* `.theokit/memory/sessions/<runId>.md`. IndexManager picks these up with
|
|
7
|
+
* `source="sessions"` so `memory_search({ corpus: "sessions" })` can recall
|
|
8
|
+
* past conversations.
|
|
9
|
+
*
|
|
10
|
+
* EC-9: only `status === "finished"` runs trigger a write. Cancelled/errored
|
|
11
|
+
* runs would otherwise pollute the recall corpus with partial transcripts.
|
|
12
|
+
*
|
|
13
|
+
* Shared with `@theokit/sdk-memory` through the semver-exempt `internal/memory-store`
|
|
14
|
+
* sub-path, so it carries no internal-visibility tag. `stripInternal` matches that tag as TEXT
|
|
15
|
+
* anywhere in the block, so naming it here — even in backticks, even to say it is absent — deletes
|
|
16
|
+
* this symbol from the published declarations and forces the satellite back onto a copy. Measured:
|
|
17
|
+
* the first draft of this very note did exactly that. See #430 and #463.
|
|
18
|
+
*/
|
|
19
|
+
export interface SessionSummaryInput {
|
|
20
|
+
/** The RESOLVED memory root, not a cwd — see `storage/memory-root.ts` (#463). */
|
|
21
|
+
memoryRoot: MemoryRoot;
|
|
22
|
+
runId: string;
|
|
23
|
+
agentId: string;
|
|
24
|
+
userText: string;
|
|
25
|
+
assistantText: string;
|
|
26
|
+
status: "finished" | "running" | "error" | "cancelled";
|
|
27
|
+
at: number;
|
|
28
|
+
}
|
|
29
|
+
/** `<memory root>/sessions`. Takes the RESOLVED ROOT — see `storage/memory-root.ts` (#463). */
|
|
30
|
+
export declare function sessionsDir(root: MemoryRoot): string;
|
|
31
|
+
/**
|
|
32
|
+
* The file one run's summary occupies: `<memory root>/sessions/<safe-id>.md`.
|
|
33
|
+
*
|
|
34
|
+
* The id passes through `safeFilenameForId`, so a UUID keeps its own name and anything else gets a
|
|
35
|
+
* deterministic `h-<16hex>` token. Deterministic matters more than readable here — a name that
|
|
36
|
+
* varied per call would orphan the summary it names.
|
|
37
|
+
*/
|
|
38
|
+
export declare function sessionSummaryPath(root: MemoryRoot, runId: string): string;
|
|
39
|
+
/**
|
|
40
|
+
* Write a session summary file. EC-9: a non-finished status returns early
|
|
41
|
+
* without touching disk. Secrets in both user and assistant text are
|
|
42
|
+
* redacted via the shared `redactSecrets` pattern.
|
|
43
|
+
*
|
|
44
|
+
* Shared with `@theokit/sdk-memory` through the semver-exempt `internal/memory-store`
|
|
45
|
+
* sub-path, so it carries no internal-visibility tag. `stripInternal` matches that tag as TEXT
|
|
46
|
+
* anywhere in the block, so naming it here — even in backticks, even to say it is absent — deletes
|
|
47
|
+
* this symbol from the published declarations and forces the satellite back onto a copy. Measured:
|
|
48
|
+
* the first draft of this very note did exactly that. See #430 and #463.
|
|
49
|
+
*/
|
|
50
|
+
export declare function writeSessionSummary(input: SessionSummaryInput): Promise<void>;
|
|
@@ -1 +1,38 @@
|
|
|
1
|
-
|
|
1
|
+
import type { MemoryRoot } from "./memory-root.js";
|
|
2
|
+
/**
|
|
3
|
+
* Optional on-disk persistence for Active Memory recall transcripts (ADR D6).
|
|
4
|
+
*
|
|
5
|
+
* Writes one JSON file per run under
|
|
6
|
+
* `.theokit/memory/transcripts/active-memory/<runId>.json` when the agent
|
|
7
|
+
* passes `persistTranscripts: true`. Failures are swallowed with a stderr
|
|
8
|
+
* warning so transcript IO never crashes the agent run.
|
|
9
|
+
*
|
|
10
|
+
* Shared with `@theokit/sdk-memory` through the semver-exempt `internal/memory-store`
|
|
11
|
+
* sub-path, so it carries no internal-visibility tag. `stripInternal` matches that tag as TEXT
|
|
12
|
+
* anywhere in the block, so naming it here — even in backticks, even to say it is absent — deletes
|
|
13
|
+
* this symbol from the published declarations and forces the satellite back onto a copy. Measured:
|
|
14
|
+
* the first draft of this very note did exactly that. See #430 and #463.
|
|
15
|
+
*/
|
|
16
|
+
export interface ActiveMemoryTranscript {
|
|
17
|
+
runId: string;
|
|
18
|
+
startedAtMs: number;
|
|
19
|
+
userText: string;
|
|
20
|
+
queryMode: string;
|
|
21
|
+
status: string;
|
|
22
|
+
durationMs: number;
|
|
23
|
+
summary: string | undefined;
|
|
24
|
+
hits: ReadonlyArray<{
|
|
25
|
+
path: string;
|
|
26
|
+
startLine: number;
|
|
27
|
+
endLine: number;
|
|
28
|
+
score: number;
|
|
29
|
+
snippet: string;
|
|
30
|
+
}>;
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* Write one active-memory recall transcript under `<memory root>/transcripts/active-memory`.
|
|
34
|
+
*
|
|
35
|
+
* Never throws. Transcript IO is observability, and observability must not break the run it merely
|
|
36
|
+
* observes — a failure is reported through the diagnostics sink and swallowed.
|
|
37
|
+
*/
|
|
38
|
+
export declare function persistActiveMemoryTranscript(root: MemoryRoot, transcript: ActiveMemoryTranscript): Promise<void>;
|
|
@@ -1 +1,38 @@
|
|
|
1
|
-
|
|
1
|
+
import type { MemoryRoot } from "./memory-root.js";
|
|
2
|
+
/**
|
|
3
|
+
* Optional on-disk persistence for Active Memory recall transcripts (ADR D6).
|
|
4
|
+
*
|
|
5
|
+
* Writes one JSON file per run under
|
|
6
|
+
* `.theokit/memory/transcripts/active-memory/<runId>.json` when the agent
|
|
7
|
+
* passes `persistTranscripts: true`. Failures are swallowed with a stderr
|
|
8
|
+
* warning so transcript IO never crashes the agent run.
|
|
9
|
+
*
|
|
10
|
+
* Shared with `@theokit/sdk-memory` through the semver-exempt `internal/memory-store`
|
|
11
|
+
* sub-path, so it carries no internal-visibility tag. `stripInternal` matches that tag as TEXT
|
|
12
|
+
* anywhere in the block, so naming it here — even in backticks, even to say it is absent — deletes
|
|
13
|
+
* this symbol from the published declarations and forces the satellite back onto a copy. Measured:
|
|
14
|
+
* the first draft of this very note did exactly that. See #430 and #463.
|
|
15
|
+
*/
|
|
16
|
+
export interface ActiveMemoryTranscript {
|
|
17
|
+
runId: string;
|
|
18
|
+
startedAtMs: number;
|
|
19
|
+
userText: string;
|
|
20
|
+
queryMode: string;
|
|
21
|
+
status: string;
|
|
22
|
+
durationMs: number;
|
|
23
|
+
summary: string | undefined;
|
|
24
|
+
hits: ReadonlyArray<{
|
|
25
|
+
path: string;
|
|
26
|
+
startLine: number;
|
|
27
|
+
endLine: number;
|
|
28
|
+
score: number;
|
|
29
|
+
snippet: string;
|
|
30
|
+
}>;
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* Write one active-memory recall transcript under `<memory root>/transcripts/active-memory`.
|
|
34
|
+
*
|
|
35
|
+
* Never throws. Transcript IO is observability, and observability must not break the run it merely
|
|
36
|
+
* observes — a failure is reported through the diagnostics sink and swallowed.
|
|
37
|
+
*/
|
|
38
|
+
export declare function persistActiveMemoryTranscript(root: MemoryRoot, transcript: ActiveMemoryTranscript): Promise<void>;
|
|
@@ -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[]>;
|