@theokit/sdk 5.15.1 → 5.15.2

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 (355) hide show
  1. package/CHANGELOG.md +6 -0
  2. package/dist/a2a/index.cjs +3 -3
  3. package/dist/a2a/index.js +1 -1
  4. package/dist/agent-D6WBBNGR.cjs +72 -0
  5. package/dist/{agent-CB27KF6O.cjs.map → agent-D6WBBNGR.cjs.map} +1 -1
  6. package/dist/agent-QRIFX2SY.js +63 -0
  7. package/dist/{agent-66U5QCPF.js.map → agent-QRIFX2SY.js.map} +1 -1
  8. package/dist/agent-session-store-2LQEPS4H.js +6 -0
  9. package/dist/{agent-session-store-22GKA7O4.js.map → agent-session-store-2LQEPS4H.js.map} +1 -1
  10. package/dist/agent-session-store-IOH6BREF.cjs +23 -0
  11. package/dist/{agent-session-store-WP6NGDVX.cjs.map → agent-session-store-IOH6BREF.cjs.map} +1 -1
  12. package/dist/auth/index.cjs +15 -15
  13. package/dist/auth/index.js +3 -3
  14. package/dist/{batch-N2XDYZED.js → batch-7IGV2OKA.js} +8 -8
  15. package/dist/{batch-N2XDYZED.js.map → batch-7IGV2OKA.js.map} +1 -1
  16. package/dist/{batch-VFR2MAUE.cjs → batch-FIWQZ3JD.cjs} +14 -14
  17. package/dist/{batch-VFR2MAUE.cjs.map → batch-FIWQZ3JD.cjs.map} +1 -1
  18. package/dist/{chunk-AT2PESXB.cjs → chunk-2UYAL4N7.cjs} +5 -5
  19. package/dist/chunk-2UYAL4N7.cjs.map +1 -0
  20. package/dist/{chunk-K2BQQ445.js → chunk-3GQYMKVJ.js} +3 -3
  21. package/dist/{chunk-K2BQQ445.js.map → chunk-3GQYMKVJ.js.map} +1 -1
  22. package/dist/{chunk-YSTXFWQE.cjs → chunk-3HL43XBD.cjs} +4 -4
  23. package/dist/{chunk-YSTXFWQE.cjs.map → chunk-3HL43XBD.cjs.map} +1 -1
  24. package/dist/{chunk-XESYJ4JC.js → chunk-3VX7JHJI.js} +7 -7
  25. package/dist/{chunk-XESYJ4JC.js.map → chunk-3VX7JHJI.js.map} +1 -1
  26. package/dist/{chunk-6XQLTQB6.cjs → chunk-3YCNBOX7.cjs} +3 -3
  27. package/dist/{chunk-6XQLTQB6.cjs.map → chunk-3YCNBOX7.cjs.map} +1 -1
  28. package/dist/{chunk-CHKV2L2Y.cjs → chunk-46YYJIHL.cjs} +30 -30
  29. package/dist/chunk-46YYJIHL.cjs.map +1 -0
  30. package/dist/{chunk-73IITAF7.js → chunk-4C37ELQL.js} +9 -9
  31. package/dist/{chunk-73IITAF7.js.map → chunk-4C37ELQL.js.map} +1 -1
  32. package/dist/{chunk-AGO5S5WD.js → chunk-4E4D6H77.js} +3 -3
  33. package/dist/{chunk-AGO5S5WD.js.map → chunk-4E4D6H77.js.map} +1 -1
  34. package/dist/{chunk-R35ZJAYT.cjs → chunk-4JF52NED.cjs} +12 -12
  35. package/dist/{chunk-R35ZJAYT.cjs.map → chunk-4JF52NED.cjs.map} +1 -1
  36. package/dist/{chunk-INVEGVGO.js → chunk-4TA47IK4.js} +8 -8
  37. package/dist/{chunk-INVEGVGO.js.map → chunk-4TA47IK4.js.map} +1 -1
  38. package/dist/{chunk-MLGETTYX.js → chunk-4YUIYSZO.js} +6 -6
  39. package/dist/{chunk-MLGETTYX.js.map → chunk-4YUIYSZO.js.map} +1 -1
  40. package/dist/{chunk-RZL2W4C3.js → chunk-5L7S2VOL.js} +5 -5
  41. package/dist/{chunk-RZL2W4C3.js.map → chunk-5L7S2VOL.js.map} +1 -1
  42. package/dist/{chunk-3WKWBYPO.cjs → chunk-6EHOJLJ3.cjs} +20 -20
  43. package/dist/chunk-6EHOJLJ3.cjs.map +1 -0
  44. package/dist/{chunk-XOU3CL7S.cjs → chunk-6HQFPX7N.cjs} +28 -28
  45. package/dist/chunk-6HQFPX7N.cjs.map +1 -0
  46. package/dist/{chunk-3E3VSMB6.cjs → chunk-6XT5LAZG.cjs} +58 -58
  47. package/dist/chunk-6XT5LAZG.cjs.map +1 -0
  48. package/dist/{chunk-R427EOZE.cjs → chunk-7EFT6N5C.cjs} +13 -13
  49. package/dist/{chunk-R427EOZE.cjs.map → chunk-7EFT6N5C.cjs.map} +1 -1
  50. package/dist/{chunk-L7V4DDIE.cjs → chunk-7VNFOGRD.cjs} +12 -12
  51. package/dist/chunk-7VNFOGRD.cjs.map +1 -0
  52. package/dist/{chunk-YKNBTHMD.js → chunk-AQ23NII7.js} +3 -3
  53. package/dist/{chunk-YKNBTHMD.js.map → chunk-AQ23NII7.js.map} +1 -1
  54. package/dist/{chunk-O2RCS3SJ.js → chunk-ATGSV4GS.js} +4 -4
  55. package/dist/{chunk-O2RCS3SJ.js.map → chunk-ATGSV4GS.js.map} +1 -1
  56. package/dist/{chunk-H7HD6RXO.cjs → chunk-AW72G4TC.cjs} +5 -5
  57. package/dist/{chunk-H7HD6RXO.cjs.map → chunk-AW72G4TC.cjs.map} +1 -1
  58. package/dist/{chunk-M4U24U6G.js → chunk-AZK3QM36.js} +5 -5
  59. package/dist/{chunk-M4U24U6G.js.map → chunk-AZK3QM36.js.map} +1 -1
  60. package/dist/{chunk-QK2ERTO3.js → chunk-BH6M2DGV.js} +4 -4
  61. package/dist/{chunk-QK2ERTO3.js.map → chunk-BH6M2DGV.js.map} +1 -1
  62. package/dist/{chunk-26UQG242.cjs → chunk-BTGYRM4J.cjs} +264 -264
  63. package/dist/chunk-BTGYRM4J.cjs.map +1 -0
  64. package/dist/{chunk-ZQWRUJHE.js → chunk-CG64VPPU.js} +50 -50
  65. package/dist/{chunk-ZQWRUJHE.js.map → chunk-CG64VPPU.js.map} +1 -1
  66. package/dist/{chunk-CBBT42VX.js → chunk-CMDM4VF6.js} +3 -3
  67. package/dist/{chunk-CBBT42VX.js.map → chunk-CMDM4VF6.js.map} +1 -1
  68. package/dist/{chunk-OLJOI4LK.js → chunk-CN732Z5C.js} +4 -4
  69. package/dist/{chunk-OLJOI4LK.js.map → chunk-CN732Z5C.js.map} +1 -1
  70. package/dist/{chunk-SETHRLQS.cjs → chunk-D3BL3EEB.cjs} +9 -9
  71. package/dist/chunk-D3BL3EEB.cjs.map +1 -0
  72. package/dist/{chunk-LCCT5ZXJ.js → chunk-DB5RYCXX.js} +13 -13
  73. package/dist/{chunk-LCCT5ZXJ.js.map → chunk-DB5RYCXX.js.map} +1 -1
  74. package/dist/{chunk-SV63WTA2.js → chunk-DBH2WA2U.js} +4 -4
  75. package/dist/{chunk-SV63WTA2.js.map → chunk-DBH2WA2U.js.map} +1 -1
  76. package/dist/{chunk-XE3CAY6Z.cjs → chunk-DEHPRORL.cjs} +4 -4
  77. package/dist/{chunk-XE3CAY6Z.cjs.map → chunk-DEHPRORL.cjs.map} +1 -1
  78. package/dist/{chunk-UKMBRMGT.js → chunk-DGO4LPLP.js} +4 -4
  79. package/dist/{chunk-UKMBRMGT.js.map → chunk-DGO4LPLP.js.map} +1 -1
  80. package/dist/{chunk-RS7YQR4X.cjs → chunk-EBX6XUN7.cjs} +7 -7
  81. package/dist/{chunk-RS7YQR4X.cjs.map → chunk-EBX6XUN7.cjs.map} +1 -1
  82. package/dist/chunk-EDIYR4VR.cjs +18 -0
  83. package/dist/{chunk-SPEN7RJU.cjs.map → chunk-EDIYR4VR.cjs.map} +1 -1
  84. package/dist/{chunk-QGDPMM3C.js → chunk-EF5IONLL.js} +5 -5
  85. package/dist/{chunk-QGDPMM3C.js.map → chunk-EF5IONLL.js.map} +1 -1
  86. package/dist/{chunk-MSW7LB2V.cjs → chunk-EOWIUDKG.cjs} +5 -5
  87. package/dist/{chunk-MSW7LB2V.cjs.map → chunk-EOWIUDKG.cjs.map} +1 -1
  88. package/dist/{chunk-L7JPXZ2C.cjs → chunk-ER3BF23R.cjs} +19 -19
  89. package/dist/{chunk-L7JPXZ2C.cjs.map → chunk-ER3BF23R.cjs.map} +1 -1
  90. package/dist/{chunk-BNEUB52I.cjs → chunk-ERBKPA2N.cjs} +4 -4
  91. package/dist/{chunk-BNEUB52I.cjs.map → chunk-ERBKPA2N.cjs.map} +1 -1
  92. package/dist/{chunk-4QCJAJAG.js → chunk-F54PXZIA.js} +5 -5
  93. package/dist/{chunk-4QCJAJAG.js.map → chunk-F54PXZIA.js.map} +1 -1
  94. package/dist/{chunk-2XWAYCFM.cjs → chunk-FBT2SF2S.cjs} +12 -12
  95. package/dist/{chunk-2XWAYCFM.cjs.map → chunk-FBT2SF2S.cjs.map} +1 -1
  96. package/dist/{chunk-AUH2EVWY.cjs → chunk-FZSPVIFK.cjs} +16 -16
  97. package/dist/chunk-FZSPVIFK.cjs.map +1 -0
  98. package/dist/{chunk-CYWOJA6B.js → chunk-GA27FFT5.js} +3 -3
  99. package/dist/{chunk-CYWOJA6B.js.map → chunk-GA27FFT5.js.map} +1 -1
  100. package/dist/{chunk-HWMGR3HA.js → chunk-GEQLHBJM.js} +6 -6
  101. package/dist/{chunk-HWMGR3HA.js.map → chunk-GEQLHBJM.js.map} +1 -1
  102. package/dist/{chunk-IJ7M6GOG.cjs → chunk-GKERJ52A.cjs} +4 -4
  103. package/dist/{chunk-IJ7M6GOG.cjs.map → chunk-GKERJ52A.cjs.map} +1 -1
  104. package/dist/{chunk-NEH3BPFD.cjs → chunk-HI5TJWQE.cjs} +19 -19
  105. package/dist/{chunk-NEH3BPFD.cjs.map → chunk-HI5TJWQE.cjs.map} +1 -1
  106. package/dist/{chunk-ZOFRNNZD.cjs → chunk-IZV72OEI.cjs} +11 -11
  107. package/dist/chunk-IZV72OEI.cjs.map +1 -0
  108. package/dist/{chunk-KU5O7WPK.js → chunk-JD3EKKKB.js} +4 -4
  109. package/dist/{chunk-KU5O7WPK.js.map → chunk-JD3EKKKB.js.map} +1 -1
  110. package/dist/{chunk-DFBWYETS.js → chunk-JRP2W2DR.js} +3 -3
  111. package/dist/{chunk-DFBWYETS.js.map → chunk-JRP2W2DR.js.map} +1 -1
  112. package/dist/{chunk-26GI3OYA.js → chunk-JRQJMZKY.js} +13 -13
  113. package/dist/{chunk-26GI3OYA.js.map → chunk-JRQJMZKY.js.map} +1 -1
  114. package/dist/{chunk-YQ3XC6C2.cjs → chunk-JVH3NNJ3.cjs} +13 -13
  115. package/dist/chunk-JVH3NNJ3.cjs.map +1 -0
  116. package/dist/{chunk-VWYFGE27.cjs → chunk-KC2HKUPT.cjs} +56 -56
  117. package/dist/chunk-KC2HKUPT.cjs.map +1 -0
  118. package/dist/{chunk-PDOXYXWX.cjs → chunk-KDJTECE6.cjs} +4 -4
  119. package/dist/{chunk-PDOXYXWX.cjs.map → chunk-KDJTECE6.cjs.map} +1 -1
  120. package/dist/{chunk-QD6B6W6I.js → chunk-L2KC2G7H.js} +5 -5
  121. package/dist/{chunk-QD6B6W6I.js.map → chunk-L2KC2G7H.js.map} +1 -1
  122. package/dist/{chunk-3BBTHFGJ.js → chunk-L5B7EWWH.js} +5 -5
  123. package/dist/{chunk-3BBTHFGJ.js.map → chunk-L5B7EWWH.js.map} +1 -1
  124. package/dist/{chunk-X7CE7Y5W.js → chunk-LG4JCJEI.js} +11 -11
  125. package/dist/{chunk-X7CE7Y5W.js.map → chunk-LG4JCJEI.js.map} +1 -1
  126. package/dist/{chunk-2HXTNVLM.js → chunk-LSURFRJA.js} +6 -6
  127. package/dist/{chunk-2HXTNVLM.js.map → chunk-LSURFRJA.js.map} +1 -1
  128. package/dist/{chunk-55LLQFHW.cjs → chunk-MJGY3E3C.cjs} +4 -4
  129. package/dist/{chunk-55LLQFHW.cjs.map → chunk-MJGY3E3C.cjs.map} +1 -1
  130. package/dist/{chunk-EQ5IDL6W.cjs → chunk-MKS5FFH5.cjs} +15 -15
  131. package/dist/chunk-MKS5FFH5.cjs.map +1 -0
  132. package/dist/{chunk-WM646HEN.js → chunk-MTNCJ7MQ.js} +6 -6
  133. package/dist/{chunk-WM646HEN.js.map → chunk-MTNCJ7MQ.js.map} +1 -1
  134. package/dist/{chunk-SA6K24NB.cjs → chunk-MXJJMP4U.cjs} +7 -7
  135. package/dist/chunk-MXJJMP4U.cjs.map +1 -0
  136. package/dist/{chunk-FTXY4D44.cjs → chunk-N2ORTDSO.cjs} +20 -20
  137. package/dist/chunk-N2ORTDSO.cjs.map +1 -0
  138. package/dist/{chunk-7YUPSBDV.cjs → chunk-NDXZXGVP.cjs} +6 -6
  139. package/dist/{chunk-7YUPSBDV.cjs.map → chunk-NDXZXGVP.cjs.map} +1 -1
  140. package/dist/{chunk-3UMPP553.cjs → chunk-NMRNE6QX.cjs} +11 -11
  141. package/dist/{chunk-3UMPP553.cjs.map → chunk-NMRNE6QX.cjs.map} +1 -1
  142. package/dist/{chunk-PKRPV3R7.js → chunk-NO6AG22P.js} +6 -6
  143. package/dist/{chunk-PKRPV3R7.js.map → chunk-NO6AG22P.js.map} +1 -1
  144. package/dist/{chunk-NK5EOTDY.js → chunk-OIOSY5G6.js} +3 -3
  145. package/dist/{chunk-NK5EOTDY.js.map → chunk-OIOSY5G6.js.map} +1 -1
  146. package/dist/{chunk-RGVMJU57.js → chunk-P7B64NFK.js} +8 -8
  147. package/dist/{chunk-RGVMJU57.js.map → chunk-P7B64NFK.js.map} +1 -1
  148. package/dist/{chunk-TDED5XES.js → chunk-PCPYTBVV.js} +6 -6
  149. package/dist/chunk-PCPYTBVV.js.map +1 -0
  150. package/dist/{chunk-FBIDOOJM.cjs → chunk-PDFSLD5P.cjs} +6 -6
  151. package/dist/{chunk-FBIDOOJM.cjs.map → chunk-PDFSLD5P.cjs.map} +1 -1
  152. package/dist/{chunk-YMVTUV5K.js → chunk-PISZRLES.js} +5 -5
  153. package/dist/{chunk-YMVTUV5K.js.map → chunk-PISZRLES.js.map} +1 -1
  154. package/dist/{chunk-BUUUWQMB.cjs → chunk-PNL63WDP.cjs} +4 -4
  155. package/dist/{chunk-BUUUWQMB.cjs.map → chunk-PNL63WDP.cjs.map} +1 -1
  156. package/dist/{chunk-VNRNZ3WI.js → chunk-PSMWZYW6.js} +4 -4
  157. package/dist/{chunk-VNRNZ3WI.js.map → chunk-PSMWZYW6.js.map} +1 -1
  158. package/dist/{chunk-5645PMVU.cjs → chunk-PXYINWBC.cjs} +20 -20
  159. package/dist/chunk-PXYINWBC.cjs.map +1 -0
  160. package/dist/{chunk-RTDVSHJR.cjs → chunk-Q4UOCMAO.cjs} +5 -5
  161. package/dist/{chunk-RTDVSHJR.cjs.map → chunk-Q4UOCMAO.cjs.map} +1 -1
  162. package/dist/{chunk-5IRDK5BC.js → chunk-QH6MWGOA.js} +4 -4
  163. package/dist/{chunk-5IRDK5BC.js.map → chunk-QH6MWGOA.js.map} +1 -1
  164. package/dist/{chunk-3LMVJTNJ.js → chunk-QPUKIZOT.js} +3 -3
  165. package/dist/{chunk-3LMVJTNJ.js.map → chunk-QPUKIZOT.js.map} +1 -1
  166. package/dist/{chunk-SWALPLFQ.cjs → chunk-RTCO3USA.cjs} +16 -16
  167. package/dist/chunk-RTCO3USA.cjs.map +1 -0
  168. package/dist/{chunk-SAGRF4IB.js → chunk-S2CMEJ5F.js} +3 -3
  169. package/dist/{chunk-SAGRF4IB.js.map → chunk-S2CMEJ5F.js.map} +1 -1
  170. package/dist/{chunk-VZGE7NAI.js → chunk-S5ERB3CH.js} +3 -3
  171. package/dist/{chunk-VZGE7NAI.js.map → chunk-S5ERB3CH.js.map} +1 -1
  172. package/dist/{chunk-XJ3WU5CZ.js → chunk-S7IZEVXX.js} +6 -6
  173. package/dist/{chunk-XJ3WU5CZ.js.map → chunk-S7IZEVXX.js.map} +1 -1
  174. package/dist/{chunk-Q7UG242V.js → chunk-TIYQDJFK.js} +3 -3
  175. package/dist/{chunk-Q7UG242V.js.map → chunk-TIYQDJFK.js.map} +1 -1
  176. package/dist/{chunk-POBZXULR.cjs → chunk-TTNJOM5W.cjs} +16 -16
  177. package/dist/{chunk-POBZXULR.cjs.map → chunk-TTNJOM5W.cjs.map} +1 -1
  178. package/dist/{chunk-VCQ37TC5.js → chunk-TTXRNCXY.js} +3 -3
  179. package/dist/{chunk-VCQ37TC5.js.map → chunk-TTXRNCXY.js.map} +1 -1
  180. package/dist/{chunk-3HA7N2BB.cjs → chunk-TYKBAKAS.cjs} +5 -5
  181. package/dist/{chunk-3HA7N2BB.cjs.map → chunk-TYKBAKAS.cjs.map} +1 -1
  182. package/dist/{chunk-A77UMVMD.cjs → chunk-UMCCYXFZ.cjs} +8 -8
  183. package/dist/{chunk-A77UMVMD.cjs.map → chunk-UMCCYXFZ.cjs.map} +1 -1
  184. package/dist/{chunk-3GTN4HOO.js → chunk-UNP4NCMZ.js} +3 -3
  185. package/dist/{chunk-3GTN4HOO.js.map → chunk-UNP4NCMZ.js.map} +1 -1
  186. package/dist/{chunk-BPL5CVZ5.js → chunk-VFT63FJF.js} +3 -3
  187. package/dist/{chunk-BPL5CVZ5.js.map → chunk-VFT63FJF.js.map} +1 -1
  188. package/dist/{chunk-3KIUY67P.cjs → chunk-VHY6NVCJ.cjs} +30 -30
  189. package/dist/chunk-VHY6NVCJ.cjs.map +1 -0
  190. package/dist/{chunk-TRPRTZEH.cjs → chunk-VT3NWHFH.cjs} +6 -6
  191. package/dist/{chunk-TRPRTZEH.cjs.map → chunk-VT3NWHFH.cjs.map} +1 -1
  192. package/dist/{chunk-FJWQP6EE.js → chunk-WJ6OGKAO.js} +3 -3
  193. package/dist/{chunk-FJWQP6EE.js.map → chunk-WJ6OGKAO.js.map} +1 -1
  194. package/dist/{chunk-FLDHYF5C.cjs → chunk-X2XLSE2N.cjs} +9 -9
  195. package/dist/chunk-X2XLSE2N.cjs.map +1 -0
  196. package/dist/{chunk-UDAKAE4Z.cjs → chunk-X4ZYEZPD.cjs} +12 -12
  197. package/dist/chunk-X4ZYEZPD.cjs.map +1 -0
  198. package/dist/{chunk-QG4SXZ2A.cjs → chunk-XR6O6G3B.cjs} +27 -27
  199. package/dist/chunk-XR6O6G3B.cjs.map +1 -0
  200. package/dist/{chunk-BWYC7RZG.cjs → chunk-XTQWTVVI.cjs} +11 -11
  201. package/dist/chunk-XTQWTVVI.cjs.map +1 -0
  202. package/dist/{chunk-MLJDW2YK.js → chunk-YSGS57DA.js} +4 -4
  203. package/dist/{chunk-MLJDW2YK.js.map → chunk-YSGS57DA.js.map} +1 -1
  204. package/dist/{chunk-KCM3RMKR.js → chunk-YUQNHLKN.js} +8 -8
  205. package/dist/{chunk-KCM3RMKR.js.map → chunk-YUQNHLKN.js.map} +1 -1
  206. package/dist/{chunk-P7QYG4RZ.cjs → chunk-Z5MB2HAN.cjs} +8 -8
  207. package/dist/{chunk-P7QYG4RZ.cjs.map → chunk-Z5MB2HAN.cjs.map} +1 -1
  208. package/dist/{chunk-HJ2LV464.js → chunk-ZUWVO442.js} +4 -4
  209. package/dist/{chunk-HJ2LV464.js.map → chunk-ZUWVO442.js.map} +1 -1
  210. package/dist/{compact-session-CHBJOYWP.cjs → compact-session-5DWFHMW4.cjs} +21 -21
  211. package/dist/{compact-session-CHBJOYWP.cjs.map → compact-session-5DWFHMW4.cjs.map} +1 -1
  212. package/dist/{compact-session-F3J3FMEU.js → compact-session-AL65PEMX.js} +12 -12
  213. package/dist/{compact-session-F3J3FMEU.js.map → compact-session-AL65PEMX.js.map} +1 -1
  214. package/dist/context/index.cjs +11 -11
  215. package/dist/context/index.js +6 -6
  216. package/dist/context-4XSD2V3G.js +7 -0
  217. package/dist/{context-7EBZST3L.js.map → context-4XSD2V3G.js.map} +1 -1
  218. package/dist/context-ZX2VBGSX.cjs +24 -0
  219. package/dist/{context-4RSI3AXT.cjs.map → context-ZX2VBGSX.cjs.map} +1 -1
  220. package/dist/cron.cjs +40 -40
  221. package/dist/cron.js +39 -39
  222. package/dist/eval.cjs +51 -51
  223. package/dist/eval.cjs.map +1 -1
  224. package/dist/eval.js +41 -41
  225. package/dist/{executor-THUXNAFR.js → executor-ZHIUSHRV.js} +7 -7
  226. package/dist/{executor-THUXNAFR.js.map → executor-ZHIUSHRV.js.map} +1 -1
  227. package/dist/{executor-5QL5AXIZ.cjs → executor-ZTLJZ5LK.cjs} +24 -24
  228. package/dist/{executor-5QL5AXIZ.cjs.map → executor-ZTLJZ5LK.cjs.map} +1 -1
  229. package/dist/filesystem/index.cjs +14 -14
  230. package/dist/filesystem/index.cjs.map +1 -1
  231. package/dist/filesystem/index.js +4 -4
  232. package/dist/{fork-agent-S2EPIML7.js → fork-agent-BHVTALT5.js} +3 -3
  233. package/dist/{fork-agent-S2EPIML7.js.map → fork-agent-BHVTALT5.js.map} +1 -1
  234. package/dist/{fork-agent-WAEQI2DL.cjs → fork-agent-DCOPPXM2.cjs} +4 -4
  235. package/dist/{fork-agent-WAEQI2DL.cjs.map → fork-agent-DCOPPXM2.cjs.map} +1 -1
  236. package/dist/fs-session-store-EZ32TFGB.js +11 -0
  237. package/dist/{fs-session-store-MYQEVUFL.js.map → fs-session-store-EZ32TFGB.js.map} +1 -1
  238. package/dist/fs-session-store-G664LDDN.cjs +20 -0
  239. package/dist/{fs-session-store-CYNTEPJZ.cjs.map → fs-session-store-G664LDDN.cjs.map} +1 -1
  240. package/dist/generate-object-JFZTK567.cjs +20 -0
  241. package/dist/{generate-object-A5F576IT.cjs.map → generate-object-JFZTK567.cjs.map} +1 -1
  242. package/dist/{generate-object-TBDOBBYW.js → generate-object-RPBXY2U3.js} +4 -4
  243. package/dist/{generate-object-TBDOBBYW.js.map → generate-object-RPBXY2U3.js.map} +1 -1
  244. package/dist/index-manager-2MJEEN2O.js +18 -0
  245. package/dist/{index-manager-NF2WRLOU.js.map → index-manager-2MJEEN2O.js.map} +1 -1
  246. package/dist/index-manager-CT6MMG7S.cjs +27 -0
  247. package/dist/{index-manager-2KH75BRW.cjs.map → index-manager-CT6MMG7S.cjs.map} +1 -1
  248. package/dist/index.cjs +130 -130
  249. package/dist/index.cjs.map +1 -1
  250. package/dist/index.js +56 -56
  251. package/dist/{inject-session-LC2TROHM.js → inject-session-E2SZ4A35.js} +6 -6
  252. package/dist/{inject-session-LC2TROHM.js.map → inject-session-E2SZ4A35.js.map} +1 -1
  253. package/dist/{inject-session-T4RXANG3.cjs → inject-session-QZULG65O.cjs} +8 -8
  254. package/dist/{inject-session-T4RXANG3.cjs.map → inject-session-QZULG65O.cjs.map} +1 -1
  255. package/dist/internal/memory/adapters/index.cjs +4 -4
  256. package/dist/internal/memory/adapters/index.js +3 -3
  257. package/dist/internal/memory/storage/index.cjs +45 -45
  258. package/dist/internal/memory/storage/index.js +9 -9
  259. package/dist/internal/persistence/index.cjs +22 -22
  260. package/dist/internal/persistence/index.js +6 -6
  261. package/dist/internal/security/index.cjs +9 -9
  262. package/dist/internal/security/index.js +2 -2
  263. package/dist/mcp-auth.cjs +8 -8
  264. package/dist/mcp-auth.js +3 -3
  265. package/dist/models.cjs +30 -30
  266. package/dist/models.cjs.map +1 -1
  267. package/dist/models.js +8 -8
  268. package/dist/{oauth-transaction-store-U34YLEGP.js → oauth-transaction-store-QQBWGNE2.js} +3 -3
  269. package/dist/{oauth-transaction-store-U34YLEGP.js.map → oauth-transaction-store-QQBWGNE2.js.map} +1 -1
  270. package/dist/{oauth-transaction-store-OMX436YB.cjs → oauth-transaction-store-YF7WOA6B.cjs} +10 -10
  271. package/dist/{oauth-transaction-store-OMX436YB.cjs.map → oauth-transaction-store-YF7WOA6B.cjs.map} +1 -1
  272. package/dist/path-safety.cjs +9 -9
  273. package/dist/path-safety.js +2 -2
  274. package/dist/persistence.cjs +41 -41
  275. package/dist/persistence.cjs.map +1 -1
  276. package/dist/persistence.js +11 -11
  277. package/dist/project.cjs +7 -7
  278. package/dist/project.cjs.map +1 -1
  279. package/dist/project.js +4 -4
  280. package/dist/providers.cjs +6 -6
  281. package/dist/providers.js +4 -4
  282. package/dist/{registry-5TDAF7RK.js → registry-DOYBR237.js} +6 -6
  283. package/dist/{registry-5TDAF7RK.js.map → registry-DOYBR237.js.map} +1 -1
  284. package/dist/{registry-W7TSCLQO.cjs → registry-PB7JFVUJ.cjs} +14 -14
  285. package/dist/{registry-W7TSCLQO.cjs.map → registry-PB7JFVUJ.cjs.map} +1 -1
  286. package/dist/sandbox/index.cjs +41 -41
  287. package/dist/sandbox/index.cjs.map +1 -1
  288. package/dist/sandbox/index.js +7 -7
  289. package/dist/sanitize/index.cjs +2 -2
  290. package/dist/sanitize/index.js +1 -1
  291. package/dist/server/auth/index.cjs +9 -9
  292. package/dist/server/auth/index.cjs.map +1 -1
  293. package/dist/server/auth/index.js +4 -4
  294. package/dist/{session-transcript-7TZ6HXSX.cjs → session-transcript-EBVGLZ6B.cjs} +17 -17
  295. package/dist/{session-transcript-7TZ6HXSX.cjs.map → session-transcript-EBVGLZ6B.cjs.map} +1 -1
  296. package/dist/{session-transcript-BSHZYYY6.js → session-transcript-GU2VE7JX.js} +4 -4
  297. package/dist/{session-transcript-BSHZYYY6.js.map → session-transcript-GU2VE7JX.js.map} +1 -1
  298. package/dist/skills.cjs +7 -7
  299. package/dist/skills.js +4 -4
  300. package/dist/stream-object-3AU7QDHT.js +7 -0
  301. package/dist/{stream-object-EKM4WGTI.js.map → stream-object-3AU7QDHT.js.map} +1 -1
  302. package/dist/stream-object-SLGR2KIA.cjs +20 -0
  303. package/dist/{stream-object-AS4YYM4B.cjs.map → stream-object-SLGR2KIA.cjs.map} +1 -1
  304. package/dist/subagents-loader-4PQS7ULK.cjs +16 -0
  305. package/dist/{subagents-loader-KLWF4QPD.cjs.map → subagents-loader-4PQS7ULK.cjs.map} +1 -1
  306. package/dist/subagents-loader-CPFVLWLH.js +7 -0
  307. package/dist/{subagents-loader-SXETS2F2.js.map → subagents-loader-CPFVLWLH.js.map} +1 -1
  308. package/dist/subagents-loader.cjs +4 -4
  309. package/dist/subagents-loader.js +3 -3
  310. package/dist/subagents.cjs +2 -2
  311. package/dist/subagents.js +1 -1
  312. package/dist/task-store.cjs +5 -5
  313. package/dist/task-store.js +2 -2
  314. package/dist/workflow.cjs +28 -28
  315. package/dist/workflow.js +5 -5
  316. package/package.json +1 -1
  317. package/dist/agent-66U5QCPF.js +0 -63
  318. package/dist/agent-CB27KF6O.cjs +0 -72
  319. package/dist/agent-session-store-22GKA7O4.js +0 -6
  320. package/dist/agent-session-store-WP6NGDVX.cjs +0 -23
  321. package/dist/chunk-26UQG242.cjs.map +0 -1
  322. package/dist/chunk-3E3VSMB6.cjs.map +0 -1
  323. package/dist/chunk-3KIUY67P.cjs.map +0 -1
  324. package/dist/chunk-3WKWBYPO.cjs.map +0 -1
  325. package/dist/chunk-5645PMVU.cjs.map +0 -1
  326. package/dist/chunk-AT2PESXB.cjs.map +0 -1
  327. package/dist/chunk-AUH2EVWY.cjs.map +0 -1
  328. package/dist/chunk-BWYC7RZG.cjs.map +0 -1
  329. package/dist/chunk-CHKV2L2Y.cjs.map +0 -1
  330. package/dist/chunk-EQ5IDL6W.cjs.map +0 -1
  331. package/dist/chunk-FLDHYF5C.cjs.map +0 -1
  332. package/dist/chunk-FTXY4D44.cjs.map +0 -1
  333. package/dist/chunk-L7V4DDIE.cjs.map +0 -1
  334. package/dist/chunk-QG4SXZ2A.cjs.map +0 -1
  335. package/dist/chunk-SA6K24NB.cjs.map +0 -1
  336. package/dist/chunk-SETHRLQS.cjs.map +0 -1
  337. package/dist/chunk-SPEN7RJU.cjs +0 -18
  338. package/dist/chunk-SWALPLFQ.cjs.map +0 -1
  339. package/dist/chunk-TDED5XES.js.map +0 -1
  340. package/dist/chunk-UDAKAE4Z.cjs.map +0 -1
  341. package/dist/chunk-VWYFGE27.cjs.map +0 -1
  342. package/dist/chunk-XOU3CL7S.cjs.map +0 -1
  343. package/dist/chunk-YQ3XC6C2.cjs.map +0 -1
  344. package/dist/chunk-ZOFRNNZD.cjs.map +0 -1
  345. package/dist/context-4RSI3AXT.cjs +0 -24
  346. package/dist/context-7EBZST3L.js +0 -7
  347. package/dist/fs-session-store-CYNTEPJZ.cjs +0 -20
  348. package/dist/fs-session-store-MYQEVUFL.js +0 -11
  349. package/dist/generate-object-A5F576IT.cjs +0 -20
  350. package/dist/index-manager-2KH75BRW.cjs +0 -27
  351. package/dist/index-manager-NF2WRLOU.js +0 -18
  352. package/dist/stream-object-AS4YYM4B.cjs +0 -20
  353. package/dist/stream-object-EKM4WGTI.js +0 -7
  354. package/dist/subagents-loader-KLWF4QPD.cjs +0 -16
  355. package/dist/subagents-loader-SXETS2F2.js +0 -7
