@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
package/dist/index.cjs CHANGED
@@ -1,78 +1,80 @@
1
1
  'use strict';
2
2
 
3
- var chunkROYPRJH4_cjs = require('./chunk-ROYPRJH4.cjs');
3
+ var chunkLYRDF5TQ_cjs = require('./chunk-LYRDF5TQ.cjs');
4
4
  var chunkOBA6YK2R_cjs = require('./chunk-OBA6YK2R.cjs');
5
- var chunkGWC3HADL_cjs = require('./chunk-GWC3HADL.cjs');
6
- var chunkP6A3M6VD_cjs = require('./chunk-P6A3M6VD.cjs');
7
- require('./chunk-QDED6YO6.cjs');
8
- var chunk6SBW4QR2_cjs = require('./chunk-6SBW4QR2.cjs');
9
- require('./chunk-XWL6O3SW.cjs');
5
+ var chunk3NSS2OIZ_cjs = require('./chunk-3NSS2OIZ.cjs');
6
+ var chunkHOXVQ5FR_cjs = require('./chunk-HOXVQ5FR.cjs');
7
+ var chunkSZVR77EJ_cjs = require('./chunk-SZVR77EJ.cjs');
8
+ require('./chunk-B4EOJWOY.cjs');
9
+ var chunkYML4ME27_cjs = require('./chunk-YML4ME27.cjs');
10
+ require('./chunk-WNO3C3N2.cjs');
10
11
  require('./chunk-VTYY7XL5.cjs');
11
- var chunkCWHTMNNK_cjs = require('./chunk-CWHTMNNK.cjs');
12
- var chunkAH6WD7JR_cjs = require('./chunk-AH6WD7JR.cjs');
13
- var chunkNGESVVJN_cjs = require('./chunk-NGESVVJN.cjs');
14
- require('./chunk-2DG7KW4L.cjs');
12
+ var chunkQ7LPTOD6_cjs = require('./chunk-Q7LPTOD6.cjs');
13
+ var chunkZMRD5DZQ_cjs = require('./chunk-ZMRD5DZQ.cjs');
14
+ var chunk3FFAEAUJ_cjs = require('./chunk-3FFAEAUJ.cjs');
15
+ require('./chunk-RMWTPV3M.cjs');
15
16
  require('./chunk-BUUUWQMB.cjs');
16
- var chunk6OBIWHDR_cjs = require('./chunk-6OBIWHDR.cjs');
17
- require('./chunk-P6H23T43.cjs');
17
+ require('./chunk-ITYQ6VBP.cjs');
18
+ require('./chunk-ZCIRZE37.cjs');
18
19
  require('./chunk-BV2MWEMV.cjs');
19
- require('./chunk-EI2Q7SJ5.cjs');
20
+ require('./chunk-KQ7TS7WW.cjs');
20
21
  require('./chunk-GHX4P3V2.cjs');
21
- var chunk2UCFUSPW_cjs = require('./chunk-2UCFUSPW.cjs');
22
- require('./chunk-QI7WE46I.cjs');
23
- var chunkP5LCASTC_cjs = require('./chunk-P5LCASTC.cjs');
24
- require('./chunk-F3YZMOAU.cjs');
22
+ require('./chunk-GKEFRLU7.cjs');
23
+ var chunk6RKUO7AW_cjs = require('./chunk-6RKUO7AW.cjs');
24
+ require('./chunk-ZLQSWSJ2.cjs');
25
+ var chunkKYAJINUI_cjs = require('./chunk-KYAJINUI.cjs');
26
+ require('./chunk-O7DK5PBJ.cjs');
25
27
  require('./chunk-4OTIXDMU.cjs');
26
- require('./chunk-DQKERTND.cjs');
27
- require('./chunk-Z4BCLVTI.cjs');
28
+ require('./chunk-UGT7GK7I.cjs');
29
+ require('./chunk-O7LZFG6O.cjs');
28
30
  require('./chunk-2ZPEDVLM.cjs');
29
31
  require('./chunk-7BG5UH3T.cjs');
30
32
  require('./chunk-KRD3GQAA.cjs');
31
- require('./chunk-J2UROOIG.cjs');
33
+ require('./chunk-2HVF2WJY.cjs');
32
34
  require('./chunk-MUUQ2WFJ.cjs');
33
35
  var chunkWJVHMTKB_cjs = require('./chunk-WJVHMTKB.cjs');
34
36
  require('./chunk-6JSIEDKL.cjs');
35
37
  require('./chunk-FRITRLZQ.cjs');
36
38
  require('./chunk-4O5TGQBW.cjs');
37
39
  require('./chunk-NINIJCHU.cjs');
38
- require('./chunk-3YJNUKYN.cjs');
40
+ require('./chunk-OHLDPWTA.cjs');
39
41
  require('./chunk-LKFET5A3.cjs');
40
42
  require('./chunk-VJ26EKGJ.cjs');
41
- require('./chunk-R3UPQFKK.cjs');
43
+ require('./chunk-V2BOS4WF.cjs');
42
44
  require('./chunk-VKJ7V7EB.cjs');
43
- require('./chunk-ILCGLTSA.cjs');
44
- require('./chunk-CQGYNZ3K.cjs');
45
- require('./chunk-4I55V454.cjs');
46
- require('./chunk-BUIK7GUA.cjs');
47
- require('./chunk-SKXBJ2NU.cjs');
48
- require('./chunk-2ADR2GSO.cjs');
45
+ require('./chunk-ZSWPZ23K.cjs');
46
+ require('./chunk-XWTLIGO3.cjs');
47
+ require('./chunk-I6HGWHPU.cjs');
48
+ require('./chunk-5HEG4CQH.cjs');
49
+ require('./chunk-A4RAL2ER.cjs');
50
+ require('./chunk-5VB22SYX.cjs');
51
+ require('./chunk-UU36SHFY.cjs');
49
52
  var chunkZF2LDKQQ_cjs = require('./chunk-ZF2LDKQQ.cjs');
50
- var chunk2C72DXQF_cjs = require('./chunk-2C72DXQF.cjs');
51
- var chunkI6TGFUCO_cjs = require('./chunk-I6TGFUCO.cjs');
52
- require('./chunk-WNTAPVU5.cjs');
53
+ var chunkRFMBZPOW_cjs = require('./chunk-RFMBZPOW.cjs');
54
+ var chunkUALX2J2Q_cjs = require('./chunk-UALX2J2Q.cjs');
55
+ require('./chunk-CQBXOJ6U.cjs');
53
56
  require('./chunk-AQO3NSRG.cjs');
54
- require('./chunk-IWBGCBR6.cjs');
55
- require('./chunk-XSX2UU6Y.cjs');
57
+ require('./chunk-4CLOXP6H.cjs');
58
+ require('./chunk-DXGZ2NUG.cjs');
56
59
  var chunk3EE6LVWT_cjs = require('./chunk-3EE6LVWT.cjs');
57
- require('./chunk-6HTXPPHK.cjs');
58
- var chunkNIRE5CNO_cjs = require('./chunk-NIRE5CNO.cjs');
59
- require('./chunk-5USCYPPI.cjs');
60
- require('./chunk-BVZW2B5V.cjs');
60
+ require('./chunk-JPBKYL3B.cjs');
61
+ var chunkHCZD23VS_cjs = require('./chunk-HCZD23VS.cjs');
62
+ require('./chunk-6HKGLTJI.cjs');
63
+ require('./chunk-XJCXEKMD.cjs');
61
64
  require('./chunk-52NKC5HT.cjs');
