@code-yeongyu/senpi 2026.8.25 → 2026.8.26-2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (1208) hide show
  1. package/CHANGELOG.md +37 -0
  2. package/dist/core/agent-session.d.ts.map +1 -1
  3. package/dist/core/agent-session.js +39 -1
  4. package/dist/core/agent-session.js.map +1 -1
  5. package/dist/core/extensions/builtin/compaction/index.d.ts.map +1 -1
  6. package/dist/core/extensions/builtin/compaction/index.js +67 -0
  7. package/dist/core/extensions/builtin/compaction/index.js.map +1 -1
  8. package/dist/core/extensions/builtin/compaction/log.d.ts +1 -1
  9. package/dist/core/extensions/builtin/compaction/log.d.ts.map +1 -1
  10. package/dist/core/extensions/builtin/compaction/log.js +1 -0
  11. package/dist/core/extensions/builtin/compaction/log.js.map +1 -1
  12. package/dist/core/extensions/builtin/compaction/per-turn-cap.d.ts +5 -9
  13. package/dist/core/extensions/builtin/compaction/per-turn-cap.d.ts.map +1 -1
  14. package/dist/core/extensions/builtin/compaction/per-turn-cap.js +5 -11
  15. package/dist/core/extensions/builtin/compaction/per-turn-cap.js.map +1 -1
  16. package/dist/core/extensions/builtin/compaction/todo-bridge.d.ts +2 -3
  17. package/dist/core/extensions/builtin/compaction/todo-bridge.d.ts.map +1 -1
  18. package/dist/core/extensions/builtin/compaction/todo-bridge.js +53 -14
  19. package/dist/core/extensions/builtin/compaction/todo-bridge.js.map +1 -1
  20. package/dist/core/extensions/builtin/config-reload/index.js +14 -22
  21. package/dist/core/extensions/builtin/config-reload/index.js.map +1 -1
  22. package/dist/core/extensions/builtin/goal/monitor-continuation.d.ts.map +1 -1
  23. package/dist/core/extensions/builtin/goal/monitor-continuation.js +29 -6
  24. package/dist/core/extensions/builtin/goal/monitor-continuation.js.map +1 -1
  25. package/dist/core/hidden-stdout-log.d.ts +10 -0
  26. package/dist/core/hidden-stdout-log.d.ts.map +1 -1
  27. package/dist/core/hidden-stdout-log.js +36 -5
  28. package/dist/core/hidden-stdout-log.js.map +1 -1
  29. package/dist/modes/interactive/interactive-mode.d.ts.map +1 -1
  30. package/dist/modes/interactive/interactive-mode.js +46 -8
  31. package/dist/modes/interactive/interactive-mode.js.map +1 -1
  32. package/examples/extensions/custom-provider-anthropic/package-lock.json +28 -5
  33. package/examples/extensions/custom-provider-anthropic/package.json +1 -1
  34. package/node_modules/@anthropic-ai/sdk/CHANGELOG.md +558 -0
  35. package/node_modules/@anthropic-ai/sdk/README.md +16 -1
  36. package/node_modules/@anthropic-ai/sdk/_vendor/partial-json-parser/parser.d.mts.map +1 -1
  37. package/node_modules/@anthropic-ai/sdk/_vendor/partial-json-parser/parser.d.ts.map +1 -1
  38. package/node_modules/@anthropic-ai/sdk/_vendor/partial-json-parser/parser.js +14 -2
  39. package/node_modules/@anthropic-ai/sdk/_vendor/partial-json-parser/parser.js.map +1 -1
  40. package/node_modules/@anthropic-ai/sdk/_vendor/partial-json-parser/parser.mjs +14 -2
  41. package/node_modules/@anthropic-ai/sdk/_vendor/partial-json-parser/parser.mjs.map +1 -1
  42. package/node_modules/@anthropic-ai/sdk/api-promise.d.mts +1 -0
  43. package/node_modules/@anthropic-ai/sdk/api-promise.d.mts.map +1 -1
  44. package/node_modules/@anthropic-ai/sdk/api-promise.d.ts +1 -0
  45. package/node_modules/@anthropic-ai/sdk/api-promise.d.ts.map +1 -1
  46. package/node_modules/@anthropic-ai/sdk/api-promise.mjs +1 -0
  47. package/node_modules/@anthropic-ai/sdk/api-promise.mjs.map +1 -1
  48. package/node_modules/@anthropic-ai/sdk/bin/migration-config.json +481 -0
  49. package/node_modules/@anthropic-ai/sdk/client.d.mts +165 -11
  50. package/node_modules/@anthropic-ai/sdk/client.d.mts.map +1 -1
  51. package/node_modules/@anthropic-ai/sdk/client.d.ts +165 -11
  52. package/node_modules/@anthropic-ai/sdk/client.d.ts.map +1 -1
  53. package/node_modules/@anthropic-ai/sdk/client.js +415 -38
  54. package/node_modules/@anthropic-ai/sdk/client.js.map +1 -1
  55. package/node_modules/@anthropic-ai/sdk/client.mjs +414 -37
  56. package/node_modules/@anthropic-ai/sdk/client.mjs.map +1 -1
  57. package/node_modules/@anthropic-ai/sdk/core/api-promise.d.mts +1 -0
  58. package/node_modules/@anthropic-ai/sdk/core/api-promise.d.mts.map +1 -1
  59. package/node_modules/@anthropic-ai/sdk/core/api-promise.d.ts +1 -0
  60. package/node_modules/@anthropic-ai/sdk/core/api-promise.d.ts.map +1 -1
  61. package/node_modules/@anthropic-ai/sdk/core/api-promise.js +7 -2
  62. package/node_modules/@anthropic-ai/sdk/core/api-promise.js.map +1 -1
  63. package/node_modules/@anthropic-ai/sdk/core/api-promise.mjs +8 -3
  64. package/node_modules/@anthropic-ai/sdk/core/api-promise.mjs.map +1 -1
  65. package/node_modules/@anthropic-ai/sdk/core/api.d.mts +11 -0
  66. package/node_modules/@anthropic-ai/sdk/core/api.d.mts.map +1 -0
  67. package/node_modules/@anthropic-ai/sdk/core/api.d.ts +11 -0
  68. package/node_modules/@anthropic-ai/sdk/core/api.d.ts.map +1 -0
  69. package/node_modules/@anthropic-ai/sdk/core/api.js +3 -0
  70. package/node_modules/@anthropic-ai/sdk/core/api.js.map +1 -0
  71. package/node_modules/@anthropic-ai/sdk/core/api.mjs +2 -0
  72. package/node_modules/@anthropic-ai/sdk/core/api.mjs.map +1 -0
  73. package/node_modules/@anthropic-ai/sdk/core/credentials.d.mts +131 -0
  74. package/node_modules/@anthropic-ai/sdk/core/credentials.d.mts.map +1 -0
  75. package/node_modules/@anthropic-ai/sdk/core/credentials.d.ts +131 -0
  76. package/node_modules/@anthropic-ai/sdk/core/credentials.d.ts.map +1 -0
  77. package/node_modules/@anthropic-ai/sdk/core/credentials.js +317 -0
  78. package/node_modules/@anthropic-ai/sdk/core/credentials.js.map +1 -0
  79. package/node_modules/@anthropic-ai/sdk/core/credentials.mjs +277 -0
  80. package/node_modules/@anthropic-ai/sdk/core/credentials.mjs.map +1 -0
  81. package/node_modules/@anthropic-ai/sdk/core/error.d.mts +12 -0
  82. package/node_modules/@anthropic-ai/sdk/core/error.d.mts.map +1 -1
  83. package/node_modules/@anthropic-ai/sdk/core/error.d.ts +12 -0
  84. package/node_modules/@anthropic-ai/sdk/core/error.d.ts.map +1 -1
  85. package/node_modules/@anthropic-ai/sdk/core/error.js +18 -1
  86. package/node_modules/@anthropic-ai/sdk/core/error.js.map +1 -1
  87. package/node_modules/@anthropic-ai/sdk/core/error.mjs +16 -0
  88. package/node_modules/@anthropic-ai/sdk/core/error.mjs.map +1 -1
  89. package/node_modules/@anthropic-ai/sdk/core/middleware.d.mts +154 -0
  90. package/node_modules/@anthropic-ai/sdk/core/middleware.d.mts.map +1 -0
  91. package/node_modules/@anthropic-ai/sdk/core/middleware.d.ts +154 -0
  92. package/node_modules/@anthropic-ai/sdk/core/middleware.d.ts.map +1 -0
  93. package/node_modules/@anthropic-ai/sdk/core/middleware.js +174 -0
  94. package/node_modules/@anthropic-ai/sdk/core/middleware.js.map +1 -0
  95. package/node_modules/@anthropic-ai/sdk/core/middleware.mjs +168 -0
  96. package/node_modules/@anthropic-ai/sdk/core/middleware.mjs.map +1 -0
  97. package/node_modules/@anthropic-ai/sdk/core/pagination.d.mts +20 -0
  98. package/node_modules/@anthropic-ai/sdk/core/pagination.d.mts.map +1 -1
  99. package/node_modules/@anthropic-ai/sdk/core/pagination.d.ts +20 -0
  100. package/node_modules/@anthropic-ai/sdk/core/pagination.d.ts.map +1 -1
  101. package/node_modules/@anthropic-ai/sdk/core/pagination.js +26 -1
  102. package/node_modules/@anthropic-ai/sdk/core/pagination.js.map +1 -1
  103. package/node_modules/@anthropic-ai/sdk/core/pagination.mjs +24 -0
  104. package/node_modules/@anthropic-ai/sdk/core/pagination.mjs.map +1 -1
  105. package/node_modules/@anthropic-ai/sdk/core/resource.d.mts.map +1 -1
  106. package/node_modules/@anthropic-ai/sdk/core/resource.d.ts.map +1 -1
  107. package/node_modules/@anthropic-ai/sdk/core/streaming.d.mts +9 -0
  108. package/node_modules/@anthropic-ai/sdk/core/streaming.d.mts.map +1 -1
  109. package/node_modules/@anthropic-ai/sdk/core/streaming.d.ts +9 -0
  110. package/node_modules/@anthropic-ai/sdk/core/streaming.d.ts.map +1 -1
  111. package/node_modules/@anthropic-ai/sdk/core/streaming.js +34 -1
  112. package/node_modules/@anthropic-ai/sdk/core/streaming.js.map +1 -1
  113. package/node_modules/@anthropic-ai/sdk/core/streaming.mjs +34 -1
  114. package/node_modules/@anthropic-ai/sdk/core/streaming.mjs.map +1 -1
  115. package/node_modules/@anthropic-ai/sdk/core/uploads.d.mts.map +1 -1
  116. package/node_modules/@anthropic-ai/sdk/core/uploads.d.ts.map +1 -1
  117. package/node_modules/@anthropic-ai/sdk/core/uploads.mjs.map +1 -1
  118. package/node_modules/@anthropic-ai/sdk/error.d.mts +1 -0
  119. package/node_modules/@anthropic-ai/sdk/error.d.mts.map +1 -1
  120. package/node_modules/@anthropic-ai/sdk/error.d.ts +1 -0
  121. package/node_modules/@anthropic-ai/sdk/error.d.ts.map +1 -1
  122. package/node_modules/@anthropic-ai/sdk/error.mjs +1 -0
  123. package/node_modules/@anthropic-ai/sdk/error.mjs.map +1 -1
  124. package/node_modules/@anthropic-ai/sdk/helpers/beta/environments.d.mts +23 -0
  125. package/node_modules/@anthropic-ai/sdk/helpers/beta/environments.d.mts.map +1 -0
  126. package/node_modules/@anthropic-ai/sdk/helpers/beta/environments.d.ts +23 -0
  127. package/node_modules/@anthropic-ai/sdk/helpers/beta/environments.d.ts.map +1 -0
  128. package/node_modules/@anthropic-ai/sdk/helpers/beta/environments.js +31 -0
  129. package/node_modules/@anthropic-ai/sdk/helpers/beta/environments.js.map +1 -0
  130. package/node_modules/@anthropic-ai/sdk/helpers/beta/environments.mjs +23 -0
  131. package/node_modules/@anthropic-ai/sdk/helpers/beta/environments.mjs.map +1 -0
  132. package/node_modules/@anthropic-ai/sdk/helpers/beta/json-schema.d.mts +6 -0
  133. package/node_modules/@anthropic-ai/sdk/helpers/beta/json-schema.d.mts.map +1 -1
  134. package/node_modules/@anthropic-ai/sdk/helpers/beta/json-schema.d.ts +6 -0
  135. package/node_modules/@anthropic-ai/sdk/helpers/beta/json-schema.d.ts.map +1 -1
  136. package/node_modules/@anthropic-ai/sdk/helpers/beta/json-schema.js +1 -0
  137. package/node_modules/@anthropic-ai/sdk/helpers/beta/json-schema.js.map +1 -1
  138. package/node_modules/@anthropic-ai/sdk/helpers/beta/json-schema.mjs +1 -0
  139. package/node_modules/@anthropic-ai/sdk/helpers/beta/json-schema.mjs.map +1 -1
  140. package/node_modules/@anthropic-ai/sdk/helpers/beta/mcp.d.mts +1 -1
  141. package/node_modules/@anthropic-ai/sdk/helpers/beta/mcp.d.mts.map +1 -1
  142. package/node_modules/@anthropic-ai/sdk/helpers/beta/mcp.d.ts +1 -1
  143. package/node_modules/@anthropic-ai/sdk/helpers/beta/mcp.d.ts.map +1 -1
  144. package/node_modules/@anthropic-ai/sdk/helpers/beta/mcp.js +1 -1
  145. package/node_modules/@anthropic-ai/sdk/helpers/beta/mcp.js.map +1 -1
  146. package/node_modules/@anthropic-ai/sdk/helpers/beta/mcp.mjs +1 -1
  147. package/node_modules/@anthropic-ai/sdk/helpers/beta/mcp.mjs.map +1 -1
  148. package/node_modules/@anthropic-ai/sdk/helpers/beta/memory.d.mts.map +1 -1
  149. package/node_modules/@anthropic-ai/sdk/helpers/beta/memory.d.ts.map +1 -1
  150. package/node_modules/@anthropic-ai/sdk/helpers/beta/zod.d.mts +11 -5
  151. package/node_modules/@anthropic-ai/sdk/helpers/beta/zod.d.mts.map +1 -1
  152. package/node_modules/@anthropic-ai/sdk/helpers/beta/zod.d.ts +11 -5
  153. package/node_modules/@anthropic-ai/sdk/helpers/beta/zod.d.ts.map +1 -1
  154. package/node_modules/@anthropic-ai/sdk/helpers/beta/zod.js +2 -2
  155. package/node_modules/@anthropic-ai/sdk/helpers/beta/zod.js.map +1 -1
  156. package/node_modules/@anthropic-ai/sdk/helpers/beta/zod.mjs +2 -2
  157. package/node_modules/@anthropic-ai/sdk/helpers/beta/zod.mjs.map +1 -1
  158. package/node_modules/@anthropic-ai/sdk/helpers/index.d.mts.map +1 -1
  159. package/node_modules/@anthropic-ai/sdk/helpers/index.d.ts.map +1 -1
  160. package/node_modules/@anthropic-ai/sdk/helpers/index.mjs.map +1 -1
  161. package/node_modules/@anthropic-ai/sdk/helpers/json-schema.d.mts.map +1 -1
  162. package/node_modules/@anthropic-ai/sdk/helpers/json-schema.d.ts.map +1 -1
  163. package/node_modules/@anthropic-ai/sdk/helpers/json-schema.mjs.map +1 -1
  164. package/node_modules/@anthropic-ai/sdk/helpers/zod.d.mts +2 -2
  165. package/node_modules/@anthropic-ai/sdk/helpers/zod.d.mts.map +1 -1
  166. package/node_modules/@anthropic-ai/sdk/helpers/zod.d.ts +2 -2
  167. package/node_modules/@anthropic-ai/sdk/helpers/zod.d.ts.map +1 -1
  168. package/node_modules/@anthropic-ai/sdk/helpers/zod.js +1 -2
  169. package/node_modules/@anthropic-ai/sdk/helpers/zod.js.map +1 -1
  170. package/node_modules/@anthropic-ai/sdk/helpers/zod.mjs +1 -2
  171. package/node_modules/@anthropic-ai/sdk/helpers/zod.mjs.map +1 -1
  172. package/node_modules/@anthropic-ai/sdk/index.d.mts +4 -2
  173. package/node_modules/@anthropic-ai/sdk/index.d.mts.map +1 -1
  174. package/node_modules/@anthropic-ai/sdk/index.d.ts +4 -2
  175. package/node_modules/@anthropic-ai/sdk/index.d.ts.map +1 -1
  176. package/node_modules/@anthropic-ai/sdk/index.js +5 -1
  177. package/node_modules/@anthropic-ai/sdk/index.js.map +1 -1
  178. package/node_modules/@anthropic-ai/sdk/index.mjs +3 -2
  179. package/node_modules/@anthropic-ai/sdk/index.mjs.map +1 -1
  180. package/node_modules/@anthropic-ai/sdk/internal/constants.d.mts.map +1 -1
  181. package/node_modules/@anthropic-ai/sdk/internal/constants.d.ts.map +1 -1
  182. package/node_modules/@anthropic-ai/sdk/internal/constants.js +0 -5
  183. package/node_modules/@anthropic-ai/sdk/internal/constants.js.map +1 -1
  184. package/node_modules/@anthropic-ai/sdk/internal/constants.mjs +0 -5
  185. package/node_modules/@anthropic-ai/sdk/internal/constants.mjs.map +1 -1
  186. package/node_modules/@anthropic-ai/sdk/internal/decoders/jsonl.d.mts.map +1 -1
  187. package/node_modules/@anthropic-ai/sdk/internal/decoders/jsonl.d.ts.map +1 -1
  188. package/node_modules/@anthropic-ai/sdk/internal/decoders/jsonl.mjs.map +1 -1
  189. package/node_modules/@anthropic-ai/sdk/internal/decoders/line.mjs.map +1 -1
  190. package/node_modules/@anthropic-ai/sdk/internal/detect-platform.mjs.map +1 -1
  191. package/node_modules/@anthropic-ai/sdk/internal/file-store.d.mts +136 -0
  192. package/node_modules/@anthropic-ai/sdk/internal/file-store.d.mts.map +1 -0
  193. package/node_modules/@anthropic-ai/sdk/internal/file-store.d.ts +136 -0
  194. package/node_modules/@anthropic-ai/sdk/internal/file-store.d.ts.map +1 -0
  195. package/node_modules/@anthropic-ai/sdk/internal/file-store.js +531 -0
  196. package/node_modules/@anthropic-ai/sdk/internal/file-store.js.map +1 -0
  197. package/node_modules/@anthropic-ai/sdk/internal/file-store.mjs +523 -0
  198. package/node_modules/@anthropic-ai/sdk/internal/file-store.mjs.map +1 -0
  199. package/node_modules/@anthropic-ai/sdk/internal/headers.d.mts +7 -0
  200. package/node_modules/@anthropic-ai/sdk/internal/headers.d.mts.map +1 -1
  201. package/node_modules/@anthropic-ai/sdk/internal/headers.d.ts +7 -0
  202. package/node_modules/@anthropic-ai/sdk/internal/headers.d.ts.map +1 -1
  203. package/node_modules/@anthropic-ai/sdk/internal/headers.js +45 -4
  204. package/node_modules/@anthropic-ai/sdk/internal/headers.js.map +1 -1
  205. package/node_modules/@anthropic-ai/sdk/internal/headers.mjs +43 -3
  206. package/node_modules/@anthropic-ai/sdk/internal/headers.mjs.map +1 -1
  207. package/node_modules/@anthropic-ai/sdk/internal/message-stream-utils.d.mts +10 -0
  208. package/node_modules/@anthropic-ai/sdk/internal/message-stream-utils.d.mts.map +1 -0
  209. package/node_modules/@anthropic-ai/sdk/internal/message-stream-utils.d.ts +10 -0
  210. package/node_modules/@anthropic-ai/sdk/internal/message-stream-utils.d.ts.map +1 -0
  211. package/node_modules/@anthropic-ai/sdk/internal/message-stream-utils.js +34 -0
  212. package/node_modules/@anthropic-ai/sdk/internal/message-stream-utils.js.map +1 -0
  213. package/node_modules/@anthropic-ai/sdk/internal/message-stream-utils.mjs +30 -0
  214. package/node_modules/@anthropic-ai/sdk/internal/message-stream-utils.mjs.map +1 -0
  215. package/node_modules/@anthropic-ai/sdk/internal/parse.d.mts +2 -1
  216. package/node_modules/@anthropic-ai/sdk/internal/parse.d.mts.map +1 -1
  217. package/node_modules/@anthropic-ai/sdk/internal/parse.d.ts +2 -1
  218. package/node_modules/@anthropic-ai/sdk/internal/parse.d.ts.map +1 -1
  219. package/node_modules/@anthropic-ai/sdk/internal/parse.js +16 -10
  220. package/node_modules/@anthropic-ai/sdk/internal/parse.js.map +1 -1
  221. package/node_modules/@anthropic-ai/sdk/internal/parse.mjs +15 -9
  222. package/node_modules/@anthropic-ai/sdk/internal/parse.mjs.map +1 -1
  223. package/node_modules/@anthropic-ai/sdk/internal/qs/formats.d.mts +7 -0
  224. package/node_modules/@anthropic-ai/sdk/internal/qs/formats.d.mts.map +1 -0
  225. package/node_modules/@anthropic-ai/sdk/internal/qs/formats.d.ts +7 -0
  226. package/node_modules/@anthropic-ai/sdk/internal/qs/formats.d.ts.map +1 -0
  227. package/node_modules/@anthropic-ai/sdk/internal/qs/formats.js +13 -0
  228. package/node_modules/@anthropic-ai/sdk/internal/qs/formats.js.map +1 -0
  229. package/node_modules/@anthropic-ai/sdk/internal/qs/formats.mjs +9 -0
  230. package/node_modules/@anthropic-ai/sdk/internal/qs/formats.mjs.map +1 -0
  231. package/node_modules/@anthropic-ai/sdk/internal/qs/index.d.mts +10 -0
  232. package/node_modules/@anthropic-ai/sdk/internal/qs/index.d.mts.map +1 -0
  233. package/node_modules/@anthropic-ai/sdk/internal/qs/index.d.ts +10 -0
  234. package/node_modules/@anthropic-ai/sdk/internal/qs/index.d.ts.map +1 -0
  235. package/node_modules/@anthropic-ai/sdk/internal/qs/index.js +14 -0
  236. package/node_modules/@anthropic-ai/sdk/internal/qs/index.js.map +1 -0
  237. package/node_modules/@anthropic-ai/sdk/internal/qs/index.mjs +10 -0
  238. package/node_modules/@anthropic-ai/sdk/internal/qs/index.mjs.map +1 -0
  239. package/node_modules/@anthropic-ai/sdk/internal/qs/stringify.d.mts +3 -0
  240. package/node_modules/@anthropic-ai/sdk/internal/qs/stringify.d.mts.map +1 -0
  241. package/node_modules/@anthropic-ai/sdk/internal/qs/stringify.d.ts +3 -0
  242. package/node_modules/@anthropic-ai/sdk/internal/qs/stringify.d.ts.map +1 -0
  243. package/node_modules/@anthropic-ai/sdk/internal/qs/stringify.js +277 -0
  244. package/node_modules/@anthropic-ai/sdk/internal/qs/stringify.js.map +1 -0
  245. package/node_modules/@anthropic-ai/sdk/internal/qs/stringify.mjs +274 -0
  246. package/node_modules/@anthropic-ai/sdk/internal/qs/stringify.mjs.map +1 -0
  247. package/node_modules/@anthropic-ai/sdk/internal/qs/types.d.mts +57 -0
  248. package/node_modules/@anthropic-ai/sdk/internal/qs/types.d.mts.map +1 -0
  249. package/node_modules/@anthropic-ai/sdk/internal/qs/types.d.ts +57 -0
  250. package/node_modules/@anthropic-ai/sdk/internal/qs/types.d.ts.map +1 -0
  251. package/node_modules/@anthropic-ai/sdk/internal/qs/types.js +3 -0
  252. package/node_modules/@anthropic-ai/sdk/internal/qs/types.js.map +1 -0
  253. package/node_modules/@anthropic-ai/sdk/internal/qs/types.mjs +2 -0
  254. package/node_modules/@anthropic-ai/sdk/internal/qs/types.mjs.map +1 -0
  255. package/node_modules/@anthropic-ai/sdk/internal/qs/utils.d.mts +15 -0
  256. package/node_modules/@anthropic-ai/sdk/internal/qs/utils.d.mts.map +1 -0
  257. package/node_modules/@anthropic-ai/sdk/internal/qs/utils.d.ts +15 -0
  258. package/node_modules/@anthropic-ai/sdk/internal/qs/utils.d.ts.map +1 -0
  259. package/node_modules/@anthropic-ai/sdk/internal/qs/utils.js +230 -0
  260. package/node_modules/@anthropic-ai/sdk/internal/qs/utils.js.map +1 -0
  261. package/node_modules/@anthropic-ai/sdk/internal/qs/utils.mjs +217 -0
  262. package/node_modules/@anthropic-ai/sdk/internal/qs/utils.mjs.map +1 -0
  263. package/node_modules/@anthropic-ai/sdk/internal/request-options.d.mts +52 -2
  264. package/node_modules/@anthropic-ai/sdk/internal/request-options.d.mts.map +1 -1
  265. package/node_modules/@anthropic-ai/sdk/internal/request-options.d.ts +52 -2
  266. package/node_modules/@anthropic-ai/sdk/internal/request-options.d.ts.map +1 -1
  267. package/node_modules/@anthropic-ai/sdk/internal/request-options.js +12 -1
  268. package/node_modules/@anthropic-ai/sdk/internal/request-options.js.map +1 -1
  269. package/node_modules/@anthropic-ai/sdk/internal/request-options.mjs +10 -0
  270. package/node_modules/@anthropic-ai/sdk/internal/request-options.mjs.map +1 -1
  271. package/node_modules/@anthropic-ai/sdk/internal/request-signal.d.mts +4 -0
  272. package/node_modules/@anthropic-ai/sdk/internal/request-signal.d.mts.map +1 -0
  273. package/node_modules/@anthropic-ai/sdk/internal/request-signal.d.ts +4 -0
  274. package/node_modules/@anthropic-ai/sdk/internal/request-signal.d.ts.map +1 -0
  275. package/node_modules/@anthropic-ai/sdk/internal/request-signal.js +50 -0
  276. package/node_modules/@anthropic-ai/sdk/internal/request-signal.js.map +1 -0
  277. package/node_modules/@anthropic-ai/sdk/internal/request-signal.mjs +45 -0
  278. package/node_modules/@anthropic-ai/sdk/internal/request-signal.mjs.map +1 -0
  279. package/node_modules/@anthropic-ai/sdk/internal/shims.d.mts +6 -0
  280. package/node_modules/@anthropic-ai/sdk/internal/shims.d.mts.map +1 -1
  281. package/node_modules/@anthropic-ai/sdk/internal/shims.d.ts +6 -0
  282. package/node_modules/@anthropic-ai/sdk/internal/shims.d.ts.map +1 -1
  283. package/node_modules/@anthropic-ai/sdk/internal/stainless-helper-header.d.mts +60 -0
  284. package/node_modules/@anthropic-ai/sdk/internal/stainless-helper-header.d.mts.map +1 -0
  285. package/node_modules/@anthropic-ai/sdk/internal/stainless-helper-header.d.ts +60 -0
  286. package/node_modules/@anthropic-ai/sdk/internal/stainless-helper-header.d.ts.map +1 -0
  287. package/node_modules/@anthropic-ai/sdk/{lib → internal}/stainless-helper-header.js +27 -6
  288. package/node_modules/@anthropic-ai/sdk/internal/stainless-helper-header.js.map +1 -0
  289. package/node_modules/@anthropic-ai/sdk/{lib → internal}/stainless-helper-header.mjs +25 -5
  290. package/node_modules/@anthropic-ai/sdk/internal/stainless-helper-header.mjs.map +1 -0
  291. package/node_modules/@anthropic-ai/sdk/internal/to-file.d.mts.map +1 -1
  292. package/node_modules/@anthropic-ai/sdk/internal/to-file.d.ts.map +1 -1
  293. package/node_modules/@anthropic-ai/sdk/internal/to-file.mjs.map +1 -1
  294. package/node_modules/@anthropic-ai/sdk/internal/types.d.mts +12 -6
  295. package/node_modules/@anthropic-ai/sdk/internal/types.d.mts.map +1 -1
  296. package/node_modules/@anthropic-ai/sdk/internal/types.d.ts +12 -6
  297. package/node_modules/@anthropic-ai/sdk/internal/types.d.ts.map +1 -1
  298. package/node_modules/@anthropic-ai/sdk/internal/uploads.d.mts.map +1 -1
  299. package/node_modules/@anthropic-ai/sdk/internal/uploads.d.ts.map +1 -1
  300. package/node_modules/@anthropic-ai/sdk/internal/uploads.mjs.map +1 -1
  301. package/node_modules/@anthropic-ai/sdk/internal/utils/abort.d.mts +13 -0
  302. package/node_modules/@anthropic-ai/sdk/internal/utils/abort.d.mts.map +1 -0
  303. package/node_modules/@anthropic-ai/sdk/internal/utils/abort.d.ts +13 -0
  304. package/node_modules/@anthropic-ai/sdk/internal/utils/abort.d.ts.map +1 -0
  305. package/node_modules/@anthropic-ai/sdk/internal/utils/abort.js +26 -0
  306. package/node_modules/@anthropic-ai/sdk/internal/utils/abort.js.map +1 -0
  307. package/node_modules/@anthropic-ai/sdk/internal/utils/abort.mjs +23 -0
  308. package/node_modules/@anthropic-ai/sdk/internal/utils/abort.mjs.map +1 -0
  309. package/node_modules/@anthropic-ai/sdk/internal/utils/async-queue.d.mts +31 -0
  310. package/node_modules/@anthropic-ai/sdk/internal/utils/async-queue.d.mts.map +1 -0
  311. package/node_modules/@anthropic-ai/sdk/internal/utils/async-queue.d.ts +31 -0
  312. package/node_modules/@anthropic-ai/sdk/internal/utils/async-queue.d.ts.map +1 -0
  313. package/node_modules/@anthropic-ai/sdk/internal/utils/async-queue.js +75 -0
  314. package/node_modules/@anthropic-ai/sdk/internal/utils/async-queue.js.map +1 -0
  315. package/node_modules/@anthropic-ai/sdk/internal/utils/async-queue.mjs +71 -0
  316. package/node_modules/@anthropic-ai/sdk/internal/utils/async-queue.mjs.map +1 -0
  317. package/node_modules/@anthropic-ai/sdk/internal/utils/backoff.d.mts +23 -0
  318. package/node_modules/@anthropic-ai/sdk/internal/utils/backoff.d.mts.map +1 -0
  319. package/node_modules/@anthropic-ai/sdk/internal/utils/backoff.d.ts +23 -0
  320. package/node_modules/@anthropic-ai/sdk/internal/utils/backoff.d.ts.map +1 -0
  321. package/node_modules/@anthropic-ai/sdk/internal/utils/backoff.js +44 -0
  322. package/node_modules/@anthropic-ai/sdk/internal/utils/backoff.js.map +1 -0
  323. package/node_modules/@anthropic-ai/sdk/internal/utils/backoff.mjs +36 -0
  324. package/node_modules/@anthropic-ai/sdk/internal/utils/backoff.mjs.map +1 -0
  325. package/node_modules/@anthropic-ai/sdk/internal/utils/base64.mjs.map +1 -1
  326. package/node_modules/@anthropic-ai/sdk/internal/utils/log.d.mts +11 -1
  327. package/node_modules/@anthropic-ai/sdk/internal/utils/log.d.mts.map +1 -1
  328. package/node_modules/@anthropic-ai/sdk/internal/utils/log.d.ts +11 -1
  329. package/node_modules/@anthropic-ai/sdk/internal/utils/log.d.ts.map +1 -1
  330. package/node_modules/@anthropic-ai/sdk/internal/utils/log.js +37 -11
  331. package/node_modules/@anthropic-ai/sdk/internal/utils/log.js.map +1 -1
  332. package/node_modules/@anthropic-ai/sdk/internal/utils/log.mjs +35 -10
  333. package/node_modules/@anthropic-ai/sdk/internal/utils/log.mjs.map +1 -1
  334. package/node_modules/@anthropic-ai/sdk/internal/utils/path.mjs.map +1 -1
  335. package/node_modules/@anthropic-ai/sdk/internal/utils/promise.d.mts +11 -0
  336. package/node_modules/@anthropic-ai/sdk/internal/utils/promise.d.mts.map +1 -0
  337. package/node_modules/@anthropic-ai/sdk/internal/utils/promise.d.ts +11 -0
  338. package/node_modules/@anthropic-ai/sdk/internal/utils/promise.d.ts.map +1 -0
  339. package/node_modules/@anthropic-ai/sdk/internal/utils/promise.js +18 -0
  340. package/node_modules/@anthropic-ai/sdk/internal/utils/promise.js.map +1 -0
  341. package/node_modules/@anthropic-ai/sdk/internal/utils/promise.mjs +15 -0
  342. package/node_modules/@anthropic-ai/sdk/internal/utils/promise.mjs.map +1 -0
  343. package/node_modules/@anthropic-ai/sdk/internal/utils/query.d.mts +0 -3
  344. package/node_modules/@anthropic-ai/sdk/internal/utils/query.d.mts.map +1 -1
  345. package/node_modules/@anthropic-ai/sdk/internal/utils/query.d.ts +0 -3
  346. package/node_modules/@anthropic-ai/sdk/internal/utils/query.d.ts.map +1 -1
  347. package/node_modules/@anthropic-ai/sdk/internal/utils/query.js +3 -16
  348. package/node_modules/@anthropic-ai/sdk/internal/utils/query.js.map +1 -1
  349. package/node_modules/@anthropic-ai/sdk/internal/utils/query.mjs +2 -16
  350. package/node_modules/@anthropic-ai/sdk/internal/utils/query.mjs.map +1 -1
  351. package/node_modules/@anthropic-ai/sdk/internal/utils/sleep.d.mts +9 -1
  352. package/node_modules/@anthropic-ai/sdk/internal/utils/sleep.d.mts.map +1 -1
  353. package/node_modules/@anthropic-ai/sdk/internal/utils/sleep.d.ts +9 -1
  354. package/node_modules/@anthropic-ai/sdk/internal/utils/sleep.d.ts.map +1 -1
  355. package/node_modules/@anthropic-ai/sdk/internal/utils/sleep.js +23 -2
  356. package/node_modules/@anthropic-ai/sdk/internal/utils/sleep.js.map +1 -1
  357. package/node_modules/@anthropic-ai/sdk/internal/utils/sleep.mjs +23 -2
  358. package/node_modules/@anthropic-ai/sdk/internal/utils/sleep.mjs.map +1 -1
  359. package/node_modules/@anthropic-ai/sdk/internal/utils/time.d.mts +3 -0
  360. package/node_modules/@anthropic-ai/sdk/internal/utils/time.d.mts.map +1 -0
  361. package/node_modules/@anthropic-ai/sdk/internal/utils/time.d.ts +3 -0
  362. package/node_modules/@anthropic-ai/sdk/internal/utils/time.d.ts.map +1 -0
  363. package/node_modules/@anthropic-ai/sdk/internal/utils/time.js +8 -0
  364. package/node_modules/@anthropic-ai/sdk/internal/utils/time.js.map +1 -0
  365. package/node_modules/@anthropic-ai/sdk/internal/utils/time.mjs +5 -0
  366. package/node_modules/@anthropic-ai/sdk/internal/utils/time.mjs.map +1 -0
  367. package/node_modules/@anthropic-ai/sdk/internal/utils/values.mjs.map +1 -1
  368. package/node_modules/@anthropic-ai/sdk/internal/utils.d.mts.map +1 -1
  369. package/node_modules/@anthropic-ai/sdk/internal/utils.d.ts.map +1 -1
  370. package/node_modules/@anthropic-ai/sdk/internal/utils.mjs.map +1 -1
  371. package/node_modules/@anthropic-ai/sdk/lib/BetaMessageStream.d.mts +2 -0
  372. package/node_modules/@anthropic-ai/sdk/lib/BetaMessageStream.d.mts.map +1 -1
  373. package/node_modules/@anthropic-ai/sdk/lib/BetaMessageStream.d.ts +2 -0
  374. package/node_modules/@anthropic-ai/sdk/lib/BetaMessageStream.d.ts.map +1 -1
  375. package/node_modules/@anthropic-ai/sdk/lib/BetaMessageStream.js +66 -31
  376. package/node_modules/@anthropic-ai/sdk/lib/BetaMessageStream.js.map +1 -1
  377. package/node_modules/@anthropic-ai/sdk/lib/BetaMessageStream.mjs +66 -31
  378. package/node_modules/@anthropic-ai/sdk/lib/BetaMessageStream.mjs.map +1 -1
  379. package/node_modules/@anthropic-ai/sdk/lib/MessageStream.d.mts +2 -0
  380. package/node_modules/@anthropic-ai/sdk/lib/MessageStream.d.mts.map +1 -1
  381. package/node_modules/@anthropic-ai/sdk/lib/MessageStream.d.ts +2 -0
  382. package/node_modules/@anthropic-ai/sdk/lib/MessageStream.d.ts.map +1 -1
  383. package/node_modules/@anthropic-ai/sdk/lib/MessageStream.js +37 -26
  384. package/node_modules/@anthropic-ai/sdk/lib/MessageStream.js.map +1 -1
  385. package/node_modules/@anthropic-ai/sdk/lib/MessageStream.mjs +34 -23
  386. package/node_modules/@anthropic-ai/sdk/lib/MessageStream.mjs.map +1 -1
  387. package/node_modules/@anthropic-ai/sdk/lib/beta-parser.d.mts.map +1 -1
  388. package/node_modules/@anthropic-ai/sdk/lib/beta-parser.d.ts.map +1 -1
  389. package/node_modules/@anthropic-ai/sdk/lib/beta-parser.mjs.map +1 -1
  390. package/node_modules/@anthropic-ai/sdk/lib/credentials/credential-chain.d.mts +39 -0
  391. package/node_modules/@anthropic-ai/sdk/lib/credentials/credential-chain.d.mts.map +1 -0
  392. package/node_modules/@anthropic-ai/sdk/lib/credentials/credential-chain.d.ts +39 -0
  393. package/node_modules/@anthropic-ai/sdk/lib/credentials/credential-chain.d.ts.map +1 -0
  394. package/node_modules/@anthropic-ai/sdk/lib/credentials/credential-chain.js +245 -0
  395. package/node_modules/@anthropic-ai/sdk/lib/credentials/credential-chain.js.map +1 -0
  396. package/node_modules/@anthropic-ai/sdk/lib/credentials/credential-chain.mjs +208 -0
  397. package/node_modules/@anthropic-ai/sdk/lib/credentials/credential-chain.mjs.map +1 -0
  398. package/node_modules/@anthropic-ai/sdk/lib/credentials/identity-token.d.mts +11 -0
  399. package/node_modules/@anthropic-ai/sdk/lib/credentials/identity-token.d.mts.map +1 -0
  400. package/node_modules/@anthropic-ai/sdk/lib/credentials/identity-token.d.ts +11 -0
  401. package/node_modules/@anthropic-ai/sdk/lib/credentials/identity-token.d.ts.map +1 -0
  402. package/node_modules/@anthropic-ai/sdk/lib/credentials/identity-token.js +72 -0
  403. package/node_modules/@anthropic-ai/sdk/lib/credentials/identity-token.js.map +1 -0
  404. package/node_modules/@anthropic-ai/sdk/lib/credentials/identity-token.mjs +35 -0
  405. package/node_modules/@anthropic-ai/sdk/lib/credentials/identity-token.mjs.map +1 -0
  406. package/node_modules/@anthropic-ai/sdk/lib/credentials/oidc-federation.d.mts +40 -0
  407. package/node_modules/@anthropic-ai/sdk/lib/credentials/oidc-federation.d.mts.map +1 -0
  408. package/node_modules/@anthropic-ai/sdk/lib/credentials/oidc-federation.d.ts +40 -0
  409. package/node_modules/@anthropic-ai/sdk/lib/credentials/oidc-federation.d.ts.map +1 -0
  410. package/node_modules/@anthropic-ai/sdk/lib/credentials/oidc-federation.js +82 -0
  411. package/node_modules/@anthropic-ai/sdk/lib/credentials/oidc-federation.js.map +1 -0
  412. package/node_modules/@anthropic-ai/sdk/lib/credentials/oidc-federation.mjs +79 -0
  413. package/node_modules/@anthropic-ai/sdk/lib/credentials/oidc-federation.mjs.map +1 -0
  414. package/node_modules/@anthropic-ai/sdk/lib/credentials/token-cache.d.mts +54 -0
  415. package/node_modules/@anthropic-ai/sdk/lib/credentials/token-cache.d.mts.map +1 -0
  416. package/node_modules/@anthropic-ai/sdk/lib/credentials/token-cache.d.ts +54 -0
  417. package/node_modules/@anthropic-ai/sdk/lib/credentials/token-cache.d.ts.map +1 -0
  418. package/node_modules/@anthropic-ai/sdk/lib/credentials/token-cache.js +112 -0
  419. package/node_modules/@anthropic-ai/sdk/lib/credentials/token-cache.js.map +1 -0
  420. package/node_modules/@anthropic-ai/sdk/lib/credentials/token-cache.mjs +108 -0
  421. package/node_modules/@anthropic-ai/sdk/lib/credentials/token-cache.mjs.map +1 -0
  422. package/node_modules/@anthropic-ai/sdk/lib/credentials/types.d.mts +96 -0
  423. package/node_modules/@anthropic-ai/sdk/lib/credentials/types.d.mts.map +1 -0
  424. package/node_modules/@anthropic-ai/sdk/lib/credentials/types.d.ts +96 -0
  425. package/node_modules/@anthropic-ai/sdk/lib/credentials/types.d.ts.map +1 -0
  426. package/node_modules/@anthropic-ai/sdk/lib/credentials/types.js +266 -0
  427. package/node_modules/@anthropic-ai/sdk/lib/credentials/types.js.map +1 -0
  428. package/node_modules/@anthropic-ai/sdk/lib/credentials/types.mjs +224 -0
  429. package/node_modules/@anthropic-ai/sdk/lib/credentials/types.mjs.map +1 -0
  430. package/node_modules/@anthropic-ai/sdk/lib/credentials/user-oauth.d.mts +21 -0
  431. package/node_modules/@anthropic-ai/sdk/lib/credentials/user-oauth.d.mts.map +1 -0
  432. package/node_modules/@anthropic-ai/sdk/lib/credentials/user-oauth.d.ts +21 -0
  433. package/node_modules/@anthropic-ai/sdk/lib/credentials/user-oauth.d.ts.map +1 -0
  434. package/node_modules/@anthropic-ai/sdk/lib/credentials/user-oauth.js +130 -0
  435. package/node_modules/@anthropic-ai/sdk/lib/credentials/user-oauth.js.map +1 -0
  436. package/node_modules/@anthropic-ai/sdk/lib/credentials/user-oauth.mjs +94 -0
  437. package/node_modules/@anthropic-ai/sdk/lib/credentials/user-oauth.mjs.map +1 -0
  438. package/node_modules/@anthropic-ai/sdk/lib/credentials.d.mts +4 -0
  439. package/node_modules/@anthropic-ai/sdk/lib/credentials.d.mts.map +1 -0
  440. package/node_modules/@anthropic-ai/sdk/lib/credentials.d.ts +4 -0
  441. package/node_modules/@anthropic-ai/sdk/lib/credentials.d.ts.map +1 -0
  442. package/node_modules/@anthropic-ai/sdk/lib/credentials.js +8 -0
  443. package/node_modules/@anthropic-ai/sdk/lib/credentials.js.map +1 -0
  444. package/node_modules/@anthropic-ai/sdk/lib/credentials.mjs +3 -0
  445. package/node_modules/@anthropic-ai/sdk/lib/credentials.mjs.map +1 -0
  446. package/node_modules/@anthropic-ai/sdk/lib/environments/index.d.mts +4 -0
  447. package/node_modules/@anthropic-ai/sdk/lib/environments/index.d.mts.map +1 -0
  448. package/node_modules/@anthropic-ai/sdk/lib/environments/index.d.ts +4 -0
  449. package/node_modules/@anthropic-ai/sdk/lib/environments/index.d.ts.map +1 -0
  450. package/node_modules/@anthropic-ai/sdk/lib/environments/index.js +18 -0
  451. package/node_modules/@anthropic-ai/sdk/lib/environments/index.js.map +1 -0
  452. package/node_modules/@anthropic-ai/sdk/lib/environments/index.mjs +4 -0
  453. package/node_modules/@anthropic-ai/sdk/lib/environments/index.mjs.map +1 -0
  454. package/node_modules/@anthropic-ai/sdk/lib/environments/poller.d.mts +95 -0
  455. package/node_modules/@anthropic-ai/sdk/lib/environments/poller.d.mts.map +1 -0
  456. package/node_modules/@anthropic-ai/sdk/lib/environments/poller.d.ts +95 -0
  457. package/node_modules/@anthropic-ai/sdk/lib/environments/poller.d.ts.map +1 -0
  458. package/node_modules/@anthropic-ai/sdk/lib/environments/poller.js +226 -0
  459. package/node_modules/@anthropic-ai/sdk/lib/environments/poller.js.map +1 -0
  460. package/node_modules/@anthropic-ai/sdk/lib/environments/poller.mjs +217 -0
  461. package/node_modules/@anthropic-ai/sdk/lib/environments/poller.mjs.map +1 -0
  462. package/node_modules/@anthropic-ai/sdk/lib/environments/worker.d.mts +227 -0
  463. package/node_modules/@anthropic-ai/sdk/lib/environments/worker.d.mts.map +1 -0
  464. package/node_modules/@anthropic-ai/sdk/lib/environments/worker.d.ts +227 -0
  465. package/node_modules/@anthropic-ai/sdk/lib/environments/worker.d.ts.map +1 -0
  466. package/node_modules/@anthropic-ai/sdk/lib/environments/worker.js +569 -0
  467. package/node_modules/@anthropic-ai/sdk/lib/environments/worker.js.map +1 -0
  468. package/node_modules/@anthropic-ai/sdk/lib/environments/worker.mjs +564 -0
  469. package/node_modules/@anthropic-ai/sdk/lib/environments/worker.mjs.map +1 -0
  470. package/node_modules/@anthropic-ai/sdk/lib/helper-client.d.mts +31 -0
  471. package/node_modules/@anthropic-ai/sdk/lib/helper-client.d.mts.map +1 -0
  472. package/node_modules/@anthropic-ai/sdk/lib/helper-client.d.ts +31 -0
  473. package/node_modules/@anthropic-ai/sdk/lib/helper-client.d.ts.map +1 -0
  474. package/node_modules/@anthropic-ai/sdk/lib/helper-client.js +58 -0
  475. package/node_modules/@anthropic-ai/sdk/lib/helper-client.js.map +1 -0
  476. package/node_modules/@anthropic-ai/sdk/lib/helper-client.mjs +55 -0
  477. package/node_modules/@anthropic-ai/sdk/lib/helper-client.mjs.map +1 -0
  478. package/node_modules/@anthropic-ai/sdk/lib/middleware.d.mts +98 -0
  479. package/node_modules/@anthropic-ai/sdk/lib/middleware.d.mts.map +1 -0
  480. package/node_modules/@anthropic-ai/sdk/lib/middleware.d.ts +98 -0
  481. package/node_modules/@anthropic-ai/sdk/lib/middleware.d.ts.map +1 -0
  482. package/node_modules/@anthropic-ai/sdk/lib/middleware.js +754 -0
  483. package/node_modules/@anthropic-ai/sdk/lib/middleware.js.map +1 -0
  484. package/node_modules/@anthropic-ai/sdk/lib/middleware.mjs +749 -0
  485. package/node_modules/@anthropic-ai/sdk/lib/middleware.mjs.map +1 -0
  486. package/node_modules/@anthropic-ai/sdk/lib/parser.d.mts.map +1 -1
  487. package/node_modules/@anthropic-ai/sdk/lib/parser.d.ts.map +1 -1
  488. package/node_modules/@anthropic-ai/sdk/lib/parser.mjs.map +1 -1
  489. package/node_modules/@anthropic-ai/sdk/lib/sessions/accumulate.d.mts +22 -0
  490. package/node_modules/@anthropic-ai/sdk/lib/sessions/accumulate.d.mts.map +1 -0
  491. package/node_modules/@anthropic-ai/sdk/lib/sessions/accumulate.d.ts +22 -0
  492. package/node_modules/@anthropic-ai/sdk/lib/sessions/accumulate.d.ts.map +1 -0
  493. package/node_modules/@anthropic-ai/sdk/lib/sessions/accumulate.js +88 -0
  494. package/node_modules/@anthropic-ai/sdk/lib/sessions/accumulate.js.map +1 -0
  495. package/node_modules/@anthropic-ai/sdk/lib/sessions/accumulate.mjs +85 -0
  496. package/node_modules/@anthropic-ai/sdk/lib/sessions/accumulate.mjs.map +1 -0
  497. package/node_modules/@anthropic-ai/sdk/lib/tools/BetaRunnableTool.d.mts +38 -5
  498. package/node_modules/@anthropic-ai/sdk/lib/tools/BetaRunnableTool.d.mts.map +1 -1
  499. package/node_modules/@anthropic-ai/sdk/lib/tools/BetaRunnableTool.d.ts +38 -5
  500. package/node_modules/@anthropic-ai/sdk/lib/tools/BetaRunnableTool.d.ts.map +1 -1
  501. package/node_modules/@anthropic-ai/sdk/lib/tools/BetaRunnableTool.js +28 -0
  502. package/node_modules/@anthropic-ai/sdk/lib/tools/BetaRunnableTool.js.map +1 -1
  503. package/node_modules/@anthropic-ai/sdk/lib/tools/BetaRunnableTool.mjs +25 -1
  504. package/node_modules/@anthropic-ai/sdk/lib/tools/BetaRunnableTool.mjs.map +1 -1
  505. package/node_modules/@anthropic-ai/sdk/lib/tools/BetaToolRunner.d.mts +1 -1
  506. package/node_modules/@anthropic-ai/sdk/lib/tools/BetaToolRunner.d.mts.map +1 -1
  507. package/node_modules/@anthropic-ai/sdk/lib/tools/BetaToolRunner.d.ts +1 -1
  508. package/node_modules/@anthropic-ai/sdk/lib/tools/BetaToolRunner.d.ts.map +1 -1
  509. package/node_modules/@anthropic-ai/sdk/lib/tools/BetaToolRunner.js +107 -29
  510. package/node_modules/@anthropic-ai/sdk/lib/tools/BetaToolRunner.js.map +1 -1
  511. package/node_modules/@anthropic-ai/sdk/lib/tools/BetaToolRunner.mjs +105 -27
  512. package/node_modules/@anthropic-ai/sdk/lib/tools/BetaToolRunner.mjs.map +1 -1
  513. package/node_modules/@anthropic-ai/sdk/lib/tools/CompactionControl.d.mts.map +1 -1
  514. package/node_modules/@anthropic-ai/sdk/lib/tools/CompactionControl.d.ts.map +1 -1
  515. package/node_modules/@anthropic-ai/sdk/lib/tools/SessionToolRunner.d.mts +179 -0
  516. package/node_modules/@anthropic-ai/sdk/lib/tools/SessionToolRunner.d.mts.map +1 -0
  517. package/node_modules/@anthropic-ai/sdk/lib/tools/SessionToolRunner.d.ts +179 -0
  518. package/node_modules/@anthropic-ai/sdk/lib/tools/SessionToolRunner.d.ts.map +1 -0
  519. package/node_modules/@anthropic-ai/sdk/lib/tools/SessionToolRunner.js +728 -0
  520. package/node_modules/@anthropic-ai/sdk/lib/tools/SessionToolRunner.js.map +1 -0
  521. package/node_modules/@anthropic-ai/sdk/lib/tools/SessionToolRunner.mjs +724 -0
  522. package/node_modules/@anthropic-ai/sdk/lib/tools/SessionToolRunner.mjs.map +1 -0
  523. package/node_modules/@anthropic-ai/sdk/lib/tools/ToolError.d.mts.map +1 -1
  524. package/node_modules/@anthropic-ai/sdk/lib/tools/ToolError.d.ts.map +1 -1
  525. package/node_modules/@anthropic-ai/sdk/lib/transform-json-schema.mjs.map +1 -1
  526. package/node_modules/@anthropic-ai/sdk/package.json +32 -15
  527. package/node_modules/@anthropic-ai/sdk/pagination.d.mts +1 -0
  528. package/node_modules/@anthropic-ai/sdk/pagination.d.mts.map +1 -1
  529. package/node_modules/@anthropic-ai/sdk/pagination.d.ts +1 -0
  530. package/node_modules/@anthropic-ai/sdk/pagination.d.ts.map +1 -1
  531. package/node_modules/@anthropic-ai/sdk/pagination.mjs +1 -0
  532. package/node_modules/@anthropic-ai/sdk/pagination.mjs.map +1 -1
  533. package/node_modules/@anthropic-ai/sdk/resource.d.mts +1 -0
  534. package/node_modules/@anthropic-ai/sdk/resource.d.mts.map +1 -1
  535. package/node_modules/@anthropic-ai/sdk/resource.d.ts +1 -0
  536. package/node_modules/@anthropic-ai/sdk/resource.d.ts.map +1 -1
  537. package/node_modules/@anthropic-ai/sdk/resource.mjs +1 -0
  538. package/node_modules/@anthropic-ai/sdk/resource.mjs.map +1 -1
  539. package/node_modules/@anthropic-ai/sdk/resources/beta/agents/agents.d.mts +608 -68
  540. package/node_modules/@anthropic-ai/sdk/resources/beta/agents/agents.d.mts.map +1 -1
  541. package/node_modules/@anthropic-ai/sdk/resources/beta/agents/agents.d.ts +608 -68
  542. package/node_modules/@anthropic-ai/sdk/resources/beta/agents/agents.d.ts.map +1 -1
  543. package/node_modules/@anthropic-ai/sdk/resources/beta/agents/agents.js +2 -2
  544. package/node_modules/@anthropic-ai/sdk/resources/beta/agents/agents.js.map +1 -1
  545. package/node_modules/@anthropic-ai/sdk/resources/beta/agents/agents.mjs +2 -2
  546. package/node_modules/@anthropic-ai/sdk/resources/beta/agents/agents.mjs.map +1 -1
  547. package/node_modules/@anthropic-ai/sdk/resources/beta/agents/index.d.mts +1 -1
  548. package/node_modules/@anthropic-ai/sdk/resources/beta/agents/index.d.mts.map +1 -1
  549. package/node_modules/@anthropic-ai/sdk/resources/beta/agents/index.d.ts +1 -1
  550. package/node_modules/@anthropic-ai/sdk/resources/beta/agents/index.d.ts.map +1 -1
  551. package/node_modules/@anthropic-ai/sdk/resources/beta/agents/index.js.map +1 -1
  552. package/node_modules/@anthropic-ai/sdk/resources/beta/agents/index.mjs.map +1 -1
  553. package/node_modules/@anthropic-ai/sdk/resources/beta/agents/versions.d.mts.map +1 -1
  554. package/node_modules/@anthropic-ai/sdk/resources/beta/agents/versions.d.ts.map +1 -1
  555. package/node_modules/@anthropic-ai/sdk/resources/beta/agents/versions.mjs.map +1 -1
  556. package/node_modules/@anthropic-ai/sdk/resources/beta/agents.d.mts.map +1 -1
  557. package/node_modules/@anthropic-ai/sdk/resources/beta/agents.d.ts.map +1 -1
  558. package/node_modules/@anthropic-ai/sdk/resources/beta/agents.mjs.map +1 -1
  559. package/node_modules/@anthropic-ai/sdk/resources/beta/beta.d.mts +51 -13
  560. package/node_modules/@anthropic-ai/sdk/resources/beta/beta.d.mts.map +1 -1
  561. package/node_modules/@anthropic-ai/sdk/resources/beta/beta.d.ts +51 -13
  562. package/node_modules/@anthropic-ai/sdk/resources/beta/beta.d.ts.map +1 -1
  563. package/node_modules/@anthropic-ai/sdk/resources/beta/beta.js +22 -2
  564. package/node_modules/@anthropic-ai/sdk/resources/beta/beta.js.map +1 -1
  565. package/node_modules/@anthropic-ai/sdk/resources/beta/beta.mjs +22 -2
  566. package/node_modules/@anthropic-ai/sdk/resources/beta/beta.mjs.map +1 -1
  567. package/node_modules/@anthropic-ai/sdk/resources/beta/deployment-runs.d.mts +306 -0
  568. package/node_modules/@anthropic-ai/sdk/resources/beta/deployment-runs.d.mts.map +1 -0
  569. package/node_modules/@anthropic-ai/sdk/resources/beta/deployment-runs.d.ts +306 -0
  570. package/node_modules/@anthropic-ai/sdk/resources/beta/deployment-runs.d.ts.map +1 -0
  571. package/node_modules/@anthropic-ai/sdk/resources/beta/deployment-runs.js +55 -0
  572. package/node_modules/@anthropic-ai/sdk/resources/beta/deployment-runs.js.map +1 -0
  573. package/node_modules/@anthropic-ai/sdk/resources/beta/deployment-runs.mjs +51 -0
  574. package/node_modules/@anthropic-ai/sdk/resources/beta/deployment-runs.mjs.map +1 -0
  575. package/node_modules/@anthropic-ai/sdk/resources/beta/deployments.d.mts +698 -0
  576. package/node_modules/@anthropic-ai/sdk/resources/beta/deployments.d.mts.map +1 -0
  577. package/node_modules/@anthropic-ai/sdk/resources/beta/deployments.d.ts +698 -0
  578. package/node_modules/@anthropic-ai/sdk/resources/beta/deployments.d.ts.map +1 -0
  579. package/node_modules/@anthropic-ai/sdk/resources/beta/deployments.js +196 -0
  580. package/node_modules/@anthropic-ai/sdk/resources/beta/deployments.js.map +1 -0
  581. package/node_modules/@anthropic-ai/sdk/resources/beta/deployments.mjs +192 -0
  582. package/node_modules/@anthropic-ai/sdk/resources/beta/deployments.mjs.map +1 -0
  583. package/node_modules/@anthropic-ai/sdk/resources/beta/dreams.d.mts +309 -0
  584. package/node_modules/@anthropic-ai/sdk/resources/beta/dreams.d.mts.map +1 -0
  585. package/node_modules/@anthropic-ai/sdk/resources/beta/dreams.d.ts +309 -0
  586. package/node_modules/@anthropic-ai/sdk/resources/beta/dreams.d.ts.map +1 -0
  587. package/node_modules/@anthropic-ai/sdk/resources/beta/dreams.js +116 -0
  588. package/node_modules/@anthropic-ai/sdk/resources/beta/dreams.js.map +1 -0
  589. package/node_modules/@anthropic-ai/sdk/resources/beta/dreams.mjs +112 -0
  590. package/node_modules/@anthropic-ai/sdk/resources/beta/dreams.mjs.map +1 -0
  591. package/node_modules/@anthropic-ai/sdk/resources/beta/environments/environments.d.mts +426 -0
  592. package/node_modules/@anthropic-ai/sdk/resources/beta/environments/environments.d.mts.map +1 -0
  593. package/node_modules/@anthropic-ai/sdk/resources/beta/environments/environments.d.ts +426 -0
  594. package/node_modules/@anthropic-ai/sdk/resources/beta/environments/environments.d.ts.map +1 -0
  595. package/node_modules/@anthropic-ai/sdk/resources/beta/environments/environments.js +150 -0
  596. package/node_modules/@anthropic-ai/sdk/resources/beta/environments/environments.js.map +1 -0
  597. package/node_modules/@anthropic-ai/sdk/resources/beta/environments/environments.mjs +145 -0
  598. package/node_modules/@anthropic-ai/sdk/resources/beta/environments/environments.mjs.map +1 -0
  599. package/node_modules/@anthropic-ai/sdk/resources/beta/environments/index.d.mts +3 -0
  600. package/node_modules/@anthropic-ai/sdk/resources/beta/environments/index.d.mts.map +1 -0
  601. package/node_modules/@anthropic-ai/sdk/resources/beta/environments/index.d.ts +3 -0
  602. package/node_modules/@anthropic-ai/sdk/resources/beta/environments/index.d.ts.map +1 -0
  603. package/node_modules/@anthropic-ai/sdk/resources/beta/environments/index.js +9 -0
  604. package/node_modules/@anthropic-ai/sdk/resources/beta/environments/index.js.map +1 -0
  605. package/node_modules/@anthropic-ai/sdk/resources/beta/environments/index.mjs +4 -0
  606. package/node_modules/@anthropic-ai/sdk/resources/beta/environments/index.mjs.map +1 -0
  607. package/node_modules/@anthropic-ai/sdk/resources/beta/environments/work.d.mts +501 -0
  608. package/node_modules/@anthropic-ai/sdk/resources/beta/environments/work.d.mts.map +1 -0
  609. package/node_modules/@anthropic-ai/sdk/resources/beta/environments/work.d.ts +501 -0
  610. package/node_modules/@anthropic-ai/sdk/resources/beta/environments/work.d.ts.map +1 -0
  611. package/node_modules/@anthropic-ai/sdk/resources/beta/environments/work.js +257 -0
  612. package/node_modules/@anthropic-ai/sdk/resources/beta/environments/work.js.map +1 -0
  613. package/node_modules/@anthropic-ai/sdk/resources/beta/environments/work.mjs +251 -0
  614. package/node_modules/@anthropic-ai/sdk/resources/beta/environments/work.mjs.map +1 -0
  615. package/node_modules/@anthropic-ai/sdk/resources/beta/environments.d.mts +1 -388
  616. package/node_modules/@anthropic-ai/sdk/resources/beta/environments.d.mts.map +1 -1
  617. package/node_modules/@anthropic-ai/sdk/resources/beta/environments.d.ts +1 -388
  618. package/node_modules/@anthropic-ai/sdk/resources/beta/environments.d.ts.map +1 -1
  619. package/node_modules/@anthropic-ai/sdk/resources/beta/environments.js +2 -138
  620. package/node_modules/@anthropic-ai/sdk/resources/beta/environments.js.map +1 -1
  621. package/node_modules/@anthropic-ai/sdk/resources/beta/environments.mjs +1 -136
  622. package/node_modules/@anthropic-ai/sdk/resources/beta/environments.mjs.map +1 -1
  623. package/node_modules/@anthropic-ai/sdk/resources/beta/files.d.mts +22 -22
  624. package/node_modules/@anthropic-ai/sdk/resources/beta/files.d.mts.map +1 -1
  625. package/node_modules/@anthropic-ai/sdk/resources/beta/files.d.ts +22 -22
  626. package/node_modules/@anthropic-ai/sdk/resources/beta/files.d.ts.map +1 -1
  627. package/node_modules/@anthropic-ai/sdk/resources/beta/files.js +5 -5
  628. package/node_modules/@anthropic-ai/sdk/resources/beta/files.js.map +1 -1
  629. package/node_modules/@anthropic-ai/sdk/resources/beta/files.mjs +5 -5
  630. package/node_modules/@anthropic-ai/sdk/resources/beta/files.mjs.map +1 -1
  631. package/node_modules/@anthropic-ai/sdk/resources/beta/index.d.mts +11 -6
  632. package/node_modules/@anthropic-ai/sdk/resources/beta/index.d.mts.map +1 -1
  633. package/node_modules/@anthropic-ai/sdk/resources/beta/index.d.ts +11 -6
  634. package/node_modules/@anthropic-ai/sdk/resources/beta/index.d.ts.map +1 -1
  635. package/node_modules/@anthropic-ai/sdk/resources/beta/index.js +23 -13
  636. package/node_modules/@anthropic-ai/sdk/resources/beta/index.js.map +1 -1
  637. package/node_modules/@anthropic-ai/sdk/resources/beta/index.mjs +6 -1
  638. package/node_modules/@anthropic-ai/sdk/resources/beta/index.mjs.map +1 -1
  639. package/node_modules/@anthropic-ai/sdk/resources/beta/memory-stores/index.d.mts +1 -1
  640. package/node_modules/@anthropic-ai/sdk/resources/beta/memory-stores/index.d.mts.map +1 -1
  641. package/node_modules/@anthropic-ai/sdk/resources/beta/memory-stores/index.d.ts +1 -1
  642. package/node_modules/@anthropic-ai/sdk/resources/beta/memory-stores/index.d.ts.map +1 -1
  643. package/node_modules/@anthropic-ai/sdk/resources/beta/memory-stores/index.js.map +1 -1
  644. package/node_modules/@anthropic-ai/sdk/resources/beta/memory-stores/index.mjs.map +1 -1
  645. package/node_modules/@anthropic-ai/sdk/resources/beta/memory-stores/memories.d.mts +136 -24
  646. package/node_modules/@anthropic-ai/sdk/resources/beta/memory-stores/memories.d.mts.map +1 -1
  647. package/node_modules/@anthropic-ai/sdk/resources/beta/memory-stores/memories.d.ts +136 -24
  648. package/node_modules/@anthropic-ai/sdk/resources/beta/memory-stores/memories.d.ts.map +1 -1
  649. package/node_modules/@anthropic-ai/sdk/resources/beta/memory-stores/memories.js +10 -10
  650. package/node_modules/@anthropic-ai/sdk/resources/beta/memory-stores/memories.js.map +1 -1
  651. package/node_modules/@anthropic-ai/sdk/resources/beta/memory-stores/memories.mjs +10 -10
  652. package/node_modules/@anthropic-ai/sdk/resources/beta/memory-stores/memories.mjs.map +1 -1
  653. package/node_modules/@anthropic-ai/sdk/resources/beta/memory-stores/memory-stores.d.mts +60 -16
  654. package/node_modules/@anthropic-ai/sdk/resources/beta/memory-stores/memory-stores.d.mts.map +1 -1
  655. package/node_modules/@anthropic-ai/sdk/resources/beta/memory-stores/memory-stores.d.ts +60 -16
  656. package/node_modules/@anthropic-ai/sdk/resources/beta/memory-stores/memory-stores.d.ts.map +1 -1
  657. package/node_modules/@anthropic-ai/sdk/resources/beta/memory-stores/memory-stores.js +12 -12
  658. package/node_modules/@anthropic-ai/sdk/resources/beta/memory-stores/memory-stores.js.map +1 -1
  659. package/node_modules/@anthropic-ai/sdk/resources/beta/memory-stores/memory-stores.mjs +12 -12
  660. package/node_modules/@anthropic-ai/sdk/resources/beta/memory-stores/memory-stores.mjs.map +1 -1
  661. package/node_modules/@anthropic-ai/sdk/resources/beta/memory-stores/memory-versions.d.mts +105 -7
  662. package/node_modules/@anthropic-ai/sdk/resources/beta/memory-stores/memory-versions.d.mts.map +1 -1
  663. package/node_modules/@anthropic-ai/sdk/resources/beta/memory-stores/memory-versions.d.ts +105 -7
  664. package/node_modules/@anthropic-ai/sdk/resources/beta/memory-stores/memory-versions.d.ts.map +1 -1
  665. package/node_modules/@anthropic-ai/sdk/resources/beta/memory-stores/memory-versions.js +6 -6
  666. package/node_modules/@anthropic-ai/sdk/resources/beta/memory-stores/memory-versions.js.map +1 -1
  667. package/node_modules/@anthropic-ai/sdk/resources/beta/memory-stores/memory-versions.mjs +6 -6
  668. package/node_modules/@anthropic-ai/sdk/resources/beta/memory-stores/memory-versions.mjs.map +1 -1
  669. package/node_modules/@anthropic-ai/sdk/resources/beta/memory-stores.d.mts.map +1 -1
  670. package/node_modules/@anthropic-ai/sdk/resources/beta/memory-stores.d.ts.map +1 -1
  671. package/node_modules/@anthropic-ai/sdk/resources/beta/memory-stores.mjs.map +1 -1
  672. package/node_modules/@anthropic-ai/sdk/resources/beta/messages/batches.d.mts +81 -30
  673. package/node_modules/@anthropic-ai/sdk/resources/beta/messages/batches.d.mts.map +1 -1
  674. package/node_modules/@anthropic-ai/sdk/resources/beta/messages/batches.d.ts +81 -30
  675. package/node_modules/@anthropic-ai/sdk/resources/beta/messages/batches.d.ts.map +1 -1
  676. package/node_modules/@anthropic-ai/sdk/resources/beta/messages/batches.js +12 -9
  677. package/node_modules/@anthropic-ai/sdk/resources/beta/messages/batches.js.map +1 -1
  678. package/node_modules/@anthropic-ai/sdk/resources/beta/messages/batches.mjs +12 -9
  679. package/node_modules/@anthropic-ai/sdk/resources/beta/messages/batches.mjs.map +1 -1
  680. package/node_modules/@anthropic-ai/sdk/resources/beta/messages/index.d.mts +1 -1
  681. package/node_modules/@anthropic-ai/sdk/resources/beta/messages/index.d.mts.map +1 -1
  682. package/node_modules/@anthropic-ai/sdk/resources/beta/messages/index.d.ts +1 -1
  683. package/node_modules/@anthropic-ai/sdk/resources/beta/messages/index.d.ts.map +1 -1
  684. package/node_modules/@anthropic-ai/sdk/resources/beta/messages/index.js.map +1 -1
  685. package/node_modules/@anthropic-ai/sdk/resources/beta/messages/index.mjs.map +1 -1
  686. package/node_modules/@anthropic-ai/sdk/resources/beta/messages/messages.d.mts +2453 -380
  687. package/node_modules/@anthropic-ai/sdk/resources/beta/messages/messages.d.mts.map +1 -1
  688. package/node_modules/@anthropic-ai/sdk/resources/beta/messages/messages.d.ts +2453 -380
  689. package/node_modules/@anthropic-ai/sdk/resources/beta/messages/messages.d.ts.map +1 -1
  690. package/node_modules/@anthropic-ai/sdk/resources/beta/messages/messages.js +16 -22
  691. package/node_modules/@anthropic-ai/sdk/resources/beta/messages/messages.js.map +1 -1
  692. package/node_modules/@anthropic-ai/sdk/resources/beta/messages/messages.mjs +16 -22
  693. package/node_modules/@anthropic-ai/sdk/resources/beta/messages/messages.mjs.map +1 -1
  694. package/node_modules/@anthropic-ai/sdk/resources/beta/messages.d.mts.map +1 -1
  695. package/node_modules/@anthropic-ai/sdk/resources/beta/messages.d.ts.map +1 -1
  696. package/node_modules/@anthropic-ai/sdk/resources/beta/messages.mjs.map +1 -1
  697. package/node_modules/@anthropic-ai/sdk/resources/beta/models.d.mts +6 -0
  698. package/node_modules/@anthropic-ai/sdk/resources/beta/models.d.mts.map +1 -1
  699. package/node_modules/@anthropic-ai/sdk/resources/beta/models.d.ts +6 -0
  700. package/node_modules/@anthropic-ai/sdk/resources/beta/models.d.ts.map +1 -1
  701. package/node_modules/@anthropic-ai/sdk/resources/beta/models.mjs.map +1 -1
  702. package/node_modules/@anthropic-ai/sdk/resources/beta/sessions/events.d.mts +643 -19
  703. package/node_modules/@anthropic-ai/sdk/resources/beta/sessions/events.d.mts.map +1 -1
  704. package/node_modules/@anthropic-ai/sdk/resources/beta/sessions/events.d.ts +643 -19
  705. package/node_modules/@anthropic-ai/sdk/resources/beta/sessions/events.d.ts.map +1 -1
  706. package/node_modules/@anthropic-ai/sdk/resources/beta/sessions/events.js +29 -2
  707. package/node_modules/@anthropic-ai/sdk/resources/beta/sessions/events.js.map +1 -1
  708. package/node_modules/@anthropic-ai/sdk/resources/beta/sessions/events.mjs +27 -1
  709. package/node_modules/@anthropic-ai/sdk/resources/beta/sessions/events.mjs.map +1 -1
  710. package/node_modules/@anthropic-ai/sdk/resources/beta/sessions/index.d.mts +3 -2
  711. package/node_modules/@anthropic-ai/sdk/resources/beta/sessions/index.d.mts.map +1 -1
  712. package/node_modules/@anthropic-ai/sdk/resources/beta/sessions/index.d.ts +3 -2
  713. package/node_modules/@anthropic-ai/sdk/resources/beta/sessions/index.d.ts.map +1 -1
  714. package/node_modules/@anthropic-ai/sdk/resources/beta/sessions/index.js +3 -1
  715. package/node_modules/@anthropic-ai/sdk/resources/beta/sessions/index.js.map +1 -1
  716. package/node_modules/@anthropic-ai/sdk/resources/beta/sessions/index.mjs +1 -0
  717. package/node_modules/@anthropic-ai/sdk/resources/beta/sessions/index.mjs.map +1 -1
  718. package/node_modules/@anthropic-ai/sdk/resources/beta/sessions/resources.d.mts.map +1 -1
  719. package/node_modules/@anthropic-ai/sdk/resources/beta/sessions/resources.d.ts.map +1 -1
  720. package/node_modules/@anthropic-ai/sdk/resources/beta/sessions/resources.mjs.map +1 -1
  721. package/node_modules/@anthropic-ai/sdk/resources/beta/sessions/sessions.d.mts +455 -8
  722. package/node_modules/@anthropic-ai/sdk/resources/beta/sessions/sessions.d.mts.map +1 -1
  723. package/node_modules/@anthropic-ai/sdk/resources/beta/sessions/sessions.d.ts +455 -8
  724. package/node_modules/@anthropic-ai/sdk/resources/beta/sessions/sessions.d.ts.map +1 -1
  725. package/node_modules/@anthropic-ai/sdk/resources/beta/sessions/sessions.js +5 -1
  726. package/node_modules/@anthropic-ai/sdk/resources/beta/sessions/sessions.js.map +1 -1
  727. package/node_modules/@anthropic-ai/sdk/resources/beta/sessions/sessions.mjs +6 -2
  728. package/node_modules/@anthropic-ai/sdk/resources/beta/sessions/sessions.mjs.map +1 -1
  729. package/node_modules/@anthropic-ai/sdk/resources/beta/sessions/threads/events.d.mts +78 -0
  730. package/node_modules/@anthropic-ai/sdk/resources/beta/sessions/threads/events.d.mts.map +1 -0
  731. package/node_modules/@anthropic-ai/sdk/resources/beta/sessions/threads/events.d.ts +78 -0
  732. package/node_modules/@anthropic-ai/sdk/resources/beta/sessions/threads/events.d.ts.map +1 -0
  733. package/node_modules/@anthropic-ai/sdk/resources/beta/sessions/threads/events.js +61 -0
  734. package/node_modules/@anthropic-ai/sdk/resources/beta/sessions/threads/events.js.map +1 -0
  735. package/node_modules/@anthropic-ai/sdk/resources/beta/sessions/threads/events.mjs +57 -0
  736. package/node_modules/@anthropic-ai/sdk/resources/beta/sessions/threads/events.mjs.map +1 -0
  737. package/node_modules/@anthropic-ai/sdk/resources/beta/sessions/threads/index.d.mts +3 -0
  738. package/node_modules/@anthropic-ai/sdk/resources/beta/sessions/threads/index.d.mts.map +1 -0
  739. package/node_modules/@anthropic-ai/sdk/resources/beta/sessions/threads/index.d.ts +3 -0
  740. package/node_modules/@anthropic-ai/sdk/resources/beta/sessions/threads/index.d.ts.map +1 -0
  741. package/node_modules/@anthropic-ai/sdk/resources/beta/sessions/threads/index.js +9 -0
  742. package/node_modules/@anthropic-ai/sdk/resources/beta/sessions/threads/index.js.map +1 -0
  743. package/node_modules/@anthropic-ai/sdk/resources/beta/sessions/threads/index.mjs +4 -0
  744. package/node_modules/@anthropic-ai/sdk/resources/beta/sessions/threads/index.mjs.map +1 -0
  745. package/node_modules/@anthropic-ai/sdk/resources/beta/sessions/threads/threads.d.mts +195 -0
  746. package/node_modules/@anthropic-ai/sdk/resources/beta/sessions/threads/threads.d.mts.map +1 -0
  747. package/node_modules/@anthropic-ai/sdk/resources/beta/sessions/threads/threads.d.ts +195 -0
  748. package/node_modules/@anthropic-ai/sdk/resources/beta/sessions/threads/threads.d.ts.map +1 -0
  749. package/node_modules/@anthropic-ai/sdk/resources/beta/sessions/threads/threads.js +88 -0
  750. package/node_modules/@anthropic-ai/sdk/resources/beta/sessions/threads/threads.js.map +1 -0
  751. package/node_modules/@anthropic-ai/sdk/resources/beta/sessions/threads/threads.mjs +83 -0
  752. package/node_modules/@anthropic-ai/sdk/resources/beta/sessions/threads/threads.mjs.map +1 -0
  753. package/node_modules/@anthropic-ai/sdk/resources/beta/sessions/threads.d.mts +2 -0
  754. package/node_modules/@anthropic-ai/sdk/resources/beta/sessions/threads.d.mts.map +1 -0
  755. package/node_modules/@anthropic-ai/sdk/resources/beta/sessions/threads.d.ts +2 -0
  756. package/node_modules/@anthropic-ai/sdk/resources/beta/sessions/threads.d.ts.map +1 -0
  757. package/node_modules/@anthropic-ai/sdk/resources/beta/sessions/threads.js +6 -0
  758. package/node_modules/@anthropic-ai/sdk/resources/beta/sessions/threads.js.map +1 -0
  759. package/node_modules/@anthropic-ai/sdk/resources/beta/sessions/threads.mjs +3 -0
  760. package/node_modules/@anthropic-ai/sdk/resources/beta/sessions/threads.mjs.map +1 -0
  761. package/node_modules/@anthropic-ai/sdk/resources/beta/sessions.d.mts.map +1 -1
  762. package/node_modules/@anthropic-ai/sdk/resources/beta/sessions.d.ts.map +1 -1
  763. package/node_modules/@anthropic-ai/sdk/resources/beta/sessions.mjs.map +1 -1
  764. package/node_modules/@anthropic-ai/sdk/resources/beta/skills/index.d.mts +1 -1
  765. package/node_modules/@anthropic-ai/sdk/resources/beta/skills/index.d.mts.map +1 -1
  766. package/node_modules/@anthropic-ai/sdk/resources/beta/skills/index.d.ts +1 -1
  767. package/node_modules/@anthropic-ai/sdk/resources/beta/skills/index.d.ts.map +1 -1
  768. package/node_modules/@anthropic-ai/sdk/resources/beta/skills/index.js.map +1 -1
  769. package/node_modules/@anthropic-ai/sdk/resources/beta/skills/index.mjs.map +1 -1
  770. package/node_modules/@anthropic-ai/sdk/resources/beta/skills/skills.d.mts +13 -11
  771. package/node_modules/@anthropic-ai/sdk/resources/beta/skills/skills.d.mts.map +1 -1
  772. package/node_modules/@anthropic-ai/sdk/resources/beta/skills/skills.d.ts +13 -11
  773. package/node_modules/@anthropic-ai/sdk/resources/beta/skills/skills.d.ts.map +1 -1
  774. package/node_modules/@anthropic-ai/sdk/resources/beta/skills/skills.js +5 -3
  775. package/node_modules/@anthropic-ai/sdk/resources/beta/skills/skills.js.map +1 -1
  776. package/node_modules/@anthropic-ai/sdk/resources/beta/skills/skills.mjs +5 -3
  777. package/node_modules/@anthropic-ai/sdk/resources/beta/skills/skills.mjs.map +1 -1
  778. package/node_modules/@anthropic-ai/sdk/resources/beta/skills/versions.d.mts +31 -3
  779. package/node_modules/@anthropic-ai/sdk/resources/beta/skills/versions.d.mts.map +1 -1
  780. package/node_modules/@anthropic-ai/sdk/resources/beta/skills/versions.d.ts +31 -3
  781. package/node_modules/@anthropic-ai/sdk/resources/beta/skills/versions.d.ts.map +1 -1
  782. package/node_modules/@anthropic-ai/sdk/resources/beta/skills/versions.js +32 -3
  783. package/node_modules/@anthropic-ai/sdk/resources/beta/skills/versions.js.map +1 -1
  784. package/node_modules/@anthropic-ai/sdk/resources/beta/skills/versions.mjs +32 -3
  785. package/node_modules/@anthropic-ai/sdk/resources/beta/skills/versions.mjs.map +1 -1
  786. package/node_modules/@anthropic-ai/sdk/resources/beta/skills.d.mts.map +1 -1
  787. package/node_modules/@anthropic-ai/sdk/resources/beta/skills.d.ts.map +1 -1
  788. package/node_modules/@anthropic-ai/sdk/resources/beta/skills.mjs.map +1 -1
  789. package/node_modules/@anthropic-ai/sdk/resources/beta/tunnels/certificates.d.mts +163 -0
  790. package/node_modules/@anthropic-ai/sdk/resources/beta/tunnels/certificates.d.mts.map +1 -0
  791. package/node_modules/@anthropic-ai/sdk/resources/beta/tunnels/certificates.d.ts +163 -0
  792. package/node_modules/@anthropic-ai/sdk/resources/beta/tunnels/certificates.d.ts.map +1 -0
  793. package/node_modules/@anthropic-ai/sdk/resources/beta/tunnels/certificates.js +129 -0
  794. package/node_modules/@anthropic-ai/sdk/resources/beta/tunnels/certificates.js.map +1 -0
  795. package/node_modules/@anthropic-ai/sdk/resources/beta/tunnels/certificates.mjs +125 -0
  796. package/node_modules/@anthropic-ai/sdk/resources/beta/tunnels/certificates.mjs.map +1 -0
  797. package/node_modules/@anthropic-ai/sdk/resources/beta/tunnels/index.d.mts +3 -0
  798. package/node_modules/@anthropic-ai/sdk/resources/beta/tunnels/index.d.mts.map +1 -0
  799. package/node_modules/@anthropic-ai/sdk/resources/beta/tunnels/index.d.ts +3 -0
  800. package/node_modules/@anthropic-ai/sdk/resources/beta/tunnels/index.d.ts.map +1 -0
  801. package/node_modules/@anthropic-ai/sdk/resources/beta/tunnels/index.js +9 -0
  802. package/node_modules/@anthropic-ai/sdk/resources/beta/tunnels/index.js.map +1 -0
  803. package/node_modules/@anthropic-ai/sdk/resources/beta/tunnels/index.mjs +4 -0
  804. package/node_modules/@anthropic-ai/sdk/resources/beta/tunnels/index.mjs.map +1 -0
  805. package/node_modules/@anthropic-ai/sdk/resources/beta/tunnels/tunnels.d.mts +212 -0
  806. package/node_modules/@anthropic-ai/sdk/resources/beta/tunnels/tunnels.d.mts.map +1 -0
  807. package/node_modules/@anthropic-ai/sdk/resources/beta/tunnels/tunnels.d.ts +212 -0
  808. package/node_modules/@anthropic-ai/sdk/resources/beta/tunnels/tunnels.d.ts.map +1 -0
  809. package/node_modules/@anthropic-ai/sdk/resources/beta/tunnels/tunnels.js +181 -0
  810. package/node_modules/@anthropic-ai/sdk/resources/beta/tunnels/tunnels.js.map +1 -0
  811. package/node_modules/@anthropic-ai/sdk/resources/beta/tunnels/tunnels.mjs +176 -0
  812. package/node_modules/@anthropic-ai/sdk/resources/beta/tunnels/tunnels.mjs.map +1 -0
  813. package/node_modules/@anthropic-ai/sdk/resources/beta/tunnels.d.mts +2 -0
  814. package/node_modules/@anthropic-ai/sdk/resources/beta/tunnels.d.mts.map +1 -0
  815. package/node_modules/@anthropic-ai/sdk/resources/beta/tunnels.d.ts +2 -0
  816. package/node_modules/@anthropic-ai/sdk/resources/beta/tunnels.d.ts.map +1 -0
  817. package/node_modules/@anthropic-ai/sdk/resources/beta/tunnels.js +6 -0
  818. package/node_modules/@anthropic-ai/sdk/resources/beta/tunnels.js.map +1 -0
  819. package/node_modules/@anthropic-ai/sdk/resources/beta/tunnels.mjs +3 -0
  820. package/node_modules/@anthropic-ai/sdk/resources/beta/tunnels.mjs.map +1 -0
  821. package/node_modules/@anthropic-ai/sdk/resources/beta/user-profiles.d.mts +62 -0
  822. package/node_modules/@anthropic-ai/sdk/resources/beta/user-profiles.d.mts.map +1 -1
  823. package/node_modules/@anthropic-ai/sdk/resources/beta/user-profiles.d.ts +62 -0
  824. package/node_modules/@anthropic-ai/sdk/resources/beta/user-profiles.d.ts.map +1 -1
  825. package/node_modules/@anthropic-ai/sdk/resources/beta/user-profiles.js +5 -5
  826. package/node_modules/@anthropic-ai/sdk/resources/beta/user-profiles.mjs +5 -5
  827. package/node_modules/@anthropic-ai/sdk/resources/beta/user-profiles.mjs.map +1 -1
  828. package/node_modules/@anthropic-ai/sdk/resources/beta/vaults/credentials.d.mts +256 -4
  829. package/node_modules/@anthropic-ai/sdk/resources/beta/vaults/credentials.d.mts.map +1 -1
  830. package/node_modules/@anthropic-ai/sdk/resources/beta/vaults/credentials.d.ts +256 -4
  831. package/node_modules/@anthropic-ai/sdk/resources/beta/vaults/credentials.d.ts.map +1 -1
  832. package/node_modules/@anthropic-ai/sdk/resources/beta/vaults/credentials.js +22 -0
  833. package/node_modules/@anthropic-ai/sdk/resources/beta/vaults/credentials.js.map +1 -1
  834. package/node_modules/@anthropic-ai/sdk/resources/beta/vaults/credentials.mjs +22 -0
  835. package/node_modules/@anthropic-ai/sdk/resources/beta/vaults/credentials.mjs.map +1 -1
  836. package/node_modules/@anthropic-ai/sdk/resources/beta/vaults/index.d.mts +1 -1
  837. package/node_modules/@anthropic-ai/sdk/resources/beta/vaults/index.d.mts.map +1 -1
  838. package/node_modules/@anthropic-ai/sdk/resources/beta/vaults/index.d.ts +1 -1
  839. package/node_modules/@anthropic-ai/sdk/resources/beta/vaults/index.d.ts.map +1 -1
  840. package/node_modules/@anthropic-ai/sdk/resources/beta/vaults/index.js.map +1 -1
  841. package/node_modules/@anthropic-ai/sdk/resources/beta/vaults/index.mjs.map +1 -1
  842. package/node_modules/@anthropic-ai/sdk/resources/beta/vaults/vaults.d.mts +2 -2
  843. package/node_modules/@anthropic-ai/sdk/resources/beta/vaults/vaults.d.mts.map +1 -1
  844. package/node_modules/@anthropic-ai/sdk/resources/beta/vaults/vaults.d.ts +2 -2
  845. package/node_modules/@anthropic-ai/sdk/resources/beta/vaults/vaults.d.ts.map +1 -1
  846. package/node_modules/@anthropic-ai/sdk/resources/beta/vaults/vaults.js.map +1 -1
  847. package/node_modules/@anthropic-ai/sdk/resources/beta/vaults/vaults.mjs.map +1 -1
  848. package/node_modules/@anthropic-ai/sdk/resources/beta/vaults.d.mts.map +1 -1
  849. package/node_modules/@anthropic-ai/sdk/resources/beta/vaults.d.ts.map +1 -1
  850. package/node_modules/@anthropic-ai/sdk/resources/beta/vaults.mjs.map +1 -1
  851. package/node_modules/@anthropic-ai/sdk/resources/beta/webhooks.d.mts +466 -0
  852. package/node_modules/@anthropic-ai/sdk/resources/beta/webhooks.d.mts.map +1 -0
  853. package/node_modules/@anthropic-ai/sdk/resources/beta/webhooks.d.ts +466 -0
  854. package/node_modules/@anthropic-ai/sdk/resources/beta/webhooks.d.ts.map +1 -0
  855. package/node_modules/@anthropic-ai/sdk/resources/beta/webhooks.js +20 -0
  856. package/node_modules/@anthropic-ai/sdk/resources/beta/webhooks.js.map +1 -0
  857. package/node_modules/@anthropic-ai/sdk/resources/beta/webhooks.mjs +16 -0
  858. package/node_modules/@anthropic-ai/sdk/resources/beta/webhooks.mjs.map +1 -0
  859. package/node_modules/@anthropic-ai/sdk/resources/beta.d.mts.map +1 -1
  860. package/node_modules/@anthropic-ai/sdk/resources/beta.d.ts.map +1 -1
  861. package/node_modules/@anthropic-ai/sdk/resources/beta.mjs.map +1 -1
  862. package/node_modules/@anthropic-ai/sdk/resources/completions.d.mts +18 -11
  863. package/node_modules/@anthropic-ai/sdk/resources/completions.d.mts.map +1 -1
  864. package/node_modules/@anthropic-ai/sdk/resources/completions.d.ts +18 -11
  865. package/node_modules/@anthropic-ai/sdk/resources/completions.d.ts.map +1 -1
  866. package/node_modules/@anthropic-ai/sdk/resources/completions.mjs.map +1 -1
  867. package/node_modules/@anthropic-ai/sdk/resources/files.d.mts +105 -0
  868. package/node_modules/@anthropic-ai/sdk/resources/files.d.mts.map +1 -0
  869. package/node_modules/@anthropic-ai/sdk/resources/files.d.ts +105 -0
  870. package/node_modules/@anthropic-ai/sdk/resources/files.d.ts.map +1 -0
  871. package/node_modules/@anthropic-ai/sdk/resources/files.js +52 -0
  872. package/node_modules/@anthropic-ai/sdk/resources/files.js.map +1 -0
  873. package/node_modules/@anthropic-ai/sdk/resources/files.mjs +48 -0
  874. package/node_modules/@anthropic-ai/sdk/resources/files.mjs.map +1 -0
  875. package/node_modules/@anthropic-ai/sdk/resources/index.d.mts +4 -2
  876. package/node_modules/@anthropic-ai/sdk/resources/index.d.mts.map +1 -1
  877. package/node_modules/@anthropic-ai/sdk/resources/index.d.ts +4 -2
  878. package/node_modules/@anthropic-ai/sdk/resources/index.d.ts.map +1 -1
  879. package/node_modules/@anthropic-ai/sdk/resources/index.js +5 -1
  880. package/node_modules/@anthropic-ai/sdk/resources/index.js.map +1 -1
  881. package/node_modules/@anthropic-ai/sdk/resources/index.mjs +2 -0
  882. package/node_modules/@anthropic-ai/sdk/resources/index.mjs.map +1 -1
  883. package/node_modules/@anthropic-ai/sdk/resources/messages/batches.d.mts +20 -11
  884. package/node_modules/@anthropic-ai/sdk/resources/messages/batches.d.mts.map +1 -1
  885. package/node_modules/@anthropic-ai/sdk/resources/messages/batches.d.ts +20 -11
  886. package/node_modules/@anthropic-ai/sdk/resources/messages/batches.d.ts.map +1 -1
  887. package/node_modules/@anthropic-ai/sdk/resources/messages/batches.js +17 -9
  888. package/node_modules/@anthropic-ai/sdk/resources/messages/batches.js.map +1 -1
  889. package/node_modules/@anthropic-ai/sdk/resources/messages/batches.mjs +17 -9
  890. package/node_modules/@anthropic-ai/sdk/resources/messages/batches.mjs.map +1 -1
  891. package/node_modules/@anthropic-ai/sdk/resources/messages/index.d.mts +1 -1
  892. package/node_modules/@anthropic-ai/sdk/resources/messages/index.d.mts.map +1 -1
  893. package/node_modules/@anthropic-ai/sdk/resources/messages/index.d.ts +1 -1
  894. package/node_modules/@anthropic-ai/sdk/resources/messages/index.d.ts.map +1 -1
  895. package/node_modules/@anthropic-ai/sdk/resources/messages/index.js.map +1 -1
  896. package/node_modules/@anthropic-ai/sdk/resources/messages/index.mjs.map +1 -1
  897. package/node_modules/@anthropic-ai/sdk/resources/messages/messages.d.mts +1782 -162
  898. package/node_modules/@anthropic-ai/sdk/resources/messages/messages.d.mts.map +1 -1
  899. package/node_modules/@anthropic-ai/sdk/resources/messages/messages.d.ts +1782 -162
  900. package/node_modules/@anthropic-ai/sdk/resources/messages/messages.d.ts.map +1 -1
  901. package/node_modules/@anthropic-ai/sdk/resources/messages/messages.js +23 -28
  902. package/node_modules/@anthropic-ai/sdk/resources/messages/messages.js.map +1 -1
  903. package/node_modules/@anthropic-ai/sdk/resources/messages/messages.mjs +23 -28
  904. package/node_modules/@anthropic-ai/sdk/resources/messages/messages.mjs.map +1 -1
  905. package/node_modules/@anthropic-ai/sdk/resources/messages.d.mts.map +1 -1
  906. package/node_modules/@anthropic-ai/sdk/resources/messages.d.ts.map +1 -1
  907. package/node_modules/@anthropic-ai/sdk/resources/messages.mjs.map +1 -1
  908. package/node_modules/@anthropic-ai/sdk/resources/models.d.mts.map +1 -1
  909. package/node_modules/@anthropic-ai/sdk/resources/models.d.ts.map +1 -1
  910. package/node_modules/@anthropic-ai/sdk/resources/models.mjs.map +1 -1
  911. package/node_modules/@anthropic-ai/sdk/resources/skills/index.d.mts +3 -0
  912. package/node_modules/@anthropic-ai/sdk/resources/skills/index.d.mts.map +1 -0
  913. package/node_modules/@anthropic-ai/sdk/resources/skills/index.d.ts +3 -0
  914. package/node_modules/@anthropic-ai/sdk/resources/skills/index.d.ts.map +1 -0
  915. package/node_modules/@anthropic-ai/sdk/resources/skills/index.js +9 -0
  916. package/node_modules/@anthropic-ai/sdk/resources/skills/index.js.map +1 -0
  917. package/node_modules/@anthropic-ai/sdk/resources/skills/index.mjs +4 -0
  918. package/node_modules/@anthropic-ai/sdk/resources/skills/index.mjs.map +1 -0
  919. package/node_modules/@anthropic-ai/sdk/resources/skills/skills.d.mts +129 -0
  920. package/node_modules/@anthropic-ai/sdk/resources/skills/skills.d.mts.map +1 -0
  921. package/node_modules/@anthropic-ai/sdk/resources/skills/skills.d.ts +129 -0
  922. package/node_modules/@anthropic-ai/sdk/resources/skills/skills.d.ts.map +1 -0
  923. package/node_modules/@anthropic-ai/sdk/resources/skills/skills.js +44 -0
  924. package/node_modules/@anthropic-ai/sdk/resources/skills/skills.js.map +1 -0
  925. package/node_modules/@anthropic-ai/sdk/resources/skills/skills.mjs +39 -0
  926. package/node_modules/@anthropic-ai/sdk/resources/skills/skills.mjs.map +1 -0
  927. package/node_modules/@anthropic-ai/sdk/resources/skills/versions.d.mts +104 -0
  928. package/node_modules/@anthropic-ai/sdk/resources/skills/versions.d.mts.map +1 -0
  929. package/node_modules/@anthropic-ai/sdk/resources/skills/versions.d.ts +104 -0
  930. package/node_modules/@anthropic-ai/sdk/resources/skills/versions.d.ts.map +1 -0
  931. package/node_modules/@anthropic-ai/sdk/resources/skills/versions.js +41 -0
  932. package/node_modules/@anthropic-ai/sdk/resources/skills/versions.js.map +1 -0
  933. package/node_modules/@anthropic-ai/sdk/resources/skills/versions.mjs +37 -0
  934. package/node_modules/@anthropic-ai/sdk/resources/skills/versions.mjs.map +1 -0
  935. package/node_modules/@anthropic-ai/sdk/resources/skills.d.mts +2 -0
  936. package/node_modules/@anthropic-ai/sdk/resources/skills.d.mts.map +1 -0
  937. package/node_modules/@anthropic-ai/sdk/resources/skills.d.ts +2 -0
  938. package/node_modules/@anthropic-ai/sdk/resources/skills.d.ts.map +1 -0
  939. package/node_modules/@anthropic-ai/sdk/resources/skills.js +6 -0
  940. package/node_modules/@anthropic-ai/sdk/resources/skills.js.map +1 -0
  941. package/node_modules/@anthropic-ai/sdk/resources/skills.mjs +3 -0
  942. package/node_modules/@anthropic-ai/sdk/resources/skills.mjs.map +1 -0
  943. package/node_modules/@anthropic-ai/sdk/resources.d.mts.map +1 -1
  944. package/node_modules/@anthropic-ai/sdk/resources.d.ts.map +1 -1
  945. package/node_modules/@anthropic-ai/sdk/resources.mjs.map +1 -1
  946. package/node_modules/@anthropic-ai/sdk/src/_vendor/partial-json-parser/parser.ts +18 -2
  947. package/node_modules/@anthropic-ai/sdk/src/client.ts +749 -42
  948. package/node_modules/@anthropic-ai/sdk/src/core/api-promise.ts +14 -4
  949. package/node_modules/@anthropic-ai/sdk/src/core/api.ts +11 -0
  950. package/node_modules/@anthropic-ai/sdk/src/core/credentials.ts +379 -0
  951. package/node_modules/@anthropic-ai/sdk/src/core/error.ts +17 -0
  952. package/node_modules/@anthropic-ai/sdk/src/core/middleware.ts +339 -0
  953. package/node_modules/@anthropic-ai/sdk/src/core/pagination.ts +60 -0
  954. package/node_modules/@anthropic-ai/sdk/src/core/streaming.ts +38 -1
  955. package/node_modules/@anthropic-ai/sdk/src/helpers/beta/environments.ts +34 -0
  956. package/node_modules/@anthropic-ai/sdk/src/helpers/beta/json-schema.ts +7 -0
  957. package/node_modules/@anthropic-ai/sdk/src/helpers/beta/mcp.ts +1 -1
  958. package/node_modules/@anthropic-ai/sdk/src/helpers/beta/zod.ts +14 -10
  959. package/node_modules/@anthropic-ai/sdk/src/helpers/zod.ts +3 -6
  960. package/node_modules/@anthropic-ai/sdk/src/index.ts +16 -1
  961. package/node_modules/@anthropic-ai/sdk/src/internal/constants.ts +0 -5
  962. package/node_modules/@anthropic-ai/sdk/src/internal/file-store.ts +550 -0
  963. package/node_modules/@anthropic-ai/sdk/src/internal/headers.ts +47 -4
  964. package/node_modules/@anthropic-ai/sdk/src/internal/message-stream-utils.ts +30 -0
  965. package/node_modules/@anthropic-ai/sdk/src/internal/parse.ts +16 -11
  966. package/node_modules/@anthropic-ai/sdk/src/internal/qs/LICENSE.md +13 -0
  967. package/node_modules/@anthropic-ai/sdk/src/internal/qs/README.md +3 -0
  968. package/node_modules/@anthropic-ai/sdk/src/internal/qs/formats.ts +10 -0
  969. package/node_modules/@anthropic-ai/sdk/src/internal/qs/index.ts +13 -0
  970. package/node_modules/@anthropic-ai/sdk/src/internal/qs/stringify.ts +385 -0
  971. package/node_modules/@anthropic-ai/sdk/src/internal/qs/types.ts +71 -0
  972. package/node_modules/@anthropic-ai/sdk/src/internal/qs/utils.ts +265 -0
  973. package/node_modules/@anthropic-ai/sdk/src/internal/request-options.ts +55 -2
  974. package/node_modules/@anthropic-ai/sdk/src/internal/request-signal.ts +68 -0
  975. package/node_modules/@anthropic-ai/sdk/src/internal/stainless-helper-header.ts +122 -0
  976. package/node_modules/@anthropic-ai/sdk/src/internal/utils/abort.ts +21 -0
  977. package/node_modules/@anthropic-ai/sdk/src/internal/utils/async-queue.ts +66 -0
  978. package/node_modules/@anthropic-ai/sdk/src/internal/utils/backoff.ts +41 -0
  979. package/node_modules/@anthropic-ai/sdk/src/internal/utils/log.ts +41 -10
  980. package/node_modules/@anthropic-ai/sdk/src/internal/utils/promise.ts +18 -0
  981. package/node_modules/@anthropic-ai/sdk/src/internal/utils/query.ts +2 -18
  982. package/node_modules/@anthropic-ai/sdk/src/internal/utils/sleep.ts +25 -2
  983. package/node_modules/@anthropic-ai/sdk/src/internal/utils/time.ts +4 -0
  984. package/node_modules/@anthropic-ai/sdk/src/lib/BetaMessageStream.ts +72 -33
  985. package/node_modules/@anthropic-ai/sdk/src/lib/MessageStream.ts +36 -24
  986. package/node_modules/@anthropic-ai/sdk/src/lib/credentials/credential-chain.ts +292 -0
  987. package/node_modules/@anthropic-ai/sdk/src/lib/credentials/identity-token.ts +37 -0
  988. package/node_modules/@anthropic-ai/sdk/src/lib/credentials/oidc-federation.ts +140 -0
  989. package/node_modules/@anthropic-ai/sdk/src/lib/credentials/token-cache.ts +130 -0
  990. package/node_modules/@anthropic-ai/sdk/src/lib/credentials/types.ts +295 -0
  991. package/node_modules/@anthropic-ai/sdk/src/lib/credentials/user-oauth.ts +144 -0
  992. package/node_modules/@anthropic-ai/sdk/src/lib/credentials.ts +3 -0
  993. package/node_modules/@anthropic-ai/sdk/src/lib/environments/index.ts +23 -0
  994. package/node_modules/@anthropic-ai/sdk/src/lib/environments/poller.ts +299 -0
  995. package/node_modules/@anthropic-ai/sdk/src/lib/environments/worker.ts +779 -0
  996. package/node_modules/@anthropic-ai/sdk/src/lib/helper-client.ts +86 -0
  997. package/node_modules/@anthropic-ai/sdk/src/lib/middleware.ts +994 -0
  998. package/node_modules/@anthropic-ai/sdk/src/lib/sessions/accumulate.ts +130 -0
  999. package/node_modules/@anthropic-ai/sdk/src/lib/tools/BetaRunnableTool.ts +71 -7
  1000. package/node_modules/@anthropic-ai/sdk/src/lib/tools/BetaToolRunner.ts +135 -35
  1001. package/node_modules/@anthropic-ai/sdk/src/lib/tools/SessionToolRunner.ts +885 -0
  1002. package/node_modules/@anthropic-ai/sdk/src/resources/beta/agents/agents.ts +806 -69
  1003. package/node_modules/@anthropic-ai/sdk/src/resources/beta/agents/index.ts +34 -0
  1004. package/node_modules/@anthropic-ai/sdk/src/resources/beta/beta.ts +690 -28
  1005. package/node_modules/@anthropic-ai/sdk/src/resources/beta/deployment-runs.ts +441 -0
  1006. package/node_modules/@anthropic-ai/sdk/src/resources/beta/deployments.ts +996 -0
  1007. package/node_modules/@anthropic-ai/sdk/src/resources/beta/dreams.ts +453 -0
  1008. package/node_modules/@anthropic-ai/sdk/src/resources/beta/environments/environments.ts +626 -0
  1009. package/node_modules/@anthropic-ai/sdk/src/resources/beta/environments/index.ts +42 -0
  1010. package/node_modules/@anthropic-ai/sdk/src/resources/beta/environments/work.ts +705 -0
  1011. package/node_modules/@anthropic-ai/sdk/src/resources/beta/environments.ts +1 -540
  1012. package/node_modules/@anthropic-ai/sdk/src/resources/beta/files.ts +28 -28
  1013. package/node_modules/@anthropic-ai/sdk/src/resources/beta/index.ts +312 -5
  1014. package/node_modules/@anthropic-ai/sdk/src/resources/beta/memory-stores/index.ts +1 -0
  1015. package/node_modules/@anthropic-ai/sdk/src/resources/beta/memory-stores/memories.ts +141 -31
  1016. package/node_modules/@anthropic-ai/sdk/src/resources/beta/memory-stores/memory-stores.ts +66 -20
  1017. package/node_modules/@anthropic-ai/sdk/src/resources/beta/memory-stores/memory-versions.ts +112 -9
  1018. package/node_modules/@anthropic-ai/sdk/src/resources/beta/messages/batches.ts +90 -33
  1019. package/node_modules/@anthropic-ai/sdk/src/resources/beta/messages/index.ts +90 -0
  1020. package/node_modules/@anthropic-ai/sdk/src/resources/beta/messages/messages.ts +2755 -211
  1021. package/node_modules/@anthropic-ai/sdk/src/resources/beta/models.ts +7 -0
  1022. package/node_modules/@anthropic-ai/sdk/src/resources/beta/sessions/events.ts +888 -18
  1023. package/node_modules/@anthropic-ai/sdk/src/resources/beta/sessions/index.ts +60 -1
  1024. package/node_modules/@anthropic-ai/sdk/src/resources/beta/sessions/sessions.ts +669 -14
  1025. package/node_modules/@anthropic-ai/sdk/src/resources/beta/sessions/threads/events.ts +123 -0
  1026. package/node_modules/@anthropic-ai/sdk/src/resources/beta/sessions/threads/index.ts +15 -0
  1027. package/node_modules/@anthropic-ai/sdk/src/resources/beta/sessions/threads/threads.ts +330 -0
  1028. package/node_modules/@anthropic-ai/sdk/src/resources/beta/sessions/threads.ts +3 -0
  1029. package/node_modules/@anthropic-ai/sdk/src/resources/beta/skills/index.ts +1 -0
  1030. package/node_modules/@anthropic-ai/sdk/src/resources/beta/skills/skills.ts +15 -14
  1031. package/node_modules/@anthropic-ai/sdk/src/resources/beta/skills/versions.ts +49 -3
  1032. package/node_modules/@anthropic-ai/sdk/src/resources/beta/tunnels/certificates.ts +252 -0
  1033. package/node_modules/@anthropic-ai/sdk/src/resources/beta/tunnels/index.ts +23 -0
  1034. package/node_modules/@anthropic-ai/sdk/src/resources/beta/tunnels/tunnels.ts +347 -0
  1035. package/node_modules/@anthropic-ai/sdk/src/resources/beta/tunnels.ts +3 -0
  1036. package/node_modules/@anthropic-ai/sdk/src/resources/beta/user-profiles.ts +76 -5
  1037. package/node_modules/@anthropic-ai/sdk/src/resources/beta/vaults/credentials.ts +347 -3
  1038. package/node_modules/@anthropic-ai/sdk/src/resources/beta/vaults/index.ts +17 -0
  1039. package/node_modules/@anthropic-ai/sdk/src/resources/beta/vaults/vaults.ts +34 -0
  1040. package/node_modules/@anthropic-ai/sdk/src/resources/beta/webhooks.ts +762 -0
  1041. package/node_modules/@anthropic-ai/sdk/src/resources/completions.ts +18 -11
  1042. package/node_modules/@anthropic-ai/sdk/src/resources/files.ts +163 -0
  1043. package/node_modules/@anthropic-ai/sdk/src/resources/index.ts +89 -0
  1044. package/node_modules/@anthropic-ai/sdk/src/resources/messages/batches.ts +30 -12
  1045. package/node_modules/@anthropic-ai/sdk/src/resources/messages/index.ts +70 -0
  1046. package/node_modules/@anthropic-ai/sdk/src/resources/messages/messages.ts +2202 -226
  1047. package/node_modules/@anthropic-ai/sdk/src/resources/skills/index.ts +21 -0
  1048. package/node_modules/@anthropic-ai/sdk/src/resources/skills/skills.ts +194 -0
  1049. package/node_modules/@anthropic-ai/sdk/src/resources/skills/versions.ts +160 -0
  1050. package/node_modules/@anthropic-ai/sdk/src/resources/skills.ts +3 -0
  1051. package/node_modules/@anthropic-ai/sdk/src/tools/agent-toolset/fs-util.ts +190 -0
  1052. package/node_modules/@anthropic-ai/sdk/src/tools/agent-toolset/memories.ts +1017 -0
  1053. package/node_modules/@anthropic-ai/sdk/src/tools/agent-toolset/node.browser.ts +172 -0
  1054. package/node_modules/@anthropic-ai/sdk/src/tools/agent-toolset/node.ts +914 -0
  1055. package/node_modules/@anthropic-ai/sdk/src/tools/agent-toolset/skills.ts +372 -0
  1056. package/node_modules/@anthropic-ai/sdk/src/tools/agent-toolset/sync-interval.ts +30 -0
  1057. package/node_modules/@anthropic-ai/sdk/src/tools/memory/node.browser.ts +64 -0
  1058. package/node_modules/@anthropic-ai/sdk/src/version.ts +1 -1
  1059. package/node_modules/@anthropic-ai/sdk/streaming.d.mts +1 -0
  1060. package/node_modules/@anthropic-ai/sdk/streaming.d.mts.map +1 -1
  1061. package/node_modules/@anthropic-ai/sdk/streaming.d.ts +1 -0
  1062. package/node_modules/@anthropic-ai/sdk/streaming.d.ts.map +1 -1
  1063. package/node_modules/@anthropic-ai/sdk/streaming.mjs +1 -0
  1064. package/node_modules/@anthropic-ai/sdk/streaming.mjs.map +1 -1
  1065. package/node_modules/@anthropic-ai/sdk/tools/agent-toolset/fs-util.d.mts +75 -0
  1066. package/node_modules/@anthropic-ai/sdk/tools/agent-toolset/fs-util.d.mts.map +1 -0
  1067. package/node_modules/@anthropic-ai/sdk/tools/agent-toolset/fs-util.d.ts +75 -0
  1068. package/node_modules/@anthropic-ai/sdk/tools/agent-toolset/fs-util.d.ts.map +1 -0
  1069. package/node_modules/@anthropic-ai/sdk/tools/agent-toolset/fs-util.js +196 -0
  1070. package/node_modules/@anthropic-ai/sdk/tools/agent-toolset/fs-util.js.map +1 -0
  1071. package/node_modules/@anthropic-ai/sdk/tools/agent-toolset/fs-util.mjs +185 -0
  1072. package/node_modules/@anthropic-ai/sdk/tools/agent-toolset/fs-util.mjs.map +1 -0
  1073. package/node_modules/@anthropic-ai/sdk/tools/agent-toolset/memories.d.mts +173 -0
  1074. package/node_modules/@anthropic-ai/sdk/tools/agent-toolset/memories.d.mts.map +1 -0
  1075. package/node_modules/@anthropic-ai/sdk/tools/agent-toolset/memories.d.ts +173 -0
  1076. package/node_modules/@anthropic-ai/sdk/tools/agent-toolset/memories.d.ts.map +1 -0
  1077. package/node_modules/@anthropic-ai/sdk/tools/agent-toolset/memories.js +902 -0
  1078. package/node_modules/@anthropic-ai/sdk/tools/agent-toolset/memories.js.map +1 -0
  1079. package/node_modules/@anthropic-ai/sdk/tools/agent-toolset/memories.mjs +895 -0
  1080. package/node_modules/@anthropic-ai/sdk/tools/agent-toolset/memories.mjs.map +1 -0
  1081. package/node_modules/@anthropic-ai/sdk/tools/agent-toolset/node.browser.d.mts +82 -0
  1082. package/node_modules/@anthropic-ai/sdk/tools/agent-toolset/node.browser.d.mts.map +1 -0
  1083. package/node_modules/@anthropic-ai/sdk/tools/agent-toolset/node.browser.d.ts +82 -0
  1084. package/node_modules/@anthropic-ai/sdk/tools/agent-toolset/node.browser.d.ts.map +1 -0
  1085. package/node_modules/@anthropic-ai/sdk/tools/agent-toolset/node.browser.js +151 -0
  1086. package/node_modules/@anthropic-ai/sdk/tools/agent-toolset/node.browser.js.map +1 -0
  1087. package/node_modules/@anthropic-ai/sdk/tools/agent-toolset/node.browser.mjs +131 -0
  1088. package/node_modules/@anthropic-ai/sdk/tools/agent-toolset/node.browser.mjs.map +1 -0
  1089. package/node_modules/@anthropic-ai/sdk/tools/agent-toolset/node.d.mts +190 -0
  1090. package/node_modules/@anthropic-ai/sdk/tools/agent-toolset/node.d.mts.map +1 -0
  1091. package/node_modules/@anthropic-ai/sdk/tools/agent-toolset/node.d.ts +190 -0
  1092. package/node_modules/@anthropic-ai/sdk/tools/agent-toolset/node.d.ts.map +1 -0
  1093. package/node_modules/@anthropic-ai/sdk/tools/agent-toolset/node.js +819 -0
  1094. package/node_modules/@anthropic-ai/sdk/tools/agent-toolset/node.js.map +1 -0
  1095. package/node_modules/@anthropic-ai/sdk/tools/agent-toolset/node.mjs +797 -0
  1096. package/node_modules/@anthropic-ai/sdk/tools/agent-toolset/node.mjs.map +1 -0
  1097. package/node_modules/@anthropic-ai/sdk/tools/agent-toolset/skills.d.mts +82 -0
  1098. package/node_modules/@anthropic-ai/sdk/tools/agent-toolset/skills.d.mts.map +1 -0
  1099. package/node_modules/@anthropic-ai/sdk/tools/agent-toolset/skills.d.ts +82 -0
  1100. package/node_modules/@anthropic-ai/sdk/tools/agent-toolset/skills.d.ts.map +1 -0
  1101. package/node_modules/@anthropic-ai/sdk/tools/agent-toolset/skills.js +352 -0
  1102. package/node_modules/@anthropic-ai/sdk/tools/agent-toolset/skills.js.map +1 -0
  1103. package/node_modules/@anthropic-ai/sdk/tools/agent-toolset/skills.mjs +344 -0
  1104. package/node_modules/@anthropic-ai/sdk/tools/agent-toolset/skills.mjs.map +1 -0
  1105. package/node_modules/@anthropic-ai/sdk/tools/agent-toolset/sync-interval.d.mts +19 -0
  1106. package/node_modules/@anthropic-ai/sdk/tools/agent-toolset/sync-interval.d.mts.map +1 -0
  1107. package/node_modules/@anthropic-ai/sdk/tools/agent-toolset/sync-interval.d.ts +19 -0
  1108. package/node_modules/@anthropic-ai/sdk/tools/agent-toolset/sync-interval.d.ts.map +1 -0
  1109. package/node_modules/@anthropic-ai/sdk/tools/agent-toolset/sync-interval.js +29 -0
  1110. package/node_modules/@anthropic-ai/sdk/tools/agent-toolset/sync-interval.js.map +1 -0
  1111. package/node_modules/@anthropic-ai/sdk/tools/agent-toolset/sync-interval.mjs +25 -0
  1112. package/node_modules/@anthropic-ai/sdk/tools/agent-toolset/sync-interval.mjs.map +1 -0
  1113. package/node_modules/@anthropic-ai/sdk/tools/memory/node.browser.d.mts +27 -0
  1114. package/node_modules/@anthropic-ai/sdk/tools/memory/node.browser.d.mts.map +1 -0
  1115. package/node_modules/@anthropic-ai/sdk/tools/memory/node.browser.d.ts +27 -0
  1116. package/node_modules/@anthropic-ai/sdk/tools/memory/node.browser.d.ts.map +1 -0
  1117. package/node_modules/@anthropic-ai/sdk/tools/memory/node.browser.js +49 -0
  1118. package/node_modules/@anthropic-ai/sdk/tools/memory/node.browser.js.map +1 -0
  1119. package/node_modules/@anthropic-ai/sdk/tools/memory/node.browser.mjs +44 -0
  1120. package/node_modules/@anthropic-ai/sdk/tools/memory/node.browser.mjs.map +1 -0
  1121. package/node_modules/@anthropic-ai/sdk/tools/memory/node.d.mts.map +1 -1
  1122. package/node_modules/@anthropic-ai/sdk/tools/memory/node.d.ts.map +1 -1
  1123. package/node_modules/@anthropic-ai/sdk/tools/memory/node.mjs.map +1 -1
  1124. package/node_modules/@anthropic-ai/sdk/uploads.d.mts +1 -0
  1125. package/node_modules/@anthropic-ai/sdk/uploads.d.mts.map +1 -1
  1126. package/node_modules/@anthropic-ai/sdk/uploads.d.ts +1 -0
  1127. package/node_modules/@anthropic-ai/sdk/uploads.d.ts.map +1 -1
  1128. package/node_modules/@anthropic-ai/sdk/uploads.mjs +1 -0
  1129. package/node_modules/@anthropic-ai/sdk/uploads.mjs.map +1 -1
  1130. package/node_modules/@anthropic-ai/sdk/version.d.mts +1 -1
  1131. package/node_modules/@anthropic-ai/sdk/version.d.mts.map +1 -1
  1132. package/node_modules/@anthropic-ai/sdk/version.d.ts +1 -1
  1133. package/node_modules/@anthropic-ai/sdk/version.d.ts.map +1 -1
  1134. package/node_modules/@anthropic-ai/sdk/version.js +1 -1
  1135. package/node_modules/@anthropic-ai/sdk/version.js.map +1 -1
  1136. package/node_modules/@anthropic-ai/sdk/version.mjs +1 -1
  1137. package/node_modules/@anthropic-ai/sdk/version.mjs.map +1 -1
  1138. package/node_modules/@code-yeongyu/senpi-codemode/CHANGELOG.md +24 -0
  1139. package/node_modules/@code-yeongyu/senpi-codemode/package.json +4 -4
  1140. package/node_modules/@earendil-works/pi-agent-core/package.json +3 -3
  1141. package/node_modules/@earendil-works/pi-ai/dist/image-models.generated.d.ts +30 -0
  1142. package/node_modules/@earendil-works/pi-ai/dist/image-models.generated.d.ts.map +1 -1
  1143. package/node_modules/@earendil-works/pi-ai/dist/image-models.generated.js +30 -0
  1144. package/node_modules/@earendil-works/pi-ai/dist/image-models.generated.js.map +1 -1
  1145. package/node_modules/@earendil-works/pi-ai/dist/providers/data/.manifest.json +1 -1
  1146. package/node_modules/@earendil-works/pi-ai/dist/providers/data/huggingface.json +1 -1
  1147. package/node_modules/@earendil-works/pi-ai/dist/providers/data/nvidia.json +1 -1
  1148. package/node_modules/@earendil-works/pi-ai/dist/providers/data/opencode-go.json +1 -1
  1149. package/node_modules/@earendil-works/pi-ai/dist/providers/data/opencode.json +1 -1
  1150. package/node_modules/@earendil-works/pi-ai/dist/providers/data/openrouter.json +1 -1
  1151. package/node_modules/@earendil-works/pi-ai/dist/providers/data/vercel-ai-gateway.json +1 -1
  1152. package/node_modules/@earendil-works/pi-ai/dist/utils/overflow.d.ts.map +1 -1
  1153. package/node_modules/@earendil-works/pi-ai/dist/utils/overflow.js +4 -0
  1154. package/node_modules/@earendil-works/pi-ai/dist/utils/overflow.js.map +1 -1
  1155. package/node_modules/@earendil-works/pi-ai/package.json +3 -3
  1156. package/node_modules/@earendil-works/pi-pty/package.json +1 -1
  1157. package/node_modules/@earendil-works/pi-telemetry/package.json +1 -1
  1158. package/node_modules/@earendil-works/pi-tui/dist/terminal.d.ts +5 -0
  1159. package/node_modules/@earendil-works/pi-tui/dist/terminal.d.ts.map +1 -1
  1160. package/node_modules/@earendil-works/pi-tui/dist/terminal.js +90 -1
  1161. package/node_modules/@earendil-works/pi-tui/dist/terminal.js.map +1 -1
  1162. package/node_modules/@earendil-works/pi-tui/package.json +1 -1
  1163. package/node_modules/@stablelib/base64/LICENSE +21 -0
  1164. package/node_modules/@stablelib/base64/base64.bench.ts +25 -0
  1165. package/node_modules/@stablelib/base64/base64.test.ts +85 -0
  1166. package/node_modules/@stablelib/base64/base64.ts +283 -0
  1167. package/node_modules/@stablelib/base64/lib/base64.bench.d.ts +1 -0
  1168. package/node_modules/@stablelib/base64/lib/base64.bench.js +23 -0
  1169. package/node_modules/@stablelib/base64/lib/base64.bench.js.map +1 -0
  1170. package/node_modules/@stablelib/base64/lib/base64.d.ts +34 -0
  1171. package/node_modules/@stablelib/base64/lib/base64.js +282 -0
  1172. package/node_modules/@stablelib/base64/lib/base64.js.map +1 -0
  1173. package/node_modules/@stablelib/base64/lib/base64.test.d.ts +1 -0
  1174. package/node_modules/@stablelib/base64/lib/base64.test.js +82 -0
  1175. package/node_modules/@stablelib/base64/lib/base64.test.js.map +1 -0
  1176. package/node_modules/@stablelib/base64/package.json +25 -0
  1177. package/node_modules/@stablelib/base64/tsconfig.json +27 -0
  1178. package/node_modules/fast-sha256/LICENSE +24 -0
  1179. package/node_modules/fast-sha256/README.md +127 -0
  1180. package/node_modules/fast-sha256/package.json +42 -0
  1181. package/node_modules/fast-sha256/sha256.d.ts +39 -0
  1182. package/node_modules/fast-sha256/sha256.js +427 -0
  1183. package/node_modules/fast-sha256/sha256.min.js +1 -0
  1184. package/node_modules/standardwebhooks/README.md +41 -0
  1185. package/node_modules/standardwebhooks/dist/index.d.ts +24 -0
  1186. package/node_modules/standardwebhooks/dist/index.js +106 -0
  1187. package/node_modules/standardwebhooks/dist/index.js.map +1 -0
  1188. package/node_modules/standardwebhooks/dist/timing_safe_equal.d.ts +1 -0
  1189. package/node_modules/standardwebhooks/dist/timing_safe_equal.js +30 -0
  1190. package/node_modules/standardwebhooks/dist/timing_safe_equal.js.map +1 -0
  1191. package/node_modules/standardwebhooks/package.json +45 -0
  1192. package/package.json +17 -8
  1193. package/node_modules/@anthropic-ai/sdk/lib/stainless-helper-header.d.mts +0 -34
  1194. package/node_modules/@anthropic-ai/sdk/lib/stainless-helper-header.d.mts.map +0 -1
  1195. package/node_modules/@anthropic-ai/sdk/lib/stainless-helper-header.d.ts +0 -34
  1196. package/node_modules/@anthropic-ai/sdk/lib/stainless-helper-header.d.ts.map +0 -1
  1197. package/node_modules/@anthropic-ai/sdk/lib/stainless-helper-header.js.map +0 -1
  1198. package/node_modules/@anthropic-ai/sdk/lib/stainless-helper-header.mjs.map +0 -1
  1199. package/node_modules/@anthropic-ai/sdk/lib/tools/ToolRunner.d.mts +0 -132
  1200. package/node_modules/@anthropic-ai/sdk/lib/tools/ToolRunner.d.mts.map +0 -1
  1201. package/node_modules/@anthropic-ai/sdk/lib/tools/ToolRunner.d.ts +0 -132
  1202. package/node_modules/@anthropic-ai/sdk/lib/tools/ToolRunner.d.ts.map +0 -1
  1203. package/node_modules/@anthropic-ai/sdk/lib/tools/ToolRunner.js +0 -294
  1204. package/node_modules/@anthropic-ai/sdk/lib/tools/ToolRunner.js.map +0 -1
  1205. package/node_modules/@anthropic-ai/sdk/lib/tools/ToolRunner.mjs +0 -290
  1206. package/node_modules/@anthropic-ai/sdk/lib/tools/ToolRunner.mjs.map +0 -1
  1207. package/node_modules/@anthropic-ai/sdk/src/lib/stainless-helper-header.ts +0 -80
  1208. package/node_modules/@anthropic-ai/sdk/src/lib/tools/ToolRunner.ts +0 -381
