@theokit/sdk 4.37.2 → 4.39.0

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 (457) hide show
  1. package/CHANGELOG.md +309 -72
  2. package/dist/a2a/index.cjs +3 -3
  3. package/dist/a2a/index.js +1 -1
  4. package/dist/a2a/subagent.d.cts +1 -0
  5. package/dist/a2a/subagent.d.ts +1 -0
  6. package/dist/{agent-SmxntivO.d.ts → agent-D7bRK9Kg.d.cts} +108 -41
  7. package/dist/agent-I3EZZR6S.cjs +55 -0
  8. package/dist/{agent-IE6IE4NW.cjs.map → agent-I3EZZR6S.cjs.map} +1 -1
  9. package/dist/agent-KKZYLY5D.js +46 -0
  10. package/dist/{agent-DW2J37IH.js.map → agent-KKZYLY5D.js.map} +1 -1
  11. package/dist/{agent-DGv1-d81.d.cts → agent-ZCZa7YQv.d.ts} +108 -41
  12. package/dist/agent-session-store-N4TVKHBU.cjs +23 -0
  13. package/dist/agent-session-store-N4TVKHBU.cjs.map +1 -0
  14. package/dist/agent-session-store-RHMHP5DG.js +6 -0
  15. package/dist/agent-session-store-RHMHP5DG.js.map +1 -0
  16. package/dist/agent.d.ts +38 -2
  17. package/dist/auth/index.cjs +15 -15
  18. package/dist/auth/index.js +4 -4
  19. package/dist/{batch-SY5GZLFD.js → batch-6KQM3EBA.js} +12 -12
  20. package/dist/batch-6KQM3EBA.js.map +1 -0
  21. package/dist/{batch-3SEPDXCU.cjs → batch-X6JKGDPK.cjs} +26 -26
  22. package/dist/batch-X6JKGDPK.cjs.map +1 -0
  23. package/dist/chunk-2RW7K6FN.cjs +34 -0
  24. package/dist/chunk-2RW7K6FN.cjs.map +1 -0
  25. package/dist/chunk-3I4B3OIX.js +105 -0
  26. package/dist/chunk-3I4B3OIX.js.map +1 -0
  27. package/dist/{chunk-2WFB5ZOX.js → chunk-42IFCKQZ.js} +5 -5
  28. package/dist/{chunk-2WFB5ZOX.js.map → chunk-42IFCKQZ.js.map} +1 -1
  29. package/dist/{chunk-DCJ5MCJ3.js → chunk-4F7JQZOX.js} +9 -36
  30. package/dist/chunk-4F7JQZOX.js.map +1 -0
  31. package/dist/{chunk-JNIWFCKI.js → chunk-4JSZYSGW.js} +3 -3
  32. package/dist/{chunk-JNIWFCKI.js.map → chunk-4JSZYSGW.js.map} +1 -1
  33. package/dist/{chunk-EEZ7CFMM.js → chunk-5KOW3GLE.js} +2 -2
  34. package/dist/chunk-5KOW3GLE.js.map +1 -0
  35. package/dist/{chunk-6VP3XGEK.js → chunk-65ONFZWM.js} +12 -11
  36. package/dist/chunk-65ONFZWM.js.map +1 -0
  37. package/dist/{chunk-CSZRJ4RE.js → chunk-6EEYRFJC.js} +5 -5
  38. package/dist/{chunk-CSZRJ4RE.js.map → chunk-6EEYRFJC.js.map} +1 -1
  39. package/dist/{chunk-FAY3QDGC.cjs → chunk-6LGQECT7.cjs} +11 -11
  40. package/dist/{chunk-FAY3QDGC.cjs.map → chunk-6LGQECT7.cjs.map} +1 -1
  41. package/dist/{chunk-PAEJPLVN.cjs → chunk-6NEHIHFU.cjs} +4 -4
  42. package/dist/{chunk-PAEJPLVN.cjs.map → chunk-6NEHIHFU.cjs.map} +1 -1
  43. package/dist/chunk-6YNYA7GD.cjs +103 -0
  44. package/dist/chunk-6YNYA7GD.cjs.map +1 -0
  45. package/dist/chunk-74D7KSBP.cjs +112 -0
  46. package/dist/chunk-74D7KSBP.cjs.map +1 -0
  47. package/dist/{chunk-FK4EJD2I.cjs → chunk-75DSEWTJ.cjs} +7 -7
  48. package/dist/{chunk-FK4EJD2I.cjs.map → chunk-75DSEWTJ.cjs.map} +1 -1
  49. package/dist/{chunk-SWIBQFPH.cjs → chunk-7OLG7VI4.cjs} +4 -4
  50. package/dist/{chunk-SWIBQFPH.cjs.map → chunk-7OLG7VI4.cjs.map} +1 -1
  51. package/dist/chunk-7U2HAAWB.cjs +199 -0
  52. package/dist/chunk-7U2HAAWB.cjs.map +1 -0
  53. package/dist/{chunk-YBFDBOUN.cjs → chunk-7YBJZS5P.cjs} +8 -8
  54. package/dist/{chunk-YBFDBOUN.cjs.map → chunk-7YBJZS5P.cjs.map} +1 -1
  55. package/dist/{chunk-GLUWH6JO.js → chunk-AECV3G5Z.js} +4 -4
  56. package/dist/{chunk-GLUWH6JO.js.map → chunk-AECV3G5Z.js.map} +1 -1
  57. package/dist/{chunk-UQPDFW4E.js → chunk-AR5MQZ3J.js} +3 -3
  58. package/dist/{chunk-UQPDFW4E.js.map → chunk-AR5MQZ3J.js.map} +1 -1
  59. package/dist/{chunk-G2F67XUR.cjs → chunk-B4YA6BRS.cjs} +13 -14
  60. package/dist/chunk-B4YA6BRS.cjs.map +1 -0
  61. package/dist/{chunk-LTCOPATU.cjs → chunk-BCQ3E2ZG.cjs} +12 -3
  62. package/dist/chunk-BCQ3E2ZG.cjs.map +1 -0
  63. package/dist/{chunk-ALU3KC4G.cjs → chunk-BPN5ONSW.cjs} +223 -277
  64. package/dist/chunk-BPN5ONSW.cjs.map +1 -0
  65. package/dist/{chunk-YHZXBDAW.js → chunk-BQDUEG4C.js} +16 -16
  66. package/dist/{chunk-YHZXBDAW.js.map → chunk-BQDUEG4C.js.map} +1 -1
  67. package/dist/{chunk-IT3PWBW4.cjs → chunk-BURYFNOM.cjs} +2 -2
  68. package/dist/chunk-BURYFNOM.cjs.map +1 -0
  69. package/dist/{chunk-BJMKQOY2.cjs → chunk-C7OP3FAK.cjs} +47 -11
  70. package/dist/chunk-C7OP3FAK.cjs.map +1 -0
  71. package/dist/{chunk-XAYVHS2B.cjs → chunk-CEIHCKTO.cjs} +4 -4
  72. package/dist/chunk-CEIHCKTO.cjs.map +1 -0
  73. package/dist/{chunk-2423XDPT.cjs → chunk-CN6UX5EV.cjs} +28 -56
  74. package/dist/chunk-CN6UX5EV.cjs.map +1 -0
  75. package/dist/{chunk-VNNK6AKU.js → chunk-D7IULBF2.js} +3 -3
  76. package/dist/chunk-D7IULBF2.js.map +1 -0
  77. package/dist/chunk-DCXRHCZJ.cjs +118 -0
  78. package/dist/chunk-DCXRHCZJ.cjs.map +1 -0
  79. package/dist/{chunk-ICYBIC6N.cjs → chunk-DGLLVCNB.cjs} +4 -4
  80. package/dist/chunk-DGLLVCNB.cjs.map +1 -0
  81. package/dist/{chunk-I35DI7ES.js → chunk-DKFGUOWL.js} +3 -3
  82. package/dist/{chunk-I35DI7ES.js.map → chunk-DKFGUOWL.js.map} +1 -1
  83. package/dist/{chunk-TQI3KRXZ.cjs → chunk-DMTZ3FII.cjs} +18 -18
  84. package/dist/{chunk-TQI3KRXZ.cjs.map → chunk-DMTZ3FII.cjs.map} +1 -1
  85. package/dist/{chunk-QFMXXUUT.js → chunk-DU7DE543.js} +3 -3
  86. package/dist/{chunk-QFMXXUUT.js.map → chunk-DU7DE543.js.map} +1 -1
  87. package/dist/{chunk-W4QN5CMG.cjs → chunk-DWY25VLP.cjs} +9 -9
  88. package/dist/{chunk-W4QN5CMG.cjs.map → chunk-DWY25VLP.cjs.map} +1 -1
  89. package/dist/chunk-E2FFG33C.js +109 -0
  90. package/dist/chunk-E2FFG33C.js.map +1 -0
  91. package/dist/{chunk-QUFSDDNU.cjs → chunk-E4IUN3JB.cjs} +15 -15
  92. package/dist/{chunk-QUFSDDNU.cjs.map → chunk-E4IUN3JB.cjs.map} +1 -1
  93. package/dist/{chunk-THEYGCYS.cjs → chunk-ECHGWE47.cjs} +4 -4
  94. package/dist/chunk-ECHGWE47.cjs.map +1 -0
  95. package/dist/{chunk-U2WLFOA3.cjs → chunk-ECW2MLEW.cjs} +4 -4
  96. package/dist/{chunk-U2WLFOA3.cjs.map → chunk-ECW2MLEW.cjs.map} +1 -1
  97. package/dist/{chunk-MXSMAGDU.js → chunk-ET6PHZRX.js} +33 -26
  98. package/dist/chunk-ET6PHZRX.js.map +1 -0
  99. package/dist/{chunk-G6AASL5T.cjs → chunk-FRUBE44B.cjs} +24 -24
  100. package/dist/{chunk-G6AASL5T.cjs.map → chunk-FRUBE44B.cjs.map} +1 -1
  101. package/dist/{chunk-3ILFUXNE.cjs → chunk-FWBSDQZ7.cjs} +5 -5
  102. package/dist/{chunk-3ILFUXNE.cjs.map → chunk-FWBSDQZ7.cjs.map} +1 -1
  103. package/dist/{chunk-7DXLNNKH.cjs → chunk-G2Q3ZC6C.cjs} +4 -4
  104. package/dist/{chunk-7DXLNNKH.cjs.map → chunk-G2Q3ZC6C.cjs.map} +1 -1
  105. package/dist/{chunk-56ZM6P7Z.cjs → chunk-G4XUXSRN.cjs} +12 -12
  106. package/dist/chunk-G4XUXSRN.cjs.map +1 -0
  107. package/dist/{chunk-VYJSHGAY.js → chunk-GIRD3RWH.js} +422 -295
  108. package/dist/chunk-GIRD3RWH.js.map +1 -0
  109. package/dist/{chunk-NQ4AC2U4.cjs → chunk-HIQFVHC6.cjs} +9 -9
  110. package/dist/{chunk-NQ4AC2U4.cjs.map → chunk-HIQFVHC6.cjs.map} +1 -1
  111. package/dist/{chunk-EXQV452X.js → chunk-HWNVAUK4.js} +3 -3
  112. package/dist/{chunk-EXQV452X.js.map → chunk-HWNVAUK4.js.map} +1 -1
  113. package/dist/{chunk-P34DHHYQ.cjs → chunk-I53ZQHU6.cjs} +34 -27
  114. package/dist/chunk-I53ZQHU6.cjs.map +1 -0
  115. package/dist/{chunk-MHCKWQR3.cjs → chunk-IHFNRNTJ.cjs} +8 -8
  116. package/dist/{chunk-MHCKWQR3.cjs.map → chunk-IHFNRNTJ.cjs.map} +1 -1
  117. package/dist/{chunk-W52DKZBR.cjs → chunk-INSFS5GT.cjs} +680 -553
  118. package/dist/chunk-INSFS5GT.cjs.map +1 -0
  119. package/dist/{chunk-TAPQWDW2.js → chunk-IVSD7L22.js} +12 -4
  120. package/dist/chunk-IVSD7L22.js.map +1 -0
  121. package/dist/{chunk-WDGCZDRG.js → chunk-J3UK2GMN.js} +3 -3
  122. package/dist/{chunk-WDGCZDRG.js.map → chunk-J3UK2GMN.js.map} +1 -1
  123. package/dist/{chunk-4YB7B3RP.cjs → chunk-J6T5LWJ4.cjs} +15 -14
  124. package/dist/chunk-J6T5LWJ4.cjs.map +1 -0
  125. package/dist/{chunk-XAEAMI5H.js → chunk-JRLXEYR4.js} +21 -5
  126. package/dist/chunk-JRLXEYR4.js.map +1 -0
  127. package/dist/{chunk-ZJN6NTHE.js → chunk-JZUPMTJY.js} +3 -3
  128. package/dist/{chunk-ZJN6NTHE.js.map → chunk-JZUPMTJY.js.map} +1 -1
  129. package/dist/{chunk-M5ZQBOIZ.js → chunk-KE6XKRLQ.js} +3 -3
  130. package/dist/{chunk-M5ZQBOIZ.js.map → chunk-KE6XKRLQ.js.map} +1 -1
  131. package/dist/chunk-KGRIHEDT.js +110 -0
  132. package/dist/chunk-KGRIHEDT.js.map +1 -0
  133. package/dist/{chunk-T4QWDOG6.js → chunk-KWUNN5J2.js} +5 -5
  134. package/dist/{chunk-T4QWDOG6.js.map → chunk-KWUNN5J2.js.map} +1 -1
  135. package/dist/{chunk-56OXYUZE.js → chunk-KX7JV5KM.js} +3 -3
  136. package/dist/chunk-KX7JV5KM.js.map +1 -0
  137. package/dist/{chunk-D4ZUJTFB.cjs → chunk-LALG2K33.cjs} +8 -8
  138. package/dist/{chunk-D4ZUJTFB.cjs.map → chunk-LALG2K33.cjs.map} +1 -1
  139. package/dist/{chunk-QGDKZDPN.js → chunk-LGILIGV3.js} +3 -3
  140. package/dist/{chunk-QGDKZDPN.js.map → chunk-LGILIGV3.js.map} +1 -1
  141. package/dist/{chunk-HEN5WXXI.js → chunk-LJX2SQV2.js} +6 -6
  142. package/dist/{chunk-HEN5WXXI.js.map → chunk-LJX2SQV2.js.map} +1 -1
  143. package/dist/{chunk-SDIBMLL5.js → chunk-MC5EINBV.js} +44 -8
  144. package/dist/chunk-MC5EINBV.js.map +1 -0
  145. package/dist/{chunk-F6Y4IEQM.js → chunk-ML5A5DOJ.js} +4 -4
  146. package/dist/{chunk-F6Y4IEQM.js.map → chunk-ML5A5DOJ.js.map} +1 -1
  147. package/dist/{chunk-6EDQBX7U.cjs → chunk-N475ETD6.cjs} +17 -17
  148. package/dist/{chunk-6EDQBX7U.cjs.map → chunk-N475ETD6.cjs.map} +1 -1
  149. package/dist/{chunk-YPQF26X7.cjs → chunk-OBA6YK2R.cjs} +2 -2
  150. package/dist/chunk-OBA6YK2R.cjs.map +1 -0
  151. package/dist/chunk-OXNYIMZZ.js +31 -0
  152. package/dist/chunk-OXNYIMZZ.js.map +1 -0
  153. package/dist/{chunk-NFCKEBHI.js → chunk-PI4RO4GR.js} +3 -3
  154. package/dist/{chunk-NFCKEBHI.js.map → chunk-PI4RO4GR.js.map} +1 -1
  155. package/dist/{chunk-2ONFGMBV.js → chunk-PY2RQOA7.js} +2 -2
  156. package/dist/chunk-PY2RQOA7.js.map +1 -0
  157. package/dist/chunk-QKE556YD.js +197 -0
  158. package/dist/chunk-QKE556YD.js.map +1 -0
  159. package/dist/{chunk-FV3YEMQ7.js → chunk-RP5HQVLD.js} +13 -14
  160. package/dist/chunk-RP5HQVLD.js.map +1 -0
  161. package/dist/chunk-SCFW5MJZ.js +100 -0
  162. package/dist/chunk-SCFW5MJZ.js.map +1 -0
  163. package/dist/{chunk-CD73YHEH.js → chunk-SG5ZWT6C.js} +3 -3
  164. package/dist/{chunk-CD73YHEH.js.map → chunk-SG5ZWT6C.js.map} +1 -1
  165. package/dist/{chunk-MRODLUGY.cjs → chunk-TIMPJL5V.cjs} +4 -4
  166. package/dist/{chunk-MRODLUGY.cjs.map → chunk-TIMPJL5V.cjs.map} +1 -1
  167. package/dist/{chunk-77WHPVXE.js → chunk-TOTP24P6.js} +4 -4
  168. package/dist/chunk-TOTP24P6.js.map +1 -0
  169. package/dist/{chunk-3O2ELBST.cjs → chunk-USZTVNUQ.cjs} +5 -5
  170. package/dist/{chunk-3O2ELBST.cjs.map → chunk-USZTVNUQ.cjs.map} +1 -1
  171. package/dist/{chunk-YDLNI7J6.js → chunk-V2RBCCN5.js} +3 -3
  172. package/dist/chunk-V2RBCCN5.js.map +1 -0
  173. package/dist/{chunk-NNSKJCBM.cjs → chunk-VJYSQXN6.cjs} +10 -10
  174. package/dist/{chunk-NNSKJCBM.cjs.map → chunk-VJYSQXN6.cjs.map} +1 -1
  175. package/dist/{chunk-GM7QDQ24.cjs → chunk-W4WKVOOQ.cjs} +11 -11
  176. package/dist/{chunk-GM7QDQ24.cjs.map → chunk-W4WKVOOQ.cjs.map} +1 -1
  177. package/dist/chunk-XYOHKCYG.cjs +109 -0
  178. package/dist/chunk-XYOHKCYG.cjs.map +1 -0
  179. package/dist/{chunk-ZW345YOI.js → chunk-YP67XZES.js} +4 -4
  180. package/dist/{chunk-ZW345YOI.js.map → chunk-YP67XZES.js.map} +1 -1
  181. package/dist/{chunk-YCXMSDSP.js → chunk-YRXY2A5L.js} +4 -4
  182. package/dist/{chunk-YCXMSDSP.js.map → chunk-YRXY2A5L.js.map} +1 -1
  183. package/dist/{chunk-IEUDKUPM.cjs → chunk-Z2CUEBXV.cjs} +25 -9
  184. package/dist/chunk-Z2CUEBXV.cjs.map +1 -0
  185. package/dist/{chunk-GL7CFBVC.js → chunk-ZYB6B7QJ.js} +112 -165
  186. package/dist/chunk-ZYB6B7QJ.js.map +1 -0
  187. package/dist/compact-session-PYEC3NZV.js +18 -0
  188. package/dist/{compact-session-WNKKIIDW.js.map → compact-session-PYEC3NZV.js.map} +1 -1
  189. package/dist/compact-session-VVT6IBJG.cjs +55 -0
  190. package/dist/{compact-session-H5TKLD55.cjs.map → compact-session-VVT6IBJG.cjs.map} +1 -1
  191. package/dist/compaction.cjs +19 -19
  192. package/dist/compaction.d.cts +9 -9
  193. package/dist/compaction.d.ts +9 -9
  194. package/dist/compaction.js +3 -3
  195. package/dist/concurrency.cjs +6 -6
  196. package/dist/concurrency.js +4 -4
  197. package/dist/context-2FZSC6VQ.cjs +22 -0
  198. package/dist/{context-ZV33V4DC.cjs.map → context-2FZSC6VQ.cjs.map} +1 -1
  199. package/dist/context-ATJJAFOS.js +5 -0
  200. package/dist/{context-VAYLPT4O.js.map → context-ATJJAFOS.js.map} +1 -1
  201. package/dist/{cron-Dx7B-3WB.d.ts → cron-Bx7tzm5R.d.ts} +54 -2
  202. package/dist/{cron-BiK_aNJI.d.cts → cron-D-DVjGQe.d.cts} +54 -2
  203. package/dist/cron.cjs +34 -30
  204. package/dist/cron.d.cts +3 -3
  205. package/dist/cron.d.ts +3 -3
  206. package/dist/cron.js +33 -29
  207. package/dist/{errors-DyVbXdR4.d.cts → errors-DMY-gLSK.d.cts} +1 -1
  208. package/dist/{errors-Cua4WC9H.d.ts → errors-DjBQ4Tn8.d.ts} +1 -1
  209. package/dist/errors.cjs +21 -21
  210. package/dist/errors.d.cts +2 -2
  211. package/dist/errors.d.ts +2 -2
  212. package/dist/errors.js +2 -2
  213. package/dist/eval.cjs +42 -37
  214. package/dist/eval.cjs.map +1 -1
  215. package/dist/eval.js +38 -33
  216. package/dist/eval.js.map +1 -1
  217. package/dist/{executor-OZSYXDKF.cjs → executor-BMRICN46.cjs} +26 -25
  218. package/dist/executor-BMRICN46.cjs.map +1 -0
  219. package/dist/{executor-PAH72CB5.js → executor-T65PPOPT.js} +10 -9
  220. package/dist/executor-T65PPOPT.js.map +1 -0
  221. package/dist/filesystem/index.cjs +7 -7
  222. package/dist/filesystem/index.js +3 -3
  223. package/dist/fs-session-store-J5MCFFUM.cjs +19 -0
  224. package/dist/{fs-session-store-7E7UPLF2.cjs.map → fs-session-store-J5MCFFUM.cjs.map} +1 -1
  225. package/dist/fs-session-store-O6FNHECD.js +10 -0
  226. package/dist/{fs-session-store-6MY7PNI2.js.map → fs-session-store-O6FNHECD.js.map} +1 -1
  227. package/dist/generate-object-UF6WIZLF.cjs +20 -0
  228. package/dist/{generate-object-5SCEH2EE.cjs.map → generate-object-UF6WIZLF.cjs.map} +1 -1
  229. package/dist/generate-object-XDCBYVK3.js +7 -0
  230. package/dist/{generate-object-I7UD4NWN.js.map → generate-object-XDCBYVK3.js.map} +1 -1
  231. package/dist/index-manager-N7RQYUKT.cjs +20 -0
  232. package/dist/{index-manager-R6ZJFEZF.cjs.map → index-manager-N7RQYUKT.cjs.map} +1 -1
  233. package/dist/index-manager-ZVZUHPP7.js +11 -0
  234. package/dist/{index-manager-KKAK7NT3.js.map → index-manager-ZVZUHPP7.js.map} +1 -1
  235. package/dist/index.cjs +154 -148
  236. package/dist/index.cjs.map +1 -1
  237. package/dist/index.d.cts +201 -43
  238. package/dist/index.d.ts +201 -43
  239. package/dist/index.js +62 -59
  240. package/dist/index.js.map +1 -1
  241. package/dist/{inject-session-UXNJQTZ6.js → inject-session-GQMTDZUN.js} +8 -7
  242. package/dist/inject-session-GQMTDZUN.js.map +1 -0
  243. package/dist/{inject-session-DM4SKTZO.cjs → inject-session-LFCYVSLJ.cjs} +11 -10
  244. package/dist/inject-session-LFCYVSLJ.cjs.map +1 -0
  245. package/dist/internal/agent-loop/live-events.d.ts +46 -0
  246. package/dist/internal/agent-loop/loop-thinking-steps.d.ts +28 -0
  247. package/dist/internal/agent-loop/message-builders.d.ts +12 -3
  248. package/dist/internal/budget/compute-cost.d.ts +1 -1
  249. package/dist/internal/diagnostics.d.ts +46 -31
  250. package/dist/internal/error-mappers/anthropic.d.ts +1 -1
  251. package/dist/internal/global-singleton.d.ts +7 -7
  252. package/dist/internal/judge/judge-call.d.ts +14 -14
  253. package/dist/internal/llm/anthropic-shared.d.ts +4 -4
  254. package/dist/internal/llm/retrying-client.d.ts +29 -29
  255. package/dist/internal/llm/transport-error.d.ts +2 -2
  256. package/dist/internal/llm/types.d.ts +49 -9
  257. package/dist/internal/local-agent/mcp-pool.d.ts +7 -3
  258. package/dist/internal/memory/adapters/azure-openai-embedding.d.cts +2 -0
  259. package/dist/internal/memory/adapters/catalog.d.cts +1 -0
  260. package/dist/internal/memory/adapters/cohere-embedding.d.cts +2 -0
  261. package/dist/internal/memory/adapters/deepinfra-embedding.d.cts +2 -0
  262. package/dist/internal/memory/adapters/gemini-embedding.d.cts +2 -0
  263. package/dist/internal/memory/adapters/index.cjs +28 -0
  264. package/dist/internal/memory/adapters/index.cjs.map +1 -0
  265. package/dist/internal/memory/adapters/index.d.cts +16 -0
  266. package/dist/internal/memory/adapters/index.d.ts +16 -0
  267. package/dist/internal/memory/adapters/index.js +11 -0
  268. package/dist/internal/memory/adapters/index.js.map +1 -0
  269. package/dist/internal/memory/adapters/jina-embedding.d.cts +2 -0
  270. package/dist/internal/memory/adapters/mistral-embedding.d.cts +2 -0
  271. package/dist/internal/memory/adapters/ollama-embedding.d.cts +34 -0
  272. package/dist/internal/memory/adapters/openai-compatible.d.cts +51 -0
  273. package/dist/internal/memory/adapters/openai-compatible.d.ts +28 -0
  274. package/dist/internal/memory/adapters/openai-embedding.d.cts +2 -0
  275. package/dist/internal/memory/adapters/openrouter-embedding.d.cts +2 -0
  276. package/dist/internal/memory/adapters/voyage-embedding.d.cts +2 -0
  277. package/dist/internal/memory/dreaming/diary.d.ts +4 -0
  278. package/dist/internal/memory/dreaming/phases.d.ts +15 -0
  279. package/dist/internal/memory/dreaming/run.d.ts +10 -0
  280. package/dist/internal/memory/migrate-sqlite-to-lance.d.ts +15 -0
  281. package/dist/internal/memory/sdk-memory-peer-loader.d.ts +21 -0
  282. package/dist/internal/persistence/exclusive-create.d.cts +2 -2
  283. package/dist/internal/persistence/exclusive-create.d.ts +2 -2
  284. package/dist/internal/persistence/fs-session-store.d.cts +18 -18
  285. package/dist/internal/persistence/fs-session-store.d.ts +18 -18
  286. package/dist/internal/persistence/index.cjs +25 -25
  287. package/dist/internal/persistence/index.cjs.map +1 -1
  288. package/dist/internal/persistence/index.js +6 -6
  289. package/dist/internal/persistence/index.js.map +1 -1
  290. package/dist/internal/persistence/paths.d.cts +7 -7
  291. package/dist/internal/persistence/paths.d.ts +7 -7
  292. package/dist/internal/persistence/session-transcript.d.cts +13 -7
  293. package/dist/internal/persistence/session-transcript.d.ts +13 -7
  294. package/dist/internal/persistence/session-writer.d.cts +30 -13
  295. package/dist/internal/persistence/session-writer.d.ts +30 -13
  296. package/dist/internal/runtime/concurrency/subagent-credentials.d.ts +35 -0
  297. package/dist/internal/runtime/fixtures/fixture-run-base.d.ts +45 -13
  298. package/dist/internal/runtime/lifecycle/goal-marker.d.ts +8 -8
  299. package/dist/internal/security/index.cjs +13 -13
  300. package/dist/internal/security/index.js +3 -3
  301. package/dist/internal/session/agent-session-store.d.ts +1 -0
  302. package/dist/internal/session/agent-session.d.ts +14 -14
  303. package/dist/internal/session/session-cache.d.ts +9 -9
  304. package/dist/internal/session/session-types.d.ts +6 -1
  305. package/dist/judge-call-NA2G6ZMJ.js +5 -0
  306. package/dist/{judge-call-TAEIXMYG.js.map → judge-call-NA2G6ZMJ.js.map} +1 -1
  307. package/dist/judge-call-U2D33JOW.cjs +22 -0
  308. package/dist/{judge-call-SP3G3X2Y.cjs.map → judge-call-U2D33JOW.cjs.map} +1 -1
  309. package/dist/models.cjs +20 -20
  310. package/dist/models.cjs.map +1 -1
  311. package/dist/models.js +5 -5
  312. package/dist/models.js.map +1 -1
  313. package/dist/path-safety.cjs +10 -10
  314. package/dist/path-safety.js +3 -3
  315. package/dist/persistence.cjs +43 -43
  316. package/dist/persistence.cjs.map +1 -1
  317. package/dist/persistence.d.cts +1 -1
  318. package/dist/persistence.d.ts +1 -1
  319. package/dist/persistence.js +14 -14
  320. package/dist/persistence.js.map +1 -1
  321. package/dist/project.cjs +5 -5
  322. package/dist/project.js +3 -3
  323. package/dist/registry-CAS6Y5ZY.js +9 -0
  324. package/dist/{registry-SOXE4RY6.js.map → registry-CAS6Y5ZY.js.map} +1 -1
  325. package/dist/registry-JSDI4WKA.cjs +46 -0
  326. package/dist/{registry-N3GTKYCI.cjs.map → registry-JSDI4WKA.cjs.map} +1 -1
  327. package/dist/retry.cjs +4 -4
  328. package/dist/retry.js +3 -3
  329. package/dist/{run-CwEJtLPE.d.ts → run-i2-fUohR.d.cts} +217 -174
  330. package/dist/{run-CwEJtLPE.d.cts → run-i2-fUohR.d.ts} +217 -174
  331. package/dist/{run-until-YZ2ODWOF.js → run-until-BK56WG4P.js} +3 -3
  332. package/dist/{run-until-YZ2ODWOF.js.map → run-until-BK56WG4P.js.map} +1 -1
  333. package/dist/{run-until-ZZ2JLPJM.cjs → run-until-L5KQD3PV.cjs} +4 -4
  334. package/dist/{run-until-ZZ2JLPJM.cjs.map → run-until-L5KQD3PV.cjs.map} +1 -1
  335. package/dist/sandbox/bwrap.d.cts +20 -20
  336. package/dist/sandbox/bwrap.d.ts +20 -20
  337. package/dist/sandbox/index.cjs +39 -39
  338. package/dist/sandbox/index.cjs.map +1 -1
  339. package/dist/sandbox/index.d.cts +1 -1
  340. package/dist/sandbox/index.d.ts +1 -1
  341. package/dist/sandbox/index.js +35 -35
  342. package/dist/sandbox/index.js.map +1 -1
  343. package/dist/sandbox/linux-sandbox.d.cts +26 -21
  344. package/dist/sandbox/linux-sandbox.d.ts +26 -21
  345. package/dist/server/auth/index.cjs.map +1 -1
  346. package/dist/server/auth/index.d.cts +6 -6
  347. package/dist/server/auth/index.d.ts +6 -6
  348. package/dist/server/auth/index.js.map +1 -1
  349. package/dist/server/auth/orchestrator.d.cts +2 -2
  350. package/dist/server/auth/orchestrator.d.ts +2 -2
  351. package/dist/server/auth/types.d.cts +4 -4
  352. package/dist/server/auth/types.d.ts +4 -4
  353. package/dist/server/errors-envelope.cjs +14 -14
  354. package/dist/server/errors-envelope.d.cts +3 -3
  355. package/dist/server/errors-envelope.d.ts +3 -3
  356. package/dist/server/errors-envelope.js +3 -3
  357. package/dist/session-transcript-3B52DKTG.js +5 -0
  358. package/dist/{session-transcript-6WKLYIN4.js.map → session-transcript-3B52DKTG.js.map} +1 -1
  359. package/dist/session-transcript-H7NUFXXM.cjs +50 -0
  360. package/dist/{session-transcript-EAKR4D2W.cjs.map → session-transcript-H7NUFXXM.cjs.map} +1 -1
  361. package/dist/skills.cjs +7 -7
  362. package/dist/skills.js +5 -5
  363. package/dist/stream-object-4FDU76YW.cjs +20 -0
  364. package/dist/{stream-object-Y7YCX3BI.cjs.map → stream-object-4FDU76YW.cjs.map} +1 -1
  365. package/dist/stream-object-HWDEEQN4.js +7 -0
  366. package/dist/{stream-object-OFM66VUT.js.map → stream-object-HWDEEQN4.js.map} +1 -1
  367. package/dist/subagents-loader-A4W6C3QP.cjs +15 -0
  368. package/dist/subagents-loader-A4W6C3QP.cjs.map +1 -0
  369. package/dist/subagents-loader-X33KH2SZ.js +6 -0
  370. package/dist/subagents-loader-X33KH2SZ.js.map +1 -0
  371. package/dist/subagents-loader.cjs +6 -6
  372. package/dist/subagents-loader.d.cts +2 -2
  373. package/dist/subagents-loader.d.ts +2 -2
  374. package/dist/subagents-loader.js +4 -4
  375. package/dist/subscription/index.cjs +3 -3
  376. package/dist/subscription/index.js +2 -2
  377. package/dist/task-store.cjs +7 -7
  378. package/dist/task-store.js +4 -4
  379. package/dist/types/agent-prims.d.ts +4 -4
  380. package/dist/types/agent.d.ts +68 -3
  381. package/dist/types/conversation.d.ts +7 -0
  382. package/dist/types/goal-events.d.ts +24 -23
  383. package/dist/types/messages.d.ts +9 -0
  384. package/dist/types/run.d.ts +27 -0
  385. package/dist/types/session-message.d.ts +59 -0
  386. package/dist/types/session-record.d.ts +14 -13
  387. package/dist/types/workflow.d.ts +36 -0
  388. package/dist/workflow.cjs +27 -27
  389. package/dist/workflow.d.cts +17 -1
  390. package/dist/workflow.d.ts +17 -1
  391. package/dist/workflow.js +6 -6
  392. package/docs/harness-capability-map.md +22 -0
  393. package/package.json +22 -13
  394. package/dist/agent-DW2J37IH.js +0 -42
  395. package/dist/agent-IE6IE4NW.cjs +0 -51
  396. package/dist/batch-3SEPDXCU.cjs.map +0 -1
  397. package/dist/batch-SY5GZLFD.js.map +0 -1
  398. package/dist/chunk-2423XDPT.cjs.map +0 -1
  399. package/dist/chunk-2ONFGMBV.js.map +0 -1
  400. package/dist/chunk-4YB7B3RP.cjs.map +0 -1
  401. package/dist/chunk-56OXYUZE.js.map +0 -1
  402. package/dist/chunk-56ZM6P7Z.cjs.map +0 -1
  403. package/dist/chunk-5SB4V74H.js +0 -176
  404. package/dist/chunk-5SB4V74H.js.map +0 -1
  405. package/dist/chunk-6VP3XGEK.js.map +0 -1
  406. package/dist/chunk-77WHPVXE.js.map +0 -1
  407. package/dist/chunk-ALU3KC4G.cjs.map +0 -1
  408. package/dist/chunk-BJMKQOY2.cjs.map +0 -1
  409. package/dist/chunk-DCJ5MCJ3.js.map +0 -1
  410. package/dist/chunk-EEZ7CFMM.js.map +0 -1
  411. package/dist/chunk-FV3YEMQ7.js.map +0 -1
  412. package/dist/chunk-G2F67XUR.cjs.map +0 -1
  413. package/dist/chunk-GL7CFBVC.js.map +0 -1
  414. package/dist/chunk-H5YVJB4K.cjs +0 -185
  415. package/dist/chunk-H5YVJB4K.cjs.map +0 -1
  416. package/dist/chunk-ICYBIC6N.cjs.map +0 -1
  417. package/dist/chunk-IEUDKUPM.cjs.map +0 -1
  418. package/dist/chunk-IT3PWBW4.cjs.map +0 -1
  419. package/dist/chunk-ITLS5LRF.cjs +0 -105
  420. package/dist/chunk-ITLS5LRF.cjs.map +0 -1
  421. package/dist/chunk-LTCOPATU.cjs.map +0 -1
  422. package/dist/chunk-MXSMAGDU.js.map +0 -1
  423. package/dist/chunk-P34DHHYQ.cjs.map +0 -1
  424. package/dist/chunk-SDIBMLL5.js.map +0 -1
  425. package/dist/chunk-TAPQWDW2.js.map +0 -1
  426. package/dist/chunk-THEYGCYS.cjs.map +0 -1
  427. package/dist/chunk-VNNK6AKU.js.map +0 -1
  428. package/dist/chunk-VYJSHGAY.js.map +0 -1
  429. package/dist/chunk-W52DKZBR.cjs.map +0 -1
  430. package/dist/chunk-XAEAMI5H.js.map +0 -1
  431. package/dist/chunk-XAYVHS2B.cjs.map +0 -1
  432. package/dist/chunk-YDLNI7J6.js.map +0 -1
  433. package/dist/chunk-YPQF26X7.cjs.map +0 -1
  434. package/dist/chunk-YVTNFKZO.js +0 -103
  435. package/dist/chunk-YVTNFKZO.js.map +0 -1
  436. package/dist/compact-session-H5TKLD55.cjs +0 -54
  437. package/dist/compact-session-WNKKIIDW.js +0 -17
  438. package/dist/context-VAYLPT4O.js +0 -5
  439. package/dist/context-ZV33V4DC.cjs +0 -22
  440. package/dist/executor-OZSYXDKF.cjs.map +0 -1
  441. package/dist/executor-PAH72CB5.js.map +0 -1
  442. package/dist/fs-session-store-6MY7PNI2.js +0 -10
  443. package/dist/fs-session-store-7E7UPLF2.cjs +0 -19
  444. package/dist/generate-object-5SCEH2EE.cjs +0 -20
  445. package/dist/generate-object-I7UD4NWN.js +0 -7
  446. package/dist/index-manager-KKAK7NT3.js +0 -10
  447. package/dist/index-manager-R6ZJFEZF.cjs +0 -19
  448. package/dist/inject-session-DM4SKTZO.cjs.map +0 -1
  449. package/dist/inject-session-UXNJQTZ6.js.map +0 -1
  450. package/dist/judge-call-SP3G3X2Y.cjs +0 -22
  451. package/dist/judge-call-TAEIXMYG.js +0 -5
  452. package/dist/registry-N3GTKYCI.cjs +0 -46
  453. package/dist/registry-SOXE4RY6.js +0 -9
  454. package/dist/session-transcript-6WKLYIN4.js +0 -5
  455. package/dist/session-transcript-EAKR4D2W.cjs +0 -50
  456. package/dist/stream-object-OFM66VUT.js +0 -7
  457. package/dist/stream-object-Y7YCX3BI.cjs +0 -20
