@theokit/sdk 4.37.2 → 4.38.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 (364) hide show
  1. package/CHANGELOG.md +72 -72
  2. package/dist/agent-2GZC4W2A.cjs +51 -0
  3. package/dist/{agent-IE6IE4NW.cjs.map → agent-2GZC4W2A.cjs.map} +1 -1
  4. package/dist/agent-3H3UKD6U.js +42 -0
  5. package/dist/{agent-DW2J37IH.js.map → agent-3H3UKD6U.js.map} +1 -1
  6. package/dist/{agent-SmxntivO.d.ts → agent-C3AEtM-W.d.ts} +39 -37
  7. package/dist/{agent-DGv1-d81.d.cts → agent-U3lBX-5t.d.cts} +39 -37
  8. package/dist/agent.d.ts +1 -1
  9. package/dist/auth/index.cjs +15 -15
  10. package/dist/auth/index.js +4 -4
  11. package/dist/{batch-SY5GZLFD.js → batch-LXSALQC3.js} +9 -9
  12. package/dist/{batch-SY5GZLFD.js.map → batch-LXSALQC3.js.map} +1 -1
  13. package/dist/{batch-3SEPDXCU.cjs → batch-NZGN6SFV.cjs} +23 -23
  14. package/dist/{batch-3SEPDXCU.cjs.map → batch-NZGN6SFV.cjs.map} +1 -1
  15. package/dist/{chunk-D4ZUJTFB.cjs → chunk-2K7PRHDB.cjs} +8 -8
  16. package/dist/{chunk-D4ZUJTFB.cjs.map → chunk-2K7PRHDB.cjs.map} +1 -1
  17. package/dist/chunk-2R6NBT5F.cjs +112 -0
  18. package/dist/chunk-2R6NBT5F.cjs.map +1 -0
  19. package/dist/{chunk-2423XDPT.cjs → chunk-3BSP7LSG.cjs} +26 -26
  20. package/dist/{chunk-2423XDPT.cjs.map → chunk-3BSP7LSG.cjs.map} +1 -1
  21. package/dist/{chunk-6EDQBX7U.cjs → chunk-3MUIYMUG.cjs} +17 -17
  22. package/dist/{chunk-6EDQBX7U.cjs.map → chunk-3MUIYMUG.cjs.map} +1 -1
  23. package/dist/{chunk-P34DHHYQ.cjs → chunk-3VKTDQMX.cjs} +34 -27
  24. package/dist/chunk-3VKTDQMX.cjs.map +1 -0
  25. package/dist/{chunk-77WHPVXE.js → chunk-3XKVRLR2.js} +4 -4
  26. package/dist/chunk-3XKVRLR2.js.map +1 -0
  27. package/dist/{chunk-SWIBQFPH.cjs → chunk-3XRXORBS.cjs} +4 -4
  28. package/dist/{chunk-SWIBQFPH.cjs.map → chunk-3XRXORBS.cjs.map} +1 -1
  29. package/dist/{chunk-DCJ5MCJ3.js → chunk-4APWS2YF.js} +7 -7
  30. package/dist/{chunk-DCJ5MCJ3.js.map → chunk-4APWS2YF.js.map} +1 -1
  31. package/dist/{chunk-56ZM6P7Z.cjs → chunk-4MWBKBS4.cjs} +12 -12
  32. package/dist/chunk-4MWBKBS4.cjs.map +1 -0
  33. package/dist/chunk-4NVV3GRU.js +110 -0
  34. package/dist/chunk-4NVV3GRU.js.map +1 -0
  35. package/dist/{chunk-QGDKZDPN.js → chunk-4WIJSKFA.js} +3 -3
  36. package/dist/{chunk-QGDKZDPN.js.map → chunk-4WIJSKFA.js.map} +1 -1
  37. package/dist/{chunk-VNNK6AKU.js → chunk-5BVBNE2F.js} +3 -3
  38. package/dist/chunk-5BVBNE2F.js.map +1 -0
  39. package/dist/{chunk-EEZ7CFMM.js → chunk-5KOW3GLE.js} +2 -2
  40. package/dist/chunk-5KOW3GLE.js.map +1 -0
  41. package/dist/{chunk-FK4EJD2I.cjs → chunk-6OIO4FYX.cjs} +7 -7
  42. package/dist/{chunk-FK4EJD2I.cjs.map → chunk-6OIO4FYX.cjs.map} +1 -1
  43. package/dist/{chunk-IEUDKUPM.cjs → chunk-6OKPJZMX.cjs} +8 -8
  44. package/dist/{chunk-IEUDKUPM.cjs.map → chunk-6OKPJZMX.cjs.map} +1 -1
  45. package/dist/{chunk-QFMXXUUT.js → chunk-6XZBKFQ7.js} +3 -3
  46. package/dist/{chunk-QFMXXUUT.js.map → chunk-6XZBKFQ7.js.map} +1 -1
  47. package/dist/{chunk-H5YVJB4K.cjs → chunk-6ZGD7R27.cjs} +37 -37
  48. package/dist/chunk-6ZGD7R27.cjs.map +1 -0
  49. package/dist/{chunk-HEN5WXXI.js → chunk-7QDTZJRV.js} +6 -6
  50. package/dist/{chunk-HEN5WXXI.js.map → chunk-7QDTZJRV.js.map} +1 -1
  51. package/dist/{chunk-MHCKWQR3.cjs → chunk-A3MHE2MQ.cjs} +8 -8
  52. package/dist/{chunk-MHCKWQR3.cjs.map → chunk-A3MHE2MQ.cjs.map} +1 -1
  53. package/dist/{chunk-5SB4V74H.js → chunk-A4XXV2C6.js} +18 -18
  54. package/dist/chunk-A4XXV2C6.js.map +1 -0
  55. package/dist/{chunk-6VP3XGEK.js → chunk-A6GXYF2Q.js} +9 -9
  56. package/dist/{chunk-6VP3XGEK.js.map → chunk-A6GXYF2Q.js.map} +1 -1
  57. package/dist/{chunk-SDIBMLL5.js → chunk-ACHGT3D2.js} +8 -8
  58. package/dist/{chunk-SDIBMLL5.js.map → chunk-ACHGT3D2.js.map} +1 -1
  59. package/dist/{chunk-XAEAMI5H.js → chunk-AOZYORH7.js} +4 -4
  60. package/dist/chunk-AOZYORH7.js.map +1 -0
  61. package/dist/{chunk-LTCOPATU.cjs → chunk-BE3W4HYV.cjs} +2 -2
  62. package/dist/chunk-BE3W4HYV.cjs.map +1 -0
  63. package/dist/{chunk-NQ4AC2U4.cjs → chunk-BT6DFWZB.cjs} +9 -9
  64. package/dist/{chunk-NQ4AC2U4.cjs.map → chunk-BT6DFWZB.cjs.map} +1 -1
  65. package/dist/{chunk-XAYVHS2B.cjs → chunk-BUGVDCI5.cjs} +4 -4
  66. package/dist/{chunk-XAYVHS2B.cjs.map → chunk-BUGVDCI5.cjs.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-NNSKJCBM.cjs → chunk-D3SJLXYZ.cjs} +10 -10
  70. package/dist/{chunk-NNSKJCBM.cjs.map → chunk-D3SJLXYZ.cjs.map} +1 -1
  71. package/dist/{chunk-MRODLUGY.cjs → chunk-ED7ANP6W.cjs} +4 -4
  72. package/dist/{chunk-MRODLUGY.cjs.map → chunk-ED7ANP6W.cjs.map} +1 -1
  73. package/dist/{chunk-MXSMAGDU.js → chunk-EDI7DBWO.js} +33 -26
  74. package/dist/chunk-EDI7DBWO.js.map +1 -0
  75. package/dist/{chunk-T4QWDOG6.js → chunk-EE24WJJR.js} +5 -5
  76. package/dist/{chunk-T4QWDOG6.js.map → chunk-EE24WJJR.js.map} +1 -1
  77. package/dist/{chunk-ZJN6NTHE.js → chunk-EUB7YLU2.js} +3 -3
  78. package/dist/{chunk-ZJN6NTHE.js.map → chunk-EUB7YLU2.js.map} +1 -1
  79. package/dist/{chunk-ALU3KC4G.cjs → chunk-G7X2Y7Y2.cjs} +156 -156
  80. package/dist/chunk-G7X2Y7Y2.cjs.map +1 -0
  81. package/dist/{chunk-YCXMSDSP.js → chunk-HHUDNTZC.js} +4 -4
  82. package/dist/{chunk-YCXMSDSP.js.map → chunk-HHUDNTZC.js.map} +1 -1
  83. package/dist/{chunk-GL7CFBVC.js → chunk-HI6G3SNY.js} +48 -48
  84. package/dist/chunk-HI6G3SNY.js.map +1 -0
  85. package/dist/{chunk-G6AASL5T.cjs → chunk-HLK35TD7.cjs} +24 -24
  86. package/dist/{chunk-G6AASL5T.cjs.map → chunk-HLK35TD7.cjs.map} +1 -1
  87. package/dist/{chunk-4YB7B3RP.cjs → chunk-IBDE4R5L.cjs} +13 -13
  88. package/dist/{chunk-4YB7B3RP.cjs.map → chunk-IBDE4R5L.cjs.map} +1 -1
  89. package/dist/{chunk-WDGCZDRG.js → chunk-JCXIDFRI.js} +3 -3
  90. package/dist/{chunk-WDGCZDRG.js.map → chunk-JCXIDFRI.js.map} +1 -1
  91. package/dist/{chunk-I35DI7ES.js → chunk-JI34KBNC.js} +3 -3
  92. package/dist/{chunk-I35DI7ES.js.map → chunk-JI34KBNC.js.map} +1 -1
  93. package/dist/{chunk-TAPQWDW2.js → chunk-KCZW75PI.js} +2 -2
  94. package/dist/chunk-KCZW75PI.js.map +1 -0
  95. package/dist/{chunk-U2WLFOA3.cjs → chunk-KL7E244K.cjs} +4 -4
  96. package/dist/{chunk-U2WLFOA3.cjs.map → chunk-KL7E244K.cjs.map} +1 -1
  97. package/dist/{chunk-PAEJPLVN.cjs → chunk-KTXOHCAE.cjs} +4 -4
  98. package/dist/{chunk-PAEJPLVN.cjs.map → chunk-KTXOHCAE.cjs.map} +1 -1
  99. package/dist/{chunk-2WFB5ZOX.js → chunk-KWXC6ERT.js} +5 -5
  100. package/dist/{chunk-2WFB5ZOX.js.map → chunk-KWXC6ERT.js.map} +1 -1
  101. package/dist/{chunk-56OXYUZE.js → chunk-LGCEYEU2.js} +3 -3
  102. package/dist/chunk-LGCEYEU2.js.map +1 -0
  103. package/dist/{chunk-FAY3QDGC.cjs → chunk-M4OGSS66.cjs} +11 -11
  104. package/dist/{chunk-FAY3QDGC.cjs.map → chunk-M4OGSS66.cjs.map} +1 -1
  105. package/dist/{chunk-F6Y4IEQM.js → chunk-M6UUTNDT.js} +4 -4
  106. package/dist/{chunk-F6Y4IEQM.js.map → chunk-M6UUTNDT.js.map} +1 -1
  107. package/dist/{chunk-GM7QDQ24.cjs → chunk-MXRBNJ6D.cjs} +11 -11
  108. package/dist/{chunk-GM7QDQ24.cjs.map → chunk-MXRBNJ6D.cjs.map} +1 -1
  109. package/dist/{chunk-YPQF26X7.cjs → chunk-OBA6YK2R.cjs} +2 -2
  110. package/dist/chunk-OBA6YK2R.cjs.map +1 -0
  111. package/dist/{chunk-BJMKQOY2.cjs → chunk-OFWU6UKF.cjs} +11 -11
  112. package/dist/{chunk-BJMKQOY2.cjs.map → chunk-OFWU6UKF.cjs.map} +1 -1
  113. package/dist/{chunk-3O2ELBST.cjs → chunk-PG3QQLWS.cjs} +5 -5
  114. package/dist/{chunk-3O2ELBST.cjs.map → chunk-PG3QQLWS.cjs.map} +1 -1
  115. package/dist/{chunk-2ONFGMBV.js → chunk-PY2RQOA7.js} +2 -2
  116. package/dist/chunk-PY2RQOA7.js.map +1 -0
  117. package/dist/{chunk-UQPDFW4E.js → chunk-QFWQLXCL.js} +3 -3
  118. package/dist/{chunk-UQPDFW4E.js.map → chunk-QFWQLXCL.js.map} +1 -1
  119. package/dist/{chunk-YBFDBOUN.cjs → chunk-QJQ2MAZF.cjs} +8 -8
  120. package/dist/{chunk-YBFDBOUN.cjs.map → chunk-QJQ2MAZF.cjs.map} +1 -1
  121. package/dist/{chunk-QUFSDDNU.cjs → chunk-R4AMI7KD.cjs} +15 -15
  122. package/dist/{chunk-QUFSDDNU.cjs.map → chunk-R4AMI7KD.cjs.map} +1 -1
  123. package/dist/{chunk-CSZRJ4RE.js → chunk-SGTMDQ4O.js} +5 -5
  124. package/dist/{chunk-CSZRJ4RE.js.map → chunk-SGTMDQ4O.js.map} +1 -1
  125. package/dist/{chunk-3ILFUXNE.cjs → chunk-SRIF7HMN.cjs} +5 -5
  126. package/dist/{chunk-3ILFUXNE.cjs.map → chunk-SRIF7HMN.cjs.map} +1 -1
  127. package/dist/{chunk-THEYGCYS.cjs → chunk-TKDWD3MU.cjs} +4 -4
  128. package/dist/chunk-TKDWD3MU.cjs.map +1 -0
  129. package/dist/{chunk-ZW345YOI.js → chunk-UD2T7ISG.js} +4 -4
  130. package/dist/{chunk-ZW345YOI.js.map → chunk-UD2T7ISG.js.map} +1 -1
  131. package/dist/{chunk-EXQV452X.js → chunk-UWEALKAN.js} +3 -3
  132. package/dist/{chunk-EXQV452X.js.map → chunk-UWEALKAN.js.map} +1 -1
  133. package/dist/{chunk-W52DKZBR.cjs → chunk-UZBA6YYP.cjs} +454 -333
  134. package/dist/chunk-UZBA6YYP.cjs.map +1 -0
  135. package/dist/{chunk-VYJSHGAY.js → chunk-VUDH4D2M.js} +201 -80
  136. package/dist/chunk-VUDH4D2M.js.map +1 -0
  137. package/dist/{chunk-W4QN5CMG.cjs → chunk-VVMLMKYZ.cjs} +9 -9
  138. package/dist/{chunk-W4QN5CMG.cjs.map → chunk-VVMLMKYZ.cjs.map} +1 -1
  139. package/dist/{chunk-JNIWFCKI.js → chunk-VYD6BGKK.js} +3 -3
  140. package/dist/{chunk-JNIWFCKI.js.map → chunk-VYD6BGKK.js.map} +1 -1
  141. package/dist/{chunk-YHZXBDAW.js → chunk-XJ5TMOGA.js} +16 -16
  142. package/dist/{chunk-YHZXBDAW.js.map → chunk-XJ5TMOGA.js.map} +1 -1
  143. package/dist/{chunk-7DXLNNKH.cjs → chunk-XKBJT7WI.cjs} +4 -4
  144. package/dist/{chunk-7DXLNNKH.cjs.map → chunk-XKBJT7WI.cjs.map} +1 -1
  145. package/dist/{chunk-YDLNI7J6.js → chunk-XS7SKY2F.js} +3 -3
  146. package/dist/{chunk-YDLNI7J6.js.map → chunk-XS7SKY2F.js.map} +1 -1
  147. package/dist/{chunk-NFCKEBHI.js → chunk-YCHC45BY.js} +3 -3
  148. package/dist/{chunk-NFCKEBHI.js.map → chunk-YCHC45BY.js.map} +1 -1
  149. package/dist/{chunk-ICYBIC6N.cjs → chunk-YVI4YPUP.cjs} +4 -4
  150. package/dist/chunk-YVI4YPUP.cjs.map +1 -0
  151. package/dist/{chunk-TQI3KRXZ.cjs → chunk-ZET34IZE.cjs} +18 -18
  152. package/dist/{chunk-TQI3KRXZ.cjs.map → chunk-ZET34IZE.cjs.map} +1 -1
  153. package/dist/{chunk-GLUWH6JO.js → chunk-ZFZYPLQI.js} +4 -4
  154. package/dist/{chunk-GLUWH6JO.js.map → chunk-ZFZYPLQI.js.map} +1 -1
  155. package/dist/{chunk-M5ZQBOIZ.js → chunk-ZK3BJ4XQ.js} +3 -3
  156. package/dist/{chunk-M5ZQBOIZ.js.map → chunk-ZK3BJ4XQ.js.map} +1 -1
  157. package/dist/{chunk-CD73YHEH.js → chunk-ZYOHF37V.js} +3 -3
  158. package/dist/{chunk-CD73YHEH.js.map → chunk-ZYOHF37V.js.map} +1 -1
  159. package/dist/compact-session-RR3ILTES.js +17 -0
  160. package/dist/{compact-session-WNKKIIDW.js.map → compact-session-RR3ILTES.js.map} +1 -1
  161. package/dist/compact-session-YOWJJPPB.cjs +54 -0
  162. package/dist/{compact-session-H5TKLD55.cjs.map → compact-session-YOWJJPPB.cjs.map} +1 -1
  163. package/dist/compaction.cjs +19 -19
  164. package/dist/compaction.d.cts +9 -9
  165. package/dist/compaction.d.ts +9 -9
  166. package/dist/compaction.js +3 -3
  167. package/dist/concurrency.cjs +6 -6
  168. package/dist/concurrency.js +4 -4
  169. package/dist/context-Q6ISOCN2.cjs +22 -0
  170. package/dist/{context-ZV33V4DC.cjs.map → context-Q6ISOCN2.cjs.map} +1 -1
  171. package/dist/context-ZDBBPIHY.js +5 -0
  172. package/dist/{context-VAYLPT4O.js.map → context-ZDBBPIHY.js.map} +1 -1
  173. package/dist/{cron-BiK_aNJI.d.cts → cron-BdXOZco9.d.cts} +2 -2
  174. package/dist/{cron-Dx7B-3WB.d.ts → cron-ChQ6zcW2.d.ts} +2 -2
  175. package/dist/cron.cjs +29 -29
  176. package/dist/cron.d.cts +3 -3
  177. package/dist/cron.d.ts +3 -3
  178. package/dist/cron.js +28 -28
  179. package/dist/{errors-DyVbXdR4.d.cts → errors-BUVjJGJA.d.cts} +1 -1
  180. package/dist/{errors-Cua4WC9H.d.ts → errors-CZIUKLHt.d.ts} +1 -1
  181. package/dist/errors.cjs +21 -21
  182. package/dist/errors.d.cts +2 -2
  183. package/dist/errors.d.ts +2 -2
  184. package/dist/errors.js +2 -2
  185. package/dist/eval.cjs +32 -32
  186. package/dist/eval.js +28 -28
  187. package/dist/{executor-PAH72CB5.js → executor-ASDDIM2X.js} +7 -7
  188. package/dist/{executor-PAH72CB5.js.map → executor-ASDDIM2X.js.map} +1 -1
  189. package/dist/{executor-OZSYXDKF.cjs → executor-DPCBSI35.cjs} +23 -23
  190. package/dist/{executor-OZSYXDKF.cjs.map → executor-DPCBSI35.cjs.map} +1 -1
  191. package/dist/filesystem/index.cjs +7 -7
  192. package/dist/filesystem/index.js +3 -3
  193. package/dist/fs-session-store-K5QUPNJZ.js +10 -0
  194. package/dist/{fs-session-store-6MY7PNI2.js.map → fs-session-store-K5QUPNJZ.js.map} +1 -1
  195. package/dist/fs-session-store-T5ZLQX42.cjs +19 -0
  196. package/dist/{fs-session-store-7E7UPLF2.cjs.map → fs-session-store-T5ZLQX42.cjs.map} +1 -1
  197. package/dist/generate-object-F56VIZ6U.cjs +20 -0
  198. package/dist/{generate-object-5SCEH2EE.cjs.map → generate-object-F56VIZ6U.cjs.map} +1 -1
  199. package/dist/generate-object-LPSO6GVW.js +7 -0
  200. package/dist/{generate-object-I7UD4NWN.js.map → generate-object-LPSO6GVW.js.map} +1 -1
  201. package/dist/index-manager-DBJ55ZSO.cjs +19 -0
  202. package/dist/{index-manager-R6ZJFEZF.cjs.map → index-manager-DBJ55ZSO.cjs.map} +1 -1
  203. package/dist/index-manager-F2H2RCZU.js +10 -0
  204. package/dist/{index-manager-KKAK7NT3.js.map → index-manager-F2H2RCZU.js.map} +1 -1
  205. package/dist/index.cjs +140 -140
  206. package/dist/index.cjs.map +1 -1
  207. package/dist/index.d.cts +42 -42
  208. package/dist/index.d.ts +42 -42
  209. package/dist/index.js +54 -54
  210. package/dist/index.js.map +1 -1
  211. package/dist/{inject-session-DM4SKTZO.cjs → inject-session-25EC74WV.cjs} +10 -10
  212. package/dist/{inject-session-DM4SKTZO.cjs.map → inject-session-25EC74WV.cjs.map} +1 -1
  213. package/dist/{inject-session-UXNJQTZ6.js → inject-session-RKNLUE72.js} +7 -7
  214. package/dist/{inject-session-UXNJQTZ6.js.map → inject-session-RKNLUE72.js.map} +1 -1
  215. package/dist/internal/agent-loop/live-events.d.ts +46 -0
  216. package/dist/internal/budget/compute-cost.d.ts +1 -1
  217. package/dist/internal/diagnostics.d.ts +31 -29
  218. package/dist/internal/error-mappers/anthropic.d.ts +1 -1
  219. package/dist/internal/global-singleton.d.ts +7 -7
  220. package/dist/internal/judge/judge-call.d.ts +14 -14
  221. package/dist/internal/llm/retrying-client.d.ts +29 -29
  222. package/dist/internal/llm/transport-error.d.ts +2 -2
  223. package/dist/internal/persistence/exclusive-create.d.cts +2 -2
  224. package/dist/internal/persistence/exclusive-create.d.ts +2 -2
  225. package/dist/internal/persistence/fs-session-store.d.cts +18 -18
  226. package/dist/internal/persistence/fs-session-store.d.ts +18 -18
  227. package/dist/internal/persistence/index.cjs +25 -25
  228. package/dist/internal/persistence/index.cjs.map +1 -1
  229. package/dist/internal/persistence/index.js +6 -6
  230. package/dist/internal/persistence/index.js.map +1 -1
  231. package/dist/internal/persistence/paths.d.cts +7 -7
  232. package/dist/internal/persistence/paths.d.ts +7 -7
  233. package/dist/internal/persistence/session-transcript.d.cts +7 -7
  234. package/dist/internal/persistence/session-transcript.d.ts +7 -7
  235. package/dist/internal/persistence/session-writer.d.cts +30 -13
  236. package/dist/internal/persistence/session-writer.d.ts +30 -13
  237. package/dist/internal/runtime/fixtures/fixture-run-base.d.ts +45 -13
  238. package/dist/internal/runtime/lifecycle/goal-marker.d.ts +8 -8
  239. package/dist/internal/security/index.cjs +13 -13
  240. package/dist/internal/security/index.js +3 -3
  241. package/dist/internal/session/agent-session.d.ts +14 -14
  242. package/dist/internal/session/session-cache.d.ts +9 -9
  243. package/dist/judge-call-3S3T6O2Z.js +5 -0
  244. package/dist/{judge-call-TAEIXMYG.js.map → judge-call-3S3T6O2Z.js.map} +1 -1
  245. package/dist/judge-call-XIQJ5GIE.cjs +22 -0
  246. package/dist/{judge-call-SP3G3X2Y.cjs.map → judge-call-XIQJ5GIE.cjs.map} +1 -1
  247. package/dist/models.cjs +20 -20
  248. package/dist/models.cjs.map +1 -1
  249. package/dist/models.js +5 -5
  250. package/dist/models.js.map +1 -1
  251. package/dist/path-safety.cjs +10 -10
  252. package/dist/path-safety.js +3 -3
  253. package/dist/persistence.cjs +34 -34
  254. package/dist/persistence.cjs.map +1 -1
  255. package/dist/persistence.d.cts +1 -1
  256. package/dist/persistence.d.ts +1 -1
  257. package/dist/persistence.js +14 -14
  258. package/dist/persistence.js.map +1 -1
  259. package/dist/project.cjs +5 -5
  260. package/dist/project.js +3 -3
  261. package/dist/registry-BA3SLAN7.cjs +46 -0
  262. package/dist/{registry-N3GTKYCI.cjs.map → registry-BA3SLAN7.cjs.map} +1 -1
  263. package/dist/registry-KMI5RA22.js +9 -0
  264. package/dist/{registry-SOXE4RY6.js.map → registry-KMI5RA22.js.map} +1 -1
  265. package/dist/retry.cjs +4 -4
  266. package/dist/retry.js +3 -3
  267. package/dist/{run-until-YZ2ODWOF.js → run-until-BK56WG4P.js} +3 -3
  268. package/dist/{run-until-YZ2ODWOF.js.map → run-until-BK56WG4P.js.map} +1 -1
  269. package/dist/{run-until-ZZ2JLPJM.cjs → run-until-L5KQD3PV.cjs} +4 -4
  270. package/dist/{run-until-ZZ2JLPJM.cjs.map → run-until-L5KQD3PV.cjs.map} +1 -1
  271. package/dist/{run-CwEJtLPE.d.ts → run-vJHg2eGw.d.cts} +201 -174
  272. package/dist/{run-CwEJtLPE.d.cts → run-vJHg2eGw.d.ts} +201 -174
  273. package/dist/sandbox/bwrap.d.cts +20 -20
  274. package/dist/sandbox/bwrap.d.ts +20 -20
  275. package/dist/sandbox/index.cjs +39 -39
  276. package/dist/sandbox/index.cjs.map +1 -1
  277. package/dist/sandbox/index.d.cts +1 -1
  278. package/dist/sandbox/index.d.ts +1 -1
  279. package/dist/sandbox/index.js +35 -35
  280. package/dist/sandbox/index.js.map +1 -1
  281. package/dist/sandbox/linux-sandbox.d.cts +26 -21
  282. package/dist/sandbox/linux-sandbox.d.ts +26 -21
  283. package/dist/server/auth/index.cjs.map +1 -1
  284. package/dist/server/auth/index.d.cts +6 -6
  285. package/dist/server/auth/index.d.ts +6 -6
  286. package/dist/server/auth/index.js.map +1 -1
  287. package/dist/server/auth/orchestrator.d.cts +2 -2
  288. package/dist/server/auth/orchestrator.d.ts +2 -2
  289. package/dist/server/auth/types.d.cts +4 -4
  290. package/dist/server/auth/types.d.ts +4 -4
  291. package/dist/server/errors-envelope.cjs +14 -14
  292. package/dist/server/errors-envelope.d.cts +3 -3
  293. package/dist/server/errors-envelope.d.ts +3 -3
  294. package/dist/server/errors-envelope.js +3 -3
  295. package/dist/session-transcript-DFGX6WNL.cjs +50 -0
  296. package/dist/{session-transcript-EAKR4D2W.cjs.map → session-transcript-DFGX6WNL.cjs.map} +1 -1
  297. package/dist/session-transcript-MMPWCESR.js +5 -0
  298. package/dist/{session-transcript-6WKLYIN4.js.map → session-transcript-MMPWCESR.js.map} +1 -1
  299. package/dist/skills.cjs +7 -7
  300. package/dist/skills.js +5 -5
  301. package/dist/stream-object-AFERZU63.js +7 -0
  302. package/dist/{stream-object-OFM66VUT.js.map → stream-object-AFERZU63.js.map} +1 -1
  303. package/dist/stream-object-YPXZ4F5P.cjs +20 -0
  304. package/dist/{stream-object-Y7YCX3BI.cjs.map → stream-object-YPXZ4F5P.cjs.map} +1 -1
  305. package/dist/subagents-loader.cjs +6 -6
  306. package/dist/subagents-loader.d.cts +2 -2
  307. package/dist/subagents-loader.d.ts +2 -2
  308. package/dist/subagents-loader.js +4 -4
  309. package/dist/subscription/index.cjs +3 -3
  310. package/dist/subscription/index.js +2 -2
  311. package/dist/task-store.cjs +7 -7
  312. package/dist/task-store.js +4 -4
  313. package/dist/types/agent-prims.d.ts +4 -4
  314. package/dist/types/goal-events.d.ts +24 -23
  315. package/dist/types/run.d.ts +27 -0
  316. package/dist/types/session-record.d.ts +14 -13
  317. package/dist/workflow.cjs +27 -27
  318. package/dist/workflow.js +6 -6
  319. package/package.json +12 -13
  320. package/dist/agent-DW2J37IH.js +0 -42
  321. package/dist/agent-IE6IE4NW.cjs +0 -51
  322. package/dist/chunk-2ONFGMBV.js.map +0 -1
  323. package/dist/chunk-56OXYUZE.js.map +0 -1
  324. package/dist/chunk-56ZM6P7Z.cjs.map +0 -1
  325. package/dist/chunk-5SB4V74H.js.map +0 -1
  326. package/dist/chunk-77WHPVXE.js.map +0 -1
  327. package/dist/chunk-ALU3KC4G.cjs.map +0 -1
  328. package/dist/chunk-EEZ7CFMM.js.map +0 -1
  329. package/dist/chunk-GL7CFBVC.js.map +0 -1
  330. package/dist/chunk-H5YVJB4K.cjs.map +0 -1
  331. package/dist/chunk-ICYBIC6N.cjs.map +0 -1
  332. package/dist/chunk-IT3PWBW4.cjs.map +0 -1
  333. package/dist/chunk-ITLS5LRF.cjs +0 -105
  334. package/dist/chunk-ITLS5LRF.cjs.map +0 -1
  335. package/dist/chunk-LTCOPATU.cjs.map +0 -1
  336. package/dist/chunk-MXSMAGDU.js.map +0 -1
  337. package/dist/chunk-P34DHHYQ.cjs.map +0 -1
  338. package/dist/chunk-TAPQWDW2.js.map +0 -1
  339. package/dist/chunk-THEYGCYS.cjs.map +0 -1
  340. package/dist/chunk-VNNK6AKU.js.map +0 -1
  341. package/dist/chunk-VYJSHGAY.js.map +0 -1
  342. package/dist/chunk-W52DKZBR.cjs.map +0 -1
  343. package/dist/chunk-XAEAMI5H.js.map +0 -1
  344. package/dist/chunk-YPQF26X7.cjs.map +0 -1
  345. package/dist/chunk-YVTNFKZO.js +0 -103
  346. package/dist/chunk-YVTNFKZO.js.map +0 -1
  347. package/dist/compact-session-H5TKLD55.cjs +0 -54
  348. package/dist/compact-session-WNKKIIDW.js +0 -17
  349. package/dist/context-VAYLPT4O.js +0 -5
  350. package/dist/context-ZV33V4DC.cjs +0 -22
  351. package/dist/fs-session-store-6MY7PNI2.js +0 -10
  352. package/dist/fs-session-store-7E7UPLF2.cjs +0 -19
  353. package/dist/generate-object-5SCEH2EE.cjs +0 -20
  354. package/dist/generate-object-I7UD4NWN.js +0 -7
  355. package/dist/index-manager-KKAK7NT3.js +0 -10
  356. package/dist/index-manager-R6ZJFEZF.cjs +0 -19
  357. package/dist/judge-call-SP3G3X2Y.cjs +0 -22
  358. package/dist/judge-call-TAEIXMYG.js +0 -5
  359. package/dist/registry-N3GTKYCI.cjs +0 -46
  360. package/dist/registry-SOXE4RY6.js +0 -9
  361. package/dist/session-transcript-6WKLYIN4.js +0 -5
  362. package/dist/session-transcript-EAKR4D2W.cjs +0 -50
  363. package/dist/stream-object-OFM66VUT.js +0 -7
  364. package/dist/stream-object-Y7YCX3BI.cjs +0 -20
