@code-yeongyu/senpi 2026.8.24 → 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 (1610) hide show
  1. package/CHANGELOG.md +118 -0
  2. package/dist/cli/args.d.ts.map +1 -1
  3. package/dist/cli/args.js +24 -9
  4. package/dist/cli/args.js.map +1 -1
  5. package/dist/cli/file-processor.d.ts.map +1 -1
  6. package/dist/cli/file-processor.js +2 -1
  7. package/dist/cli/file-processor.js.map +1 -1
  8. package/dist/config.d.ts +6 -3
  9. package/dist/config.d.ts.map +1 -1
  10. package/dist/config.js +24 -14
  11. package/dist/config.js.map +1 -1
  12. package/dist/core/agent-abort-provenance.d.ts.map +1 -1
  13. package/dist/core/agent-abort-provenance.js +5 -1
  14. package/dist/core/agent-abort-provenance.js.map +1 -1
  15. package/dist/core/agent-session.d.ts +11 -0
  16. package/dist/core/agent-session.d.ts.map +1 -1
  17. package/dist/core/agent-session.js +164 -30
  18. package/dist/core/agent-session.js.map +1 -1
  19. package/dist/core/auth-storage.d.ts +4 -0
  20. package/dist/core/auth-storage.d.ts.map +1 -1
  21. package/dist/core/auth-storage.js +35 -8
  22. package/dist/core/auth-storage.js.map +1 -1
  23. package/dist/core/brand.d.ts +2 -0
  24. package/dist/core/brand.d.ts.map +1 -1
  25. package/dist/core/brand.js +1 -0
  26. package/dist/core/brand.js.map +1 -1
  27. package/dist/core/compaction/compaction.d.ts +1 -0
  28. package/dist/core/compaction/compaction.d.ts.map +1 -1
  29. package/dist/core/compaction/compaction.js +24 -8
  30. package/dist/core/compaction/compaction.js.map +1 -1
  31. package/dist/core/defaults.d.ts +1 -0
  32. package/dist/core/defaults.d.ts.map +1 -1
  33. package/dist/core/defaults.js +9 -0
  34. package/dist/core/defaults.js.map +1 -1
  35. package/dist/core/extensions/builtin/compaction/index.d.ts.map +1 -1
  36. package/dist/core/extensions/builtin/compaction/index.js +67 -0
  37. package/dist/core/extensions/builtin/compaction/index.js.map +1 -1
  38. package/dist/core/extensions/builtin/compaction/log.d.ts +1 -1
  39. package/dist/core/extensions/builtin/compaction/log.d.ts.map +1 -1
  40. package/dist/core/extensions/builtin/compaction/log.js +1 -0
  41. package/dist/core/extensions/builtin/compaction/log.js.map +1 -1
  42. package/dist/core/extensions/builtin/compaction/per-turn-cap.d.ts +5 -9
  43. package/dist/core/extensions/builtin/compaction/per-turn-cap.d.ts.map +1 -1
  44. package/dist/core/extensions/builtin/compaction/per-turn-cap.js +5 -11
  45. package/dist/core/extensions/builtin/compaction/per-turn-cap.js.map +1 -1
  46. package/dist/core/extensions/builtin/compaction/todo-bridge.d.ts +2 -3
  47. package/dist/core/extensions/builtin/compaction/todo-bridge.d.ts.map +1 -1
  48. package/dist/core/extensions/builtin/compaction/todo-bridge.js +53 -14
  49. package/dist/core/extensions/builtin/compaction/todo-bridge.js.map +1 -1
  50. package/dist/core/extensions/builtin/config-reload/index.js +14 -22
  51. package/dist/core/extensions/builtin/config-reload/index.js.map +1 -1
  52. package/dist/core/extensions/builtin/goal/monitor-continuation.d.ts.map +1 -1
  53. package/dist/core/extensions/builtin/goal/monitor-continuation.js +29 -6
  54. package/dist/core/extensions/builtin/goal/monitor-continuation.js.map +1 -1
  55. package/dist/core/extensions/builtin/goal/terminal-provider-error.js +1 -1
  56. package/dist/core/extensions/builtin/goal/terminal-provider-error.js.map +1 -1
  57. package/dist/core/extensions/builtin/loop-guard/notice.d.ts.map +1 -1
  58. package/dist/core/extensions/builtin/loop-guard/notice.js +5 -1
  59. package/dist/core/extensions/builtin/loop-guard/notice.js.map +1 -1
  60. package/dist/core/extensions/builtin/mcp/config-schema.d.ts +2 -2
  61. package/dist/core/extensions/builtin/ttsr/index.d.ts.map +1 -1
  62. package/dist/core/extensions/builtin/ttsr/index.js +6 -6
  63. package/dist/core/extensions/builtin/ttsr/index.js.map +1 -1
  64. package/dist/core/extensions/builtin/ttsr/message-update.d.ts +10 -0
  65. package/dist/core/extensions/builtin/ttsr/message-update.d.ts.map +1 -0
  66. package/dist/core/extensions/builtin/ttsr/message-update.js +38 -0
  67. package/dist/core/extensions/builtin/ttsr/message-update.js.map +1 -0
  68. package/dist/core/extensions/builtin/ttsr/remediation.d.ts +5 -10
  69. package/dist/core/extensions/builtin/ttsr/remediation.d.ts.map +1 -1
  70. package/dist/core/extensions/builtin/ttsr/remediation.js +19 -3
  71. package/dist/core/extensions/builtin/ttsr/remediation.js.map +1 -1
  72. package/dist/core/extensions/builtin/ttsr/stream-remediation.d.ts +1 -1
  73. package/dist/core/extensions/builtin/ttsr/stream-remediation.d.ts.map +1 -1
  74. package/dist/core/extensions/builtin/ttsr/stream-remediation.js.map +1 -1
  75. package/dist/core/extensions/builtin/ttsr/types.d.ts +1 -1
  76. package/dist/core/extensions/builtin/ttsr/types.d.ts.map +1 -1
  77. package/dist/core/extensions/builtin/ttsr/types.js.map +1 -1
  78. package/dist/core/extensions/builtin/ttsr/watch.d.ts +1 -1
  79. package/dist/core/extensions/builtin/ttsr/watch.d.ts.map +1 -1
  80. package/dist/core/extensions/builtin/ttsr/watch.js +2 -2
  81. package/dist/core/extensions/builtin/ttsr/watch.js.map +1 -1
  82. package/dist/core/extensions/index.d.ts +2 -2
  83. package/dist/core/extensions/index.d.ts.map +1 -1
  84. package/dist/core/extensions/index.js +1 -1
  85. package/dist/core/extensions/index.js.map +1 -1
  86. package/dist/core/extensions/loader.d.ts.map +1 -1
  87. package/dist/core/extensions/loader.js +107 -45
  88. package/dist/core/extensions/loader.js.map +1 -1
  89. package/dist/core/extensions/types.d.ts +17 -6
  90. package/dist/core/extensions/types.d.ts.map +1 -1
  91. package/dist/core/extensions/types.js +3 -0
  92. package/dist/core/extensions/types.js.map +1 -1
  93. package/dist/core/footer-data-provider.d.ts +1 -1
  94. package/dist/core/footer-data-provider.js +1 -1
  95. package/dist/core/footer-data-provider.js.map +1 -1
  96. package/dist/core/hidden-stdout-log.d.ts +10 -0
  97. package/dist/core/hidden-stdout-log.d.ts.map +1 -1
  98. package/dist/core/hidden-stdout-log.js +36 -5
  99. package/dist/core/hidden-stdout-log.js.map +1 -1
  100. package/dist/core/keybindings.d.ts +20 -19
  101. package/dist/core/keybindings.d.ts.map +1 -1
  102. package/dist/core/keybindings.js +26 -5
  103. package/dist/core/keybindings.js.map +1 -1
  104. package/dist/core/model-config-schema.d.ts +17 -5
  105. package/dist/core/model-config-schema.d.ts.map +1 -1
  106. package/dist/core/model-config-schema.js +1 -1
  107. package/dist/core/model-config-schema.js.map +1 -1
  108. package/dist/core/model-config.d.ts.map +1 -1
  109. package/dist/core/model-config.js +7 -5
  110. package/dist/core/model-config.js.map +1 -1
  111. package/dist/core/model-resolver.d.ts +3 -2
  112. package/dist/core/model-resolver.d.ts.map +1 -1
  113. package/dist/core/model-resolver.js +3 -2
  114. package/dist/core/model-resolver.js.map +1 -1
  115. package/dist/core/model-runtime.d.ts +0 -1
  116. package/dist/core/model-runtime.d.ts.map +1 -1
  117. package/dist/core/model-runtime.js +0 -18
  118. package/dist/core/model-runtime.js.map +1 -1
  119. package/dist/core/models-store.d.ts.map +1 -1
  120. package/dist/core/models-store.js +2 -1
  121. package/dist/core/models-store.js.map +1 -1
  122. package/dist/core/package-manager.d.ts.map +1 -1
  123. package/dist/core/package-manager.js +14 -10
  124. package/dist/core/package-manager.js.map +1 -1
  125. package/dist/core/pi-manifest.d.ts.map +1 -1
  126. package/dist/core/pi-manifest.js +2 -1
  127. package/dist/core/pi-manifest.js.map +1 -1
  128. package/dist/core/provider-composer.d.ts +2 -0
  129. package/dist/core/provider-composer.d.ts.map +1 -1
  130. package/dist/core/provider-composer.js +3 -6
  131. package/dist/core/provider-composer.js.map +1 -1
  132. package/dist/core/provider-display-names.d.ts.map +1 -1
  133. package/dist/core/provider-display-names.js +0 -1
  134. package/dist/core/provider-display-names.js.map +1 -1
  135. package/dist/core/provider-timeout-retry.d.ts.map +1 -1
  136. package/dist/core/provider-timeout-retry.js +8 -12
  137. package/dist/core/provider-timeout-retry.js.map +1 -1
  138. package/dist/core/resource-loader.d.ts.map +1 -1
  139. package/dist/core/resource-loader.js +3 -2
  140. package/dist/core/resource-loader.js.map +1 -1
  141. package/dist/core/retry-fallback/profile-override.d.ts +24 -0
  142. package/dist/core/retry-fallback/profile-override.d.ts.map +1 -0
  143. package/dist/core/retry-fallback/profile-override.js +138 -0
  144. package/dist/core/retry-fallback/profile-override.js.map +1 -0
  145. package/dist/core/retry-fallback/settings.d.ts +1 -0
  146. package/dist/core/retry-fallback/settings.d.ts.map +1 -1
  147. package/dist/core/retry-fallback/settings.js.map +1 -1
  148. package/dist/core/sdk.d.ts +2 -2
  149. package/dist/core/sdk.d.ts.map +1 -1
  150. package/dist/core/sdk.js +20 -5
  151. package/dist/core/sdk.js.map +1 -1
  152. package/dist/core/session-export.d.ts +4 -0
  153. package/dist/core/session-export.d.ts.map +1 -0
  154. package/dist/core/session-export.js +32 -0
  155. package/dist/core/session-export.js.map +1 -0
  156. package/dist/core/session-manager.d.ts.map +1 -1
  157. package/dist/core/session-manager.js +2 -1
  158. package/dist/core/session-manager.js.map +1 -1
  159. package/dist/core/settings-diagnostics.d.ts +9 -0
  160. package/dist/core/settings-diagnostics.d.ts.map +1 -0
  161. package/dist/core/settings-diagnostics.js +21 -0
  162. package/dist/core/settings-diagnostics.js.map +1 -0
  163. package/dist/core/settings-manager.d.ts +18 -0
  164. package/dist/core/settings-manager.d.ts.map +1 -1
  165. package/dist/core/settings-manager.js +88 -7
  166. package/dist/core/settings-manager.js.map +1 -1
  167. package/dist/core/slash-commands.d.ts.map +1 -1
  168. package/dist/core/slash-commands.js +2 -1
  169. package/dist/core/slash-commands.js.map +1 -1
  170. package/dist/core/system-prompt.d.ts.map +1 -1
  171. package/dist/core/system-prompt.js +11 -2
  172. package/dist/core/system-prompt.js.map +1 -1
  173. package/dist/core/tools/bash.d.ts +14 -1
  174. package/dist/core/tools/bash.d.ts.map +1 -1
  175. package/dist/core/tools/bash.js +35 -19
  176. package/dist/core/tools/bash.js.map +1 -1
  177. package/dist/core/tools/edit-diff.d.ts +0 -5
  178. package/dist/core/tools/edit-diff.d.ts.map +1 -1
  179. package/dist/core/tools/edit-diff.js +2 -5
  180. package/dist/core/tools/edit-diff.js.map +1 -1
  181. package/dist/core/tools/edit.d.ts.map +1 -1
  182. package/dist/core/tools/edit.js +3 -2
  183. package/dist/core/tools/edit.js.map +1 -1
  184. package/dist/core/tools/index.d.ts +4 -1
  185. package/dist/core/tools/index.d.ts.map +1 -1
  186. package/dist/core/tools/index.js +13 -1
  187. package/dist/core/tools/index.js.map +1 -1
  188. package/dist/core/tools/powershell.d.ts +16 -0
  189. package/dist/core/tools/powershell.d.ts.map +1 -0
  190. package/dist/core/tools/powershell.js +39 -0
  191. package/dist/core/tools/powershell.js.map +1 -0
  192. package/dist/core/trust-manager.d.ts.map +1 -1
  193. package/dist/core/trust-manager.js +2 -1
  194. package/dist/core/trust-manager.js.map +1 -1
  195. package/dist/extensions/llama/client.d.ts +6 -0
  196. package/dist/extensions/llama/client.d.ts.map +1 -1
  197. package/dist/extensions/llama/client.js +7 -0
  198. package/dist/extensions/llama/client.js.map +1 -1
  199. package/dist/extensions/llama/provider.d.ts +3 -1
  200. package/dist/extensions/llama/provider.d.ts.map +1 -1
  201. package/dist/extensions/llama/provider.js +27 -6
  202. package/dist/extensions/llama/provider.js.map +1 -1
  203. package/dist/index.d.ts +5 -4
  204. package/dist/index.d.ts.map +1 -1
  205. package/dist/index.js +4 -3
  206. package/dist/index.js.map +1 -1
  207. package/dist/main.d.ts.map +1 -1
  208. package/dist/main.js +13 -2
  209. package/dist/main.js.map +1 -1
  210. package/dist/migrations.d.ts.map +1 -1
  211. package/dist/migrations.js +4 -3
  212. package/dist/migrations.js.map +1 -1
  213. package/dist/modes/app-server/daemon/probe.js +1 -1
  214. package/dist/modes/app-server/daemon/probe.js.map +1 -1
  215. package/dist/modes/app-server/daemon.js +13 -2
  216. package/dist/modes/app-server/daemon.js.map +1 -1
  217. package/dist/modes/app-server/transports/websocket-connection-handler.d.ts.map +1 -1
  218. package/dist/modes/app-server/transports/websocket-connection-handler.js +4 -0
  219. package/dist/modes/app-server/transports/websocket-connection-handler.js.map +1 -1
  220. package/dist/modes/interactive/aborted-error-label.d.ts +2 -0
  221. package/dist/modes/interactive/aborted-error-label.d.ts.map +1 -1
  222. package/dist/modes/interactive/aborted-error-label.js +7 -0
  223. package/dist/modes/interactive/aborted-error-label.js.map +1 -1
  224. package/dist/modes/interactive/components/thinking-selector.d.ts +15 -3
  225. package/dist/modes/interactive/components/thinking-selector.d.ts.map +1 -1
  226. package/dist/modes/interactive/components/thinking-selector.js +68 -17
  227. package/dist/modes/interactive/components/thinking-selector.js.map +1 -1
  228. package/dist/modes/interactive/external-editor.d.ts.map +1 -1
  229. package/dist/modes/interactive/external-editor.js +2 -1
  230. package/dist/modes/interactive/external-editor.js.map +1 -1
  231. package/dist/modes/interactive/interactive-mode.d.ts +6 -0
  232. package/dist/modes/interactive/interactive-mode.d.ts.map +1 -1
  233. package/dist/modes/interactive/interactive-mode.js +65 -20
  234. package/dist/modes/interactive/interactive-mode.js.map +1 -1
  235. package/dist/modes/json-event.d.ts +16 -13
  236. package/dist/modes/json-event.d.ts.map +1 -1
  237. package/dist/modes/json-event.js +20 -6
  238. package/dist/modes/json-event.js.map +1 -1
  239. package/dist/modes/rpc/connection-handler.d.ts.map +1 -1
  240. package/dist/modes/rpc/connection-handler.js +3 -0
  241. package/dist/modes/rpc/connection-handler.js.map +1 -1
  242. package/dist/modes/rpc/rpc-client.d.ts +7 -0
  243. package/dist/modes/rpc/rpc-client.d.ts.map +1 -1
  244. package/dist/modes/rpc/rpc-client.js +7 -0
  245. package/dist/modes/rpc/rpc-client.js.map +1 -1
  246. package/dist/modes/rpc/rpc-types.d.ts +12 -0
  247. package/dist/modes/rpc/rpc-types.d.ts.map +1 -1
  248. package/dist/modes/rpc/rpc-types.js.map +1 -1
  249. package/dist/package-manager-cli.d.ts +1 -0
  250. package/dist/package-manager-cli.d.ts.map +1 -1
  251. package/dist/package-manager-cli.js +186 -2
  252. package/dist/package-manager-cli.js.map +1 -1
  253. package/dist/utils/frontmatter.d.ts.map +1 -1
  254. package/dist/utils/frontmatter.js +2 -1
  255. package/dist/utils/frontmatter.js.map +1 -1
  256. package/dist/utils/shell.d.ts +3 -0
  257. package/dist/utils/shell.d.ts.map +1 -1
  258. package/dist/utils/shell.js +17 -5
  259. package/dist/utils/shell.js.map +1 -1
  260. package/dist/utils/syntax-highlight.d.ts +1 -0
  261. package/dist/utils/syntax-highlight.d.ts.map +1 -1
  262. package/dist/utils/syntax-highlight.js +60 -1
  263. package/dist/utils/syntax-highlight.js.map +1 -1
  264. package/dist/utils/text.d.ts +8 -0
  265. package/dist/utils/text.d.ts.map +1 -0
  266. package/dist/utils/text.js +9 -0
  267. package/dist/utils/text.js.map +1 -0
  268. package/docs/compaction.md +0 -2
  269. package/docs/custom-provider.md +6 -6
  270. package/docs/environment-variables.md +8 -8
  271. package/docs/extensions.md +6 -5
  272. package/docs/json.md +7 -2
  273. package/docs/keybindings.md +1 -1
  274. package/docs/packages.md +2 -2
  275. package/docs/rpc.md +32 -3
  276. package/docs/sdk.md +7 -2
  277. package/docs/settings.md +9 -1
  278. package/docs/terminal-setup.md +11 -9
  279. package/docs/usage.md +4 -1
  280. package/docs/windows.md +24 -2
  281. package/examples/extensions/custom-provider-anthropic/package-lock.json +28 -5
  282. package/examples/extensions/custom-provider-anthropic/package.json +1 -1
  283. package/node_modules/@anthropic-ai/sdk/CHANGELOG.md +558 -0
  284. package/node_modules/@anthropic-ai/sdk/README.md +16 -1
  285. package/node_modules/@anthropic-ai/sdk/_vendor/partial-json-parser/parser.d.mts.map +1 -1
  286. package/node_modules/@anthropic-ai/sdk/_vendor/partial-json-parser/parser.d.ts.map +1 -1
  287. package/node_modules/@anthropic-ai/sdk/_vendor/partial-json-parser/parser.js +14 -2
  288. package/node_modules/@anthropic-ai/sdk/_vendor/partial-json-parser/parser.js.map +1 -1
  289. package/node_modules/@anthropic-ai/sdk/_vendor/partial-json-parser/parser.mjs +14 -2
  290. package/node_modules/@anthropic-ai/sdk/_vendor/partial-json-parser/parser.mjs.map +1 -1
  291. package/node_modules/@anthropic-ai/sdk/api-promise.d.mts +1 -0
  292. package/node_modules/@anthropic-ai/sdk/api-promise.d.mts.map +1 -1
  293. package/node_modules/@anthropic-ai/sdk/api-promise.d.ts +1 -0
  294. package/node_modules/@anthropic-ai/sdk/api-promise.d.ts.map +1 -1
  295. package/node_modules/@anthropic-ai/sdk/api-promise.mjs +1 -0
  296. package/node_modules/@anthropic-ai/sdk/api-promise.mjs.map +1 -1
  297. package/node_modules/@anthropic-ai/sdk/bin/migration-config.json +481 -0
  298. package/node_modules/@anthropic-ai/sdk/client.d.mts +165 -11
  299. package/node_modules/@anthropic-ai/sdk/client.d.mts.map +1 -1
  300. package/node_modules/@anthropic-ai/sdk/client.d.ts +165 -11
  301. package/node_modules/@anthropic-ai/sdk/client.d.ts.map +1 -1
  302. package/node_modules/@anthropic-ai/sdk/client.js +415 -38
  303. package/node_modules/@anthropic-ai/sdk/client.js.map +1 -1
  304. package/node_modules/@anthropic-ai/sdk/client.mjs +414 -37
  305. package/node_modules/@anthropic-ai/sdk/client.mjs.map +1 -1
  306. package/node_modules/@anthropic-ai/sdk/core/api-promise.d.mts +1 -0
  307. package/node_modules/@anthropic-ai/sdk/core/api-promise.d.mts.map +1 -1
  308. package/node_modules/@anthropic-ai/sdk/core/api-promise.d.ts +1 -0
  309. package/node_modules/@anthropic-ai/sdk/core/api-promise.d.ts.map +1 -1
  310. package/node_modules/@anthropic-ai/sdk/core/api-promise.js +7 -2
  311. package/node_modules/@anthropic-ai/sdk/core/api-promise.js.map +1 -1
  312. package/node_modules/@anthropic-ai/sdk/core/api-promise.mjs +8 -3
  313. package/node_modules/@anthropic-ai/sdk/core/api-promise.mjs.map +1 -1
  314. package/node_modules/@anthropic-ai/sdk/core/api.d.mts +11 -0
  315. package/node_modules/@anthropic-ai/sdk/core/api.d.mts.map +1 -0
  316. package/node_modules/@anthropic-ai/sdk/core/api.d.ts +11 -0
  317. package/node_modules/@anthropic-ai/sdk/core/api.d.ts.map +1 -0
  318. package/node_modules/@anthropic-ai/sdk/core/api.js +3 -0
  319. package/node_modules/@anthropic-ai/sdk/core/api.js.map +1 -0
  320. package/node_modules/@anthropic-ai/sdk/core/api.mjs +2 -0
  321. package/node_modules/@anthropic-ai/sdk/core/api.mjs.map +1 -0
  322. package/node_modules/@anthropic-ai/sdk/core/credentials.d.mts +131 -0
  323. package/node_modules/@anthropic-ai/sdk/core/credentials.d.mts.map +1 -0
  324. package/node_modules/@anthropic-ai/sdk/core/credentials.d.ts +131 -0
  325. package/node_modules/@anthropic-ai/sdk/core/credentials.d.ts.map +1 -0
  326. package/node_modules/@anthropic-ai/sdk/core/credentials.js +317 -0
  327. package/node_modules/@anthropic-ai/sdk/core/credentials.js.map +1 -0
  328. package/node_modules/@anthropic-ai/sdk/core/credentials.mjs +277 -0
  329. package/node_modules/@anthropic-ai/sdk/core/credentials.mjs.map +1 -0
  330. package/node_modules/@anthropic-ai/sdk/core/error.d.mts +12 -0
  331. package/node_modules/@anthropic-ai/sdk/core/error.d.mts.map +1 -1
  332. package/node_modules/@anthropic-ai/sdk/core/error.d.ts +12 -0
  333. package/node_modules/@anthropic-ai/sdk/core/error.d.ts.map +1 -1
  334. package/node_modules/@anthropic-ai/sdk/core/error.js +18 -1
  335. package/node_modules/@anthropic-ai/sdk/core/error.js.map +1 -1
  336. package/node_modules/@anthropic-ai/sdk/core/error.mjs +16 -0
  337. package/node_modules/@anthropic-ai/sdk/core/error.mjs.map +1 -1
  338. package/node_modules/@anthropic-ai/sdk/core/middleware.d.mts +154 -0
  339. package/node_modules/@anthropic-ai/sdk/core/middleware.d.mts.map +1 -0
  340. package/node_modules/@anthropic-ai/sdk/core/middleware.d.ts +154 -0
  341. package/node_modules/@anthropic-ai/sdk/core/middleware.d.ts.map +1 -0
  342. package/node_modules/@anthropic-ai/sdk/core/middleware.js +174 -0
  343. package/node_modules/@anthropic-ai/sdk/core/middleware.js.map +1 -0
  344. package/node_modules/@anthropic-ai/sdk/core/middleware.mjs +168 -0
  345. package/node_modules/@anthropic-ai/sdk/core/middleware.mjs.map +1 -0
  346. package/node_modules/@anthropic-ai/sdk/core/pagination.d.mts +20 -0
  347. package/node_modules/@anthropic-ai/sdk/core/pagination.d.mts.map +1 -1
  348. package/node_modules/@anthropic-ai/sdk/core/pagination.d.ts +20 -0
  349. package/node_modules/@anthropic-ai/sdk/core/pagination.d.ts.map +1 -1
  350. package/node_modules/@anthropic-ai/sdk/core/pagination.js +26 -1
  351. package/node_modules/@anthropic-ai/sdk/core/pagination.js.map +1 -1
  352. package/node_modules/@anthropic-ai/sdk/core/pagination.mjs +24 -0
  353. package/node_modules/@anthropic-ai/sdk/core/pagination.mjs.map +1 -1
  354. package/node_modules/@anthropic-ai/sdk/core/resource.d.mts.map +1 -1
  355. package/node_modules/@anthropic-ai/sdk/core/resource.d.ts.map +1 -1
  356. package/node_modules/@anthropic-ai/sdk/core/streaming.d.mts +9 -0
  357. package/node_modules/@anthropic-ai/sdk/core/streaming.d.mts.map +1 -1
  358. package/node_modules/@anthropic-ai/sdk/core/streaming.d.ts +9 -0
  359. package/node_modules/@anthropic-ai/sdk/core/streaming.d.ts.map +1 -1
  360. package/node_modules/@anthropic-ai/sdk/core/streaming.js +34 -1
  361. package/node_modules/@anthropic-ai/sdk/core/streaming.js.map +1 -1
  362. package/node_modules/@anthropic-ai/sdk/core/streaming.mjs +34 -1
  363. package/node_modules/@anthropic-ai/sdk/core/streaming.mjs.map +1 -1
  364. package/node_modules/@anthropic-ai/sdk/core/uploads.d.mts.map +1 -1
  365. package/node_modules/@anthropic-ai/sdk/core/uploads.d.ts.map +1 -1
  366. package/node_modules/@anthropic-ai/sdk/core/uploads.mjs.map +1 -1
  367. package/node_modules/@anthropic-ai/sdk/error.d.mts +1 -0
  368. package/node_modules/@anthropic-ai/sdk/error.d.mts.map +1 -1
  369. package/node_modules/@anthropic-ai/sdk/error.d.ts +1 -0
  370. package/node_modules/@anthropic-ai/sdk/error.d.ts.map +1 -1
  371. package/node_modules/@anthropic-ai/sdk/error.mjs +1 -0
  372. package/node_modules/@anthropic-ai/sdk/error.mjs.map +1 -1
  373. package/node_modules/@anthropic-ai/sdk/helpers/beta/environments.d.mts +23 -0
  374. package/node_modules/@anthropic-ai/sdk/helpers/beta/environments.d.mts.map +1 -0
  375. package/node_modules/@anthropic-ai/sdk/helpers/beta/environments.d.ts +23 -0
  376. package/node_modules/@anthropic-ai/sdk/helpers/beta/environments.d.ts.map +1 -0
  377. package/node_modules/@anthropic-ai/sdk/helpers/beta/environments.js +31 -0
  378. package/node_modules/@anthropic-ai/sdk/helpers/beta/environments.js.map +1 -0
  379. package/node_modules/@anthropic-ai/sdk/helpers/beta/environments.mjs +23 -0
  380. package/node_modules/@anthropic-ai/sdk/helpers/beta/environments.mjs.map +1 -0
  381. package/node_modules/@anthropic-ai/sdk/helpers/beta/json-schema.d.mts +6 -0
  382. package/node_modules/@anthropic-ai/sdk/helpers/beta/json-schema.d.mts.map +1 -1
  383. package/node_modules/@anthropic-ai/sdk/helpers/beta/json-schema.d.ts +6 -0
  384. package/node_modules/@anthropic-ai/sdk/helpers/beta/json-schema.d.ts.map +1 -1
  385. package/node_modules/@anthropic-ai/sdk/helpers/beta/json-schema.js +1 -0
  386. package/node_modules/@anthropic-ai/sdk/helpers/beta/json-schema.js.map +1 -1
  387. package/node_modules/@anthropic-ai/sdk/helpers/beta/json-schema.mjs +1 -0
  388. package/node_modules/@anthropic-ai/sdk/helpers/beta/json-schema.mjs.map +1 -1
  389. package/node_modules/@anthropic-ai/sdk/helpers/beta/mcp.d.mts +1 -1
  390. package/node_modules/@anthropic-ai/sdk/helpers/beta/mcp.d.mts.map +1 -1
  391. package/node_modules/@anthropic-ai/sdk/helpers/beta/mcp.d.ts +1 -1
  392. package/node_modules/@anthropic-ai/sdk/helpers/beta/mcp.d.ts.map +1 -1
  393. package/node_modules/@anthropic-ai/sdk/helpers/beta/mcp.js +1 -1
  394. package/node_modules/@anthropic-ai/sdk/helpers/beta/mcp.js.map +1 -1
  395. package/node_modules/@anthropic-ai/sdk/helpers/beta/mcp.mjs +1 -1
  396. package/node_modules/@anthropic-ai/sdk/helpers/beta/mcp.mjs.map +1 -1
  397. package/node_modules/@anthropic-ai/sdk/helpers/beta/memory.d.mts.map +1 -1
  398. package/node_modules/@anthropic-ai/sdk/helpers/beta/memory.d.ts.map +1 -1
  399. package/node_modules/@anthropic-ai/sdk/helpers/beta/zod.d.mts +11 -5
  400. package/node_modules/@anthropic-ai/sdk/helpers/beta/zod.d.mts.map +1 -1
  401. package/node_modules/@anthropic-ai/sdk/helpers/beta/zod.d.ts +11 -5
  402. package/node_modules/@anthropic-ai/sdk/helpers/beta/zod.d.ts.map +1 -1
  403. package/node_modules/@anthropic-ai/sdk/helpers/beta/zod.js +2 -2
  404. package/node_modules/@anthropic-ai/sdk/helpers/beta/zod.js.map +1 -1
  405. package/node_modules/@anthropic-ai/sdk/helpers/beta/zod.mjs +2 -2
  406. package/node_modules/@anthropic-ai/sdk/helpers/beta/zod.mjs.map +1 -1
  407. package/node_modules/@anthropic-ai/sdk/helpers/index.d.mts.map +1 -1
  408. package/node_modules/@anthropic-ai/sdk/helpers/index.d.ts.map +1 -1
  409. package/node_modules/@anthropic-ai/sdk/helpers/index.mjs.map +1 -1
  410. package/node_modules/@anthropic-ai/sdk/helpers/json-schema.d.mts.map +1 -1
  411. package/node_modules/@anthropic-ai/sdk/helpers/json-schema.d.ts.map +1 -1
  412. package/node_modules/@anthropic-ai/sdk/helpers/json-schema.mjs.map +1 -1
  413. package/node_modules/@anthropic-ai/sdk/helpers/zod.d.mts +2 -2
  414. package/node_modules/@anthropic-ai/sdk/helpers/zod.d.mts.map +1 -1
  415. package/node_modules/@anthropic-ai/sdk/helpers/zod.d.ts +2 -2
  416. package/node_modules/@anthropic-ai/sdk/helpers/zod.d.ts.map +1 -1
  417. package/node_modules/@anthropic-ai/sdk/helpers/zod.js +1 -2
  418. package/node_modules/@anthropic-ai/sdk/helpers/zod.js.map +1 -1
  419. package/node_modules/@anthropic-ai/sdk/helpers/zod.mjs +1 -2
  420. package/node_modules/@anthropic-ai/sdk/helpers/zod.mjs.map +1 -1
  421. package/node_modules/@anthropic-ai/sdk/index.d.mts +4 -2
  422. package/node_modules/@anthropic-ai/sdk/index.d.mts.map +1 -1
  423. package/node_modules/@anthropic-ai/sdk/index.d.ts +4 -2
  424. package/node_modules/@anthropic-ai/sdk/index.d.ts.map +1 -1
  425. package/node_modules/@anthropic-ai/sdk/index.js +5 -1
  426. package/node_modules/@anthropic-ai/sdk/index.js.map +1 -1
  427. package/node_modules/@anthropic-ai/sdk/index.mjs +3 -2
  428. package/node_modules/@anthropic-ai/sdk/index.mjs.map +1 -1
  429. package/node_modules/@anthropic-ai/sdk/internal/constants.d.mts.map +1 -1
  430. package/node_modules/@anthropic-ai/sdk/internal/constants.d.ts.map +1 -1
  431. package/node_modules/@anthropic-ai/sdk/internal/constants.js +0 -5
  432. package/node_modules/@anthropic-ai/sdk/internal/constants.js.map +1 -1
  433. package/node_modules/@anthropic-ai/sdk/internal/constants.mjs +0 -5
  434. package/node_modules/@anthropic-ai/sdk/internal/constants.mjs.map +1 -1
  435. package/node_modules/@anthropic-ai/sdk/internal/decoders/jsonl.d.mts.map +1 -1
  436. package/node_modules/@anthropic-ai/sdk/internal/decoders/jsonl.d.ts.map +1 -1
  437. package/node_modules/@anthropic-ai/sdk/internal/decoders/jsonl.mjs.map +1 -1
  438. package/node_modules/@anthropic-ai/sdk/internal/decoders/line.mjs.map +1 -1
  439. package/node_modules/@anthropic-ai/sdk/internal/detect-platform.mjs.map +1 -1
  440. package/node_modules/@anthropic-ai/sdk/internal/file-store.d.mts +136 -0
  441. package/node_modules/@anthropic-ai/sdk/internal/file-store.d.mts.map +1 -0
  442. package/node_modules/@anthropic-ai/sdk/internal/file-store.d.ts +136 -0
  443. package/node_modules/@anthropic-ai/sdk/internal/file-store.d.ts.map +1 -0
  444. package/node_modules/@anthropic-ai/sdk/internal/file-store.js +531 -0
  445. package/node_modules/@anthropic-ai/sdk/internal/file-store.js.map +1 -0
  446. package/node_modules/@anthropic-ai/sdk/internal/file-store.mjs +523 -0
  447. package/node_modules/@anthropic-ai/sdk/internal/file-store.mjs.map +1 -0
  448. package/node_modules/@anthropic-ai/sdk/internal/headers.d.mts +7 -0
  449. package/node_modules/@anthropic-ai/sdk/internal/headers.d.mts.map +1 -1
  450. package/node_modules/@anthropic-ai/sdk/internal/headers.d.ts +7 -0
  451. package/node_modules/@anthropic-ai/sdk/internal/headers.d.ts.map +1 -1
  452. package/node_modules/@anthropic-ai/sdk/internal/headers.js +45 -4
  453. package/node_modules/@anthropic-ai/sdk/internal/headers.js.map +1 -1
  454. package/node_modules/@anthropic-ai/sdk/internal/headers.mjs +43 -3
  455. package/node_modules/@anthropic-ai/sdk/internal/headers.mjs.map +1 -1
  456. package/node_modules/@anthropic-ai/sdk/internal/message-stream-utils.d.mts +10 -0
  457. package/node_modules/@anthropic-ai/sdk/internal/message-stream-utils.d.mts.map +1 -0
  458. package/node_modules/@anthropic-ai/sdk/internal/message-stream-utils.d.ts +10 -0
  459. package/node_modules/@anthropic-ai/sdk/internal/message-stream-utils.d.ts.map +1 -0
  460. package/node_modules/@anthropic-ai/sdk/internal/message-stream-utils.js +34 -0
  461. package/node_modules/@anthropic-ai/sdk/internal/message-stream-utils.js.map +1 -0
  462. package/node_modules/@anthropic-ai/sdk/internal/message-stream-utils.mjs +30 -0
  463. package/node_modules/@anthropic-ai/sdk/internal/message-stream-utils.mjs.map +1 -0
  464. package/node_modules/@anthropic-ai/sdk/internal/parse.d.mts +2 -1
  465. package/node_modules/@anthropic-ai/sdk/internal/parse.d.mts.map +1 -1
  466. package/node_modules/@anthropic-ai/sdk/internal/parse.d.ts +2 -1
  467. package/node_modules/@anthropic-ai/sdk/internal/parse.d.ts.map +1 -1
  468. package/node_modules/@anthropic-ai/sdk/internal/parse.js +16 -10
  469. package/node_modules/@anthropic-ai/sdk/internal/parse.js.map +1 -1
  470. package/node_modules/@anthropic-ai/sdk/internal/parse.mjs +15 -9
  471. package/node_modules/@anthropic-ai/sdk/internal/parse.mjs.map +1 -1
  472. package/node_modules/@anthropic-ai/sdk/internal/qs/formats.d.mts +7 -0
  473. package/node_modules/@anthropic-ai/sdk/internal/qs/formats.d.mts.map +1 -0
  474. package/node_modules/@anthropic-ai/sdk/internal/qs/formats.d.ts +7 -0
  475. package/node_modules/@anthropic-ai/sdk/internal/qs/formats.d.ts.map +1 -0
  476. package/node_modules/@anthropic-ai/sdk/internal/qs/formats.js +13 -0
  477. package/node_modules/@anthropic-ai/sdk/internal/qs/formats.js.map +1 -0
  478. package/node_modules/@anthropic-ai/sdk/internal/qs/formats.mjs +9 -0
  479. package/node_modules/@anthropic-ai/sdk/internal/qs/formats.mjs.map +1 -0
  480. package/node_modules/@anthropic-ai/sdk/internal/qs/index.d.mts +10 -0
  481. package/node_modules/@anthropic-ai/sdk/internal/qs/index.d.mts.map +1 -0
  482. package/node_modules/@anthropic-ai/sdk/internal/qs/index.d.ts +10 -0
  483. package/node_modules/@anthropic-ai/sdk/internal/qs/index.d.ts.map +1 -0
  484. package/node_modules/@anthropic-ai/sdk/internal/qs/index.js +14 -0
  485. package/node_modules/@anthropic-ai/sdk/internal/qs/index.js.map +1 -0
  486. package/node_modules/@anthropic-ai/sdk/internal/qs/index.mjs +10 -0
  487. package/node_modules/@anthropic-ai/sdk/internal/qs/index.mjs.map +1 -0
  488. package/node_modules/@anthropic-ai/sdk/internal/qs/stringify.d.mts +3 -0
  489. package/node_modules/@anthropic-ai/sdk/internal/qs/stringify.d.mts.map +1 -0
  490. package/node_modules/@anthropic-ai/sdk/internal/qs/stringify.d.ts +3 -0
  491. package/node_modules/@anthropic-ai/sdk/internal/qs/stringify.d.ts.map +1 -0
  492. package/node_modules/@anthropic-ai/sdk/internal/qs/stringify.js +277 -0
  493. package/node_modules/@anthropic-ai/sdk/internal/qs/stringify.js.map +1 -0
  494. package/node_modules/@anthropic-ai/sdk/internal/qs/stringify.mjs +274 -0
  495. package/node_modules/@anthropic-ai/sdk/internal/qs/stringify.mjs.map +1 -0
  496. package/node_modules/@anthropic-ai/sdk/internal/qs/types.d.mts +57 -0
  497. package/node_modules/@anthropic-ai/sdk/internal/qs/types.d.mts.map +1 -0
  498. package/node_modules/@anthropic-ai/sdk/internal/qs/types.d.ts +57 -0
  499. package/node_modules/@anthropic-ai/sdk/internal/qs/types.d.ts.map +1 -0
  500. package/node_modules/@anthropic-ai/sdk/internal/qs/types.js +3 -0
  501. package/node_modules/@anthropic-ai/sdk/internal/qs/types.js.map +1 -0
  502. package/node_modules/@anthropic-ai/sdk/internal/qs/types.mjs +2 -0
  503. package/node_modules/@anthropic-ai/sdk/internal/qs/types.mjs.map +1 -0
  504. package/node_modules/@anthropic-ai/sdk/internal/qs/utils.d.mts +15 -0
  505. package/node_modules/@anthropic-ai/sdk/internal/qs/utils.d.mts.map +1 -0
  506. package/node_modules/@anthropic-ai/sdk/internal/qs/utils.d.ts +15 -0
  507. package/node_modules/@anthropic-ai/sdk/internal/qs/utils.d.ts.map +1 -0
  508. package/node_modules/@anthropic-ai/sdk/internal/qs/utils.js +230 -0
  509. package/node_modules/@anthropic-ai/sdk/internal/qs/utils.js.map +1 -0
  510. package/node_modules/@anthropic-ai/sdk/internal/qs/utils.mjs +217 -0
  511. package/node_modules/@anthropic-ai/sdk/internal/qs/utils.mjs.map +1 -0
  512. package/node_modules/@anthropic-ai/sdk/internal/request-options.d.mts +52 -2
  513. package/node_modules/@anthropic-ai/sdk/internal/request-options.d.mts.map +1 -1
  514. package/node_modules/@anthropic-ai/sdk/internal/request-options.d.ts +52 -2
  515. package/node_modules/@anthropic-ai/sdk/internal/request-options.d.ts.map +1 -1
  516. package/node_modules/@anthropic-ai/sdk/internal/request-options.js +12 -1
  517. package/node_modules/@anthropic-ai/sdk/internal/request-options.js.map +1 -1
  518. package/node_modules/@anthropic-ai/sdk/internal/request-options.mjs +10 -0
  519. package/node_modules/@anthropic-ai/sdk/internal/request-options.mjs.map +1 -1
  520. package/node_modules/@anthropic-ai/sdk/internal/request-signal.d.mts +4 -0
  521. package/node_modules/@anthropic-ai/sdk/internal/request-signal.d.mts.map +1 -0
  522. package/node_modules/@anthropic-ai/sdk/internal/request-signal.d.ts +4 -0
  523. package/node_modules/@anthropic-ai/sdk/internal/request-signal.d.ts.map +1 -0
  524. package/node_modules/@anthropic-ai/sdk/internal/request-signal.js +50 -0
  525. package/node_modules/@anthropic-ai/sdk/internal/request-signal.js.map +1 -0
  526. package/node_modules/@anthropic-ai/sdk/internal/request-signal.mjs +45 -0
  527. package/node_modules/@anthropic-ai/sdk/internal/request-signal.mjs.map +1 -0
  528. package/node_modules/@anthropic-ai/sdk/internal/shims.d.mts +6 -0
  529. package/node_modules/@anthropic-ai/sdk/internal/shims.d.mts.map +1 -1
  530. package/node_modules/@anthropic-ai/sdk/internal/shims.d.ts +6 -0
  531. package/node_modules/@anthropic-ai/sdk/internal/shims.d.ts.map +1 -1
  532. package/node_modules/@anthropic-ai/sdk/internal/stainless-helper-header.d.mts +60 -0
  533. package/node_modules/@anthropic-ai/sdk/internal/stainless-helper-header.d.mts.map +1 -0
  534. package/node_modules/@anthropic-ai/sdk/internal/stainless-helper-header.d.ts +60 -0
  535. package/node_modules/@anthropic-ai/sdk/internal/stainless-helper-header.d.ts.map +1 -0
  536. package/node_modules/@anthropic-ai/sdk/{lib → internal}/stainless-helper-header.js +27 -6
  537. package/node_modules/@anthropic-ai/sdk/internal/stainless-helper-header.js.map +1 -0
  538. package/node_modules/@anthropic-ai/sdk/{lib → internal}/stainless-helper-header.mjs +25 -5
  539. package/node_modules/@anthropic-ai/sdk/internal/stainless-helper-header.mjs.map +1 -0
  540. package/node_modules/@anthropic-ai/sdk/internal/to-file.d.mts.map +1 -1
  541. package/node_modules/@anthropic-ai/sdk/internal/to-file.d.ts.map +1 -1
  542. package/node_modules/@anthropic-ai/sdk/internal/to-file.mjs.map +1 -1
  543. package/node_modules/@anthropic-ai/sdk/internal/types.d.mts +12 -6
  544. package/node_modules/@anthropic-ai/sdk/internal/types.d.mts.map +1 -1
  545. package/node_modules/@anthropic-ai/sdk/internal/types.d.ts +12 -6
  546. package/node_modules/@anthropic-ai/sdk/internal/types.d.ts.map +1 -1
  547. package/node_modules/@anthropic-ai/sdk/internal/uploads.d.mts.map +1 -1
  548. package/node_modules/@anthropic-ai/sdk/internal/uploads.d.ts.map +1 -1
  549. package/node_modules/@anthropic-ai/sdk/internal/uploads.mjs.map +1 -1
  550. package/node_modules/@anthropic-ai/sdk/internal/utils/abort.d.mts +13 -0
  551. package/node_modules/@anthropic-ai/sdk/internal/utils/abort.d.mts.map +1 -0
  552. package/node_modules/@anthropic-ai/sdk/internal/utils/abort.d.ts +13 -0
  553. package/node_modules/@anthropic-ai/sdk/internal/utils/abort.d.ts.map +1 -0
  554. package/node_modules/@anthropic-ai/sdk/internal/utils/abort.js +26 -0
  555. package/node_modules/@anthropic-ai/sdk/internal/utils/abort.js.map +1 -0
  556. package/node_modules/@anthropic-ai/sdk/internal/utils/abort.mjs +23 -0
  557. package/node_modules/@anthropic-ai/sdk/internal/utils/abort.mjs.map +1 -0
  558. package/node_modules/@anthropic-ai/sdk/internal/utils/async-queue.d.mts +31 -0
  559. package/node_modules/@anthropic-ai/sdk/internal/utils/async-queue.d.mts.map +1 -0
  560. package/node_modules/@anthropic-ai/sdk/internal/utils/async-queue.d.ts +31 -0
  561. package/node_modules/@anthropic-ai/sdk/internal/utils/async-queue.d.ts.map +1 -0
  562. package/node_modules/@anthropic-ai/sdk/internal/utils/async-queue.js +75 -0
  563. package/node_modules/@anthropic-ai/sdk/internal/utils/async-queue.js.map +1 -0
  564. package/node_modules/@anthropic-ai/sdk/internal/utils/async-queue.mjs +71 -0
  565. package/node_modules/@anthropic-ai/sdk/internal/utils/async-queue.mjs.map +1 -0
  566. package/node_modules/@anthropic-ai/sdk/internal/utils/backoff.d.mts +23 -0
  567. package/node_modules/@anthropic-ai/sdk/internal/utils/backoff.d.mts.map +1 -0
  568. package/node_modules/@anthropic-ai/sdk/internal/utils/backoff.d.ts +23 -0
  569. package/node_modules/@anthropic-ai/sdk/internal/utils/backoff.d.ts.map +1 -0
  570. package/node_modules/@anthropic-ai/sdk/internal/utils/backoff.js +44 -0
  571. package/node_modules/@anthropic-ai/sdk/internal/utils/backoff.js.map +1 -0
  572. package/node_modules/@anthropic-ai/sdk/internal/utils/backoff.mjs +36 -0
  573. package/node_modules/@anthropic-ai/sdk/internal/utils/backoff.mjs.map +1 -0
  574. package/node_modules/@anthropic-ai/sdk/internal/utils/base64.mjs.map +1 -1
  575. package/node_modules/@anthropic-ai/sdk/internal/utils/log.d.mts +11 -1
  576. package/node_modules/@anthropic-ai/sdk/internal/utils/log.d.mts.map +1 -1
  577. package/node_modules/@anthropic-ai/sdk/internal/utils/log.d.ts +11 -1
  578. package/node_modules/@anthropic-ai/sdk/internal/utils/log.d.ts.map +1 -1
  579. package/node_modules/@anthropic-ai/sdk/internal/utils/log.js +37 -11
  580. package/node_modules/@anthropic-ai/sdk/internal/utils/log.js.map +1 -1
  581. package/node_modules/@anthropic-ai/sdk/internal/utils/log.mjs +35 -10
  582. package/node_modules/@anthropic-ai/sdk/internal/utils/log.mjs.map +1 -1
  583. package/node_modules/@anthropic-ai/sdk/internal/utils/path.mjs.map +1 -1
  584. package/node_modules/@anthropic-ai/sdk/internal/utils/promise.d.mts +11 -0
  585. package/node_modules/@anthropic-ai/sdk/internal/utils/promise.d.mts.map +1 -0
  586. package/node_modules/@anthropic-ai/sdk/internal/utils/promise.d.ts +11 -0
  587. package/node_modules/@anthropic-ai/sdk/internal/utils/promise.d.ts.map +1 -0
  588. package/node_modules/@anthropic-ai/sdk/internal/utils/promise.js +18 -0
  589. package/node_modules/@anthropic-ai/sdk/internal/utils/promise.js.map +1 -0
  590. package/node_modules/@anthropic-ai/sdk/internal/utils/promise.mjs +15 -0
  591. package/node_modules/@anthropic-ai/sdk/internal/utils/promise.mjs.map +1 -0
  592. package/node_modules/@anthropic-ai/sdk/internal/utils/query.d.mts +0 -3
  593. package/node_modules/@anthropic-ai/sdk/internal/utils/query.d.mts.map +1 -1
  594. package/node_modules/@anthropic-ai/sdk/internal/utils/query.d.ts +0 -3
  595. package/node_modules/@anthropic-ai/sdk/internal/utils/query.d.ts.map +1 -1
  596. package/node_modules/@anthropic-ai/sdk/internal/utils/query.js +3 -16
  597. package/node_modules/@anthropic-ai/sdk/internal/utils/query.js.map +1 -1
  598. package/node_modules/@anthropic-ai/sdk/internal/utils/query.mjs +2 -16
  599. package/node_modules/@anthropic-ai/sdk/internal/utils/query.mjs.map +1 -1
  600. package/node_modules/@anthropic-ai/sdk/internal/utils/sleep.d.mts +9 -1
  601. package/node_modules/@anthropic-ai/sdk/internal/utils/sleep.d.mts.map +1 -1
  602. package/node_modules/@anthropic-ai/sdk/internal/utils/sleep.d.ts +9 -1
  603. package/node_modules/@anthropic-ai/sdk/internal/utils/sleep.d.ts.map +1 -1
  604. package/node_modules/@anthropic-ai/sdk/internal/utils/sleep.js +23 -2
  605. package/node_modules/@anthropic-ai/sdk/internal/utils/sleep.js.map +1 -1
  606. package/node_modules/@anthropic-ai/sdk/internal/utils/sleep.mjs +23 -2
  607. package/node_modules/@anthropic-ai/sdk/internal/utils/sleep.mjs.map +1 -1
  608. package/node_modules/@anthropic-ai/sdk/internal/utils/time.d.mts +3 -0
  609. package/node_modules/@anthropic-ai/sdk/internal/utils/time.d.mts.map +1 -0
  610. package/node_modules/@anthropic-ai/sdk/internal/utils/time.d.ts +3 -0
  611. package/node_modules/@anthropic-ai/sdk/internal/utils/time.d.ts.map +1 -0
  612. package/node_modules/@anthropic-ai/sdk/internal/utils/time.js +8 -0
  613. package/node_modules/@anthropic-ai/sdk/internal/utils/time.js.map +1 -0
  614. package/node_modules/@anthropic-ai/sdk/internal/utils/time.mjs +5 -0
  615. package/node_modules/@anthropic-ai/sdk/internal/utils/time.mjs.map +1 -0
  616. package/node_modules/@anthropic-ai/sdk/internal/utils/values.mjs.map +1 -1
  617. package/node_modules/@anthropic-ai/sdk/internal/utils.d.mts.map +1 -1
  618. package/node_modules/@anthropic-ai/sdk/internal/utils.d.ts.map +1 -1
  619. package/node_modules/@anthropic-ai/sdk/internal/utils.mjs.map +1 -1
  620. package/node_modules/@anthropic-ai/sdk/lib/BetaMessageStream.d.mts +2 -0
  621. package/node_modules/@anthropic-ai/sdk/lib/BetaMessageStream.d.mts.map +1 -1
  622. package/node_modules/@anthropic-ai/sdk/lib/BetaMessageStream.d.ts +2 -0
  623. package/node_modules/@anthropic-ai/sdk/lib/BetaMessageStream.d.ts.map +1 -1
  624. package/node_modules/@anthropic-ai/sdk/lib/BetaMessageStream.js +66 -31
  625. package/node_modules/@anthropic-ai/sdk/lib/BetaMessageStream.js.map +1 -1
  626. package/node_modules/@anthropic-ai/sdk/lib/BetaMessageStream.mjs +66 -31
  627. package/node_modules/@anthropic-ai/sdk/lib/BetaMessageStream.mjs.map +1 -1
  628. package/node_modules/@anthropic-ai/sdk/lib/MessageStream.d.mts +2 -0
  629. package/node_modules/@anthropic-ai/sdk/lib/MessageStream.d.mts.map +1 -1
  630. package/node_modules/@anthropic-ai/sdk/lib/MessageStream.d.ts +2 -0
  631. package/node_modules/@anthropic-ai/sdk/lib/MessageStream.d.ts.map +1 -1
  632. package/node_modules/@anthropic-ai/sdk/lib/MessageStream.js +37 -26
  633. package/node_modules/@anthropic-ai/sdk/lib/MessageStream.js.map +1 -1
  634. package/node_modules/@anthropic-ai/sdk/lib/MessageStream.mjs +34 -23
  635. package/node_modules/@anthropic-ai/sdk/lib/MessageStream.mjs.map +1 -1
  636. package/node_modules/@anthropic-ai/sdk/lib/beta-parser.d.mts.map +1 -1
  637. package/node_modules/@anthropic-ai/sdk/lib/beta-parser.d.ts.map +1 -1
  638. package/node_modules/@anthropic-ai/sdk/lib/beta-parser.mjs.map +1 -1
  639. package/node_modules/@anthropic-ai/sdk/lib/credentials/credential-chain.d.mts +39 -0
  640. package/node_modules/@anthropic-ai/sdk/lib/credentials/credential-chain.d.mts.map +1 -0
  641. package/node_modules/@anthropic-ai/sdk/lib/credentials/credential-chain.d.ts +39 -0
  642. package/node_modules/@anthropic-ai/sdk/lib/credentials/credential-chain.d.ts.map +1 -0
  643. package/node_modules/@anthropic-ai/sdk/lib/credentials/credential-chain.js +245 -0
  644. package/node_modules/@anthropic-ai/sdk/lib/credentials/credential-chain.js.map +1 -0
  645. package/node_modules/@anthropic-ai/sdk/lib/credentials/credential-chain.mjs +208 -0
  646. package/node_modules/@anthropic-ai/sdk/lib/credentials/credential-chain.mjs.map +1 -0
  647. package/node_modules/@anthropic-ai/sdk/lib/credentials/identity-token.d.mts +11 -0
  648. package/node_modules/@anthropic-ai/sdk/lib/credentials/identity-token.d.mts.map +1 -0
  649. package/node_modules/@anthropic-ai/sdk/lib/credentials/identity-token.d.ts +11 -0
  650. package/node_modules/@anthropic-ai/sdk/lib/credentials/identity-token.d.ts.map +1 -0
  651. package/node_modules/@anthropic-ai/sdk/lib/credentials/identity-token.js +72 -0
  652. package/node_modules/@anthropic-ai/sdk/lib/credentials/identity-token.js.map +1 -0
  653. package/node_modules/@anthropic-ai/sdk/lib/credentials/identity-token.mjs +35 -0
  654. package/node_modules/@anthropic-ai/sdk/lib/credentials/identity-token.mjs.map +1 -0
  655. package/node_modules/@anthropic-ai/sdk/lib/credentials/oidc-federation.d.mts +40 -0
  656. package/node_modules/@anthropic-ai/sdk/lib/credentials/oidc-federation.d.mts.map +1 -0
  657. package/node_modules/@anthropic-ai/sdk/lib/credentials/oidc-federation.d.ts +40 -0
  658. package/node_modules/@anthropic-ai/sdk/lib/credentials/oidc-federation.d.ts.map +1 -0
  659. package/node_modules/@anthropic-ai/sdk/lib/credentials/oidc-federation.js +82 -0
  660. package/node_modules/@anthropic-ai/sdk/lib/credentials/oidc-federation.js.map +1 -0
  661. package/node_modules/@anthropic-ai/sdk/lib/credentials/oidc-federation.mjs +79 -0
  662. package/node_modules/@anthropic-ai/sdk/lib/credentials/oidc-federation.mjs.map +1 -0
  663. package/node_modules/@anthropic-ai/sdk/lib/credentials/token-cache.d.mts +54 -0
  664. package/node_modules/@anthropic-ai/sdk/lib/credentials/token-cache.d.mts.map +1 -0
  665. package/node_modules/@anthropic-ai/sdk/lib/credentials/token-cache.d.ts +54 -0
  666. package/node_modules/@anthropic-ai/sdk/lib/credentials/token-cache.d.ts.map +1 -0
  667. package/node_modules/@anthropic-ai/sdk/lib/credentials/token-cache.js +112 -0
  668. package/node_modules/@anthropic-ai/sdk/lib/credentials/token-cache.js.map +1 -0
  669. package/node_modules/@anthropic-ai/sdk/lib/credentials/token-cache.mjs +108 -0
  670. package/node_modules/@anthropic-ai/sdk/lib/credentials/token-cache.mjs.map +1 -0
  671. package/node_modules/@anthropic-ai/sdk/lib/credentials/types.d.mts +96 -0
  672. package/node_modules/@anthropic-ai/sdk/lib/credentials/types.d.mts.map +1 -0
  673. package/node_modules/@anthropic-ai/sdk/lib/credentials/types.d.ts +96 -0
  674. package/node_modules/@anthropic-ai/sdk/lib/credentials/types.d.ts.map +1 -0
  675. package/node_modules/@anthropic-ai/sdk/lib/credentials/types.js +266 -0
  676. package/node_modules/@anthropic-ai/sdk/lib/credentials/types.js.map +1 -0
  677. package/node_modules/@anthropic-ai/sdk/lib/credentials/types.mjs +224 -0
  678. package/node_modules/@anthropic-ai/sdk/lib/credentials/types.mjs.map +1 -0
  679. package/node_modules/@anthropic-ai/sdk/lib/credentials/user-oauth.d.mts +21 -0
  680. package/node_modules/@anthropic-ai/sdk/lib/credentials/user-oauth.d.mts.map +1 -0
  681. package/node_modules/@anthropic-ai/sdk/lib/credentials/user-oauth.d.ts +21 -0
  682. package/node_modules/@anthropic-ai/sdk/lib/credentials/user-oauth.d.ts.map +1 -0
  683. package/node_modules/@anthropic-ai/sdk/lib/credentials/user-oauth.js +130 -0
  684. package/node_modules/@anthropic-ai/sdk/lib/credentials/user-oauth.js.map +1 -0
  685. package/node_modules/@anthropic-ai/sdk/lib/credentials/user-oauth.mjs +94 -0
  686. package/node_modules/@anthropic-ai/sdk/lib/credentials/user-oauth.mjs.map +1 -0
  687. package/node_modules/@anthropic-ai/sdk/lib/credentials.d.mts +4 -0
  688. package/node_modules/@anthropic-ai/sdk/lib/credentials.d.mts.map +1 -0
  689. package/node_modules/@anthropic-ai/sdk/lib/credentials.d.ts +4 -0
  690. package/node_modules/@anthropic-ai/sdk/lib/credentials.d.ts.map +1 -0
  691. package/node_modules/@anthropic-ai/sdk/lib/credentials.js +8 -0
  692. package/node_modules/@anthropic-ai/sdk/lib/credentials.js.map +1 -0
  693. package/node_modules/@anthropic-ai/sdk/lib/credentials.mjs +3 -0
  694. package/node_modules/@anthropic-ai/sdk/lib/credentials.mjs.map +1 -0
  695. package/node_modules/@anthropic-ai/sdk/lib/environments/index.d.mts +4 -0
  696. package/node_modules/@anthropic-ai/sdk/lib/environments/index.d.mts.map +1 -0
  697. package/node_modules/@anthropic-ai/sdk/lib/environments/index.d.ts +4 -0
  698. package/node_modules/@anthropic-ai/sdk/lib/environments/index.d.ts.map +1 -0
  699. package/node_modules/@anthropic-ai/sdk/lib/environments/index.js +18 -0
  700. package/node_modules/@anthropic-ai/sdk/lib/environments/index.js.map +1 -0
  701. package/node_modules/@anthropic-ai/sdk/lib/environments/index.mjs +4 -0
  702. package/node_modules/@anthropic-ai/sdk/lib/environments/index.mjs.map +1 -0
  703. package/node_modules/@anthropic-ai/sdk/lib/environments/poller.d.mts +95 -0
  704. package/node_modules/@anthropic-ai/sdk/lib/environments/poller.d.mts.map +1 -0
  705. package/node_modules/@anthropic-ai/sdk/lib/environments/poller.d.ts +95 -0
  706. package/node_modules/@anthropic-ai/sdk/lib/environments/poller.d.ts.map +1 -0
  707. package/node_modules/@anthropic-ai/sdk/lib/environments/poller.js +226 -0
  708. package/node_modules/@anthropic-ai/sdk/lib/environments/poller.js.map +1 -0
  709. package/node_modules/@anthropic-ai/sdk/lib/environments/poller.mjs +217 -0
  710. package/node_modules/@anthropic-ai/sdk/lib/environments/poller.mjs.map +1 -0
  711. package/node_modules/@anthropic-ai/sdk/lib/environments/worker.d.mts +227 -0
  712. package/node_modules/@anthropic-ai/sdk/lib/environments/worker.d.mts.map +1 -0
  713. package/node_modules/@anthropic-ai/sdk/lib/environments/worker.d.ts +227 -0
  714. package/node_modules/@anthropic-ai/sdk/lib/environments/worker.d.ts.map +1 -0
  715. package/node_modules/@anthropic-ai/sdk/lib/environments/worker.js +569 -0
  716. package/node_modules/@anthropic-ai/sdk/lib/environments/worker.js.map +1 -0
  717. package/node_modules/@anthropic-ai/sdk/lib/environments/worker.mjs +564 -0
  718. package/node_modules/@anthropic-ai/sdk/lib/environments/worker.mjs.map +1 -0
  719. package/node_modules/@anthropic-ai/sdk/lib/helper-client.d.mts +31 -0
  720. package/node_modules/@anthropic-ai/sdk/lib/helper-client.d.mts.map +1 -0
  721. package/node_modules/@anthropic-ai/sdk/lib/helper-client.d.ts +31 -0
  722. package/node_modules/@anthropic-ai/sdk/lib/helper-client.d.ts.map +1 -0
  723. package/node_modules/@anthropic-ai/sdk/lib/helper-client.js +58 -0
  724. package/node_modules/@anthropic-ai/sdk/lib/helper-client.js.map +1 -0
  725. package/node_modules/@anthropic-ai/sdk/lib/helper-client.mjs +55 -0
  726. package/node_modules/@anthropic-ai/sdk/lib/helper-client.mjs.map +1 -0
  727. package/node_modules/@anthropic-ai/sdk/lib/middleware.d.mts +98 -0
  728. package/node_modules/@anthropic-ai/sdk/lib/middleware.d.mts.map +1 -0
  729. package/node_modules/@anthropic-ai/sdk/lib/middleware.d.ts +98 -0
  730. package/node_modules/@anthropic-ai/sdk/lib/middleware.d.ts.map +1 -0
  731. package/node_modules/@anthropic-ai/sdk/lib/middleware.js +754 -0
  732. package/node_modules/@anthropic-ai/sdk/lib/middleware.js.map +1 -0
  733. package/node_modules/@anthropic-ai/sdk/lib/middleware.mjs +749 -0
  734. package/node_modules/@anthropic-ai/sdk/lib/middleware.mjs.map +1 -0
  735. package/node_modules/@anthropic-ai/sdk/lib/parser.d.mts.map +1 -1
  736. package/node_modules/@anthropic-ai/sdk/lib/parser.d.ts.map +1 -1
  737. package/node_modules/@anthropic-ai/sdk/lib/parser.mjs.map +1 -1
  738. package/node_modules/@anthropic-ai/sdk/lib/sessions/accumulate.d.mts +22 -0
  739. package/node_modules/@anthropic-ai/sdk/lib/sessions/accumulate.d.mts.map +1 -0
  740. package/node_modules/@anthropic-ai/sdk/lib/sessions/accumulate.d.ts +22 -0
  741. package/node_modules/@anthropic-ai/sdk/lib/sessions/accumulate.d.ts.map +1 -0
  742. package/node_modules/@anthropic-ai/sdk/lib/sessions/accumulate.js +88 -0
  743. package/node_modules/@anthropic-ai/sdk/lib/sessions/accumulate.js.map +1 -0
  744. package/node_modules/@anthropic-ai/sdk/lib/sessions/accumulate.mjs +85 -0
  745. package/node_modules/@anthropic-ai/sdk/lib/sessions/accumulate.mjs.map +1 -0
  746. package/node_modules/@anthropic-ai/sdk/lib/tools/BetaRunnableTool.d.mts +38 -5
  747. package/node_modules/@anthropic-ai/sdk/lib/tools/BetaRunnableTool.d.mts.map +1 -1
  748. package/node_modules/@anthropic-ai/sdk/lib/tools/BetaRunnableTool.d.ts +38 -5
  749. package/node_modules/@anthropic-ai/sdk/lib/tools/BetaRunnableTool.d.ts.map +1 -1
  750. package/node_modules/@anthropic-ai/sdk/lib/tools/BetaRunnableTool.js +28 -0
  751. package/node_modules/@anthropic-ai/sdk/lib/tools/BetaRunnableTool.js.map +1 -1
  752. package/node_modules/@anthropic-ai/sdk/lib/tools/BetaRunnableTool.mjs +25 -1
  753. package/node_modules/@anthropic-ai/sdk/lib/tools/BetaRunnableTool.mjs.map +1 -1
  754. package/node_modules/@anthropic-ai/sdk/lib/tools/BetaToolRunner.d.mts +1 -1
  755. package/node_modules/@anthropic-ai/sdk/lib/tools/BetaToolRunner.d.mts.map +1 -1
  756. package/node_modules/@anthropic-ai/sdk/lib/tools/BetaToolRunner.d.ts +1 -1
  757. package/node_modules/@anthropic-ai/sdk/lib/tools/BetaToolRunner.d.ts.map +1 -1
  758. package/node_modules/@anthropic-ai/sdk/lib/tools/BetaToolRunner.js +107 -29
  759. package/node_modules/@anthropic-ai/sdk/lib/tools/BetaToolRunner.js.map +1 -1
  760. package/node_modules/@anthropic-ai/sdk/lib/tools/BetaToolRunner.mjs +105 -27
  761. package/node_modules/@anthropic-ai/sdk/lib/tools/BetaToolRunner.mjs.map +1 -1
  762. package/node_modules/@anthropic-ai/sdk/lib/tools/CompactionControl.d.mts.map +1 -1
  763. package/node_modules/@anthropic-ai/sdk/lib/tools/CompactionControl.d.ts.map +1 -1
  764. package/node_modules/@anthropic-ai/sdk/lib/tools/SessionToolRunner.d.mts +179 -0
  765. package/node_modules/@anthropic-ai/sdk/lib/tools/SessionToolRunner.d.mts.map +1 -0
  766. package/node_modules/@anthropic-ai/sdk/lib/tools/SessionToolRunner.d.ts +179 -0
  767. package/node_modules/@anthropic-ai/sdk/lib/tools/SessionToolRunner.d.ts.map +1 -0
  768. package/node_modules/@anthropic-ai/sdk/lib/tools/SessionToolRunner.js +728 -0
  769. package/node_modules/@anthropic-ai/sdk/lib/tools/SessionToolRunner.js.map +1 -0
  770. package/node_modules/@anthropic-ai/sdk/lib/tools/SessionToolRunner.mjs +724 -0
  771. package/node_modules/@anthropic-ai/sdk/lib/tools/SessionToolRunner.mjs.map +1 -0
  772. package/node_modules/@anthropic-ai/sdk/lib/tools/ToolError.d.mts.map +1 -1
  773. package/node_modules/@anthropic-ai/sdk/lib/tools/ToolError.d.ts.map +1 -1
  774. package/node_modules/@anthropic-ai/sdk/lib/transform-json-schema.mjs.map +1 -1
  775. package/node_modules/@anthropic-ai/sdk/package.json +32 -15
  776. package/node_modules/@anthropic-ai/sdk/pagination.d.mts +1 -0
  777. package/node_modules/@anthropic-ai/sdk/pagination.d.mts.map +1 -1
  778. package/node_modules/@anthropic-ai/sdk/pagination.d.ts +1 -0
  779. package/node_modules/@anthropic-ai/sdk/pagination.d.ts.map +1 -1
  780. package/node_modules/@anthropic-ai/sdk/pagination.mjs +1 -0
  781. package/node_modules/@anthropic-ai/sdk/pagination.mjs.map +1 -1
  782. package/node_modules/@anthropic-ai/sdk/resource.d.mts +1 -0
  783. package/node_modules/@anthropic-ai/sdk/resource.d.mts.map +1 -1
  784. package/node_modules/@anthropic-ai/sdk/resource.d.ts +1 -0
  785. package/node_modules/@anthropic-ai/sdk/resource.d.ts.map +1 -1
  786. package/node_modules/@anthropic-ai/sdk/resource.mjs +1 -0
  787. package/node_modules/@anthropic-ai/sdk/resource.mjs.map +1 -1
  788. package/node_modules/@anthropic-ai/sdk/resources/beta/agents/agents.d.mts +608 -68
  789. package/node_modules/@anthropic-ai/sdk/resources/beta/agents/agents.d.mts.map +1 -1
  790. package/node_modules/@anthropic-ai/sdk/resources/beta/agents/agents.d.ts +608 -68
  791. package/node_modules/@anthropic-ai/sdk/resources/beta/agents/agents.d.ts.map +1 -1
  792. package/node_modules/@anthropic-ai/sdk/resources/beta/agents/agents.js +2 -2
  793. package/node_modules/@anthropic-ai/sdk/resources/beta/agents/agents.js.map +1 -1
  794. package/node_modules/@anthropic-ai/sdk/resources/beta/agents/agents.mjs +2 -2
  795. package/node_modules/@anthropic-ai/sdk/resources/beta/agents/agents.mjs.map +1 -1
  796. package/node_modules/@anthropic-ai/sdk/resources/beta/agents/index.d.mts +1 -1
  797. package/node_modules/@anthropic-ai/sdk/resources/beta/agents/index.d.mts.map +1 -1
  798. package/node_modules/@anthropic-ai/sdk/resources/beta/agents/index.d.ts +1 -1
  799. package/node_modules/@anthropic-ai/sdk/resources/beta/agents/index.d.ts.map +1 -1
  800. package/node_modules/@anthropic-ai/sdk/resources/beta/agents/index.js.map +1 -1
  801. package/node_modules/@anthropic-ai/sdk/resources/beta/agents/index.mjs.map +1 -1
  802. package/node_modules/@anthropic-ai/sdk/resources/beta/agents/versions.d.mts.map +1 -1
  803. package/node_modules/@anthropic-ai/sdk/resources/beta/agents/versions.d.ts.map +1 -1
  804. package/node_modules/@anthropic-ai/sdk/resources/beta/agents/versions.mjs.map +1 -1
  805. package/node_modules/@anthropic-ai/sdk/resources/beta/agents.d.mts.map +1 -1
  806. package/node_modules/@anthropic-ai/sdk/resources/beta/agents.d.ts.map +1 -1
  807. package/node_modules/@anthropic-ai/sdk/resources/beta/agents.mjs.map +1 -1
  808. package/node_modules/@anthropic-ai/sdk/resources/beta/beta.d.mts +51 -13
  809. package/node_modules/@anthropic-ai/sdk/resources/beta/beta.d.mts.map +1 -1
  810. package/node_modules/@anthropic-ai/sdk/resources/beta/beta.d.ts +51 -13
  811. package/node_modules/@anthropic-ai/sdk/resources/beta/beta.d.ts.map +1 -1
  812. package/node_modules/@anthropic-ai/sdk/resources/beta/beta.js +22 -2
  813. package/node_modules/@anthropic-ai/sdk/resources/beta/beta.js.map +1 -1
  814. package/node_modules/@anthropic-ai/sdk/resources/beta/beta.mjs +22 -2
  815. package/node_modules/@anthropic-ai/sdk/resources/beta/beta.mjs.map +1 -1
  816. package/node_modules/@anthropic-ai/sdk/resources/beta/deployment-runs.d.mts +306 -0
  817. package/node_modules/@anthropic-ai/sdk/resources/beta/deployment-runs.d.mts.map +1 -0
  818. package/node_modules/@anthropic-ai/sdk/resources/beta/deployment-runs.d.ts +306 -0
  819. package/node_modules/@anthropic-ai/sdk/resources/beta/deployment-runs.d.ts.map +1 -0
  820. package/node_modules/@anthropic-ai/sdk/resources/beta/deployment-runs.js +55 -0
  821. package/node_modules/@anthropic-ai/sdk/resources/beta/deployment-runs.js.map +1 -0
  822. package/node_modules/@anthropic-ai/sdk/resources/beta/deployment-runs.mjs +51 -0
  823. package/node_modules/@anthropic-ai/sdk/resources/beta/deployment-runs.mjs.map +1 -0
  824. package/node_modules/@anthropic-ai/sdk/resources/beta/deployments.d.mts +698 -0
  825. package/node_modules/@anthropic-ai/sdk/resources/beta/deployments.d.mts.map +1 -0
  826. package/node_modules/@anthropic-ai/sdk/resources/beta/deployments.d.ts +698 -0
  827. package/node_modules/@anthropic-ai/sdk/resources/beta/deployments.d.ts.map +1 -0
  828. package/node_modules/@anthropic-ai/sdk/resources/beta/deployments.js +196 -0
  829. package/node_modules/@anthropic-ai/sdk/resources/beta/deployments.js.map +1 -0
  830. package/node_modules/@anthropic-ai/sdk/resources/beta/deployments.mjs +192 -0
  831. package/node_modules/@anthropic-ai/sdk/resources/beta/deployments.mjs.map +1 -0
  832. package/node_modules/@anthropic-ai/sdk/resources/beta/dreams.d.mts +309 -0
  833. package/node_modules/@anthropic-ai/sdk/resources/beta/dreams.d.mts.map +1 -0
  834. package/node_modules/@anthropic-ai/sdk/resources/beta/dreams.d.ts +309 -0
  835. package/node_modules/@anthropic-ai/sdk/resources/beta/dreams.d.ts.map +1 -0
  836. package/node_modules/@anthropic-ai/sdk/resources/beta/dreams.js +116 -0
  837. package/node_modules/@anthropic-ai/sdk/resources/beta/dreams.js.map +1 -0
  838. package/node_modules/@anthropic-ai/sdk/resources/beta/dreams.mjs +112 -0
  839. package/node_modules/@anthropic-ai/sdk/resources/beta/dreams.mjs.map +1 -0
  840. package/node_modules/@anthropic-ai/sdk/resources/beta/environments/environments.d.mts +426 -0
  841. package/node_modules/@anthropic-ai/sdk/resources/beta/environments/environments.d.mts.map +1 -0
  842. package/node_modules/@anthropic-ai/sdk/resources/beta/environments/environments.d.ts +426 -0
  843. package/node_modules/@anthropic-ai/sdk/resources/beta/environments/environments.d.ts.map +1 -0
  844. package/node_modules/@anthropic-ai/sdk/resources/beta/environments/environments.js +150 -0
  845. package/node_modules/@anthropic-ai/sdk/resources/beta/environments/environments.js.map +1 -0
  846. package/node_modules/@anthropic-ai/sdk/resources/beta/environments/environments.mjs +145 -0
  847. package/node_modules/@anthropic-ai/sdk/resources/beta/environments/environments.mjs.map +1 -0
  848. package/node_modules/@anthropic-ai/sdk/resources/beta/environments/index.d.mts +3 -0
  849. package/node_modules/@anthropic-ai/sdk/resources/beta/environments/index.d.mts.map +1 -0
  850. package/node_modules/@anthropic-ai/sdk/resources/beta/environments/index.d.ts +3 -0
  851. package/node_modules/@anthropic-ai/sdk/resources/beta/environments/index.d.ts.map +1 -0
  852. package/node_modules/@anthropic-ai/sdk/resources/beta/environments/index.js +9 -0
  853. package/node_modules/@anthropic-ai/sdk/resources/beta/environments/index.js.map +1 -0
  854. package/node_modules/@anthropic-ai/sdk/resources/beta/environments/index.mjs +4 -0
  855. package/node_modules/@anthropic-ai/sdk/resources/beta/environments/index.mjs.map +1 -0
  856. package/node_modules/@anthropic-ai/sdk/resources/beta/environments/work.d.mts +501 -0
  857. package/node_modules/@anthropic-ai/sdk/resources/beta/environments/work.d.mts.map +1 -0
  858. package/node_modules/@anthropic-ai/sdk/resources/beta/environments/work.d.ts +501 -0
  859. package/node_modules/@anthropic-ai/sdk/resources/beta/environments/work.d.ts.map +1 -0
  860. package/node_modules/@anthropic-ai/sdk/resources/beta/environments/work.js +257 -0
  861. package/node_modules/@anthropic-ai/sdk/resources/beta/environments/work.js.map +1 -0
  862. package/node_modules/@anthropic-ai/sdk/resources/beta/environments/work.mjs +251 -0
  863. package/node_modules/@anthropic-ai/sdk/resources/beta/environments/work.mjs.map +1 -0
  864. package/node_modules/@anthropic-ai/sdk/resources/beta/environments.d.mts +1 -388
  865. package/node_modules/@anthropic-ai/sdk/resources/beta/environments.d.mts.map +1 -1
  866. package/node_modules/@anthropic-ai/sdk/resources/beta/environments.d.ts +1 -388
  867. package/node_modules/@anthropic-ai/sdk/resources/beta/environments.d.ts.map +1 -1
  868. package/node_modules/@anthropic-ai/sdk/resources/beta/environments.js +2 -138
  869. package/node_modules/@anthropic-ai/sdk/resources/beta/environments.js.map +1 -1
  870. package/node_modules/@anthropic-ai/sdk/resources/beta/environments.mjs +1 -136
  871. package/node_modules/@anthropic-ai/sdk/resources/beta/environments.mjs.map +1 -1
  872. package/node_modules/@anthropic-ai/sdk/resources/beta/files.d.mts +22 -22
  873. package/node_modules/@anthropic-ai/sdk/resources/beta/files.d.mts.map +1 -1
  874. package/node_modules/@anthropic-ai/sdk/resources/beta/files.d.ts +22 -22
  875. package/node_modules/@anthropic-ai/sdk/resources/beta/files.d.ts.map +1 -1
  876. package/node_modules/@anthropic-ai/sdk/resources/beta/files.js +5 -5
  877. package/node_modules/@anthropic-ai/sdk/resources/beta/files.js.map +1 -1
  878. package/node_modules/@anthropic-ai/sdk/resources/beta/files.mjs +5 -5
  879. package/node_modules/@anthropic-ai/sdk/resources/beta/files.mjs.map +1 -1
  880. package/node_modules/@anthropic-ai/sdk/resources/beta/index.d.mts +11 -6
  881. package/node_modules/@anthropic-ai/sdk/resources/beta/index.d.mts.map +1 -1
  882. package/node_modules/@anthropic-ai/sdk/resources/beta/index.d.ts +11 -6
  883. package/node_modules/@anthropic-ai/sdk/resources/beta/index.d.ts.map +1 -1
  884. package/node_modules/@anthropic-ai/sdk/resources/beta/index.js +23 -13
  885. package/node_modules/@anthropic-ai/sdk/resources/beta/index.js.map +1 -1
  886. package/node_modules/@anthropic-ai/sdk/resources/beta/index.mjs +6 -1
  887. package/node_modules/@anthropic-ai/sdk/resources/beta/index.mjs.map +1 -1
  888. package/node_modules/@anthropic-ai/sdk/resources/beta/memory-stores/index.d.mts +1 -1
  889. package/node_modules/@anthropic-ai/sdk/resources/beta/memory-stores/index.d.mts.map +1 -1
  890. package/node_modules/@anthropic-ai/sdk/resources/beta/memory-stores/index.d.ts +1 -1
  891. package/node_modules/@anthropic-ai/sdk/resources/beta/memory-stores/index.d.ts.map +1 -1
  892. package/node_modules/@anthropic-ai/sdk/resources/beta/memory-stores/index.js.map +1 -1
  893. package/node_modules/@anthropic-ai/sdk/resources/beta/memory-stores/index.mjs.map +1 -1
  894. package/node_modules/@anthropic-ai/sdk/resources/beta/memory-stores/memories.d.mts +136 -24
  895. package/node_modules/@anthropic-ai/sdk/resources/beta/memory-stores/memories.d.mts.map +1 -1
  896. package/node_modules/@anthropic-ai/sdk/resources/beta/memory-stores/memories.d.ts +136 -24
  897. package/node_modules/@anthropic-ai/sdk/resources/beta/memory-stores/memories.d.ts.map +1 -1
  898. package/node_modules/@anthropic-ai/sdk/resources/beta/memory-stores/memories.js +10 -10
  899. package/node_modules/@anthropic-ai/sdk/resources/beta/memory-stores/memories.js.map +1 -1
  900. package/node_modules/@anthropic-ai/sdk/resources/beta/memory-stores/memories.mjs +10 -10
  901. package/node_modules/@anthropic-ai/sdk/resources/beta/memory-stores/memories.mjs.map +1 -1
  902. package/node_modules/@anthropic-ai/sdk/resources/beta/memory-stores/memory-stores.d.mts +60 -16
  903. package/node_modules/@anthropic-ai/sdk/resources/beta/memory-stores/memory-stores.d.mts.map +1 -1
  904. package/node_modules/@anthropic-ai/sdk/resources/beta/memory-stores/memory-stores.d.ts +60 -16
  905. package/node_modules/@anthropic-ai/sdk/resources/beta/memory-stores/memory-stores.d.ts.map +1 -1
  906. package/node_modules/@anthropic-ai/sdk/resources/beta/memory-stores/memory-stores.js +12 -12
  907. package/node_modules/@anthropic-ai/sdk/resources/beta/memory-stores/memory-stores.js.map +1 -1
  908. package/node_modules/@anthropic-ai/sdk/resources/beta/memory-stores/memory-stores.mjs +12 -12
  909. package/node_modules/@anthropic-ai/sdk/resources/beta/memory-stores/memory-stores.mjs.map +1 -1
  910. package/node_modules/@anthropic-ai/sdk/resources/beta/memory-stores/memory-versions.d.mts +105 -7
  911. package/node_modules/@anthropic-ai/sdk/resources/beta/memory-stores/memory-versions.d.mts.map +1 -1
  912. package/node_modules/@anthropic-ai/sdk/resources/beta/memory-stores/memory-versions.d.ts +105 -7
  913. package/node_modules/@anthropic-ai/sdk/resources/beta/memory-stores/memory-versions.d.ts.map +1 -1
  914. package/node_modules/@anthropic-ai/sdk/resources/beta/memory-stores/memory-versions.js +6 -6
  915. package/node_modules/@anthropic-ai/sdk/resources/beta/memory-stores/memory-versions.js.map +1 -1
  916. package/node_modules/@anthropic-ai/sdk/resources/beta/memory-stores/memory-versions.mjs +6 -6
  917. package/node_modules/@anthropic-ai/sdk/resources/beta/memory-stores/memory-versions.mjs.map +1 -1
  918. package/node_modules/@anthropic-ai/sdk/resources/beta/memory-stores.d.mts.map +1 -1
  919. package/node_modules/@anthropic-ai/sdk/resources/beta/memory-stores.d.ts.map +1 -1
  920. package/node_modules/@anthropic-ai/sdk/resources/beta/memory-stores.mjs.map +1 -1
  921. package/node_modules/@anthropic-ai/sdk/resources/beta/messages/batches.d.mts +81 -30
  922. package/node_modules/@anthropic-ai/sdk/resources/beta/messages/batches.d.mts.map +1 -1
  923. package/node_modules/@anthropic-ai/sdk/resources/beta/messages/batches.d.ts +81 -30
  924. package/node_modules/@anthropic-ai/sdk/resources/beta/messages/batches.d.ts.map +1 -1
  925. package/node_modules/@anthropic-ai/sdk/resources/beta/messages/batches.js +12 -9
  926. package/node_modules/@anthropic-ai/sdk/resources/beta/messages/batches.js.map +1 -1
  927. package/node_modules/@anthropic-ai/sdk/resources/beta/messages/batches.mjs +12 -9
  928. package/node_modules/@anthropic-ai/sdk/resources/beta/messages/batches.mjs.map +1 -1
  929. package/node_modules/@anthropic-ai/sdk/resources/beta/messages/index.d.mts +1 -1
  930. package/node_modules/@anthropic-ai/sdk/resources/beta/messages/index.d.mts.map +1 -1
  931. package/node_modules/@anthropic-ai/sdk/resources/beta/messages/index.d.ts +1 -1
  932. package/node_modules/@anthropic-ai/sdk/resources/beta/messages/index.d.ts.map +1 -1
  933. package/node_modules/@anthropic-ai/sdk/resources/beta/messages/index.js.map +1 -1
  934. package/node_modules/@anthropic-ai/sdk/resources/beta/messages/index.mjs.map +1 -1
  935. package/node_modules/@anthropic-ai/sdk/resources/beta/messages/messages.d.mts +2453 -380
  936. package/node_modules/@anthropic-ai/sdk/resources/beta/messages/messages.d.mts.map +1 -1
  937. package/node_modules/@anthropic-ai/sdk/resources/beta/messages/messages.d.ts +2453 -380
  938. package/node_modules/@anthropic-ai/sdk/resources/beta/messages/messages.d.ts.map +1 -1
  939. package/node_modules/@anthropic-ai/sdk/resources/beta/messages/messages.js +16 -22
  940. package/node_modules/@anthropic-ai/sdk/resources/beta/messages/messages.js.map +1 -1
  941. package/node_modules/@anthropic-ai/sdk/resources/beta/messages/messages.mjs +16 -22
  942. package/node_modules/@anthropic-ai/sdk/resources/beta/messages/messages.mjs.map +1 -1
  943. package/node_modules/@anthropic-ai/sdk/resources/beta/messages.d.mts.map +1 -1
  944. package/node_modules/@anthropic-ai/sdk/resources/beta/messages.d.ts.map +1 -1
  945. package/node_modules/@anthropic-ai/sdk/resources/beta/messages.mjs.map +1 -1
  946. package/node_modules/@anthropic-ai/sdk/resources/beta/models.d.mts +6 -0
  947. package/node_modules/@anthropic-ai/sdk/resources/beta/models.d.mts.map +1 -1
  948. package/node_modules/@anthropic-ai/sdk/resources/beta/models.d.ts +6 -0
  949. package/node_modules/@anthropic-ai/sdk/resources/beta/models.d.ts.map +1 -1
  950. package/node_modules/@anthropic-ai/sdk/resources/beta/models.mjs.map +1 -1
  951. package/node_modules/@anthropic-ai/sdk/resources/beta/sessions/events.d.mts +643 -19
  952. package/node_modules/@anthropic-ai/sdk/resources/beta/sessions/events.d.mts.map +1 -1
  953. package/node_modules/@anthropic-ai/sdk/resources/beta/sessions/events.d.ts +643 -19
  954. package/node_modules/@anthropic-ai/sdk/resources/beta/sessions/events.d.ts.map +1 -1
  955. package/node_modules/@anthropic-ai/sdk/resources/beta/sessions/events.js +29 -2
  956. package/node_modules/@anthropic-ai/sdk/resources/beta/sessions/events.js.map +1 -1
  957. package/node_modules/@anthropic-ai/sdk/resources/beta/sessions/events.mjs +27 -1
  958. package/node_modules/@anthropic-ai/sdk/resources/beta/sessions/events.mjs.map +1 -1
  959. package/node_modules/@anthropic-ai/sdk/resources/beta/sessions/index.d.mts +3 -2
  960. package/node_modules/@anthropic-ai/sdk/resources/beta/sessions/index.d.mts.map +1 -1
  961. package/node_modules/@anthropic-ai/sdk/resources/beta/sessions/index.d.ts +3 -2
  962. package/node_modules/@anthropic-ai/sdk/resources/beta/sessions/index.d.ts.map +1 -1
  963. package/node_modules/@anthropic-ai/sdk/resources/beta/sessions/index.js +3 -1
  964. package/node_modules/@anthropic-ai/sdk/resources/beta/sessions/index.js.map +1 -1
  965. package/node_modules/@anthropic-ai/sdk/resources/beta/sessions/index.mjs +1 -0
  966. package/node_modules/@anthropic-ai/sdk/resources/beta/sessions/index.mjs.map +1 -1
  967. package/node_modules/@anthropic-ai/sdk/resources/beta/sessions/resources.d.mts.map +1 -1
  968. package/node_modules/@anthropic-ai/sdk/resources/beta/sessions/resources.d.ts.map +1 -1
  969. package/node_modules/@anthropic-ai/sdk/resources/beta/sessions/resources.mjs.map +1 -1
  970. package/node_modules/@anthropic-ai/sdk/resources/beta/sessions/sessions.d.mts +455 -8
  971. package/node_modules/@anthropic-ai/sdk/resources/beta/sessions/sessions.d.mts.map +1 -1
  972. package/node_modules/@anthropic-ai/sdk/resources/beta/sessions/sessions.d.ts +455 -8
  973. package/node_modules/@anthropic-ai/sdk/resources/beta/sessions/sessions.d.ts.map +1 -1
  974. package/node_modules/@anthropic-ai/sdk/resources/beta/sessions/sessions.js +5 -1
  975. package/node_modules/@anthropic-ai/sdk/resources/beta/sessions/sessions.js.map +1 -1
  976. package/node_modules/@anthropic-ai/sdk/resources/beta/sessions/sessions.mjs +6 -2
  977. package/node_modules/@anthropic-ai/sdk/resources/beta/sessions/sessions.mjs.map +1 -1
  978. package/node_modules/@anthropic-ai/sdk/resources/beta/sessions/threads/events.d.mts +78 -0
  979. package/node_modules/@anthropic-ai/sdk/resources/beta/sessions/threads/events.d.mts.map +1 -0
  980. package/node_modules/@anthropic-ai/sdk/resources/beta/sessions/threads/events.d.ts +78 -0
  981. package/node_modules/@anthropic-ai/sdk/resources/beta/sessions/threads/events.d.ts.map +1 -0
  982. package/node_modules/@anthropic-ai/sdk/resources/beta/sessions/threads/events.js +61 -0
  983. package/node_modules/@anthropic-ai/sdk/resources/beta/sessions/threads/events.js.map +1 -0
  984. package/node_modules/@anthropic-ai/sdk/resources/beta/sessions/threads/events.mjs +57 -0
  985. package/node_modules/@anthropic-ai/sdk/resources/beta/sessions/threads/events.mjs.map +1 -0
  986. package/node_modules/@anthropic-ai/sdk/resources/beta/sessions/threads/index.d.mts +3 -0
  987. package/node_modules/@anthropic-ai/sdk/resources/beta/sessions/threads/index.d.mts.map +1 -0
  988. package/node_modules/@anthropic-ai/sdk/resources/beta/sessions/threads/index.d.ts +3 -0
  989. package/node_modules/@anthropic-ai/sdk/resources/beta/sessions/threads/index.d.ts.map +1 -0
  990. package/node_modules/@anthropic-ai/sdk/resources/beta/sessions/threads/index.js +9 -0
  991. package/node_modules/@anthropic-ai/sdk/resources/beta/sessions/threads/index.js.map +1 -0
  992. package/node_modules/@anthropic-ai/sdk/resources/beta/sessions/threads/index.mjs +4 -0
  993. package/node_modules/@anthropic-ai/sdk/resources/beta/sessions/threads/index.mjs.map +1 -0
  994. package/node_modules/@anthropic-ai/sdk/resources/beta/sessions/threads/threads.d.mts +195 -0
  995. package/node_modules/@anthropic-ai/sdk/resources/beta/sessions/threads/threads.d.mts.map +1 -0
  996. package/node_modules/@anthropic-ai/sdk/resources/beta/sessions/threads/threads.d.ts +195 -0
  997. package/node_modules/@anthropic-ai/sdk/resources/beta/sessions/threads/threads.d.ts.map +1 -0
  998. package/node_modules/@anthropic-ai/sdk/resources/beta/sessions/threads/threads.js +88 -0
  999. package/node_modules/@anthropic-ai/sdk/resources/beta/sessions/threads/threads.js.map +1 -0
  1000. package/node_modules/@anthropic-ai/sdk/resources/beta/sessions/threads/threads.mjs +83 -0
  1001. package/node_modules/@anthropic-ai/sdk/resources/beta/sessions/threads/threads.mjs.map +1 -0
  1002. package/node_modules/@anthropic-ai/sdk/resources/beta/sessions/threads.d.mts +2 -0
  1003. package/node_modules/@anthropic-ai/sdk/resources/beta/sessions/threads.d.mts.map +1 -0
  1004. package/node_modules/@anthropic-ai/sdk/resources/beta/sessions/threads.d.ts +2 -0
  1005. package/node_modules/@anthropic-ai/sdk/resources/beta/sessions/threads.d.ts.map +1 -0
  1006. package/node_modules/@anthropic-ai/sdk/resources/beta/sessions/threads.js +6 -0
  1007. package/node_modules/@anthropic-ai/sdk/resources/beta/sessions/threads.js.map +1 -0
  1008. package/node_modules/@anthropic-ai/sdk/resources/beta/sessions/threads.mjs +3 -0
  1009. package/node_modules/@anthropic-ai/sdk/resources/beta/sessions/threads.mjs.map +1 -0
  1010. package/node_modules/@anthropic-ai/sdk/resources/beta/sessions.d.mts.map +1 -1
  1011. package/node_modules/@anthropic-ai/sdk/resources/beta/sessions.d.ts.map +1 -1
  1012. package/node_modules/@anthropic-ai/sdk/resources/beta/sessions.mjs.map +1 -1
  1013. package/node_modules/@anthropic-ai/sdk/resources/beta/skills/index.d.mts +1 -1
  1014. package/node_modules/@anthropic-ai/sdk/resources/beta/skills/index.d.mts.map +1 -1
  1015. package/node_modules/@anthropic-ai/sdk/resources/beta/skills/index.d.ts +1 -1
  1016. package/node_modules/@anthropic-ai/sdk/resources/beta/skills/index.d.ts.map +1 -1
  1017. package/node_modules/@anthropic-ai/sdk/resources/beta/skills/index.js.map +1 -1
  1018. package/node_modules/@anthropic-ai/sdk/resources/beta/skills/index.mjs.map +1 -1
  1019. package/node_modules/@anthropic-ai/sdk/resources/beta/skills/skills.d.mts +13 -11
  1020. package/node_modules/@anthropic-ai/sdk/resources/beta/skills/skills.d.mts.map +1 -1
  1021. package/node_modules/@anthropic-ai/sdk/resources/beta/skills/skills.d.ts +13 -11
  1022. package/node_modules/@anthropic-ai/sdk/resources/beta/skills/skills.d.ts.map +1 -1
  1023. package/node_modules/@anthropic-ai/sdk/resources/beta/skills/skills.js +5 -3
  1024. package/node_modules/@anthropic-ai/sdk/resources/beta/skills/skills.js.map +1 -1
  1025. package/node_modules/@anthropic-ai/sdk/resources/beta/skills/skills.mjs +5 -3
  1026. package/node_modules/@anthropic-ai/sdk/resources/beta/skills/skills.mjs.map +1 -1
  1027. package/node_modules/@anthropic-ai/sdk/resources/beta/skills/versions.d.mts +31 -3
  1028. package/node_modules/@anthropic-ai/sdk/resources/beta/skills/versions.d.mts.map +1 -1
  1029. package/node_modules/@anthropic-ai/sdk/resources/beta/skills/versions.d.ts +31 -3
  1030. package/node_modules/@anthropic-ai/sdk/resources/beta/skills/versions.d.ts.map +1 -1
  1031. package/node_modules/@anthropic-ai/sdk/resources/beta/skills/versions.js +32 -3
  1032. package/node_modules/@anthropic-ai/sdk/resources/beta/skills/versions.js.map +1 -1
  1033. package/node_modules/@anthropic-ai/sdk/resources/beta/skills/versions.mjs +32 -3
  1034. package/node_modules/@anthropic-ai/sdk/resources/beta/skills/versions.mjs.map +1 -1
  1035. package/node_modules/@anthropic-ai/sdk/resources/beta/skills.d.mts.map +1 -1
  1036. package/node_modules/@anthropic-ai/sdk/resources/beta/skills.d.ts.map +1 -1
  1037. package/node_modules/@anthropic-ai/sdk/resources/beta/skills.mjs.map +1 -1
  1038. package/node_modules/@anthropic-ai/sdk/resources/beta/tunnels/certificates.d.mts +163 -0
  1039. package/node_modules/@anthropic-ai/sdk/resources/beta/tunnels/certificates.d.mts.map +1 -0
  1040. package/node_modules/@anthropic-ai/sdk/resources/beta/tunnels/certificates.d.ts +163 -0
  1041. package/node_modules/@anthropic-ai/sdk/resources/beta/tunnels/certificates.d.ts.map +1 -0
  1042. package/node_modules/@anthropic-ai/sdk/resources/beta/tunnels/certificates.js +129 -0
  1043. package/node_modules/@anthropic-ai/sdk/resources/beta/tunnels/certificates.js.map +1 -0
  1044. package/node_modules/@anthropic-ai/sdk/resources/beta/tunnels/certificates.mjs +125 -0
  1045. package/node_modules/@anthropic-ai/sdk/resources/beta/tunnels/certificates.mjs.map +1 -0
  1046. package/node_modules/@anthropic-ai/sdk/resources/beta/tunnels/index.d.mts +3 -0
  1047. package/node_modules/@anthropic-ai/sdk/resources/beta/tunnels/index.d.mts.map +1 -0
  1048. package/node_modules/@anthropic-ai/sdk/resources/beta/tunnels/index.d.ts +3 -0
  1049. package/node_modules/@anthropic-ai/sdk/resources/beta/tunnels/index.d.ts.map +1 -0
  1050. package/node_modules/@anthropic-ai/sdk/resources/beta/tunnels/index.js +9 -0
  1051. package/node_modules/@anthropic-ai/sdk/resources/beta/tunnels/index.js.map +1 -0
  1052. package/node_modules/@anthropic-ai/sdk/resources/beta/tunnels/index.mjs +4 -0
  1053. package/node_modules/@anthropic-ai/sdk/resources/beta/tunnels/index.mjs.map +1 -0
  1054. package/node_modules/@anthropic-ai/sdk/resources/beta/tunnels/tunnels.d.mts +212 -0
  1055. package/node_modules/@anthropic-ai/sdk/resources/beta/tunnels/tunnels.d.mts.map +1 -0
  1056. package/node_modules/@anthropic-ai/sdk/resources/beta/tunnels/tunnels.d.ts +212 -0
  1057. package/node_modules/@anthropic-ai/sdk/resources/beta/tunnels/tunnels.d.ts.map +1 -0
  1058. package/node_modules/@anthropic-ai/sdk/resources/beta/tunnels/tunnels.js +181 -0
  1059. package/node_modules/@anthropic-ai/sdk/resources/beta/tunnels/tunnels.js.map +1 -0
  1060. package/node_modules/@anthropic-ai/sdk/resources/beta/tunnels/tunnels.mjs +176 -0
  1061. package/node_modules/@anthropic-ai/sdk/resources/beta/tunnels/tunnels.mjs.map +1 -0
  1062. package/node_modules/@anthropic-ai/sdk/resources/beta/tunnels.d.mts +2 -0
  1063. package/node_modules/@anthropic-ai/sdk/resources/beta/tunnels.d.mts.map +1 -0
  1064. package/node_modules/@anthropic-ai/sdk/resources/beta/tunnels.d.ts +2 -0
  1065. package/node_modules/@anthropic-ai/sdk/resources/beta/tunnels.d.ts.map +1 -0
  1066. package/node_modules/@anthropic-ai/sdk/resources/beta/tunnels.js +6 -0
  1067. package/node_modules/@anthropic-ai/sdk/resources/beta/tunnels.js.map +1 -0
  1068. package/node_modules/@anthropic-ai/sdk/resources/beta/tunnels.mjs +3 -0
  1069. package/node_modules/@anthropic-ai/sdk/resources/beta/tunnels.mjs.map +1 -0
  1070. package/node_modules/@anthropic-ai/sdk/resources/beta/user-profiles.d.mts +62 -0
  1071. package/node_modules/@anthropic-ai/sdk/resources/beta/user-profiles.d.mts.map +1 -1
  1072. package/node_modules/@anthropic-ai/sdk/resources/beta/user-profiles.d.ts +62 -0
  1073. package/node_modules/@anthropic-ai/sdk/resources/beta/user-profiles.d.ts.map +1 -1
  1074. package/node_modules/@anthropic-ai/sdk/resources/beta/user-profiles.js +5 -5
  1075. package/node_modules/@anthropic-ai/sdk/resources/beta/user-profiles.mjs +5 -5
  1076. package/node_modules/@anthropic-ai/sdk/resources/beta/user-profiles.mjs.map +1 -1
  1077. package/node_modules/@anthropic-ai/sdk/resources/beta/vaults/credentials.d.mts +256 -4
  1078. package/node_modules/@anthropic-ai/sdk/resources/beta/vaults/credentials.d.mts.map +1 -1
  1079. package/node_modules/@anthropic-ai/sdk/resources/beta/vaults/credentials.d.ts +256 -4
  1080. package/node_modules/@anthropic-ai/sdk/resources/beta/vaults/credentials.d.ts.map +1 -1
  1081. package/node_modules/@anthropic-ai/sdk/resources/beta/vaults/credentials.js +22 -0
  1082. package/node_modules/@anthropic-ai/sdk/resources/beta/vaults/credentials.js.map +1 -1
  1083. package/node_modules/@anthropic-ai/sdk/resources/beta/vaults/credentials.mjs +22 -0
  1084. package/node_modules/@anthropic-ai/sdk/resources/beta/vaults/credentials.mjs.map +1 -1
  1085. package/node_modules/@anthropic-ai/sdk/resources/beta/vaults/index.d.mts +1 -1
  1086. package/node_modules/@anthropic-ai/sdk/resources/beta/vaults/index.d.mts.map +1 -1
  1087. package/node_modules/@anthropic-ai/sdk/resources/beta/vaults/index.d.ts +1 -1
  1088. package/node_modules/@anthropic-ai/sdk/resources/beta/vaults/index.d.ts.map +1 -1
  1089. package/node_modules/@anthropic-ai/sdk/resources/beta/vaults/index.js.map +1 -1
  1090. package/node_modules/@anthropic-ai/sdk/resources/beta/vaults/index.mjs.map +1 -1
  1091. package/node_modules/@anthropic-ai/sdk/resources/beta/vaults/vaults.d.mts +2 -2
  1092. package/node_modules/@anthropic-ai/sdk/resources/beta/vaults/vaults.d.mts.map +1 -1
  1093. package/node_modules/@anthropic-ai/sdk/resources/beta/vaults/vaults.d.ts +2 -2
  1094. package/node_modules/@anthropic-ai/sdk/resources/beta/vaults/vaults.d.ts.map +1 -1
  1095. package/node_modules/@anthropic-ai/sdk/resources/beta/vaults/vaults.js.map +1 -1
  1096. package/node_modules/@anthropic-ai/sdk/resources/beta/vaults/vaults.mjs.map +1 -1
  1097. package/node_modules/@anthropic-ai/sdk/resources/beta/vaults.d.mts.map +1 -1
  1098. package/node_modules/@anthropic-ai/sdk/resources/beta/vaults.d.ts.map +1 -1
  1099. package/node_modules/@anthropic-ai/sdk/resources/beta/vaults.mjs.map +1 -1
  1100. package/node_modules/@anthropic-ai/sdk/resources/beta/webhooks.d.mts +466 -0
  1101. package/node_modules/@anthropic-ai/sdk/resources/beta/webhooks.d.mts.map +1 -0
  1102. package/node_modules/@anthropic-ai/sdk/resources/beta/webhooks.d.ts +466 -0
  1103. package/node_modules/@anthropic-ai/sdk/resources/beta/webhooks.d.ts.map +1 -0
  1104. package/node_modules/@anthropic-ai/sdk/resources/beta/webhooks.js +20 -0
  1105. package/node_modules/@anthropic-ai/sdk/resources/beta/webhooks.js.map +1 -0
  1106. package/node_modules/@anthropic-ai/sdk/resources/beta/webhooks.mjs +16 -0
  1107. package/node_modules/@anthropic-ai/sdk/resources/beta/webhooks.mjs.map +1 -0
  1108. package/node_modules/@anthropic-ai/sdk/resources/beta.d.mts.map +1 -1
  1109. package/node_modules/@anthropic-ai/sdk/resources/beta.d.ts.map +1 -1
  1110. package/node_modules/@anthropic-ai/sdk/resources/beta.mjs.map +1 -1
  1111. package/node_modules/@anthropic-ai/sdk/resources/completions.d.mts +18 -11
  1112. package/node_modules/@anthropic-ai/sdk/resources/completions.d.mts.map +1 -1
  1113. package/node_modules/@anthropic-ai/sdk/resources/completions.d.ts +18 -11
  1114. package/node_modules/@anthropic-ai/sdk/resources/completions.d.ts.map +1 -1
  1115. package/node_modules/@anthropic-ai/sdk/resources/completions.mjs.map +1 -1
  1116. package/node_modules/@anthropic-ai/sdk/resources/files.d.mts +105 -0
  1117. package/node_modules/@anthropic-ai/sdk/resources/files.d.mts.map +1 -0
  1118. package/node_modules/@anthropic-ai/sdk/resources/files.d.ts +105 -0
  1119. package/node_modules/@anthropic-ai/sdk/resources/files.d.ts.map +1 -0
  1120. package/node_modules/@anthropic-ai/sdk/resources/files.js +52 -0
  1121. package/node_modules/@anthropic-ai/sdk/resources/files.js.map +1 -0
  1122. package/node_modules/@anthropic-ai/sdk/resources/files.mjs +48 -0
  1123. package/node_modules/@anthropic-ai/sdk/resources/files.mjs.map +1 -0
  1124. package/node_modules/@anthropic-ai/sdk/resources/index.d.mts +4 -2
  1125. package/node_modules/@anthropic-ai/sdk/resources/index.d.mts.map +1 -1
  1126. package/node_modules/@anthropic-ai/sdk/resources/index.d.ts +4 -2
  1127. package/node_modules/@anthropic-ai/sdk/resources/index.d.ts.map +1 -1
  1128. package/node_modules/@anthropic-ai/sdk/resources/index.js +5 -1
  1129. package/node_modules/@anthropic-ai/sdk/resources/index.js.map +1 -1
  1130. package/node_modules/@anthropic-ai/sdk/resources/index.mjs +2 -0
  1131. package/node_modules/@anthropic-ai/sdk/resources/index.mjs.map +1 -1
  1132. package/node_modules/@anthropic-ai/sdk/resources/messages/batches.d.mts +20 -11
  1133. package/node_modules/@anthropic-ai/sdk/resources/messages/batches.d.mts.map +1 -1
  1134. package/node_modules/@anthropic-ai/sdk/resources/messages/batches.d.ts +20 -11
  1135. package/node_modules/@anthropic-ai/sdk/resources/messages/batches.d.ts.map +1 -1
  1136. package/node_modules/@anthropic-ai/sdk/resources/messages/batches.js +17 -9
  1137. package/node_modules/@anthropic-ai/sdk/resources/messages/batches.js.map +1 -1
  1138. package/node_modules/@anthropic-ai/sdk/resources/messages/batches.mjs +17 -9
  1139. package/node_modules/@anthropic-ai/sdk/resources/messages/batches.mjs.map +1 -1
  1140. package/node_modules/@anthropic-ai/sdk/resources/messages/index.d.mts +1 -1
  1141. package/node_modules/@anthropic-ai/sdk/resources/messages/index.d.mts.map +1 -1
  1142. package/node_modules/@anthropic-ai/sdk/resources/messages/index.d.ts +1 -1
  1143. package/node_modules/@anthropic-ai/sdk/resources/messages/index.d.ts.map +1 -1
  1144. package/node_modules/@anthropic-ai/sdk/resources/messages/index.js.map +1 -1
  1145. package/node_modules/@anthropic-ai/sdk/resources/messages/index.mjs.map +1 -1
  1146. package/node_modules/@anthropic-ai/sdk/resources/messages/messages.d.mts +1782 -162
  1147. package/node_modules/@anthropic-ai/sdk/resources/messages/messages.d.mts.map +1 -1
  1148. package/node_modules/@anthropic-ai/sdk/resources/messages/messages.d.ts +1782 -162
  1149. package/node_modules/@anthropic-ai/sdk/resources/messages/messages.d.ts.map +1 -1
  1150. package/node_modules/@anthropic-ai/sdk/resources/messages/messages.js +23 -28
  1151. package/node_modules/@anthropic-ai/sdk/resources/messages/messages.js.map +1 -1
  1152. package/node_modules/@anthropic-ai/sdk/resources/messages/messages.mjs +23 -28
  1153. package/node_modules/@anthropic-ai/sdk/resources/messages/messages.mjs.map +1 -1
  1154. package/node_modules/@anthropic-ai/sdk/resources/messages.d.mts.map +1 -1
  1155. package/node_modules/@anthropic-ai/sdk/resources/messages.d.ts.map +1 -1
  1156. package/node_modules/@anthropic-ai/sdk/resources/messages.mjs.map +1 -1
  1157. package/node_modules/@anthropic-ai/sdk/resources/models.d.mts.map +1 -1
  1158. package/node_modules/@anthropic-ai/sdk/resources/models.d.ts.map +1 -1
  1159. package/node_modules/@anthropic-ai/sdk/resources/models.mjs.map +1 -1
  1160. package/node_modules/@anthropic-ai/sdk/resources/skills/index.d.mts +3 -0
  1161. package/node_modules/@anthropic-ai/sdk/resources/skills/index.d.mts.map +1 -0
  1162. package/node_modules/@anthropic-ai/sdk/resources/skills/index.d.ts +3 -0
  1163. package/node_modules/@anthropic-ai/sdk/resources/skills/index.d.ts.map +1 -0
  1164. package/node_modules/@anthropic-ai/sdk/resources/skills/index.js +9 -0
  1165. package/node_modules/@anthropic-ai/sdk/resources/skills/index.js.map +1 -0
  1166. package/node_modules/@anthropic-ai/sdk/resources/skills/index.mjs +4 -0
  1167. package/node_modules/@anthropic-ai/sdk/resources/skills/index.mjs.map +1 -0
  1168. package/node_modules/@anthropic-ai/sdk/resources/skills/skills.d.mts +129 -0
  1169. package/node_modules/@anthropic-ai/sdk/resources/skills/skills.d.mts.map +1 -0
  1170. package/node_modules/@anthropic-ai/sdk/resources/skills/skills.d.ts +129 -0
  1171. package/node_modules/@anthropic-ai/sdk/resources/skills/skills.d.ts.map +1 -0
  1172. package/node_modules/@anthropic-ai/sdk/resources/skills/skills.js +44 -0
  1173. package/node_modules/@anthropic-ai/sdk/resources/skills/skills.js.map +1 -0
  1174. package/node_modules/@anthropic-ai/sdk/resources/skills/skills.mjs +39 -0
  1175. package/node_modules/@anthropic-ai/sdk/resources/skills/skills.mjs.map +1 -0
  1176. package/node_modules/@anthropic-ai/sdk/resources/skills/versions.d.mts +104 -0
  1177. package/node_modules/@anthropic-ai/sdk/resources/skills/versions.d.mts.map +1 -0
  1178. package/node_modules/@anthropic-ai/sdk/resources/skills/versions.d.ts +104 -0
  1179. package/node_modules/@anthropic-ai/sdk/resources/skills/versions.d.ts.map +1 -0
  1180. package/node_modules/@anthropic-ai/sdk/resources/skills/versions.js +41 -0
  1181. package/node_modules/@anthropic-ai/sdk/resources/skills/versions.js.map +1 -0
  1182. package/node_modules/@anthropic-ai/sdk/resources/skills/versions.mjs +37 -0
  1183. package/node_modules/@anthropic-ai/sdk/resources/skills/versions.mjs.map +1 -0
  1184. package/node_modules/@anthropic-ai/sdk/resources/skills.d.mts +2 -0
  1185. package/node_modules/@anthropic-ai/sdk/resources/skills.d.mts.map +1 -0
  1186. package/node_modules/@anthropic-ai/sdk/resources/skills.d.ts +2 -0
  1187. package/node_modules/@anthropic-ai/sdk/resources/skills.d.ts.map +1 -0
  1188. package/node_modules/@anthropic-ai/sdk/resources/skills.js +6 -0
  1189. package/node_modules/@anthropic-ai/sdk/resources/skills.js.map +1 -0
  1190. package/node_modules/@anthropic-ai/sdk/resources/skills.mjs +3 -0
  1191. package/node_modules/@anthropic-ai/sdk/resources/skills.mjs.map +1 -0
  1192. package/node_modules/@anthropic-ai/sdk/resources.d.mts.map +1 -1
  1193. package/node_modules/@anthropic-ai/sdk/resources.d.ts.map +1 -1
  1194. package/node_modules/@anthropic-ai/sdk/resources.mjs.map +1 -1
  1195. package/node_modules/@anthropic-ai/sdk/src/_vendor/partial-json-parser/parser.ts +18 -2
  1196. package/node_modules/@anthropic-ai/sdk/src/client.ts +749 -42
  1197. package/node_modules/@anthropic-ai/sdk/src/core/api-promise.ts +14 -4
  1198. package/node_modules/@anthropic-ai/sdk/src/core/api.ts +11 -0
  1199. package/node_modules/@anthropic-ai/sdk/src/core/credentials.ts +379 -0
  1200. package/node_modules/@anthropic-ai/sdk/src/core/error.ts +17 -0
  1201. package/node_modules/@anthropic-ai/sdk/src/core/middleware.ts +339 -0
  1202. package/node_modules/@anthropic-ai/sdk/src/core/pagination.ts +60 -0
  1203. package/node_modules/@anthropic-ai/sdk/src/core/streaming.ts +38 -1
  1204. package/node_modules/@anthropic-ai/sdk/src/helpers/beta/environments.ts +34 -0
  1205. package/node_modules/@anthropic-ai/sdk/src/helpers/beta/json-schema.ts +7 -0
  1206. package/node_modules/@anthropic-ai/sdk/src/helpers/beta/mcp.ts +1 -1
  1207. package/node_modules/@anthropic-ai/sdk/src/helpers/beta/zod.ts +14 -10
  1208. package/node_modules/@anthropic-ai/sdk/src/helpers/zod.ts +3 -6
  1209. package/node_modules/@anthropic-ai/sdk/src/index.ts +16 -1
  1210. package/node_modules/@anthropic-ai/sdk/src/internal/constants.ts +0 -5
  1211. package/node_modules/@anthropic-ai/sdk/src/internal/file-store.ts +550 -0
  1212. package/node_modules/@anthropic-ai/sdk/src/internal/headers.ts +47 -4
  1213. package/node_modules/@anthropic-ai/sdk/src/internal/message-stream-utils.ts +30 -0
  1214. package/node_modules/@anthropic-ai/sdk/src/internal/parse.ts +16 -11
  1215. package/node_modules/@anthropic-ai/sdk/src/internal/qs/LICENSE.md +13 -0
  1216. package/node_modules/@anthropic-ai/sdk/src/internal/qs/README.md +3 -0
  1217. package/node_modules/@anthropic-ai/sdk/src/internal/qs/formats.ts +10 -0
  1218. package/node_modules/@anthropic-ai/sdk/src/internal/qs/index.ts +13 -0
  1219. package/node_modules/@anthropic-ai/sdk/src/internal/qs/stringify.ts +385 -0
  1220. package/node_modules/@anthropic-ai/sdk/src/internal/qs/types.ts +71 -0
  1221. package/node_modules/@anthropic-ai/sdk/src/internal/qs/utils.ts +265 -0
  1222. package/node_modules/@anthropic-ai/sdk/src/internal/request-options.ts +55 -2
  1223. package/node_modules/@anthropic-ai/sdk/src/internal/request-signal.ts +68 -0
  1224. package/node_modules/@anthropic-ai/sdk/src/internal/stainless-helper-header.ts +122 -0
  1225. package/node_modules/@anthropic-ai/sdk/src/internal/utils/abort.ts +21 -0
  1226. package/node_modules/@anthropic-ai/sdk/src/internal/utils/async-queue.ts +66 -0
  1227. package/node_modules/@anthropic-ai/sdk/src/internal/utils/backoff.ts +41 -0
  1228. package/node_modules/@anthropic-ai/sdk/src/internal/utils/log.ts +41 -10
  1229. package/node_modules/@anthropic-ai/sdk/src/internal/utils/promise.ts +18 -0
  1230. package/node_modules/@anthropic-ai/sdk/src/internal/utils/query.ts +2 -18
  1231. package/node_modules/@anthropic-ai/sdk/src/internal/utils/sleep.ts +25 -2
  1232. package/node_modules/@anthropic-ai/sdk/src/internal/utils/time.ts +4 -0
  1233. package/node_modules/@anthropic-ai/sdk/src/lib/BetaMessageStream.ts +72 -33
  1234. package/node_modules/@anthropic-ai/sdk/src/lib/MessageStream.ts +36 -24
  1235. package/node_modules/@anthropic-ai/sdk/src/lib/credentials/credential-chain.ts +292 -0
  1236. package/node_modules/@anthropic-ai/sdk/src/lib/credentials/identity-token.ts +37 -0
  1237. package/node_modules/@anthropic-ai/sdk/src/lib/credentials/oidc-federation.ts +140 -0
  1238. package/node_modules/@anthropic-ai/sdk/src/lib/credentials/token-cache.ts +130 -0
  1239. package/node_modules/@anthropic-ai/sdk/src/lib/credentials/types.ts +295 -0
  1240. package/node_modules/@anthropic-ai/sdk/src/lib/credentials/user-oauth.ts +144 -0
  1241. package/node_modules/@anthropic-ai/sdk/src/lib/credentials.ts +3 -0
  1242. package/node_modules/@anthropic-ai/sdk/src/lib/environments/index.ts +23 -0
  1243. package/node_modules/@anthropic-ai/sdk/src/lib/environments/poller.ts +299 -0
  1244. package/node_modules/@anthropic-ai/sdk/src/lib/environments/worker.ts +779 -0
  1245. package/node_modules/@anthropic-ai/sdk/src/lib/helper-client.ts +86 -0
  1246. package/node_modules/@anthropic-ai/sdk/src/lib/middleware.ts +994 -0
  1247. package/node_modules/@anthropic-ai/sdk/src/lib/sessions/accumulate.ts +130 -0
  1248. package/node_modules/@anthropic-ai/sdk/src/lib/tools/BetaRunnableTool.ts +71 -7
  1249. package/node_modules/@anthropic-ai/sdk/src/lib/tools/BetaToolRunner.ts +135 -35
  1250. package/node_modules/@anthropic-ai/sdk/src/lib/tools/SessionToolRunner.ts +885 -0
  1251. package/node_modules/@anthropic-ai/sdk/src/resources/beta/agents/agents.ts +806 -69
  1252. package/node_modules/@anthropic-ai/sdk/src/resources/beta/agents/index.ts +34 -0
  1253. package/node_modules/@anthropic-ai/sdk/src/resources/beta/beta.ts +690 -28
  1254. package/node_modules/@anthropic-ai/sdk/src/resources/beta/deployment-runs.ts +441 -0
  1255. package/node_modules/@anthropic-ai/sdk/src/resources/beta/deployments.ts +996 -0
  1256. package/node_modules/@anthropic-ai/sdk/src/resources/beta/dreams.ts +453 -0
  1257. package/node_modules/@anthropic-ai/sdk/src/resources/beta/environments/environments.ts +626 -0
  1258. package/node_modules/@anthropic-ai/sdk/src/resources/beta/environments/index.ts +42 -0
  1259. package/node_modules/@anthropic-ai/sdk/src/resources/beta/environments/work.ts +705 -0
  1260. package/node_modules/@anthropic-ai/sdk/src/resources/beta/environments.ts +1 -540
  1261. package/node_modules/@anthropic-ai/sdk/src/resources/beta/files.ts +28 -28
  1262. package/node_modules/@anthropic-ai/sdk/src/resources/beta/index.ts +312 -5
  1263. package/node_modules/@anthropic-ai/sdk/src/resources/beta/memory-stores/index.ts +1 -0
  1264. package/node_modules/@anthropic-ai/sdk/src/resources/beta/memory-stores/memories.ts +141 -31
  1265. package/node_modules/@anthropic-ai/sdk/src/resources/beta/memory-stores/memory-stores.ts +66 -20
  1266. package/node_modules/@anthropic-ai/sdk/src/resources/beta/memory-stores/memory-versions.ts +112 -9
  1267. package/node_modules/@anthropic-ai/sdk/src/resources/beta/messages/batches.ts +90 -33
  1268. package/node_modules/@anthropic-ai/sdk/src/resources/beta/messages/index.ts +90 -0
  1269. package/node_modules/@anthropic-ai/sdk/src/resources/beta/messages/messages.ts +2755 -211
  1270. package/node_modules/@anthropic-ai/sdk/src/resources/beta/models.ts +7 -0
  1271. package/node_modules/@anthropic-ai/sdk/src/resources/beta/sessions/events.ts +888 -18
  1272. package/node_modules/@anthropic-ai/sdk/src/resources/beta/sessions/index.ts +60 -1
  1273. package/node_modules/@anthropic-ai/sdk/src/resources/beta/sessions/sessions.ts +669 -14
  1274. package/node_modules/@anthropic-ai/sdk/src/resources/beta/sessions/threads/events.ts +123 -0
  1275. package/node_modules/@anthropic-ai/sdk/src/resources/beta/sessions/threads/index.ts +15 -0
  1276. package/node_modules/@anthropic-ai/sdk/src/resources/beta/sessions/threads/threads.ts +330 -0
  1277. package/node_modules/@anthropic-ai/sdk/src/resources/beta/sessions/threads.ts +3 -0
  1278. package/node_modules/@anthropic-ai/sdk/src/resources/beta/skills/index.ts +1 -0
  1279. package/node_modules/@anthropic-ai/sdk/src/resources/beta/skills/skills.ts +15 -14
  1280. package/node_modules/@anthropic-ai/sdk/src/resources/beta/skills/versions.ts +49 -3
  1281. package/node_modules/@anthropic-ai/sdk/src/resources/beta/tunnels/certificates.ts +252 -0
  1282. package/node_modules/@anthropic-ai/sdk/src/resources/beta/tunnels/index.ts +23 -0
  1283. package/node_modules/@anthropic-ai/sdk/src/resources/beta/tunnels/tunnels.ts +347 -0
  1284. package/node_modules/@anthropic-ai/sdk/src/resources/beta/tunnels.ts +3 -0
  1285. package/node_modules/@anthropic-ai/sdk/src/resources/beta/user-profiles.ts +76 -5
  1286. package/node_modules/@anthropic-ai/sdk/src/resources/beta/vaults/credentials.ts +347 -3
  1287. package/node_modules/@anthropic-ai/sdk/src/resources/beta/vaults/index.ts +17 -0
  1288. package/node_modules/@anthropic-ai/sdk/src/resources/beta/vaults/vaults.ts +34 -0
  1289. package/node_modules/@anthropic-ai/sdk/src/resources/beta/webhooks.ts +762 -0
  1290. package/node_modules/@anthropic-ai/sdk/src/resources/completions.ts +18 -11
  1291. package/node_modules/@anthropic-ai/sdk/src/resources/files.ts +163 -0
  1292. package/node_modules/@anthropic-ai/sdk/src/resources/index.ts +89 -0
  1293. package/node_modules/@anthropic-ai/sdk/src/resources/messages/batches.ts +30 -12
  1294. package/node_modules/@anthropic-ai/sdk/src/resources/messages/index.ts +70 -0
  1295. package/node_modules/@anthropic-ai/sdk/src/resources/messages/messages.ts +2202 -226
  1296. package/node_modules/@anthropic-ai/sdk/src/resources/skills/index.ts +21 -0
  1297. package/node_modules/@anthropic-ai/sdk/src/resources/skills/skills.ts +194 -0
  1298. package/node_modules/@anthropic-ai/sdk/src/resources/skills/versions.ts +160 -0
  1299. package/node_modules/@anthropic-ai/sdk/src/resources/skills.ts +3 -0
  1300. package/node_modules/@anthropic-ai/sdk/src/tools/agent-toolset/fs-util.ts +190 -0
  1301. package/node_modules/@anthropic-ai/sdk/src/tools/agent-toolset/memories.ts +1017 -0
  1302. package/node_modules/@anthropic-ai/sdk/src/tools/agent-toolset/node.browser.ts +172 -0
  1303. package/node_modules/@anthropic-ai/sdk/src/tools/agent-toolset/node.ts +914 -0
  1304. package/node_modules/@anthropic-ai/sdk/src/tools/agent-toolset/skills.ts +372 -0
  1305. package/node_modules/@anthropic-ai/sdk/src/tools/agent-toolset/sync-interval.ts +30 -0
  1306. package/node_modules/@anthropic-ai/sdk/src/tools/memory/node.browser.ts +64 -0
  1307. package/node_modules/@anthropic-ai/sdk/src/version.ts +1 -1
  1308. package/node_modules/@anthropic-ai/sdk/streaming.d.mts +1 -0
  1309. package/node_modules/@anthropic-ai/sdk/streaming.d.mts.map +1 -1
  1310. package/node_modules/@anthropic-ai/sdk/streaming.d.ts +1 -0
  1311. package/node_modules/@anthropic-ai/sdk/streaming.d.ts.map +1 -1
  1312. package/node_modules/@anthropic-ai/sdk/streaming.mjs +1 -0
  1313. package/node_modules/@anthropic-ai/sdk/streaming.mjs.map +1 -1
  1314. package/node_modules/@anthropic-ai/sdk/tools/agent-toolset/fs-util.d.mts +75 -0
  1315. package/node_modules/@anthropic-ai/sdk/tools/agent-toolset/fs-util.d.mts.map +1 -0
  1316. package/node_modules/@anthropic-ai/sdk/tools/agent-toolset/fs-util.d.ts +75 -0
  1317. package/node_modules/@anthropic-ai/sdk/tools/agent-toolset/fs-util.d.ts.map +1 -0
  1318. package/node_modules/@anthropic-ai/sdk/tools/agent-toolset/fs-util.js +196 -0
  1319. package/node_modules/@anthropic-ai/sdk/tools/agent-toolset/fs-util.js.map +1 -0
  1320. package/node_modules/@anthropic-ai/sdk/tools/agent-toolset/fs-util.mjs +185 -0
  1321. package/node_modules/@anthropic-ai/sdk/tools/agent-toolset/fs-util.mjs.map +1 -0
  1322. package/node_modules/@anthropic-ai/sdk/tools/agent-toolset/memories.d.mts +173 -0
  1323. package/node_modules/@anthropic-ai/sdk/tools/agent-toolset/memories.d.mts.map +1 -0
  1324. package/node_modules/@anthropic-ai/sdk/tools/agent-toolset/memories.d.ts +173 -0
  1325. package/node_modules/@anthropic-ai/sdk/tools/agent-toolset/memories.d.ts.map +1 -0
  1326. package/node_modules/@anthropic-ai/sdk/tools/agent-toolset/memories.js +902 -0
  1327. package/node_modules/@anthropic-ai/sdk/tools/agent-toolset/memories.js.map +1 -0
  1328. package/node_modules/@anthropic-ai/sdk/tools/agent-toolset/memories.mjs +895 -0
  1329. package/node_modules/@anthropic-ai/sdk/tools/agent-toolset/memories.mjs.map +1 -0
  1330. package/node_modules/@anthropic-ai/sdk/tools/agent-toolset/node.browser.d.mts +82 -0
  1331. package/node_modules/@anthropic-ai/sdk/tools/agent-toolset/node.browser.d.mts.map +1 -0
  1332. package/node_modules/@anthropic-ai/sdk/tools/agent-toolset/node.browser.d.ts +82 -0
  1333. package/node_modules/@anthropic-ai/sdk/tools/agent-toolset/node.browser.d.ts.map +1 -0
  1334. package/node_modules/@anthropic-ai/sdk/tools/agent-toolset/node.browser.js +151 -0
  1335. package/node_modules/@anthropic-ai/sdk/tools/agent-toolset/node.browser.js.map +1 -0
  1336. package/node_modules/@anthropic-ai/sdk/tools/agent-toolset/node.browser.mjs +131 -0
  1337. package/node_modules/@anthropic-ai/sdk/tools/agent-toolset/node.browser.mjs.map +1 -0
  1338. package/node_modules/@anthropic-ai/sdk/tools/agent-toolset/node.d.mts +190 -0
  1339. package/node_modules/@anthropic-ai/sdk/tools/agent-toolset/node.d.mts.map +1 -0
  1340. package/node_modules/@anthropic-ai/sdk/tools/agent-toolset/node.d.ts +190 -0
  1341. package/node_modules/@anthropic-ai/sdk/tools/agent-toolset/node.d.ts.map +1 -0
  1342. package/node_modules/@anthropic-ai/sdk/tools/agent-toolset/node.js +819 -0
  1343. package/node_modules/@anthropic-ai/sdk/tools/agent-toolset/node.js.map +1 -0
  1344. package/node_modules/@anthropic-ai/sdk/tools/agent-toolset/node.mjs +797 -0
  1345. package/node_modules/@anthropic-ai/sdk/tools/agent-toolset/node.mjs.map +1 -0
  1346. package/node_modules/@anthropic-ai/sdk/tools/agent-toolset/skills.d.mts +82 -0
  1347. package/node_modules/@anthropic-ai/sdk/tools/agent-toolset/skills.d.mts.map +1 -0
  1348. package/node_modules/@anthropic-ai/sdk/tools/agent-toolset/skills.d.ts +82 -0
  1349. package/node_modules/@anthropic-ai/sdk/tools/agent-toolset/skills.d.ts.map +1 -0
  1350. package/node_modules/@anthropic-ai/sdk/tools/agent-toolset/skills.js +352 -0
  1351. package/node_modules/@anthropic-ai/sdk/tools/agent-toolset/skills.js.map +1 -0
  1352. package/node_modules/@anthropic-ai/sdk/tools/agent-toolset/skills.mjs +344 -0
  1353. package/node_modules/@anthropic-ai/sdk/tools/agent-toolset/skills.mjs.map +1 -0
  1354. package/node_modules/@anthropic-ai/sdk/tools/agent-toolset/sync-interval.d.mts +19 -0
  1355. package/node_modules/@anthropic-ai/sdk/tools/agent-toolset/sync-interval.d.mts.map +1 -0
  1356. package/node_modules/@anthropic-ai/sdk/tools/agent-toolset/sync-interval.d.ts +19 -0
  1357. package/node_modules/@anthropic-ai/sdk/tools/agent-toolset/sync-interval.d.ts.map +1 -0
  1358. package/node_modules/@anthropic-ai/sdk/tools/agent-toolset/sync-interval.js +29 -0
  1359. package/node_modules/@anthropic-ai/sdk/tools/agent-toolset/sync-interval.js.map +1 -0
  1360. package/node_modules/@anthropic-ai/sdk/tools/agent-toolset/sync-interval.mjs +25 -0
  1361. package/node_modules/@anthropic-ai/sdk/tools/agent-toolset/sync-interval.mjs.map +1 -0
  1362. package/node_modules/@anthropic-ai/sdk/tools/memory/node.browser.d.mts +27 -0
  1363. package/node_modules/@anthropic-ai/sdk/tools/memory/node.browser.d.mts.map +1 -0
  1364. package/node_modules/@anthropic-ai/sdk/tools/memory/node.browser.d.ts +27 -0
  1365. package/node_modules/@anthropic-ai/sdk/tools/memory/node.browser.d.ts.map +1 -0
  1366. package/node_modules/@anthropic-ai/sdk/tools/memory/node.browser.js +49 -0
  1367. package/node_modules/@anthropic-ai/sdk/tools/memory/node.browser.js.map +1 -0
  1368. package/node_modules/@anthropic-ai/sdk/tools/memory/node.browser.mjs +44 -0
  1369. package/node_modules/@anthropic-ai/sdk/tools/memory/node.browser.mjs.map +1 -0
  1370. package/node_modules/@anthropic-ai/sdk/tools/memory/node.d.mts.map +1 -1
  1371. package/node_modules/@anthropic-ai/sdk/tools/memory/node.d.ts.map +1 -1
  1372. package/node_modules/@anthropic-ai/sdk/tools/memory/node.mjs.map +1 -1
  1373. package/node_modules/@anthropic-ai/sdk/uploads.d.mts +1 -0
  1374. package/node_modules/@anthropic-ai/sdk/uploads.d.mts.map +1 -1
  1375. package/node_modules/@anthropic-ai/sdk/uploads.d.ts +1 -0
  1376. package/node_modules/@anthropic-ai/sdk/uploads.d.ts.map +1 -1
  1377. package/node_modules/@anthropic-ai/sdk/uploads.mjs +1 -0
  1378. package/node_modules/@anthropic-ai/sdk/uploads.mjs.map +1 -1
  1379. package/node_modules/@anthropic-ai/sdk/version.d.mts +1 -1
  1380. package/node_modules/@anthropic-ai/sdk/version.d.mts.map +1 -1
  1381. package/node_modules/@anthropic-ai/sdk/version.d.ts +1 -1
  1382. package/node_modules/@anthropic-ai/sdk/version.d.ts.map +1 -1
  1383. package/node_modules/@anthropic-ai/sdk/version.js +1 -1
  1384. package/node_modules/@anthropic-ai/sdk/version.js.map +1 -1
  1385. package/node_modules/@anthropic-ai/sdk/version.mjs +1 -1
  1386. package/node_modules/@anthropic-ai/sdk/version.mjs.map +1 -1
  1387. package/node_modules/@code-yeongyu/senpi-codemode/CHANGELOG.md +36 -0
  1388. package/node_modules/@code-yeongyu/senpi-codemode/package.json +4 -4
  1389. package/node_modules/@code-yeongyu/senpi-codemode/src/extension/session-manager-proxy.ts +39 -5
  1390. package/node_modules/@earendil-works/pi-agent-core/dist/agent-loop.d.ts.map +1 -1
  1391. package/node_modules/@earendil-works/pi-agent-core/dist/agent-loop.js +7 -4
  1392. package/node_modules/@earendil-works/pi-agent-core/dist/agent-loop.js.map +1 -1
  1393. package/node_modules/@earendil-works/pi-agent-core/dist/agent.d.ts +2 -3
  1394. package/node_modules/@earendil-works/pi-agent-core/dist/agent.d.ts.map +1 -1
  1395. package/node_modules/@earendil-works/pi-agent-core/dist/agent.js +7 -6
  1396. package/node_modules/@earendil-works/pi-agent-core/dist/agent.js.map +1 -1
  1397. package/node_modules/@earendil-works/pi-agent-core/dist/assistant-terminal-state.d.ts +4 -0
  1398. package/node_modules/@earendil-works/pi-agent-core/dist/assistant-terminal-state.d.ts.map +1 -1
  1399. package/node_modules/@earendil-works/pi-agent-core/dist/assistant-terminal-state.js +8 -0
  1400. package/node_modules/@earendil-works/pi-agent-core/dist/assistant-terminal-state.js.map +1 -1
  1401. package/node_modules/@earendil-works/pi-agent-core/dist/index.d.ts +1 -0
  1402. package/node_modules/@earendil-works/pi-agent-core/dist/index.d.ts.map +1 -1
  1403. package/node_modules/@earendil-works/pi-agent-core/dist/index.js +1 -0
  1404. package/node_modules/@earendil-works/pi-agent-core/dist/index.js.map +1 -1
  1405. package/node_modules/@earendil-works/pi-agent-core/package.json +5 -5
  1406. package/node_modules/@earendil-works/pi-ai/dist/api/anthropic-messages.d.ts +1 -5
  1407. package/node_modules/@earendil-works/pi-ai/dist/api/anthropic-messages.d.ts.map +1 -1
  1408. package/node_modules/@earendil-works/pi-ai/dist/api/anthropic-messages.js +25 -13
  1409. package/node_modules/@earendil-works/pi-ai/dist/api/anthropic-messages.js.map +1 -1
  1410. package/node_modules/@earendil-works/pi-ai/dist/api/azure-openai-responses.d.ts.map +1 -1
  1411. package/node_modules/@earendil-works/pi-ai/dist/api/azure-openai-responses.js +2 -1
  1412. package/node_modules/@earendil-works/pi-ai/dist/api/azure-openai-responses.js.map +1 -1
  1413. package/node_modules/@earendil-works/pi-ai/dist/api/bedrock-converse-stream.d.ts.map +1 -1
  1414. package/node_modules/@earendil-works/pi-ai/dist/api/bedrock-converse-stream.js +91 -5
  1415. package/node_modules/@earendil-works/pi-ai/dist/api/bedrock-converse-stream.js.map +1 -1
  1416. package/node_modules/@earendil-works/pi-ai/dist/api/google-generative-ai.d.ts.map +1 -1
  1417. package/node_modules/@earendil-works/pi-ai/dist/api/google-generative-ai.js +4 -2
  1418. package/node_modules/@earendil-works/pi-ai/dist/api/google-generative-ai.js.map +1 -1
  1419. package/node_modules/@earendil-works/pi-ai/dist/api/google-vertex.d.ts.map +1 -1
  1420. package/node_modules/@earendil-works/pi-ai/dist/api/google-vertex.js +4 -2
  1421. package/node_modules/@earendil-works/pi-ai/dist/api/google-vertex.js.map +1 -1
  1422. package/node_modules/@earendil-works/pi-ai/dist/api/mistral-conversations.d.ts.map +1 -1
  1423. package/node_modules/@earendil-works/pi-ai/dist/api/mistral-conversations.js +2 -0
  1424. package/node_modules/@earendil-works/pi-ai/dist/api/mistral-conversations.js.map +1 -1
  1425. package/node_modules/@earendil-works/pi-ai/dist/api/openai-completions.d.ts.map +1 -1
  1426. package/node_modules/@earendil-works/pi-ai/dist/api/openai-completions.js +93 -54
  1427. package/node_modules/@earendil-works/pi-ai/dist/api/openai-completions.js.map +1 -1
  1428. package/node_modules/@earendil-works/pi-ai/dist/api/openai-responses.js +2 -5
  1429. package/node_modules/@earendil-works/pi-ai/dist/api/openai-responses.js.map +1 -1
  1430. package/node_modules/@earendil-works/pi-ai/dist/api/transform-messages.js +1 -1
  1431. package/node_modules/@earendil-works/pi-ai/dist/api/transform-messages.js.map +1 -1
  1432. package/node_modules/@earendil-works/pi-ai/dist/auth/oauth/github-copilot.d.ts.map +1 -1
  1433. package/node_modules/@earendil-works/pi-ai/dist/auth/oauth/github-copilot.js +97 -46
  1434. package/node_modules/@earendil-works/pi-ai/dist/auth/oauth/github-copilot.js.map +1 -1
  1435. package/node_modules/@earendil-works/pi-ai/dist/auth/oauth/kimi-coding.d.ts.map +1 -1
  1436. package/node_modules/@earendil-works/pi-ai/dist/auth/oauth/kimi-coding.js +1 -14
  1437. package/node_modules/@earendil-works/pi-ai/dist/auth/oauth/kimi-coding.js.map +1 -1
  1438. package/node_modules/@earendil-works/pi-ai/dist/auth/pool/slots.d.ts +50 -0
  1439. package/node_modules/@earendil-works/pi-ai/dist/auth/pool/slots.d.ts.map +1 -0
  1440. package/node_modules/@earendil-works/pi-ai/dist/auth/pool/slots.js +129 -0
  1441. package/node_modules/@earendil-works/pi-ai/dist/auth/pool/slots.js.map +1 -0
  1442. package/node_modules/@earendil-works/pi-ai/dist/auth/resolve.d.ts.map +1 -1
  1443. package/node_modules/@earendil-works/pi-ai/dist/auth/resolve.js +3 -1
  1444. package/node_modules/@earendil-works/pi-ai/dist/auth/resolve.js.map +1 -1
  1445. package/node_modules/@earendil-works/pi-ai/dist/image-models.generated.d.ts +30 -0
  1446. package/node_modules/@earendil-works/pi-ai/dist/image-models.generated.d.ts.map +1 -1
  1447. package/node_modules/@earendil-works/pi-ai/dist/image-models.generated.js +30 -0
  1448. package/node_modules/@earendil-works/pi-ai/dist/image-models.generated.js.map +1 -1
  1449. package/node_modules/@earendil-works/pi-ai/dist/models.d.ts +8 -1
  1450. package/node_modules/@earendil-works/pi-ai/dist/models.d.ts.map +1 -1
  1451. package/node_modules/@earendil-works/pi-ai/dist/models.js +16 -3
  1452. package/node_modules/@earendil-works/pi-ai/dist/models.js.map +1 -1
  1453. package/node_modules/@earendil-works/pi-ai/dist/providers/cloudflare-ai-gateway.d.ts +3 -1
  1454. package/node_modules/@earendil-works/pi-ai/dist/providers/cloudflare-ai-gateway.d.ts.map +1 -1
  1455. package/node_modules/@earendil-works/pi-ai/dist/providers/cloudflare-ai-gateway.js +10 -1
  1456. package/node_modules/@earendil-works/pi-ai/dist/providers/cloudflare-ai-gateway.js.map +1 -1
  1457. package/node_modules/@earendil-works/pi-ai/dist/providers/data/.manifest.json +1 -1
  1458. package/node_modules/@earendil-works/pi-ai/dist/providers/data/anthropic.json +1 -1
  1459. package/node_modules/@earendil-works/pi-ai/dist/providers/data/azure-openai-responses.json +1 -1
  1460. package/node_modules/@earendil-works/pi-ai/dist/providers/data/cloudflare-ai-gateway.json +1 -1
  1461. package/node_modules/@earendil-works/pi-ai/dist/providers/data/huggingface.json +1 -1
  1462. package/node_modules/@earendil-works/pi-ai/dist/providers/data/nvidia.json +1 -1
  1463. package/node_modules/@earendil-works/pi-ai/dist/providers/data/openai.json +1 -1
  1464. package/node_modules/@earendil-works/pi-ai/dist/providers/data/opencode-go.json +1 -1
  1465. package/node_modules/@earendil-works/pi-ai/dist/providers/data/opencode.json +1 -1
  1466. package/node_modules/@earendil-works/pi-ai/dist/providers/data/opengateway.json +1 -1
  1467. package/node_modules/@earendil-works/pi-ai/dist/providers/data/openrouter.json +1 -1
  1468. package/node_modules/@earendil-works/pi-ai/dist/providers/data/vercel-ai-gateway.json +1 -1
  1469. package/node_modules/@earendil-works/pi-ai/dist/providers/data/zai-coding-cn.json +1 -1
  1470. package/node_modules/@earendil-works/pi-ai/dist/providers/data/zai.json +1 -1
  1471. package/node_modules/@earendil-works/pi-ai/dist/providers/faux.d.ts +1 -0
  1472. package/node_modules/@earendil-works/pi-ai/dist/providers/faux.d.ts.map +1 -1
  1473. package/node_modules/@earendil-works/pi-ai/dist/providers/faux.js +1 -0
  1474. package/node_modules/@earendil-works/pi-ai/dist/providers/faux.js.map +1 -1
  1475. package/node_modules/@earendil-works/pi-ai/dist/providers/kimi-coding.d.ts.map +1 -1
  1476. package/node_modules/@earendil-works/pi-ai/dist/providers/kimi-coding.js +4 -0
  1477. package/node_modules/@earendil-works/pi-ai/dist/providers/kimi-coding.js.map +1 -1
  1478. package/node_modules/@earendil-works/pi-ai/dist/types.d.ts +8 -1
  1479. package/node_modules/@earendil-works/pi-ai/dist/types.d.ts.map +1 -1
  1480. package/node_modules/@earendil-works/pi-ai/dist/types.js.map +1 -1
  1481. package/node_modules/@earendil-works/pi-ai/dist/utils/overflow.d.ts +16 -0
  1482. package/node_modules/@earendil-works/pi-ai/dist/utils/overflow.d.ts.map +1 -1
  1483. package/node_modules/@earendil-works/pi-ai/dist/utils/overflow.js +21 -1
  1484. package/node_modules/@earendil-works/pi-ai/dist/utils/overflow.js.map +1 -1
  1485. package/node_modules/@earendil-works/pi-ai/dist/utils/retry-profile/backoff.d.ts +14 -0
  1486. package/node_modules/@earendil-works/pi-ai/dist/utils/retry-profile/backoff.d.ts.map +1 -0
  1487. package/node_modules/@earendil-works/pi-ai/dist/utils/retry-profile/backoff.js +24 -0
  1488. package/node_modules/@earendil-works/pi-ai/dist/utils/retry-profile/backoff.js.map +1 -0
  1489. package/node_modules/@earendil-works/pi-ai/dist/utils/retry-profile/classifiers.d.ts +36 -0
  1490. package/node_modules/@earendil-works/pi-ai/dist/utils/retry-profile/classifiers.d.ts.map +1 -0
  1491. package/node_modules/@earendil-works/pi-ai/dist/utils/retry-profile/classifiers.js +109 -0
  1492. package/node_modules/@earendil-works/pi-ai/dist/utils/retry-profile/classifiers.js.map +1 -0
  1493. package/node_modules/@earendil-works/pi-ai/dist/utils/retry-profile/failure.d.ts +12 -0
  1494. package/node_modules/@earendil-works/pi-ai/dist/utils/retry-profile/failure.d.ts.map +1 -0
  1495. package/node_modules/@earendil-works/pi-ai/dist/utils/retry-profile/failure.js +109 -0
  1496. package/node_modules/@earendil-works/pi-ai/dist/utils/retry-profile/failure.js.map +1 -0
  1497. package/node_modules/@earendil-works/pi-ai/dist/utils/retry-profile/index.d.ts +9 -0
  1498. package/node_modules/@earendil-works/pi-ai/dist/utils/retry-profile/index.d.ts.map +1 -0
  1499. package/node_modules/@earendil-works/pi-ai/dist/utils/retry-profile/index.js +6 -0
  1500. package/node_modules/@earendil-works/pi-ai/dist/utils/retry-profile/index.js.map +1 -0
  1501. package/node_modules/@earendil-works/pi-ai/dist/utils/retry-profile/planner.d.ts +46 -0
  1502. package/node_modules/@earendil-works/pi-ai/dist/utils/retry-profile/planner.d.ts.map +1 -0
  1503. package/node_modules/@earendil-works/pi-ai/dist/utils/retry-profile/planner.js +41 -0
  1504. package/node_modules/@earendil-works/pi-ai/dist/utils/retry-profile/planner.js.map +1 -0
  1505. package/node_modules/@earendil-works/pi-ai/dist/utils/retry-profile/profiles.d.ts +4 -0
  1506. package/node_modules/@earendil-works/pi-ai/dist/utils/retry-profile/profiles.d.ts.map +1 -0
  1507. package/node_modules/@earendil-works/pi-ai/dist/utils/retry-profile/profiles.js +93 -0
  1508. package/node_modules/@earendil-works/pi-ai/dist/utils/retry-profile/profiles.js.map +1 -0
  1509. package/node_modules/@earendil-works/pi-ai/dist/utils/retry-profile/types.d.ts +121 -0
  1510. package/node_modules/@earendil-works/pi-ai/dist/utils/retry-profile/types.d.ts.map +1 -0
  1511. package/node_modules/@earendil-works/pi-ai/dist/utils/retry-profile/types.js +11 -0
  1512. package/node_modules/@earendil-works/pi-ai/dist/utils/retry-profile/types.js.map +1 -0
  1513. package/node_modules/@earendil-works/pi-ai/dist/utils/retry.d.ts +12 -0
  1514. package/node_modules/@earendil-works/pi-ai/dist/utils/retry.d.ts.map +1 -1
  1515. package/node_modules/@earendil-works/pi-ai/dist/utils/retry.js +25 -5
  1516. package/node_modules/@earendil-works/pi-ai/dist/utils/retry.js.map +1 -1
  1517. package/node_modules/@earendil-works/pi-ai/dist/utils/sleep.d.ts +2 -0
  1518. package/node_modules/@earendil-works/pi-ai/dist/utils/sleep.d.ts.map +1 -0
  1519. package/node_modules/@earendil-works/pi-ai/dist/utils/sleep.js +15 -0
  1520. package/node_modules/@earendil-works/pi-ai/dist/utils/sleep.js.map +1 -0
  1521. package/node_modules/@earendil-works/pi-ai/package.json +21 -17
  1522. package/node_modules/@earendil-works/pi-pty/dist/index.d.ts +1 -0
  1523. package/node_modules/@earendil-works/pi-pty/dist/index.d.ts.map +1 -1
  1524. package/node_modules/@earendil-works/pi-pty/dist/index.js +1 -0
  1525. package/node_modules/@earendil-works/pi-pty/dist/index.js.map +1 -1
  1526. package/node_modules/@earendil-works/pi-pty/dist/session-bun.d.ts +30 -0
  1527. package/node_modules/@earendil-works/pi-pty/dist/session-bun.d.ts.map +1 -0
  1528. package/node_modules/@earendil-works/pi-pty/dist/session-bun.js +76 -0
  1529. package/node_modules/@earendil-works/pi-pty/dist/session-bun.js.map +1 -0
  1530. package/node_modules/@earendil-works/pi-pty/dist/session-types.d.ts +3 -1
  1531. package/node_modules/@earendil-works/pi-pty/dist/session-types.d.ts.map +1 -1
  1532. package/node_modules/@earendil-works/pi-pty/dist/session-types.js.map +1 -1
  1533. package/node_modules/@earendil-works/pi-pty/dist/session.d.ts +2 -0
  1534. package/node_modules/@earendil-works/pi-pty/dist/session.d.ts.map +1 -1
  1535. package/node_modules/@earendil-works/pi-pty/dist/session.js +19 -9
  1536. package/node_modules/@earendil-works/pi-pty/dist/session.js.map +1 -1
  1537. package/node_modules/@earendil-works/pi-pty/package.json +1 -1
  1538. package/node_modules/@earendil-works/pi-telemetry/package.json +3 -3
  1539. package/node_modules/@earendil-works/pi-tui/dist/components/markdown.d.ts.map +1 -1
  1540. package/node_modules/@earendil-works/pi-tui/dist/components/markdown.js +9 -4
  1541. package/node_modules/@earendil-works/pi-tui/dist/components/markdown.js.map +1 -1
  1542. package/node_modules/@earendil-works/pi-tui/dist/components/settings-list.d.ts +8 -2
  1543. package/node_modules/@earendil-works/pi-tui/dist/components/settings-list.d.ts.map +1 -1
  1544. package/node_modules/@earendil-works/pi-tui/dist/components/settings-list.js +24 -4
  1545. package/node_modules/@earendil-works/pi-tui/dist/components/settings-list.js.map +1 -1
  1546. package/node_modules/@earendil-works/pi-tui/dist/keybindings.d.ts +2 -2
  1547. package/node_modules/@earendil-works/pi-tui/dist/keybindings.js +2 -2
  1548. package/node_modules/@earendil-works/pi-tui/dist/keybindings.js.map +1 -1
  1549. package/node_modules/@earendil-works/pi-tui/dist/native-modifiers.d.ts.map +1 -1
  1550. package/node_modules/@earendil-works/pi-tui/dist/native-modifiers.js +2 -8
  1551. package/node_modules/@earendil-works/pi-tui/dist/native-modifiers.js.map +1 -1
  1552. package/node_modules/@earendil-works/pi-tui/dist/native-module-path.d.ts +7 -0
  1553. package/node_modules/@earendil-works/pi-tui/dist/native-module-path.d.ts.map +1 -0
  1554. package/node_modules/@earendil-works/pi-tui/dist/native-module-path.js +19 -0
  1555. package/node_modules/@earendil-works/pi-tui/dist/native-module-path.js.map +1 -0
  1556. package/node_modules/@earendil-works/pi-tui/dist/terminal.d.ts +5 -0
  1557. package/node_modules/@earendil-works/pi-tui/dist/terminal.d.ts.map +1 -1
  1558. package/node_modules/@earendil-works/pi-tui/dist/terminal.js +94 -11
  1559. package/node_modules/@earendil-works/pi-tui/dist/terminal.js.map +1 -1
  1560. package/node_modules/@earendil-works/pi-tui/package.json +5 -5
  1561. package/node_modules/@stablelib/base64/LICENSE +21 -0
  1562. package/node_modules/@stablelib/base64/base64.bench.ts +25 -0
  1563. package/node_modules/@stablelib/base64/base64.test.ts +85 -0
  1564. package/node_modules/@stablelib/base64/base64.ts +283 -0
  1565. package/node_modules/@stablelib/base64/lib/base64.bench.d.ts +1 -0
  1566. package/node_modules/@stablelib/base64/lib/base64.bench.js +23 -0
  1567. package/node_modules/@stablelib/base64/lib/base64.bench.js.map +1 -0
  1568. package/node_modules/@stablelib/base64/lib/base64.d.ts +34 -0
  1569. package/node_modules/@stablelib/base64/lib/base64.js +282 -0
  1570. package/node_modules/@stablelib/base64/lib/base64.js.map +1 -0
  1571. package/node_modules/@stablelib/base64/lib/base64.test.d.ts +1 -0
  1572. package/node_modules/@stablelib/base64/lib/base64.test.js +82 -0
  1573. package/node_modules/@stablelib/base64/lib/base64.test.js.map +1 -0
  1574. package/node_modules/@stablelib/base64/package.json +25 -0
  1575. package/node_modules/@stablelib/base64/tsconfig.json +27 -0
  1576. package/node_modules/fast-sha256/LICENSE +24 -0
  1577. package/node_modules/fast-sha256/README.md +127 -0
  1578. package/node_modules/fast-sha256/package.json +42 -0
  1579. package/node_modules/fast-sha256/sha256.d.ts +39 -0
  1580. package/node_modules/fast-sha256/sha256.js +427 -0
  1581. package/node_modules/fast-sha256/sha256.min.js +1 -0
  1582. package/node_modules/standardwebhooks/README.md +41 -0
  1583. package/node_modules/standardwebhooks/dist/index.d.ts +24 -0
  1584. package/node_modules/standardwebhooks/dist/index.js +106 -0
  1585. package/node_modules/standardwebhooks/dist/index.js.map +1 -0
  1586. package/node_modules/standardwebhooks/dist/timing_safe_equal.d.ts +1 -0
  1587. package/node_modules/standardwebhooks/dist/timing_safe_equal.js +30 -0
  1588. package/node_modules/standardwebhooks/dist/timing_safe_equal.js.map +1 -0
  1589. package/node_modules/standardwebhooks/package.json +45 -0
  1590. package/package.json +100 -89
  1591. package/dist/core/radius.d.ts +0 -2
  1592. package/dist/core/radius.d.ts.map +0 -1
  1593. package/dist/core/radius.js +0 -2
  1594. package/dist/core/radius.js.map +0 -1
  1595. package/node_modules/@anthropic-ai/sdk/lib/stainless-helper-header.d.mts +0 -34
  1596. package/node_modules/@anthropic-ai/sdk/lib/stainless-helper-header.d.mts.map +0 -1
  1597. package/node_modules/@anthropic-ai/sdk/lib/stainless-helper-header.d.ts +0 -34
  1598. package/node_modules/@anthropic-ai/sdk/lib/stainless-helper-header.d.ts.map +0 -1
  1599. package/node_modules/@anthropic-ai/sdk/lib/stainless-helper-header.js.map +0 -1
  1600. package/node_modules/@anthropic-ai/sdk/lib/stainless-helper-header.mjs.map +0 -1
  1601. package/node_modules/@anthropic-ai/sdk/lib/tools/ToolRunner.d.mts +0 -132
  1602. package/node_modules/@anthropic-ai/sdk/lib/tools/ToolRunner.d.mts.map +0 -1
  1603. package/node_modules/@anthropic-ai/sdk/lib/tools/ToolRunner.d.ts +0 -132
  1604. package/node_modules/@anthropic-ai/sdk/lib/tools/ToolRunner.d.ts.map +0 -1
  1605. package/node_modules/@anthropic-ai/sdk/lib/tools/ToolRunner.js +0 -294
  1606. package/node_modules/@anthropic-ai/sdk/lib/tools/ToolRunner.js.map +0 -1
  1607. package/node_modules/@anthropic-ai/sdk/lib/tools/ToolRunner.mjs +0 -290
  1608. package/node_modules/@anthropic-ai/sdk/lib/tools/ToolRunner.mjs.map +0 -1
  1609. package/node_modules/@anthropic-ai/sdk/src/lib/stainless-helper-header.ts +0 -80
  1610. package/node_modules/@anthropic-ai/sdk/src/lib/tools/ToolRunner.ts +0 -381