package/dist/index.d.ts CHANGED
@@ -1,13 +1,13 @@
1
- import { T as TheokitAgentError, B as BudgetOptions, a as BudgetHandle, b as BudgetSnapshot, E as ErrorMetadata } from './errors-Cua4WC9H.js';
2
- export { A as AgentDisposedError, c as AgentRunError, d as AgentRunErrorCode, e as AuthenticationError, f as BudgetExceedEvent, g as BudgetExceededError, h as BudgetLimit, i as BudgetMode, j as BudgetScope, k as BudgetThresholdEvent, l as BudgetWindow, C as ConfigurationError, m as ErrorCode, I as IntegrationNotConnectedError, n as InvalidTaskIdError, M as MemoryAdapterError, o as MemoryAdapterErrorCode, N as NetworkError, R as RateLimitError, p as TaskNotFoundError, U as UnknownAgentError, q as UnsupportedBudgetOperationError, r as UnsupportedRunOperationError, s as UnsupportedTaskOperationError, t as isTransientError } from './errors-Cua4WC9H.js';
3
- import { A as AgentOptions, L as LocalOptions, P as ProviderRoutingSettings, S as SystemPromptResolver, C as CloudOptions, M as MemorySettings, a as AgentDefinition, b as ContextSettings, c as PluginsSettings, d as SkillsSettings, e as SDKAgent, f as ListAgentsOptions, g as ListResult, h as SDKAgentInfo, G as GetAgentOptions, i as ListRunsOptions, j as GetRunOptions, k as AgentOperationOptions, l as Plugin$1, m as ProviderProfile, I as InlineSkill, J as JudgeResult, n as GoalOptions, o as GoalEvent, p as GoalResult, B as BudgetTracker, q as MemoryProvider, r as MemoryId, s as PreToolCallDecision, t as SDKProvider } from './agent-SmxntivO.js';
4
- export { u as ActiveMemoryPassArgs, v as ActiveMemoryPassResult, w as AgentMemory, x as BudgetCheck, y as BudgetTotal, z as BudgetUsageEvent, D as CloudEnv, E as CloudRepo, F as ContextBudget, H as ContextManagerKind, K as ContextSnapshot, N as ContextSource, O as ContextSourceStatus, Q as CreateSkillSpec, R as HookName, T as InvalidateCacheOptions, U as MemoryAdapter, V as MemoryAdapterCapabilities, W as MemoryContext, X as MemoryFact, Y as MemoryProviderHandle, Z as MemoryProviderInitOptions, _ as MemoryRevision, $ as MemoryToolSchema, a0 as MemoryTurnMessage, a1 as PersonalityPreset, a2 as PluginContext, a3 as PostAssistantReplyContext, a4 as PostToolCallContext, a5 as PreToolCallContext, a6 as PreUserSendContext, a7 as PreUserSendResult, a8 as ProviderCapability, a9 as ProviderRoute, aa as ProviderTransform, ab as ProviderTransformContext, ac as RecordSessionSummaryArgs, ad as ResolvedProviderRoute, ae as RunUntilIterator, af as SDKAgentPlugins, ag as SDKAgentSkillDetail, ah as SDKAgentSkills, ai as SDKArtifact, aj as SDKContextManager, ak as SDKPluginMetadata, al as SDKProvidersManager, am as SessionLifecycleContext, an as SessionRecord, ao as SessionStore, ap as SettingSource, aq as Skill, ar as SkillsResolver, as as SkillsResolverContext, at as SystemPromptContext, au as SystemPromptMemoryFact, av as SystemPromptSkillRef, aw as TelemetrySettings, ax as ToolCallSummary, ay as ToolResultTransformContext, az as TransformContext, aA as Verdict } from './agent-SmxntivO.js';
5
- import { R as RunResult, M as ModelSelection, C as CustomTool, a as McpServerConfig, b as Run, P as Processor, T as ToolResultContentBlock, c as PermissionMode, d as PermissionEngine, e as RunEventSink, S as SDKMessage } from './run-CwEJtLPE.js';
6
- export { A as AgentConversationTurn, f as AssistantMessage, g as CompletionCheck, h as CompletionCheckResult, i as ConversationStep, j as ConversationTurn, k as CostBreakdown, l as CostSource, m as CostStatus, D as DoomLoopThresholds, G as GenerateOptions, n as GenerateRunResult, I as ImageBlock, o as InputProcessorContext, p as InteractionUpdate, q as McpAuthConfig, r as McpHttpServerConfig, s as McpOAuthConfig, t as McpStdioServerConfig, u as MessageOrigin, v as ModelParameterValue, O as OutputProcessorContext, w as PartialToolCallUpdate, x as PermissionAction, y as PermissionEngineOptions, z as PermissionRule, B as ProcessorControls, E as ProcessorTripwire, F as ProcessorViolation, H as RunCompactBoundaryEvent, J as RunCompletionCheckEvent, K as RunErrorDetail, L as RunEvent, N as RunGitInfo, Q as RunOperation, U as RunPermissionDeniedEvent, V as RunRateLimitEvent, W as RunStatus, X as RunTaskCompletedEvent, Y as RunTaskStartedEvent, Z as RunTaskUpdatedEvent, _ as RunToCompletionOptions, $ as RunToCompletionResult, a0 as RunToolProgressEvent, a1 as RunTripwireEvent, a2 as SDKAssistantMessage, a3 as SDKImage, a4 as SDKImageDimension, a5 as SDKObjectDelta, a6 as SDKRequestMessage, a7 as SDKStatusMessage, a8 as SDKSystemMessage, a9 as SDKTaskMessage, aa as SDKThinkingMessage, ab as SDKToolUseMessage, ac as SDKUserMessage, ad as SDKUserMessageEvent, ae as SendOptions, af as ShellCommand, ag as ShellConversationTurn, ah as ShellOutput, ai as ShellOutputDeltaUpdate, aj as StepCompletedUpdate, ak as StepStartedUpdate, al as StreamToCompletionResult, am as SummaryCompletedUpdate, an as SummaryStartedUpdate, ao as SummaryUpdate, ap as TextBlock, aq as TextDeltaUpdate, ar as ThinkingCompletedUpdate, as as ThinkingDeltaUpdate, at as ThinkingMessage, au as TokenDeltaUpdate, av as TokenUsage, aw as ToolCall, ax as ToolCallCompletedUpdate, ay as ToolCallStartedUpdate, az as ToolContextMessage, aA as ToolResult, aB as ToolResultGuardOptions, aC as ToolUseBlock, aD as TurnEndedUpdate, aE as UserMessage, aF as UserMessageAppendedUpdate, aG as applyMode, aH as emitRunEvent } from './run-CwEJtLPE.js';
1
+ import { T as TheokitAgentError, B as BudgetOptions, a as BudgetHandle, b as BudgetSnapshot, E as ErrorMetadata } from './errors-DjBQ4Tn8.js';
2
+ export { A as AgentDisposedError, c as AgentRunError, d as AgentRunErrorCode, e as AuthenticationError, f as BudgetExceedEvent, g as BudgetExceededError, h as BudgetLimit, i as BudgetMode, j as BudgetScope, k as BudgetThresholdEvent, l as BudgetWindow, C as ConfigurationError, m as ErrorCode, I as IntegrationNotConnectedError, n as InvalidTaskIdError, M as MemoryAdapterError, o as MemoryAdapterErrorCode, N as NetworkError, R as RateLimitError, p as TaskNotFoundError, U as UnknownAgentError, q as UnsupportedBudgetOperationError, r as UnsupportedRunOperationError, s as UnsupportedTaskOperationError, t as isTransientError } from './errors-DjBQ4Tn8.js';
3
+ import { A as AgentOptions, L as LocalOptions, P as ProviderRoutingSettings, S as SystemPromptResolver, C as CloudOptions, M as MemorySettings, a as AgentDefinition, b as ContextSettings, c as PluginsSettings, d as SkillsSettings, e as SDKAgent, f as ListAgentsOptions, g as ListResult, h as SDKAgentInfo, G as GetAgentOptions, i as ListRunsOptions, j as GetRunOptions, k as AgentOperationOptions, l as AgentDescription, m as Plugin$1, n as ProviderProfile, I as InlineSkill, J as JudgeResult, o as GoalOptions, p as GoalEvent, q as GoalResult, B as BudgetTracker, r as MemoryProvider, s as MemoryId, t as PreToolCallDecision, u as SDKProvider } from './agent-ZCZa7YQv.js';
4
+ export { v as ActiveMemoryPassArgs, w as ActiveMemoryPassResult, x as AgentMemory, y as AgentSubagentDescription, z as AgentToolDescription, D as BudgetCheck, E as BudgetTotal, F as BudgetUsageEvent, H as CloudEnv, K as CloudRepo, N as ContextBudget, O as ContextManagerKind, Q as ContextSnapshot, R as ContextSource, T as ContextSourceStatus, U as CreateSkillSpec, V as HookName, W as InvalidateCacheOptions, X as MemoryAdapter, Y as MemoryAdapterCapabilities, Z as MemoryContext, _ as MemoryFact, $ as MemoryProviderHandle, a0 as MemoryProviderInitOptions, a1 as MemoryRevision, a2 as MemoryToolSchema, a3 as MemoryTurnMessage, a4 as PersonalityPreset, a5 as PluginContext, a6 as PostAssistantReplyContext, a7 as PostToolCallContext, a8 as PreToolCallContext, a9 as PreUserSendContext, aa as PreUserSendResult, ab as ProviderCapability, ac as ProviderRoute, ad as ProviderTransform, ae as ProviderTransformContext, af as RecordSessionSummaryArgs, ag as ResolvedProviderRoute, ah as RunUntilIterator, ai as SDKAgentPlugins, aj as SDKAgentSkillDetail, ak as SDKAgentSkills, al as SDKArtifact, am as SDKContextManager, an as SDKPluginMetadata, ao as SDKProvidersManager, ap as SessionLifecycleContext, aq as SessionRecord, ar as SessionStore, as as SettingSource, at as Skill, au as SkillsResolver, av as SkillsResolverContext, aw as SystemPromptContext, ax as SystemPromptMemoryFact, ay as SystemPromptSkillRef, az as TelemetrySettings, aA as ToolCallSummary, aB as ToolResultTransformContext, aC as TransformContext, aD as Verdict } from './agent-ZCZa7YQv.js';
5
+ import { R as RunResult, M as ModelSelection, C as CustomTool, a as McpServerConfig, T as ToolResultContentBlock, b as Run, P as Processor, c as PermissionMode, d as PermissionEngine, e as RunEventSink, S as SDKMessage } from './run-i2-fUohR.js';
6
+ export { A as AgentConversationTurn, f as AssistantMessage, g as CompletionCheck, h as CompletionCheckResult, i as ConversationStep, j as ConversationTurn, k as CostBreakdown, l as CostSource, m as CostStatus, D as DoomLoopThresholds, G as GenerateOptions, n as GenerateRunResult, I as ImageBlock, o as InputProcessorContext, p as InteractionUpdate, q as McpAuthConfig, r as McpHttpServerConfig, s as McpOAuthConfig, t as McpStdioServerConfig, u as MessageOrigin, v as ModelParameterValue, O as OutputProcessorContext, w as PartialToolCallUpdate, x as PermissionAction, y as PermissionEngineOptions, z as PermissionRule, B as ProcessorControls, E as ProcessorTripwire, F as ProcessorViolation, H as RunCompactBoundaryEvent, J as RunCompletionCheckEvent, K as RunErrorDetail, L as RunEvent, N as RunGitInfo, Q as RunOperation, U as RunPermissionDeniedEvent, V as RunRateLimitEvent, W as RunStatus, X as RunTaskCompletedEvent, Y as RunTaskStartedEvent, Z as RunTaskUpdatedEvent, _ as RunTimelineEvent, $ as RunToCompletionOptions, a0 as RunToCompletionResult, a1 as RunToolProgressEvent, a2 as RunTripwireEvent, a3 as SDKAssistantMessage, a4 as SDKImage, a5 as SDKImageDimension, a6 as SDKObjectDelta, a7 as SDKRequestMessage, a8 as SDKStatusMessage, a9 as SDKSystemMessage, aa as SDKTaskMessage, ab as SDKThinkingMessage, ac as SDKToolUseMessage, ad as SDKUserMessage, ae as SDKUserMessageEvent, af as SendOptions, ag as ShellCommand, ah as ShellConversationTurn, ai as ShellOutput, aj as ShellOutputDeltaUpdate, ak as StepCompletedUpdate, al as StepStartedUpdate, am as StreamToCompletionResult, an as SummaryCompletedUpdate, ao as SummaryStartedUpdate, ap as SummaryUpdate, aq as TextBlock, ar as TextDeltaUpdate, as as ThinkingCompletedUpdate, at as ThinkingDeltaUpdate, au as ThinkingMessage, av as TokenDeltaUpdate, aw as TokenUsage, ax as ToolCall, ay as ToolCallCompletedUpdate, az as ToolCallStartedUpdate, aA as ToolContextMessage, aB as ToolResult, aC as ToolResultGuardOptions, aD as ToolUseBlock, aE as TurnEndedUpdate, aF as UserMessage, aG as UserMessageAppendedUpdate, aH as applyMode, aI as emitRunEvent } from './run-i2-fUohR.js';
7
7
  import * as zod from 'zod';