@@ -1 +1 @@
1
- {"version":3,"file":"monitor-continuation.js","sourceRoot":"","sources":["../../../../../src/core/extensions/builtin/goal/monitor-continuation.ts"],"names":[],"mappings":"AAEA,OAAO,EACN,+BAA+B,EAC/B,wBAAwB,EACxB,4BAA4B,EAC5B,2CAA2C,EAI3C,qCAAqC,GACrC,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,yBAAyB,EAAE,MAAM,kCAAkC,CAAC;AAE7E,OAAO,EAAE,2CAA2C,EAAE,MAAM,iBAAiB,CAAC;AAE9E,OAAO,EACN,yBAAyB,EACzB,wBAAwB,EACxB,wBAAwB,EAGxB,2BAA2B,EAC3B,iBAAiB,EACjB,sBAAsB,GACtB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAE,oBAAoB,EAAE,MAAM,6BAA6B,CAAC;AACnE,OAAO,EACN,6BAA6B,EAC7B,qCAAqC,EACrC,iBAAiB,GACjB,MAAM,wBAAwB,CAAC;AAUhC,OAAO,EAAE,uBAAuB,EAAE,oBAAoB,EAAE,6BAA6B,EAAE,MAAM,aAAa,CAAC;AAC3G,OAAO,E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AAC;QACxB,IAAI,CAAC,0BAA0B,GAAG,SAAS,CAAC;QAC5C,IAAI,IAAI,KAAK,SAAS;YAAE,IAAI,CAAC,GAAG,CAAC,MAAM,EAAE,IAAI,CAAC,mCAAmC,EAAE,EAAE,KAAK,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC;QAC3G,IAAI,CAAC,WAAW,EAAE,IAAI,EAAE,CAAC;IAC1B,CAAC;CACD","sourcesContent":["import type { AgentMessage } from \"@earendil-works/pi-agent-core\";\nimport type { ExtensionAPI, ExtensionContext } from \"../../types.ts\";\nimport {\n\tcreateGoalCacheWarmScheduleData,\n\testimateCacheWarmMetrics,\n\tGOAL_CACHE_WARMUP_ENTRY_TYPE,\n\tGOAL_MONITOR_CONTINUATION_FALLBACK_DELAY_MS,\n\ttype GoalCacheWarmMetrics,\n\ttype GoalCacheWarmupEntryData,\n\ttype LiveGoalCacheWarmupEntryData,\n\tresolveGoalMonitorContinuationDelayMs,\n} from \"./cache-warm.ts\";\nimport { subscribeGoalChannelState } from \"./channel-state-subscriptions.ts\";\n\nexport { GOAL_MONITOR_CONTINUATION_FALLBACK_DELAY_MS } from \"./cache-warm.ts\";\n\nimport {\n\tcontinuationTurnUsedTools,\n\tevaluateGoalContinuation,\n\tGOAL_USER_GRACE_DELAY_MS,\n\ttype GoalContinuationInput,\n\ttype GoalContinuationPath,\n\thasGoalContinuationProgress,\n\thashAssistantText,\n\tnormalizeAssistantText,\n} from \"./continuation.ts\";\nimport { lastAssistantMessage } from \"./last-assistant-message.ts\";\nimport {\n\tadmitAndQueueGoalContinuation,\n\tbuildCurrentGoalContinuationSignature,\n\tlastAssistantText,\n} from \"./lifecycle-helpers.ts\";\nimport type {\n\tAgentEndOptions,\n\tContinuingGoalContinuationVerdict,\n\tDelayedContinuationKind,\n\tGoalContinuationAdmission,\n\tProviderRecoveryOptions,\n\tResumptionChannelCounts,\n\tSystemAbortOptions,\n} from \"./monitor-continuation-types.ts\";\nimport { buildContinuationPrompt, buildGoalStallNotice, buildTruncationRecoveryPrompt } from \"./prompt.ts\";\nimport { resetContinuationStreak } from \"./store.ts\";\nimport { goalStoreRef } from \"./store-ref.ts\";\nimport { collectAssistantUsage } from \"./turn-usage.ts\";\nimport type { Goal, TokenUsageSnapshot } from \"./types.ts\";\nimport type { GoalWaitTicker } from \"./wait-ticker.ts\";\n\nexport const GOAL_CONTINUATION_SCHEDULED_EVENT = \"goal_continuation_scheduled\";\nexport const GOAL_CONTINUATION_RESUMED_EVENT = \"goal_continuation_resumed\";\nexport const GOAL_CONTINUATION_TIMER_STATE_EVENT = \"goal_continuation_timer_state\";\nexport const GOAL_MONITOR_STALL_EVENT = \"goal_monitor_continuation_stall\";\n\nexport class MonitorAwareGoalContinuation {\n\treadonly #pi: ExtensionAPI;\n\treadonly #isContinuationPending: () => boolean;\n\treadonly #markContinuationPending: () => void;\n\treadonly #waitTicker: GoalWaitTicker | undefined;\n\t#wakeSources = new Map<string, number>();\n\t#hasStarted = false;\n\t#ctx: ExtensionContext | undefined;\n\t#goal: Goal | null = null;\n\t#timer: ReturnType<typeof setTimeout> | undefined;\n\t#scheduledContinuationKind: DelayedContinuationKind | undefined;\n\t#channelStateUnsubscribers: Array<() => void> = [];\n\t#lastAgentEndMessages: readonly AgentMessage[] = [];\n\t#consecutiveLengthRecoveries = new Map<string, number>();\n\t#recentNormalizedOutputHashes: string[] = [];\n\t#toollessContinuationStreak = 0;\n\t#toollessStreakGoalId: string | null = null;\n\t#endedTurnWasUserInitiated = false;\n\t#lastTurnUsage: TokenUsageSnapshot | undefined;\n\t#scheduledAtMs: number | undefined;\n\t#scheduledDueAtMs: number | undefined;\n\t#scheduledCache: GoalCacheWarmMetrics | undefined;\n\t#scheduledDelayMs: number | undefined;\n\t#cacheWarmIteration = 0;\n\t#scheduledCacheWarmIteration: number | undefined;\n\t#heldTimer:\n\t\t| { kind: DelayedContinuationKind; remainingMs: number; heldAtMs: number; totalMs: number; drainFire: boolean }\n\t\t| undefined;\n\t#directInputHolds = new Set<string>();\n\t#pendingSystemRecovery: SystemAbortOptions | undefined;\n\t#pendingProviderRecovery: ProviderRecoveryOptions | undefined;\n\n\tconstructor(\n\t\tpi: ExtensionAPI,\n\t\tisContinuationPending: () => boolean = () => false,\n\t\tmarkContinuationPending: () => void = () => {},\n\t\twaitTicker?: GoalWaitTicker,\n\t) {\n\t\tthis.#pi = pi;\n\t\tthis.#isContinuationPending = isContinuationPending;\n\t\tthis.#markContinuationPending = markContinuationPending;\n\t\tthis.#waitTicker = waitTicker;\n\t\tthis.#subscribeToChannelState();\n\t}\n\n\tstart(ctx: ExtensionContext): void {\n\t\tthis.#cancelTimer();\n\t\tthis.#ctx = ctx;\n\t\tif (this.#hasStarted) this.#wakeSources.clear();\n\t\telse this.#hasStarted = true;\n\t\tthis.#goal = null;\n\t\tthis.#lastAgentEndMessages = [];\n\t\tthis.#directInputHolds.clear();\n\t\tthis.#resetContinuationState();\n\t}\n\n\tasync afterAgentEnd(options: AgentEndOptions): Promise<Goal | null> {\n\t\tif (options.goal?.id !== this.#goal?.id) this.#resetContinuationState();\n\t\tthis.#ctx = options.ctx;\n\t\tthis.#goal = options.goal;\n\t\tthis.#lastAgentEndMessages = options.messages;\n\t\tthis.#lastTurnUsage = collectAssistantUsage([...options.messages]);\n\t\tthis.#resetLengthRecoveryAfterCleanStop(options.goal, options.messages);\n\t\tconst turnUsedTools = continuationTurnUsedTools(options.messages);\n\t\tthis.#recordAssistantOutput(options.messages, turnUsedTools);\n\t\tif (options.goal?.status !== \"active\") {\n\t\t\tthis.#cancelTimer();\n\t\t\tthis.#resetContinuationState();\n\t\t\treturn options.goal;\n\t\t}\n\t\tthis.#recordToollessContinuationTurn(options.goal, turnUsedTools);\n\t\tconst immediateInput = this.#buildVerdictInput(options.ctx, options.goal, \"immediate\", options.messages);\n\t\tconst goal =\n\t\t\t!this.#endedTurnWasUserInitiated && (turnUsedTools || hasGoalContinuationProgress(immediateInput))\n\t\t\t\t? ((await resetContinuationStreak(goalStoreRef(options.ctx.sessionManager, options.ctx.cwd))) ??\n\t\t\t\t\toptions.goal)\n\t\t\t\t: options.goal;\n\t\tthis.#goal = goal;\n\t\tconst immediateVerdict = evaluateGoalContinuation({\n\t\t\tgoal,\n\t\t\t...this.#buildVerdictInput(options.ctx, goal, \"immediate\", options.messages),\n\t\t});\n\t\tif (this.#endedTurnWasUserInitiated) {\n\t\t\tthis.#endedTurnWasUserInitiated = false;\n\t\t\tthis.#cancelTimer();\n\t\t\tif (immediateVerdict.kind === \"continue\") {\n\t\t\t\tthis.#schedule(goal, \"userGrace\");\n\t\t\t\treturn goal;\n\t\t\t}\n\t\t\tswitch (immediateVerdict.reason) {\n\t\t\t\tcase \"not-eligible\":\n\t\t\t\tcase \"single-flight\":\n\t\t\t\tcase \"stale\":\n\t\t\t\t\treturn goal;\n\t\t\t\tcase \"cap\":\n\t\t\t\tcase \"repetition\":\n\t\t\t\tcase \"length-exhausted\": {\n\t\t\t\t\tconst admission = await this.#admitAndQueue(options.ctx, goal, \"immediate\", options.messages);\n\t\t\t\t\treturn admission.goal;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (immediateVerdict.kind === \"deny\" && immediateVerdict.reason === \"not-eligible\") return goal;\n\n\t\tif (this.#activeWakeSourceCount() === 0) {\n\t\t\tthis.#cancelTimer();\n\t\t\tconst admission = await this.#admitAndQueue(options.ctx, goal, \"immediate\", options.messages);\n\t\t\treturn admission.goal;\n\t\t}\n\t\tthis.#schedule(goal, \"monitor\");\n\t\treturn goal;\n\t}\n\n\tasync afterSystemAbort(options: SystemAbortOptions): Promise<Goal | null> {\n\t\tthis.noteContinuationStarted();\n\t\tif (options.goal?.id !== this.#goal?.id) this.#resetContinuationState();\n\t\tthis.#pendingSystemRecovery = undefined;\n\t\tthis.#ctx = options.ctx;\n\t\tthis.#goal = options.goal;\n\t\tthis.#lastAgentEndMessages = options.messages;\n\t\tthis.#lastTurnUsage = collectAssistantUsage([...options.messages]);\n\t\tif (options.goal?.status !== \"active\") {\n\t\t\tthis.#resetContinuationState();\n\t\t\treturn options.goal;\n\t\t}\n\t\tif (options.willRetry) return options.goal;\n\t\tif (this.#activeWakeSourceCount() > 0) this.#schedule(options.goal, \"monitor\");\n\t\telse if (lastAssistantMessage(options.messages)?.stopReason === \"error\") {\n\t\t\tthis.#pendingSystemRecovery = options;\n\t\t}\n\t\treturn options.goal;\n\t}\n\n\tasync afterProviderFailure(options: ProviderRecoveryOptions): Promise<Goal | null> {\n\t\tthis.noteContinuationStarted();\n\t\tif (options.goal?.id !== this.#goal?.id) this.#resetContinuationState();\n\t\tthis.#pendingProviderRecovery = undefined;\n\t\tthis.#ctx = options.ctx;\n\t\tthis.#goal = options.goal;\n\t\tthis.#lastAgentEndMessages = options.messages;\n\t\tthis.#lastTurnUsage = collectAssistantUsage([...options.messages]);\n\t\tif (options.goal?.status !== \"active\") {\n\t\t\tthis.#resetContinuationState();\n\t\t\treturn options.goal;\n\t\t}\n\t\tif (!options.willRetry) this.#pendingProviderRecovery = options;\n\t\treturn options.goal;\n\t}\n\n\tasync afterAgentSettled(): Promise<Goal | null | undefined> {\n\t\tconst pendingSystem = this.#pendingSystemRecovery;\n\t\tconst pendingProvider = this.#pendingProviderRecovery;\n\t\tthis.#pendingSystemRecovery = undefined;\n\t\tthis.#pendingProviderRecovery = undefined;\n\t\tif (pendingSystem !== undefined && pendingSystem.goal !== null && pendingSystem.event.abortSource !== \"user\") {\n\t\t\treturn (\n\t\t\t\tawait this.#admitAndQueue(pendingSystem.ctx, pendingSystem.goal, \"systemRecovery\", pendingSystem.messages)\n\t\t\t).goal;\n\t\t}\n\t\tif (\n\t\t\tpendingProvider === undefined ||\n\t\t\tpendingProvider.goal === null ||\n\t\t\tpendingProvider.event.abortSource === \"user\"\n\t\t) {\n\t\t\treturn undefined;\n\t\t}\n\t\treturn (\n\t\t\tawait this.#admitAndQueue(\n\t\t\t\tpendingProvider.ctx,\n\t\t\t\tpendingProvider.goal,\n\t\t\t\t\"providerRecovery\",\n\t\t\t\tpendingProvider.messages,\n\t\t\t)\n\t\t).goal;\n\t}\n\n\tsyncGoal(goal: Goal | null): void {\n\t\tif (goal?.id !== this.#goal?.id) this.#resetContinuationState();\n\t\tthis.#goal = goal;\n\t\tif (goal?.status !== \"active\") {\n\t\t\tthis.#cancelTimer();\n\t\t\tthis.#resetContinuationState();\n\t\t}\n\t}\n\n\t/** Live resumption channels known to this generation (e.g. terminal snapshots replayed on reload). */\n\thasActiveWakeSources(): boolean {\n\t\treturn this.#activeWakeSourceCount() > 0;\n\t}\n\n\t/**\n\t * Re-arms the monitor-delayed backstop a reload tore down with the retired\n\t * generation, so a later wake-source drain can still deliver the goal\n\t * continuation. No-op unless the goal is active, a wake source is live, and\n\t * no continuation is already scheduled.\n\t */\n\trearmMonitorBackstop(goal: Goal): void {\n\t\tif (goal.status !== \"active\" || this.#activeWakeSourceCount() === 0) return;\n\t\tthis.#goal = goal;\n\t\tthis.#schedule(goal, \"monitor\");\n\t}\n\n\t/** Temporarily prevents a scheduled continuation from racing unresolved direct-input admission. */\n\tholdDirectInput(inputId: string): void {\n\t\tif (this.#directInputHolds.has(inputId)) return;\n\t\tthis.#directInputHolds.add(inputId);\n\t\tif (\n\t\t\tthis.#directInputHolds.size !== 1 ||\n\t\t\tthis.#timer === undefined ||\n\t\t\tthis.#scheduledContinuationKind === undefined\n\t\t) {\n\t\t\treturn;\n\t\t}\n\t\tconst heldAtMs = Date.now();\n\t\tthis.#heldTimer = {\n\t\t\tkind: this.#scheduledContinuationKind,\n\t\t\tremainingMs: Math.max(0, (this.#scheduledDueAtMs ?? heldAtMs) - heldAtMs),\n\t\t\theldAtMs,\n\t\t\ttotalMs: this.#scheduledDelayMs ?? GOAL_USER_GRACE_DELAY_MS,\n\t\t\tdrainFire: false,\n\t\t};\n\t\tclearTimeout(this.#timer);\n\t\tthis.#timer = undefined;\n\t\tthis.#scheduledDueAtMs = undefined;\n\t\tthis.#waitTicker?.stop();\n\t}\n\n\t/** Resolves one admission hold without allowing overlapping inputs to consume each other. */\n\tresolveDirectInput(inputId: string, accepted: boolean): void {\n\t\tif (!this.#directInputHolds.delete(inputId)) return;\n\t\tif (accepted) {\n\t\t\tthis.#heldTimer = undefined;\n\t\t\tthis.noteUserPrompt();\n\t\t\treturn;\n\t\t}\n\t\tif (this.#directInputHolds.size > 0 || this.#heldTimer === undefined) return;\n\t\tconst held = this.#heldTimer;\n\t\tthis.#heldTimer = undefined;\n\t\tconst elapsedWhileHeldMs = Math.max(0, Date.now() - held.heldAtMs);\n\t\tthis.#armTimer(held.kind, Math.max(0, held.remainingMs - elapsedWhileHeldMs), held.totalMs, held.drainFire);\n\t}\n\n\t/** An accepted real user prompt starts a grace-governed user turn. */\n\tnoteUserPrompt(): void {\n\t\tthis.#cancelTimer();\n\t\tthis.#pendingProviderRecovery = undefined;\n\t\tthis.#endedTurnWasUserInitiated = true;\n\t\tthis.#resetContinuationState();\n\t}\n\n\t/** A hidden continuation or system recovery has started, so the next end is not user-initiated. */\n\tnoteContinuationStarted(): void {\n\t\tthis.#endedTurnWasUserInitiated = false;\n\t}\n\n\tdispose(): void {\n\t\tthis.#cancelTimer();\n\t\tfor (const unsubscribe of this.#channelStateUnsubscribers) unsubscribe();\n\t\tthis.#channelStateUnsubscribers = [];\n\t\tthis.#ctx = undefined;\n\t\tthis.#goal = null;\n\t\tthis.#wakeSources.clear();\n\t\tthis.#lastAgentEndMessages = [];\n\t\tthis.#directInputHolds.clear();\n\t\tthis.#resetContinuationState();\n\t}\n\n\t#schedule(goal: Goal, kind: DelayedContinuationKind): void {\n\t\tif (this.#scheduledContinuationKind !== undefined) return;\n\t\tconst delayMs =\n\t\t\tkind === \"monitor\"\n\t\t\t\t? resolveGoalMonitorContinuationDelayMs(\n\t\t\t\t\t\tthis.#ctx?.getPromptCacheSafeWaitSeconds?.(),\n\t\t\t\t\t\tthis.#ctx?.getPromptCacheGoalBackstopMaxSeconds?.(),\n\t\t\t\t\t)\n\t\t\t\t: GOAL_USER_GRACE_DELAY_MS;\n\t\tthis.#scheduledDelayMs = delayMs;\n\t\tif (kind === \"monitor\") {\n\t\t\tthis.#cacheWarmIteration += 1;\n\t\t\tthis.#scheduledCacheWarmIteration = this.#cacheWarmIteration;\n\t\t\tconst iteration = this.#scheduledCacheWarmIteration;\n\t\t\tconst cache = estimateCacheWarmMetrics(this.#ctx?.model, process.env, this.#lastTurnUsage);\n\t\t\tconst wakeSources = this.#wakeSourceSnapshot();\n\t\t\tthis.#scheduledCache = cache;\n\t\t\tthis.#scheduledAtMs = Date.now();\n\t\t\tconst scheduleData = createGoalCacheWarmScheduleData({\n\t\t\t\tgoalId: goal.id,\n\t\t\t\tdelayMs,\n\t\t\t\tscheduledAtMs: this.#scheduledAtMs,\n\t\t\t\titeration,\n\t\t\t\tactiveMonitorCount: this.#activeWakeSourceCount(),\n\t\t\t\twakeSources,\n\t\t\t\t...(cache !== undefined ? { cache } : {}),\n\t\t\t});\n\t\t\tthis.#pi.events?.emit(GOAL_CONTINUATION_SCHEDULED_EVENT, scheduleData);\n\t\t\tthis.#appendWarmupEntry({\n\t\t\t\tphase: \"scheduled\",\n\t\t\t\t...scheduleData,\n\t\t\t});\n\t\t} else {\n\t\t\tthis.#scheduledAtMs = undefined;\n\t\t\tthis.#scheduledCache = undefined;\n\t\t\tthis.#scheduledCacheWarmIteration = undefined;\n\t\t}\n\t\tthis.#scheduledContinuationKind = kind;\n\t\tthis.#pi.events?.emit(GOAL_CONTINUATION_TIMER_STATE_EVENT, { armed: true, kind });\n\t\tif (this.#directInputHolds.size > 0) {\n\t\t\tthis.#heldTimer = { kind, remainingMs: delayMs, heldAtMs: Date.now(), totalMs: delayMs, drainFire: false };\n\t\t\treturn;\n\t\t}\n\t\tthis.#armTimer(kind, delayMs, delayMs);\n\t}\n\n\t#armTimer(kind: DelayedContinuationKind, delayMs: number, totalMs: number, drainFire = false): void {\n\t\tthis.#scheduledDueAtMs = Date.now() + delayMs;\n\t\tconst ctx = this.#ctx;\n\t\tif (ctx?.hasUI) {\n\t\t\tthis.#waitTicker?.sync(ctx, {\n\t\t\t\tkind,\n\t\t\t\tremainingMs: delayMs,\n\t\t\t\ttotalMs,\n\t\t\t\tchannelCounts: this.#wakeSourceSnapshot(),\n\t\t\t});\n\t\t}\n\t\tthis.#timer = setTimeout(() => {\n\t\t\tvoid this.#continueIfEligible(kind, drainFire).catch((error: unknown) => {\n\t\t\t\tif (this.#ctx?.hasUI) {\n\t\t\t\t\tconst message = error instanceof Error ? error.message : String(error);\n\t\t\t\t\tthis.#ctx.ui.notify(`Goal continuation delivery failed: ${message}`, \"error\");\n\t\t\t\t}\n\t\t\t});\n\t\t}, delayMs);\n\t}\n\n\tasync #continueIfEligible(kind: DelayedContinuationKind, drainFire = false): Promise<void> {\n\t\tthis.#timer = undefined;\n\t\tthis.#scheduledDueAtMs = undefined;\n\t\tthis.#scheduledContinuationKind = undefined;\n\t\tthis.#pi.events?.emit(GOAL_CONTINUATION_TIMER_STATE_EVENT, { armed: false, kind });\n\t\tthis.#waitTicker?.stop();\n\t\tconst delayMs =\n\t\t\tthis.#scheduledDelayMs ??\n\t\t\t(kind === \"monitor\" ? GOAL_MONITOR_CONTINUATION_FALLBACK_DELAY_MS : GOAL_USER_GRACE_DELAY_MS);\n\t\tconst waitedMs = this.#scheduledAtMs === undefined ? delayMs : Math.max(0, Date.now() - this.#scheduledAtMs);\n\t\tconst cache = this.#scheduledCache;\n\t\tconst iteration = this.#scheduledCacheWarmIteration;\n\t\tthis.#scheduledAtMs = undefined;\n\t\tthis.#scheduledCache = undefined;\n\t\tthis.#scheduledDelayMs = undefined;\n\t\tthis.#scheduledCacheWarmIteration = undefined;\n\t\tconst ctx = this.#ctx;\n\t\tconst goal = this.#goal;\n\t\tif (ctx === undefined || goal?.status !== \"active\" || !ctx.isIdle() || ctx.hasPendingMessages()) return;\n\t\tif (kind === \"monitor\" && this.#activeWakeSourceCount() === 0 && !drainFire) return;\n\t\tconst admission = await this.#admitAndQueue(\n\t\t\tctx,\n\t\t\tgoal,\n\t\t\tkind === \"monitor\" ? \"monitorDelayed\" : \"userGrace\",\n\t\t\tthis.#lastAgentEndMessages,\n\t\t);\n\t\tif (kind !== \"monitor\" || !admission.admitted || iteration === undefined) return;\n\t\tconst wakeSources = this.#wakeSourceSnapshot();\n\t\tthis.#pi.events?.emit(GOAL_CONTINUATION_RESUMED_EVENT, {\n\t\t\tgoalId: goal.id,\n\t\t\tdelayMs,\n\t\t\twaitedMs,\n\t\t\titeration,\n\t\t\tactiveMonitorCount: this.#activeWakeSourceCount(),\n\t\t\twakeSources,\n\t\t\tcache,\n\t\t});\n\t\tthis.#appendWarmupEntry({\n\t\t\tphase: \"resumed\",\n\t\t\tgoalId: goal.id,\n\t\t\tdelayMs,\n\t\t\twaitedMs,\n\t\t\titeration,\n\t\t\tactiveMonitorCount: this.#activeWakeSourceCount(),\n\t\t\twakeSources,\n\t\t\t...(cache !== undefined ? { cache } : {}),\n\t\t});\n\t\tif (drainFire || admission.goal.status !== \"active\") this.#resetCacheWarmIteration();\n\t}\n\n\tasync #admitAndQueue(\n\t\tctx: ExtensionContext,\n\t\tgoal: Goal,\n\t\tpath: GoalContinuationPath,\n\t\tmessages: readonly AgentMessage[],\n\t): Promise<GoalContinuationAdmission> {\n\t\tconst input = this.#buildVerdictInput(ctx, goal, path, messages);\n\t\tconst verdict = evaluateGoalContinuation({ goal, ...input });\n\t\tconst admittedGoal = await admitAndQueueGoalContinuation(this.#pi, ctx, goal, {\n\t\t\tinput,\n\t\t\tcontent: (continuationVerdict) => this.#buildContinuationContent(ctx, goal, continuationVerdict),\n\t\t\tmarkContinuationPending: this.#markContinuationPending,\n\t\t});\n\t\tif (admittedGoal === null) {\n\t\t\tthis.#goal = null;\n\t\t\tthis.#cancelTimer();\n\t\t\tthis.#resetToollessContinuationStreak();\n\t\t\treturn { goal, admitted: false };\n\t\t}\n\t\tif (verdict.kind === \"continue\" && input.lastStopReason === \"length\") {\n\t\t\tthis.#consecutiveLengthRecoveries.set(goal.id, input.consecutiveLengthRecoveries + 1);\n\t\t}\n\t\tthis.#goal = admittedGoal;\n\t\tif (admittedGoal.status !== \"active\") {\n\t\t\tthis.#cancelTimer();\n\t\t\tthis.#resetToollessContinuationStreak();\n\t\t}\n\t\treturn { goal: admittedGoal, admitted: verdict.kind === \"continue\" };\n\t}\n\n\t#appendWarmupEntry(data: LiveGoalCacheWarmupEntryData): void {\n\t\tthis.#pi.appendEntry?.<GoalCacheWarmupEntryData>(GOAL_CACHE_WARMUP_ENTRY_TYPE, data);\n\t}\n\n\t#buildVerdictInput(\n\t\tctx: ExtensionContext,\n\t\tgoal: Goal,\n\t\tpath: GoalContinuationPath,\n\t\tmessages: readonly AgentMessage[],\n\t): Omit<GoalContinuationInput, \"goal\"> {\n\t\tconst lastAssistant = lastAssistantMessage(messages);\n\t\treturn {\n\t\t\tisIdle: ctx.isIdle(),\n\t\t\thasPendingMessages: ctx.hasPendingMessages(),\n\t\t\tpath,\n\t\t\tlastStopReason: lastAssistant?.stopReason,\n\t\t\tconsecutiveContinuations: goal.consecutiveContinuations ?? 0,\n\t\t\tlastContinuationSignature: goal.lastContinuationSignature,\n\t\t\tcurrentSignature: buildCurrentGoalContinuationSignature(ctx, goal, lastAssistantText(messages)),\n\t\t\tconsecutiveLengthRecoveries: this.#consecutiveLengthRecoveries.get(goal.id) ?? 0,\n\t\t\trecentNormalizedOutputHashes: this.#recentNormalizedOutputHashes,\n\t\t\ttoollessContinuationStreak: this.#toollessContinuationStreak,\n\t\t\tcontinuationPending: this.#isContinuationPending(),\n\t\t};\n\t}\n\n\t#buildContinuationContent(ctx: ExtensionContext, goal: Goal, verdict: ContinuingGoalContinuationVerdict): string {\n\t\tlet content = verdict.prompt === \"minimal\" ? buildTruncationRecoveryPrompt() : buildContinuationPrompt(goal);\n\t\tif (!verdict.stallNotice) return content;\n\n\t\tconst liveSources = this.#liveWakeSources();\n\t\tthis.#pi.events?.emit(GOAL_MONITOR_STALL_EVENT, {\n\t\t\tgoalId: goal.id,\n\t\t\tconsecutiveContinuations: this.#toollessContinuationStreak,\n\t\t\ttoolless: true,\n\t\t});\n\t\tif (ctx.hasUI) {\n\t\t\tconst context =\n\t\t\t\tliveSources.length > 0 ? `while ${liveSources.join(\", \")} channels stayed active` : \"without tool use\";\n\t\t\tctx.ui.notify(\n\t\t\t\t`Goal continuation repeated ${this.#toollessContinuationStreak} toolless turns ${context} - injected a stall check.`,\n\t\t\t\t\"info\",\n\t\t\t);\n\t\t}\n\t\tcontent = `${buildGoalStallNotice(this.#toollessContinuationStreak, { liveSources })}\\n\\n${content}`;\n\t\treturn content;\n\t}\n\n\t/** A tool-using turn is forward progress, so it clears the repetition window instead of extending it. */\n\t#recordAssistantOutput(messages: readonly AgentMessage[], turnUsedTools: boolean): void {\n\t\tif (turnUsedTools) {\n\t\t\tthis.#recentNormalizedOutputHashes = [];\n\t\t\treturn;\n\t\t}\n\t\tconst text = lastAssistantText(messages);\n\t\tif (normalizeAssistantText(text).length === 0) return;\n\t\tthis.#recentNormalizedOutputHashes = [...this.#recentNormalizedOutputHashes, hashAssistantText(text)].slice(-3);\n\t}\n\n\t#recordToollessContinuationTurn(goal: Goal, turnUsedTools: boolean): void {\n\t\tif (goal.id !== this.#toollessStreakGoalId) {\n\t\t\tthis.#toollessStreakGoalId = goal.id;\n\t\t\tthis.#toollessContinuationStreak = 0;\n\t\t}\n\t\tif (this.#endedTurnWasUserInitiated) return;\n\t\tif (turnUsedTools) {\n\t\t\tthis.#toollessContinuationStreak = 0;\n\t\t\treturn;\n\t\t}\n\t\tthis.#toollessContinuationStreak += 1;\n\t}\n\n\t#resetLengthRecoveryAfterCleanStop(goal: Goal | null, messages: readonly AgentMessage[]): void {\n\t\tif (goal === null || lastAssistantMessage(messages)?.stopReason !== \"stop\") return;\n\t\tthis.#consecutiveLengthRecoveries.delete(goal.id);\n\t}\n\n\t#subscribeToChannelState(): void {\n\t\tconst events = this.#pi.events;\n\t\tif (events === undefined) return;\n\t\tthis.#channelStateUnsubscribers.push(\n\t\t\t...subscribeGoalChannelState(events, {\n\t\t\t\tonWakeSource: (source, activeCount) => this.#setWakeSourceCount(source, activeCount),\n\t\t\t\tonContinuationHold: (source, active) => {\n\t\t\t\t\tconst inputId = `external:${source}`;\n\t\t\t\t\tif (active) this.holdDirectInput(inputId);\n\t\t\t\t\telse this.resolveDirectInput(inputId, false);\n\t\t\t\t},\n\t\t\t}),\n\t\t);\n\t}\n\n\t#setWakeSourceCount(source: string, activeCount: number): void {\n\t\tconst previousTotal = this.#activeWakeSourceCount();\n\t\tthis.#wakeSources.set(source, activeCount);\n\t\tconst nextTotal = this.#activeWakeSourceCount();\n\t\tif (previousTotal > 0 && nextTotal === 0) {\n\t\t\tif (this.#scheduledContinuationKind === \"monitor\") this.#armDrainFire();\n\t\t\telse this.#resetCacheWarmIteration();\n\t\t\tthis.#resetToollessContinuationStreak();\n\t\t\treturn;\n\t\t}\n\t\tif (this.#scheduledContinuationKind === \"monitor\") {\n\t\t\tthis.#waitTicker?.setChannelCounts(this.#wakeSourceSnapshot());\n\t\t}\n\t}\n\n\t#armDrainFire(): void {\n\t\tif (this.#directInputHolds.size > 0) {\n\t\t\tthis.#heldTimer = {\n\t\t\t\tkind: \"monitor\",\n\t\t\t\tremainingMs: 1_000,\n\t\t\t\theldAtMs: Date.now(),\n\t\t\t\ttotalMs: 1_000,\n\t\t\t\tdrainFire: true,\n\t\t\t};\n\t\t\treturn;\n\t\t}\n\t\tif (this.#timer !== undefined) clearTimeout(this.#timer);\n\t\tthis.#timer = undefined;\n\t\tthis.#scheduledDueAtMs = undefined;\n\t\tthis.#waitTicker?.stop();\n\t\tthis.#armTimer(\"monitor\", 1_000, 1_000, true);\n\t}\n\n\t#activeWakeSourceCount(): number {\n\t\tlet total = 0;\n\t\tfor (const count of this.#wakeSources.values()) total += count;\n\t\treturn total;\n\t}\n\n\t#wakeSourceSnapshot(): ResumptionChannelCounts {\n\t\treturn Object.fromEntries([...this.#wakeSources.entries()].sort(([left], [right]) => left.localeCompare(right)));\n\t}\n\n\t#liveWakeSources(): string[] {\n\t\treturn [...this.#wakeSources.entries()]\n\t\t\t.filter(([, count]) => count > 0)\n\t\t\t.map(([source]) => source)\n\t\t\t.sort();\n\t}\n\n\t#resetContinuationState(): void {\n\t\tthis.#pendingSystemRecovery = undefined;\n\t\tthis.#pendingProviderRecovery = undefined;\n\t\tthis.#consecutiveLengthRecoveries.clear();\n\t\tthis.#recentNormalizedOutputHashes = [];\n\t\tthis.#resetToollessContinuationStreak();\n\t\tthis.#resetCacheWarmIteration();\n\t}\n\n\t#resetCacheWarmIteration(): void {\n\t\tthis.#cacheWarmIteration = 0;\n\t\tthis.#scheduledCacheWarmIteration = undefined;\n\t}\n\n\t#resetToollessContinuationStreak(): void {\n\t\tthis.#toollessContinuationStreak = 0;\n\t\tthis.#toollessStreakGoalId = null;\n\t}\n\n\t#cancelTimer(): void {\n\t\tconst kind = this.#scheduledContinuationKind;\n\t\tthis.#scheduledAtMs = undefined;\n\t\tthis.#scheduledDueAtMs = undefined;\n\t\tthis.#scheduledCache = undefined;\n\t\tthis.#scheduledDelayMs = undefined;\n\t\tthis.#scheduledCacheWarmIteration = undefined;\n\t\tthis.#heldTimer = undefined;\n\t\tif (this.#timer !== undefined) clearTimeout(this.#timer);\n\t\tthis.#timer = undefined;\n\t\tthis.#scheduledContinuationKind = undefined;\n\t\tif (kind !== undefined) this.#pi.events?.emit(GOAL_CONTINUATION_TIMER_STATE_EVENT, { armed: false, kind });\n\t\tthis.#waitTicker?.stop();\n\t}\n}\n"]}
1
+ {"version":3,"file":"monitor-continuation.js","sourceRoot":"","sources":["../../../../../src/core/extensions/builtin/goal/monitor-continuation.ts"],"names":[],"mappings":"AAEA,OAAO,EACN,+BAA+B,EAC/B,wBAAwB,EACxB,4BAA4B,EAC5B,2CAA2C,EAI3C,qCAAqC,GACrC,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,yBAAyB,EAAE,MAAM,kCAAkC,CAAC;AAE7E,OA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SAAS,CAAC;QAC1C,IAAI,CAAC,4BAA4B,CAAC,KAAK,EAAE,CAAC;QAC1C,IAAI,CAAC,6BAA6B,GAAG,EAAE,CAAC;QACxC,IAAI,CAAC,gCAAgC,EAAE,CAAC;QACxC,IAAI,CAAC,wBAAwB,EAAE,CAAC;IACjC,CAAC;IAED,wBAAwB;QACvB,IAAI,CAAC,mBAAmB,GAAG,CAAC,CAAC;QAC7B,IAAI,CAAC,4BAA4B,GAAG,SAAS,CAAC;IAC/C,CAAC;IAED,gCAAgC;QAC/B,IAAI,CAAC,2BAA2B,GAAG,CAAC,CAAC;QACrC,IAAI,CAAC,qBAAqB,GAAG,IAAI,CAAC;IACnC,CAAC;IAED,YAAY;QACX,MAAM,IAAI,GAAG,IAAI,CAAC,0BAA0B,CAAC;QAC7C,IAAI,CAAC,cAAc,GAAG,SAAS,CAAC;QAChC,IAAI,CAAC,iBAAiB,GAAG,SAAS,CAAC;QACnC,IAAI,CAAC,eAAe,GAAG,SAAS,CAAC;QACjC,IAAI,CAAC,iBAAiB,GAAG,SAAS,CAAC;QACnC,IAAI,CAAC,4BAA4B,GAAG,SAAS,CAAC;QAC9C,IAAI,CAAC,UAAU,GAAG,SAAS,CAAC;QAC5B,IAAI,IAAI,CAAC,MAAM,KAAK,SAAS;YAAE,YAAY,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;QACzD,IAAI,CAAC,MAAM,GAAG,SAAS,CAAC;QACxB,IAAI,CAAC,0BAA0B,GAAG,SAAS,CAAC;QAC5C,IAAI,IAAI,KAAK,SAAS;YAAE,IAAI,CAAC,GAAG,CAAC,MAAM,EAAE,IAAI,CAAC,mCAAmC,EAAE,EAAE,KAAK,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC;QAC3G,IAAI,CAAC,WAAW,EAAE,IAAI,EAAE,CAAC;IAC1B,CAAC;CACD","sourcesContent":["import type { AgentMessage } from \"@earendil-works/pi-agent-core\";\nimport type { ExtensionAPI, ExtensionContext } from \"../../types.ts\";\nimport {\n\tcreateGoalCacheWarmScheduleData,\n\testimateCacheWarmMetrics,\n\tGOAL_CACHE_WARMUP_ENTRY_TYPE,\n\tGOAL_MONITOR_CONTINUATION_FALLBACK_DELAY_MS,\n\ttype GoalCacheWarmMetrics,\n\ttype GoalCacheWarmupEntryData,\n\ttype LiveGoalCacheWarmupEntryData,\n\tresolveGoalMonitorContinuationDelayMs,\n} from \"./cache-warm.ts\";\nimport { subscribeGoalChannelState } from \"./channel-state-subscriptions.ts\";\n\nexport { GOAL_MONITOR_CONTINUATION_FALLBACK_DELAY_MS } from \"./cache-warm.ts\";\n\nimport {\n\tcontinuationTurnUsedTools,\n\tevaluateGoalContinuation,\n\tGOAL_USER_GRACE_DELAY_MS,\n\ttype GoalContinuationInput,\n\ttype GoalContinuationPath,\n\thasGoalContinuationProgress,\n\thashAssistantText,\n\tnormalizeAssistantText,\n} from \"./continuation.ts\";\nimport { lastAssistantMessage } from \"./last-assistant-message.ts\";\nimport {\n\tadmitAndQueueGoalContinuation,\n\tbuildCurrentGoalContinuationSignature,\n\tlastAssistantText,\n} from \"./lifecycle-helpers.ts\";\nimport type {\n\tAgentEndOptions,\n\tContinuingGoalContinuationVerdict,\n\tDelayedContinuationKind,\n\tGoalContinuationAdmission,\n\tProviderRecoveryOptions,\n\tResumptionChannelCounts,\n\tSystemAbortOptions,\n} from \"./monitor-continuation-types.ts\";\nimport { buildContinuationPrompt, buildGoalStallNotice, buildTruncationRecoveryPrompt } from \"./prompt.ts\";\nimport { isStaleExtensionContextError } from \"./stale-context.ts\";\nimport { resetContinuationStreak } from \"./store.ts\";\nimport { goalStoreRef } from \"./store-ref.ts\";\nimport { collectAssistantUsage } from \"./turn-usage.ts\";\nimport type { Goal, TokenUsageSnapshot } from \"./types.ts\";\nimport type { GoalWaitTicker } from \"./wait-ticker.ts\";\n\nexport const GOAL_CONTINUATION_SCHEDULED_EVENT = \"goal_continuation_scheduled\";\nexport const GOAL_CONTINUATION_RESUMED_EVENT = \"goal_continuation_resumed\";\nexport const GOAL_CONTINUATION_TIMER_STATE_EVENT = \"goal_continuation_timer_state\";\nexport const GOAL_MONITOR_STALL_EVENT = \"goal_monitor_continuation_stall\";\n\nexport class MonitorAwareGoalContinuation {\n\treadonly #pi: ExtensionAPI;\n\treadonly #isContinuationPending: () => boolean;\n\treadonly #markContinuationPending: () => void;\n\treadonly #waitTicker: GoalWaitTicker | undefined;\n\t#wakeSources = new Map<string, number>();\n\t#hasStarted = false;\n\t#ctx: ExtensionContext | undefined;\n\t#goal: Goal | null = null;\n\t#timer: ReturnType<typeof setTimeout> | undefined;\n\t#scheduledContinuationKind: DelayedContinuationKind | undefined;\n\t#channelStateUnsubscribers: Array<() => void> = [];\n\t#lastAgentEndMessages: readonly AgentMessage[] = [];\n\t#consecutiveLengthRecoveries = new Map<string, number>();\n\t#recentNormalizedOutputHashes: string[] = [];\n\t#toollessContinuationStreak = 0;\n\t#toollessStreakGoalId: string | null = null;\n\t#endedTurnWasUserInitiated = false;\n\t#lastTurnUsage: TokenUsageSnapshot | undefined;\n\t#scheduledAtMs: number | undefined;\n\t#scheduledDueAtMs: number | undefined;\n\t#scheduledCache: GoalCacheWarmMetrics | undefined;\n\t#scheduledDelayMs: number | undefined;\n\t#cacheWarmIteration = 0;\n\t#scheduledCacheWarmIteration: number | undefined;\n\t#heldTimer:\n\t\t| { kind: DelayedContinuationKind; remainingMs: number; heldAtMs: number; totalMs: number; drainFire: boolean }\n\t\t| undefined;\n\t#directInputHolds = new Set<string>();\n\t#pendingSystemRecovery: SystemAbortOptions | undefined;\n\t#pendingProviderRecovery: ProviderRecoveryOptions | undefined;\n\n\tconstructor(\n\t\tpi: ExtensionAPI,\n\t\tisContinuationPending: () => boolean = () => false,\n\t\tmarkContinuationPending: () => void = () => {},\n\t\twaitTicker?: GoalWaitTicker,\n\t) {\n\t\tthis.#pi = pi;\n\t\tthis.#isContinuationPending = isContinuationPending;\n\t\tthis.#markContinuationPending = markContinuationPending;\n\t\tthis.#waitTicker = waitTicker;\n\t\tthis.#subscribeToChannelState();\n\t}\n\n\tstart(ctx: ExtensionContext): void {\n\t\tthis.#cancelTimer();\n\t\tthis.#ctx = ctx;\n\t\tif (this.#hasStarted) this.#wakeSources.clear();\n\t\telse this.#hasStarted = true;\n\t\tthis.#goal = null;\n\t\tthis.#lastAgentEndMessages = [];\n\t\tthis.#directInputHolds.clear();\n\t\tthis.#resetContinuationState();\n\t}\n\n\tasync afterAgentEnd(options: AgentEndOptions): Promise<Goal | null> {\n\t\tif (options.goal?.id !== this.#goal?.id) this.#resetContinuationState();\n\t\tthis.#ctx = options.ctx;\n\t\tthis.#goal = options.goal;\n\t\tthis.#lastAgentEndMessages = options.messages;\n\t\tthis.#lastTurnUsage = collectAssistantUsage([...options.messages]);\n\t\tthis.#resetLengthRecoveryAfterCleanStop(options.goal, options.messages);\n\t\tconst turnUsedTools = continuationTurnUsedTools(options.messages);\n\t\tthis.#recordAssistantOutput(options.messages, turnUsedTools);\n\t\tif (options.goal?.status !== \"active\") {\n\t\t\tthis.#cancelTimer();\n\t\t\tthis.#resetContinuationState();\n\t\t\treturn options.goal;\n\t\t}\n\t\tthis.#recordToollessContinuationTurn(options.goal, turnUsedTools);\n\t\tconst immediateInput = this.#buildVerdictInput(options.ctx, options.goal, \"immediate\", options.messages);\n\t\tconst goal =\n\t\t\t!this.#endedTurnWasUserInitiated && (turnUsedTools || hasGoalContinuationProgress(immediateInput))\n\t\t\t\t? ((await resetContinuationStreak(goalStoreRef(options.ctx.sessionManager, options.ctx.cwd))) ??\n\t\t\t\t\toptions.goal)\n\t\t\t\t: options.goal;\n\t\tthis.#goal = goal;\n\t\tconst immediateVerdict = evaluateGoalContinuation({\n\t\t\tgoal,\n\t\t\t...this.#buildVerdictInput(options.ctx, goal, \"immediate\", options.messages),\n\t\t});\n\t\tif (this.#endedTurnWasUserInitiated) {\n\t\t\tthis.#endedTurnWasUserInitiated = false;\n\t\t\tthis.#cancelTimer();\n\t\t\tif (immediateVerdict.kind === \"continue\") {\n\t\t\t\tthis.#schedule(goal, \"userGrace\");\n\t\t\t\treturn goal;\n\t\t\t}\n\t\t\tswitch (immediateVerdict.reason) {\n\t\t\t\tcase \"not-eligible\":\n\t\t\t\tcase \"single-flight\":\n\t\t\t\tcase \"stale\":\n\t\t\t\t\treturn goal;\n\t\t\t\tcase \"cap\":\n\t\t\t\tcase \"repetition\":\n\t\t\t\tcase \"length-exhausted\": {\n\t\t\t\t\tconst admission = await this.#admitAndQueue(options.ctx, goal, \"immediate\", options.messages);\n\t\t\t\t\treturn admission.goal;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (immediateVerdict.kind === \"deny\" && immediateVerdict.reason === \"not-eligible\") return goal;\n\n\t\tif (this.#activeWakeSourceCount() === 0) {\n\t\t\tthis.#cancelTimer();\n\t\t\tconst admission = await this.#admitAndQueue(options.ctx, goal, \"immediate\", options.messages);\n\t\t\treturn admission.goal;\n\t\t}\n\t\tthis.#schedule(goal, \"monitor\");\n\t\treturn goal;\n\t}\n\n\tasync afterSystemAbort(options: SystemAbortOptions): Promise<Goal | null> {\n\t\tthis.noteContinuationStarted();\n\t\tif (options.goal?.id !== this.#goal?.id) this.#resetContinuationState();\n\t\tthis.#pendingSystemRecovery = undefined;\n\t\tthis.#ctx = options.ctx;\n\t\tthis.#goal = options.goal;\n\t\tthis.#lastAgentEndMessages = options.messages;\n\t\tthis.#lastTurnUsage = collectAssistantUsage([...options.messages]);\n\t\tif (options.goal?.status !== \"active\") {\n\t\t\tthis.#resetContinuationState();\n\t\t\treturn options.goal;\n\t\t}\n\t\tif (options.willRetry) return options.goal;\n\t\tif (this.#activeWakeSourceCount() > 0) this.#schedule(options.goal, \"monitor\");\n\t\telse if (lastAssistantMessage(options.messages)?.stopReason === \"error\") {\n\t\t\tthis.#pendingSystemRecovery = options;\n\t\t}\n\t\treturn options.goal;\n\t}\n\n\tasync afterProviderFailure(options: ProviderRecoveryOptions): Promise<Goal | null> {\n\t\tthis.noteContinuationStarted();\n\t\tif (options.goal?.id !== this.#goal?.id) this.#resetContinuationState();\n\t\tthis.#pendingProviderRecovery = undefined;\n\t\tthis.#ctx = options.ctx;\n\t\tthis.#goal = options.goal;\n\t\tthis.#lastAgentEndMessages = options.messages;\n\t\tthis.#lastTurnUsage = collectAssistantUsage([...options.messages]);\n\t\tif (options.goal?.status !== \"active\") {\n\t\t\tthis.#resetContinuationState();\n\t\t\treturn options.goal;\n\t\t}\n\t\tif (!options.willRetry) this.#pendingProviderRecovery = options;\n\t\treturn options.goal;\n\t}\n\n\tasync afterAgentSettled(): Promise<Goal | null | undefined> {\n\t\tconst pendingSystem = this.#pendingSystemRecovery;\n\t\tconst pendingProvider = this.#pendingProviderRecovery;\n\t\tthis.#pendingSystemRecovery = undefined;\n\t\tthis.#pendingProviderRecovery = undefined;\n\t\tif (pendingSystem !== undefined && pendingSystem.goal !== null && pendingSystem.event.abortSource !== \"user\") {\n\t\t\treturn (\n\t\t\t\tawait this.#admitAndQueue(pendingSystem.ctx, pendingSystem.goal, \"systemRecovery\", pendingSystem.messages)\n\t\t\t).goal;\n\t\t}\n\t\tif (\n\t\t\tpendingProvider === undefined ||\n\t\t\tpendingProvider.goal === null ||\n\t\t\tpendingProvider.event.abortSource === \"user\"\n\t\t) {\n\t\t\treturn undefined;\n\t\t}\n\t\treturn (\n\t\t\tawait this.#admitAndQueue(\n\t\t\t\tpendingProvider.ctx,\n\t\t\t\tpendingProvider.goal,\n\t\t\t\t\"providerRecovery\",\n\t\t\t\tpendingProvider.messages,\n\t\t\t)\n\t\t).goal;\n\t}\n\n\tsyncGoal(goal: Goal | null): void {\n\t\tif (goal?.id !== this.#goal?.id) this.#resetContinuationState();\n\t\tthis.#goal = goal;\n\t\tif (goal?.status !== \"active\") {\n\t\t\tthis.#cancelTimer();\n\t\t\tthis.#resetContinuationState();\n\t\t}\n\t}\n\n\t/** Live resumption channels known to this generation (e.g. terminal snapshots replayed on reload). */\n\thasActiveWakeSources(): boolean {\n\t\treturn this.#activeWakeSourceCount() > 0;\n\t}\n\n\t/**\n\t * Re-arms the monitor-delayed backstop a reload tore down with the retired\n\t * generation, so a later wake-source drain can still deliver the goal\n\t * continuation. No-op unless the goal is active, a wake source is live, and\n\t * no continuation is already scheduled.\n\t */\n\trearmMonitorBackstop(goal: Goal): void {\n\t\tif (goal.status !== \"active\" || this.#activeWakeSourceCount() === 0) return;\n\t\tthis.#goal = goal;\n\t\tthis.#schedule(goal, \"monitor\");\n\t}\n\n\t/** Temporarily prevents a scheduled continuation from racing unresolved direct-input admission. */\n\tholdDirectInput(inputId: string): void {\n\t\tif (this.#directInputHolds.has(inputId)) return;\n\t\tthis.#directInputHolds.add(inputId);\n\t\tif (\n\t\t\tthis.#directInputHolds.size !== 1 ||\n\t\t\tthis.#timer === undefined ||\n\t\t\tthis.#scheduledContinuationKind === undefined\n\t\t) {\n\t\t\treturn;\n\t\t}\n\t\tconst heldAtMs = Date.now();\n\t\tthis.#heldTimer = {\n\t\t\tkind: this.#scheduledContinuationKind,\n\t\t\tremainingMs: Math.max(0, (this.#scheduledDueAtMs ?? heldAtMs) - heldAtMs),\n\t\t\theldAtMs,\n\t\t\ttotalMs: this.#scheduledDelayMs ?? GOAL_USER_GRACE_DELAY_MS,\n\t\t\tdrainFire: false,\n\t\t};\n\t\tclearTimeout(this.#timer);\n\t\tthis.#timer = undefined;\n\t\tthis.#scheduledDueAtMs = undefined;\n\t\tthis.#waitTicker?.stop();\n\t}\n\n\t/** Resolves one admission hold without allowing overlapping inputs to consume each other. */\n\tresolveDirectInput(inputId: string, accepted: boolean): void {\n\t\tif (!this.#directInputHolds.delete(inputId)) return;\n\t\tif (accepted) {\n\t\t\tthis.#heldTimer = undefined;\n\t\t\tthis.noteUserPrompt();\n\t\t\treturn;\n\t\t}\n\t\tif (this.#directInputHolds.size > 0 || this.#heldTimer === undefined) return;\n\t\tconst held = this.#heldTimer;\n\t\tthis.#heldTimer = undefined;\n\t\tconst elapsedWhileHeldMs = Math.max(0, Date.now() - held.heldAtMs);\n\t\tthis.#armTimer(held.kind, Math.max(0, held.remainingMs - elapsedWhileHeldMs), held.totalMs, held.drainFire);\n\t}\n\n\t/** An accepted real user prompt starts a grace-governed user turn. */\n\tnoteUserPrompt(): void {\n\t\tthis.#cancelTimer();\n\t\tthis.#pendingProviderRecovery = undefined;\n\t\tthis.#endedTurnWasUserInitiated = true;\n\t\tthis.#resetContinuationState();\n\t}\n\n\t/** A hidden continuation or system recovery has started, so the next end is not user-initiated. */\n\tnoteContinuationStarted(): void {\n\t\tthis.#endedTurnWasUserInitiated = false;\n\t}\n\n\tdispose(): void {\n\t\tthis.#cancelTimer();\n\t\tfor (const unsubscribe of this.#channelStateUnsubscribers) unsubscribe();\n\t\tthis.#channelStateUnsubscribers = [];\n\t\tthis.#ctx = undefined;\n\t\tthis.#goal = null;\n\t\tthis.#wakeSources.clear();\n\t\tthis.#lastAgentEndMessages = [];\n\t\tthis.#directInputHolds.clear();\n\t\tthis.#resetContinuationState();\n\t}\n\n\t#schedule(goal: Goal, kind: DelayedContinuationKind): void {\n\t\tif (this.#scheduledContinuationKind !== undefined) return;\n\t\tconst delayMs =\n\t\t\tkind === \"monitor\"\n\t\t\t\t? resolveGoalMonitorContinuationDelayMs(\n\t\t\t\t\t\tthis.#ctx?.getPromptCacheSafeWaitSeconds?.(),\n\t\t\t\t\t\tthis.#ctx?.getPromptCacheGoalBackstopMaxSeconds?.(),\n\t\t\t\t\t)\n\t\t\t\t: GOAL_USER_GRACE_DELAY_MS;\n\t\tthis.#scheduledDelayMs = delayMs;\n\t\tif (kind === \"monitor\") {\n\t\t\tthis.#cacheWarmIteration += 1;\n\t\t\tthis.#scheduledCacheWarmIteration = this.#cacheWarmIteration;\n\t\t\tconst iteration = this.#scheduledCacheWarmIteration;\n\t\t\tconst cache = estimateCacheWarmMetrics(this.#ctx?.model, process.env, this.#lastTurnUsage);\n\t\t\tconst wakeSources = this.#wakeSourceSnapshot();\n\t\t\tthis.#scheduledCache = cache;\n\t\t\tthis.#scheduledAtMs = Date.now();\n\t\t\tconst scheduleData = createGoalCacheWarmScheduleData({\n\t\t\t\tgoalId: goal.id,\n\t\t\t\tdelayMs,\n\t\t\t\tscheduledAtMs: this.#scheduledAtMs,\n\t\t\t\titeration,\n\t\t\t\tactiveMonitorCount: this.#activeWakeSourceCount(),\n\t\t\t\twakeSources,\n\t\t\t\t...(cache !== undefined ? { cache } : {}),\n\t\t\t});\n\t\t\tthis.#pi.events?.emit(GOAL_CONTINUATION_SCHEDULED_EVENT, scheduleData);\n\t\t\tthis.#appendWarmupEntry({\n\t\t\t\tphase: \"scheduled\",\n\t\t\t\t...scheduleData,\n\t\t\t});\n\t\t} else {\n\t\t\tthis.#scheduledAtMs = undefined;\n\t\t\tthis.#scheduledCache = undefined;\n\t\t\tthis.#scheduledCacheWarmIteration = undefined;\n\t\t}\n\t\tthis.#scheduledContinuationKind = kind;\n\t\tthis.#pi.events?.emit(GOAL_CONTINUATION_TIMER_STATE_EVENT, { armed: true, kind });\n\t\tif (this.#directInputHolds.size > 0) {\n\t\t\tthis.#heldTimer = { kind, remainingMs: delayMs, heldAtMs: Date.now(), totalMs: delayMs, drainFire: false };\n\t\t\treturn;\n\t\t}\n\t\tthis.#armTimer(kind, delayMs, delayMs);\n\t}\n\n\t/**\n\t * `hasUI` is an `assertActive()`-guarded getter, so a ctx retired by session\n\t * replacement or reload THROWS instead of reporting false. Optional chaining\n\t * only guards an undefined ctx (what `dispose()` leaves behind), never a stale\n\t * object left by a replacement that never disposed this monitor. Callers reach\n\t * this from timer and event callbacks where a throw is fatal, so a retired ctx\n\t * reports \"no UI\" and any other failure keeps its current behavior.\n\t */\n\t#ctxHasUI(ctx: ExtensionContext | undefined = this.#ctx): boolean {\n\t\ttry {\n\t\t\treturn ctx?.hasUI === true;\n\t\t} catch (error) {\n\t\t\tif (isStaleExtensionContextError(error)) return false;\n\t\t\tthrow error;\n\t\t}\n\t}\n\n\t#armTimer(kind: DelayedContinuationKind, delayMs: number, totalMs: number, drainFire = false): void {\n\t\tthis.#scheduledDueAtMs = Date.now() + delayMs;\n\t\tconst ctx = this.#ctx;\n\t\tif (ctx !== undefined && this.#ctxHasUI(ctx)) {\n\t\t\tthis.#waitTicker?.sync(ctx, {\n\t\t\t\tkind,\n\t\t\t\tremainingMs: delayMs,\n\t\t\t\ttotalMs,\n\t\t\t\tchannelCounts: this.#wakeSourceSnapshot(),\n\t\t\t});\n\t\t}\n\t\tthis.#timer = setTimeout(() => {\n\t\t\tvoid this.#continueIfEligible(kind, drainFire).catch((error: unknown) => {\n\t\t\t\t// Runs from a bare setTimeout: anything thrown here escapes as an\n\t\t\t\t// uncaughtException and kills the session. A retired ctx cannot be\n\t\t\t\t// notified, and its own staleness is the expected cause of this\n\t\t\t\t// rejection after a session replacement, so drop it quietly.\n\t\t\t\tif (isStaleExtensionContextError(error) || !this.#ctxHasUI()) return;\n\t\t\t\tconst message = error instanceof Error ? error.message : String(error);\n\t\t\t\tthis.#ctx?.ui.notify(`Goal continuation delivery failed: ${message}`, \"error\");\n\t\t\t});\n\t\t}, delayMs);\n\t}\n\n\tasync #continueIfEligible(kind: DelayedContinuationKind, drainFire = false): Promise<void> {\n\t\tthis.#timer = undefined;\n\t\tthis.#scheduledDueAtMs = undefined;\n\t\tthis.#scheduledContinuationKind = undefined;\n\t\tthis.#pi.events?.emit(GOAL_CONTINUATION_TIMER_STATE_EVENT, { armed: false, kind });\n\t\tthis.#waitTicker?.stop();\n\t\tconst delayMs =\n\t\t\tthis.#scheduledDelayMs ??\n\t\t\t(kind === \"monitor\" ? GOAL_MONITOR_CONTINUATION_FALLBACK_DELAY_MS : GOAL_USER_GRACE_DELAY_MS);\n\t\tconst waitedMs = this.#scheduledAtMs === undefined ? delayMs : Math.max(0, Date.now() - this.#scheduledAtMs);\n\t\tconst cache = this.#scheduledCache;\n\t\tconst iteration = this.#scheduledCacheWarmIteration;\n\t\tthis.#scheduledAtMs = undefined;\n\t\tthis.#scheduledCache = undefined;\n\t\tthis.#scheduledDelayMs = undefined;\n\t\tthis.#scheduledCacheWarmIteration = undefined;\n\t\tconst ctx = this.#ctx;\n\t\tconst goal = this.#goal;\n\t\tif (ctx === undefined || goal?.status !== \"active\" || !ctx.isIdle() || ctx.hasPendingMessages()) return;\n\t\tif (kind === \"monitor\" && this.#activeWakeSourceCount() === 0 && !drainFire) return;\n\t\tconst admission = await this.#admitAndQueue(\n\t\t\tctx,\n\t\t\tgoal,\n\t\t\tkind === \"monitor\" ? \"monitorDelayed\" : \"userGrace\",\n\t\t\tthis.#lastAgentEndMessages,\n\t\t);\n\t\tif (kind !== \"monitor\" || !admission.admitted || iteration === undefined) return;\n\t\tconst wakeSources = this.#wakeSourceSnapshot();\n\t\tthis.#pi.events?.emit(GOAL_CONTINUATION_RESUMED_EVENT, {\n\t\t\tgoalId: goal.id,\n\t\t\tdelayMs,\n\t\t\twaitedMs,\n\t\t\titeration,\n\t\t\tactiveMonitorCount: this.#activeWakeSourceCount(),\n\t\t\twakeSources,\n\t\t\tcache,\n\t\t});\n\t\tthis.#appendWarmupEntry({\n\t\t\tphase: \"resumed\",\n\t\t\tgoalId: goal.id,\n\t\t\tdelayMs,\n\t\t\twaitedMs,\n\t\t\titeration,\n\t\t\tactiveMonitorCount: this.#activeWakeSourceCount(),\n\t\t\twakeSources,\n\t\t\t...(cache !== undefined ? { cache } : {}),\n\t\t});\n\t\tif (drainFire || admission.goal.status !== \"active\") this.#resetCacheWarmIteration();\n\t}\n\n\tasync #admitAndQueue(\n\t\tctx: ExtensionContext,\n\t\tgoal: Goal,\n\t\tpath: GoalContinuationPath,\n\t\tmessages: readonly AgentMessage[],\n\t): Promise<GoalContinuationAdmission> {\n\t\tconst input = this.#buildVerdictInput(ctx, goal, path, messages);\n\t\tconst verdict = evaluateGoalContinuation({ goal, ...input });\n\t\tconst admittedGoal = await admitAndQueueGoalContinuation(this.#pi, ctx, goal, {\n\t\t\tinput,\n\t\t\tcontent: (continuationVerdict) => this.#buildContinuationContent(ctx, goal, continuationVerdict),\n\t\t\tmarkContinuationPending: this.#markContinuationPending,\n\t\t});\n\t\tif (admittedGoal === null) {\n\t\t\tthis.#goal = null;\n\t\t\tthis.#cancelTimer();\n\t\t\tthis.#resetToollessContinuationStreak();\n\t\t\treturn { goal, admitted: false };\n\t\t}\n\t\tif (verdict.kind === \"continue\" && input.lastStopReason === \"length\") {\n\t\t\tthis.#consecutiveLengthRecoveries.set(goal.id, input.consecutiveLengthRecoveries + 1);\n\t\t}\n\t\tthis.#goal = admittedGoal;\n\t\tif (admittedGoal.status !== \"active\") {\n\t\t\tthis.#cancelTimer();\n\t\t\tthis.#resetToollessContinuationStreak();\n\t\t}\n\t\treturn { goal: admittedGoal, admitted: verdict.kind === \"continue\" };\n\t}\n\n\t#appendWarmupEntry(data: LiveGoalCacheWarmupEntryData): void {\n\t\tthis.#pi.appendEntry?.<GoalCacheWarmupEntryData>(GOAL_CACHE_WARMUP_ENTRY_TYPE, data);\n\t}\n\n\t#buildVerdictInput(\n\t\tctx: ExtensionContext,\n\t\tgoal: Goal,\n\t\tpath: GoalContinuationPath,\n\t\tmessages: readonly AgentMessage[],\n\t): Omit<GoalContinuationInput, \"goal\"> {\n\t\tconst lastAssistant = lastAssistantMessage(messages);\n\t\treturn {\n\t\t\tisIdle: ctx.isIdle(),\n\t\t\thasPendingMessages: ctx.hasPendingMessages(),\n\t\t\tpath,\n\t\t\tlastStopReason: lastAssistant?.stopReason,\n\t\t\tconsecutiveContinuations: goal.consecutiveContinuations ?? 0,\n\t\t\tlastContinuationSignature: goal.lastContinuationSignature,\n\t\t\tcurrentSignature: buildCurrentGoalContinuationSignature(ctx, goal, lastAssistantText(messages)),\n\t\t\tconsecutiveLengthRecoveries: this.#consecutiveLengthRecoveries.get(goal.id) ?? 0,\n\t\t\trecentNormalizedOutputHashes: this.#recentNormalizedOutputHashes,\n\t\t\ttoollessContinuationStreak: this.#toollessContinuationStreak,\n\t\t\tcontinuationPending: this.#isContinuationPending(),\n\t\t};\n\t}\n\n\t#buildContinuationContent(ctx: ExtensionContext, goal: Goal, verdict: ContinuingGoalContinuationVerdict): string {\n\t\tlet content = verdict.prompt === \"minimal\" ? buildTruncationRecoveryPrompt() : buildContinuationPrompt(goal);\n\t\tif (!verdict.stallNotice) return content;\n\n\t\tconst liveSources = this.#liveWakeSources();\n\t\tthis.#pi.events?.emit(GOAL_MONITOR_STALL_EVENT, {\n\t\t\tgoalId: goal.id,\n\t\t\tconsecutiveContinuations: this.#toollessContinuationStreak,\n\t\t\ttoolless: true,\n\t\t});\n\t\tif (this.#ctxHasUI(ctx)) {\n\t\t\tconst context =\n\t\t\t\tliveSources.length > 0 ? `while ${liveSources.join(\", \")} channels stayed active` : \"without tool use\";\n\t\t\tctx.ui.notify(\n\t\t\t\t`Goal continuation repeated ${this.#toollessContinuationStreak} toolless turns ${context} - injected a stall check.`,\n\t\t\t\t\"info\",\n\t\t\t);\n\t\t}\n\t\tcontent = `${buildGoalStallNotice(this.#toollessContinuationStreak, { liveSources })}\\n\\n${content}`;\n\t\treturn content;\n\t}\n\n\t/** A tool-using turn is forward progress, so it clears the repetition window instead of extending it. */\n\t#recordAssistantOutput(messages: readonly AgentMessage[], turnUsedTools: boolean): void {\n\t\tif (turnUsedTools) {\n\t\t\tthis.#recentNormalizedOutputHashes = [];\n\t\t\treturn;\n\t\t}\n\t\tconst text = lastAssistantText(messages);\n\t\tif (normalizeAssistantText(text).length === 0) return;\n\t\tthis.#recentNormalizedOutputHashes = [...this.#recentNormalizedOutputHashes, hashAssistantText(text)].slice(-3);\n\t}\n\n\t#recordToollessContinuationTurn(goal: Goal, turnUsedTools: boolean): void {\n\t\tif (goal.id !== this.#toollessStreakGoalId) {\n\t\t\tthis.#toollessStreakGoalId = goal.id;\n\t\t\tthis.#toollessContinuationStreak = 0;\n\t\t}\n\t\tif (this.#endedTurnWasUserInitiated) return;\n\t\tif (turnUsedTools) {\n\t\t\tthis.#toollessContinuationStreak = 0;\n\t\t\treturn;\n\t\t}\n\t\tthis.#toollessContinuationStreak += 1;\n\t}\n\n\t#resetLengthRecoveryAfterCleanStop(goal: Goal | null, messages: readonly AgentMessage[]): void {\n\t\tif (goal === null || lastAssistantMessage(messages)?.stopReason !== \"stop\") return;\n\t\tthis.#consecutiveLengthRecoveries.delete(goal.id);\n\t}\n\n\t#subscribeToChannelState(): void {\n\t\tconst events = this.#pi.events;\n\t\tif (events === undefined) return;\n\t\tthis.#channelStateUnsubscribers.push(\n\t\t\t...subscribeGoalChannelState(events, {\n\t\t\t\tonWakeSource: (source, activeCount) => this.#setWakeSourceCount(source, activeCount),\n\t\t\t\tonContinuationHold: (source, active) => {\n\t\t\t\t\tconst inputId = `external:${source}`;\n\t\t\t\t\tif (active) this.holdDirectInput(inputId);\n\t\t\t\t\telse this.resolveDirectInput(inputId, false);\n\t\t\t\t},\n\t\t\t}),\n\t\t);\n\t}\n\n\t#setWakeSourceCount(source: string, activeCount: number): void {\n\t\tconst previousTotal = this.#activeWakeSourceCount();\n\t\tthis.#wakeSources.set(source, activeCount);\n\t\tconst nextTotal = this.#activeWakeSourceCount();\n\t\tif (previousTotal > 0 && nextTotal === 0) {\n\t\t\tif (this.#scheduledContinuationKind === \"monitor\") this.#armDrainFire();\n\t\t\telse this.#resetCacheWarmIteration();\n\t\t\tthis.#resetToollessContinuationStreak();\n\t\t\treturn;\n\t\t}\n\t\tif (this.#scheduledContinuationKind === \"monitor\") {\n\t\t\tthis.#waitTicker?.setChannelCounts(this.#wakeSourceSnapshot());\n\t\t}\n\t}\n\n\t#armDrainFire(): void {\n\t\tif (this.#directInputHolds.size > 0) {\n\t\t\tthis.#heldTimer = {\n\t\t\t\tkind: \"monitor\",\n\t\t\t\tremainingMs: 1_000,\n\t\t\t\theldAtMs: Date.now(),\n\t\t\t\ttotalMs: 1_000,\n\t\t\t\tdrainFire: true,\n\t\t\t};\n\t\t\treturn;\n\t\t}\n\t\tif (this.#timer !== undefined) clearTimeout(this.#timer);\n\t\tthis.#timer = undefined;\n\t\tthis.#scheduledDueAtMs = undefined;\n\t\tthis.#waitTicker?.stop();\n\t\tthis.#armTimer(\"monitor\", 1_000, 1_000, true);\n\t}\n\n\t#activeWakeSourceCount(): number {\n\t\tlet total = 0;\n\t\tfor (const count of this.#wakeSources.values()) total += count;\n\t\treturn total;\n\t}\n\n\t#wakeSourceSnapshot(): ResumptionChannelCounts {\n\t\treturn Object.fromEntries([...this.#wakeSources.entries()].sort(([left], [right]) => left.localeCompare(right)));\n\t}\n\n\t#liveWakeSources(): string[] {\n\t\treturn [...this.#wakeSources.entries()]\n\t\t\t.filter(([, count]) => count > 0)\n\t\t\t.map(([source]) => source)\n\t\t\t.sort();\n\t}\n\n\t#resetContinuationState(): void {\n\t\tthis.#pendingSystemRecovery = undefined;\n\t\tthis.#pendingProviderRecovery = undefined;\n\t\tthis.#consecutiveLengthRecoveries.clear();\n\t\tthis.#recentNormalizedOutputHashes = [];\n\t\tthis.#resetToollessContinuationStreak();\n\t\tthis.#resetCacheWarmIteration();\n\t}\n\n\t#resetCacheWarmIteration(): void {\n\t\tthis.#cacheWarmIteration = 0;\n\t\tthis.#scheduledCacheWarmIteration = undefined;\n\t}\n\n\t#resetToollessContinuationStreak(): void {\n\t\tthis.#toollessContinuationStreak = 0;\n\t\tthis.#toollessStreakGoalId = null;\n\t}\n\n\t#cancelTimer(): void {\n\t\tconst kind = this.#scheduledContinuationKind;\n\t\tthis.#scheduledAtMs = undefined;\n\t\tthis.#scheduledDueAtMs = undefined;\n\t\tthis.#scheduledCache = undefined;\n\t\tthis.#scheduledDelayMs = undefined;\n\t\tthis.#scheduledCacheWarmIteration = undefined;\n\t\tthis.#heldTimer = undefined;\n\t\tif (this.#timer !== undefined) clearTimeout(this.#timer);\n\t\tthis.#timer = undefined;\n\t\tthis.#scheduledContinuationKind = undefined;\n\t\tif (kind !== undefined) this.#pi.events?.emit(GOAL_CONTINUATION_TIMER_STATE_EVENT, { armed: false, kind });\n\t\tthis.#waitTicker?.stop();\n\t}\n}\n"]}
@@ -1,2 +1,12 @@
1
1
  export declare function appendHiddenTuiStdout(text: string): void;
