@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":"index.js","sourceRoot":"","sources":["../../../../../src/core/extensions/builtin/config-reload/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAC9D,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,GAAG,EAAE,MAAM,WAAW,CAAC;AACtE,OAAO,EAAE,mBAAmB,EAAE,MAAM,2CAA2C,CAAC;AAChF,OAAO,EAAE,eAAe,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AACrE,OAAO,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAC;AACzD,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AACvD,OAAO,EAAE,iBAAiB,EAAiB,eAAe,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAC;AAE/G,OAAO,EAAE,wBAAwB,EAAE,6BAA6B,EAAE,MAAM,4BAA4B,CAAC;AACrG,OAAO,EAAE,8BAA8B,EAAE,MAAM,4BAA4B,CAAC;AA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AAS,YAAY,CAAC,KAAc;IACnC,OAAO,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;AAC/D,CAAC;AAED,SAAS,WAAW,CAAC,KAAwB;IAC5C,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC,CAAC,CAAC,CAAC,eAAe,CAAC,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AAChE,CAAC","sourcesContent":["import { existsSync, lstatSync, readFileSync } from \"node:fs\";\nimport { basename, dirname, relative, resolve, sep } from \"node:path\";\nimport { bindToProviderScope } from \"@earendil-works/pi-ai/node/provider-scope\";\nimport { CONFIG_DIR_NAME, getAgentDir } from \"../../../../config.ts\";\nimport { resolvePath } from \"../../../../utils/paths.ts\";\nimport { ModelConfig } from \"../../../model-config.ts\";\nimport { parseSettingsJson, type Settings, SettingsManager, wasSelfWrite } from \"../../../settings-manager.ts\";\nimport type { ExtensionAPI, ExtensionContext, SessionStartEvent } from \"../../types.ts\";\nimport { isLoadableExtensionEntry, isScannableExtensionDirectory } from \"./extension-watch-scope.ts\";\nimport { excludeGeneratedExtensionShims } from \"./generated-shim-filter.ts\";\nimport { type ConfigReloadLogger, createConfigReloadLogger } from \"./log.ts\";\nimport {\n\tCONFIG_WATCH_CHANGED,\n\tCONFIG_WATCH_READY,\n\tCONFIG_WATCH_REGISTER,\n\tCONFIG_WATCH_REJECTED,\n\tCONFIG_WATCH_RELOADED,\n\tCONFIG_WATCH_UNREGISTER,\n\ttype ConfigWatchRegistration,\n\ttype ConfigWatchTarget,\n\tisConfigWatchRegistration,\n\tisConfigWatchUnregistration,\n\tisConfigWatchValidation,\n\tmatchesConfigWatchFilter,\n} from \"./protocol.ts\";\nimport { ReloadVetoDeferral } from \"./reload-deferral.ts\";\nimport {\n\texcludeRoutineOnlySettingsChanges,\n\tisSettingsPath,\n\tjoinConfigDir,\n\trefreshSettingsContentSnapshots,\n\tupdateSettingsContentSnapshot,\n} from \"./routine-settings.ts\";\nimport {\n\tConfigReloadWatchEngine,\n\tcreateFsWatchEventSource,\n\ttype RealChange,\n\ttype WatchClock,\n\ttype WatchEventSource,\n\ttype WatchTarget,\n} from \"./watch-engine.ts\";\n\nconst BUILTIN_REGISTRATION_ID = \"builtin\";\nconst DEFAULT_DEBOUNCE_MS = 200;\nconst COMPACTION_RECHECK_MS = 250;\nconst VETO_RECHECK_MS = 1000;\nconst CONFIG_FILE_NAMES = [\"settings.jsonc\", \"settings.json\", \"models.json\", \"keybindings.json\"] as const;\n\n/**\n * The engine applies one predicate to both file gating and directory descent, so\n * this must admit scannable directories in order to reach their entry files.\n */\nconst extensionWatchFilter =\n\t(extensionsDir: string) =>\n\t(relPath: string): boolean =>\n\t\tisLoadableExtensionEntry(extensionsDir, relPath) || isScannableExtensionDirectory(extensionsDir, relPath);\n\ntype ConfigReloadWatchSettings = {\n\treadonly settings?: boolean;\n\treadonly models?: boolean;\n\treadonly keybindings?: boolean;\n\treadonly prompts?: boolean;\n\treadonly skills?: boolean;\n\treadonly extensions?: boolean;\n};\n\ntype ConfigReloadSettingsPatch = {\n\treadonly enabled?: boolean;\n\treadonly debounceMs?: number;\n\treadonly watch?: ConfigReloadWatchSettings;\n};\n\n/** Keep config-reload's settings schema owned by the builtin while exposing it on Settings. */\ndeclare module \"../../../settings-manager.ts\" {\n\tinterface Settings {\n\t\tconfigReload?: ConfigReloadSettingsPatch;\n\t}\n}\n\ntype ResolvedConfigReloadSettings = {\n\treadonly enabled: boolean;\n\treadonly debounceMs: number;\n\treadonly watch: Required<ConfigReloadWatchSettings>;\n};\n\ntype WatchTargetInput = Omit<WatchTarget, \"id\">;\n\ntype ActiveTarget = {\n\treadonly registrationId: string;\n\treadonly target: WatchTarget;\n\t/** Presence targets rebuild the watcher set once this missing path appears. */\n\treadonly rearmOnCreation?: string;\n};\n\ntype PendingChange = {\n\treadonly registrationId: string;\n\treadonly paths: Set<string>;\n};\n\ntype ReloadHandoff = {\n\treadonly hashesAtRequest: ReadonlyMap<string, string>;\n\treadonly settingsContentsAtRequest: ReadonlyMap<string, string>;\n\treadonly requestedAt: number;\n\treadonly changes: readonly { readonly registrationId: string; readonly paths: readonly string[] }[];\n};\n\n/** Session-keyed handoffs survive replacement extension factories during reload. */\nexport class ConfigReloadHandoffRegistry<T> {\n\treadonly #handoffs = new Map<string, T>();\n\n\tset(sessionHandle: string, handoff: T): void {\n\t\tthis.#handoffs.set(sessionHandle, handoff);\n\t}\n\n\ttake(sessionHandle: string): T | undefined {\n\t\tconst handoff = this.#handoffs.get(sessionHandle);\n\t\tthis.#handoffs.delete(sessionHandle);\n\t\treturn handoff;\n\t}\n\n\tdelete(sessionHandle: string): void {\n\t\tthis.#handoffs.delete(sessionHandle);\n\t}\n}\n\nconst reloadHandoffs = new ConfigReloadHandoffRegistry<ReloadHandoff>();\n\nfunction bindExternalCallback<TArgs extends unknown[], TResult>(\n\tcallback: (...args: TArgs) => TResult,\n): (...args: TArgs) => TResult {\n\ttry {\n\t\treturn bindToProviderScope(callback);\n\t} catch {\n\t\treturn callback;\n\t}\n}\n\nexport interface ConfigReloadExtensionOptions {\n\treadonly agentDir?: string;\n\treadonly subscribe?: WatchEventSource;\n\treadonly clock?: WatchClock;\n\treadonly logger?: ConfigReloadLogger;\n\t/** Test seam. Production uses the watch engine's SHA-256 implementation. */\n\treadonly hashFile?: (path: string) => string;\n}\n\n/**\n * Watch config resources and request the host's existing full reload flow.\n *\n * The optional options are test seams. Production registration uses the default\n * filesystem event source and agent directory.\n */\nexport function configReloadExtension(pi: ExtensionAPI, options: ConfigReloadExtensionOptions = {}): void {\n\tconst sessionOwned = (() => {\n\t\ttry {\n\t\t\tbindToProviderScope(() => undefined);\n\t\t\treturn true;\n\t\t} catch {\n\t\t\treturn false;\n\t\t}\n\t})();\n\tconst handoffKey = (ctx: ExtensionContext): string => (sessionOwned ? ctx.sessionManager.getSessionId() : \"classic\");\n\tconst agentDir = resolve(options.agentDir ?? getAgentDir());\n\tconst subscribe = options.subscribe ?? createFsWatchEventSource();\n\tconst logger = options.logger ?? createConfigReloadLogger(agentDir);\n\tconst registrations = new Map<string, ConfigWatchRegistration>();\n\tconst rejectedRegistrations = new Map<string, string>();\n\t/** Last-seen settings.json contents per path; the diff base for routine-key classification. */\n\tconst settingsContents = new Map<string, string>();\n\tconst eventUnsubscribes: Array<() => void> = [];\n\tconst pending = new Map<string, PendingChange>();\n\tlet engine: ConfigReloadWatchEngine | undefined;\n\tlet activeTargets: ActiveTarget[] = [];\n\tlet currentContext: ExtensionContext | undefined;\n\tlet started = false;\n\tlet reloadInFlight = false;\n\tlet deferredNoticeShown = false;\n\tlet unavailableReloadLogged = false;\n\tlet compactionRecheck: ReturnType<typeof setTimeout> | undefined;\n\tlet vetoRecheck: ReturnType<typeof setTimeout> | undefined;\n\tconst vetoDeferral = new ReloadVetoDeferral();\n\tlet changeChain: Promise<void> = Promise.resolve();\n\n\t// The engine goes inert the moment close() is called; its unsubscribe loop can\n\t// take seconds per watcher, and session_shutdown is awaited by the reload flow.\n\tconst closeWatchers = (): void => {\n\t\tengine?.close().catch((error: unknown) => {\n\t\t\tlogger.error(\"watcher_error\", { path: \"watcher teardown\", message: errorMessage(error) });\n\t\t});\n\t\tengine = undefined;\n\t\tactiveTargets = [];\n\t};\n\n\tconst clearCompactionRecheck = (): void => {\n\t\tif (compactionRecheck === undefined) return;\n\t\t(options.clock ?? defaultClock).clearTimeout(compactionRecheck);\n\t\tcompactionRecheck = undefined;\n\t};\n\n\tconst clearVetoRecheck = (): void => {\n\t\tif (vetoRecheck === undefined) return;\n\t\t(options.clock ?? defaultClock).clearTimeout(vetoRecheck);\n\t\tvetoRecheck = undefined;\n\t};\n\n\tconst cleanupEventListeners = (): void => {\n\t\tfor (const unsubscribe of eventUnsubscribes.splice(0)) {\n\t\t\tunsubscribe();\n\t\t}\n\t};\n\n\tconst rejectRegistration = (registrationId: string, errors: readonly string[]): void => {\n\t\tpi.events.emit(CONFIG_WATCH_REJECTED, {\n\t\t\tregistrationId,\n\t\t\tpaths: [],\n\t\t\terrors: [...errors],\n\t\t});\n\t\tlogger.warn(\"registration_rejected\", { registrationId, errorCount: errors.length });\n\t};\n\n\tconst handleRegistration = (payload: unknown): void => {\n\t\tif (!isConfigWatchRegistration(payload)) return;\n\t\tconst fingerprint = registrationFingerprint(payload);\n\t\t// A component may synchronously re-register from a CONFIG_WATCH_REJECTED\n\t\t// listener (e.g. sticky-rejection recovery). Rejected registrations are\n\t\t// never stored, so the identity guard below cannot break that recursion;\n\t\t// ignoring an identical payload after one rejection does.\n\t\tif (rejectedRegistrations.get(payload.id) === fingerprint) {\n\t\t\tlogger.debug(\"registration_rejection_suppressed\", { registrationId: payload.id });\n\t\t\treturn;\n\t\t}\n\t\tconst cwd = currentContext?.cwd ?? process.cwd();\n\t\tif (registrationHasRestrictedTarget(payload, cwd, agentDir)) {\n\t\t\trejectedRegistrations.set(payload.id, fingerprint);\n\t\t\trejectRegistration(payload.id, [\"Configuration watch target is restricted\"]);\n\t\t\treturn;\n\t\t}\n\t\trejectedRegistrations.delete(payload.id);\n\n\t\t// A component may re-emit its unchanged registration when it receives the\n\t\t// ready event from rebuildWatchers. Rebuilding for that same payload emits\n\t\t// ready again and creates an unbounded synchronous rebuild loop.\n\t\tif (registrations.get(payload.id) === payload) return;\n\t\tregistrations.set(payload.id, payload);\n\t\tpending.delete(payload.id);\n\t\tlogger.info(\"registration_added\", { id: payload.id });\n\t\tif (started && currentContext) {\n\t\t\trebuildWatchers(currentContext);\n\t\t}\n\t};\n\n\tconst handleUnregistration = (payload: unknown): void => {\n\t\tif (!isConfigWatchUnregistration(payload)) return;\n\t\trejectedRegistrations.delete(payload.id);\n\t\tif (!registrations.delete(payload.id)) return;\n\t\tpending.delete(payload.id);\n\t\tlogger.info(\"registration_removed\", { id: payload.id });\n\t\tif (started && currentContext) {\n\t\t\trebuildWatchers(currentContext);\n\t\t}\n\t};\n\n\tconst processChange = async (change: RealChange): Promise<void> => {\n\t\tif (reloadInFlight || !currentContext) return;\n\t\t// Suppression state (self-write consumption, routine-diff base) is per path,\n\t\t// so it must be resolved before grouping: a path watched by several\n\t\t// registrations would otherwise be classified once per group and reach the\n\t\t// reload flow through the later group.\n\t\tconst watchedPaths = excludeSelfWrites(\n\t\t\tchange.changedPaths,\n\t\t\tengine,\n\t\t\tagentDir,\n\t\t\tcurrentContext.cwd,\n\t\t\tlogger,\n\t\t\tsettingsContents,\n\t\t);\n\t\tconst significantPaths = excludeRoutineOnlySettingsChanges(\n\t\t\twatchedPaths,\n\t\t\tsettingsContents,\n\t\t\tagentDir,\n\t\t\tcurrentContext.cwd,\n\t\t\tlogger,\n\t\t);\n\t\tconst configPaths = excludeGeneratedExtensionShims(significantPaths, agentDir);\n\t\tfor (const path of significantPaths) {\n\t\t\tif (!configPaths.includes(path)) logger.debug(\"generated_shim_change_suppressed\", { path });\n\t\t}\n\t\tconst groups = groupChangedPaths(configPaths, activeTargets);\n\t\tconst rearmDirectoryWatch = change.created.some((path) =>\n\t\t\tactiveTargets.some((target) => target.rearmOnCreation === resolve(path)),\n\t\t);\n\t\tfor (const [registrationId, paths] of groups) {\n\t\t\tconst errors = await validateChangedPaths(registrationId, paths, registrations, agentDir, currentContext.cwd);\n\t\t\tif (errors.length > 0) {\n\t\t\t\trejectChange(currentContext, registrationId, paths, errors, logger, pi);\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\taddPending(pending, registrationId, paths);\n\t\t\tconst deferred = !canRequestReload(currentContext);\n\t\t\tpi.events.emit(CONFIG_WATCH_CHANGED, {\n\t\t\t\tregistrationId,\n\t\t\t\tpaths: [...paths],\n\t\t\t\tdeferred,\n\t\t\t});\n\t\t\tlogger.info(\"change_detected\", { registrationId, paths, deferred });\n\t\t}\n\t\tif (rearmDirectoryWatch) rebuildWatchers(currentContext);\n\t\tawait flushPending();\n\t};\n\n\tconst enqueueChange = (change: RealChange): void => {\n\t\tif (reloadInFlight) return;\n\t\tchangeChain = changeChain\n\t\t\t.then(() => processChange(change))\n\t\t\t.catch((error: unknown) => {\n\t\t\t\tlogger.error(\"watcher_error\", { path: \"config reload\", message: errorMessage(error) });\n\t\t\t});\n\t};\n\n\tconst rebuildWatchers = (ctx: ExtensionContext): void => {\n\t\tcloseWatchers();\n\t\tclearCompactionRecheck();\n\t\tconst settingsManager = SettingsManager.create(ctx.cwd, agentDir, { projectTrusted: ctx.isProjectTrusted() });\n\t\tconst settings = resolveConfigReloadSettings(settingsManager);\n\t\tif (!settings.enabled || ctx.mode === \"print\" || ctx.mode === \"json\") {\n\t\t\tpi.events.emit(CONFIG_WATCH_READY, { enabled: false });\n\t\t\treturn;\n\t\t}\n\n\t\tactiveTargets = buildWatchTargets({\n\t\t\tcwd: ctx.cwd,\n\t\t\tagentDir,\n\t\t\tprojectTrusted: ctx.isProjectTrusted(),\n\t\t\tsettings,\n\t\t\tskillPaths: settings.watch.skills ? settingsManager.getSkillPaths() : [],\n\t\t\tregistrations,\n\t\t});\n\t\tengine = new ConfigReloadWatchEngine({\n\t\t\ttargets: activeTargets.map((entry) => entry.target),\n\t\t\tsubscribe,\n\t\t\tdebounceMs: settings.debounceMs,\n\t\t\tclock: options.clock,\n\t\t\thashFile: options.hashFile,\n\t\t\tonRealChange: bindExternalCallback(enqueueChange),\n\t\t\tonError: bindExternalCallback((error, path) => {\n\t\t\t\tlogger.error(\"watcher_error\", { path, message: errorMessage(error) });\n\t\t\t}),\n\t\t});\n\t\trefreshSettingsContentSnapshots(settingsContents, agentDir, ctx.cwd);\n\t\tlogger.info(\"watcher_started\", { targetCount: activeTargets.length });\n\t\tpi.events.emit(CONFIG_WATCH_READY, { enabled: true });\n\t};\n\n\tconst flushPending = async (): Promise<void> => {\n\t\tconst ctx = currentContext;\n\t\tif (!ctx || pending.size === 0 || reloadInFlight) return;\n\t\tif (!ctx.isIdle() || ctx.hasPendingMessages()) return;\n\t\tif (ctx.isCompacting?.() ?? false) {\n\t\t\tarmCompactionRecheck();\n\t\t\treturn;\n\t\t}\n\t\tclearCompactionRecheck();\n\t\tif (!ctx.requestReload) {\n\t\t\tif (!unavailableReloadLogged) {\n\t\t\t\tunavailableReloadLogged = true;\n\t\t\t\tlogger.info(\"reload_requested\", { reason: \"requestReload unavailable\", paths: [] });\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\n\t\t// Probe the extension veto (session_before_reload) BEFORE announcing the\n\t\t// reload: a vetoed hot-reload defers quietly (one notice per distinct\n\t\t// reason) and retries on later idle edges or the veto recheck clock,\n\t\t// instead of re-notifying \"Hot-reloading:\" plus the veto warning forever.\n\t\tif (ctx.checkReloadVeto) {\n\t\t\tconst veto = await ctx.checkReloadVeto();\n\t\t\tif (currentContext !== ctx || reloadInFlight || pending.size === 0) return;\n\t\t\tif (veto.cancelled) {\n\t\t\t\tconst notice = vetoDeferral.defer(veto.reason);\n\t\t\t\tif (notice) ctx.ui.notify(notice, \"info\");\n\t\t\t\tlogger.info(\"reload_deferred\", { reason: veto.reason ?? \"extension veto\" });\n\t\t\t\tarmVetoRecheck();\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t\tclearVetoRecheck();\n\t\tvetoDeferral.reset();\n\n\t\tconst changes = pendingChanges(pending);\n\t\tconst paths = uniquePaths(changes.flatMap((change) => change.paths));\n\t\treloadInFlight = true;\n\t\treloadHandoffs.set(handoffKey(ctx), {\n\t\t\thashesAtRequest: engine?.getBaselineSnapshot() ?? new Map<string, string>(),\n\t\t\tsettingsContentsAtRequest: new Map(settingsContents),\n\t\t\trequestedAt: Date.now(),\n\t\t\tchanges,\n\t\t});\n\t\tctx.ui.notify(`Hot-reloading: ${formatPaths(paths)}`, \"info\");\n\t\tlogger.info(\"reload_requested\", { reason: \"config changed\", paths });\n\n\t\tconst handoffKeyForReload = handoffKey(ctx);\n\t\ttry {\n\t\t\tawait ctx.requestReload();\n\t\t\treloadInFlight = false;\n\t\t\treloadHandoffs.delete(handoffKeyForReload);\n\t\t} catch (error) {\n\t\t\treloadInFlight = false;\n\t\t\treloadHandoffs.delete(handoffKeyForReload);\n\t\t\tlogger.error(\"watcher_error\", { path: \"reload\", message: errorMessage(error) });\n\t\t}\n\t};\n\n\tconst armCompactionRecheck = (): void => {\n\t\tif (compactionRecheck !== undefined) return;\n\t\tconst clock = options.clock ?? defaultClock;\n\t\tcompactionRecheck = clock.setTimeout(() => {\n\t\t\tcompactionRecheck = undefined;\n\t\t\tvoid flushPending();\n\t\t}, COMPACTION_RECHECK_MS);\n\t};\n\n\tconst armVetoRecheck = (): void => {\n\t\tif (vetoRecheck !== undefined) return;\n\t\tconst clock = options.clock ?? defaultClock;\n\t\tvetoRecheck = clock.setTimeout(() => {\n\t\t\tvetoRecheck = undefined;\n\t\t\tvoid flushPending();\n\t\t}, VETO_RECHECK_MS);\n\t};\n\n\tconst processReloadHandoff = async (event: SessionStartEvent, ctx: ExtensionContext): Promise<void> => {\n\t\tif (event.reason !== \"reload\") return;\n\t\tconst handoff = reloadHandoffs.take(handoffKey(ctx));\n\t\tif (!handoff) return;\n\t\tconst paths = uniquePaths(handoff.changes.flatMap((change) => change.paths));\n\t\tfor (const change of handoff.changes) {\n\t\t\tpi.events.emit(CONFIG_WATCH_RELOADED, {\n\t\t\t\tregistrationId: change.registrationId,\n\t\t\t\tpaths: [...change.paths],\n\t\t\t});\n\t\t}\n\t\tctx.ui.notify(`Hot-reloaded: ${formatPaths(paths)}`, \"info\");\n\t\tlogger.info(\"reload_completed\", { durationMs: Math.max(0, Date.now() - handoff.requestedAt) });\n\n\t\tconst changedPaths = compareSnapshots(handoff.hashesAtRequest, engine?.getBaselineSnapshot() ?? new Map());\n\t\tif (changedPaths.length > 0) {\n\t\t\tsettingsContents.clear();\n\t\t\tfor (const [path, content] of handoff.settingsContentsAtRequest) settingsContents.set(path, content);\n\t\t\tenqueueChange({ changedPaths, created: [], deleted: [] });\n\t\t\tawait changeChain;\n\t\t}\n\t};\n\n\teventUnsubscribes.push(pi.events.on(CONFIG_WATCH_REGISTER, handleRegistration));\n\teventUnsubscribes.push(pi.events.on(CONFIG_WATCH_UNREGISTER, handleUnregistration));\n\n\tpi.on(\"session_start\", async (event, ctx) => {\n\t\tstarted = true;\n\t\tcurrentContext = ctx;\n\t\trebuildWatchers(ctx);\n\t\tawait processReloadHandoff(event, ctx);\n\t});\n\n\tpi.on(\"agent_end\", async (_event, ctx) => {\n\t\tcurrentContext = ctx;\n\t\tawait flushPending();\n\t});\n\tpi.on(\"agent_settled\", async (_event, ctx) => {\n\t\tcurrentContext = ctx;\n\t\tawait flushPending();\n\t});\n\tpi.on(\"project_trust\", () => {\n\t\tif (currentContext) rebuildWatchers(currentContext);\n\t\treturn { trusted: \"undecided\" };\n\t});\n\tpi.on(\"session_shutdown\", (event) => {\n\t\tconst closingContext = currentContext;\n\t\tstarted = false;\n\t\tcurrentContext = undefined;\n\t\tcloseWatchers();\n\t\tclearCompactionRecheck();\n\t\tclearVetoRecheck();\n\t\tvetoDeferral.reset();\n\t\tcleanupEventListeners();\n\t\tpending.clear();\n\t\tif (event.reason !== \"reload\" && closingContext) reloadHandoffs.delete(handoffKey(closingContext));\n\t});\n\n\tfunction canRequestReload(ctx: ExtensionContext): boolean {\n\t\treturn (\n\t\t\tctx.isIdle() &&\n\t\t\t!ctx.hasPendingMessages() &&\n\t\t\t!(ctx.isCompacting?.() ?? false) &&\n\t\t\tctx.requestReload !== undefined\n\t\t);\n\t}\n\n\tfunction armDeferredNotice(ctx: ExtensionContext): void {\n\t\tif (deferredNoticeShown || pending.size === 0 || !ctx.requestReload) return;\n\t\tdeferredNoticeShown = true;\n\t\tctx.ui.notify(\"Config changed; reloading when idle\", \"info\");\n\t}\n\n\tfunction rejectChange(\n\t\tctx: ExtensionContext,\n\t\tregistrationId: string,\n\t\tpaths: readonly string[],\n\t\terrors: readonly string[],\n\t\tactiveLogger: ConfigReloadLogger,\n\t\tapi: ExtensionAPI,\n\t): void {\n\t\tctx.ui.notify(`Config change rejected: ${errors.join(\"; \")}`, \"error\");\n\t\tapi.events.emit(CONFIG_WATCH_REJECTED, { registrationId, paths: [...paths], errors: [...errors] });\n\t\tactiveLogger.warn(\"validation_rejected\", { registrationId, errorCount: errors.length });\n\t}\n\n\tfunction addPending(changes: Map<string, PendingChange>, registrationId: string, paths: readonly string[]): void {\n\t\tconst pendingChange = changes.get(registrationId) ?? { registrationId, paths: new Set<string>() };\n\t\tfor (const path of paths) pendingChange.paths.add(path);\n\t\tchanges.set(registrationId, pendingChange);\n\t\tif (!canRequestReload(currentContext!)) armDeferredNotice(currentContext!);\n\t}\n}\n\nexport default configReloadExtension;\n\nconst defaultClock: WatchClock = {\n\tsetTimeout: (callback, delayMs) => setTimeout(callback, delayMs),\n\tclearTimeout: (timer) => clearTimeout(timer),\n};\n\nfunction resolveConfigReloadSettings(settingsManager: SettingsManager): ResolvedConfigReloadSettings {\n\tconst global = readConfigReloadPatch(settingsManager.getGlobalSettings());\n\tconst project = readConfigReloadPatch(settingsManager.getProjectSettings());\n\treturn {\n\t\tenabled: project.enabled ?? global.enabled ?? true,\n\t\tdebounceMs: project.debounceMs ?? global.debounceMs ?? DEFAULT_DEBOUNCE_MS,\n\t\twatch: {\n\t\t\tsettings: project.watch?.settings ?? global.watch?.settings ?? true,\n\t\t\tmodels: project.watch?.models ?? global.watch?.models ?? true,\n\t\t\tkeybindings: project.watch?.keybindings ?? global.watch?.keybindings ?? true,\n\t\t\tprompts: project.watch?.prompts ?? global.watch?.prompts ?? true,\n\t\t\tskills: project.watch?.skills ?? global.watch?.skills ?? true,\n\t\t\textensions: project.watch?.extensions ?? global.watch?.extensions ?? true,\n\t\t},\n\t};\n}\n\nfunction readConfigReloadPatch(settings: Settings): ConfigReloadSettingsPatch {\n\tconst candidate: unknown = settings.configReload;\n\tif (!isPlainObject(candidate)) return {};\n\tconst watch = isPlainObject(candidate.watch) ? candidate.watch : undefined;\n\treturn {\n\t\tenabled: typeof candidate.enabled === \"boolean\" ? candidate.enabled : undefined,\n\t\tdebounceMs: validDebounce(candidate.debounceMs),\n\t\twatch: watch\n\t\t\t? {\n\t\t\t\t\tsettings: booleanOrUndefined(watch.settings),\n\t\t\t\t\tmodels: booleanOrUndefined(watch.models),\n\t\t\t\t\tkeybindings: booleanOrUndefined(watch.keybindings),\n\t\t\t\t\tprompts: booleanOrUndefined(watch.prompts),\n\t\t\t\t\tskills: booleanOrUndefined(watch.skills),\n\t\t\t\t\textensions: booleanOrUndefined(watch.extensions),\n\t\t\t\t}\n\t\t\t: undefined,\n\t};\n}\n\nfunction validDebounce(value: unknown): number | undefined {\n\tif (typeof value !== \"number\" || !Number.isFinite(value) || value < 0) return undefined;\n\treturn Math.floor(value);\n}\n\nfunction booleanOrUndefined(value: unknown): boolean | undefined {\n\treturn typeof value === \"boolean\" ? value : undefined;\n}\n\nfunction buildWatchTargets(options: {\n\treadonly cwd: string;\n\treadonly agentDir: string;\n\treadonly projectTrusted: boolean;\n\treadonly settings: ResolvedConfigReloadSettings;\n\treadonly skillPaths: readonly string[];\n\treadonly registrations: ReadonlyMap<string, ConfigWatchRegistration>;\n}): ActiveTarget[] {\n\tconst targets: ActiveTarget[] = [];\n\tconst addBuiltin = (id: string, target: WatchTargetInput, rearmOnCreation?: string): void => {\n\t\ttargets.push({ registrationId: BUILTIN_REGISTRATION_ID, target: { ...target, id }, rearmOnCreation });\n\t};\n\tconst addBuiltinDirectory = (id: string, path: string, filter?: (relPath: string) => boolean): void => {\n\t\tconst resourcePath = resolve(path);\n\t\tif (isExistingDirectory(resourcePath)) {\n\t\t\taddBuiltin(\n\t\t\t\tid,\n\t\t\t\tfilter\n\t\t\t\t\t? { kind: \"dir-recursive\", path: resourcePath, filter }\n\t\t\t\t\t: { kind: \"dir-recursive\", path: resourcePath },\n\t\t\t);\n\t\t\treturn;\n\t\t}\n\t\tconst watchPath = nearestExistingDirectory(dirname(resourcePath));\n\t\tconst firstMissingSegment = relative(watchPath, resourcePath).split(sep)[0] || basename(resourcePath);\n\t\tconst createdPath = resolve(watchPath, firstMissingSegment);\n\t\taddBuiltin(\n\t\t\t`${id}-presence`,\n\t\t\t{\n\t\t\t\tkind: \"dir\",\n\t\t\t\tpath: watchPath,\n\t\t\t\tallowList: [firstMissingSegment],\n\t\t\t},\n\t\t\tcreatedPath,\n\t\t);\n\t};\n\tconst { cwd, agentDir, projectTrusted, settings } = options;\n\tconst projectDir = joinConfigDir(cwd);\n\n\tconst jsonAllowList = CONFIG_FILE_NAMES.filter((name) => {\n\t\tif (name === \"settings.json\" || name === \"settings.jsonc\") return settings.watch.settings;\n\t\tif (name === \"models.json\") return settings.watch.models;\n\t\treturn settings.watch.keybindings;\n\t});\n\tif (jsonAllowList.length > 0) {\n\t\taddBuiltin(\"builtin-global-json\", { kind: \"dir\", path: agentDir, allowList: jsonAllowList });\n\t}\n\tif (settings.watch.prompts) {\n\t\taddBuiltinDirectory(\"builtin-global-prompts\", resolve(agentDir, \"prompts\"));\n\t}\n\tif (settings.watch.extensions) {\n\t\tconst globalExtensionsDir = resolve(agentDir, \"extensions\");\n\t\taddBuiltinDirectory(\"builtin-global-extensions\", globalExtensionsDir, extensionWatchFilter(globalExtensionsDir));\n\t}\n\tif (settings.watch.skills) {\n\t\tfor (const [index, skillPath] of options.skillPaths.entries()) {\n\t\t\tconst target = targetForSkillPath(resolvePath(skillPath, cwd, { trim: true }));\n\t\t\tif (target.kind === \"dir-recursive\") {\n\t\t\t\taddBuiltinDirectory(`builtin-skill-${index}`, target.path);\n\t\t\t} else {\n\t\t\t\taddBuiltin(`builtin-skill-${index}`, target);\n\t\t\t}\n\t\t}\n\t}\n\n\tif (projectTrusted) {\n\t\tconst projectDirExists = isExistingDirectory(projectDir);\n\t\tconst projectWatchEnabled = Object.values(settings.watch).some(Boolean);\n\t\tif (projectWatchEnabled) {\n\t\t\taddBuiltin(\n\t\t\t\t\"builtin-project-presence\",\n\t\t\t\t{ kind: \"dir\", path: cwd, allowList: [CONFIG_DIR_NAME] },\n\t\t\t\tprojectDirExists ? undefined : projectDir,\n\t\t\t);\n\t\t}\n\t\tif (projectDirExists) {\n\t\t\tif (settings.watch.settings) {\n\t\t\t\taddBuiltin(\"builtin-project-settings\", {\n\t\t\t\t\tkind: \"dir\",\n\t\t\t\t\tpath: projectDir,\n\t\t\t\t\tallowList: [\"settings.jsonc\", \"settings.json\"],\n\t\t\t\t});\n\t\t\t}\n\t\t\tif (settings.watch.prompts) {\n\t\t\t\taddBuiltinDirectory(\"builtin-project-prompts\", resolve(projectDir, \"prompts\"));\n\t\t\t}\n\t\t\tif (settings.watch.skills) {\n\t\t\t\taddBuiltinDirectory(\"builtin-project-skills\", resolve(projectDir, \"skills\"));\n\t\t\t}\n\t\t\tif (settings.watch.extensions) {\n\t\t\t\tconst projectExtensionsDir = resolve(projectDir, \"extensions\");\n\t\t\t\taddBuiltinDirectory(\n\t\t\t\t\t\"builtin-project-extensions\",\n\t\t\t\t\tprojectExtensionsDir,\n\t\t\t\t\textensionWatchFilter(projectExtensionsDir),\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\t}\n\n\tfor (const registration of options.registrations.values()) {\n\t\tfor (const [index, target] of registration.targets.entries()) {\n\t\t\tconst path = resolvePath(target.path, cwd, { trim: true });\n\t\t\tconst watchTarget = externalTargetToWatchTarget(path, target.kind, target.filterGlobs);\n\t\t\ttargets.push({\n\t\t\t\tregistrationId: registration.id,\n\t\t\t\ttarget: { ...watchTarget, id: `external-${registration.id}-${index}` },\n\t\t\t});\n\t\t}\n\t}\n\treturn targets;\n}\n\nfunction isExistingDirectory(path: string): boolean {\n\ttry {\n\t\treturn lstatSync(path).isDirectory();\n\t} catch {\n\t\treturn false;\n\t}\n}\n\nfunction nearestExistingDirectory(path: string): string {\n\tlet candidate = resolve(path);\n\twhile (!isExistingDirectory(candidate)) {\n\t\tconst parent = dirname(candidate);\n\t\tif (parent === candidate) return candidate;\n\t\tcandidate = parent;\n\t}\n\treturn candidate;\n}\n\nfunction targetForSkillPath(path: string): WatchTargetInput {\n\ttry {\n\t\tif (lstatSync(path).isFile()) {\n\t\t\treturn { kind: \"dir\", path: dirname(path), allowList: [basename(path)] };\n\t\t}\n\t} catch {\n\t\t// A missing configured skill path is treated as a directory so it becomes watchable when present.\n\t}\n\treturn { kind: \"dir-recursive\", path };\n}\n\nfunction externalTargetToWatchTarget(\n\tpath: string,\n\tkind: \"file\" | \"dir\",\n\tfilterGlobs: readonly string[] | undefined,\n): WatchTargetInput {\n\tif (kind === \"file\") {\n\t\tconst name = basename(path);\n\t\treturn {\n\t\t\tkind: \"dir\",\n\t\t\tpath: dirname(path),\n\t\t\tallowList: [name],\n\t\t\tfilter: (relativePath) => relativePath === name && matchesConfigWatchFilter(relativePath, filterGlobs),\n\t\t};\n\t}\n\treturn {\n\t\tkind: \"dir-recursive\",\n\t\tpath,\n\t\t// Literal filters also declare explicitly watched dot-directories. Without\n\t\t// this, an external ancestor target filtered to \".omo\" drops its creation\n\t\t// event before the validator can inspect the new config beneath it.\n\t\tallowList: literalFilterNames(filterGlobs),\n\t\tfilter: (relativePath) => matchesConfigWatchFilter(relativePath, filterGlobs),\n\t};\n}\n\nfunction literalFilterNames(filterGlobs: readonly string[] | undefined): string[] | undefined {\n\tif (!filterGlobs) return undefined;\n\t// A root-anchored glob names a literal path relative to the watch root, so\n\t// strip the anchor before the separator check rejects it.\n\tconst literalNames = filterGlobs\n\t\t.map((filterGlob) => (filterGlob.startsWith(\"/\") ? filterGlob.slice(1) : filterGlob))\n\t\t.filter((filterGlob) => !filterGlob.includes(\"*\") && !filterGlob.includes(\"/\") && !filterGlob.includes(\"\\\\\\\\\"));\n\treturn literalNames.length > 0 ? literalNames : undefined;\n}\n\nfunction groupChangedPaths(paths: readonly string[], targets: readonly ActiveTarget[]): Map<string, string[]> {\n\tconst groups = new Map<string, string[]>();\n\tfor (const path of paths) {\n\t\tlet matched = false;\n\t\tfor (const activeTarget of targets) {\n\t\t\tif (!targetMatchesPath(activeTarget.target, path)) continue;\n\t\t\tconst group = groups.get(activeTarget.registrationId) ?? [];\n\t\t\tif (!group.includes(path)) group.push(path);\n\t\t\tgroups.set(activeTarget.registrationId, group);\n\t\t\tmatched = true;\n\t\t}\n\t\tif (!matched) {\n\t\t\tconst group = groups.get(BUILTIN_REGISTRATION_ID) ?? [];\n\t\t\tgroup.push(path);\n\t\t\tgroups.set(BUILTIN_REGISTRATION_ID, group);\n\t\t}\n\t}\n\treturn groups;\n}\n\nfunction targetMatchesPath(target: WatchTarget, path: string): boolean {\n\tconst relativePath = relative(resolve(target.path), resolve(path));\n\tif (relativePath === \"..\" || relativePath.startsWith(`..${sep}`)) return false;\n\tif (target.kind === \"dir\" && relativePath.includes(sep)) return false;\n\tif (\n\t\ttarget.allowList &&\n\t\t!target.allowList.some((allowed) => relativePath === allowed || relativePath.startsWith(`${allowed}${sep}`))\n\t) {\n\t\treturn false;\n\t}\n\treturn target.filter?.(relativePath) ?? true;\n}\n\nfunction excludeSelfWrites(\n\tpaths: readonly string[],\n\tengine: ConfigReloadWatchEngine | undefined,\n\tagentDir: string,\n\tcwd: string,\n\tlogger: ConfigReloadLogger,\n\tsettingsContents: Map<string, string>,\n): string[] {\n\tconst snapshot = engine?.getBaselineSnapshot();\n\treturn paths.filter((path) => {\n\t\tif (!isSettingsPath(path, agentDir, cwd)) return true;\n\t\tconst hash = snapshot?.get(path);\n\t\tif (hash === undefined || !wasSelfWrite(path, hash)) return true;\n\t\tlogger.debug(\"self_write_suppressed\", { path });\n\t\t// Advance the routine-diff base so a later external change is not\n\t\t// polluted by this session's own just-applied write.\n\t\tupdateSettingsContentSnapshot(settingsContents, path);\n\t\treturn false;\n\t});\n}\n\nasync function validateChangedPaths(\n\tregistrationId: string,\n\tpaths: readonly string[],\n\tregistrations: ReadonlyMap<string, ConfigWatchRegistration>,\n\tagentDir: string,\n\tcwd: string,\n): Promise<string[]> {\n\tif (registrationId === BUILTIN_REGISTRATION_ID) {\n\t\treturn validateBuiltinPaths(paths, agentDir, cwd);\n\t}\n\tconst registration = registrations.get(registrationId);\n\tif (!registration?.validate) return [];\n\ttry {\n\t\tconst result = await registration.validate(paths);\n\t\tif (!isConfigWatchValidation(result)) return [\"Configuration validator returned an invalid result\"];\n\t\treturn result.ok ? [] : result.errors;\n\t} catch (error) {\n\t\treturn [errorMessage(error)];\n\t}\n}\n\nfunction validateBuiltinPaths(paths: readonly string[], agentDir: string, cwd: string): string[] {\n\tconst errors: string[] = [];\n\tfor (const path of paths) {\n\t\tif (isSettingsPath(path, agentDir, cwd)) {\n\t\t\tconst error = validateSettingsFile(path);\n\t\t\tif (error) errors.push(error);\n\t\t\tcontinue;\n\t\t}\n\t\tif (resolve(path) === resolve(agentDir, \"models.json\")) {\n\t\t\tconst error = ModelConfig.loadSync(path).getError();\n\t\t\tif (error) errors.push(error);\n\t\t\tcontinue;\n\t\t}\n\t\tif (resolve(path) === resolve(agentDir, \"keybindings.json\")) {\n\t\t\tconst error = validateKeybindingsFile(path);\n\t\t\tif (error) errors.push(error);\n\t\t}\n\t}\n\treturn errors;\n}\n\nfunction validateSettingsFile(path: string): string | undefined {\n\tif (!existsSync(path)) return undefined;\n\ttry {\n\t\tconst parsed = parseSettingsJson(readFileSync(path, \"utf-8\"));\n\t\t// Keep validation aligned with SettingsManager's loader and migrations without duplicating migration rules.\n\t\tSettingsManager.inMemory(parsed as Partial<Settings>);\n\t\treturn undefined;\n\t} catch (error) {\n\t\treturn `Invalid ${basename(path)}: ${errorMessage(error)}`;\n\t}\n}\n\nfunction validateKeybindingsFile(path: string): string | undefined {\n\tif (!existsSync(path)) return undefined;\n\ttry {\n\t\tconst parsed: unknown = JSON.parse(readFileSync(path, \"utf-8\"));\n\t\tif (!isPlainObject(parsed)) return \"keybindings.json must contain an object\";\n\t\tfor (const value of Object.values(parsed)) {\n\t\t\tif (typeof value === \"string\") continue;\n\t\t\tif (Array.isArray(value) && value.every((entry) => typeof entry === \"string\")) continue;\n\t\t\treturn \"keybindings.json bindings must be strings or string arrays\";\n\t\t}\n\t\treturn undefined;\n\t} catch (error) {\n\t\treturn `Invalid keybindings.json: ${errorMessage(error)}`;\n\t}\n}\n\nfunction registrationFingerprint(registration: ConfigWatchRegistration): string {\n\treturn JSON.stringify({\n\t\tid: registration.id,\n\t\tdisplayName: registration.displayName,\n\t\ttargets: registration.targets.map((target) => ({\n\t\t\tpath: target.path,\n\t\t\tkind: target.kind,\n\t\t\tfilterGlobs: target.filterGlobs ?? null,\n\t\t})),\n\t\thasValidate: registration.validate !== undefined,\n\t});\n}\n\nfunction isProtectedAgentPath(candidate: string, agentDir: string): boolean {\n\tconst authPath = resolve(agentDir, \"auth.json\");\n\tconst sessionsPath = resolve(agentDir, \"sessions\");\n\tconst logsPath = resolve(agentDir, \"logs\");\n\treturn isWithin(candidate, authPath) || isWithin(candidate, sessionsPath) || isWithin(candidate, logsPath);\n}\n\n// A watch rooted exactly at the agent directory is safe when every filter is\n// root-anchored (a leading `/` matches only an immediate child of the watch root,\n// never a nested path) and none of those anchored names resolves into a protected\n// path. Unfiltered targets, unanchored filters, and any protected filter stay\n// fail-closed.\nfunction isSafeFilteredAgentDirTarget(target: ConfigWatchTarget, resolvedPath: string, agentDir: string): boolean {\n\tif (target.kind !== \"dir\" || resolvedPath !== resolve(agentDir)) return false;\n\tconst filterGlobs = target.filterGlobs;\n\tif (!filterGlobs || filterGlobs.length === 0) return false;\n\treturn filterGlobs.every((glob) => {\n\t\tif (!glob.startsWith(\"/\")) return false;\n\t\treturn !isProtectedAgentPath(resolve(resolvedPath, glob.slice(1)), agentDir);\n\t});\n}\n\nfunction registrationHasRestrictedTarget(\n\tregistration: ConfigWatchRegistration,\n\tcwd: string,\n\tagentDir: string,\n): boolean {\n\tconst authPath = resolve(agentDir, \"auth.json\");\n\tconst sessionsPath = resolve(agentDir, \"sessions\");\n\tconst logsPath = resolve(agentDir, \"logs\");\n\treturn registration.targets.some((target) => {\n\t\tconst path = resolvePath(target.path, cwd, { trim: true });\n\t\tif (isSafeFilteredAgentDirTarget(target, path, agentDir)) return false;\n\t\treturn (\n\t\t\tisWithin(path, authPath) ||\n\t\t\tisWithin(authPath, path) ||\n\t\t\tisWithin(path, sessionsPath) ||\n\t\t\tisWithin(path, logsPath)\n\t\t);\n\t});\n}\n\nfunction pendingChanges(pending: ReadonlyMap<string, PendingChange>): Array<{\n\treadonly registrationId: string;\n\treadonly paths: readonly string[];\n}> {\n\treturn [...pending.values()].map((change) => ({\n\t\tregistrationId: change.registrationId,\n\t\tpaths: [...change.paths].sort(),\n\t}));\n}\n\nfunction compareSnapshots(previous: ReadonlyMap<string, string>, next: ReadonlyMap<string, string>): string[] {\n\tconst changed = new Set<string>();\n\tfor (const [path, hash] of next) {\n\t\tif (previous.get(path) !== hash) changed.add(path);\n\t}\n\tfor (const path of previous.keys()) {\n\t\tif (!next.has(path)) changed.add(path);\n\t}\n\treturn [...changed].sort();\n}\n\nfunction uniquePaths(paths: readonly string[]): string[] {\n\treturn [...new Set(paths)].sort();\n}\n\nfunction isWithin(path: string, root: string): boolean {\n\treturn path === root || path.startsWith(`${root}${sep}`);\n}\n\nfunction isPlainObject(value: unknown): value is Record<string, unknown> {\n\tif (typeof value !== \"object\" || value === null || Array.isArray(value)) return false;\n\tconst prototype = Object.getPrototypeOf(value);\n\treturn prototype === Object.prototype || prototype === null;\n}\n\nfunction errorMessage(error: unknown): string {\n\treturn error instanceof Error ? error.message : String(error);\n}\n\nfunction formatPaths(paths: readonly string[]): string {\n\treturn paths.length === 0 ? \"configuration\" : paths.join(\", \");\n}\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/core/extensions/builtin/config-reload/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAC9D,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,GAAG,EAAE,MAAM,WAAW,CAAC;AACtE,OAAO,EAAE,mBAAmB,EAAE,MAAM,2CAA2C,CAAC;AAChF,OAAO,EAAE,eAAe,EAA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C/C,OAAO,SAAS,KAAK,MAAM,CAAC,SAAS,IAAI,SAAS,KAAK,IAAI,CAAC;AAC7D,CAAC;AAED,SAAS,YAAY,CAAC,KAAc;IACnC,OAAO,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;AAC/D,CAAC;AAED,SAAS,WAAW,CAAC,KAAwB;IAC5C,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC,CAAC,CAAC,CAAC,eAAe,CAAC,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AAChE,CAAC","sourcesContent":["import { existsSync, lstatSync, readFileSync } from \"node:fs\";\nimport { basename, dirname, relative, resolve, sep } from \"node:path\";\nimport { bindToProviderScope } from \"@earendil-works/pi-ai/node/provider-scope\";\nimport { CONFIG_DIR_NAME, getAgentDir } from \"../../../../config.ts\";\nimport { resolvePath } from \"../../../../utils/paths.ts\";\nimport { ModelConfig } from \"../../../model-config.ts\";\nimport { parseSettingsJson, type Settings, SettingsManager, wasSelfWrite } from \"../../../settings-manager.ts\";\nimport type { ExtensionAPI, ExtensionContext, SessionStartEvent } from \"../../types.ts\";\nimport { isLoadableExtensionEntry, isScannableExtensionDirectory } from \"./extension-watch-scope.ts\";\nimport { excludeGeneratedExtensionShims } from \"./generated-shim-filter.ts\";\nimport { type ConfigReloadLogger, createConfigReloadLogger } from \"./log.ts\";\nimport {\n\tCONFIG_WATCH_CHANGED,\n\tCONFIG_WATCH_READY,\n\tCONFIG_WATCH_REGISTER,\n\tCONFIG_WATCH_REJECTED,\n\tCONFIG_WATCH_RELOADED,\n\tCONFIG_WATCH_UNREGISTER,\n\ttype ConfigWatchRegistration,\n\ttype ConfigWatchTarget,\n\tisConfigWatchRegistration,\n\tisConfigWatchUnregistration,\n\tisConfigWatchValidation,\n\tmatchesConfigWatchFilter,\n} from \"./protocol.ts\";\nimport { ReloadVetoDeferral } from \"./reload-deferral.ts\";\nimport {\n\texcludeRoutineOnlySettingsChanges,\n\tisSettingsPath,\n\tjoinConfigDir,\n\trefreshSettingsContentSnapshots,\n\tupdateSettingsContentSnapshot,\n} from \"./routine-settings.ts\";\nimport {\n\tConfigReloadWatchEngine,\n\tcreateFsWatchEventSource,\n\ttype RealChange,\n\ttype WatchClock,\n\ttype WatchEventSource,\n\ttype WatchTarget,\n} from \"./watch-engine.ts\";\n\nconst BUILTIN_REGISTRATION_ID = \"builtin\";\nconst DEFAULT_DEBOUNCE_MS = 200;\nconst COMPACTION_RECHECK_MS = 250;\nconst VETO_RECHECK_MS = 1000;\nconst CONFIG_FILE_NAMES = [\"settings.jsonc\", \"settings.json\", \"models.json\", \"keybindings.json\"] as const;\n\n/**\n * The engine applies one predicate to both file gating and directory descent, so\n * this must admit scannable directories in order to reach their entry files.\n */\nconst extensionWatchFilter =\n\t(extensionsDir: string) =>\n\t(relPath: string): boolean =>\n\t\tisLoadableExtensionEntry(extensionsDir, relPath) || isScannableExtensionDirectory(extensionsDir, relPath);\n\ntype ConfigReloadWatchSettings = {\n\treadonly settings?: boolean;\n\treadonly models?: boolean;\n\treadonly keybindings?: boolean;\n\treadonly prompts?: boolean;\n\treadonly skills?: boolean;\n\treadonly extensions?: boolean;\n};\n\ntype ConfigReloadSettingsPatch = {\n\treadonly enabled?: boolean;\n\treadonly debounceMs?: number;\n\treadonly watch?: ConfigReloadWatchSettings;\n};\n\n/** Keep config-reload's settings schema owned by the builtin while exposing it on Settings. */\ndeclare module \"../../../settings-manager.ts\" {\n\tinterface Settings {\n\t\tconfigReload?: ConfigReloadSettingsPatch;\n\t}\n}\n\ntype ResolvedConfigReloadSettings = {\n\treadonly enabled: boolean;\n\treadonly debounceMs: number;\n\treadonly watch: Required<ConfigReloadWatchSettings>;\n};\n\ntype WatchTargetInput = Omit<WatchTarget, \"id\">;\n\ntype ActiveTarget = {\n\treadonly registrationId: string;\n\treadonly target: WatchTarget;\n\t/** Presence targets rebuild the watcher set once this missing path appears. */\n\treadonly rearmOnCreation?: string;\n};\n\ntype PendingChange = {\n\treadonly registrationId: string;\n\treadonly paths: Set<string>;\n};\n\ntype ReloadHandoff = {\n\treadonly hashesAtRequest: ReadonlyMap<string, string>;\n\treadonly settingsContentsAtRequest: ReadonlyMap<string, string>;\n\treadonly requestedAt: number;\n\treadonly changes: readonly { readonly registrationId: string; readonly paths: readonly string[] }[];\n};\n\n/** Session-keyed handoffs survive replacement extension factories during reload. */\nexport class ConfigReloadHandoffRegistry<T> {\n\treadonly #handoffs = new Map<string, T>();\n\n\tset(sessionHandle: string, handoff: T): void {\n\t\tthis.#handoffs.set(sessionHandle, handoff);\n\t}\n\n\ttake(sessionHandle: string): T | undefined {\n\t\tconst handoff = this.#handoffs.get(sessionHandle);\n\t\tthis.#handoffs.delete(sessionHandle);\n\t\treturn handoff;\n\t}\n\n\tdelete(sessionHandle: string): void {\n\t\tthis.#handoffs.delete(sessionHandle);\n\t}\n}\n\nconst reloadHandoffs = new ConfigReloadHandoffRegistry<ReloadHandoff>();\n\nfunction bindExternalCallback<TArgs extends unknown[], TResult>(\n\tcallback: (...args: TArgs) => TResult,\n): (...args: TArgs) => TResult {\n\ttry {\n\t\treturn bindToProviderScope(callback);\n\t} catch {\n\t\treturn callback;\n\t}\n}\n\nexport interface ConfigReloadExtensionOptions {\n\treadonly agentDir?: string;\n\treadonly subscribe?: WatchEventSource;\n\treadonly clock?: WatchClock;\n\treadonly logger?: ConfigReloadLogger;\n\t/** Test seam. Production uses the watch engine's SHA-256 implementation. */\n\treadonly hashFile?: (path: string) => string;\n}\n\n/**\n * Watch config resources and request the host's existing full reload flow.\n *\n * The optional options are test seams. Production registration uses the default\n * filesystem event source and agent directory.\n */\nexport function configReloadExtension(pi: ExtensionAPI, options: ConfigReloadExtensionOptions = {}): void {\n\tconst sessionOwned = (() => {\n\t\ttry {\n\t\t\tbindToProviderScope(() => undefined);\n\t\t\treturn true;\n\t\t} catch {\n\t\t\treturn false;\n\t\t}\n\t})();\n\tconst handoffKey = (ctx: ExtensionContext): string => (sessionOwned ? ctx.sessionManager.getSessionId() : \"classic\");\n\tconst agentDir = resolve(options.agentDir ?? getAgentDir());\n\tconst subscribe = options.subscribe ?? createFsWatchEventSource();\n\tconst logger = options.logger ?? createConfigReloadLogger(agentDir);\n\tconst registrations = new Map<string, ConfigWatchRegistration>();\n\tconst rejectedRegistrations = new Map<string, string>();\n\t/** Last-seen settings.json contents per path; the diff base for routine-key classification. */\n\tconst settingsContents = new Map<string, string>();\n\tconst eventUnsubscribes: Array<() => void> = [];\n\tconst pending = new Map<string, PendingChange>();\n\tlet engine: ConfigReloadWatchEngine | undefined;\n\tlet activeTargets: ActiveTarget[] = [];\n\tlet currentContext: ExtensionContext | undefined;\n\tlet started = false;\n\tlet reloadInFlight = false;\n\tlet deferredNoticeShown = false;\n\tlet unavailableReloadLogged = false;\n\tlet compactionRecheck: ReturnType<typeof setTimeout> | undefined;\n\tlet vetoRecheck: ReturnType<typeof setTimeout> | undefined;\n\tconst vetoDeferral = new ReloadVetoDeferral();\n\tlet changeChain: Promise<void> = Promise.resolve();\n\n\t// The engine goes inert the moment close() is called; its unsubscribe loop can\n\t// take seconds per watcher, and session_shutdown is awaited by the reload flow.\n\tconst closeWatchers = (): void => {\n\t\tengine?.close().catch((error: unknown) => {\n\t\t\tlogger.error(\"watcher_error\", { path: \"watcher teardown\", message: errorMessage(error) });\n\t\t});\n\t\tengine = undefined;\n\t\tactiveTargets = [];\n\t};\n\n\tconst clearCompactionRecheck = (): void => {\n\t\tif (compactionRecheck === undefined) return;\n\t\t(options.clock ?? defaultClock).clearTimeout(compactionRecheck);\n\t\tcompactionRecheck = undefined;\n\t};\n\n\tconst clearVetoRecheck = (): void => {\n\t\tif (vetoRecheck === undefined) return;\n\t\t(options.clock ?? defaultClock).clearTimeout(vetoRecheck);\n\t\tvetoRecheck = undefined;\n\t};\n\n\tconst cleanupEventListeners = (): void => {\n\t\tfor (const unsubscribe of eventUnsubscribes.splice(0)) {\n\t\t\tunsubscribe();\n\t\t}\n\t};\n\n\tconst rejectRegistration = (registrationId: string, errors: readonly string[]): void => {\n\t\tpi.events.emit(CONFIG_WATCH_REJECTED, {\n\t\t\tregistrationId,\n\t\t\tpaths: [],\n\t\t\terrors: [...errors],\n\t\t});\n\t\tlogger.warn(\"registration_rejected\", { registrationId, errorCount: errors.length });\n\t};\n\n\tconst handleRegistration = (payload: unknown): void => {\n\t\tif (!isConfigWatchRegistration(payload)) return;\n\t\tconst fingerprint = registrationFingerprint(payload);\n\t\t// A component may synchronously re-register from a CONFIG_WATCH_REJECTED\n\t\t// listener (e.g. sticky-rejection recovery). Rejected registrations are\n\t\t// never stored, so the identity guard below cannot break that recursion;\n\t\t// ignoring an identical payload after one rejection does.\n\t\tif (rejectedRegistrations.get(payload.id) === fingerprint) {\n\t\t\tlogger.debug(\"registration_rejection_suppressed\", { registrationId: payload.id });\n\t\t\treturn;\n\t\t}\n\t\tconst cwd = currentContext?.cwd ?? process.cwd();\n\t\tif (registrationHasRestrictedTarget(payload, cwd, agentDir)) {\n\t\t\trejectedRegistrations.set(payload.id, fingerprint);\n\t\t\trejectRegistration(payload.id, [\"Configuration watch target is restricted\"]);\n\t\t\treturn;\n\t\t}\n\t\trejectedRegistrations.delete(payload.id);\n\n\t\t// A component may re-emit its unchanged registration when it receives the\n\t\t// ready event from rebuildWatchers. Rebuilding for that same payload emits\n\t\t// ready again and creates an unbounded synchronous rebuild loop.\n\t\tif (registrations.get(payload.id) === payload) return;\n\t\tregistrations.set(payload.id, payload);\n\t\tpending.delete(payload.id);\n\t\tlogger.info(\"registration_added\", { id: payload.id });\n\t\tif (started && currentContext) {\n\t\t\trebuildWatchers(currentContext);\n\t\t}\n\t};\n\n\tconst handleUnregistration = (payload: unknown): void => {\n\t\tif (!isConfigWatchUnregistration(payload)) return;\n\t\trejectedRegistrations.delete(payload.id);\n\t\tif (!registrations.delete(payload.id)) return;\n\t\tpending.delete(payload.id);\n\t\tlogger.info(\"registration_removed\", { id: payload.id });\n\t\tif (started && currentContext) {\n\t\t\trebuildWatchers(currentContext);\n\t\t}\n\t};\n\n\tconst processChange = async (change: RealChange): Promise<void> => {\n\t\tif (reloadInFlight || !currentContext) return;\n\t\t// Suppression state (self-write consumption, routine-diff base) is per path,\n\t\t// so it must be resolved before grouping: a path watched by several\n\t\t// registrations would otherwise be classified once per group and reach the\n\t\t// reload flow through the later group.\n\t\tconst watchedPaths = excludeSelfWrites(\n\t\t\tchange.changedPaths,\n\t\t\tengine,\n\t\t\tagentDir,\n\t\t\tcurrentContext.cwd,\n\t\t\tlogger,\n\t\t\tsettingsContents,\n\t\t);\n\t\tconst significantPaths = excludeRoutineOnlySettingsChanges(\n\t\t\twatchedPaths,\n\t\t\tsettingsContents,\n\t\t\tagentDir,\n\t\t\tcurrentContext.cwd,\n\t\t\tlogger,\n\t\t);\n\t\tconst configPaths = excludeGeneratedExtensionShims(significantPaths, agentDir);\n\t\tfor (const path of significantPaths) {\n\t\t\tif (!configPaths.includes(path)) logger.debug(\"generated_shim_change_suppressed\", { path });\n\t\t}\n\t\tconst groups = groupChangedPaths(configPaths, activeTargets);\n\t\tconst rearmDirectoryWatch = change.created.some((path) =>\n\t\t\tactiveTargets.some((target) => target.rearmOnCreation === resolve(path)),\n\t\t);\n\t\tfor (const [registrationId, paths] of groups) {\n\t\t\tconst errors = await validateChangedPaths(registrationId, paths, registrations, agentDir, currentContext.cwd);\n\t\t\tif (errors.length > 0) {\n\t\t\t\trejectChange(currentContext, registrationId, paths, errors, logger, pi);\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\taddPending(pending, registrationId, paths);\n\t\t\tconst deferred = !canRequestReload(currentContext);\n\t\t\tpi.events.emit(CONFIG_WATCH_CHANGED, {\n\t\t\t\tregistrationId,\n\t\t\t\tpaths: [...paths],\n\t\t\t\tdeferred,\n\t\t\t});\n\t\t\tlogger.info(\"change_detected\", { registrationId, paths, deferred });\n\t\t}\n\t\tif (rearmDirectoryWatch) rebuildWatchers(currentContext);\n\t\tawait flushPending();\n\t};\n\n\tconst enqueueChange = (change: RealChange): void => {\n\t\tif (reloadInFlight) return;\n\t\tchangeChain = changeChain\n\t\t\t.then(() => processChange(change))\n\t\t\t.catch((error: unknown) => {\n\t\t\t\tlogger.error(\"watcher_error\", { path: \"config reload\", message: errorMessage(error) });\n\t\t\t});\n\t};\n\n\tconst rebuildWatchers = (ctx: ExtensionContext): void => {\n\t\tcloseWatchers();\n\t\tclearCompactionRecheck();\n\t\tconst settingsManager = SettingsManager.create(ctx.cwd, agentDir, { projectTrusted: ctx.isProjectTrusted() });\n\t\tconst settings = resolveConfigReloadSettings(settingsManager);\n\t\tif (!settings.enabled || ctx.mode === \"print\" || ctx.mode === \"json\") {\n\t\t\tpi.events.emit(CONFIG_WATCH_READY, { enabled: false });\n\t\t\treturn;\n\t\t}\n\n\t\tactiveTargets = buildWatchTargets({\n\t\t\tcwd: ctx.cwd,\n\t\t\tagentDir,\n\t\t\tprojectTrusted: ctx.isProjectTrusted(),\n\t\t\tsettings,\n\t\t\tskillPaths: settings.watch.skills ? settingsManager.getSkillPaths() : [],\n\t\t\tregistrations,\n\t\t});\n\t\tengine = new ConfigReloadWatchEngine({\n\t\t\ttargets: activeTargets.map((entry) => entry.target),\n\t\t\tsubscribe,\n\t\t\tdebounceMs: settings.debounceMs,\n\t\t\tclock: options.clock,\n\t\t\thashFile: options.hashFile,\n\t\t\tonRealChange: bindExternalCallback(enqueueChange),\n\t\t\tonError: bindExternalCallback((error, path) => {\n\t\t\t\tlogger.error(\"watcher_error\", { path, message: errorMessage(error) });\n\t\t\t}),\n\t\t});\n\t\trefreshSettingsContentSnapshots(settingsContents, agentDir, ctx.cwd);\n\t\tlogger.info(\"watcher_started\", { targetCount: activeTargets.length });\n\t\tpi.events.emit(CONFIG_WATCH_READY, { enabled: true });\n\t};\n\n\tconst flushPending = async (): Promise<void> => {\n\t\tconst ctx = currentContext;\n\t\tif (!ctx || pending.size === 0 || reloadInFlight) return;\n\t\tif (!ctx.isIdle() || ctx.hasPendingMessages()) return;\n\t\tif (ctx.isCompacting?.() ?? false) {\n\t\t\tarmCompactionRecheck();\n\t\t\treturn;\n\t\t}\n\t\tclearCompactionRecheck();\n\t\tif (!ctx.requestReload) {\n\t\t\tif (!unavailableReloadLogged) {\n\t\t\t\tunavailableReloadLogged = true;\n\t\t\t\tlogger.info(\"reload_requested\", { reason: \"requestReload unavailable\", paths: [] });\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\n\t\t// Probe the extension veto (session_before_reload) BEFORE announcing the\n\t\t// reload: a vetoed hot-reload defers quietly (one notice per distinct\n\t\t// reason) and retries on later idle edges or the veto recheck clock,\n\t\t// instead of re-notifying \"Hot-reloading:\" plus the veto warning forever.\n\t\tif (ctx.checkReloadVeto) {\n\t\t\tconst veto = await ctx.checkReloadVeto();\n\t\t\tif (currentContext !== ctx || reloadInFlight || pending.size === 0) return;\n\t\t\tif (veto.cancelled) {\n\t\t\t\tconst notice = vetoDeferral.defer(veto.reason);\n\t\t\t\tif (notice) ctx.ui.notify(notice, \"info\");\n\t\t\t\tlogger.info(\"reload_deferred\", { reason: veto.reason ?? \"extension veto\" });\n\t\t\t\tarmVetoRecheck();\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t\tclearVetoRecheck();\n\t\tvetoDeferral.reset();\n\n\t\tconst changes = pendingChanges(pending);\n\t\tconst paths = uniquePaths(changes.flatMap((change) => change.paths));\n\t\treloadInFlight = true;\n\t\treloadHandoffs.set(handoffKey(ctx), {\n\t\t\thashesAtRequest: engine?.getBaselineSnapshot() ?? new Map<string, string>(),\n\t\t\tsettingsContentsAtRequest: new Map(settingsContents),\n\t\t\trequestedAt: Date.now(),\n\t\t\tchanges,\n\t\t});\n\t\tctx.ui.notify(`Hot-reloading: ${formatPaths(paths)}`, \"info\");\n\t\tlogger.info(\"reload_requested\", { reason: \"config changed\", paths });\n\n\t\tconst handoffKeyForReload = handoffKey(ctx);\n\t\ttry {\n\t\t\tawait ctx.requestReload();\n\t\t\treloadInFlight = false;\n\t\t\treloadHandoffs.delete(handoffKeyForReload);\n\t\t} catch (error) {\n\t\t\treloadInFlight = false;\n\t\t\treloadHandoffs.delete(handoffKeyForReload);\n\t\t\tlogger.error(\"watcher_error\", { path: \"reload\", message: errorMessage(error) });\n\t\t}\n\t};\n\n\tconst armCompactionRecheck = (): void => {\n\t\tif (compactionRecheck !== undefined) return;\n\t\tconst clock = options.clock ?? defaultClock;\n\t\tcompactionRecheck = clock.setTimeout(() => {\n\t\t\tcompactionRecheck = undefined;\n\t\t\tvoid flushPending();\n\t\t}, COMPACTION_RECHECK_MS);\n\t};\n\n\tconst armVetoRecheck = (): void => {\n\t\tif (vetoRecheck !== undefined) return;\n\t\tconst clock = options.clock ?? defaultClock;\n\t\tvetoRecheck = clock.setTimeout(() => {\n\t\t\tvetoRecheck = undefined;\n\t\t\tvoid flushPending();\n\t\t}, VETO_RECHECK_MS);\n\t};\n\n\tconst processReloadHandoff = async (event: SessionStartEvent, ctx: ExtensionContext): Promise<void> => {\n\t\tif (event.reason !== \"reload\") return;\n\t\tconst handoff = reloadHandoffs.take(handoffKey(ctx));\n\t\tif (!handoff) return;\n\t\tconst paths = uniquePaths(handoff.changes.flatMap((change) => change.paths));\n\t\tfor (const change of handoff.changes) {\n\t\t\tpi.events.emit(CONFIG_WATCH_RELOADED, {\n\t\t\t\tregistrationId: change.registrationId,\n\t\t\t\tpaths: [...change.paths],\n\t\t\t});\n\t\t}\n\t\tctx.ui.notify(`Hot-reloaded: ${formatPaths(paths)}`, \"info\");\n\t\tlogger.info(\"reload_completed\", { durationMs: Math.max(0, Date.now() - handoff.requestedAt) });\n\n\t\tconst changedPaths = compareSnapshots(handoff.hashesAtRequest, engine?.getBaselineSnapshot() ?? new Map());\n\t\tif (changedPaths.length > 0) {\n\t\t\tsettingsContents.clear();\n\t\t\tfor (const [path, content] of handoff.settingsContentsAtRequest) settingsContents.set(path, content);\n\t\t\tenqueueChange({ changedPaths, created: [], deleted: [] });\n\t\t\tawait changeChain;\n\t\t}\n\t};\n\n\teventUnsubscribes.push(pi.events.on(CONFIG_WATCH_REGISTER, handleRegistration));\n\teventUnsubscribes.push(pi.events.on(CONFIG_WATCH_UNREGISTER, handleUnregistration));\n\n\tpi.on(\"session_start\", async (event, ctx) => {\n\t\tstarted = true;\n\t\tcurrentContext = ctx;\n\t\trebuildWatchers(ctx);\n\t\tawait processReloadHandoff(event, ctx);\n\t});\n\n\tpi.on(\"agent_end\", async (_event, ctx) => {\n\t\tcurrentContext = ctx;\n\t\tawait flushPending();\n\t});\n\tpi.on(\"agent_settled\", async (_event, ctx) => {\n\t\tcurrentContext = ctx;\n\t\tawait flushPending();\n\t});\n\tpi.on(\"project_trust\", () => {\n\t\tif (currentContext) rebuildWatchers(currentContext);\n\t\treturn { trusted: \"undecided\" };\n\t});\n\tpi.on(\"session_shutdown\", (event) => {\n\t\tconst closingContext = currentContext;\n\t\tstarted = false;\n\t\tcurrentContext = undefined;\n\t\tcloseWatchers();\n\t\tclearCompactionRecheck();\n\t\tclearVetoRecheck();\n\t\tvetoDeferral.reset();\n\t\tcleanupEventListeners();\n\t\tpending.clear();\n\t\tif (event.reason !== \"reload\" && closingContext) reloadHandoffs.delete(handoffKey(closingContext));\n\t});\n\n\tfunction canRequestReload(ctx: ExtensionContext): boolean {\n\t\treturn (\n\t\t\tctx.isIdle() &&\n\t\t\t!ctx.hasPendingMessages() &&\n\t\t\t!(ctx.isCompacting?.() ?? false) &&\n\t\t\tctx.requestReload !== undefined\n\t\t);\n\t}\n\n\tfunction armDeferredNotice(ctx: ExtensionContext): void {\n\t\tif (deferredNoticeShown || pending.size === 0 || !ctx.requestReload) return;\n\t\tdeferredNoticeShown = true;\n\t\tctx.ui.notify(\"Config changed; reloading when idle\", \"info\");\n\t}\n\n\tfunction rejectChange(\n\t\tctx: ExtensionContext,\n\t\tregistrationId: string,\n\t\tpaths: readonly string[],\n\t\terrors: readonly string[],\n\t\tactiveLogger: ConfigReloadLogger,\n\t\tapi: ExtensionAPI,\n\t): void {\n\t\tctx.ui.notify(`Config change rejected: ${errors.join(\"; \")}`, \"error\");\n\t\tapi.events.emit(CONFIG_WATCH_REJECTED, { registrationId, paths: [...paths], errors: [...errors] });\n\t\tactiveLogger.warn(\"validation_rejected\", { registrationId, errorCount: errors.length });\n\t}\n\n\tfunction addPending(changes: Map<string, PendingChange>, registrationId: string, paths: readonly string[]): void {\n\t\tconst pendingChange = changes.get(registrationId) ?? { registrationId, paths: new Set<string>() };\n\t\tfor (const path of paths) pendingChange.paths.add(path);\n\t\tchanges.set(registrationId, pendingChange);\n\t\tif (!canRequestReload(currentContext!)) armDeferredNotice(currentContext!);\n\t}\n}\n\nexport default configReloadExtension;\n\nconst defaultClock: WatchClock = {\n\tsetTimeout: (callback, delayMs) => setTimeout(callback, delayMs),\n\tclearTimeout: (timer) => clearTimeout(timer),\n};\n\nfunction resolveConfigReloadSettings(settingsManager: SettingsManager): ResolvedConfigReloadSettings {\n\tconst global = readConfigReloadPatch(settingsManager.getGlobalSettings());\n\tconst project = readConfigReloadPatch(settingsManager.getProjectSettings());\n\treturn {\n\t\tenabled: project.enabled ?? global.enabled ?? true,\n\t\tdebounceMs: project.debounceMs ?? global.debounceMs ?? DEFAULT_DEBOUNCE_MS,\n\t\twatch: {\n\t\t\tsettings: project.watch?.settings ?? global.watch?.settings ?? true,\n\t\t\tmodels: project.watch?.models ?? global.watch?.models ?? true,\n\t\t\tkeybindings: project.watch?.keybindings ?? global.watch?.keybindings ?? true,\n\t\t\tprompts: project.watch?.prompts ?? global.watch?.prompts ?? true,\n\t\t\tskills: project.watch?.skills ?? global.watch?.skills ?? true,\n\t\t\textensions: project.watch?.extensions ?? global.watch?.extensions ?? true,\n\t\t},\n\t};\n}\n\nfunction readConfigReloadPatch(settings: Settings): ConfigReloadSettingsPatch {\n\tconst candidate: unknown = settings.configReload;\n\tif (!isPlainObject(candidate)) return {};\n\tconst watch = isPlainObject(candidate.watch) ? candidate.watch : undefined;\n\treturn {\n\t\tenabled: typeof candidate.enabled === \"boolean\" ? candidate.enabled : undefined,\n\t\tdebounceMs: validDebounce(candidate.debounceMs),\n\t\twatch: watch\n\t\t\t? {\n\t\t\t\t\tsettings: booleanOrUndefined(watch.settings),\n\t\t\t\t\tmodels: booleanOrUndefined(watch.models),\n\t\t\t\t\tkeybindings: booleanOrUndefined(watch.keybindings),\n\t\t\t\t\tprompts: booleanOrUndefined(watch.prompts),\n\t\t\t\t\tskills: booleanOrUndefined(watch.skills),\n\t\t\t\t\textensions: booleanOrUndefined(watch.extensions),\n\t\t\t\t}\n\t\t\t: undefined,\n\t};\n}\n\nfunction validDebounce(value: unknown): number | undefined {\n\tif (typeof value !== \"number\" || !Number.isFinite(value) || value < 0) return undefined;\n\treturn Math.floor(value);\n}\n\nfunction booleanOrUndefined(value: unknown): boolean | undefined {\n\treturn typeof value === \"boolean\" ? value : undefined;\n}\n\nfunction buildWatchTargets(options: {\n\treadonly cwd: string;\n\treadonly agentDir: string;\n\treadonly projectTrusted: boolean;\n\treadonly settings: ResolvedConfigReloadSettings;\n\treadonly skillPaths: readonly string[];\n\treadonly registrations: ReadonlyMap<string, ConfigWatchRegistration>;\n}): ActiveTarget[] {\n\tconst targets: ActiveTarget[] = [];\n\tconst addBuiltin = (id: string, target: WatchTargetInput, rearmOnCreation?: string): void => {\n\t\ttargets.push({ registrationId: BUILTIN_REGISTRATION_ID, target: { ...target, id }, rearmOnCreation });\n\t};\n\tconst addBuiltinDirectory = (id: string, path: string, filter?: (relPath: string) => boolean): void => {\n\t\tconst resourcePath = resolve(path);\n\t\tif (isExistingDirectory(resourcePath)) {\n\t\t\taddBuiltin(\n\t\t\t\tid,\n\t\t\t\tfilter\n\t\t\t\t\t? { kind: \"dir-recursive\", path: resourcePath, filter }\n\t\t\t\t\t: { kind: \"dir-recursive\", path: resourcePath },\n\t\t\t);\n\t\t\treturn;\n\t\t}\n\t\tconst watchPath = nearestExistingDirectory(dirname(resourcePath));\n\t\tconst firstMissingSegment = relative(watchPath, resourcePath).split(sep)[0] || basename(resourcePath);\n\t\tconst createdPath = resolve(watchPath, firstMissingSegment);\n\t\taddBuiltin(\n\t\t\t`${id}-presence`,\n\t\t\t{\n\t\t\t\tkind: \"dir\",\n\t\t\t\tpath: watchPath,\n\t\t\t\tallowList: [firstMissingSegment],\n\t\t\t},\n\t\t\tcreatedPath,\n\t\t);\n\t};\n\tconst { cwd, agentDir, projectTrusted, settings } = options;\n\tconst projectDir = joinConfigDir(cwd);\n\n\tconst jsonAllowList = CONFIG_FILE_NAMES.filter((name) => {\n\t\tif (name === \"settings.json\" || name === \"settings.jsonc\") return settings.watch.settings;\n\t\tif (name === \"models.json\") return settings.watch.models;\n\t\treturn settings.watch.keybindings;\n\t});\n\tif (jsonAllowList.length > 0) {\n\t\taddBuiltin(\"builtin-global-json\", { kind: \"dir\", path: agentDir, allowList: jsonAllowList });\n\t}\n\tif (settings.watch.prompts) {\n\t\taddBuiltinDirectory(\"builtin-global-prompts\", resolve(agentDir, \"prompts\"));\n\t}\n\tif (settings.watch.extensions) {\n\t\tconst globalExtensionsDir = resolve(agentDir, \"extensions\");\n\t\taddBuiltinDirectory(\"builtin-global-extensions\", globalExtensionsDir, extensionWatchFilter(globalExtensionsDir));\n\t}\n\tif (settings.watch.skills) {\n\t\tfor (const [index, skillPath] of options.skillPaths.entries()) {\n\t\t\tconst target = targetForSkillPath(resolvePath(skillPath, cwd, { trim: true }));\n\t\t\tif (target.kind === \"dir-recursive\") {\n\t\t\t\taddBuiltinDirectory(`builtin-skill-${index}`, target.path);\n\t\t\t} else {\n\t\t\t\taddBuiltin(`builtin-skill-${index}`, target);\n\t\t\t}\n\t\t}\n\t}\n\n\tif (projectTrusted) {\n\t\tconst projectDirExists = isExistingDirectory(projectDir);\n\t\tconst projectWatchEnabled = Object.values(settings.watch).some(Boolean);\n\t\tif (projectWatchEnabled) {\n\t\t\taddBuiltin(\n\t\t\t\t\"builtin-project-presence\",\n\t\t\t\t{ kind: \"dir\", path: cwd, allowList: [CONFIG_DIR_NAME] },\n\t\t\t\tprojectDirExists ? undefined : projectDir,\n\t\t\t);\n\t\t}\n\t\tif (projectDirExists) {\n\t\t\tif (settings.watch.settings) {\n\t\t\t\taddBuiltin(\"builtin-project-settings\", {\n\t\t\t\t\tkind: \"dir\",\n\t\t\t\t\tpath: projectDir,\n\t\t\t\t\tallowList: [\"settings.jsonc\", \"settings.json\"],\n\t\t\t\t});\n\t\t\t}\n\t\t\tif (settings.watch.prompts) {\n\t\t\t\taddBuiltinDirectory(\"builtin-project-prompts\", resolve(projectDir, \"prompts\"));\n\t\t\t}\n\t\t\tif (settings.watch.skills) {\n\t\t\t\taddBuiltinDirectory(\"builtin-project-skills\", resolve(projectDir, \"skills\"));\n\t\t\t}\n\t\t\tif (settings.watch.extensions) {\n\t\t\t\tconst projectExtensionsDir = resolve(projectDir, \"extensions\");\n\t\t\t\taddBuiltinDirectory(\n\t\t\t\t\t\"builtin-project-extensions\",\n\t\t\t\t\tprojectExtensionsDir,\n\t\t\t\t\textensionWatchFilter(projectExtensionsDir),\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\t}\n\n\tfor (const registration of options.registrations.values()) {\n\t\tfor (const [index, target] of registration.targets.entries()) {\n\t\t\tconst path = resolvePath(target.path, cwd, { trim: true });\n\t\t\tconst watchTarget = externalTargetToWatchTarget(path, target.kind, target.filterGlobs);\n\t\t\ttargets.push({\n\t\t\t\tregistrationId: registration.id,\n\t\t\t\ttarget: { ...watchTarget, id: `external-${registration.id}-${index}` },\n\t\t\t});\n\t\t}\n\t}\n\treturn targets;\n}\n\nfunction isExistingDirectory(path: string): boolean {\n\ttry {\n\t\treturn lstatSync(path).isDirectory();\n\t} catch {\n\t\treturn false;\n\t}\n}\n\nfunction nearestExistingDirectory(path: string): string {\n\tlet candidate = resolve(path);\n\twhile (!isExistingDirectory(candidate)) {\n\t\tconst parent = dirname(candidate);\n\t\tif (parent === candidate) return candidate;\n\t\tcandidate = parent;\n\t}\n\treturn candidate;\n}\n\nfunction targetForSkillPath(path: string): WatchTargetInput {\n\ttry {\n\t\tif (lstatSync(path).isFile()) {\n\t\t\treturn { kind: \"dir\", path: dirname(path), allowList: [basename(path)] };\n\t\t}\n\t} catch {\n\t\t// A missing configured skill path is treated as a directory so it becomes watchable when present.\n\t}\n\treturn { kind: \"dir-recursive\", path };\n}\n\nfunction externalTargetToWatchTarget(\n\tpath: string,\n\tkind: \"file\" | \"dir\",\n\tfilterGlobs: readonly string[] | undefined,\n): WatchTargetInput {\n\tif (kind === \"file\") {\n\t\tconst name = basename(path);\n\t\treturn {\n\t\t\tkind: \"dir\",\n\t\t\tpath: dirname(path),\n\t\t\tallowList: [name],\n\t\t\tfilter: (relativePath) => relativePath === name && matchesConfigWatchFilter(relativePath, filterGlobs),\n\t\t};\n\t}\n\treturn {\n\t\tkind: \"dir-recursive\",\n\t\tpath,\n\t\t// Literal filters also declare explicitly watched dot-directories. Without\n\t\t// this, an external ancestor target filtered to \".omo\" drops its creation\n\t\t// event before the validator can inspect the new config beneath it.\n\t\tallowList: literalFilterNames(filterGlobs),\n\t\tfilter: (relativePath) => matchesConfigWatchFilter(relativePath, filterGlobs),\n\t};\n}\n\nfunction literalFilterNames(filterGlobs: readonly string[] | undefined): string[] | undefined {\n\tif (!filterGlobs) return undefined;\n\t// A root-anchored glob names a literal path relative to the watch root, so\n\t// strip the anchor before the separator check rejects it.\n\tconst literalNames = filterGlobs\n\t\t.map((filterGlob) => (filterGlob.startsWith(\"/\") ? filterGlob.slice(1) : filterGlob))\n\t\t.filter((filterGlob) => !filterGlob.includes(\"*\") && !filterGlob.includes(\"/\") && !filterGlob.includes(\"\\\\\\\\\"));\n\treturn literalNames.length > 0 ? literalNames : undefined;\n}\n\nfunction groupChangedPaths(paths: readonly string[], targets: readonly ActiveTarget[]): Map<string, string[]> {\n\tconst groups = new Map<string, string[]>();\n\tfor (const path of paths) {\n\t\tlet matched = false;\n\t\tfor (const activeTarget of targets) {\n\t\t\tif (!targetMatchesPath(activeTarget.target, path)) continue;\n\t\t\tconst group = groups.get(activeTarget.registrationId) ?? [];\n\t\t\tif (!group.includes(path)) group.push(path);\n\t\t\tgroups.set(activeTarget.registrationId, group);\n\t\t\tmatched = true;\n\t\t}\n\t\tif (!matched) {\n\t\t\tconst group = groups.get(BUILTIN_REGISTRATION_ID) ?? [];\n\t\t\tgroup.push(path);\n\t\t\tgroups.set(BUILTIN_REGISTRATION_ID, group);\n\t\t}\n\t}\n\treturn groups;\n}\n\nfunction targetMatchesPath(target: WatchTarget, path: string): boolean {\n\tconst relativePath = relative(resolve(target.path), resolve(path));\n\tif (relativePath === \"..\" || relativePath.startsWith(`..${sep}`)) return false;\n\tif (target.kind === \"dir\" && relativePath.includes(sep)) return false;\n\tif (\n\t\ttarget.allowList &&\n\t\t!target.allowList.some((allowed) => relativePath === allowed || relativePath.startsWith(`${allowed}${sep}`))\n\t) {\n\t\treturn false;\n\t}\n\treturn target.filter?.(relativePath) ?? true;\n}\n\nfunction excludeSelfWrites(\n\tpaths: readonly string[],\n\tengine: ConfigReloadWatchEngine | undefined,\n\tagentDir: string,\n\tcwd: string,\n\tlogger: ConfigReloadLogger,\n\tsettingsContents: Map<string, string>,\n): string[] {\n\tconst snapshot = engine?.getBaselineSnapshot();\n\treturn paths.filter((path) => {\n\t\tif (!isSettingsPath(path, agentDir, cwd)) return true;\n\t\tconst hash = snapshot?.get(path);\n\t\tif (hash === undefined || !wasSelfWrite(path, hash)) return true;\n\t\tlogger.debug(\"self_write_suppressed\", { path });\n\t\t// Advance the routine-diff base so a later external change is not\n\t\t// polluted by this session's own just-applied write.\n\t\tupdateSettingsContentSnapshot(settingsContents, path);\n\t\treturn false;\n\t});\n}\n\nasync function validateChangedPaths(\n\tregistrationId: string,\n\tpaths: readonly string[],\n\tregistrations: ReadonlyMap<string, ConfigWatchRegistration>,\n\tagentDir: string,\n\tcwd: string,\n): Promise<string[]> {\n\tif (registrationId === BUILTIN_REGISTRATION_ID) {\n\t\treturn validateBuiltinPaths(paths, agentDir, cwd);\n\t}\n\tconst registration = registrations.get(registrationId);\n\tif (!registration?.validate) return [];\n\ttry {\n\t\tconst result = await registration.validate(paths);\n\t\tif (!isConfigWatchValidation(result)) return [\"Configuration validator returned an invalid result\"];\n\t\treturn result.ok ? [] : result.errors;\n\t} catch (error) {\n\t\treturn [errorMessage(error)];\n\t}\n}\n\nfunction validateBuiltinPaths(paths: readonly string[], agentDir: string, cwd: string): string[] {\n\tconst errors: string[] = [];\n\tfor (const path of paths) {\n\t\tif (isSettingsPath(path, agentDir, cwd)) {\n\t\t\tconst error = validateSettingsFile(path);\n\t\t\tif (error) errors.push(error);\n\t\t\tcontinue;\n\t\t}\n\t\tif (resolve(path) === resolve(agentDir, \"models.json\")) {\n\t\t\tconst error = ModelConfig.loadSync(path).getError();\n\t\t\tif (error) errors.push(error);\n\t\t\tcontinue;\n\t\t}\n\t\tif (resolve(path) === resolve(agentDir, \"keybindings.json\")) {\n\t\t\tconst error = validateKeybindingsFile(path);\n\t\t\tif (error) errors.push(error);\n\t\t}\n\t}\n\treturn errors;\n}\n\nfunction validateSettingsFile(path: string): string | undefined {\n\tif (!existsSync(path)) return undefined;\n\ttry {\n\t\tconst parsed = parseSettingsJson(readFileSync(path, \"utf-8\"));\n\t\t// Keep validation aligned with SettingsManager's loader and migrations without duplicating migration rules.\n\t\tSettingsManager.inMemory(parsed as Partial<Settings>);\n\t\treturn undefined;\n\t} catch (error) {\n\t\treturn `Invalid ${basename(path)}: ${errorMessage(error)}`;\n\t}\n}\n\nfunction validateKeybindingsFile(path: string): string | undefined {\n\tif (!existsSync(path)) return undefined;\n\ttry {\n\t\tconst parsed: unknown = JSON.parse(readFileSync(path, \"utf-8\"));\n\t\tif (!isPlainObject(parsed)) return \"keybindings.json must contain an object\";\n\t\tfor (const value of Object.values(parsed)) {\n\t\t\tif (typeof value === \"string\") continue;\n\t\t\tif (Array.isArray(value) && value.every((entry) => typeof entry === \"string\")) continue;\n\t\t\treturn \"keybindings.json bindings must be strings or string arrays\";\n\t\t}\n\t\treturn undefined;\n\t} catch (error) {\n\t\treturn `Invalid keybindings.json: ${errorMessage(error)}`;\n\t}\n}\n\nfunction registrationFingerprint(registration: ConfigWatchRegistration): string {\n\treturn JSON.stringify({\n\t\tid: registration.id,\n\t\tdisplayName: registration.displayName,\n\t\ttargets: registration.targets.map((target) => ({\n\t\t\tpath: target.path,\n\t\t\tkind: target.kind,\n\t\t\tfilterGlobs: target.filterGlobs ?? null,\n\t\t})),\n\t\thasValidate: registration.validate !== undefined,\n\t});\n}\n\n// A directory target that covers a protected path is safe when every filter is\n// root-anchored (a leading `/` matches only a path relative to the watch root,\n// never a suffix at any depth) and none of those anchored paths intersects a\n// protected path in either direction. Unfiltered targets, unanchored filters,\n// and any protected filter stay fail-closed.\nfunction isSafeFilteredProtectedTarget(\n\ttarget: ConfigWatchTarget,\n\tresolvedPath: string,\n\tprotectedPaths: readonly string[],\n): boolean {\n\tif (target.kind !== \"dir\") return false;\n\tif (protectedPaths.some((protectedPath) => isWithin(resolvedPath, protectedPath))) return false;\n\tconst filterGlobs = target.filterGlobs;\n\tif (!filterGlobs || filterGlobs.length === 0) return false;\n\treturn filterGlobs.every((glob) => {\n\t\tif (!glob.startsWith(\"/\")) return false;\n\t\tconst filteredPath = resolve(resolvedPath, glob.slice(1));\n\t\treturn protectedPaths.every(\n\t\t\t(protectedPath) => !isWithin(filteredPath, protectedPath) && !isWithin(protectedPath, filteredPath),\n\t\t);\n\t});\n}\n\nfunction registrationHasRestrictedTarget(\n\tregistration: ConfigWatchRegistration,\n\tcwd: string,\n\tagentDir: string,\n): boolean {\n\tconst protectedPaths = [resolve(agentDir, \"auth.json\"), resolve(agentDir, \"sessions\"), resolve(agentDir, \"logs\")];\n\treturn registration.targets.some((target) => {\n\t\tconst path = resolvePath(target.path, cwd, { trim: true });\n\t\tif (isSafeFilteredProtectedTarget(target, path, protectedPaths)) return false;\n\t\treturn protectedPaths.some((protectedPath) => isWithin(path, protectedPath) || isWithin(protectedPath, path));\n\t});\n}\n\nfunction pendingChanges(pending: ReadonlyMap<string, PendingChange>): Array<{\n\treadonly registrationId: string;\n\treadonly paths: readonly string[];\n}> {\n\treturn [...pending.values()].map((change) => ({\n\t\tregistrationId: change.registrationId,\n\t\tpaths: [...change.paths].sort(),\n\t}));\n}\n\nfunction compareSnapshots(previous: ReadonlyMap<string, string>, next: ReadonlyMap<string, string>): string[] {\n\tconst changed = new Set<string>();\n\tfor (const [path, hash] of next) {\n\t\tif (previous.get(path) !== hash) changed.add(path);\n\t}\n\tfor (const path of previous.keys()) {\n\t\tif (!next.has(path)) changed.add(path);\n\t}\n\treturn [...changed].sort();\n}\n\nfunction uniquePaths(paths: readonly string[]): string[] {\n\treturn [...new Set(paths)].sort();\n}\n\nfunction isWithin(path: string, root: string): boolean {\n\treturn path === root || path.startsWith(`${root}${sep}`);\n}\n\nfunction isPlainObject(value: unknown): value is Record<string, unknown> {\n\tif (typeof value !== \"object\" || value === null || Array.isArray(value)) return false;\n\tconst prototype = Object.getPrototypeOf(value);\n\treturn prototype === Object.prototype || prototype === null;\n}\n\nfunction errorMessage(error: unknown): string {\n\treturn error instanceof Error ? error.message : String(error);\n}\n\nfunction formatPaths(paths: readonly string[]): string {\n\treturn paths.length === 0 ? \"configuration\" : paths.join(\", \");\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"monitor-continuation.d.ts","sourceRoot":"","sources":["../../../../../src/core/extensions/builtin/goal/monitor-continuation.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAarE,OAAO,EAAE,2CAA2C,EAAE,MAAM,iBAAiB,CAAC;AAkB9E,OAAO,KAAK,EACX,eAAe,EAIf,uBAAuB,EAEvB,kBAAkB,EAClB,MAAM,iCAAiC,CAAC;AAKzC,OAAO,KAAK,EAAE,IAAI,EAAsB,MAAM,YAAY,CAAC;AAC3D,OAAO,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AI;IAMtC,mGAAmG;IACnG,eAAe,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI;IAwBtC,6FAA6F;IAC7F,kBAAkB,CAAC,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,OAAO,GAAG,IAAI;IAc5D,sEAAsE;IACtE,cAAc,IAAI,IAAI;IAOtB,mGAAmG;IACnG,uBAAuB,IAAI,IAAI;IAI/B,OAAO,IAAI,IAAI;CAkWf"}
@@ -5,6 +5,7 @@ import { continuationTurnUsedTools, evaluateGoalContinuation, GOAL_USER_GRACE_DE
5
5
  import { lastAssistantMessage } from "./last-assistant-message.js";
6
6
  import { admitAndQueueGoalContinuation, buildCurrentGoalContinuationSignature, lastAssistantText, } from "./lifecycle-helpers.js";
7
7
  import { buildContinuationPrompt, buildGoalStallNotice, buildTruncationRecoveryPrompt } from "./prompt.js";
8
+ import { isStaleExtensionContextError } from "./stale-context.js";
8
9
  import { resetContinuationStreak } from "./store.js";
9
10
  import { goalStoreRef } from "./store-ref.js";
10
11
  import { collectAssistantUsage } from "./turn-usage.js";
@@ -300,10 +301,28 @@ export class MonitorAwareGoalContinuation {
300
301
  }
301
302
  this.#armTimer(kind, delayMs, delayMs);
302
303
  }
304
+ /**
305
+ * `hasUI` is an `assertActive()`-guarded getter, so a ctx retired by session
306
+ * replacement or reload THROWS instead of reporting false. Optional chaining
307
+ * only guards an undefined ctx (what `dispose()` leaves behind), never a stale
308
+ * object left by a replacement that never disposed this monitor. Callers reach
309
+ * this from timer and event callbacks where a throw is fatal, so a retired ctx
310
+ * reports "no UI" and any other failure keeps its current behavior.
311
+ */
312
+ #ctxHasUI(ctx = this.#ctx) {
313
+ try {
314
+ return ctx?.hasUI === true;
315
+ }
316
+ catch (error) {
317
+ if (isStaleExtensionContextError(error))
318
+ return false;
319
+ throw error;
320
+ }
321
+ }
303
322
  #armTimer(kind, delayMs, totalMs, drainFire = false) {
