@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.
Files changed (379) hide show
  1. package/CHANGELOG.md +97 -0
  2. package/dist/a2a/index.cjs +2 -2
  3. package/dist/a2a/index.js +1 -1
  4. package/dist/{agent-DIu6FooJ.d.ts → agent-BFno7Sfn.d.ts} +36 -21
  5. package/dist/agent-WK7MKIMH.cjs +66 -0
  6. package/dist/{agent-VYPUO4UB.cjs.map → agent-WK7MKIMH.cjs.map} +1 -1
  7. package/dist/{agent-D3Xr_-6Z.d.cts → agent-X0DKA943.d.cts} +36 -21
  8. package/dist/agent-YWMBM7LX.js +57 -0
  9. package/dist/{agent-NVBFTY5H.js.map → agent-YWMBM7LX.js.map} +1 -1
  10. package/dist/agent-session-store-6EL5NPA4.cjs +24 -0
  11. package/dist/{agent-session-store-WAKLOKWK.cjs.map → agent-session-store-6EL5NPA4.cjs.map} +1 -1
  12. package/dist/agent-session-store-OPGRB4XM.js +7 -0
  13. package/dist/{agent-session-store-G2BMUZQV.js.map → agent-session-store-OPGRB4XM.js.map} +1 -1
  14. package/dist/auth/index.cjs +18 -18
  15. package/dist/auth/index.js +6 -6
  16. package/dist/{batch-ND32UKZS.cjs → batch-BXYTW2DP.cjs} +27 -27
  17. package/dist/{batch-ND32UKZS.cjs.map → batch-BXYTW2DP.cjs.map} +1 -1
  18. package/dist/{batch-2TGJMNCJ.js → batch-L4ZXS46M.js} +10 -10
  19. package/dist/{batch-2TGJMNCJ.js.map → batch-L4ZXS46M.js.map} +1 -1
  20. package/dist/{chunk-VF7EWVDG.js → chunk-2GUYQR5P.js} +3 -3
  21. package/dist/{chunk-VF7EWVDG.js.map → chunk-2GUYQR5P.js.map} +1 -1
  22. package/dist/{chunk-J2UROOIG.cjs → chunk-2HVF2WJY.cjs} +8 -8
  23. package/dist/{chunk-J2UROOIG.cjs.map → chunk-2HVF2WJY.cjs.map} +1 -1
  24. package/dist/{chunk-44MBDIHG.js → chunk-2QDYBS2A.js} +3 -3
  25. package/dist/{chunk-44MBDIHG.js.map → chunk-2QDYBS2A.js.map} +1 -1
  26. package/dist/{chunk-NGESVVJN.cjs → chunk-3FFAEAUJ.cjs} +17 -17
  27. package/dist/{chunk-NGESVVJN.cjs.map → chunk-3FFAEAUJ.cjs.map} +1 -1
  28. package/dist/{chunk-GWC3HADL.cjs → chunk-3NSS2OIZ.cjs} +4 -4
  29. package/dist/{chunk-GWC3HADL.cjs.map → chunk-3NSS2OIZ.cjs.map} +1 -1
  30. package/dist/{chunk-CV7XMBHP.js → chunk-3O42QOMJ.js} +3 -3
  31. package/dist/{chunk-CV7XMBHP.js.map → chunk-3O42QOMJ.js.map} +1 -1
  32. package/dist/{chunk-IWBGCBR6.cjs → chunk-4CLOXP6H.cjs} +4 -4
  33. package/dist/{chunk-IWBGCBR6.cjs.map → chunk-4CLOXP6H.cjs.map} +1 -1
  34. package/dist/{chunk-YEXA3PGR.js → chunk-4FFBAUFS.js} +5 -5
  35. package/dist/{chunk-YEXA3PGR.js.map → chunk-4FFBAUFS.js.map} +1 -1
  36. package/dist/{chunk-HY57ULY2.cjs → chunk-4PYZ5AX3.cjs} +5 -5
  37. package/dist/{chunk-HY57ULY2.cjs.map → chunk-4PYZ5AX3.cjs.map} +1 -1
  38. package/dist/{chunk-OC4NTGMN.js → chunk-4QZSA2HJ.js} +3 -3
  39. package/dist/{chunk-OC4NTGMN.js.map → chunk-4QZSA2HJ.js.map} +1 -1
  40. package/dist/{chunk-K3FW2XZD.cjs → chunk-4ZHTIJNE.cjs} +9 -9
  41. package/dist/{chunk-K3FW2XZD.cjs.map → chunk-4ZHTIJNE.cjs.map} +1 -1
  42. package/dist/{chunk-BUIK7GUA.cjs → chunk-5HEG4CQH.cjs} +8 -8
  43. package/dist/{chunk-BUIK7GUA.cjs.map → chunk-5HEG4CQH.cjs.map} +1 -1
  44. package/dist/{chunk-SKXBJ2NU.cjs → chunk-5VB22SYX.cjs} +7 -54
  45. package/dist/chunk-5VB22SYX.cjs.map +1 -0
  46. package/dist/{chunk-5USCYPPI.cjs → chunk-6HKGLTJI.cjs} +8 -8
  47. package/dist/{chunk-5USCYPPI.cjs.map → chunk-6HKGLTJI.cjs.map} +1 -1
  48. package/dist/chunk-6RKUO7AW.cjs +864 -0
  49. package/dist/chunk-6RKUO7AW.cjs.map +1 -0
  50. package/dist/{chunk-5JLFFPCH.js → chunk-7YGCPMGB.js} +4 -4
  51. package/dist/{chunk-5JLFFPCH.js.map → chunk-7YGCPMGB.js.map} +1 -1
  52. package/dist/{chunk-SUKXXLWD.js → chunk-A46SWMIF.js} +6 -6
  53. package/dist/{chunk-SUKXXLWD.js.map → chunk-A46SWMIF.js.map} +1 -1
  54. package/dist/{chunk-F7AQV62G.js → chunk-A4JVILQU.js} +5 -5
  55. package/dist/{chunk-F7AQV62G.js.map → chunk-A4JVILQU.js.map} +1 -1
  56. package/dist/chunk-A4RAL2ER.cjs +51 -0
  57. package/dist/chunk-A4RAL2ER.cjs.map +1 -0
  58. package/dist/{chunk-44JAAH4X.js → chunk-B3IMEBOA.js} +3 -3
  59. package/dist/{chunk-44JAAH4X.js.map → chunk-B3IMEBOA.js.map} +1 -1
  60. package/dist/{chunk-QDED6YO6.cjs → chunk-B4EOJWOY.cjs} +5 -5
  61. package/dist/{chunk-QDED6YO6.cjs.map → chunk-B4EOJWOY.cjs.map} +1 -1
  62. package/dist/{chunk-YJDH3CKG.js → chunk-BP46RJ5X.js} +5 -5
  63. package/dist/{chunk-YJDH3CKG.js.map → chunk-BP46RJ5X.js.map} +1 -1
  64. package/dist/{chunk-QRSUA2CV.js → chunk-BU4KFWXF.js} +3 -3
  65. package/dist/{chunk-QRSUA2CV.js.map → chunk-BU4KFWXF.js.map} +1 -1
  66. package/dist/{chunk-IBYRA5PM.js → chunk-BVJJ3DRV.js} +6 -6
  67. package/dist/{chunk-IBYRA5PM.js.map → chunk-BVJJ3DRV.js.map} +1 -1
  68. package/dist/{chunk-AQLGBKNT.js → chunk-BZRFXJHA.js} +3 -3
  69. package/dist/{chunk-AQLGBKNT.js.map → chunk-BZRFXJHA.js.map} +1 -1
  70. package/dist/{chunk-UQGQFBRL.js → chunk-C3NT3PVE.js} +3 -3
  71. package/dist/{chunk-UQGQFBRL.js.map → chunk-C3NT3PVE.js.map} +1 -1
  72. package/dist/{chunk-UC3HT2S4.js → chunk-C72AZW7J.js} +3 -3
  73. package/dist/{chunk-UC3HT2S4.js.map → chunk-C72AZW7J.js.map} +1 -1
  74. package/dist/{chunk-WNTAPVU5.cjs → chunk-CQBXOJ6U.cjs} +13 -13
  75. package/dist/{chunk-WNTAPVU5.cjs.map → chunk-CQBXOJ6U.cjs.map} +1 -1
  76. package/dist/{chunk-T7XEKOVW.js → chunk-D4CUGAKZ.js} +3 -3
  77. package/dist/{chunk-T7XEKOVW.js.map → chunk-D4CUGAKZ.js.map} +1 -1
  78. package/dist/chunk-DKD3MH6A.js +194 -0
  79. package/dist/chunk-DKD3MH6A.js.map +1 -0
  80. package/dist/{chunk-YXGAW7BB.js → chunk-DN2PACRI.js} +10 -10
  81. package/dist/{chunk-YXGAW7BB.js.map → chunk-DN2PACRI.js.map} +1 -1
  82. package/dist/{chunk-XSX2UU6Y.cjs → chunk-DXGZ2NUG.cjs} +10 -10
  83. package/dist/{chunk-XSX2UU6Y.cjs.map → chunk-DXGZ2NUG.cjs.map} +1 -1
  84. package/dist/{chunk-NUKRL3I6.cjs → chunk-EG4QM7ZJ.cjs} +18 -2
  85. package/dist/chunk-EG4QM7ZJ.cjs.map +1 -0
  86. package/dist/chunk-GEEXBYFL.js +831 -0
  87. package/dist/chunk-GEEXBYFL.js.map +1 -0
  88. package/dist/chunk-GKEFRLU7.cjs +21 -0
  89. package/dist/chunk-GKEFRLU7.cjs.map +1 -0
  90. package/dist/{chunk-NIRE5CNO.cjs → chunk-HCZD23VS.cjs} +13 -13
  91. package/dist/{chunk-NIRE5CNO.cjs.map → chunk-HCZD23VS.cjs.map} +1 -1
  92. package/dist/chunk-HOXVQ5FR.cjs +201 -0
  93. package/dist/chunk-HOXVQ5FR.cjs.map +1 -0
  94. package/dist/{chunk-QARJGQSA.js → chunk-HS7AVXTF.js} +3 -3
  95. package/dist/{chunk-QARJGQSA.js.map → chunk-HS7AVXTF.js.map} +1 -1
  96. package/dist/{chunk-4I55V454.cjs → chunk-I6HGWHPU.cjs} +4 -4
  97. package/dist/{chunk-4I55V454.cjs.map → chunk-I6HGWHPU.cjs.map} +1 -1
  98. package/dist/{chunk-T73NA43R.js → chunk-IPYYKCRC.js} +3 -3
  99. package/dist/{chunk-T73NA43R.js.map → chunk-IPYYKCRC.js.map} +1 -1
  100. package/dist/{chunk-6OBIWHDR.cjs → chunk-ITYQ6VBP.cjs} +24 -365
  101. package/dist/chunk-ITYQ6VBP.cjs.map +1 -0
  102. package/dist/chunk-JPBKYL3B.cjs +18 -0
  103. package/dist/{chunk-6HTXPPHK.cjs.map → chunk-JPBKYL3B.cjs.map} +1 -1
  104. package/dist/{chunk-MZ2FGBLZ.js → chunk-K5OJUYSZ.js} +4 -4
  105. package/dist/{chunk-MZ2FGBLZ.js.map → chunk-K5OJUYSZ.js.map} +1 -1
  106. package/dist/{chunk-SKOCYA55.js → chunk-KIH6IZ43.js} +90 -88
  107. package/dist/chunk-KIH6IZ43.js.map +1 -0
  108. package/dist/{chunk-EI2Q7SJ5.cjs → chunk-KQ7TS7WW.cjs} +10 -10
  109. package/dist/{chunk-EI2Q7SJ5.cjs.map → chunk-KQ7TS7WW.cjs.map} +1 -1
  110. package/dist/{chunk-RUDY2GTT.js → chunk-KQRW2GPZ.js} +5 -5
  111. package/dist/{chunk-RUDY2GTT.js.map → chunk-KQRW2GPZ.js.map} +1 -1
  112. package/dist/{chunk-P5LCASTC.cjs → chunk-KYAJINUI.cjs} +125 -125
  113. package/dist/{chunk-P5LCASTC.cjs.map → chunk-KYAJINUI.cjs.map} +1 -1
  114. package/dist/{chunk-CQ2TQ32Y.js → chunk-LWGSI6M3.js} +5 -50
  115. package/dist/chunk-LWGSI6M3.js.map +1 -0
  116. package/dist/{chunk-ZHPWGIUX.js → chunk-LXI4XZEC.js} +5 -5
  117. package/dist/{chunk-ZHPWGIUX.js.map → chunk-LXI4XZEC.js.map} +1 -1
  118. package/dist/{chunk-AG5JPQIY.js → chunk-LXQ6HKPS.js} +3 -3
  119. package/dist/{chunk-AG5JPQIY.js.map → chunk-LXQ6HKPS.js.map} +1 -1
  120. package/dist/{chunk-ROYPRJH4.cjs → chunk-LYRDF5TQ.cjs} +9 -9
  121. package/dist/{chunk-ROYPRJH4.cjs.map → chunk-LYRDF5TQ.cjs.map} +1 -1
  122. package/dist/{chunk-G24KZRSA.js → chunk-N2U4AZGB.js} +3 -3
  123. package/dist/{chunk-G24KZRSA.js.map → chunk-N2U4AZGB.js.map} +1 -1
  124. package/dist/{chunk-4ERPXIVB.js → chunk-O73J46PV.js} +5 -5
  125. package/dist/{chunk-4ERPXIVB.js.map → chunk-O73J46PV.js.map} +1 -1
  126. package/dist/{chunk-F3YZMOAU.cjs → chunk-O7DK5PBJ.cjs} +4 -4
  127. package/dist/{chunk-F3YZMOAU.cjs.map → chunk-O7DK5PBJ.cjs.map} +1 -1
  128. package/dist/{chunk-Z4BCLVTI.cjs → chunk-O7LZFG6O.cjs} +5 -5
  129. package/dist/{chunk-Z4BCLVTI.cjs.map → chunk-O7LZFG6O.cjs.map} +1 -1
  130. package/dist/{chunk-3YJNUKYN.cjs → chunk-OHLDPWTA.cjs} +15 -15
  131. package/dist/{chunk-3YJNUKYN.cjs.map → chunk-OHLDPWTA.cjs.map} +1 -1
  132. package/dist/{chunk-FUL2I7G5.js → chunk-OSEG74VJ.js} +8 -8
  133. package/dist/{chunk-FUL2I7G5.js.map → chunk-OSEG74VJ.js.map} +1 -1
  134. package/dist/{chunk-UCBJBJ27.js → chunk-PUAEFLYK.js} +4 -4
  135. package/dist/{chunk-UCBJBJ27.js.map → chunk-PUAEFLYK.js.map} +1 -1
  136. package/dist/{chunk-CWHTMNNK.cjs → chunk-Q7LPTOD6.cjs} +24 -24
  137. package/dist/{chunk-CWHTMNNK.cjs.map → chunk-Q7LPTOD6.cjs.map} +1 -1
  138. package/dist/{chunk-2C72DXQF.cjs → chunk-RFMBZPOW.cjs} +9 -9
  139. package/dist/{chunk-2C72DXQF.cjs.map → chunk-RFMBZPOW.cjs.map} +1 -1
  140. package/dist/{chunk-NLTVXLGT.js → chunk-RFXWMRFC.js} +3 -3
  141. package/dist/{chunk-NLTVXLGT.js.map → chunk-RFXWMRFC.js.map} +1 -1
  142. package/dist/{chunk-2DG7KW4L.cjs → chunk-RMWTPV3M.cjs} +8 -8
  143. package/dist/{chunk-2DG7KW4L.cjs.map → chunk-RMWTPV3M.cjs.map} +1 -1
  144. package/dist/{chunk-P6A3M6VD.cjs → chunk-SZVR77EJ.cjs} +10 -10
  145. package/dist/{chunk-P6A3M6VD.cjs.map → chunk-SZVR77EJ.cjs.map} +1 -1
  146. package/dist/{chunk-3E77SX4H.js → chunk-TAZVKYWJ.js} +3 -3
  147. package/dist/{chunk-3E77SX4H.js.map → chunk-TAZVKYWJ.js.map} +1 -1
  148. package/dist/{chunk-WKRSH2VR.js → chunk-U6IFHFWK.js} +3 -3
  149. package/dist/{chunk-WKRSH2VR.js.map → chunk-U6IFHFWK.js.map} +1 -1
  150. package/dist/{chunk-I6TGFUCO.cjs → chunk-UALX2J2Q.cjs} +4 -4
  151. package/dist/{chunk-I6TGFUCO.cjs.map → chunk-UALX2J2Q.cjs.map} +1 -1
  152. package/dist/{chunk-XN7NOENA.js → chunk-UBDMVMBZ.js} +5 -5
  153. package/dist/{chunk-XN7NOENA.js.map → chunk-UBDMVMBZ.js.map} +1 -1
  154. package/dist/{chunk-QEKI3YKI.js → chunk-UEXIJTLC.js} +14 -349
  155. package/dist/chunk-UEXIJTLC.js.map +1 -0
  156. package/dist/{chunk-DQKERTND.cjs → chunk-UGT7GK7I.cjs} +11 -11
  157. package/dist/{chunk-DQKERTND.cjs.map → chunk-UGT7GK7I.cjs.map} +1 -1
  158. package/dist/{chunk-FKMUFNQE.js → chunk-UMP6OJIM.js} +4 -4
  159. package/dist/{chunk-FKMUFNQE.js.map → chunk-UMP6OJIM.js.map} +1 -1
  160. package/dist/{chunk-AEOZTXVW.js → chunk-UNYXQ4M5.js} +3 -3
  161. package/dist/{chunk-AEOZTXVW.js.map → chunk-UNYXQ4M5.js.map} +1 -1
  162. package/dist/{chunk-2BDH744Z.js → chunk-UTSRIDKZ.js} +3 -3
  163. package/dist/{chunk-2BDH744Z.js.map → chunk-UTSRIDKZ.js.map} +1 -1
  164. package/dist/{chunk-2ADR2GSO.cjs → chunk-UU36SHFY.cjs} +5 -5
  165. package/dist/{chunk-2ADR2GSO.cjs.map → chunk-UU36SHFY.cjs.map} +1 -1
  166. package/dist/{chunk-R3UPQFKK.cjs → chunk-V2BOS4WF.cjs} +9 -9
  167. package/dist/{chunk-R3UPQFKK.cjs.map → chunk-V2BOS4WF.cjs.map} +1 -1
  168. package/dist/chunk-WE22OXQA.js +48 -0
  169. package/dist/chunk-WE22OXQA.js.map +1 -0
  170. package/dist/{chunk-Q4CMI2LP.js → chunk-WLQNMXQE.js} +5 -5
  171. package/dist/{chunk-Q4CMI2LP.js.map → chunk-WLQNMXQE.js.map} +1 -1
  172. package/dist/{chunk-XWL6O3SW.cjs → chunk-WNO3C3N2.cjs} +4 -4
  173. package/dist/{chunk-XWL6O3SW.cjs.map → chunk-WNO3C3N2.cjs.map} +1 -1
  174. package/dist/{chunk-T7O6K6PX.js → chunk-XEQ3TM66.js} +18 -3
  175. package/dist/chunk-XEQ3TM66.js.map +1 -0
  176. package/dist/{chunk-BVZW2B5V.cjs → chunk-XJCXEKMD.cjs} +4 -4
  177. package/dist/{chunk-BVZW2B5V.cjs.map → chunk-XJCXEKMD.cjs.map} +1 -1
  178. package/dist/{chunk-JTB5Q42C.cjs → chunk-XL7Q7HB2.cjs} +4 -4
  179. package/dist/{chunk-JTB5Q42C.cjs.map → chunk-XL7Q7HB2.cjs.map} +1 -1
  180. package/dist/chunk-XO4SOZN6.js +19 -0
  181. package/dist/chunk-XO4SOZN6.js.map +1 -0
  182. package/dist/{chunk-CQGYNZ3K.cjs → chunk-XWTLIGO3.cjs} +4 -4
  183. package/dist/{chunk-CQGYNZ3K.cjs.map → chunk-XWTLIGO3.cjs.map} +1 -1
  184. package/dist/{chunk-6SBW4QR2.cjs → chunk-YML4ME27.cjs} +11 -11
  185. package/dist/{chunk-6SBW4QR2.cjs.map → chunk-YML4ME27.cjs.map} +1 -1
  186. package/dist/{chunk-P6H23T43.cjs → chunk-ZCIRZE37.cjs} +11 -11
  187. package/dist/{chunk-P6H23T43.cjs.map → chunk-ZCIRZE37.cjs.map} +1 -1
  188. package/dist/{chunk-QI7WE46I.cjs → chunk-ZLQSWSJ2.cjs} +11 -11
  189. package/dist/{chunk-QI7WE46I.cjs.map → chunk-ZLQSWSJ2.cjs.map} +1 -1
  190. package/dist/{chunk-AH6WD7JR.cjs → chunk-ZMRD5DZQ.cjs} +362 -360
  191. package/dist/chunk-ZMRD5DZQ.cjs.map +1 -0
  192. package/dist/{chunk-ILCGLTSA.cjs → chunk-ZSWPZ23K.cjs} +4 -4
  193. package/dist/{chunk-ILCGLTSA.cjs.map → chunk-ZSWPZ23K.cjs.map} +1 -1
  194. package/dist/{chunk-IDCKSLYH.js → chunk-ZZMZWBR6.js} +3 -3
  195. package/dist/{chunk-IDCKSLYH.js.map → chunk-ZZMZWBR6.js.map} +1 -1
  196. package/dist/compact-session-QV57KR66.cjs +59 -0
  197. package/dist/{compact-session-GJXJD73F.cjs.map → compact-session-QV57KR66.cjs.map} +1 -1
  198. package/dist/compact-session-RIGOWC4Y.js +22 -0
  199. package/dist/{compact-session-TSMQOIHO.js.map → compact-session-RIGOWC4Y.js.map} +1 -1
  200. package/dist/compaction.cjs +17 -17
  201. package/dist/compaction.js +4 -4
  202. package/dist/concurrency.cjs +7 -7
  203. package/dist/concurrency.js +5 -5
  204. package/dist/context-AGQ3DIZU.cjs +24 -0
  205. package/dist/{context-LCKNH2XI.cjs.map → context-AGQ3DIZU.cjs.map} +1 -1
  206. package/dist/context-GQRFBCLP.js +7 -0
  207. package/dist/{context-MZSKGKYR.js.map → context-GQRFBCLP.js.map} +1 -1
  208. package/dist/{cron-BcWmzWzT.d.cts → cron-BuiRPrvt.d.cts} +1 -1
  209. package/dist/{cron-De6hzWCF.d.ts → cron-C2SIi31n.d.ts} +1 -1
  210. package/dist/cron.cjs +37 -35
  211. package/dist/cron.d.cts +2 -2
  212. package/dist/cron.d.ts +2 -2
  213. package/dist/cron.js +36 -34
  214. package/dist/errors.cjs +22 -22
  215. package/dist/errors.js +3 -3
  216. package/dist/eval.cjs +42 -40
  217. package/dist/eval.cjs.map +1 -1
  218. package/dist/eval.js +36 -34
  219. package/dist/eval.js.map +1 -1
  220. package/dist/{executor-ZERJ3DGN.cjs → executor-6CYCA7MI.cjs} +25 -25
  221. package/dist/{executor-ZERJ3DGN.cjs.map → executor-6CYCA7MI.cjs.map} +1 -1
  222. package/dist/{executor-BMEHFOXZ.js → executor-QSEC3MRH.js} +8 -8
  223. package/dist/{executor-BMEHFOXZ.js.map → executor-QSEC3MRH.js.map} +1 -1
  224. package/dist/filesystem/index.cjs +8 -8
  225. package/dist/filesystem/index.js +4 -4
  226. package/dist/fs-session-store-4PIHT5UX.cjs +20 -0
  227. package/dist/{fs-session-store-XZ7ZTB3A.cjs.map → fs-session-store-4PIHT5UX.cjs.map} +1 -1
  228. package/dist/fs-session-store-NM6YSTE2.js +11 -0
  229. package/dist/{fs-session-store-4BHGIWRE.js.map → fs-session-store-NM6YSTE2.js.map} +1 -1
  230. package/dist/generate-object-GUNAUVBX.js +8 -0
  231. package/dist/{generate-object-N5MDZUJI.js.map → generate-object-GUNAUVBX.js.map} +1 -1
  232. package/dist/generate-object-R7HTMW7F.cjs +21 -0
  233. package/dist/{generate-object-PGSP5U7N.cjs.map → generate-object-R7HTMW7F.cjs.map} +1 -1
  234. package/dist/index-manager-RBDHP3PM.js +17 -0
  235. package/dist/{index-manager-AHAYJ33H.js.map → index-manager-RBDHP3PM.js.map} +1 -1
  236. package/dist/index-manager-UZBF22BJ.cjs +26 -0
  237. package/dist/{index-manager-RHPFVFSC.cjs.map → index-manager-UZBF22BJ.cjs.map} +1 -1
  238. package/dist/index.cjs +146 -319
  239. package/dist/index.cjs.map +1 -1
  240. package/dist/index.d.cts +8 -3
  241. package/dist/index.d.ts +8 -3
  242. package/dist/index.js +62 -235
  243. package/dist/index.js.map +1 -1
  244. package/dist/{inject-session-ZCQUB3IT.js → inject-session-DAR7OUCW.js} +8 -8
  245. package/dist/{inject-session-ZCQUB3IT.js.map → inject-session-DAR7OUCW.js.map} +1 -1
  246. package/dist/{inject-session-PPSO2IDD.cjs → inject-session-WQKMC3GR.cjs} +10 -10
  247. package/dist/{inject-session-PPSO2IDD.cjs.map → inject-session-WQKMC3GR.cjs.map} +1 -1
  248. package/dist/internal/memory/active-memory.d.ts +8 -1
  249. package/dist/internal/memory/adapters/index.cjs +9 -9
  250. package/dist/internal/memory/adapters/index.js +8 -8
  251. package/dist/internal/memory/dreaming/diary.d.ts +39 -2
  252. package/dist/internal/memory/index-db.d.ts +44 -1
  253. package/dist/internal/memory/index-manager-contract.d.ts +10 -0
  254. package/dist/internal/memory/index-manager-helpers.d.ts +20 -1
  255. package/dist/internal/memory/index-manager.d.ts +1 -1
  256. package/dist/internal/memory/lance-index.d.ts +15 -1
  257. package/dist/internal/memory/migrate-sqlite-to-lance.d.ts +43 -0
  258. package/dist/internal/memory/storage/index.cjs +101 -18
  259. package/dist/internal/memory/storage/index.d.cts +11 -1
  260. package/dist/internal/memory/storage/index.d.ts +11 -1
  261. package/dist/internal/memory/storage/index.js +10 -7
  262. package/dist/internal/memory/storage/markdown-store.d.cts +13 -42
  263. package/dist/internal/memory/storage/markdown-store.d.ts +13 -42
  264. package/dist/internal/memory/storage/memory-root.d.cts +93 -0
  265. package/dist/internal/memory/storage/memory-root.d.ts +93 -0
  266. package/dist/internal/memory/storage/session-loader.d.cts +35 -1
  267. package/dist/internal/memory/storage/session-loader.d.ts +35 -1
  268. package/dist/internal/memory/storage/session-summary-writer.d.cts +50 -2
  269. package/dist/internal/memory/storage/session-summary-writer.d.ts +50 -2
  270. package/dist/internal/memory/storage/transcript-store.d.cts +38 -1
  271. package/dist/internal/memory/storage/transcript-store.d.ts +38 -1
  272. package/dist/internal/memory/storage/wiki-loader.d.cts +27 -2
  273. package/dist/internal/memory/storage/wiki-loader.d.ts +27 -2
  274. package/dist/internal/memory/tools.d.ts +8 -1
  275. package/dist/internal/memory/types.d.ts +5 -0
  276. package/dist/internal/persistence/index.cjs +29 -28
  277. package/dist/internal/persistence/index.cjs.map +1 -1
  278. package/dist/internal/persistence/index.js +8 -7
  279. package/dist/internal/persistence/index.js.map +1 -1
  280. package/dist/internal/persistence/session-dir.d.cts +0 -15
  281. package/dist/internal/persistence/session-dir.d.ts +0 -15
  282. package/dist/internal/runtime/memory/memory-store.d.ts +2 -2
  283. package/dist/internal/security/index.cjs +14 -14
  284. package/dist/internal/security/index.js +4 -4
  285. package/dist/judge-call-LAHMBJ57.cjs +23 -0
  286. package/dist/{judge-call-EGYRC2RE.cjs.map → judge-call-LAHMBJ57.cjs.map} +1 -1
  287. package/dist/judge-call-LVXABPS3.js +6 -0
  288. package/dist/{judge-call-DWHAJATE.js.map → judge-call-LVXABPS3.js.map} +1 -1
  289. package/dist/mcp-auth.cjs +15 -15
  290. package/dist/mcp-auth.js +5 -5
  291. package/dist/models.cjs +22 -22
  292. package/dist/models.js +7 -7
  293. package/dist/path-safety.cjs +11 -11
  294. package/dist/path-safety.js +4 -4
  295. package/dist/persistence.cjs +33 -32
  296. package/dist/persistence.cjs.map +1 -1
  297. package/dist/persistence.js +10 -9
  298. package/dist/persistence.js.map +1 -1
  299. package/dist/project.cjs +6 -6
  300. package/dist/project.js +4 -4
  301. package/dist/providers.cjs +9 -9
  302. package/dist/providers.js +7 -7
  303. package/dist/registry-75W33OGL.js +10 -0
  304. package/dist/{registry-VFP3WWQP.js.map → registry-75W33OGL.js.map} +1 -1
  305. package/dist/registry-V7BDQ6QB.cjs +47 -0
  306. package/dist/{registry-VFKX7WOP.cjs.map → registry-V7BDQ6QB.cjs.map} +1 -1
  307. package/dist/retry.cjs +5 -5
  308. package/dist/retry.js +4 -4
  309. package/dist/sandbox/index.cjs +7 -7
  310. package/dist/sandbox/index.js +3 -3
  311. package/dist/server/errors-envelope.cjs +15 -15
  312. package/dist/server/errors-envelope.js +4 -4
  313. package/dist/session-transcript-6WNITKRE.cjs +63 -0
  314. package/dist/{session-transcript-HF5GEU5M.cjs.map → session-transcript-6WNITKRE.cjs.map} +1 -1
  315. package/dist/session-transcript-XAEKW6P7.js +6 -0
  316. package/dist/{session-transcript-P462ZRHX.js.map → session-transcript-XAEKW6P7.js.map} +1 -1
  317. package/dist/skills.cjs +8 -8
  318. package/dist/skills.js +6 -6
  319. package/dist/stream-object-UF4QRQRU.js +8 -0
  320. package/dist/{stream-object-L57K4OFS.js.map → stream-object-UF4QRQRU.js.map} +1 -1
  321. package/dist/stream-object-ZJTQNKY3.cjs +21 -0
  322. package/dist/{stream-object-BUCF5PHO.cjs.map → stream-object-ZJTQNKY3.cjs.map} +1 -1
  323. package/dist/subagents-loader-CRT5LLL3.js +8 -0
  324. package/dist/{subagents-loader-6ATCDEKN.js.map → subagents-loader-CRT5LLL3.js.map} +1 -1
  325. package/dist/subagents-loader-YEUFFPAL.cjs +17 -0
  326. package/dist/{subagents-loader-X5QKODCL.cjs.map → subagents-loader-YEUFFPAL.cjs.map} +1 -1
  327. package/dist/subagents-loader.cjs +7 -7
  328. package/dist/subagents-loader.d.cts +1 -1
  329. package/dist/subagents-loader.d.ts +1 -1
  330. package/dist/subagents-loader.js +5 -5
  331. package/dist/subscription/index.cjs +4 -4
  332. package/dist/subscription/index.js +3 -3
  333. package/dist/task-store.cjs +8 -8
  334. package/dist/task-store.js +5 -5
  335. package/dist/types/agent.d.ts +11 -0
  336. package/dist/types/memory-provider.d.ts +8 -0
  337. package/dist/workflow.cjs +28 -28
  338. package/dist/workflow.js +7 -7
  339. package/docs/error-codes.md +10 -9
  340. package/docs/harness-capability-map.md +57 -17
  341. package/docs/memory-decisions.md +44 -7
  342. package/package.json +1 -1
  343. package/dist/agent-NVBFTY5H.js +0 -55
  344. package/dist/agent-VYPUO4UB.cjs +0 -64
  345. package/dist/agent-session-store-G2BMUZQV.js +0 -7
  346. package/dist/agent-session-store-WAKLOKWK.cjs +0 -24
  347. package/dist/chunk-2UCFUSPW.cjs +0 -468
  348. package/dist/chunk-2UCFUSPW.cjs.map +0 -1
  349. package/dist/chunk-6HTXPPHK.cjs +0 -18
  350. package/dist/chunk-6OBIWHDR.cjs.map +0 -1
  351. package/dist/chunk-AH6WD7JR.cjs.map +0 -1
  352. package/dist/chunk-CQ2TQ32Y.js.map +0 -1
  353. package/dist/chunk-NUKRL3I6.cjs.map +0 -1
  354. package/dist/chunk-QEKI3YKI.js.map +0 -1
  355. package/dist/chunk-SKOCYA55.js.map +0 -1
  356. package/dist/chunk-SKXBJ2NU.cjs.map +0 -1
  357. package/dist/chunk-T7O6K6PX.js.map +0 -1
  358. package/dist/chunk-WCLDJSMY.js +0 -456
  359. package/dist/chunk-WCLDJSMY.js.map +0 -1
  360. package/dist/compact-session-GJXJD73F.cjs +0 -59
  361. package/dist/compact-session-TSMQOIHO.js +0 -22
  362. package/dist/context-LCKNH2XI.cjs +0 -24
  363. package/dist/context-MZSKGKYR.js +0 -7
  364. package/dist/fs-session-store-4BHGIWRE.js +0 -11
  365. package/dist/fs-session-store-XZ7ZTB3A.cjs +0 -20
  366. package/dist/generate-object-N5MDZUJI.js +0 -8
  367. package/dist/generate-object-PGSP5U7N.cjs +0 -21
  368. package/dist/index-manager-AHAYJ33H.js +0 -16
  369. package/dist/index-manager-RHPFVFSC.cjs +0 -25
  370. package/dist/judge-call-DWHAJATE.js +0 -6
  371. package/dist/judge-call-EGYRC2RE.cjs +0 -23
  372. package/dist/registry-VFKX7WOP.cjs +0 -47
  373. package/dist/registry-VFP3WWQP.js +0 -10
  374. package/dist/session-transcript-HF5GEU5M.cjs +0 -63
  375. package/dist/session-transcript-P462ZRHX.js +0 -6
  376. package/dist/stream-object-BUCF5PHO.cjs +0 -21
  377. package/dist/stream-object-L57K4OFS.js +0 -8
  378. package/dist/subagents-loader-6ATCDEKN.js +0 -8
  379. 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(cwd: string): string;
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(cwd: string): string;
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, sessionDir?: string): Promise<MemoryFact[]>;
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, memoryHome?: string): Promise<MemoryFact[]>;
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
- * `memoryHome` is the agent's `local.sessionDir` when it has one see {@link memoryWriteDir} for
75
- * which store that sends the fact to.
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, memoryHome?: string): Promise<void>;
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(cwd: string): string;
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(cwd: string): string;
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, sessionDir?: string): Promise<MemoryFact[]>;
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, memoryHome?: string): Promise<MemoryFact[]>;
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
- * `memoryHome` is the agent's `local.sessionDir` when it has one see {@link memoryWriteDir} for
75
- * which store that sends the fact to.
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, memoryHome?: string): Promise<void>;
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
- export declare function discoverSessionFiles(cwd: string): Promise<SessionFile[]>;
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
- export declare function discoverSessionFiles(cwd: string): Promise<SessionFile[]>;
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
- export declare function sessionsDir(cwd: string): string;
2
- export declare function sessionSummaryPath(cwd: string, runId: string): string;
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
- export declare function sessionsDir(cwd: string): string;
2
- export declare function sessionSummaryPath(cwd: string, runId: string): string;
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
- export declare function persistActiveMemoryTranscript(cwd: string, transcript: ActiveMemoryTranscript): Promise<void>;
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
- export declare function persistActiveMemoryTranscript(cwd: string, transcript: ActiveMemoryTranscript): Promise<void>;
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
- export declare function wikiDir(cwd: string): string;
2
- export declare function discoverWikiFiles(cwd: string): Promise<WikiFile[]>;
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[]>;