package/dist/index.d.cts CHANGED
@@ -1,13 +1,13 @@
1
- import { T as TheokitAgentError, B as BudgetOptions, a as BudgetHandle, b as BudgetSnapshot, E as ErrorMetadata } from './errors-DyVbXdR4.cjs';
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-DyVbXdR4.cjs';
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-DGv1-d81.cjs';
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-DGv1-d81.cjs';
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.cjs';
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.cjs';
1
+ import { T as TheokitAgentError, B as BudgetOptions, a as BudgetHandle, b as BudgetSnapshot, E as ErrorMetadata } from './errors-BUVjJGJA.cjs';
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-BUVjJGJA.cjs';
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-U3lBX-5t.cjs';
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-U3lBX-5t.cjs';
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-vJHg2eGw.cjs';
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-vJHg2eGw.cjs';
7
7
  import * as zod from 'zod';
8
8
  import { ZodType, z } from 'zod';
9
- import { S as StepResult } from './cron-BiK_aNJI.cjs';
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-BiK_aNJI.cjs';
9
+ import { S as StepResult } from './cron-BdXOZco9.cjs';
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-BdXOZco9.cjs';
11
11
 
12
12
  /**
13
13
  * Public compaction / context-management helpers (M2-1, extended V3-3).
@@ -596,7 +596,7 @@ declare class Agent {
596
596
  *
597
597
  * This bullet used to say the opposite ("Disposed agents are NOT auto-deleted...
598
598
  * 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
599
+ * `tests/m91-getorcreate-after-dispose.test.ts` builds an agent, disposes it, and
600
600
  * gets a different instance back. The claim was about the PERSISTENT registry and
601
601
  * read as being about the live cache — and consumers built around the wrong half.
602
602
  * The agent-builder's M85 interrupt rotates the session id to work around a
@@ -723,7 +723,7 @@ declare class AgentFactory {
723
723
  * - "subscription_included" routes (Codex CLI, future Claude Pro) →
724
724
  * return $0 with status="included".
725
725
  * - Provider unknown / pricing missing → status="unknown" with
726
- * undefined amountUsd (NÃO retorna 0 falso).
726
+ * undefined amountUsd (does NOT return a false 0).
727
727
  *
728
728
  * @internal
729
729
  */