304
323
  this.#scheduledDueAtMs = Date.now() + delayMs;
305
324
  const ctx = this.#ctx;
306
- if (ctx?.hasUI) {
325
+ if (ctx !== undefined && this.#ctxHasUI(ctx)) {
307
326
  this.#waitTicker?.sync(ctx, {
308
327
  kind,
309
328
  remainingMs: delayMs,
@@ -313,10 +332,14 @@ export class MonitorAwareGoalContinuation {
313
332
  }
314
333
  this.#timer = setTimeout(() => {
315
334
  void this.#continueIfEligible(kind, drainFire).catch((error) => {
316
- if (this.#ctx?.hasUI) {
317
- const message = error instanceof Error ? error.message : String(error);
318
- this.#ctx.ui.notify(`Goal continuation delivery failed: ${message}`, "error");
319
- }
335
+ // Runs from a bare setTimeout: anything thrown here escapes as an
336
+ // uncaughtException and kills the session. A retired ctx cannot be
337
+ // notified, and its own staleness is the expected cause of this
338
+ // rejection after a session replacement, so drop it quietly.
339
+ if (isStaleExtensionContextError(error) || !this.#ctxHasUI())
340
+ return;
341
+ const message = error instanceof Error ? error.message : String(error);
342
+ this.#ctx?.ui.notify(`Goal continuation delivery failed: ${message}`, "error");
320
343
  });
321
344
  }, delayMs);
322
345
  }
@@ -420,7 +443,7 @@ export class MonitorAwareGoalContinuation {
420
443
  consecutiveContinuations: this.#toollessContinuationStreak,
421
444
  toolless: true,
422
445
  });
423
- if (ctx.hasUI) {
446
+ if (this.#ctxHasUI(ctx)) {
424
447
  const context = liveSources.length > 0 ? `while ${liveSources.join(", ")} channels stayed active` : "without tool use";
425
448
  ctx.ui.notify(`Goal continuation repeated ${this.#toollessContinuationStreak} toolless turns ${context} - injected a stall check.`, "info");
426
449
  }