@claudiolabs/claudin 1.1.25 → 1.1.26

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 (910) hide show
  1. package/dist/chunks/AgentTool-1.1.26-pww3rzse.mjs +1 -0
  2. package/dist/chunks/App-1.1.26-4vaezrz4.mjs +1 -0
  3. package/dist/chunks/ApproveApiKey-1.1.26-rngrjmp0.mjs +1 -0
  4. package/dist/chunks/AssistantSessionChooser-1.1.26-n2977m3p.mjs +1 -0
  5. package/dist/chunks/AutoModeOptInDialog-1.1.26-9y3h164v.mjs +1 -0
  6. package/dist/chunks/BypassPermissionsModeDialog-1.1.26-qzf3wf2e.mjs +1 -0
  7. package/dist/chunks/ClaudeMdExternalIncludesDialog-1.1.26-4rsh36df.mjs +1 -0
  8. package/dist/chunks/ConsoleOAuthFlow-1.1.26-g1kknwq5.mjs +1 -0
  9. package/dist/chunks/DiffDialog-1.1.26-4bt5rf4c.mjs +6 -0
  10. package/dist/chunks/Doctor-1.1.26-jnzpfe2z.mjs +1 -0
  11. package/dist/chunks/ExplorerDialog-1.1.26-h4ha2k3s.mjs +6 -0
  12. package/dist/chunks/ITermBackend-1.1.26-6vq713nq.mjs +1 -0
  13. package/dist/chunks/InvalidConfigDialog-1.1.26-5mpbyw8j.mjs +1 -0
  14. package/dist/chunks/InvalidSettingsDialog-1.1.26-y240kr8g.mjs +1 -0
  15. package/dist/chunks/MigrationDialog-1.1.26-bhdbn3pv.mjs +1 -0
  16. package/dist/chunks/Onboarding-1.1.26-v8am83rd.mjs +1 -0
  17. package/dist/chunks/ProviderManager-1.1.26-22a8rbdy.mjs +1 -0
  18. package/dist/chunks/REPL-1.1.26-z72g0j0z.mjs +1 -0
  19. package/dist/chunks/ResumeConversation-1.1.26-gh9s3rjn.mjs +1 -0
  20. package/dist/chunks/SnapshotUpdateDialog-1.1.26-r40qtar2.mjs +1 -0
  21. package/dist/chunks/TeleportProgress-1.1.26-23se9f85.mjs +1 -0
  22. package/dist/chunks/TeleportRepoMismatchDialog-1.1.26-7r52d8rv.mjs +1 -0
  23. package/dist/chunks/TeleportResumeWrapper-1.1.26-k6atzshz.mjs +1 -0
  24. package/dist/chunks/TmuxBackend-1.1.26-ym3spr0b.mjs +9 -0
  25. package/dist/chunks/ToolSearchTool-1.1.26-c332beft.mjs +1 -0
  26. package/dist/chunks/TrustDialog-1.1.26-sqqx0vck.mjs +1 -0
  27. package/dist/chunks/activeProvider-1.1.26-maqce1gv.mjs +1 -0
  28. package/dist/chunks/add-dir-1.1.26-qcws8kjg.mjs +1 -0
  29. package/dist/chunks/agentTypes-1.1.26-fw01kwc9.mjs +1 -0
  30. package/dist/chunks/agents-1.1.26-dasaamxr.mjs +3 -0
  31. package/dist/chunks/agents-1.1.26-p33pq694.mjs +110 -0
  32. package/dist/chunks/api-1.1.26-msb1jnzq.mjs +1 -0
  33. package/dist/chunks/asciicast-1.1.26-vf9e0v5b.mjs +1 -0
  34. package/dist/chunks/assistant-1.1.26-h2aycjkn.mjs +1 -0
  35. package/dist/chunks/auth-1.1.26-dk7wnv7t.mjs +1 -0
  36. package/dist/chunks/auth-1.1.26-q8xgzm5r.mjs +1 -0
  37. package/dist/chunks/autoMode-1.1.26-zrzav382.mjs +52 -0
  38. package/dist/chunks/autoModeSetup-1.1.26-x7k5ammk.mjs +44 -0
  39. package/dist/chunks/autoUpdater-1.1.26-6hmytwm6.mjs +1 -0
  40. package/dist/chunks/backgroundHousekeeping-1.1.26-09grqe05.mjs +1 -0
  41. package/dist/chunks/branch-1.1.26-e1qfc78k.mjs +4 -0
  42. package/dist/chunks/bridge-1.1.26-h1bxacst.mjs +2 -0
  43. package/dist/chunks/bridgeConfig-1.1.26-vpz1r911.mjs +1 -0
  44. package/dist/chunks/bridgeEnabled-1.1.26-xkeegvk7.mjs +1 -0
  45. package/dist/chunks/bridgeMain-1.1.26-dnv31x02.mjs +88 -0
  46. package/dist/chunks/bridgePointer-1.1.26-d2zjebn5.mjs +1 -0
  47. package/dist/chunks/btw-1.1.26-9hcjg1vm.mjs +1 -0
  48. package/dist/chunks/buddy-1.1.26-20xpa564.mjs +3 -0
  49. package/dist/chunks/cache-probe-1.1.26-p18jjck5.mjs +21 -0
  50. package/dist/chunks/cacheStats-1.1.26-tndvbhbh.mjs +4 -0
  51. package/dist/chunks/caches-1.1.26-g9aneehb.mjs +1 -0
  52. package/dist/chunks/cd-1.1.26-1mhwbmvw.mjs +3 -0
  53. package/dist/chunks/claudeDesktop-1.1.26-8970gddx.mjs +1 -0
  54. package/dist/chunks/claudemd-1.1.26-a0wvdz6h.mjs +1 -0
  55. package/dist/chunks/clear-1.1.26-8f7hbzks.mjs +1 -0
  56. package/dist/chunks/clearTerminal-1.1.26-yxrgchg6.mjs +1 -0
  57. package/dist/chunks/cli-1.1.26-01erqdx7.mjs +6 -0
  58. package/dist/chunks/cli-1.1.26-0qa3rcd8.mjs +6 -0
  59. package/dist/chunks/cli-1.1.26-132vkvj1.mjs +2 -0
  60. package/dist/chunks/cli-1.1.26-14kc3afb.mjs +3 -0
  61. package/dist/chunks/cli-1.1.26-14n169e4.mjs +2 -0
  62. package/dist/chunks/cli-1.1.26-16s9pjdh.mjs +2 -0
  63. package/dist/chunks/cli-1.1.26-1mbz2mcm.mjs +2 -0
  64. package/dist/chunks/cli-1.1.26-1v8jg7nn.mjs +2 -0
  65. package/dist/chunks/cli-1.1.26-1vdqjs9c.mjs +21 -0
  66. package/dist/chunks/cli-1.1.26-1ze7r6x4.mjs +24 -0
  67. package/dist/chunks/cli-1.1.26-28qe790b.mjs +2 -0
  68. package/dist/chunks/cli-1.1.26-2dzytde4.mjs +2 -0
  69. package/dist/chunks/cli-1.1.26-2fbt2m4z.mjs +4 -0
  70. package/dist/chunks/cli-1.1.26-2j0g9z56.mjs +2 -0
  71. package/dist/chunks/cli-1.1.26-2k53vhr6.mjs +2 -0
  72. package/dist/chunks/cli-1.1.26-2msjf68r.mjs +2 -0
  73. package/dist/chunks/cli-1.1.26-2s2gpj0g.mjs +2 -0
  74. package/dist/chunks/cli-1.1.26-31negda3.mjs +2 -0
  75. package/dist/chunks/cli-1.1.26-32vewh62.mjs +6 -0
  76. package/dist/chunks/cli-1.1.26-38m8cha0.mjs +2 -0
  77. package/dist/chunks/cli-1.1.26-3c44vscp.mjs +2 -0
  78. package/dist/chunks/cli-1.1.26-3gepexgn.mjs +66 -0
  79. package/dist/chunks/cli-1.1.26-3hemew00.mjs +3 -0
  80. package/dist/chunks/cli-1.1.26-3htpgh4y.mjs +2 -0
  81. package/dist/chunks/cli-1.1.26-3k8e9a3k.mjs +2 -0
  82. package/dist/chunks/cli-1.1.26-3p2ch222.mjs +2 -0
  83. package/dist/chunks/cli-1.1.26-3z39qjr1.mjs +24 -0
  84. package/dist/chunks/cli-1.1.26-4aztw2ex.mjs +2 -0
  85. package/dist/chunks/cli-1.1.26-4cj6rr02.mjs +2 -0
  86. package/dist/chunks/cli-1.1.26-4jbtcb3c.mjs +17 -0
  87. package/dist/chunks/cli-1.1.26-4jn0r6an.mjs +2 -0
  88. package/dist/chunks/cli-1.1.26-516p6zzp.mjs +2 -0
  89. package/dist/chunks/cli-1.1.26-55ayan24.mjs +133 -0
  90. package/dist/chunks/cli-1.1.26-5fv3wdye.mjs +2 -0
  91. package/dist/chunks/cli-1.1.26-5p6865dd.mjs +2 -0
  92. package/dist/chunks/cli-1.1.26-6ac72fwz.mjs +5 -0
  93. package/dist/chunks/cli-1.1.26-6c5rgjbj.mjs +2 -0
  94. package/dist/chunks/cli-1.1.26-6p5bpbzy.mjs +2 -0
  95. package/dist/chunks/cli-1.1.26-6qzbf8mr.mjs +3 -0
  96. package/dist/chunks/cli-1.1.26-6v5e8fy8.mjs +2 -0
  97. package/dist/chunks/cli-1.1.26-73s95190.mjs +4 -0
  98. package/dist/chunks/cli-1.1.26-79g0hfrb.mjs +4 -0
  99. package/dist/chunks/cli-1.1.26-79j24jxp.mjs +2 -0
  100. package/dist/chunks/cli-1.1.26-7h1213xq.mjs +1 -0
  101. package/dist/chunks/cli-1.1.26-7pa47kxq.mjs +2 -0
  102. package/dist/chunks/cli-1.1.26-7ssnr221.mjs +4 -0
  103. package/dist/chunks/cli-1.1.26-851khk0n.mjs +2 -0
  104. package/dist/chunks/cli-1.1.26-89reg5gc.mjs +2 -0
  105. package/dist/chunks/cli-1.1.26-8h5tr358.mjs +2 -0
  106. package/dist/chunks/cli-1.1.26-8vq4pfa8.mjs +2 -0
  107. package/dist/chunks/cli-1.1.26-8wng8tbf.mjs +2 -0
  108. package/dist/chunks/cli-1.1.26-945rz3ns.mjs +2 -0
  109. package/dist/chunks/cli-1.1.26-97w71raz.mjs +2 -0
  110. package/dist/chunks/cli-1.1.26-9kzdvxzw.mjs +2 -0
  111. package/dist/chunks/cli-1.1.26-9mg6k159.mjs +2 -0
  112. package/dist/chunks/cli-1.1.26-9x90xrtz.mjs +2 -0
  113. package/dist/chunks/cli-1.1.26-ab2xbv4t.mjs +2 -0
  114. package/dist/chunks/cli-1.1.26-abp7zq8a.mjs +7 -0
  115. package/dist/chunks/cli-1.1.26-agrrdhst.mjs +12 -0
  116. package/dist/chunks/cli-1.1.26-aj61ygn7.mjs +2 -0
  117. package/dist/chunks/cli-1.1.26-arx4za97.mjs +2 -0
  118. package/dist/chunks/cli-1.1.26-avyt487s.mjs +4 -0
  119. package/dist/chunks/cli-1.1.26-b3m57q7j.mjs +24 -0
  120. package/dist/chunks/cli-1.1.26-b5xvjyj6.mjs +2 -0
  121. package/dist/chunks/cli-1.1.26-bc7nnmyt.mjs +4 -0
  122. package/dist/chunks/cli-1.1.26-bmzjvqhh.mjs +2 -0
  123. package/dist/chunks/cli-1.1.26-bs6j2409.mjs +2 -0
  124. package/dist/chunks/cli-1.1.26-bv6bd469.mjs +2 -0
  125. package/dist/chunks/cli-1.1.26-c1s0antn.mjs +2 -0
  126. package/dist/chunks/cli-1.1.26-c9m56qw1.mjs +4 -0
  127. package/dist/chunks/cli-1.1.26-cdkkrgj3.mjs +6 -0
  128. package/dist/chunks/cli-1.1.26-chwpygff.mjs +2 -0
  129. package/dist/chunks/cli-1.1.26-cmeam5fv.mjs +4 -0
  130. package/dist/chunks/cli-1.1.26-crwbhf2k.mjs +2 -0
  131. package/dist/chunks/cli-1.1.26-d6m0sag3.mjs +2 -0
  132. package/dist/chunks/cli-1.1.26-dq31hqw9.mjs +2 -0
  133. package/dist/chunks/cli-1.1.26-dyyg0r9f.mjs +2 -0
  134. package/dist/chunks/cli-1.1.26-e807ek7h.mjs +3 -0
  135. package/dist/chunks/cli-1.1.26-e8stbnjk.mjs +2 -0
  136. package/dist/chunks/cli-1.1.26-eb90p21t.mjs +10 -0
  137. package/dist/chunks/cli-1.1.26-edg965cj.mjs +2 -0
  138. package/dist/chunks/cli-1.1.26-etwfcg1g.mjs +2 -0
  139. package/dist/chunks/cli-1.1.26-exd0gw3b.mjs +3 -0
  140. package/dist/chunks/cli-1.1.26-f0cvk9rp.mjs +3 -0
  141. package/dist/chunks/cli-1.1.26-f624n21e.mjs +2 -0
  142. package/dist/chunks/cli-1.1.26-fcnssbje.mjs +2 -0
  143. package/dist/chunks/cli-1.1.26-ft1bty40.mjs +45 -0
  144. package/dist/chunks/cli-1.1.26-g0jbhnrw.mjs +3 -0
  145. package/dist/chunks/cli-1.1.26-g1a27741.mjs +3 -0
  146. package/dist/chunks/cli-1.1.26-g3eqp15d.mjs +2 -0
  147. package/dist/chunks/cli-1.1.26-g54bqv9d.mjs +2 -0
  148. package/dist/chunks/cli-1.1.26-g825efx8.mjs +3 -0
  149. package/dist/chunks/cli-1.1.26-grerq74y.mjs +4 -0
  150. package/dist/chunks/cli-1.1.26-gt65gs27.mjs +2 -0
  151. package/dist/chunks/cli-1.1.26-h2bzv8a9.mjs +2 -0
  152. package/dist/chunks/cli-1.1.26-h8pwf3e5.mjs +34 -0
  153. package/dist/chunks/cli-1.1.26-hc0z3th3.mjs +2 -0
  154. package/dist/chunks/cli-1.1.26-hgr89jmg.mjs +2 -0
  155. package/dist/chunks/cli-1.1.26-hk66nk4j.mjs +2 -0
  156. package/dist/chunks/cli-1.1.26-hkn2maax.mjs +12 -0
  157. package/dist/chunks/cli-1.1.26-hwb66n0d.mjs +20 -0
  158. package/dist/chunks/cli-1.1.26-hxty6b5t.mjs +24 -0
  159. package/dist/chunks/cli-1.1.26-j0ggtb42.mjs +2 -0
  160. package/dist/chunks/cli-1.1.26-j0pfn318.mjs +2 -0
  161. package/dist/chunks/cli-1.1.26-j3g54xq9.mjs +25 -0
  162. package/dist/chunks/cli-1.1.26-j522h2zj.mjs +2 -0
  163. package/dist/chunks/cli-1.1.26-j5jzf8nr.mjs +2 -0
  164. package/dist/chunks/cli-1.1.26-jaq75h39.mjs +2 -0
  165. package/dist/chunks/cli-1.1.26-jcshhf4v.mjs +2 -0
  166. package/dist/chunks/cli-1.1.26-jp74zrnt.mjs +2 -0
  167. package/dist/chunks/cli-1.1.26-jstehae2.mjs +25 -0
  168. package/dist/chunks/cli-1.1.26-jv1escq9.mjs +9 -0
  169. package/dist/chunks/cli-1.1.26-jz95bmqy.mjs +2 -0
  170. package/dist/chunks/cli-1.1.26-k287xjcs.mjs +2 -0
  171. package/dist/chunks/cli-1.1.26-k827q3s7.mjs +2 -0
  172. package/dist/chunks/cli-1.1.26-kb5qx4tp.mjs +15 -0
  173. package/dist/chunks/cli-1.1.26-kk4ymgvj.mjs +2 -0
  174. package/dist/chunks/cli-1.1.26-kmpjjneg.mjs +50 -0
  175. package/dist/chunks/cli-1.1.26-krj2sk8f.mjs +2 -0
  176. package/dist/chunks/cli-1.1.26-ktfnpsqn.mjs +2 -0
  177. package/dist/chunks/cli-1.1.26-kvt0v6vq.mjs +5459 -0
  178. package/dist/chunks/cli-1.1.26-kvy3vgrt.mjs +20 -0
  179. package/dist/chunks/cli-1.1.26-kz0et72d.mjs +2 -0
  180. package/dist/chunks/cli-1.1.26-m2ajjr1n.mjs +2 -0
  181. package/dist/chunks/cli-1.1.26-m3gpc1yq.mjs +6 -0
  182. package/dist/chunks/cli-1.1.26-m8mebydd.mjs +3 -0
  183. package/dist/chunks/cli-1.1.26-mb749hsh.mjs +2 -0
  184. package/dist/chunks/cli-1.1.26-mdtsa5pq.mjs +2 -0
  185. package/dist/chunks/cli-1.1.26-mvjefec1.mjs +206 -0
  186. package/dist/chunks/cli-1.1.26-n0thzakv.mjs +2 -0
  187. package/dist/chunks/cli-1.1.26-n43rh2dq.mjs +2 -0
  188. package/dist/chunks/cli-1.1.26-nbkw9wa7.mjs +2 -0
  189. package/dist/chunks/cli-1.1.26-nkp41vem.mjs +2 -0
  190. package/dist/chunks/cli-1.1.26-np0se5jr.mjs +2 -0
  191. package/dist/chunks/cli-1.1.26-nr4x1ay3.mjs +6 -0
  192. package/dist/chunks/cli-1.1.26-nv2mgz6h.mjs +60 -0
  193. package/dist/chunks/cli-1.1.26-p2gpyynf.mjs +2 -0
  194. package/dist/chunks/cli-1.1.26-pdpvbn6t.mjs +2 -0
  195. package/dist/chunks/cli-1.1.26-pejnbqtd.mjs +2 -0
  196. package/dist/chunks/cli-1.1.26-pf85an2q.mjs +2 -0
  197. package/dist/chunks/cli-1.1.26-phdsw9kw.mjs +2 -0
  198. package/dist/chunks/cli-1.1.26-pp0zr4bw.mjs +39 -0
  199. package/dist/chunks/cli-1.1.26-pttfqxxh.mjs +2 -0
  200. package/dist/chunks/cli-1.1.26-pttr45sa.mjs +2 -0
  201. package/dist/chunks/cli-1.1.26-pzpydjmr.mjs +2 -0
  202. package/dist/chunks/cli-1.1.26-q4vaz10d.mjs +2 -0
  203. package/dist/chunks/cli-1.1.26-q77fmxtz.mjs +2 -0
  204. package/dist/chunks/cli-1.1.26-q9msymy9.mjs +7 -0
  205. package/dist/chunks/cli-1.1.26-qf02kggq.mjs +2 -0
  206. package/dist/chunks/cli-1.1.26-qr2ee3t2.mjs +2 -0
  207. package/dist/chunks/cli-1.1.26-qw49rw3y.mjs +17 -0
  208. package/dist/chunks/cli-1.1.26-qymrzn5k.mjs +2 -0
  209. package/dist/chunks/cli-1.1.26-r4ewzysx.mjs +3 -0
  210. package/dist/chunks/cli-1.1.26-rbxsj403.mjs +8 -0
  211. package/dist/chunks/cli-1.1.26-rgz7nebj.mjs +2 -0
  212. package/dist/chunks/cli-1.1.26-rkdk0vdh.mjs +2 -0
  213. package/dist/chunks/cli-1.1.26-rpd6k1rg.mjs +2 -0
  214. package/dist/chunks/cli-1.1.26-rr47cs5n.mjs +2 -0
  215. package/dist/chunks/cli-1.1.26-rrq5hxxh.mjs +9 -0
  216. package/dist/chunks/cli-1.1.26-rtk9fw0k.mjs +2 -0
  217. package/dist/chunks/cli-1.1.26-rzrs3g9w.mjs +2 -0
  218. package/dist/chunks/cli-1.1.26-sfz2mk5a.mjs +15 -0
  219. package/dist/chunks/cli-1.1.26-snnmp5qx.mjs +2 -0
  220. package/dist/chunks/cli-1.1.26-ssxrwqk2.mjs +2 -0
  221. package/dist/chunks/cli-1.1.26-swdk2n55.mjs +2 -0
  222. package/dist/chunks/cli-1.1.26-sx40y42s.mjs +2 -0
  223. package/dist/chunks/cli-1.1.26-syjzv1v1.mjs +18 -0
  224. package/dist/chunks/cli-1.1.26-t05x8de5.mjs +2 -0
  225. package/dist/chunks/cli-1.1.26-ta82bxzt.mjs +3 -0
  226. package/dist/chunks/cli-1.1.26-tcbtd5f6.mjs +2 -0
  227. package/dist/chunks/cli-1.1.26-tgtv1jp3.mjs +16 -0
  228. package/dist/chunks/cli-1.1.26-thxyzhdj.mjs +42 -0
  229. package/dist/chunks/cli-1.1.26-txmxmpj4.mjs +2 -0
  230. package/dist/chunks/cli-1.1.26-tyvfnyw1.mjs +2 -0
  231. package/dist/chunks/cli-1.1.26-v0vv0v6c.mjs +58 -0
  232. package/dist/chunks/cli-1.1.26-v440gznh.mjs +3 -0
  233. package/dist/chunks/cli-1.1.26-v6fnwae1.mjs +2 -0
  234. package/dist/chunks/cli-1.1.26-v7k7gw6h.mjs +2 -0
  235. package/dist/chunks/cli-1.1.26-vb3pa5k9.mjs +2 -0
  236. package/dist/chunks/cli-1.1.26-vne421we.mjs +133 -0
  237. package/dist/chunks/cli-1.1.26-vpdrb404.mjs +2 -0
  238. package/dist/chunks/cli-1.1.26-vxzeagvf.mjs +2 -0
  239. package/dist/chunks/cli-1.1.26-vypd5zf6.mjs +5 -0
  240. package/dist/chunks/cli-1.1.26-w94mate8.mjs +2 -0
  241. package/dist/chunks/cli-1.1.26-w9hym0b4.mjs +2 -0
  242. package/dist/chunks/cli-1.1.26-wy5w6zkt.mjs +2 -0
  243. package/dist/chunks/cli-1.1.26-x64s4kth.mjs +2 -0
  244. package/dist/chunks/cli-1.1.26-x82tpywr.mjs +2 -0
  245. package/dist/chunks/cli-1.1.26-xdcmgkcr.mjs +15 -0
  246. package/dist/chunks/cli-1.1.26-xkj6kd3c.mjs +2 -0
  247. package/dist/chunks/cli-1.1.26-xnqas0g4.mjs +2 -0
  248. package/dist/chunks/cli-1.1.26-xrb5tnj3.mjs +2 -0
  249. package/dist/chunks/cli-1.1.26-xrqbcbv5.mjs +2 -0
  250. package/dist/chunks/cli-1.1.26-xspr3ymb.mjs +2 -0
  251. package/dist/chunks/cli-1.1.26-xwryqq86.mjs +2 -0
  252. package/dist/chunks/cli-1.1.26-xzbv3dzb.mjs +2 -0
  253. package/dist/chunks/cli-1.1.26-y82xxzhw.mjs +2 -0
  254. package/dist/chunks/cli-1.1.26-yz9ks5m0.mjs +2 -0
  255. package/dist/chunks/cli-1.1.26-z2cjynpf.mjs +2 -0
  256. package/dist/chunks/cli-1.1.26-z5qgpexv.mjs +3 -0
  257. package/dist/chunks/cli-1.1.26-zb5hq3ry.mjs +2 -0
  258. package/dist/chunks/cli-1.1.26-zsf06fnj.mjs +2 -0
  259. package/dist/chunks/cli-1.1.26-zy2fcj67.mjs +2 -0
  260. package/dist/chunks/cli-1.1.26-zyt75y9a.mjs +2 -0
  261. package/dist/chunks/client-1.1.26-5m13dtqt.mjs +1 -0
  262. package/dist/chunks/color-1.1.26-hc4gee57.mjs +1 -0
  263. package/dist/chunks/compact-1.1.26-k29q801r.mjs +3 -0
  264. package/dist/chunks/config-1.1.26-20jye461.mjs +1 -0
  265. package/dist/chunks/config-1.1.26-f3tsx9mm.mjs +1 -0
  266. package/dist/chunks/constants-1.1.26-vyt7y0vq.mjs +1 -0
  267. package/dist/chunks/context-1.1.26-xg3zeq1z.mjs +1 -0
  268. package/dist/chunks/context-noninteractive-1.1.26-n05p37yd.mjs +1 -0
  269. package/dist/chunks/conversation-1.1.26-g9vfc7p7.mjs +1 -0
  270. package/dist/chunks/copilotHeaders-1.1.26-gr7hc6j5.mjs +1 -0
  271. package/dist/chunks/copy-1.1.26-t50s90xg.mjs +9 -0
  272. package/dist/chunks/cost-1.1.26-9hp3110j.mjs +1 -0
  273. package/dist/chunks/createSSHSession-1.1.26-hpzpfpqk.mjs +1 -0
  274. package/dist/chunks/createSession-1.1.26-4mxab0d8.mjs +1 -0
  275. package/dist/chunks/debug-1.1.26-m7p7fchf.mjs +1 -0
  276. package/dist/chunks/defaultActionDeps-1.1.26-0fr1vrkt.mjs +1534 -0
  277. package/dist/chunks/desktop-1.1.26-1qjp6a2c.mjs +1 -0
  278. package/dist/chunks/detectRepository-1.1.26-pmahtt3f.mjs +1 -0
  279. package/dist/chunks/detection-1.1.26-1wrkcwrj.mjs +1 -0
  280. package/dist/chunks/diff-1.1.26-c4nqg8fb.mjs +1 -0
  281. package/dist/chunks/doctor-1.1.26-0jtnwy0r.mjs +1 -0
  282. package/dist/chunks/doctorDiagnostic-1.1.26-x38xj5dq.mjs +1 -0
  283. package/dist/chunks/earlyInput-1.1.26-gp0650zq.mjs +1 -0
  284. package/dist/chunks/effort-1.1.26-8w1e6q0y.mjs +13 -0
  285. package/dist/chunks/engine-1.1.26-jt09gh12.mjs +1 -0
  286. package/dist/chunks/envLessBridgeConfig-1.1.26-p0x7avh5.mjs +1 -0
  287. package/dist/chunks/envUtils-1.1.26-p89sr6v4.mjs +1 -0
  288. package/dist/chunks/environmentSelection-1.1.26-d8vnmed1.mjs +1 -0
  289. package/dist/chunks/environments-1.1.26-fz5c214j.mjs +1 -0
  290. package/dist/chunks/errors-1.1.26-6bzb64g6.mjs +1 -0
  291. package/dist/chunks/exampleCommands-1.1.26-s4bn18p7.mjs +1 -0
  292. package/dist/chunks/execFileNoThrow-1.1.26-xh0x0cbp.mjs +1 -0
  293. package/dist/chunks/exit-1.1.26-55716s6k.mjs +1 -0
  294. package/dist/chunks/explorer-1.1.26-969pqrwa.mjs +1 -0
  295. package/dist/chunks/export-1.1.26-mgccr0ea.mjs +2 -0
  296. package/dist/chunks/extra-usage-1.1.26-sbe56spy.mjs +1 -0
  297. package/dist/chunks/extra-usage-noninteractive-1.1.26-h08e3n8t.mjs +1 -0
  298. package/dist/chunks/fast-1.1.26-rbaqsfka.mjs +1 -0
  299. package/dist/chunks/feedback-1.1.26-2m81mwds.mjs +14 -0
  300. package/dist/chunks/firstPartyEventLogger-1.1.26-ckqh8nb4.mjs +1 -0
  301. package/dist/chunks/git-1.1.26-0he7ww02.mjs +1 -0
  302. package/dist/chunks/githubModelsCredentials-1.1.26-xj1mdstq.mjs +1 -0
  303. package/dist/chunks/goal-1.1.26-n5s850gv.mjs +4 -0
  304. package/dist/chunks/growthbook-1.1.26-ka05jsbm.mjs +1 -0
  305. package/dist/chunks/headless-1.1.26-q9en6pe9.mjs +2 -0
  306. package/dist/chunks/heapdump-1.1.26-7ewvqmvf.mjs +6 -0
  307. package/dist/chunks/help-1.1.26-brf53t1m.mjs +1 -0
  308. package/dist/chunks/hookChains-1.1.26-rkf6y8rc.mjs +3 -0
  309. package/dist/chunks/hooks-1.1.26-9pdav42n.mjs +1 -0
  310. package/dist/chunks/hooks-1.1.26-szkj02ez.mjs +79 -0
  311. package/dist/chunks/ide-1.1.26-m5p57hjq.mjs +3 -0
  312. package/dist/chunks/image-processor-napi-1.1.26-rekvc35q.mjs +1 -0
  313. package/dist/chunks/import-1.1.26-7gbx5jy9.mjs +261 -0
  314. package/dist/chunks/inboundAttachments-1.1.26-tzg5nege.mjs +1 -0
  315. package/dist/chunks/index-1.1.26-1xcc10z3.mjs +1 -0
  316. package/dist/chunks/index-1.1.26-46seym0e.mjs +1 -0
  317. package/dist/chunks/index-1.1.26-4qsakkwp.mjs +1 -0
  318. package/dist/chunks/index-1.1.26-62wb3t76.mjs +5 -0
  319. package/dist/chunks/index-1.1.26-7dq7zd2s.mjs +2 -0
  320. package/dist/chunks/index-1.1.26-924a690m.mjs +1 -0
  321. package/dist/chunks/index-1.1.26-9hqzzjph.mjs +1 -0
  322. package/dist/chunks/index-1.1.26-bmzaqft1.mjs +1 -0
  323. package/dist/chunks/index-1.1.26-cpb34jqj.mjs +9 -0
  324. package/dist/chunks/index-1.1.26-cpx6j4xt.mjs +1 -0
  325. package/dist/chunks/index-1.1.26-gyna59qe.mjs +1 -0
  326. package/dist/chunks/index-1.1.26-h45zww68.mjs +30 -0
  327. package/dist/chunks/index-1.1.26-matsx1ed.mjs +1 -0
  328. package/dist/chunks/index-1.1.26-pm334xks.mjs +1 -0
  329. package/dist/chunks/index-1.1.26-qrbfj1zz.mjs +1 -0
  330. package/dist/chunks/index-1.1.26-sh5v696c.mjs +1 -0
  331. package/dist/chunks/index-1.1.26-srjepzh3.mjs +2 -0
  332. package/dist/chunks/index-1.1.26-syyhrh9b.mjs +23 -0
  333. package/dist/chunks/index-1.1.26-te4885d9.mjs +1 -0
  334. package/dist/chunks/index-1.1.26-tyjd8na6.mjs +1 -0
  335. package/dist/chunks/index-1.1.26-vk1z10tp.mjs +1 -0
  336. package/dist/chunks/index-1.1.26-vpyv4546.mjs +9 -0
  337. package/dist/chunks/index-1.1.26-xc6bagza.mjs +1 -0
  338. package/dist/chunks/init-1.1.26-bnpznn1w.mjs +1 -0
  339. package/dist/chunks/initReplBridge-1.1.26-c4s4p9cb.mjs +1 -0
  340. package/dist/chunks/ink-1.1.26-vgbt5egw.mjs +1 -0
  341. package/dist/chunks/insights-1.1.26-vcx1pevy.mjs +870 -0
  342. package/dist/chunks/install-1.1.26-4y132asw.mjs +1 -0
  343. package/dist/chunks/install-github-app-1.1.26-93zf234q.mjs +149 -0
  344. package/dist/chunks/install-slack-app-1.1.26-mhrfx4re.mjs +1 -0
  345. package/dist/chunks/instrumentation-1.1.26-c4qjkj2f.mjs +1 -0
  346. package/dist/chunks/interactiveHelpers-1.1.26-d3arqch8.mjs +1 -0
  347. package/dist/chunks/keybindings-1.1.26-vn76vb0k.mjs +2 -0
  348. package/dist/chunks/knowledge-1.1.26-tqdt6kx8.mjs +2 -0
  349. package/dist/chunks/latestVersionCache-1.1.26-nefaqy0s.mjs +1 -0
  350. package/dist/chunks/loadAgentsDir-1.1.26-w9zj8h13.mjs +1 -0
  351. package/dist/chunks/loadPluginHooks-1.1.26-p32pd0zg.mjs +1 -0
  352. package/dist/chunks/log-1.1.26-esy3mc70.mjs +1 -0
  353. package/dist/chunks/main-1.1.26-mj3gcxpm.mjs +1 -0
  354. package/dist/chunks/managedEnv-1.1.26-z6q7c9s8.mjs +1 -0
  355. package/dist/chunks/mcp-1.1.26-4c7syme5.mjs +17 -0
  356. package/dist/chunks/mcp-1.1.26-fhs36m57.mjs +1 -0
  357. package/dist/chunks/mcp-1.1.26-nadsprjm.mjs +4 -0
  358. package/dist/chunks/mcpb-1.1.26-ek6r8msb.mjs +1 -0
  359. package/dist/chunks/memory-1.1.26-b3m4e86v.mjs +72 -0
  360. package/dist/chunks/model-1.1.26-fhssfrx1.mjs +1 -0
  361. package/dist/chunks/model-1.1.26-v4t85ag1.mjs +2 -0
  362. package/dist/chunks/node-1.1.26-y7ck63cv.mjs +15 -0
  363. package/dist/chunks/oauth-1.1.26-8bftajjg.mjs +1 -0
  364. package/dist/chunks/openaiShim-1.1.26-wvmheb4c.mjs +14 -0
  365. package/dist/chunks/output-style-1.1.26-rgrmrr2a.mjs +1 -0
  366. package/dist/chunks/package-SHMK2LJE-1.1.26-grxx0tgk.mjs +1 -0
  367. package/dist/chunks/parseConnectUrl-1.1.26-64n8w8aa.mjs +1 -0
  368. package/dist/chunks/parser-1.1.26-p8fcgcbm.mjs +1 -0
  369. package/dist/chunks/passes-1.1.26-65c9vjm7.mjs +1 -0
  370. package/dist/chunks/permissions-1.1.26-bvde1j7e.mjs +1 -0
  371. package/dist/chunks/permissions-1.1.26-xx4tbm19.mjs +3 -0
  372. package/dist/chunks/plan-1.1.26-0p7zmpya.mjs +1 -0
  373. package/dist/chunks/plist-1.1.26-emtpv6yq.mjs +1 -0
  374. package/dist/chunks/plugin-1.1.26-6mz4s6ce.mjs +29 -0
  375. package/dist/chunks/pluginStartupCheck-1.1.26-zsxa12d4.mjs +1 -0
  376. package/dist/chunks/plugins-1.1.26-z4gc0hj4.mjs +9 -0
  377. package/dist/chunks/preActionHook-1.1.26-zja64r0y.mjs +2 -0
  378. package/dist/chunks/print-1.1.26-4jbs3r8a.mjs +57 -0
  379. package/dist/chunks/process-1.1.26-nkvbv24g.mjs +1 -0
  380. package/dist/chunks/processBashCommand-1.1.26-881sdvc5.mjs +1 -0
  381. package/dist/chunks/processSlashCommand-1.1.26-watbp07x.mjs +9 -0
  382. package/dist/chunks/prompt-1.1.26-734yg5r7.mjs +1 -0
  383. package/dist/chunks/prompt-1.1.26-ta9d8xgm.mjs +1 -0
  384. package/dist/chunks/prompts-1.1.26-cacdrcnk.mjs +1 -0
  385. package/dist/chunks/protocolHandler-1.1.26-qfw93skn.mjs +13 -0
  386. package/dist/chunks/provider-1.1.26-yk3xh49r.mjs +2 -0
  387. package/dist/chunks/providerProfiles-1.1.26-srvwhkc8.mjs +1 -0
  388. package/dist/chunks/providerValidation-1.1.26-57a6s8yj.mjs +6 -0
  389. package/dist/chunks/rate-limit-options-1.1.26-14exf6fk.mjs +1 -0
  390. package/dist/chunks/registerSubcommands-1.1.26-1yddk8hw.mjs +26 -0
  391. package/dist/chunks/registry-1.1.26-z88679pc.mjs +1 -0
  392. package/dist/chunks/release-notes-1.1.26-e7dkgbnp.mjs +5 -0
  393. package/dist/chunks/reload-plugins-1.1.26-6r85z0m0.mjs +2 -0
  394. package/dist/chunks/remote-env-1.1.26-rg1652ey.mjs +1 -0
  395. package/dist/chunks/remoteBridgeCore-1.1.26-jmhet39g.mjs +1 -0
  396. package/dist/chunks/remoteSession-1.1.26-5rva0545.mjs +1 -0
  397. package/dist/chunks/rename-1.1.26-vp06xehr.mjs +1 -0
  398. package/dist/chunks/replBridgeHandle-1.1.26-cs214vs7.mjs +1 -0
  399. package/dist/chunks/replLauncher-1.1.26-j0wpsd4v.mjs +1 -0
  400. package/dist/chunks/resume-1.1.26-agfxxd17.mjs +2 -0
  401. package/dist/chunks/rewind-1.1.26-dr3rgj2z.mjs +1 -0
  402. package/dist/chunks/rootOptions-1.1.26-nc1jrtkg.mjs +1 -0
  403. package/dist/chunks/runWorkflowHeadless-1.1.26-4xq2d4x0.mjs +10 -0
  404. package/dist/chunks/sandbox-adapter-1.1.26-v5bmtrnt.mjs +1 -0
  405. package/dist/chunks/sandbox-toggle-1.1.26-5pxvxje1.mjs +1 -0
  406. package/dist/chunks/session-1.1.26-7ejzc2bx.mjs +2 -0
  407. package/dist/chunks/sessionDiscovery-1.1.26-n6vex16t.mjs +1 -0
  408. package/dist/chunks/sessionFileAccessHooks-1.1.26-q07mz5fe.mjs +1 -0
  409. package/dist/chunks/sessionStorage-1.1.26-3x2gtfk1.mjs +1 -0
  410. package/dist/chunks/settings-1.1.26-5hc0bpnb.mjs +1 -0
  411. package/dist/chunks/setup-1.1.26-2qatx87q.mjs +12 -0
  412. package/dist/chunks/sinks-1.1.26-0d001pg9.mjs +1 -0
  413. package/dist/chunks/skills-1.1.26-5q1xvy1e.mjs +1 -0
  414. package/dist/chunks/startupProfiler-1.1.26-76scq5n6.mjs +1 -0
  415. package/dist/chunks/startupUpdateCheck-1.1.26-jw39czgq.mjs +1 -0
  416. package/dist/chunks/state-1.1.26-zh2a5cb0.mjs +1 -0
  417. package/dist/chunks/stats-1.1.26-3yvhzgsr.mjs +1 -0
  418. package/dist/chunks/status-1.1.26-ey3zzjzf.mjs +1 -0
  419. package/dist/chunks/stickers-1.1.26-pnx0arwe.mjs +1 -0
  420. package/dist/chunks/subprocessEnv-1.1.26-93d936pm.mjs +1 -0
  421. package/dist/chunks/tasks-1.1.26-05xaegas.mjs +1 -0
  422. package/dist/chunks/teamHelpers-1.1.26-zn888hhw.mjs +1 -0
  423. package/dist/chunks/teammateModeSnapshot-1.1.26-bhkgw59h.mjs +1 -0
  424. package/dist/chunks/teleport-1.1.26-9m3eaa2j.mjs +1 -0
  425. package/dist/chunks/terminalSetup-1.1.26-p0bvd0b7.mjs +1 -0
  426. package/dist/chunks/theme-1.1.26-ys6mqfn7.mjs +1 -0
  427. package/dist/chunks/thinkback-1.1.26-v4qbcex4.mjs +1 -0
  428. package/dist/chunks/thinkback-play-1.1.26-6gg066vk.mjs +1 -0
  429. package/dist/chunks/toolPool-1.1.26-g4p6wj1v.mjs +1 -0
  430. package/dist/chunks/toolSearch-1.1.26-0whd6fnj.mjs +1 -0
  431. package/dist/chunks/tools-1.1.26-m8c4e11h.mjs +1 -0
  432. package/dist/chunks/trustedDevice-1.1.26-w86xceqp.mjs +1 -0
  433. package/dist/chunks/turndown.cjs-1.1.26-kk4sc8q3.mjs +69 -0
  434. package/dist/chunks/types-1.1.26-myrve966.mjs +1 -0
  435. package/dist/chunks/ultrareviewCommand-1.1.26-fyxh8eqb.mjs +4 -0
  436. package/dist/chunks/update-1.1.26-96yjt7je.mjs +72 -0
  437. package/dist/chunks/upgrade-1.1.26-x2geqcxm.mjs +1 -0
  438. package/dist/chunks/upload-1.1.26-vpwb30tf.mjs +7 -0
  439. package/dist/chunks/upstreamproxy-1.1.26-xe96amnx.mjs +14 -0
  440. package/dist/chunks/url-handler-napi-1.1.26-2v7h396d.mjs +1 -0
  441. package/dist/chunks/usage-1.1.26-pbyahcbc.mjs +1 -0
  442. package/dist/chunks/util-1.1.26-f55brgp6.mjs +1 -0
  443. package/dist/chunks/utils-1.1.26-ntj5p9c6.mjs +1 -0
  444. package/dist/chunks/vim-1.1.26-n3dckyqd.mjs +1 -0
  445. package/dist/chunks/watchLoop-1.1.26-shv6pr8d.mjs +13 -0
  446. package/dist/chunks/watcher-1.1.26-bdahcrvk.mjs +1 -0
  447. package/dist/chunks/wiki-1.1.26-9q9evb0p.mjs +132 -0
  448. package/dist/chunks/workflows-1.1.26-pv1pmcm0.mjs +1 -0
  449. package/dist/chunks/worktree-1.1.26-k3z8qg36.mjs +1 -0
  450. package/dist/chunks/worktreeModeEnabled-1.1.26-c966pdm7.mjs +1 -0
  451. package/dist/chunks/wrapper-1.1.26-smg8ftbk.mjs +7 -0
  452. package/dist/cli.mjs +2 -2
  453. package/package.json +9 -9
  454. package/dist/chunks/AgentTool-1.1.25-wemjscyz.mjs +0 -1
  455. package/dist/chunks/App-1.1.25-k5h3kma3.mjs +0 -1
  456. package/dist/chunks/ApproveApiKey-1.1.25-z8vqxm93.mjs +0 -1
  457. package/dist/chunks/AssistantSessionChooser-1.1.25-qmr6qf3r.mjs +0 -1
  458. package/dist/chunks/AutoModeOptInDialog-1.1.25-78m4mvsv.mjs +0 -1
  459. package/dist/chunks/BypassPermissionsModeDialog-1.1.25-htk8qebw.mjs +0 -1
  460. package/dist/chunks/ClaudeMdExternalIncludesDialog-1.1.25-8evt7epy.mjs +0 -1
  461. package/dist/chunks/ConsoleOAuthFlow-1.1.25-3nbcvm6d.mjs +0 -1
  462. package/dist/chunks/DiffDialog-1.1.25-7n5581yw.mjs +0 -6
  463. package/dist/chunks/Doctor-1.1.25-zvcm13vd.mjs +0 -1
  464. package/dist/chunks/ExplorerDialog-1.1.25-jazr0v5h.mjs +0 -6
  465. package/dist/chunks/ITermBackend-1.1.25-tb139x32.mjs +0 -1
  466. package/dist/chunks/InvalidConfigDialog-1.1.25-h27j1v12.mjs +0 -1
  467. package/dist/chunks/InvalidSettingsDialog-1.1.25-7gxkqb1q.mjs +0 -1
  468. package/dist/chunks/MigrationDialog-1.1.25-21kzry6a.mjs +0 -1
  469. package/dist/chunks/Onboarding-1.1.25-z4ps8td0.mjs +0 -1
  470. package/dist/chunks/ProviderManager-1.1.25-dekvcwna.mjs +0 -1
  471. package/dist/chunks/REPL-1.1.25-x77jymbq.mjs +0 -1
  472. package/dist/chunks/ResumeConversation-1.1.25-z1n7c0cp.mjs +0 -1
  473. package/dist/chunks/SnapshotUpdateDialog-1.1.25-ye8czpf8.mjs +0 -1
  474. package/dist/chunks/TeleportProgress-1.1.25-qy9dcwtf.mjs +0 -1
  475. package/dist/chunks/TeleportRepoMismatchDialog-1.1.25-se513tcw.mjs +0 -1
  476. package/dist/chunks/TeleportResumeWrapper-1.1.25-shafx13k.mjs +0 -1
  477. package/dist/chunks/TmuxBackend-1.1.25-q9jqjghn.mjs +0 -9
  478. package/dist/chunks/ToolSearchTool-1.1.25-c9b16qp6.mjs +0 -1
  479. package/dist/chunks/TrustDialog-1.1.25-4x0h3a7n.mjs +0 -1
  480. package/dist/chunks/activeProvider-1.1.25-9z82gazg.mjs +0 -1
  481. package/dist/chunks/add-dir-1.1.25-3eark7aj.mjs +0 -1
  482. package/dist/chunks/agentTypes-1.1.25-88qbcwen.mjs +0 -1
  483. package/dist/chunks/agents-1.1.25-58s95cy7.mjs +0 -110
  484. package/dist/chunks/agents-1.1.25-rprb9rf9.mjs +0 -3
  485. package/dist/chunks/api-1.1.25-ceedtxx2.mjs +0 -1
  486. package/dist/chunks/asciicast-1.1.25-dtyww79s.mjs +0 -1
  487. package/dist/chunks/assistant-1.1.25-12s5z3q2.mjs +0 -1
  488. package/dist/chunks/auth-1.1.25-cd9y34xe.mjs +0 -1
  489. package/dist/chunks/auth-1.1.25-gphkwwnp.mjs +0 -1
  490. package/dist/chunks/autoMode-1.1.25-zdd4g2rn.mjs +0 -52
  491. package/dist/chunks/autoModeSetup-1.1.25-17zj185q.mjs +0 -44
  492. package/dist/chunks/autoUpdater-1.1.25-tb3pf0cw.mjs +0 -1
  493. package/dist/chunks/backgroundHousekeeping-1.1.25-mtctkars.mjs +0 -1
  494. package/dist/chunks/branch-1.1.25-ytfahhwq.mjs +0 -4
  495. package/dist/chunks/bridge-1.1.25-kkjx4g4j.mjs +0 -2
  496. package/dist/chunks/bridgeConfig-1.1.25-9h63taqc.mjs +0 -1
  497. package/dist/chunks/bridgeEnabled-1.1.25-yq7hv80q.mjs +0 -1
  498. package/dist/chunks/bridgeMain-1.1.25-rmcdgp77.mjs +0 -88
  499. package/dist/chunks/bridgePointer-1.1.25-x3jjj2ek.mjs +0 -1
  500. package/dist/chunks/btw-1.1.25-xdh8rhdz.mjs +0 -1
  501. package/dist/chunks/buddy-1.1.25-aj90p6ww.mjs +0 -3
  502. package/dist/chunks/cache-probe-1.1.25-4wztx76s.mjs +0 -21
  503. package/dist/chunks/cacheStats-1.1.25-9bd12my6.mjs +0 -4
  504. package/dist/chunks/caches-1.1.25-2ewrwm5x.mjs +0 -1
  505. package/dist/chunks/cd-1.1.25-9yhaw8rp.mjs +0 -3
  506. package/dist/chunks/claudeDesktop-1.1.25-bw8arps4.mjs +0 -1
  507. package/dist/chunks/claudemd-1.1.25-f621m88g.mjs +0 -1
  508. package/dist/chunks/clear-1.1.25-jk3ztva0.mjs +0 -1
  509. package/dist/chunks/clearTerminal-1.1.25-7jtejen6.mjs +0 -1
  510. package/dist/chunks/cli-1.1.25-0m4pyzaf.mjs +0 -2
  511. package/dist/chunks/cli-1.1.25-0q6rqkec.mjs +0 -58
  512. package/dist/chunks/cli-1.1.25-12b1rzfj.mjs +0 -2
  513. package/dist/chunks/cli-1.1.25-14jerc0x.mjs +0 -2
  514. package/dist/chunks/cli-1.1.25-1c4t0f2p.mjs +0 -2
  515. package/dist/chunks/cli-1.1.25-1c633j9v.mjs +0 -2
  516. package/dist/chunks/cli-1.1.25-1gz0w81n.mjs +0 -2
  517. package/dist/chunks/cli-1.1.25-1hx796kk.mjs +0 -2
  518. package/dist/chunks/cli-1.1.25-1s7ketx0.mjs +0 -2
  519. package/dist/chunks/cli-1.1.25-1sf51thg.mjs +0 -3
  520. package/dist/chunks/cli-1.1.25-221zdn3h.mjs +0 -4
  521. package/dist/chunks/cli-1.1.25-24f6az0s.mjs +0 -2
  522. package/dist/chunks/cli-1.1.25-2gjxmbsj.mjs +0 -2
  523. package/dist/chunks/cli-1.1.25-2gtabky3.mjs +0 -60
  524. package/dist/chunks/cli-1.1.25-2wd0qj2d.mjs +0 -2
  525. package/dist/chunks/cli-1.1.25-2we0778z.mjs +0 -2
  526. package/dist/chunks/cli-1.1.25-2zepg15b.mjs +0 -2
  527. package/dist/chunks/cli-1.1.25-32br2csx.mjs +0 -2
  528. package/dist/chunks/cli-1.1.25-32qfxqyg.mjs +0 -2
  529. package/dist/chunks/cli-1.1.25-348yqf3d.mjs +0 -2
  530. package/dist/chunks/cli-1.1.25-37rs38eq.mjs +0 -2
  531. package/dist/chunks/cli-1.1.25-3dd0c7xd.mjs +0 -4
  532. package/dist/chunks/cli-1.1.25-3ev2q4bm.mjs +0 -4
  533. package/dist/chunks/cli-1.1.25-3hnrfkxc.mjs +0 -2
  534. package/dist/chunks/cli-1.1.25-3nhwpx0q.mjs +0 -3
  535. package/dist/chunks/cli-1.1.25-3nm4kgwz.mjs +0 -2
  536. package/dist/chunks/cli-1.1.25-3qj0n5y0.mjs +0 -21
  537. package/dist/chunks/cli-1.1.25-3tnd3xyt.mjs +0 -3
  538. package/dist/chunks/cli-1.1.25-3v5624jg.mjs +0 -2
  539. package/dist/chunks/cli-1.1.25-3vtsr7s2.mjs +0 -2
  540. package/dist/chunks/cli-1.1.25-45mx738r.mjs +0 -3
  541. package/dist/chunks/cli-1.1.25-4cgvw7e3.mjs +0 -2
  542. package/dist/chunks/cli-1.1.25-4d1zk1ar.mjs +0 -12
  543. package/dist/chunks/cli-1.1.25-4h4yaa4x.mjs +0 -2
  544. package/dist/chunks/cli-1.1.25-4yjtqfa0.mjs +0 -2
  545. package/dist/chunks/cli-1.1.25-54q2vnck.mjs +0 -2
  546. package/dist/chunks/cli-1.1.25-5f8d8bx1.mjs +0 -2
  547. package/dist/chunks/cli-1.1.25-5g78avtr.mjs +0 -2
  548. package/dist/chunks/cli-1.1.25-5n21xpvc.mjs +0 -16
  549. package/dist/chunks/cli-1.1.25-5qknjpxc.mjs +0 -2
  550. package/dist/chunks/cli-1.1.25-5r495hn7.mjs +0 -4
  551. package/dist/chunks/cli-1.1.25-5s22yhkx.mjs +0 -3
  552. package/dist/chunks/cli-1.1.25-5s65r14h.mjs +0 -2
  553. package/dist/chunks/cli-1.1.25-5ye3ascx.mjs +0 -2
  554. package/dist/chunks/cli-1.1.25-639mzh6g.mjs +0 -2
  555. package/dist/chunks/cli-1.1.25-63kkff0g.mjs +0 -2
  556. package/dist/chunks/cli-1.1.25-683ggh08.mjs +0 -2
  557. package/dist/chunks/cli-1.1.25-687hxtdb.mjs +0 -1
  558. package/dist/chunks/cli-1.1.25-69shxnnp.mjs +0 -2
  559. package/dist/chunks/cli-1.1.25-6bb29bw7.mjs +0 -2
  560. package/dist/chunks/cli-1.1.25-6panntay.mjs +0 -17
  561. package/dist/chunks/cli-1.1.25-6pthkv1w.mjs +0 -4
  562. package/dist/chunks/cli-1.1.25-6r6r7rep.mjs +0 -4
  563. package/dist/chunks/cli-1.1.25-6t9phfap.mjs +0 -2
  564. package/dist/chunks/cli-1.1.25-6vwz5vma.mjs +0 -2
  565. package/dist/chunks/cli-1.1.25-6wcggeyr.mjs +0 -25
  566. package/dist/chunks/cli-1.1.25-6wjrv08c.mjs +0 -6
  567. package/dist/chunks/cli-1.1.25-746dypse.mjs +0 -2
  568. package/dist/chunks/cli-1.1.25-74ys7518.mjs +0 -42
  569. package/dist/chunks/cli-1.1.25-7d3fdbq5.mjs +0 -17
  570. package/dist/chunks/cli-1.1.25-7d7cptk6.mjs +0 -10
  571. package/dist/chunks/cli-1.1.25-7qert3s4.mjs +0 -2
  572. package/dist/chunks/cli-1.1.25-7qxwpfwh.mjs +0 -2
  573. package/dist/chunks/cli-1.1.25-7wsdhgky.mjs +0 -2
  574. package/dist/chunks/cli-1.1.25-82ht7pxh.mjs +0 -2
  575. package/dist/chunks/cli-1.1.25-8byrahks.mjs +0 -2
  576. package/dist/chunks/cli-1.1.25-8eznzbsa.mjs +0 -5
  577. package/dist/chunks/cli-1.1.25-8hv1dfrb.mjs +0 -2
  578. package/dist/chunks/cli-1.1.25-8k2bszzr.mjs +0 -2
  579. package/dist/chunks/cli-1.1.25-8v1gw0tw.mjs +0 -9
  580. package/dist/chunks/cli-1.1.25-8vqmp6g5.mjs +0 -20
  581. package/dist/chunks/cli-1.1.25-9f27xm90.mjs +0 -25
  582. package/dist/chunks/cli-1.1.25-9grz07r4.mjs +0 -34
  583. package/dist/chunks/cli-1.1.25-9m237kwt.mjs +0 -2
  584. package/dist/chunks/cli-1.1.25-9xqq9dsw.mjs +0 -3
  585. package/dist/chunks/cli-1.1.25-9yhnadye.mjs +0 -24
  586. package/dist/chunks/cli-1.1.25-9z7tyxc4.mjs +0 -2
  587. package/dist/chunks/cli-1.1.25-a0zejb5c.mjs +0 -2
  588. package/dist/chunks/cli-1.1.25-am98khq7.mjs +0 -2
  589. package/dist/chunks/cli-1.1.25-anhj1nnt.mjs +0 -2
  590. package/dist/chunks/cli-1.1.25-anvsm1cs.mjs +0 -2
  591. package/dist/chunks/cli-1.1.25-b1hj5x42.mjs +0 -2
  592. package/dist/chunks/cli-1.1.25-ba3yrxg9.mjs +0 -2
  593. package/dist/chunks/cli-1.1.25-bmjvmtgk.mjs +0 -2
  594. package/dist/chunks/cli-1.1.25-bvg3kwg7.mjs +0 -4
  595. package/dist/chunks/cli-1.1.25-cc10r97z.mjs +0 -2
  596. package/dist/chunks/cli-1.1.25-cmsea0j8.mjs +0 -15
  597. package/dist/chunks/cli-1.1.25-csgmna38.mjs +0 -2
  598. package/dist/chunks/cli-1.1.25-d029ezbm.mjs +0 -2
  599. package/dist/chunks/cli-1.1.25-d15hk64v.mjs +0 -2
  600. package/dist/chunks/cli-1.1.25-d6ybhba5.mjs +0 -2
  601. package/dist/chunks/cli-1.1.25-dc92c5gy.mjs +0 -2
  602. package/dist/chunks/cli-1.1.25-df9x7s0j.mjs +0 -2
  603. package/dist/chunks/cli-1.1.25-dn7m24cg.mjs +0 -2
  604. package/dist/chunks/cli-1.1.25-drtfsgw8.mjs +0 -3
  605. package/dist/chunks/cli-1.1.25-dw0mshd5.mjs +0 -2
  606. package/dist/chunks/cli-1.1.25-e2ng6vcx.mjs +0 -2
  607. package/dist/chunks/cli-1.1.25-ed14rf9g.mjs +0 -2
  608. package/dist/chunks/cli-1.1.25-eqtpax1f.mjs +0 -6
  609. package/dist/chunks/cli-1.1.25-etb23y0w.mjs +0 -4
  610. package/dist/chunks/cli-1.1.25-ex6f69yn.mjs +0 -2
  611. package/dist/chunks/cli-1.1.25-f424x1de.mjs +0 -2
  612. package/dist/chunks/cli-1.1.25-f57233sm.mjs +0 -8
  613. package/dist/chunks/cli-1.1.25-f5ag59tm.mjs +0 -4
  614. package/dist/chunks/cli-1.1.25-f6w108cp.mjs +0 -6
  615. package/dist/chunks/cli-1.1.25-f9pk1asa.mjs +0 -7
  616. package/dist/chunks/cli-1.1.25-fr1nw6bz.mjs +0 -2
  617. package/dist/chunks/cli-1.1.25-fwh7d55c.mjs +0 -2
  618. package/dist/chunks/cli-1.1.25-g6y71why.mjs +0 -24
  619. package/dist/chunks/cli-1.1.25-gba9rrnp.mjs +0 -15
  620. package/dist/chunks/cli-1.1.25-gezpvyzq.mjs +0 -2
  621. package/dist/chunks/cli-1.1.25-gm5mfwmy.mjs +0 -2
  622. package/dist/chunks/cli-1.1.25-gmvcd8bm.mjs +0 -2
  623. package/dist/chunks/cli-1.1.25-gnsqbh0h.mjs +0 -2
  624. package/dist/chunks/cli-1.1.25-gsngwhfp.mjs +0 -2
  625. package/dist/chunks/cli-1.1.25-gz32rhhs.mjs +0 -2
  626. package/dist/chunks/cli-1.1.25-h164y8f5.mjs +0 -2
  627. package/dist/chunks/cli-1.1.25-h6ag26rc.mjs +0 -2
  628. package/dist/chunks/cli-1.1.25-hjvawqyb.mjs +0 -2
  629. package/dist/chunks/cli-1.1.25-hjwttff4.mjs +0 -2
  630. package/dist/chunks/cli-1.1.25-hpfkk20r.mjs +0 -2
  631. package/dist/chunks/cli-1.1.25-j6x483np.mjs +0 -2
  632. package/dist/chunks/cli-1.1.25-jaz67hdc.mjs +0 -2
  633. package/dist/chunks/cli-1.1.25-jk7skh2n.mjs +0 -2
  634. package/dist/chunks/cli-1.1.25-jmv6jw6b.mjs +0 -2
  635. package/dist/chunks/cli-1.1.25-jsn4we2f.mjs +0 -2
  636. package/dist/chunks/cli-1.1.25-k6kqfxnq.mjs +0 -2
  637. package/dist/chunks/cli-1.1.25-k6v3tvg9.mjs +0 -2
  638. package/dist/chunks/cli-1.1.25-kdamwjt1.mjs +0 -2
  639. package/dist/chunks/cli-1.1.25-kn1yv4f6.mjs +0 -2
  640. package/dist/chunks/cli-1.1.25-kpah4ttt.mjs +0 -2
  641. package/dist/chunks/cli-1.1.25-kpv8j6wf.mjs +0 -2
  642. package/dist/chunks/cli-1.1.25-kvwevqsc.mjs +0 -18
  643. package/dist/chunks/cli-1.1.25-m0h0ddew.mjs +0 -2
  644. package/dist/chunks/cli-1.1.25-m86a8tmc.mjs +0 -2
  645. package/dist/chunks/cli-1.1.25-n10jmzvk.mjs +0 -2
  646. package/dist/chunks/cli-1.1.25-n5gb4kx8.mjs +0 -2
  647. package/dist/chunks/cli-1.1.25-n6df4vnz.mjs +0 -2
  648. package/dist/chunks/cli-1.1.25-nh2xj15f.mjs +0 -2
  649. package/dist/chunks/cli-1.1.25-njrez2x5.mjs +0 -12
  650. package/dist/chunks/cli-1.1.25-nmw9agm4.mjs +0 -133
  651. package/dist/chunks/cli-1.1.25-nmxbk4dt.mjs +0 -2
  652. package/dist/chunks/cli-1.1.25-np8863pb.mjs +0 -3
  653. package/dist/chunks/cli-1.1.25-ntfm6tbg.mjs +0 -2
  654. package/dist/chunks/cli-1.1.25-nwdtve8h.mjs +0 -2
  655. package/dist/chunks/cli-1.1.25-nxvqf4sh.mjs +0 -2
  656. package/dist/chunks/cli-1.1.25-p2kmhxd3.mjs +0 -3
  657. package/dist/chunks/cli-1.1.25-p9j8prqh.mjs +0 -2
  658. package/dist/chunks/cli-1.1.25-pcamey8m.mjs +0 -2
  659. package/dist/chunks/cli-1.1.25-peepax79.mjs +0 -66
  660. package/dist/chunks/cli-1.1.25-pgs0x971.mjs +0 -50
  661. package/dist/chunks/cli-1.1.25-px1h2b7d.mjs +0 -2
  662. package/dist/chunks/cli-1.1.25-pxq7zyjb.mjs +0 -2
  663. package/dist/chunks/cli-1.1.25-pzp73p0x.mjs +0 -2
  664. package/dist/chunks/cli-1.1.25-q257pczz.mjs +0 -133
  665. package/dist/chunks/cli-1.1.25-q5qj0wfa.mjs +0 -18
  666. package/dist/chunks/cli-1.1.25-q5tqh3tz.mjs +0 -2
  667. package/dist/chunks/cli-1.1.25-q88hb4qg.mjs +0 -5459
  668. package/dist/chunks/cli-1.1.25-qd1b1zr7.mjs +0 -3
  669. package/dist/chunks/cli-1.1.25-qd1q5w85.mjs +0 -2
  670. package/dist/chunks/cli-1.1.25-qgnyys4j.mjs +0 -6
  671. package/dist/chunks/cli-1.1.25-qp9j9ma3.mjs +0 -24
  672. package/dist/chunks/cli-1.1.25-qpb14xj4.mjs +0 -2
  673. package/dist/chunks/cli-1.1.25-qtjt3cq9.mjs +0 -2
  674. package/dist/chunks/cli-1.1.25-r0dwt4a0.mjs +0 -2
  675. package/dist/chunks/cli-1.1.25-rbapdr02.mjs +0 -2
  676. package/dist/chunks/cli-1.1.25-rbnjv023.mjs +0 -2
  677. package/dist/chunks/cli-1.1.25-rf05pze2.mjs +0 -2
  678. package/dist/chunks/cli-1.1.25-rf0c9c9r.mjs +0 -3
  679. package/dist/chunks/cli-1.1.25-rg5rxmym.mjs +0 -9
  680. package/dist/chunks/cli-1.1.25-rkh9pz84.mjs +0 -2
  681. package/dist/chunks/cli-1.1.25-rqzwndms.mjs +0 -45
  682. package/dist/chunks/cli-1.1.25-rwg08ga2.mjs +0 -39
  683. package/dist/chunks/cli-1.1.25-s1ykc389.mjs +0 -2
  684. package/dist/chunks/cli-1.1.25-s54emewd.mjs +0 -206
  685. package/dist/chunks/cli-1.1.25-sjqg08ww.mjs +0 -2
  686. package/dist/chunks/cli-1.1.25-sm3q65hz.mjs +0 -2
  687. package/dist/chunks/cli-1.1.25-svtt1qhf.mjs +0 -5
  688. package/dist/chunks/cli-1.1.25-sz3dey5y.mjs +0 -2
  689. package/dist/chunks/cli-1.1.25-t6rdfhp9.mjs +0 -3
  690. package/dist/chunks/cli-1.1.25-t80ab9f0.mjs +0 -7
  691. package/dist/chunks/cli-1.1.25-tftyt531.mjs +0 -3
  692. package/dist/chunks/cli-1.1.25-tj3kqgbv.mjs +0 -2
  693. package/dist/chunks/cli-1.1.25-tz7k6gjy.mjs +0 -2
  694. package/dist/chunks/cli-1.1.25-vc7150xz.mjs +0 -2
  695. package/dist/chunks/cli-1.1.25-vkg5fb0z.mjs +0 -2
  696. package/dist/chunks/cli-1.1.25-vwe1fsde.mjs +0 -2
  697. package/dist/chunks/cli-1.1.25-wcw9vrkz.mjs +0 -2
  698. package/dist/chunks/cli-1.1.25-wd0p9nmj.mjs +0 -24
  699. package/dist/chunks/cli-1.1.25-wtrb99c9.mjs +0 -2
  700. package/dist/chunks/cli-1.1.25-wy18zt7a.mjs +0 -3
  701. package/dist/chunks/cli-1.1.25-x26vkphq.mjs +0 -6
  702. package/dist/chunks/cli-1.1.25-x4ww7pe7.mjs +0 -2
  703. package/dist/chunks/cli-1.1.25-xbxtyfje.mjs +0 -2
  704. package/dist/chunks/cli-1.1.25-y0f45gyf.mjs +0 -2
  705. package/dist/chunks/cli-1.1.25-y4xjnn7w.mjs +0 -2
  706. package/dist/chunks/cli-1.1.25-ybe971qx.mjs +0 -15
  707. package/dist/chunks/cli-1.1.25-yctc3qt8.mjs +0 -2
  708. package/dist/chunks/cli-1.1.25-yf3nnsg1.mjs +0 -2
  709. package/dist/chunks/cli-1.1.25-z31z20wf.mjs +0 -2
  710. package/dist/chunks/cli-1.1.25-zk74mh7n.mjs +0 -2
  711. package/dist/chunks/cli-1.1.25-zpzhf7zc.mjs +0 -2
  712. package/dist/chunks/cli-1.1.25-zqqpy89q.mjs +0 -6
  713. package/dist/chunks/cli-1.1.25-zrj2zpkp.mjs +0 -2
  714. package/dist/chunks/client-1.1.25-08n7ywgz.mjs +0 -1
  715. package/dist/chunks/color-1.1.25-n45p3cdv.mjs +0 -1
  716. package/dist/chunks/compact-1.1.25-qqv3fce7.mjs +0 -3
  717. package/dist/chunks/config-1.1.25-bvznkf41.mjs +0 -1
  718. package/dist/chunks/config-1.1.25-n6dtcns2.mjs +0 -1
  719. package/dist/chunks/constants-1.1.25-g61cz55f.mjs +0 -1
  720. package/dist/chunks/context-1.1.25-e3n1bdyd.mjs +0 -1
  721. package/dist/chunks/context-noninteractive-1.1.25-6drmca9m.mjs +0 -1
  722. package/dist/chunks/conversation-1.1.25-5xfam12e.mjs +0 -1
  723. package/dist/chunks/copilotHeaders-1.1.25-n3q0s4gz.mjs +0 -1
  724. package/dist/chunks/copy-1.1.25-wcjjc2td.mjs +0 -9
  725. package/dist/chunks/cost-1.1.25-czrc10qr.mjs +0 -1
  726. package/dist/chunks/createSSHSession-1.1.25-q7sr5mgy.mjs +0 -1
  727. package/dist/chunks/createSession-1.1.25-abgdr9mn.mjs +0 -1
  728. package/dist/chunks/debug-1.1.25-4284each.mjs +0 -1
  729. package/dist/chunks/defaultActionDeps-1.1.25-bh5e3czf.mjs +0 -1534
  730. package/dist/chunks/desktop-1.1.25-kb98q9vj.mjs +0 -1
  731. package/dist/chunks/detectRepository-1.1.25-a7pfgy12.mjs +0 -1
  732. package/dist/chunks/detection-1.1.25-8nzvw5jn.mjs +0 -1
  733. package/dist/chunks/diff-1.1.25-dhnj1tfb.mjs +0 -1
  734. package/dist/chunks/doctor-1.1.25-0x83n5n5.mjs +0 -1
  735. package/dist/chunks/doctorDiagnostic-1.1.25-qmg4yght.mjs +0 -1
  736. package/dist/chunks/earlyInput-1.1.25-jz9ewwc0.mjs +0 -1
  737. package/dist/chunks/effort-1.1.25-6gemkp3j.mjs +0 -13
  738. package/dist/chunks/engine-1.1.25-hb7ppn8y.mjs +0 -1
  739. package/dist/chunks/envLessBridgeConfig-1.1.25-32s3yykr.mjs +0 -1
  740. package/dist/chunks/envUtils-1.1.25-trphmt1z.mjs +0 -1
  741. package/dist/chunks/environmentSelection-1.1.25-jew2phex.mjs +0 -1
  742. package/dist/chunks/environments-1.1.25-nkh2j8kv.mjs +0 -1
  743. package/dist/chunks/errors-1.1.25-0t1vtdpj.mjs +0 -1
  744. package/dist/chunks/exampleCommands-1.1.25-n2ktzve3.mjs +0 -1
  745. package/dist/chunks/execFileNoThrow-1.1.25-2f72pb95.mjs +0 -1
  746. package/dist/chunks/exit-1.1.25-302bsne4.mjs +0 -1
  747. package/dist/chunks/explorer-1.1.25-f47vrcdd.mjs +0 -1
  748. package/dist/chunks/export-1.1.25-655jmasp.mjs +0 -2
  749. package/dist/chunks/extra-usage-1.1.25-9f3dc9de.mjs +0 -1
  750. package/dist/chunks/extra-usage-noninteractive-1.1.25-wjzcb1d3.mjs +0 -1
  751. package/dist/chunks/fast-1.1.25-k4a1t9tc.mjs +0 -1
  752. package/dist/chunks/feedback-1.1.25-crmhd8kn.mjs +0 -14
  753. package/dist/chunks/firstPartyEventLogger-1.1.25-pr01pvjg.mjs +0 -1
  754. package/dist/chunks/git-1.1.25-r40xnnqg.mjs +0 -1
  755. package/dist/chunks/githubModelsCredentials-1.1.25-8r84eppg.mjs +0 -1
  756. package/dist/chunks/goal-1.1.25-2fz16dne.mjs +0 -4
  757. package/dist/chunks/growthbook-1.1.25-vr1d3g20.mjs +0 -1
  758. package/dist/chunks/headless-1.1.25-b7ma19kx.mjs +0 -2
  759. package/dist/chunks/heapdump-1.1.25-s74fnvr9.mjs +0 -6
  760. package/dist/chunks/help-1.1.25-jphw3nwb.mjs +0 -1
  761. package/dist/chunks/hookChains-1.1.25-wad3j7ae.mjs +0 -3
  762. package/dist/chunks/hooks-1.1.25-5psxtbt2.mjs +0 -79
  763. package/dist/chunks/hooks-1.1.25-n6f1dkc7.mjs +0 -1
  764. package/dist/chunks/ide-1.1.25-21kw5qe1.mjs +0 -3
  765. package/dist/chunks/image-processor-napi-1.1.25-jymb540y.mjs +0 -1
  766. package/dist/chunks/import-1.1.25-71q60jx1.mjs +0 -261
  767. package/dist/chunks/inboundAttachments-1.1.25-qg5v4c4j.mjs +0 -1
  768. package/dist/chunks/index-1.1.25-0f94rjfd.mjs +0 -1
  769. package/dist/chunks/index-1.1.25-0n1ksx20.mjs +0 -2
  770. package/dist/chunks/index-1.1.25-1n597wy3.mjs +0 -1
  771. package/dist/chunks/index-1.1.25-1rwmhexf.mjs +0 -1
  772. package/dist/chunks/index-1.1.25-6160t93h.mjs +0 -30
  773. package/dist/chunks/index-1.1.25-645qcmbw.mjs +0 -9
  774. package/dist/chunks/index-1.1.25-70ggh135.mjs +0 -1
  775. package/dist/chunks/index-1.1.25-7nk5p28a.mjs +0 -1
  776. package/dist/chunks/index-1.1.25-7p7qd15b.mjs +0 -23
  777. package/dist/chunks/index-1.1.25-8z7y79bf.mjs +0 -1
  778. package/dist/chunks/index-1.1.25-affe6cxt.mjs +0 -9
  779. package/dist/chunks/index-1.1.25-bec2ajvp.mjs +0 -1
  780. package/dist/chunks/index-1.1.25-f64qrtc9.mjs +0 -5
  781. package/dist/chunks/index-1.1.25-g7v9zhk1.mjs +0 -1
  782. package/dist/chunks/index-1.1.25-g99896ns.mjs +0 -1
  783. package/dist/chunks/index-1.1.25-hcbmys9p.mjs +0 -1
  784. package/dist/chunks/index-1.1.25-j8rm4qgs.mjs +0 -2
  785. package/dist/chunks/index-1.1.25-kh02yd5c.mjs +0 -1
  786. package/dist/chunks/index-1.1.25-m6k2vy2a.mjs +0 -1
  787. package/dist/chunks/index-1.1.25-pmn6pnjv.mjs +0 -1
  788. package/dist/chunks/index-1.1.25-t0kaa1dy.mjs +0 -1
  789. package/dist/chunks/index-1.1.25-xfdfregs.mjs +0 -1
  790. package/dist/chunks/index-1.1.25-ychm6aj7.mjs +0 -1
  791. package/dist/chunks/init-1.1.25-x7cr3p65.mjs +0 -1
  792. package/dist/chunks/initReplBridge-1.1.25-zcgy02rq.mjs +0 -1
  793. package/dist/chunks/ink-1.1.25-evxr7syt.mjs +0 -1
  794. package/dist/chunks/insights-1.1.25-0zz5y2cs.mjs +0 -870
  795. package/dist/chunks/install-1.1.25-nghrpc4k.mjs +0 -1
  796. package/dist/chunks/install-github-app-1.1.25-1tb3cz5k.mjs +0 -149
  797. package/dist/chunks/install-slack-app-1.1.25-vsp3sc6d.mjs +0 -1
  798. package/dist/chunks/instrumentation-1.1.25-e9arjmhp.mjs +0 -1
  799. package/dist/chunks/interactiveHelpers-1.1.25-dvn7nkzf.mjs +0 -1
  800. package/dist/chunks/keybindings-1.1.25-7tf4nkft.mjs +0 -2
  801. package/dist/chunks/knowledge-1.1.25-gchxmcv2.mjs +0 -2
  802. package/dist/chunks/latestVersionCache-1.1.25-gzy09f8s.mjs +0 -1
  803. package/dist/chunks/loadAgentsDir-1.1.25-3fvea40c.mjs +0 -1
  804. package/dist/chunks/loadPluginHooks-1.1.25-1b1z5t2x.mjs +0 -1
  805. package/dist/chunks/log-1.1.25-rhpcv45j.mjs +0 -1
  806. package/dist/chunks/main-1.1.25-hpaj9gzw.mjs +0 -1
  807. package/dist/chunks/managedEnv-1.1.25-19sxqzbj.mjs +0 -1
  808. package/dist/chunks/mcp-1.1.25-bkgk2vye.mjs +0 -1
  809. package/dist/chunks/mcp-1.1.25-n5bde32b.mjs +0 -17
  810. package/dist/chunks/mcp-1.1.25-wsfk73n2.mjs +0 -4
  811. package/dist/chunks/mcpb-1.1.25-jwd1ff98.mjs +0 -1
  812. package/dist/chunks/memory-1.1.25-ae4515h6.mjs +0 -72
  813. package/dist/chunks/model-1.1.25-kdc32s97.mjs +0 -1
  814. package/dist/chunks/model-1.1.25-x3hpj8mx.mjs +0 -2
  815. package/dist/chunks/node-1.1.25-bmakbgcc.mjs +0 -15
  816. package/dist/chunks/oauth-1.1.25-dpw2v0gf.mjs +0 -1
  817. package/dist/chunks/openaiShim-1.1.25-frxz7cxz.mjs +0 -14
  818. package/dist/chunks/output-style-1.1.25-ja0xn44t.mjs +0 -1
  819. package/dist/chunks/package-SHMK2LJE-1.1.25-n5senjea.mjs +0 -1
  820. package/dist/chunks/parseConnectUrl-1.1.25-2w1mb832.mjs +0 -1
  821. package/dist/chunks/parser-1.1.25-226xm2zk.mjs +0 -1
  822. package/dist/chunks/passes-1.1.25-3pbcz45a.mjs +0 -1
  823. package/dist/chunks/permissions-1.1.25-3yb8c211.mjs +0 -1
  824. package/dist/chunks/permissions-1.1.25-g8395q9y.mjs +0 -3
  825. package/dist/chunks/plan-1.1.25-335rgqar.mjs +0 -1
  826. package/dist/chunks/plist-1.1.25-4gx9kzb9.mjs +0 -1
  827. package/dist/chunks/plugin-1.1.25-7twsr9qb.mjs +0 -29
  828. package/dist/chunks/pluginStartupCheck-1.1.25-h43rcveq.mjs +0 -1
  829. package/dist/chunks/plugins-1.1.25-36r120jp.mjs +0 -9
  830. package/dist/chunks/preActionHook-1.1.25-mq77hmkq.mjs +0 -2
  831. package/dist/chunks/print-1.1.25-nyqwpaw6.mjs +0 -57
  832. package/dist/chunks/process-1.1.25-40rkvfxz.mjs +0 -1
  833. package/dist/chunks/processBashCommand-1.1.25-4rt9wd52.mjs +0 -1
  834. package/dist/chunks/processSlashCommand-1.1.25-50jz8vq4.mjs +0 -9
  835. package/dist/chunks/prompt-1.1.25-ab2m25ry.mjs +0 -1
  836. package/dist/chunks/prompt-1.1.25-tsf93p18.mjs +0 -1
  837. package/dist/chunks/prompts-1.1.25-7asah358.mjs +0 -1
  838. package/dist/chunks/protocolHandler-1.1.25-fjma0898.mjs +0 -13
  839. package/dist/chunks/provider-1.1.25-jcm6xct3.mjs +0 -2
  840. package/dist/chunks/providerProfiles-1.1.25-86yene25.mjs +0 -1
  841. package/dist/chunks/providerValidation-1.1.25-gbve71cz.mjs +0 -6
  842. package/dist/chunks/rate-limit-options-1.1.25-n6v741p7.mjs +0 -1
  843. package/dist/chunks/registerSubcommands-1.1.25-d988tp7q.mjs +0 -26
  844. package/dist/chunks/registry-1.1.25-jda5me4n.mjs +0 -1
  845. package/dist/chunks/release-notes-1.1.25-depx979r.mjs +0 -5
  846. package/dist/chunks/reload-plugins-1.1.25-nc27sfgy.mjs +0 -2
  847. package/dist/chunks/remote-env-1.1.25-adtemst2.mjs +0 -1
  848. package/dist/chunks/remoteBridgeCore-1.1.25-vyw0r3a7.mjs +0 -1
  849. package/dist/chunks/remoteSession-1.1.25-f1hb7zcj.mjs +0 -1
  850. package/dist/chunks/rename-1.1.25-r9khtthn.mjs +0 -1
  851. package/dist/chunks/replBridgeHandle-1.1.25-5tbm27ae.mjs +0 -1
  852. package/dist/chunks/replLauncher-1.1.25-dy1jxrha.mjs +0 -1
  853. package/dist/chunks/resume-1.1.25-qcctpvst.mjs +0 -2
  854. package/dist/chunks/rewind-1.1.25-2tpvsdz2.mjs +0 -1
  855. package/dist/chunks/rootOptions-1.1.25-6gjd4t0k.mjs +0 -1
  856. package/dist/chunks/runWorkflowHeadless-1.1.25-1x11b1xy.mjs +0 -10
  857. package/dist/chunks/sandbox-adapter-1.1.25-2qsj3g4r.mjs +0 -1
  858. package/dist/chunks/sandbox-toggle-1.1.25-tn86q9kj.mjs +0 -1
  859. package/dist/chunks/session-1.1.25-tpnhf7nk.mjs +0 -2
  860. package/dist/chunks/sessionDiscovery-1.1.25-z48aepj2.mjs +0 -1
  861. package/dist/chunks/sessionFileAccessHooks-1.1.25-w9mqv7x2.mjs +0 -1
  862. package/dist/chunks/sessionStorage-1.1.25-f61wmxkh.mjs +0 -1
  863. package/dist/chunks/settings-1.1.25-5f0ye0zf.mjs +0 -1
  864. package/dist/chunks/setup-1.1.25-hq096wz8.mjs +0 -12
  865. package/dist/chunks/sinks-1.1.25-k89ee9jd.mjs +0 -1
  866. package/dist/chunks/skills-1.1.25-zny3acfm.mjs +0 -1
  867. package/dist/chunks/startupProfiler-1.1.25-jrb54jgv.mjs +0 -1
  868. package/dist/chunks/startupUpdateCheck-1.1.25-0e8arnxt.mjs +0 -1
  869. package/dist/chunks/state-1.1.25-2f0mn1s8.mjs +0 -1
  870. package/dist/chunks/stats-1.1.25-w4v85n4m.mjs +0 -1
  871. package/dist/chunks/status-1.1.25-vyxf29s0.mjs +0 -1
  872. package/dist/chunks/stickers-1.1.25-db9b5d86.mjs +0 -1
  873. package/dist/chunks/subprocessEnv-1.1.25-b06h7dn5.mjs +0 -1
  874. package/dist/chunks/tasks-1.1.25-d44s3czy.mjs +0 -1
  875. package/dist/chunks/teamHelpers-1.1.25-yy2zwqy3.mjs +0 -1
  876. package/dist/chunks/teammateModeSnapshot-1.1.25-45w75v4y.mjs +0 -1
  877. package/dist/chunks/teleport-1.1.25-5be1s310.mjs +0 -1
  878. package/dist/chunks/terminalSetup-1.1.25-b5a4adgd.mjs +0 -1
  879. package/dist/chunks/theme-1.1.25-wkyf9b5k.mjs +0 -1
  880. package/dist/chunks/thinkback-1.1.25-6575xnpn.mjs +0 -1
  881. package/dist/chunks/thinkback-play-1.1.25-amw47kg0.mjs +0 -1
  882. package/dist/chunks/toolPool-1.1.25-h7pp3y85.mjs +0 -1
  883. package/dist/chunks/toolSearch-1.1.25-brpn0e66.mjs +0 -1
  884. package/dist/chunks/tools-1.1.25-t4rr3y1m.mjs +0 -1
  885. package/dist/chunks/trustedDevice-1.1.25-dgx4z9gb.mjs +0 -1
  886. package/dist/chunks/turndown.cjs-1.1.25-9c24hgzw.mjs +0 -69
  887. package/dist/chunks/types-1.1.25-tj3y8ycy.mjs +0 -1
  888. package/dist/chunks/ultrareviewCommand-1.1.25-kj7js02p.mjs +0 -4
  889. package/dist/chunks/update-1.1.25-fn4tnxnw.mjs +0 -72
  890. package/dist/chunks/upgrade-1.1.25-zd805a6y.mjs +0 -1
  891. package/dist/chunks/upload-1.1.25-nhsynsbb.mjs +0 -7
  892. package/dist/chunks/upstreamproxy-1.1.25-bh4an4es.mjs +0 -14
  893. package/dist/chunks/url-handler-napi-1.1.25-z7v66h19.mjs +0 -1
  894. package/dist/chunks/usage-1.1.25-0frq9der.mjs +0 -1
  895. package/dist/chunks/util-1.1.25-hqbcvpk3.mjs +0 -1
  896. package/dist/chunks/utils-1.1.25-mqy166xe.mjs +0 -1
  897. package/dist/chunks/vim-1.1.25-0gnwfzcy.mjs +0 -1
  898. package/dist/chunks/watchLoop-1.1.25-dnpy6c6e.mjs +0 -13
  899. package/dist/chunks/watcher-1.1.25-43n00zw0.mjs +0 -1
  900. package/dist/chunks/wiki-1.1.25-mvay6amg.mjs +0 -132
  901. package/dist/chunks/workflows-1.1.25-a2drn8b3.mjs +0 -1
  902. package/dist/chunks/worktree-1.1.25-cghd8r64.mjs +0 -1
  903. package/dist/chunks/worktreeModeEnabled-1.1.25-a15vww7v.mjs +0 -1
  904. package/dist/chunks/wrapper-1.1.25-chacpj74.mjs +0 -7
  905. /package/dist/chunks/{cli-1.1.25-r2a8d0xg.mjs → cli-1.1.26-6g0bq6h6.mjs} +0 -0
  906. /package/dist/chunks/{cli-1.1.25-k9qcf2mf.mjs → cli-1.1.26-7q7jw0ck.mjs} +0 -0
  907. /package/dist/chunks/{cli-1.1.25-hdgk2770.mjs → cli-1.1.26-nqygxkhw.mjs} +0 -0
  908. /package/dist/chunks/{cli-1.1.25-cpt1h3j8.mjs → cli-1.1.26-rbz29dt9.mjs} +0 -0
  909. /package/dist/chunks/{cli-1.1.25-s9sv7xk9.mjs → cli-1.1.26-sgj6knz9.mjs} +0 -0
  910. /package/dist/chunks/{cli-1.1.25-ctfh8503.mjs → cli-1.1.26-t8fgt5kw.mjs} +0 -0
@@ -0,0 +1,42 @@
1
+ import{_ta as M5,aua as zX,cua as C,dua as KZ}from"./cli-1.1.26-zb5hq3ry.mjs";function q(Z,$,X,J,z){if(J==="m")throw TypeError("Private method is not writable");if(J==="a"&&!z)throw TypeError("Private accessor was defined without a setter");if(typeof $==="function"?Z!==$||!z:!$.has(Z))throw TypeError("Cannot write private member to an object whose class did not declare it");return J==="a"?z.call(Z,X):z?z.value=X:$.set(Z,X),X}function Y(Z,$,X,J){if(X==="a"&&!J)throw TypeError("Private accessor was defined without a getter");if(typeof $==="function"?Z!==$||!J:!$.has(Z))throw TypeError("Cannot read private member from an object whose class did not declare it");return X==="m"?J:X==="a"?J.call(Z):J?J.value:$.get(Z)}var QZ=()=>{};function wZ(Z){return typeof Z==="object"&&Z!==null&&(("name"in Z)&&Z.name==="AbortError"||("message"in Z)&&String(Z.message).includes("FetchRequestCanceledException"))}var Z0=(Z)=>{if(Z instanceof Error)return Z;if(typeof Z==="object"&&Z!==null){try{let $=Object.prototype.toString.call(Z);if($==="[object Error]"||$==="[object DOMException]"){let X=Error(Z.message,Z.cause?{cause:Z.cause}:{});if(Z.stack)X.stack=Z.stack;if(Z.cause&&!X.cause)X.cause=Z.cause;if(Z.name)X.name=Z.name;return X}}catch{}try{return Error(JSON.stringify(Z))}catch{}}return Error(Z)};var gZ=()=>{};var H,v,e,PZ,t0,P$,s0,e0,Z8,$8,X8,J8,z8,Y8;var m=C(()=>{gZ();H=class H extends Error{};v=class v extends H{constructor(Z,$,X,J,z){super(`${v.makeMessage(Z,$,X)}`);this.status=Z,this.headers=J,this.requestID=J?.get("request-id"),this.workspaceID=J?.get("anthropic-workspace-id"),this.error=$,this.type=z??null}static makeMessage(Z,$,X){let J=$?.message?typeof $.message==="string"?$.message:JSON.stringify($.message):$?JSON.stringify($):X;if(Z&&J)return`${Z} ${J}`;if(Z)return`${Z} status code (no body)`;if(J)return J;return"(no status code or body)"}static generate(Z,$,X,J){if(!Z||!J)return new PZ({message:X,cause:Z0($)});let z=$,Q=z?.error?.type;if(Z===400)return new s0(Z,z,X,J,Q);if(Z===401)return new e0(Z,z,X,J,Q);if(Z===403)return new Z8(Z,z,X,J,Q);if(Z===404)return new $8(Z,z,X,J,Q);if(Z===409)return new X8(Z,z,X,J,Q);if(Z===422)return new J8(Z,z,X,J,Q);if(Z===429)return new z8(Z,z,X,J,Q);if(Z>=500)return new Y8(Z,z,X,J,Q);return new v(Z,z,X,J,Q)}};e=class e extends v{constructor({message:Z}={}){super(void 0,void 0,Z||"Request was aborted.",void 0)}};PZ=class PZ extends v{constructor({message:Z,cause:$}){super(void 0,void 0,Z||"Connection error.",void 0);if($)this.cause=$}};t0=class t0 extends PZ{constructor({message:Z}={}){super({message:Z??"Request timed out."})}};P$=class P$ extends H{constructor(Z,{cause:$}={}){super(Z??"Retryable error.");if($!==void 0)this.cause=$}};s0=class s0 extends v{};e0=class e0 extends v{};Z8=class Z8 extends v{};$8=class $8 extends v{};X8=class X8 extends v{};J8=class J8 extends v{};z8=class z8 extends v{};Y8=class Y8 extends v{}});var _Z;var Q8=C(()=>{_Z=class _Z extends Error{constructor(Z){let $=typeof Z==="string"?Z:Z.map((X)=>{if(X.type==="text")return X.text;return`[${X.type}]`}).join(" ");super($);this.name="ToolError",this.content=Z}}});function Y6(Z,$){if(!(Z>=z6))throw new H(`${$} must be at least ${z6}ms (got ${Z}); to run without memory sync, pass \`memorySyncIntervalMs: null\` to the worker instead`)}var aJ=15000,z6=5000;var Q6=C(()=>{m()});function pX(){let Z,$;return{promise:new Promise((J,z)=>{Z=J,$=z}),resolve:Z,reject:$}}var K6=()=>{};var w0=function(){let{crypto:Z}=globalThis;if(Z?.randomUUID)return w0=Z.randomUUID.bind(Z),Z.randomUUID();let $=new Uint8Array(1),X=Z?()=>Z.getRandomValues($)[0]:()=>Math.random()*255&255;return"10000000-1000-4000-8000-100000000000".replace(/[018]/g,(J)=>(+J^X()&15>>+J/4).toString(16))};var I$=()=>{};function K8(Z){if(typeof Z!=="object")return{};return Z??{}}function iX(Z){if(!Z)return!0;for(let $ in Z)return!1;return!0}function N6(Z,$){return Object.prototype.hasOwnProperty.call(Z,$)}function nX(Z){return Z!=null&&typeof Z==="object"&&!Array.isArray(Z)}function vZ(Z){}var L7,V6=(Z)=>{return L7.test(Z)},ZZ=(Z)=>(ZZ=Array.isArray,ZZ(Z)),lX,W6=(Z,$)=>{if(typeof $!=="number"||!Number.isInteger($))throw new H(`${Z} must be an integer`);if($<0)throw new H(`${Z} must be a positive integer`);return $},V8=(Z)=>{try{return JSON.parse(Z)}catch($){return}};var XZ=C(()=>{m();L7=/^[a-z][a-z0-9+.-]*:/i,lX=ZZ});var xZ=(Z,$)=>new Promise((X)=>{if($?.aborted)return X();let J=()=>{clearTimeout(z),X()},z=setTimeout(()=>{$?.removeEventListener("abort",J),X()},Z);$?.addEventListener("abort",J,{once:!0})});var C0=()=>{};var CZ="0.122.0";var N8=()=>{};function j7(){if(typeof Deno<"u"&&Deno.build!=null)return"deno";if(typeof EdgeRuntime<"u")return"edge";if(Object.prototype.toString.call(typeof globalThis.process<"u"?globalThis.process:0)==="[object process]")return"node";return"unknown"}function E7(){if(typeof navigator>"u"||!navigator)return null;let Z=[{key:"edge",pattern:/Edge(?:\W+(\d+)\.(\d+)(?:\.(\d+))?)?/},{key:"ie",pattern:/MSIE(?:\W+(\d+)\.(\d+)(?:\.(\d+))?)?/},{key:"ie",pattern:/Trident(?:.*rv\:(\d+)\.(\d+)(?:\.(\d+))?)?/},{key:"chrome",pattern:/Chrome(?:\W+(\d+)\.(\d+)(?:\.(\d+))?)?/},{key:"firefox",pattern:/Firefox(?:\W+(\d+)\.(\d+)(?:\.(\d+))?)?/},{key:"safari",pattern:/(?:Version\W+(\d+)\.(\d+)(?:\.(\d+))?)?(?:\W+Mobile\S*)?\W+Safari/}];for(let{key:$,pattern:X}of Z){let J=X.exec(navigator.userAgent);if(J){let z=J[1]||0,Q=J[2]||0,V=J[3]||0;return{browser:$,version:`${z}.${Q}.${V}`}}}return null}var q6=()=>{return typeof window<"u"&&typeof window.document<"u"&&typeof navigator<"u"},S7=()=>{let Z=j7();if(Z==="deno")return{"X-Stainless-Lang":"js","X-Stainless-Package-Version":CZ,"X-Stainless-OS":G6(Deno.build.os),"X-Stainless-Arch":U6(Deno.build.arch),"X-Stainless-Runtime":"deno","X-Stainless-Runtime-Version":typeof Deno.version==="string"?Deno.version:Deno.version?.deno??"unknown"};if(typeof EdgeRuntime<"u")return{"X-Stainless-Lang":"js","X-Stainless-Package-Version":CZ,"X-Stainless-OS":"Unknown","X-Stainless-Arch":`other:${EdgeRuntime}`,"X-Stainless-Runtime":"edge","X-Stainless-Runtime-Version":globalThis.process?.version??"unknown"};if(Z==="node")return{"X-Stainless-Lang":"js","X-Stainless-Package-Version":CZ,"X-Stainless-OS":G6(globalThis.process.platform??"unknown"),"X-Stainless-Arch":U6(globalThis.process.arch??"unknown"),"X-Stainless-Runtime":"node","X-Stainless-Runtime-Version":globalThis.process.version??"unknown"};let $=E7();if($)return{"X-Stainless-Lang":"js","X-Stainless-Package-Version":CZ,"X-Stainless-OS":"Unknown","X-Stainless-Arch":"unknown","X-Stainless-Runtime":`browser:${$.browser}`,"X-Stainless-Runtime-Version":$.version};return{"X-Stainless-Lang":"js","X-Stainless-Package-Version":CZ,"X-Stainless-OS":"Unknown","X-Stainless-Arch":"unknown","X-Stainless-Runtime":"unknown","X-Stainless-Runtime-Version":"unknown"}},U6=(Z)=>{if(Z==="x32")return"x32";if(Z==="x86_64"||Z==="x64")return"x64";if(Z==="arm")return"arm";if(Z==="aarch64"||Z==="arm64")return"arm64";if(Z)return`other:${Z}`;return"unknown"},G6=(Z)=>{if(Z=Z.toLowerCase(),Z.includes("ios"))return"iOS";if(Z==="android")return"Android";if(Z==="darwin")return"MacOS";if(Z==="win32")return"Windows";if(Z==="freebsd")return"FreeBSD";if(Z==="openbsd")return"OpenBSD";if(Z==="linux")return"Linux";if(Z)return`Other:${Z}`;return"Unknown"},O6,W8=()=>{return O6??(O6=S7())};var f$=C(()=>{N8()});function F7(Z,$){return()=>Z.removeEventListener("abort",$)}function C6(Z,$,X){y$.set(Z,F7($,X))}function M6(Z,$){if(y$.has($))w6?.register(Z,$,$)}function SZ(Z){let $=y$.get(Z);if($)y$.delete(Z),w6?.unregister(Z),$()}var y$,w6;var k$=C(()=>{y$=new WeakMap,w6=typeof globalThis.FinalizationRegistry==="function"?new globalThis.FinalizationRegistry((Z)=>SZ(Z)):null});function B6(){if(typeof fetch<"u")return fetch;throw Error("`fetch` is not defined as a global; Either pass `fetch` to the client, `new Anthropic({ fetch })` or polyfill the global, `globalThis.fetch = fetch`")}function aX(...Z){let $=globalThis.ReadableStream;if(typeof $>"u")throw Error("`ReadableStream` is not defined as a global; You will need to polyfill it, `globalThis.ReadableStream = ReadableStream`");return new $(...Z)}function h$(Z){let $=Symbol.asyncIterator in Z?Z[Symbol.asyncIterator]():Z[Symbol.iterator]();return aX({start(){},async pull(X){let{done:J,value:z}=await $.next();if(J)X.close();else X.enqueue(z)},async cancel(){await $.return?.()}})}function U8(Z){if(Z[Symbol.asyncIterator])return Z;let $=Z.getReader();return{async next(){try{let X=await $.read();if(X?.done)$.releaseLock();return X}catch(X){throw $.releaseLock(),X}},async return(){let X=$.cancel();return $.releaseLock(),await X,{done:!0,value:void 0}},[Symbol.asyncIterator](){return this}}}async function H6(Z){if(Z===null||typeof Z!=="object")return;if(Z[Symbol.asyncIterator]){await Z[Symbol.asyncIterator]().return?.();return}let $=Z.getReader(),X=$.cancel();$.releaseLock(),await X}var M0=()=>{};var T6=({headers:Z,body:$})=>{return{bodyHeaders:{"content-type":"application/json"},body:JSON.stringify($)}};var rX=()=>{};var oX="RFC3986",tX=(Z)=>String(Z),sX,x6="RFC1738";var eX=C(()=>{sX={RFC1738:(Z)=>String(Z).replace(/%20/g,"+"),RFC3986:tX}});function L6(Z){if(!Z||typeof Z!=="object")return!1;return!!(Z.constructor&&Z.constructor.isBuffer&&Z.constructor.isBuffer(Z))}function $1(Z,$){if(ZZ(Z)){let X=[];for(let J=0;J<Z.length;J+=1)X.push($(Z[J]));return X}return $(Z)}var b$=(Z,$)=>(b$=Object.hasOwn??Function.prototype.call.bind(Object.prototype.hasOwnProperty),b$(Z,$)),EZ,Z1=1024,A6=(Z,$,X,J,z)=>{if(Z.length===0)return Z;let Q=Z;if(typeof Z==="symbol")Q=Symbol.prototype.toString.call(Z);else if(typeof Z!=="string")Q=String(Z);if(X==="iso-8859-1")return escape(Q).replace(/%u[0-9a-f]{4}/gi,function(K){return"%26%23"+parseInt(K.slice(2),16)+"%3B"});let V="";for(let K=0;K<Q.length;K+=Z1){let G=Q.length>=Z1?Q.slice(K,K+Z1):Q,w=[];for(let x=0;x<G.length;++x){let O=G.charCodeAt(x);if(O===45||O===46||O===95||O===126||O>=48&&O<=57||O>=65&&O<=90||O>=97&&O<=122||z===x6&&(O===40||O===41)){w[w.length]=G.charAt(x);continue}if(O<128){w[w.length]=EZ[O];continue}if(O<2048){w[w.length]=EZ[192|O>>6]+EZ[128|O&63];continue}if(O<55296||O>=57344){w[w.length]=EZ[224|O>>12]+EZ[128|O>>6&63]+EZ[128|O&63];continue}x+=1,O=65536+((O&1023)<<10|G.charCodeAt(x)&1023),w[w.length]=EZ[240|O>>18]+EZ[128|O>>12&63]+EZ[128|O>>6&63]+EZ[128|O&63]}V+=w.join("")}return V};var j6=C(()=>{eX();XZ();EZ=(()=>{let Z=[];for(let $=0;$<256;++$)Z.push("%"+(($<16?"0":"")+$.toString(16)).toUpperCase());return Z})()});function P7(Z){return typeof Z==="string"||typeof Z==="number"||typeof Z==="boolean"||typeof Z==="symbol"||typeof Z==="bigint"}function D6(Z,$,X,J,z,Q,V,K,G,w,x,O,U,B,T,P,j,S){let A=Z,F=S,f=0,h=!1;while((F=F.get(X1))!==void 0&&!h){let i=F.get(Z);if(f+=1,typeof i<"u")if(i===f)throw RangeError("Cyclic object value");else h=!0;if(typeof F.get(X1)>"u")f=0}if(typeof w==="function")A=w($,A);else if(A instanceof Date)A=U?.(A);else if(X==="comma"&&ZZ(A))A=$1(A,function(i){if(i instanceof Date)return U?.(i);return i});if(A===null){if(Q)return G&&!P?G($,o.encoder,j,"key",B):$;A=""}if(P7(A)||L6(A)){if(G){let i=P?$:G($,o.encoder,j,"key",B);return[T?.(i)+"="+T?.(G(A,o.encoder,j,"value",B))]}return[T?.($)+"="+T?.(String(A))]}let g=[];if(typeof A>"u")return g;let _;if(X==="comma"&&ZZ(A)){if(P&&G)A=$1(A,G);_=[{value:A.length>0?A.join(",")||null:void 0}]}else if(ZZ(w))_=w;else{let i=Object.keys(A);_=x?i.sort(x):i}let n=K?String($).replace(/\./g,"%2E"):String($),u=J&&ZZ(A)&&A.length===1?n+"[]":n;if(z&&ZZ(A)&&A.length===0)return u+"[]";for(let i=0;i<_.length;++i){let qZ=_[i],eZ=typeof qZ==="object"&&typeof qZ.value<"u"?qZ.value:A[qZ];if(V&&eZ===null)continue;let dX=O&&K?qZ.replace(/\./g,"%2E"):qZ,x7=ZZ(A)?typeof X==="function"?X(u,dX):u:u+(O?"."+dX:"["+dX+"]");S.set(Z,f);let J6=new WeakMap;J6.set(X1,S),F6(g,D6(eZ,x7,X,J,z,Q,V,K,X==="comma"&&P&&ZZ(A)?null:G,w,x,O,U,B,T,P,j,J6))}return g}function I7(Z=o){if(typeof Z.allowEmptyArrays<"u"&&typeof Z.allowEmptyArrays!=="boolean")throw TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(typeof Z.encodeDotInKeys<"u"&&typeof Z.encodeDotInKeys!=="boolean")throw TypeError("`encodeDotInKeys` option can only be `true` or `false`, when provided");if(Z.encoder!==null&&typeof Z.encoder<"u"&&typeof Z.encoder!=="function")throw TypeError("Encoder has to be a function.");let $=Z.charset||o.charset;if(typeof Z.charset<"u"&&Z.charset!=="utf-8"&&Z.charset!=="iso-8859-1")throw TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");let X=oX;if(typeof Z.format<"u"){if(!b$(sX,Z.format))throw TypeError("Unknown format option provided.");X=Z.format}let J=sX[X],z=o.filter;if(typeof Z.filter==="function"||ZZ(Z.filter))z=Z.filter;let Q;if(Z.arrayFormat&&Z.arrayFormat in E6)Q=Z.arrayFormat;else if("indices"in Z)Q=Z.indices?"indices":"repeat";else Q=o.arrayFormat;if("commaRoundTrip"in Z&&typeof Z.commaRoundTrip!=="boolean")throw TypeError("`commaRoundTrip` must be a boolean, or absent");let V=typeof Z.allowDots>"u"?!!Z.encodeDotInKeys===!0?!0:o.allowDots:!!Z.allowDots;return{addQueryPrefix:typeof Z.addQueryPrefix==="boolean"?Z.addQueryPrefix:o.addQueryPrefix,allowDots:V,allowEmptyArrays:typeof Z.allowEmptyArrays==="boolean"?!!Z.allowEmptyArrays:o.allowEmptyArrays,arrayFormat:Q,charset:$,charsetSentinel:typeof Z.charsetSentinel==="boolean"?Z.charsetSentinel:o.charsetSentinel,commaRoundTrip:!!Z.commaRoundTrip,delimiter:typeof Z.delimiter>"u"?o.delimiter:Z.delimiter,encode:typeof Z.encode==="boolean"?Z.encode:o.encode,encodeDotInKeys:typeof Z.encodeDotInKeys==="boolean"?Z.encodeDotInKeys:o.encodeDotInKeys,encoder:typeof Z.encoder==="function"?Z.encoder:o.encoder,encodeValuesOnly:typeof Z.encodeValuesOnly==="boolean"?Z.encodeValuesOnly:o.encodeValuesOnly,filter:z,format:X,formatter:J,serializeDate:typeof Z.serializeDate==="function"?Z.serializeDate:o.serializeDate,skipNulls:typeof Z.skipNulls==="boolean"?Z.skipNulls:o.skipNulls,sort:typeof Z.sort==="function"?Z.sort:null,strictNullHandling:typeof Z.strictNullHandling==="boolean"?Z.strictNullHandling:o.strictNullHandling}}function R6(Z,$={}){let X=Z,J=I7($),z,Q;if(typeof J.filter==="function")Q=J.filter,X=Q("",X);else if(ZZ(J.filter))Q=J.filter,z=Q;let V=[];if(typeof X!=="object"||X===null)return"";let K=E6[J.arrayFormat],G=K==="comma"&&J.commaRoundTrip;if(!z)z=Object.keys(X);if(J.sort)z.sort(J.sort);let w=new WeakMap;for(let U=0;U<z.length;++U){let B=z[U];if(J.skipNulls&&X[B]===null)continue;F6(V,D6(X[B],B,K,G,J.allowEmptyArrays,J.strictNullHandling,J.skipNulls,J.encodeDotInKeys,J.encode?J.encoder:null,J.filter,J.sort,J.allowDots,J.serializeDate,J.format,J.formatter,J.encodeValuesOnly,J.charset,w))}let x=V.join(J.delimiter),O=J.addQueryPrefix===!0?"?":"";if(J.charsetSentinel)if(J.charset==="iso-8859-1")O+="utf8=%26%2310003%3B&";else O+="utf8=%E2%9C%93&";return x.length>0?O+x:""}var E6,F6=function(Z,$){Array.prototype.push.apply(Z,ZZ($)?$:[$])},S6,o,X1;var P6=C(()=>{j6();eX();XZ();E6={brackets(Z){return String(Z)+"[]"},comma:"comma",indices(Z,$){return String(Z)+"["+$+"]"},repeat(Z){return String(Z)}},o={addQueryPrefix:!1,allowDots:!1,allowEmptyArrays:!1,arrayFormat:"indices",charset:"utf-8",charsetSentinel:!1,delimiter:"&",encode:!0,encodeDotInKeys:!1,encoder:A6,encodeValuesOnly:!1,format:oX,formatter:tX,indices:!1,serializeDate(Z){return(S6??(S6=Function.prototype.call.bind(Date.prototype.toISOString)))(Z)},skipNulls:!1,strictNullHandling:!1};X1={}});function I6(Z){return R6(Z,{arrayFormat:"brackets"})}var J1=C(()=>{P6()});function _$(Z){if(!Z)return;let $;try{$=new URL(Z)}catch(J){throw new b(`Invalid token endpoint base URL "${Z}": ${J}`)}if($.protocol==="https:")return;let X=$.hostname.toLowerCase().replace(/^\[|\]$/g,"");if($.protocol==="http:"&&(X==="localhost"||X==="127.0.0.1"||X==="::1"))return;throw new b(`Refusing to send credential over non-https token endpoint "${Z}"`)}async function v$(Z,$){let X=await k7(Z),J;try{J=JSON.parse(X)}catch{throw new b(`Token endpoint returned non-JSON response (status ${Z.status})`,Z.status,JZ(X),$)}if(!J.access_token)throw new b(`Token endpoint response missing access_token: ${JSON.stringify(JZ(J))}`,Z.status,JZ(J),$);if(J.token_type&&J.token_type.toLowerCase()!=="bearer")throw new b(`Token endpoint response: unsupported token_type "${J.token_type}" (want Bearer)`,Z.status,JZ(J),$);return J}function JZ(Z){if(Z==null)return Z;if(typeof Z==="string"){let $;try{$=JSON.parse(Z)}catch{if(Z.length<=z1)return Z;return Z.slice(0,z1)+`... <${Z.length-z1} more chars>`}return JSON.stringify(JZ($))}if(typeof Z==="object"&&!Array.isArray(Z)){let $={};for(let[X,J]of Object.entries(Z))if(y7.has(X))$[X]=J;return $}return null}async function m$(Z,$=(X)=>console.warn(`anthropic-sdk: ${X}`)){if(typeof process>"u"||process.platform==="win32")return;let X=await import("node:fs"),J=Z,z;try{J=await X.promises.realpath(Z),z=await X.promises.stat(J)}catch{return}let Q=z.mode&511;if(Q&18)throw new b(`Credentials file at ${J} is group/world-writable (mode 0o${Q.toString(8)}); this allows other local users to plant tokens. Run \`chmod 600 ${J}\`.`);if(Q&36)throw new b(`Credentials file at ${J} is group/world-readable (mode 0o${Q.toString(8)}); run \`chmod 600 ${J}\` before retrying.`);if(typeof process.getuid==="function"&&z.uid!==process.getuid())$(`credentials file at ${J} is owned by uid ${z.uid} (current process uid ${process.getuid()}); verify this is intentional.`)}async function u$(Z,$){let X=await import("node:fs"),z=(await import("node:path")).dirname(Z);await X.promises.mkdir(z,{recursive:!0,mode:448});let Q=`${Z}.${process.pid}.${Math.random().toString(36).slice(2)}.tmp`;try{let V=await X.promises.open(Q,"w",384);try{await V.writeFile(JSON.stringify($,null,2)),await V.sync()}finally{await V.close()}await X.promises.rename(Q,Z)}catch(V){throw await X.promises.unlink(Q).catch(()=>{}),V}try{let V=await X.promises.open(z,"r");try{await V.sync()}finally{await V.close()}}catch{}}async function k7(Z){if(!Z.body)return"";let $=Z.body.getReader(),X=[],J=0;for(;;){let{done:Q,value:V}=await $.read();if(Q)break;if(J+V.length>f6){let K=f6-J;if(K>0)X.push(V.subarray(0,K));await $.cancel();break}X.push(V),J+=V.length}let z;if(X.length===1)z=X[0];else{z=new Uint8Array(X.reduce((V,K)=>V+K.length,0));let Q=0;for(let V of X)z.set(V,Q),Q+=V.length}return new TextDecoder("utf-8").decode(z)}var y6="urn:ietf:params:oauth:grant-type:jwt-bearer",k6="refresh_token",g$="/v1/oauth/token",$0="oauth-2025-04-20",h6="oidc-federation-2026-04-01",b6=120,B0=30,g6=5,f6=1048576,z1=2000,y7,b;var H0=C(()=>{m();y7=new Set(["error","error_description","error_uri"]);b=class b extends H{constructor(Z,$=null,X=null,J=null){super(Z);this.statusCode=$,this.body=X,this.requestId=J}}});function AZ(){return Math.floor(Date.now()/1000)}var G8=()=>{};class Y1{constructor(Z,$){this.cached=null,this.pendingRefresh=null,this.nextForce=!1,this.lastAdvisoryError=0,this.provider=Z,this.onAdvisoryRefreshError=$}async getToken(){let Z=this.nextForce;this.nextForce=!1;let $=this.cached;if(Z||$==null)return(await this.refresh(Z)).token;if($.expiresAt==null)return $.token;let X=$.expiresAt-AZ();if(X>b6)return $.token;if(X>B0)return this.backgroundRefresh(),$.token;return(await this.refresh()).token}invalidate(){this.cached=null,this.nextForce=!0}refresh(Z=!1){if(this.pendingRefresh&&!Z)return this.pendingRefresh;return this.doRefresh(Z)}backgroundRefresh(){if(this.pendingRefresh)return;if(AZ()-this.lastAdvisoryError<g6)return;this.doRefresh().catch((Z)=>{this.lastAdvisoryError=AZ(),this.onAdvisoryRefreshError?.(Z)})}doRefresh(Z=!1){return this.pendingRefresh=this.provider(Z?{forceRefresh:!0}:void 0).then(($)=>{return this.cached=$,this.pendingRefresh=null,$},($)=>{throw this.pendingRefresh=null,$}),this.pendingRefresh}}var _6=C(()=>{H0();G8()});var y=(Z)=>{if(typeof globalThis.process<"u")return globalThis.process.env?.[Z]?.trim()||void 0;if(typeof globalThis.Deno<"u")return globalThis.Deno.env?.get?.(Z)?.trim()||void 0;return};var T0=()=>{};function u6(Z){let $=0;for(let z of Z)$+=z.length;let X=new Uint8Array($),J=0;for(let z of Z)X.set(z,J),J+=z.length;return X}function x0(Z){let $;return(v6??($=new globalThis.TextEncoder,v6=$.encode.bind($)))(Z)}function O8(Z){let $;return(m6??($=new globalThis.TextDecoder,m6=$.decode.bind($)))(Z)}var v6,m6;var q8=()=>{};var c6=(Z)=>{if(typeof globalThis.Buffer<"u"){let $=globalThis.Buffer.from(Z,"base64");return new Uint8Array($.buffer,$.byteOffset,$.byteLength)}if(typeof atob<"u"){let $=atob(Z),X=new Uint8Array($.length);for(let J=0;J<$.length;J++)X[J]=$.charCodeAt(J);return X}throw new H("Cannot decode base64 string; Expected `Buffer` or `atob` to be defined")};var Q1=C(()=>{m();q8()});function w8(){}function c$(Z,$,X){if(!$||d$[Z]>d$[X])return w8;else return $[Z].bind($)}function V1(Z,$){let X=d6.get(Z);if(X&&X[0]===$)return X[1];let J={error:c$("error",Z,$),warn:c$("warn",Z,$),info:c$("info",Z,$),debug:c$("debug",Z,$)};return d6.set(Z,[$,J]),J}function k(Z){let $=Z.logger,X=Z.logLevel??"off";if(!$)return h7;return V1($,X)}function l6(){let Z=y("ANTHROPIC_LOG");if(!K1||Z!==p6)p6=Z,K1=V1(console,p$(Z,"process.env['ANTHROPIC_LOG']",V1(console,C8))??C8);return K1}var C8="warn",d$,p$=(Z,$,X)=>{if(!Z)return;if(N6(d$,Z))return Z;X.warn(`${$} was set to ${JSON.stringify(Z)}, expected one of ${JSON.stringify(Object.keys(d$))}`);return},h7,d6,p6,K1,FZ=(Z)=>{if(Z.options)Z.options={...Z.options},delete Z.options.headers;if(Z.headers)Z.headers=Object.fromEntries((Z.headers instanceof Headers?[...Z.headers]:Object.entries(Z.headers)).map(([$,X])=>[$,$.toLowerCase()==="authorization"||$.toLowerCase()==="api-key"||$.toLowerCase()==="x-api-key"||$.toLowerCase()==="cookie"||$.toLowerCase()==="set-cookie"?"***":X]));if("retryOfRequestLogID"in Z){if(Z.retryOfRequestLogID)Z.retryOf=Z.retryOfRequestLogID;delete Z.retryOfRequestLogID}return Z};var IZ=C(()=>{XZ();T0();d$={off:0,error:200,warn:300,info:400,debug:500};h7={error:w8,warn:w8,info:w8,debug:w8},d6=new WeakMap});var i6=C(()=>{XZ();Q1();T0();IZ();I$();C0();J1()});function n6(Z){if(!Z)throw Error("profile name is empty");if(Z==="."||Z==="..")throw Error(`profile name "${Z}" is not allowed`);if(Z.includes("/")||Z.includes("\\"))throw Error(`profile name "${Z}" must not contain path separators`);if(!b7.test(Z))throw Error(`profile name "${Z}" contains disallowed characters (allowed: letters, digits, '_', '.', '-')`)}var l$="1.0",b7,a6=async(Z)=>{var $,X;let J=await N1();if(J===null)return null;let z=Z??await o6();if(z===null)return null;n6(z);let Q=await import("node:fs"),K=(await import("node:path")).join(J,"configs",`${z}.json`),G;try{G=await Q.promises.readFile(K,"utf-8")}catch(O){if(O?.code!=="ENOENT")throw Error(`failed to read config file ${K}: ${O}`);G=null}if(G===null){let O=y("ANTHROPIC_ORGANIZATION_ID"),U=y("ANTHROPIC_IDENTITY_TOKEN_FILE"),B=y("ANTHROPIC_FEDERATION_RULE_ID");if(B&&O)return{fromFile:!1,config:{organization_id:O,workspace_id:y("ANTHROPIC_WORKSPACE_ID"),base_url:y("ANTHROPIC_BASE_URL"),authentication:{type:"oidc_federation",federation_rule_id:B,service_account_id:y("ANTHROPIC_SERVICE_ACCOUNT_ID"),identity_token:U?{source:"file",path:U}:void 0,scope:y("ANTHROPIC_SCOPE")}}};return null}let w;try{w=JSON.parse(G)}catch(O){throw Error(`failed to parse config file ${K}: ${O}`)}if(!w.authentication)throw Error(`config file ${K} is missing "authentication"`);let x=w.authentication.type;if(x!=="oidc_federation"&&x!=="user_oauth")throw Error(`authentication.type "${x}" is not a known authentication type`);if(w.organization_id??(w.organization_id=y("ANTHROPIC_ORGANIZATION_ID")),w.workspace_id??(w.workspace_id=y("ANTHROPIC_WORKSPACE_ID")),w.base_url??(w.base_url=y("ANTHROPIC_BASE_URL")),($=w.authentication).scope??($.scope=y("ANTHROPIC_SCOPE")),w.authentication.type==="oidc_federation"){if(!w.authentication.identity_token){let O=y("ANTHROPIC_IDENTITY_TOKEN_FILE");if(O)w.authentication.identity_token={source:"file",path:O}}if(!w.authentication.federation_rule_id)w.authentication.federation_rule_id=y("ANTHROPIC_FEDERATION_RULE_ID")??"";(X=w.authentication).service_account_id??(X.service_account_id=y("ANTHROPIC_SERVICE_ACCOUNT_ID"))}return{config:w,fromFile:!0}},r6=async(Z,$)=>{if(Z?.authentication.credentials_path)return Z.authentication.credentials_path;let X=await N1();if(!X)return null;let J=$??await o6();if(!J)return null;return n6(J),(await import("node:path")).join(X,"credentials",`${J}.json`)},N1=async()=>{if(!g7())return null;let Z=await import("node:path"),$=y("ANTHROPIC_CONFIG_DIR");if($)return $;if(W8()["X-Stainless-OS"]==="Windows"){let Q=y("APPDATA");if(Q)return Z.join(Q,"Anthropic");let V=y("USERPROFILE");if(V)return Z.join(V,"AppData","Roaming","Anthropic");return null}let J=y("XDG_CONFIG_HOME");if(J)return Z.join(J,"anthropic");let z=y("HOME");if(z)return Z.join(z,".config","anthropic");return null},g7=()=>{let Z=W8()["X-Stainless-Runtime"];return Z==="node"||Z==="deno"},o6=async()=>{let Z=await N1();if(!Z)return null;let $=y("ANTHROPIC_PROFILE");if($)return $;let X=await import("node:fs"),z=(await import("node:path")).join(Z,"active_config");try{return(await X.promises.readFile(z,"utf-8")).trim()||"default"}catch(Q){if(Q?.code!=="ENOENT")throw Error(`failed to read ${z}: ${Q}`);return"default"}};var W1=C(()=>{f$();i6();b7=/^[A-Za-z0-9_.-]+$/});function U1(Z){if(!Z)throw new H("Identity token file path is empty");return async()=>{let $=await import("node:fs"),X;try{X=await $.promises.readFile(Z,"utf-8")}catch(z){throw new H(`Failed to read identity token file at ${Z}: ${z}`)}let J=X.trim();if(!J)throw new H(`Identity token file at ${Z} is empty`);return J}}function t6(Z){if(!Z)throw new H("Identity token value is empty");return()=>Z}var s6=C(()=>{m()});function e6(Z){return async()=>{_$(Z.baseURL);let $=await Z.identityTokenProvider();if($.length>16384)throw new b(`Identity token is ${Math.ceil($.length/1024)} KiB, exceeds the 16 KiB assertion limit`);let X={grant_type:y6,assertion:$,federation_rule_id:Z.federationRuleId,organization_id:Z.organizationId};if(Z.serviceAccountId)X.service_account_id=Z.serviceAccountId;if(Z.workspaceId)X.workspace_id=Z.workspaceId;let J=`${Z.baseURL}${g$}`,z;try{z=await Z.fetch(J,{method:"POST",headers:{"Content-Type":"application/json","anthropic-beta":`${$0},${h6}`,"User-Agent":Z.userAgent||`anthropic-sdk-typescript/${CZ} oidcFederationProvider`},body:JSON.stringify(X)})}catch(G){throw new b(`Failed to reach token endpoint ${J}: ${G}`)}let Q=z.headers.get("Request-Id");if(!z.ok){let G=await z.text().catch(()=>""),w=JZ(G),x="";if(z.status===401)x=` Ensure your federation rule matches your identity token. ${Z.workspaceId?"":"If your federation rule is scoped to multiple workspaces, set the ANTHROPIC_WORKSPACE_ID environment variable, the 'workspace_id' config key, or the `workspaceId` option. "}View your authentication events in the Workload identity page of Claude Console for more details.`;throw new b(`Token exchange failed with status ${z.status}${Q?` (request-id ${Q})`:""}: ${w}${x}`,z.status,w,Q)}let V=await v$(z,Q),K=Number(V.expires_in);if(!Number.isFinite(K))throw new b(`Token endpoint response missing required fields: ${JSON.stringify(JZ(V))}`,z.status,JZ(V),Q);return{token:V.access_token,expiresAt:AZ()+K}}}var Z9=C(()=>{H0();G8();N8()});function $9(Z){return async($)=>{let X=await import("node:fs");await m$(Z.credentialsPath,Z.onSafetyWarning);let J;try{J=await X.promises.readFile(Z.credentialsPath,"utf-8")}catch(j){throw new b(`Credentials file not found at ${Z.credentialsPath}: ${j}`)}let z;try{z=JSON.parse(J)}catch(j){throw new b(`Credentials file at ${Z.credentialsPath} is not valid JSON: ${j}`)}let Q=z.access_token;if(!Q)throw new b(`Credentials file at ${Z.credentialsPath} must include 'access_token'`);let V=z.expires_at;if(!$?.forceRefresh&&(V==null||AZ()<V-B0))return{token:Q,expiresAt:V??null};let K=z.refresh_token;if(!Z.clientId||!K)throw new b(`Access token at ${Z.credentialsPath} has expired and no refresh is available (client_id ${Z.clientId?"set":"empty"}, refresh_token ${K?"set":"empty"})`);_$(Z.baseURL);let G={grant_type:k6,refresh_token:K,client_id:Z.clientId},w=`${Z.baseURL}${g$}`,x;try{x=await Z.fetch(w,{method:"POST",headers:{"Content-Type":"application/json","anthropic-beta":$0,"User-Agent":Z.userAgent||`anthropic-sdk-typescript/${CZ} userOAuthProvider`},body:JSON.stringify(G)})}catch(j){throw new b(`User OAuth refresh failed to reach token endpoint: ${j}`)}let O=x.headers.get("Request-Id");if(!x.ok){let j=await x.text().catch(()=>"");throw new b(`User OAuth refresh failed (HTTP ${x.status}): ${JZ(j)}`,x.status,JZ(j),O)}let U=await v$(x,O),B=Number(U.expires_in);if(!Number.isFinite(B))throw new b(`User OAuth refresh response missing or invalid expires_in: ${JSON.stringify(JZ(U))}`,x.status,JZ(U),O);let T=AZ()+B,P=U.refresh_token||K;return await u$(Z.credentialsPath,{...z,version:l$,type:"oauth_token",access_token:U.access_token,expires_at:T,refresh_token:P}),{token:U.access_token,expiresAt:T}}}var X9=C(()=>{W1();H0();G8();N8()});function G1(Z,$){let X=Z.authentication.credentials_path??null,J=(Z.base_url||$.baseURL).replace(/\/+$/,""),z=_7(Z,X,J,$),Q={};if(Z.workspace_id&&Z.authentication.type==="user_oauth")Q["anthropic-workspace-id"]=Z.workspace_id;return{provider:z,extraHeaders:Q,baseURL:Z.base_url||void 0}}async function J9(Z,$){let X=await a6($);if(!X)return null;let{config:J,fromFile:z}=X,Q=J.authentication.credentials_path||!z?J:{...J,authentication:{...J.authentication,credentials_path:await r6(J,$)??void 0}};return G1(Q,Z)}function _7(Z,$,X,J){switch(Z.authentication.type){case"oidc_federation":{let z=Z.authentication,Q=v7(z);if(!Q)throw new b("oidc_federation config requires an identity token (set authentication.identity_token, ANTHROPIC_IDENTITY_TOKEN_FILE, or ANTHROPIC_IDENTITY_TOKEN)");if(!z.federation_rule_id)throw new b("oidc_federation config requires 'federation_rule_id'. Set it in authentication.federation_rule_id in your profile, or via ANTHROPIC_FEDERATION_RULE_ID (profile takes precedence).");if(!Z.organization_id)throw new b("oidc_federation config requires organization_id (set ANTHROPIC_ORGANIZATION_ID or config.organization_id)");let V=e6({identityTokenProvider:Q,federationRuleId:z.federation_rule_id,organizationId:Z.organization_id,serviceAccountId:z.service_account_id,workspaceId:Z.workspace_id,baseURL:X,fetch:J.fetch,userAgent:J.userAgent});if($)return m7(V,$,J.onCacheWriteError,J.onSafetyWarning);return V}case"user_oauth":{if(!$)throw new b("user_oauth config requires authentication.credentials_path (or load via a profile so it defaults to <config_dir>/credentials/<profile>.json)");return $9({credentialsPath:$,clientId:Z.authentication.client_id,baseURL:X,fetch:J.fetch,userAgent:J.userAgent,onSafetyWarning:J.onSafetyWarning})}default:{let z=Z.authentication.type;throw new b(`authentication.type "${z}" is not a known authentication type`)}}}function v7(Z){if(Z.identity_token){let J=Z.identity_token.source;if(J!=="file")throw new b(`identity_token.source "${J}" is not supported by this SDK version (only "file")`);if(!Z.identity_token.path)throw new b('identity_token.source "file" requires a non-empty path');return U1(Z.identity_token.path)}let $=y("ANTHROPIC_IDENTITY_TOKEN_FILE");if($)return U1($);let X=y("ANTHROPIC_IDENTITY_TOKEN");if(X)return t6(X);return null}function m7(Z,$,X,J){return async(z)=>{let Q=await import("node:fs");await m$($,J);let V;try{let G=await Q.promises.readFile($,"utf-8");V=JSON.parse(G);let w=V?.access_token;if(w&&!z?.forceRefresh){let x=V?.expires_at;if(x==null||AZ()<x-B0)return{token:w,expiresAt:x??null}}}catch(G){if(G?.code!=="ENOENT"&&!(G instanceof SyntaxError))X?.(G)}let K=await Z(z);try{await u$($,{...V??{},version:l$,type:"oauth_token",access_token:K.token,expires_at:K.expiresAt})}catch(G){X?.(G)}return K}}var z9=C(()=>{T0();W1();H0();G8();s6();Z9();X9()});class mZ{constructor(){VZ.set(this,void 0),NZ.set(this,void 0),q(this,VZ,new Uint8Array,"f"),q(this,NZ,null,"f")}decode(Z){if(Z==null)return[];let $=Z instanceof ArrayBuffer?new Uint8Array(Z):typeof Z==="string"?x0(Z):Z;q(this,VZ,u6([Y(this,VZ,"f"),$]),"f");let X=[],J;while((J=u7(Y(this,VZ,"f"),Y(this,NZ,"f")))!=null){if(J.carriage&&Y(this,NZ,"f")==null){q(this,NZ,J.index,"f");continue}if(Y(this,NZ,"f")!=null&&(J.index!==Y(this,NZ,"f")+1||J.carriage)){X.push(O8(Y(this,VZ,"f").subarray(0,Y(this,NZ,"f")-1))),q(this,VZ,Y(this,VZ,"f").subarray(Y(this,NZ,"f")),"f"),q(this,NZ,null,"f");continue}let z=Y(this,NZ,"f")!==null?J.preceding-1:J.preceding,Q=O8(Y(this,VZ,"f").subarray(0,z));X.push(Q),q(this,VZ,Y(this,VZ,"f").subarray(J.index),"f"),q(this,NZ,null,"f")}return X}flush(){if(!Y(this,VZ,"f").length)return[];return this.decode(`
2
+ `)}}function u7(Z,$){for(let z=$??0;z<Z.length;z++){if(Z[z]===10)return{preceding:z,index:z+1,carriage:!1};if(Z[z]===13)return{preceding:z,index:z+1,carriage:!0}}return null}function Y9(Z){for(let J=0;J<Z.length-1;J++){if(Z[J]===10&&Z[J+1]===10)return J+2;if(Z[J]===13&&Z[J+1]===13)return J+2;if(Z[J]===13&&Z[J+1]===10&&J+3<Z.length&&Z[J+2]===13&&Z[J+3]===10)return J+4}return-1}var VZ,NZ;var O1=C(()=>{QZ();q8();VZ=new WeakMap,NZ=new WeakMap;mZ.NEWLINE_CHARS=new Set([`
3
+ `,"\r"]);mZ.NEWLINE_REGEXP=/\r\n|[\n\r]/g});async function*Q9(Z,$){if(!Z.body){if($.abort(),typeof globalThis.navigator<"u"&&globalThis.navigator.product==="ReactNative")throw new H("The default react-native fetch implementation does not support streaming. Please use expo/fetch: https://docs.expo.dev/versions/latest/sdk/expo/#expofetch-api");throw new H("Attempted to iterate over a response with no body")}let X=new K9,J=new mZ,z=U8(Z.body);for await(let Q of c7(z))for(let V of J.decode(Q)){let K=X.decode(V);if(K)yield K}for(let Q of J.flush()){let V=X.decode(Q);if(V)yield V}}async function*c7(Z){let $=new Uint8Array;for await(let X of Z){if(X==null)continue;let J=X instanceof ArrayBuffer?new Uint8Array(X):typeof X==="string"?x0(X):X,z=new Uint8Array($.length+J.length);z.set($),z.set(J,$.length),$=z;let Q;while((Q=Y9($))!==-1)yield $.slice(0,Q),$=$.slice(Q)}if($.length>0)yield $}class K9{constructor(){this.event=null,this.data=[],this.chunks=[]}decode(Z){if(Z.endsWith("\r"))Z=Z.substring(0,Z.length-1);if(!Z){if(!this.event&&!this.data.length)return null;let z={event:this.event,data:this.data.join(`
4
+ `),raw:this.chunks};return this.event=null,this.data=[],this.chunks=[],z}if(this.chunks.push(Z),Z.startsWith(":"))return null;let[$,X,J]=d7(Z,":");if(J.startsWith(" "))J=J.substring(1);if($==="event")this.event=J;else if($==="data")this.data.push(J);return null}}function d7(Z,$){let X=Z.indexOf($);if(X!==-1)return[Z.substring(0,X),$,Z.substring(X+$.length)];return[Z,"",""]}var M8,$Z;var B8=C(()=>{QZ();m();M0();O1();M0();gZ();XZ();q8();IZ();m();k$();$Z=class $Z{constructor(Z,$,X){this.iterator=Z,M8.set(this,void 0),this.controller=$,q(this,M8,X,"f")}static rawEvents(Z,$=new AbortController){return Q9(Z,$)}static fromSSEResponse(Z,$,X){let J=!1,z=X?k(X):console;async function*Q(){if(J)throw new H("Cannot iterate over a consumed stream, use `.tee()` to split the stream.");J=!0;let V=!1;try{for await(let K of Q9(Z,$)){if(K.event==="completion")try{yield JSON.parse(K.data)}catch(G){throw z.error("Could not parse message into JSON:",K.data),z.error("From chunk:",K.raw),G}if(K.event==="message_start"||K.event==="message_delta"||K.event==="message_stop"||K.event==="content_block_start"||K.event==="content_block_delta"||K.event==="content_block_stop"||K.event==="message"||K.event==="user.message"||K.event==="user.interrupt"||K.event==="user.tool_confirmation"||K.event==="user.custom_tool_result"||K.event==="user.tool_result"||K.event==="agent.message"||K.event==="agent.thinking"||K.event==="agent.tool_use"||K.event==="agent.tool_result"||K.event==="agent.mcp_tool_use"||K.event==="agent.mcp_tool_result"||K.event==="agent.custom_tool_use"||K.event==="agent.thread_context_compacted"||K.event==="session.status_running"||K.event==="session.status_idle"||K.event==="session.status_rescheduled"||K.event==="session.status_terminated"||K.event==="session.error"||K.event==="session.deleted"||K.event==="session.updated"||K.event==="span.model_request_start"||K.event==="span.model_request_end"||K.event==="span.outcome_evaluation_start"||K.event==="span.outcome_evaluation_ongoing"||K.event==="span.outcome_evaluation_end"||K.event==="user.define_outcome"||K.event==="agent.thread_message_received"||K.event==="agent.thread_message_sent"||K.event==="agent.session_thread_message_received"||K.event==="agent.session_thread_message_sent"||K.event==="session.thread_created"||K.event==="session.thread_status_created"||K.event==="session.thread_status_running"||K.event==="session.thread_status_idle"||K.event==="session.thread_status_rescheduled"||K.event==="session.thread_status_terminated"||K.event==="event_start"||K.event==="event_delta"||K.event==="system.message")try{yield JSON.parse(K.data)}catch(G){throw z.error("Could not parse message into JSON:",K.data),z.error("From chunk:",K.raw),G}if(K.event==="ping")continue;if(K.event==="error"){let G=V8(K.data)??K.data,w=G?.error?.type;throw new v(void 0,G,void 0,Z.headers,w)}}V=!0}catch(K){if(wZ(K))return;throw K}finally{if(!V)$.abort();SZ($)}}return new $Z(Q,$,X)}static fromReadableStream(Z,$,X){let J=!1;async function*z(){let V=new mZ,K=U8(Z);for await(let G of K)for(let w of V.decode(G))yield w;for(let G of V.flush())yield G}async function*Q(){if(J)throw new H("Cannot iterate over a consumed stream, use `.tee()` to split the stream.");J=!0;let V=!1;try{for await(let K of z()){if(V)continue;if(K)yield JSON.parse(K)}V=!0}catch(K){if(wZ(K))return;throw K}finally{if(!V)$.abort();SZ($)}}return new $Z(Q,$,X)}[(M8=new WeakMap,Symbol.asyncIterator)](){return this.iterator()}tee(){let Z=[],$=[],X=this.iterator(),J=(z)=>{return{next:()=>{if(z.length===0){let Q=X.next();Z.push(Q),$.push(Q)}return z.shift()}}};return[new $Z(()=>J(Z),this.controller,Y(this,M8,"f")),new $Z(()=>J($),this.controller,Y(this,M8,"f"))]}toReadableStream(){let Z=this,$;return aX({async start(){$=Z[Symbol.asyncIterator]()},async pull(X){try{let{value:J,done:z}=await $.next();if(z)return X.close();let Q=x0(JSON.stringify(J)+`
5
+ `);X.enqueue(Q)}catch(J){X.error(J)}},async cancel(){await $.return?.()}})}}});async function i$(Z,$){let{response:X,requestLogID:J,retryOfRequestLogID:z,startTime:Q}=$,V=await(async()=>{if($.options.stream)return k(Z).debug("response",X.status,X.url,X.headers,X.body),$Z.fromSSEResponse(X,$.controller,Z);if(X.status===204)return null;if($.options.__binaryResponse)return X;let G=X.headers.get("content-type")?.split(";")[0]?.trim();if(G?.includes("application/json")||G?.endsWith("+json")){if(X.headers.get("content-length")==="0")return;let U=await X.json();return H8(U,X)}return await X.text()})().finally(()=>{if(!$.options.stream&&!$.options.__binaryResponse)SZ($.controller)});return k(Z).debug(`[${J}] response parsed`,FZ({retryOfRequestLogID:z,url:X.url,status:X.status,body:V,durationMs:Date.now()-Q})),V}function H8(Z,$){if(!Z||typeof Z!=="object"||Array.isArray(Z))return Z;return Object.defineProperties(Z,{_request_id:{value:$.headers.get("request-id"),enumerable:!1},_workspace_id:{value:$.headers.get("anthropic-workspace-id"),enumerable:!1}})}var n$=C(()=>{B8();IZ();k$()});function q1(Z){return typeof Z==="object"&&Z!==null&&N9.has(Z)}function W9(Z){let $=new Set;while(typeof Z==="object"&&Z!==null&&!$.has(Z)){if($.add(Z),q1(Z)||wZ(Z)||Z instanceof PZ||Z instanceof P$)return!0;Z=Z.cause}return!1}function w1(Z,$,X,J){return async(z,Q={})=>{if($.length===0)return Z.call(void 0,z,Q);let V=Q.headers instanceof Headers?Q.headers:new Headers(Q.headers),K=await l7(Z,$,X,J)({...Q,headers:V,url:typeof z==="string"?z:z instanceof URL?z.href:z.url});if(K.bodyUsed||K.body?.locked)throw new H("middleware consumed the response body; use response.clone() to inspect it, or return new Response(body, response) to consume and replace it");return K}}function p7(Z,$){let X=new WeakMap;return{options:Z,logger:$?k($):l6(),parse(J){if(Z?.stream&&J.ok)return V9(J,Z,$);let z=X.get(J);if(!z)z=V9(J,Z,$),X.set(J,z);return z}}}async function V9(Z,$,X){if(Z.bodyUsed||Z.body?.locked)throw new H("cannot ctx.parse() a response whose body was already consumed; call ctx.parse() instead of reading the body, or read via response.clone()");if($?.stream&&Z.ok)return $Z.fromSSEResponse(Z.clone(),new AbortController,X);if(Z.status===204)return null;if($?.__binaryResponse)return Z;let z=Z.headers.get("content-type")?.split(";")[0]?.trim();if(z?.includes("application/json")||z?.endsWith("+json")){if(Z.headers.get("content-length")==="0")return;return H8(await Z.clone().json(),Z)}return await Z.clone().text()}function l7(Z,$,X,J){let z=async({url:V,...K})=>{try{return await Z.call(void 0,V,K)}catch(G){let w=Z0(G);throw N9.add(w),w}},Q=p7(X,J);for(let V=$.length-1;V>=0;V--){let K=$[V],G=z;z=async(w)=>K(w,G,Q)}return z}var N9;var U9=C(()=>{gZ();n$();IZ();m();B8();N9=new WeakSet});var T8,X0;var a$=C(()=>{QZ();n$();X0=class X0 extends Promise{constructor(Z,$,X=i$){super((J)=>{J(null)});this.responsePromise=$,this.parseResponse=X,T8.set(this,void 0),q(this,T8,Z,"f")}_thenUnwrap(Z){return new X0(Y(this,T8,"f"),this.responsePromise,async($,X)=>H8(Z(await this.parseResponse($,X),X),X.response))}asResponse(){return this.responsePromise.then((Z)=>Z.response)}async withResponse(){let[Z,$]=await Promise.all([this.parse(),this.asResponse()]);return{data:Z,response:$,request_id:$.headers.get("request-id"),workspace_id:$.headers.get("anthropic-workspace-id")}}parse(){if(!this.parsedPromise)this.parsedPromise=this.responsePromise.then((Z)=>this.parseResponse(Y(this,T8,"f"),Z));return this.parsedPromise}then(Z,$){return this.parse().then(Z,$)}catch(Z){return this.parse().catch(Z)}finally(Z){return this.parse().finally(Z)}};T8=new WeakMap});var r$,o$,t$,t,L,C1;var D=C(()=>{QZ();m();n$();a$();XZ();o$=class o${constructor(Z,$,X,J){r$.set(this,void 0),q(this,r$,Z,"f"),this.options=J,this.response=$,this.body=X}hasNextPage(){if(!this.getPaginatedItems().length)return!1;return this.nextPageRequestOptions()!=null}async getNextPage(){let Z=this.nextPageRequestOptions();if(!Z)throw new H("No next page expected; please check `.hasNextPage()` before calling `.getNextPage()`.");return await Y(this,r$,"f").requestAPIList(this.constructor,Z)}async*iterPages(){let Z=this;yield Z;while(Z.hasNextPage())Z=await Z.getNextPage(),yield Z}async*[(r$=new WeakMap,Symbol.asyncIterator)](){for await(let Z of this.iterPages())for(let $ of Z.getPaginatedItems())yield $}};t$=class t$ extends X0{constructor(Z,$,X){super(Z,$,async(J,z)=>new X(J,z.response,await i$(J,z),z.options))}async*[Symbol.asyncIterator](){let Z=await this;for await(let $ of Z)yield $}};t=class t extends o${constructor(Z,$,X,J){super(Z,$,X,J);this.data=X.data||[],this.has_more=X.has_more||!1,this.first_id=X.first_id||null,this.last_id=X.last_id||null}getPaginatedItems(){return this.data??[]}hasNextPage(){if(this.has_more===!1)return!1;return super.hasNextPage()}nextPageRequestOptions(){if(this.options.query?.before_id){let $=this.first_id;if(!$)return null;return{...this.options,query:{...K8(this.options.query),before_id:$}}}let Z=this.last_id;if(!Z)return null;return{...this.options,query:{...K8(this.options.query),after_id:Z}}}};L=class L extends o${constructor(Z,$,X,J){super(Z,$,X,J);this.data=X.data||[],this.next_page=X.next_page||null}getPaginatedItems(){return this.data??[]}nextPageRequestOptions(){let Z=this.next_page;if(!Z)return null;return{...this.options,query:{...K8(this.options.query),page:Z}}}};C1=class C1 extends o${constructor(Z,$,X,J){super(Z,$,X,J);this.data=X.data||[],this.next_page=X.next_page||null,this.prev_page=X.prev_page||null}getPaginatedItems(){return this.data??[]}nextPageRequestOptions(){let Z=this.next_page;if(!Z)return null;return{...this.options,query:{...K8(this.options.query),page:Z}}}}});function J0(Z,$,X){return B1(),new File(Z,$??"unknown_file",X)}function x8(Z,$){let X=typeof Z==="object"&&Z!==null&&(("name"in Z)&&Z.name&&String(Z.name)||("url"in Z)&&Z.url&&String(Z.url)||("filename"in Z)&&Z.filename&&String(Z.filename)||("path"in Z)&&Z.path&&String(Z.path))||"";return $?X.split(/[\\/]/).pop()||void 0:X}function n7(Z){let $=typeof Z==="function"?Z:Z.fetch,X=G9.get($);if(X)return X;let J=(async()=>{try{let z="Response"in $?$.Response:(await $("data:,")).constructor,Q=new FormData;if(Q.toString()===await new z(Q).text())return!1;return!0}catch{return!0}})();return G9.set($,J),J}var B1=()=>{if(typeof File>"u"){let{process:Z}=globalThis,$=typeof Z?.versions?.node==="string"&&parseInt(Z.versions.node.split("."))<20;throw Error("`File` is not defined as a global, which is required for file uploads."+($?" Update to Node 20 LTS or newer, or set `globalThis.File` to `import('node:buffer').File`.":""))}},H1=(Z)=>Z!=null&&typeof Z==="object"&&typeof Z[Symbol.asyncIterator]==="function",MZ=async(Z,$,X=!0)=>{return{...Z,body:await a7(Z.body,$,X)}},G9,a7=async(Z,$,X=!0)=>{if(!await n7($))throw TypeError("The provided fetch function does not support file uploads with the current global FormData class.");let J=new FormData;return await Promise.all(Object.entries(Z||{}).map(([z,Q])=>M1(J,z,Q,X))),J},M1=async(Z,$,X,J)=>{if(X===void 0)return;if(X==null)throw TypeError(`Received null for "${$}"; to pass null in FormData, you must use the string 'null'`);if(typeof X==="string"||typeof X==="number"||typeof X==="boolean")Z.append($,String(X));else if(X instanceof Response){let z={},Q=X.headers.get("Content-Type");if(Q)z={type:Q};Z.append($,J0([await X.blob()],x8(X,J),z))}else if(H1(X))Z.append($,J0([await new Response(h$(X)).blob()],x8(X,J)));else if(X instanceof Blob)Z.append($,J0([X],x8(X,J)||void 0,{type:X.type}));else if(Array.isArray(X))await Promise.all(X.map((z)=>M1(Z,$+"[]",z,J)));else if(typeof X.then==="function")throw TypeError(`Received a Promise for "${$}"; await it first, e.g. \`await toFile(...)\``);else if(X instanceof ArrayBuffer||ArrayBuffer.isView(X))throw TypeError(`Received ${X.constructor.name} for "${$}"; to upload raw bytes, wrap them with \`await toFile(bytes, 'filename')\``);else if(typeof X==="object")await Promise.all(Object.entries(X).map(([z,Q])=>M1(Z,`${$}[${z}]`,Q,J)));else throw TypeError(`Invalid value given to form, expected a string, number, boolean, object, Array, File or Blob but got ${X} instead`)};var fZ=C(()=>{M0();G9=new WeakMap});async function s$(Z,$,X){if(B1(),Z=await Z,$||($=x8(Z,!0)),r7(Z)){if(Z instanceof File&&$==null&&X==null)return Z;return J0([await Z.arrayBuffer()],$??Z.name,{type:Z.type,lastModified:Z.lastModified,...X})}if(o7(Z)){let z=await Z.blob();return $||($=new URL(Z.url).pathname.split(/[\\/]/).pop()),J0(await T1(z),$,X)}let J=await T1(Z);if(!X?.type){let z=J.find((Q)=>typeof Q==="object"&&("type"in Q)&&Q.type);if(typeof z==="string")X={...X,type:z}}return J0(J,$,X)}async function T1(Z){let $=[];if(typeof Z==="string"||ArrayBuffer.isView(Z)||Z instanceof ArrayBuffer)$.push(Z);else if(O9(Z))$.push(Z instanceof Blob?Z:await Z.arrayBuffer());else if(H1(Z))for await(let X of Z)$.push(...await T1(X));else{let X=Z?.constructor?.name;throw Error(`Unexpected data type: ${typeof Z}${X?`; constructor: ${X}`:""}${t7(Z)}`)}return $}function t7(Z){if(typeof Z!=="object"||Z===null)return"";return`; props: [${Object.getOwnPropertyNames(Z).map((X)=>`"${X}"`).join(", ")}]`}var O9=(Z)=>Z!=null&&typeof Z==="object"&&typeof Z.size==="number"&&typeof Z.type==="string"&&typeof Z.text==="function"&&typeof Z.slice==="function"&&typeof Z.arrayBuffer==="function",r7=(Z)=>Z!=null&&typeof Z==="object"&&typeof Z.name==="string"&&typeof Z.lastModified==="number"&&O9(Z),o7=(Z)=>Z!=null&&typeof Z==="object"&&typeof Z.url==="string"&&typeof Z.blob==="function";var q9=C(()=>{fZ();fZ()});var x1=C(()=>{q9()});var w9=()=>{};class M{constructor(Z){this._client=Z}}var E=()=>{};function*e7(Z){if(!Z)return;if(C9 in Z){let{values:J,nulls:z}=Z;yield*J.entries();for(let Q of z)yield[Q,null];return}let $=!1,X;if(Z instanceof Headers)X=Z.entries();else if(lX(Z))X=Z;else $=!0,X=Object.entries(Z??{});for(let J of X){let z=J[0];if(typeof z!=="string")throw TypeError("expected header name to be a string");let Q=lX(J[1])?J[1]:[J[1]],V=!1;for(let K of Q){if(K===void 0)continue;if($&&!V)V=!0,yield[z,e$];yield[z,K]}}}var C9,e$,Z5,M9=(Z,$)=>{let X=Z?Z.split(",").map((J)=>J.trim()).filter(Boolean):[];for(let J of $.split(",").map((z)=>z.trim()))if(J&&!X.includes(J))X.push(J);return X.join(", ")},N=(Z)=>{let $=new Headers,X=new Set;for(let J of Z){let z=new Set;for(let[Q,V]of e7(J)){let K=Q.toLowerCase();if(Z5.has(K)){if(V===e$)continue;if(V===null)$.delete(Q),X.add(K);else $.set(Q,M9($.get(Q),V)),X.delete(K);continue}if(V===e$||!z.has(K)){if($.delete(Q),z.add(K),V===e$)continue}if(V===null)$.delete(Q),X.add(K);else $.append(Q,V),X.delete(K)}}return{[C9]:!0,values:$,nulls:X}};var R=C(()=>{XZ();C9=Symbol.for("brand.privateNullableHeaders");e$=Symbol("clear"),Z5=new Set(["x-stainless-helper"])});function H9(Z){return Z.replace(/[^A-Za-z0-9\-._~!$&'()*+,;=:@]+/g,encodeURIComponent)}var B9,$5=(Z=H9)=>function(X,...J){if(X.length===1)return X[0];let z=!1,Q=[],V=X.reduce((x,O,U)=>{if(/[?#]/.test(O))z=!0;let B=J[U],T=(z?encodeURIComponent:Z)(""+B);if(U!==J.length&&(B==null||typeof B==="object"&&B.toString===Object.getPrototypeOf(Object.getPrototypeOf(B.hasOwnProperty??B9)??B9)?.toString))T=B+"",Q.push({start:x.length+O.length,length:T.length,error:`Value of type ${Object.prototype.toString.call(B).slice(8,-1)} is not a valid path parameter`});return x+O+(U===J.length?"":T)},""),K=V.split(/[?#]/,1)[0],G=/(?<=^|\/)(?:\.|%2e){1,2}(?=\/|$)/gi,w;while((w=G.exec(K))!==null)Q.push({start:w.index,length:w[0].length,error:`Value "${w[0]}" can't be safely passed as a path parameter`});if(Q.sort((x,O)=>x.start-O.start),Q.length>0){let x=0,O=Q.reduce((U,B)=>{let T=" ".repeat(B.start-x),P="^".repeat(B.length);return x=B.start+B.length,U+T+P},"");throw new H(`Path parameters result in path with invalid segments:
6
+ ${Q.map((U)=>U.error).join(`
7
+ `)}
8
+ ${V}
9
+ ${O}`)}return V},W;var I=C(()=>{m();B9=Object.freeze(Object.create(null)),W=$5(H9)});var A8;var A1=C(()=>{E();D();R();I();A8=class A8 extends M{retrieve(Z,$={},X){let{betas:J}=$??{};return this._client.get(W`/v1/deployment_runs/${Z}?beta=true`,{...X,headers:N([{"anthropic-beta":[...J??[],"managed-agents-2026-04-01"].toString()},X?.headers])})}list(Z={},$){let{betas:X,...J}=Z??{};return this._client.getAPIList("/v1/deployment_runs?beta=true",L,{query:J,...$,headers:N([{"anthropic-beta":[...X??[],"managed-agents-2026-04-01"].toString()},$?.headers])})}}});var L8;var L1=C(()=>{E();D();R();I();L8=class L8 extends M{create(Z,$){let{betas:X,...J}=Z;return this._client.post("/v1/deployments?beta=true",{body:J,...$,headers:N([{"anthropic-beta":[...X??[],"managed-agents-2026-04-01"].toString()},$?.headers])})}retrieve(Z,$={},X){let{betas:J}=$??{};return this._client.get(W`/v1/deployments/${Z}?beta=true`,{...X,headers:N([{"anthropic-beta":[...J??[],"managed-agents-2026-04-01"].toString()},X?.headers])})}update(Z,$,X){let{betas:J,...z}=$;return this._client.post(W`/v1/deployments/${Z}?beta=true`,{body:z,...X,headers:N([{"anthropic-beta":[...J??[],"managed-agents-2026-04-01"].toString()},X?.headers])})}list(Z={},$){let{betas:X,...J}=Z??{};return this._client.getAPIList("/v1/deployments?beta=true",L,{query:J,...$,headers:N([{"anthropic-beta":[...X??[],"managed-agents-2026-04-01"].toString()},$?.headers])})}archive(Z,$={},X){let{betas:J}=$??{};return this._client.post(W`/v1/deployments/${Z}/archive?beta=true`,{...X,headers:N([{"anthropic-beta":[...J??[],"managed-agents-2026-04-01"].toString()},X?.headers])})}pause(Z,$={},X){let{betas:J}=$??{};return this._client.post(W`/v1/deployments/${Z}/pause?beta=true`,{...X,headers:N([{"anthropic-beta":[...J??[],"managed-agents-2026-04-01"].toString()},X?.headers])})}run(Z,$={},X){let{betas:J}=$??{};return this._client.post(W`/v1/deployments/${Z}/run?beta=true`,{...X,headers:N([{"anthropic-beta":[...J??[],"managed-agents-2026-04-01"].toString()},X?.headers])})}unpause(Z,$={},X){let{betas:J}=$??{};return this._client.post(W`/v1/deployments/${Z}/unpause?beta=true`,{...X,headers:N([{"anthropic-beta":[...J??[],"managed-agents-2026-04-01"].toString()},X?.headers])})}}});var j8;var j1=C(()=>{E();D();R();I();j8=class j8 extends M{create(Z,$){let{betas:X,...J}=Z;return this._client.post("/v1/dreams?beta=true",{body:J,...$,headers:N([{"anthropic-beta":[...X??[],"dreaming-2026-04-21"].toString()},$?.headers])})}retrieve(Z,$={},X){let{betas:J}=$??{};return this._client.get(W`/v1/dreams/${Z}?beta=true`,{...X,headers:N([{"anthropic-beta":[...J??[],"dreaming-2026-04-21"].toString()},X?.headers])})}list(Z={},$){let{betas:X,...J}=Z??{};return this._client.getAPIList("/v1/dreams?beta=true",L,{query:J,...$,headers:N([{"anthropic-beta":[...X??[],"dreaming-2026-04-21"].toString()},$?.headers])})}archive(Z,$={},X){let{betas:J}=$??{};return this._client.post(W`/v1/dreams/${Z}/archive?beta=true`,{...X,headers:N([{"anthropic-beta":[...J??[],"dreaming-2026-04-21"].toString()},X?.headers])})}cancel(Z,$={},X){let{betas:J}=$??{};return this._client.post(W`/v1/dreams/${Z}/cancel?beta=true`,{...X,headers:N([{"anthropic-beta":[...J??[],"dreaming-2026-04-21"].toString()},X?.headers])})}}});function F8(Z){return{["x-stainless-helper"]:Z}}function ZX(Z){return typeof Z==="object"&&Z!==null&&S8 in Z}function S1(Z,$){let X=new Set;if(Z){for(let J of Z)if(ZX(J))X.add(J[S8])}if($)for(let J of $){if(ZX(J))X.add(J[S8]);let z=J.content;if(Array.isArray(z)){for(let Q of z)if(ZX(Q))X.add(Q[S8])}}return Array.from(X)}function XX(Z,$){let X=S1(Z,$);if(X.length===0)return{};return{["x-stainless-helper"]:X.join(", ")}}function JX(Z){if(ZX(Z))return{["x-stainless-helper"]:Z[S8]};return{}}var E8="x-stainless-helper",$X="x-stainless-helper-method",S8;var LZ=C(()=>{S8=Symbol("anthropic.sdk.stainlessHelper")});var D8;var E1=C(()=>{E();D();R();LZ();fZ();I();D8=class D8 extends M{list(Z={},$){let{betas:X,...J}=Z??{};return this._client.getAPIList("/v1/files?beta=true",L,{query:J,...$,headers:N([{...X?.toString()!=null?{"anthropic-beta":X?.toString()}:void 0},$?.headers])})}delete(Z,$={},X){let{betas:J}=$??{};return this._client.delete(W`/v1/files/${Z}?beta=true`,{...X,headers:N([{...J?.toString()!=null?{"anthropic-beta":J?.toString()}:void 0},X?.headers])})}download(Z,$={},X){let{betas:J}=$??{};return this._client.get(W`/v1/files/${Z}/content?beta=true`,{...X,headers:N([{Accept:"application/binary",...J?.toString()!=null?{"anthropic-beta":J?.toString()}:void 0},X?.headers]),__binaryResponse:!0})}retrieveMetadata(Z,$={},X){let{betas:J}=$??{};return this._client.get(W`/v1/files/${Z}?beta=true`,{...X,headers:N([{...J?.toString()!=null?{"anthropic-beta":J?.toString()}:void 0},X?.headers])})}upload(Z,$){let{betas:X,...J}=Z;return this._client.post("/v1/files?beta=true",MZ({body:J,...$,headers:N([{...X?.toString()!=null?{"anthropic-beta":X?.toString()}:void 0},JX(J.file),$?.headers])},this._client))}}});var R8;var F1=C(()=>{E();D();R();I();R8=class R8 extends M{retrieve(Z,$={},X){let{betas:J}=$??{};return this._client.get(W`/v1/models/${Z}?beta=true`,{...X,headers:N([{...J?.toString()!=null?{"anthropic-beta":J?.toString()}:void 0},X?.headers])})}list(Z={},$){let{betas:X,...J}=Z??{};return this._client.getAPIList("/v1/models?beta=true",t,{query:J,...$,headers:N([{...X?.toString()!=null?{"anthropic-beta":X?.toString()}:void 0},$?.headers])})}}});var P8;var D1=C(()=>{E();D();R();I();P8=class P8 extends M{create(Z,$){let{betas:X,...J}=Z;return this._client.post("/v1/user_profiles?beta=true",{body:J,...$,headers:N([{"anthropic-beta":[...X??[],"user-profiles-2026-08-18"].toString()},$?.headers])})}retrieve(Z,$={},X){let{betas:J}=$??{};return this._client.get(W`/v1/user_profiles/${Z}?beta=true`,{...X,headers:N([{"anthropic-beta":[...J??[],"user-profiles-2026-08-18"].toString()},X?.headers])})}update(Z,$,X){let{betas:J,...z}=$;return this._client.post(W`/v1/user_profiles/${Z}?beta=true`,{body:z,...X,headers:N([{"anthropic-beta":[...J??[],"user-profiles-2026-08-18"].toString()},X?.headers])})}list(Z={},$){let{betas:X,...J}=Z??{};return this._client.getAPIList("/v1/user_profiles?beta=true",L,{query:J,...$,headers:N([{"anthropic-beta":[...X??[],"user-profiles-2026-08-18"].toString()},$?.headers])})}createEnrollmentURL(Z,$={},X){let{betas:J}=$??{};return this._client.post(W`/v1/user_profiles/${Z}/enrollment_url?beta=true`,{...X,headers:N([{"anthropic-beta":[...J??[],"user-profiles-2026-08-18"].toString()},X?.headers])})}}});var L9=zX((x9)=>{Object.defineProperty(x9,"__esModule",{value:!0});x9.timingSafeEqual=void 0;function T9(Z,$=""){if(!Z)throw Error($)}function V5(Z,$){if(Z.byteLength!==$.byteLength)return!1;if(!(Z instanceof DataView))Z=new DataView(ArrayBuffer.isView(Z)?Z.buffer:Z);if(!($ instanceof DataView))$=new DataView(ArrayBuffer.isView($)?$.buffer:$);T9(Z instanceof DataView),T9($ instanceof DataView);let X=Z.byteLength,J=0,z=-1;while(++z<X)J|=Z.getUint8(z)^$.getUint8(z);return J===0}x9.timingSafeEqual=V5});var E9=zX((WZ)=>{var N5=WZ&&WZ.__extends||function(){var Z=function($,X){return Z=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(J,z){J.__proto__=z}||function(J,z){for(var Q in z)if(z.hasOwnProperty(Q))J[Q]=z[Q]},Z($,X)};return function($,X){Z($,X);function J(){this.constructor=$}$.prototype=X===null?Object.create(X):(J.prototype=X.prototype,new J)}}();Object.defineProperty(WZ,"__esModule",{value:!0});var a=256,R1=function(){function Z($){if($===void 0)$="=";this._paddingCharacter=$}return Z.prototype.encodedLength=function($){if(!this._paddingCharacter)return($*8+5)/6|0;return($+2)/3*4|0},Z.prototype.encode=function($){var X="",J=0;for(;J<$.length-2;J+=3){var z=$[J]<<16|$[J+1]<<8|$[J+2];X+=this._encodeByte(z>>>18&63),X+=this._encodeByte(z>>>12&63),X+=this._encodeByte(z>>>6&63),X+=this._encodeByte(z>>>0&63)}var Q=$.length-J;if(Q>0){var z=$[J]<<16|(Q===2?$[J+1]<<8:0);if(X+=this._encodeByte(z>>>18&63),X+=this._encodeByte(z>>>12&63),Q===2)X+=this._encodeByte(z>>>6&63);else X+=this._paddingCharacter||"";X+=this._paddingCharacter||""}return X},Z.prototype.maxDecodedLength=function($){if(!this._paddingCharacter)return($*6+7)/8|0;return $/4*3|0},Z.prototype.decodedLength=function($){return this.maxDecodedLength($.length-this._getPaddingLength($))},Z.prototype.decode=function($){if($.length===0)return new Uint8Array(0);var X=this._getPaddingLength($),J=$.length-X,z=new Uint8Array(this.maxDecodedLength(J)),Q=0,V=0,K=0,G=0,w=0,x=0,O=0;for(;V<J-4;V+=4)G=this._decodeChar($.charCodeAt(V+0)),w=this._decodeChar($.charCodeAt(V+1)),x=this._decodeChar($.charCodeAt(V+2)),O=this._decodeChar($.charCodeAt(V+3)),z[Q++]=G<<2|w>>>4,z[Q++]=w<<4|x>>>2,z[Q++]=x<<6|O,K|=G&a,K|=w&a,K|=x&a,K|=O&a;if(V<J-1)G=this._decodeChar($.charCodeAt(V)),w=this._decodeChar($.charCodeAt(V+1)),z[Q++]=G<<2|w>>>4,K|=G&a,K|=w&a;if(V<J-2)x=this._decodeChar($.charCodeAt(V+2)),z[Q++]=w<<4|x>>>2,K|=x&a;if(V<J-3)O=this._decodeChar($.charCodeAt(V+3)),z[Q++]=x<<6|O,K|=O&a;if(K!==0)throw Error("Base64Coder: incorrect characters for decoding");return z},Z.prototype._encodeByte=function($){var X=$;return X+=65,X+=25-$>>>8&6,X+=51-$>>>8&-75,X+=61-$>>>8&-15,X+=62-$>>>8&3,String.fromCharCode(X)},Z.prototype._decodeChar=function($){var X=a;return X+=(42-$&$-44)>>>8&-a+$-43+62,X+=(46-$&$-48)>>>8&-a+$-47+63,X+=(47-$&$-58)>>>8&-a+$-48+52,X+=(64-$&$-91)>>>8&-a+$-65+0,X+=(96-$&$-123)>>>8&-a+$-97+26,X},Z.prototype._getPaddingLength=function($){var X=0;if(this._paddingCharacter){for(var J=$.length-1;J>=0;J--){if($[J]!==this._paddingCharacter)break;X++}if($.length<4||X>2)throw Error("Base64Coder: incorrect padding")}return X},Z}();WZ.Coder=R1;var I8=new R1;function W5(Z){return I8.encode(Z)}WZ.encode=W5;function U5(Z){return I8.decode(Z)}WZ.decode=U5;var j9=function(Z){N5($,Z);function $(){return Z!==null&&Z.apply(this,arguments)||this}return $.prototype._encodeByte=function(X){var J=X;return J+=65,J+=25-X>>>8&6,J+=51-X>>>8&-75,J+=61-X>>>8&-13,J+=62-X>>>8&49,String.fromCharCode(J)},$.prototype._decodeChar=function(X){var J=a;return J+=(44-X&X-46)>>>8&-a+X-45+62,J+=(94-X&X-96)>>>8&-a+X-95+63,J+=(47-X&X-58)>>>8&-a+X-48+52,J+=(64-X&X-91)>>>8&-a+X-65+0,J+=(96-X&X-123)>>>8&-a+X-97+26,J},$}(R1);WZ.URLSafeCoder=j9;var S9=new j9;function G5(Z){return S9.encode(Z)}WZ.encodeURLSafe=G5;function O5(Z){return S9.decode(Z)}WZ.decodeURLSafe=O5;WZ.encodedLength=function(Z){return I8.encodedLength(Z)};WZ.maxDecodedLength=function(Z){return I8.maxDecodedLength(Z)};WZ.decodedLength=function(Z){return I8.decodedLength(Z)}});var D9=zX((F9,YX)=>{(function(Z,$){var X={};$(X);var J=X.default;for(var z in X)J[z]=X[z];if(typeof YX==="object"&&typeof YX.exports==="object")YX.exports=J;else if(typeof define==="function"&&define.amd)define(function(){return J});else Z.sha256=J})(F9,function(Z){Z.__esModule=!0,Z.digestLength=32,Z.blockSize=64;var $=new Uint32Array([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]);function X(O,U,B,T,P){var j,S,A,F,f,h,g,_,n,u,i,qZ,eZ;while(P>=64){j=U[0],S=U[1],A=U[2],F=U[3],f=U[4],h=U[5],g=U[6],_=U[7];for(u=0;u<16;u++)i=T+u*4,O[u]=(B[i]&255)<<24|(B[i+1]&255)<<16|(B[i+2]&255)<<8|B[i+3]&255;for(u=16;u<64;u++)n=O[u-2],qZ=(n>>>17|n<<15)^(n>>>19|n<<13)^n>>>10,n=O[u-15],eZ=(n>>>7|n<<25)^(n>>>18|n<<14)^n>>>3,O[u]=(qZ+O[u-7]|0)+(eZ+O[u-16]|0);for(u=0;u<64;u++)qZ=(((f>>>6|f<<26)^(f>>>11|f<<21)^(f>>>25|f<<7))+(f&h^~f&g)|0)+(_+($[u]+O[u]|0)|0)|0,eZ=((j>>>2|j<<30)^(j>>>13|j<<19)^(j>>>22|j<<10))+(j&S^j&A^S&A)|0,_=g,g=h,h=f,f=F+qZ|0,F=A,A=S,S=j,j=qZ+eZ|0;U[0]+=j,U[1]+=S,U[2]+=A,U[3]+=F,U[4]+=f,U[5]+=h,U[6]+=g,U[7]+=_,T+=64,P-=64}return T}var J=function(){function O(){this.digestLength=Z.digestLength,this.blockSize=Z.blockSize,this.state=new Int32Array(8),this.temp=new Int32Array(64),this.buffer=new Uint8Array(128),this.bufferLength=0,this.bytesHashed=0,this.finished=!1,this.reset()}return O.prototype.reset=function(){return this.state[0]=1779033703,this.state[1]=3144134277,this.state[2]=1013904242,this.state[3]=2773480762,this.state[4]=1359893119,this.state[5]=2600822924,this.state[6]=528734635,this.state[7]=1541459225,this.bufferLength=0,this.bytesHashed=0,this.finished=!1,this},O.prototype.clean=function(){for(var U=0;U<this.buffer.length;U++)this.buffer[U]=0;for(var U=0;U<this.temp.length;U++)this.temp[U]=0;this.reset()},O.prototype.update=function(U,B){if(B===void 0)B=U.length;if(this.finished)throw Error("SHA256: can't update because hash was finished.");var T=0;if(this.bytesHashed+=B,this.bufferLength>0){while(this.bufferLength<64&&B>0)this.buffer[this.bufferLength++]=U[T++],B--;if(this.bufferLength===64)X(this.temp,this.state,this.buffer,0,64),this.bufferLength=0}if(B>=64)T=X(this.temp,this.state,U,T,B),B%=64;while(B>0)this.buffer[this.bufferLength++]=U[T++],B--;return this},O.prototype.finish=function(U){if(!this.finished){var B=this.bytesHashed,T=this.bufferLength,P=B/536870912|0,j=B<<3,S=B%64<56?64:128;this.buffer[T]=128;for(var A=T+1;A<S-8;A++)this.buffer[A]=0;this.buffer[S-8]=P>>>24&255,this.buffer[S-7]=P>>>16&255,this.buffer[S-6]=P>>>8&255,this.buffer[S-5]=P>>>0&255,this.buffer[S-4]=j>>>24&255,this.buffer[S-3]=j>>>16&255,this.buffer[S-2]=j>>>8&255,this.buffer[S-1]=j>>>0&255,X(this.temp,this.state,this.buffer,0,S),this.finished=!0}for(var A=0;A<8;A++)U[A*4+0]=this.state[A]>>>24&255,U[A*4+1]=this.state[A]>>>16&255,U[A*4+2]=this.state[A]>>>8&255,U[A*4+3]=this.state[A]>>>0&255;return this},O.prototype.digest=function(){var U=new Uint8Array(this.digestLength);return this.finish(U),U},O.prototype._saveState=function(U){for(var B=0;B<this.state.length;B++)U[B]=this.state[B]},O.prototype._restoreState=function(U,B){for(var T=0;T<this.state.length;T++)this.state[T]=U[T];this.bytesHashed=B,this.finished=!1,this.bufferLength=0},O}();Z.Hash=J;var z=function(){function O(U){this.inner=new J,this.outer=new J,this.blockSize=this.inner.blockSize,this.digestLength=this.inner.digestLength;var B=new Uint8Array(this.blockSize);if(U.length>this.blockSize)new J().update(U).finish(B).clean();else for(var T=0;T<U.length;T++)B[T]=U[T];for(var T=0;T<B.length;T++)B[T]^=54;this.inner.update(B);for(var T=0;T<B.length;T++)B[T]^=106;this.outer.update(B),this.istate=new Uint32Array(8),this.ostate=new Uint32Array(8),this.inner._saveState(this.istate),this.outer._saveState(this.ostate);for(var T=0;T<B.length;T++)B[T]=0}return O.prototype.reset=function(){return this.inner._restoreState(this.istate,this.inner.blockSize),this.outer._restoreState(this.ostate,this.outer.blockSize),this},O.prototype.clean=function(){for(var U=0;U<this.istate.length;U++)this.ostate[U]=this.istate[U]=0;this.inner.clean(),this.outer.clean()},O.prototype.update=function(U){return this.inner.update(U),this},O.prototype.finish=function(U){if(this.outer.finished)this.outer.finish(U);else this.inner.finish(U),this.outer.update(U,this.digestLength).finish(U);return this},O.prototype.digest=function(){var U=new Uint8Array(this.digestLength);return this.finish(U),U},O}();Z.HMAC=z;function Q(O){var U=new J().update(O),B=U.digest();return U.clean(),B}Z.hash=Q,Z.default=Q;function V(O,U){var B=new z(O).update(U),T=B.digest();return B.clean(),T}Z.hmac=V;function K(O,U,B,T){var P=T[0];if(P===0)throw Error("hkdf: cannot expand more");if(U.reset(),P>1)U.update(O);if(B)U.update(B);U.update(T),U.finish(O),T[0]++}var G=new Uint8Array(Z.digestLength);function w(O,U,B,T){if(U===void 0)U=G;if(T===void 0)T=32;var P=new Uint8Array([1]),j=V(U,O),S=new z(j),A=new Uint8Array(S.digestLength),F=A.length,f=new Uint8Array(T);for(var h=0;h<T;h++){if(F===A.length)K(A,S,B,P),F=0;f[h]=A[F++]}return S.clean(),A.fill(0),P.fill(0),f}Z.hkdf=w;function x(O,U,B,T){var P=new z(O),j=P.digestLength,S=new Uint8Array(4),A=new Uint8Array(j),F=new Uint8Array(j),f=new Uint8Array(T);for(var h=0;h*j<T;h++){var g=h+1;S[0]=g>>>24&255,S[1]=g>>>16&255,S[2]=g>>>8&255,S[3]=g>>>0&255,P.reset(),P.update(U),P.update(S),P.finish(F);for(var _=0;_<j;_++)A[_]=F[_];for(var _=2;_<=B;_++){P.reset(),P.update(F).finish(F);for(var n=0;n<j;n++)A[n]^=F[n]}for(var _=0;_<j&&h*j+_<T;_++)f[h*j+_]=A[_]}for(var h=0;h<j;h++)A[h]=F[h]=0;for(var h=0;h<4;h++)S[h]=0;return P.clean(),f}Z.pbkdf2=x})});var y9=zX((I9)=>{Object.defineProperty(I9,"__esModule",{value:!0});I9.Webhook=I9.WebhookVerificationError=void 0;var q5=L9(),R9=E9(),w5=D9(),P9=300;class P1 extends Error{constructor(Z){super(Z);Object.setPrototypeOf(this,P1.prototype),this.name="ExtendableError",this.stack=Error(Z).stack}}class uZ extends P1{constructor(Z){super(Z);Object.setPrototypeOf(this,uZ.prototype),this.name="WebhookVerificationError"}}I9.WebhookVerificationError=uZ;class f8{constructor(Z,$){if(!Z)throw Error("Secret can't be empty.");if(($===null||$===void 0?void 0:$.format)==="raw")if(Z instanceof Uint8Array)this.key=Z;else this.key=Uint8Array.from(Z,(X)=>X.charCodeAt(0));else{if(typeof Z!=="string")throw Error("Expected secret to be of type string");if(Z.startsWith(f8.prefix))Z=Z.substring(f8.prefix.length);this.key=R9.decode(Z)}}verify(Z,$){let X={};for(let O of Object.keys($))X[O.toLowerCase()]=$[O];let J=X["webhook-id"],z=X["webhook-signature"],Q=X["webhook-timestamp"];if(!z||!J||!Q)throw new uZ("Missing required headers");let V=this.verifyTimestamp(Q),G=this.sign(J,V,Z).split(",")[1],w=z.split(" "),x=new globalThis.TextEncoder;for(let O of w){let[U,B]=O.split(",");if(U!=="v1")continue;if((0,q5.timingSafeEqual)(x.encode(B),x.encode(G)))return JSON.parse(Z.toString())}throw new uZ("No matching signature found")}sign(Z,$,X){if(typeof X==="string");else if(X.constructor.name==="Buffer")X=X.toString();else throw Error("Expected payload to be of type string or Buffer.");let J=new TextEncoder,z=Math.floor($.getTime()/1000),Q=J.encode(`${Z}.${z}.${X}`);return`v1,${R9.encode(w5.hmac(this.key,Q))}`}verifyTimestamp(Z){let $=Math.floor(Date.now()/1000),X=parseInt(Z,10);if(isNaN(X))throw new uZ("Invalid Signature Headers");if($-X>P9)throw new uZ("Message timestamp too old");if(X>$+P9)throw new uZ("Message timestamp too new");return new Date(X*1000)}}I9.Webhook=f8;f8.prefix="whsec_"});var k9,y8;var I1=C(()=>{E();k9=M5(y9(),1);y8=class y8 extends M{parseUnverified(Z){return JSON.parse(Z)}unwrap(Z,$){let X=$?.headers;if(X==null)throw Error("Webhook headers are required in order to verify the signature");let J=$.key===void 0?this._client.webhookKey:$.key;if(!J)throw Error("Webhook key must not be null or empty in order to unwrap");return new k9.Webhook(J).verify(Z,X),JSON.parse(Z)}}});var k8;var f1=C(()=>{E();D();R();I();k8=class k8 extends M{list(Z,$={},X){let{betas:J,...z}=$??{};return this._client.getAPIList(W`/v1/agents/${Z}/versions?beta=true`,L,{query:z,...X,headers:N([{"anthropic-beta":[...J??[],"managed-agents-2026-04-01"].toString()},X?.headers])})}}});var A0;var y1=C(()=>{E();f1();f1();D();R();I();A0=class A0 extends M{constructor(){super(...arguments);this.versions=new k8(this._client)}create(Z,$){let{betas:X,...J}=Z;return this._client.post("/v1/agents?beta=true",{body:J,...$,headers:N([{"anthropic-beta":[...X??[],"managed-agents-2026-04-01"].toString()},$?.headers])})}retrieve(Z,$={},X){let{betas:J,...z}=$??{};return this._client.get(W`/v1/agents/${Z}?beta=true`,{query:z,...X,headers:N([{"anthropic-beta":[...J??[],"managed-agents-2026-04-01"].toString()},X?.headers])})}update(Z,$,X){let{betas:J,...z}=$;return this._client.post(W`/v1/agents/${Z}?beta=true`,{body:z,...X,headers:N([{"anthropic-beta":[...J??[],"managed-agents-2026-04-01"].toString()},X?.headers])})}list(Z={},$){let{betas:X,...J}=Z??{};return this._client.getAPIList("/v1/agents?beta=true",L,{query:J,...$,headers:N([{"anthropic-beta":[...X??[],"managed-agents-2026-04-01"].toString()},$?.headers])})}archive(Z,$={},X){let{betas:J}=$??{};return this._client.post(W`/v1/agents/${Z}/archive?beta=true`,{...X,headers:N([{"anthropic-beta":[...J??[],"managed-agents-2026-04-01"].toString()},X?.headers])})}};A0.Versions=k8});function cZ(Z,$){if(!Z)return()=>{};if(Z.aborted)return $.abort(),()=>{};let X=()=>$.abort();return Z.addEventListener("abort",X),()=>Z.removeEventListener("abort",X)}var QX=()=>{};function yZ(Z,$){return Z instanceof v&&Z.status===$}function h9(Z){return Z instanceof v&&typeof Z.status==="number"&&Z.status>=400&&Z.status<500}function dZ(Z){return h9(Z)&&!yZ(Z,408)&&!yZ(Z,409)&&!yZ(Z,429)}function KX(Z,$,X){return Math.min($*2**Z,X)}function k1(Z,$){return Z+Math.random()*($-Z)}function VX(Z){return Z*(1-Math.random()*0.25)}var h8=C(()=>{m()});function NX(Z,{authToken:$,helper:X}){if(!$)throw new H(`copyClientForHelper: expected a non-empty authToken but received ${JSON.stringify($)}`);let J=Z,z=J._options.defaultHeaders,Q=J._authState?.extraHeaders,V=Q?Object.fromEntries(Object.entries(Q).filter(([G])=>{let w=G.toLowerCase();return w!=="authorization"&&w!=="x-api-key"})):void 0,K=N([V,z,{[E8]:X}]);return Z.withOptions({apiKey:null,authToken:$,baseURL:Z.baseURL,credentials:void 0,defaultHeaders:K})}var h1=C(()=>{m();R();LZ()});function S5(Z){return KX(Z,A5,L5)}class b9{constructor(Z,$){S0.set(this,void 0),qX.set(this,void 0),E0.set(this,void 0),_8.set(this,0),q(this,S0,Z,"f"),q(this,qX,$,"f")}onEmptyPoll(){let Z=Date.now(),$={component:"work-poller",environment_id:Y(this,qX,"f")};if(Y(this,E0,"f")===void 0)q(this,E0,q(this,_8,Z,"f"),"f"),Y(this,S0,"f").info("idle; polling for work",$);else if(Z-Y(this,_8,"f")>=j5)q(this,_8,Z,"f"),Y(this,S0,"f").info(`still polling; idle for ${Math.round((Z-Y(this,E0,"f"))/1000)}s`,$);else Y(this,S0,"f").debug("poll returned no work",$)}onClaim(){q(this,E0,void 0,"f")}}function E5(){let $=globalThis.process?.env?.HOSTNAME;return $?`${$}-${w0()}`:w0()}var L0,WX,BZ,UX,GX,OX,b8,g8,j0,S0,qX,E0,_8,x5=999,A5=1000,L5=60000,j5=300000,z0;var wX=C(()=>{QZ();m();IZ();C0();I$();QX();R();h8();h1();h8();z0=class z0{constructor(Z){L0.set(this,void 0),WX.set(this,!1),BZ.set(this,void 0),UX.set(this,void 0),GX.set(this,void 0),OX.set(this,void 0),b8.set(this,void 0),g8.set(this,void 0),j0.set(this,void 0),this.client=Z.client,this.environmentId=Z.environmentId,this.environmentKey=Z.environmentKey,this.workerId=Z.workerId??E5(),q(this,L0,NX(Z.client,{authToken:Z.environmentKey,helper:"environments-work-poller"}),"f"),q(this,GX,Z.autoStop??!0,"f"),q(this,OX,Z.drain??!1,"f"),q(this,b8,Z.blockMs===void 0?x5:Z.blockMs,"f"),q(this,g8,Z.reclaimOlderThanMs??null,"f"),q(this,j0,Z.requestOptions,"f"),q(this,BZ,new AbortController,"f"),q(this,UX,cZ(Z.signal,Y(this,BZ,"f")),"f")}get signal(){return Y(this,BZ,"f").signal}abort(){Y(this,BZ,"f").abort()}async*[(L0=new WeakMap,WX=new WeakMap,BZ=new WeakMap,UX=new WeakMap,GX=new WeakMap,OX=new WeakMap,b8=new WeakMap,g8=new WeakMap,j0=new WeakMap,Symbol.asyncIterator)](){if(Y(this,WX,"f"))throw new H("Cannot iterate over a consumed WorkPoller");q(this,WX,!0,"f");let Z=k(this.client);Z.info("poller starting",{component:"work-poller",environment_id:this.environmentId});let $=new b9(Z,this.environmentId);try{let X=0;while(!Y(this,BZ,"f").signal.aborted){let J;try{J=await Y(this,L0,"f").beta.environments.work.poll(this.environmentId,{"Anthropic-Worker-ID":this.workerId,...Y(this,b8,"f")!==null?{block_ms:Y(this,b8,"f")}:{},...Y(this,g8,"f")!==null?{reclaim_older_than_ms:Y(this,g8,"f")}:{}},{headers:N([Y(this,j0,"f")?.headers]),signal:Y(this,BZ,"f").signal})}catch(z){if(Y(this,BZ,"f").signal.aborted)return;if(dZ(z))throw Z.error("poll failed permanently, stopping poller",{error:String(z)}),z;let Q=VX(S5(X));Z.warn("poll failed, backing off",{error:String(z),backoff_ms:Q}),X++,await xZ(Q,Y(this,BZ,"f").signal);continue}if(X=0,J==null){if(Y(this,OX,"f"))return;$.onEmptyPoll(),await xZ(k1(1000,3000),Y(this,BZ,"f").signal);continue}$.onClaim(),Z.info("claimed work",{component:"work-poller",environment_id:this.environmentId,work_id:J.id,work_type:J.data.type});try{await Y(this,L0,"f").beta.environments.work.ack(J.id,{environment_id:J.environment_id},{headers:N([Y(this,j0,"f")?.headers]),signal:Y(this,BZ,"f").signal})}catch(z){Z.error("ack failed",{work_id:J.id,error:String(z)});continue}try{yield J}finally{if(Y(this,GX,"f"))try{await Y(this,L0,"f").beta.environments.work.stop(J.id,{environment_id:J.environment_id},{headers:N([Y(this,j0,"f")?.headers])})}catch(z){if(!yZ(z,409))Z.warn("stop failed",{work_id:J.id,error:String(z)})}}}}finally{Y(this,UX,"f").call(this)}}};S0=new WeakMap,qX=new WeakMap,E0=new WeakMap,_8=new WeakMap});class b1{constructor(){F0.set(this,[]),pZ.set(this,[]),D0.set(this,!1)}push(Z){if(Y(this,D0,"f"))return!1;let $=Y(this,pZ,"f").shift();if($)$({done:!1,value:Z});else Y(this,F0,"f").push(Z);return!0}close(){if(Y(this,D0,"f"))return;q(this,D0,!0,"f");while(Y(this,pZ,"f").length>0)Y(this,pZ,"f").shift()({done:!0,value:void 0})}next(Z){if(Y(this,F0,"f").length>0)return Promise.resolve({done:!1,value:Y(this,F0,"f").shift()});if(Y(this,D0,"f")||Z?.aborted)return Promise.resolve({done:!0,value:void 0});return new Promise(($)=>{let X=(z)=>{Z?.removeEventListener("abort",J),$(z)},J=()=>{let z=Y(this,pZ,"f").indexOf(X);if(z>=0)Y(this,pZ,"f").splice(z,1);$({done:!0,value:void 0})};Y(this,pZ,"f").push(X),Z?.addEventListener("abort",J,{once:!0})})}tryShift(){return Y(this,F0,"f").shift()}}var F0,pZ,D0;var g9=C(()=>{QZ();F0=new WeakMap,pZ=new WeakMap,D0=new WeakMap});function g1(Z){return"name"in Z?Z.name:("mcp_server_name"in Z)?Z.mcp_server_name:Z.type}function F5(Z){return Z instanceof _Z?Z.content:`Error: ${Z instanceof Error?Z.message:String(Z)}`}async function _9(Z,$,X){try{let J=Z.parse?Z.parse($):$;return{content:await Z.run(J,X),isError:!1}}catch(J){return{content:F5(J),isError:!0}}}var v9=C(()=>{Q8()});function a9(Z){return Z.type==="session.status_idle"&&Z.stop_reason?.type==="end_turn"}class r9{constructor(Z,$){v8.set(this,void 0),xX.set(this,void 0),R0.set(this,new Set),Y0.set(this,!1),jZ.set(this,void 0),q(this,v8,Z,"f"),q(this,xX,$,"f")}noteEvent(Z){if(Z.type==="user.tool_confirmation")return;if(a9(Z))this.arm();else this.disarm()}block(Z){if(Y(this,R0,"f").add(Z),Y(this,jZ,"f")!==void 0)q(this,Y0,!0,"f"),clearTimeout(Y(this,jZ,"f")),q(this,jZ,void 0,"f")}unblock(Z){if(Y(this,R0,"f").delete(Z),Y(this,R0,"f").size===0&&Y(this,Y0,"f"))this.arm()}arm(){if(Y(this,v8,"f")<=0)return;if(Y(this,R0,"f").size>0){q(this,Y0,!0,"f");return}if(q(this,Y0,!1,"f"),Y(this,jZ,"f")!==void 0)clearTimeout(Y(this,jZ,"f"));q(this,jZ,setTimeout(Y(this,xX,"f"),Y(this,v8,"f")),"f")}disarm(){if(q(this,Y0,!1,"f"),Y(this,jZ,"f")!==void 0)clearTimeout(Y(this,jZ,"f")),q(this,jZ,void 0,"f")}}function h5(Z,$,X){if(Z.type==="agent.custom_tool_use")return{type:"user.custom_tool_result",custom_tool_use_id:Z.id,is_error:$,content:X};return{type:"user.tool_result",tool_use_id:Z.id,is_error:$,content:X}}function b5(Z){if(typeof Z==="string")return[{type:"text",text:Z||"(no output)"}];let $=Z.map((X)=>{if(X.type==="text")return{type:"text",text:X.text||"(no output)"};if(X.type==="image"||X.type==="document")return X;if(X.type==="search_result")return{type:"search_result",source:X.source,title:X.title,content:X.content.map((J)=>({type:"text",text:J.text})),citations:{enabled:X.citations?.enabled??!1}};return{type:"text",text:JSON.stringify(X)}});return $.length>0?$:[{type:"text",text:"(no output)"}]}var v8,xX,R0,Y0,jZ,c,CX,s,MX,m8,AX,r,I0,UZ,f0,lZ,P0,kZ,LX,u8,HZ,BX,i9,m9,u9,c9,_1,d9,HX,TX,v1,p9,n9,l9=500,D5=1e4,R5=120000,P5=30000,I5=1000,f5=30000,y5=300000,k5=60000,Q0;var jX=C(()=>{QZ();m();IZ();C0();h8();QX();g9();R();LZ();v9();v8=new WeakMap,xX=new WeakMap,R0=new WeakMap,Y0=new WeakMap,jZ=new WeakMap;Q0=class Q0{constructor(Z,$){c.add(this),CX.set(this,!1),s.set(this,void 0),MX.set(this,void 0),m8.set(this,void 0),AX.set(this,void 0),r.set(this,void 0),I0.set(this,new Set),UZ.set(this,new Set),f0.set(this,new Map),lZ.set(this,new Map),P0.set(this,new b1),kZ.set(this,0),LX.set(this,y5),u8.set(this,null),HZ.set(this,void 0),this.client=$.client,this.sessionId=Z,this.tools=$.tools,this.maxIdleMs=$.maxIdleMs??k5,q(this,r,k($.client),"f"),q(this,AX,new Map($.tools.map((X)=>[g1(X),X])),"f"),q(this,s,new AbortController,"f"),q(this,MX,cZ($.signal,Y(this,s,"f")),"f"),q(this,m8,$.requestOptions,"f"),q(this,HZ,new r9(this.maxIdleMs,()=>{Y(this,r,"f").info("session idle after end_turn; stopping",{component:"session-tool-runner",session_id:this.sessionId,max_idle_ms:this.maxIdleMs}),Y(this,s,"f").abort()}),"f")}get signal(){return Y(this,s,"f").signal}abort(){Y(this,s,"f").abort()}_setSendRetryWindow(Z){q(this,LX,Z,"f")}async*[(CX=new WeakMap,s=new WeakMap,MX=new WeakMap,m8=new WeakMap,AX=new WeakMap,r=new WeakMap,I0=new WeakMap,UZ=new WeakMap,f0=new WeakMap,lZ=new WeakMap,P0=new WeakMap,kZ=new WeakMap,LX=new WeakMap,u8=new WeakMap,HZ=new WeakMap,c=new WeakSet,Symbol.asyncIterator)](){if(Y(this,CX,"f"))throw new H("Cannot iterate over a consumed SessionToolRunner");q(this,CX,!0,"f"),Y(this,r,"f").info("session tool runner starting",{component:"session-tool-runner",session_id:this.sessionId});let Z=Y(this,c,"m",i9).call(this).catch(($)=>{if(!Y(this,s,"f").signal.aborted)Y(this,r,"f").error("stream loop failed",{error:String($)});Y(this,s,"f").abort()});try{while(!0){let X=await Y(this,P0,"f").next(Y(this,s,"f").signal);if(X.done)break;yield X.value}await Z;let $;while(($=Y(this,P0,"f").tryShift())!==void 0)yield $}finally{Y(this,s,"f").abort(),Y(this,HZ,"f").disarm(),await Z;try{await Y(this,c,"m",n9).call(this)}catch($){Y(this,r,"f").warn("drain failed",{error:String($)})}Y(this,P0,"f").close();for(let $ of this.tools)try{await $.close?.()}catch(X){Y(this,r,"f").warn("tool.close failed",{tool:g1($),error:String(X)})}Y(this,MX,"f").call(this)}}};BX=function(){return{...Y(this,m8,"f"),headers:N([F8("session-tool-runner"),Y(this,m8,"f")?.headers]),signal:Y(this,s,"f").signal}},i9=async function(){let $=Y(this,s,"f"),X=l9;while(!$.signal.aborted){try{let J=await this.client.beta.sessions.events.stream(this.sessionId,{},Y(this,c,"m",BX).call(this));await Y(this,c,"m",m9).call(this);for await(let z of J)if(X=l9,await Y(this,c,"m",c9).call(this,z))return}catch(J){if($.signal.throwIfAborted(),dZ(J))throw Y(this,r,"f").error("permanent stream failure, shutting down",{error:String(J)}),$.abort(),J;Y(this,r,"f").warn("stream disconnected, reconnecting",{error:String(J),backoff_ms:X})}$.signal.throwIfAborted(),await xZ(X,$.signal),X=Math.min(X*2,D5)}},m9=async function(){let $=Y(this,s,"f"),X=[],J=!1;try{for await(let V of this.client.beta.sessions.events.list(this.sessionId,{limit:1000},Y(this,c,"m",BX).call(this)))Y(this,c,"m",u9).call(this,V,X),J=a9(V)}catch(V){$.signal.throwIfAborted(),Y(this,r,"f").warn("reconcile list failed",{error:String(V)});for(let K of X)Y(this,I0,"f").delete(K.id);return}let z=X.filter((V)=>!Y(this,UZ,"f").has(V.id));Y(this,HZ,"f").disarm();for(let V of z)await Y(this,c,"m",_1).call(this,V);for(let V of[...Y(this,lZ,"f").values()]){let K=Y(this,f0,"f").get(V.id);if(K!==void 0)await Y(this,c,"m",HX).call(this,V,K)}let Q=z.filter((V)=>!Y(this,UZ,"f").has(V.id)&&!Y(this,lZ,"f").has(V.id));if(J&&Q.length===0)Y(this,HZ,"f").arm();else Y(this,HZ,"f").disarm()},u9=function($,X){if($.type==="agent.tool_use"||$.type==="agent.custom_tool_use"){if(Y(this,I0,"f").add($.id),!Y(this,UZ,"f").has($.id))X.push($)}else if($.type==="user.tool_result")Y(this,UZ,"f").add($.tool_use_id);else if($.type==="user.custom_tool_result")Y(this,UZ,"f").add($.custom_tool_use_id);else if($.type==="user.tool_confirmation"){if(!Y(this,UZ,"f").has($.tool_use_id))Y(this,f0,"f").set($.tool_use_id,$.result)}},c9=async function($){switch(Y(this,HZ,"f").noteEvent($),$.type){case"agent.tool_use":case"agent.custom_tool_use":if(!Y(this,I0,"f").has($.id))Y(this,I0,"f").add($.id),await Y(this,c,"m",_1).call(this,$);return!1;case"user.tool_confirmation":return await Y(this,c,"m",d9).call(this,$),!1;case"user.tool_result":return Y(this,UZ,"f").add($.tool_use_id),!1;case"user.custom_tool_result":return Y(this,UZ,"f").add($.custom_tool_use_id),!1;case"session.status_terminated":case"session.deleted":return Y(this,r,"f").info("session terminated",{component:"session-tool-runner",session_id:this.sessionId}),Y(this,s,"f").abort(),!0;default:return!1}},_1=async function($){let X=$.evaluated_permission,J=X==="deny"?"deny":Y(this,f0,"f").get($.id);if(J===void 0){if(X===void 0||X==="allow")await Y(this,c,"m",v1).call(this,$,void 0);else if(!Y(this,lZ,"f").has($.id))Y(this,r,"f").info("tool call awaiting confirmation; holding",{component:"session-tool-runner",session_id:this.sessionId,tool:$.name,tool_use_id:$.id}),Y(this,lZ,"f").set($.id,$),Y(this,HZ,"f").block($.id);return}await Y(this,c,"m",HX).call(this,$,J)},d9=async function($){Y(this,f0,"f").set($.tool_use_id,$.result);let X=Y(this,lZ,"f").get($.tool_use_id);if(X===void 0)return;await Y(this,c,"m",HX).call(this,X,$.result)},HX=async function($,X){let J=Y(this,lZ,"f").delete($.id);if(X==="allow"){if(Y(this,r,"f").info("tool call confirmed",{component:"session-tool-runner",session_id:this.sessionId,tool:$.name,tool_use_id:$.id}),!J)Y(this,HZ,"f").block($.id);try{await Y(this,c,"m",v1).call(this,$,"allow")}finally{Y(this,HZ,"f").unblock($.id)}return}if(J)Y(this,HZ,"f").unblock($.id);Y(this,UZ,"f").add($.id),Y(this,r,"f").info("tool call denied; not executing",{component:"session-tool-runner",session_id:this.sessionId,tool:$.name,tool_use_id:$.id}),Y(this,c,"m",TX).call(this,{event:$,toolUseId:$.id,name:$.name,isError:!1,posted:!1,confirmation:"deny"})},TX=function($){Y(this,P0,"f").push($)},v1=async function($,X){var J,z;if(Y(this,UZ,"f").has($.id))return;Y(this,r,"f").info("executing tool",{component:"session-tool-runner",session_id:this.sessionId,tool:$.name,tool_use_id:$.id}),q(this,kZ,(J=Y(this,kZ,"f"),J++,J),"f");try{let Q=Y(this,AX,"f").get($.name);if(!Q){Y(this,r,"f").info("tool not owned by this runner; leaving the tool_use_id pending for its owner",{component:"session-tool-runner",session_id:this.sessionId,tool:$.name,tool_use_id:$.id}),Y(this,c,"m",TX).call(this,{event:$,toolUseId:$.id,name:$.name,isError:!1,posted:!1,confirmation:X});return}let V,K,G=new AbortController,w=cZ(Y(this,s,"f").signal,G),x=setTimeout(()=>G.abort(),R5);try{let B=await _9(Q,$.input,{toolUse:$,toolUseBlock:$,signal:G.signal});V=B.content,K=B.isError}finally{clearTimeout(x),w()}let O=h5($,K,b5(V)),U=await Y(this,c,"m",p9).call(this,O,$.id);Y(this,c,"m",TX).call(this,{event:$,result:O,toolUseId:$.id,name:$.name,isError:K,posted:U,confirmation:X})}finally{if(q(this,kZ,(z=Y(this,kZ,"f"),z--,z),"f"),Y(this,kZ,"f")===0)Y(this,u8,"f")?.call(this)}},p9=async function($,X){let J=Y(this,s,"f"),z=Date.now(),Q,V=0;while(!0){V++,J.signal.throwIfAborted();try{return await this.client.beta.sessions.events.send(this.sessionId,{events:[$]},Y(this,c,"m",BX).call(this)),Y(this,UZ,"f").add(X),!0}catch(K){if(Q=K,dZ(K))break;let G=Y(this,LX,"f")-(Date.now()-z);if(G<=0)break;let w=Math.min(VX(KX(V-1,I5,f5)),G);Y(this,r,"f").warn("tool result send failed; retrying",{tool_use_id:X,attempt:V,backoff_ms:w,error:String(K)}),await xZ(w,J.signal)}}return Y(this,r,"f").error("failed to send tool result",{tool_use_id:X,attempts:V,error:String(Q)}),!1},n9=async function(){if(Y(this,kZ,"f")===0)return;if(await Promise.race([new Promise(($)=>q(this,u8,$,"f")),xZ(P5)]),q(this,u8,null,"f"),Y(this,kZ,"f")>0)Y(this,r,"f").warn("drain timeout exceeded")}});function v5(Z){return Z.resources.some(($)=>$.type==="memory_store")}function m5(Z){if(!Z)return null;let $;try{let J=Z.replace(/-/g,"+").replace(/_/g,"/"),z=J.padEnd(Math.ceil(J.length/4)*4,"=");$=JSON.parse(O8(c6(z)))}catch{return null}if($===null||typeof $!=="object"||Array.isArray($))return null;let X=$.sessions_token;return typeof X==="string"&&X!==""?X:null}class p8{constructor(Z){if(SX.add(this),c8.set(this,void 0),Z.unrestrictedPaths!==void 0)throw new H("The `unrestrictedPaths` option you passed to EnvironmentWorker (or client.beta.environments.work.worker()) is no longer supported. The worker's file tools (read, write, edit, glob, grep) are now always confined to `workdir` plus the session's memory folders. Remove `unrestrictedPaths` from your options; to let the file tools reach any other directory, add it to `AgentToolContext.allowedRoots` from a `tools` factory.");if(this.client=Z.client,this.environmentId=Z.environmentId,this.environmentKey=Z.environmentKey,this.tools=Z.tools,this.workdir=Z.workdir??process.cwd(),this.maxFileBytes=Z.maxFileBytes,this.maxIdleMs=Z.maxIdleMs,Z.memorySyncIntervalMs!=null)Y6(Z.memorySyncIntervalMs,"memorySyncIntervalMs");this.memorySyncIntervalMs=Z.memorySyncIntervalMs,this.memorySyncDeletions=Z.memorySyncDeletions??"enabled",this.workerId=Z.workerId,this.requestOptions=Z.requestOptions,q(this,c8,Z.signal,"f")}async run(Z){let{environmentId:$,environmentKey:X}=this;if($===void 0||X===void 0)throw new H("EnvironmentWorker.run: environmentId and environmentKey are required to poll for work");let J=Z??Y(this,c8,"f"),z=new z0({client:this.client,environmentId:$,environmentKey:X,...this.workerId!==void 0?{workerId:this.workerId}:{},...J?{signal:J}:{},...this.requestOptions!==void 0?{requestOptions:this.requestOptions}:{},autoStop:!1});for await(let Q of z)try{await Y(this,SX,"m",m1).call(this,Q,X,z.signal)}catch(V){if(z.signal?.aborted)throw V;k(this.client).error("work item failed",{work_id:Q.id,error:String(V)})}}async handleItem(Z){let $=Z?.workId??y("ANTHROPIC_WORK_ID"),X=Z?.environmentId??y("ANTHROPIC_ENVIRONMENT_ID"),J=Z?.sessionId??y("ANTHROPIC_SESSION_ID"),z=Z?.environmentKey??this.environmentKey??y("ANTHROPIC_ENVIRONMENT_KEY"),Q=Z?.workSecret||y("ANTHROPIC_WORK_SECRET")||null;if(!$)throw new H("handleItem: workId is required — pass it or set ANTHROPIC_WORK_ID");if(!X)throw new H("handleItem: environmentId is required — pass it or set ANTHROPIC_ENVIRONMENT_ID");if(!J)throw new H("handleItem: sessionId is required — pass it or set ANTHROPIC_SESSION_ID");if(!z)throw new H("handleItem: environmentKey is required — pass it, construct the worker with it, or set ANTHROPIC_ENVIRONMENT_KEY");let V={id:$,environment_id:X,secret:Q,data:{type:"session",id:J}};await Y(this,SX,"m",m1).call(this,V,z,Z?.signal??Y(this,c8,"f"))}}async function t9(Z,$){let X;try{return await Promise.race([Z.then(()=>!1,()=>!1),new Promise((J)=>{X=setTimeout(()=>J(!0),$)})])}finally{if(X!==void 0)clearTimeout(X)}}async function u5(Z,$,X,J){try{await Z.beta.environments.work.stop($.id,{environment_id:$.environment_id,force:!0},{...J,headers:N([J?.headers])})}catch(z){if(!yZ(z,409))X.error("force-stop on exit failed",{work_id:$.id,error:String(z)})}}class s9{constructor(Z){d8.set(this,void 0),y0.set(this,void 0),q(this,d8,Z,"f")}get signal(){return Y(this,d8,"f").signal}finish(Z){q(this,y0,Y(this,y0,"f")??Z,"f"),Y(this,d8,"f").abort()}get lost(){return Y(this,y0,"f")==="lease_lost"||Y(this,y0,"f")==="assumed_lost"}}function c5(Z){let $=Z instanceof v?Z.error:void 0;for(let X of["error","details","current_state"]){if(!nX($))return{};$=$[X]}return nX($)?$:{}}async function d5(Z,$,X,J,z,Q){let V=o9,K=g5,G=Date.now(),w=_5,x=async()=>{let O=new AbortController,U=cZ(X.signal,O),B=setTimeout(()=>O.abort(),V);try{let T=await Z.beta.environments.work.heartbeat($.id,{environment_id:$.environment_id,expected_last_heartbeat:w},{...z,headers:N([z?.headers]),signal:O.signal});if(G=Date.now(),w=T.last_heartbeat,T.ttl_seconds>0)K=T.ttl_seconds*1000,V=Math.max(1000,Math.min(K/2,o9)),Q?.(K);if(T.state==="stopping"||T.state==="stopped")J.info("heartbeat signals shutdown",{work_id:$.id,state:T.state}),X.finish("control_plane_stop");if(!T.lease_extended)J.warn("lease not extended, shutting down",{work_id:$.id}),X.finish("control_plane_stop")}catch(T){if(X.signal.throwIfAborted(),yZ(T,412)){let P=c5(T);J.error("lease lost: heartbeat precondition failed",{work_id:$.id,server_state:P.state,server_ttl_seconds:P.ttl_seconds,server_last_heartbeat:P.last_heartbeat}),X.finish("lease_lost");return}if(dZ(T))throw J.error("permanent heartbeat failure",{work_id:$.id,error:String(T)}),X.finish("heartbeat_rejected"),T;if(Date.now()-G>K){J.error("lease assumed lost: no successful heartbeat in ttl",{work_id:$.id,ttl_ms:K,error:String(T)}),X.finish("assumed_lost");return}J.warn("transient heartbeat failure",{work_id:$.id,error:String(T)})}finally{clearTimeout(B),U()}};await x();while(!X.signal.aborted)await xZ(V,X.signal),X.signal.throwIfAborted(),await x()}var SX,c8,m1,d8,y0,o9=30000,g5=90000,_5="NO_HEARTBEAT";var u1=C(()=>{QZ();m();IZ();Q1();q8();T0();C0();h8();QX();XZ();R();jX();wX();h1();Q6();c8=new WeakMap,SX=new WeakSet,m1=async function($,X,J){let z=k(this.client),Q=m5($.secret);if($.secret&&Q===null)z.warn("work item carried a secret payload but no sessions token could be extracted; falling back to the environment key",{work_id:$.id});let V=Q??X,K=NX(this.client,{authToken:V,helper:"environments-worker"}),G=$.data.id,w=new AbortController,x=cZ(J,w),O=new s9(w),U=await import("./node-1.1.26-y7ck63cv.mjs"),B,T,P=d5(K,$,O,z,this.requestOptions,(F)=>{B=F,T?._setSendRetryWindow(F)}).catch((F)=>{if(!w.signal.aborted)z.error("heartbeat loop failed",{work_id:$.id,error:String(F)});w.abort()}),j=async()=>{},S,A=!1;try{if($.data.type!=="session"){z.debug("skipping non-session work item",{work_id:$.id,type:$.data.type});return}let F=await K.beta.sessions.retrieve(G);if(Q===null&&this.memorySyncIntervalMs!==null&&v5(F))throw new U.SessionMemoryError(`cannot mount the session's memories: the work item carried no sessions token (work_id=${$.id}, session_id=${G}); the memory endpoints reject the environment key, so the poller must issue a per-item \`secret\` carrying \`sessions_token\`, or set \`memorySyncIntervalMs: null\` to run without memory`);let f={workdir:this.workdir,client:K,session:F,...this.maxFileBytes!==void 0?{maxFileBytes:this.maxFileBytes}:{}};try{j=await U.setupSkills(f)}catch(g){z.warn("skill setup failed",{session_id:G,work_id:$.id,error:String(g)})}if(Q!==null&&this.memorySyncIntervalMs!==null)S=new U.SessionMemoryStores(K,{workdir:this.workdir,...this.memorySyncIntervalMs!==void 0?{syncIntervalMs:this.memorySyncIntervalMs}:{},syncDeletions:this.memorySyncDeletions}),await S.download(F),f.allowedRoots=S.roots,f.readOnlyRoots=S.readOnlyRoots;else z.debug("memory stores disabled for this item",{work_id:$.id});let h=typeof this.tools==="function"?this.tools(f):this.tools??U.betaAgentToolset20260401(f);if(T=new Q0(G,{client:K,tools:h,...this.maxIdleMs!==void 0?{maxIdleMs:this.maxIdleMs}:{},...this.requestOptions!==void 0?{requestOptions:this.requestOptions}:{},signal:w.signal}),B!==void 0)T._setSendRetryWindow(B);for await(let g of T)if(S)await S.syncIfDue();A=!w.signal.aborted}finally{try{await j().catch((F)=>{z.warn("skill cleanup failed",{session_id:G,work_id:$.id,error:String(F)})})}finally{if(S){let F=U.MEMORY_FLUSH_TIMEOUT_MS;if(A){if(await t9(S.finish(),F))z.warn(`final memory sync cut off after ${F}ms; the flush that follows still uploads changed files`,{session_id:G,work_id:$.id})}let f=new AbortController;if(await t9(S.flushWrites(f.signal),F))f.abort(),z.warn(`memory flush cut off after ${F}ms; changed files it had not uploaded yet are not saved`,{session_id:G,work_id:$.id});await S.dispose().catch((g)=>{z.warn("memory store cleanup failed",{session_id:G,work_id:$.id,error:String(g)})})}}if(O.finish("runner_done"),x(),await P,O.lost)z.info("lease lost; released without stopping it",{session_id:G,work_id:$.id});else await u5(K,$,z,this.requestOptions)}};d8=new WeakMap,y0=new WeakMap});var K0;var c1=C(()=>{E();D();R();I();wX();u1();wX();u1();K0=class K0 extends M{retrieve(Z,$,X){let{environment_id:J,betas:z}=$;return this._client.get(W`/v1/environments/${J}/work/${Z}?beta=true`,{...X,headers:N([{"anthropic-beta":[...z??[],"managed-agents-2026-04-01"].toString()},X?.headers])})}update(Z,$,X){let{environment_id:J,betas:z,...Q}=$;return this._client.post(W`/v1/environments/${J}/work/${Z}?beta=true`,{body:Q,...X,headers:N([{"anthropic-beta":[...z??[],"managed-agents-2026-04-01"].toString()},X?.headers])})}list(Z,$={},X){let{betas:J,...z}=$??{};return this._client.getAPIList(W`/v1/environments/${Z}/work?beta=true`,L,{query:z,...X,headers:N([{"anthropic-beta":[...J??[],"managed-agents-2026-04-01"].toString()},X?.headers])})}ack(Z,$,X){let{environment_id:J,betas:z}=$;return this._client.post(W`/v1/environments/${J}/work/${Z}/ack?beta=true`,{...X,headers:N([{"anthropic-beta":[...z??[],"managed-agents-2026-04-01"].toString()},X?.headers])})}heartbeat(Z,$,X){let{environment_id:J,desired_ttl_seconds:z,expected_last_heartbeat:Q,betas:V}=$;return this._client.post(W`/v1/environments/${J}/work/${Z}/heartbeat?beta=true`,{query:{desired_ttl_seconds:z,expected_last_heartbeat:Q},...X,headers:N([{"anthropic-beta":[...V??[],"managed-agents-2026-04-01"].toString()},X?.headers])})}poll(Z,$={},X){let{betas:J,"Anthropic-Worker-ID":z,...Q}=$??{};return this._client.get(W`/v1/environments/${Z}/work/poll?beta=true`,{query:Q,...X,headers:N([{"anthropic-beta":[...J??[],"managed-agents-2026-04-01"].toString(),...z!=null?{"Anthropic-Worker-ID":z}:void 0},X?.headers])})}stats(Z,$={},X){let{betas:J}=$??{};return this._client.get(W`/v1/environments/${Z}/work/stats?beta=true`,{...X,headers:N([{"anthropic-beta":[...J??[],"managed-agents-2026-04-01"].toString()},X?.headers])})}stop(Z,$,X){let{environment_id:J,betas:z,...Q}=$;return this._client.post(W`/v1/environments/${J}/work/${Z}/stop?beta=true`,{body:Q,...X,headers:N([{"anthropic-beta":[...z??[],"managed-agents-2026-04-01"].toString()},X?.headers])})}poller(Z){return new z0({...Z,client:this._client})}worker(Z){return new p8({...Z,client:this._client})}};K0.WorkPoller=z0;K0.EnvironmentWorker=p8});var k0;var d1=C(()=>{E();c1();c1();D();R();I();k0=class k0 extends M{constructor(){super(...arguments);this.work=new K0(this._client)}create(Z,$){let{betas:X,...J}=Z;return this._client.post("/v1/environments?beta=true",{body:J,...$,headers:N([{"anthropic-beta":[...X??[],"managed-agents-2026-04-01"].toString()},$?.headers])})}retrieve(Z,$={},X){let{betas:J}=$??{};return this._client.get(W`/v1/environments/${Z}?beta=true`,{...X,headers:N([{"anthropic-beta":[...J??[],"managed-agents-2026-04-01"].toString()},X?.headers])})}update(Z,$,X){let{betas:J,...z}=$;return this._client.post(W`/v1/environments/${Z}?beta=true`,{body:z,...X,headers:N([{"anthropic-beta":[...J??[],"managed-agents-2026-04-01"].toString()},X?.headers])})}list(Z={},$){let{betas:X,...J}=Z??{};return this._client.getAPIList("/v1/environments?beta=true",L,{query:J,...$,headers:N([{"anthropic-beta":[...X??[],"managed-agents-2026-04-01"].toString()},$?.headers])})}delete(Z,$={},X){let{betas:J}=$??{};return this._client.delete(W`/v1/environments/${Z}?beta=true`,{...X,headers:N([{"anthropic-beta":[...J??[],"managed-agents-2026-04-01"].toString()},X?.headers])})}archive(Z,$={},X){let{betas:J}=$??{};return this._client.post(W`/v1/environments/${Z}/archive?beta=true`,{...X,headers:N([{"anthropic-beta":[...J??[],"managed-agents-2026-04-01"].toString()},X?.headers])})}};k0.Work=K0});var l8;var p1=C(()=>{E();D();R();I();l8=class l8 extends M{create(Z,$,X){let{view:J,betas:z,...Q}=$;return this._client.post(W`/v1/memory_stores/${Z}/memories?beta=true`,{query:{view:J},body:Q,...X,headers:N([{"anthropic-beta":[...z??[],"agent-memory-2026-07-22"].toString()},X?.headers])})}retrieve(Z,$,X){let{memory_store_id:J,betas:z,...Q}=$;return this._client.get(W`/v1/memory_stores/${J}/memories/${Z}?beta=true`,{query:Q,...X,headers:N([{"anthropic-beta":[...z??[],"agent-memory-2026-07-22"].toString()},X?.headers])})}update(Z,$,X){let{memory_store_id:J,view:z,betas:Q,...V}=$;return this._client.post(W`/v1/memory_stores/${J}/memories/${Z}?beta=true`,{query:{view:z},body:V,...X,headers:N([{"anthropic-beta":[...Q??[],"agent-memory-2026-07-22"].toString()},X?.headers])})}list(Z,$={},X){let{betas:J,...z}=$??{};return this._client.getAPIList(W`/v1/memory_stores/${Z}/memories?beta=true`,L,{query:z,...X,headers:N([{"anthropic-beta":[...J??[],"agent-memory-2026-07-22"].toString()},X?.headers])})}delete(Z,$,X){let{memory_store_id:J,expected_content_sha256:z,betas:Q}=$;return this._client.delete(W`/v1/memory_stores/${J}/memories/${Z}?beta=true`,{query:{expected_content_sha256:z},...X,headers:N([{"anthropic-beta":[...Q??[],"agent-memory-2026-07-22"].toString()},X?.headers])})}}});var i8;var l1=C(()=>{E();D();R();I();i8=class i8 extends M{retrieve(Z,$,X){let{memory_store_id:J,betas:z,...Q}=$;return this._client.get(W`/v1/memory_stores/${J}/memory_versions/${Z}?beta=true`,{query:Q,...X,headers:N([{"anthropic-beta":[...z??[],"agent-memory-2026-07-22"].toString()},X?.headers])})}list(Z,$={},X){let{betas:J,...z}=$??{};return this._client.getAPIList(W`/v1/memory_stores/${Z}/memory_versions?beta=true`,L,{query:z,...X,headers:N([{"anthropic-beta":[...J??[],"agent-memory-2026-07-22"].toString()},X?.headers])})}redact(Z,$,X){let{memory_store_id:J,betas:z}=$;return this._client.post(W`/v1/memory_stores/${J}/memory_versions/${Z}/redact?beta=true`,{...X,headers:N([{"anthropic-beta":[...z??[],"agent-memory-2026-07-22"].toString()},X?.headers])})}}});var V0;var i1=C(()=>{E();p1();p1();l1();l1();D();R();I();V0=class V0 extends M{constructor(){super(...arguments);this.memories=new l8(this._client),this.memoryVersions=new i8(this._client)}create(Z,$){let{betas:X,...J}=Z;return this._client.post("/v1/memory_stores?beta=true",{body:J,...$,headers:N([{"anthropic-beta":[...X??[],"agent-memory-2026-07-22"].toString()},$?.headers])})}retrieve(Z,$={},X){let{betas:J}=$??{};return this._client.get(W`/v1/memory_stores/${Z}?beta=true`,{...X,headers:N([{"anthropic-beta":[...J??[],"agent-memory-2026-07-22"].toString()},X?.headers])})}update(Z,$,X){let{betas:J,...z}=$;return this._client.post(W`/v1/memory_stores/${Z}?beta=true`,{body:z,...X,headers:N([{"anthropic-beta":[...J??[],"agent-memory-2026-07-22"].toString()},X?.headers])})}list(Z={},$){let{betas:X,...J}=Z??{};return this._client.getAPIList("/v1/memory_stores?beta=true",L,{query:J,...$,headers:N([{"anthropic-beta":[...X??[],"agent-memory-2026-07-22"].toString()},$?.headers])})}delete(Z,$={},X){let{betas:J}=$??{};return this._client.delete(W`/v1/memory_stores/${Z}?beta=true`,{...X,headers:N([{"anthropic-beta":[...J??[],"agent-memory-2026-07-22"].toString()},X?.headers])})}archive(Z,$={},X){let{betas:J}=$??{};return this._client.post(W`/v1/memory_stores/${Z}/archive?beta=true`,{...X,headers:N([{"anthropic-beta":[...J??[],"agent-memory-2026-07-22"].toString()},X?.headers])})}};V0.Memories=l8;V0.MemoryVersions=i8});var h0=C(()=>{m()});var b0;var n1=C(()=>{m();M0();O1();b0=class b0{constructor(Z,$){this.iterator=Z,this.controller=$}async*decoder(){let Z=new mZ;for await(let $ of this.iterator)for(let X of Z.decode($))yield JSON.parse(X);for(let $ of Z.flush())yield JSON.parse($)}[Symbol.asyncIterator](){return this.decoder()}static fromResponse(Z,$){if(!Z.body){if($.abort(),typeof globalThis.navigator<"u"&&globalThis.navigator.product==="ReactNative")throw new H("The default react-native fetch implementation does not support streaming. Please use expo/fetch: https://docs.expo.dev/versions/latest/sdk/expo/#expofetch-api");throw new H("Attempted to iterate over a response with no body")}return new b0(U8(Z.body),$)}}});var n8;var a1=C(()=>{E();D();R();n1();h0();I();n8=class n8 extends M{create(Z,$){let{betas:X,user_profile_id:J,...z}=Z;return this._client.post("/v1/messages/batches?beta=true",{body:z,...$,headers:N([{"anthropic-beta":[...X??[],"message-batches-2024-09-24"].toString(),...J!=null?{"anthropic-user-profile-id":J}:void 0},$?.headers])})}retrieve(Z,$={},X){let{betas:J}=$??{};return this._client.get(W`/v1/messages/batches/${Z}?beta=true`,{...X,headers:N([{"anthropic-beta":[...J??[],"message-batches-2024-09-24"].toString()},X?.headers])})}list(Z={},$){let{betas:X,...J}=Z??{};return this._client.getAPIList("/v1/messages/batches?beta=true",t,{query:J,...$,headers:N([{"anthropic-beta":[...X??[],"message-batches-2024-09-24"].toString()},$?.headers])})}delete(Z,$={},X){let{betas:J}=$??{};return this._client.delete(W`/v1/messages/batches/${Z}?beta=true`,{...X,headers:N([{"anthropic-beta":[...J??[],"message-batches-2024-09-24"].toString()},X?.headers])})}cancel(Z,$={},X){let{betas:J}=$??{};return this._client.post(W`/v1/messages/batches/${Z}/cancel?beta=true`,{...X,headers:N([{"anthropic-beta":[...J??[],"message-batches-2024-09-24"].toString()},X?.headers])})}async results(Z,$={},X){let J=await this.retrieve(Z);if(!J.results_url)throw new H(`No batch \`results_url\`; Has it finished processing? ${J.processing_status} - ${J.id}`);let{betas:z}=$??{};return this._client.get(J.results_url,{...X,headers:N([{"anthropic-beta":[...z??[],"message-batches-2024-09-24"].toString(),Accept:"application/binary"},X?.headers]),stream:!0,__binaryResponse:!0})._thenUnwrap((Q,V)=>b0.fromResponse(V.response,V.controller))}}});var EX;var r1=C(()=>{EX={"claude-opus-4@20250514":8192,"anthropic.claude-opus-4-1-20250805-v1:0":8192,"claude-opus-4-1@20250805":8192}});function e9(Z){return Z?.output_format??Z?.output_config?.format}function o1(Z,$,X){let J=e9($);if(!$||!("parse"in(J??{})))return{...Z,content:Z.content.map((z)=>{if(z.type==="text"){let Q=Object.defineProperty({...z},"parsed_output",{value:null,enumerable:!1});return Object.defineProperty(Q,"parsed",{get(){return X.logger.warn("The `parsed` property on `text` blocks is deprecated, please use `parsed_output` instead."),null},enumerable:!1})}return z}),parsed_output:null};return t1(Z,$,X)}function t1(Z,$,X){let J=null,z=Z.content.map((Q)=>{if(Q.type==="text"){let V=o5($,Q.text);if(J===null)J=V;let K=Object.defineProperty({...Q},"parsed_output",{value:V,enumerable:!1});return Object.defineProperty(K,"parsed",{get(){return X.logger.warn("The `parsed` property on `text` blocks is deprecated, please use `parsed_output` instead."),V},enumerable:!1})}return Q});return{...Z,content:z,parsed_output:J}}function o5(Z,$){let X=e9(Z);if(X?.type!=="json_schema")return null;try{if("parse"in X)return X.parse($);return JSON.parse($)}catch(J){throw new H(`Failed to parse structured output: ${J}`)}}var s1=C(()=>{m()});var e1=C(()=>{B8()});var t5=(Z)=>{let $=0,X=[];while($<Z.length){let J=Z[$];if(J==="\\"){$++;continue}if(J==="{"){X.push({type:"brace",value:"{"}),$++;continue}if(J==="}"){X.push({type:"brace",value:"}"}),$++;continue}if(J==="["){X.push({type:"paren",value:"["}),$++;continue}if(J==="]"){X.push({type:"paren",value:"]"}),$++;continue}if(J===":"){X.push({type:"separator",value:":"}),$++;continue}if(J===","){X.push({type:"delimiter",value:","}),$++;continue}if(J==='"'){let K="",G=!1;J=Z[++$];while(J!=='"'){if($===Z.length){G=!0;break}if(J==="\\"){if($++,$===Z.length){G=!0;break}K+=J+Z[$],J=Z[++$]}else K+=J,J=Z[++$]}if(J=Z[++$],!G)X.push({type:"string",value:K});continue}if(J&&/\s/.test(J)){$++;continue}let Q=/[0-9]/;if(J&&Q.test(J)||J==="-"||J==="."){let K="";if(J==="-")K+=J,J=Z[++$];while(J&&(Q.test(J)||J==="."||J==="e"||J==="E"||(J==="-"||J==="+")&&(K[K.length-1]==="e"||K[K.length-1]==="E")))K+=J,J=Z[++$];X.push({type:"number",value:K});continue}let V=/[a-z]/i;if(J&&V.test(J)){let K="";while(J&&V.test(J)){if($===Z.length)break;K+=J,J=Z[++$]}if(K=="true"||K=="false"||K==="null")X.push({type:"name",value:K});else{$++;continue}continue}$++}return X},g0=(Z)=>{if(Z.length===0)return Z;let $=Z[Z.length-1];switch($.type){case"separator":return Z=Z.slice(0,Z.length-1),g0(Z);break;case"number":let X=$.value[$.value.length-1];if(X==="."||X==="-"||X==="+"||X==="e"||X==="E")return Z=Z.slice(0,Z.length-1),g0(Z);case"string":let J=Z[Z.length-2];if(J?.type==="delimiter")return Z=Z.slice(0,Z.length-1),g0(Z);else if(J?.type==="brace"&&J.value==="{")return Z=Z.slice(0,Z.length-1),g0(Z);break;case"delimiter":return Z=Z.slice(0,Z.length-1),g0(Z);break}return Z},s5=(Z)=>{let $=[];if(Z.map((X)=>{if(X.type==="brace")if(X.value==="{")$.push("}");else $.splice($.lastIndexOf("}"),1);if(X.type==="paren")if(X.value==="[")$.push("]");else $.splice($.lastIndexOf("]"),1)}),$.length>0)$.reverse().map((X)=>{if(X==="}")Z.push({type:"brace",value:"}"});else if(X==="]")Z.push({type:"paren",value:"]"})});return Z},e5=(Z)=>{let $="";return Z.map((X)=>{switch(X.type){case"string":$+='"'+X.value+'"';break;default:$+=X.value;break}}),$},Z7=(Z)=>JSON.parse(e5(s5(g0(t5(Z)))));var $7=()=>{};function FX(Z,$){let X={};for(let Q of Object.keys(Z))if(Q!=="input")X[Q]=Z[Q];Object.defineProperty(X,iZ,{value:$,enumerable:!1,writable:!0});let J,z=!1;return Object.defineProperty(X,"input",{enumerable:!0,configurable:!0,get(){if(!z)J=$?Z7($):{},z=!0;return J}}),X}var iZ="__json_buf";var Z4=C(()=>{$7()});function Q4(Z){return Z.type==="tool_use"||Z.type==="server_tool_use"||Z.type==="mcp_tool_use"}var zZ,nZ,_0,a8,DX,r8,o8,RX,t8,DZ,s8,PX,IX,N0,fX,yX,kX,e8,$4,X7,Z$,X4,J4,z4,J7,Y4,$$;var z7=C(()=>{QZ();LZ();h0();gZ();XZ();e1();s1();Z4();$$=class $${constructor(Z,$){zZ.add(this),this.messages=[],this.receivedMessages=[],nZ.set(this,void 0),_0.set(this,null),this.controller=new AbortController,a8.set(this,void 0),DX.set(this,()=>{}),r8.set(this,()=>{}),o8.set(this,void 0),RX.set(this,()=>{}),t8.set(this,()=>{}),DZ.set(this,{}),s8.set(this,!1),PX.set(this,!1),IX.set(this,!1),N0.set(this,!1),fX.set(this,void 0),yX.set(this,void 0),kX.set(this,void 0),e8.set(this,void 0),Z$.set(this,(X)=>{if(q(this,PX,!0,"f"),wZ(X))X=new e;if(X instanceof e)return q(this,IX,!0,"f"),this._emit("abort",X);if(X instanceof H)return this._emit("error",X);if(X instanceof Error){let J=new H(X.message);return J.cause=X,this._emit("error",J)}return this._emit("error",new H(String(X)))}),q(this,a8,new Promise((X,J)=>{q(this,DX,X,"f"),q(this,r8,J,"f")}),"f"),q(this,o8,new Promise((X,J)=>{q(this,RX,X,"f"),q(this,t8,J,"f")}),"f"),Y(this,a8,"f").catch(()=>{}),Y(this,o8,"f").catch(()=>{}),q(this,_0,Z,"f"),q(this,e8,$?.logger??console,"f")}get response(){return Y(this,fX,"f")}get request_id(){return Y(this,yX,"f")}get workspace_id(){return Y(this,kX,"f")}async withResponse(){q(this,N0,!0,"f");let Z=await Y(this,a8,"f");if(!Z)throw Error("Could not resolve a `Response` object");return{data:this,response:Z,request_id:Z.headers.get("request-id"),workspace_id:Z.headers.get("anthropic-workspace-id")}}static fromReadableStream(Z){let $=new $$(null);return $._run(()=>$._fromReadableStream(Z)),$}static createMessage(Z,$,X,{logger:J}={}){let z=new $$($,{logger:J});for(let Q of $.messages)z._addMessageParam(Q);return q(z,_0,{...$,stream:!0},"f"),z._run(()=>z._createMessage(Z,{...$,stream:!0},{...X,headers:{...X?.headers,[$X]:"stream"}})),z}_run(Z){Z().then(()=>{this._emitFinal(),this._emit("end")},Y(this,Z$,"f"))}_addMessageParam(Z){this.messages.push(Z)}_addMessage(Z,$=!0){if(this.receivedMessages.push(Z),$)this._emit("message",Z)}async _createMessage(Z,$,X){let J=X?.signal,z;if(J){if(J.aborted)this.controller.abort();z=this.controller.abort.bind(this.controller),J.addEventListener("abort",z)}try{Y(this,zZ,"m",X4).call(this);let{response:Q,data:V}=await Z.create({...$,stream:!0},{...X,signal:this.controller.signal}).withResponse();this._connected(Q);for await(let K of V)Y(this,zZ,"m",J4).call(this,K);if(V.controller.signal?.aborted)throw new e;Y(this,zZ,"m",z4).call(this)}finally{if(J&&z)J.removeEventListener("abort",z)}}_connected(Z){if(this.ended)return;q(this,fX,Z,"f"),q(this,yX,Z?.headers.get("request-id"),"f"),q(this,kX,Z?.headers.get("anthropic-workspace-id"),"f"),Y(this,DX,"f").call(this,Z),this._emit("connect")}get ended(){return Y(this,s8,"f")}get errored(){return Y(this,PX,"f")}get aborted(){return Y(this,IX,"f")}abort(){this.controller.abort()}on(Z,$){return(Y(this,DZ,"f")[Z]||(Y(this,DZ,"f")[Z]=[])).push({listener:$}),this}off(Z,$){let X=Y(this,DZ,"f")[Z];if(!X)return this;let J=X.findIndex((z)=>z.listener===$);if(J>=0)X.splice(J,1);return this}once(Z,$){return(Y(this,DZ,"f")[Z]||(Y(this,DZ,"f")[Z]=[])).push({listener:$,once:!0}),this}emitted(Z){return new Promise(($,X)=>{if(q(this,N0,!0,"f"),Z!=="error")this.once("error",X);this.once(Z,$)})}async done(){q(this,N0,!0,"f"),await Y(this,o8,"f")}get currentMessage(){return Y(this,nZ,"f")}async finalMessage(){return await this.done(),Y(this,zZ,"m",$4).call(this)}async finalText(){return await this.done(),Y(this,zZ,"m",X7).call(this)}_emit(Z,...$){if(Y(this,s8,"f"))return;if(Z==="end")q(this,s8,!0,"f"),Y(this,RX,"f").call(this);let X=Y(this,DZ,"f")[Z];if(X)Y(this,DZ,"f")[Z]=X.filter((J)=>!J.once),X.forEach(({listener:J})=>J(...$));if(Z==="abort"){let J=$[0];if(!Y(this,N0,"f")&&!X?.length)Promise.reject(J);Y(this,r8,"f").call(this,J),Y(this,t8,"f").call(this,J),this._emit("end");return}if(Z==="error"){let J=$[0];if(!Y(this,N0,"f")&&!X?.length)Promise.reject(J);Y(this,r8,"f").call(this,J),Y(this,t8,"f").call(this,J),this._emit("end")}}_emitFinal(){if(this.receivedMessages.at(-1))this._emit("finalMessage",Y(this,zZ,"m",$4).call(this))}async _fromReadableStream(Z,$){let X=$?.signal,J;if(X){if(X.aborted)this.controller.abort();J=this.controller.abort.bind(this.controller),X.addEventListener("abort",J)}try{Y(this,zZ,"m",X4).call(this),this._connected(null);let z=$Z.fromReadableStream(Z,this.controller);for await(let Q of z)Y(this,zZ,"m",J4).call(this,Q);if(z.controller.signal?.aborted)throw new e;Y(this,zZ,"m",z4).call(this)}finally{if(X&&J)X.removeEventListener("abort",J)}}[(nZ=new WeakMap,_0=new WeakMap,a8=new WeakMap,DX=new WeakMap,r8=new WeakMap,o8=new WeakMap,RX=new WeakMap,t8=new WeakMap,DZ=new WeakMap,s8=new WeakMap,PX=new WeakMap,IX=new WeakMap,N0=new WeakMap,fX=new WeakMap,yX=new WeakMap,kX=new WeakMap,e8=new WeakMap,Z$=new WeakMap,zZ=new WeakSet,$4=function(){if(this.receivedMessages.length===0)throw new H("stream ended without producing a Message with role=assistant");return this.receivedMessages.at(-1)},X7=function(){if(this.receivedMessages.length===0)throw new H("stream ended without producing a Message with role=assistant");let $=this.receivedMessages.at(-1).content.filter((X)=>X.type==="text").map((X)=>X.text);if($.length===0)throw new H("stream ended without producing a content block with type=text");return $.join(" ")},X4=function(){if(this.ended)return;q(this,nZ,void 0,"f")},J4=function($){if(this.ended)return;let X=Y(this,zZ,"m",J7).call(this,$);switch(this._emit("streamEvent",$,X),$.type){case"content_block_delta":{let J=X.content.at(-1);switch($.delta.type){case"text_delta":{if(J.type==="text")this._emit("text",$.delta.text,J.text||"");break}case"citations_delta":{if(J.type==="text")this._emit("citation",$.delta.citation,J.citations??[]);break}case"input_json_delta":{if(Q4(J)&&Y(this,DZ,"f").inputJson?.length){let z;try{z=J.input}catch(Q){Y(this,Z$,"f").call(this,Y(this,zZ,"m",Y4).call(this,J,Q));break}this._emit("inputJson",$.delta.partial_json,z)}break}case"thinking_delta":{if(J.type==="thinking")this._emit("thinking",$.delta.thinking,J.thinking);break}case"signature_delta":{if(J.type==="thinking")this._emit("signature",J.signature);break}case"compaction_delta":{if(J.type==="compaction"&&J.content)this._emit("compaction",J.content);break}default:vZ($.delta)}break}case"message_stop":{this._addMessageParam(X),this._addMessage(o1(X,Y(this,_0,"f"),{logger:Y(this,e8,"f")}),!0);break}case"content_block_stop":{this._emit("contentBlock",X.content.at(-1));break}case"message_start":{q(this,nZ,X,"f");break}case"content_block_start":case"message_delta":break}},z4=function(){if(this.ended)throw new H("stream has ended, this shouldn't happen");let $=Y(this,nZ,"f");if(!$)throw new H("request ended without sending any chunks");return q(this,nZ,void 0,"f"),o1($,Y(this,_0,"f"),{logger:Y(this,e8,"f")})},J7=function($){let X=Y(this,nZ,"f");if($.type==="message_start"){if(X)throw new H(`Unexpected event order, got ${$.type} before receiving "message_stop"`);return $.message}if(!X)throw new H(`Unexpected event order, got ${$.type} before "message_start"`);switch($.type){case"message_stop":return X;case"message_delta":if(X.stop_reason=$.delta.stop_reason,X.stop_sequence=$.delta.stop_sequence,X.stop_details=$.delta.stop_details,X.usage.output_tokens=$.usage.output_tokens,$.delta.container!=null)X.container=$.delta.container;if($.context_management!=null)X.context_management=$.context_management;if($.usage.input_tokens!=null)X.usage.input_tokens=$.usage.input_tokens;if($.usage.cache_creation_input_tokens!=null)X.usage.cache_creation_input_tokens=$.usage.cache_creation_input_tokens;if($.usage.cache_read_input_tokens!=null)X.usage.cache_read_input_tokens=$.usage.cache_read_input_tokens;if($.usage.server_tool_use!=null)X.usage.server_tool_use=$.usage.server_tool_use;if($.usage.iterations!=null)X.usage.iterations=$.usage.iterations;if($.usage.fallback_credit!=null)X.usage.fallback_credit=$.usage.fallback_credit;if($.usage.output_tokens_details!=null)X.usage.output_tokens_details=$.usage.output_tokens_details;return X;case"content_block_start":if(X.content.push($.content_block),$.content_block.type==="fallback")X.model=$.content_block.to.model;return X;case"content_block_delta":{let J=X.content.at($.index);switch($.delta.type){case"text_delta":{if(J?.type==="text")X.content[$.index]={...J,text:(J.text||"")+$.delta.text};break}case"citations_delta":{if(J?.type==="text")X.content[$.index]={...J,citations:[...J.citations??[],$.delta.citation]};break}case"input_json_delta":{if(J&&Q4(J)){let z=(J[iZ]||"")+$.delta.partial_json;X.content[$.index]=FX(J,z)}break}case"thinking_delta":{if(J?.type==="thinking")X.content[$.index]={...J,thinking:J.thinking+$.delta.thinking};break}case"signature_delta":{if(J?.type==="thinking")X.content[$.index]={...J,signature:$.delta.signature};break}case"compaction_delta":{if(J?.type==="compaction")X.content[$.index]={...J,content:(J.content||"")+$.delta.content,encrypted_content:$.delta.encrypted_content};break}default:vZ($.delta)}return X}case"content_block_stop":{let J=X.content.at($.index);if(J&&Q4(J)&&iZ in J){let z;try{z=J.input}catch(Q){z={},Y(this,Z$,"f").call(this,Y(this,zZ,"m",Y4).call(this,J,Q))}Object.defineProperty(J,"input",{value:z,enumerable:!0,configurable:!0,writable:!0})}return X}}},Y4=function($,X){let J=$[iZ];return new H(`Unable to parse tool parameter JSON from model. Please retry your request or adjust your prompt. Error: ${X}. JSON: ${J}`)},Symbol.asyncIterator)](){let Z=[],$=[],X=!1;return this.on("streamEvent",(J)=>{let z=$.shift();if(z)z.resolve(J);else Z.push(J)}),this.on("end",()=>{X=!0;for(let J of $)J.resolve(void 0);$.length=0}),this.on("abort",(J)=>{X=!0;for(let z of $)z.reject(J);$.length=0}),this.on("error",(J)=>{X=!0;for(let z of $)z.reject(J);$.length=0}),{next:async()=>{if(!Z.length){if(X)return{value:void 0,done:!0};return new Promise((z,Q)=>$.push({resolve:z,reject:Q})).then((z)=>z?{value:z,done:!1}:{value:void 0,done:!0})}return{value:Z.shift(),done:!1}},return:async()=>{return this.abort(),{value:void 0,done:!0}}}}toReadableStream(){return new $Z(this[Symbol.asyncIterator].bind(this),this.controller).toReadableStream()}}});var Y7=1e5,Q7=`You have been working on the task described above but have not yet completed it. Write a continuation summary that will allow you (or another instance of yourself) to resume work efficiently in a future context window where the conversation history will be replaced with this summary. Your summary should be structured, concise, and actionable. Include:
10
+ 1. Task Overview
11
+ The user's core request and success criteria
12
+ Any clarifications or constraints they specified
13
+ 2. Current State
14
+ What has been completed so far
15
+ Files created, modified, or analyzed (with paths if relevant)
16
+ Key outputs or artifacts produced
17
+ 3. Important Discoveries
18
+ Technical constraints or requirements uncovered
19
+ Decisions made and their rationale
20
+ Errors encountered and how they were resolved
21
+ What approaches were tried that didn't work (and why)
22
+ 4. Next Steps
23
+ Specific actions needed to complete the task
24
+ Any blockers or open questions to resolve
25
+ Priority order if multiple steps remain
26
+ 5. Context to Preserve
27
+ User preferences or style requirements
28
+ Domain-specific details that aren't obvious
29
+ Any promises made to the user
30
+ Be concise but complete—err on the side of including information that would prevent duplicate work or repeated mistakes. Write in a way that enables immediate resumption of the task.
31
+ Wrap your summary in <summary></summary> tags.`;var K7=()=>{};async function ZJ(Z,$=Z.messages.at(-1),X){if(!$||$.role!=="assistant"||!$.content||typeof $.content==="string")return null;let J=$.content.filter((V)=>V.type==="tool_use");if(J.length===0)return null;let z=XJ(Z);return{role:"user",content:await Promise.all(J.map(async(V)=>{let K=Z.tools.find((G)=>("name"in G?G.name:("mcp_server_name"in G)?G.mcp_server_name:G.type)===V.name);if(!K||!("run"in K)||!z.has(V.name))return $J(V);try{let G=V.input;if("parse"in K&&K.parse)G=K.parse(G);let w=await K.run(G,{toolUse:V,toolUseBlock:V,signal:X?.signal});return{type:"tool_result",tool_use_id:V.id,content:w}}catch(G){return{type:"tool_result",tool_use_id:V.id,content:G instanceof _Z?G.content:`Error: ${G instanceof Error?G.message:String(G)}`,is_error:!0}}}))}}function $J(Z){return{type:"tool_result",tool_use_id:Z.id,content:`Error: Tool '${Z.name}' not found`,is_error:!0}}function XJ(Z){let $=new Set;for(let X of Z.tools)if("run"in X)$.add(X.name);for(let X of Z.messages){if(X.role!=="system"||typeof X.content==="string")continue;for(let J of X.content)JJ(J,$)}return $}function JJ(Z,$){switch(Z.type){case"tool_removal":case"tool_addition":zJ(Z,$);break}}function zJ(Z,$){let X=YJ(Z.tool);if(X===void 0)return;if(Z.type==="tool_removal")$.delete(X);else $.add(X)}function YJ(Z){switch(Z.type){case"tool_reference":return Z.name;default:return}}function QJ(Z){if(Z===null)return"stop";switch(Z){case"tool_use":return"run_tools";case"pause_turn":case"compaction":return"resume";case"end_turn":case"stop_sequence":case"max_tokens":case"model_context_window_exceeded":case"refusal":return"stop";default:return vZ(Z),"stop"}}var X$,v0,W0,d,YZ,GZ,hZ,aZ,J$,V7,K4,z$;var V4=C(()=>{QZ();Q8();m();R();K6();XZ();K7();LZ();z$=class z${constructor(Z,$,X){X$.add(this),this.client=Z,v0.set(this,!1),W0.set(this,!1),d.set(this,void 0),YZ.set(this,void 0),GZ.set(this,void 0),hZ.set(this,void 0),aZ.set(this,void 0),J$.set(this,0),q(this,d,{params:{...$,messages:structuredClone($.messages)}},"f");let J=S1($.tools,$.messages);if(q(this,YZ,{...X,headers:N([F8("BetaToolRunner"),J.length?{[E8]:J.join(", ")}:void 0,X?.headers])},"f"),q(this,aZ,pX(),"f"),$.compactionControl?.enabled)console.warn('Anthropic: The `compactionControl` parameter is deprecated and will be removed in a future version. Use server-side compaction instead by passing `edits: [{ type: "compact_20260112" }]` in the params passed to `toolRunner()`. See https://platform.claude.com/docs/en/build-with-claude/compaction')}async*[(v0=new WeakMap,W0=new WeakMap,d=new WeakMap,YZ=new WeakMap,GZ=new WeakMap,hZ=new WeakMap,aZ=new WeakMap,J$=new WeakMap,X$=new WeakSet,V7=async function(){let $=Y(this,d,"f").params.compactionControl;if(!$||!$.enabled)return!1;let X=0;if(Y(this,GZ,"f")!==void 0)try{let G=await Y(this,GZ,"f");X=G.usage.input_tokens+(G.usage.cache_creation_input_tokens??0)+(G.usage.cache_read_input_tokens??0)+G.usage.output_tokens}catch{return!1}let J=$.contextTokenThreshold??Y7;if(X<J)return!1;let z=$.model??Y(this,d,"f").params.model,Q=$.summaryPrompt??Q7,V=Y(this,d,"f").params.messages;if(V[V.length-1].role==="assistant"){let G=V[V.length-1];if(Array.isArray(G.content)){let w=G.content.filter((x)=>x.type!=="tool_use");if(w.length===0)V.pop();else G.content=w}}let K=await this.client.beta.messages.create({model:z,messages:[...V,{role:"user",content:[{type:"text",text:Q}]}],max_tokens:Y(this,d,"f").params.max_tokens},{signal:Y(this,YZ,"f").signal,headers:N([Y(this,YZ,"f").headers,F8("compaction")])});if(K.content[0]?.type!=="text")throw new H("Expected text response for compaction");return Y(this,d,"f").params.messages=[{role:"user",content:K.content}],!0},Symbol.asyncIterator)](){var Z;if(Y(this,v0,"f"))throw new H("Cannot iterate over a consumed stream");q(this,v0,!0,"f"),q(this,W0,!0,"f"),q(this,hZ,void 0,"f");try{while(!0){let $;try{if(Y(this,d,"f").params.max_iterations&&Y(this,J$,"f")>=Y(this,d,"f").params.max_iterations)break;q(this,W0,!1,"f"),q(this,hZ,void 0,"f"),q(this,J$,(Z=Y(this,J$,"f"),Z++,Z),"f"),q(this,GZ,void 0,"f");let{max_iterations:X,compactionControl:J,...z}=Y(this,d,"f").params;if(z.stream)$=this.client.beta.messages.stream({...z},Y(this,YZ,"f")),q(this,GZ,$.finalMessage(),"f"),Y(this,GZ,"f").catch(()=>{}),yield $;else q(this,GZ,this.client.beta.messages.create({...z,stream:!1},Y(this,YZ,"f")),"f"),yield Y(this,GZ,"f");if(!await Y(this,X$,"m",V7).call(this)){if(!Y(this,W0,"f")){let K=await Y(this,GZ,"f"),G=QJ(K.stop_reason);Y(this,d,"f").params.messages.push({role:K.role,content:K.content});let{container:w}=Y(this,d,"f").params;if(K.container){if(w==null)Y(this,d,"f").params.container=K.container.id;else if(typeof w==="object"&&w.id==null)Y(this,d,"f").params.container={...w,id:K.container.id}}if(G==="stop")break;if(G==="resume")continue}let V=await Y(this,X$,"m",K4).call(this,Y(this,d,"f").params.messages.at(-1));if(V)Y(this,d,"f").params.messages.push(V);else if(!Y(this,W0,"f"))break}}finally{if($)$.abort()}}if(!Y(this,GZ,"f"))throw new H("ToolRunner concluded without a message from the server");Y(this,aZ,"f").resolve(await Y(this,GZ,"f"))}catch($){throw q(this,v0,!1,"f"),Y(this,aZ,"f").promise.catch(()=>{}),Y(this,aZ,"f").reject($),q(this,aZ,pX(),"f"),$}}setMessagesParams(Z){if(typeof Z==="function")Y(this,d,"f").params=Z(Y(this,d,"f").params);else Y(this,d,"f").params=Z;q(this,W0,!0,"f"),q(this,hZ,void 0,"f")}setRequestOptions(Z){if(typeof Z==="function")q(this,YZ,Z(Y(this,YZ,"f")),"f");else q(this,YZ,{...Y(this,YZ,"f"),...Z},"f")}async generateToolResponse(Z=Y(this,YZ,"f").signal){let $=await Y(this,GZ,"f")??this.params.messages.at(-1);if(!$)return null;return Y(this,X$,"m",K4).call(this,$,Z)}done(){return Y(this,aZ,"f").promise}async runUntilDone(){if(!Y(this,v0,"f"))for await(let Z of this);return this.done()}get params(){return Y(this,d,"f").params}pushMessages(...Z){this.setMessagesParams(($)=>({...$,messages:[...$.messages,...Z]}))}then(Z,$){return this.runUntilDone().then(Z,$)}};K4=async function($,X=Y(this,YZ,"f").signal){if(Y(this,hZ,"f")!==void 0)return Y(this,hZ,"f");return q(this,hZ,ZJ(Y(this,d,"f").params,$,{...Y(this,YZ,"f"),signal:X}),"f"),Y(this,hZ,"f")}});function W7(Z){if(!Z.output_format)return Z;if(Z.output_config?.format)throw new H("Both output_format and output_config.format were provided. Please use only output_config.format (output_format is deprecated).");let{output_format:$,...X}=Z;return{...X,output_config:{...Z.output_config,format:$}}}var N7,KJ,rZ;var N4=C(()=>{h0();a1();E();r1();R();LZ();s1();z7();V4();Q8();a1();V4();Q8();N7={},KJ=["claude-mythos-preview","claude-opus-4-6"];rZ=class rZ extends M{constructor(){super(...arguments);this.batches=new n8(this._client)}create(Z,$){let X=W7(Z),{betas:J,user_profile_id:z,...Q}=X;if(Q.model in N7)console.warn(`The model '${Q.model}' is deprecated and will reach end-of-life on ${N7[Q.model]}
32
+ Please migrate to a newer model. Visit https://docs.anthropic.com/en/docs/resources/model-deprecations for more information.`);if(KJ.includes(Q.model)&&Q.thinking&&Q.thinking.type==="enabled")console.warn(`Using Claude with ${Q.model} and 'thinking.type=enabled' is deprecated. Use 'thinking.type=adaptive' instead which results in better model performance in our testing: https://platform.claude.com/docs/en/build-with-claude/adaptive-thinking`);let V=$?.timeout??this._client._options.timeout;if(!Q.stream&&V==null){let G=EX[Q.model]??void 0;V=this._client.calculateNonstreamingTimeout(Q.max_tokens,G)}let K=XX(Q.tools,Q.messages);return this._client.post("/v1/messages?beta=true",{body:Q,timeout:V??600000,...$,headers:N([{...J?.toString()!=null?{"anthropic-beta":J?.toString()}:void 0,...z!=null?{"anthropic-user-profile-id":z}:void 0},K,$?.headers]),stream:X.stream??!1})}parse(Z,$){return $={...$,headers:N([{"anthropic-beta":[...Z.betas??[],"structured-outputs-2025-12-15"].toString()},$?.headers])},this.create(Z,$).then((X)=>t1(X,Z,{logger:this._client.logger??console}))}stream(Z,$){return $$.createMessage(this,Z,$)}countTokens(Z,$){let X=W7(Z),{betas:J,user_profile_id:z,...Q}=X;return this._client.post("/v1/messages/count_tokens?beta=true",{body:Q,...$,headers:N([{"anthropic-beta":[...J??[],"token-counting-2024-11-01"].toString(),...z!=null?{"anthropic-user-profile-id":z}:void 0},$?.headers])})}toolRunner(Z,$){return new z$(this._client,Z,$)}};rZ.Batches=n8;rZ.BetaToolRunner=z$;rZ.ToolError=_Z});var Y$;var W4=C(()=>{E();D();I();Y$=class Y$ extends M{retrieve(Z,$){return this._client.get(W`/v1/organizations/api_keys/${Z}?beta=true`,$)}update(Z,$,X){return this._client.post(W`/v1/organizations/api_keys/${Z}?beta=true`,{body:$,...X})}list(Z={},$){return this._client.getAPIList("/v1/organizations/api_keys?beta=true",t,{query:Z,...$})}}});var Q$;var U4=C(()=>{E();D();I();Q$=class Q$ extends M{create(Z,$){return this._client.post("/v1/organizations/external_keys?beta=true",{body:Z,...$})}retrieve(Z,$){return this._client.get(W`/v1/organizations/external_keys/${Z}?beta=true`,$)}update(Z,$,X){return this._client.post(W`/v1/organizations/external_keys/${Z}?beta=true`,{body:$,...X})}list(Z={},$){return this._client.getAPIList("/v1/organizations/external_keys?beta=true",L,{query:Z,...$})}delete(Z,$){return this._client.delete(W`/v1/organizations/external_keys/${Z}?beta=true`,$)}validate(Z,$){return this._client.post(W`/v1/organizations/external_keys/${Z}/validate?beta=true`,$)}}});var K$;var G4=C(()=>{E();D();I();K$=class K$ extends M{create(Z,$){return this._client.post("/v1/organizations/invites?beta=true",{body:Z,...$})}retrieve(Z,$){return this._client.get(W`/v1/organizations/invites/${Z}?beta=true`,$)}list(Z={},$){return this._client.getAPIList("/v1/organizations/invites?beta=true",t,{query:Z,...$})}delete(Z,$){return this._client.delete(W`/v1/organizations/invites/${Z}?beta=true`,$)}}});var V$;var O4=C(()=>{E();D();V$=class V$ extends M{list(Z={},$){return this._client.getAPIList("/v1/organizations/rate_limits?beta=true",L,{query:Z,...$})}}});var N$;var q4=C(()=>{E();D();I();N$=class N$ extends M{retrieve(Z,$){return this._client.get(W`/v1/organizations/users/${Z}?beta=true`,$)}update(Z,$,X){return this._client.post(W`/v1/organizations/users/${Z}?beta=true`,{body:$,...X})}list(Z={},$){return this._client.getAPIList("/v1/organizations/users?beta=true",t,{query:Z,...$})}remove(Z,$){return this._client.delete(W`/v1/organizations/users/${Z}?beta=true`,$)}}});var W$;var w4=C(()=>{E();D();R();I();W$=class W$ extends M{create(Z,$){let{betas:X,...J}=Z;return this._client.post("/v1/organizations/federation_issuers?beta=true",{body:J,...$,headers:N([{...X?.toString()!=null?{"anthropic-beta":X?.toString()}:void 0},$?.headers])})}retrieve(Z,$={},X){let{betas:J}=$??{};return this._client.get(W`/v1/organizations/federation_issuers/${Z}?beta=true`,{...X,headers:N([{...J?.toString()!=null?{"anthropic-beta":J?.toString()}:void 0},X?.headers])})}update(Z,$,X){let{betas:J,...z}=$;return this._client.post(W`/v1/organizations/federation_issuers/${Z}?beta=true`,{body:z,...X,headers:N([{...J?.toString()!=null?{"anthropic-beta":J?.toString()}:void 0},X?.headers])})}list(Z={},$){let{betas:X,...J}=Z??{};return this._client.getAPIList("/v1/organizations/federation_issuers?beta=true",L,{query:J,...$,headers:N([{...X?.toString()!=null?{"anthropic-beta":X?.toString()}:void 0},$?.headers])})}archive(Z,$={},X){let{betas:J}=$??{};return this._client.post(W`/v1/organizations/federation_issuers/${Z}/archive?beta=true`,{...X,headers:N([{...J?.toString()!=null?{"anthropic-beta":J?.toString()}:void 0},X?.headers])})}}});var U$;var C4=C(()=>{E();D();R();I();U$=class U$ extends M{list(Z,$={},X){let{betas:J,...z}=$??{};return this._client.getAPIList(W`/v1/organizations/federation_rules/${Z}/workspaces?beta=true`,L,{query:z,...X,headers:N([{...J?.toString()!=null?{"anthropic-beta":J?.toString()}:void 0},X?.headers])})}add(Z,$,X){let{betas:J,...z}=$;return this._client.post(W`/v1/organizations/federation_rules/${Z}/workspaces?beta=true`,{body:z,...X,headers:N([{...J?.toString()!=null?{"anthropic-beta":J?.toString()}:void 0},X?.headers])})}remove(Z,$,X){let{federation_rule_id:J,betas:z}=$;return this._client.delete(W`/v1/organizations/federation_rules/${J}/workspaces/${Z}?beta=true`,{...X,headers:N([{...z?.toString()!=null?{"anthropic-beta":z?.toString()}:void 0},X?.headers])})}}});var m0;var M4=C(()=>{E();C4();C4();D();R();I();m0=class m0 extends M{constructor(){super(...arguments);this.workspaces=new U$(this._client)}create(Z,$){let{betas:X,...J}=Z;return this._client.post("/v1/organizations/federation_rules?beta=true",{body:J,...$,headers:N([{...X?.toString()!=null?{"anthropic-beta":X?.toString()}:void 0},$?.headers])})}retrieve(Z,$={},X){let{betas:J}=$??{};return this._client.get(W`/v1/organizations/federation_rules/${Z}?beta=true`,{...X,headers:N([{...J?.toString()!=null?{"anthropic-beta":J?.toString()}:void 0},X?.headers])})}update(Z,$,X){let{betas:J,...z}=$;return this._client.post(W`/v1/organizations/federation_rules/${Z}?beta=true`,{body:z,...X,headers:N([{...J?.toString()!=null?{"anthropic-beta":J?.toString()}:void 0},X?.headers])})}list(Z={},$){let{betas:X,...J}=Z??{};return this._client.getAPIList("/v1/organizations/federation_rules?beta=true",L,{query:J,...$,headers:N([{...X?.toString()!=null?{"anthropic-beta":X?.toString()}:void 0},$?.headers])})}archive(Z,$={},X){let{betas:J}=$??{};return this._client.post(W`/v1/organizations/federation_rules/${Z}/archive?beta=true`,{...X,headers:N([{...J?.toString()!=null?{"anthropic-beta":J?.toString()}:void 0},X?.headers])})}};m0.Workspaces=U$});var U0;var B4=C(()=>{E();w4();w4();M4();M4();U0=class U0 extends M{constructor(){super(...arguments);this.issuers=new W$(this._client),this.rules=new m0(this._client)}};U0.Issuers=W$;U0.Rules=m0});var G$;var H4=C(()=>{E();D();R();I();G$=class G$ extends M{list(Z,$={},X){let{betas:J,...z}=$??{};return this._client.getAPIList(W`/v1/organizations/service_accounts/${Z}/workspaces?beta=true`,L,{query:z,...X,headers:N([{...J?.toString()!=null?{"anthropic-beta":J?.toString()}:void 0},X?.headers])})}add(Z,$,X){let{betas:J,...z}=$;return this._client.post(W`/v1/organizations/service_accounts/${Z}/workspaces?beta=true`,{body:z,...X,headers:N([{...J?.toString()!=null?{"anthropic-beta":J?.toString()}:void 0},X?.headers])})}remove(Z,$,X){let{service_account_id:J,betas:z}=$;return this._client.delete(W`/v1/organizations/service_accounts/${J}/workspaces/${Z}?beta=true`,{...X,headers:N([{...z?.toString()!=null?{"anthropic-beta":z?.toString()}:void 0},X?.headers])})}}});var u0;var T4=C(()=>{E();H4();H4();D();R();I();u0=class u0 extends M{constructor(){super(...arguments);this.workspaces=new G$(this._client)}create(Z,$){let{betas:X,...J}=Z;return this._client.post("/v1/organizations/service_accounts?beta=true",{body:J,...$,headers:N([{...X?.toString()!=null?{"anthropic-beta":X?.toString()}:void 0},$?.headers])})}retrieve(Z,$={},X){let{betas:J}=$??{};return this._client.get(W`/v1/organizations/service_accounts/${Z}?beta=true`,{...X,headers:N([{...J?.toString()!=null?{"anthropic-beta":J?.toString()}:void 0},X?.headers])})}update(Z,$,X){let{betas:J,...z}=$;return this._client.post(W`/v1/organizations/service_accounts/${Z}?beta=true`,{body:z,...X,headers:N([{...J?.toString()!=null?{"anthropic-beta":J?.toString()}:void 0},X?.headers])})}list(Z={},$){let{betas:X,...J}=Z??{};return this._client.getAPIList("/v1/organizations/service_accounts?beta=true",L,{query:J,...$,headers:N([{...X?.toString()!=null?{"anthropic-beta":X?.toString()}:void 0},$?.headers])})}archive(Z,$={},X){let{betas:J}=$??{};return this._client.post(W`/v1/organizations/service_accounts/${Z}/archive?beta=true`,{...X,headers:N([{...J?.toString()!=null?{"anthropic-beta":J?.toString()}:void 0},X?.headers])})}};u0.Workspaces=G$});var O$;var x4=C(()=>{E();D();I();O$=class O$ extends M{retrieve(Z,$,X){let{workspace_id:J}=$;return this._client.get(W`/v1/organizations/workspaces/${J}/members/${Z}?beta=true`,X)}update(Z,$,X){let{workspace_id:J,...z}=$;return this._client.post(W`/v1/organizations/workspaces/${J}/members/${Z}?beta=true`,{body:z,...X})}list(Z,$={},X){return this._client.getAPIList(W`/v1/organizations/workspaces/${Z}/members?beta=true`,t,{query:$,...X})}add(Z,$,X){return this._client.post(W`/v1/organizations/workspaces/${Z}/members?beta=true`,{body:$,...X})}remove(Z,$,X){let{workspace_id:J}=$;return this._client.delete(W`/v1/organizations/workspaces/${J}/members/${Z}?beta=true`,X)}}});var q$;var A4=C(()=>{E();D();I();q$=class q$ extends M{list(Z,$={},X){return this._client.getAPIList(W`/v1/organizations/workspaces/${Z}/rate_limits?beta=true`,L,{query:$,...X})}}});var w$;var L4=C(()=>{E();D();R();I();w$=class w$ extends M{retrieve(Z,$,X){let{workspace_id:J,betas:z}=$;return this._client.get(W`/v1/organizations/workspaces/${J}/service_accounts/${Z}?beta=true`,{...X,headers:N([{...z?.toString()!=null?{"anthropic-beta":z?.toString()}:void 0},X?.headers])})}update(Z,$,X){let{workspace_id:J,betas:z,...Q}=$;return this._client.post(W`/v1/organizations/workspaces/${J}/service_accounts/${Z}?beta=true`,{body:Q,...X,headers:N([{...z?.toString()!=null?{"anthropic-beta":z?.toString()}:void 0},X?.headers])})}list(Z,$={},X){let{betas:J,...z}=$??{};return this._client.getAPIList(W`/v1/organizations/workspaces/${Z}/service_accounts?beta=true`,L,{query:z,...X,headers:N([{...J?.toString()!=null?{"anthropic-beta":J?.toString()}:void 0},X?.headers])})}add(Z,$,X){let{betas:J,...z}=$;return this._client.post(W`/v1/organizations/workspaces/${Z}/service_accounts?beta=true`,{body:z,...X,headers:N([{...J?.toString()!=null?{"anthropic-beta":J?.toString()}:void 0},X?.headers])})}remove(Z,$,X){let{workspace_id:J,betas:z}=$;return this._client.delete(W`/v1/organizations/workspaces/${J}/service_accounts/${Z}?beta=true`,{...X,headers:N([{...z?.toString()!=null?{"anthropic-beta":z?.toString()}:void 0},X?.headers])})}}});var oZ;var j4=C(()=>{E();x4();x4();A4();A4();L4();L4();D();R();I();oZ=class oZ extends M{constructor(){super(...arguments);this.rateLimits=new q$(this._client),this.members=new O$(this._client),this.serviceAccounts=new w$(this._client)}create(Z,$){let{betas:X,...J}=Z;return this._client.post("/v1/organizations/workspaces?beta=true",{body:J,...$,headers:N([{...X?.toString()!=null?{"anthropic-beta":X?.toString()}:void 0},$?.headers])})}retrieve(Z,$){return this._client.get(W`/v1/organizations/workspaces/${Z}?beta=true`,$)}update(Z,$,X){return this._client.post(W`/v1/organizations/workspaces/${Z}?beta=true`,{body:$,...X})}list(Z={},$){return this._client.getAPIList("/v1/organizations/workspaces?beta=true",t,{query:Z,...$})}archive(Z,$){return this._client.post(W`/v1/organizations/workspaces/${Z}/archive?beta=true`,$)}};oZ.RateLimits=q$;oZ.Members=O$;oZ.ServiceAccounts=w$});var OZ;var S4=C(()=>{E();W4();W4();U4();U4();G4();G4();O4();O4();q4();q4();B4();B4();T4();T4();j4();j4();OZ=class OZ extends M{constructor(){super(...arguments);this.apiKeys=new Y$(this._client),this.externalKeys=new Q$(this._client),this.federation=new U0(this._client),this.invites=new K$(this._client),this.serviceAccounts=new u0(this._client),this.users=new N$(this._client),this.workspaces=new oZ(this._client),this.rateLimits=new V$(this._client)}retrieve(Z){return this._client.get("/v1/organizations/me?beta=true",Z)}};OZ.APIKeys=Y$;OZ.ExternalKeys=Q$;OZ.Federation=U0;OZ.Invites=K$;OZ.ServiceAccounts=u0;OZ.Users=N$;OZ.Workspaces=oZ;OZ.RateLimits=V$});var c0;var E4=C(()=>{E();D();R();I();jX();jX();c0=class c0 extends M{list(Z,$={},X){let{betas:J,...z}=$??{};return this._client.getAPIList(W`/v1/sessions/${Z}/events?beta=true`,L,{query:z,...X,headers:N([{"anthropic-beta":[...J??[],"managed-agents-2026-04-01"].toString()},X?.headers])})}send(Z,$,X){let{betas:J,...z}=$;return this._client.post(W`/v1/sessions/${Z}/events?beta=true`,{body:z,...X,headers:N([{"anthropic-beta":[...J??[],"managed-agents-2026-04-01"].toString()},X?.headers])})}stream(Z,$={},X){let{betas:J,...z}=$??{};return this._client.get(W`/v1/sessions/${Z}/events/stream?beta=true`,{query:z,...X,headers:N([{"anthropic-beta":[...J??[],"managed-agents-2026-04-01"].toString()},X?.headers]),stream:!0})}toolRunner(Z,$){return new Q0(Z,{...$,client:this._client})}};c0.SessionToolRunner=Q0});var C$;var F4=C(()=>{E();D();R();I();C$=class C$ extends M{retrieve(Z,$,X){let{session_id:J,betas:z}=$;return this._client.get(W`/v1/sessions/${J}/resources/${Z}?beta=true`,{...X,headers:N([{"anthropic-beta":[...z??[],"managed-agents-2026-04-01"].toString()},X?.headers])})}update(Z,$,X){let{session_id:J,betas:z,...Q}=$;return this._client.post(W`/v1/sessions/${J}/resources/${Z}?beta=true`,{body:Q,...X,headers:N([{"anthropic-beta":[...z??[],"managed-agents-2026-04-01"].toString()},X?.headers])})}list(Z,$={},X){let{betas:J,...z}=$??{};return this._client.getAPIList(W`/v1/sessions/${Z}/resources?beta=true`,L,{query:z,...X,headers:N([{"anthropic-beta":[...J??[],"managed-agents-2026-04-01"].toString()},X?.headers])})}delete(Z,$,X){let{session_id:J,betas:z}=$;return this._client.delete(W`/v1/sessions/${J}/resources/${Z}?beta=true`,{...X,headers:N([{"anthropic-beta":[...z??[],"managed-agents-2026-04-01"].toString()},X?.headers])})}add(Z,$,X){let{betas:J,...z}=$;return this._client.post(W`/v1/sessions/${Z}/resources?beta=true`,{body:z,...X,headers:N([{"anthropic-beta":[...J??[],"managed-agents-2026-04-01"].toString()},X?.headers])})}}});var M$;var D4=C(()=>{E();D();R();I();M$=class M$ extends M{list(Z,$,X){let{session_id:J,betas:z,...Q}=$;return this._client.getAPIList(W`/v1/sessions/${J}/threads/${Z}/events?beta=true`,L,{query:Q,...X,headers:N([{"anthropic-beta":[...z??[],"managed-agents-2026-04-01"].toString()},X?.headers])})}stream(Z,$,X){let{session_id:J,betas:z,...Q}=$;return this._client.get(W`/v1/sessions/${J}/threads/${Z}/stream?beta=true`,{query:Q,...X,headers:N([{"anthropic-beta":[...z??[],"managed-agents-2026-04-01"].toString()},X?.headers]),stream:!0})}}});var d0;var R4=C(()=>{E();D4();D4();D();R();I();d0=class d0 extends M{constructor(){super(...arguments);this.events=new M$(this._client)}retrieve(Z,$,X){let{session_id:J,betas:z}=$;return this._client.get(W`/v1/sessions/${J}/threads/${Z}?beta=true`,{...X,headers:N([{"anthropic-beta":[...z??[],"managed-agents-2026-04-01"].toString()},X?.headers])})}list(Z,$={},X){let{betas:J,...z}=$??{};return this._client.getAPIList(W`/v1/sessions/${Z}/threads?beta=true`,L,{query:z,...X,headers:N([{"anthropic-beta":[...J??[],"managed-agents-2026-04-01"].toString()},X?.headers])})}archive(Z,$,X){let{session_id:J,betas:z}=$;return this._client.post(W`/v1/sessions/${J}/threads/${Z}/archive?beta=true`,{...X,headers:N([{"anthropic-beta":[...z??[],"managed-agents-2026-04-01"].toString()},X?.headers])})}};d0.Events=M$});var tZ;var P4=C(()=>{E();E4();E4();F4();F4();R4();R4();D();R();I();tZ=class tZ extends M{constructor(){super(...arguments);this.events=new c0(this._client),this.resources=new C$(this._client),this.threads=new d0(this._client)}create(Z,$){let{betas:X,...J}=Z;return this._client.post("/v1/sessions?beta=true",{body:J,...$,headers:N([{"anthropic-beta":[...X??[],"managed-agents-2026-04-01"].toString()},$?.headers])})}retrieve(Z,$={},X){let{betas:J}=$??{};return this._client.get(W`/v1/sessions/${Z}?beta=true`,{...X,headers:N([{"anthropic-beta":[...J??[],"managed-agents-2026-04-01"].toString()},X?.headers])})}update(Z,$,X){let{betas:J,...z}=$;return this._client.post(W`/v1/sessions/${Z}?beta=true`,{body:z,...X,headers:N([{"anthropic-beta":[...J??[],"managed-agents-2026-04-01"].toString()},X?.headers])})}list(Z={},$){let{betas:X,...J}=Z??{};return this._client.getAPIList("/v1/sessions?beta=true",C1,{query:J,...$,headers:N([{"anthropic-beta":[...X??[],"managed-agents-2026-04-01"].toString()},$?.headers])})}delete(Z,$={},X){let{betas:J}=$??{};return this._client.delete(W`/v1/sessions/${Z}?beta=true`,{...X,headers:N([{"anthropic-beta":[...J??[],"managed-agents-2026-04-01"].toString()},X?.headers])})}archive(Z,$={},X){let{betas:J}=$??{};return this._client.post(W`/v1/sessions/${Z}/archive?beta=true`,{...X,headers:N([{"anthropic-beta":[...J??[],"managed-agents-2026-04-01"].toString()},X?.headers])})}};tZ.Events=c0;tZ.Resources=C$;tZ.Threads=d0});var B$;var I4=C(()=>{E();D();R();fZ();I();B$=class B$ extends M{create(Z,$,X){let{betas:J,...z}=$;return this._client.post(W`/v1/skills/${Z}/versions?beta=true`,MZ({body:z,...X,headers:N([{...J?.toString()!=null?{"anthropic-beta":J?.toString()}:void 0},X?.headers])},this._client,!1))}retrieve(Z,$,X){let{skill_id:J,betas:z}=$;return this._client.get(W`/v1/skills/${J}/versions/${Z}?beta=true`,{...X,headers:N([{...z?.toString()!=null?{"anthropic-beta":z?.toString()}:void 0},X?.headers])})}list(Z,$={},X){let{betas:J,...z}=$??{};return this._client.getAPIList(W`/v1/skills/${Z}/versions?beta=true`,L,{query:z,...X,headers:N([{...J?.toString()!=null?{"anthropic-beta":J?.toString()}:void 0},X?.headers])})}delete(Z,$,X){let{skill_id:J,betas:z}=$;return this._client.delete(W`/v1/skills/${J}/versions/${Z}?beta=true`,{...X,headers:N([{...z?.toString()!=null?{"anthropic-beta":z?.toString()}:void 0},X?.headers])})}download(Z,$,X){let{skill_id:J,betas:z}=$;return this._client.get(W`/v1/skills/${J}/versions/${Z}/content?beta=true`,{...X,headers:N([{Accept:"application/binary",...z?.toString()!=null?{"anthropic-beta":z?.toString()}:void 0},X?.headers]),__binaryResponse:!0})}}});var p0;var f4=C(()=>{E();I4();I4();D();R();fZ();I();p0=class p0 extends M{constructor(){super(...arguments);this.versions=new B$(this._client)}create(Z,$){let{betas:X,...J}=Z;return this._client.post("/v1/skills?beta=true",MZ({body:J,...$,headers:N([{...X?.toString()!=null?{"anthropic-beta":X?.toString()}:void 0},$?.headers])},this._client,!1))}retrieve(Z,$={},X){let{betas:J}=$??{};return this._client.get(W`/v1/skills/${Z}?beta=true`,{...X,headers:N([{...J?.toString()!=null?{"anthropic-beta":J?.toString()}:void 0},X?.headers])})}list(Z={},$){let{betas:X,...J}=Z??{};return this._client.getAPIList("/v1/skills?beta=true",L,{query:J,...$,headers:N([{...X?.toString()!=null?{"anthropic-beta":X?.toString()}:void 0},$?.headers])})}delete(Z,$={},X){let{betas:J}=$??{};return this._client.delete(W`/v1/skills/${Z}?beta=true`,{...X,headers:N([{...J?.toString()!=null?{"anthropic-beta":J?.toString()}:void 0},X?.headers])})}};p0.Versions=B$});var H$;var y4=C(()=>{E();D();R();I();H$=class H$ extends M{create(Z,$,X){let{betas:J,...z}=$;return this._client.post(W`/v1/tunnels/${Z}/certificates?beta=true`,{body:z,...X,headers:N([{"anthropic-beta":[...J??[],"mcp-tunnels-2026-06-22"].toString()},X?.headers])})}retrieve(Z,$,X){let{tunnel_id:J,betas:z}=$;return this._client.get(W`/v1/tunnels/${J}/certificates/${Z}?beta=true`,{...X,headers:N([{"anthropic-beta":[...z??[],"mcp-tunnels-2026-06-22"].toString()},X?.headers])})}list(Z,$={},X){let{betas:J,...z}=$??{};return this._client.getAPIList(W`/v1/tunnels/${Z}/certificates?beta=true`,L,{query:z,...X,headers:N([{"anthropic-beta":[...J??[],"mcp-tunnels-2026-06-22"].toString()},X?.headers])})}archive(Z,$,X){let{tunnel_id:J,betas:z}=$;return this._client.post(W`/v1/tunnels/${J}/certificates/${Z}/archive?beta=true`,{...X,headers:N([{"anthropic-beta":[...z??[],"mcp-tunnels-2026-06-22"].toString()},X?.headers])})}}});var l0;var k4=C(()=>{E();y4();y4();D();R();I();l0=class l0 extends M{constructor(){super(...arguments);this.certificates=new H$(this._client)}create(Z,$){let{betas:X,...J}=Z;return this._client.post("/v1/tunnels?beta=true",{body:J,...$,headers:N([{"anthropic-beta":[...X??[],"mcp-tunnels-2026-06-22"].toString()},$?.headers])})}retrieve(Z,$={},X){let{betas:J}=$??{};return this._client.get(W`/v1/tunnels/${Z}?beta=true`,{...X,headers:N([{"anthropic-beta":[...J??[],"mcp-tunnels-2026-06-22"].toString()},X?.headers])})}list(Z={},$){let{betas:X,...J}=Z??{};return this._client.getAPIList("/v1/tunnels?beta=true",L,{query:J,...$,headers:N([{"anthropic-beta":[...X??[],"mcp-tunnels-2026-06-22"].toString()},$?.headers])})}archive(Z,$={},X){let{betas:J}=$??{};return this._client.post(W`/v1/tunnels/${Z}/archive?beta=true`,{...X,headers:N([{"anthropic-beta":[...J??[],"mcp-tunnels-2026-06-22"].toString()},X?.headers])})}revealToken(Z,$={},X){let{betas:J}=$??{};return this._client.post(W`/v1/tunnels/${Z}/reveal_token?beta=true`,{...X,headers:N([{"anthropic-beta":[...J??[],"mcp-tunnels-2026-06-22"].toString()},X?.headers])})}rotateToken(Z,$,X){let{betas:J,...z}=$;return this._client.post(W`/v1/tunnels/${Z}/rotate_token?beta=true`,{body:z,...X,headers:N([{"anthropic-beta":[...J??[],"mcp-tunnels-2026-06-22"].toString()},X?.headers])})}};l0.Certificates=H$});var T$;var h4=C(()=>{E();D();R();I();T$=class T$ extends M{create(Z,$,X){let{betas:J,...z}=$;return this._client.post(W`/v1/vaults/${Z}/credentials?beta=true`,{body:z,...X,headers:N([{"anthropic-beta":[...J??[],"managed-agents-2026-04-01"].toString()},X?.headers])})}retrieve(Z,$,X){let{vault_id:J,betas:z}=$;return this._client.get(W`/v1/vaults/${J}/credentials/${Z}?beta=true`,{...X,headers:N([{"anthropic-beta":[...z??[],"managed-agents-2026-04-01"].toString()},X?.headers])})}update(Z,$,X){let{vault_id:J,betas:z,...Q}=$;return this._client.post(W`/v1/vaults/${J}/credentials/${Z}?beta=true`,{body:Q,...X,headers:N([{"anthropic-beta":[...z??[],"managed-agents-2026-04-01"].toString()},X?.headers])})}list(Z,$={},X){let{betas:J,...z}=$??{};return this._client.getAPIList(W`/v1/vaults/${Z}/credentials?beta=true`,L,{query:z,...X,headers:N([{"anthropic-beta":[...J??[],"managed-agents-2026-04-01"].toString()},X?.headers])})}delete(Z,$,X){let{vault_id:J,betas:z}=$;return this._client.delete(W`/v1/vaults/${J}/credentials/${Z}?beta=true`,{...X,headers:N([{"anthropic-beta":[...z??[],"managed-agents-2026-04-01"].toString()},X?.headers])})}archive(Z,$,X){let{vault_id:J,betas:z}=$;return this._client.post(W`/v1/vaults/${J}/credentials/${Z}/archive?beta=true`,{...X,headers:N([{"anthropic-beta":[...z??[],"managed-agents-2026-04-01"].toString()},X?.headers])})}mcpOAuthValidate(Z,$,X){let{vault_id:J,betas:z}=$;return this._client.post(W`/v1/vaults/${J}/credentials/${Z}/mcp_oauth_validate?beta=true`,{...X,headers:N([{"anthropic-beta":[...z??[],"managed-agents-2026-04-01"].toString()},X?.headers])})}}});var i0;var b4=C(()=>{E();h4();h4();D();R();I();i0=class i0 extends M{constructor(){super(...arguments);this.credentials=new T$(this._client)}create(Z,$){let{betas:X,...J}=Z;return this._client.post("/v1/vaults?beta=true",{body:J,...$,headers:N([{"anthropic-beta":[...X??[],"managed-agents-2026-04-01"].toString()},$?.headers])})}retrieve(Z,$={},X){let{betas:J}=$??{};return this._client.get(W`/v1/vaults/${Z}?beta=true`,{...X,headers:N([{"anthropic-beta":[...J??[],"managed-agents-2026-04-01"].toString()},X?.headers])})}update(Z,$,X){let{betas:J,...z}=$;return this._client.post(W`/v1/vaults/${Z}?beta=true`,{body:z,...X,headers:N([{"anthropic-beta":[...J??[],"managed-agents-2026-04-01"].toString()},X?.headers])})}list(Z={},$){let{betas:X,...J}=Z??{};return this._client.getAPIList("/v1/vaults?beta=true",L,{query:J,...$,headers:N([{"anthropic-beta":[...X??[],"managed-agents-2026-04-01"].toString()},$?.headers])})}delete(Z,$={},X){let{betas:J}=$??{};return this._client.delete(W`/v1/vaults/${Z}?beta=true`,{...X,headers:N([{"anthropic-beta":[...J??[],"managed-agents-2026-04-01"].toString()},X?.headers])})}archive(Z,$={},X){let{betas:J}=$??{};return this._client.post(W`/v1/vaults/${Z}/archive?beta=true`,{...X,headers:N([{"anthropic-beta":[...J??[],"managed-agents-2026-04-01"].toString()},X?.headers])})}};i0.Credentials=T$});var p;var g4=C(()=>{E();A1();A1();L1();L1();j1();j1();E1();E1();F1();F1();D1();D1();I1();I1();y1();y1();d1();d1();i1();i1();N4();N4();S4();S4();P4();P4();f4();f4();k4();k4();b4();b4();p=class p extends M{constructor(){super(...arguments);this.models=new R8(this._client),this.messages=new rZ(this._client),this.agents=new A0(this._client),this.environments=new k0(this._client),this.sessions=new tZ(this._client),this.deployments=new L8(this._client),this.deploymentRuns=new A8(this._client),this.vaults=new i0(this._client),this.memoryStores=new V0(this._client),this.files=new D8(this._client),this.skills=new p0(this._client),this.webhooks=new y8(this._client),this.userProfiles=new P8(this._client),this.dreams=new j8(this._client),this.tunnels=new l0(this._client),this.organization=new OZ(this._client)}};p.Models=R8;p.Messages=rZ;p.Agents=A0;p.Environments=k0;p.Sessions=tZ;p.Deployments=L8;p.DeploymentRuns=A8;p.Vaults=i0;p.MemoryStores=V0;p.Files=D8;p.Skills=p0;p.Webhooks=y8;p.UserProfiles=P8;p.Dreams=j8;p.Tunnels=l0;p.Organization=OZ});var n0;var _4=C(()=>{E();R();n0=class n0 extends M{create(Z,$){let{betas:X,...J}=Z;return this._client.post("/v1/complete",{body:J,timeout:this._client._options.timeout??600000,...$,headers:N([{...X?.toString()!=null?{"anthropic-beta":X?.toString()}:void 0},$?.headers]),stream:Z.stream??!1})}}});var a0;var v4=C(()=>{E();D();R();LZ();fZ();I();a0=class a0 extends M{list(Z={},$){return this._client.getAPIList("/v1/files",L,{query:Z,...$})}delete(Z,$){return this._client.delete(W`/v1/files/${Z}`,$)}download(Z,$){return this._client.get(W`/v1/files/${Z}/content`,{...$,headers:N([{Accept:"application/binary"},$?.headers]),__binaryResponse:!0})}retrieveMetadata(Z,$){return this._client.get(W`/v1/files/${Z}`,$)}upload(Z,$){return this._client.post("/v1/files",MZ({body:Z,...$,headers:N([JX(Z.file),$?.headers])},this._client))}}});function U7(Z){return Z?.output_config?.format}function m4(Z,$,X){let J=U7($);if(!$||!("parse"in(J??{})))return{...Z,content:Z.content.map((z)=>{if(z.type==="text")return Object.defineProperty({...z},"parsed_output",{value:null,enumerable:!1});return z}),parsed_output:null};return u4(Z,$,X)}function u4(Z,$,X){let J=null,z=Z.content.map((Q)=>{if(Q.type==="text"){let V=bJ($,Q.text);if(J===null)J=V;return Object.defineProperty({...Q},"parsed_output",{value:V,enumerable:!1})}return Q});return{...Z,content:z,parsed_output:J}}function bJ(Z,$){let X=U7(Z);if(X?.type!=="json_schema")return null;try{if("parse"in X)return X.parse($);return JSON.parse($)}catch(J){throw new H(`Failed to parse structured output: ${J}`)}}var c4=C(()=>{m()});function a4(Z){return Z.type==="tool_use"||Z.type==="server_tool_use"}var TZ,sZ,r0,x$,hX,A$,L$,bX,j$,RZ,S$,gX,_X,G0,vX,mX,uX,E$,d4,G7,p4,l4,i4,n4,O7,F$;var q7=C(()=>{QZ();LZ();gZ();XZ();h0();e1();c4();Z4();F$=class F${constructor(Z,$){TZ.add(this),this.messages=[],this.receivedMessages=[],sZ.set(this,void 0),r0.set(this,null),this.controller=new AbortController,x$.set(this,void 0),hX.set(this,()=>{}),A$.set(this,()=>{}),L$.set(this,void 0),bX.set(this,()=>{}),j$.set(this,()=>{}),RZ.set(this,{}),S$.set(this,!1),gX.set(this,!1),_X.set(this,!1),G0.set(this,!1),vX.set(this,void 0),mX.set(this,void 0),uX.set(this,void 0),E$.set(this,void 0),p4.set(this,(X)=>{if(q(this,gX,!0,"f"),wZ(X))X=new e;if(X instanceof e)return q(this,_X,!0,"f"),this._emit("abort",X);if(X instanceof H)return this._emit("error",X);if(X instanceof Error){let J=new H(X.message);return J.cause=X,this._emit("error",J)}return this._emit("error",new H(String(X)))}),q(this,x$,new Promise((X,J)=>{q(this,hX,X,"f"),q(this,A$,J,"f")}),"f"),q(this,L$,new Promise((X,J)=>{q(this,bX,X,"f"),q(this,j$,J,"f")}),"f"),Y(this,x$,"f").catch(()=>{}),Y(this,L$,"f").catch(()=>{}),q(this,r0,Z,"f"),q(this,E$,$?.logger??console,"f")}get response(){return Y(this,vX,"f")}get request_id(){return Y(this,mX,"f")}get workspace_id(){return Y(this,uX,"f")}async withResponse(){q(this,G0,!0,"f");let Z=await Y(this,x$,"f");if(!Z)throw Error("Could not resolve a `Response` object");return{data:this,response:Z,request_id:Z.headers.get("request-id"),workspace_id:Z.headers.get("anthropic-workspace-id")}}static fromReadableStream(Z){let $=new F$(null);return $._run(()=>$._fromReadableStream(Z)),$}static createMessage(Z,$,X,{logger:J}={}){let z=new F$($,{logger:J});for(let Q of $.messages)z._addMessageParam(Q);return q(z,r0,{...$,stream:!0},"f"),z._run(()=>z._createMessage(Z,{...$,stream:!0},{...X,headers:{...X?.headers,[$X]:"stream"}})),z}_run(Z){Z().then(()=>{this._emitFinal(),this._emit("end")},Y(this,p4,"f"))}_addMessageParam(Z){this.messages.push(Z)}_addMessage(Z,$=!0){if(this.receivedMessages.push(Z),$)this._emit("message",Z)}async _createMessage(Z,$,X){let J=X?.signal,z;if(J){if(J.aborted)this.controller.abort();z=this.controller.abort.bind(this.controller),J.addEventListener("abort",z)}try{Y(this,TZ,"m",l4).call(this);let{response:Q,data:V}=await Z.create({...$,stream:!0},{...X,signal:this.controller.signal}).withResponse();this._connected(Q);for await(let K of V)Y(this,TZ,"m",i4).call(this,K);if(V.controller.signal?.aborted)throw new e;Y(this,TZ,"m",n4).call(this)}finally{if(J&&z)J.removeEventListener("abort",z)}}_connected(Z){if(this.ended)return;q(this,vX,Z,"f"),q(this,mX,Z?.headers.get("request-id"),"f"),q(this,uX,Z?.headers.get("anthropic-workspace-id"),"f"),Y(this,hX,"f").call(this,Z),this._emit("connect")}get ended(){return Y(this,S$,"f")}get errored(){return Y(this,gX,"f")}get aborted(){return Y(this,_X,"f")}abort(){this.controller.abort()}on(Z,$){return(Y(this,RZ,"f")[Z]||(Y(this,RZ,"f")[Z]=[])).push({listener:$}),this}off(Z,$){let X=Y(this,RZ,"f")[Z];if(!X)return this;let J=X.findIndex((z)=>z.listener===$);if(J>=0)X.splice(J,1);return this}once(Z,$){return(Y(this,RZ,"f")[Z]||(Y(this,RZ,"f")[Z]=[])).push({listener:$,once:!0}),this}emitted(Z){return new Promise(($,X)=>{if(q(this,G0,!0,"f"),Z!=="error")this.once("error",X);this.once(Z,$)})}async done(){q(this,G0,!0,"f"),await Y(this,L$,"f")}get currentMessage(){return Y(this,sZ,"f")}async finalMessage(){return await this.done(),Y(this,TZ,"m",d4).call(this)}async finalText(){return await this.done(),Y(this,TZ,"m",G7).call(this)}_emit(Z,...$){if(Y(this,S$,"f"))return;if(Z==="end")q(this,S$,!0,"f"),Y(this,bX,"f").call(this);let X=Y(this,RZ,"f")[Z];if(X)Y(this,RZ,"f")[Z]=X.filter((J)=>!J.once),X.forEach(({listener:J})=>J(...$));if(Z==="abort"){let J=$[0];if(!Y(this,G0,"f")&&!X?.length)Promise.reject(J);Y(this,A$,"f").call(this,J),Y(this,j$,"f").call(this,J),this._emit("end");return}if(Z==="error"){let J=$[0];if(!Y(this,G0,"f")&&!X?.length)Promise.reject(J);Y(this,A$,"f").call(this,J),Y(this,j$,"f").call(this,J),this._emit("end")}}_emitFinal(){if(this.receivedMessages.at(-1))this._emit("finalMessage",Y(this,TZ,"m",d4).call(this))}async _fromReadableStream(Z,$){let X=$?.signal,J;if(X){if(X.aborted)this.controller.abort();J=this.controller.abort.bind(this.controller),X.addEventListener("abort",J)}try{Y(this,TZ,"m",l4).call(this),this._connected(null);let z=$Z.fromReadableStream(Z,this.controller);for await(let Q of z)Y(this,TZ,"m",i4).call(this,Q);if(z.controller.signal?.aborted)throw new e;Y(this,TZ,"m",n4).call(this)}finally{if(X&&J)X.removeEventListener("abort",J)}}[(sZ=new WeakMap,r0=new WeakMap,x$=new WeakMap,hX=new WeakMap,A$=new WeakMap,L$=new WeakMap,bX=new WeakMap,j$=new WeakMap,RZ=new WeakMap,S$=new WeakMap,gX=new WeakMap,_X=new WeakMap,G0=new WeakMap,vX=new WeakMap,mX=new WeakMap,uX=new WeakMap,E$=new WeakMap,p4=new WeakMap,TZ=new WeakSet,d4=function(){if(this.receivedMessages.length===0)throw new H("stream ended without producing a Message with role=assistant");return this.receivedMessages.at(-1)},G7=function(){if(this.receivedMessages.length===0)throw new H("stream ended without producing a Message with role=assistant");let $=this.receivedMessages.at(-1).content.filter((X)=>X.type==="text").map((X)=>X.text);if($.length===0)throw new H("stream ended without producing a content block with type=text");return $.join(" ")},l4=function(){if(this.ended)return;q(this,sZ,void 0,"f")},i4=function($){if(this.ended)return;let X=Y(this,TZ,"m",O7).call(this,$);switch(this._emit("streamEvent",$,X),$.type){case"content_block_delta":{let J=X.content.at(-1);switch($.delta.type){case"text_delta":{if(J.type==="text")this._emit("text",$.delta.text,J.text||"");break}case"citations_delta":{if(J.type==="text")this._emit("citation",$.delta.citation,J.citations??[]);break}case"input_json_delta":{if(a4(J)&&Y(this,RZ,"f").inputJson?.length)this._emit("inputJson",$.delta.partial_json,J.input);break}case"thinking_delta":{if(J.type==="thinking")this._emit("thinking",$.delta.thinking,J.thinking);break}case"signature_delta":{if(J.type==="thinking")this._emit("signature",J.signature);break}default:vZ($.delta)}break}case"message_stop":{this._addMessageParam(X),this._addMessage(m4(X,Y(this,r0,"f"),{logger:Y(this,E$,"f")}),!0);break}case"content_block_stop":{this._emit("contentBlock",X.content.at(-1));break}case"message_start":{q(this,sZ,X,"f");break}case"content_block_start":case"message_delta":break}},n4=function(){if(this.ended)throw new H("stream has ended, this shouldn't happen");let $=Y(this,sZ,"f");if(!$)throw new H("request ended without sending any chunks");return q(this,sZ,void 0,"f"),m4($,Y(this,r0,"f"),{logger:Y(this,E$,"f")})},O7=function($){let X=Y(this,sZ,"f");if($.type==="message_start"){if(X)throw new H(`Unexpected event order, got ${$.type} before receiving "message_stop"`);return $.message}if(!X)throw new H(`Unexpected event order, got ${$.type} before "message_start"`);switch($.type){case"message_stop":return X;case"message_delta":if(X.stop_reason=$.delta.stop_reason,X.stop_sequence=$.delta.stop_sequence,X.stop_details=$.delta.stop_details,X.usage.output_tokens=$.usage.output_tokens,$.delta.container!=null)X.container=$.delta.container;if($.usage.input_tokens!=null)X.usage.input_tokens=$.usage.input_tokens;if($.usage.cache_creation_input_tokens!=null)X.usage.cache_creation_input_tokens=$.usage.cache_creation_input_tokens;if($.usage.cache_read_input_tokens!=null)X.usage.cache_read_input_tokens=$.usage.cache_read_input_tokens;if($.usage.server_tool_use!=null)X.usage.server_tool_use=$.usage.server_tool_use;if($.usage.output_tokens_details!=null)X.usage.output_tokens_details=$.usage.output_tokens_details;return X;case"content_block_start":return X.content.push({...$.content_block}),X;case"content_block_delta":{let J=X.content.at($.index);switch($.delta.type){case"text_delta":{if(J?.type==="text")X.content[$.index]={...J,text:(J.text||"")+$.delta.text};break}case"citations_delta":{if(J?.type==="text")X.content[$.index]={...J,citations:[...J.citations??[],$.delta.citation]};break}case"input_json_delta":{if(J&&a4(J)){let z=(J[iZ]||"")+$.delta.partial_json;X.content[$.index]=FX(J,z)}break}case"thinking_delta":{if(J?.type==="thinking")X.content[$.index]={...J,thinking:J.thinking+$.delta.thinking};break}case"signature_delta":{if(J?.type==="thinking")X.content[$.index]={...J,signature:$.delta.signature};break}default:vZ($.delta)}return X}case"content_block_stop":{let J=X.content.at($.index);if(J&&a4(J)&&iZ in J)Object.defineProperty(J,"input",{value:J.input,enumerable:!0,configurable:!0,writable:!0});return X}}},Symbol.asyncIterator)](){let Z=[],$=[],X=!1;return this.on("streamEvent",(J)=>{let z=$.shift();if(z)z.resolve(J);else Z.push(J)}),this.on("end",()=>{X=!0;for(let J of $)J.resolve(void 0);$.length=0}),this.on("abort",(J)=>{X=!0;for(let z of $)z.reject(J);$.length=0}),this.on("error",(J)=>{X=!0;for(let z of $)z.reject(J);$.length=0}),{next:async()=>{if(!Z.length){if(X)return{value:void 0,done:!0};return new Promise((z,Q)=>$.push({resolve:z,reject:Q})).then((z)=>z?{value:z,done:!1}:{value:void 0,done:!0})}return{value:Z.shift(),done:!1}},return:async()=>{return this.abort(),{value:void 0,done:!0}}}}toReadableStream(){return new $Z(this[Symbol.asyncIterator].bind(this),this.controller).toReadableStream()}}});var D$;var r4=C(()=>{E();D();R();n1();h0();I();D$=class D$ extends M{create(Z,$){let{user_profile_id:X,...J}=Z;return this._client.post("/v1/messages/batches",{body:J,...$,headers:N([{...X!=null?{"anthropic-user-profile-id":X}:void 0},$?.headers])})}retrieve(Z,$){return this._client.get(W`/v1/messages/batches/${Z}`,$)}list(Z={},$){return this._client.getAPIList("/v1/messages/batches",t,{query:Z,...$})}delete(Z,$){return this._client.delete(W`/v1/messages/batches/${Z}`,$)}cancel(Z,$){return this._client.post(W`/v1/messages/batches/${Z}/cancel`,$)}async results(Z,$){let X=await this.retrieve(Z);if(!X.results_url)throw new H(`No batch \`results_url\`; Has it finished processing? ${X.processing_status} - ${X.id}`);return this._client.get(X.results_url,{...$,headers:N([{Accept:"application/binary"},$?.headers]),stream:!0,__binaryResponse:!0})._thenUnwrap((J,z)=>b0.fromResponse(z.response,z.controller))}}});var O0,w7,_J;var o4=C(()=>{E();R();LZ();q7();c4();r4();r4();r1();O0=class O0 extends M{constructor(){super(...arguments);this.batches=new D$(this._client)}create(Z,$){let{user_profile_id:X,...J}=Z;if(J.model in w7)console.warn(`The model '${J.model}' is deprecated and will reach end-of-life on ${w7[J.model]}
33
+ Please migrate to a newer model. Visit https://docs.anthropic.com/en/docs/resources/model-deprecations for more information.`);if(_J.includes(J.model)&&J.thinking&&J.thinking.type==="enabled")console.warn(`Using Claude with ${J.model} and 'thinking.type=enabled' is deprecated. Use 'thinking.type=adaptive' instead which results in better model performance in our testing: https://platform.claude.com/docs/en/build-with-claude/adaptive-thinking`);let z=$?.timeout??this._client._options.timeout;if(!J.stream&&z==null){let V=EX[J.model]??void 0;z=this._client.calculateNonstreamingTimeout(J.max_tokens,V)}let Q=XX(J.tools,J.messages);return this._client.post("/v1/messages",{body:J,timeout:z??600000,...$,headers:N([{...X!=null?{"anthropic-user-profile-id":X}:void 0},Q,$?.headers]),stream:Z.stream??!1})}parse(Z,$){return this.create(Z,$).then((X)=>u4(X,Z,{logger:this._client.logger??console}))}stream(Z,$){return F$.createMessage(this,Z,$,{logger:this._client.logger??console})}countTokens(Z,$){let{user_profile_id:X,...J}=Z;return this._client.post("/v1/messages/count_tokens",{body:J,...$,headers:N([{...X!=null?{"anthropic-user-profile-id":X}:void 0},$?.headers])})}};w7={},_J=["claude-mythos-preview","claude-opus-4-6"];O0.Batches=D$});var o0;var t4=C(()=>{E();D();R();I();o0=class o0 extends M{retrieve(Z,$={},X){let{betas:J}=$??{};return this._client.get(W`/v1/models/${Z}`,{...X,headers:N([{...J?.toString()!=null?{"anthropic-beta":J?.toString()}:void 0},X?.headers])})}list(Z={},$){let{betas:X,...J}=Z??{};return this._client.getAPIList("/v1/models",t,{query:J,...$,headers:N([{...X?.toString()!=null?{"anthropic-beta":X?.toString()}:void 0},$?.headers])})}}});var R$;var s4=C(()=>{E();D();fZ();I();R$=class R$ extends M{create(Z,$,X){return this._client.post(W`/v1/skills/${Z}/versions`,MZ({body:$,...X},this._client,!1))}retrieve(Z,$,X){let{skill_id:J}=$;return this._client.get(W`/v1/skills/${J}/versions/${Z}`,X)}list(Z,$={},X){return this._client.getAPIList(W`/v1/skills/${Z}/versions`,L,{query:$,...X})}delete(Z,$,X){let{skill_id:J}=$;return this._client.delete(W`/v1/skills/${J}/versions/${Z}`,X)}}});var q0;var e4=C(()=>{E();s4();s4();D();fZ();I();q0=class q0 extends M{constructor(){super(...arguments);this.versions=new R$(this._client)}create(Z,$){return this._client.post("/v1/skills",MZ({body:Z,...$},this._client,!1))}retrieve(Z,$){return this._client.get(W`/v1/skills/${Z}`,$)}list(Z={},$){return this._client.getAPIList("/v1/skills",L,{query:Z,...$})}delete(Z,$){return this._client.delete(W`/v1/skills/${Z}`,$)}};q0.Versions=R$});var C7=C(()=>{g4();_4();v4();o4();t4();e4();w9()});class l{get credentials(){return this._authState.provider}constructor({baseURL:Z=y("ANTHROPIC_BASE_URL"),apiKey:$,authToken:X,webhookKey:J=y("ANTHROPIC_WEBHOOK_SIGNING_KEY")??null,...z}={}){if(Z6.add(this),this._requestAuthFlags=new WeakMap,cX.set(this,void 0),$===void 0)$=z.profile!=null?null:y("ANTHROPIC_API_KEY")??null;if(X===void 0)X=z.profile!=null?null:y("ANTHROPIC_AUTH_TOKEN")??null;if(z.profile!=null&&(z.credentials!=null||z.config!=null))throw TypeError("Pass at most one of `profile`, `credentials`, or `config`.");let Q={apiKey:$,authToken:X,webhookKey:J,...z,baseURL:Z||"https://api.anthropic.com"};if(!Q.dangerouslyAllowBrowser&&q6())throw new H(`It looks like you're running in a browser-like environment.
34
+
35
+ This is disabled by default, as it risks exposing your secret API credentials to attackers.
36
+ If you understand the risks and have appropriate mitigations in place,
37
+ you can set the \`dangerouslyAllowBrowser\` option to \`true\`, e.g.,
38
+
39
+ new Anthropic({ apiKey, dangerouslyAllowBrowser: true });
40
+ `);this.baseURL=Q.baseURL,this._baseURLIsExplicit=z.__baseURLIsExplicit??!!Z,this.timeout=Q.timeout??$6.DEFAULT_TIMEOUT,this.logger=Q.logger??console,this.logLevel=C8,this.logLevel=p$(Q.logLevel,"ClientOptions.logLevel",k(this))??p$(y("ANTHROPIC_LOG"),"process.env['ANTHROPIC_LOG']",k(this))??C8,this.fetchOptions=Q.fetchOptions,this.maxRetries=Q.maxRetries??2,this.fetch=Q.fetch??B6(),q(this,cX,T6,"f"),this.middleware=[...Q.middleware??[]];let V=y("ANTHROPIC_CUSTOM_HEADERS");if(V){let G={};for(let w of V.split(`
41
+ `)){let x=w.indexOf(":");if(x>=0)G[w.substring(0,x).trim()]=w.substring(x+1).trim()}Q.defaultHeaders={...G,...Q.defaultHeaders}}let K=z.__auth;if(delete Q.__auth,delete Q.__baseURLIsExplicit,this._options=Q,this.apiKey=typeof $==="string"?$:null,this.authToken=X,this.webhookKey=J,K){if(this._authState=K,!this._baseURLIsExplicit&&K.baseURL)this.baseURL=K.baseURL}else if(this._authState={provider:null,tokenCache:null,resolution:null,error:null,extraHeaders:{}},this.apiKey==null&&this.authToken==null){let G=Q.credentials??null;if(G)this._authState.provider=G,this._authState.tokenCache=this._makeTokenCache(G);else if(Q.config!=null){let w=G1(Q.config,this._credentialResolverOptions());this._authState.provider=w.provider,this._authState.tokenCache=this._makeTokenCache(w.provider),this._authState.extraHeaders=w.extraHeaders,this._applyCredentialBaseURL(w.baseURL)}else if(Q.profile!=null)this._authState.resolution=this._resolveDefaultCredentials(Q.profile);else if(this._shouldResolveDefaultCredentials())this._authState.resolution=this._resolveDefaultCredentials()}}_shouldResolveDefaultCredentials(){return!0}_applyCredentialBaseURL(Z){if(!Z)return;let $=Z.replace(/\/+$/,"");if(this._authState.baseURL=$,!this._baseURLIsExplicit)this.baseURL=$}_credentialResolverOptions(){return{baseURL:this.baseURL,fetch:this._credentialsFetch(),userAgent:this.getUserAgent(),onCacheWriteError:(Z)=>{k(this).debug("credential cache write failed (best-effort)",Z)},onSafetyWarning:(Z)=>{k(this).warn(Z)}}}_credentialsFetch(){return w1(this.fetch,this.middleware,void 0,this)}_makeTokenCache(Z){return new Y1(Z,($)=>{k(this).debug("advisory token refresh failed; serving cached token",$)})}withOptions(Z){let $="credentials"in Z||"config"in Z||"profile"in Z,X="apiKey"in Z||"authToken"in Z||$,J={...this._options,...this._baseURLIsExplicit?{baseURL:this.baseURL}:{},maxRetries:this.maxRetries,timeout:this.timeout,logger:this.logger,logLevel:this.logLevel,fetch:this.fetch,fetchOptions:this.fetchOptions,middleware:this.middleware,apiKey:this.apiKey,authToken:this.authToken,webhookKey:this.webhookKey,credentials:this.credentials,...$?{credentials:void 0,config:void 0,profile:void 0}:{},...Z,__auth:X?void 0:this._authState,__baseURLIsExplicit:"baseURL"in Z?!0:this._baseURLIsExplicit};return new this.constructor(J)}async _resolveDefaultCredentials(Z){try{let $=await J9(this._credentialResolverOptions(),Z);if($)this._authState.provider=$.provider,this._authState.tokenCache=this._makeTokenCache($.provider),this._authState.extraHeaders=$.extraHeaders,this._applyCredentialBaseURL($.baseURL);else if(Z!=null)throw new H(`Profile "${Z}" could not be resolved (no <config_dir>/configs/${Z}.json found).`)}catch($){this._authState.error=$}finally{this._authState.resolution=null}}defaultQuery(){return this._options.defaultQuery}validateHeaders({values:Z,nulls:$}){if(Z.get("x-api-key")||Z.get("authorization"))return;if(this._authState.error)throw this._authState.error;if(this._authState.tokenCache||this._authState.resolution)return;if(this.apiKey&&Z.get("x-api-key"))return;if($.has("x-api-key"))return;if(this.authToken&&Z.get("authorization"))return;if($.has("authorization"))return;throw Error('Could not resolve authentication method. Expected one of apiKey, authToken, credentials, config, or profile to be set. Or for one of the "X-Api-Key" or "Authorization" headers to be explicitly omitted')}_authFlags(Z){let $=this._requestAuthFlags.get(Z);if(!$)$={usedTokenCache:!1,didRefreshFor401:!1},this._requestAuthFlags.set(Z,$);return $}async authHeaders(Z){if(this._authState.resolution)await this._authState.resolution;if(this._authState.error)return;if(this._authState.tokenCache&&this.apiKey==null){let $=await this._authState.tokenCache.getToken();return this._authFlags(Z).usedTokenCache=!0,N([{Authorization:`Bearer ${$}`}])}return N([await this.apiKeyAuth(Z),await this.bearerAuth(Z)])}async apiKeyAuth(Z){if(this.apiKey==null)return;return N([{"X-Api-Key":this.apiKey}])}async bearerAuth(Z){if(this.authToken==null)return;return N([{Authorization:`Bearer ${this.authToken}`}])}stringifyQuery(Z){return I6(Z)}getUserAgent(){return`Anthropic/JS ${CZ}`}defaultIdempotencyKey(){return`stainless-node-retry-${w0()}`}makeStatusError(Z,$,X,J){return v.generate(Z,$,X,J)}buildURL(Z,$,X){let J=!Y(this,Z6,"m",M7).call(this)&&X||this.baseURL,z=V6(Z)?new URL(Z):new URL(J+(J.endsWith("/")&&Z.startsWith("/")?Z.slice(1):Z)),Q=this.defaultQuery(),V=Object.fromEntries(z.searchParams);if(!iX(Q)||!iX(V))$={...V,...Q,...$};if(typeof $==="object"&&$&&!Array.isArray($))z.search=this.stringifyQuery($);return z.toString()}_calculateNonstreamingTimeout(Z){if(3600*Z/128000>600)throw new H("Streaming is required for operations that may take longer than 10 minutes. See https://github.com/anthropics/anthropic-sdk-typescript#streaming-responses for more details");return 600000}async prepareOptions(Z){}async prepareRequest(Z,{url:$,options:X}){if(this._authState.tokenCache&&this.apiKey==null){let J=Z.headers instanceof Headers?Z.headers:new Headers(Z.headers);for(let[Q,V]of Object.entries(this._authState.extraHeaders))if(!J.has(Q))J.set(Q,V);if(!J.get("anthropic-beta")?.split(",").map((Q)=>Q.trim())?.includes($0))J.append("anthropic-beta",$0);Z.headers=J}}backendMiddleware(){return[]}get(Z,$){return this.methodRequest("get",Z,$)}post(Z,$){return this.methodRequest("post",Z,$)}patch(Z,$){return this.methodRequest("patch",Z,$)}put(Z,$){return this.methodRequest("put",Z,$)}delete(Z,$){return this.methodRequest("delete",Z,$)}methodRequest(Z,$,X){return this.request(Promise.resolve(X).then((J)=>{return{method:Z,path:$,...J}}))}request(Z,$=null){return new X0(this,this.makeRequest(Z,$,void 0))}async makeRequest(Z,$,X){let J=await Z,z=J.maxRetries??this.maxRetries;if($==null)$=z,this._requestAuthFlags.delete(J);await this.prepareOptions(J);let{req:Q,url:V,timeout:K}=await this.buildRequest(J,{retryCount:z-$}),G="log_"+(Math.random()*16777216|0).toString(16).padStart(6,"0"),w=X===void 0?"":`, retryOf: ${X}`,x=Date.now();if(J.signal?.aborted)throw new e;let O=new AbortController,U=await this.fetchWithTimeout(V,Q,K,O,J,{requestLogID:G,retryOfRequestLogID:X}).catch(Z0),B=Date.now();if(U instanceof globalThis.Error){SZ(O);let j=`retrying, ${$} attempts remaining`;if(J.signal?.aborted)throw new e;let S=wZ(U)||/timed? ?out/i.test(String(U)+("cause"in U?String(U.cause):"")),A=this.middleware.length>0||!!J.middleware?.length||this.backendMiddleware().length>0;if(A&&!S&&!W9(U))throw k(this).info(`[${G}] middleware error (not retryable)`),k(this).debug(`[${G}] middleware error (not retryable)`,FZ({retryOfRequestLogID:X,url:V,durationMs:B-x,message:U.message})),U;if($)return k(this).info(`[${G}] connection ${S?"timed out":"failed"} - ${j}`),k(this).debug(`[${G}] connection ${S?"timed out":"failed"} (${j})`,FZ({retryOfRequestLogID:X,url:V,durationMs:B-x,message:U.message})),this.retryRequest(J,$,X??G);if(k(this).info(`[${G}] connection ${S?"timed out":"failed"} - error; no more retries left`),k(this).debug(`[${G}] connection ${S?"timed out":"failed"} (error; no more retries left)`,FZ({retryOfRequestLogID:X,url:V,durationMs:B-x,message:U.message})),S)throw new t0;if(A&&!q1(U))throw U;throw new PZ({cause:U})}let T=[...U.headers.entries()].filter(([j])=>j==="request-id"||j==="anthropic-workspace-id").map(([j,S])=>", "+j+": "+JSON.stringify(S)).join(""),P=`[${G}${w}${T}] ${Q.method} ${V} ${U.ok?"succeeded":"failed"} with status ${U.status} in ${B-x}ms`;if(!U.ok){let j=await this.shouldRetry(U,J);if($&&j){let g=`retrying, ${$} attempts remaining`;return await H6(U.body),SZ(O),k(this).info(`${P} - ${g}`),k(this).debug(`[${G}] response error (${g})`,FZ({retryOfRequestLogID:X,url:U.url,status:U.status,headers:U.headers,durationMs:B-x})),this.retryRequest(J,$,X??G,U.headers)}let S=j?"error; no more retries left":"error; not retryable";k(this).info(`${P} - ${S}`);let A=await U.text().catch((g)=>Z0(g).message),F=V8(A),f=F?void 0:A;throw k(this).debug(`[${G}] response error (${S})`,FZ({retryOfRequestLogID:X,url:U.url,status:U.status,headers:U.headers,message:f,durationMs:Date.now()-x})),SZ(O),this.makeStatusError(U.status,F,f,U.headers)}return k(this).info(P),k(this).debug(`[${G}] response start`,FZ({retryOfRequestLogID:X,url:U.url,status:U.status,headers:U.headers,durationMs:B-x})),M6(U.body??U,O),{response:U,options:J,controller:O,requestLogID:G,retryOfRequestLogID:X,startTime:x}}getAPIList(Z,$,X){return this.requestAPIList($,X&&"then"in X?X.then((J)=>({method:"get",path:Z,...J})):{method:"get",path:Z,...X})}requestAPIList(Z,$){let X=this.makeRequest($,null,void 0);return new t$(this,X,Z)}async fetchWithTimeout(Z,$,X,J,z,Q){let{signal:V,method:K,...G}=$||{},w=this._makeAbort(J);if(V)V.addEventListener("abort",w,{once:!0}),C6(J,V,w);let x=globalThis.ReadableStream&&G.body instanceof globalThis.ReadableStream||typeof G.body==="object"&&G.body!==null&&Symbol.asyncIterator in G.body,O={signal:J.signal,...x?{duplex:"half"}:{},method:"GET",...G};if(K)O.method=K.toUpperCase();let U=this.fetch,B=async(A,F)=>{let f=setTimeout(w,X);try{return await U.call(void 0,A,F)}finally{clearTimeout(f)}},T=z===void 0?B:async(A,F={})=>{let f=typeof A==="string"?A:A instanceof URL?A.href:A.url;if(F.headers=F.headers instanceof Headers?F.headers:new Headers(F.headers),await this.prepareRequest(F,{url:f,options:z}),Q)k(this).debug(`[${Q.requestLogID}] sending request`,FZ({retryOfRequestLogID:Q.retryOfRequestLogID,method:F.method,url:f,options:z,headers:F.headers}));return B(A,F)},P=z?.middleware,j=this.backendMiddleware(),S=P?.length||j.length?[...this.middleware,...P??[],...j]:this.middleware;return await w1(T,S,z,this)(Z,O)}async shouldRetry(Z,$){let X=this._authFlags($);if(Z.status===401&&this._authState.tokenCache&&X.usedTokenCache&&!X.didRefreshFor401)return X.didRefreshFor401=!0,this._authState.tokenCache.invalidate(),!0;let J=Z.headers.get("x-should-retry");if(J==="true")return!0;if(J==="false")return!1;if(Z.status===408)return!0;if(Z.status===409)return!0;if(Z.status===429)return!0;if(Z.status>=500)return!0;return!1}async retryRequest(Z,$,X,J){let z,Q=J?.get("retry-after-ms");if(Q){let K=parseFloat(Q);if(!Number.isNaN(K))z=K}let V=J?.get("retry-after");if(V&&!z){let K=parseFloat(V);if(!Number.isNaN(K))z=K*1000;else z=Date.parse(V)-Date.now()}if(z===void 0){let K=Z.maxRetries??this.maxRetries;z=this.calculateDefaultRetryTimeoutMillis($,K)}return await xZ(z),this.makeRequest(Z,$-1,X)}calculateDefaultRetryTimeoutMillis(Z,$){let z=$-Z,Q=Math.min(0.5*Math.pow(2,z),8),V=1-Math.random()*0.25;return Q*V*1000}calculateNonstreamingTimeout(Z,$){if(3600000*Z/128000>600000||$!=null&&Z>$)throw new H("Streaming is required for operations that may take longer than 10 minutes. See https://github.com/anthropics/anthropic-sdk-typescript#long-requests for more details");return 600000}async buildRequest(Z,{retryCount:$=0}={}){let X={...Z},{method:J,path:z,query:Q,defaultBaseURL:V}=X;if(this._authState.resolution)await this._authState.resolution;if(!this._baseURLIsExplicit&&this._authState.baseURL&&this.baseURL!==this._authState.baseURL)this.baseURL=this._authState.baseURL;let K=this.buildURL(z,Q,V);if("timeout"in X)W6("timeout",X.timeout);X.timeout=X.timeout??this.timeout;let{bodyHeaders:G,body:w}=this.buildBody({options:X}),x=await this.buildHeaders({options:Z,method:J,bodyHeaders:G,retryCount:$});return{req:{method:J,headers:x,...X.signal&&{signal:X.signal},...globalThis.ReadableStream&&w instanceof globalThis.ReadableStream&&{duplex:"half"},...w&&{body:w},...this.fetchOptions??{},...X.fetchOptions??{}},url:K,timeout:X.timeout}}async buildHeaders({options:Z,method:$,bodyHeaders:X,retryCount:J}){let z={};if(this.idempotencyHeader&&$!=="get"){if(!Z.idempotencyKey)Z.idempotencyKey=this.defaultIdempotencyKey();z[this.idempotencyHeader]=Z.idempotencyKey}let Q=N([z,{Accept:"application/json","User-Agent":this.getUserAgent(),"X-Stainless-Retry-Count":String(J),...Z.timeout?{"X-Stainless-Timeout":String(Math.trunc(Z.timeout/1000))}:{},...W8(),...this._options.dangerouslyAllowBrowser?{"anthropic-dangerous-direct-browser-access":"true"}:void 0,"anthropic-version":"2023-06-01"},await this.authHeaders(Z),this._options.defaultHeaders,X,Z.headers]);return this.validateHeaders(Q),Q.values}_makeAbort(Z){return()=>Z.abort()}buildBody({options:{body:Z,headers:$}}){if(!Z)return{bodyHeaders:void 0,body:void 0};let X=N([$]);if(ArrayBuffer.isView(Z)||Z instanceof ArrayBuffer||Z instanceof DataView||typeof Z==="string"&&X.values.has("content-type")||globalThis.Blob&&Z instanceof globalThis.Blob||Z instanceof FormData||Z instanceof URLSearchParams||globalThis.ReadableStream&&Z instanceof globalThis.ReadableStream)return{bodyHeaders:void 0,body:Z};else if(typeof Z==="object"&&((Symbol.asyncIterator in Z)||(Symbol.iterator in Z)&&("next"in Z)&&typeof Z.next==="function"))return{bodyHeaders:void 0,body:h$(Z)};else if(typeof Z==="object"&&X.values.get("content-type")==="application/x-www-form-urlencoded")return{bodyHeaders:{"content-type":"application/x-www-form-urlencoded"},body:this.stringifyQuery(Z)};else return Y(this,cX,"f").call(this,{body:Z,headers:X})}}var Z6,$6,cX,M7,B7="\\n\\nHuman:",H7="\\n\\nAssistant:",bZ;var X6=C(()=>{QZ();I$();XZ();C0();gZ();f$();k$();M0();rX();J1();N8();m();H0();_6();z9();U9();D();x1();C7();a$();_4();v4();t4();g4();o4();e4();f$();R();T0();IZ();XZ();$6=l,cX=new WeakMap,Z6=new WeakSet,M7=function(){return this.baseURL!=="https://api.anthropic.com"};l.Anthropic=$6;l.HUMAN_PROMPT=B7;l.AI_PROMPT=H7;l.DEFAULT_TIMEOUT=600000;l.AnthropicError=H;l.APIError=v;l.APIConnectionError=PZ;l.APIConnectionTimeoutError=t0;l.APIUserAbortError=e;l.NotFoundError=$8;l.ConflictError=X8;l.RateLimitError=z8;l.BadRequestError=s0;l.AuthenticationError=e0;l.InternalServerError=Y8;l.PermissionDeniedError=Z8;l.UnprocessableEntityError=J8;l.toFile=s$;bZ=class bZ extends l{constructor(){super(...arguments);this.completions=new n0(this),this.messages=new O0(this),this.models=new o0(this),this.files=new a0(this),this.skills=new q0(this),this.beta=new p(this)}};bZ.Completions=n0;bZ.Messages=O0;bZ.Models=o0;bZ.Files=a0;bZ.Skills=q0;bZ.Beta=p});var T7=C(()=>{m();B8();gZ();R();LZ();XZ();rX()});var cJ=C(()=>{X6();x1();a$();T7();X6();D();m()});
42
+ export{q as Isa,Y as Jsa,QZ as Ksa,H as Lsa,v as Msa,e as Nsa,PZ as Osa,t0 as Psa,e0 as Qsa,$8 as Rsa,m as Ssa,x0 as Tsa,O8 as Usa,q8 as Vsa,k as Wsa,IZ as Xsa,i6 as Ysa,yZ as Zsa,h8 as _sa,_Z as $sa,Q8 as ata,aJ as bta,z6 as cta,Y6 as dta,Q6 as eta,pX as fta,K6 as gta,h0 as hta,bZ as ita,cJ as jta};
@@ -0,0 +1,2 @@
1
+ import{IM as C,Lp as N,MM as S,Mp as D,Np as x,PM as O,Qp as A,Rp as b,VM as _,XM as P,aN as h,bN as f,fN as c}from"./cli-1.1.26-kvt0v6vq.mjs";import{Dea as G,Fea as M,Fha as H,Iea as R,Nha as T,Vea as E,rda as L,zda as v}from"./cli-1.1.26-mvjefec1.mjs";import{Uja as U,Wja as F}from"./cli-1.1.26-pf85an2q.mjs";import{Lla as w,Ola as y}from"./cli-1.1.26-nr4x1ay3.mjs";import{cua as m}from"./cli-1.1.26-zb5hq3ry.mjs";import{join as I}from"path";async function e(){let q=R(),J=[],Q=N();for(let[z,K]of Object.entries(Q))if(z.includes("@")&&K)J.push(z);if(q.enabledPlugins)for(let[z,K]of Object.entries(q.enabledPlugins)){if(!z.includes("@"))continue;let W=J.indexOf(z);if(K){if(W===-1)J.push(z)}else if(W!==-1)J.splice(W,1)}return J}function qq(){let q=new Map,J=N();for(let[z,K]of Object.entries(J)){if(!z.includes("@"))continue;if(K===!0)q.set(z,"flag");else if(K===!1)q.delete(z)}let Q=[{scope:"managed",source:"policySettings"},{scope:"user",source:"userSettings"},{scope:"project",source:"projectSettings"},{scope:"local",source:"localSettings"},{scope:"flag",source:"flagSettings"}];for(let{scope:z,source:K}of Q){let W=G(K);if(!W?.enabledPlugins)continue;for(let[V,Y]of Object.entries(W.enabledPlugins)){if(!V.includes("@"))continue;if(V in J&&J[V]!==Y)w(`Plugin ${V} from --add-dir (${J[V]}) overridden by ${K} (${Y})`);if(Y===!0)q.set(V,z);else if(Y===!1)q.delete(V)}}return w(`Found ${q.size} enabled plugins with scopes: ${Array.from(q.entries()).map(([z,K])=>`${z}(${K})`).join(", ")}`),q}function zq(q){return x[q]}async function Jq(){_().catch((Q)=>{H(Q)});let q=O(),J=Object.keys(q.plugins);return w(`Found ${J.length} installed plugins`),J}async function Kq(q,J,Q="user"){let z=Q!=="user"?U():void 0,K=A(Q),W=G(K),V={...W?.enabledPlugins},Y=[],B=[];for(let k=0;k<q.length;k++){let X=q[k];if(!X)continue;if(J)J(X,k+1,q.length);try{let Z=await C(X);if(!Z){B.push({name:X,error:"Plugin not found in any marketplace"});continue}let{entry:$,marketplaceInstallLocation:j}=Z;if(!L($.source))await h(X,$,Q,z);else f({pluginId:X,installPath:I(j,$.source),version:$.version},Q,z);V[X]=!0,Y.push(X)}catch(Z){let $=Z instanceof Error?Z.message:String(Z);B.push({name:X,error:$}),H(Z)}}return M(K,{...W,enabledPlugins:V}),{installed:Y,failed:B}}var p=m(()=>{F();y();T();E();D();P();S();b();c();v()});
2
+ export{e as ze,qq as Ae,zq as Be,Jq as Ce,Kq as De,p as Ee};
@@ -0,0 +1,2 @@
1
+ import{Ema as J,wma as z}from"./cli-1.1.26-dyyg0r9f.mjs";import{cua as F}from"./cli-1.1.26-zb5hq3ry.mjs";function V(b){D=b}function W(){let b=D?.()??{};if(!z(process.env.CLAUDIN_SUBPROCESS_ENV_SCRUB))return Object.keys(b).length>0?{...process.env,...b}:process.env;let q={...process.env,...b};for(let w of L)delete q[w],delete q[`INPUT_${w}`];return q}var L,D;var M=F(()=>{J();L=["ANTHROPIC_API_KEY","CLAUDE_CODE_OAUTH_TOKEN","ANTHROPIC_AUTH_TOKEN","ANTHROPIC_FOUNDRY_API_KEY","ANTHROPIC_CUSTOM_HEADERS","OTEL_EXPORTER_OTLP_HEADERS","OTEL_EXPORTER_OTLP_LOGS_HEADERS","OTEL_EXPORTER_OTLP_METRICS_HEADERS","OTEL_EXPORTER_OTLP_TRACES_HEADERS","AWS_SECRET_ACCESS_KEY","AWS_SESSION_TOKEN","AWS_BEARER_TOKEN_BEDROCK","GOOGLE_APPLICATION_CREDENTIALS","AZURE_CLIENT_SECRET","AZURE_CLIENT_CERTIFICATE_PATH","ACTIONS_ID_TOKEN_REQUEST_TOKEN","ACTIONS_ID_TOKEN_REQUEST_URL","ACTIONS_RUNTIME_TOKEN","ACTIONS_RUNTIME_URL","ALL_INPUTS","OVERRIDE_GITHUB_TOKEN","DEFAULT_WORKFLOW_TOKEN","SSH_SIGNING_KEY"]});
2
+ export{V as cW,W as dW,M as eW};
@@ -0,0 +1,58 @@
1
+ import{Bj as $,Ej as h,IS as a,VK as A,Xr as F,_r as m,bE as U,cE as p,fC as O,gC as I,pS as P}from"./cli-1.1.26-kvt0v6vq.mjs";import{r5 as b,s5 as T}from"./cli-1.1.26-tgtv1jp3.mjs";import{Bla as x,xla as R}from"./cli-1.1.26-nr4x1ay3.mjs";import{oma as k,qma as M}from"./cli-1.1.26-7ssnr221.mjs";import{Ema as _,tma as N}from"./cli-1.1.26-dyyg0r9f.mjs";import{cua as v}from"./cli-1.1.26-zb5hq3ry.mjs";import{join as E}from"path";function g(){return`IMPORTANT: This message and these instructions are NOT part of the actual user conversation. Do NOT include any references to "documentation updates", "magic docs", or these update instructions in the document content.
2
+
3
+ Based on the user conversation above (EXCLUDING this documentation update instruction message), update the Magic Doc file to incorporate any NEW learnings, insights, or information that would be valuable to preserve.
4
+
5
+ The file {{docPath}} has already been read for you. Here are its current contents:
6
+ <current_doc_content>
7
+ {{docContents}}
8
+ </current_doc_content>
9
+
10
+ Document title: {{docTitle}}
11
+ {{customInstructions}}
12
+
13
+ Your ONLY task is to use the Edit tool to update the documentation file if there is substantial new information to add, then stop. You can make multiple edits (update multiple sections as needed) - make all Edit tool calls in parallel in a single message. If there's nothing substantial to add, simply respond with a brief explanation and do not call any tools.
14
+
15
+ CRITICAL RULES FOR EDITING:
16
+ - Preserve the Magic Doc header exactly as-is: # MAGIC DOC: {{docTitle}}
17
+ - If there's an italicized line immediately after the header, preserve it exactly as-is
18
+ - Keep the document CURRENT with the latest state of the codebase - this is NOT a changelog or history
19
+ - Update information IN-PLACE to reflect the current state - do NOT append historical notes or track changes over time
20
+ - Remove or replace outdated information rather than adding "Previously..." or "Updated to..." notes
21
+ - Clean up or DELETE sections that are no longer relevant or don't align with the document's purpose
22
+ - Fix obvious errors: typos, grammar mistakes, broken formatting, incorrect information, or confusing statements
23
+ - Keep the document well organized: use clear headings, logical section order, consistent formatting, and proper nesting
24
+
25
+ DOCUMENTATION PHILOSOPHY - READ CAREFULLY:
26
+ - BE TERSE. High signal only. No filler words or unnecessary elaboration.
27
+ - Documentation is for OVERVIEWS, ARCHITECTURE, and ENTRY POINTS - not detailed code walkthroughs
28
+ - Do NOT duplicate information that's already obvious from reading the source code
29
+ - Do NOT document every function, parameter, or line number reference
30
+ - Focus on: WHY things exist, HOW components connect, WHERE to start reading, WHAT patterns are used
31
+ - Skip: detailed implementation steps, exhaustive API docs, play-by-play narratives
32
+
33
+ What TO document:
34
+ - High-level architecture and system design
35
+ - Non-obvious patterns, conventions, or gotchas
36
+ - Key entry points and where to start reading code
37
+ - Important design decisions and their rationale
38
+ - Critical dependencies or integration points
39
+ - References to related files, docs, or code (like a wiki) - help readers navigate to relevant context
40
+
41
+ What NOT to document:
42
+ - Anything obvious from reading the code itself
43
+ - Exhaustive lists of files, functions, or parameters
44
+ - Step-by-step implementation details
45
+ - Low-level code mechanics
46
+ - Information already in CLAUDE.md or other project docs
47
+
48
+ Use the Edit tool with file_path: {{docPath}}
49
+
50
+ REMEMBER: Only update if there is substantial new information. The Magic Doc header (# MAGIC DOC: {{docTitle}}) must remain unchanged.`}async function D(){let w=R(),z=E(N(),"magic-docs","prompt.md");try{return await w.readFile(z,{encoding:"utf-8"})}catch{return g()}}function f(w,z){return w.replace(/\{\{(\w+)\}\}/g,(B,J)=>Object.prototype.hasOwnProperty.call(z,J)?z[J]:B)}async function S(w,z,B,J){let Y=await D(),K=J?`
51
+
52
+ DOCUMENT-SPECIFIC UPDATE INSTRUCTIONS:
53
+ The document author has provided specific instructions for how this file should be updated. Pay extra attention to these instructions and follow them carefully:
54
+
55
+ "${J}"
56
+
57
+ These instructions take priority over the general rules below. Make sure your updates align with these specific guidelines.`:"";return f(Y,{docContents:w,docPath:z,docTitle:B,customInstructions:K})}var y=v(()=>{_();x()});function Xw(){G.clear()}function r(w){let z=w.match(u);if(!z||!z[1])return null;let B=z[1].trim(),J=z.index+z[0].length,K=w.slice(J).match(/^\s*\n(?:\s*\n)?(.+?)(?:\n|$)/);if(K&&K[1]){let X=K[1].match(l);if(X&&X[1]){let Z=X[1].trim();return{title:B,instructions:Z}}}return{title:B}}function d(){return{agentType:"magic-docs",whenToUse:"Update Magic Docs",tools:[$],model:"sonnet",source:"built-in",baseDir:"built-in",getSystemPrompt:()=>""}}async function i(w,z){let{messages:B,systemPrompt:J,userContext:Y,systemContext:K,toolUseContext:V}=z,X=F(V.readFileState);X.delete(w.path);let Z={...V,readFileState:X},q="";try{let W=(await U.call({file_path:w.path},Z)).data;if(W.type==="text")q=W.file.content}catch(Q){if(k(Q)||Q instanceof Error&&Q.message.startsWith("File does not exist")){G.delete(w.path);return}throw Q}let H=r(q);if(!H){G.delete(w.path);return}let L=await S(q,w.path,H.title,H.instructions),C=async(Q,W)=>{if(Q.name===$&&typeof W==="object"&&W!==null&&"file_path"in W){let j=W.file_path;if(typeof j==="string"&&j===w.path)return{behavior:"allow",updatedInput:W}}return{behavior:"deny",message:`only ${$} is allowed for ${w.path}`,decisionReason:{type:"other",reason:`only ${$} is allowed`}}};for await(let Q of O({agentDefinition:d(),promptMessages:[A({content:L})],toolUseContext:Z,canUseTool:C,isAsync:!0,forkContextMessages:B,querySource:"magic_docs",override:{systemPrompt:J,userContext:Y,systemContext:K},availableTools:Z.options.tools}));}async function Zw(){}var u,l,G,Yw;var s=v(()=>{I();h();p();M();m();a();T();y();u=/^#\s*MAGIC\s+DOC:\s*(.+)$/im,l=/^[_*](.+?)[_*]\s*$/m,G=new Map;Yw=b(async function(w){let{messages:z,querySource:B}=w;if(B!=="repl_main_thread")return;if(P(z))return;if(G.size===0)return;for(let K of Array.from(G.values()))await i(K,w)})});
58
+ export{Xw as ri,Zw as si,s as ti};