62
- var chunkK3FW2XZD_cjs = require('./chunk-K3FW2XZD.cjs');
63
- var chunkJTB5Q42C_cjs = require('./chunk-JTB5Q42C.cjs');
64
- var chunkNUKRL3I6_cjs = require('./chunk-NUKRL3I6.cjs');
65
+ var chunk4ZHTIJNE_cjs = require('./chunk-4ZHTIJNE.cjs');
66
+ var chunkXL7Q7HB2_cjs = require('./chunk-XL7Q7HB2.cjs');
67
+ var chunkEG4QM7ZJ_cjs = require('./chunk-EG4QM7ZJ.cjs');
65
68
  var crypto = require('crypto');
66
69
  var zod = require('zod');
67
70
  var promises = require('fs/promises');
68
71
  var path = require('path');
69
- var fs = require('fs');
70
72
 
71
73
  // src/agent-factory.ts
72
74
  function createAgentFactory(common) {
73
75
  return {
74
- forSession: (agentId, overrides) => chunkAH6WD7JR_cjs.Agent.create(mergeAgentOptions(common, overrides, agentId)),
75
- getOrCreate: (agentId, overrides) => chunkAH6WD7JR_cjs.Agent.getOrCreate(agentId, mergeAgentOptions(common, overrides, agentId))
76
+ forSession: (agentId, overrides) => chunkZMRD5DZQ_cjs.Agent.create(mergeAgentOptions(common, overrides, agentId)),
77
+ getOrCreate: (agentId, overrides) => chunkZMRD5DZQ_cjs.Agent.getOrCreate(agentId, mergeAgentOptions(common, overrides, agentId))
76
78
  };
77
79
  }