2
+ /**
3
+ * Record a fatal uncaught crash in the brand debug log.
4
+ *
5
+ * The interactive crash handler restores the real stderr and prints its banner to
6
+ * the terminal, so without this the only record of a crash is terminal scrollback —
7
+ * useless once the terminal is closed, and doubly so when the crash is itself an
8
+ * stderr/terminal failure. Callers must invoke this BEFORE the terminal handoff and
9
+ * must swallow any failure: writing telemetry may never alter the crash path.
10
+ */
11
+ export declare function appendUncaughtCrashLog(origin: string, error: unknown): void;
2
12
  //# sourceMappingURL=hidden-stdout-log.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"hidden-stdout-log.d.ts","sourceRoot":"","sources":["../../src/core/hidden-stdout-log.ts"],"names":[],"mappings":"AAKA,wBAAgB,qBAAqB,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,CAWxD"}
1
+ {"version":3,"file":"hidden-stdout-log.d.ts","sourceRoot":"","sources":["../../src/core/hidden-stdout-log.ts"],"names":[],"mappings":"AAgBA,wBAAgB,qBAAqB,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,CAKxD;AAED;;;;;;;;GAQG;AACH,wBAAgB,sBAAsB,CAAC,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,GAAG,IAAI,CAE3E"}
@@ -1,17 +1,48 @@
1
1
  import * as fs from "node:fs";