@@ -50,11 +50,11 @@ function getShellConfigForPath(shellPath) {
50
50
  return getBashShellConfig(shellPath);
51
51
  }
52
52
  }
53
- function findBashOnPath() {
53
+ function findExecutableOnPath(executable) {
54
54
  if (process.platform === "win32") {
55
55
  // Windows: Use 'where' and verify file exists (where can return non-existent paths)
56
56
  try {
57
- const result = spawnSync("where", ["bash.exe"], {
57
+ const result = spawnSync("where", [executable], {
58
58
  encoding: "utf-8",
59
59
  timeout: 5000,
60
60
  windowsHide: true,
@@ -73,7 +73,7 @@ function findBashOnPath() {
73
73
  }
74
74
  // Unix: Use 'which' and trust its output (handles Termux and special filesystems)
75
75
  try {
76
- const result = spawnSync("which", ["bash"], { encoding: "utf-8", timeout: 5000 });
76
+ const result = spawnSync("which", [executable], { encoding: "utf-8", timeout: 5000 });
77
77
  if (result.status === 0 && result.stdout) {
78
78
  const firstMatch = result.stdout.trim().split(/\r?\n/)[0];
79
79
  if (firstMatch) {
@@ -126,7 +126,7 @@ export function getShellConfig(customShellPath) {
126
126
  }
127
127
  }
128
128
  // 3. Fallback: search bash.exe on PATH (Cygwin, MSYS2, WSL, etc.)
129
- const bashOnPath = findBashOnPath();
129
+ const bashOnPath = findExecutableOnPath("bash.exe");
130
130
  if (bashOnPath) {
131
131
  return getBashShellConfig(bashOnPath);
132
132
  }
@@ -140,12 +140,24 @@ export function getShellConfig(customShellPath) {
140
140
  if (existsSync("/bin/bash")) {
141
141
  return getBashShellConfig("/bin/bash");
142
142
  }
143
- const bashOnPath = findBashOnPath();
143
+ const bashOnPath = findExecutableOnPath("bash");
144
144
  if (bashOnPath) {
145
145
  return getBashShellConfig(bashOnPath);
146
146
  }
147
147
  return { shell: "sh", args: ["-c"] };
148
148
  }
149
+ export const POWERSHELL_ARGS = ["-NoProfile", "-NonInteractive", "-ExecutionPolicy", "Bypass", "-Command"];
150
+ /** Resolve PowerShell on Windows, preferring PowerShell 7 when available. */
151
+ export function getPowerShellConfig() {
152
+ if (process.platform !== "win32") {
153
+ throw new Error("The powershell tool is only available on Windows.");
154
+ }
155
+ const shell = findExecutableOnPath("pwsh.exe") ?? findExecutableOnPath("powershell.exe");
156
+ if (!shell) {
157
+ throw new Error("No PowerShell executable found. Install PowerShell or add powershell.exe/pwsh.exe to PATH.");
158
+ }
159
+ return { shell, args: [...POWERSHELL_ARGS] };
160
+ }
149
161
  export function getShellEnv() {
150
162
  const binDir = getBinDir();
151
163
  const pathKey = Object.keys(process.env).find((key) => key.toLowerCase() === "path") ?? "PATH";
@@ -1 +1 @@
1
- {"version":3,"file":"shell.js","sourceRoot":"","sources":["../../src/utils/shell.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AACrC,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAC5C,OAAO,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAC1C,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAazC,uGAAuG;AACvG,MAAM,CAAC,MAAM,iBAAiB,GAAG,qBAAqB,CAAC;AAEvD;;GAEG;AACH,SAAS,mBAAmB,CAAC,IAAY;IACxC,MAAM,UAAU,GAAG,IAAI,CAAC,OAAO,CAAC,KAAK,EAAE,IAAI,CAAC,CAAC,WAAW,EAAE,CAAC;IAC3D,OAAO,sDAAsD,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;AAChF,CAAC;AAED,uFAAuF;AACvF,MAAM,UAAU,gBAAgB,CAAC,SAAiB;IACjD,MAAM,IAAI,GAAG,SAAS;SACpB,OAAO,CAAC,KAAK,EAAE,GAAG,CAAC;SACnB,KAAK,CAAC,GAAG,CAAC;SACV,GAAG,EAAE;QACN,EAAE,WAAW,EAAE;SACd,OAAO,CAAC,QAAQ,EAAE,EAAE,CAAC,CAAC;IACxB,IAAI,IAAI,KAAK,KAAK;QAAE,OAAO,KAAK,CAAC;IACjC,IAAI,IAAI,KAAK,YAAY,IAAI,IAAI,KAAK,MAAM;QAAE,OAAO,YAAY,CAAC;IAClE,IAAI,IAAI,KAAK,IAAI;QAAE,OAAO,IAAI,CAAC;IAC/B,OAAO,MAAM,CAAC;AACf,CAAC;AAED,SAAS,kBAAkB,CAAC,KAAa;IACxC,OAAO,mBAAmB,CAAC,KAAK,CAAC;Q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AAC;QAC/B,CAAC;QAAC,MAAM,CAAC;YACR,iEAAiE;YACjE,IAAI,CAAC;gBACJ,OAAO,CAAC,IAAI,CAAC,GAAG,EAAE,SAAS,CAAC,CAAC;YAC9B,CAAC;YAAC,MAAM,CAAC;gBACR,uBAAuB;YACxB,CAAC;QACF,CAAC;IACF,CAAC;AACF,CAAC","sourcesContent":["import { existsSync } from \"node:fs\";\nimport { delimiter, join } from \"node:path\";\nimport { spawnSync } from \"child_process\";\nimport { getBinDir } from \"../config.ts\";\n\n/** Family of a resolved shell executable, used to pick invocation arguments. */\nexport type ShellKind = \"bash\" | \"sh\" | \"cmd\" | \"powershell\";\n\nexport interface ShellConfig {\n\tshell: string;\n\targs: string[];\n\tcommandTransport?: \"argv\" | \"stdin\";\n\t/** Detected shell family. Lets PTY callers pass the right command transport per shell. */\n\tkind?: ShellKind;\n}\n\n/** Environment variable that overrides shell resolution with an explicit bash path (Windows-first). */\nexport const GIT_BASH_PATH_ENV = \"SENPI_GIT_BASH_PATH\";\n\n/**\n * Find bash executable on PATH (cross-platform)\n */\nfunction isLegacyWslBashPath(path: string): boolean {\n\tconst normalized = path.replace(/\\//g, \"\\\\\").toLowerCase();\n\treturn /^[a-z]:\\\\windows\\\\(?:system32|sysnative)\\\\bash\\.exe$/.test(normalized);\n}\n\n/** Classify a shell executable by its basename so non-bash shells get correct args. */\nexport function resolveShellKind(shellPath: string): ShellKind {\n\tconst base = shellPath\n\t\t.replace(/\\\\/g, \"/\")\n\t\t.split(\"/\")\n\t\t.pop()\n\t\t?.toLowerCase()\n\t\t.replace(/\\.exe$/, \"\");\n\tif (base === \"cmd\") return \"cmd\";\n\tif (base === \"powershell\" || base === \"pwsh\") return \"powershell\";\n\tif (base === \"sh\") return \"sh\";\n\treturn \"bash\";\n}\n\nfunction getBashShellConfig(shell: string): ShellConfig {\n\treturn isLegacyWslBashPath(shell)\n\t\t? { shell, args: [\"-s\"], commandTransport: \"stdin\", kind: \"bash\" }\n\t\t: { shell, args: [\"-c\"], kind: \"bash\" };\n}\n\n/**\n * Build a ShellConfig for an explicit shell path, honoring the shell KIND so\n * cmd.exe uses `/c`, PowerShell uses `-NoProfile -Command`, and bash/sh use\n * `-c` (or WSL bash `-s` via stdin).\n */\nfunction getShellConfigForPath(shellPath: string): ShellConfig {\n\tconst kind = resolveShellKind(shellPath);\n\tswitch (kind) {\n\t\tcase \"cmd\":\n\t\t\treturn { shell: shellPath, args: [\"/c\"], kind };\n\t\tcase \"powershell\":\n\t\t\treturn { shell: shellPath, args: [\"-NoProfile\", \"-Command\"], kind };\n\t\tcase \"sh\":\n\t\t\treturn { shell: shellPath, args: [\"-c\"], kind };\n\t\tdefault:\n\t\t\treturn getBashShellConfig(shellPath);\n\t}\n}\n\nfunction findBashOnPath(): string | null {\n\tif (process.platform === \"win32\") {\n\t\t// Windows: Use 'where' and verify file exists (where can return non-existent paths)\n\t\ttry {\n\t\t\tconst result = spawnSync(\"where\", [\"bash.exe\"], {\n\t\t\t\tencoding: \"utf-8\",\n\t\t\t\ttimeout: 5000,\n\t\t\t\twindowsHide: true,\n\t\t\t});\n\t\t\tif (result.status === 0 && result.stdout) {\n\t\t\t\tconst firstMatch = result.stdout.trim().split(/\\r?\\n/)[0];\n\t\t\t\tif (firstMatch && existsSync(firstMatch)) {\n\t\t\t\t\treturn firstMatch;\n\t\t\t\t}\n\t\t\t}\n\t\t} catch {\n\t\t\t// Ignore errors\n\t\t}\n\t\treturn null;\n\t}\n\n\t// Unix: Use 'which' and trust its output (handles Termux and special filesystems)\n\ttry {\n\t\tconst result = spawnSync(\"which\", [\"bash\"], { encoding: \"utf-8\", timeout: 5000 });\n\t\tif (result.status === 0 && result.stdout) {\n\t\t\tconst firstMatch = result.stdout.trim().split(/\\r?\\n/)[0];\n\t\t\tif (firstMatch) {\n\t\t\t\treturn firstMatch;\n\t\t\t}\n\t\t}\n\t} catch {\n\t\t// Ignore errors\n\t}\n\treturn null;\n}\n\n/**\n * Resolve shell configuration based on platform and an optional explicit shell path.\n * Resolution order:\n * 1. User-specified shellPath\n * 2. On Windows: Git Bash in known locations, then bash on PATH\n * 3. On Unix: /bin/bash, then bash on PATH, then fallback to sh\n */\nexport function getShellConfig(customShellPath?: string): ShellConfig {\n\t// 1. Check user-specified shell path\n\tif (customShellPath) {\n\t\tif (existsSync(customShellPath)) {\n\t\t\treturn getShellConfigForPath(customShellPath);\n\t\t}\n\t\tthrow new Error(`Custom shell path not found: ${customShellPath}`);\n\t}\n\n\t// 2. SENPI_GIT_BASH_PATH override wins over platform probing.\n\tconst gitBashOverride = process.env[GIT_BASH_PATH_ENV];\n\tif (gitBashOverride) {\n\t\tif (existsSync(gitBashOverride)) {\n\t\t\treturn getShellConfigForPath(gitBashOverride);\n\t\t}\n\t\tthrow new Error(`${GIT_BASH_PATH_ENV} points to a missing shell: ${gitBashOverride}`);\n\t}\n\n\tif (process.platform === \"win32\") {\n\t\t// 3. Try Git Bash in known locations\n\t\tconst paths: string[] = [];\n\t\tconst programFiles = process.env.ProgramFiles;\n\t\tif (programFiles) {\n\t\t\tpaths.push(`${programFiles}\\\\Git\\\\bin\\\\bash.exe`);\n\t\t}\n\t\tconst programFilesX86 = process.env[\"ProgramFiles(x86)\"];\n\t\tif (programFilesX86) {\n\t\t\tpaths.push(`${programFilesX86}\\\\Git\\\\bin\\\\bash.exe`);\n\t\t}\n\n\t\tfor (const path of paths) {\n\t\t\tif (existsSync(path)) {\n\t\t\t\treturn getBashShellConfig(path);\n\t\t\t}\n\t\t}\n\n\t\t// 3. Fallback: search bash.exe on PATH (Cygwin, MSYS2, WSL, etc.)\n\t\tconst bashOnPath = findBashOnPath();\n\t\tif (bashOnPath) {\n\t\t\treturn getBashShellConfig(bashOnPath);\n\t\t}\n\n\t\tthrow new Error(\n\t\t\t`No bash shell found. Options:\\n` +\n\t\t\t\t` 1. Install Git for Windows: https://git-scm.com/download/win\\n` +\n\t\t\t\t` 2. Add your bash to PATH (Cygwin, MSYS2, etc.)\\n` +\n\t\t\t\t\" 3. Set shellPath in settings.json\\n\\n\" +\n\t\t\t\t`Searched Git Bash in:\\n${paths.map((p) => ` ${p}`).join(\"\\n\")}`,\n\t\t);\n\t}\n\n\t// Unix: try /bin/bash, then bash on PATH, then fallback to sh\n\tif (existsSync(\"/bin/bash\")) {\n\t\treturn getBashShellConfig(\"/bin/bash\");\n\t}\n\n\tconst bashOnPath = findBashOnPath();\n\tif (bashOnPath) {\n\t\treturn getBashShellConfig(bashOnPath);\n\t}\n\n\treturn { shell: \"sh\", args: [\"-c\"] };\n}\n\nexport function getShellEnv(): NodeJS.ProcessEnv {\n\tconst binDir = getBinDir();\n\tconst pathKey = Object.keys(process.env).find((key) => key.toLowerCase() === \"path\") ?? \"PATH\";\n\tconst currentPath = process.env[pathKey] ?? \"\";\n\tconst pathEntries = currentPath.split(delimiter).filter(Boolean);\n\tconst hasBinDir = pathEntries.includes(binDir);\n\tconst updatedPath = hasBinDir ? currentPath : [binDir, currentPath].filter(Boolean).join(delimiter);\n\n\treturn {\n\t\t...process.env,\n\t\t[pathKey]: updatedPath,\n\t};\n}\n\n/**\n * Sanitize binary output for display/storage.\n * Removes characters that crash string-width or cause display issues:\n * - Control characters (except tab, newline, carriage return)\n * - Lone surrogates\n * - Unicode Format characters (crash string-width due to a bug)\n * - Characters with undefined code points\n */\nexport function sanitizeBinaryOutput(str: string): string {\n\t// Use Array.from to properly iterate over code points (not code units)\n\t// This handles surrogate pairs correctly and catches edge cases where\n\t// codePointAt() might return undefined\n\tif (!hasUnsafeDisplayCharacter(str)) {\n\t\treturn str;\n\t}\n\n\treturn Array.from(str)\n\t\t.filter((char) => {\n\t\t\t// Filter out characters that cause string-width to crash\n\t\t\t// This includes:\n\t\t\t// - Unicode format characters\n\t\t\t// - Lone surrogates (already filtered by Array.from)\n\t\t\t// - Control chars except \\t \\n \\r\n\t\t\t// - Characters with undefined code points\n\n\t\t\tconst code = char.codePointAt(0);\n\n\t\t\t// Skip if code point is undefined (edge case with invalid strings)\n\t\t\tif (code === undefined) return false;\n\n\t\t\t// Allow tab, newline, carriage return\n\t\t\tif (code === 0x09 || code === 0x0a || code === 0x0d) return true;\n\n\t\t\t// Filter out control characters (0x00-0x1F, except 0x09, 0x0a, 0x0x0d)\n\t\t\tif (code <= 0x1f) return false;\n\n\t\t\t// Filter out Unicode format characters\n\t\t\tif (code >= 0xfff9 && code <= 0xfffb) return false;\n\n\t\t\treturn true;\n\t\t})\n\t\t.join(\"\");\n}\n\nfunction hasUnsafeDisplayCharacter(str: string): boolean {\n\tfor (let i = 0; i < str.length; i++) {\n\t\tconst code = str.charCodeAt(i);\n\t\tconst isAllowedControl = code === 0x09 || code === 0x0a || code === 0x0d;\n\t\tif (code <= 0x1f && !isAllowedControl) return true;\n\t\tif (code >= 0xfff9 && code <= 0xfffb) return true;\n\t}\n\treturn false;\n}\n\n/**\n * Detached child processes must be tracked so they can be killed on parent\n * shutdown signals (SIGHUP/SIGTERM).\n */\nconst trackedDetachedChildPids = new Set<number>();\n\nexport function trackDetachedChildPid(pid: number): void {\n\ttrackedDetachedChildPids.add(pid);\n}\n\nexport function untrackDetachedChildPid(pid: number): void {\n\ttrackedDetachedChildPids.delete(pid);\n}\n\nexport function killTrackedDetachedChildren(): void {\n\tfor (const pid of trackedDetachedChildPids) {\n\t\tkillProcessTree(pid);\n\t}\n\ttrackedDetachedChildPids.clear();\n}\n\n/**\n * Ordered `taskkill` launchers to try, most reliable first.\n *\n * `spawn(\"taskkill\", ...)` relies on a PATH lookup, so any session whose PATH lost\n * `%SystemRoot%\\System32` (a POSIX-style PATH inherited from a Git Bash/MSYS launcher,\n * a truncated user PATH, a locked-down service account) fails to resolve it. A broken PATH\n * must not cost us the process-tree kill, so every absolute System32 location that actually\n * exists is tried before the bare PATH-resolved name.\n */\nexport function windowsTaskkillCandidates(env: NodeJS.ProcessEnv = process.env): string[] {\n\t// A bare `SystemDrive` is drive-relative (\"C:\"), so anchor it before joining.\n\tconst systemDrive = env.SystemDrive ? `${env.SystemDrive}\\\\` : undefined;\n\tconst roots = [env.SystemRoot, env.SYSTEMROOT, env.windir, systemDrive && join(systemDrive, \"Windows\")];\n\tconst candidates: string[] = [];\n\tfor (const root of roots) {\n\t\tif (!root) continue;\n\t\t// Sysnative reaches the real 64-bit System32 from a 32-bit process, where System32\n\t\t// is redirected to SysWOW64.\n\t\tfor (const systemDir of [\"System32\", \"Sysnative\"]) {\n\t\t\tconst absolute = join(root, systemDir, \"taskkill.exe\");\n\t\t\tif (!candidates.includes(absolute) && existsSync(absolute)) candidates.push(absolute);\n\t\t}\n\t}\n\tcandidates.push(\"taskkill.exe\");\n\treturn candidates;\n}\n\nfunction killProcessDirectly(pid: number): void {\n\ttry {\n\t\tprocess.kill(pid);\n\t} catch {\n\t\t// Process already dead.\n\t}\n}\n\n/** Upper bound on how long a shutdown may block waiting for `taskkill` to finish. */\nconst TASKKILL_TIMEOUT_MS = 5_000;\n\nfunction taskkillHandledTree(pid: number, taskkillPath: string): boolean {\n\ttry {\n\t\tconst result = spawnSync(taskkillPath, [\"/F\", \"/T\", \"/PID\", String(pid)], {\n\t\t\tstdio: \"ignore\",\n\t\t\twindowsHide: true,\n\t\t\ttimeout: TASKKILL_TIMEOUT_MS,\n\t\t});\n\t\t// `error` means the launcher never started (ENOENT, EACCES); a null status means\n\t\t// the timeout killed it. Any real taskkill exit code counts as handled.\n\t\treturn result.error === undefined && result.status !== null;\n\t} catch {\n\t\treturn false;\n\t}\n}\n\n/**\n * Kill a process and all its children on Windows via `taskkill /T`.\n *\n * Synchronous on purpose. Shutdown paths call `killTrackedDetachedChildren()` and then\n * `process.exit()` in the same tick (`emergencyTerminalExit()`), so neither an\n * asynchronous killer nor a fallback wired to a child's `error` event would ever run and\n * the tracked child would survive. `spawnSync` also reports a failed executable lookup on\n * its returned `error` field instead of emitting it, so a PATH without\n * `%SystemRoot%\\System32` can no longer surface as an uncaught `spawn taskkill ENOENT`.\n *\n * The direct `process.kill` at the end is a degraded last resort reached only when no\n * `taskkill.exe` can be launched at all. It maps to `TerminateProcess`, which does not\n * touch descendants — the same limitation `packages/pty/src/pipe-fallback.ts` documents.\n * Nothing in-process can walk a Windows process tree without an external tool, so this\n * still beats leaving the whole tree running.\n */\nexport function killWindowsProcessTree(pid: number, taskkillPaths = windowsTaskkillCandidates()): void {\n\tfor (const taskkillPath of taskkillPaths) {\n\t\tif (taskkillHandledTree(pid, taskkillPath)) return;\n\t}\n\tkillProcessDirectly(pid);\n}\n\n/**\n * Kill a process and all its children (cross-platform)\n */\nexport function killProcessTree(pid: number): void {\n\tif (process.platform === \"win32\") {\n\t\tkillWindowsProcessTree(pid);\n\t} else {\n\t\t// Use SIGKILL on Unix/Linux/Mac\n\t\ttry {\n\t\t\tprocess.kill(-pid, \"SIGKILL\");\n\t\t} catch {\n\t\t\t// Fallback to killing just the child if process group kill fails\n\t\t\ttry {\n\t\t\t\tprocess.kill(pid, \"SIGKILL\");\n\t\t\t} catch {\n\t\t\t\t// Process already dead\n\t\t\t}\n\t\t}\n\t}\n}\n"]}
1
+ {"version":3,"file":"shell.js","sourceRoot":"","sources":["../../src/utils/shell.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AACrC,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAC5C,OAAO,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAC1C,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAazC,uGAAuG;AACvG,MAAM,CAAC,MAAM,iBAAiB,GAAG,qBAAqB,CAAC;AAEvD;;GAEG;AACH,SAAS,mBAAmB,CAAC,IAAY;IACxC,MAAM,UAAU,GAAG,IAAI,CAAC,OAAO,CAAC,KAAK,EAAE,IAAI,CAAC,CAAC,WAAW,EAAE,CAAC;IAC3D,OAAO,sDAAsD,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;AAChF,CAAC;AAED,uFAAuF;AACvF,MAAM,UAAU,gBAAgB,CAAC,SAAiB;IAC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AM,CAAC;gBACR,uBAAuB;YACxB,CAAC;QACF,CAAC;IACF,CAAC;AACF,CAAC","sourcesContent":["import { existsSync } from \"node:fs\";\nimport { delimiter, join } from \"node:path\";\nimport { spawnSync } from \"child_process\";\nimport { getBinDir } from \"../config.ts\";\n\n/** Family of a resolved shell executable, used to pick invocation arguments. */\nexport type ShellKind = \"bash\" | \"sh\" | \"cmd\" | \"powershell\";\n\nexport interface ShellConfig {\n\tshell: string;\n\targs: string[];\n\tcommandTransport?: \"argv\" | \"stdin\";\n\t/** Detected shell family. Lets PTY callers pass the right command transport per shell. */\n\tkind?: ShellKind;\n}\n\n/** Environment variable that overrides shell resolution with an explicit bash path (Windows-first). */\nexport const GIT_BASH_PATH_ENV = \"SENPI_GIT_BASH_PATH\";\n\n/**\n * Find bash executable on PATH (cross-platform)\n */\nfunction isLegacyWslBashPath(path: string): boolean {\n\tconst normalized = path.replace(/\\//g, \"\\\\\").toLowerCase();\n\treturn /^[a-z]:\\\\windows\\\\(?:system32|sysnative)\\\\bash\\.exe$/.test(normalized);\n}\n\n/** Classify a shell executable by its basename so non-bash shells get correct args. */\nexport function resolveShellKind(shellPath: string): ShellKind {\n\tconst base = shellPath\n\t\t.replace(/\\\\/g, \"/\")\n\t\t.split(\"/\")\n\t\t.pop()\n\t\t?.toLowerCase()\n\t\t.replace(/\\.exe$/, \"\");\n\tif (base === \"cmd\") return \"cmd\";\n\tif (base === \"powershell\" || base === \"pwsh\") return \"powershell\";\n\tif (base === \"sh\") return \"sh\";\n\treturn \"bash\";\n}\n\nfunction getBashShellConfig(shell: string): ShellConfig {\n\treturn isLegacyWslBashPath(shell)\n\t\t? { shell, args: [\"-s\"], commandTransport: \"stdin\", kind: \"bash\" }\n\t\t: { shell, args: [\"-c\"], kind: \"bash\" };\n}\n\n/**\n * Build a ShellConfig for an explicit shell path, honoring the shell KIND so\n * cmd.exe uses `/c`, PowerShell uses `-NoProfile -Command`, and bash/sh use\n * `-c` (or WSL bash `-s` via stdin).\n */\nfunction getShellConfigForPath(shellPath: string): ShellConfig {\n\tconst kind = resolveShellKind(shellPath);\n\tswitch (kind) {\n\t\tcase \"cmd\":\n\t\t\treturn { shell: shellPath, args: [\"/c\"], kind };\n\t\tcase \"powershell\":\n\t\t\treturn { shell: shellPath, args: [\"-NoProfile\", \"-Command\"], kind };\n\t\tcase \"sh\":\n\t\t\treturn { shell: shellPath, args: [\"-c\"], kind };\n\t\tdefault:\n\t\t\treturn getBashShellConfig(shellPath);\n\t}\n}\n\nfunction findExecutableOnPath(executable: string): string | null {\n\tif (process.platform === \"win32\") {\n\t\t// Windows: Use 'where' and verify file exists (where can return non-existent paths)\n\t\ttry {\n\t\t\tconst result = spawnSync(\"where\", [executable], {\n\t\t\t\tencoding: \"utf-8\",\n\t\t\t\ttimeout: 5000,\n\t\t\t\twindowsHide: true,\n\t\t\t});\n\t\t\tif (result.status === 0 && result.stdout) {\n\t\t\t\tconst firstMatch = result.stdout.trim().split(/\\r?\\n/)[0];\n\t\t\t\tif (firstMatch && existsSync(firstMatch)) {\n\t\t\t\t\treturn firstMatch;\n\t\t\t\t}\n\t\t\t}\n\t\t} catch {\n\t\t\t// Ignore errors\n\t\t}\n\t\treturn null;\n\t}\n\n\t// Unix: Use 'which' and trust its output (handles Termux and special filesystems)\n\ttry {\n\t\tconst result = spawnSync(\"which\", [executable], { encoding: \"utf-8\", timeout: 5000 });\n\t\tif (result.status === 0 && result.stdout) {\n\t\t\tconst firstMatch = result.stdout.trim().split(/\\r?\\n/)[0];\n\t\t\tif (firstMatch) {\n\t\t\t\treturn firstMatch;\n\t\t\t}\n\t\t}\n\t} catch {\n\t\t// Ignore errors\n\t}\n\treturn null;\n}\n\n/**\n * Resolve shell configuration based on platform and an optional explicit shell path.\n * Resolution order:\n * 1. User-specified shellPath\n * 2. On Windows: Git Bash in known locations, then bash on PATH\n * 3. On Unix: /bin/bash, then bash on PATH, then fallback to sh\n */\nexport function getShellConfig(customShellPath?: string): ShellConfig {\n\t// 1. Check user-specified shell path\n\tif (customShellPath) {\n\t\tif (existsSync(customShellPath)) {\n\t\t\treturn getShellConfigForPath(customShellPath);\n\t\t}\n\t\tthrow new Error(`Custom shell path not found: ${customShellPath}`);\n\t}\n\n\t// 2. SENPI_GIT_BASH_PATH override wins over platform probing.\n\tconst gitBashOverride = process.env[GIT_BASH_PATH_ENV];\n\tif (gitBashOverride) {\n\t\tif (existsSync(gitBashOverride)) {\n\t\t\treturn getShellConfigForPath(gitBashOverride);\n\t\t}\n\t\tthrow new Error(`${GIT_BASH_PATH_ENV} points to a missing shell: ${gitBashOverride}`);\n\t}\n\n\tif (process.platform === \"win32\") {\n\t\t// 3. Try Git Bash in known locations\n\t\tconst paths: string[] = [];\n\t\tconst programFiles = process.env.ProgramFiles;\n\t\tif (programFiles) {\n\t\t\tpaths.push(`${programFiles}\\\\Git\\\\bin\\\\bash.exe`);\n\t\t}\n\t\tconst programFilesX86 = process.env[\"ProgramFiles(x86)\"];\n\t\tif (programFilesX86) {\n\t\t\tpaths.push(`${programFilesX86}\\\\Git\\\\bin\\\\bash.exe`);\n\t\t}\n\n\t\tfor (const path of paths) {\n\t\t\tif (existsSync(path)) {\n\t\t\t\treturn getBashShellConfig(path);\n\t\t\t}\n\t\t}\n\n\t\t// 3. Fallback: search bash.exe on PATH (Cygwin, MSYS2, WSL, etc.)\n\t\tconst bashOnPath = findExecutableOnPath(\"bash.exe\");\n\t\tif (bashOnPath) {\n\t\t\treturn getBashShellConfig(bashOnPath);\n\t\t}\n\n\t\tthrow new Error(\n\t\t\t`No bash shell found. Options:\\n` +\n\t\t\t\t` 1. Install Git for Windows: https://git-scm.com/download/win\\n` +\n\t\t\t\t` 2. Add your bash to PATH (Cygwin, MSYS2, etc.)\\n` +\n\t\t\t\t\" 3. Set shellPath in settings.json\\n\\n\" +\n\t\t\t\t`Searched Git Bash in:\\n${paths.map((p) => ` ${p}`).join(\"\\n\")}`,\n\t\t);\n\t}\n\n\t// Unix: try /bin/bash, then bash on PATH, then fallback to sh\n\tif (existsSync(\"/bin/bash\")) {\n\t\treturn getBashShellConfig(\"/bin/bash\");\n\t}\n\n\tconst bashOnPath = findExecutableOnPath(\"bash\");\n\tif (bashOnPath) {\n\t\treturn getBashShellConfig(bashOnPath);\n\t}\n\n\treturn { shell: \"sh\", args: [\"-c\"] };\n}\n\nexport const POWERSHELL_ARGS = [\"-NoProfile\", \"-NonInteractive\", \"-ExecutionPolicy\", \"Bypass\", \"-Command\"] as const;\n\n/** Resolve PowerShell on Windows, preferring PowerShell 7 when available. */\nexport function getPowerShellConfig(): ShellConfig {\n\tif (process.platform !== \"win32\") {\n\t\tthrow new Error(\"The powershell tool is only available on Windows.\");\n\t}\n\n\tconst shell = findExecutableOnPath(\"pwsh.exe\") ?? findExecutableOnPath(\"powershell.exe\");\n\tif (!shell) {\n\t\tthrow new Error(\"No PowerShell executable found. Install PowerShell or add powershell.exe/pwsh.exe to PATH.\");\n\t}\n\n\treturn { shell, args: [...POWERSHELL_ARGS] };\n}\n\nexport function getShellEnv(): NodeJS.ProcessEnv {\n\tconst binDir = getBinDir();\n\tconst pathKey = Object.keys(process.env).find((key) => key.toLowerCase() === \"path\") ?? \"PATH\";\n\tconst currentPath = process.env[pathKey] ?? \"\";\n\tconst pathEntries = currentPath.split(delimiter).filter(Boolean);\n\tconst hasBinDir = pathEntries.includes(binDir);\n\tconst updatedPath = hasBinDir ? currentPath : [binDir, currentPath].filter(Boolean).join(delimiter);\n\n\treturn {\n\t\t...process.env,\n\t\t[pathKey]: updatedPath,\n\t};\n}\n\n/**\n * Sanitize binary output for display/storage.\n * Removes characters that crash string-width or cause display issues:\n * - Control characters (except tab, newline, carriage return)\n * - Lone surrogates\n * - Unicode Format characters (crash string-width due to a bug)\n * - Characters with undefined code points\n */\nexport function sanitizeBinaryOutput(str: string): string {\n\t// Use Array.from to properly iterate over code points (not code units)\n\t// This handles surrogate pairs correctly and catches edge cases where\n\t// codePointAt() might return undefined\n\tif (!hasUnsafeDisplayCharacter(str)) {\n\t\treturn str;\n\t}\n\n\treturn Array.from(str)\n\t\t.filter((char) => {\n\t\t\t// Filter out characters that cause string-width to crash\n\t\t\t// This includes:\n\t\t\t// - Unicode format characters\n\t\t\t// - Lone surrogates (already filtered by Array.from)\n\t\t\t// - Control chars except \\t \\n \\r\n\t\t\t// - Characters with undefined code points\n\n\t\t\tconst code = char.codePointAt(0);\n\n\t\t\t// Skip if code point is undefined (edge case with invalid strings)\n\t\t\tif (code === undefined) return false;\n\n\t\t\t// Allow tab, newline, carriage return\n\t\t\tif (code === 0x09 || code === 0x0a || code === 0x0d) return true;\n\n\t\t\t// Filter out control characters (0x00-0x1F, except 0x09, 0x0a, 0x0x0d)\n\t\t\tif (code <= 0x1f) return false;\n\n\t\t\t// Filter out Unicode format characters\n\t\t\tif (code >= 0xfff9 && code <= 0xfffb) return false;\n\n\t\t\treturn true;\n\t\t})\n\t\t.join(\"\");\n}\n\nfunction hasUnsafeDisplayCharacter(str: string): boolean {\n\tfor (let i = 0; i < str.length; i++) {\n\t\tconst code = str.charCodeAt(i);\n\t\tconst isAllowedControl = code === 0x09 || code === 0x0a || code === 0x0d;\n\t\tif (code <= 0x1f && !isAllowedControl) return true;\n\t\tif (code >= 0xfff9 && code <= 0xfffb) return true;\n\t}\n\treturn false;\n}\n\n/**\n * Detached child processes must be tracked so they can be killed on parent\n * shutdown signals (SIGHUP/SIGTERM).\n */\nconst trackedDetachedChildPids = new Set<number>();\n\nexport function trackDetachedChildPid(pid: number): void {\n\ttrackedDetachedChildPids.add(pid);\n}\n\nexport function untrackDetachedChildPid(pid: number): void {\n\ttrackedDetachedChildPids.delete(pid);\n}\n\nexport function killTrackedDetachedChildren(): void {\n\tfor (const pid of trackedDetachedChildPids) {\n\t\tkillProcessTree(pid);\n\t}\n\ttrackedDetachedChildPids.clear();\n}\n\n/**\n * Ordered `taskkill` launchers to try, most reliable first.\n *\n * `spawn(\"taskkill\", ...)` relies on a PATH lookup, so any session whose PATH lost\n * `%SystemRoot%\\System32` (a POSIX-style PATH inherited from a Git Bash/MSYS launcher,\n * a truncated user PATH, a locked-down service account) fails to resolve it. A broken PATH\n * must not cost us the process-tree kill, so every absolute System32 location that actually\n * exists is tried before the bare PATH-resolved name.\n */\nexport function windowsTaskkillCandidates(env: NodeJS.ProcessEnv = process.env): string[] {\n\t// A bare `SystemDrive` is drive-relative (\"C:\"), so anchor it before joining.\n\tconst systemDrive = env.SystemDrive ? `${env.SystemDrive}\\\\` : undefined;\n\tconst roots = [env.SystemRoot, env.SYSTEMROOT, env.windir, systemDrive && join(systemDrive, \"Windows\")];\n\tconst candidates: string[] = [];\n\tfor (const root of roots) {\n\t\tif (!root) continue;\n\t\t// Sysnative reaches the real 64-bit System32 from a 32-bit process, where System32\n\t\t// is redirected to SysWOW64.\n\t\tfor (const systemDir of [\"System32\", \"Sysnative\"]) {\n\t\t\tconst absolute = join(root, systemDir, \"taskkill.exe\");\n\t\t\tif (!candidates.includes(absolute) && existsSync(absolute)) candidates.push(absolute);\n\t\t}\n\t}\n\tcandidates.push(\"taskkill.exe\");\n\treturn candidates;\n}\n\nfunction killProcessDirectly(pid: number): void {\n\ttry {\n\t\tprocess.kill(pid);\n\t} catch {\n\t\t// Process already dead.\n\t}\n}\n\n/** Upper bound on how long a shutdown may block waiting for `taskkill` to finish. */\nconst TASKKILL_TIMEOUT_MS = 5_000;\n\nfunction taskkillHandledTree(pid: number, taskkillPath: string): boolean {\n\ttry {\n\t\tconst result = spawnSync(taskkillPath, [\"/F\", \"/T\", \"/PID\", String(pid)], {\n\t\t\tstdio: \"ignore\",\n\t\t\twindowsHide: true,\n\t\t\ttimeout: TASKKILL_TIMEOUT_MS,\n\t\t});\n\t\t// `error` means the launcher never started (ENOENT, EACCES); a null status means\n\t\t// the timeout killed it. Any real taskkill exit code counts as handled.\n\t\treturn result.error === undefined && result.status !== null;\n\t} catch {\n\t\treturn false;\n\t}\n}\n\n/**\n * Kill a process and all its children on Windows via `taskkill /T`.\n *\n * Synchronous on purpose. Shutdown paths call `killTrackedDetachedChildren()` and then\n * `process.exit()` in the same tick (`emergencyTerminalExit()`), so neither an\n * asynchronous killer nor a fallback wired to a child's `error` event would ever run and\n * the tracked child would survive. `spawnSync` also reports a failed executable lookup on\n * its returned `error` field instead of emitting it, so a PATH without\n * `%SystemRoot%\\System32` can no longer surface as an uncaught `spawn taskkill ENOENT`.\n *\n * The direct `process.kill` at the end is a degraded last resort reached only when no\n * `taskkill.exe` can be launched at all. It maps to `TerminateProcess`, which does not\n * touch descendants — the same limitation `packages/pty/src/pipe-fallback.ts` documents.\n * Nothing in-process can walk a Windows process tree without an external tool, so this\n * still beats leaving the whole tree running.\n */\nexport function killWindowsProcessTree(pid: number, taskkillPaths = windowsTaskkillCandidates()): void {\n\tfor (const taskkillPath of taskkillPaths) {\n\t\tif (taskkillHandledTree(pid, taskkillPath)) return;\n\t}\n\tkillProcessDirectly(pid);\n}\n\n/**\n * Kill a process and all its children (cross-platform)\n */\nexport function killProcessTree(pid: number): void {\n\tif (process.platform === \"win32\") {\n\t\tkillWindowsProcessTree(pid);\n\t} else {\n\t\t// Use SIGKILL on Unix/Linux/Mac\n\t\ttry {\n\t\t\tprocess.kill(-pid, \"SIGKILL\");\n\t\t} catch {\n\t\t\t// Fallback to killing just the child if process group kill fails\n\t\t\ttry {\n\t\t\t\tprocess.kill(pid, \"SIGKILL\");\n\t\t\t} catch {\n\t\t\t\t// Process already dead\n\t\t\t}\n\t\t}\n\t}\n}\n"]}
@@ -1,3 +1,4 @@
1
+ export declare function loadAllHighlightLanguages(): Promise<void>;
1
2
  export type HighlightFormatter = (text: string) => string;
2
3
  export type HighlightTheme = Partial<Record<string, HighlightFormatter>>;
3
4
  export interface HighlightOptions {
@@ -1 +1 @@
1
- {"version":3,"file":"syntax-highlight.d.ts","sourceRoot":"","sources":["../../src/utils/syntax-highlight.ts"],"names":[],"mappings":"AAGA,MAAM,MAAM,kBAAkB,GAAG,CAAC,IAAI,EAAE,MAAM,KAAK,MAAM,CAAC;AAC1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C,IAAI,EAAE,MAAM,GAAG,OAAO,CAEtD"}
@@ -1,5 +1,64 @@
1
- import hljs from "highlight.js";
1
+ import hljs from "highlight.js/lib/core";
2
+ import bash from "highlight.js/lib/languages/bash";
3
+ import c from "highlight.js/lib/languages/c";
4
+ import cpp from "highlight.js/lib/languages/cpp";
5
+ import csharp from "highlight.js/lib/languages/csharp";
6
+ import dart from "highlight.js/lib/languages/dart";
7
+ import go from "highlight.js/lib/languages/go";
8
+ import groovy from "highlight.js/lib/languages/groovy";
9
+ import java from "highlight.js/lib/languages/java";
10
+ import javascript from "highlight.js/lib/languages/javascript";
11
+ import kotlin from "highlight.js/lib/languages/kotlin";
12
+ import lua from "highlight.js/lib/languages/lua";
13
+ import nix from "highlight.js/lib/languages/nix";
14
+ import perl from "highlight.js/lib/languages/perl";
15
+ import php from "highlight.js/lib/languages/php";
16
+ import python from "highlight.js/lib/languages/python";
17
+ import ruby from "highlight.js/lib/languages/ruby";
18
+ import rust from "highlight.js/lib/languages/rust";
19
+ import scala from "highlight.js/lib/languages/scala";
20
+ import swift from "highlight.js/lib/languages/swift";
21
+ import typescript from "highlight.js/lib/languages/typescript";
2
22
  import { decodeHtmlEntityAt } from "./html.js";
23
+ const eagerLanguages = {
24
+ python,
25
+ java,
26
+ go,
27
+ javascript,
28
+ cpp,
29
+ typescript,
30
+ php,
31
+ ruby,
32
+ c,
33
+ csharp,
34
+ nix,
35
+ bash,
36
+ rust,
37
+ scala,
38
+ kotlin,
39
+ swift,
40
+ dart,
41
+ groovy,
42
+ perl,
43
+ lua,
44
+ };
45
+ for (const [name, language] of Object.entries(eagerLanguages)) {
46
+ hljs.registerLanguage(name, language);
47
+ }
48
+ let allLanguagesPromise;
49
+ export function loadAllHighlightLanguages() {
50
+ if (!allLanguagesPromise) {
51
+ allLanguagesPromise = new Promise((resolve) => {
52
+ setImmediate(() => {
53
+ void import("highlight.js").then(() => resolve(), () => {
54
+ // Eager languages and plaintext fallback remain available.
55
+ resolve();
56
+ });
57
+ });
58
+ });
59
+ }
60
+ return allLanguagesPromise;
61
+ }
3
62
  const SPAN_CLOSE = "</span>";
4
63
  const HIGHLIGHT_CLASS_PREFIX = "hljs-";
5
64
  function getScopeFromSpanTag(tag) {
@@ -1 +1 @@
1
- {"version":3,"file":"syntax-highlight.js","sourceRoot":"","sources":["../../src/utils/syntax-highlight.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,cAAc,CAAC;AAChC,OAAO,EAAE,kBAAkB,EAAE,MAAM,WAAW,CAAC;AAY/C,MAAM,UAAU,GAAG,SAAS,CAAC;AAC7B,MAAM,sBAAsB,GAAG,OAAO,CAAC;AAEvC,SAAS,mBAAmB,CAAC,GAAW;IACvC,MAAM,KAAK,GAAG,uCAAuC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;IAChE,MAAM,UAAU,GAAG,KAAK,EAAE,CAAC,CAAC,CAAC,IAAI,KAAK,EAAE,CAAC,CAAC,CAAC,CAAC;IAC5C,IAAI,CAAC,UAAU,EAAE,CAAC;QACjB,OAAO,SAAS,CAAC;IAClB,CAAC;IAED,KAAK,MAAM,SAAS,IAAI,UAAU,CAAC,KAAK,CAAC,KAAK,CAAC,EAAE,CAAC;QACjD,IAAI,SAAS,CAAC,UAAU,CAAC,sBAAsB,CAAC,EAAE,CAAC;YAClD,OAAO,SAAS,CAAC,KAAK,CAAC,sBAAsB,CAAC,MAAM,CAAC,CAAC;QACvD,CAAC;IACF,CAAC;IAED,OAAO,SAAS,CAAC;AAClB,CAAC;AAED,SAAS,iBAAiB,CAAC,KAAa,EAAE,KAAqB;IAC9D,MAAM,KAAK,GAAG,KAAK,CAAC,KAAK,CAAC,CAAC;IAC3B,IAAI,KAAK,EAAE,CAAC;QACX,OAAO,KAAK,CAAC;IACd,CAAC;IAED,MAAM,QAAQ,GAAG,KAAK,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;IACpC,IAAI,QAAQ,KAAK,CAAC,CAAC,EAAE,CAAC;QACrB,MAAM,e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\nexport type HighlightFormatter = (text: string) => string;\nexport type HighlightTheme = Partial<Record<string, HighlightFormatter>>;\n\nexport interface HighlightOptions {\n\tlanguage?: string;\n\tignoreIllegals?: boolean;\n\tlanguageSubset?: string[];\n\ttheme?: HighlightTheme;\n}\n\nconst SPAN_CLOSE = \"</span>\";\nconst HIGHLIGHT_CLASS_PREFIX = \"hljs-\";\n\nfunction getScopeFromSpanTag(tag: string): string | undefined {\n\tconst match = /\\sclass\\s*=\\s*(?:\"([^\"]*)\"|'([^']*)')/.exec(tag);\n\tconst classValue = match?.[1] ?? match?.[2];\n\tif (!classValue) {\n\t\treturn undefined;\n\t}\n\n\tfor (const className of classValue.split(/\\s+/)) {\n\t\tif (className.startsWith(HIGHLIGHT_CLASS_PREFIX)) {\n\t\t\treturn className.slice(HIGHLIGHT_CLASS_PREFIX.length);\n\t\t}\n\t}\n\n\treturn undefined;\n}\n\nfunction getScopeFormatter(scope: string, theme: HighlightTheme): HighlightFormatter | undefined {\n\tconst exact = theme[scope];\n\tif (exact) {\n\t\treturn exact;\n\t}\n\n\tconst dotIndex = scope.indexOf(\".\");\n\tif (dotIndex !== -1) {\n\t\tconst prefixFormatter = theme[scope.slice(0, dotIndex)];\n\t\tif (prefixFormatter) {\n\t\t\treturn prefixFormatter;\n\t\t}\n\t}\n\n\tconst dashIndex = scope.indexOf(\"-\");\n\tif (dashIndex !== -1) {\n\t\tconst prefixFormatter = theme[scope.slice(0, dashIndex)];\n\t\tif (prefixFormatter) {\n\t\t\treturn prefixFormatter;\n\t\t}\n\t}\n\n\treturn undefined;\n}\n\nfunction getActiveFormatter(scopes: Array<string | undefined>, theme: HighlightTheme): HighlightFormatter | undefined {\n\tfor (let i = scopes.length - 1; i >= 0; i--) {\n\t\tconst scope = scopes[i];\n\t\tif (!scope) {\n\t\t\tcontinue;\n\t\t}\n\t\tconst formatter = getScopeFormatter(scope, theme);\n\t\tif (formatter) {\n\t\t\treturn formatter;\n\t\t}\n\t}\n\treturn theme.default;\n}\n\nfunction isSpanOpenTagStart(html: string, index: number): boolean {\n\tif (!html.startsWith(\"<span\", index)) {\n\t\treturn false;\n\t}\n\tconst nextChar = html[index + \"<span\".length];\n\treturn nextChar === \">\" || nextChar === \" \" || nextChar === \"\\t\" || nextChar === \"\\n\" || nextChar === \"\\r\";\n}\n\nexport function renderHighlightedHtml(html: string, theme: HighlightTheme = {}): string {\n\tlet output = \"\";\n\tlet textBuffer = \"\";\n\tconst scopes: Array<string | undefined> = [];\n\n\tconst flushText = () => {\n\t\tif (!textBuffer) {\n\t\t\treturn;\n\t\t}\n\t\tconst formatter = getActiveFormatter(scopes, theme);\n\t\toutput += formatter ? formatter(textBuffer) : textBuffer;\n\t\ttextBuffer = \"\";\n\t};\n\n\tlet index = 0;\n\twhile (index < html.length) {\n\t\tif (isSpanOpenTagStart(html, index)) {\n\t\t\tconst tagEndIndex = html.indexOf(\">\", index + 5);\n\t\t\tif (tagEndIndex !== -1) {\n\t\t\t\tflushText();\n\t\t\t\tconst tag = html.slice(index, tagEndIndex + 1);\n\t\t\t\tconst scope = getScopeFromSpanTag(tag);\n\t\t\t\tscopes.push(scope);\n\t\t\t\tindex = tagEndIndex + 1;\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t}\n\n\t\tif (html.startsWith(SPAN_CLOSE, index)) {\n\t\t\tflushText();\n\t\t\tif (scopes.length > 0) {\n\t\t\t\tscopes.pop();\n\t\t\t}\n\t\t\tindex += SPAN_CLOSE.length;\n\t\t\tcontinue;\n\t\t}\n\n\t\tif (html[index] === \"&\") {\n\t\t\tconst decoded = decodeHtmlEntityAt(html, index);\n\t\t\tif (decoded) {\n\t\t\t\ttextBuffer += decoded.text;\n\t\t\t\tindex += decoded.length;\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t}\n\n\t\ttextBuffer += html[index];\n\t\tindex++;\n\t}\n\n\tflushText();\n\treturn output;\n}\n\nexport function highlight(code: string, options: HighlightOptions = {}): string {\n\tconst html = options.language\n\t\t? hljs.highlight(code, {\n\t\t\t\tlanguage: options.language,\n\t\t\t\tignoreIllegals: options.ignoreIllegals,\n\t\t\t}).value\n\t\t: hljs.highlightAuto(code, options.languageSubset).value;\n\treturn renderHighlightedHtml(html, options.theme);\n}\n\nexport function supportsLanguage(name: string): boolean {\n\treturn hljs.getLanguage(name) !== undefined;\n}\n"]}
1
+ {"version":3,"file":"syntax-highlight.js","sourceRoot":"","sources":["../../src/utils/syntax-highlight.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,uBAAuB,CAAC;AACzC,OAAO,IAAI,MAAM,iCAAiC,CAAC;AACnD,OAAO,CAAC,MAAM,8BAA8B,CAAC;AAC7C,OAAO,GAAG,MAAM,gCAAgC,CAAC;AACjD,OAAO,MAAM,MAAM,mCAAmC,CAAC;AACvD,OAAO,IAAI,MAAM,iCAAiC,CAAC;AACnD,OAAO,EAAE,MAAM,+BAA+B,CAAC;AAC/C,OAAO,MAAM,MAAM,mCAAmC,CAAC;AACvD,OAAO,IAAI,MAAM,iCAAiC,CAAC;AACnD,OAAO,UAAU,MAAM,uCAAuC,CAAC;AAC/D,OAAO,MAAM,MAAM,mCAAmC,CAAC;AACvD,OAAO,GAAG,MAAM,gCAAgC,CAAC;AACjD,OAAO,GAAG,MAAM,gCAAgC,CAAC;AACjD,OAAO,IAAI,MAAM,iCAAiC,CAAC;AACnD,OAAO,GAAG,MAAM,gCAAgC,CAAC;AACjD,OAAO,MAAM,MAAM,mCAAmC,CAAC;AACvD,OAAO,IAAI,MAAM,iCAAiC,CAAC;AACnD,OAAO,IAAI,MAAM,iCAAiC,CAAC;AACnD,OAAO,KAAK,MAAM,kCAAkC,CAAC;AACrD,OAAO,KAAK,MAAM,kCAAkC,CAAC;AACrD,OAAO,UAAU,MAAM,uCAAuC,CAAC;AAC/D,OAAO,EAAE,kBAAkB,EAAE,MAAM,WAAW,CAAC;AAE/C,MAAM,cAAc,GAAG;IACtB,MAAM;IACN,IAAI;IACJ,EAAE;IACF,UAAU;IACV,GA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AI,CAAC,SAAS,CAAC,IAAI,EAAE;YACrB,QAAQ,EAAE,OAAO,CAAC,QAAQ;YAC1B,cAAc,EAAE,OAAO,CAAC,cAAc;SACtC,CAAC,CAAC,KAAK;QACT,CAAC,CAAC,IAAI,CAAC,aAAa,CAAC,IAAI,EAAE,OAAO,CAAC,cAAc,CAAC,CAAC,KAAK,CAAC;IAC1D,OAAO,qBAAqB,CAAC,IAAI,EAAE,OAAO,CAAC,KAAK,CAAC,CAAC;AACnD,CAAC;AAED,MAAM,UAAU,gBAAgB,CAAC,IAAY;IAC5C,OAAO,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,KAAK,SAAS,CAAC;AAC7C,CAAC","sourcesContent":["import hljs from \"highlight.js/lib/core\";\nimport bash from \"highlight.js/lib/languages/bash\";\nimport c from \"highlight.js/lib/languages/c\";\nimport cpp from \"highlight.js/lib/languages/cpp\";\nimport csharp from \"highlight.js/lib/languages/csharp\";\nimport dart from \"highlight.js/lib/languages/dart\";\nimport go from \"highlight.js/lib/languages/go\";\nimport groovy from \"highlight.js/lib/languages/groovy\";\nimport java from \"highlight.js/lib/languages/java\";\nimport javascript from \"highlight.js/lib/languages/javascript\";\nimport kotlin from \"highlight.js/lib/languages/kotlin\";\nimport lua from \"highlight.js/lib/languages/lua\";\nimport nix from \"highlight.js/lib/languages/nix\";\nimport perl from \"highlight.js/lib/languages/perl\";\nimport php from \"highlight.js/lib/languages/php\";\nimport python from \"highlight.js/lib/languages/python\";\nimport ruby from \"highlight.js/lib/languages/ruby\";\nimport rust from \"highlight.js/lib/languages/rust\";\nimport scala from \"highlight.js/lib/languages/scala\";\nimport swift from \"highlight.js/lib/languages/swift\";\nimport typescript from \"highlight.js/lib/languages/typescript\";\nimport { decodeHtmlEntityAt } from \"./html.ts\";\n\nconst eagerLanguages = {\n\tpython,\n\tjava,\n\tgo,\n\tjavascript,\n\tcpp,\n\ttypescript,\n\tphp,\n\truby,\n\tc,\n\tcsharp,\n\tnix,\n\tbash,\n\trust,\n\tscala,\n\tkotlin,\n\tswift,\n\tdart,\n\tgroovy,\n\tperl,\n\tlua,\n};\n\nfor (const [name, language] of Object.entries(eagerLanguages)) {\n\thljs.registerLanguage(name, language);\n}\n\nlet allLanguagesPromise: Promise<void> | undefined;\n\nexport function loadAllHighlightLanguages(): Promise<void> {\n\tif (!allLanguagesPromise) {\n\t\tallLanguagesPromise = new Promise((resolve) => {\n\t\t\tsetImmediate(() => {\n\t\t\t\tvoid import(\"highlight.js\").then(\n\t\t\t\t\t() => resolve(),\n\t\t\t\t\t() => {\n\t\t\t\t\t\t// Eager languages and plaintext fallback remain available.\n\t\t\t\t\t\tresolve();\n\t\t\t\t\t},\n\t\t\t\t);\n\t\t\t});\n\t\t});\n\t}\n\treturn allLanguagesPromise;\n}\n\nexport type HighlightFormatter = (text: string) => string;\nexport type HighlightTheme = Partial<Record<string, HighlightFormatter>>;\n\nexport interface HighlightOptions {\n\tlanguage?: string;\n\tignoreIllegals?: boolean;\n\tlanguageSubset?: string[];\n\ttheme?: HighlightTheme;\n}\n\nconst SPAN_CLOSE = \"</span>\";\nconst HIGHLIGHT_CLASS_PREFIX = \"hljs-\";\n\nfunction getScopeFromSpanTag(tag: string): string | undefined {\n\tconst match = /\\sclass\\s*=\\s*(?:\"([^\"]*)\"|'([^']*)')/.exec(tag);\n\tconst classValue = match?.[1] ?? match?.[2];\n\tif (!classValue) {\n\t\treturn undefined;\n\t}\n\n\tfor (const className of classValue.split(/\\s+/)) {\n\t\tif (className.startsWith(HIGHLIGHT_CLASS_PREFIX)) {\n\t\t\treturn className.slice(HIGHLIGHT_CLASS_PREFIX.length);\n\t\t}\n\t}\n\n\treturn undefined;\n}\n\nfunction getScopeFormatter(scope: string, theme: HighlightTheme): HighlightFormatter | undefined {\n\tconst exact = theme[scope];\n\tif (exact) {\n\t\treturn exact;\n\t}\n\n\tconst dotIndex = scope.indexOf(\".\");\n\tif (dotIndex !== -1) {\n\t\tconst prefixFormatter = theme[scope.slice(0, dotIndex)];\n\t\tif (prefixFormatter) {\n\t\t\treturn prefixFormatter;\n\t\t}\n\t}\n\n\tconst dashIndex = scope.indexOf(\"-\");\n\tif (dashIndex !== -1) {\n\t\tconst prefixFormatter = theme[scope.slice(0, dashIndex)];\n\t\tif (prefixFormatter) {\n\t\t\treturn prefixFormatter;\n\t\t}\n\t}\n\n\treturn undefined;\n}\n\nfunction getActiveFormatter(scopes: Array<string | undefined>, theme: HighlightTheme): HighlightFormatter | undefined {\n\tfor (let i = scopes.length - 1; i >= 0; i--) {\n\t\tconst scope = scopes[i];\n\t\tif (!scope) {\n\t\t\tcontinue;\n\t\t}\n\t\tconst formatter = getScopeFormatter(scope, theme);\n\t\tif (formatter) {\n\t\t\treturn formatter;\n\t\t}\n\t}\n\treturn theme.default;\n}\n\nfunction isSpanOpenTagStart(html: string, index: number): boolean {\n\tif (!html.startsWith(\"<span\", index)) {\n\t\treturn false;\n\t}\n\tconst nextChar = html[index + \"<span\".length];\n\treturn nextChar === \">\" || nextChar === \" \" || nextChar === \"\\t\" || nextChar === \"\\n\" || nextChar === \"\\r\";\n}\n\nexport function renderHighlightedHtml(html: string, theme: HighlightTheme = {}): string {\n\tlet output = \"\";\n\tlet textBuffer = \"\";\n\tconst scopes: Array<string | undefined> = [];\n\n\tconst flushText = () => {\n\t\tif (!textBuffer) {\n\t\t\treturn;\n\t\t}\n\t\tconst formatter = getActiveFormatter(scopes, theme);\n\t\toutput += formatter ? formatter(textBuffer) : textBuffer;\n\t\ttextBuffer = \"\";\n\t};\n\n\tlet index = 0;\n\twhile (index < html.length) {\n\t\tif (isSpanOpenTagStart(html, index)) {\n\t\t\tconst tagEndIndex = html.indexOf(\">\", index + 5);\n\t\t\tif (tagEndIndex !== -1) {\n\t\t\t\tflushText();\n\t\t\t\tconst tag = html.slice(index, tagEndIndex + 1);\n\t\t\t\tconst scope = getScopeFromSpanTag(tag);\n\t\t\t\tscopes.push(scope);\n\t\t\t\tindex = tagEndIndex + 1;\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t}\n\n\t\tif (html.startsWith(SPAN_CLOSE, index)) {\n\t\t\tflushText();\n\t\t\tif (scopes.length > 0) {\n\t\t\t\tscopes.pop();\n\t\t\t}\n\t\t\tindex += SPAN_CLOSE.length;\n\t\t\tcontinue;\n\t\t}\n\n\t\tif (html[index] === \"&\") {\n\t\t\tconst decoded = decodeHtmlEntityAt(html, index);\n\t\t\tif (decoded) {\n\t\t\t\ttextBuffer += decoded.text;\n\t\t\t\tindex += decoded.length;\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t}\n\n\t\ttextBuffer += html[index];\n\t\tindex++;\n\t}\n\n\tflushText();\n\treturn output;\n}\n\nexport function highlight(code: string, options: HighlightOptions = {}): string {\n\tconst html = options.language\n\t\t? hljs.highlight(code, {\n\t\t\t\tlanguage: options.language,\n\t\t\t\tignoreIllegals: options.ignoreIllegals,\n\t\t\t}).value\n\t\t: hljs.highlightAuto(code, options.languageSubset).value;\n\treturn renderHighlightedHtml(html, options.theme);\n}\n\nexport function supportsLanguage(name: string): boolean {\n\treturn hljs.getLanguage(name) !== undefined;\n}\n"]}
@@ -0,0 +1,8 @@
1
+ /** Split a leading UTF-8 byte order mark from decoded text. */
2
+ export declare function splitBom(content: string): {
3
+ bom: string;
4
+ text: string;
5
+ };
6
+ /** Remove a leading UTF-8 byte order mark from decoded text. */
7
+ export declare function stripBom(content: string): string;
8
+ //# sourceMappingURL=text.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"text.d.ts","sourceRoot":"","sources":["../../src/utils/text.ts"],"names":[],"mappings":"AAAA,+DAA+D;AAC/D,wBAAgB,QAAQ,CAAC,OAAO,EAAE,MAAM,GAAG;IAAE,GAAG,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,CAEvE;AAED,gEAAgE;AAChE,wBAAgB,QAAQ,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAEhD"}
@@ -0,0 +1,9 @@
1
+ /** Split a leading UTF-8 byte order mark from decoded text. */
2
+ export function splitBom(content) {
3
+ return content.startsWith("\uFEFF") ? { bom: "\uFEFF", text: content.slice(1) } : { bom: "", text: content };
4
+ }
5
+ /** Remove a leading UTF-8 byte order mark from decoded text. */
6
+ export function stripBom(content) {
7
+ return splitBom(content).text;
8
+ }
9
+ //# sourceMappingURL=text.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"text.js","sourceRoot":"","sources":["../../src/utils/text.ts"],"names":[],"mappings":"AAAA,+DAA+D;AAC/D,MAAM,UAAU,QAAQ,CAAC,OAAe;IACvC,OAAO,OAAO,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,EAAE,GAAG,EAAE,QAAQ,EAAE,IAAI,EAAE,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,GAAG,EAAE,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;AAC9G,CAAC;AAED,gEAAgE;AAChE,MAAM,UAAU,QAAQ,CAAC,OAAe;IACvC,OAAO,QAAQ,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC;AAC/B,CAAC","sourcesContent":["/** Split a leading UTF-8 byte order mark from decoded text. */\nexport function splitBom(content: string): { bom: string; text: string } {\n\treturn content.startsWith(\"\\uFEFF\") ? { bom: \"\\uFEFF\", text: content.slice(1) } : { bom: \"\", text: content };\n}\n\n/** Remove a leading UTF-8 byte order mark from decoded text. */\nexport function stripBom(content: string): string {\n\treturn splitBom(content).text;\n}\n"]}
@@ -281,9 +281,7 @@ pi.on("session_before_compact", async (event, ctx) => {
281
281
  const { preparation, branchEntries, customInstructions, reason, willRetry, signal } = event;
282
282
 
283
283
  // preparation.messagesToSummarize - messages to summarize
284
- // preparation.sourceMessages - optional active-context history prefix, including any previous summary
285
284
  // preparation.turnPrefixMessages - split turn prefix (if isSplitTurn)
286
- // preparation.turnPrefixSourceMessages - optional active-context prefix through the split turn
287
285
  // preparation.previousSummary - previous compaction summary
288
286
  // preparation.fileOps - extracted file operations
289
287
  // preparation.tokensBefore - context tokens before compaction
@@ -410,12 +410,12 @@ interface OAuthCredentials {
410
410
  For providers with non-standard APIs, implement `streamSimple`. Study the existing provider implementations before writing your own:
411
411
 
412
412
  **Reference implementations:**
413
- - [anthropic.ts](https://github.com/code-yeongyu/senpi/blob/main/packages/ai/src/providers/anthropic.ts) - Anthropic Messages API
414
- - [mistral.ts](https://github.com/code-yeongyu/senpi/blob/main/packages/ai/src/providers/mistral.ts) - Mistral Conversations API
415
- - [openai-completions.ts](https://github.com/code-yeongyu/senpi/blob/main/packages/ai/src/providers/openai-completions.ts) - OpenAI Chat Completions
416
- - [openai-responses.ts](https://github.com/code-yeongyu/senpi/blob/main/packages/ai/src/providers/openai-responses.ts) - OpenAI Responses API
417
- - [google.ts](https://github.com/code-yeongyu/senpi/blob/main/packages/ai/src/providers/google.ts) - Google Generative AI
418
- - [amazon-bedrock.ts](https://github.com/code-yeongyu/senpi/blob/main/packages/ai/src/providers/amazon-bedrock.ts) - AWS Bedrock
413
+ - [anthropic-messages.ts](https://github.com/code-yeongyu/senpi/blob/main/packages/ai/src/api/anthropic-messages.ts) - Anthropic Messages API
414
+ - [mistral-conversations.ts](https://github.com/code-yeongyu/senpi/blob/main/packages/ai/src/api/mistral-conversations.ts) - Mistral Conversations API
415
+ - [openai-completions.ts](https://github.com/code-yeongyu/senpi/blob/main/packages/ai/src/api/openai-completions.ts) - OpenAI Chat Completions
416
+ - [openai-responses.ts](https://github.com/code-yeongyu/senpi/blob/main/packages/ai/src/api/openai-responses.ts) - OpenAI Responses API
417
+ - [google-generative-ai.ts](https://github.com/code-yeongyu/senpi/blob/main/packages/ai/src/api/google-generative-ai.ts) - Google Generative AI
418
+ - [bedrock-converse-stream.ts](https://github.com/code-yeongyu/senpi/blob/main/packages/ai/src/api/bedrock-converse-stream.ts) - AWS Bedrock
419
419
 
420
420
  ### Stream Pattern
421
421
 
@@ -4,7 +4,7 @@ Pi uses environment variables in three ways:
4
4
 
5
5
  - Variables such as `PI_OFFLINE` configure the Pi process.
6
6
  - Pi sets process markers so child processes can identify Pi as the launching agent.
7
- - Commands run by the LLM-callable bash tool receive `PI_*` variables describing the current session.
7
+ - Commands run by the LLM-callable shell tools receive `PI_*` variables describing the current session.
8
8
 
9
9
  Provider API-key variables are documented separately in [Providers](providers.md#environment-variables-or-auth-file).
10
10
 
@@ -17,9 +17,9 @@ The CLI and RPC entry points set two process markers:
17
17
 
18
18
  Child processes inherit both markers. They are not session-specific and are not set automatically when Pi is embedded through the SDK.
19
19
 
20
- ## Bash Tool Session Environment
20
+ ## Shell Tool Session Environment
21
21
 
22
- Commands run by the bash tool receive the current Pi session state:
22
+ Commands run by the `bash` and `powershell` tools receive the current Pi session state:
23
23
 
24
24
  | Variable | Description |
25
25
  |----------|-------------|
@@ -29,7 +29,7 @@ Commands run by the bash tool receive the current Pi session state:
29
29
  | `PI_MODEL` | Currently selected model ID |
30
30
  | `PI_REASONING_LEVEL` | Current effective reasoning level: `off`, `minimal`, `low`, `medium`, `high`, `xhigh`, or `max` |
31
31
 
32
- The values are resolved when each command starts. Switching models or changing the reasoning level therefore affects the next bash command without restarting Pi. `PI_PROVIDER` and `PI_MODEL` identify the selected Pi model, not a different upstream model that a router may choose internally.
32
+ The values are resolved when each command starts. Switching models or changing the reasoning level therefore affects the next shell command without restarting Pi. `PI_PROVIDER` and `PI_MODEL` identify the selected Pi model, not a different upstream model that a router may choose internally.
33
33
 
34
34
  When asked which model or provider is running, inspect these variables instead of inferring the answer from the system prompt:
35
35
 
@@ -46,11 +46,11 @@ if [ -n "$PI_SESSION_FILE" ]; then
46
46
  fi
47
47
  ```
48
48
 
49
- These variables are injected into the LLM-callable bash tool. They are not injected into user-entered `!` or `!!` commands.
49
+ These variables are injected into the LLM-callable `bash` and `powershell` tools. They are not injected into user-entered `!` or `!!` commands.
50
50
 
51
- ### Custom Bash Tools
51
+ ### Custom Shell Tools
52
52
 
53
- Bash tools created with `createBashTool()` expose the session environment by default when registered with Pi. Injection happens before `spawnHook`, so a hook receives the variables in `ctx.env`:
53
+ Tools created with `createBashTool()` or `createPowerShellTool()` expose the session environment by default when registered with Pi. Injection happens before `spawnHook`, so a hook receives the variables in `ctx.env`:
54
54
 
55
55
  ```typescript
56
56
  const bashTool = createBashTool(cwd, {
@@ -64,7 +64,7 @@ const bashTool = createBashTool(cwd, {
64
64
  Disable session metadata independently of the spawn hook:
65
65
 
66
66
  ```typescript
67
- const bashTool = createBashTool(cwd, {
67
+ const powershellTool = createPowerShellTool(cwd, {
68
68
  exposeSessionEnvironment: false,
69
69
  spawnHook: (ctx) => ctx,
70
70
  });
@@ -2358,7 +2358,7 @@ pi.registerTool({
2358
2358
 
2359
2359
  ### Overriding Built-in Tools
2360
2360
 
2361
- Extensions can override built-in tools (`read`, `bash`, `edit`, `write`, `grep`, `find`, `ls`) by registering a tool with the same name. Interactive mode displays a warning when this happens.
2361
+ Extensions can override built-in tools (`read`, `bash`, `powershell`, `edit`, `write`, `grep`, `find`, `ls`) by registering a tool with the same name. Interactive mode displays a warning when this happens.
2362
2362
 
2363
2363
  ```bash
2364
2364
  # Extension's read tool replaces built-in read
@@ -2382,6 +2382,7 @@ See [examples/extensions/tool-override.ts](../examples/extensions/tool-override.
2382
2382
  Built-in tool implementations:
2383
2383
  - [read.ts](https://github.com/earendil-works/pi-mono/blob/main/packages/coding-agent/src/core/tools/read.ts) - `ReadToolDetails`
2384
2384
  - [bash.ts](https://github.com/earendil-works/pi-mono/blob/main/packages/coding-agent/src/core/tools/bash.ts) - `BashToolDetails`
2385
+ - [powershell.ts](https://github.com/earendil-works/pi-mono/blob/main/packages/coding-agent/src/core/tools/powershell.ts) - `PowerShellToolDetails`
2385
2386
  - [edit.ts](https://github.com/earendil-works/pi-mono/blob/main/packages/coding-agent/src/core/tools/edit.ts)
2386
2387
  - [write.ts](https://github.com/earendil-works/pi-mono/blob/main/packages/coding-agent/src/core/tools/write.ts)
2387
2388
  - [grep.ts](https://github.com/earendil-works/pi-mono/blob/main/packages/coding-agent/src/core/tools/grep.ts) - `GrepToolDetails`
@@ -2417,11 +2418,11 @@ pi.registerTool({
2417
2418
  });
2418
2419
  ```
2419
2420
 
2420
- **Operations interfaces:** `ReadOperations`, `WriteOperations`, `EditOperations`, `BashOperations`, `LsOperations`, `GrepOperations`, `FindOperations`
2421
+ **Operations interfaces:** `ReadOperations`, `WriteOperations`, `EditOperations`, `BashOperations`, `PowerShellOperations`, `LsOperations`, `GrepOperations`, `FindOperations`
2421
2422
 
2422
2423
  For `user_bash`, extensions can reuse pi's local shell backend via `createLocalBashOperations()` instead of reimplementing local process spawning, shell resolution, and process-tree termination.
2423
2424
 
2424
- The bash tool also supports a spawn hook to adjust the command, cwd, or env before execution:
2425
+ The `bash` and `powershell` tools also support a spawn hook to adjust the command, cwd, or env before execution:
2425
2426
 
2426
2427
  ```typescript
2427
2428
  import { createBashTool } from "@earendil-works/pi-coding-agent";
@@ -2435,7 +2436,7 @@ const bashTool = createBashTool(cwd, {
2435
2436
  });
2436
2437
  ```
2437
2438
 
2438
- `createBashTool()` exposes the current session to commands through `PI_SESSION_ID`, `PI_SESSION_FILE`, `PI_PROVIDER`, `PI_MODEL`, and `PI_REASONING_LEVEL`. Injection happens before `spawnHook`, so hooks receive these values in `env` and preserve them when they spread the existing environment as above. Set `exposeSessionEnvironment: false` to disable them:
2439
+ `createBashTool()` and `createPowerShellTool()` expose the current session to commands through `PI_SESSION_ID`, `PI_SESSION_FILE`, `PI_PROVIDER`, `PI_MODEL`, and `PI_REASONING_LEVEL`. Injection happens before `spawnHook`, so hooks receive these values in `env` and preserve them when they spread the existing environment as above. Set `exposeSessionEnvironment: false` to disable them:
2439
2440
 
2440
2441
  ```typescript
2441
2442
  const bashTool = createBashTool(cwd, {
@@ -2443,7 +2444,7 @@ const bashTool = createBashTool(cwd, {
2443
2444
  });
2444
2445
  ```
2445
2446
 
2446
- See [Bash tool session environment](environment-variables.md#bash-tool-session-environment) for variable semantics. See [examples/extensions/ssh.ts](../examples/extensions/ssh.ts) for a complete SSH example with `--ssh` flag.
2447
+ See [Shell tool session environment](environment-variables.md#shell-tool-session-environment) for variable semantics. See [examples/extensions/ssh.ts](../examples/extensions/ssh.ts) for a complete SSH example with `--ssh` flag.
2447
2448
 
2448
2449
  ### Output Truncation
2449
2450
 
package/docs/json.md CHANGED
@@ -39,12 +39,16 @@ The wire format strips cumulative snapshots from streaming updates:
39
39
  ```typescript
40
40
  type WithoutPartial<T> = T extends { partial: unknown } ? Omit<T, "partial"> : T;
41
41
 
42
+ type JsonAssistantMessageEvent<T> = T extends { type: "toolcall_start"; partial: unknown }
43
+ ? WithoutPartial<T> & { id: string; toolName: string }
44
+ : WithoutPartial<T>;
45
+
42
46
  type JsonAgentSessionEvent =
43
47
  | Exclude<AgentSessionEvent, { type: "message_update" }>
44
48
  | {
45
49
  type: "message_update";
46
50
  usage: Usage;
47
- assistantMessageEvent: WithoutPartial<AssistantMessageEvent>;
51
+ assistantMessageEvent: JsonAssistantMessageEvent<AssistantMessageEvent>;
48
52
  };
49
53
  ```
50
54
 
@@ -108,7 +112,8 @@ Followed by events as they occur:
108
112
  `assistantMessageEvent.partial` to keep stream size linear. The top-level `usage` field contains
109
113
  the latest cumulative provider-reported usage and may remain zero when a provider only reports
110
114
  usage at completion. Use `contentIndex` and `delta` to assemble live text, thinking, or tool-call
111
- arguments if needed. `message_end` contains the final authoritative message.
115
+ arguments if needed. A `toolcall_start` event also includes the constant-sized `id` and `toolName`
116
+ fields. `message_end` contains the final authoritative message.
112
117
 
113
118
  ## Example
114
119
 
@@ -125,7 +125,7 @@ This routing remains configurable through the ordinary action bindings. For exam
125
125
  | `app.exit` | `ctrl+d` | Exit (when editor empty) |
126
126
  | `app.suspend` | `ctrl+z` (none on Windows) | Suspend to background |
127
127
  | `app.editor.external` | `ctrl+g` | Open in external editor (`externalEditor`, `$VISUAL`, `$EDITOR`, Notepad on Windows, or `nano` elsewhere) |
128
- | `app.clipboard.pasteImage` | `ctrl+v` (`alt+v` on Windows) | Paste image or text from clipboard |
128
+ | `app.clipboard.pasteImage` | `ctrl+v` (`alt+v` on Windows and WSL) | Paste image or text from clipboard |
129
129
  | `app.history.search` | `ctrl+r` | Search prompt history across sessions |
130
130
 
131
131
  ### Sessions
package/docs/packages.md CHANGED
@@ -38,7 +38,7 @@ pi update npm:@foo/bar # update one package
38
38
  pi update --extension npm:@foo/bar
39
39
  ```
40
40
 
41
- These commands manage pi packages and `pi update` can update the pi CLI installation. To uninstall pi itself, see [Quickstart](quickstart.md#uninstall).
41
+ These commands manage pi packages and `pi update` can update the pi CLI installation. For experimental installer-managed installations, `pi update` installs the exact checked version into a staged, lockfile-backed release and activates it only after verification, leaving the current release intact if the update fails. Managed installations do not support `--force`; rerun the installer to repair one. To uninstall pi itself, see [Quickstart](quickstart.md#uninstall).
42
42
 
43
43
  By default, `install` and `remove` write to user settings (`~/.pi/agent/settings.json`). Use `-l` to write to project settings (`.pi/settings.json`) instead. Project settings can be shared with your team, and pi installs any missing packages automatically on startup after the project is trusted.
44
44
 
@@ -130,7 +130,7 @@ Add a `pi` manifest to `package.json` or use conventional directories. Include t
130
130
  }
131
131
  ```
132
132
 
133
- Paths are relative to the package root. Arrays support glob patterns and `!exclusions`.
133
+ Paths are relative to the package root. Arrays support glob patterns and `!exclusions`. Positive manifest globs discover visible paths in lexical order. List dot-prefixed paths directly. If a glob would need to continue through a symlink, list the symlinked resource root directly.
134
134
 
135
135
  ### Gallery Metadata
136
136
 
package/docs/rpc.md CHANGED
@@ -211,6 +211,29 @@ Response:
211
211
  {"type": "response", "command": "abort", "success": true}
212
212
  ```
213
213
 
214
+ #### clear_queue
215
+
216
+ Remove queued steering and follow-up messages and return their text.
217
+
218
+ ```json
219
+ {"type": "clear_queue"}
220
+ ```
221
+
222
+ Response:
223
+ ```json
224
+ {
225
+ "type": "response",
226
+ "command": "clear_queue",
227
+ "success": true,
228
+ "data": {
229
+ "steering": ["Change direction"],
230
+ "followUp": ["Summarize when finished"]
231
+ }
232
+ }
233
+ ```
234
+
235
+ To implement interactive Esc behavior, send `clear_queue` before `abort`, then restore the returned text in the client editor. `abort` continues queued messages when they remain in the session.
236
+
214
237
  #### new_session
215
238
 
216
239
  Start a fresh session. Can be cancelled by a `session_before_switch` extension event handler.
@@ -1246,7 +1269,7 @@ The `assistantMessageEvent` field contains one of these delta types:
1246
1269
  | `thinking_start` | Thinking block started |
1247
1270
  | `thinking_delta` | Thinking content chunk |
1248
1271
  | `thinking_end` | Thinking block ended |
1249
- | `toolcall_start` | Tool call started |
1272
+ | `toolcall_start` | Tool call started (includes `id` and `toolName`) |
1250
1273
  | `toolcall_delta` | Tool call arguments chunk |
1251
1274
  | `toolcall_end` | Tool call ended (includes full `toolCall` object) |
1252
1275
 
@@ -1261,11 +1284,17 @@ Example streaming a text response:
1261
1284
  The top-level `usage` field contains the latest cumulative provider-reported usage. It may remain
1262
1285
  zero until completion when a provider does not report usage during streaming.
1263
1286
 
1287
+ Example starting a tool call:
1288
+ ```json
1289
+ {"type":"message_update","usage":{...},"assistantMessageEvent":{"type":"toolcall_start","contentIndex":1,"id":"call_abc123","toolName":"write"}}
1290
+ ```
1291
+
1264
1292
  `message_update` intentionally omits the former cumulative `message` field and
1265
1293
  `assistantMessageEvent.partial`. Clients that need a live partial message must assemble it
1266
1294
  from `message_start` and subsequent events using `contentIndex`. Treat `message_end.message`
1267
- as authoritative. For tool calls, buffer `toolcall_delta.delta`; `toolcall_end.toolCall`
1268
- contains the completed call.
1295
+ as authoritative. For tool calls, `toolcall_start` provides the call `id` and `toolName`;
1296
+ buffer `toolcall_delta.delta` for arguments. `toolcall_end.toolCall` contains the completed
1297
+ call.
1269
1298
 
1270
1299
  ### bash_execution_update
1271
1300
 
package/docs/sdk.md CHANGED
@@ -519,7 +519,7 @@ const { session } = await createAgentSession({ resourceLoader: loader });
519
519
 
520
520
  Specify which built-in tools to enable:
521
521
 
522
- - Built-in tool names: `read`, `bash`, `edit`, `write`, `grep`, `find`, `ls`
522
+ - Built-in tool names: `read`, `bash`, `powershell`, `edit`, `write`, `grep`, `find`, `ls`
523
523
  - Default built-ins: `read`, `bash`, `edit`, `write`
524
524
  - `noTools: "all"` disables all tools
525
525
  - `noTools: "builtin"` disables default built-ins while keeping extension and custom tools enabled
@@ -540,6 +540,11 @@ const { session } = await createAgentSession({
540
540
  tools: ["read", "bash", "grep"],
541
541
  });
542
542
 
543
+ // Use PowerShell instead of Bash on Windows
544
+ const { session } = await createAgentSession({
545
+ tools: ["read", "powershell", "edit", "write"],
546
+ });
547
+
543
548
  // Disable one tool while keeping the rest available
544
549
  const { session } = await createAgentSession({
545
550
  excludeTools: ["ask_question"],
@@ -1196,7 +1201,7 @@ SettingsManager
1196
1201
  // Tool factories
1197
1202
  createCodingTools
1198
1203
  createReadOnlyTools
1199
- createReadTool, createBashTool, createEditTool, createWriteTool
1204
+ createReadTool, createBashTool, createPowerShellTool, createEditTool, createWriteTool
1200
1205
  createGrepTool, createFindTool, createLsTool
1201
1206
 
1202
1207
  // Types