78
80
  function mergeAgentOptions(common, overrides, agentId) {
@@ -226,12 +228,12 @@ var NAME_GRAMMAR = /^[a-z0-9][a-z0-9_-]*$/;
226
228
  var registry = /* @__PURE__ */ new Map();
227
229
  function validateBudgetName(name) {
228
230
  if (typeof name !== "string" || name.length === 0) {
229
- throw new chunkK3FW2XZD_cjs.ConfigurationError("Budget name must be a non-empty string", {
231
+ throw new chunk4ZHTIJNE_cjs.ConfigurationError("Budget name must be a non-empty string", {
230
232
  code: "invalid_budget_name"
231
233
  });
232
234
  }
233
235
  if (!NAME_GRAMMAR.test(name)) {
234
- throw new chunkK3FW2XZD_cjs.ConfigurationError(
236
+ throw new chunk4ZHTIJNE_cjs.ConfigurationError(
235
237
  `Budget name "${name}" must match ^[a-z0-9][a-z0-9_-]*$ (lowercase + dash/underscore, start alphanumeric)`,
236
238
  { code: "invalid_budget_name" }
237
239
  );
@@ -240,7 +242,7 @@ function validateBudgetName(name) {
240
242
  function createBudget(opts) {
241
243
  validateBudgetName(opts.name);
242
244
  if (registry.has(opts.name)) {
243
- throw new chunkK3FW2XZD_cjs.ConfigurationError(`Budget "${opts.name}" already exists`, {
245
+ throw new chunk4ZHTIJNE_cjs.ConfigurationError(`Budget "${opts.name}" already exists`, {
244
246
  code: "invalid_budget_name"
245
247
  });
246
248
  }
@@ -304,7 +306,7 @@ function preflightCheck(name, estimatedUsd) {
304
306
  for (const lim of opts.limits) {
305
307
  const currentSpent = spentIn(opts.name, lim.window);
306
308
  if (currentSpent + estimatedUsd > lim.limitUsd) {
307
- throw new chunkK3FW2XZD_cjs.BudgetExceededError({
309
+ throw new chunk4ZHTIJNE_cjs.BudgetExceededError({
308
310
  budgetName: opts.name,
309
311
  window: lim.window,
310
312
  spentUsd: currentSpent + estimatedUsd,
@@ -317,7 +319,7 @@ function preflightCheck(name, estimatedUsd) {
317
319
  async function chargeAndCheckThresholds(name, actualUsd) {
318
320
  const opts = getBudgetOptionsRaw(name);
319
321
  if (opts === void 0) {
320
- chunkNUKRL3I6_cjs.diag(
322
+ chunkEG4QM7ZJ_cjs.diag(
321
323
  `[budget] charge for deleted budget "${name}" is a no-op (was the budget removed during in-flight send?)
322
324
  `
323
325
  );
@@ -360,14 +362,14 @@ async function dispatchThreshold(opts, window, spentUsd, limitUsd, threshold) {
360
362
  });
361
363
  } catch (err) {
362
364
  const msg = err instanceof Error ? err.message : String(err);
363
- chunkNUKRL3I6_cjs.diag(`[budget] onThreshold callback threw: ${msg}
365
+ chunkEG4QM7ZJ_cjs.diag(`[budget] onThreshold callback threw: ${msg}
364
366
  `);
365
367
  }
366
368
  }
367
369
  async function dispatchExceed(opts, window, spentUsd, limitUsd, mode) {
368
370
  if (opts.onExceed === void 0) {
369
371
  if (mode === "warn") {
370
- chunkNUKRL3I6_cjs.diag(
372
+ chunkEG4QM7ZJ_cjs.diag(
371
373
  `[budget] "${opts.name}" exceeded ${window} limit: $${spentUsd.toFixed(4)} > $${limitUsd.toFixed(4)}
372
374
  `
373
375
  );
@@ -384,7 +386,7 @@ async function dispatchExceed(opts, window, spentUsd, limitUsd, mode) {
384
386
  });
385
387
  } catch (err) {
386
388
  const msg = err instanceof Error ? err.message : String(err);
387
- chunkNUKRL3I6_cjs.diag(`[budget] onExceed callback threw: ${msg}
389
+ chunkEG4QM7ZJ_cjs.diag(`[budget] onExceed callback threw: ${msg}
388
390
  `);
389
391
  }
390
392
  }
@@ -646,8 +648,8 @@ var Provider = class _Provider {
646
648
  * `.plugins(Provider.builtins())` once, then pick a `provider/model` id. @public
647
649
  */
648
650
  static builtins() {
649
- chunkNIRE5CNO_cjs.registerBuiltins();
650
- return chunkNIRE5CNO_cjs.listProviders().map((profile) => defineProvider(profile));
651
+ chunkHCZD23VS_cjs.registerBuiltins();
652
+ return chunkHCZD23VS_cjs.listProviders().map((profile) => defineProvider(profile));
651
653
  }
652
654
  /**
653
655
  * The builtin serving `modelId`, or `undefined` when none does.
@@ -761,7 +763,7 @@ var EventBus = class {
761
763
  } catch (cause) {
762
764
  this.#handlerErrorCount += 1;
763
765
  const message = cause instanceof Error ? cause.message : String(cause);
764
- chunkNUKRL3I6_cjs.diag(`[theokit-sdk] event-bus: handler for "${String(event)}" threw: ${message}
766
+ chunkEG4QM7ZJ_cjs.diag(`[theokit-sdk] event-bus: handler for "${String(event)}" threw: ${message}
765
767
  `);
766
768
  }
767
769
  }
@@ -784,7 +786,7 @@ function runGoalLoop(agent, goal, options, depsOverride) {
784
786
  async function* wrap() {
785
787
  const { runUntilImpl } = await import('./run-until-U2B5FJJI.cjs');
786
788
  const deps = depsOverride ?? await (async () => {
787
- const { judgeCallImpl } = await import('./judge-call-EGYRC2RE.cjs');
789
+ const { judgeCallImpl } = await import('./judge-call-LAHMBJ57.cjs');
788
790
  const { getAgentFacade } = await import('./agent-factory-registry-UU46BUMU.cjs');
789
791
  const create = getAgentFacade().create;
790
792
  return {
@@ -985,7 +987,7 @@ var JobQueue = class {
985
987
  };
986
988
 
987
989
  // src/layer-fold.ts
988
- var LayerOrderError = class extends chunkK3FW2XZD_cjs.TheokitAgentError {
990
+ var LayerOrderError = class extends chunk4ZHTIJNE_cjs.TheokitAgentError {
989
991
  name = "LayerOrderError";
990
992
  };
991
993
  function verifyLayerOrdering(layers) {
@@ -1019,47 +1021,6 @@ function foldLayers(entries, accumulatingKeys = []) {
1019
1021
  }
1020
1022
  return combined;
1021
1023
  }
1022
- function diaryPath(cwd) {
1023
- return path.join(chunk2UCFUSPW_cjs.memoryDir(cwd), "dream-diary.md");
1024
- }
1025
- function renderDiaryEntry(entry) {
1026
- const stamp = new Date(entry.timestampMs).toISOString();
1027
- const hash = entryHash(entry).slice(0, 8);
1028
- return [
1029
- `## ${stamp}`,
1030
- "",
1031
- `- entry-hash: ${hash}`,
1032
- `- facts before: ${entry.factsBefore}`,
1033
- `- facts after: ${entry.factsAfter}`,
1034
- `- duplicates removed: ${entry.duplicatesRemoved}`,
1035
- `- clusters created: ${entry.clustersCreated}`,
1036
- `- notes written: ${entry.notesWritten}`,
1037
- ""
1038
- ].join("\n");
1039
- }
1040
- async function appendDiaryEntry(cwd, entry) {
1041
- const path = diaryPath(cwd);
1042
- let raw = "";
1043
- try {
1044
- raw = await promises.readFile(path, "utf8");
1045
- } catch {
1046
- raw = "# Dream Diary\n\n";
1047
- }
1048
- const next = `${raw.endsWith("\n") ? raw : `${raw}
1049
- `}${renderDiaryEntry(entry)}`;
1050
- await chunkI6TGFUCO_cjs.replaceFileAtomic(path, next);
1051
- }
1052
- function entryHash(entry) {
1053
- return crypto.createHash("sha256").update(
1054
- [
1055
- entry.factsBefore,
1056
- entry.factsAfter,
1057
- entry.duplicatesRemoved,
1058
- entry.clustersCreated,
1059
- entry.notesWritten
1060
- ].join("|")
1061
- ).digest("hex");
1062
- }
1063
1024
 
1064
1025
  // src/internal/memory/dreaming/phases.ts
1065
1026
  var DEFAULT_DEDUP_THRESHOLD = 0.95;
@@ -1200,13 +1161,17 @@ async function runInner(options) {
1200
1161
  const now = options.now ?? Date.now;
1201
1162
  const timestampMs = now();
1202
1163
  try {
1203
- const facts = await chunk2UCFUSPW_cjs.readFactsFromMarkdown(options.cwd);
1164
+ const root = options.memoryRoot ?? chunk6RKUO7AW_cjs.resolveMemoryRoot(options.cwd);
1165
+ const facts = await chunk6RKUO7AW_cjs.readFactsFromMarkdown(
1166
+ options.cwd,
1167
+ options.memoryRoot ? { directory: options.memoryRoot } : void 0
1168
+ );
1204
1169
  if (facts.length === 0) {
1205
1170
  return emptyResult("skipped");
1206
1171
  }
1207
1172
  const dedup = await lightPhase(facts, options.embedding, options.dedupThreshold);
1208
1173
  const rem = await remPhase(dedup.kept, options.embedding, options.clusterThreshold);
1209
- const notesWritten = await writeConsolidatedNotes(options.cwd, rem.clusters, timestampMs);
1174
+ const notesWritten = await writeConsolidatedNotes(root, rem.clusters, timestampMs);
1210
1175
  const result = {
1211
1176
  status: "ok",
1212
1177
  factsBefore: facts.length,
@@ -1216,7 +1181,7 @@ async function runInner(options) {
1216
1181
  notesWritten,
1217
1182
  diaryEntryHash: void 0
1218
1183
  };
1219
- await appendDiaryEntry(options.cwd, {
1184
+ await chunkHOXVQ5FR_cjs.appendDiaryEntry(root, {
1220
1185
  timestampMs,
1221
1186
  factsBefore: result.factsBefore,
1222
1187
  factsAfter: result.factsAfter,
@@ -1227,19 +1192,19 @@ async function runInner(options) {
1227
1192
  return result;
1228
1193
  } catch (cause) {
1229
1194
  const message = cause instanceof Error ? cause.message : String(cause);
1230
- chunkNUKRL3I6_cjs.diag(`[theokit-sdk] dreaming sweep failed: ${message}
1195
+ chunkEG4QM7ZJ_cjs.diag(`[theokit-sdk] dreaming sweep failed: ${message}
1231
1196
  `);
1232
1197
  return emptyResult("error");
1233
1198
  }
1234
1199
  }
1235
- async function writeConsolidatedNotes(cwd, clusters, timestampMs) {
1200
+ async function writeConsolidatedNotes(root, clusters, timestampMs) {
1236
1201
  if (clusters.length === 0) return 0;
1237
- const notesDir = path.join(chunk2UCFUSPW_cjs.memoryDir(cwd), "notes");
1202
+ const notesDir = path.join(root, "notes");
1238
1203
  await promises.mkdir(notesDir, { recursive: true });
1239
1204
  const isoSlug = new Date(timestampMs).toISOString().replace(/[^\dT]/g, "-");
1240
1205
  const file = path.join(notesDir, `dreamed-${isoSlug}.md`);
1241
1206
  const body = deepPhase(clusters, timestampMs);
1242
- await chunkI6TGFUCO_cjs.replaceFileAtomic(file, body);
1207
+ await chunkUALX2J2Q_cjs.replaceFileAtomic(file, body);
1243
1208
  return 1;
1244
1209
  }
1245
1210
  function emptyResult(status) {
@@ -1300,8 +1265,8 @@ var Memory = {
1300
1265
  openArgs.embedding = await resolveEmbedding(opts.embedding, peer.MEMORY_EMBEDDING_ADAPTERS);
1301
1266
  return await peer.IndexManager.open(openArgs);
1302
1267
  }
1303
- const { IndexManager } = await import('./index-manager-RHPFVFSC.cjs');
1304
- openArgs.embedding = await resolveEmbedding(opts.embedding, chunkAH6WD7JR_cjs.MEMORY_EMBEDDING_ADAPTERS);
1268
+ const { IndexManager } = await import('./index-manager-UZBF22BJ.cjs');
1269
+ openArgs.embedding = await resolveEmbedding(opts.embedding, chunkZMRD5DZQ_cjs.MEMORY_EMBEDDING_ADAPTERS);
1305
1270
  return await IndexManager.open(openArgs);
1306
1271
  },
1307
1272
  /**
@@ -1312,7 +1277,7 @@ var Memory = {
1312
1277
  */
1313
1278
  async runDreamingSweep(opts) {
1314
1279
  const peer = await tryLoadSdkMemoryPeer();
1315
- const catalog = peer !== null ? peer.MEMORY_EMBEDDING_ADAPTERS : chunkAH6WD7JR_cjs.MEMORY_EMBEDDING_ADAPTERS;
1280
+ const catalog = peer !== null ? peer.MEMORY_EMBEDDING_ADAPTERS : chunkZMRD5DZQ_cjs.MEMORY_EMBEDDING_ADAPTERS;
1316
1281
  const sweepArgs = await buildDreamingSweepArgs(opts, catalog);
1317
1282
  const result = peer !== null ? (
1318
1283
  // biome-ignore lint/suspicious/noExplicitAny: peer is dynamically loaded — structural compat ensured by sdk-memory
@@ -1346,6 +1311,7 @@ async function buildDreamingSweepArgs(opts, catalog) {
1346
1311
  const runtime = await resolveEmbedding(opts.embedding, catalog);
1347
1312
  return {
1348
1313
  cwd: opts.cwd,
1314
+ memoryRoot: chunk6RKUO7AW_cjs.resolveMemoryRoot(opts.cwd, { directory: opts.directory }),
1349
1315
  embedding: runtime,
1350
1316
  ...opts.dedupThreshold !== void 0 ? { dedupThreshold: opts.dedupThreshold } : {},
1351
1317
  ...opts.clusterThreshold !== void 0 ? { clusterThreshold: opts.clusterThreshold } : {}
@@ -1370,152 +1336,13 @@ function extractRawId(id, expectedAdapterId) {
1370
1336
  const prefix = `${expectedAdapterId}:`;
1371
1337
  if (!id.startsWith(prefix)) {
1372
1338
  const sourcePrefix = id.split(":", 1)[0] ?? "<malformed>";
1373
- throw new chunkK3FW2XZD_cjs.MemoryAdapterError(
1339
+ throw new chunk4ZHTIJNE_cjs.MemoryAdapterError(
1374
1340
  `MemoryId belongs to a different adapter (expected "${expectedAdapterId}", got "${sourcePrefix}")`,
1375
1341
  { adapterId: expectedAdapterId, code: "invalid_input" }
1376
1342
  );
1377
1343
  }
1378
1344
  return id.slice(prefix.length);
1379
1345
  }
1380
- async function readAllSqliteFacts(cwd) {
1381
- const dbPath = chunk6OBIWHDR_cjs.defaultIndexPath(cwd);
1382
- if (!fs.existsSync(dbPath)) return [];
1383
- const db = await chunk6OBIWHDR_cjs.openMemoryDb({ filePath: dbPath });
1384
- try {
1385
- const stmt = db.prepare("SELECT id, path, source, start_line, end_line, text FROM chunks");
1386
- const rows = stmt.all();
1387
- return rows.map((r) => ({
1388
- ...r,
1389
- namespace: "default",
1390
- scope: "agent",
1391
- user_id: "default"
1392
- }));
1393
- } finally {
1394
- db.close();
1395
- }
1396
- }
1397
- function nfcEqual(a, b) {
1398
- return a.normalize("NFC") === b.normalize("NFC");
1399
- }
1400
- async function migrateSqliteToLance(opts) {
1401
- const cwd = opts.cwd;
1402
- const finalPath = chunk6OBIWHDR_cjs.lanceStoragePath(cwd);
1403
- const newPath = path.join(cwd, ".theokit", "memory", "lance-new");
1404
- const rawLog = opts.logger ?? ((m) => console.log(m));
1405
- const log = (m) => rawLog(chunkJTB5Q42C_cjs.redactSecrets(m));
1406
- if (fs.existsSync(finalPath)) {
1407
- throw new chunkK3FW2XZD_cjs.ConfigurationError(
1408
- `Destination already exists: ${finalPath}. Remove it manually (\`rm -rf ${finalPath}\`) and re-run.`,
1409
- { code: "migration_destination_exists" }
1410
- );
1411
- }
1412
- if (fs.existsSync(newPath)) {
1413
- log(`Removing stale ${newPath} from a previous run...`);
1414
- fs.rmSync(newPath, { recursive: true, force: true });
1415
- }
1416
- log(`Reading SQLite facts from ${cwd}/.theokit/memory/index.sqlite ...`);
1417
- const sqliteFacts = await readAllSqliteFacts(cwd);
1418
- log(`SQLite has ${sqliteFacts.length} facts.`);
1419
- if (sqliteFacts.length === 0) {
1420
- return {
1421
- countSqlite: 0,
1422
- countLance: 0,
1423
- validated: true,
1424
- sampleComparisons: [],
1425
- lancePath: finalPath,
1426
- committed: false
1427
- };
1428
- }
1429
- const placeholderEmbedding = {
1430
- id: "migration-placeholder",
1431
- model: "deterministic-hash",
1432
- dimension: 8,
1433
- embed: async (texts) => {
1434
- return texts.map((t) => {
1435
- const arr = new Array(8).fill(0);
1436
- for (let i = 0; i < t.length; i += 1) {
1437
- arr[i % 8] += t.charCodeAt(i);
1438
- }
1439
- return arr.map((x) => x / 1e3);
1440
- });
1441
- },
1442
- stats: () => ({ cacheHits: 0, cacheMisses: 0, httpCalls: 0, retries: 0 })
1443
- };
1444
- fs.mkdirSync(newPath, { recursive: true });
1445
- log(`Writing Lance index to ${newPath} ...`);
1446
- const lance = await chunk6OBIWHDR_cjs.LanceIndex.open({
1447
- cwd,
1448
- embedding: placeholderEmbedding,
1449
- storagePath: newPath
1450
- });
1451
- const batchSize = opts.batchSize ?? 100;
1452
- for (let i = 0; i < sqliteFacts.length; i += batchSize) {
1453
- const batch = sqliteFacts.slice(i, i + batchSize).map((f) => ({
1454
- id: f.id,
1455
- text: f.text,
1456
- source: f.source,
1457
- namespace: f.namespace ?? "default",
1458
- scope: f.scope ?? "agent",
1459
- user_id: f.user_id ?? "default",
1460
- timestamp: 0
1461
- }));
1462
- await lance.addFacts(batch);
1463
- log(` Migrated ${Math.min(i + batchSize, sqliteFacts.length)}/${sqliteFacts.length}`);
1464
- }
1465
- const lanceCount = await lance.countFacts("default");
1466
- log(`Lance has ${lanceCount} facts (expected ${sqliteFacts.length}).`);
1467
- const sampleSize = Math.min(10, sqliteFacts.length);
1468
- const sampleComparisons = [];
1469
- for (let i = 0; i < sampleSize; i += 1) {
1470
- const sqliteFact = sqliteFacts[Math.floor(i * sqliteFacts.length / sampleSize)];
1471
- if (sqliteFact === void 0) continue;
1472
- const hits = await lance.search(sqliteFact.text, {
1473
- namespace: sqliteFact.namespace ?? "default",
1474
- limit: 1
1475
- });
1476
- const hit = hits[0];
1477
- const match = hit !== void 0 && nfcEqual(hit.text, sqliteFact.text);
1478
- sampleComparisons.push({ id: sqliteFact.id, match });
1479
- }
1480
- const allMatch = sampleComparisons.every((c) => c.match);
1481
- const countMatch = lanceCount === sqliteFacts.length;
1482
- const validated = allMatch && countMatch;
1483
- await lance.close();
1484
- if (opts.dryRun === true) {
1485
- log("Dry-run mode \u2014 discarding Lance staging dir.");
1486
- fs.rmSync(newPath, { recursive: true, force: true });
1487
- return {
1488
- countSqlite: sqliteFacts.length,
1489
- countLance: lanceCount,
1490
- validated,
1491
- sampleComparisons,
1492
- lancePath: finalPath,
1493
- committed: false
1494
- };
1495
- }
1496
- if (!validated) {
1497
- log("Validation FAILED \u2014 leaving SQLite intact, removing Lance staging dir.");
1498
- fs.rmSync(newPath, { recursive: true, force: true });
1499
- return {
1500
- countSqlite: sqliteFacts.length,
1501
- countLance: lanceCount,
1502
- validated: false,
1503
- sampleComparisons,
1504
- lancePath: finalPath,
1505
- committed: false
1506
- };
1507
- }
1508
- fs.renameSync(newPath, finalPath);
1509
- log(`Migration committed to ${finalPath}.`);
1510
- return {
1511
- countSqlite: sqliteFacts.length,
1512
- countLance: lanceCount,
1513
- validated: true,
1514
- sampleComparisons,
1515
- lancePath: finalPath,
1516
- committed: true
1517
- };
1518
- }
1519
1346
 
1520
1347
  // src/migrate.ts
1521
1348
  async function migrateSqliteToLance2(options) {
@@ -1523,7 +1350,7 @@ async function migrateSqliteToLance2(options) {
1523
1350
  if (peer !== null) {
1524
1351
  return peer.migrateSqliteToLance(options);
1525
1352
  }
1526
- return migrateSqliteToLance(options);
1353
+ return chunkHOXVQ5FR_cjs.migrateSqliteToLance(options);
1527
1354
  }
1528
1355
 
1529
1356
  // src/permission-engine.ts
@@ -1656,7 +1483,7 @@ function loadProjectEnv(env = process.env, load = typeof process.loadEnvFile ===
1656
1483
  }
1657
1484
 
1658
1485
  // src/reap-plan.ts
1659
- var RetentionPolicyError = class extends chunkK3FW2XZD_cjs.TheokitAgentError {
1486
+ var RetentionPolicyError = class extends chunk4ZHTIJNE_cjs.TheokitAgentError {
1660
1487
  name = "RetentionPolicyError";
1661
1488
  };
1662
1489
  function assertPolicy(retention) {
@@ -1780,7 +1607,7 @@ var Security = class {
1780
1607
  * // → "[bot] received: please remember sk-abc...xyz1"
1781
1608
  */
1782
1609
  static redact(text, opts) {
1783
- return chunkJTB5Q42C_cjs.redactSecrets(text, opts);
1610
+ return chunkXL7Q7HB2_cjs.redactSecrets(text, opts);
1784
1611
  }
1785
1612
  /**
1786
1613
  * Register a custom redaction pattern. Additive — built-in patterns
@@ -1802,7 +1629,7 @@ var Security = class {
1802
1629
  * // → text containing "MYORG-AAAA...AAAA" now masks like a builtin.
1803
1630
  */
1804
1631
  static addPattern(re) {
1805
- chunkJTB5Q42C_cjs.addPattern(re);
1632
+ chunkXL7Q7HB2_cjs.addPattern(re);
1806
1633
  }
1807
1634
  };
1808
1635
 
@@ -1840,7 +1667,7 @@ function applySecurityFloor(input) {
1840
1667
  }
1841
1668
 
1842
1669
  // src/session-guard.ts
1843
- var LiveSessionError = class extends chunkK3FW2XZD_cjs.TheokitAgentError {
1670
+ var LiveSessionError = class extends chunk4ZHTIJNE_cjs.TheokitAgentError {
1844
1671
  name = "LiveSessionError";
1845
1672
  sessionId;
1846
1673
  reason;
@@ -1874,7 +1701,7 @@ function isBuiltAgent(m) {
1874
1701
  return typeof m.send === "function";
1875
1702
  }
1876
1703
  async function materialize(def, index) {
1877
- const { Agent: Agent2 } = await import('./agent-VYPUO4UB.cjs');
1704
+ const { Agent: Agent2 } = await import('./agent-WK7MKIMH.cjs');
1878
1705
  return Agent2.create({
1879
1706
  // `AgentDefinition.model` admits the sentinel `'inherit'`, which is not a model id. Inheriting
1880
1707
  // here means "declare nothing and let the default apply" — forwarding the literal would create
@@ -1888,12 +1715,12 @@ async function materialize(def, index) {
1888
1715
  function createSquad(options) {
1889
1716
  const { agents } = options;
1890
1717
  if (!Array.isArray(agents) || agents.length === 0) {
1891
- throw new chunkK3FW2XZD_cjs.ConfigurationError("createSquad requires a non-empty `agents` array", {
1718
+ throw new chunk4ZHTIJNE_cjs.ConfigurationError("createSquad requires a non-empty `agents` array", {
1892
1719
  code: "invalid_squad"
1893
1720
  });
1894
1721
  }
1895
1722
  if (options.process !== void 0 && options.process !== "sequential") {
1896
- throw new chunkK3FW2XZD_cjs.ConfigurationError(
1723
+ throw new chunk4ZHTIJNE_cjs.ConfigurationError(
1897
1724
  `createSquad only supports process "sequential"; for manager\u2192worker delegation use subagents or @theokit/sdk-handoff`,
1898
1725
  { code: "squad_process_unsupported" }
1899
1726
  );
@@ -1906,13 +1733,13 @@ function createSquad(options) {
1906
1733
  };
1907
1734
  }
1908
1735
  async function buildPipeline(agents, nome) {
1909
- let builder = chunk6SBW4QR2_cjs.Workflow.create({ name: nome ?? "squad" });
1736
+ let builder = chunkYML4ME27_cjs.Workflow.create({ name: nome ?? "squad" });
1910
1737
  for (let i = 0; i < agents.length; i++) {
1911
1738
  const member = agents[i];
1912
1739
  if (member === void 0) continue;
1913
1740
  const agent = isBuiltAgent(member) ? member : await materialize(member, i);
1914
1741
  const opts = i > 0 ? { origin: { kind: "peer", from: `agent-${i - 1}` } } : void 0;
1915
- builder = builder.then(chunk6SBW4QR2_cjs.agentStep(`agent-${i}`, agent, (prev) => String(prev), opts));
1742
+ builder = builder.then(chunkYML4ME27_cjs.agentStep(`agent-${i}`, agent, (prev) => String(prev), opts));
1916
1743
  }
1917
1744
  return builder.commit();
1918
1745
  }
@@ -1936,7 +1763,7 @@ var Task = class {
1936
1763
  * (D369), and retention (D373).
1937
1764
  */
1938
1765
  static configure(opts) {
1939
- chunkNGESVVJN_cjs.configure(opts);
1766
+ chunk3FFAEAUJ_cjs.configure(opts);
1940
1767
  }
1941
1768
  /**
1942
1769
  * Submit a unit of asynchronous work to the registry.
@@ -1961,7 +1788,7 @@ var Task = class {
1961
1788
  * a semaphore slot and without invoking `work`.
1962
1789
  */
1963
1790
  static async submit(kind, work, options = {}) {
1964
- return chunkNGESVVJN_cjs.submit({
1791
+ return chunk3FFAEAUJ_cjs.submit({
1965
1792
  kind,
1966
1793
  work,
1967
1794
  ...options.id !== void 0 ? { id: options.id } : {},
@@ -1972,11 +1799,11 @@ var Task = class {
1972
1799
  }
1973
1800
  /** Returns matching handles, capped at `filter.limit ?? 100`. */
1974
1801
  static list(filter = {}) {
1975
- return chunkNGESVVJN_cjs.list(filter);
1802
+ return chunk3FFAEAUJ_cjs.list(filter);
1976
1803
  }
1977
1804
  /** Returns a single handle by id, or `undefined` if unknown / evicted. */
1978
1805
  static get(id) {
1979
- return chunkNGESVVJN_cjs.get(id);
1806
+ return chunk3FFAEAUJ_cjs.get(id);
1980
1807
  }
1981
1808
  /**
1982
1809
  * Idempotent cancel (D365). Returns:
@@ -1989,7 +1816,7 @@ var Task = class {
1989
1816
  * Never throws.
1990
1817
  */
1991
1818
  static cancel(id, reason) {
1992
- return chunkNGESVVJN_cjs.cancel(id, reason);
1819
+ return chunk3FFAEAUJ_cjs.cancel(id, reason);
1993
1820
  }
1994
1821
  /**
1995
1822
  * Subscribe to a task's event stream. The returned `AsyncIterable<TaskEvent>`
@@ -2003,7 +1830,7 @@ var Task = class {
2003
1830
  * Throws `TaskNotFoundError` if the id is unknown or has been evicted.
2004
1831
  */
2005
1832
  static subscribe(id) {
2006
- return chunkNGESVVJN_cjs.subscribe(id);
1833
+ return chunk3FFAEAUJ_cjs.subscribe(id);
2007
1834
  }
2008
1835
  };
2009
1836
 
@@ -2016,7 +1843,7 @@ var FIXTURE_USER = {
2016
1843
  };
2017
1844
  var FIXTURE_MODELS = [
2018
1845
  {
2019
- id: chunkAH6WD7JR_cjs.DEFAULT_AGENTIC_MODEL_ID,
1846
+ id: chunkZMRD5DZQ_cjs.DEFAULT_AGENTIC_MODEL_ID,
2020
1847
  name: "Gemini 2.0 Flash",
2021
1848
  displayName: "Gemini 2.0 Flash",
2022
1849
  parameters: [
@@ -2092,20 +1919,20 @@ async function listLocalModelsViaOpenAiCompat(baseUrl) {
2092
1919
  try {
2093
1920
  response = await fetch(url, { method: "GET" });
2094
1921
  } catch (fetchErr) {
2095
- const mapped = chunkP5LCASTC_cjs.mapOllamaTransportError({
1922
+ const mapped = chunkKYAJINUI_cjs.mapOllamaTransportError({
2096
1923
  providerId: "ollama",
2097
1924
  cause: fetchErr,
2098
1925
  endpoint: "/v1/models"
2099
1926
  });
2100
1927
  if (mapped !== void 0) throw mapped;
2101
- throw new chunkK3FW2XZD_cjs.ConfigurationError(
1928
+ throw new chunk4ZHTIJNE_cjs.ConfigurationError(
2102
1929
  `Failed to reach local provider at ${baseUrl}: ${fetchErr.message}`,
2103
1930
  { code: "local_provider_unreachable" }
2104
1931
  );
2105
1932
  }
2106
1933
  if (!response.ok) {
2107
- const body = await chunkP5LCASTC_cjs.readErrorResponseBody(response);
2108
- const mapped = chunkP5LCASTC_cjs.mapOllamaHttpError({
1934
+ const body = await chunkKYAJINUI_cjs.readErrorResponseBody(response);
1935
+ const mapped = chunkKYAJINUI_cjs.mapOllamaHttpError({
2109
1936
  providerId: "ollama",
2110
1937
  status: response.status,
2111
1938
  body,
@@ -2113,7 +1940,7 @@ async function listLocalModelsViaOpenAiCompat(baseUrl) {
2113
1940
  endpoint: "/v1/models"
2114
1941
  });
2115
1942
  if (mapped !== void 0) throw mapped;
2116
- throw new chunkK3FW2XZD_cjs.ConfigurationError(
1943
+ throw new chunk4ZHTIJNE_cjs.ConfigurationError(
2117
1944
  `Local provider at ${baseUrl} returned HTTP ${response.status} on /v1/models`,
2118
1945
  { code: "local_provider_http_error" }
2119
1946
  );
@@ -2168,9 +1995,9 @@ var Theokit = class {
2168
1995
  });
2169
1996
  },
2170
1997
  capabilities: (providerOrModelId) => {
2171
- chunkNIRE5CNO_cjs.registerBuiltins();
1998
+ chunkHCZD23VS_cjs.registerBuiltins();
2172
1999
  const providerId = providerOrModelId.includes("/") ? providerOrModelId.split("/")[0] ?? providerOrModelId : providerOrModelId;
2173
- return chunkNIRE5CNO_cjs.getCatalogCapabilities(providerId);
2000
+ return chunkHCZD23VS_cjs.getCatalogCapabilities(providerId);
2174
2001
  }
2175
2002
  };
2176
2003
  /**
@@ -2209,8 +2036,8 @@ var Theokit = class {
2209
2036
  */
2210
2037
  static inspect = {
2211
2038
  builtinProviders: () => {
2212
- chunkNIRE5CNO_cjs.registerBuiltins();
2213
- return chunkNIRE5CNO_cjs.listProviders().map((p) => ({
2039
+ chunkHCZD23VS_cjs.registerBuiltins();
2040
+ return chunkHCZD23VS_cjs.listProviders().map((p) => ({
2214
2041
  name: p.name,
2215
2042
  apiMode: p.apiMode,
2216
2043
  authType: p.authType,
@@ -2219,7 +2046,7 @@ var Theokit = class {
2219
2046
  envVars: p.envVars
2220
2047
  }));
2221
2048
  },
2222
- embeddingAdapters: () => Object.entries(chunkAH6WD7JR_cjs.MEMORY_EMBEDDING_ADAPTERS).map(([id, adapter]) => ({
2049
+ embeddingAdapters: () => Object.entries(chunkZMRD5DZQ_cjs.MEMORY_EMBEDDING_ADAPTERS).map(([id, adapter]) => ({
2223
2050
  id,
2224
2051
  transport: adapter.transport,
2225
2052
  defaultModel: adapter.defaultModel
@@ -2236,9 +2063,9 @@ var Theokit = class {
2236
2063
  // and may be promoted onto Theokit once the agent.ts cycle is broken.
2237
2064
  };
2238
2065
  async function maybeListLocalModels(providerName) {
2239
- chunkNIRE5CNO_cjs.registerBuiltins();
2240
- await chunkP5LCASTC_cjs.discoverProviderPlugins();
2241
- const profile = chunkNIRE5CNO_cjs.getProviderProfile(providerName);
2066
+ chunkHCZD23VS_cjs.registerBuiltins();
2067
+ await chunkKYAJINUI_cjs.discoverProviderPlugins();
2068
+ const profile = chunkHCZD23VS_cjs.getProviderProfile(providerName);
2242
2069
  if (profile === void 0) return void 0;
2243
2070
  if (profile.authType !== "none") return void 0;
2244
2071
  const baseUrl = resolveLocalProviderBaseUrl(profile.name, profile.baseUrl);
@@ -2251,17 +2078,17 @@ function resolveLocalProviderBaseUrl(providerName, fallback) {
2251
2078
  return fallback;
2252
2079
  }
2253
2080
  async function executeCatalogRequest(request) {
2254
- const apiKey = chunkJTB5Q42C_cjs.resolveApiKey(request.apiKey);
2081
+ const apiKey = chunkXL7Q7HB2_cjs.resolveApiKey(request.apiKey);
2255
2082
  if (apiKey === void 0) {
2256
- throw new chunkK3FW2XZD_cjs.AuthenticationError("Missing API key", { code: "missing_api_key" });
2083
+ throw new chunk4ZHTIJNE_cjs.AuthenticationError("Missing API key", { code: "missing_api_key" });
2257
2084
  }
2258
- if (chunkP5LCASTC_cjs.shouldUseFixtureMode(apiKey)) {
2085
+ if (chunkKYAJINUI_cjs.shouldUseFixtureMode(apiKey)) {
2259
2086
  return request.fixture;
2260
2087
  }
2261
- if (!chunkP5LCASTC_cjs.isFixtureApiKey(apiKey) && process.env.THEOKIT_API_BASE_URL === void 0) {
2262
- throw new chunkK3FW2XZD_cjs.AuthenticationError("Invalid API key", { code: "authentication_error" });
2088
+ if (!chunkKYAJINUI_cjs.isFixtureApiKey(apiKey) && process.env.THEOKIT_API_BASE_URL === void 0) {
2089
+ throw new chunk4ZHTIJNE_cjs.AuthenticationError("Invalid API key", { code: "authentication_error" });
2263
2090
  }
2264
- return chunkP5LCASTC_cjs.httpRequest(request.path, { apiKey });
2091
+ return chunkKYAJINUI_cjs.httpRequest(request.path, { apiKey });
2265
2092
  }
2266
2093
 
2267
2094
  // src/tool-blast-radius.ts
@@ -2386,7 +2213,7 @@ function resolveTrustPosture(input) {
2386
2213
  }
2387
2214
 
2388
2215
  // src/wiring-record.ts
2389
- var UngatedCapabilityError = class extends chunkK3FW2XZD_cjs.TheokitAgentError {
2216
+ var UngatedCapabilityError = class extends chunk4ZHTIJNE_cjs.TheokitAgentError {
2390
2217
  name = "UngatedCapabilityError";
2391
2218
  };
2392
2219
  function recordWiring(input) {
@@ -2410,7 +2237,7 @@ function recordWiring(input) {
2410
2237
 
2411
2238
  Object.defineProperty(exports, "StreamObjectError", {
2412
2239
  enumerable: true,
2413
- get: function () { return chunkROYPRJH4_cjs.StreamObjectError; }
2240
+ get: function () { return chunkLYRDF5TQ_cjs.StreamObjectError; }
2414
2241
  });
2415
2242
  Object.defineProperty(exports, "GOAL_CONTINUATION_MARKER", {
2416
2243
  enumerable: true,
@@ -2418,59 +2245,59 @@ Object.defineProperty(exports, "GOAL_CONTINUATION_MARKER", {
2418
2245
  });
2419
2246
  Object.defineProperty(exports, "JudgeCredentialError", {
2420
2247
  enumerable: true,
2421
- get: function () { return chunkGWC3HADL_cjs.JudgeCredentialError; }
2248
+ get: function () { return chunk3NSS2OIZ_cjs.JudgeCredentialError; }
2422
2249
  });
2423
2250
  Object.defineProperty(exports, "GenerateObjectError", {
2424
2251
  enumerable: true,
2425
- get: function () { return chunkP6A3M6VD_cjs.GenerateObjectError; }
2252
+ get: function () { return chunkSZVR77EJ_cjs.GenerateObjectError; }
2426
2253
  });
2427
2254
  Object.defineProperty(exports, "Workflow", {
2428
2255
  enumerable: true,
2429
- get: function () { return chunk6SBW4QR2_cjs.Workflow; }
2256
+ get: function () { return chunkYML4ME27_cjs.Workflow; }
2430
2257
  });
2431
2258
  Object.defineProperty(exports, "agentStep", {
2432
2259
  enumerable: true,
2433
- get: function () { return chunk6SBW4QR2_cjs.agentStep; }
2260
+ get: function () { return chunkYML4ME27_cjs.agentStep; }
2434
2261
  });
2435
2262
  Object.defineProperty(exports, "fn", {
2436
2263
  enumerable: true,
2437
- get: function () { return chunk6SBW4QR2_cjs.fn; }
2264
+ get: function () { return chunkYML4ME27_cjs.fn; }
2438
2265
  });
2439
2266
  Object.defineProperty(exports, "Cron", {
2440
2267
  enumerable: true,
2441
- get: function () { return chunkCWHTMNNK_cjs.Cron; }
2268
+ get: function () { return chunkQ7LPTOD6_cjs.Cron; }
2442
2269
  });
2443
2270
  Object.defineProperty(exports, "Agent", {
2444
2271
  enumerable: true,
2445
- get: function () { return chunkAH6WD7JR_cjs.Agent; }
2272
+ get: function () { return chunkZMRD5DZQ_cjs.Agent; }
2446
2273
  });
2447
2274
  Object.defineProperty(exports, "AgentBuilder", {
2448
2275
  enumerable: true,
2449
- get: function () { return chunkAH6WD7JR_cjs.AgentBuilder; }
2276
+ get: function () { return chunkZMRD5DZQ_cjs.AgentBuilder; }
2450
2277
  });
2451
2278
  Object.defineProperty(exports, "Tool", {
2452
2279
  enumerable: true,
2453
- get: function () { return chunkAH6WD7JR_cjs.Tool; }
2280
+ get: function () { return chunkZMRD5DZQ_cjs.Tool; }
2454
2281
  });
2455
2282
  Object.defineProperty(exports, "ToolError", {
2456
2283
  enumerable: true,
2457
- get: function () { return chunkAH6WD7JR_cjs.ToolError; }
2284
+ get: function () { return chunkZMRD5DZQ_cjs.ToolError; }
2458
2285
  });
2459
2286
  Object.defineProperty(exports, "UsageAccumulator", {
2460
2287
  enumerable: true,
2461
- get: function () { return chunkAH6WD7JR_cjs.UsageAccumulator; }
2288
+ get: function () { return chunkZMRD5DZQ_cjs.UsageAccumulator; }
2462
2289
  });
2463
2290
  Object.defineProperty(exports, "computeCost", {
2464
2291
  enumerable: true,
2465
- get: function () { return chunkAH6WD7JR_cjs.computeCost; }
2292
+ get: function () { return chunkZMRD5DZQ_cjs.computeCost; }
2466
2293
  });
2467
2294
  Object.defineProperty(exports, "getPricingEntry", {
2468
2295
  enumerable: true,
2469
- get: function () { return chunkAH6WD7JR_cjs.getPricingEntry; }
2296
+ get: function () { return chunkZMRD5DZQ_cjs.getPricingEntry; }
2470
2297
  });
2471
2298
  Object.defineProperty(exports, "emitRunEvent", {
2472
2299
  enumerable: true,
2473
- get: function () { return chunkNGESVVJN_cjs.emitRunEvent; }
2300
+ get: function () { return chunk3FFAEAUJ_cjs.emitRunEvent; }
2474
2301
  });
2475
2302
  Object.defineProperty(exports, "withCwdMutex", {
2476
2303
  enumerable: true,
@@ -2478,83 +2305,83 @@ Object.defineProperty(exports, "withCwdMutex", {
2478
2305
  });
2479
2306
  Object.defineProperty(exports, "TASK_RESERVED_PREFIXES", {
2480
2307
  enumerable: true,
2481
- get: function () { return chunk2C72DXQF_cjs.TASK_RESERVED_PREFIXES; }
2308
+ get: function () { return chunkRFMBZPOW_cjs.TASK_RESERVED_PREFIXES; }
2482
2309
  });
2483
2310
  Object.defineProperty(exports, "isValidTaskId", {
2484
2311
  enumerable: true,
2485
- get: function () { return chunk2C72DXQF_cjs.isValidTaskId; }
2312
+ get: function () { return chunkRFMBZPOW_cjs.isValidTaskId; }
2486
2313
  });
2487
2314
  Object.defineProperty(exports, "AgentDisposedError", {
2488
2315
  enumerable: true,
2489
- get: function () { return chunkK3FW2XZD_cjs.AgentDisposedError; }
2316
+ get: function () { return chunk4ZHTIJNE_cjs.AgentDisposedError; }
2490
2317
  });
2491
2318
  Object.defineProperty(exports, "AgentRunError", {
2492
2319
  enumerable: true,
2493
- get: function () { return chunkK3FW2XZD_cjs.AgentRunError; }
2320
+ get: function () { return chunk4ZHTIJNE_cjs.AgentRunError; }
2494
2321
  });
2495
2322
  Object.defineProperty(exports, "AuthenticationError", {
2496
2323
  enumerable: true,
2497
- get: function () { return chunkK3FW2XZD_cjs.AuthenticationError; }
2324
+ get: function () { return chunk4ZHTIJNE_cjs.AuthenticationError; }
2498
2325
  });
2499
2326
  Object.defineProperty(exports, "BudgetExceededError", {
2500
2327
  enumerable: true,
2501
- get: function () { return chunkK3FW2XZD_cjs.BudgetExceededError; }
2328
+ get: function () { return chunk4ZHTIJNE_cjs.BudgetExceededError; }
2502
2329
  });
2503
2330
  Object.defineProperty(exports, "ConfigurationError", {
2504
2331
  enumerable: true,
2505
- get: function () { return chunkK3FW2XZD_cjs.ConfigurationError; }
2332
+ get: function () { return chunk4ZHTIJNE_cjs.ConfigurationError; }
2506
2333
  });
2507
2334
  Object.defineProperty(exports, "IntegrationNotConnectedError", {
2508
2335
  enumerable: true,
2509
- get: function () { return chunkK3FW2XZD_cjs.IntegrationNotConnectedError; }
2336
+ get: function () { return chunk4ZHTIJNE_cjs.IntegrationNotConnectedError; }
2510
2337
  });
2511
2338
  Object.defineProperty(exports, "InvalidTaskIdError", {
2512
2339
  enumerable: true,
2513
- get: function () { return chunkK3FW2XZD_cjs.InvalidTaskIdError; }
2340
+ get: function () { return chunk4ZHTIJNE_cjs.InvalidTaskIdError; }
2514
2341
  });
2515
2342
  Object.defineProperty(exports, "MemoryAdapterError", {
2516
2343
  enumerable: true,
2517
- get: function () { return chunkK3FW2XZD_cjs.MemoryAdapterError; }
2344
+ get: function () { return chunk4ZHTIJNE_cjs.MemoryAdapterError; }
2518
2345
  });
2519
2346
  Object.defineProperty(exports, "NetworkError", {
2520
2347
  enumerable: true,
2521
- get: function () { return chunkK3FW2XZD_cjs.NetworkError; }
2348
+ get: function () { return chunk4ZHTIJNE_cjs.NetworkError; }
2522
2349
  });
2523
2350
  Object.defineProperty(exports, "RateLimitError", {
2524
2351
  enumerable: true,
2525
- get: function () { return chunkK3FW2XZD_cjs.RateLimitError; }
2352
+ get: function () { return chunk4ZHTIJNE_cjs.RateLimitError; }
2526
2353
  });
2527
2354
  Object.defineProperty(exports, "TaskNotFoundError", {
2528
2355
  enumerable: true,
2529
- get: function () { return chunkK3FW2XZD_cjs.TaskNotFoundError; }
2356
+ get: function () { return chunk4ZHTIJNE_cjs.TaskNotFoundError; }
2530
2357
  });
2531
2358
  Object.defineProperty(exports, "TheokitAgentError", {
2532
2359
  enumerable: true,
2533
- get: function () { return chunkK3FW2XZD_cjs.TheokitAgentError; }
2360
+ get: function () { return chunk4ZHTIJNE_cjs.TheokitAgentError; }
2534
2361
  });
2535
2362
  Object.defineProperty(exports, "UnknownAgentError", {
2536
2363
  enumerable: true,
2537
- get: function () { return chunkK3FW2XZD_cjs.UnknownAgentError; }
2364
+ get: function () { return chunk4ZHTIJNE_cjs.UnknownAgentError; }
2538
2365
  });
2539
2366
  Object.defineProperty(exports, "UnsupportedBudgetOperationError", {
2540
2367
  enumerable: true,
2541
- get: function () { return chunkK3FW2XZD_cjs.UnsupportedBudgetOperationError; }
2368
+ get: function () { return chunk4ZHTIJNE_cjs.UnsupportedBudgetOperationError; }
2542
2369
  });
2543
2370
  Object.defineProperty(exports, "UnsupportedRunOperationError", {
2544
2371
  enumerable: true,
2545
- get: function () { return chunkK3FW2XZD_cjs.UnsupportedRunOperationError; }
2372
+ get: function () { return chunk4ZHTIJNE_cjs.UnsupportedRunOperationError; }
2546
2373
  });
2547
2374
  Object.defineProperty(exports, "UnsupportedTaskOperationError", {
2548
2375
  enumerable: true,
2549
- get: function () { return chunkK3FW2XZD_cjs.UnsupportedTaskOperationError; }
2376
+ get: function () { return chunk4ZHTIJNE_cjs.UnsupportedTaskOperationError; }
2550
2377
  });
2551
2378
  Object.defineProperty(exports, "isTransientError", {
2552
2379
  enumerable: true,
2553
- get: function () { return chunkK3FW2XZD_cjs.isTransientError; }
2380
+ get: function () { return chunk4ZHTIJNE_cjs.isTransientError; }
2554
2381
  });
2555
2382
  Object.defineProperty(exports, "setDiagnosticsSink", {
2556
2383
  enumerable: true,
2557
- get: function () { return chunkNUKRL3I6_cjs.setDiagnosticsSink; }
2384
+ get: function () { return chunkEG4QM7ZJ_cjs.setDiagnosticsSink; }
2558
2385
  });
2559
2386
  exports.AgentFactory = AgentFactory;
2560
2387
  exports.Budget = Budget;