2
2
  import * as path from "node:path";
3
+ import { inspect } from "node:util";
3
4
  import { getDebugLogPath } from "../config.js";
4
5
  import { redactSensitiveOutput } from "./sensitive-output.js";
5
- export function appendHiddenTuiStdout(text) {
6
- if (text.length === 0) {
7
- return;
8
- }
6
+ function appendDebugLogEntry(header, text) {
9
7
  const debugLogPath = getDebugLogPath();
10
- const prefix = `[${new Date().toISOString()}] hidden stdout while TUI active\n`;
8
+ const prefix = `[${new Date().toISOString()}] ${header}\n`;
11
9
  const redactedText = redactSensitiveOutput(text);
12
10
  const suffix = redactedText.endsWith("\n") ? "" : "\n";
13
11
  fs.mkdirSync(path.dirname(debugLogPath), { recursive: true });
14
12
  fs.appendFileSync(debugLogPath, `${prefix}${redactedText}${suffix}`, { mode: 0o600 });
15
13
  fs.chmodSync(debugLogPath, 0o600);
16
14
  }
15
+ export function appendHiddenTuiStdout(text) {
16
+ if (text.length === 0) {
17
+ return;
18
+ }
19
+ appendDebugLogEntry("hidden stdout while TUI active", text);
20
+ }
21
+ /**
22
+ * Record a fatal uncaught crash in the brand debug log.
23
+ *
24
+ * The interactive crash handler restores the real stderr and prints its banner to
25
+ * the terminal, so without this the only record of a crash is terminal scrollback —
26
+ * useless once the terminal is closed, and doubly so when the crash is itself an
27
+ * stderr/terminal failure. Callers must invoke this BEFORE the terminal handoff and
28
+ * must swallow any failure: writing telemetry may never alter the crash path.
29
+ */
30
+ export function appendUncaughtCrashLog(origin, error) {
31
+ appendDebugLogEntry(`uncaught crash (${origin})`, describeCrash(error));
32
+ }
33
+ function describeCrash(error) {
34
+ if (error instanceof Error) {
35
+ // `stack` already starts with "Name: message" in V8, but a caller-supplied or
36
+ // stripped stack may not, so keep the identity line unconditionally.
37
+ const identity = `${error.name}: ${error.message}`;
38
+ const stack = typeof error.stack === "string" && error.stack.length > 0 ? error.stack : undefined;
39
+ return stack === undefined || stack.startsWith(identity) ? (stack ?? identity) : `${identity}\n${stack}`;
40
+ }
41
+ try {
42
+ return typeof error === "string" ? error : inspect(error, { depth: 3 });
43
+ }
44
+ catch {
45
+ return "<unprintable crash value>";
46
+ }
47
+ }
17
48
  //# sourceMappingURL=hidden-stdout-log.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"hidden-stdout-log.js","sourceRoot":"","sources":["../../src/core/hidden-stdout-log.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,SAAS,CAAC;AAC9B,OAAO,KAAK,IAAI,MAAM,WAAW,CAAC;AAClC,OAAO,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAC/C,OAAO,EAAE,qBAAqB,EAAE,MAAM,uBAAuB,CAAC;AAE9D,MAAM,UAAU,qBAAqB,CAAC,IAAY;IACjD,IAAI,IAAI,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QACvB,OAAO;IACR,CAAC;IACD,MAAM,YAAY,GAAG,eAAe,EAAE,CAAC;IACvC,MAAM,MAAM,GAAG,IAAI,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE,oCAAoC,CAAC;IAChF,MAAM,YAAY,GAAG,qBAAqB,CAAC,IAAI,CAAC,CAAC;IACjD,MAAM,MAAM,GAAG,YAAY,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC;IACvD,EAAE,CAAC,SAAS,CAAC,IAAI,CAAC,OAAO,CAAC,YAAY,CAAC,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC;IAC9D,EAAE,CAAC,cAAc,CAAC,YAAY,EAAE,GAAG,MAAM,GAAG,YAAY,GAAG,MAAM,EAAE,EAAE,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC,CAAC;IACtF,EAAE,CAAC,SAAS,CAAC,YAAY,EAAE,KAAK,CAAC,CAAC;AACnC,CAAC","sourcesContent":["import * as fs from \"node:fs\";\nimport * as path from \"node:path\";\nimport { getDebugLogPath } from \"../config.ts\";\nimport { redactSensitiveOutput } from \"./sensitive-output.ts\";\n\nexport function appendHiddenTuiStdout(text: string): void {\n\tif (text.length === 0) {\n\t\treturn;\n\t}\n\tconst debugLogPath = getDebugLogPath();\n\tconst prefix = `[${new Date().toISOString()}] hidden stdout while TUI active\\n`;\n\tconst redactedText = redactSensitiveOutput(text);\n\tconst suffix = redactedText.endsWith(\"\\n\") ? \"\" : \"\\n\";\n\tfs.mkdirSync(path.dirname(debugLogPath), { recursive: true });\n\tfs.appendFileSync(debugLogPath, `${prefix}${redactedText}${suffix}`, { mode: 0o600 });\n\tfs.chmodSync(debugLogPath, 0o600);\n}\n"]}
1
+ {"version":3,"file":"hidden-stdout-log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mBAAmB,MAAM,GAAG,EAAE,aAAa,CAAC,KAAK,CAAC,CAAC,CAAC;AACzE,CAAC;AAED,SAAS,aAAa,CAAC,KAAc;IACpC,IAAI,KAAK,YAAY,KAAK,EAAE,CAAC;QAC5B,8EAA8E;QAC9E,qEAAqE;QACrE,MAAM,QAAQ,GAAG,GAAG,KAAK,CAAC,IAAI,KAAK,KAAK,CAAC,OAAO,EAAE,CAAC;QACnD,MAAM,KAAK,GAAG,OAAO,KAAK,CAAC,KAAK,KAAK,QAAQ,IAAI,KAAK,CAAC,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,SAAS,CAAC;QAClG,OAAO,KAAK,KAAK,SAAS,IAAI,KAAK,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,KAAK,IAAI,QAAQ,CAAC,CAAC,CAAC,CAAC,GAAG,QAAQ,KAAK,KAAK,EAAE,CAAC;IAC1G,CAAC;IACD,IAAI,CAAC;QACJ,OAAO,OAAO,KAAK,KAAK,QAAQ,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,OAAO,CAAC,KAAK,EAAE,EAAE,KAAK,EAAE,CAAC,EAAE,CAAC,CAAC;IACzE,CAAC;IAAC,MAAM,CAAC;QACR,OAAO,2BAA2B,CAAC;IACpC,CAAC;AACF,CAAC","sourcesContent":["import * as fs from \"node:fs\";\nimport * as path from \"node:path\";\nimport { inspect } from \"node:util\";\nimport { getDebugLogPath } from \"../config.ts\";\nimport { redactSensitiveOutput } from \"./sensitive-output.ts\";\n\nfunction appendDebugLogEntry(header: string, text: string): void {\n\tconst debugLogPath = getDebugLogPath();\n\tconst prefix = `[${new Date().toISOString()}] ${header}\\n`;\n\tconst redactedText = redactSensitiveOutput(text);\n\tconst suffix = redactedText.endsWith(\"\\n\") ? \"\" : \"\\n\";\n\tfs.mkdirSync(path.dirname(debugLogPath), { recursive: true });\n\tfs.appendFileSync(debugLogPath, `${prefix}${redactedText}${suffix}`, { mode: 0o600 });\n\tfs.chmodSync(debugLogPath, 0o600);\n}\n\nexport function appendHiddenTuiStdout(text: string): void {\n\tif (text.length === 0) {\n\t\treturn;\n\t}\n\tappendDebugLogEntry(\"hidden stdout while TUI active\", text);\n}\n\n/**\n * Record a fatal uncaught crash in the brand debug log.\n *\n * The interactive crash handler restores the real stderr and prints its banner to\n * the terminal, so without this the only record of a crash is terminal scrollback —\n * useless once the terminal is closed, and doubly so when the crash is itself an\n * stderr/terminal failure. Callers must invoke this BEFORE the terminal handoff and\n * must swallow any failure: writing telemetry may never alter the crash path.\n */\nexport function appendUncaughtCrashLog(origin: string, error: unknown): void {\n\tappendDebugLogEntry(`uncaught crash (${origin})`, describeCrash(error));\n}\n\nfunction describeCrash(error: unknown): string {\n\tif (error instanceof Error) {\n\t\t// `stack` already starts with \"Name: message\" in V8, but a caller-supplied or\n\t\t// stripped stack may not, so keep the identity line unconditionally.\n\t\tconst identity = `${error.name}: ${error.message}`;\n\t\tconst stack = typeof error.stack === \"string\" && error.stack.length > 0 ? error.stack : undefined;\n\t\treturn stack === undefined || stack.startsWith(identity) ? (stack ?? identity) : `${identity}\\n${stack}`;\n\t}\n\ttry {\n\t\treturn typeof error === \"string\" ? error : inspect(error, { depth: 3 });\n\t} catch {\n\t\treturn \"<unprintable crash value>\";\n\t}\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"interactive-mode.d.ts","sourceRoot":"","sources":["../../../src/modes/interactive/interactive-mode.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAKH,OAAO,KAAK,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAC;AAEjF,OAAO,KAAK,EAAoB,YAAY,EAAW,KAAK,EAAsB,MAAM,8BAA8B,CAAC;AACvH,OAAO,KAAK,EAUX,QAAQ,EAER,MAAM,wBAAwB,CAAC;AAEhC,OAAO,EAiBN,KAAK,GAAG,EACR,YAAY,EACZ,aAAa,E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OAAO,CAAC,qBAAqB;YAMf,iBAAiB;YAuFjB,oBAAoB;IAkBlC,IAAI,CAAC,oBAAoB,CAAC,EAAE,oBAAoB,GAAG,IAAI;CAgCvD"}
@@ -17,7 +17,7 @@ import { envValue } from "../../core/brand.js";
17
17
  import { CACHE_TTL_MS, collectCacheMisses, computeCacheWaste, detectCacheMiss, } from "../../core/cache-stats.js";
18
18
  import { buildNoticeBox } from "../../core/extensions/notice/index.js";
19
19
  import { FooterDataProvider } from "../../core/footer-data-provider.js";
20
- import { appendHiddenTuiStdout } from "../../core/hidden-stdout-log.js";
20
+ import { appendHiddenTuiStdout, appendUncaughtCrashLog } from "../../core/hidden-stdout-log.js";
21
21
  import { buildHighReasoningWarning } from "../../core/high-reasoning-warning.js";
22
22
  import { configureHttpDispatcher, formatHttpIdleTimeoutMs } from "../../core/http-dispatcher.js";
23
23
  import { KeybindingsManager } from "../../core/keybindings.js";
@@ -143,6 +143,8 @@ function isCompactionCostNotice(item) {
143
143
  return "type" in item && item.type === "compaction_cost";
144
144
  }
145
145
  const DEAD_TERMINAL_ERROR_CODES = new Set(["EIO", "EPIPE", "ENOTCONN"]);
146
+ // Bun's macOS tty shim can report a dead terminal as raw positive errno 5 without a string code.
147
+ const EIO_ERRNO = 5;
146
148
  const DEFAULT_RETRY_STATUS_REFRESH_INTERVAL_MS = 80;
147
149
  const LARGE_SESSION_RETRY_STATUS_REFRESH_INTERVAL_MS = 60_000;
148
150
  const DEFAULT_WORKING_STATUS_REFRESH_INTERVAL_MS = 600;
@@ -207,11 +209,20 @@ function formatWorkingStatusShimmerText(text, intensity) {
207
209
  return `\x1b[1m\x1b[38;2;${color.r};${color.g};${color.b}m${text}\x1b[39m\x1b[22m`;
208
210
  }
209
211
  function isDeadTerminalError(error) {
210
- if (!error || typeof error !== "object" || !("code" in error)) {
212
+ if (!error || typeof error !== "object") {
211
213
  return false;
212
214
  }
213
- const code = error.code;
214
- return code !== undefined && DEAD_TERMINAL_ERROR_CODES.has(code);
215
+ if ("code" in error) {
216
+ const code = error.code;
217
+ if (code !== undefined && DEAD_TERMINAL_ERROR_CODES.has(code)) {
218
+ return true;
219
+ }
220
+ }
221
+ if ("errno" in error) {
222
+ const errno = error.errno;
223
+ return errno === EIO_ERRNO || errno === -EIO_ERRNO;
224
+ }
225
+ return false;
215
226
  }
216
227
  const ANTHROPIC_SUBSCRIPTION_AUTH_WARNING = "Anthropic subscription auth is active. Third-party harness usage draws from extra usage and is billed per token, not your Claude plan limits. Manage extra usage at https://claude.ai/settings/usage. Disable this warning in /settings.";
217
228
  function isAnthropicSubscriptionAuthKey(apiKey) {
@@ -4032,8 +4043,12 @@ export class InteractiveMode {
4032
4043
  this.ui.requestRender();
4033
4044
  const removePending = () => {
4034
4045
  const componentIndex = this.chatContainer.children.indexOf(component);
4035
- const insertionIndex = spacer ? this.chatContainer.children.indexOf(spacer) : componentIndex;
4036
- if (spacer)
4046
+ if (componentIndex === -1) {
4047
+ return this.chatContainer.children.length;
4048
+ }
4049
+ const spacerIndex = spacer ? this.chatContainer.children.indexOf(spacer) : -1;
4050
+ const insertionIndex = spacerIndex >= 0 ? spacerIndex : componentIndex;
4051
+ if (spacerIndex >= 0 && spacer)
4037
4052
  this.chatContainer.removeChild(spacer);
4038
4053
  this.chatContainer.removeChild(component);
4039
4054
  return insertionIndex;
@@ -4479,8 +4494,17 @@ export class InteractiveMode {
4479
4494
  }
4480
4495
  process.exit(0);
4481
4496
  }
4482
- emergencyTerminalExit() {
4497
+ emergencyTerminalExit(crash) {
4483
4498
  this.isShuttingDown = true;
4499
+ // This exit is silent by design (the terminal is gone, so a banner would go
4500
+ // nowhere), which makes the debug log the ONLY surface that can record this
4501
+ // crash class — exactly the EIO case that left the 2026-08-26 diagnosis with no
4502
+ // evidence. Write before the cleanup below, which is unguarded and could throw.
4503
+ // A logging failure must never alter the exit path.
4504
+ try {
4505
+ appendUncaughtCrashLog(crash.origin, crash.error);
4506
+ }
4507
+ catch { }
4484
4508
  this.unregisterSignalHandlers();
4485
4509
  killTrackedDetachedChildren();
4486
4510
  // The terminal is gone. Do not run normal shutdown because TUI and
@@ -4502,6 +4526,13 @@ export class InteractiveMode {
4502
4526
  if (this.isShuttingDown) {
4503
4527
  process.exit(1);
4504
4528
  }
4529
+ if (isDeadTerminalError(error)) {
4530
+ // The terminal died under the session (e.g. an stdin read EIO after
4531
+ // the controlling terminal vanished or this pgrp lost the tty
4532
+ // foreground). Same handling as terminal write errors: exit silently
4533
+ // instead of printing a crash banner to a terminal that is gone.
4534
+ this.emergencyTerminalExit({ origin: `dead-terminal ${origin}`, error });
4535
+ }
4505
4536
  if (isRecoverableInspectorVmImportError(error, origin)) {
4506
4537
  this.showWarning(INSPECTOR_VM_IMPORT_WARNING);
4507
4538
  return;
@@ -4519,6 +4550,13 @@ export class InteractiveMode {
4519
4550
  this.ui.stop();
4520
4551
  }
4521
4552
  catch { }
4553
+ // Record the crash before the terminal handoff: the banner below only reaches
4554
+ // terminal scrollback, which is gone when the terminal is closed or is itself
4555
+ // the thing that failed. A logging failure must never alter the crash path.
4556
+ try {
4557
+ appendUncaughtCrashLog(origin, error);
4558
+ }
4559
+ catch { }
4522
4560
  restoreInteractiveStderr();
4523
4561
  console.error(`${APP_NAME} exiting due to uncaughtException:`);
4524
4562
  console.error(error);
@@ -4552,7 +4590,7 @@ export class InteractiveMode {
4552
4590
  }
4553
4591
  const terminalErrorHandler = (error) => {
4554
4592
  if (isDeadTerminalError(error)) {
4555
- this.emergencyTerminalExit();
4593
+ this.emergencyTerminalExit({ origin: "dead-terminal stdio error", error });
4556
4594
  }
4557
4595
  throw error;
4558
4596
  };