@@ -743,8 +743,8 @@ declare function computeCost(args: ComputeArgs): CostBreakdown;
743
743
  * Budget enforcement (ADRs D383, D386, EC-7/8/9).
744
744
  *
745
745
  * - `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).
746
+ * `BudgetExceededError` before the LLM call if any limit would be
747
+ * exceeded (EC-9 — the caller invokes it inside the mutex section).
748
748
  * - `chargeAndCheckThresholds(name, actualUsd)` — apply charge ao
749
749
  * ledger + invoca onThreshold/onExceed callbacks isolated em
750
750
  * try/catch (EC-8).
@@ -1021,16 +1021,16 @@ declare class Provider {
1021
1021
  */
1022
1022
  static builtins(): Plugin[];
1023
1023
  /**
1024
- * O builtin que atende `modelId`, ou `undefined` quando nenhum atende.
1024
+ * The builtin serving `modelId`, or `undefined` when none does.
1025
1025
  *
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.
1026
+ * The grammar of a model id — `provider/model` — now has **one** owner. M94: the consumer
1027
+ * redid it by hand with `modelId.slice(0, modelId.indexOf('/'))`, which on an id **without a slash** returns the
1028
+ * id minus its last character (`claude-opus-5` -> `claude-opus-`): it matches no provider and the
1029
+ * caller fell through to the default, without distinguishing that from a hit. A non-routable model was
1030
+ * indistinguishable from the happy path.
1031
1031
  *
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).
1032
+ * Returns `undefined` instead of throwing: the caller decides whether absence is an error, and only they
1033
+ * know whether the model came from an explicit `--model` (an error) or from the default (normal).
1034
1034
  *
1035
1035
  * @public
1036
1036
  */
@@ -1203,32 +1203,32 @@ interface JudgeContext {
1203
1203
  /** Caller-supplied tuning knobs for the judge call. */
1204
1204
  interface JudgeOptions {
1205
1205
  /**
1206
- * Judge model identifier. Quando ausente, DERIVA de {@link agentModel} — e cai no literal
1207
- * `"openai/gpt-4o-mini"` se nem esse for informado.
1206
+ * Judge model identifier. When absent, it DERIVES from {@link agentModel} — and only falls back to the literal
1207
+ * `"openai/gpt-4o-mini"` when neither is provided.
1208
1208
  *
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.
1209
+ * M80 — the fixed default was provider-blind: it only resolves on OpenRouter. With an Anthropic key it gives
1210
+ * 404, with an OAuth bearer it gives 401, and in both the goal burned 3 whole turns before failing with
1211
+ * a misleading reason. The agent-builder already worked around this by deriving on its own; the knowledge
1212
+ * belongs here.
1213
1213
  */
1214
1214
  judgeModel?: string;
1215
1215
  /**
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.
1216
+ * M80 — the DRIVEN agent's model. It is the basis of the derivation: a judge running on the same model as the
1217
+ * chat works wherever chat works.
1218
1218
  */
1219
1219
  agentModel?: string;
1220
1220
  /** Override env. Default `process.env.OPENROUTER_API_KEY` (EC-A). */
1221
1221
  apiKey?: string;
1222
1222
  }
1223
1223
  /**
1224
- * M80 — a credencial ou o modelo do judge não servem: 401/404.
1224
+ * M80 — the judge's credential or model does not work: 401/404.
1225
1225
  *
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.
1226
+ * Fails FAST by design. `rules/error-handling.md` § 2 separates recoverable from unrecoverable, and a
1227
+ * nonexistent model does not start existing on retry — folding that into `{parseFailed: true}` made the loop
1228
+ * try three times and report "failed" on a consecutive-failure limit, hiding that the cause was the
1229
+ * credential. A slow, opaque failure traded for a fast, clear one.
1230
1230
  *
1231
- * Falha de PARSE e erro de rede continuam dobrados: são recuperáveis, e o loop decide por falhas
1231
+ * PARSE failures and network errors stay folded: they are recoverable, and the loop already decides on
1232
1232
  * consecutivas.
1233
1233
  */
1234
1234
  declare class JudgeCredentialError extends TheokitAgentError {
@@ -1259,16 +1259,16 @@ interface RunUntilDeps {
1259
1259
  }
1260
1260
 
1261
1261
  /**
1262
- * O marcador de continuação do goal-loop — num módulo FOLHA, de propósito.
1262
+ * The goal-loop's continuation marker in a LEAF module, on purpose.
1263
1263
  *
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.
1264
+ * It lived in `goal-loop.ts` and was imported by `run-until.ts`, which `goal-loop` in turn
1265
+ * imports back. The cycle was broken at runtime (the return edge is `import type` + a dynamic
1266
+ * `await import()`), but the cycle detector counts the dynamic edge and counting a dynamic import as a cycle
1267
+ * makes the gate impossible to satisfy without abandoning the canonical cycle-breaking technique.
1268
1268
  *
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.
1269
+ * A constant shared by two modules that know each other is the textbook case for extraction into a
1270
+ * leaf: neither needs to import the other to know it. The cycle disappears under ANY detector, with no
1271
+ * tool policy and without changing a line of behavior.
1272
1272
  */
1273
1273
  declare const GOAL_CONTINUATION_MARKER = "[[theokit:goal-continuation]]";
1274
1274
 
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-CZIUKLHt.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-CZIUKLHt.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-C3AEtM-W.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-C3AEtM-W.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-vJHg2eGw.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-vJHg2eGw.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-ChQ6zcW2.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-ChQ6zcW2.js';
11
11
 
12
12
  /**
13
13
  * Public compaction / context-management helpers (M2-1, extended V3-3).
@@ -596,7 +596,7 @@ declare class Agent {
596
596
  *
597
597
  * This bullet used to say the opposite ("Disposed agents are NOT auto-deleted...
598
598
  * 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
599
+ * `tests/m91-getorcreate-after-dispose.test.ts` builds an agent, disposes it, and
600
600
  * gets a different instance back. The claim was about the PERSISTENT registry and
601
601
  * read as being about the live cache — and consumers built around the wrong half.
602
602
  * The agent-builder's M85 interrupt rotates the session id to work around a
@@ -723,7 +723,7 @@ declare class AgentFactory {
723
723
  * - "subscription_included" routes (Codex CLI, future Claude Pro) →
724
724
  * return $0 with status="included".
725
725
  * - Provider unknown / pricing missing → status="unknown" with
726
- * undefined amountUsd (NÃO retorna 0 falso).
726
+ * undefined amountUsd (does NOT return a false 0).
727
727
  *
728
728
  * @internal
729
729
  */
@@ -743,8 +743,8 @@ declare function computeCost(args: ComputeArgs): CostBreakdown;
743
743
  * Budget enforcement (ADRs D383, D386, EC-7/8/9).
744
744
  *
745
745
  * - `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).