8
8
  import { ZodType, z } from 'zod';
9
- import { S as StepResult } from './cron-Dx7B-3WB.js';
10
- export { C as Cron, a as CronCreateOptions, b as CronGetOptions, c as CronJob, d as CronJobStatus, e as CronListOptions, f as CronOperationOptions, g as CronRunOptions, h as CronRuntime, i as CronSchedulerStatus, j as CronStartOptions } from './cron-Dx7B-3WB.js';
9
+ import { S as StepResult } from './cron-Bx7tzm5R.js';
10
+ export { C as Cron, a as CronCreateOptions, b as CronGetOptions, c as CronJob, d as CronJobStatus, e as CronListOptions, f as CronOperationOptions, g as CronRunOptions, h as CronRuntime, i as CronSchedulerStatus, j as CronStartOptions } from './cron-Bx7tzm5R.js';
11
11
 
12
12
  /**
13
13
  * Public compaction / context-management helpers (M2-1, extended V3-3).
@@ -468,6 +468,66 @@ declare class LiveAgentRegistry {
468
468
  ids(): readonly string[];
469
469
  }
470
470
 
471
+ /**
472
+ * The shape of a persisted session turn, as a HOST reads it.
473
+ *
474
+ * Lives in `types/` because it is public contract — `Agent.transcript()` returns it (theokit#146).
475
+ * `internal/session/session-types.ts` re-exports it so the runtime and the store keep importing
476
+ * from the leaf they always did.
477
+ *
478
+ * @public
479
+ */
480
+
481
+ /**
482
+ * One turn of a session.
483
+ *
484
+ * Two projections of the same turn, and they answer different questions:
485
+ *
486
+ * - `text` is the flat rendering the model replay uses. A tool call folds to `[tool call] NAME` and
487
+ * a result to `[tool result] <body>`.
488
+ * - `parts` is the same turn unflattened, for a host that draws tool CARDS: the call id, the tool
489
+ * name, the arguments, and the `toolUseId` that ties a result back to its call — none of which
490
+ * survive the flat form.
491
+ *
492
+ * `parts` was added in theokit#146 and is additive: `text` is byte-identical to what it always was,
493
+ * so every existing reader is untouched.
494
+ *
495
+ * @public
496
+ */
497
+ interface SessionMessage {
498
+ role: "user" | "assistant";
499
+ text: string;
500
+ /**
501
+ * The structured view. Optional because a `SessionMessage` can also be built in memory during a
502
+ * live turn, where only the text projection exists. Absent means "this projection carries no
503
+ * structure", never "this turn had none".
504
+ */
505
+ parts?: readonly SessionMessagePart[];
506
+ }
507
+ /**
508
+ * One structured element of a {@link SessionMessage}.
509
+ *
510
+ * Deliberately a session-DISPLAY shape rather than a re-export of the internal LLM part union: the
511
+ * two answer different questions (what to send a provider vs. what to draw), and coupling them
512
+ * would make every provider-wire change a change to what hosts render.
513
+ *
514
+ * @public
515
+ */
516
+ type SessionMessagePart = {
517
+ readonly type: "text";
518
+ readonly text: string;
519
+ } | {
520
+ readonly type: "tool_use";
521
+ readonly id: string;
522
+ readonly name: string;
523
+ readonly input: Record<string, unknown>;
524
+ } | {
525
+ readonly type: "tool_result";
526
+ readonly toolUseId: string;
527
+ readonly content: string | ReadonlyArray<ToolResultContentBlock>;
528
+ readonly isError?: boolean;
529
+ };
530
+
471
531
  /**
472
532
  * Result of a one-shot {@link Agent.prompt} call.
473
533
  *
@@ -596,7 +656,7 @@ declare class Agent {
596
656
  *
597
657
  * This bullet used to say the opposite ("Disposed agents are NOT auto-deleted...
598
658
  * call `Agent.delete(agentId)` first"). It was measured false in M91:
599
- * `tests/m91-getorcreate-apos-dispose.test.ts` builds an agent, disposes it, and
659
+ * `tests/m91-getorcreate-after-dispose.test.ts` builds an agent, disposes it, and
600
660
  * gets a different instance back. The claim was about the PERSISTENT registry and
601
661
  * read as being about the live cache — and consumers built around the wrong half.
602
662
  * The agent-builder's M85 interrupt rotates the session id to work around a
@@ -679,6 +739,41 @@ declare class Agent {
679
739
  userText: string;
680
740
  assistantText: string;
681
741
  }): Promise<void>;
742
+ /**
743
+ * theokit#146 — read a LOCAL agent's persisted transcript as STRUCTURE, for rendering.
744
+ *
745
+ * A resumed session already replays correctly to the model, but a host had no way to draw it:
746
+ * the only projection available folded a tool call to the string `[tool call] NAME`, dropping the
747
+ * call id and every argument. A card UI got prose, so cross-restart resume was worth less than
748
+ * starting fresh — which is what at least one consumer did.
749
+ *
750
+ * Each returned message carries both projections: `text` (unchanged, what the model replay uses)
751
+ * and `parts` (`text` / `tool_use` / `tool_result` with ids, names, arguments and the
752
+ * `toolUseId` that correlates a result back to its call).
753
+ *
754
+ * Read-only and local-only: it opens the agent's session store and walks the transcript, exactly
755
+ * as {@link Agent.compact} and {@link Agent.injectSessionTurn} do. It appends nothing.
756
+ *
757
+ * @throws UnknownAgentError when `agentId` names no local agent.
758
+ * @public
759
+ */
760
+ static transcript(agentId: string): Promise<readonly SessionMessage[]>;
761
+ /**
762
+ * theokit#123 — read-only introspection of a registered agent's tools and subagents.
763
+ *
764
+ * `Agent.list()` / `Agent.get()` enumerate agents and `agent.skills.list()` covers skills, but
765
+ * tools and subagents lived only on `RegisteredAgent.options` — an internal contract. A
766
+ * reflection endpoint (theokit-studio's `theokit dev`) therefore had to report empty lists for
767
+ * both, and say so with an `unavailable_reason`.
768
+ *
769
+ * A PROJECTION, not the options object. Tool handlers and subagent prompts are stripped: a
770
+ * handler is an executable that cannot cross a process boundary, and a prompt is the agent's
771
+ * instructions rather than its signature — a reflection endpoint serializes what it is handed.
772
+ *
773
+ * @throws UnknownAgentError when `agentId` names no registered agent.
774
+ * @public
775
+ */
776
+ static describe(agentId: string): Promise<AgentDescription>;
682
777
  /**
683
778
  * Permanently delete a cloud agent.
684
779
  *
@@ -723,7 +818,7 @@ declare class AgentFactory {
723
818
  * - "subscription_included" routes (Codex CLI, future Claude Pro) →
724
819
  * return $0 with status="included".
725
820
  * - Provider unknown / pricing missing → status="unknown" with
726
- * undefined amountUsd (NÃO retorna 0 falso).
821
+ * undefined amountUsd (does NOT return a false 0).
727
822
  *
728
823
  * @internal
729
824
  */