@@ -1,9 +1,9 @@
1
1
  'use strict';
2
2
 
3
3
  var chunkRNXXYF22_cjs = require('./chunk-RNXXYF22.cjs');
4
- var os = require('os');
5
- var path = require('path');
6
- var fs = require('fs');
4
+ var node_os = require('node:os');
5
+ var node_path = require('node:path');
6
+ var node_fs = require('node:fs');
7
7
 
8
8
  var THEOKIT_DIR_LITERAL = ".theokit";
9
9
  var CLAUDE_DIR_NAME = ".claude";
@@ -79,8 +79,8 @@ function reportUndeclaredSources(cwd, declared) {
79
79
  );
80
80
  for (const adapter of FOREIGN_SOURCES) {
81
81
  if (declaredKinds.has(adapter.kind)) continue;
82
- const dir = path.join(cwd, adapter.dirName);
83
- if (!fs.existsSync(dir)) continue;
82
+ const dir = node_path.join(cwd, adapter.dirName);
83
+ if (!node_fs.existsSync(dir)) continue;
84
84
  if (reported.has(dir)) continue;
85
85
  reported.add(dir);
86
86
  chunkRNXXYF22_cjs.diagFailure(
@@ -96,16 +96,16 @@ function getTheokitHome(cwd) {
96
96
  if (override !== void 0 && override.length > 0) {
97
97
  return override;
98
98
  }
99
- return path.join(cwd, THEOKIT_DIR_LITERAL);
99
+ return node_path.join(cwd, THEOKIT_DIR_LITERAL);
100
100
  }
101
101
  function theokitConfigRoot(cwd) {
102
- return path.join(cwd, THEOKIT_DIR_LITERAL);
102
+ return node_path.join(cwd, THEOKIT_DIR_LITERAL);
103
103
  }
104
104
  function projectConfigRoots(cwd, sources, surface) {
105
105
  const own = nativeAdmitsSurface(sources, surface) ? [theokitConfigRoot(cwd)] : [];
106
106
  return [
107
107
  ...own,
108
- ...adaptersForSurface(foreignOnly(sources), surface).map((a) => path.join(cwd, a.dirName))
108
+ ...adaptersForSurface(foreignOnly(sources), surface).map((a) => node_path.join(cwd, a.dirName))
109
109
  ];
110
110
  }
111
111
  var NATIVE_KIND = "theokit";
@@ -118,14 +118,14 @@ function foreignOnly(sources) {
118
118
  return sources.filter((s) => (typeof s === "string" ? s : s.kind) !== NATIVE_KIND);
119
119
  }
120
120
  function pluginBundleRoots(cwd, sources) {
121
- return projectConfigRoots(cwd, sources, "plugins").map((root) => path.join(root, "plugins"));
121
+ return projectConfigRoots(cwd, sources, "plugins").map((root) => node_path.join(root, "plugins"));
122
122
  }
123
123
  function getProfilesRoot() {
124
- return path.join(os.homedir(), THEOKIT_DIR_LITERAL, "profiles");
124
+ return node_path.join(node_os.homedir(), THEOKIT_DIR_LITERAL, "profiles");
125
125
  }
126
126
  function displayTheokitHome(cwd) {
127
127
  const resolved = getTheokitHome(cwd);
128
- const home = os.homedir();
128
+ const home = node_os.homedir();
129
129
  if (resolved === home) return "~";
130
130
  if (resolved.startsWith(`${home}/`)) {
131
131
  return `~${resolved.slice(home.length)}`;
@@ -145,5 +145,5 @@ exports.projectConfigRoots = projectConfigRoots;
145
145
  exports.reportUndeclaredSources = reportUndeclaredSources;
146
146
  exports.theokitConfigRoot = theokitConfigRoot;
147
147
  exports.undefinedVariablesIn = undefinedVariablesIn;
148
- //# sourceMappingURL=chunk-YQ3XC6C2.cjs.map
149
- //# sourceMappingURL=chunk-YQ3XC6C2.cjs.map
148
+ //# sourceMappingURL=chunk-JVH3NNJ3.cjs.map
149
+ //# sourceMappingURL=chunk-JVH3NNJ3.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/internal/runtime/compat/foreign-config-sources.ts","../src/internal/persistence/paths.ts"],"names":["join","existsSync","diagFailure","homedir"],"mappings":";;;;;;;AAmDO,IAAM,mBAAA,GAAsB;AAG5B,IAAM,eAAA,GAAkB;AA+BxB,IAAM,aAAA,GAAqC;AAAA,EAChD,IAAA,EAAM,SAAA;AAAA,EACN,OAAA,EAAS,mBAAA;AAAA,EACT,UAAA,EAAY,CAAC,GAAA,MAAS,EAAE,qBAAqB,GAAA,EAAI;AACnD,CAAA;AAWO,IAAM,kBAAA,GAA0C;AAAA,EACrD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D,EAAA,MAAM,QAAA,GAAW,eAAe,GAAG,CAAA;AACnC,EAAA,MAAM,OAAOA,eAAA,EAAQ;AACrB,EAAA,IAAI,QAAA,KAAa,MAAM,OAAO,GAAA;AAC9B,EAAA,IAAI,QAAA,CAAS,UAAA,CAAW,CAAA,EAAG,IAAI,GAAG,CAAA,EAAG;AACnC,IAAA,OAAO,CAAA,CAAA,EAAI,QAAA,CAAS,KAAA,CAAM,IAAA,CAAK,MAAM,CAAC,CAAA,CAAA;AAAA,EACxC;AACA,EAAA,OAAO,QAAA;AACT","file":"chunk-JVH3NNJ3.cjs","sourcesContent":["import { existsSync } from \"node:fs\";\nimport { join } from \"node:path\";\nimport type { CompatSurface } from \"../../../types/agent.js\";\nimport { diagFailure } from \"../../diagnostics.js\";\n\n/*\n * The foreign configuration dialects this SDK can read, and what each one PRESUMES.\n *\n * ## Why a registry and not a list of directory names\n *\n * `projectConfigRoots` returned `[\".theokit\", \".claude\"]` — two paths — and that shape is what\n * usetheokit/theokit-sdk#522 fell through. A path says WHERE a file lives. It does not say how the\n * file is parsed, and it does not say what runtime the commands inside it were written against.\n *\n * Claude Code defines `$CLAUDE_PROJECT_DIR` for the hook commands in its `settings.json`, and its\n * documentation tells authors to reach project files through it — an absolute path would break for\n * every other person on the team, so the shape that failed here is the shape upstream recommends.\n * This SDK read the file and ran the command without the variable. `sh` expands an unset variable to\n * the empty string, so\n *\n * bash \"$CLAUDE_PROJECT_DIR/.claude/hooks/guard.sh\" became bash \"/.claude/hooks/guard.sh\"\n *\n * which does not exist, which a hook runner correctly reads as a refusal. Every turn denied, in any\n * repository that also had Claude Code set up, with a message naming a file that was present and\n * executable all along.\n *\n * Importing a format means accepting the contract that format presumes. An adapter is where that\n * contract is written down, so the next dialect (`.codex/` is the obvious one) declares its own\n * instead of inheriting a hole.\n *\n * ## What an adapter deliberately does NOT do\n *\n * It does not make the foreign source trusted, and it does not make its hooks permissive: a script\n * that exits non-zero is still a refusal. It supplies the variables the format's authors were\n * entitled to assume, and nothing else — `env` here is merged over the scrubbed inherit policy by\n * `spawnAndCollect`, so it adds names rather than widening what a child can see.\n *\n * @internal\n */\n\n/**\n * The project config directory literal.\n *\n * Renamed from `THEOKIT_DIR_NAME` in #410. Sharing a name with the (now removed) sovereign env var\n * was the MECHANISM of that defect, not scenery: every grep for the variable landed on that const\n * and looked answered, so \"is it read?\" returned five hits and nobody checked what they were.\n *\n * Lives here rather than in `persistence/paths.ts` because a directory name is one third of what a\n * dialect is — the other two being how it parses and what it presumes — and splitting the three\n * across two modules is what let the third go unwritten.\n */\nexport const THEOKIT_DIR_LITERAL = \".theokit\";\n\n/** The Claude Code CLI's project configuration directory. */\nexport const CLAUDE_DIR_NAME = \".claude\";\n\n/** A configuration dialect this SDK understands. `theokit` is native; the rest are foreign. */\nexport interface ConfigSourceAdapter {\n /** Stable identifier, and what a consumer names to opt in. */\n readonly kind: string;\n /** The project-relative directory the dialect keeps its configuration in. */\n readonly dirName: string;\n /**\n * Variables the dialect's own runtime defines for commands it executes, under the dialect's own\n * documented spellings.\n *\n * Every dialect gets a project-directory variable, because none of them can locate a\n * project-relative script without one — the inherited environment says where the PROCESS is, and\n * a hook that has to depend on the process cwd is the dependency #522 removed for the foreign\n * side. Fixing one dialect and leaving the other different was the half-fix.\n *\n * The SPELLINGS differ on purpose: a ported script reaches for the name its own docs use, and a\n * native one for this runtime's.\n */\n runtimeEnv(cwd: string): Record<string, string>;\n}\n\n/**\n * The native source. Always read, never opted into, always first for precedence.\n *\n * `THEOKIT_PROJECT_DIR` is the native counterpart of `CLAUDE_PROJECT_DIR` below. This used to be\n * `{}`, on the reasoning that a `.theokit/` hook \"is written against THIS runtime and inherits it\n * already\" — true of the runtime's BEHAVIOUR and not of a project PATH. Nothing in the inherited\n * environment says where the project is, so a native hook had to depend on the process cwd.\n */\nexport const NATIVE_SOURCE: ConfigSourceAdapter = {\n kind: \"theokit\",\n dirName: THEOKIT_DIR_LITERAL,\n runtimeEnv: (cwd) => ({ THEOKIT_PROJECT_DIR: cwd }),\n};\n\n/**\n * Claude Code.\n *\n * `CLAUDE_PROJECT_DIR` is the documented way for a hook command in `settings.json` to reach a file\n * in the project. Only that one variable is supplied: `$CLAUDE_PLUGIN_ROOT` and the rest of that\n * runtime's surface are NOT defined here, because supplying a name whose value this SDK would have\n * to invent is worse than leaving it unset — an invented root sends a script somewhere real and\n * wrong, where an unset one fails loudly.\n */\nexport const CLAUDE_CODE_SOURCE: ConfigSourceAdapter = {\n kind: \"claude-code\",\n dirName: CLAUDE_DIR_NAME,\n runtimeEnv: (cwd) => ({ CLAUDE_PROJECT_DIR: cwd }),\n};\n\nconst FOREIGN_SOURCES: readonly ConfigSourceAdapter[] = [CLAUDE_CODE_SOURCE];\n\nconst BY_DIR_NAME: ReadonlyMap<string, ConfigSourceAdapter> = new Map(\n [NATIVE_SOURCE, ...FOREIGN_SOURCES].map((a) => [a.dirName, a]),\n);\n\n/**\n * The adapters a caller declared, in declaration order, skipping any name that names no adapter.\n *\n * An unknown name is DROPPED rather than turned into `<cwd>/<name>`: a typo must fail closed. Making\n * a directory out of an unrecognised string would import a dialect nothing knows how to parse — and\n * the whole reason this exists is that a directory name was never enough to describe a dialect.\n */\nexport function adaptersFor(kinds: readonly string[]): ConfigSourceAdapter[] {\n const byKind = new Map(FOREIGN_SOURCES.map((a) => [a.kind, a]));\n const out: ConfigSourceAdapter[] = [];\n for (const kind of kinds) {\n const adapter = byKind.get(kind);\n if (adapter !== undefined && !out.includes(adapter)) out.push(adapter);\n }\n return out;\n}\n\n/**\n * #586 — re-exported from `types/agent.ts` rather than declared here, which is what it used to be.\n *\n * Two independent declarations of one public contract: `AgentOptions.local.compatSources` was typed\n * by the public one, `persistence/paths.ts` by this one, and neither imported the other. Measured:\n * adding a member to one alone produced ZERO type errors, because structurally-identical unions\n * compare equal and the two halves would simply stop agreeing about which surfaces exist.\n *\n * Neither direction of that drift raises anything. Widen the public type and a caller declares a\n * surface the admission logic ignores; widen this one and the loader admits a surface no public\n * caller can name. Both produce a declaration that reads as honoured and is not — the failure #524\n * exists to prevent, one layer down.\n *\n * `types/` is a leaf by design (theokit#146), so the public declaration is the one that stays and\n * this module imports it. The docblock that lived here — a skill is text entering the system prompt,\n * a hook is command execution, a plugin is code loading — is on the declaration in `types/agent.ts`.\n */\nexport type { CompatSurface };\n\n/**\n * The runtime list. A type cannot be enumerated at runtime, so this is the one place the members are\n * written twice by necessity — and {@link assertCompatSurfacesExhaustive} below is what stops that\n * second copy from being a second source of truth.\n *\n * `as const satisfies` rather than an annotation, and the difference is the whole guard: annotating\n * it `readonly CompatSurface[]` widens each entry back to `CompatSurface`, so the check below\n * compares a type against itself and passes on any drift. Measured on the first attempt — a member\n * added to the public type alone produced zero errors. `satisfies` keeps the literals while still\n * rejecting an entry that is not a surface, which is both directions at once.\n */\nconst COMPAT_SURFACES = [\n \"context\",\n \"hooks\",\n \"plugins\",\n \"skills\",\n \"subagents\",\n] as const satisfies readonly CompatSurface[];\n\n/**\n * Compile-time guard: adding a member to {@link CompatSurface} without adding it to\n * {@link COMPAT_SURFACES} fails `tsc` here.\n *\n * Never called. It exists so the pairing is checked by the compiler rather than by whoever\n * remembers — which is the entire lesson of #586, applied to the copy that could not be removed.\n */\nfunction assertCompatSurfacesExhaustive(surface: CompatSurface): (typeof COMPAT_SURFACES)[number] {\n return surface;\n}\nvoid assertCompatSurfacesExhaustive;\n\n/**\n * A declared foreign source: a bare kind, or a kind with the surfaces it may be read for.\n */\nexport type CompatSourceDeclaration =\n | string\n | { readonly kind: string; readonly import?: readonly string[] };\n\n/**\n * The adapters admitted to ONE surface.\n *\n * Three rules, and each one fails closed:\n *\n * - A bare string admits every surface. It is what `5.0.0-next.1` published, so narrowing it\n * silently would turn a working opt-in into a no-op — the exact defect #524 is about, one level\n * up.\n * - An object with no `import` admits nothing. The issue's own rule, and safe to apply strictly\n * because the object form is new and nobody can be depending on it.\n * - An unrecognised surface name is dropped rather than matched loosely, for the same reason an\n * unrecognised KIND is dropped in {@link adaptersFor}: a typo must not silently widen access.\n */\nexport function adaptersForSurface(\n sources: readonly CompatSourceDeclaration[],\n surface: CompatSurface,\n): ConfigSourceAdapter[] {\n const admitted: string[] = [];\n for (const source of sources) {\n if (typeof source === \"string\") {\n admitted.push(source);\n continue;\n }\n const wanted = source.import ?? [];\n if (wanted.some((s) => s === surface && COMPAT_SURFACES.includes(s as CompatSurface))) {\n admitted.push(source.kind);\n }\n }\n return adaptersFor(admitted);\n}\n\n/**\n * The adapter whose directory an absolute config path sits under, or `undefined` for a path that\n * belongs to no registered dialect.\n *\n * Matched on the path SEGMENT rather than with `includes`, so a workspace that happens to live under\n * `/home/me/.claude-backups/repo` does not read as a Claude Code source.\n */\nexport function adapterForConfigPath(path: string): ConfigSourceAdapter | undefined {\n for (const segment of path.split(/[\\\\/]/)) {\n const adapter = BY_DIR_NAME.get(segment);\n if (adapter !== undefined) return adapter;\n }\n return undefined;\n}\n\n/**\n * Variable references in a shell command that nothing will define.\n *\n * The second half of #522, and the half that cost the debugging session. `sh` expands an unset\n * variable to the empty string and says nothing, so the failure surfaces ten characters later as a\n * path: `bash: /.claude/hooks/guard.sh: No such file or directory` — which reads as \"your script is\n * missing\" while the script is present and executable. Nothing in that message contains the name of\n * the variable that was actually missing, so the reader looks in the wrong place.\n *\n * Checked against BOTH the process environment and the variables the dialect supplies, because\n * either is a legitimate source: a hook may reasonably use `$HOME`.\n *\n * ## What it deliberately does not try to be\n *\n * This is not a shell parser. It finds `$NAME` and `${NAME}` outside single quotes, which is the\n * shape a config file's hook commands take. It does NOT understand `${NAME:-default}` (a default\n * makes the variable optional, so it is not reported), assignments earlier in the same command, or\n * variables a sourced script exports. A false NEGATIVE there costs the old behaviour — the confusing\n * path error — and a false positive would deny a hook that would have worked, so the parse errs\n * toward silence and the check only ever ADDS a name to a failure that already happened.\n */\nexport function undefinedVariablesIn(\n command: string,\n supplied: Readonly<Record<string, string>>,\n env: Readonly<Record<string, string | undefined>> = process.env,\n): string[] {\n // Single-quoted spans are literal in `sh`: `echo '$FOO'` prints the dollar sign.\n const unquoted = command.replace(/'[^']*'/g, \" \");\n const names = new Set<string>();\n for (const match of unquoted.matchAll(\n /\\$\\{([A-Za-z_][A-Za-z0-9_]*)\\}|\\$([A-Za-z_][A-Za-z0-9_]*)/g,\n )) {\n const name = match[1] ?? match[2];\n if (name === undefined) continue;\n if (name in supplied) continue;\n if (env[name] !== undefined) continue;\n names.add(name);\n }\n return [...names];\n}\n\n/**\n * Workspaces already reported, so repeated agent construction in one process says it once.\n *\n * Keyed by the resolved directory rather than by dialect kind, so a long-lived host that drives\n * several workspaces still reports each of them.\n */\nconst reported = new Set<string>();\n\n/**\n * Reports a foreign configuration directory that exists in the workspace and was not declared.\n *\n * ## Why the flip needs a voice\n *\n * Before #524 a `.claude/` was read with no opt-in; after it, the same directory is ignored. From\n * inside the repository the two states are indistinguishable — the hook file is there, it is\n * executable, and it does not run. The only remaining way to learn why is a CHANGELOG entry for a\n * version the reader may not know they crossed.\n *\n * ## Why `diagFailure` rather than `diag` (#563)\n *\n * This used `diag`, on the reasoning that ignoring an undeclared directory is not a failure and\n * that a repository which does NOT want the import should not pay a stderr line for behaving as\n * instructed. The reasoning was sound and rested on a premise nobody checked: that a host would\n * have installed a sink.\n *\n * Measured against the published `5.0.0`. `diag` returns without doing anything when no sink is\n * installed. The SDK installs none — `currentSink()` reads a `globalThis` slot only\n * `setDiagnosticsSink` fills. Neither observable host installs one either: `theocode` renamed the\n * key, and `theokit` exports `installDiagnosticSink` and never calls it. Two hosts out of two, and\n * the SDK itself. So the message the CHANGELOG promised — \"says so once, on the diagnostics\n * channel\" — reached nobody, while the consumer lost hooks, skills, subagents and plugins.\n *\n * A mitigation announced in release notes for a silent loss of capability is not a diagnostic. It\n * is the error path of the breaking change itself, and `diagFailure` exists for exactly the message\n * that must not be swallowed.\n *\n * The cost the old reasoning named is real and is now paid: a repository that wants the directory\n * ignored sees a line. What makes that acceptable — ONCE per directory per process, not per turn\n * (`reported` below); and before #524 that repository was having `.claude/` imported anyway, so the\n * line it now sees confirms the fix it wanted. The asymmetry is one line of text against silently\n * losing four subsystems.\n *\n * A host that installs a sink still owns its render surface: `diagFailure` prefers the sink and\n * only falls back to stderr when there is none.\n *\n * NOT solved here: there is no way to say \"I know, and I want none\". `compatSources: []` would be\n * the natural spelling, but `resolveCompatSources` collapses it into the same `[]` an absent option\n * produces, so this function cannot tell them apart. If the noise turns out to matter, threading\n * that distinction through is the shape of the fix.\n */\nexport function reportUndeclaredSources(\n cwd: string,\n declared: readonly CompatSourceDeclaration[],\n): void {\n // A kind named with a NARROW import list has still been declared: the consumer knows the\n // directory is there and chose which surfaces to admit. Warning them anyway would be the noise\n // that gets a warning ignored, and this one has exactly one job — telling somebody who does NOT\n // know the directory is being skipped.\n const declaredKinds = new Set(\n adaptersFor(declared.map((d) => (typeof d === \"string\" ? d : d.kind))).map((a) => a.kind),\n );\n for (const adapter of FOREIGN_SOURCES) {\n if (declaredKinds.has(adapter.kind)) continue;\n const dir = join(cwd, adapter.dirName);\n if (!existsSync(dir)) continue;\n if (reported.has(dir)) continue;\n reported.add(dir);\n // THE FILE IS NAMED FIRST because it is the entry point this message's reader can use.\n //\n // #524 gives the declaration two entry points for one shape: `.theokit/config.json`'s\n // `compat.adapters`, and `local.compatSources` in code. Until this change the warning named\n // only the second — and `local` is an argument the SDK's EMBEDDER passes, not something the\n // person reading the line can reach. Reported by the `theocode` session against 5.0.1: a user\n // of a host that embeds this SDK is told to pass an option that does not exist on their\n // surface, which is advice that is true about the mechanism and unusable as an action.\n //\n // The file is writable by anyone holding the workspace, which is exactly who sees this line.\n //\n // WHAT THIS LINE CANNOT KNOW, and it is a real limit rather than a caveat for form's sake. It\n // reports one fact: this SDK is ignoring the directory because nothing declared it. A HOST\n // embedding the SDK may be withholding the same directory for its own reasons — `theocode`\n // gates repository configuration on a trust posture — and the SDK cannot see that gate.\n //\n // So in a host that is also withholding, following this advice makes the warning stop and\n // changes nothing the user can do. That silence is honest about the SDK (it did stop ignoring\n // the directory) and uninformative about the outcome. Measured by the `theocode` session with\n // the control that settles it: a NATIVE `.theokit/` hook does not fire there either, so the\n // host's gate — not this declaration — is what holds the capability back.\n //\n // Nothing here can fix that. If a host ever gains a way to say \"I am withholding this too\",\n // this is the line where that belongs.\n diagFailure(\n `[theokit] ${adapter.dirName}/ is present but not declared, so its hooks, skills, subagents, ` +\n `plugins and rules are ignored. To read it, add ` +\n `{\"compat\":{\"adapters\":[\"${adapter.kind}\"]}} to .theokit/config.json — or, if you embed ` +\n `this SDK, pass local: { compatSources: [\"${adapter.kind}\"] } ` +\n `(usetheokit/theokit-sdk#524).\\n`,\n );\n }\n}\n","/**\n * Path resolution for SDK state files (ADR D60).\n *\n * Theokit anchors state at `<cwd>/.theokit/` by default (per-cwd). An\n * optional `THEOKIT_HOME` environment variable overrides this, enabling\n * test isolation, profile switching, and multi-tenant deployments.\n *\n * Rules:\n * - `getTheokitHome(cwd)` is the canonical resolver **for cwd-anchored state**. Never hardcode\n * `path.join(cwd, \".theokit\")` in callers — use this function so tests\n * and overrides stay consistent.\n *\n * M94 — this comment said \"the ONLY canonical resolver\", and stopped being true: the\n * transcript gained `transcriptRoot()`, which is **home-anchored** (`~/.theokit`) with the same\n * `THEOKIT_HOME` override. The two defaults differ on purpose — unifying would move the\n * transcript of everyone who does NOT set the variable, which is a data migration and not a\n * re-export.\n *\n * A consequence worth writing down: **without `THEOKIT_HOME` the state stays split in two**\n * — registry in `<cwd>/.theokit`, transcript in `~/.theokit`. M94 unifies only for those who set\n * the variable. Unifying both defaults is another milestone's work.\n * - `getProfilesRoot()` is intentionally home-anchored (not affected by\n * `THEOKIT_HOME`) so `theokit profile list` discovers all profiles\n * regardless of which is active.\n * - `displayTheokitHome(cwd)` returns a human-readable path for logs.\n *\n * @internal\n */\n\nimport { homedir } from \"node:os\";\nimport { join } from \"node:path\";\n\nimport {\n adaptersForSurface,\n type CompatSourceDeclaration,\n type CompatSurface,\n THEOKIT_DIR_LITERAL,\n} from \"../runtime/compat/foreign-config-sources.js\";\n\n// The directory names live with the dialect registry that owns them — a name is one third of what a\n// configuration dialect is, and keeping the three together is what stops the next one shipping\n// without its runtime contract (#522).\n\n/**\n * Resolve the directory cwd-anchored SDK state lives in.\n *\n * `THEOKIT_HOME` wins when it is set and not blank after trimming; the trimmed value is used, and\n * it is used VERBATIM — it is not resolved against `cwd`, so a relative value stays relative and\n * `.theokit` is not appended to it. Otherwise the answer is `<cwd>/.theokit`.\n *\n * The environment is read on every call, so a change to the variable takes effect immediately\n * rather than being frozen at import.\n *\n * This creates nothing and checks nothing: the returned path may not exist, and the caller owns\n * the `mkdir`. Call it instead of writing `join(cwd, \".theokit\")` by hand, or the override stops\n * working for that one call site and tests silently touch the real home.\n *\n * Not the whole story about where state lives — the transcript is home-anchored via\n * `transcriptRoot()`, honoring the same variable but defaulting to `~/.theokit`. With\n * `THEOKIT_HOME` unset, state is genuinely split between two roots.\n *\n * Semver-exempt: reachable via the `@theokit/sdk/internal/persistence` sub-path, which the package\n * declares in `exports` but does NOT cover with its semver contract.\n */\nexport function getTheokitHome(cwd: string): string {\n const override = process.env.THEOKIT_HOME?.trim();\n if (override !== undefined && override.length > 0) {\n return override;\n }\n return join(cwd, THEOKIT_DIR_LITERAL);\n}\n\n/**\n * The project's own configuration root: `<cwd>/.theokit`, always — never `THEOKIT_HOME`.\n *\n * `THEOKIT_HOME` relocates cwd-anchored SDK STATE (sessions, credentials). A project's\n * CONFIGURATION belongs to the repository: hooks, MCP servers, context sources, subagents, the\n * personality a project declares, all committed to git and shared by a team. Following the\n * override for any of them would move where a project's declared capabilities come from — a\n * behaviour change wearing the costume of a refactor, which is exactly what this function exists\n * to make impossible to do by accident: every config-class reader calls this instead of writing\n * `join(cwd, \".theokit\")` by hand.\n *\n * NOT for the `.claude/`-style foreign roots {@link adaptersForSurface} adds — those are additive,\n * opt-in, and each has its own directory name.\n *\n * Semver-exempt: reachable via the `@theokit/sdk/internal/persistence` sub-path, which the package\n * declares in `exports` but does NOT cover with its semver contract.\n */\nexport function theokitConfigRoot(cwd: string): string {\n return join(cwd, THEOKIT_DIR_LITERAL);\n}\n\n/**\n * Every directory a project's configuration may be read from, in precedence order.\n *\n * `.theokit` first — via {@link theokitConfigRoot}, so it is NEVER affected by `THEOKIT_HOME` for\n * the reason documented there — then `.claude`. The order is the whole contract: a project that\n * declares a skill, agent or rule in both means the explicit namespace to win, and a caller merging\n * these roots must therefore keep the FIRST occurrence of a name rather than the last.\n *\n * `.claude` is read because the formats already agree and only the location did not. Measured\n * 2026-08-26: the SKILL.md frontmatter this SDK requires (`name` + `description`) is exactly what\n * the CLI writes, its hook config is the same JSON shape, and 59 of the CLI's agent declarations\n * parse here unchanged. A repository set up for the CLI was failing on the directory name alone.\n *\n * NOT a rename of `.theokit`, and not a migration. Both are read, so nothing that works today stops\n * working — which is why this returns a LIST and not a single resolved answer.\n *\n * Creates nothing and checks nothing; either path may not exist, and the caller owns that.\n *\n * Semver-exempt: reachable via the `@theokit/sdk/internal/persistence` sub-path, which the package\n * declares in `exports` but does NOT cover with its semver contract.\n */\nexport function projectConfigRoots(\n cwd: string,\n sources: readonly CompatSourceDeclaration[],\n surface: CompatSurface,\n): string[] {\n const own = nativeAdmitsSurface(sources, surface) ? [theokitConfigRoot(cwd)] : [];\n return [\n ...own,\n ...adaptersForSurface(foreignOnly(sources), surface).map((a) => join(cwd, a.dirName)),\n ];\n}\n\n/** The kind a consumer names to declare THIS package's own root. */\nconst NATIVE_KIND = \"theokit\";\n\n/**\n * #631 — whether the native root contributes `surface`.\n *\n * Undeclared means every surface, which is what this function returned unconditionally before and\n * is what every existing caller gets. A consumer that names the kind is opting into the same\n * per-surface contract a foreign dialect already has, and the defaults match on purpose: a bare\n * string admits everything, an object admits exactly what its `import` lists. Two vocabularies that\n * look identical and disagree about the default would be worse than one.\n *\n * The asymmetry this closes had a measured cost. `hookConfigCandidates` reads `settings.json` from\n * every root, so a consumer keeping its own configuration in `.theokit/settings.json` had that\n * file's `hooks` key executed by this package, and `settingSources` gave it no way to decline: it\n * grants a foreign dialect per SOURCE, not per surface, so dropping `claude-code` to avoid its\n * hooks would also drop its skills, agents and rules.\n */\nfunction nativeAdmitsSurface(\n sources: readonly CompatSourceDeclaration[],\n surface: CompatSurface,\n): boolean {\n const declared = sources.filter((s) => (typeof s === \"string\" ? s : s.kind) === NATIVE_KIND);\n if (declared.length === 0) return true;\n return declared.some((s) => (typeof s === \"string\" ? true : (s.import ?? []).includes(surface)));\n}\n\n/**\n * The native declaration is consumed here and must not reach `adaptersForSurface`, which resolves\n * kinds to FOREIGN adapters. It would be dropped there as unrecognised — harmlessly, today — but\n * relying on that would make this behaviour depend on another function failing to find something,\n * which is the kind of coupling that breaks the moment an adapter of that name is added.\n */\nfunction foreignOnly(\n sources: readonly CompatSourceDeclaration[],\n): readonly CompatSourceDeclaration[] {\n return sources.filter((s) => (typeof s === \"string\" ? s : s.kind) !== NATIVE_KIND);\n}\n\n/**\n * Every directory that may hold a plugin BUNDLE contributed by the Claude Code CLI.\n *\n * A CLI plugin is not a JS entry point — it is a folder whose `skills/` and `agents/` are what it\n * exists to provide. Measured 2026-08-26 on an installed one: seven agents and three skills beside\n * a manifest in `.claude-plugin/plugin.json`. Parsing that manifest and stopping there produced a\n * plugin that loaded and did nothing.\n *\n * Project-scoped deliberately. The CLI also keeps plugins under `~/.claude/plugins/cache`, behind\n * its own installer and enable/disable state — reproducing that is an installation system, not\n * reading a project's configuration, and guessing at someone's enablement would run code they\n * turned off.\n */\nexport function pluginBundleRoots(\n cwd: string,\n sources: readonly CompatSourceDeclaration[],\n): string[] {\n // Always the `plugins` surface, including when the caller wants the SKILLS a bundle carries.\n // A bundle is code, and its skills arrive attached to it: admitting `skills` alone must not\n // reach inside a foreign plugin directory, or the narrower permission would silently grant the\n // wider one. `skills-manager` and `subagents-loader` both read bundle contents and both go\n // through here, so the rule holds in one place rather than three.\n return projectConfigRoots(cwd, sources, \"plugins\").map((root) => join(root, \"plugins\"));\n}\n\n/**\n * The directory holding every profile: always `~/.theokit/profiles`, from `os.homedir()`.\n *\n * Deliberately NOT affected by `THEOKIT_HOME`, which is the one thing to remember about it. If it\n * followed the override, a session pointed at one profile would only be able to see that profile,\n * and `theokit profile list` could never enumerate the rest. Profiles are the thing the override\n * switches between, so their index cannot live behind it.\n *\n * Takes no `cwd` for the same reason. Creates nothing; the path may not exist.\n *\n * Semver-exempt: reachable via the `@theokit/sdk/internal/persistence` sub-path, which the package\n * declares in `exports` but does NOT cover with its semver contract.\n */\nexport function getProfilesRoot(): string {\n return join(homedir(), THEOKIT_DIR_LITERAL, \"profiles\");\n}\n\n/**\n * The same path `getTheokitHome(cwd)` returns, shortened for display: the home directory prefix\n * collapses to `~`, so `/home/ada/.theokit` prints as `~/.theokit`.\n *\n * For humans only — log lines, CLI output, error messages. The result is NOT a usable path: `~`\n * is a shell convention that `fs` does not expand, so passing this to a filesystem call resolves\n * a literal directory named `~` relative to the process cwd. Use `getTheokitHome` for anything\n * that touches disk.\n *\n * Collapsing is a prefix match on the home directory followed by a literal `/`, so a sibling like\n * `/home/adalovelace` is left alone even though `/home/ada` is a string prefix of it. A path\n * outside the home directory comes back unchanged — and so does a Windows path, where the\n * separator is a backslash and the prefix test therefore never matches.\n *\n * Semver-exempt: reachable via the `@theokit/sdk/internal/persistence` sub-path, which the package\n * declares in `exports` but does NOT cover with its semver contract.\n */\nexport function displayTheokitHome(cwd: string): string {\n const resolved = getTheokitHome(cwd);\n const home = homedir();\n if (resolved === home) return \"~\";\n if (resolved.startsWith(`${home}/`)) {\n return `~${resolved.slice(home.length)}`;\n }\n return resolved;\n}\n"]}
@@ -1,21 +1,21 @@
1
1
  'use strict';
2
2
 
3
3
  var chunkKRD3GQAA_cjs = require('./chunk-KRD3GQAA.cjs');
4
- var chunkSWALPLFQ_cjs = require('./chunk-SWALPLFQ.cjs');
5
- var chunk3KIUY67P_cjs = require('./chunk-3KIUY67P.cjs');
6
- var chunk3WKWBYPO_cjs = require('./chunk-3WKWBYPO.cjs');
7
- var chunkAT2PESXB_cjs = require('./chunk-AT2PESXB.cjs');
4
+ var chunkRTCO3USA_cjs = require('./chunk-RTCO3USA.cjs');
5
+ var chunkVHY6NVCJ_cjs = require('./chunk-VHY6NVCJ.cjs');
6
+ var chunk6EHOJLJ3_cjs = require('./chunk-6EHOJLJ3.cjs');
7
+ var chunk2UYAL4N7_cjs = require('./chunk-2UYAL4N7.cjs');
8
8
  var chunkMHUOVS5I_cjs = require('./chunk-MHUOVS5I.cjs');
9
9
  var chunkU3DW3WDE_cjs = require('./chunk-U3DW3WDE.cjs');
10
- var chunkZOFRNNZD_cjs = require('./chunk-ZOFRNNZD.cjs');
10
+ var chunkIZV72OEI_cjs = require('./chunk-IZV72OEI.cjs');
11
11
  var chunkCEGU5AVD_cjs = require('./chunk-CEGU5AVD.cjs');
12
12
  var chunkRNXXYF22_cjs = require('./chunk-RNXXYF22.cjs');
13
- var os = require('os');
14
- var path = require('path');
15
- var promises = require('fs/promises');
16
- var crypto = require('crypto');
17
- var fs = require('fs');
18
- var module$1 = require('module');
13
+ var node_os = require('node:os');
14
+ var node_path = require('node:path');
15
+ var promises = require('node:fs/promises');
16
+ var node_crypto = require('node:crypto');
17
+ var node_fs = require('node:fs');
18
+ var node_module = require('node:module');
19
19
 
20
20
  var _documentCurrentScript = typeof document !== 'undefined' ? document.currentScript : null;
21
21
  // src/internal/memory/storage/fact-ceiling.ts
@@ -40,19 +40,19 @@ function asMemoryRoot(dir) {
40
40
  return dir;
41
41
  }
42
42
  function projectMemoryDir(cwd) {
43
- return path.join(cwd, ...DEFAULT_SUBPATH);
43
+ return node_path.join(cwd, ...DEFAULT_SUBPATH);
44
44
  }
45
45
  function claudeProjectMemoryDir(cwd) {
46
46
  const home = process.env.CLAUDE_CONFIG_DIR?.trim();
47
- const root = home !== void 0 && home.length > 0 ? home : path.join(os.homedir(), ".claude");
48
- return path.join(root, "projects", chunk3WKWBYPO_cjs.encodeProjectDir(chunkSWALPLFQ_cjs.findGitRoot(cwd) ?? cwd), "memory");
47
+ const root = home !== void 0 && home.length > 0 ? home : node_path.join(node_os.homedir(), ".claude");
48
+ return node_path.join(root, "projects", chunk6EHOJLJ3_cjs.encodeProjectDir(chunkRTCO3USA_cjs.findGitRoot(cwd) ?? cwd), "memory");
49
49
  }
50
50
  function resolveMemoryRoot(cwd, config) {
51
51
  const declared = config?.directory;
52
52
  if (declared === void 0) return projectMemoryDir(cwd);
53
53
  const trimmed = declared.trim();
54
- if (trimmed.startsWith("~/")) return path.join(os.homedir(), trimmed.slice(2));
55
- if (trimmed.length === 0 || !path.isAbsolute(trimmed)) {
54
+ if (trimmed.startsWith("~/")) return node_path.join(node_os.homedir(), trimmed.slice(2));
55
+ if (trimmed.length === 0 || !node_path.isAbsolute(trimmed)) {
56
56
  throw new chunkCEGU5AVD_cjs.ConfigurationError(
57
57
  `memory.directory must be an absolute path or start with "~/". Received: ${JSON.stringify(declared)}`,
58
58
  { code: "invalid_memory_directory" }
@@ -76,10 +76,10 @@ function indexBudgetWarning(index, root) {
76
76
  }
77
77
  function claudeProjectMemoryDirFor(root) {
78
78
  const home = process.env.CLAUDE_CONFIG_DIR?.trim();
79
- const claudeHome = home !== void 0 && home.length > 0 ? home : path.join(os.homedir(), ".claude");
80
- const prefix = path.join(claudeHome, "projects");
81
- const isUnderProjects = root.startsWith(`${prefix}${path.sep}`);
82
- return isUnderProjects && root.endsWith(`${path.sep}memory`) ? root : "";
79
+ const claudeHome = home !== void 0 && home.length > 0 ? home : node_path.join(node_os.homedir(), ".claude");
80
+ const prefix = node_path.join(claudeHome, "projects");
81
+ const isUnderProjects = root.startsWith(`${prefix}${node_path.sep}`);
82
+ return isUnderProjects && root.endsWith(`${node_path.sep}memory`) ? root : "";
83
83
  }
84
84
  function memoryIndexRoot(cwd, store) {
85
85
  return claudeProjectMemoryDirFor(store) === "" ? store : projectMemoryDir(cwd);
@@ -96,12 +96,12 @@ function memoryReadRoots(cwd, config) {
96
96
  var MEMORY_KINDS = ["user", "feedback", "project", "reference"];
97
97
  function legacyMemoryJsonPath(cwd, config) {
98
98
  if (config.storePath !== void 0) {
99
- return path.resolve(cwd, config.storePath);
99
+ return node_path.resolve(cwd, config.storePath);
100
100
  }
101
- const namespace = chunk3KIUY67P_cjs.sanitizeIdentifier(config.namespace ?? "default");
102
- const scope = chunk3KIUY67P_cjs.sanitizeIdentifier(config.scope ?? "agent", { maxLen: 16 });
103
- const userId = chunk3KIUY67P_cjs.sanitizeIdentifier(config.userId ?? "default");
104
- return chunk3KIUY67P_cjs.safePathJoin(cwd, ".theokit", "memory", namespace, `${scope}-${userId}.json`);
101
+ const namespace = chunkVHY6NVCJ_cjs.sanitizeIdentifier(config.namespace ?? "default");
102
+ const scope = chunkVHY6NVCJ_cjs.sanitizeIdentifier(config.scope ?? "agent", { maxLen: 16 });
103
+ const userId = chunkVHY6NVCJ_cjs.sanitizeIdentifier(config.userId ?? "default");
104
+ return chunkVHY6NVCJ_cjs.safePathJoin(cwd, ".theokit", "memory", namespace, `${scope}-${userId}.json`);
105
105
  }
106
106
 
107
107
  // src/internal/memory/storage/memory-file.ts
@@ -220,7 +220,7 @@ function slugForFact(text) {
220
220
  if (slug.length === 0) {
221
221
  slug = text.toLowerCase().replace(/[^a-z0-9]+/g, "-").replace(/^-+|-+$/g, "").slice(0, MAX_SLUG_LENGTH).replace(/-+$/, "");
222
222
  }
223
- return SAFE_SLUG.test(slug) ? slug : chunk3KIUY67P_cjs.safeFilenameForId(text);
223
+ return SAFE_SLUG.test(slug) ? slug : chunkVHY6NVCJ_cjs.safeFilenameForId(text);
224
224
  }
225
225
  function titleForFact(text) {
226
226
  const words = topicWords(text);
@@ -356,10 +356,10 @@ var MEMORY_MD_HEADER = "# Memory Index\n";
356
356
  var FACTS_HEADING = "## Facts";
357
357
  var MAX_NAME_VARIANTS = 50;
358
358
  function memoryMdPath(root) {
359
- return path.join(root, "MEMORY.md");
359
+ return node_path.join(root, "MEMORY.md");
360
360
  }
361
361
  function notesDir(root) {
362
- return path.join(root, "notes");
362
+ return node_path.join(root, "notes");
363
363
  }
364
364
  function byNaturalName(a, b) {
365
365
  const split = (f) => {
@@ -395,7 +395,7 @@ async function readMemoryFilesIn(dir) {
395
395
  }
396
396
  async function readLegacyFactsSectionIn(dir) {
397
397
  try {
398
- return parseFactsSection(await promises.readFile(path.join(dir, "MEMORY.md"), "utf8"));
398
+ return parseFactsSection(await promises.readFile(node_path.join(dir, "MEMORY.md"), "utf8"));
399
399
  } catch {
400
400
  return [];
401
401
  }
@@ -405,10 +405,10 @@ async function countFactsIn(dir) {
405
405
  let count = 0;
406
406
  for (const entry of entries) {
407
407
  if (!entry.endsWith(".md") || entry === "MEMORY.md") continue;
408
- const raw = await unlessMissing(promises.readFile(path.join(dir, entry), "utf8"));
408
+ const raw = await unlessMissing(promises.readFile(node_path.join(dir, entry), "utf8"));
409
409
  if (raw !== void 0 && parseMemoryFile(raw) !== void 0) count += 1;
410
410
  }
411
- const index = await unlessMissing(promises.readFile(path.join(dir, "MEMORY.md"), "utf8"));
411
+ const index = await unlessMissing(promises.readFile(node_path.join(dir, "MEMORY.md"), "utf8"));
412
412
  return index === void 0 ? count : count + parseFactsSection(index).length;
413
413
  }
414
414
  async function unlessMissing(read) {
@@ -432,7 +432,7 @@ async function readMemoryFileIn(dir, entry) {
432
432
  if (!entry.endsWith(".md") || entry === "MEMORY.md") return void 0;
433
433
  let raw;
434
434
  try {
435
- raw = await promises.readFile(path.join(dir, entry), "utf8");
435
+ raw = await promises.readFile(node_path.join(dir, entry), "utf8");
436
436
  } catch {
437
437
  return void 0;
438
438
  }
@@ -472,8 +472,8 @@ function appendFactToMarkdown(cwd, fact, targetDir = projectMemoryDir(cwd), opti
472
472
  }
473
473
  var CEILING_LOCK = { retries: 10 };
474
474
  async function withCeilingLock(targetDir, fn) {
475
- const lockTarget = path.resolve(targetDir);
476
- await promises.mkdir(path.dirname(lockTarget), { recursive: true });
475
+ const lockTarget = node_path.resolve(targetDir);
476
+ await promises.mkdir(node_path.dirname(lockTarget), { recursive: true });
477
477
  return chunkMHUOVS5I_cjs.withFileLock(lockTarget, fn, CEILING_LOCK);
478
478
  }
479
479
  async function writeFactFile(targetDir, fact, text, maxFacts) {
@@ -484,8 +484,8 @@ async function writeFactFile(targetDir, fact, text, maxFacts) {
484
484
  await assertRoomForNewFact(targetDir, maxFacts, observations);
485
485
  await promises.mkdir(targetDir, { recursive: true });
486
486
  const description = fact.description?.trim() ?? text;
487
- await chunkZOFRNNZD_cjs.replaceFileAtomic(
488
- path.join(targetDir, `${name}.md`),
487
+ await chunkIZV72OEI_cjs.replaceFileAtomic(
488
+ node_path.join(targetDir, `${name}.md`),
489
489
  renderMemoryFile({
490
490
  name,
491
491
  description,
@@ -496,7 +496,7 @@ async function writeFactFile(targetDir, fact, text, maxFacts) {
496
496
  })
497
497
  );
498
498
  const index = await nextIndex(targetDir, description, name, title);
499
- await chunkZOFRNNZD_cjs.replaceFileAtomic(path.join(targetDir, "MEMORY.md"), index);
499
+ await chunkIZV72OEI_cjs.replaceFileAtomic(node_path.join(targetDir, "MEMORY.md"), index);
500
500
  const warning = indexBudgetWarning(index, targetDir);
501
501
  if (warning !== void 0) chunkRNXXYF22_cjs.diag(`[theokit-sdk] ${warning}
502
502
  `);
@@ -507,7 +507,7 @@ async function resolveName(dir, base, text) {
507
507
  const candidate = i === 1 ? base : `${base}-${i}`;
508
508
  let existing;
509
509
  try {
510
- existing = await promises.readFile(path.join(dir, `${candidate}.md`), "utf8");
510
+ existing = await promises.readFile(node_path.join(dir, `${candidate}.md`), "utf8");
511
511
  } catch {
512
512
  return candidate;
513
513
  }
@@ -515,12 +515,12 @@ async function resolveName(dir, base, text) {
515
515
  if (parsed === void 0) return candidate;
516
516
  if (normalizeFactText(parsed.body) === wanted) return candidate;
517
517
  }
518
- return slugForFact(text) === base ? chunk3KIUY67P_cjs.safeFilenameForId(text) : slugForFact(text);
518
+ return slugForFact(text) === base ? chunkVHY6NVCJ_cjs.safeFilenameForId(text) : slugForFact(text);
519
519
  }
520
520
  async function nextObservationCount(dir, name, text) {
521
521
  let existing;
522
522
  try {
523
- existing = await promises.readFile(path.join(dir, `${name}.md`), "utf8");
523
+ existing = await promises.readFile(node_path.join(dir, `${name}.md`), "utf8");
524
524
  } catch {
525
525
  return 1;
526
526
  }
@@ -536,7 +536,7 @@ function normalizeFactText(text) {
536
536
  async function nextIndex(dir, text, name, title) {
537
537
  let existing = "";
538
538
  try {
539
- existing = await promises.readFile(path.join(dir, "MEMORY.md"), "utf8");
539
+ existing = await promises.readFile(node_path.join(dir, "MEMORY.md"), "utf8");
540
540
  } catch {
541
541
  existing = "";
542
542
  }
@@ -570,10 +570,10 @@ async function appendFact(cwd, config, fact) {
570
570
  }
571
571
  var MAX_TURN_CHARS = 2e3;
572
572
  function sessionsDir(root) {
573
- return path.join(root, "sessions");
573
+ return node_path.join(root, "sessions");
574
574
  }
575
575
  function sessionSummaryPath(root, runId) {
576
- return path.join(sessionsDir(root), `${chunk3KIUY67P_cjs.safeFilenameForId(runId, { maxLen: 128 })}.md`);
576
+ return node_path.join(sessionsDir(root), `${chunkVHY6NVCJ_cjs.safeFilenameForId(runId, { maxLen: 128 })}.md`);
577
577
  }
578
578
  function truncate(text) {
579
579
  if (text.length <= MAX_TURN_CHARS) return text;
@@ -603,7 +603,7 @@ async function writeSessionSummary(input) {
603
603
  safeAssistant,
604
604
  ""
605
605
  ].join("\n");
606
- await chunkZOFRNNZD_cjs.replaceFileAtomic(path, body);
606
+ await chunkIZV72OEI_cjs.replaceFileAtomic(path, body);
607
607
  }
608
608
  async function listMarkdownIn(dir, root, options = {}) {
609
609
  let entries;
@@ -615,8 +615,8 @@ async function listMarkdownIn(dir, root, options = {}) {
615
615
  }
616
616
  const skip = options.skip ?? [];
617
617
  return entries.filter((entry) => entry.endsWith(".md") && !skip.includes(entry)).map((entry) => {
618
- const absolutePath = path.join(dir, entry);
619
- return { absolutePath, relPath: path.relative(root, absolutePath) };
618
+ const absolutePath = node_path.join(dir, entry);
619
+ return { absolutePath, relPath: node_path.relative(root, absolutePath) };
620
620
  });
621
621
  }
622
622
 
@@ -625,7 +625,7 @@ async function discoverSessionFiles(root) {
625
625
  return await listMarkdownIn(sessionsDir(root), root);
626
626
  }
627
627
  function wikiDir(root) {
628
- return path.join(root, "wiki");
628
+ return node_path.join(root, "wiki");
629
629
  }
630
630
  async function discoverWikiFiles(root) {
631
631
  return await listMarkdownIn(wikiDir(root), root);
@@ -660,7 +660,7 @@ async function collectMarkdownFiles(root) {
660
660
  await promises.stat(memoryMdPath(root));
661
661
  results.push({
662
662
  absolutePath: memoryMdPath(root),
663
- relPath: path.relative(root, memoryMdPath(root)),
663
+ relPath: node_path.relative(root, memoryMdPath(root)),
664
664
  source: "memory"
665
665
  });
666
666
  } catch {
@@ -686,7 +686,7 @@ async function collectMarkdownFiles(root) {
686
686
  return results;
687
687
  }
688
688
  function sha256(text) {
689
- return crypto.createHash("sha256").update(text).digest("hex");
689
+ return node_crypto.createHash("sha256").update(text).digest("hex");
690
690
  }
691
691
  function truncateSnippet(text) {
692
692
  const max = 500;
@@ -736,7 +736,7 @@ var PRAGMA_STATEMENTS = [
736
736
 
737
737
  // src/internal/memory/index-db.ts
738
738
  async function openMemoryDb(opts) {
739
- return chunkAT2PESXB_cjs.openSqliteResilient({
739
+ return chunk2UYAL4N7_cjs.openSqliteResilient({
740
740
  filePath: opts.filePath,
741
741
  label: "memory-index",
742
742
  recoverCorrupt: opts.recoverCorrupt,
@@ -747,11 +747,11 @@ async function openMemoryDb(opts) {
747
747
  });
748
748
  }
749
749
  function defaultIndexPath(root) {
750
- return path.join(root, ".index", "memory.sqlite");
750
+ return node_path.join(root, ".index", "memory.sqlite");
751
751
  }
752
752
  function requireLance() {
753
753
  try {
754
- const r = module$1.createRequire((typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('chunk-VWYFGE27.cjs', document.baseURI).href)));
754
+ const r = node_module.createRequire((typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('chunk-KC2HKUPT.cjs', document.baseURI).href)));
755
755
  return r("@lancedb/lancedb");
756
756
  } catch (cause) {
757
757
  throw new chunkCEGU5AVD_cjs.ConfigurationError(
@@ -772,7 +772,7 @@ var LanceIndex = class _LanceIndex {
772
772
  static async open(opts) {
773
773
  const lance = requireLance();
774
774
  const storagePath = opts.storagePath ?? lanceStoragePath(opts.memoryRoot ?? resolveMemoryRoot(opts.cwd));
775
- fs.mkdirSync(storagePath, { recursive: true });
775
+ node_fs.mkdirSync(storagePath, { recursive: true });
776
776
  const conn = await lance.connect(storagePath);
777
777
  const dim = opts.embedding.dimension;
778
778
  const tableName = "facts";
@@ -864,7 +864,7 @@ function escapeSqlValue(value) {
864
864
  return value.replace(/\\/g, "\\\\").replace(/'/g, "''");
865
865
  }
866
866
  function lanceStoragePath(root) {
867
- return path.join(root, "lance");
867
+ return node_path.join(root, "lance");
868
868
  }
869
869
 
870
870
  exports.LanceIndex = LanceIndex;
@@ -901,5 +901,5 @@ exports.sha256 = sha256;
901
901
  exports.truncateSnippet = truncateSnippet;
902
902
  exports.wikiDir = wikiDir;
903
903
  exports.writeSessionSummary = writeSessionSummary;
904
- //# sourceMappingURL=chunk-VWYFGE27.cjs.map
905
- //# sourceMappingURL=chunk-VWYFGE27.cjs.map
904
+ //# sourceMappingURL=chunk-KC2HKUPT.cjs.map
905
+ //# sourceMappingURL=chunk-KC2HKUPT.cjs.map