746
+ * `BudgetExceededError` before the LLM call if any limit would be
747
+ * exceeded (EC-9 — the caller invokes it inside the mutex section).
748
748
  * - `chargeAndCheckThresholds(name, actualUsd)` — apply charge ao
749
749
  * ledger + invoca onThreshold/onExceed callbacks isolated em
750
750
  * try/catch (EC-8).
@@ -1021,16 +1021,16 @@ declare class Provider {
1021
1021
  */
1022
1022
  static builtins(): Plugin[];
1023
1023
  /**
1024
- * O builtin que atende `modelId`, ou `undefined` quando nenhum atende.
1024
+ * The builtin serving `modelId`, or `undefined` when none does.
1025
1025
  *
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.
1026
+ * The grammar of a model id — `provider/model` — now has **one** owner. M94: the consumer
1027
+ * redid it by hand with `modelId.slice(0, modelId.indexOf('/'))`, which on an id **without a slash** returns the
1028
+ * id minus its last character (`claude-opus-5` -> `claude-opus-`): it matches no provider and the
1029
+ * caller fell through to the default, without distinguishing that from a hit. A non-routable model was
1030
+ * indistinguishable from the happy path.
1031
1031
  *
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).
1032
+ * Returns `undefined` instead of throwing: the caller decides whether absence is an error, and only they
1033
+ * know whether the model came from an explicit `--model` (an error) or from the default (normal).
1034
1034
  *
1035
1035
  * @public
1036
1036
  */
@@ -1203,32 +1203,32 @@ interface JudgeContext {
1203
1203
  /** Caller-supplied tuning knobs for the judge call. */
1204
1204
  interface JudgeOptions {
1205
1205
  /**
1206
- * Judge model identifier. Quando ausente, DERIVA de {@link agentModel} — e cai no literal
1207
- * `"openai/gpt-4o-mini"` se nem esse for informado.
1206
+ * Judge model identifier. When absent, it DERIVES from {@link agentModel} — and only falls back to the literal
1207
+ * `"openai/gpt-4o-mini"` when neither is provided.
1208
1208
  *
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.
1209
+ * M80 — the fixed default was provider-blind: it only resolves on OpenRouter. With an Anthropic key it gives
1210
+ * 404, with an OAuth bearer it gives 401, and in both the goal burned 3 whole turns before failing with
1211
+ * a misleading reason. The agent-builder already worked around this by deriving on its own; the knowledge
1212
+ * belongs here.
1213
1213
  */
1214
1214
  judgeModel?: string;
1215
1215
  /**
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.
1216
+ * M80 — the DRIVEN agent's model. It is the basis of the derivation: a judge running on the same model as the
1217
+ * chat works wherever chat works.
1218
1218
  */
1219
1219
  agentModel?: string;
1220
1220
  /** Override env. Default `process.env.OPENROUTER_API_KEY` (EC-A). */
1221
1221
  apiKey?: string;
1222
1222
  }
1223
1223
  /**
1224
- * M80 — a credencial ou o modelo do judge não servem: 401/404.
1224
+ * M80 — the judge's credential or model does not work: 401/404.
1225
1225
  *
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.
1226
+ * Fails FAST by design. `rules/error-handling.md` § 2 separates recoverable from unrecoverable, and a
1227
+ * nonexistent model does not start existing on retry — folding that into `{parseFailed: true}` made the loop
1228
+ * try three times and report "failed" on a consecutive-failure limit, hiding that the cause was the
1229
+ * credential. A slow, opaque failure traded for a fast, clear one.
1230
1230
  *
1231
- * Falha de PARSE e erro de rede continuam dobrados: são recuperáveis, e o loop decide por falhas
1231
+ * PARSE failures and network errors stay folded: they are recoverable, and the loop already decides on
1232
1232
  * consecutivas.
1233
1233
  */
1234
1234
  declare class JudgeCredentialError extends TheokitAgentError {
@@ -1259,16 +1259,16 @@ interface RunUntilDeps {
1259
1259
  }
1260
1260
 
1261
1261
  /**
1262
- * O marcador de continuação do goal-loop — num módulo FOLHA, de propósito.
1262
+ * The goal-loop's continuation marker in a LEAF module, on purpose.
1263
1263
  *
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.
1264
+ * It lived in `goal-loop.ts` and was imported by `run-until.ts`, which `goal-loop` in turn
1265
+ * imports back. The cycle was broken at runtime (the return edge is `import type` + a dynamic
1266
+ * `await import()`), but the cycle detector counts the dynamic edge and counting a dynamic import as a cycle
1267
+ * makes the gate impossible to satisfy without abandoning the canonical cycle-breaking technique.
1268
1268
  *
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.
1269
+ * A constant shared by two modules that know each other is the textbook case for extraction into a
1270
+ * leaf: neither needs to import the other to know it. The cycle disappears under ANY detector, with no
1271
+ * tool policy and without changing a line of behavior.
1272
1272
  */
1273
1273
  declare const GOAL_CONTINUATION_MARKER = "[[theokit:goal-continuation]]";
1274
1274
 
package/dist/index.js CHANGED
@@ -1,56 +1,56 @@
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 { StreamObjectError } from './chunk-6XZBKFQ7.js';
2
+ export { GOAL_CONTINUATION_MARKER } from './chunk-PY2RQOA7.js';
3
+ export { JudgeCredentialError } from './chunk-5BVBNE2F.js';
4
+ export { GenerateObjectError } from './chunk-ZK3BJ4XQ.js';
5
+ import './chunk-EUB7YLU2.js';
6
+ import { Workflow, agentStep } from './chunk-ACHGT3D2.js';
7
+ import './chunk-XS7SKY2F.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-EE24WJJR.js';
10
+ import { MEMORY_EMBEDDING_ADAPTERS, resolveApiKey, DEFAULT_AGENTIC_MODEL_ID, Agent } from './chunk-VUDH4D2M.js';
11
+ export { Agent, AgentBuilder, Tool, ToolError, UsageAccumulator, computeCost, getPricingEntry } from './chunk-VUDH4D2M.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-7QDTZJRV.js';
14
+ export { emitRunEvent } from './chunk-7QDTZJRV.js';
15
+ import './chunk-A4XXV2C6.js';
16
16
  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';
17
+ import './chunk-4NVV3GRU.js';
18
+ import { discoverProviderPlugins, shouldUseFixtureMode, isFixtureApiKey, httpRequest, mapOllamaTransportError, readErrorResponseBody, mapOllamaHttpError } from './chunk-HI6G3SNY.js';
19
+ import './chunk-UWEALKAN.js';
20
+ import './chunk-5KOW3GLE.js';
21
+ import { lanceStoragePath, LanceIndex, readFactsFromMarkdown, defaultIndexPath, openMemoryDb, memoryDir } from './chunk-4APWS2YF.js';
22
+ import './chunk-M6UUTNDT.js';
23
23
  import './chunk-7GFX45DD.js';
24
- import './chunk-ZW345YOI.js';
24
+ import './chunk-UD2T7ISG.js';
25
25
  import './chunk-FD2UT76F.js';
26
26
  import './chunk-U54XCYG3.js';
27
27
  import './chunk-FV3YEMQ7.js';
28
28
  import './chunk-6X6ID4MO.js';
29
29
  import './chunk-UJ7IQJAG.js';
30
30
  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';
31
+ import './chunk-4WIJSKFA.js';
32
+ import './chunk-YCHC45BY.js';
33
+ import './chunk-EDI7DBWO.js';
34
+ import './chunk-XJ5TMOGA.js';
35
+ import './chunk-ZFZYPLQI.js';
36
36
  import { withCwdMutex } from './chunk-2XLKLVVR.js';
37
37
  export { withCwdMutex } from './chunk-2XLKLVVR.js';
38
- import './chunk-XAEAMI5H.js';
39
- import './chunk-CSZRJ4RE.js';
38
+ import './chunk-AOZYORH7.js';
39
+ import './chunk-SGTMDQ4O.js';
40
40
  import { toJsonSchema } from './chunk-4VPXM6UU.js';
41
- import { replaceFileAtomic } from './chunk-56OXYUZE.js';
42
- import './chunk-YCXMSDSP.js';
43
- import './chunk-6VP3XGEK.js';
41
+ import { replaceFileAtomic } from './chunk-LGCEYEU2.js';
42
+ import './chunk-HHUDNTZC.js';
43
+ import './chunk-A6GXYF2Q.js';
44
44
  import { parseModelId } from './chunk-X2FR4OIT.js';
45
- import { registerBuiltins, listProviders, getCatalogCapabilities, getProviderProfile } from './chunk-77WHPVXE.js';
46
- import './chunk-I35DI7ES.js';
45
+ import { registerBuiltins, listProviders, getCatalogCapabilities, getProviderProfile } from './chunk-3XKVRLR2.js';
46
+ import './chunk-JI34KBNC.js';
47
47
  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';
48
+ import './chunk-KWXC6ERT.js';
49
+ import './chunk-JCXIDFRI.js';
50
+ import './chunk-QFWQLXCL.js';
51
+ import { BudgetExceededError, MemoryAdapterError, AuthenticationError, ConfigurationError } from './chunk-ZYOHF37V.js';
52
+ export { AgentDisposedError, AgentRunError, AuthenticationError, BudgetExceededError, ConfigurationError, IntegrationNotConnectedError, InvalidTaskIdError, MemoryAdapterError, NetworkError, RateLimitError, TaskNotFoundError, TheokitAgentError, UnknownAgentError, UnsupportedBudgetOperationError, UnsupportedRunOperationError, UnsupportedTaskOperationError, isTransientError } from './chunk-ZYOHF37V.js';
53
+ import { diag, redactSecrets, addPattern } from './chunk-KCZW75PI.js';
54
54
  import { z } from 'zod';
55
55
  import { randomUUID, createHash } from 'crypto';
56
56
  import { mkdir, readFile } from 'fs/promises';
@@ -594,16 +594,16 @@ var Provider = class _Provider {
594
594
  return listProviders().map((profile) => defineProvider(profile));
595
595
  }
596
596
  /**
597
- * O builtin que atende `modelId`, ou `undefined` quando nenhum atende.
597
+ * The builtin serving `modelId`, or `undefined` when none does.
598
598
  *
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.
599
+ * The grammar of a model id — `provider/model` — now has **one** owner. M94: the consumer
600
+ * redid it by hand with `modelId.slice(0, modelId.indexOf('/'))`, which on an id **without a slash** returns the
601
+ * id minus its last character (`claude-opus-5` -> `claude-opus-`): it matches no provider and the
602
+ * caller fell through to the default, without distinguishing that from a hit. A non-routable model was
603
+ * indistinguishable from the happy path.
604
604
  *
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).
605
+ * Returns `undefined` instead of throwing: the caller decides whether absence is an error, and only they
606
+ * know whether the model came from an explicit `--model` (an error) or from the default (normal).
607
607
  *
608
608
  * @public
609
609
  */
@@ -717,9 +717,9 @@ var EventBus = class {
717
717
  // src/goal-loop.ts
718
718
  function runGoalLoop(agent, goal, options, depsOverride) {
719
719
  async function* wrap() {
720
- const { runUntilImpl } = await import('./run-until-YZ2ODWOF.js');
720
+ const { runUntilImpl } = await import('./run-until-BK56WG4P.js');
721
721
  const deps = depsOverride ?? await (async () => {
722
- const { judgeCallImpl } = await import('./judge-call-TAEIXMYG.js');
722
+ const { judgeCallImpl } = await import('./judge-call-3S3T6O2Z.js');
723
723
  const { getAgentFacade } = await import('./agent-factory-registry-ZVTABLEY.js');
724
724
  const create = getAgentFacade().create;
725
725
  return {
@@ -1166,7 +1166,7 @@ var Memory = {
1166
1166
  openArgs.embedding = await resolveEmbedding(opts.embedding, peer.MEMORY_EMBEDDING_ADAPTERS);
1167
1167
  return await peer.IndexManager.open(openArgs);
1168
1168
  }
1169
- const { IndexManager } = await import('./index-manager-KKAK7NT3.js');
1169
+ const { IndexManager } = await import('./index-manager-F2H2RCZU.js');
1170
1170
  openArgs.embedding = await resolveEmbedding(opts.embedding, MEMORY_EMBEDDING_ADAPTERS);
1171
1171
  return await IndexManager.open(openArgs);
1172
1172
  },
@@ -1600,10 +1600,10 @@ function ehAgenteConstruido(m) {
1600
1600
  return typeof m.send === "function";
1601
1601
  }
1602
1602
  async function materializar(def, indice) {
1603
- const { Agent: Agent2 } = await import('./agent-DW2J37IH.js');
1603
+ const { Agent: Agent2 } = await import('./agent-3H3UKD6U.js');
1604
1604
  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
1605
+ // `AgentDefinition.model` admits the sentinel `'inherit'`, which is not a model id. Inheriting
1606
+ // here means "declare nothing and let the default apply" — forwarding the literal would create
1607
1607
  // um agente pedindo um modelo chamado `inherit`.
1608
1608
  ...def.model !== void 0 && def.model !== "inherit" ? { model: def.model } : {},
1609
1609
  ...def.prompt !== void 0 ? { systemPrompt: def.prompt } : {},
@@ -1626,12 +1626,12 @@ function createSquad(options) {
1626
1626
  }
1627
1627
  return {
1628
1628
  run: async (input) => {
1629
- const run = await (await montarPipeline(agents, options.name)).run(input);
1629
+ const run = await (await buildPipeline(agents, options.name)).run(input);
1630
1630
  return { result: run.output, status: run.status, steps: run.stepResults };
1631
1631
  }
1632
1632
  };
1633
1633
  }
1634
- async function montarPipeline(agents, nome) {
1634
+ async function buildPipeline(agents, nome) {
1635
1635
  let builder = Workflow.create({ name: nome ?? "squad" });
1636
1636
  for (let i = 0; i < agents.length; i++) {
1637
1637
  const membro = agents[i];