@@ -743,8 +838,8 @@ declare function computeCost(args: ComputeArgs): CostBreakdown;
743
838
  * Budget enforcement (ADRs D383, D386, EC-7/8/9).
744
839
  *
745
840
  * - `preflightCheck(name, estimatedUsd)` — em `block` mode, throw
746
- * `BudgetExceededError` antes da LLM call se qualquer limit seria
747
- * excedido (EC-9 — caller chama dentro do mutex section).
841
+ * `BudgetExceededError` before the LLM call if any limit would be
842
+ * exceeded (EC-9 — the caller invokes it inside the mutex section).
748
843
  * - `chargeAndCheckThresholds(name, actualUsd)` — apply charge ao
749
844
  * ledger + invoca onThreshold/onExceed callbacks isolated em
750
845
  * try/catch (EC-8).
@@ -1021,16 +1116,16 @@ declare class Provider {
1021
1116
  */
1022
1117
  static builtins(): Plugin[];
1023
1118
  /**
1024
- * O builtin que atende `modelId`, ou `undefined` quando nenhum atende.
1119
+ * The builtin serving `modelId`, or `undefined` when none does.
1025
1120
  *
1026
- * A gramática de um id de modelo — `provider/modelo` — passa a ter **um** dono. M94: o consumidor
1027
- * a refazia à mão com `modelId.slice(0, modelId.indexOf('/'))`, que num id **sem barra** devolve o
1028
- * id menos o último caractere (`claude-opus-5` `claude-opus-`): casa provider nenhum e o
1029
- * chamador seguia para o default, sem distinguir isso de um acerto. Um modelo não-roteável era
1030
- * indistinguível do caminho feliz.
1121
+ * The grammar of a model id — `provider/model` — now has **one** owner. M94: the consumer
1122
+ * redid it by hand with `modelId.slice(0, modelId.indexOf('/'))`, which on an id **without a slash** returns the
1123
+ * id minus its last character (`claude-opus-5` -> `claude-opus-`): it matches no provider and the
1124
+ * caller fell through to the default, without distinguishing that from a hit. A non-routable model was
1125
+ * indistinguishable from the happy path.
1031
1126
  *
1032
- * Devolve `undefined` em vez de lançar: quem decide se a ausência é erro é o chamador, e ele
1033
- * sabe se o modelo veio de um `--model` explícito (erro) ou do default (normal).
1127
+ * Returns `undefined` instead of throwing: the caller decides whether absence is an error, and only they
1128
+ * know whether the model came from an explicit `--model` (an error) or from the default (normal).
1034
1129
  *
1035
1130
  * @public
1036
1131
  */
@@ -1203,32 +1298,32 @@ interface JudgeContext {
1203
1298
  /** Caller-supplied tuning knobs for the judge call. */
1204
1299
  interface JudgeOptions {
1205
1300
  /**
1206
- * Judge model identifier. Quando ausente, DERIVA de {@link agentModel} — e cai no literal
1207
- * `"openai/gpt-4o-mini"` se nem esse for informado.
1301
+ * Judge model identifier. When absent, it DERIVES from {@link agentModel} — and only falls back to the literal
1302
+ * `"openai/gpt-4o-mini"` when neither is provided.
1208
1303
  *
1209
- * M80 — o default fixo era provider-cego: ele resolve em OpenRouter. Com chave Anthropic
1210
- * 404, com bearer OAuth 401, e em ambos o goal queimava 3 turnos inteiros antes de falhar com
1211
- * razão enganosa. O agent-builder contornava isso derivando por conta própria; o conhecimento
1212
- * pertence aqui.
1304
+ * M80 — the fixed default was provider-blind: it only resolves on OpenRouter. With an Anthropic key it gives
1305
+ * 404, with an OAuth bearer it gives 401, and in both the goal burned 3 whole turns before failing with
1306
+ * a misleading reason. The agent-builder already worked around this by deriving on its own; the knowledge
1307
+ * belongs here.
1213
1308
  */
1214
1309
  judgeModel?: string;
1215
1310
  /**
1216
- * M80 — o modelo do agente CONDUZIDO. É a base da derivação: um judge que roda no mesmo modelo do
1217
- * chat funciona onde o chat funciona.
1311
+ * M80 — the DRIVEN agent's model. It is the basis of the derivation: a judge running on the same model as the
1312
+ * chat works wherever chat works.
1218
1313
  */
1219
1314
  agentModel?: string;
1220
1315
  /** Override env. Default `process.env.OPENROUTER_API_KEY` (EC-A). */
1221
1316
  apiKey?: string;
1222
1317
  }
1223
1318
  /**
1224
- * M80 — a credencial ou o modelo do judge não servem: 401/404.
1319
+ * M80 — the judge's credential or model does not work: 401/404.
1225
1320
  *
1226
- * Falha RÁPIDA por design. `rules/error-handling.md § 2` separa recuperável de irrecuperável, e um
1227
- * modelo inexistente não passa a existir no retry — dobrar isso em `{parseFailed: true}` fazia o loop
1228
- * tentar três vezes e reportar "failed" por limite de falhas consecutivas, escondendo que a causa era
1229
- * credencial. Falha lenta e opaca trocada por rápida e clara.
1321
+ * Fails FAST by design. `rules/error-handling.md` § 2 separates recoverable from unrecoverable, and a
1322
+ * nonexistent model does not start existing on retry — folding that into `{parseFailed: true}` made the loop
1323
+ * try three times and report "failed" on a consecutive-failure limit, hiding that the cause was the
1324
+ * credential. A slow, opaque failure traded for a fast, clear one.
1230
1325
  *
1231
- * Falha de PARSE e erro de rede continuam dobrados: são recuperáveis, e o loop decide por falhas
1326
+ * PARSE failures and network errors stay folded: they are recoverable, and the loop already decides on
1232
1327
  * consecutivas.
1233
1328
  */
1234
1329
  declare class JudgeCredentialError extends TheokitAgentError {
@@ -1259,16 +1354,16 @@ interface RunUntilDeps {
1259
1354
  }
1260
1355
 
1261
1356
  /**
1262
- * O marcador de continuação do goal-loop — num módulo FOLHA, de propósito.
1357
+ * The goal-loop's continuation marker in a LEAF module, on purpose.
1263
1358
  *
1264
- * Ele vivia em `goal-loop.ts` e era importado por `run-until.ts`, que o `goal-loop` por sua vez
1265
- * importa de volta. O ciclo estava quebrado em runtime (a volta é `import type` + `await import()`
1266
- * dinâmico), mas o detector de ciclos conta a aresta dinâmica e contar import dinâmico como ciclo
1267
- * torna o gate impossível de satisfazer sem abandonar a técnica canônica de quebrar ciclos.
1359
+ * It lived in `goal-loop.ts` and was imported by `run-until.ts`, which `goal-loop` in turn
1360
+ * imports back. The cycle was broken at runtime (the return edge is `import type` + a dynamic
1361
+ * `await import()`), but the cycle detector counts the dynamic edge and counting a dynamic import as a cycle
1362
+ * makes the gate impossible to satisfy without abandoning the canonical cycle-breaking technique.
1268
1363
  *
1269
- * Uma constante compartilhada por dois módulos que se conhecem é o caso-escola de extração para
1270
- * folha: ninguém precisa importar o outro para conhecê-la. Some o ciclo em QUALQUER detector, sem
1271
- * política de ferramenta e sem mudar uma linha de comportamento.
1364
+ * A constant shared by two modules that know each other is the textbook case for extraction into a
1365
+ * leaf: neither needs to import the other to know it. The cycle disappears under ANY detector, with no
1366
+ * tool policy and without changing a line of behavior.
1272
1367
  */
1273
1368
  declare const GOAL_CONTINUATION_MARKER = "[[theokit:goal-continuation]]";
1274
1369
 
@@ -1339,6 +1434,69 @@ declare function createCounterBudgetTracker(options?: CounterBudgetTrackerOption
1339
1434
  nextIteration(): void;
1340
1435
  };
1341
1436
 
1437
+ /**
1438
+ * The library's single diagnostics channel — silent by default (#147).
1439
+ *
1440
+ * ## O problema
1441
+ *
1442
+ * The SDK wrote diagnostics straight to `process.stderr` from hot paths — 92 sites across 51
1443
+ * files under `internal/`. In a TUI host (Ink, alternate screen), those writes interleave with the
1444
+ * render and **corrupt the frame**. And the host had no way to intercept them: there was no
1445
+ * injectable logger. One consumer went as far as installing `proper-lockfile` just to silence ONE
1446
+ * of them.
1447
+ *
1448
+ * A library cannot assume `stdout`/`stderr` are free sinks. The application owns the terminal, not
1449
+ * the dependency.
1450
+ *
1451
+ * ## O contrato
1452
+ *
1453
+ * - **`setDiagnosticsSink(fn)`** hands the messages to the application, which decides where to put
1454
+ * them (a status line, a file, a panel). It is what was missing for a TUI to coexist with the SDK.
1455
+ * - **With no sink, nothing is emitted.** A library does not own the host's terminal.
1456
+ *
1457
+ * ## Silent by default, and how 36 suites survived the flip
1458
+ *
1459
+ * The default WAS `stderr`, and 36 test files spy on `process.stderr.write` to assert a given
1460
+ * warning is emitted. That contract is real and had to survive; migrating all 36 by hand, across
1461
+ * four different spy styles, is how you weaken 36 suites in one commit.
1462
+ *
1463
+ * So the flip happened at the default, and `vitest.setup.ts` installs a sink that FORWARDS to
1464
+ * `stderr` for the duration of every test. Those assertions still test what they always tested —
1465
+ * "this condition emits a diagnostic" — through the channel a host would use, while production
1466
+ * emits nothing unless asked.
1467
+ *
1468
+ * The cost is stated rather than hidden: no test observes the production default by accident, so
1469
+ * `tests/diagnostics-public-entry.test.ts` pins it explicitly by clearing the sink first.
1470
+ *
1471
+ * ## Coverage is the whole guarantee
1472
+ *
1473
+ * The first sweep migrated the 92 sites under `internal/` and left `src/`'s own modules —
1474
+ * `event-bus.ts`, `batch.ts`, `compaction.ts`, `internal/workflow/step-branch.ts`. A host could
1475
+ * therefore install a sink and still have its frame corrupted by a batch run, which is the reported
1476
+ * defect with a smaller blast radius. Those are routed here too, and
1477
+ * `tests/lint/no-direct-terminal-write.test.ts` is what keeps the next hot path from
1478
+ * reintroducing one. "Mostly interceptable" is not interceptable.
1479
+ *
1480
+ * The remaining direct writers are allowlisted there with a reason, and every one of them is a seam
1481
+ * whose destination the CALLER already chooses (`opts.warn`, `opts.logger`, the Workflow logger).
1482
+ *
1483
+ * ## What this is NOT
1484
+ *
1485
+ * It is not a logger with levels, formatting or multiple destinations. It is the minimum that
1486
+ * resolves the reported blocker; a full logger here would be inventing a requirement nobody asked
1487
+ * for.
1488
+ */
1489
+ /** Receives each diagnostic message already formatted, with the trailing `\n`. */
1490
+ type DiagnosticsSink = (message: string) => void;
1491
+ /**
1492
+ * Installs (or removes, by passing `undefined`) the diagnostics destination.
1493
+ *
1494
+ * When a sink is present it is the ONLY destination — `stderr` gets no copy. Duplicating
1495
+ * destinations would hand the problem back to the TUI that installed the sink precisely to get the
1496
+ * messages out of the terminal.
1497
+ */
1498
+ declare function setDiagnosticsSink(next: DiagnosticsSink | undefined): void;
1499
+
1342
1500
  declare function withCwdMutex<T>(key: string, fn: () => Promise<T>): Promise<T>;
1343
1501
 
1344
1502
  /**
@@ -2352,4 +2510,4 @@ declare function toShareGptTrajectory(result: BatchResult, options?: {
2352
2510
  model?: string;
2353
2511
  }): ShareGptTrajectory | null;
2354
2512
 
2355
- export { Agent, AgentBuilder, AgentDefinition, AgentFactory, AgentOperationOptions, AgentOptions, type AgentPromptResult, type AgentRegistryOptions, type BatchItem, type BatchOptions, type BatchProgress, type BatchResult, Budget, BudgetHandle, BudgetOptions, BudgetSnapshot, BudgetTracker, CloudOptions, ContextSettings, type CounterBudgetTrackerOptions, CustomTool, type DeepPartial, type DefineProviderOptions, type DefineToolSpec, type DreamingSweepOptions, type DreamingSweepResult, ErrorMetadata, EventBus, type EvictReason, GOAL_CONTINUATION_MARKER, GenerateObjectError, type GenerateObjectOptions, type GenerateObjectResult, GetAgentOptions, GetRunOptions, GoalEvent, type GoalLoopAgent, GoalOptions, GoalResult, InlineSkill, JobQueue, type JobQueueOptions, JudgeCredentialError, JudgeResult, ListAgentsOptions, ListResult, ListRunsOptions, LiveAgentRegistry, LocalOptions, McpServerConfig, Memory, MemoryId, MemoryProvider, MemorySettings, type MigrateOptions, type MigrateResult, type ModelListItem, type ModelParameterDefinition, ModelSelection, type ModelVariant, NoopMemoryProvider, type NormalizedJsonSchema, PermissionEngine, type PermissionGate, type PermissionGateContext, type PermissionGateDecision, PermissionMode, PermissionPlugin, type PermissionPluginOptions, Plugin, PluginsSettings, PreToolCallDecision, Processor, Provider, ProviderProfile, ProviderRoutingSettings, Run, RunEventSink, RunResult, SDKAgent, SDKAgentInfo, SDKMessage, type SDKModel, SDKProvider, type SDKRepository, type SDKUser, Security, type SessionScope, type ShareGptMessage, type ShareGptTrajectory, SkillReadTool, SkillsSettings, Squad, type SquadOptions, type SquadRun, StreamObjectError, type StreamObjectEvent, type StreamObjectOptions, SystemPromptResolver, TASK_RESERVED_PREFIXES, Task, type TaskCancelResult, type TaskConfigureOptions, type TaskEvent, type TaskFilter, type TaskHandle, type TaskKind, type TaskState, type TaskStoreOptions, type TaskSubmitOptions, type TaskWorkContext, type TaskWorkFn, Theokit, TheokitAgentError, type TheokitRequestOptions, TokenLimiter, type TokenLimiterOptions, Tool, ToolError, ToolResultContentBlock, UnicodeNormalizer, type UnicodeNormalizerOptions, UsageAccumulator, chargeAndCheckThresholds, computeCost, createCounterBudgetTracker, estimateTokens, extractRawId, getPricingEntry, inferApiMode, isValidTaskId, migrateSqliteToLance, mkMemoryId, normalizeSchema, normalizeUsage, preflightCheck, runGoalLoop, scopedConversationId, sessionScopePrefix, toShareGptTrajectory, withCwdMutex };
2513
+ export { Agent, AgentBuilder, AgentDefinition, AgentDescription, AgentFactory, AgentOperationOptions, AgentOptions, type AgentPromptResult, type AgentRegistryOptions, type BatchItem, type BatchOptions, type BatchProgress, type BatchResult, Budget, BudgetHandle, BudgetOptions, BudgetSnapshot, BudgetTracker, CloudOptions, ContextSettings, type CounterBudgetTrackerOptions, CustomTool, type DeepPartial, type DefineProviderOptions, type DefineToolSpec, type DiagnosticsSink, type DreamingSweepOptions, type DreamingSweepResult, ErrorMetadata, EventBus, type EvictReason, GOAL_CONTINUATION_MARKER, GenerateObjectError, type GenerateObjectOptions, type GenerateObjectResult, GetAgentOptions, GetRunOptions, GoalEvent, type GoalLoopAgent, GoalOptions, GoalResult, InlineSkill, JobQueue, type JobQueueOptions, JudgeCredentialError, JudgeResult, ListAgentsOptions, ListResult, ListRunsOptions, LiveAgentRegistry, LocalOptions, McpServerConfig, Memory, MemoryId, MemoryProvider, MemorySettings, type MigrateOptions, type MigrateResult, type ModelListItem, type ModelParameterDefinition, ModelSelection, type ModelVariant, NoopMemoryProvider, type NormalizedJsonSchema, PermissionEngine, type PermissionGate, type PermissionGateContext, type PermissionGateDecision, PermissionMode, PermissionPlugin, type PermissionPluginOptions, Plugin, PluginsSettings, PreToolCallDecision, Processor, Provider, ProviderProfile, ProviderRoutingSettings, Run, RunEventSink, RunResult, SDKAgent, SDKAgentInfo, SDKMessage, type SDKModel, SDKProvider, type SDKRepository, type SDKUser, Security, type SessionMessage, type SessionMessagePart, type SessionScope, type ShareGptMessage, type ShareGptTrajectory, SkillReadTool, SkillsSettings, Squad, type SquadOptions, type SquadRun, StreamObjectError, type StreamObjectEvent, type StreamObjectOptions, SystemPromptResolver, TASK_RESERVED_PREFIXES, Task, type TaskCancelResult, type TaskConfigureOptions, type TaskEvent, type TaskFilter, type TaskHandle, type TaskKind, type TaskState, type TaskStoreOptions, type TaskSubmitOptions, type TaskWorkContext, type TaskWorkFn, Theokit, TheokitAgentError, type TheokitRequestOptions, TokenLimiter, type TokenLimiterOptions, Tool, ToolError, ToolResultContentBlock, UnicodeNormalizer, type UnicodeNormalizerOptions, UsageAccumulator, chargeAndCheckThresholds, computeCost, createCounterBudgetTracker, estimateTokens, extractRawId, getPricingEntry, inferApiMode, isValidTaskId, migrateSqliteToLance, mkMemoryId, normalizeSchema, normalizeUsage, preflightCheck, runGoalLoop, scopedConversationId, sessionScopePrefix, setDiagnosticsSink, toShareGptTrajectory, withCwdMutex };
package/dist/index.js CHANGED
@@ -1,56 +1,61 @@
1
- export { StreamObjectError } from './chunk-QFMXXUUT.js';
2
- export { GOAL_CONTINUATION_MARKER } from './chunk-2ONFGMBV.js';
3
- export { JudgeCredentialError } from './chunk-VNNK6AKU.js';
4
- export { GenerateObjectError } from './chunk-M5ZQBOIZ.js';
5
- import './chunk-ZJN6NTHE.js';
6
- import { Workflow, agentStep } from './chunk-SDIBMLL5.js';
7
- import './chunk-YDLNI7J6.js';
1
+ export { JudgeCredentialError } from './chunk-D7IULBF2.js';
2
+ export { StreamObjectError } from './chunk-DU7DE543.js';
3
+ export { GOAL_CONTINUATION_MARKER } from './chunk-PY2RQOA7.js';
4
+ export { GenerateObjectError } from './chunk-KE6XKRLQ.js';
5
+ import './chunk-JZUPMTJY.js';
6
+ import { Workflow, agentStep } from './chunk-MC5EINBV.js';
7
+ import './chunk-V2RBCCN5.js';
8
8
  import './chunk-CAH3G4IS.js';
9
- export { Cron } from './chunk-T4QWDOG6.js';
10
- import { MEMORY_EMBEDDING_ADAPTERS, resolveApiKey, DEFAULT_AGENTIC_MODEL_ID, Agent } from './chunk-VYJSHGAY.js';
11
- export { Agent, AgentBuilder, Tool, ToolError, UsageAccumulator, computeCost, getPricingEntry } from './chunk-VYJSHGAY.js';
9
+ export { Cron } from './chunk-KWUNN5J2.js';
10
+ import { MEMORY_EMBEDDING_ADAPTERS, resolveApiKey, DEFAULT_AGENTIC_MODEL_ID, Agent } from './chunk-GIRD3RWH.js';
11
+ export { Agent, AgentBuilder, Tool, ToolError, UsageAccumulator, computeCost, getPricingEntry } from './chunk-GIRD3RWH.js';
12
12
  import './chunk-2SFBB54R.js';
13
- import { configure, submit, list, get, cancel, subscribe } from './chunk-HEN5WXXI.js';
14
- export { emitRunEvent } from './chunk-HEN5WXXI.js';
15
- import './chunk-5SB4V74H.js';
13
+ import { configure, submit, list, get, cancel, subscribe } from './chunk-LJX2SQV2.js';
14
+ export { emitRunEvent } from './chunk-LJX2SQV2.js';
16
15
  import './chunk-K2BQQ445.js';
17
- import './chunk-YVTNFKZO.js';
18
- import { discoverProviderPlugins, shouldUseFixtureMode, isFixtureApiKey, httpRequest, mapOllamaTransportError, readErrorResponseBody, mapOllamaHttpError } from './chunk-GL7CFBVC.js';
19
- import './chunk-EXQV452X.js';
20
- import './chunk-EEZ7CFMM.js';
21
- import { lanceStoragePath, LanceIndex, readFactsFromMarkdown, defaultIndexPath, openMemoryDb, memoryDir } from './chunk-DCJ5MCJ3.js';
22
- import './chunk-F6Y4IEQM.js';
16
+ import './chunk-E2FFG33C.js';
17
+ import './chunk-KGRIHEDT.js';
18
+ import { discoverProviderPlugins, shouldUseFixtureMode, isFixtureApiKey, httpRequest, mapOllamaTransportError, readErrorResponseBody, mapOllamaHttpError } from './chunk-ZYB6B7QJ.js';
19
+ import './chunk-HWNVAUK4.js';
20
+ import './chunk-5KOW3GLE.js';
21
+ import './chunk-3I4B3OIX.js';
22
+ import { lanceStoragePath, LanceIndex, readFactsFromMarkdown, defaultIndexPath, openMemoryDb, memoryDir } from './chunk-4F7JQZOX.js';
23
+ import './chunk-ML5A5DOJ.js';
23
24
  import './chunk-7GFX45DD.js';
24
- import './chunk-ZW345YOI.js';
25
+ import './chunk-YP67XZES.js';
26
+ import './chunk-QKE556YD.js';
27
+ import './chunk-SCFW5MJZ.js';
28
+ import './chunk-OXNYIMZZ.js';
25
29
  import './chunk-FD2UT76F.js';
26
30
  import './chunk-U54XCYG3.js';
27
- import './chunk-FV3YEMQ7.js';
31
+ import './chunk-RP5HQVLD.js';
28
32
  import './chunk-6X6ID4MO.js';
29
33
  import './chunk-UJ7IQJAG.js';
30
34
  import './chunk-7AD3ZTZL.js';
31
- import './chunk-QGDKZDPN.js';
32
- import './chunk-NFCKEBHI.js';
33
- import './chunk-MXSMAGDU.js';
34
- import './chunk-YHZXBDAW.js';
35
- import './chunk-GLUWH6JO.js';
35
+ import './chunk-LGILIGV3.js';
36
+ import './chunk-PI4RO4GR.js';
37
+ import './chunk-ET6PHZRX.js';
38
+ import './chunk-JRLXEYR4.js';
39
+ import './chunk-BQDUEG4C.js';
40
+ import './chunk-AECV3G5Z.js';
36
41
  import { withCwdMutex } from './chunk-2XLKLVVR.js';
37
42
  export { withCwdMutex } from './chunk-2XLKLVVR.js';
38
- import './chunk-XAEAMI5H.js';
39
- import './chunk-CSZRJ4RE.js';
43
+ import './chunk-6EEYRFJC.js';
40
44
  import { toJsonSchema } from './chunk-4VPXM6UU.js';
41
- import { replaceFileAtomic } from './chunk-56OXYUZE.js';
42
- import './chunk-YCXMSDSP.js';
43
- import './chunk-6VP3XGEK.js';
45
+ import { replaceFileAtomic } from './chunk-KX7JV5KM.js';
46
+ import './chunk-YRXY2A5L.js';
47
+ import './chunk-65ONFZWM.js';
44
48
  import { parseModelId } from './chunk-X2FR4OIT.js';
45
- import { registerBuiltins, listProviders, getCatalogCapabilities, getProviderProfile } from './chunk-77WHPVXE.js';
46
- import './chunk-I35DI7ES.js';
49
+ import { registerBuiltins, listProviders, getCatalogCapabilities, getProviderProfile } from './chunk-TOTP24P6.js';
50
+ import './chunk-DKFGUOWL.js';
47
51
  import './chunk-5NBUH3NO.js';
48
- import './chunk-2WFB5ZOX.js';
49
- import './chunk-WDGCZDRG.js';
50
- import './chunk-UQPDFW4E.js';
51
- import { BudgetExceededError, MemoryAdapterError, AuthenticationError, ConfigurationError } from './chunk-CD73YHEH.js';
52
- export { AgentDisposedError, AgentRunError, AuthenticationError, BudgetExceededError, ConfigurationError, IntegrationNotConnectedError, InvalidTaskIdError, MemoryAdapterError, NetworkError, RateLimitError, TaskNotFoundError, TheokitAgentError, UnknownAgentError, UnsupportedBudgetOperationError, UnsupportedRunOperationError, UnsupportedTaskOperationError, isTransientError } from './chunk-CD73YHEH.js';
53
- import { diag, redactSecrets, addPattern } from './chunk-TAPQWDW2.js';
52
+ import './chunk-42IFCKQZ.js';
53
+ import './chunk-J3UK2GMN.js';
54
+ import './chunk-AR5MQZ3J.js';
55
+ import { BudgetExceededError, MemoryAdapterError, AuthenticationError, ConfigurationError } from './chunk-SG5ZWT6C.js';
56
+ export { AgentDisposedError, AgentRunError, AuthenticationError, BudgetExceededError, ConfigurationError, IntegrationNotConnectedError, InvalidTaskIdError, MemoryAdapterError, NetworkError, RateLimitError, TaskNotFoundError, TheokitAgentError, UnknownAgentError, UnsupportedBudgetOperationError, UnsupportedRunOperationError, UnsupportedTaskOperationError, isTransientError } from './chunk-SG5ZWT6C.js';
57
+ import { diag, redactSecrets, addPattern } from './chunk-IVSD7L22.js';
58
+ export { setDiagnosticsSink } from './chunk-IVSD7L22.js';
54
59
  import { z } from 'zod';
55
60
  import { randomUUID, createHash } from 'crypto';
56
61
  import { mkdir, readFile } from 'fs/promises';
@@ -594,16 +599,16 @@ var Provider = class _Provider {
594
599
  return listProviders().map((profile) => defineProvider(profile));
595
600
  }
596
601
  /**
597
- * O builtin que atende `modelId`, ou `undefined` quando nenhum atende.
602
+ * The builtin serving `modelId`, or `undefined` when none does.
598
603
  *
599
- * A gramática de um id de modelo — `provider/modelo` — passa a ter **um** dono. M94: o consumidor
600
- * a refazia à mão com `modelId.slice(0, modelId.indexOf('/'))`, que num id **sem barra** devolve o
601
- * id menos o último caractere (`claude-opus-5` `claude-opus-`): casa provider nenhum e o
602
- * chamador seguia para o default, sem distinguir isso de um acerto. Um modelo não-roteável era
603
- * indistinguível do caminho feliz.
604
+ * The grammar of a model id — `provider/model` — now has **one** owner. M94: the consumer
605
+ * redid it by hand with `modelId.slice(0, modelId.indexOf('/'))`, which on an id **without a slash** returns the
606
+ * id minus its last character (`claude-opus-5` -> `claude-opus-`): it matches no provider and the
607
+ * caller fell through to the default, without distinguishing that from a hit. A non-routable model was
608
+ * indistinguishable from the happy path.
604
609
  *
605
- * Devolve `undefined` em vez de lançar: quem decide se a ausência é erro é o chamador, e ele
606
- * sabe se o modelo veio de um `--model` explícito (erro) ou do default (normal).
610
+ * Returns `undefined` instead of throwing: the caller decides whether absence is an error, and only they
611
+ * know whether the model came from an explicit `--model` (an error) or from the default (normal).
607
612
  *
608
613
  * @public
609
614
  */
@@ -694,10 +699,8 @@ var EventBus = class {
694
699
  } catch (cause) {
695
700
  this.#handlerErrorCount += 1;
696
701
  const message = cause instanceof Error ? cause.message : String(cause);
697
- process.stderr.write(
698
- `[theokit-sdk] event-bus: handler for "${String(event)}" threw: ${message}
699
- `
700
- );
702
+ diag(`[theokit-sdk] event-bus: handler for "${String(event)}" threw: ${message}
703
+ `);
701
704
  }
702
705
  }
703
706
  }
@@ -717,9 +720,9 @@ var EventBus = class {
717
720
  // src/goal-loop.ts
718
721
  function runGoalLoop(agent, goal, options, depsOverride) {
719
722
  async function* wrap() {
720
- const { runUntilImpl } = await import('./run-until-YZ2ODWOF.js');
723
+ const { runUntilImpl } = await import('./run-until-BK56WG4P.js');
721
724
  const deps = depsOverride ?? await (async () => {
722
- const { judgeCallImpl } = await import('./judge-call-TAEIXMYG.js');
725
+ const { judgeCallImpl } = await import('./judge-call-NA2G6ZMJ.js');
723
726
  const { getAgentFacade } = await import('./agent-factory-registry-ZVTABLEY.js');
724
727
  const create = getAgentFacade().create;
725
728
  return {
@@ -1166,7 +1169,7 @@ var Memory = {
1166
1169
  openArgs.embedding = await resolveEmbedding(opts.embedding, peer.MEMORY_EMBEDDING_ADAPTERS);
1167
1170
  return await peer.IndexManager.open(openArgs);
1168
1171
  }
1169
- const { IndexManager } = await import('./index-manager-KKAK7NT3.js');
1172
+ const { IndexManager } = await import('./index-manager-ZVZUHPP7.js');
1170
1173
  openArgs.embedding = await resolveEmbedding(opts.embedding, MEMORY_EMBEDDING_ADAPTERS);
1171
1174
  return await IndexManager.open(openArgs);
1172
1175
  },
@@ -1600,10 +1603,10 @@ function ehAgenteConstruido(m) {
1600
1603
  return typeof m.send === "function";
1601
1604
  }
1602
1605
  async function materializar(def, indice) {
1603
- const { Agent: Agent2 } = await import('./agent-DW2J37IH.js');
1606
+ const { Agent: Agent2 } = await import('./agent-KKZYLY5D.js');
1604
1607
  return Agent2.create({
1605
- // `AgentDefinition.model` admite o sentinel `'inherit'`, que não é um id de modelo. Herdar
1606
- // aqui significa "não declare nada e deixe o default valer" — passar o literal adiante criaria
1608
+ // `AgentDefinition.model` admits the sentinel `'inherit'`, which is not a model id. Inheriting
1609
+ // here means "declare nothing and let the default apply" — forwarding the literal would create
1607
1610
  // um agente pedindo um modelo chamado `inherit`.
1608
1611
  ...def.model !== void 0 && def.model !== "inherit" ? { model: def.model } : {},
1609
1612
  ...def.prompt !== void 0 ? { systemPrompt: def.prompt } : {},
@@ -1626,12 +1629,12 @@ function createSquad(options) {
1626
1629
  }
1627
1630
  return {
1628
1631
  run: async (input) => {
1629
- const run = await (await montarPipeline(agents, options.name)).run(input);
1632
+ const run = await (await buildPipeline(agents, options.name)).run(input);
1630
1633
  return { result: run.output, status: run.status, steps: run.stepResults };
1631
1634
  }
1632
1635
  };
1633
1636
  }
1634
- async function montarPipeline(agents, nome) {
1637
+ async function buildPipeline(agents, nome) {
1635
1638
  let builder = Workflow.create({ name: nome ?? "squad" });
1636
1639
  for (let i = 0; i < agents.length; i++) {
1637
1640
  const membro = agents[i];