@claudiolabs/claudin 1.0.13 → 1.0.14

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.0.14-3eb94705.mjs +1 -0
  2. package/dist/chunks/App-1.0.14-g64njc6h.mjs +1 -0
  3. package/dist/chunks/ApproveApiKey-1.0.14-a2d84wb1.mjs +1 -0
  4. package/dist/chunks/AssistantSessionChooser-1.0.14-84m2b3pt.mjs +1 -0
  5. package/dist/chunks/AutoModeOptInDialog-1.0.14-p4sev4yv.mjs +1 -0
  6. package/dist/chunks/BypassPermissionsModeDialog-1.0.14-p1gf60x3.mjs +1 -0
  7. package/dist/chunks/ClaudeMdExternalIncludesDialog-1.0.14-t9yhrffv.mjs +1 -0
  8. package/dist/chunks/ConsoleOAuthFlow-1.0.14-dfnr66ct.mjs +1 -0
  9. package/dist/chunks/DiffDialog-1.0.14-80b9fnfy.mjs +7 -0
  10. package/dist/chunks/Doctor-1.0.14-5xw1fdn8.mjs +1 -0
  11. package/dist/chunks/ExplorerDialog-1.0.14-2trgr2gt.mjs +6 -0
  12. package/dist/chunks/Grove-1.0.14-c11ddcj0.mjs +1 -0
  13. package/dist/chunks/ITermBackend-1.0.14-423w55et.mjs +1 -0
  14. package/dist/chunks/InvalidConfigDialog-1.0.14-chapmp71.mjs +1 -0
  15. package/dist/chunks/InvalidSettingsDialog-1.0.14-hsf9qywq.mjs +1 -0
  16. package/dist/chunks/MigrationDialog-1.0.14-bqpqw2qh.mjs +1 -0
  17. package/dist/chunks/Onboarding-1.0.14-snt041zc.mjs +1 -0
  18. package/dist/chunks/ProviderManager-1.0.14-p14kceqc.mjs +1 -0
  19. package/dist/chunks/REPL-1.0.14-6zpc8shq.mjs +1 -0
  20. package/dist/chunks/ResumeConversation-1.0.14-j0ps61bf.mjs +1 -0
  21. package/dist/chunks/SnapshotUpdateDialog-1.0.14-cgcfpjkf.mjs +1 -0
  22. package/dist/chunks/TeleportProgress-1.0.14-za0txxy6.mjs +1 -0
  23. package/dist/chunks/TeleportRepoMismatchDialog-1.0.14-yg4kf1y3.mjs +1 -0
  24. package/dist/chunks/TeleportResumeWrapper-1.0.14-8177pspx.mjs +1 -0
  25. package/dist/chunks/TmuxBackend-1.0.14-whbn5wgb.mjs +9 -0
  26. package/dist/chunks/ToolSearchTool-1.0.14-vfjpmp6q.mjs +1 -0
  27. package/dist/chunks/TrustDialog-1.0.14-egtqfjhd.mjs +1 -0
  28. package/dist/chunks/activeProvider-1.0.14-c06rhryc.mjs +1 -0
  29. package/dist/chunks/add-dir-1.0.14-sjnjjka0.mjs +1 -0
  30. package/dist/chunks/agentTypes-1.0.14-d05d7czp.mjs +1 -0
  31. package/dist/chunks/agents-1.0.14-68haybhf.mjs +110 -0
  32. package/dist/chunks/agents-1.0.14-jd8gzved.mjs +3 -0
  33. package/dist/chunks/api-1.0.14-sgt5erw2.mjs +1 -0
  34. package/dist/chunks/asciicast-1.0.14-3vzgbe4y.mjs +1 -0
  35. package/dist/chunks/assistant-1.0.14-3snwhy6g.mjs +1 -0
  36. package/dist/chunks/auth-1.0.14-5rcgzv6s.mjs +1 -0
  37. package/dist/chunks/auth-1.0.14-z9fp9b50.mjs +1 -0
  38. package/dist/chunks/autoMode-1.0.14-swb8aya1.mjs +48 -0
  39. package/dist/chunks/autoUpdater-1.0.14-an9g2egz.mjs +1 -0
  40. package/dist/chunks/backgroundHousekeeping-1.0.14-j9566tb7.mjs +1 -0
  41. package/dist/chunks/branch-1.0.14-wab7dp2w.mjs +4 -0
  42. package/dist/chunks/bridge-1.0.14-1vxrnevp.mjs +2 -0
  43. package/dist/chunks/bridgeConfig-1.0.14-9a6ecffc.mjs +1 -0
  44. package/dist/chunks/bridgeEnabled-1.0.14-xbqnxpd4.mjs +1 -0
  45. package/dist/chunks/bridgeMain-1.0.14-xsyfsnjc.mjs +88 -0
  46. package/dist/chunks/bridgePointer-1.0.14-rg9vg3mq.mjs +1 -0
  47. package/dist/chunks/btw-1.0.14-f5cv4zq4.mjs +1 -0
  48. package/dist/chunks/buddy-1.0.14-cbxx5n1c.mjs +3 -0
  49. package/dist/chunks/cacache-1.0.14-qpamcgt7.mjs +1 -0
  50. package/dist/chunks/cache-probe-1.0.14-03fqsejc.mjs +21 -0
  51. package/dist/chunks/cacheStats-1.0.14-1m7bkth3.mjs +4 -0
  52. package/dist/chunks/caches-1.0.14-ar7ea5ez.mjs +1 -0
  53. package/dist/chunks/claudeDesktop-1.0.14-qw8yg1j3.mjs +1 -0
  54. package/dist/chunks/claudemd-1.0.14-nf8prbr5.mjs +1 -0
  55. package/dist/chunks/clear-1.0.14-2k1a1te1.mjs +1 -0
  56. package/dist/chunks/clearTerminal-1.0.14-9vjx2459.mjs +1 -0
  57. package/dist/chunks/cli-1.0.14-02mjj2td.mjs +2 -0
  58. package/dist/chunks/cli-1.0.14-03dntq34.mjs +2 -0
  59. package/dist/chunks/cli-1.0.14-056vh6pz.mjs +2 -0
  60. package/dist/chunks/cli-1.0.14-06ay9th6.mjs +2 -0
  61. package/dist/chunks/cli-1.0.14-080f910z.mjs +2 -0
  62. package/dist/chunks/cli-1.0.14-0aznk4r2.mjs +2 -0
  63. package/dist/chunks/cli-1.0.14-0b8m5g1h.mjs +2 -0
  64. package/dist/chunks/cli-1.0.14-0egax5w7.mjs +2 -0
  65. package/dist/chunks/cli-1.0.14-0gjgczkc.mjs +2 -0
  66. package/dist/chunks/cli-1.0.14-0x37zvng.mjs +2 -0
  67. package/dist/chunks/cli-1.0.14-1bdy2pdx.mjs +133 -0
  68. package/dist/chunks/cli-1.0.14-1qwq14cj.mjs +3 -0
  69. package/dist/chunks/cli-1.0.14-1t5z0ek3.mjs +3 -0
  70. package/dist/chunks/cli-1.0.14-1vt2kg6r.mjs +2 -0
  71. package/dist/chunks/cli-1.0.14-255cjybd.mjs +2 -0
  72. package/dist/chunks/cli-1.0.14-2hd7h509.mjs +2 -0
  73. package/dist/chunks/cli-1.0.14-2m0sc9nm.mjs +2 -0
  74. package/dist/chunks/cli-1.0.14-2n1n5t44.mjs +2 -0
  75. package/dist/chunks/cli-1.0.14-2nq4pjya.mjs +24 -0
  76. package/dist/chunks/cli-1.0.14-2vr2yczh.mjs +2 -0
  77. package/dist/chunks/cli-1.0.14-2x3edt9r.mjs +2 -0
  78. package/dist/chunks/cli-1.0.14-2ygex7d3.mjs +9 -0
  79. package/dist/chunks/cli-1.0.14-2zyyyhb7.mjs +3 -0
  80. package/dist/chunks/cli-1.0.14-37ekvc0d.mjs +18 -0
  81. package/dist/chunks/cli-1.0.14-3psqc9e7.mjs +39 -0
  82. package/dist/chunks/cli-1.0.14-3twn11hz.mjs +2 -0
  83. package/dist/chunks/cli-1.0.14-494f4wzb.mjs +2 -0
  84. package/dist/chunks/cli-1.0.14-4hcxmq25.mjs +2 -0
  85. package/dist/chunks/cli-1.0.14-4jr9qd6b.mjs +2 -0
  86. package/dist/chunks/cli-1.0.14-4k924cg4.mjs +2 -0
  87. package/dist/chunks/cli-1.0.14-5d4wcwg0.mjs +2 -0
  88. package/dist/chunks/cli-1.0.14-5scjg1rq.mjs +4 -0
  89. package/dist/chunks/cli-1.0.14-5z2gnwr2.mjs +2 -0
  90. package/dist/chunks/cli-1.0.14-66xxje2h.mjs +2 -0
  91. package/dist/chunks/cli-1.0.14-67n1r865.mjs +24 -0
  92. package/dist/chunks/cli-1.0.14-68k1pwnn.mjs +2 -0
  93. package/dist/chunks/cli-1.0.14-6eecgnxv.mjs +2 -0
  94. package/dist/chunks/cli-1.0.14-6knmqxp0.mjs +2 -0
  95. package/dist/chunks/cli-1.0.14-6v1pc51c.mjs +202 -0
  96. package/dist/chunks/cli-1.0.14-75b7hq1n.mjs +2 -0
  97. package/dist/chunks/cli-1.0.14-75v98tkm.mjs +6 -0
  98. package/dist/chunks/cli-1.0.14-7ce0zgxz.mjs +18 -0
  99. package/dist/chunks/cli-1.0.14-7mc80f2n.mjs +2 -0
  100. package/dist/chunks/cli-1.0.14-7qay34rj.mjs +2 -0
  101. package/dist/chunks/cli-1.0.14-7sxsfqxa.mjs +12 -0
  102. package/dist/chunks/cli-1.0.14-85hb2c4v.mjs +3 -0
  103. package/dist/chunks/cli-1.0.14-86makc2k.mjs +2 -0
  104. package/dist/chunks/cli-1.0.14-8848tddm.mjs +2 -0
  105. package/dist/chunks/cli-1.0.14-8fgg3hse.mjs +2 -0
  106. package/dist/chunks/cli-1.0.14-8mxj80zx.mjs +4 -0
  107. package/dist/chunks/cli-1.0.14-95d1hyag.mjs +2 -0
  108. package/dist/chunks/cli-1.0.14-95vxrp6k.mjs +2 -0
  109. package/dist/chunks/cli-1.0.14-9at1y60d.mjs +2 -0
  110. package/dist/chunks/cli-1.0.14-9peasp0t.mjs +15 -0
  111. package/dist/chunks/cli-1.0.14-ac1ts3ak.mjs +2 -0
  112. package/dist/chunks/cli-1.0.14-adsfxzzd.mjs +2 -0
  113. package/dist/chunks/cli-1.0.14-adwprsmr.mjs +2 -0
  114. package/dist/chunks/cli-1.0.14-ap4xyggx.mjs +2 -0
  115. package/dist/chunks/cli-1.0.14-asbc8xx1.mjs +16 -0
  116. package/dist/chunks/cli-1.0.14-ayanma4c.mjs +2 -0
  117. package/dist/chunks/cli-1.0.14-b0ry3sh2.mjs +25 -0
  118. package/dist/chunks/cli-1.0.14-b11ne5s1.mjs +12 -0
  119. package/dist/chunks/cli-1.0.14-b72b8p5z.mjs +2 -0
  120. package/dist/chunks/cli-1.0.14-b745qv7t.mjs +2 -0
  121. package/dist/chunks/cli-1.0.14-bhtptg08.mjs +2 -0
  122. package/dist/chunks/cli-1.0.14-bk3ss9tt.mjs +2 -0
  123. package/dist/chunks/cli-1.0.14-bpe70zxn.mjs +2 -0
  124. package/dist/chunks/cli-1.0.14-brabf1jv.mjs +2 -0
  125. package/dist/chunks/cli-1.0.14-c71rqr9k.mjs +2 -0
  126. package/dist/chunks/cli-1.0.14-c75wkkj6.mjs +2 -0
  127. package/dist/chunks/cli-1.0.14-ccc05p60.mjs +2 -0
  128. package/dist/chunks/cli-1.0.14-ch132841.mjs +2 -0
  129. package/dist/chunks/cli-1.0.14-cm2p0ph3.mjs +2 -0
  130. package/dist/chunks/cli-1.0.14-ct1wcd17.mjs +2 -0
  131. package/dist/chunks/cli-1.0.14-cxd5b9bk.mjs +2 -0
  132. package/dist/chunks/cli-1.0.14-d0xsytrn.mjs +2 -0
  133. package/dist/chunks/cli-1.0.14-d92vvqs4.mjs +2 -0
  134. package/dist/chunks/cli-1.0.14-dbqfyv7s.mjs +5 -0
  135. package/dist/chunks/cli-1.0.14-dbvshaqg.mjs +4 -0
  136. package/dist/chunks/cli-1.0.14-dd57p59t.mjs +2 -0
  137. package/dist/chunks/cli-1.0.14-de21tard.mjs +2 -0
  138. package/dist/chunks/cli-1.0.14-df2x4fp2.mjs +4 -0
  139. package/dist/chunks/cli-1.0.14-dk082sx4.mjs +17 -0
  140. package/dist/chunks/cli-1.0.14-dnpdnyqq.mjs +4 -0
  141. package/dist/chunks/cli-1.0.14-dthw88h2.mjs +2 -0
  142. package/dist/chunks/cli-1.0.14-dxb8x0rz.mjs +2 -0
  143. package/dist/chunks/cli-1.0.14-dzhv160v.mjs +2 -0
  144. package/dist/chunks/cli-1.0.14-e4rbgkh3.mjs +2 -0
  145. package/dist/chunks/cli-1.0.14-emgfr0hx.mjs +2 -0
  146. package/dist/chunks/cli-1.0.14-erk3k0t8.mjs +25 -0
  147. package/dist/chunks/cli-1.0.14-et0mrzhj.mjs +2 -0
  148. package/dist/chunks/cli-1.0.14-ex26fc5j.mjs +2 -0
  149. package/dist/chunks/cli-1.0.14-f2zs9vhk.mjs +2 -0
  150. package/dist/chunks/cli-1.0.14-f5jcsqk6.mjs +18 -0
  151. package/dist/chunks/cli-1.0.14-f6q37w7a.mjs +2 -0
  152. package/dist/chunks/cli-1.0.14-f6w3w08h.mjs +2 -0
  153. package/dist/chunks/cli-1.0.14-f89n34mp.mjs +3 -0
  154. package/dist/chunks/cli-1.0.14-fhfpsmvp.mjs +15 -0
  155. package/dist/chunks/cli-1.0.14-ftd45b68.mjs +2 -0
  156. package/dist/chunks/cli-1.0.14-g06w6jm4.mjs +2 -0
  157. package/dist/chunks/cli-1.0.14-g3gc4e8t.mjs +2 -0
  158. package/dist/chunks/cli-1.0.14-ghnyd53e.mjs +2 -0
  159. package/dist/chunks/cli-1.0.14-gjg1vjat.mjs +4 -0
  160. package/dist/chunks/cli-1.0.14-gpyabssm.mjs +1 -0
  161. package/dist/chunks/cli-1.0.14-gwmbkjc2.mjs +4 -0
  162. package/dist/chunks/cli-1.0.14-h1w8rqag.mjs +2 -0
  163. package/dist/chunks/cli-1.0.14-h2s5yvb9.mjs +2 -0
  164. package/dist/chunks/cli-1.0.14-h3hwpsy4.mjs +2 -0
  165. package/dist/chunks/cli-1.0.14-hdmedxpt.mjs +2 -0
  166. package/dist/chunks/cli-1.0.14-hh96zphk.mjs +2 -0
  167. package/dist/chunks/cli-1.0.14-hhk3wp4p.mjs +133 -0
  168. package/dist/chunks/cli-1.0.14-hx5s9hne.mjs +21 -0
  169. package/dist/chunks/cli-1.0.14-j51dm8c6.mjs +17 -0
  170. package/dist/chunks/cli-1.0.14-j9twyr23.mjs +2 -0
  171. package/dist/chunks/cli-1.0.14-jnpffwq9.mjs +2 -0
  172. package/dist/chunks/cli-1.0.14-jskb8031.mjs +2 -0
  173. package/dist/chunks/cli-1.0.14-jstnvbzj.mjs +2 -0
  174. package/dist/chunks/cli-1.0.14-k1e7b44j.mjs +7 -0
  175. package/dist/chunks/cli-1.0.14-k2xrkqcw.mjs +2 -0
  176. package/dist/chunks/cli-1.0.14-k6hht81r.mjs +2 -0
  177. package/dist/chunks/cli-1.0.14-k8eysm02.mjs +2 -0
  178. package/dist/chunks/cli-1.0.14-knxqt3hz.mjs +5 -0
  179. package/dist/chunks/cli-1.0.14-m470pppj.mjs +12 -0
  180. package/dist/chunks/cli-1.0.14-m6ja76zk.mjs +2 -0
  181. package/dist/chunks/cli-1.0.14-m70b5kbd.mjs +59 -0
  182. package/dist/chunks/cli-1.0.14-m7rhvjxj.mjs +2 -0
  183. package/dist/chunks/cli-1.0.14-ma7qcx6q.mjs +2 -0
  184. package/dist/chunks/cli-1.0.14-mb9174ba.mjs +2 -0
  185. package/dist/chunks/cli-1.0.14-mkw8yfc5.mjs +2 -0
  186. package/dist/chunks/cli-1.0.14-mm39qawq.mjs +2 -0
  187. package/dist/chunks/cli-1.0.14-mm9zge4j.mjs +2 -0
  188. package/dist/chunks/cli-1.0.14-msjx38tg.mjs +50 -0
  189. package/dist/chunks/cli-1.0.14-mvmk9c18.mjs +8 -0
  190. package/dist/chunks/cli-1.0.14-mw3ntwdw.mjs +2 -0
  191. package/dist/chunks/cli-1.0.14-myb8xers.mjs +2 -0
  192. package/dist/chunks/cli-1.0.14-n0fpj4mm.mjs +2 -0
  193. package/dist/chunks/cli-1.0.14-n8jgkzhf.mjs +2 -0
  194. package/dist/chunks/cli-1.0.14-nac2j4df.mjs +2 -0
  195. package/dist/chunks/cli-1.0.14-p0y766gp.mjs +2 -0
  196. package/dist/chunks/cli-1.0.14-p124te80.mjs +58 -0
  197. package/dist/chunks/cli-1.0.14-p1mk8kvb.mjs +2 -0
  198. package/dist/chunks/cli-1.0.14-p66smv2r.mjs +4 -0
  199. package/dist/chunks/cli-1.0.14-p8g9b6qs.mjs +6 -0
  200. package/dist/chunks/cli-1.0.14-pccg4txr.mjs +2 -0
  201. package/dist/chunks/cli-1.0.14-pcpqbb0b.mjs +3 -0
  202. package/dist/chunks/cli-1.0.14-peg6ppst.mjs +34 -0
  203. package/dist/chunks/cli-1.0.14-ph2nbeey.mjs +2 -0
  204. package/dist/chunks/cli-1.0.14-phhmzjmr.mjs +2 -0
  205. package/dist/chunks/cli-1.0.14-psw8gbp1.mjs +2 -0
  206. package/dist/chunks/cli-1.0.14-pxda0cqk.mjs +6 -0
  207. package/dist/chunks/cli-1.0.14-q4mq73ef.mjs +4 -0
  208. package/dist/chunks/cli-1.0.14-q4pb7169.mjs +67 -0
  209. package/dist/chunks/cli-1.0.14-q5jd6yb5.mjs +2 -0
  210. package/dist/chunks/cli-1.0.14-qwte1vj6.mjs +3 -0
  211. package/dist/chunks/cli-1.0.14-r7268arv.mjs +2 -0
  212. package/dist/chunks/cli-1.0.14-ra3s73t4.mjs +2 -0
  213. package/dist/chunks/cli-1.0.14-rfzdprh2.mjs +24 -0
  214. package/dist/chunks/cli-1.0.14-rxvbbv8x.mjs +3 -0
  215. package/dist/chunks/cli-1.0.14-s2pgxnbv.mjs +2 -0
  216. package/dist/chunks/cli-1.0.14-s7a5ag77.mjs +2 -0
  217. package/dist/chunks/cli-1.0.14-sbczqn9p.mjs +3 -0
  218. package/dist/chunks/cli-1.0.14-sn3z317d.mjs +2 -0
  219. package/dist/chunks/cli-1.0.14-srfv9wh6.mjs +2 -0
  220. package/dist/chunks/cli-1.0.14-t15qp56h.mjs +2 -0
  221. package/dist/chunks/cli-1.0.14-t1sj3p5p.mjs +3 -0
  222. package/dist/chunks/cli-1.0.14-t5m38zm5.mjs +15 -0
  223. package/dist/chunks/cli-1.0.14-tdqp99kc.mjs +2 -0
  224. package/dist/chunks/cli-1.0.14-tdv8sv8w.mjs +4 -0
  225. package/dist/chunks/cli-1.0.14-tjcgmra3.mjs +2 -0
  226. package/dist/chunks/cli-1.0.14-ttcwqfwj.mjs +4 -0
  227. package/dist/chunks/cli-1.0.14-v4p41dwz.mjs +5495 -0
  228. package/dist/chunks/cli-1.0.14-ve3fgjyt.mjs +2 -0
  229. package/dist/chunks/cli-1.0.14-vrh3vmm8.mjs +2 -0
  230. package/dist/chunks/cli-1.0.14-vvvyddeg.mjs +2 -0
  231. package/dist/chunks/cli-1.0.14-vw06jpp7.mjs +20 -0
  232. package/dist/chunks/cli-1.0.14-vz26zg7a.mjs +2 -0
  233. package/dist/chunks/cli-1.0.14-w6v1zxks.mjs +2 -0
  234. package/dist/chunks/cli-1.0.14-wa45dqxz.mjs +3 -0
  235. package/dist/chunks/cli-1.0.14-wjjb5egc.mjs +2 -0
  236. package/dist/chunks/cli-1.0.14-xa9jge5n.mjs +6 -0
  237. package/dist/chunks/cli-1.0.14-xbbbmrs2.mjs +2 -0
  238. package/dist/chunks/cli-1.0.14-xc0yjk9p.mjs +2 -0
  239. package/dist/chunks/cli-1.0.14-xf07bsa7.mjs +6 -0
  240. package/dist/chunks/cli-1.0.14-xgqrwe2j.mjs +12 -0
  241. package/dist/chunks/cli-1.0.14-xmfxgg80.mjs +2 -0
  242. package/dist/chunks/cli-1.0.14-xtwtqzg9.mjs +9 -0
  243. package/dist/chunks/cli-1.0.14-xvkary9q.mjs +2 -0
  244. package/dist/chunks/cli-1.0.14-xwakys0q.mjs +3 -0
  245. package/dist/chunks/cli-1.0.14-xy0szsmx.mjs +2 -0
  246. package/dist/chunks/cli-1.0.14-y10j25g4.mjs +2 -0
  247. package/dist/chunks/cli-1.0.14-y8dgsh0x.mjs +2 -0
  248. package/dist/chunks/cli-1.0.14-y8hsq76p.mjs +2 -0
  249. package/dist/chunks/cli-1.0.14-ya2azx0f.mjs +2 -0
  250. package/dist/chunks/cli-1.0.14-ya91z6q2.mjs +2 -0
  251. package/dist/chunks/cli-1.0.14-yxqwd7s7.mjs +45 -0
  252. package/dist/chunks/cli-1.0.14-yzy55kht.mjs +2 -0
  253. package/dist/chunks/cli-1.0.14-z4q3a7ed.mjs +2 -0
  254. package/dist/chunks/cli-1.0.14-zak89hnm.mjs +2 -0
  255. package/dist/chunks/cli-1.0.14-zar1mrp1.mjs +42 -0
  256. package/dist/chunks/cli-1.0.14-zbhe3r2k.mjs +2 -0
  257. package/dist/chunks/cli-1.0.14-zvvarkm8.mjs +2 -0
  258. package/dist/chunks/client-1.0.14-ya6cmgvc.mjs +1 -0
  259. package/dist/chunks/color-1.0.14-hwkxtn4h.mjs +1 -0
  260. package/dist/chunks/compact-1.0.14-0m3pkmtt.mjs +3 -0
  261. package/dist/chunks/config-1.0.14-5v04cvqa.mjs +1 -0
  262. package/dist/chunks/config-1.0.14-b53qm2m7.mjs +1 -0
  263. package/dist/chunks/constants-1.0.14-6dwbhe8v.mjs +1 -0
  264. package/dist/chunks/context-1.0.14-r2e42wq4.mjs +1 -0
  265. package/dist/chunks/context-noninteractive-1.0.14-ecx4zas3.mjs +1 -0
  266. package/dist/chunks/conversation-1.0.14-r5y211pa.mjs +1 -0
  267. package/dist/chunks/copilotHeaders-1.0.14-293bscj5.mjs +1 -0
  268. package/dist/chunks/copy-1.0.14-4ac7bg5d.mjs +9 -0
  269. package/dist/chunks/cost-1.0.14-cpzf024x.mjs +1 -0
  270. package/dist/chunks/createSSHSession-1.0.14-7peb99vv.mjs +1 -0
  271. package/dist/chunks/createSession-1.0.14-pbp99z80.mjs +1 -0
  272. package/dist/chunks/debug-1.0.14-935d0xmm.mjs +1 -0
  273. package/dist/chunks/defaultActionDeps-1.0.14-k2n8eszz.mjs +1446 -0
  274. package/dist/chunks/desktop-1.0.14-877wpqh4.mjs +1 -0
  275. package/dist/chunks/detectRepository-1.0.14-y8xp07vm.mjs +1 -0
  276. package/dist/chunks/detection-1.0.14-v0x8bekt.mjs +1 -0
  277. package/dist/chunks/diff-1.0.14-zygrxp72.mjs +1 -0
  278. package/dist/chunks/doctor-1.0.14-9bd8ns97.mjs +1 -0
  279. package/dist/chunks/doctorDiagnostic-1.0.14-3d8wvpdr.mjs +1 -0
  280. package/dist/chunks/earlyInput-1.0.14-ctf7gf3b.mjs +1 -0
  281. package/dist/chunks/effort-1.0.14-1bzhbssf.mjs +10 -0
  282. package/dist/chunks/engine-1.0.14-xpw6spn1.mjs +1 -0
  283. package/dist/chunks/envLessBridgeConfig-1.0.14-kvp9ngpw.mjs +1 -0
  284. package/dist/chunks/envUtils-1.0.14-x69rnjtn.mjs +1 -0
  285. package/dist/chunks/environmentSelection-1.0.14-17kmf2g0.mjs +1 -0
  286. package/dist/chunks/environments-1.0.14-r2dd7zte.mjs +1 -0
  287. package/dist/chunks/errors-1.0.14-zt9a9ar1.mjs +1 -0
  288. package/dist/chunks/exampleCommands-1.0.14-88939k92.mjs +1 -0
  289. package/dist/chunks/execFileNoThrow-1.0.14-ved7dedv.mjs +1 -0
  290. package/dist/chunks/exit-1.0.14-ja0e3xan.mjs +1 -0
  291. package/dist/chunks/explorer-1.0.14-ae3278vr.mjs +1 -0
  292. package/dist/chunks/export-1.0.14-f5xsdta1.mjs +2 -0
  293. package/dist/chunks/extra-usage-1.0.14-jzhsm8m8.mjs +1 -0
  294. package/dist/chunks/extra-usage-noninteractive-1.0.14-kgecf4s4.mjs +1 -0
  295. package/dist/chunks/fast-1.0.14-2z2mjcs0.mjs +1 -0
  296. package/dist/chunks/feedback-1.0.14-va4ywxx6.mjs +14 -0
  297. package/dist/chunks/firstPartyEventLogger-1.0.14-4k32daar.mjs +1 -0
  298. package/dist/chunks/git-1.0.14-2j16rmzn.mjs +1 -0
  299. package/dist/chunks/githubModelsCredentials-1.0.14-yvj22nyn.mjs +1 -0
  300. package/dist/chunks/goal-1.0.14-k13hsq40.mjs +4 -0
  301. package/dist/chunks/grove-1.0.14-3372rcrv.mjs +1 -0
  302. package/dist/chunks/growthbook-1.0.14-0c5sw654.mjs +1 -0
  303. package/dist/chunks/headless-1.0.14-qf20wd4a.mjs +2 -0
  304. package/dist/chunks/heapdump-1.0.14-8q5mzb23.mjs +6 -0
  305. package/dist/chunks/help-1.0.14-fv0nfdpx.mjs +1 -0
  306. package/dist/chunks/hookChains-1.0.14-w7scty4f.mjs +3 -0
  307. package/dist/chunks/hooks-1.0.14-8dvj8g9e.mjs +1 -0
  308. package/dist/chunks/hooks-1.0.14-nferkpmp.mjs +79 -0
  309. package/dist/chunks/ide-1.0.14-bd6ym0zg.mjs +3 -0
  310. package/dist/chunks/image-processor-napi-1.0.14-cdgsapbd.mjs +1 -0
  311. package/dist/chunks/inboundAttachments-1.0.14-gqjk256b.mjs +1 -0
  312. package/dist/chunks/index-1.0.14-0gktvbaw.mjs +30 -0
  313. package/dist/chunks/index-1.0.14-2xbsva4c.mjs +1 -0
  314. package/dist/chunks/index-1.0.14-4jb8g44p.mjs +1 -0
  315. package/dist/chunks/index-1.0.14-4tsn7fzy.mjs +1 -0
  316. package/dist/chunks/index-1.0.14-76ed957m.mjs +1 -0
  317. package/dist/chunks/index-1.0.14-95wh21ee.mjs +1 -0
  318. package/dist/chunks/index-1.0.14-9mv1tydz.mjs +1 -0
  319. package/dist/chunks/index-1.0.14-bb2w8nxz.mjs +1 -0
  320. package/dist/chunks/index-1.0.14-bphvske3.mjs +1 -0
  321. package/dist/chunks/index-1.0.14-e9qzyyvx.mjs +1 -0
  322. package/dist/chunks/index-1.0.14-fr24eeaa.mjs +1 -0
  323. package/dist/chunks/index-1.0.14-hmqgg1qn.mjs +1 -0
  324. package/dist/chunks/index-1.0.14-mt1a6s7m.mjs +5 -0
  325. package/dist/chunks/index-1.0.14-njtcq7xt.mjs +17 -0
  326. package/dist/chunks/index-1.0.14-pfztmgj3.mjs +2 -0
  327. package/dist/chunks/index-1.0.14-pjvqwa0j.mjs +1 -0
  328. package/dist/chunks/index-1.0.14-q3b475mg.mjs +1 -0
  329. package/dist/chunks/index-1.0.14-qafjae7s.mjs +1 -0
  330. package/dist/chunks/index-1.0.14-t8y5yaxp.mjs +9 -0
  331. package/dist/chunks/index-1.0.14-tqttfghe.mjs +1 -0
  332. package/dist/chunks/index-1.0.14-xfx695vz.mjs +9 -0
  333. package/dist/chunks/index-1.0.14-xn2m6vyc.mjs +1 -0
  334. package/dist/chunks/index-1.0.14-y355w9gp.mjs +2 -0
  335. package/dist/chunks/init-1.0.14-1efcnp5z.mjs +1 -0
  336. package/dist/chunks/initReplBridge-1.0.14-kv23c7gd.mjs +1 -0
  337. package/dist/chunks/ink-1.0.14-9k6231ba.mjs +1 -0
  338. package/dist/chunks/insights-1.0.14-4ha85mj0.mjs +870 -0
  339. package/dist/chunks/install-1.0.14-nwvqnt31.mjs +1 -0
  340. package/dist/chunks/install-github-app-1.0.14-8acvsf50.mjs +149 -0
  341. package/dist/chunks/install-slack-app-1.0.14-fnsb39mp.mjs +1 -0
  342. package/dist/chunks/instrumentation-1.0.14-mtgqqxya.mjs +1 -0
  343. package/dist/chunks/interactiveHelpers-1.0.14-2wrq07e2.mjs +1 -0
  344. package/dist/chunks/keybindings-1.0.14-129wqq67.mjs +2 -0
  345. package/dist/chunks/knowledge-1.0.14-c3rf5j58.mjs +2 -0
  346. package/dist/chunks/latestVersionCache-1.0.14-jvj37pje.mjs +1 -0
  347. package/dist/chunks/loadAgentsDir-1.0.14-xvrmxww0.mjs +1 -0
  348. package/dist/chunks/loadPluginHooks-1.0.14-8940ydgw.mjs +1 -0
  349. package/dist/chunks/loadPluginHooks-1.0.14-k3qzacrz.mjs +1 -0
  350. package/dist/chunks/log-1.0.14-he8jphq3.mjs +1 -0
  351. package/dist/chunks/main-1.0.14-dh291att.mjs +1 -0
  352. package/dist/chunks/managedEnv-1.0.14-r390r05h.mjs +1 -0
  353. package/dist/chunks/mcp-1.0.14-dbp8b6yk.mjs +1 -0
  354. package/dist/chunks/mcp-1.0.14-nfyhp5dt.mjs +17 -0
  355. package/dist/chunks/mcp-1.0.14-qhvm23d4.mjs +4 -0
  356. package/dist/chunks/mcpb-1.0.14-g7pvytac.mjs +1 -0
  357. package/dist/chunks/memory-1.0.14-arny0fef.mjs +72 -0
  358. package/dist/chunks/model-1.0.14-ek671gpz.mjs +1 -0
  359. package/dist/chunks/model-1.0.14-xdb536jv.mjs +2 -0
  360. package/dist/chunks/node-1.0.14-8awswbzx.mjs +12 -0
  361. package/dist/chunks/oauth-1.0.14-yr32rz1f.mjs +1 -0
  362. package/dist/chunks/openaiShim-1.0.14-gx1b20d6.mjs +14 -0
  363. package/dist/chunks/output-style-1.0.14-63dfj4v0.mjs +1 -0
  364. package/dist/chunks/package-2VNCXFNY-1.0.14-18jyfqq1.mjs +1 -0
  365. package/dist/chunks/parseConnectUrl-1.0.14-hb82n0gc.mjs +1 -0
  366. package/dist/chunks/parser-1.0.14-zn3zyc77.mjs +1 -0
  367. package/dist/chunks/passes-1.0.14-bp7y0ga8.mjs +1 -0
  368. package/dist/chunks/permissions-1.0.14-7036mxvb.mjs +3 -0
  369. package/dist/chunks/permissions-1.0.14-z5gr66mc.mjs +1 -0
  370. package/dist/chunks/plan-1.0.14-xrx5wce4.mjs +1 -0
  371. package/dist/chunks/plist-1.0.14-6yv7va29.mjs +1 -0
  372. package/dist/chunks/plugin-1.0.14-mmkj7mtk.mjs +29 -0
  373. package/dist/chunks/pluginStartupCheck-1.0.14-1qed1emq.mjs +1 -0
  374. package/dist/chunks/plugins-1.0.14-5aje195c.mjs +9 -0
  375. package/dist/chunks/preActionHook-1.0.14-1cwrs307.mjs +2 -0
  376. package/dist/chunks/print-1.0.14-4f5y78jp.mjs +57 -0
  377. package/dist/chunks/privacy-settings-1.0.14-yzmdw47w.mjs +1 -0
  378. package/dist/chunks/process-1.0.14-7trwqmx6.mjs +1 -0
  379. package/dist/chunks/processBashCommand-1.0.14-yn16nwvc.mjs +1 -0
  380. package/dist/chunks/processSlashCommand-1.0.14-b1fm20sp.mjs +9 -0
  381. package/dist/chunks/prompt-1.0.14-0cnzws1z.mjs +1 -0
  382. package/dist/chunks/prompt-1.0.14-7anakmng.mjs +1 -0
  383. package/dist/chunks/prompts-1.0.14-qmww8jvd.mjs +1 -0
  384. package/dist/chunks/protocolHandler-1.0.14-4pff7d61.mjs +13 -0
  385. package/dist/chunks/provider-1.0.14-jkjnss6d.mjs +2 -0
  386. package/dist/chunks/providerProfiles-1.0.14-9g8b8pp7.mjs +1 -0
  387. package/dist/chunks/providerValidation-1.0.14-p1fpm7fn.mjs +6 -0
  388. package/dist/chunks/rate-limit-options-1.0.14-bhz1z031.mjs +1 -0
  389. package/dist/chunks/registerSubcommands-1.0.14-4caz1dxv.mjs +34 -0
  390. package/dist/chunks/registry-1.0.14-wgdd0gj4.mjs +1 -0
  391. package/dist/chunks/release-notes-1.0.14-z4zrd1et.mjs +5 -0
  392. package/dist/chunks/reload-plugins-1.0.14-wk9ec32x.mjs +2 -0
  393. package/dist/chunks/remote-env-1.0.14-k0dbz57q.mjs +1 -0
  394. package/dist/chunks/remoteBridgeCore-1.0.14-8r8xr5x5.mjs +1 -0
  395. package/dist/chunks/remoteSession-1.0.14-gsr8k9bv.mjs +1 -0
  396. package/dist/chunks/rename-1.0.14-pv4tpegh.mjs +1 -0
  397. package/dist/chunks/replBridgeHandle-1.0.14-8rwsfzb9.mjs +1 -0
  398. package/dist/chunks/replLauncher-1.0.14-kmxxcw37.mjs +1 -0
  399. package/dist/chunks/resume-1.0.14-gkb9015m.mjs +2 -0
  400. package/dist/chunks/rewind-1.0.14-fc3n2baf.mjs +1 -0
  401. package/dist/chunks/rootOptions-1.0.14-qv4qteet.mjs +1 -0
  402. package/dist/chunks/runWorkflowHeadless-1.0.14-5bp85pep.mjs +10 -0
  403. package/dist/chunks/sandbox-adapter-1.0.14-qgf6y50z.mjs +1 -0
  404. package/dist/chunks/sandbox-toggle-1.0.14-0wv4aywf.mjs +1 -0
  405. package/dist/chunks/session-1.0.14-1ckwnpxq.mjs +2 -0
  406. package/dist/chunks/sessionDiscovery-1.0.14-dv7ya6k8.mjs +1 -0
  407. package/dist/chunks/sessionFileAccessHooks-1.0.14-zcgj9ema.mjs +1 -0
  408. package/dist/chunks/sessionStorage-1.0.14-5tq43xzg.mjs +1 -0
  409. package/dist/chunks/settings-1.0.14-mtmb6qxs.mjs +1 -0
  410. package/dist/chunks/setup-1.0.14-qtq4ak7y.mjs +5 -0
  411. package/dist/chunks/sinks-1.0.14-7xzz4wz8.mjs +1 -0
  412. package/dist/chunks/skills-1.0.14-5d3kh6pf.mjs +1 -0
  413. package/dist/chunks/startupProfiler-1.0.14-2jhv1vxz.mjs +1 -0
  414. package/dist/chunks/startupUpdateCheck-1.0.14-zdan85zj.mjs +1 -0
  415. package/dist/chunks/state-1.0.14-8znfttb5.mjs +1 -0
  416. package/dist/chunks/stats-1.0.14-xam611xt.mjs +6 -0
  417. package/dist/chunks/status-1.0.14-68dgf0ne.mjs +1 -0
  418. package/dist/chunks/stickers-1.0.14-rc2n423z.mjs +1 -0
  419. package/dist/chunks/subprocessEnv-1.0.14-4kv8wbzd.mjs +1 -0
  420. package/dist/chunks/tasks-1.0.14-s5s4e0t3.mjs +1 -0
  421. package/dist/chunks/teamHelpers-1.0.14-1hcw931t.mjs +1 -0
  422. package/dist/chunks/teammateModeSnapshot-1.0.14-mjzq0rsa.mjs +1 -0
  423. package/dist/chunks/teleport-1.0.14-w1512p66.mjs +1 -0
  424. package/dist/chunks/terminalSetup-1.0.14-s4b4y9r3.mjs +1 -0
  425. package/dist/chunks/theme-1.0.14-e9d1ap8d.mjs +1 -0
  426. package/dist/chunks/thinkback-1.0.14-5m6b79h4.mjs +1 -0
  427. package/dist/chunks/thinkback-play-1.0.14-tgw5nk8p.mjs +1 -0
  428. package/dist/chunks/toolPool-1.0.14-7jvk5109.mjs +1 -0
  429. package/dist/chunks/toolSearch-1.0.14-jzsffb3f.mjs +1 -0
  430. package/dist/chunks/tools-1.0.14-04f8v0x1.mjs +1 -0
  431. package/dist/chunks/trustedDevice-1.0.14-y3ewcxzd.mjs +1 -0
  432. package/dist/chunks/turndown.cjs-1.0.14-4refdt7a.mjs +69 -0
  433. package/dist/chunks/types-1.0.14-6qqdzh50.mjs +1 -0
  434. package/dist/chunks/ultrareviewCommand-1.0.14-t1td5gnq.mjs +4 -0
  435. package/dist/chunks/update-1.0.14-dc0g2ak6.mjs +88 -0
  436. package/dist/chunks/upgrade-1.0.14-cya8ar2w.mjs +1 -0
  437. package/dist/chunks/upload-1.0.14-tx3ytzwx.mjs +7 -0
  438. package/dist/chunks/upstreamproxy-1.0.14-9w4fsavp.mjs +14 -0
  439. package/dist/chunks/url-handler-napi-1.0.14-w6s4yfb9.mjs +1 -0
  440. package/dist/chunks/usage-1.0.14-19mk4yn4.mjs +1 -0
  441. package/dist/chunks/util-1.0.14-gpjz2670.mjs +1 -0
  442. package/dist/chunks/utils-1.0.14-c4k982gy.mjs +1 -0
  443. package/dist/chunks/vim-1.0.14-90q3x97q.mjs +1 -0
  444. package/dist/chunks/watchLoop-1.0.14-9kg2qyp8.mjs +13 -0
  445. package/dist/chunks/watcher-1.0.14-0330jfrb.mjs +1 -0
  446. package/dist/chunks/wiki-1.0.14-pnbbj6wm.mjs +132 -0
  447. package/dist/chunks/workflows-1.0.14-fvdvr8sa.mjs +1 -0
  448. package/dist/chunks/worktree-1.0.14-ym8ap3k8.mjs +1 -0
  449. package/dist/chunks/worktreeModeEnabled-1.0.14-05552egx.mjs +1 -0
  450. package/dist/chunks/wrapper-1.0.14-k4kthmxq.mjs +7 -0
  451. package/dist/cli.mjs +2 -2
  452. package/package.json +9 -9
  453. package/dist/chunks/AgentTool-1.0.13-6b06g673.mjs +0 -1
  454. package/dist/chunks/App-1.0.13-ka050dp3.mjs +0 -1
  455. package/dist/chunks/ApproveApiKey-1.0.13-f6p2r5kq.mjs +0 -1
  456. package/dist/chunks/AssistantSessionChooser-1.0.13-ghffkhts.mjs +0 -1
  457. package/dist/chunks/AutoModeOptInDialog-1.0.13-5b244jsj.mjs +0 -1
  458. package/dist/chunks/BypassPermissionsModeDialog-1.0.13-eqq7qkpy.mjs +0 -1
  459. package/dist/chunks/ClaudeMdExternalIncludesDialog-1.0.13-5279tcga.mjs +0 -1
  460. package/dist/chunks/ConsoleOAuthFlow-1.0.13-gwgar56n.mjs +0 -1
  461. package/dist/chunks/DiffDialog-1.0.13-2jaehz54.mjs +0 -7
  462. package/dist/chunks/Doctor-1.0.13-t887gwxz.mjs +0 -1
  463. package/dist/chunks/ExplorerDialog-1.0.13-85gxb6k8.mjs +0 -6
  464. package/dist/chunks/Grove-1.0.13-hdw88war.mjs +0 -1
  465. package/dist/chunks/ITermBackend-1.0.13-m0d78jq0.mjs +0 -1
  466. package/dist/chunks/InvalidConfigDialog-1.0.13-4z7zd6n8.mjs +0 -1
  467. package/dist/chunks/InvalidSettingsDialog-1.0.13-6xc5sc8a.mjs +0 -1
  468. package/dist/chunks/MigrationDialog-1.0.13-hhrgw5xc.mjs +0 -1
  469. package/dist/chunks/Onboarding-1.0.13-byv83gyv.mjs +0 -1
  470. package/dist/chunks/ProviderManager-1.0.13-gt6ntzcv.mjs +0 -1
  471. package/dist/chunks/REPL-1.0.13-wjxj6xgk.mjs +0 -1
  472. package/dist/chunks/ResumeConversation-1.0.13-tx1ek47f.mjs +0 -1
  473. package/dist/chunks/SnapshotUpdateDialog-1.0.13-4j2e4s72.mjs +0 -1
  474. package/dist/chunks/TeleportProgress-1.0.13-1rpjcxph.mjs +0 -1
  475. package/dist/chunks/TeleportRepoMismatchDialog-1.0.13-5fgav722.mjs +0 -1
  476. package/dist/chunks/TeleportResumeWrapper-1.0.13-gy4sr83e.mjs +0 -1
  477. package/dist/chunks/TmuxBackend-1.0.13-t98nfbxk.mjs +0 -9
  478. package/dist/chunks/ToolSearchTool-1.0.13-n5wg1rcd.mjs +0 -1
  479. package/dist/chunks/TrustDialog-1.0.13-xdkp37x2.mjs +0 -1
  480. package/dist/chunks/activeProvider-1.0.13-v0kphhga.mjs +0 -1
  481. package/dist/chunks/add-dir-1.0.13-7v5rg7km.mjs +0 -1
  482. package/dist/chunks/agentTypes-1.0.13-k5wckd5y.mjs +0 -1
  483. package/dist/chunks/agents-1.0.13-ngbk16a3.mjs +0 -3
  484. package/dist/chunks/agents-1.0.13-tcqasxmv.mjs +0 -110
  485. package/dist/chunks/api-1.0.13-bvwz0wzt.mjs +0 -1
  486. package/dist/chunks/asciicast-1.0.13-j8ad859r.mjs +0 -1
  487. package/dist/chunks/assistant-1.0.13-91499j0p.mjs +0 -1
  488. package/dist/chunks/auth-1.0.13-p0qrnz2b.mjs +0 -1
  489. package/dist/chunks/auth-1.0.13-s1vedchg.mjs +0 -1
  490. package/dist/chunks/autoMode-1.0.13-61pvskhh.mjs +0 -48
  491. package/dist/chunks/autoUpdater-1.0.13-fnpzj0bw.mjs +0 -1
  492. package/dist/chunks/backgroundHousekeeping-1.0.13-92x690ww.mjs +0 -1
  493. package/dist/chunks/branch-1.0.13-encr40nd.mjs +0 -4
  494. package/dist/chunks/bridge-1.0.13-xfcd961b.mjs +0 -2
  495. package/dist/chunks/bridgeConfig-1.0.13-m2jyf3zk.mjs +0 -1
  496. package/dist/chunks/bridgeEnabled-1.0.13-2chm7y0g.mjs +0 -1
  497. package/dist/chunks/bridgeMain-1.0.13-d64q1ebx.mjs +0 -88
  498. package/dist/chunks/bridgePointer-1.0.13-npck2cd4.mjs +0 -1
  499. package/dist/chunks/btw-1.0.13-55x872ns.mjs +0 -1
  500. package/dist/chunks/buddy-1.0.13-9dmgywzm.mjs +0 -3
  501. package/dist/chunks/cacache-1.0.13-3c5hrrs4.mjs +0 -1
  502. package/dist/chunks/cache-probe-1.0.13-n8g8y16c.mjs +0 -21
  503. package/dist/chunks/cacheStats-1.0.13-2kyncvct.mjs +0 -4
  504. package/dist/chunks/caches-1.0.13-md3zkabd.mjs +0 -1
  505. package/dist/chunks/claudeDesktop-1.0.13-crk87hee.mjs +0 -1
  506. package/dist/chunks/claudemd-1.0.13-y42xe571.mjs +0 -1
  507. package/dist/chunks/clear-1.0.13-g8a3zjew.mjs +0 -1
  508. package/dist/chunks/clearTerminal-1.0.13-4k4snh0r.mjs +0 -1
  509. package/dist/chunks/cli-1.0.13-01n6gr4q.mjs +0 -2
  510. package/dist/chunks/cli-1.0.13-0357cnwe.mjs +0 -2
  511. package/dist/chunks/cli-1.0.13-14c24kge.mjs +0 -2
  512. package/dist/chunks/cli-1.0.13-19k4k5jx.mjs +0 -2
  513. package/dist/chunks/cli-1.0.13-1dk8e4ny.mjs +0 -3
  514. package/dist/chunks/cli-1.0.13-1hcywhe5.mjs +0 -2
  515. package/dist/chunks/cli-1.0.13-1hdbaf71.mjs +0 -3
  516. package/dist/chunks/cli-1.0.13-1qbvvc2e.mjs +0 -4
  517. package/dist/chunks/cli-1.0.13-23ev2ept.mjs +0 -45
  518. package/dist/chunks/cli-1.0.13-29x94tf7.mjs +0 -2
  519. package/dist/chunks/cli-1.0.13-2x789qav.mjs +0 -2
  520. package/dist/chunks/cli-1.0.13-2xpprn71.mjs +0 -1
  521. package/dist/chunks/cli-1.0.13-2z8q1mtz.mjs +0 -3
  522. package/dist/chunks/cli-1.0.13-36yeyd1r.mjs +0 -18
  523. package/dist/chunks/cli-1.0.13-3767t4yj.mjs +0 -4
  524. package/dist/chunks/cli-1.0.13-3c13b00m.mjs +0 -2
  525. package/dist/chunks/cli-1.0.13-3dmmr756.mjs +0 -2
  526. package/dist/chunks/cli-1.0.13-3essvqs1.mjs +0 -2
  527. package/dist/chunks/cli-1.0.13-3f0zqjp8.mjs +0 -2
  528. package/dist/chunks/cli-1.0.13-3fs84evm.mjs +0 -2
  529. package/dist/chunks/cli-1.0.13-3pspajgg.mjs +0 -15
  530. package/dist/chunks/cli-1.0.13-3rqmqts3.mjs +0 -2
  531. package/dist/chunks/cli-1.0.13-449f1p6g.mjs +0 -2
  532. package/dist/chunks/cli-1.0.13-466jbd1q.mjs +0 -2
  533. package/dist/chunks/cli-1.0.13-4dp5a597.mjs +0 -6
  534. package/dist/chunks/cli-1.0.13-4x3mr6wk.mjs +0 -2
  535. package/dist/chunks/cli-1.0.13-57993qn6.mjs +0 -2
  536. package/dist/chunks/cli-1.0.13-57ez593b.mjs +0 -3
  537. package/dist/chunks/cli-1.0.13-5g7rhqvq.mjs +0 -4
  538. package/dist/chunks/cli-1.0.13-5keyjg3e.mjs +0 -58
  539. package/dist/chunks/cli-1.0.13-5m2br5vf.mjs +0 -2
  540. package/dist/chunks/cli-1.0.13-5sc2h2hm.mjs +0 -2
  541. package/dist/chunks/cli-1.0.13-5sq4jbf1.mjs +0 -2
  542. package/dist/chunks/cli-1.0.13-696y87my.mjs +0 -18
  543. package/dist/chunks/cli-1.0.13-6b6kn6sd.mjs +0 -2
  544. package/dist/chunks/cli-1.0.13-6thbqr6g.mjs +0 -2
  545. package/dist/chunks/cli-1.0.13-6vb140br.mjs +0 -25
  546. package/dist/chunks/cli-1.0.13-6w1rqgrf.mjs +0 -2
  547. package/dist/chunks/cli-1.0.13-6xc8qzyr.mjs +0 -2
  548. package/dist/chunks/cli-1.0.13-6xkw8tq6.mjs +0 -2
  549. package/dist/chunks/cli-1.0.13-7kg0qv18.mjs +0 -2
  550. package/dist/chunks/cli-1.0.13-7nmrp6gh.mjs +0 -2
  551. package/dist/chunks/cli-1.0.13-7rg014zx.mjs +0 -5
  552. package/dist/chunks/cli-1.0.13-7xfra4by.mjs +0 -2
  553. package/dist/chunks/cli-1.0.13-80pk1w5c.mjs +0 -2
  554. package/dist/chunks/cli-1.0.13-81s2z4sy.mjs +0 -2
  555. package/dist/chunks/cli-1.0.13-83vckpyr.mjs +0 -6
  556. package/dist/chunks/cli-1.0.13-8s33s84f.mjs +0 -2
  557. package/dist/chunks/cli-1.0.13-93twxc7q.mjs +0 -2
  558. package/dist/chunks/cli-1.0.13-98a94f4b.mjs +0 -2
  559. package/dist/chunks/cli-1.0.13-9ax4vv5d.mjs +0 -2
  560. package/dist/chunks/cli-1.0.13-9bh8f53y.mjs +0 -9
  561. package/dist/chunks/cli-1.0.13-9t0q538w.mjs +0 -25
  562. package/dist/chunks/cli-1.0.13-a2j673qk.mjs +0 -2
  563. package/dist/chunks/cli-1.0.13-a5641ktm.mjs +0 -2
  564. package/dist/chunks/cli-1.0.13-a77ea1ga.mjs +0 -2
  565. package/dist/chunks/cli-1.0.13-a8t9066b.mjs +0 -2
  566. package/dist/chunks/cli-1.0.13-afdk25h0.mjs +0 -2
  567. package/dist/chunks/cli-1.0.13-avxss6zg.mjs +0 -9
  568. package/dist/chunks/cli-1.0.13-bj2neb84.mjs +0 -2
  569. package/dist/chunks/cli-1.0.13-bs0esgv1.mjs +0 -2
  570. package/dist/chunks/cli-1.0.13-byhjhrrg.mjs +0 -15
  571. package/dist/chunks/cli-1.0.13-cm3q208z.mjs +0 -2
  572. package/dist/chunks/cli-1.0.13-cwce8b7b.mjs +0 -34
  573. package/dist/chunks/cli-1.0.13-d016ffc7.mjs +0 -3
  574. package/dist/chunks/cli-1.0.13-d4zr1yqd.mjs +0 -2
  575. package/dist/chunks/cli-1.0.13-d7kr7nkk.mjs +0 -2
  576. package/dist/chunks/cli-1.0.13-dg21ms7f.mjs +0 -2
  577. package/dist/chunks/cli-1.0.13-dwp60tja.mjs +0 -2
  578. package/dist/chunks/cli-1.0.13-e19bb64d.mjs +0 -4
  579. package/dist/chunks/cli-1.0.13-e1m0dx6a.mjs +0 -2
  580. package/dist/chunks/cli-1.0.13-e3ca1xwv.mjs +0 -2
  581. package/dist/chunks/cli-1.0.13-e464ab16.mjs +0 -2
  582. package/dist/chunks/cli-1.0.13-e8p0r9r9.mjs +0 -2
  583. package/dist/chunks/cli-1.0.13-e9q9245e.mjs +0 -2
  584. package/dist/chunks/cli-1.0.13-ecv0stcf.mjs +0 -2
  585. package/dist/chunks/cli-1.0.13-ey9smtb0.mjs +0 -3
  586. package/dist/chunks/cli-1.0.13-f38bh25k.mjs +0 -12
  587. package/dist/chunks/cli-1.0.13-f4dfekwp.mjs +0 -133
  588. package/dist/chunks/cli-1.0.13-fb695nhr.mjs +0 -67
  589. package/dist/chunks/cli-1.0.13-fjwhbyeh.mjs +0 -2
  590. package/dist/chunks/cli-1.0.13-fpwws3z2.mjs +0 -2
  591. package/dist/chunks/cli-1.0.13-frs40s6h.mjs +0 -2
  592. package/dist/chunks/cli-1.0.13-fsmjqwpj.mjs +0 -2
  593. package/dist/chunks/cli-1.0.13-fta82vnx.mjs +0 -2
  594. package/dist/chunks/cli-1.0.13-g1rr0zfh.mjs +0 -8
  595. package/dist/chunks/cli-1.0.13-g7daabde.mjs +0 -3
  596. package/dist/chunks/cli-1.0.13-gd9e7w43.mjs +0 -2
  597. package/dist/chunks/cli-1.0.13-gsz0cygn.mjs +0 -2
  598. package/dist/chunks/cli-1.0.13-h5mwwv8w.mjs +0 -16
  599. package/dist/chunks/cli-1.0.13-hbcgx6rs.mjs +0 -2
  600. package/dist/chunks/cli-1.0.13-j0m03dqz.mjs +0 -39
  601. package/dist/chunks/cli-1.0.13-j3gww2v8.mjs +0 -2
  602. package/dist/chunks/cli-1.0.13-jdxaky02.mjs +0 -12
  603. package/dist/chunks/cli-1.0.13-jkahzkac.mjs +0 -12
  604. package/dist/chunks/cli-1.0.13-jrjz42t8.mjs +0 -2
  605. package/dist/chunks/cli-1.0.13-jsezewz5.mjs +0 -2
  606. package/dist/chunks/cli-1.0.13-jxe94sbj.mjs +0 -2
  607. package/dist/chunks/cli-1.0.13-k4znag0a.mjs +0 -2
  608. package/dist/chunks/cli-1.0.13-k71bq854.mjs +0 -2
  609. package/dist/chunks/cli-1.0.13-k8vrp1kw.mjs +0 -2
  610. package/dist/chunks/cli-1.0.13-kc1q3k9n.mjs +0 -2
  611. package/dist/chunks/cli-1.0.13-kg25kqz0.mjs +0 -12
  612. package/dist/chunks/cli-1.0.13-kmmkpfh0.mjs +0 -2
  613. package/dist/chunks/cli-1.0.13-knb8ctbq.mjs +0 -3
  614. package/dist/chunks/cli-1.0.13-kpqaz90n.mjs +0 -7
  615. package/dist/chunks/cli-1.0.13-kq0mvqax.mjs +0 -2
  616. package/dist/chunks/cli-1.0.13-kr3d94dn.mjs +0 -5495
  617. package/dist/chunks/cli-1.0.13-m5hkpjvs.mjs +0 -2
  618. package/dist/chunks/cli-1.0.13-mazxedqg.mjs +0 -4
  619. package/dist/chunks/cli-1.0.13-mtnc53tx.mjs +0 -2
  620. package/dist/chunks/cli-1.0.13-mv57kk3c.mjs +0 -59
  621. package/dist/chunks/cli-1.0.13-n4fsyme7.mjs +0 -2
  622. package/dist/chunks/cli-1.0.13-ndthc14d.mjs +0 -2
  623. package/dist/chunks/cli-1.0.13-nqw7f2pt.mjs +0 -2
  624. package/dist/chunks/cli-1.0.13-ns8m0h8r.mjs +0 -15
  625. package/dist/chunks/cli-1.0.13-p1nsb8ay.mjs +0 -202
  626. package/dist/chunks/cli-1.0.13-p43t5py0.mjs +0 -2
  627. package/dist/chunks/cli-1.0.13-p7b51har.mjs +0 -2
  628. package/dist/chunks/cli-1.0.13-pajjrc2x.mjs +0 -2
  629. package/dist/chunks/cli-1.0.13-pf0ztxpx.mjs +0 -6
  630. package/dist/chunks/cli-1.0.13-ppdtae6a.mjs +0 -2
  631. package/dist/chunks/cli-1.0.13-pwfpt641.mjs +0 -2
  632. package/dist/chunks/cli-1.0.13-q03bdpb3.mjs +0 -17
  633. package/dist/chunks/cli-1.0.13-q40za40w.mjs +0 -50
  634. package/dist/chunks/cli-1.0.13-qpnp3w6h.mjs +0 -2
  635. package/dist/chunks/cli-1.0.13-qx079tft.mjs +0 -2
  636. package/dist/chunks/cli-1.0.13-qxebhem2.mjs +0 -2
  637. package/dist/chunks/cli-1.0.13-r6v8d7e7.mjs +0 -2
  638. package/dist/chunks/cli-1.0.13-r9nmkthw.mjs +0 -2
  639. package/dist/chunks/cli-1.0.13-rcrh6wfx.mjs +0 -4
  640. package/dist/chunks/cli-1.0.13-rgk2vrkz.mjs +0 -2
  641. package/dist/chunks/cli-1.0.13-rhptvh17.mjs +0 -2
  642. package/dist/chunks/cli-1.0.13-rxd329nn.mjs +0 -24
  643. package/dist/chunks/cli-1.0.13-ry9nsg8a.mjs +0 -2
  644. package/dist/chunks/cli-1.0.13-ryajgbr3.mjs +0 -2
  645. package/dist/chunks/cli-1.0.13-s15merj9.mjs +0 -2
  646. package/dist/chunks/cli-1.0.13-s16wgevn.mjs +0 -2
  647. package/dist/chunks/cli-1.0.13-s2czjfzp.mjs +0 -2
  648. package/dist/chunks/cli-1.0.13-s2sd6xfc.mjs +0 -24
  649. package/dist/chunks/cli-1.0.13-s5bfzdbk.mjs +0 -2
  650. package/dist/chunks/cli-1.0.13-sg6bkxg3.mjs +0 -20
  651. package/dist/chunks/cli-1.0.13-shrh1g4z.mjs +0 -2
  652. package/dist/chunks/cli-1.0.13-sj8rg9wk.mjs +0 -24
  653. package/dist/chunks/cli-1.0.13-smrxt9dh.mjs +0 -2
  654. package/dist/chunks/cli-1.0.13-smtbj9fm.mjs +0 -2
  655. package/dist/chunks/cli-1.0.13-sy93t0xx.mjs +0 -2
  656. package/dist/chunks/cli-1.0.13-t1z10ay5.mjs +0 -2
  657. package/dist/chunks/cli-1.0.13-t9wrrtrh.mjs +0 -2
  658. package/dist/chunks/cli-1.0.13-tfd5mr15.mjs +0 -17
  659. package/dist/chunks/cli-1.0.13-thxvtvt4.mjs +0 -2
  660. package/dist/chunks/cli-1.0.13-tmfvcmn3.mjs +0 -2
  661. package/dist/chunks/cli-1.0.13-tnq7z8s5.mjs +0 -3
  662. package/dist/chunks/cli-1.0.13-tp2w17kc.mjs +0 -2
  663. package/dist/chunks/cli-1.0.13-tq5m4f65.mjs +0 -2
  664. package/dist/chunks/cli-1.0.13-tr0fe3hn.mjs +0 -2
  665. package/dist/chunks/cli-1.0.13-trkevtw9.mjs +0 -2
  666. package/dist/chunks/cli-1.0.13-tyhtztew.mjs +0 -2
  667. package/dist/chunks/cli-1.0.13-v1tn9wpw.mjs +0 -21
  668. package/dist/chunks/cli-1.0.13-v38n7n4p.mjs +0 -2
  669. package/dist/chunks/cli-1.0.13-v4annnm3.mjs +0 -2
  670. package/dist/chunks/cli-1.0.13-v5gjxk3n.mjs +0 -4
  671. package/dist/chunks/cli-1.0.13-v7eb8n71.mjs +0 -133
  672. package/dist/chunks/cli-1.0.13-v8tce7qz.mjs +0 -2
  673. package/dist/chunks/cli-1.0.13-vb85p8we.mjs +0 -2
  674. package/dist/chunks/cli-1.0.13-vbby2x4m.mjs +0 -2
  675. package/dist/chunks/cli-1.0.13-vd01re4x.mjs +0 -2
  676. package/dist/chunks/cli-1.0.13-vp1h8f42.mjs +0 -2
  677. package/dist/chunks/cli-1.0.13-vs4d56js.mjs +0 -2
  678. package/dist/chunks/cli-1.0.13-vv5mtvhr.mjs +0 -2
  679. package/dist/chunks/cli-1.0.13-vvtdrd6j.mjs +0 -5
  680. package/dist/chunks/cli-1.0.13-vwmq6bde.mjs +0 -2
  681. package/dist/chunks/cli-1.0.13-w5jash5n.mjs +0 -2
  682. package/dist/chunks/cli-1.0.13-w7jh58qt.mjs +0 -2
  683. package/dist/chunks/cli-1.0.13-w8wwn19j.mjs +0 -2
  684. package/dist/chunks/cli-1.0.13-wmc6ft2f.mjs +0 -6
  685. package/dist/chunks/cli-1.0.13-wrcxv50n.mjs +0 -2
  686. package/dist/chunks/cli-1.0.13-wsk4823v.mjs +0 -2
  687. package/dist/chunks/cli-1.0.13-x4xwa6y3.mjs +0 -4
  688. package/dist/chunks/cli-1.0.13-x8j9z15q.mjs +0 -3
  689. package/dist/chunks/cli-1.0.13-xajnmhak.mjs +0 -2
  690. package/dist/chunks/cli-1.0.13-xg86t5j7.mjs +0 -2
  691. package/dist/chunks/cli-1.0.13-xpc2m6vc.mjs +0 -2
  692. package/dist/chunks/cli-1.0.13-xr55511t.mjs +0 -2
  693. package/dist/chunks/cli-1.0.13-xsvz53d6.mjs +0 -42
  694. package/dist/chunks/cli-1.0.13-y1kzayxj.mjs +0 -18
  695. package/dist/chunks/cli-1.0.13-y20sjx5k.mjs +0 -6
  696. package/dist/chunks/cli-1.0.13-y6y32j2s.mjs +0 -2
  697. package/dist/chunks/cli-1.0.13-y74xv34r.mjs +0 -4
  698. package/dist/chunks/cli-1.0.13-yb1smx77.mjs +0 -2
  699. package/dist/chunks/cli-1.0.13-ymvtrfgn.mjs +0 -4
  700. package/dist/chunks/cli-1.0.13-yq7961x3.mjs +0 -4
  701. package/dist/chunks/cli-1.0.13-yr590qbp.mjs +0 -3
  702. package/dist/chunks/cli-1.0.13-z72v7rwr.mjs +0 -2
  703. package/dist/chunks/cli-1.0.13-z8vs7cc1.mjs +0 -2
  704. package/dist/chunks/cli-1.0.13-zgdatr3s.mjs +0 -3
  705. package/dist/chunks/cli-1.0.13-zmyb9smk.mjs +0 -2
  706. package/dist/chunks/cli-1.0.13-zp9tvwgh.mjs +0 -2
  707. package/dist/chunks/cli-1.0.13-zt4bek0j.mjs +0 -2
  708. package/dist/chunks/cli-1.0.13-ztqnt3qp.mjs +0 -2
  709. package/dist/chunks/cli-1.0.13-zvemnxrj.mjs +0 -2
  710. package/dist/chunks/client-1.0.13-jj0v4n27.mjs +0 -1
  711. package/dist/chunks/color-1.0.13-3v7rvzdv.mjs +0 -1
  712. package/dist/chunks/compact-1.0.13-dbdbjtdk.mjs +0 -3
  713. package/dist/chunks/config-1.0.13-3qrt3cgm.mjs +0 -1
  714. package/dist/chunks/config-1.0.13-r3hkdrhb.mjs +0 -1
  715. package/dist/chunks/constants-1.0.13-rnw6yks8.mjs +0 -1
  716. package/dist/chunks/context-1.0.13-vzh7rmzp.mjs +0 -1
  717. package/dist/chunks/context-noninteractive-1.0.13-pch5w54p.mjs +0 -1
  718. package/dist/chunks/conversation-1.0.13-deetqyn0.mjs +0 -1
  719. package/dist/chunks/copilotHeaders-1.0.13-nt9wrgp5.mjs +0 -1
  720. package/dist/chunks/copy-1.0.13-hzdas7e3.mjs +0 -9
  721. package/dist/chunks/cost-1.0.13-6nzzt5ne.mjs +0 -1
  722. package/dist/chunks/createSSHSession-1.0.13-vy3mcz3k.mjs +0 -1
  723. package/dist/chunks/createSession-1.0.13-9f9eevz2.mjs +0 -1
  724. package/dist/chunks/debug-1.0.13-f3k3n0w9.mjs +0 -1
  725. package/dist/chunks/defaultActionDeps-1.0.13-cnw858jb.mjs +0 -1446
  726. package/dist/chunks/desktop-1.0.13-e005km58.mjs +0 -1
  727. package/dist/chunks/detectRepository-1.0.13-rjbmyf6j.mjs +0 -1
  728. package/dist/chunks/detection-1.0.13-fmg4e9cn.mjs +0 -1
  729. package/dist/chunks/diff-1.0.13-9jypv082.mjs +0 -1
  730. package/dist/chunks/doctor-1.0.13-8tdcwyds.mjs +0 -1
  731. package/dist/chunks/doctorDiagnostic-1.0.13-01b5f1qr.mjs +0 -1
  732. package/dist/chunks/earlyInput-1.0.13-qdaqzn87.mjs +0 -1
  733. package/dist/chunks/effort-1.0.13-xfj9x3jk.mjs +0 -10
  734. package/dist/chunks/engine-1.0.13-8zd1smqp.mjs +0 -1
  735. package/dist/chunks/envLessBridgeConfig-1.0.13-3pv6cjbw.mjs +0 -1
  736. package/dist/chunks/envUtils-1.0.13-vcp6531a.mjs +0 -1
  737. package/dist/chunks/environmentSelection-1.0.13-jeanv46d.mjs +0 -1
  738. package/dist/chunks/environments-1.0.13-w5a33d52.mjs +0 -1
  739. package/dist/chunks/errors-1.0.13-wrs4k863.mjs +0 -1
  740. package/dist/chunks/exampleCommands-1.0.13-f3v5223v.mjs +0 -1
  741. package/dist/chunks/execFileNoThrow-1.0.13-5qgqf50q.mjs +0 -1
  742. package/dist/chunks/exit-1.0.13-dkp2e02s.mjs +0 -1
  743. package/dist/chunks/explorer-1.0.13-0c0437ts.mjs +0 -1
  744. package/dist/chunks/export-1.0.13-cbatvd1c.mjs +0 -2
  745. package/dist/chunks/extra-usage-1.0.13-tm9dn26m.mjs +0 -1
  746. package/dist/chunks/extra-usage-noninteractive-1.0.13-tyfdd6zc.mjs +0 -1
  747. package/dist/chunks/fast-1.0.13-m2jj5axh.mjs +0 -1
  748. package/dist/chunks/feedback-1.0.13-3rc5sphe.mjs +0 -14
  749. package/dist/chunks/firstPartyEventLogger-1.0.13-9cqvyyy3.mjs +0 -1
  750. package/dist/chunks/git-1.0.13-9196pgzv.mjs +0 -1
  751. package/dist/chunks/githubModelsCredentials-1.0.13-h8fyv4hh.mjs +0 -1
  752. package/dist/chunks/goal-1.0.13-cty957vz.mjs +0 -4
  753. package/dist/chunks/grove-1.0.13-jew4jmvf.mjs +0 -1
  754. package/dist/chunks/growthbook-1.0.13-q8xh656p.mjs +0 -1
  755. package/dist/chunks/headless-1.0.13-h0c3ze3f.mjs +0 -2
  756. package/dist/chunks/heapdump-1.0.13-ndzc9093.mjs +0 -6
  757. package/dist/chunks/help-1.0.13-em333cwb.mjs +0 -1
  758. package/dist/chunks/hookChains-1.0.13-ytcm9p3p.mjs +0 -3
  759. package/dist/chunks/hooks-1.0.13-43xm69rv.mjs +0 -79
  760. package/dist/chunks/hooks-1.0.13-xa6gpzvq.mjs +0 -1
  761. package/dist/chunks/ide-1.0.13-4z1afk08.mjs +0 -3
  762. package/dist/chunks/image-processor-napi-1.0.13-e53cs6qw.mjs +0 -1
  763. package/dist/chunks/inboundAttachments-1.0.13-968zpe6v.mjs +0 -1
  764. package/dist/chunks/index-1.0.13-361h9v63.mjs +0 -1
  765. package/dist/chunks/index-1.0.13-4p1eb2pq.mjs +0 -1
  766. package/dist/chunks/index-1.0.13-55th4hhq.mjs +0 -1
  767. package/dist/chunks/index-1.0.13-55vgc9cr.mjs +0 -1
  768. package/dist/chunks/index-1.0.13-5gqy8x3m.mjs +0 -1
  769. package/dist/chunks/index-1.0.13-792fhv61.mjs +0 -1
  770. package/dist/chunks/index-1.0.13-8k0904bs.mjs +0 -1
  771. package/dist/chunks/index-1.0.13-ace8202d.mjs +0 -2
  772. package/dist/chunks/index-1.0.13-e20f9w6f.mjs +0 -1
  773. package/dist/chunks/index-1.0.13-efh2qbe0.mjs +0 -1
  774. package/dist/chunks/index-1.0.13-ej84k860.mjs +0 -1
  775. package/dist/chunks/index-1.0.13-fnd36467.mjs +0 -2
  776. package/dist/chunks/index-1.0.13-hdvj3xyt.mjs +0 -30
  777. package/dist/chunks/index-1.0.13-hgbqf3v1.mjs +0 -1
  778. package/dist/chunks/index-1.0.13-j0146ntq.mjs +0 -1
  779. package/dist/chunks/index-1.0.13-jackh0p4.mjs +0 -17
  780. package/dist/chunks/index-1.0.13-kfmh713v.mjs +0 -9
  781. package/dist/chunks/index-1.0.13-mrvd3mn4.mjs +0 -1
  782. package/dist/chunks/index-1.0.13-rrm8s54m.mjs +0 -1
  783. package/dist/chunks/index-1.0.13-vgmxqgw6.mjs +0 -1
  784. package/dist/chunks/index-1.0.13-xgbfdr5p.mjs +0 -5
  785. package/dist/chunks/index-1.0.13-y5wahjbd.mjs +0 -9
  786. package/dist/chunks/index-1.0.13-ykat42gv.mjs +0 -1
  787. package/dist/chunks/init-1.0.13-pyw980be.mjs +0 -1
  788. package/dist/chunks/initReplBridge-1.0.13-8pye5m3y.mjs +0 -1
  789. package/dist/chunks/ink-1.0.13-4ks3vqg1.mjs +0 -1
  790. package/dist/chunks/insights-1.0.13-8p04qt4e.mjs +0 -870
  791. package/dist/chunks/install-1.0.13-afmkvg4q.mjs +0 -1
  792. package/dist/chunks/install-github-app-1.0.13-nybxp9y9.mjs +0 -149
  793. package/dist/chunks/install-slack-app-1.0.13-ghycqjsr.mjs +0 -1
  794. package/dist/chunks/instrumentation-1.0.13-35rtw7fn.mjs +0 -1
  795. package/dist/chunks/interactiveHelpers-1.0.13-16ydy7kk.mjs +0 -1
  796. package/dist/chunks/keybindings-1.0.13-nt63s9bg.mjs +0 -2
  797. package/dist/chunks/knowledge-1.0.13-g9wcredx.mjs +0 -2
  798. package/dist/chunks/latestVersionCache-1.0.13-783kmyc1.mjs +0 -1
  799. package/dist/chunks/loadAgentsDir-1.0.13-btkcbfn1.mjs +0 -1
  800. package/dist/chunks/loadPluginHooks-1.0.13-6cxg0hz0.mjs +0 -1
  801. package/dist/chunks/loadPluginHooks-1.0.13-tf6npdgj.mjs +0 -1
  802. package/dist/chunks/log-1.0.13-3sscdqcx.mjs +0 -1
  803. package/dist/chunks/main-1.0.13-h958ytkv.mjs +0 -1
  804. package/dist/chunks/managedEnv-1.0.13-kcy78mg2.mjs +0 -1
  805. package/dist/chunks/mcp-1.0.13-gwfzhgtm.mjs +0 -4
  806. package/dist/chunks/mcp-1.0.13-s9hvy6a1.mjs +0 -1
  807. package/dist/chunks/mcp-1.0.13-vathcxfe.mjs +0 -17
  808. package/dist/chunks/mcpb-1.0.13-ynwdmrgy.mjs +0 -1
  809. package/dist/chunks/memory-1.0.13-y5pgdmp0.mjs +0 -72
  810. package/dist/chunks/model-1.0.13-28wkmva5.mjs +0 -2
  811. package/dist/chunks/model-1.0.13-wbne69bf.mjs +0 -1
  812. package/dist/chunks/node-1.0.13-jb6nf3sf.mjs +0 -12
  813. package/dist/chunks/oauth-1.0.13-x9g8753d.mjs +0 -1
  814. package/dist/chunks/openaiShim-1.0.13-dmzfpj84.mjs +0 -14
  815. package/dist/chunks/output-style-1.0.13-dkm9cvhh.mjs +0 -1
  816. package/dist/chunks/package-2VNCXFNY-1.0.13-c2rzk5s5.mjs +0 -1
  817. package/dist/chunks/parseConnectUrl-1.0.13-drfxxfbm.mjs +0 -1
  818. package/dist/chunks/parser-1.0.13-2a4gxkj4.mjs +0 -1
  819. package/dist/chunks/passes-1.0.13-xe1s3afm.mjs +0 -1
  820. package/dist/chunks/permissions-1.0.13-091a123r.mjs +0 -1
  821. package/dist/chunks/permissions-1.0.13-de2kak1c.mjs +0 -3
  822. package/dist/chunks/plan-1.0.13-nq51yj1w.mjs +0 -1
  823. package/dist/chunks/plist-1.0.13-9jnyqg5e.mjs +0 -1
  824. package/dist/chunks/plugin-1.0.13-ravfdrab.mjs +0 -29
  825. package/dist/chunks/pluginStartupCheck-1.0.13-bpnvrbf5.mjs +0 -1
  826. package/dist/chunks/plugins-1.0.13-2g0zcvmn.mjs +0 -9
  827. package/dist/chunks/preActionHook-1.0.13-sh1garss.mjs +0 -2
  828. package/dist/chunks/print-1.0.13-fbmdzf5h.mjs +0 -57
  829. package/dist/chunks/privacy-settings-1.0.13-xmggzdjb.mjs +0 -1
  830. package/dist/chunks/process-1.0.13-yvqmferw.mjs +0 -1
  831. package/dist/chunks/processBashCommand-1.0.13-vymx613b.mjs +0 -1
  832. package/dist/chunks/processSlashCommand-1.0.13-t2b59q54.mjs +0 -9
  833. package/dist/chunks/prompt-1.0.13-5rf0rmyz.mjs +0 -1
  834. package/dist/chunks/prompt-1.0.13-z2a6q0v3.mjs +0 -1
  835. package/dist/chunks/prompts-1.0.13-xntc8d09.mjs +0 -1
  836. package/dist/chunks/protocolHandler-1.0.13-c5pks46d.mjs +0 -13
  837. package/dist/chunks/provider-1.0.13-zfgjs99b.mjs +0 -2
  838. package/dist/chunks/providerProfiles-1.0.13-rk6z9ker.mjs +0 -1
  839. package/dist/chunks/providerValidation-1.0.13-w8m526k7.mjs +0 -6
  840. package/dist/chunks/rate-limit-options-1.0.13-2a7ezwjq.mjs +0 -1
  841. package/dist/chunks/registerSubcommands-1.0.13-fdj1d2vn.mjs +0 -34
  842. package/dist/chunks/registry-1.0.13-p4zgn33y.mjs +0 -1
  843. package/dist/chunks/release-notes-1.0.13-pgzcje06.mjs +0 -5
  844. package/dist/chunks/reload-plugins-1.0.13-6chpnefr.mjs +0 -2
  845. package/dist/chunks/remote-env-1.0.13-j1xk0q03.mjs +0 -1
  846. package/dist/chunks/remoteBridgeCore-1.0.13-ffh4q93x.mjs +0 -1
  847. package/dist/chunks/remoteSession-1.0.13-h715mcc6.mjs +0 -1
  848. package/dist/chunks/rename-1.0.13-x7fma5b1.mjs +0 -1
  849. package/dist/chunks/replBridgeHandle-1.0.13-d1r6xsjs.mjs +0 -1
  850. package/dist/chunks/replLauncher-1.0.13-bhshyrk2.mjs +0 -1
  851. package/dist/chunks/resume-1.0.13-g7w8k889.mjs +0 -2
  852. package/dist/chunks/rewind-1.0.13-9wf9gqtz.mjs +0 -1
  853. package/dist/chunks/rootOptions-1.0.13-7y485878.mjs +0 -1
  854. package/dist/chunks/runWorkflowHeadless-1.0.13-rv0anxz7.mjs +0 -10
  855. package/dist/chunks/sandbox-adapter-1.0.13-kvcvaae5.mjs +0 -1
  856. package/dist/chunks/sandbox-toggle-1.0.13-gzeexqb1.mjs +0 -1
  857. package/dist/chunks/session-1.0.13-hyhbhvkf.mjs +0 -2
  858. package/dist/chunks/sessionDiscovery-1.0.13-525ff4qc.mjs +0 -1
  859. package/dist/chunks/sessionFileAccessHooks-1.0.13-52whtstc.mjs +0 -1
  860. package/dist/chunks/sessionStorage-1.0.13-r00sygqv.mjs +0 -1
  861. package/dist/chunks/settings-1.0.13-sm1hpt00.mjs +0 -1
  862. package/dist/chunks/setup-1.0.13-7y88y2kn.mjs +0 -5
  863. package/dist/chunks/sinks-1.0.13-4g18qqzg.mjs +0 -1
  864. package/dist/chunks/skills-1.0.13-cpct3g7k.mjs +0 -1
  865. package/dist/chunks/startupProfiler-1.0.13-x0k3gz44.mjs +0 -1
  866. package/dist/chunks/startupUpdateCheck-1.0.13-n4bzta5q.mjs +0 -1
  867. package/dist/chunks/state-1.0.13-zq29wtdm.mjs +0 -1
  868. package/dist/chunks/stats-1.0.13-q0gfz40a.mjs +0 -6
  869. package/dist/chunks/status-1.0.13-t69r10gd.mjs +0 -1
  870. package/dist/chunks/stickers-1.0.13-1vnk8fs0.mjs +0 -1
  871. package/dist/chunks/subprocessEnv-1.0.13-1qaxx1mm.mjs +0 -1
  872. package/dist/chunks/tasks-1.0.13-xbf05jds.mjs +0 -1
  873. package/dist/chunks/teamHelpers-1.0.13-ajaffjmv.mjs +0 -1
  874. package/dist/chunks/teammateModeSnapshot-1.0.13-0se6apnj.mjs +0 -1
  875. package/dist/chunks/teleport-1.0.13-fy5929dz.mjs +0 -1
  876. package/dist/chunks/terminalSetup-1.0.13-6vb6xv4h.mjs +0 -1
  877. package/dist/chunks/theme-1.0.13-qh1caywb.mjs +0 -1
  878. package/dist/chunks/thinkback-1.0.13-yxqc5snt.mjs +0 -1
  879. package/dist/chunks/thinkback-play-1.0.13-4zdbm8qa.mjs +0 -1
  880. package/dist/chunks/toolPool-1.0.13-p41w5yd3.mjs +0 -1
  881. package/dist/chunks/toolSearch-1.0.13-4behydd7.mjs +0 -1
  882. package/dist/chunks/tools-1.0.13-vkf5gwtw.mjs +0 -1
  883. package/dist/chunks/trustedDevice-1.0.13-zafdrn99.mjs +0 -1
  884. package/dist/chunks/turndown.cjs-1.0.13-jyfkbj9m.mjs +0 -69
  885. package/dist/chunks/types-1.0.13-7xc46cqv.mjs +0 -1
  886. package/dist/chunks/ultrareviewCommand-1.0.13-3bz6pfy0.mjs +0 -4
  887. package/dist/chunks/update-1.0.13-yevsj7ad.mjs +0 -88
  888. package/dist/chunks/upgrade-1.0.13-exvdsfcj.mjs +0 -1
  889. package/dist/chunks/upload-1.0.13-hnnrtgrv.mjs +0 -7
  890. package/dist/chunks/upstreamproxy-1.0.13-qgbvmb0r.mjs +0 -14
  891. package/dist/chunks/url-handler-napi-1.0.13-7wjfhqg3.mjs +0 -1
  892. package/dist/chunks/usage-1.0.13-jvdr40ma.mjs +0 -1
  893. package/dist/chunks/util-1.0.13-87gxb90q.mjs +0 -1
  894. package/dist/chunks/utils-1.0.13-c5pe460e.mjs +0 -1
  895. package/dist/chunks/vim-1.0.13-nkrbsse9.mjs +0 -1
  896. package/dist/chunks/watchLoop-1.0.13-922mtars.mjs +0 -13
  897. package/dist/chunks/watcher-1.0.13-pt4sgafn.mjs +0 -1
  898. package/dist/chunks/wiki-1.0.13-swp7dc6p.mjs +0 -132
  899. package/dist/chunks/workflows-1.0.13-ykfca04r.mjs +0 -1
  900. package/dist/chunks/worktree-1.0.13-9m47x8ty.mjs +0 -1
  901. package/dist/chunks/worktreeModeEnabled-1.0.13-3jrpyzfm.mjs +0 -1
  902. package/dist/chunks/wrapper-1.0.13-2myaas4p.mjs +0 -7
  903. /package/dist/chunks/{cli-1.0.13-ap2xrh2s.mjs → cli-1.0.14-0e04z9y7.mjs} +0 -0
  904. /package/dist/chunks/{cli-1.0.13-tzenmc0b.mjs → cli-1.0.14-b2z4y3qj.mjs} +0 -0
  905. /package/dist/chunks/{cli-1.0.13-v34fp7gq.mjs → cli-1.0.14-d2q4akvz.mjs} +0 -0
  906. /package/dist/chunks/{cli-1.0.13-n6bzzv7p.mjs → cli-1.0.14-fnp8x3aj.mjs} +0 -0
  907. /package/dist/chunks/{cli-1.0.13-d9nvpqpw.mjs → cli-1.0.14-ks6tgvs0.mjs} +0 -0
  908. /package/dist/chunks/{cli-1.0.13-wv7skbb9.mjs → cli-1.0.14-skf34yk4.mjs} +0 -0
  909. /package/dist/chunks/{cli-1.0.13-q9et56bj.mjs → cli-1.0.14-w1y6p2xa.mjs} +0 -0
  910. /package/dist/chunks/{cli-1.0.13-4z6c4gzk.mjs → cli-1.0.14-z311x3av.mjs} +0 -0
@@ -1,2 +0,0 @@
1
- import{qx as U,rx as V,ux as f,wu as R,xu as T,yu as $}from"./cli-1.0.13-kr3d94dn.mjs";import{r6 as Q,s6 as _}from"./cli-1.0.13-h5mwwv8w.mjs";import{Naa as L,Uaa as Y,qga as G,yga as Z}from"./cli-1.0.13-p1nsb8ay.mjs";import{hsa as X}from"./cli-1.0.13-d9nvpqpw.mjs";function S(q,j){let z=new Map;for(let x of j)z.set(x.agentType,x);let H=new Set,J=[];for(let x of q){let K=`${x.agentType}:${x.source}`;if(H.has(K))continue;H.add(K);let E=z.get(x.agentType),W=E&&E.source!==x.source?E.source:void 0;J.push({...x,overriddenBy:W})}return J}function I(q){let j=q.model||U();if(!j)return;if(j==="inherit")return"inherit";if(j==="haiku"||j==="sonnet"||j==="opus"){try{if(!V())return"inherit";if(!Q(j))return"inherit"}catch(z){G(z)}return j}return T(j,`agent:${q.agentType}`,{getAvailableModelIds:R,logDebug:()=>{},logErr:G})??j}function N(q){return L(q).toLowerCase()}function P(q,j){return q.agentType.localeCompare(j.agentType,void 0,{sensitivity:"base"})}var O;var h=X(()=>{f();_();Z();Y();$();O=[{label:"User agents",source:"userSettings"},{label:"Project agents",source:"projectSettings"},{label:"Local agents",source:"localSettings"},{label:"Managed agents",source:"policySettings"},{label:"Plugin agents",source:"plugin"},{label:"CLI arg agents",source:"flagSettings"},{label:"Built-in agents",source:"built-in"}]});
2
- export{O as ad,S as bd,I as cd,N as dd,P as ed,h as fd};
@@ -1,2 +0,0 @@
1
- import{DV as k,EV as f,UV as u}from"./cli-1.0.13-shrh1g4z.mjs";import{JX as C,VX as d}from"./cli-1.0.13-w7jh58qt.mjs";import{o4 as A,q4 as F}from"./cli-1.0.13-tyhtztew.mjs";import{M4 as q,S4 as i}from"./cli-1.0.13-h5mwwv8w.mjs";import{I8 as W,L8 as _,S8 as j,T8 as w,Y8 as I}from"./cli-1.0.13-jdxaky02.mjs";import{qga as V,yga as U}from"./cli-1.0.13-p1nsb8ay.mjs";import{Via as M,Wia as v}from"./cli-1.0.13-y6y32j2s.mjs";import{Dja as X,Eja as R,Ija as p,_ja as J,bka as x}from"./cli-1.0.13-4dp5a597.mjs";import{Fka as T,yka as P}from"./cli-1.0.13-mazxedqg.mjs";import{isa as O}from"./cli-1.0.13-d9nvpqpw.mjs";x();U();F();v();x();T();U();_();I();p();import{randomUUID as E}from"crypto";var h=2000,y=5,S=30000,Y=3,c=new Set([4003]);function D(B){if(typeof B!=="object"||B===null||!("type"in B))return!1;return typeof B.type==="string"}class L{sessionId;orgUuid;getAccessToken;callbacks;ws=null;state="closed";reconnectAttempts=0;sessionNotFoundRetries=0;pingInterval=null;reconnectTimer=null;constructor(B,z,Q,H){this.sessionId=B;this.orgUuid=z;this.getAccessToken=Q;this.callbacks=H}async connect(){if(this.state==="connecting"){J("[SessionsWebSocket] Already connecting");return}this.state="connecting";let z=`${M().BASE_API_URL.replace("https://","wss://")}/v1/sessions/ws/${this.sessionId}/subscribe?organization_uuid=${this.orgUuid}`;J(`[SessionsWebSocket] Connecting to ${z}`);let H={Authorization:`Bearer ${this.getAccessToken()}`,"anthropic-version":"2023-06-01"};if(typeof Bun<"u"){let $=new globalThis.WebSocket(z,{headers:H,proxy:w(z),tls:W()||void 0});this.ws=$,$.addEventListener("open",()=>{J("[SessionsWebSocket] Connection opened, authenticated via headers"),this.state="connected",this.reconnectAttempts=0,this.sessionNotFoundRetries=0,this.startPingInterval(),this.callbacks.onConnected?.()}),$.addEventListener("message",(Z)=>{let K=typeof Z.data==="string"?Z.data:String(Z.data);this.handleMessage(K)}),$.addEventListener("error",()=>{let Z=Error("[SessionsWebSocket] WebSocket error");V(Z),this.callbacks.onError?.(Z)}),$.addEventListener("close",(Z)=>{J(`[SessionsWebSocket] Closed: code=${Z.code} reason=${Z.reason}`),this.handleClose(Z.code)}),$.addEventListener("pong",()=>{J("[SessionsWebSocket] Pong received")})}else{let{default:$}=await import("./wrapper-1.0.13-2myaas4p.mjs"),Z=new $(z,{headers:H,agent:j(z),...W()});this.ws=Z,Z.on("open",()=>{J("[SessionsWebSocket] Connection opened, authenticated via headers"),this.state="connected",this.reconnectAttempts=0,this.sessionNotFoundRetries=0,this.startPingInterval(),this.callbacks.onConnected?.()}),Z.on("message",(K)=>{this.handleMessage(K.toString())}),Z.on("error",(K)=>{V(Error(`[SessionsWebSocket] Error: ${K.message}`)),this.callbacks.onError?.(K)}),Z.on("close",(K,G)=>{J(`[SessionsWebSocket] Closed: code=${K} reason=${G.toString()}`),this.handleClose(K)}),Z.on("pong",()=>{J("[SessionsWebSocket] Pong received")})}}handleMessage(B){try{let z=R(B);if(D(z))this.callbacks.onMessage(z);else J(`[SessionsWebSocket] Ignoring message type: ${typeof z==="object"&&z!==null&&"type"in z?String(z.type):"unknown"}`)}catch(z){V(Error(`[SessionsWebSocket] Failed to parse message: ${P(z)}`))}}handleClose(B){if(this.stopPingInterval(),this.state==="closed")return;this.ws=null;let z=this.state;if(this.state="closed",c.has(B)){J(`[SessionsWebSocket] Permanent close code ${B}, not reconnecting`),this.callbacks.onClose?.();return}if(B===4001){if(this.sessionNotFoundRetries++,this.sessionNotFoundRetries>Y){J(`[SessionsWebSocket] 4001 retry budget exhausted (${Y}), not reconnecting`),this.callbacks.onClose?.();return}this.scheduleReconnect(h*this.sessionNotFoundRetries,`4001 attempt ${this.sessionNotFoundRetries}/${Y}`);return}if(z==="connected"&&this.reconnectAttempts<y)this.reconnectAttempts++,this.scheduleReconnect(h,`attempt ${this.reconnectAttempts}/${y}`);else J("[SessionsWebSocket] Not reconnecting"),this.callbacks.onClose?.()}scheduleReconnect(B,z){this.callbacks.onReconnecting?.(),J(`[SessionsWebSocket] Scheduling reconnect (${z}) in ${B}ms`),this.reconnectTimer=setTimeout(()=>{this.reconnectTimer=null,this.connect()},B)}startPingInterval(){this.stopPingInterval(),this.pingInterval=setInterval(()=>{if(this.ws&&this.state==="connected")try{this.ws.ping?.()}catch{}},S)}stopPingInterval(){if(this.pingInterval)clearInterval(this.pingInterval),this.pingInterval=null}sendControlResponse(B){if(!this.ws||this.state!=="connected"){V(Error("[SessionsWebSocket] Cannot send: not connected"));return}J("[SessionsWebSocket] Sending control response"),this.ws.send(X(B))}sendControlRequest(B){if(!this.ws||this.state!=="connected"){V(Error("[SessionsWebSocket] Cannot send: not connected"));return}let z={type:"control_request",request_id:E(),request:B};J(`[SessionsWebSocket] Sending control request: ${B.subtype}`),this.ws.send(X(z))}isConnected(){return this.state==="connected"}close(){if(J("[SessionsWebSocket] Closing connection"),this.state="closed",this.stopPingInterval(),this.reconnectTimer)clearTimeout(this.reconnectTimer),this.reconnectTimer=null;if(this.ws)this.ws.close(),this.ws=null}reconnect(){J("[SessionsWebSocket] Force reconnecting"),this.reconnectAttempts=0,this.sessionNotFoundRetries=0,this.close(),this.reconnectTimer=setTimeout(()=>{this.reconnectTimer=null,this.connect()},500)}}function N(B){return B.type!=="control_request"&&B.type!=="control_response"&&B.type!=="control_cancel_request"}class b{config;callbacks;websocket=null;pendingPermissionRequests=new Map;constructor(B,z){this.config=B;this.callbacks=z}connect(){J(`[RemoteSessionManager] Connecting to session ${this.config.sessionId}`);let B={onMessage:(z)=>this.handleMessage(z),onConnected:()=>{J("[RemoteSessionManager] Connected"),this.callbacks.onConnected?.()},onClose:()=>{J("[RemoteSessionManager] Disconnected"),this.callbacks.onDisconnected?.()},onReconnecting:()=>{J("[RemoteSessionManager] Reconnecting"),this.callbacks.onReconnecting?.()},onError:(z)=>{V(z),this.callbacks.onError?.(z)}};this.websocket=new L(this.config.sessionId,this.config.orgUuid,this.config.getAccessToken,B),this.websocket.connect()}handleMessage(B){if(B.type==="control_request"){this.handleControlRequest(B);return}if(B.type==="control_cancel_request"){let{request_id:z}=B,Q=this.pendingPermissionRequests.get(z);J(`[RemoteSessionManager] Permission request cancelled: ${z}`),this.pendingPermissionRequests.delete(z),this.callbacks.onPermissionCancelled?.(z,Q?.tool_use_id);return}if(B.type==="control_response"){J("[RemoteSessionManager] Received control response");return}if(N(B))this.callbacks.onMessage(B)}handleControlRequest(B){let{request_id:z,request:Q}=B;if(Q.subtype==="can_use_tool")J(`[RemoteSessionManager] Permission request for tool: ${Q.tool_name}`),this.pendingPermissionRequests.set(z,Q),this.callbacks.onPermissionRequest(Q,z);else{J(`[RemoteSessionManager] Unsupported control request subtype: ${Q.subtype}`);let H={type:"control_response",response:{subtype:"error",request_id:z,error:`Unsupported control request subtype: ${Q.subtype}`}};this.websocket?.sendControlResponse(H)}}async sendMessage(B,z){J(`[RemoteSessionManager] Sending message to session ${this.config.sessionId}`);let Q=await A(this.config.sessionId,B,z);if(!Q)V(Error(`[RemoteSessionManager] Failed to send message to session ${this.config.sessionId}`));return Q}respondToPermissionRequest(B,z){if(!this.pendingPermissionRequests.get(B)){V(Error(`[RemoteSessionManager] No pending permission request with ID: ${B}`));return}this.pendingPermissionRequests.delete(B);let H={type:"control_response",response:{subtype:"success",request_id:B,response:{behavior:z.behavior,...z.behavior==="allow"?{updatedInput:z.updatedInput}:{message:z.message}}}};J(`[RemoteSessionManager] Sending permission response: ${z.behavior}`),this.websocket?.sendControlResponse(H)}isConnected(){return this.websocket?.isConnected()??!1}cancelSession(){J("[RemoteSessionManager] Sending interrupt signal"),this.websocket?.sendControlRequest({subtype:"interrupt"})}getSessionId(){return this.config.sessionId}disconnect(){J("[RemoteSessionManager] Disconnecting"),this.websocket?.close(),this.websocket=null,this.pendingPermissionRequests.clear()}reconnect(){J("[RemoteSessionManager] Reconnecting WebSocket"),this.websocket?.reconnect()}}function $z(B,z,Q,H=!1,$=!1){return{sessionId:B,getAccessToken:z,orgUuid:Q,hasInitialPrompt:H,viewerOnly:$}}x();U();d();u();function Xz(){let B=C();if(!B?.teamName||!B?.agentName){J("[Reconnection] computeInitialTeamContext: No teammate context set (not a teammate)");return}let{teamName:z,agentId:Q,agentName:H}=B,$=f(z);if(!$){V(Error(`[computeInitialTeamContext] Could not read team file for ${z}`));return}let Z=k(z),K=!Q;return J(`[Reconnection] Computed initial team context for ${K?"leader":`teammate ${H}`} in team ${z}`),{teamName:z,teamFilePath:Z,leadAgentId:$.leadAgentId,selfAgentId:Q,selfAgentName:H,isLeader:K,teammates:{}}}function Wz(B,z,Q){let H=f(z);if(!H){V(Error(`[initializeTeammateContextFromSession] Could not read team file for ${z} (agent: ${Q})`));return}let $=H.members.find((G)=>G.name===Q);if(!$)J(`[Reconnection] Member ${Q} not found in team ${z} - may have been removed`);let Z=$?.agentId,K=k(z);B((G)=>({...G,teamContext:{teamName:z,teamFilePath:K,leadAgentId:H.leadAgentId,selfAgentId:Z,selfAgentName:Q,isLeader:!1,teammates:{}}})),J(`[Reconnection] Initialized agent context from session for ${Q} in team ${z}`)}i();var m={"claude-3-opus":{modelName:"Claude 3 Opus",retirementDates:{firstParty:"January 5, 2026",bedrock:"January 15, 2026",vertex:"January 5, 2026",foundry:"January 5, 2026"}},"claude-3-7-sonnet":{modelName:"Claude 3.7 Sonnet",retirementDates:{firstParty:"February 19, 2026",bedrock:"April 28, 2026",vertex:"May 11, 2026",foundry:"February 19, 2026"}},"claude-3-5-haiku":{modelName:"Claude 3.5 Haiku",retirementDates:{firstParty:"February 19, 2026",bedrock:null,vertex:null,foundry:null}}};function l(B){let z=B.toLowerCase(),Q=q();for(let[H,$]of Object.entries(m)){let Z=$.retirementDates[Q];if(!z.includes(H)||!Z)continue;return{isDeprecated:!0,modelName:$.modelName,retirementDate:Z}}return{isDeprecated:!1}}function Lz(B){if(!B)return null;let z=l(B);if(!z.isDeprecated)return null;return`⚠ ${z.modelName} will be retired on ${z.retirementDate}. Consider switching to a newer model.`}
2
- export{b as Na,$z as Oa,Xz as Pa,Wz as Qa,Lz as Ra};
@@ -1,42 +0,0 @@
1
- import{dsa as w7,fsa as E$,hsa as M,isa as YZ}from"./cli-1.0.13-d9nvpqpw.mjs";function O(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 K(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 zZ=()=>{};function wZ(Z){return typeof Z==="object"&&Z!==null&&(("name"in Z)&&Z.name==="AbortError"||("message"in Z)&&String(Z.message).includes("FetchRequestCanceledException"))}var iZ=(Z)=>{if(Z instanceof Error)return Z;if(typeof Z==="object"&&Z!==null){try{if(Object.prototype.toString.call(Z)==="[object Error]"){let $=Error(Z.message,Z.cause?{cause:Z.cause}:{});if(Z.stack)$.stack=Z.stack;if(Z.cause&&!$.cause)$.cause=Z.cause;if(Z.name)$.name=Z.name;return $}}catch{}try{return Error(JSON.stringify(Z))}catch{}}return Error(Z)};var PZ=()=>{};var B,m,s,FZ,v0,X$,m0,u0,c0,d0,p0,l0,i0,n0;var v=M(()=>{PZ();B=class B extends Error{};m=class m extends B{constructor(Z,$,X,J,z){super(`${m.makeMessage(Z,$,X)}`);this.status=Z,this.headers=J,this.requestID=J?.get("request-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 FZ({message:X,cause:iZ($)});let z=$,Y=z?.error?.type;if(Z===400)return new m0(Z,z,X,J,Y);if(Z===401)return new u0(Z,z,X,J,Y);if(Z===403)return new c0(Z,z,X,J,Y);if(Z===404)return new d0(Z,z,X,J,Y);if(Z===409)return new p0(Z,z,X,J,Y);if(Z===422)return new l0(Z,z,X,J,Y);if(Z===429)return new i0(Z,z,X,J,Y);if(Z>=500)return new n0(Z,z,X,J,Y);return new m(Z,z,X,J,Y)}};s=class s extends m{constructor({message:Z}={}){super(void 0,void 0,Z||"Request was aborted.",void 0)}};FZ=class FZ extends m{constructor({message:Z,cause:$}){super(void 0,void 0,Z||"Connection error.",void 0);if($)this.cause=$}};v0=class v0 extends FZ{constructor({message:Z}={}){super({message:Z??"Request timed out."})}};X$=class X$ extends B{constructor(Z,{cause:$}={}){super(Z??"Retryable error.");if($!==void 0)this.cause=$}};m0=class m0 extends m{};u0=class u0 extends m{};c0=class c0 extends m{};d0=class d0 extends m{};p0=class p0 extends m{};l0=class l0 extends m{};i0=class i0 extends m{};n0=class n0 extends m{}});var kZ;var a0=M(()=>{kZ=class kZ 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 VX(){let Z,$;return{promise:new Promise((J,z)=>{Z=J,$=z}),resolve:Z,reject:$}}var X4=()=>{};var Q0=function(){let{crypto:Z}=globalThis;if(Z?.randomUUID)return Q0=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 J$=()=>{};function o0(Z){if(typeof Z!=="object")return{};return Z??{}}function WX(Z){if(!Z)return!0;for(let $ in Z)return!1;return!0}function z4(Z,$){return Object.prototype.hasOwnProperty.call(Z,$)}var B9,J4=(Z)=>{return B9.test(Z)},e=(Z)=>(e=Array.isArray,e(Z)),NX,Y4=(Z,$)=>{if(typeof $!=="number"||!Number.isInteger($))throw new B(`${Z} must be an integer`);if($<0)throw new B(`${Z} must be a positive integer`);return $},r0=(Z)=>{try{return JSON.parse(Z)}catch($){return}};var CZ=M(()=>{v();B9=/^[a-z][a-z0-9+.-]*:/i,NX=e});var BZ=(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 V0=()=>{};var GZ="0.112.3";var t0=()=>{};function H9(){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 A9(){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,Y=J[2]||0,V=J[3]||0;return{browser:$,version:`${z}.${Y}.${V}`}}}return null}var N4=()=>{return typeof window<"u"&&typeof window.document<"u"&&typeof navigator<"u"},T9=()=>{let Z=H9();if(Z==="deno")return{"X-Stainless-Lang":"js","X-Stainless-Package-Version":GZ,"X-Stainless-OS":Q4(Deno.build.os),"X-Stainless-Arch":K4(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":GZ,"X-Stainless-OS":"Unknown","X-Stainless-Arch":`other:${EdgeRuntime}`,"X-Stainless-Runtime":"edge","X-Stainless-Runtime-Version":globalThis.process.version};if(Z==="node")return{"X-Stainless-Lang":"js","X-Stainless-Package-Version":GZ,"X-Stainless-OS":Q4(globalThis.process.platform??"unknown"),"X-Stainless-Arch":K4(globalThis.process.arch??"unknown"),"X-Stainless-Runtime":"node","X-Stainless-Runtime-Version":globalThis.process.version??"unknown"};let $=A9();if($)return{"X-Stainless-Lang":"js","X-Stainless-Package-Version":GZ,"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":GZ,"X-Stainless-OS":"Unknown","X-Stainless-Arch":"unknown","X-Stainless-Runtime":"unknown","X-Stainless-Runtime-Version":"unknown"}},K4=(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"},Q4=(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"},V4,s0=()=>{return V4??(V4=T9())};var z$=M(()=>{t0()});function W4(){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 UX(...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 Y$(Z){let $=Symbol.asyncIterator in Z?Z[Symbol.asyncIterator]():Z[Symbol.iterator]();return UX({start(){},async pull(X){let{done:J,value:z}=await $.next();if(J)X.close();else X.enqueue(z)},async cancel(){await $.return?.()}})}function e0(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 U4(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 N0=()=>{};var w4=({headers:Z,body:$})=>{return{bodyHeaders:{"content-type":"application/json"},body:JSON.stringify($)}};var wX=()=>{};var GX="RFC3986",OX=(Z)=>String(Z),qX,G4="RFC1738";var MX=M(()=>{qX={RFC1738:(Z)=>String(Z).replace(/%20/g,"+"),RFC3986:OX}});function q4(Z){if(!Z||typeof Z!=="object")return!1;return!!(Z.constructor&&Z.constructor.isBuffer&&Z.constructor.isBuffer(Z))}function BX(Z,$){if(e(Z)){let X=[];for(let J=0;J<Z.length;J+=1)X.push($(Z[J]));return X}return $(Z)}var K$=(Z,$)=>(K$=Object.hasOwn??Function.prototype.call.bind(Object.prototype.hasOwnProperty),K$(Z,$)),xZ,CX=1024,O4=(Z,$,X,J,z)=>{if(Z.length===0)return Z;let Y=Z;if(typeof Z==="symbol")Y=Symbol.prototype.toString.call(Z);else if(typeof Z!=="string")Y=String(Z);if(X==="iso-8859-1")return escape(Y).replace(/%u[0-9a-f]{4}/gi,function(Q){return"%26%23"+parseInt(Q.slice(2),16)+"%3B"});let V="";for(let Q=0;Q<Y.length;Q+=CX){let U=Y.length>=CX?Y.slice(Q,Q+CX):Y,q=[];for(let H=0;H<U.length;++H){let w=U.charCodeAt(H);if(w===45||w===46||w===95||w===126||w>=48&&w<=57||w>=65&&w<=90||w>=97&&w<=122||z===G4&&(w===40||w===41)){q[q.length]=U.charAt(H);continue}if(w<128){q[q.length]=xZ[w];continue}if(w<2048){q[q.length]=xZ[192|w>>6]+xZ[128|w&63];continue}if(w<55296||w>=57344){q[q.length]=xZ[224|w>>12]+xZ[128|w>>6&63]+xZ[128|w&63];continue}H+=1,w=65536+((w&1023)<<10|U.charCodeAt(H)&1023),q[q.length]=xZ[240|w>>18]+xZ[128|w>>12&63]+xZ[128|w>>6&63]+xZ[128|w&63]}V+=q.join("")}return V};var M4=M(()=>{MX();CZ();xZ=(()=>{let Z=[];for(let $=0;$<256;++$)Z.push("%"+(($<16?"0":"")+$.toString(16)).toUpperCase());return Z})()});function D9(Z){return typeof Z==="string"||typeof Z==="number"||typeof Z==="boolean"||typeof Z==="symbol"||typeof Z==="bigint"}function T4(Z,$,X,J,z,Y,V,Q,U,q,H,w,W,C,A,j,L,D){let T=Z,R=D,k=0,b=!1;while((R=R.get(HX))!==void 0&&!b){let d=R.get(Z);if(k+=1,typeof d<"u")if(d===k)throw RangeError("Cyclic object value");else b=!0;if(typeof R.get(HX)>"u")k=0}if(typeof q==="function")T=q($,T);else if(T instanceof Date)T=W?.(T);else if(X==="comma"&&e(T))T=BX(T,function(d){if(d instanceof Date)return W?.(d);return d});if(T===null){if(Y)return U&&!j?U($,a.encoder,L,"key",C):$;T=""}if(D9(T)||q4(T)){if(U){let d=j?$:U($,a.encoder,L,"key",C);return[A?.(d)+"="+A?.(U(T,a.encoder,L,"value",C))]}return[A?.($)+"="+A?.(String(T))]}let n=[];if(typeof T>"u")return n;let g;if(X==="comma"&&e(T)){if(j&&U)T=BX(T,U);g=[{value:T.length>0?T.join(",")||null:void 0}]}else if(e(q))g=q;else{let d=Object.keys(T);g=H?d.sort(H):d}let l=Q?String($).replace(/\./g,"%2E"):String($),_=J&&e(T)&&T.length===1?l+"[]":l;if(z&&e(T)&&T.length===0)return _+"[]";for(let d=0;d<g.length;++d){let UZ=g[d],lZ=typeof UZ==="object"&&typeof UZ.value<"u"?UZ.value:T[UZ];if(V&&lZ===null)continue;let QX=w&&Q?UZ.replace(/\./g,"%2E"):UZ,M9=e(T)?typeof X==="function"?X(_,QX):_:_+(w?"."+QX:"["+QX+"]");D.set(Z,k);let $4=new WeakMap;$4.set(HX,D),H4(n,T4(lZ,M9,X,J,z,Y,V,Q,X==="comma"&&j&&e(T)?null:U,q,H,w,W,C,A,j,L,$4))}return n}function S9(Z=a){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||a.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=GX;if(typeof Z.format<"u"){if(!K$(qX,Z.format))throw TypeError("Unknown format option provided.");X=Z.format}let J=qX[X],z=a.filter;if(typeof Z.filter==="function"||e(Z.filter))z=Z.filter;let Y;if(Z.arrayFormat&&Z.arrayFormat in B4)Y=Z.arrayFormat;else if("indices"in Z)Y=Z.indices?"indices":"repeat";else Y=a.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:a.allowDots:!!Z.allowDots;return{addQueryPrefix:typeof Z.addQueryPrefix==="boolean"?Z.addQueryPrefix:a.addQueryPrefix,allowDots:V,allowEmptyArrays:typeof Z.allowEmptyArrays==="boolean"?!!Z.allowEmptyArrays:a.allowEmptyArrays,arrayFormat:Y,charset:$,charsetSentinel:typeof Z.charsetSentinel==="boolean"?Z.charsetSentinel:a.charsetSentinel,commaRoundTrip:!!Z.commaRoundTrip,delimiter:typeof Z.delimiter>"u"?a.delimiter:Z.delimiter,encode:typeof Z.encode==="boolean"?Z.encode:a.encode,encodeDotInKeys:typeof Z.encodeDotInKeys==="boolean"?Z.encodeDotInKeys:a.encodeDotInKeys,encoder:typeof Z.encoder==="function"?Z.encoder:a.encoder,encodeValuesOnly:typeof Z.encodeValuesOnly==="boolean"?Z.encodeValuesOnly:a.encodeValuesOnly,filter:z,format:X,formatter:J,serializeDate:typeof Z.serializeDate==="function"?Z.serializeDate:a.serializeDate,skipNulls:typeof Z.skipNulls==="boolean"?Z.skipNulls:a.skipNulls,sort:typeof Z.sort==="function"?Z.sort:null,strictNullHandling:typeof Z.strictNullHandling==="boolean"?Z.strictNullHandling:a.strictNullHandling}}function A4(Z,$={}){let X=Z,J=S9($),z,Y;if(typeof J.filter==="function")Y=J.filter,X=Y("",X);else if(e(J.filter))Y=J.filter,z=Y;let V=[];if(typeof X!=="object"||X===null)return"";let Q=B4[J.arrayFormat],U=Q==="comma"&&J.commaRoundTrip;if(!z)z=Object.keys(X);if(J.sort)z.sort(J.sort);let q=new WeakMap;for(let W=0;W<z.length;++W){let C=z[W];if(J.skipNulls&&X[C]===null)continue;H4(V,T4(X[C],C,Q,U,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,q))}let H=V.join(J.delimiter),w=J.addQueryPrefix===!0?"?":"";if(J.charsetSentinel)if(J.charset==="iso-8859-1")w+="utf8=%26%2310003%3B&";else w+="utf8=%E2%9C%93&";return H.length>0?w+H:""}var B4,H4=function(Z,$){Array.prototype.push.apply(Z,e($)?$:[$])},C4,a,HX;var x4=M(()=>{M4();MX();CZ();B4={brackets(Z){return String(Z)+"[]"},comma:"comma",indices(Z,$){return String(Z)+"["+$+"]"},repeat(Z){return String(Z)}},a={addQueryPrefix:!1,allowDots:!1,allowEmptyArrays:!1,arrayFormat:"indices",charset:"utf-8",charsetSentinel:!1,delimiter:"&",encode:!0,encodeDotInKeys:!1,encoder:O4,encodeValuesOnly:!1,format:GX,formatter:OX,indices:!1,serializeDate(Z){return(C4??(C4=Function.prototype.call.bind(Date.prototype.toISOString)))(Z)},skipNulls:!1,strictNullHandling:!1};HX={}});function L4(Z){return A4(Z,{arrayFormat:"brackets"})}var TX=M(()=>{x4()});function V$(Z){if(!Z)return;let $;try{$=new URL(Z)}catch(J){throw new f(`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 f(`Refusing to send credential over non-https token endpoint "${Z}"`)}async function N$(Z,$){let X=await E9(Z),J;try{J=JSON.parse(X)}catch{throw new f(`Token endpoint returned non-JSON response (status ${Z.status})`,Z.status,$Z(X),$)}if(!J.access_token)throw new f(`Token endpoint response missing access_token: ${JSON.stringify($Z(J))}`,Z.status,$Z(J),$);if(J.token_type&&J.token_type.toLowerCase()!=="bearer")throw new f(`Token endpoint response: unsupported token_type "${J.token_type}" (want Bearer)`,Z.status,$Z(J),$);return J}function $Z(Z){if(Z==null)return Z;if(typeof Z==="string"){let $;try{$=JSON.parse(Z)}catch{if(Z.length<=AX)return Z;return Z.slice(0,AX)+`... <${Z.length-AX} more chars>`}return JSON.stringify($Z($))}if(typeof Z==="object"&&!Array.isArray(Z)){let $={};for(let[X,J]of Object.entries(Z))if(F9.has(X))$[X]=J;return $}return null}async function W$(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 Y=z.mode&511;if(Y&18)throw new f(`Credentials file at ${J} is group/world-writable (mode 0o${Y.toString(8)}); this allows other local users to plant tokens. Run \`chmod 600 ${J}\`.`);if(Y&36)throw new f(`Credentials file at ${J} is group/world-readable (mode 0o${Y.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 Y=`${Z}.${process.pid}.${Math.random().toString(36).slice(2)}.tmp`;try{let V=await X.promises.open(Y,"w",384);try{await V.writeFile(JSON.stringify($,null,2)),await V.sync()}finally{await V.close()}await X.promises.rename(Y,Z)}catch(V){throw await X.promises.unlink(Y).catch(()=>{}),V}try{let V=await X.promises.open(z,"r");try{await V.sync()}finally{await V.close()}}catch{}}async function E9(Z){if(!Z.body)return"";let $=Z.body.getReader(),X=[],J=0;for(;;){let{done:Y,value:V}=await $.read();if(Y)break;if(J+V.length>D4){let Q=D4-J;if(Q>0)X.push(V.subarray(0,Q));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,Q)=>V+Q.length,0));let Y=0;for(let V of X)z.set(V,Y),Y+=V.length}return new TextDecoder("utf-8").decode(z)}var S4="urn:ietf:params:oauth:grant-type:jwt-bearer",j4="refresh_token",Q$="/v1/oauth/token",nZ="oauth-2025-04-20",F4="oidc-federation-2026-04-01",E4=120,W0=30,R4=5,D4=1048576,AX=2000,F9,f;var U0=M(()=>{v();F9=new Set(["error","error_description","error_uri"]);f=class f extends B{constructor(Z,$=null,X=null,J=null){super(Z);this.statusCode=$,this.body=X,this.requestId=J}}});function HZ(){return Math.floor(Date.now()/1000)}var Z8=()=>{};class xX{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-HZ();if(X>E4)return $.token;if(X>W0)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(HZ()-this.lastAdvisoryError<R4)return;this.doRefresh().catch((Z)=>{this.lastAdvisoryError=HZ(),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 I4=M(()=>{U0();Z8()});var F=(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 w0=()=>{};function y4(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 G0(Z){let $;return(P4??($=new globalThis.TextEncoder,P4=$.encode.bind($)))(Z)}function LX(Z){let $;return(k4??($=new globalThis.TextDecoder,k4=$.decode.bind($)))(Z)}var P4,k4;var w$=()=>{};var f4=M(()=>{v();w$()});function $8(){}function G$(Z,$,X){if(!$||O$[Z]>O$[X])return $8;else return $[Z].bind($)}function SX(Z,$){let X=b4.get(Z);if(X&&X[0]===$)return X[1];let J={error:G$("error",Z,$),warn:G$("warn",Z,$),info:G$("info",Z,$),debug:G$("debug",Z,$)};return b4.set(Z,[$,J]),J}function P(Z){let $=Z.logger,X=Z.logLevel??"off";if(!$)return R9;return SX($,X)}function g4(){let Z=F("ANTHROPIC_LOG");if(!DX||Z!==h4)h4=Z,DX=SX(console,q$(Z,"process.env['ANTHROPIC_LOG']",SX(console,X8))??X8);return DX}var X8="warn",O$,q$=(Z,$,X)=>{if(!Z)return;if(z4(O$,Z))return Z;X.warn(`${$} was set to ${JSON.stringify(Z)}, expected one of ${JSON.stringify(Object.keys(O$))}`);return},R9,b4,h4,DX,LZ=(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 EZ=M(()=>{CZ();w0();O$={off:0,error:200,warn:300,info:400,debug:500};R9={error:$8,warn:$8,info:$8,debug:$8},b4=new WeakMap});var _4=M(()=>{CZ();f4();w0();EZ();J$();V0();TX()});function v4(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(!I9.test(Z))throw Error(`profile name "${Z}" contains disallowed characters (allowed: letters, digits, '_', '.', '-')`)}var M$="1.0",I9,m4=async(Z)=>{var $,X;let J=await jX();if(J===null)return null;let z=Z??await c4();if(z===null)return null;v4(z);let Y=await import("node:fs"),Q=(await import("node:path")).join(J,"configs",`${z}.json`),U;try{U=await Y.promises.readFile(Q,"utf-8")}catch(w){if(w?.code!=="ENOENT")throw Error(`failed to read config file ${Q}: ${w}`);U=null}if(U===null){let w=F("ANTHROPIC_ORGANIZATION_ID"),W=F("ANTHROPIC_IDENTITY_TOKEN_FILE"),C=F("ANTHROPIC_FEDERATION_RULE_ID");if(C&&w)return{fromFile:!1,config:{organization_id:w,workspace_id:F("ANTHROPIC_WORKSPACE_ID"),base_url:F("ANTHROPIC_BASE_URL"),authentication:{type:"oidc_federation",federation_rule_id:C,service_account_id:F("ANTHROPIC_SERVICE_ACCOUNT_ID"),identity_token:W?{source:"file",path:W}:void 0,scope:F("ANTHROPIC_SCOPE")}}};return null}let q;try{q=JSON.parse(U)}catch(w){throw Error(`failed to parse config file ${Q}: ${w}`)}if(!q.authentication)throw Error(`config file ${Q} is missing "authentication"`);let H=q.authentication.type;if(H!=="oidc_federation"&&H!=="user_oauth")throw Error(`authentication.type "${H}" is not a known authentication type`);if(q.organization_id??(q.organization_id=F("ANTHROPIC_ORGANIZATION_ID")),q.workspace_id??(q.workspace_id=F("ANTHROPIC_WORKSPACE_ID")),q.base_url??(q.base_url=F("ANTHROPIC_BASE_URL")),($=q.authentication).scope??($.scope=F("ANTHROPIC_SCOPE")),q.authentication.type==="oidc_federation"){if(!q.authentication.identity_token){let w=F("ANTHROPIC_IDENTITY_TOKEN_FILE");if(w)q.authentication.identity_token={source:"file",path:w}}if(!q.authentication.federation_rule_id)q.authentication.federation_rule_id=F("ANTHROPIC_FEDERATION_RULE_ID")??"";(X=q.authentication).service_account_id??(X.service_account_id=F("ANTHROPIC_SERVICE_ACCOUNT_ID"))}return{config:q,fromFile:!0}},u4=async(Z,$)=>{if(Z?.authentication.credentials_path)return Z.authentication.credentials_path;let X=await jX();if(!X)return null;let J=$??await c4();if(!J)return null;return v4(J),(await import("node:path")).join(X,"credentials",`${J}.json`)},jX=async()=>{if(!P9())return null;let Z=await import("node:path"),$=F("ANTHROPIC_CONFIG_DIR");if($)return $;if(s0()["X-Stainless-OS"]==="Windows"){let Y=F("APPDATA");if(Y)return Z.join(Y,"Anthropic");let V=F("USERPROFILE");if(V)return Z.join(V,"AppData","Roaming","Anthropic");return null}let J=F("XDG_CONFIG_HOME");if(J)return Z.join(J,"anthropic");let z=F("HOME");if(z)return Z.join(z,".config","anthropic");return null},P9=()=>{let Z=s0()["X-Stainless-Runtime"];return Z==="node"||Z==="deno"},c4=async()=>{let Z=await jX();if(!Z)return null;let $=F("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(Y){if(Y?.code!=="ENOENT")throw Error(`failed to read ${z}: ${Y}`);return"default"}};var FX=M(()=>{z$();_4();I9=/^[A-Za-z0-9_.-]+$/});function EX(Z){if(!Z)throw new B("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 B(`Failed to read identity token file at ${Z}: ${z}`)}let J=X.trim();if(!J)throw new B(`Identity token file at ${Z} is empty`);return J}}function d4(Z){if(!Z)throw new B("Identity token value is empty");return()=>Z}var p4=M(()=>{v()});function l4(Z){return async()=>{V$(Z.baseURL);let $=await Z.identityTokenProvider();if($.length>16384)throw new f(`Identity token is ${Math.ceil($.length/1024)} KiB, exceeds the 16 KiB assertion limit`);let X={grant_type:S4,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}${Q$}`,z;try{z=await Z.fetch(J,{method:"POST",headers:{"Content-Type":"application/json","anthropic-beta":`${nZ},${F4}`,"User-Agent":Z.userAgent||`anthropic-sdk-typescript/${GZ} oidcFederationProvider`},body:JSON.stringify(X)})}catch(U){throw new f(`Failed to reach token endpoint ${J}: ${U}`)}let Y=z.headers.get("Request-Id");if(!z.ok){let U=await z.text().catch(()=>""),q=$Z(U),H="";if(z.status===401)H=` 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 f(`Token exchange failed with status ${z.status}${Y?` (request-id ${Y})`:""}: ${q}${H}`,z.status,q,Y)}let V=await N$(z,Y),Q=Number(V.expires_in);if(!Number.isFinite(Q))throw new f(`Token endpoint response missing required fields: ${JSON.stringify($Z(V))}`,z.status,$Z(V),Y);return{token:V.access_token,expiresAt:HZ()+Q}}}var i4=M(()=>{U0();Z8();t0()});function n4(Z){return async($)=>{let X=await import("node:fs");await W$(Z.credentialsPath,Z.onSafetyWarning);let J;try{J=await X.promises.readFile(Z.credentialsPath,"utf-8")}catch(L){throw new f(`Credentials file not found at ${Z.credentialsPath}: ${L}`)}let z;try{z=JSON.parse(J)}catch(L){throw new f(`Credentials file at ${Z.credentialsPath} is not valid JSON: ${L}`)}let Y=z.access_token;if(!Y)throw new f(`Credentials file at ${Z.credentialsPath} must include 'access_token'`);let V=z.expires_at;if(!$?.forceRefresh&&(V==null||HZ()<V-W0))return{token:Y,expiresAt:V??null};let Q=z.refresh_token;if(!Z.clientId||!Q)throw new f(`Access token at ${Z.credentialsPath} has expired and no refresh is available (client_id ${Z.clientId?"set":"empty"}, refresh_token ${Q?"set":"empty"})`);V$(Z.baseURL);let U={grant_type:j4,refresh_token:Q,client_id:Z.clientId},q=`${Z.baseURL}${Q$}`,H;try{H=await Z.fetch(q,{method:"POST",headers:{"Content-Type":"application/json","anthropic-beta":nZ,"User-Agent":Z.userAgent||`anthropic-sdk-typescript/${GZ} userOAuthProvider`},body:JSON.stringify(U)})}catch(L){throw new f(`User OAuth refresh failed to reach token endpoint: ${L}`)}let w=H.headers.get("Request-Id");if(!H.ok){let L=await H.text().catch(()=>"");throw new f(`User OAuth refresh failed (HTTP ${H.status}): ${$Z(L)}`,H.status,$Z(L),w)}let W=await N$(H,w),C=Number(W.expires_in);if(!Number.isFinite(C))throw new f(`User OAuth refresh response missing or invalid expires_in: ${JSON.stringify($Z(W))}`,H.status,$Z(W),w);let A=HZ()+C,j=W.refresh_token||Q;return await U$(Z.credentialsPath,{...z,version:M$,type:"oauth_token",access_token:W.access_token,expires_at:A,refresh_token:j}),{token:W.access_token,expiresAt:A}}}var a4=M(()=>{FX();U0();Z8();t0()});function RX(Z,$){let X=Z.authentication.credentials_path??null,J=(Z.base_url||$.baseURL).replace(/\/+$/,""),z=k9(Z,X,J,$),Y={};if(Z.workspace_id&&Z.authentication.type==="user_oauth")Y["anthropic-workspace-id"]=Z.workspace_id;return{provider:z,extraHeaders:Y,baseURL:Z.base_url||void 0}}async function o4(Z,$){let X=await m4($);if(!X)return null;let{config:J,fromFile:z}=X,Y=J.authentication.credentials_path||!z?J:{...J,authentication:{...J.authentication,credentials_path:await u4(J,$)??void 0}};return RX(Y,Z)}function k9(Z,$,X,J){switch(Z.authentication.type){case"oidc_federation":{let z=Z.authentication,Y=y9(z);if(!Y)throw new f("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 f("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 f("oidc_federation config requires organization_id (set ANTHROPIC_ORGANIZATION_ID or config.organization_id)");let V=l4({identityTokenProvider:Y,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 f9(V,$,J.onCacheWriteError,J.onSafetyWarning);return V}case"user_oauth":{if(!$)throw new f("user_oauth config requires authentication.credentials_path (or load via a profile so it defaults to <config_dir>/credentials/<profile>.json)");return n4({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 f(`authentication.type "${z}" is not a known authentication type`)}}}function y9(Z){if(Z.identity_token){let J=Z.identity_token.source;if(J!=="file")throw new f(`identity_token.source "${J}" is not supported by this SDK version (only "file")`);if(!Z.identity_token.path)throw new f('identity_token.source "file" requires a non-empty path');return EX(Z.identity_token.path)}let $=F("ANTHROPIC_IDENTITY_TOKEN_FILE");if($)return EX($);let X=F("ANTHROPIC_IDENTITY_TOKEN");if(X)return d4(X);return null}function f9(Z,$,X,J){return async(z)=>{let Y=await import("node:fs");await W$($,J);let V;try{let U=await Y.promises.readFile($,"utf-8");V=JSON.parse(U);let q=V?.access_token;if(q&&!z?.forceRefresh){let H=V?.expires_at;if(H==null||HZ()<H-W0)return{token:q,expiresAt:H??null}}}catch(U){if(U?.code!=="ENOENT"&&!(U instanceof SyntaxError))X?.(U)}let Q=await Z(z);try{await U$($,{...V??{},version:M$,type:"oauth_token",access_token:Q.token,expires_at:Q.expiresAt})}catch(U){X?.(U)}return Q}}var r4=M(()=>{w0();FX();U0();Z8();p4();i4();a4()});class yZ{constructor(){KZ.set(this,void 0),QZ.set(this,void 0),O(this,KZ,new Uint8Array,"f"),O(this,QZ,null,"f")}decode(Z){if(Z==null)return[];let $=Z instanceof ArrayBuffer?new Uint8Array(Z):typeof Z==="string"?G0(Z):Z;O(this,KZ,y4([K(this,KZ,"f"),$]),"f");let X=[],J;while((J=b9(K(this,KZ,"f"),K(this,QZ,"f")))!=null){if(J.carriage&&K(this,QZ,"f")==null){O(this,QZ,J.index,"f");continue}if(K(this,QZ,"f")!=null&&(J.index!==K(this,QZ,"f")+1||J.carriage)){X.push(LX(K(this,KZ,"f").subarray(0,K(this,QZ,"f")-1))),O(this,KZ,K(this,KZ,"f").subarray(K(this,QZ,"f")),"f"),O(this,QZ,null,"f");continue}let z=K(this,QZ,"f")!==null?J.preceding-1:J.preceding,Y=LX(K(this,KZ,"f").subarray(0,z));X.push(Y),O(this,KZ,K(this,KZ,"f").subarray(J.index),"f"),O(this,QZ,null,"f")}return X}flush(){if(!K(this,KZ,"f").length)return[];return this.decode(`
2
- `)}}function b9(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 t4(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 KZ,QZ;var IX=M(()=>{zZ();w$();KZ=new WeakMap,QZ=new WeakMap;yZ.NEWLINE_CHARS=new Set([`
3
- `,"\r"]);yZ.NEWLINE_REGEXP=/\r\n|[\n\r]/g});async function*s4(Z,$){if(!Z.body){if($.abort(),typeof globalThis.navigator<"u"&&globalThis.navigator.product==="ReactNative")throw new B("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 B("Attempted to iterate over a response with no body")}let X=new e4,J=new yZ,z=e0(Z.body);for await(let Y of h9(z))for(let V of J.decode(Y)){let Q=X.decode(V);if(Q)yield Q}for(let Y of J.flush()){let V=X.decode(Y);if(V)yield V}}async function*h9(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"?G0(X):X,z=new Uint8Array($.length+J.length);z.set($),z.set(J,$.length),$=z;let Y;while((Y=t4($))!==-1)yield $.slice(0,Y),$=$.slice(Y)}if($.length>0)yield $}class e4{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]=g9(Z,":");if(J.startsWith(" "))J=J.substring(1);if($==="event")this.event=J;else if($==="data")this.data.push(J);return null}}function g9(Z,$){let X=Z.indexOf($);if(X!==-1)return[Z.substring(0,X),$,Z.substring(X+$.length)];return[Z,"",""]}var J8,ZZ;var z8=M(()=>{zZ();v();N0();IX();N0();PZ();CZ();w$();EZ();v();ZZ=class ZZ{constructor(Z,$,X){this.iterator=Z,J8.set(this,void 0),this.controller=$,O(this,J8,X,"f")}static rawEvents(Z,$=new AbortController){return s4(Z,$)}static fromSSEResponse(Z,$,X){let J=!1,z=X?P(X):console;async function*Y(){if(J)throw new B("Cannot iterate over a consumed stream, use `.tee()` to split the stream.");J=!0;let V=!1;try{for await(let Q of s4(Z,$)){if(Q.event==="completion")try{yield JSON.parse(Q.data)}catch(U){throw z.error("Could not parse message into JSON:",Q.data),z.error("From chunk:",Q.raw),U}if(Q.event==="message_start"||Q.event==="message_delta"||Q.event==="message_stop"||Q.event==="content_block_start"||Q.event==="content_block_delta"||Q.event==="content_block_stop"||Q.event==="message"||Q.event==="user.message"||Q.event==="user.interrupt"||Q.event==="user.tool_confirmation"||Q.event==="user.custom_tool_result"||Q.event==="user.tool_result"||Q.event==="agent.message"||Q.event==="agent.thinking"||Q.event==="agent.tool_use"||Q.event==="agent.tool_result"||Q.event==="agent.mcp_tool_use"||Q.event==="agent.mcp_tool_result"||Q.event==="agent.custom_tool_use"||Q.event==="agent.thread_context_compacted"||Q.event==="session.status_running"||Q.event==="session.status_idle"||Q.event==="session.status_rescheduled"||Q.event==="session.status_terminated"||Q.event==="session.error"||Q.event==="session.deleted"||Q.event==="session.updated"||Q.event==="span.model_request_start"||Q.event==="span.model_request_end"||Q.event==="span.outcome_evaluation_start"||Q.event==="span.outcome_evaluation_ongoing"||Q.event==="span.outcome_evaluation_end"||Q.event==="user.define_outcome"||Q.event==="agent.thread_message_received"||Q.event==="agent.thread_message_sent"||Q.event==="agent.session_thread_message_received"||Q.event==="agent.session_thread_message_sent"||Q.event==="session.thread_created"||Q.event==="session.thread_status_created"||Q.event==="session.thread_status_running"||Q.event==="session.thread_status_idle"||Q.event==="session.thread_status_rescheduled"||Q.event==="session.thread_status_terminated"||Q.event==="event_start"||Q.event==="event_delta"||Q.event==="system.message")try{yield JSON.parse(Q.data)}catch(U){throw z.error("Could not parse message into JSON:",Q.data),z.error("From chunk:",Q.raw),U}if(Q.event==="ping")continue;if(Q.event==="error"){let U=r0(Q.data)??Q.data,q=U?.error?.type;throw new m(void 0,U,void 0,Z.headers,q)}}V=!0}catch(Q){if(wZ(Q))return;throw Q}finally{if(!V)$.abort()}}return new ZZ(Y,$,X)}static fromReadableStream(Z,$,X){let J=!1;async function*z(){let V=new yZ,Q=e0(Z);for await(let U of Q)for(let q of V.decode(U))yield q;for(let U of V.flush())yield U}async function*Y(){if(J)throw new B("Cannot iterate over a consumed stream, use `.tee()` to split the stream.");J=!0;let V=!1;try{for await(let Q of z()){if(V)continue;if(Q)yield JSON.parse(Q)}V=!0}catch(Q){if(wZ(Q))return;throw Q}finally{if(!V)$.abort()}}return new ZZ(Y,$,X)}[(J8=new WeakMap,Symbol.asyncIterator)](){return this.iterator()}tee(){let Z=[],$=[],X=this.iterator(),J=(z)=>{return{next:()=>{if(z.length===0){let Y=X.next();Z.push(Y),$.push(Y)}return z.shift()}}};return[new ZZ(()=>J(Z),this.controller,K(this,J8,"f")),new ZZ(()=>J($),this.controller,K(this,J8,"f"))]}toReadableStream(){let Z=this,$;return UX({async start(){$=Z[Symbol.asyncIterator]()},async pull(X){try{let{value:J,done:z}=await $.next();if(z)return X.close();let Y=G0(JSON.stringify(J)+`
5
- `);X.enqueue(Y)}catch(J){X.error(J)}},async cancel(){await $.return?.()}})}}});async function C$(Z,$){let{response:X,requestLogID:J,retryOfRequestLogID:z,startTime:Y}=$,V=await(async()=>{if($.options.stream)return P(Z).debug("response",X.status,X.url,X.headers,X.body),ZZ.fromSSEResponse(X,$.controller);if(X.status===204)return null;if($.options.__binaryResponse)return X;let U=X.headers.get("content-type")?.split(";")[0]?.trim();if(U?.includes("application/json")||U?.endsWith("+json")){if(X.headers.get("content-length")==="0")return;let W=await X.json();return Y8(W,X)}return await X.text()})();return P(Z).debug(`[${J}] response parsed`,LZ({retryOfRequestLogID:z,url:X.url,status:X.status,body:V,durationMs:Date.now()-Y})),V}function Y8(Z,$){if(!Z||typeof Z!=="object"||Array.isArray(Z))return Z;return Object.defineProperty(Z,"_request_id",{value:$.headers.get("request-id"),enumerable:!1})}var B$=M(()=>{z8();EZ()});function PX(Z){return typeof Z==="object"&&Z!==null&&$6.has(Z)}function X6(Z){let $=new Set;while(typeof Z==="object"&&Z!==null&&!$.has(Z)){if($.add(Z),PX(Z)||wZ(Z)||Z instanceof FZ||Z instanceof X$)return!0;Z=Z.cause}return!1}function kX(Z,$,X,J){return async(z,Y={})=>{if($.length===0)return Z.call(void 0,z,Y);let V=Y.headers instanceof Headers?Y.headers:new Headers(Y.headers),Q=await v9(Z,$,X,J)({...Y,headers:V,url:typeof z==="string"?z:z instanceof URL?z.href:z.url});if(Q.bodyUsed||Q.body?.locked)throw new B("middleware consumed the response body; use response.clone() to inspect it, or return new Response(body, response) to consume and replace it");return Q}}function _9(Z,$){let X=new WeakMap;return{options:Z,logger:$?P($):g4(),parse(J){if(Z?.stream&&J.ok)return Z6(J,Z);let z=X.get(J);if(!z)z=Z6(J,Z),X.set(J,z);return z}}}async function Z6(Z,$){if(Z.bodyUsed||Z.body?.locked)throw new B("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 ZZ.fromSSEResponse(Z.clone(),new AbortController);if(Z.status===204)return null;if($?.__binaryResponse)return Z;let J=Z.headers.get("content-type")?.split(";")[0]?.trim();if(J?.includes("application/json")||J?.endsWith("+json")){if(Z.headers.get("content-length")==="0")return;return Y8(await Z.clone().json(),Z)}return await Z.clone().text()}function v9(Z,$,X,J){let z=async({url:V,...Q})=>{try{return await Z.call(void 0,V,Q)}catch(U){let q=iZ(U);throw $6.add(q),q}},Y=_9(X,J);for(let V=$.length-1;V>=0;V--){let Q=$[V],U=z;z=async(q)=>Q(q,U,Y)}return z}var $6;var J6=M(()=>{PZ();B$();EZ();v();z8();$6=new WeakSet});var K8,aZ;var H$=M(()=>{zZ();B$();aZ=class aZ extends Promise{constructor(Z,$,X=C$){super((J)=>{J(null)});this.responsePromise=$,this.parseResponse=X,K8.set(this,void 0),O(this,K8,Z,"f")}_thenUnwrap(Z){return new aZ(K(this,K8,"f"),this.responsePromise,async($,X)=>Y8(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")}}parse(){if(!this.parsedPromise)this.parsedPromise=this.responsePromise.then((Z)=>this.parseResponse(K(this,K8,"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)}};K8=new WeakMap});var T$,A$,x$,TZ,S,yX;var y=M(()=>{zZ();v();B$();H$();CZ();A$=class A${constructor(Z,$,X,J){T$.set(this,void 0),O(this,T$,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 B("No next page expected; please check `.hasNextPage()` before calling `.getNextPage()`.");return await K(this,T$,"f").requestAPIList(this.constructor,Z)}async*iterPages(){let Z=this;yield Z;while(Z.hasNextPage())Z=await Z.getNextPage(),yield Z}async*[(T$=new WeakMap,Symbol.asyncIterator)](){for await(let Z of this.iterPages())for(let $ of Z.getPaginatedItems())yield $}};x$=class x$ extends aZ{constructor(Z,$,X){super(Z,$,async(J,z)=>new X(J,z.response,await C$(J,z),z.options))}async*[Symbol.asyncIterator](){let Z=await this;for await(let $ of Z)yield $}};TZ=class TZ extends A${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:{...o0(this.options.query),before_id:$}}}let Z=this.last_id;if(!Z)return null;return{...this.options,query:{...o0(this.options.query),after_id:Z}}}};S=class S extends A${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:{...o0(this.options.query),page:Z}}}};yX=class yX extends A${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:{...o0(this.options.query),page:Z}}}}});function oZ(Z,$,X){return bX(),new File(Z,$??"unknown_file",X)}function Q8(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 u9(Z){let $=typeof Z==="function"?Z:Z.fetch,X=z6.get($);if(X)return X;let J=(async()=>{try{let z="Response"in $?$.Response:(await $("data:,")).constructor,Y=new FormData;if(Y.toString()===await new z(Y).text())return!1;return!0}catch{return!0}})();return z6.set($,J),J}var bX=()=>{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`.":""))}},hX=(Z)=>Z!=null&&typeof Z==="object"&&typeof Z[Symbol.asyncIterator]==="function",O0=async(Z,$,X=!0)=>{return{...Z,body:await c9(Z.body,$,X)}},z6,c9=async(Z,$,X=!0)=>{if(!await u9($))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,Y])=>fX(J,z,Y,X))),J},d9=(Z)=>Z instanceof Blob&&("name"in Z),fX=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={},Y=X.headers.get("Content-Type");if(Y)z={type:Y};Z.append($,oZ([await X.blob()],Q8(X,J),z))}else if(hX(X))Z.append($,oZ([await new Response(Y$(X)).blob()],Q8(X,J)));else if(d9(X))Z.append($,oZ([X],Q8(X,J),{type:X.type}));else if(Array.isArray(X))await Promise.all(X.map((z)=>fX(Z,$+"[]",z,J)));else if(typeof X==="object")await Promise.all(Object.entries(X).map(([z,Y])=>fX(Z,`${$}[${z}]`,Y,J)));else throw TypeError(`Invalid value given to form, expected a string, number, boolean, object, Array, File or Blob but got ${X} instead`)};var q0=M(()=>{N0();z6=new WeakMap});async function L$(Z,$,X){if(bX(),Z=await Z,$||($=Q8(Z,!0)),p9(Z)){if(Z instanceof File&&$==null&&X==null)return Z;return oZ([await Z.arrayBuffer()],$??Z.name,{type:Z.type,lastModified:Z.lastModified,...X})}if(l9(Z)){let z=await Z.blob();return $||($=new URL(Z.url).pathname.split(/[\\/]/).pop()),oZ(await gX(z),$,X)}let J=await gX(Z);if(!X?.type){let z=J.find((Y)=>typeof Y==="object"&&("type"in Y)&&Y.type);if(typeof z==="string")X={...X,type:z}}return oZ(J,$,X)}async function gX(Z){let $=[];if(typeof Z==="string"||ArrayBuffer.isView(Z)||Z instanceof ArrayBuffer)$.push(Z);else if(Y6(Z))$.push(Z instanceof Blob?Z:await Z.arrayBuffer());else if(hX(Z))for await(let X of Z)$.push(...await gX(X));else{let X=Z?.constructor?.name;throw Error(`Unexpected data type: ${typeof Z}${X?`; constructor: ${X}`:""}${i9(Z)}`)}return $}function i9(Z){if(typeof Z!=="object"||Z===null)return"";return`; props: [${Object.getOwnPropertyNames(Z).map((X)=>`"${X}"`).join(", ")}]`}var Y6=(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",p9=(Z)=>Z!=null&&typeof Z==="object"&&typeof Z.name==="string"&&typeof Z.lastModified==="number"&&Y6(Z),l9=(Z)=>Z!=null&&typeof Z==="object"&&typeof Z.url==="string"&&typeof Z.blob==="function";var K6=M(()=>{q0();q0()});var _X=M(()=>{K6()});var Q6=()=>{};class x{constructor(Z){this._client=Z}}var I=()=>{};function*a9(Z){if(!Z)return;if(V6 in Z){let{values:J,nulls:z}=Z;yield*J.entries();for(let Y of z)yield[Y,null];return}let $=!1,X;if(Z instanceof Headers)X=Z.entries();else if(NX(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 Y=NX(J[1])?J[1]:[J[1]],V=!1;for(let Q of Y){if(Q===void 0)continue;if($&&!V)V=!0,yield[z,D$];yield[z,Q]}}}var V6,D$,o9,N6=(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[Y,V]of a9(J)){let Q=Y.toLowerCase();if(o9.has(Q)){if(V===D$)continue;if(V===null)$.delete(Y),X.add(Q);else $.set(Y,N6($.get(Y),V)),X.delete(Q);continue}if(V===D$||!z.has(Q)){if($.delete(Y),z.add(Q),V===D$)continue}if(V===null)$.delete(Y),X.add(Q);else $.append(Y,V),X.delete(Q)}}return{[V6]:!0,values:$,nulls:X}};var E=M(()=>{CZ();V6=Symbol.for("brand.privateNullableHeaders");D$=Symbol("clear"),o9=new Set(["x-stainless-helper"])});function U6(Z){return Z.replace(/[^A-Za-z0-9\-._~!$&'()*+,;=:@]+/g,encodeURIComponent)}var W6,r9=(Z=U6)=>function(X,...J){if(X.length===1)return X[0];let z=!1,Y=[],V=X.reduce((H,w,W)=>{if(/[?#]/.test(w))z=!0;let C=J[W],A=(z?encodeURIComponent:Z)(""+C);if(W!==J.length&&(C==null||typeof C==="object"&&C.toString===Object.getPrototypeOf(Object.getPrototypeOf(C.hasOwnProperty??W6)??W6)?.toString))A=C+"",Y.push({start:H.length+w.length,length:A.length,error:`Value of type ${Object.prototype.toString.call(C).slice(8,-1)} is not a valid path parameter`});return H+w+(W===J.length?"":A)},""),Q=V.split(/[?#]/,1)[0],U=/(?<=^|\/)(?:\.|%2e){1,2}(?=\/|$)/gi,q;while((q=U.exec(Q))!==null)Y.push({start:q.index,length:q[0].length,error:`Value "${q[0]}" can't be safely passed as a path parameter`});if(Y.sort((H,w)=>H.start-w.start),Y.length>0){let H=0,w=Y.reduce((W,C)=>{let A=" ".repeat(C.start-H),j="^".repeat(C.length);return H=C.start+C.length,W+A+j},"");throw new B(`Path parameters result in path with invalid segments:
6
- ${Y.map((W)=>W.error).join(`
7
- `)}
8
- ${V}
9
- ${w}`)}return V},G;var h=M(()=>{v();W6=Object.freeze(Object.create(null)),G=r9(U6)});var V8;var vX=M(()=>{I();y();E();h();V8=class V8 extends x{retrieve(Z,$={},X){let{betas:J}=$??{};return this._client.get(G`/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",S,{query:J,...$,headers:N([{"anthropic-beta":[...X??[],"managed-agents-2026-04-01"].toString()},$?.headers])})}}});var N8;var mX=M(()=>{I();y();E();h();N8=class N8 extends x{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(G`/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(G`/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",S,{query:J,...$,headers:N([{"anthropic-beta":[...X??[],"managed-agents-2026-04-01"].toString()},$?.headers])})}archive(Z,$={},X){let{betas:J}=$??{};return this._client.post(G`/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(G`/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(G`/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(G`/v1/deployments/${Z}/unpause?beta=true`,{...X,headers:N([{"anthropic-beta":[...J??[],"managed-agents-2026-04-01"].toString()},X?.headers])})}}});var W8;var uX=M(()=>{I();y();E();h();W8=class W8 extends x{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(G`/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",S,{query:J,...$,headers:N([{"anthropic-beta":[...X??[],"dreaming-2026-04-21"].toString()},$?.headers])})}archive(Z,$={},X){let{betas:J}=$??{};return this._client.post(G`/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(G`/v1/dreams/${Z}/cancel?beta=true`,{...X,headers:N([{"anthropic-beta":[...J??[],"dreaming-2026-04-21"].toString()},X?.headers])})}}});function G8(Z){return{["x-stainless-helper"]:Z}}function S$(Z){return typeof Z==="object"&&Z!==null&&U8 in Z}function cX(Z,$){let X=new Set;if(Z){for(let J of Z)if(S$(J))X.add(J[U8])}if($)for(let J of $){if(S$(J))X.add(J[U8]);let z=J.content;if(Array.isArray(z)){for(let Y of z)if(S$(Y))X.add(Y[U8])}}return Array.from(X)}function F$(Z,$){let X=cX(Z,$);if(X.length===0)return{};return{["x-stainless-helper"]:X.join(", ")}}function w6(Z){if(S$(Z))return{["x-stainless-helper"]:Z[U8]};return{}}var w8="x-stainless-helper",j$="x-stainless-helper-method",U8;var DZ=M(()=>{U8=Symbol("anthropic.sdk.stainlessHelper")});var O8;var dX=M(()=>{I();y();E();DZ();q0();h();O8=class O8 extends x{list(Z={},$){let{betas:X,...J}=Z??{};return this._client.getAPIList("/v1/files?beta=true",TZ,{query:J,...$,headers:N([{"anthropic-beta":[...X??[],"files-api-2025-04-14"].toString()},$?.headers])})}delete(Z,$={},X){let{betas:J}=$??{};return this._client.delete(G`/v1/files/${Z}?beta=true`,{...X,headers:N([{"anthropic-beta":[...J??[],"files-api-2025-04-14"].toString()},X?.headers])})}download(Z,$={},X){let{betas:J}=$??{};return this._client.get(G`/v1/files/${Z}/content?beta=true`,{...X,headers:N([{"anthropic-beta":[...J??[],"files-api-2025-04-14"].toString(),Accept:"application/binary"},X?.headers]),__binaryResponse:!0})}retrieveMetadata(Z,$={},X){let{betas:J}=$??{};return this._client.get(G`/v1/files/${Z}?beta=true`,{...X,headers:N([{"anthropic-beta":[...J??[],"files-api-2025-04-14"].toString()},X?.headers])})}upload(Z,$){let{betas:X,...J}=Z;return this._client.post("/v1/files?beta=true",O0({body:J,...$,headers:N([{"anthropic-beta":[...X??[],"files-api-2025-04-14"].toString()},w6(J.file),$?.headers])},this._client))}}});var q8;var pX=M(()=>{I();y();E();h();q8=class q8 extends x{retrieve(Z,$={},X){let{betas:J}=$??{};return this._client.get(G`/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",TZ,{query:J,...$,headers:N([{...X?.toString()!=null?{"anthropic-beta":X?.toString()}:void 0},$?.headers])})}}});var M8;var lX=M(()=>{I();y();E();h();M8=class M8 extends x{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-03-24"].toString()},$?.headers])})}retrieve(Z,$={},X){let{betas:J}=$??{};return this._client.get(G`/v1/user_profiles/${Z}?beta=true`,{...X,headers:N([{"anthropic-beta":[...J??[],"user-profiles-2026-03-24"].toString()},X?.headers])})}update(Z,$,X){let{betas:J,...z}=$;return this._client.post(G`/v1/user_profiles/${Z}?beta=true`,{body:z,...X,headers:N([{"anthropic-beta":[...J??[],"user-profiles-2026-03-24"].toString()},X?.headers])})}list(Z={},$){let{betas:X,...J}=Z??{};return this._client.getAPIList("/v1/user_profiles?beta=true",S,{query:J,...$,headers:N([{"anthropic-beta":[...X??[],"user-profiles-2026-03-24"].toString()},$?.headers])})}createEnrollmentURL(Z,$={},X){let{betas:J}=$??{};return this._client.post(G`/v1/user_profiles/${Z}/enrollment_url?beta=true`,{...X,headers:N([{"anthropic-beta":[...J??[],"user-profiles-2026-03-24"].toString()},X?.headers])})}}});var M6=E$((O6)=>{Object.defineProperty(O6,"__esModule",{value:!0});O6.timingSafeEqual=void 0;function G6(Z,$=""){if(!Z)throw Error($)}function J7(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:$);G6(Z instanceof DataView),G6($ instanceof DataView);let X=Z.byteLength,J=0,z=-1;while(++z<X)J|=Z.getUint8(z)^$.getUint8(z);return J===0}O6.timingSafeEqual=J7});var H6=E$((VZ)=>{var z7=VZ&&VZ.__extends||function(){var Z=function($,X){return Z=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(J,z){J.__proto__=z}||function(J,z){for(var Y in z)if(z.hasOwnProperty(Y))J[Y]=z[Y]},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(VZ,"__esModule",{value:!0});var i=256,iX=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 Y=$.length-J;if(Y>0){var z=$[J]<<16|(Y===2?$[J+1]<<8:0);if(X+=this._encodeByte(z>>>18&63),X+=this._encodeByte(z>>>12&63),Y===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)),Y=0,V=0,Q=0,U=0,q=0,H=0,w=0;for(;V<J-4;V+=4)U=this._decodeChar($.charCodeAt(V+0)),q=this._decodeChar($.charCodeAt(V+1)),H=this._decodeChar($.charCodeAt(V+2)),w=this._decodeChar($.charCodeAt(V+3)),z[Y++]=U<<2|q>>>4,z[Y++]=q<<4|H>>>2,z[Y++]=H<<6|w,Q|=U&i,Q|=q&i,Q|=H&i,Q|=w&i;if(V<J-1)U=this._decodeChar($.charCodeAt(V)),q=this._decodeChar($.charCodeAt(V+1)),z[Y++]=U<<2|q>>>4,Q|=U&i,Q|=q&i;if(V<J-2)H=this._decodeChar($.charCodeAt(V+2)),z[Y++]=q<<4|H>>>2,Q|=H&i;if(V<J-3)w=this._decodeChar($.charCodeAt(V+3)),z[Y++]=H<<6|w,Q|=w&i;if(Q!==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=i;return X+=(42-$&$-44)>>>8&-i+$-43+62,X+=(46-$&$-48)>>>8&-i+$-47+63,X+=(47-$&$-58)>>>8&-i+$-48+52,X+=(64-$&$-91)>>>8&-i+$-65+0,X+=(96-$&$-123)>>>8&-i+$-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}();VZ.Coder=iX;var C8=new iX;function Y7(Z){return C8.encode(Z)}VZ.encode=Y7;function K7(Z){return C8.decode(Z)}VZ.decode=K7;var C6=function(Z){z7($,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=i;return J+=(44-X&X-46)>>>8&-i+X-45+62,J+=(94-X&X-96)>>>8&-i+X-95+63,J+=(47-X&X-58)>>>8&-i+X-48+52,J+=(64-X&X-91)>>>8&-i+X-65+0,J+=(96-X&X-123)>>>8&-i+X-97+26,J},$}(iX);VZ.URLSafeCoder=C6;var B6=new C6;function Q7(Z){return B6.encode(Z)}VZ.encodeURLSafe=Q7;function V7(Z){return B6.decode(Z)}VZ.decodeURLSafe=V7;VZ.encodedLength=function(Z){return C8.encodedLength(Z)};VZ.maxDecodedLength=function(Z){return C8.maxDecodedLength(Z)};VZ.decodedLength=function(Z){return C8.decodedLength(Z)}});var A6=E$((T6,R$)=>{(function(Z,$){var X={};$(X);var J=X.default;for(var z in X)J[z]=X[z];if(typeof R$==="object"&&typeof R$.exports==="object")R$.exports=J;else if(typeof define==="function"&&define.amd)define(function(){return J});else Z.sha256=J})(T6,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(w,W,C,A,j){var L,D,T,R,k,b,n,g,l,_,d,UZ,lZ;while(j>=64){L=W[0],D=W[1],T=W[2],R=W[3],k=W[4],b=W[5],n=W[6],g=W[7];for(_=0;_<16;_++)d=A+_*4,w[_]=(C[d]&255)<<24|(C[d+1]&255)<<16|(C[d+2]&255)<<8|C[d+3]&255;for(_=16;_<64;_++)l=w[_-2],UZ=(l>>>17|l<<15)^(l>>>19|l<<13)^l>>>10,l=w[_-15],lZ=(l>>>7|l<<25)^(l>>>18|l<<14)^l>>>3,w[_]=(UZ+w[_-7]|0)+(lZ+w[_-16]|0);for(_=0;_<64;_++)UZ=(((k>>>6|k<<26)^(k>>>11|k<<21)^(k>>>25|k<<7))+(k&b^~k&n)|0)+(g+($[_]+w[_]|0)|0)|0,lZ=((L>>>2|L<<30)^(L>>>13|L<<19)^(L>>>22|L<<10))+(L&D^L&T^D&T)|0,g=n,n=b,b=k,k=R+UZ|0,R=T,T=D,D=L,L=UZ+lZ|0;W[0]+=L,W[1]+=D,W[2]+=T,W[3]+=R,W[4]+=k,W[5]+=b,W[6]+=n,W[7]+=g,A+=64,j-=64}return A}var J=function(){function w(){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 w.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},w.prototype.clean=function(){for(var W=0;W<this.buffer.length;W++)this.buffer[W]=0;for(var W=0;W<this.temp.length;W++)this.temp[W]=0;this.reset()},w.prototype.update=function(W,C){if(C===void 0)C=W.length;if(this.finished)throw Error("SHA256: can't update because hash was finished.");var A=0;if(this.bytesHashed+=C,this.bufferLength>0){while(this.bufferLength<64&&C>0)this.buffer[this.bufferLength++]=W[A++],C--;if(this.bufferLength===64)X(this.temp,this.state,this.buffer,0,64),this.bufferLength=0}if(C>=64)A=X(this.temp,this.state,W,A,C),C%=64;while(C>0)this.buffer[this.bufferLength++]=W[A++],C--;return this},w.prototype.finish=function(W){if(!this.finished){var C=this.bytesHashed,A=this.bufferLength,j=C/536870912|0,L=C<<3,D=C%64<56?64:128;this.buffer[A]=128;for(var T=A+1;T<D-8;T++)this.buffer[T]=0;this.buffer[D-8]=j>>>24&255,this.buffer[D-7]=j>>>16&255,this.buffer[D-6]=j>>>8&255,this.buffer[D-5]=j>>>0&255,this.buffer[D-4]=L>>>24&255,this.buffer[D-3]=L>>>16&255,this.buffer[D-2]=L>>>8&255,this.buffer[D-1]=L>>>0&255,X(this.temp,this.state,this.buffer,0,D),this.finished=!0}for(var T=0;T<8;T++)W[T*4+0]=this.state[T]>>>24&255,W[T*4+1]=this.state[T]>>>16&255,W[T*4+2]=this.state[T]>>>8&255,W[T*4+3]=this.state[T]>>>0&255;return this},w.prototype.digest=function(){var W=new Uint8Array(this.digestLength);return this.finish(W),W},w.prototype._saveState=function(W){for(var C=0;C<this.state.length;C++)W[C]=this.state[C]},w.prototype._restoreState=function(W,C){for(var A=0;A<this.state.length;A++)this.state[A]=W[A];this.bytesHashed=C,this.finished=!1,this.bufferLength=0},w}();Z.Hash=J;var z=function(){function w(W){this.inner=new J,this.outer=new J,this.blockSize=this.inner.blockSize,this.digestLength=this.inner.digestLength;var C=new Uint8Array(this.blockSize);if(W.length>this.blockSize)new J().update(W).finish(C).clean();else for(var A=0;A<W.length;A++)C[A]=W[A];for(var A=0;A<C.length;A++)C[A]^=54;this.inner.update(C);for(var A=0;A<C.length;A++)C[A]^=106;this.outer.update(C),this.istate=new Uint32Array(8),this.ostate=new Uint32Array(8),this.inner._saveState(this.istate),this.outer._saveState(this.ostate);for(var A=0;A<C.length;A++)C[A]=0}return w.prototype.reset=function(){return this.inner._restoreState(this.istate,this.inner.blockSize),this.outer._restoreState(this.ostate,this.outer.blockSize),this},w.prototype.clean=function(){for(var W=0;W<this.istate.length;W++)this.ostate[W]=this.istate[W]=0;this.inner.clean(),this.outer.clean()},w.prototype.update=function(W){return this.inner.update(W),this},w.prototype.finish=function(W){if(this.outer.finished)this.outer.finish(W);else this.inner.finish(W),this.outer.update(W,this.digestLength).finish(W);return this},w.prototype.digest=function(){var W=new Uint8Array(this.digestLength);return this.finish(W),W},w}();Z.HMAC=z;function Y(w){var W=new J().update(w),C=W.digest();return W.clean(),C}Z.hash=Y,Z.default=Y;function V(w,W){var C=new z(w).update(W),A=C.digest();return C.clean(),A}Z.hmac=V;function Q(w,W,C,A){var j=A[0];if(j===0)throw Error("hkdf: cannot expand more");if(W.reset(),j>1)W.update(w);if(C)W.update(C);W.update(A),W.finish(w),A[0]++}var U=new Uint8Array(Z.digestLength);function q(w,W,C,A){if(W===void 0)W=U;if(A===void 0)A=32;var j=new Uint8Array([1]),L=V(W,w),D=new z(L),T=new Uint8Array(D.digestLength),R=T.length,k=new Uint8Array(A);for(var b=0;b<A;b++){if(R===T.length)Q(T,D,C,j),R=0;k[b]=T[R++]}return D.clean(),T.fill(0),j.fill(0),k}Z.hkdf=q;function H(w,W,C,A){var j=new z(w),L=j.digestLength,D=new Uint8Array(4),T=new Uint8Array(L),R=new Uint8Array(L),k=new Uint8Array(A);for(var b=0;b*L<A;b++){var n=b+1;D[0]=n>>>24&255,D[1]=n>>>16&255,D[2]=n>>>8&255,D[3]=n>>>0&255,j.reset(),j.update(W),j.update(D),j.finish(R);for(var g=0;g<L;g++)T[g]=R[g];for(var g=2;g<=C;g++){j.reset(),j.update(R).finish(R);for(var l=0;l<L;l++)T[l]^=R[l]}for(var g=0;g<L&&b*L+g<A;g++)k[b*L+g]=T[g]}for(var b=0;b<L;b++)T[b]=R[b]=0;for(var b=0;b<4;b++)D[b]=0;return j.clean(),k}Z.pbkdf2=H})});var j6=E$((D6)=>{Object.defineProperty(D6,"__esModule",{value:!0});D6.Webhook=D6.WebhookVerificationError=void 0;var N7=M6(),x6=H6(),W7=A6(),L6=300;class nX extends Error{constructor(Z){super(Z);Object.setPrototypeOf(this,nX.prototype),this.name="ExtendableError",this.stack=Error(Z).stack}}class fZ extends nX{constructor(Z){super(Z);Object.setPrototypeOf(this,fZ.prototype),this.name="WebhookVerificationError"}}D6.WebhookVerificationError=fZ;class B8{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(B8.prefix))Z=Z.substring(B8.prefix.length);this.key=x6.decode(Z)}}verify(Z,$){let X={};for(let w of Object.keys($))X[w.toLowerCase()]=$[w];let J=X["webhook-id"],z=X["webhook-signature"],Y=X["webhook-timestamp"];if(!z||!J||!Y)throw new fZ("Missing required headers");let V=this.verifyTimestamp(Y),U=this.sign(J,V,Z).split(",")[1],q=z.split(" "),H=new globalThis.TextEncoder;for(let w of q){let[W,C]=w.split(",");if(W!=="v1")continue;if((0,N7.timingSafeEqual)(H.encode(C),H.encode(U)))return JSON.parse(Z.toString())}throw new fZ("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),Y=J.encode(`${Z}.${z}.${X}`);return`v1,${x6.encode(W7.hmac(this.key,Y))}`}verifyTimestamp(Z){let $=Math.floor(Date.now()/1000),X=parseInt(Z,10);if(isNaN(X))throw new fZ("Invalid Signature Headers");if($-X>L6)throw new fZ("Message timestamp too old");if(X>$+L6)throw new fZ("Message timestamp too new");return new Date(X*1000)}}D6.Webhook=B8;B8.prefix="whsec_"});var F6,H8;var aX=M(()=>{I();F6=w7(j6(),1);H8=class H8 extends x{unwrap(Z,{headers:$,key:X}){if($!==void 0){let J=X===void 0?this._client.webhookKey:X;if(J===null)throw Error("Webhook key must not be null in order to unwrap");new F6.Webhook(J).verify(Z,$)}return JSON.parse(Z)}}});var T8;var oX=M(()=>{I();y();E();h();T8=class T8 extends x{list(Z,$={},X){let{betas:J,...z}=$??{};return this._client.getAPIList(G`/v1/agents/${Z}/versions?beta=true`,S,{query:z,...X,headers:N([{"anthropic-beta":[...J??[],"managed-agents-2026-04-01"].toString()},X?.headers])})}}});var M0;var rX=M(()=>{I();oX();oX();y();E();h();M0=class M0 extends x{constructor(){super(...arguments);this.versions=new T8(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(G`/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(G`/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",S,{query:J,...$,headers:N([{"anthropic-beta":[...X??[],"managed-agents-2026-04-01"].toString()},$?.headers])})}archive(Z,$={},X){let{betas:J}=$??{};return this._client.post(G`/v1/agents/${Z}/archive?beta=true`,{...X,headers:N([{"anthropic-beta":[...J??[],"managed-agents-2026-04-01"].toString()},X?.headers])})}};M0.Versions=T8});function rZ(Z,$){if(!Z)return()=>{};if(Z.aborted)return $.abort(),()=>{};let X=()=>$.abort();return Z.addEventListener("abort",X),()=>Z.removeEventListener("abort",X)}var I$=()=>{};function bZ(Z,$){return Z instanceof m&&Z.status===$}function E6(Z){return Z instanceof m&&typeof Z.status==="number"&&Z.status>=400&&Z.status<500}function hZ(Z){return E6(Z)&&!bZ(Z,408)&&!bZ(Z,409)&&!bZ(Z,429)}function R6(Z,$,X){return Math.min($*2**Z,X)}function tX(Z,$){return Z+Math.random()*($-Z)}function I6(Z){return Z*(1-Math.random()*0.25)}var A8=M(()=>{v()});function P$(Z,{authToken:$,helper:X}){if(!$)throw new B(`copyClientForHelper: expected a non-empty authToken but received ${JSON.stringify($)}`);let J=Z,z=J._options.defaultHeaders,Y=J._authState?.extraHeaders,V=Y?Object.fromEntries(Object.entries(Y).filter(([U])=>{let q=U.toLowerCase();return q!=="authorization"&&q!=="x-api-key"})):void 0,Q=N([V,z,{[w8]:X}]);return Z.withOptions({apiKey:null,authToken:$,baseURL:Z.baseURL,credentials:void 0,defaultHeaders:Q})}var sX=M(()=>{v();E();DZ()});function H7(Z){return R6(Z,C7,B7)}function T7(){let $=globalThis.process?.env?.HOSTNAME;return $?`${$}-${Q0()}`:Q0()}var C0,k$,OZ,y$,f$,b$,x8,L8,B0,M7=999,C7=1000,B7=60000,tZ;var h$=M(()=>{zZ();v();EZ();V0();J$();I$();E();A8();sX();A8();tZ=class tZ{constructor(Z){C0.set(this,void 0),k$.set(this,!1),OZ.set(this,void 0),y$.set(this,void 0),f$.set(this,void 0),b$.set(this,void 0),x8.set(this,void 0),L8.set(this,void 0),B0.set(this,void 0),this.client=Z.client,this.environmentId=Z.environmentId,this.environmentKey=Z.environmentKey,this.workerId=Z.workerId??T7(),O(this,C0,P$(Z.client,{authToken:Z.environmentKey,helper:"environments-work-poller"}),"f"),O(this,f$,Z.autoStop??!0,"f"),O(this,b$,Z.drain??!1,"f"),O(this,x8,Z.blockMs===void 0?M7:Z.blockMs,"f"),O(this,L8,Z.reclaimOlderThanMs??null,"f"),O(this,B0,Z.requestOptions,"f"),O(this,OZ,new AbortController,"f"),O(this,y$,rZ(Z.signal,K(this,OZ,"f")),"f")}get signal(){return K(this,OZ,"f").signal}abort(){K(this,OZ,"f").abort()}async*[(C0=new WeakMap,k$=new WeakMap,OZ=new WeakMap,y$=new WeakMap,f$=new WeakMap,b$=new WeakMap,x8=new WeakMap,L8=new WeakMap,B0=new WeakMap,Symbol.asyncIterator)](){if(K(this,k$,"f"))throw new B("Cannot iterate over a consumed WorkPoller");O(this,k$,!0,"f");let Z=P(this.client);Z.info("poller starting",{component:"work-poller",environment_id:this.environmentId});try{let $=0;while(!K(this,OZ,"f").signal.aborted){let X;try{X=await K(this,C0,"f").beta.environments.work.poll(this.environmentId,{"Anthropic-Worker-ID":this.workerId,...K(this,x8,"f")!==null?{block_ms:K(this,x8,"f")}:{},...K(this,L8,"f")!==null?{reclaim_older_than_ms:K(this,L8,"f")}:{}},{headers:N([K(this,B0,"f")?.headers]),signal:K(this,OZ,"f").signal})}catch(J){if(K(this,OZ,"f").signal.aborted)return;if(hZ(J))throw Z.error("poll failed permanently, stopping poller",{error:String(J)}),J;let z=I6(H7($));Z.warn("poll failed, backing off",{error:String(J),backoff_ms:z}),$++,await BZ(z,K(this,OZ,"f").signal);continue}if($=0,X==null){if(K(this,b$,"f"))return;await BZ(tX(1000,3000),K(this,OZ,"f").signal);continue}Z.info("claimed work",{component:"work-poller",environment_id:this.environmentId,work_id:X.id,work_type:X.data.type});try{await K(this,C0,"f").beta.environments.work.ack(X.id,{environment_id:X.environment_id},{headers:N([K(this,B0,"f")?.headers]),signal:K(this,OZ,"f").signal})}catch(J){Z.error("ack failed",{work_id:X.id,error:String(J)});continue}try{yield X}finally{if(K(this,f$,"f"))try{await K(this,C0,"f").beta.environments.work.stop(X.id,{environment_id:X.environment_id},{headers:N([K(this,B0,"f")?.headers])})}catch(J){if(!bZ(J,409))Z.warn("stop failed",{work_id:X.id,error:String(J)})}}}}finally{K(this,y$,"f").call(this)}}}});class eX{constructor(){H0.set(this,[]),gZ.set(this,[]),T0.set(this,!1)}push(Z){if(K(this,T0,"f"))return!1;let $=K(this,gZ,"f").shift();if($)$({done:!1,value:Z});else K(this,H0,"f").push(Z);return!0}close(){if(K(this,T0,"f"))return;O(this,T0,!0,"f");while(K(this,gZ,"f").length>0)K(this,gZ,"f").shift()({done:!0,value:void 0})}next(Z){if(K(this,H0,"f").length>0)return Promise.resolve({done:!1,value:K(this,H0,"f").shift()});if(K(this,T0,"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=K(this,gZ,"f").indexOf(X);if(z>=0)K(this,gZ,"f").splice(z,1);$({done:!0,value:void 0})};K(this,gZ,"f").push(X),Z?.addEventListener("abort",J,{once:!0})})}tryShift(){return K(this,H0,"f").shift()}}var H0,gZ,T0;var P6=M(()=>{zZ();H0=new WeakMap,gZ=new WeakMap,T0=new WeakMap});function Z1(Z){return"name"in Z?Z.name:Z.mcp_server_name}function A7(Z){return Z instanceof kZ?Z.content:`Error: ${Z instanceof Error?Z.message:String(Z)}`}async function k6(Z,$,X){try{let J=Z.parse?Z.parse($):$;return{content:await Z.run(J,X),isError:!1}}catch(J){return{content:A7(J),isError:!0}}}var y6=M(()=>{a0()});function d6(Z){return Z.type==="session.status_idle"&&Z.stop_reason?.type==="end_turn"}class p6{constructor(Z,$){D8.set(this,void 0),c$.set(this,void 0),A0.set(this,new Set),sZ.set(this,!1),AZ.set(this,void 0),O(this,D8,Z,"f"),O(this,c$,$,"f")}noteEvent(Z){if(Z.type==="user.tool_confirmation")return;if(d6(Z))this.arm();else this.disarm()}block(Z){if(K(this,A0,"f").add(Z),K(this,AZ,"f")!==void 0)O(this,sZ,!0,"f"),clearTimeout(K(this,AZ,"f")),O(this,AZ,void 0,"f")}unblock(Z){if(K(this,A0,"f").delete(Z),K(this,A0,"f").size===0&&K(this,sZ,"f"))this.arm()}arm(){if(K(this,D8,"f")<=0)return;if(K(this,A0,"f").size>0){O(this,sZ,!0,"f");return}if(O(this,sZ,!1,"f"),K(this,AZ,"f")!==void 0)clearTimeout(K(this,AZ,"f"));O(this,AZ,setTimeout(K(this,c$,"f"),K(this,D8,"f")),"f")}disarm(){if(O(this,sZ,!1,"f"),K(this,AZ,"f")!==void 0)clearTimeout(K(this,AZ,"f")),O(this,AZ,void 0,"f")}}function j7(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 F7(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 D8,c$,A0,sZ,AZ,u,g$,t,_$,S8,d$,o,L0,NZ,D0,_Z,x0,RZ,j8,qZ,v$,u6,f6,b6,h6,$1,g6,m$,u$,X1,_6,c6,v6=500,x7=1e4,L7=120000,D7=30000,m6=3,S7=60000,eZ;var p$=M(()=>{zZ();v();EZ();V0();A8();I$();P6();E();DZ();y6();D8=new WeakMap,c$=new WeakMap,A0=new WeakMap,sZ=new WeakMap,AZ=new WeakMap;eZ=class eZ{constructor(Z,$){u.add(this),g$.set(this,!1),t.set(this,void 0),_$.set(this,void 0),S8.set(this,void 0),d$.set(this,void 0),o.set(this,void 0),L0.set(this,new Set),NZ.set(this,new Set),D0.set(this,new Map),_Z.set(this,new Map),x0.set(this,new eX),RZ.set(this,0),j8.set(this,null),qZ.set(this,void 0),this.client=$.client,this.sessionId=Z,this.tools=$.tools,this.maxIdleMs=$.maxIdleMs??S7,O(this,o,P($.client),"f"),O(this,d$,new Map($.tools.map((X)=>[Z1(X),X])),"f"),O(this,t,new AbortController,"f"),O(this,_$,rZ($.signal,K(this,t,"f")),"f"),O(this,S8,$.requestOptions,"f"),O(this,qZ,new p6(this.maxIdleMs,()=>{K(this,o,"f").info("session idle after end_turn; stopping",{component:"session-tool-runner",session_id:this.sessionId,max_idle_ms:this.maxIdleMs}),K(this,t,"f").abort()}),"f")}get signal(){return K(this,t,"f").signal}abort(){K(this,t,"f").abort()}async*[(g$=new WeakMap,t=new WeakMap,_$=new WeakMap,S8=new WeakMap,d$=new WeakMap,o=new WeakMap,L0=new WeakMap,NZ=new WeakMap,D0=new WeakMap,_Z=new WeakMap,x0=new WeakMap,RZ=new WeakMap,j8=new WeakMap,qZ=new WeakMap,u=new WeakSet,Symbol.asyncIterator)](){if(K(this,g$,"f"))throw new B("Cannot iterate over a consumed SessionToolRunner");O(this,g$,!0,"f"),K(this,o,"f").info("session tool runner starting",{component:"session-tool-runner",session_id:this.sessionId});let Z=K(this,u,"m",u6).call(this).catch(($)=>{if(!K(this,t,"f").signal.aborted)K(this,o,"f").error("stream loop failed",{error:String($)});K(this,t,"f").abort()});try{while(!0){let X=await K(this,x0,"f").next(K(this,t,"f").signal);if(X.done)break;yield X.value}await Z;let $;while(($=K(this,x0,"f").tryShift())!==void 0)yield $}finally{K(this,t,"f").abort(),K(this,qZ,"f").disarm(),await Z;try{await K(this,u,"m",c6).call(this)}catch($){K(this,o,"f").warn("drain failed",{error:String($)})}K(this,x0,"f").close();for(let $ of this.tools)try{await $.close?.()}catch(X){K(this,o,"f").warn("tool.close failed",{tool:Z1($),error:String(X)})}K(this,_$,"f").call(this)}}};v$=function(){return{...K(this,S8,"f"),headers:N([G8("session-tool-runner"),K(this,S8,"f")?.headers]),signal:K(this,t,"f").signal}},u6=async function(){let $=K(this,t,"f"),X=v6;while(!$.signal.aborted){try{let J=await this.client.beta.sessions.events.stream(this.sessionId,{},K(this,u,"m",v$).call(this));await K(this,u,"m",f6).call(this);for await(let z of J)if(X=v6,await K(this,u,"m",h6).call(this,z))return}catch(J){if($.signal.throwIfAborted(),hZ(J))throw K(this,o,"f").error("permanent stream failure, shutting down",{error:String(J)}),$.abort(),J;K(this,o,"f").warn("stream disconnected, reconnecting",{error:String(J),backoff_ms:X})}$.signal.throwIfAborted(),await BZ(X,$.signal),X=Math.min(X*2,x7)}},f6=async function(){let $=K(this,t,"f"),X=[],J=!1;try{for await(let V of this.client.beta.sessions.events.list(this.sessionId,{limit:1000},K(this,u,"m",v$).call(this)))K(this,u,"m",b6).call(this,V,X),J=d6(V)}catch(V){$.signal.throwIfAborted(),K(this,o,"f").warn("reconcile list failed",{error:String(V)});for(let Q of X)K(this,L0,"f").delete(Q.id);return}let z=X.filter((V)=>!K(this,NZ,"f").has(V.id));K(this,qZ,"f").disarm();for(let V of z)await K(this,u,"m",$1).call(this,V);for(let V of[...K(this,_Z,"f").values()]){let Q=K(this,D0,"f").get(V.id);if(Q!==void 0)await K(this,u,"m",m$).call(this,V,Q)}let Y=z.filter((V)=>!K(this,NZ,"f").has(V.id)&&!K(this,_Z,"f").has(V.id));if(J&&Y.length===0)K(this,qZ,"f").arm();else K(this,qZ,"f").disarm()},b6=function($,X){if($.type==="agent.tool_use"||$.type==="agent.custom_tool_use"){if(K(this,L0,"f").add($.id),!K(this,NZ,"f").has($.id))X.push($)}else if($.type==="user.tool_result")K(this,NZ,"f").add($.tool_use_id);else if($.type==="user.custom_tool_result")K(this,NZ,"f").add($.custom_tool_use_id);else if($.type==="user.tool_confirmation"){if(!K(this,NZ,"f").has($.tool_use_id))K(this,D0,"f").set($.tool_use_id,$.result)}},h6=async function($){switch(K(this,qZ,"f").noteEvent($),$.type){case"agent.tool_use":case"agent.custom_tool_use":if(!K(this,L0,"f").has($.id))K(this,L0,"f").add($.id),await K(this,u,"m",$1).call(this,$);return!1;case"user.tool_confirmation":return await K(this,u,"m",g6).call(this,$),!1;case"user.tool_result":return K(this,NZ,"f").add($.tool_use_id),!1;case"user.custom_tool_result":return K(this,NZ,"f").add($.custom_tool_use_id),!1;case"session.status_terminated":case"session.deleted":return K(this,o,"f").info("session terminated",{component:"session-tool-runner",session_id:this.sessionId}),K(this,t,"f").abort(),!0;default:return!1}},$1=async function($){let X=$.evaluated_permission,J=X==="deny"?"deny":K(this,D0,"f").get($.id);if(J===void 0){if(X===void 0||X==="allow")await K(this,u,"m",X1).call(this,$,void 0);else if(!K(this,_Z,"f").has($.id))K(this,o,"f").info("tool call awaiting confirmation; holding",{component:"session-tool-runner",session_id:this.sessionId,tool:$.name,tool_use_id:$.id}),K(this,_Z,"f").set($.id,$),K(this,qZ,"f").block($.id);return}await K(this,u,"m",m$).call(this,$,J)},g6=async function($){K(this,D0,"f").set($.tool_use_id,$.result);let X=K(this,_Z,"f").get($.tool_use_id);if(X===void 0)return;await K(this,u,"m",m$).call(this,X,$.result)},m$=async function($,X){let J=K(this,_Z,"f").delete($.id);if(X==="allow"){if(K(this,o,"f").info("tool call confirmed",{component:"session-tool-runner",session_id:this.sessionId,tool:$.name,tool_use_id:$.id}),!J)K(this,qZ,"f").block($.id);try{await K(this,u,"m",X1).call(this,$,"allow")}finally{K(this,qZ,"f").unblock($.id)}return}if(J)K(this,qZ,"f").unblock($.id);K(this,NZ,"f").add($.id),K(this,o,"f").info("tool call denied; not executing",{component:"session-tool-runner",session_id:this.sessionId,tool:$.name,tool_use_id:$.id}),K(this,u,"m",u$).call(this,{event:$,toolUseId:$.id,name:$.name,isError:!1,posted:!1,confirmation:"deny"})},u$=function($){K(this,x0,"f").push($)},X1=async function($,X){var J,z;if(K(this,NZ,"f").has($.id))return;K(this,o,"f").info("executing tool",{component:"session-tool-runner",session_id:this.sessionId,tool:$.name,tool_use_id:$.id}),O(this,RZ,(J=K(this,RZ,"f"),J++,J),"f");try{let Y=K(this,d$,"f").get($.name);if(!Y){K(this,o,"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}),K(this,u,"m",u$).call(this,{event:$,toolUseId:$.id,name:$.name,isError:!1,posted:!1,confirmation:X});return}let V,Q,U=new AbortController,q=rZ(K(this,t,"f").signal,U),H=setTimeout(()=>U.abort(),L7);try{let C=await k6(Y,$.input,{toolUse:$,toolUseBlock:$,signal:U.signal});V=C.content,Q=C.isError}finally{clearTimeout(H),q()}let w=j7($,Q,F7(V)),W=await K(this,u,"m",_6).call(this,w,$.id);K(this,u,"m",u$).call(this,{event:$,result:w,toolUseId:$.id,name:$.name,isError:Q,posted:W,confirmation:X})}finally{if(O(this,RZ,(z=K(this,RZ,"f"),z--,z),"f"),K(this,RZ,"f")===0)K(this,j8,"f")?.call(this)}},_6=async function($,X){let J=K(this,t,"f"),z;for(let Y=0;Y<m6;Y++){J.signal.throwIfAborted();try{return await this.client.beta.sessions.events.send(this.sessionId,{events:[$]},K(this,u,"m",v$).call(this)),K(this,NZ,"f").add(X),!0}catch(V){if(z=V,hZ(V))break;if(Y<m6-1)await BZ((Y+1)*1000,J.signal)}}return K(this,o,"f").error("failed to send tool result",{tool_use_id:X,error:String(z)}),!1},c6=async function(){if(K(this,RZ,"f")===0)return;if(await Promise.race([new Promise(($)=>O(this,j8,$,"f")),BZ(D7)]),O(this,j8,null,"f"),K(this,RZ,"f")>0)K(this,o,"f").warn("drain timeout exceeded")}});class E8{constructor(Z){l$.add(this),F8.set(this,void 0),this.client=Z.client,this.environmentId=Z.environmentId,this.environmentKey=Z.environmentKey,this.tools=Z.tools,this.workdir=Z.workdir??process.cwd(),this.unrestrictedPaths=Z.unrestrictedPaths,this.maxFileBytes=Z.maxFileBytes,this.maxIdleMs=Z.maxIdleMs,this.workerId=Z.workerId,this.requestOptions=Z.requestOptions,O(this,F8,Z.signal,"f")}async run(Z){let{environmentId:$,environmentKey:X}=this;if($===void 0||X===void 0)throw new B("EnvironmentWorker.run: environmentId and environmentKey are required to poll for work");let J=Z??K(this,F8,"f"),z=new tZ({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 Y of z)await K(this,l$,"m",J1).call(this,Y,X,z.signal)}async handleItem(Z){let $=Z?.workId??F("ANTHROPIC_WORK_ID"),X=Z?.environmentId??F("ANTHROPIC_ENVIRONMENT_ID"),J=Z?.sessionId??F("ANTHROPIC_SESSION_ID"),z=Z?.environmentKey??this.environmentKey??F("ANTHROPIC_ENVIRONMENT_KEY");if(!$)throw new B("handleItem: workId is required — pass it or set ANTHROPIC_WORK_ID");if(!X)throw new B("handleItem: environmentId is required — pass it or set ANTHROPIC_ENVIRONMENT_ID");if(!J)throw new B("handleItem: sessionId is required — pass it or set ANTHROPIC_SESSION_ID");if(!z)throw new B("handleItem: environmentKey is required — pass it, construct the worker with it, or set ANTHROPIC_ENVIRONMENT_KEY");let Y={id:$,environment_id:X,data:{type:"session",id:J}};await K(this,l$,"m",J1).call(this,Y,z,Z?.signal??K(this,F8,"f"))}}async function R7(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(!bZ(z,409))X.error("force-stop on exit failed",{work_id:$.id,error:String(z)})}}async function I7(Z,$,X,J,z){let Y=l6,V=E7,Q=async()=>{try{let U=await Z.beta.environments.work.heartbeat($.id,{environment_id:$.environment_id,expected_last_heartbeat:V},{...z,headers:N([z?.headers]),signal:X.signal});if(V=U.last_heartbeat,U.ttl_seconds>0)Y=Math.max(1000,Math.min(U.ttl_seconds*1000/2,l6));if(U.state==="stopping"||U.state==="stopped")J.info("heartbeat signals shutdown",{work_id:$.id,state:U.state}),X.abort();if(!U.lease_extended)J.warn("lease not extended, shutting down",{work_id:$.id}),X.abort()}catch(U){if(X.signal.throwIfAborted(),hZ(U))throw J.error("permanent heartbeat failure",{work_id:$.id,error:String(U)}),X.abort(),U;J.warn("transient heartbeat failure",{work_id:$.id,error:String(U)})}};await Q();while(!X.signal.aborted)await BZ(Y,X.signal),X.signal.throwIfAborted(),await Q()}var l$,F8,J1,l6=30000,E7="NO_HEARTBEAT";var z1=M(()=>{zZ();v();EZ();w0();V0();A8();I$();E();p$();h$();sX();F8=new WeakMap,l$=new WeakSet,J1=async function($,X,J){let z=P(this.client),Y=P$(this.client,{authToken:X,helper:"environments-worker"}),V=$.data.id,Q={workdir:this.workdir,client:this.client,sessionId:V,...this.unrestrictedPaths!==void 0?{unrestrictedPaths:this.unrestrictedPaths}:{},...this.maxFileBytes!==void 0?{maxFileBytes:this.maxFileBytes}:{}},U=await import("./node-1.0.13-jb6nf3sf.mjs"),q=async()=>{};try{q=await U.setupSkills(Q)}catch(A){z.warn("skill setup failed",{session_id:V,work_id:$.id,error:String(A)})}let H=typeof this.tools==="function"?this.tools(Q):this.tools??U.betaAgentToolset20260401(Q),w=new AbortController,W=rZ(J,w),C=I7(Y,$,w,z,this.requestOptions).catch((A)=>{if(!w.signal.aborted)z.error("heartbeat loop failed",{work_id:$.id,error:String(A)});w.abort()});try{let A=new eZ(V,{client:Y,tools:H,...this.maxIdleMs!==void 0?{maxIdleMs:this.maxIdleMs}:{},...this.requestOptions!==void 0?{requestOptions:this.requestOptions}:{},signal:w.signal});for await(let j of A);}finally{w.abort(),W(),await C,await q().catch((A)=>{z.warn("skill cleanup failed",{session_id:V,work_id:$.id,error:String(A)})}),await R7(Y,$,z,this.requestOptions)}}});var Z0;var Y1=M(()=>{I();y();E();h();h$();z1();h$();z1();Z0=class Z0 extends x{retrieve(Z,$,X){let{environment_id:J,betas:z}=$;return this._client.get(G`/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,...Y}=$;return this._client.post(G`/v1/environments/${J}/work/${Z}?beta=true`,{body:Y,...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(G`/v1/environments/${Z}/work?beta=true`,S,{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(G`/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:Y,betas:V}=$;return this._client.post(G`/v1/environments/${J}/work/${Z}/heartbeat?beta=true`,{query:{desired_ttl_seconds:z,expected_last_heartbeat:Y},...X,headers:N([{"anthropic-beta":[...V??[],"managed-agents-2026-04-01"].toString()},X?.headers])})}poll(Z,$={},X){let{betas:J,"Anthropic-Worker-ID":z,...Y}=$??{};return this._client.get(G`/v1/environments/${Z}/work/poll?beta=true`,{query:Y,...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(G`/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,...Y}=$;return this._client.post(G`/v1/environments/${J}/work/${Z}/stop?beta=true`,{body:Y,...X,headers:N([{"anthropic-beta":[...z??[],"managed-agents-2026-04-01"].toString()},X?.headers])})}poller(Z){return new tZ({...Z,client:this._client})}worker(Z){return new E8({...Z,client:this._client})}};Z0.WorkPoller=tZ;Z0.EnvironmentWorker=E8});var S0;var K1=M(()=>{I();Y1();Y1();y();E();h();S0=class S0 extends x{constructor(){super(...arguments);this.work=new Z0(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(G`/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(G`/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",S,{query:J,...$,headers:N([{"anthropic-beta":[...X??[],"managed-agents-2026-04-01"].toString()},$?.headers])})}delete(Z,$={},X){let{betas:J}=$??{};return this._client.delete(G`/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(G`/v1/environments/${Z}/archive?beta=true`,{...X,headers:N([{"anthropic-beta":[...J??[],"managed-agents-2026-04-01"].toString()},X?.headers])})}};S0.Work=Z0});var R8;var Q1=M(()=>{I();y();E();h();R8=class R8 extends x{create(Z,$,X){let{view:J,betas:z,...Y}=$;return this._client.post(G`/v1/memory_stores/${Z}/memories?beta=true`,{query:{view:J},body:Y,...X,headers:N([{"anthropic-beta":[...z??[],"agent-memory-2026-07-22"].toString()},X?.headers])})}retrieve(Z,$,X){let{memory_store_id:J,betas:z,...Y}=$;return this._client.get(G`/v1/memory_stores/${J}/memories/${Z}?beta=true`,{query:Y,...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:Y,...V}=$;return this._client.post(G`/v1/memory_stores/${J}/memories/${Z}?beta=true`,{query:{view:z},body:V,...X,headers:N([{"anthropic-beta":[...Y??[],"agent-memory-2026-07-22"].toString()},X?.headers])})}list(Z,$={},X){let{betas:J,...z}=$??{};return this._client.getAPIList(G`/v1/memory_stores/${Z}/memories?beta=true`,S,{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:Y}=$;return this._client.delete(G`/v1/memory_stores/${J}/memories/${Z}?beta=true`,{query:{expected_content_sha256:z},...X,headers:N([{"anthropic-beta":[...Y??[],"agent-memory-2026-07-22"].toString()},X?.headers])})}}});var I8;var V1=M(()=>{I();y();E();h();I8=class I8 extends x{retrieve(Z,$,X){let{memory_store_id:J,betas:z,...Y}=$;return this._client.get(G`/v1/memory_stores/${J}/memory_versions/${Z}?beta=true`,{query:Y,...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(G`/v1/memory_stores/${Z}/memory_versions?beta=true`,S,{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(G`/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 $0;var N1=M(()=>{I();Q1();Q1();V1();V1();y();E();h();$0=class $0 extends x{constructor(){super(...arguments);this.memories=new R8(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(G`/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(G`/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",S,{query:J,...$,headers:N([{"anthropic-beta":[...X??[],"agent-memory-2026-07-22"].toString()},$?.headers])})}delete(Z,$={},X){let{betas:J}=$??{};return this._client.delete(G`/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(G`/v1/memory_stores/${Z}/archive?beta=true`,{...X,headers:N([{"anthropic-beta":[...J??[],"agent-memory-2026-07-22"].toString()},X?.headers])})}};$0.Memories=R8;$0.MemoryVersions=I8});var j0=M(()=>{v()});var F0;var W1=M(()=>{v();N0();IX();F0=class F0{constructor(Z,$){this.iterator=Z,this.controller=$}async*decoder(){let Z=new yZ;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 B("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 B("Attempted to iterate over a response with no body")}return new F0(e0(Z.body),$)}}});var P8;var U1=M(()=>{I();y();E();W1();j0();h();P8=class P8 extends x{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(G`/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",TZ,{query:J,...$,headers:N([{"anthropic-beta":[...X??[],"message-batches-2024-09-24"].toString()},$?.headers])})}delete(Z,$={},X){let{betas:J}=$??{};return this._client.delete(G`/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(G`/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 B(`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((Y,V)=>F0.fromResponse(V.response,V.controller))}}});var i$;var w1=M(()=>{i$={"claude-opus-4-20250514":8192,"claude-opus-4-0":8192,"claude-4-opus-20250514":8192,"anthropic.claude-opus-4-20250514-v1:0":8192,"claude-opus-4@20250514":8192,"claude-opus-4-1-20250805":8192,"anthropic.claude-opus-4-1-20250805-v1:0":8192,"claude-opus-4-1@20250805":8192}});function i6(Z){return Z?.output_format??Z?.output_config?.format}function G1(Z,$,X){let J=i6($);if(!$||!("parse"in(J??{})))return{...Z,content:Z.content.map((z)=>{if(z.type==="text"){let Y=Object.defineProperty({...z},"parsed_output",{value:null,enumerable:!1});return Object.defineProperty(Y,"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 O1(Z,$,X)}function O1(Z,$,X){let J=null,z=Z.content.map((Y)=>{if(Y.type==="text"){let V=g7($,Y.text);if(J===null)J=V;let Q=Object.defineProperty({...Y},"parsed_output",{value:V,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."),V},enumerable:!1})}return Y});return{...Z,content:z,parsed_output:J}}function g7(Z,$){let X=i6(Z);if(X?.type!=="json_schema")return null;try{if("parse"in X)return X.parse($);return JSON.parse($)}catch(J){throw new B(`Failed to parse structured output: ${J}`)}}var q1=M(()=>{v()});var M1=M(()=>{z8()});var _7=(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 Q="",U=!1;J=Z[++$];while(J!=='"'){if($===Z.length){U=!0;break}if(J==="\\"){if($++,$===Z.length){U=!0;break}Q+=J+Z[$],J=Z[++$]}else Q+=J,J=Z[++$]}if(J=Z[++$],!U)X.push({type:"string",value:Q});continue}if(J&&/\s/.test(J)){$++;continue}let Y=/[0-9]/;if(J&&Y.test(J)||J==="-"||J==="."){let Q="";if(J==="-")Q+=J,J=Z[++$];while(J&&(Y.test(J)||J==="."||J==="e"||J==="E"||(J==="-"||J==="+")&&(Q[Q.length-1]==="e"||Q[Q.length-1]==="E")))Q+=J,J=Z[++$];X.push({type:"number",value:Q});continue}let V=/[a-z]/i;if(J&&V.test(J)){let Q="";while(J&&V.test(J)){if($===Z.length)break;Q+=J,J=Z[++$]}if(Q=="true"||Q=="false"||Q==="null")X.push({type:"name",value:Q});else{$++;continue}continue}$++}return X},E0=(Z)=>{if(Z.length===0)return Z;let $=Z[Z.length-1];switch($.type){case"separator":return Z=Z.slice(0,Z.length-1),E0(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),E0(Z);case"string":let J=Z[Z.length-2];if(J?.type==="delimiter")return Z=Z.slice(0,Z.length-1),E0(Z);else if(J?.type==="brace"&&J.value==="{")return Z=Z.slice(0,Z.length-1),E0(Z);break;case"delimiter":return Z=Z.slice(0,Z.length-1),E0(Z);break}return Z},v7=(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},m7=(Z)=>{let $="";return Z.map((X)=>{switch(X.type){case"string":$+='"'+X.value+'"';break;default:$+=X.value;break}}),$},n6=(Z)=>JSON.parse(m7(v7(E0(_7(Z)))));var a6=()=>{};function n$(Z,$){let X={};for(let Y of Object.keys(Z))if(Y!=="input")X[Y]=Z[Y];Object.defineProperty(X,vZ,{value:$,enumerable:!1,writable:!0});let J,z=!1;return Object.defineProperty(X,"input",{enumerable:!0,configurable:!0,get(){if(!z)J=$?n6($):{},z=!0;return J}}),X}var vZ="__json_buf";var C1=M(()=>{a6()});function L1(Z){return Z.type==="tool_use"||Z.type==="server_tool_use"||Z.type==="mcp_tool_use"}function t6(Z){}var XZ,mZ,R0,k8,a$,y8,f8,o$,b8,SZ,h8,r$,t$,X0,s$,e$,g8,B1,o6,_8,H1,T1,A1,r6,x1,v8;var s6=M(()=>{zZ();DZ();j0();PZ();M1();q1();C1();v8=class v8{constructor(Z,$){XZ.add(this),this.messages=[],this.receivedMessages=[],mZ.set(this,void 0),R0.set(this,null),this.controller=new AbortController,k8.set(this,void 0),a$.set(this,()=>{}),y8.set(this,()=>{}),f8.set(this,void 0),o$.set(this,()=>{}),b8.set(this,()=>{}),SZ.set(this,{}),h8.set(this,!1),r$.set(this,!1),t$.set(this,!1),X0.set(this,!1),s$.set(this,void 0),e$.set(this,void 0),g8.set(this,void 0),_8.set(this,(X)=>{if(O(this,r$,!0,"f"),wZ(X))X=new s;if(X instanceof s)return O(this,t$,!0,"f"),this._emit("abort",X);if(X instanceof B)return this._emit("error",X);if(X instanceof Error){let J=new B(X.message);return J.cause=X,this._emit("error",J)}return this._emit("error",new B(String(X)))}),O(this,k8,new Promise((X,J)=>{O(this,a$,X,"f"),O(this,y8,J,"f")}),"f"),O(this,f8,new Promise((X,J)=>{O(this,o$,X,"f"),O(this,b8,J,"f")}),"f"),K(this,k8,"f").catch(()=>{}),K(this,f8,"f").catch(()=>{}),O(this,R0,Z,"f"),O(this,g8,$?.logger??console,"f")}get response(){return K(this,s$,"f")}get request_id(){return K(this,e$,"f")}async withResponse(){O(this,X0,!0,"f");let Z=await K(this,k8,"f");if(!Z)throw Error("Could not resolve a `Response` object");return{data:this,response:Z,request_id:Z.headers.get("request-id")}}static fromReadableStream(Z){let $=new v8(null);return $._run(()=>$._fromReadableStream(Z)),$}static createMessage(Z,$,X,{logger:J}={}){let z=new v8($,{logger:J});for(let Y of $.messages)z._addMessageParam(Y);return O(z,R0,{...$,stream:!0},"f"),z._run(()=>z._createMessage(Z,{...$,stream:!0},{...X,headers:{...X?.headers,[j$]:"stream"}})),z}_run(Z){Z().then(()=>{this._emitFinal(),this._emit("end")},K(this,_8,"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{K(this,XZ,"m",H1).call(this);let{response:Y,data:V}=await Z.create({...$,stream:!0},{...X,signal:this.controller.signal}).withResponse();this._connected(Y);for await(let Q of V)K(this,XZ,"m",T1).call(this,Q);if(V.controller.signal?.aborted)throw new s;K(this,XZ,"m",A1).call(this)}finally{if(J&&z)J.removeEventListener("abort",z)}}_connected(Z){if(this.ended)return;O(this,s$,Z,"f"),O(this,e$,Z?.headers.get("request-id"),"f"),K(this,a$,"f").call(this,Z),this._emit("connect")}get ended(){return K(this,h8,"f")}get errored(){return K(this,r$,"f")}get aborted(){return K(this,t$,"f")}abort(){this.controller.abort()}on(Z,$){return(K(this,SZ,"f")[Z]||(K(this,SZ,"f")[Z]=[])).push({listener:$}),this}off(Z,$){let X=K(this,SZ,"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(K(this,SZ,"f")[Z]||(K(this,SZ,"f")[Z]=[])).push({listener:$,once:!0}),this}emitted(Z){return new Promise(($,X)=>{if(O(this,X0,!0,"f"),Z!=="error")this.once("error",X);this.once(Z,$)})}async done(){O(this,X0,!0,"f"),await K(this,f8,"f")}get currentMessage(){return K(this,mZ,"f")}async finalMessage(){return await this.done(),K(this,XZ,"m",B1).call(this)}async finalText(){return await this.done(),K(this,XZ,"m",o6).call(this)}_emit(Z,...$){if(K(this,h8,"f"))return;if(Z==="end")O(this,h8,!0,"f"),K(this,o$,"f").call(this);let X=K(this,SZ,"f")[Z];if(X)K(this,SZ,"f")[Z]=X.filter((J)=>!J.once),X.forEach(({listener:J})=>J(...$));if(Z==="abort"){let J=$[0];if(!K(this,X0,"f")&&!X?.length)Promise.reject(J);K(this,y8,"f").call(this,J),K(this,b8,"f").call(this,J),this._emit("end");return}if(Z==="error"){let J=$[0];if(!K(this,X0,"f")&&!X?.length)Promise.reject(J);K(this,y8,"f").call(this,J),K(this,b8,"f").call(this,J),this._emit("end")}}_emitFinal(){if(this.receivedMessages.at(-1))this._emit("finalMessage",K(this,XZ,"m",B1).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{K(this,XZ,"m",H1).call(this),this._connected(null);let z=ZZ.fromReadableStream(Z,this.controller);for await(let Y of z)K(this,XZ,"m",T1).call(this,Y);if(z.controller.signal?.aborted)throw new s;K(this,XZ,"m",A1).call(this)}finally{if(X&&J)X.removeEventListener("abort",J)}}[(mZ=new WeakMap,R0=new WeakMap,k8=new WeakMap,a$=new WeakMap,y8=new WeakMap,f8=new WeakMap,o$=new WeakMap,b8=new WeakMap,SZ=new WeakMap,h8=new WeakMap,r$=new WeakMap,t$=new WeakMap,X0=new WeakMap,s$=new WeakMap,e$=new WeakMap,g8=new WeakMap,_8=new WeakMap,XZ=new WeakSet,B1=function(){if(this.receivedMessages.length===0)throw new B("stream ended without producing a Message with role=assistant");return this.receivedMessages.at(-1)},o6=function(){if(this.receivedMessages.length===0)throw new B("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 B("stream ended without producing a content block with type=text");return $.join(" ")},H1=function(){if(this.ended)return;O(this,mZ,void 0,"f")},T1=function($){if(this.ended)return;let X=K(this,XZ,"m",r6).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(L1(J)&&K(this,SZ,"f").inputJson?.length){let z;try{z=J.input}catch(Y){K(this,_8,"f").call(this,K(this,XZ,"m",x1).call(this,J,Y));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:t6($.delta)}break}case"message_stop":{this._addMessageParam(X),this._addMessage(G1(X,K(this,R0,"f"),{logger:K(this,g8,"f")}),!0);break}case"content_block_stop":{this._emit("contentBlock",X.content.at(-1));break}case"message_start":{O(this,mZ,X,"f");break}case"content_block_start":case"message_delta":break}},A1=function(){if(this.ended)throw new B("stream has ended, this shouldn't happen");let $=K(this,mZ,"f");if(!$)throw new B("request ended without sending any chunks");return O(this,mZ,void 0,"f"),G1($,K(this,R0,"f"),{logger:K(this,g8,"f")})},r6=function($){let X=K(this,mZ,"f");if($.type==="message_start"){if(X)throw new B(`Unexpected event order, got ${$.type} before receiving "message_stop"`);return $.message}if(!X)throw new B(`Unexpected event order, got ${$.type} before "message_start"`);switch($.type){case"message_stop":return X;case"message_delta":if(X.container=$.delta.container,X.stop_reason=$.delta.stop_reason,X.stop_sequence=$.delta.stop_sequence,$.delta.stop_details!=null)X.stop_details=$.delta.stop_details;if(X.usage.output_tokens=$.usage.output_tokens,X.context_management=$.context_management,$.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;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&&L1(J)){let z=(J[vZ]||"")+$.delta.partial_json;X.content[$.index]=n$(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:t6($.delta)}return X}case"content_block_stop":{let J=X.content.at($.index);if(J&&L1(J)&&vZ in J){let z;try{z=J.input}catch(Y){z={},K(this,_8,"f").call(this,K(this,XZ,"m",x1).call(this,J,Y))}Object.defineProperty(J,"input",{value:z,enumerable:!0,configurable:!0,writable:!0})}return X}}},x1=function($,X){let J=$[vZ];return new B(`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,Y)=>$.push({resolve:z,reject:Y})).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 ZZ(this[Symbol.asyncIterator].bind(this),this.controller).toReadableStream()}}});var e6=1e5,Z9=`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 $9=()=>{};async function u7(Z,$=Z.messages.at(-1),X){if(!$||$.role!=="assistant"||!$.content||typeof $.content==="string")return null;let J=$.content.filter((Y)=>Y.type==="tool_use");if(J.length===0)return null;return{role:"user",content:await Promise.all(J.map(async(Y)=>{let V=Z.tools.find((Q)=>("name"in Q?Q.name:Q.mcp_server_name)===Y.name);if(!V||!("run"in V))return{type:"tool_result",tool_use_id:Y.id,content:`Error: Tool '${Y.name}' not found`,is_error:!0};try{let Q=Y.input;if("parse"in V&&V.parse)Q=V.parse(Q);let U=await V.run(Q,{toolUse:Y,toolUseBlock:Y,signal:X?.signal});return{type:"tool_result",tool_use_id:Y.id,content:U}}catch(Q){return{type:"tool_result",tool_use_id:Y.id,content:Q instanceof kZ?Q.content:`Error: ${Q instanceof Error?Q.message:String(Q)}`,is_error:!0}}}))}}var m8,I0,J0,r,JZ,WZ,IZ,uZ,u8,X9,D1,c8;var S1=M(()=>{zZ();a0();v();E();X4();$9();DZ();c8=class c8{constructor(Z,$,X){m8.add(this),this.client=Z,I0.set(this,!1),J0.set(this,!1),r.set(this,void 0),JZ.set(this,void 0),WZ.set(this,void 0),IZ.set(this,void 0),uZ.set(this,void 0),u8.set(this,0),O(this,r,{params:{...$,messages:structuredClone($.messages)}},"f");let J=cX($.tools,$.messages);if(O(this,JZ,{...X,headers:N([G8("BetaToolRunner"),J.length?{[w8]:J.join(", ")}:void 0,X?.headers])},"f"),O(this,uZ,VX(),"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*[(I0=new WeakMap,J0=new WeakMap,r=new WeakMap,JZ=new WeakMap,WZ=new WeakMap,IZ=new WeakMap,uZ=new WeakMap,u8=new WeakMap,m8=new WeakSet,X9=async function(){let $=K(this,r,"f").params.compactionControl;if(!$||!$.enabled)return!1;let X=0;if(K(this,WZ,"f")!==void 0)try{let U=await K(this,WZ,"f");X=U.usage.input_tokens+(U.usage.cache_creation_input_tokens??0)+(U.usage.cache_read_input_tokens??0)+U.usage.output_tokens}catch{return!1}let J=$.contextTokenThreshold??e6;if(X<J)return!1;let z=$.model??K(this,r,"f").params.model,Y=$.summaryPrompt??Z9,V=K(this,r,"f").params.messages;if(V[V.length-1].role==="assistant"){let U=V[V.length-1];if(Array.isArray(U.content)){let q=U.content.filter((H)=>H.type!=="tool_use");if(q.length===0)V.pop();else U.content=q}}let Q=await this.client.beta.messages.create({model:z,messages:[...V,{role:"user",content:[{type:"text",text:Y}]}],max_tokens:K(this,r,"f").params.max_tokens},{signal:K(this,JZ,"f").signal,headers:N([K(this,JZ,"f").headers,G8("compaction")])});if(Q.content[0]?.type!=="text")throw new B("Expected text response for compaction");return K(this,r,"f").params.messages=[{role:"user",content:Q.content}],!0},Symbol.asyncIterator)](){var Z;if(K(this,I0,"f"))throw new B("Cannot iterate over a consumed stream");O(this,I0,!0,"f"),O(this,J0,!0,"f"),O(this,IZ,void 0,"f");try{while(!0){let $;try{if(K(this,r,"f").params.max_iterations&&K(this,u8,"f")>=K(this,r,"f").params.max_iterations)break;O(this,J0,!1,"f"),O(this,IZ,void 0,"f"),O(this,u8,(Z=K(this,u8,"f"),Z++,Z),"f"),O(this,WZ,void 0,"f");let{max_iterations:X,compactionControl:J,...z}=K(this,r,"f").params;if(z.stream)$=this.client.beta.messages.stream({...z},K(this,JZ,"f")),O(this,WZ,$.finalMessage(),"f"),K(this,WZ,"f").catch(()=>{}),yield $;else O(this,WZ,this.client.beta.messages.create({...z,stream:!1},K(this,JZ,"f")),"f"),yield K(this,WZ,"f");if(!await K(this,m8,"m",X9).call(this)){if(!K(this,J0,"f")){let Q=await K(this,WZ,"f");if(K(this,r,"f").params.messages.push({role:Q.role,content:Q.content}),Q.stop_reason==="refusal")break}let V=await K(this,m8,"m",D1).call(this,K(this,r,"f").params.messages.at(-1));if(V)K(this,r,"f").params.messages.push(V);else if(!K(this,J0,"f"))break}}finally{if($)$.abort()}}if(!K(this,WZ,"f"))throw new B("ToolRunner concluded without a message from the server");K(this,uZ,"f").resolve(await K(this,WZ,"f"))}catch($){throw O(this,I0,!1,"f"),K(this,uZ,"f").promise.catch(()=>{}),K(this,uZ,"f").reject($),O(this,uZ,VX(),"f"),$}}setMessagesParams(Z){if(typeof Z==="function")K(this,r,"f").params=Z(K(this,r,"f").params);else K(this,r,"f").params=Z;O(this,J0,!0,"f"),O(this,IZ,void 0,"f")}setRequestOptions(Z){if(typeof Z==="function")O(this,JZ,Z(K(this,JZ,"f")),"f");else O(this,JZ,{...K(this,JZ,"f"),...Z},"f")}async generateToolResponse(Z=K(this,JZ,"f").signal){let $=await K(this,WZ,"f")??this.params.messages.at(-1);if(!$)return null;return K(this,m8,"m",D1).call(this,$,Z)}done(){return K(this,uZ,"f").promise}async runUntilDone(){if(!K(this,I0,"f"))for await(let Z of this);return this.done()}get params(){return K(this,r,"f").params}pushMessages(...Z){this.setMessagesParams(($)=>({...$,messages:[...$.messages,...Z]}))}then(Z,$){return this.runUntilDone().then(Z,$)}};D1=async function($,X=K(this,JZ,"f").signal){if(K(this,IZ,"f")!==void 0)return K(this,IZ,"f");return O(this,IZ,u7(K(this,r,"f").params,$,{...K(this,JZ,"f"),signal:X}),"f"),K(this,IZ,"f")}});function z9(Z){if(!Z.output_format)return Z;if(Z.output_config?.format)throw new B("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 J9,c7,cZ;var j1=M(()=>{j0();U1();I();w1();E();DZ();q1();s6();S1();a0();U1();S1();a0();J9={"claude-1.3":"November 6th, 2024","claude-1.3-100k":"November 6th, 2024","claude-instant-1.1":"November 6th, 2024","claude-instant-1.1-100k":"November 6th, 2024","claude-instant-1.2":"November 6th, 2024","claude-3-sonnet-20240229":"July 21st, 2025","claude-3-opus-20240229":"January 5th, 2026","claude-2.1":"July 21st, 2025","claude-2.0":"July 21st, 2025","claude-3-7-sonnet-latest":"February 19th, 2026","claude-3-7-sonnet-20250219":"February 19th, 2026","claude-3-5-haiku-latest":"February 19th, 2026","claude-3-5-haiku-20241022":"February 19th, 2026","claude-opus-4-0":"June 15th, 2026","claude-opus-4-20250514":"June 15th, 2026","claude-sonnet-4-0":"June 15th, 2026","claude-sonnet-4-20250514":"June 15th, 2026","claude-opus-4-1":"August 5th, 2026","claude-opus-4-1-20250805":"August 5th, 2026","claude-mythos-preview":"June 30th, 2026"},c7=["claude-mythos-preview","claude-opus-4-6"];cZ=class cZ extends x{constructor(){super(...arguments);this.batches=new P8(this._client)}create(Z,$){let X=z9(Z),{betas:J,user_profile_id:z,...Y}=X;if(Y.model in J9)console.warn(`The model '${Y.model}' is deprecated and will reach end-of-life on ${J9[Y.model]}
32
- Please migrate to a newer model. Visit https://docs.anthropic.com/en/docs/resources/model-deprecations for more information.`);if(c7.includes(Y.model)&&Y.thinking&&Y.thinking.type==="enabled")console.warn(`Using Claude with ${Y.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=this._client._options.timeout;if(!Y.stream&&V==null){let U=i$[Y.model]??void 0;V=this._client.calculateNonstreamingTimeout(Y.max_tokens,U)}let Q=F$(Y.tools,Y.messages);return this._client.post("/v1/messages?beta=true",{body:Y,timeout:V??600000,...$,headers:N([{...J?.toString()!=null?{"anthropic-beta":J?.toString()}:void 0,...z!=null?{"anthropic-user-profile-id":z}:void 0},Q,$?.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)=>O1(X,Z,{logger:this._client.logger??console}))}stream(Z,$){return v8.createMessage(this,Z,$)}countTokens(Z,$){let X=z9(Z),{betas:J,user_profile_id:z,...Y}=X;return this._client.post("/v1/messages/count_tokens?beta=true",{body:Y,...$,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 c8(this._client,Z,$)}};cZ.Batches=P8;cZ.BetaToolRunner=c8;cZ.ToolError=kZ});var P0;var F1=M(()=>{I();y();E();h();p$();p$();P0=class P0 extends x{list(Z,$={},X){let{betas:J,...z}=$??{};return this._client.getAPIList(G`/v1/sessions/${Z}/events?beta=true`,S,{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(G`/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(G`/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 eZ(Z,{...$,client:this._client})}};P0.SessionToolRunner=eZ});var d8;var E1=M(()=>{I();y();E();h();d8=class d8 extends x{retrieve(Z,$,X){let{session_id:J,betas:z}=$;return this._client.get(G`/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,...Y}=$;return this._client.post(G`/v1/sessions/${J}/resources/${Z}?beta=true`,{body:Y,...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(G`/v1/sessions/${Z}/resources?beta=true`,S,{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(G`/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(G`/v1/sessions/${Z}/resources?beta=true`,{body:z,...X,headers:N([{"anthropic-beta":[...J??[],"managed-agents-2026-04-01"].toString()},X?.headers])})}}});var p8;var R1=M(()=>{I();y();E();h();p8=class p8 extends x{list(Z,$,X){let{session_id:J,betas:z,...Y}=$;return this._client.getAPIList(G`/v1/sessions/${J}/threads/${Z}/events?beta=true`,S,{query:Y,...X,headers:N([{"anthropic-beta":[...z??[],"managed-agents-2026-04-01"].toString()},X?.headers])})}stream(Z,$,X){let{session_id:J,betas:z}=$;return this._client.get(G`/v1/sessions/${J}/threads/${Z}/stream?beta=true`,{...X,headers:N([{"anthropic-beta":[...z??[],"managed-agents-2026-04-01"].toString()},X?.headers]),stream:!0})}}});var k0;var I1=M(()=>{I();R1();R1();y();E();h();k0=class k0 extends x{constructor(){super(...arguments);this.events=new p8(this._client)}retrieve(Z,$,X){let{session_id:J,betas:z}=$;return this._client.get(G`/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(G`/v1/sessions/${Z}/threads?beta=true`,S,{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(G`/v1/sessions/${J}/threads/${Z}/archive?beta=true`,{...X,headers:N([{"anthropic-beta":[...z??[],"managed-agents-2026-04-01"].toString()},X?.headers])})}};k0.Events=p8});var dZ;var P1=M(()=>{I();F1();F1();E1();E1();I1();I1();y();E();h();dZ=class dZ extends x{constructor(){super(...arguments);this.events=new P0(this._client),this.resources=new d8(this._client),this.threads=new k0(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(G`/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(G`/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",yX,{query:J,...$,headers:N([{"anthropic-beta":[...X??[],"managed-agents-2026-04-01"].toString()},$?.headers])})}delete(Z,$={},X){let{betas:J}=$??{};return this._client.delete(G`/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(G`/v1/sessions/${Z}/archive?beta=true`,{...X,headers:N([{"anthropic-beta":[...J??[],"managed-agents-2026-04-01"].toString()},X?.headers])})}};dZ.Events=P0;dZ.Resources=d8;dZ.Threads=k0});var l8;var k1=M(()=>{I();y();E();q0();h();l8=class l8 extends x{create(Z,$,X){let{betas:J,...z}=$;return this._client.post(G`/v1/skills/${Z}/versions?beta=true`,O0({body:z,...X,headers:N([{"anthropic-beta":[...J??[],"skills-2025-10-02"].toString()},X?.headers])},this._client,!1))}retrieve(Z,$,X){let{skill_id:J,betas:z}=$;return this._client.get(G`/v1/skills/${J}/versions/${Z}?beta=true`,{...X,headers:N([{"anthropic-beta":[...z??[],"skills-2025-10-02"].toString()},X?.headers])})}list(Z,$={},X){let{betas:J,...z}=$??{};return this._client.getAPIList(G`/v1/skills/${Z}/versions?beta=true`,S,{query:z,...X,headers:N([{"anthropic-beta":[...J??[],"skills-2025-10-02"].toString()},X?.headers])})}delete(Z,$,X){let{skill_id:J,betas:z}=$;return this._client.delete(G`/v1/skills/${J}/versions/${Z}?beta=true`,{...X,headers:N([{"anthropic-beta":[...z??[],"skills-2025-10-02"].toString()},X?.headers])})}download(Z,$,X){let{skill_id:J,betas:z}=$;return this._client.get(G`/v1/skills/${J}/versions/${Z}/content?beta=true`,{...X,headers:N([{"anthropic-beta":[...z??[],"skills-2025-10-02"].toString(),Accept:"application/binary"},X?.headers]),__binaryResponse:!0})}}});var y0;var y1=M(()=>{I();k1();k1();y();E();q0();h();y0=class y0 extends x{constructor(){super(...arguments);this.versions=new l8(this._client)}create(Z,$){let{betas:X,...J}=Z;return this._client.post("/v1/skills?beta=true",O0({body:J,...$,headers:N([{"anthropic-beta":[...X??[],"skills-2025-10-02"].toString()},$?.headers])},this._client,!1))}retrieve(Z,$={},X){let{betas:J}=$??{};return this._client.get(G`/v1/skills/${Z}?beta=true`,{...X,headers:N([{"anthropic-beta":[...J??[],"skills-2025-10-02"].toString()},X?.headers])})}list(Z={},$){let{betas:X,...J}=Z??{};return this._client.getAPIList("/v1/skills?beta=true",S,{query:J,...$,headers:N([{"anthropic-beta":[...X??[],"skills-2025-10-02"].toString()},$?.headers])})}delete(Z,$={},X){let{betas:J}=$??{};return this._client.delete(G`/v1/skills/${Z}?beta=true`,{...X,headers:N([{"anthropic-beta":[...J??[],"skills-2025-10-02"].toString()},X?.headers])})}};y0.Versions=l8});var i8;var f1=M(()=>{I();y();E();h();i8=class i8 extends x{create(Z,$,X){let{betas:J,...z}=$;return this._client.post(G`/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(G`/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(G`/v1/tunnels/${Z}/certificates?beta=true`,S,{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(G`/v1/tunnels/${J}/certificates/${Z}/archive?beta=true`,{...X,headers:N([{"anthropic-beta":[...z??[],"mcp-tunnels-2026-06-22"].toString()},X?.headers])})}}});var f0;var b1=M(()=>{I();f1();f1();y();E();h();f0=class f0 extends x{constructor(){super(...arguments);this.certificates=new i8(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(G`/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",S,{query:J,...$,headers:N([{"anthropic-beta":[...X??[],"mcp-tunnels-2026-06-22"].toString()},$?.headers])})}archive(Z,$={},X){let{betas:J}=$??{};return this._client.post(G`/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(G`/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(G`/v1/tunnels/${Z}/rotate_token?beta=true`,{body:z,...X,headers:N([{"anthropic-beta":[...J??[],"mcp-tunnels-2026-06-22"].toString()},X?.headers])})}};f0.Certificates=i8});var n8;var h1=M(()=>{I();y();E();h();n8=class n8 extends x{create(Z,$,X){let{betas:J,...z}=$;return this._client.post(G`/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(G`/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,...Y}=$;return this._client.post(G`/v1/vaults/${J}/credentials/${Z}?beta=true`,{body:Y,...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(G`/v1/vaults/${Z}/credentials?beta=true`,S,{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(G`/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(G`/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(G`/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 b0;var g1=M(()=>{I();h1();h1();y();E();h();b0=class b0 extends x{constructor(){super(...arguments);this.credentials=new n8(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(G`/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(G`/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",S,{query:J,...$,headers:N([{"anthropic-beta":[...X??[],"managed-agents-2026-04-01"].toString()},$?.headers])})}delete(Z,$={},X){let{betas:J}=$??{};return this._client.delete(G`/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(G`/v1/vaults/${Z}/archive?beta=true`,{...X,headers:N([{"anthropic-beta":[...J??[],"managed-agents-2026-04-01"].toString()},X?.headers])})}};b0.Credentials=n8});var p;var _1=M(()=>{I();vX();vX();mX();mX();uX();uX();dX();dX();pX();pX();lX();lX();aX();aX();rX();rX();K1();K1();N1();N1();j1();j1();P1();P1();y1();y1();b1();b1();g1();g1();p=class p extends x{constructor(){super(...arguments);this.models=new q8(this._client),this.messages=new cZ(this._client),this.agents=new M0(this._client),this.environments=new S0(this._client),this.sessions=new dZ(this._client),this.deployments=new N8(this._client),this.deploymentRuns=new V8(this._client),this.vaults=new b0(this._client),this.memoryStores=new $0(this._client),this.files=new O8(this._client),this.skills=new y0(this._client),this.webhooks=new H8(this._client),this.userProfiles=new M8(this._client),this.dreams=new W8(this._client),this.tunnels=new f0(this._client)}};p.Models=q8;p.Messages=cZ;p.Agents=M0;p.Environments=S0;p.Sessions=dZ;p.Deployments=N8;p.DeploymentRuns=V8;p.Vaults=b0;p.MemoryStores=$0;p.Files=O8;p.Skills=y0;p.Webhooks=H8;p.UserProfiles=M8;p.Dreams=W8;p.Tunnels=f0});var h0;var v1=M(()=>{I();E();h0=class h0 extends x{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})}}});function Y9(Z){return Z?.output_config?.format}function m1(Z,$,X){let J=Y9($);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 u1(Z,$,X)}function u1(Z,$,X){let J=null,z=Z.content.map((Y)=>{if(Y.type==="text"){let V=$5($,Y.text);if(J===null)J=V;return Object.defineProperty({...Y},"parsed_output",{value:V,enumerable:!1})}return Y});return{...Z,content:z,parsed_output:J}}function $5(Z,$){let X=Y9(Z);if(X?.type!=="json_schema")return null;try{if("parse"in X)return X.parse($);return JSON.parse($)}catch(J){throw new B(`Failed to parse structured output: ${J}`)}}var c1=M(()=>{v()});function a1(Z){return Z.type==="tool_use"||Z.type==="server_tool_use"}function V9(Z){}var MZ,pZ,g0,a8,ZX,o8,r8,$X,t8,jZ,s8,XX,JX,z0,zX,YX,e8,d1,K9,p1,l1,i1,n1,Q9,Z$;var N9=M(()=>{zZ();DZ();PZ();j0();M1();c1();C1();Z$=class Z${constructor(Z,$){MZ.add(this),this.messages=[],this.receivedMessages=[],pZ.set(this,void 0),g0.set(this,null),this.controller=new AbortController,a8.set(this,void 0),ZX.set(this,()=>{}),o8.set(this,()=>{}),r8.set(this,void 0),$X.set(this,()=>{}),t8.set(this,()=>{}),jZ.set(this,{}),s8.set(this,!1),XX.set(this,!1),JX.set(this,!1),z0.set(this,!1),zX.set(this,void 0),YX.set(this,void 0),e8.set(this,void 0),p1.set(this,(X)=>{if(O(this,XX,!0,"f"),wZ(X))X=new s;if(X instanceof s)return O(this,JX,!0,"f"),this._emit("abort",X);if(X instanceof B)return this._emit("error",X);if(X instanceof Error){let J=new B(X.message);return J.cause=X,this._emit("error",J)}return this._emit("error",new B(String(X)))}),O(this,a8,new Promise((X,J)=>{O(this,ZX,X,"f"),O(this,o8,J,"f")}),"f"),O(this,r8,new Promise((X,J)=>{O(this,$X,X,"f"),O(this,t8,J,"f")}),"f"),K(this,a8,"f").catch(()=>{}),K(this,r8,"f").catch(()=>{}),O(this,g0,Z,"f"),O(this,e8,$?.logger??console,"f")}get response(){return K(this,zX,"f")}get request_id(){return K(this,YX,"f")}async withResponse(){O(this,z0,!0,"f");let Z=await K(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")}}static fromReadableStream(Z){let $=new Z$(null);return $._run(()=>$._fromReadableStream(Z)),$}static createMessage(Z,$,X,{logger:J}={}){let z=new Z$($,{logger:J});for(let Y of $.messages)z._addMessageParam(Y);return O(z,g0,{...$,stream:!0},"f"),z._run(()=>z._createMessage(Z,{...$,stream:!0},{...X,headers:{...X?.headers,[j$]:"stream"}})),z}_run(Z){Z().then(()=>{this._emitFinal(),this._emit("end")},K(this,p1,"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{K(this,MZ,"m",l1).call(this);let{response:Y,data:V}=await Z.create({...$,stream:!0},{...X,signal:this.controller.signal}).withResponse();this._connected(Y);for await(let Q of V)K(this,MZ,"m",i1).call(this,Q);if(V.controller.signal?.aborted)throw new s;K(this,MZ,"m",n1).call(this)}finally{if(J&&z)J.removeEventListener("abort",z)}}_connected(Z){if(this.ended)return;O(this,zX,Z,"f"),O(this,YX,Z?.headers.get("request-id"),"f"),K(this,ZX,"f").call(this,Z),this._emit("connect")}get ended(){return K(this,s8,"f")}get errored(){return K(this,XX,"f")}get aborted(){return K(this,JX,"f")}abort(){this.controller.abort()}on(Z,$){return(K(this,jZ,"f")[Z]||(K(this,jZ,"f")[Z]=[])).push({listener:$}),this}off(Z,$){let X=K(this,jZ,"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(K(this,jZ,"f")[Z]||(K(this,jZ,"f")[Z]=[])).push({listener:$,once:!0}),this}emitted(Z){return new Promise(($,X)=>{if(O(this,z0,!0,"f"),Z!=="error")this.once("error",X);this.once(Z,$)})}async done(){O(this,z0,!0,"f"),await K(this,r8,"f")}get currentMessage(){return K(this,pZ,"f")}async finalMessage(){return await this.done(),K(this,MZ,"m",d1).call(this)}async finalText(){return await this.done(),K(this,MZ,"m",K9).call(this)}_emit(Z,...$){if(K(this,s8,"f"))return;if(Z==="end")O(this,s8,!0,"f"),K(this,$X,"f").call(this);let X=K(this,jZ,"f")[Z];if(X)K(this,jZ,"f")[Z]=X.filter((J)=>!J.once),X.forEach(({listener:J})=>J(...$));if(Z==="abort"){let J=$[0];if(!K(this,z0,"f")&&!X?.length)Promise.reject(J);K(this,o8,"f").call(this,J),K(this,t8,"f").call(this,J),this._emit("end");return}if(Z==="error"){let J=$[0];if(!K(this,z0,"f")&&!X?.length)Promise.reject(J);K(this,o8,"f").call(this,J),K(this,t8,"f").call(this,J),this._emit("end")}}_emitFinal(){if(this.receivedMessages.at(-1))this._emit("finalMessage",K(this,MZ,"m",d1).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{K(this,MZ,"m",l1).call(this),this._connected(null);let z=ZZ.fromReadableStream(Z,this.controller);for await(let Y of z)K(this,MZ,"m",i1).call(this,Y);if(z.controller.signal?.aborted)throw new s;K(this,MZ,"m",n1).call(this)}finally{if(X&&J)X.removeEventListener("abort",J)}}[(pZ=new WeakMap,g0=new WeakMap,a8=new WeakMap,ZX=new WeakMap,o8=new WeakMap,r8=new WeakMap,$X=new WeakMap,t8=new WeakMap,jZ=new WeakMap,s8=new WeakMap,XX=new WeakMap,JX=new WeakMap,z0=new WeakMap,zX=new WeakMap,YX=new WeakMap,e8=new WeakMap,p1=new WeakMap,MZ=new WeakSet,d1=function(){if(this.receivedMessages.length===0)throw new B("stream ended without producing a Message with role=assistant");return this.receivedMessages.at(-1)},K9=function(){if(this.receivedMessages.length===0)throw new B("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 B("stream ended without producing a content block with type=text");return $.join(" ")},l1=function(){if(this.ended)return;O(this,pZ,void 0,"f")},i1=function($){if(this.ended)return;let X=K(this,MZ,"m",Q9).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(a1(J)&&K(this,jZ,"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:V9($.delta)}break}case"message_stop":{this._addMessageParam(X),this._addMessage(m1(X,K(this,g0,"f"),{logger:K(this,e8,"f")}),!0);break}case"content_block_stop":{this._emit("contentBlock",X.content.at(-1));break}case"message_start":{O(this,pZ,X,"f");break}case"content_block_start":case"message_delta":break}},n1=function(){if(this.ended)throw new B("stream has ended, this shouldn't happen");let $=K(this,pZ,"f");if(!$)throw new B("request ended without sending any chunks");return O(this,pZ,void 0,"f"),m1($,K(this,g0,"f"),{logger:K(this,e8,"f")})},Q9=function($){let X=K(this,pZ,"f");if($.type==="message_start"){if(X)throw new B(`Unexpected event order, got ${$.type} before receiving "message_stop"`);return $.message}if(!X)throw new B(`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,$.delta.stop_details!=null)X.stop_details=$.delta.stop_details;if(X.usage.output_tokens=$.usage.output_tokens,$.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;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&&a1(J)){let z=(J[vZ]||"")+$.delta.partial_json;X.content[$.index]=n$(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:V9($.delta)}return X}case"content_block_stop":{let J=X.content.at($.index);if(J&&a1(J)&&vZ 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,Y)=>$.push({resolve:z,reject:Y})).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 ZZ(this[Symbol.asyncIterator].bind(this),this.controller).toReadableStream()}}});var $$;var o1=M(()=>{I();y();E();W1();j0();h();$$=class $$ extends x{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(G`/v1/messages/batches/${Z}`,$)}list(Z={},$){return this._client.getAPIList("/v1/messages/batches",TZ,{query:Z,...$})}delete(Z,$){return this._client.delete(G`/v1/messages/batches/${Z}`,$)}cancel(Z,$){return this._client.post(G`/v1/messages/batches/${Z}/cancel`,$)}async results(Z,$){let X=await this.retrieve(Z);if(!X.results_url)throw new B(`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)=>F0.fromResponse(z.response,z.controller))}}});var Y0,W9,J5;var r1=M(()=>{I();E();DZ();N9();c1();o1();o1();w1();Y0=class Y0 extends x{constructor(){super(...arguments);this.batches=new $$(this._client)}create(Z,$){let{user_profile_id:X,...J}=Z;if(J.model in W9)console.warn(`The model '${J.model}' is deprecated and will reach end-of-life on ${W9[J.model]}
33
- Please migrate to a newer model. Visit https://docs.anthropic.com/en/docs/resources/model-deprecations for more information.`);if(J5.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=this._client._options.timeout;if(!J.stream&&z==null){let V=i$[J.model]??void 0;z=this._client.calculateNonstreamingTimeout(J.max_tokens,V)}let Y=F$(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},Y,$?.headers]),stream:Z.stream??!1})}parse(Z,$){return this.create(Z,$).then((X)=>u1(X,Z,{logger:this._client.logger??console}))}stream(Z,$){return Z$.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])})}};W9={"claude-1.3":"November 6th, 2024","claude-1.3-100k":"November 6th, 2024","claude-instant-1.1":"November 6th, 2024","claude-instant-1.1-100k":"November 6th, 2024","claude-instant-1.2":"November 6th, 2024","claude-3-sonnet-20240229":"July 21st, 2025","claude-3-opus-20240229":"January 5th, 2026","claude-2.1":"July 21st, 2025","claude-2.0":"July 21st, 2025","claude-3-7-sonnet-latest":"February 19th, 2026","claude-3-7-sonnet-20250219":"February 19th, 2026","claude-3-5-haiku-latest":"February 19th, 2026","claude-3-5-haiku-20241022":"February 19th, 2026","claude-opus-4-0":"June 15th, 2026","claude-opus-4-20250514":"June 15th, 2026","claude-sonnet-4-0":"June 15th, 2026","claude-sonnet-4-20250514":"June 15th, 2026","claude-opus-4-1":"August 5th, 2026","claude-opus-4-1-20250805":"August 5th, 2026","claude-mythos-preview":"June 30th, 2026"},J5=["claude-mythos-preview","claude-opus-4-6"];Y0.Batches=$$});var _0;var t1=M(()=>{I();y();E();h();_0=class _0 extends x{retrieve(Z,$={},X){let{betas:J}=$??{};return this._client.get(G`/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",TZ,{query:J,...$,headers:N([{...X?.toString()!=null?{"anthropic-beta":X?.toString()}:void 0},$?.headers])})}}});var U9=M(()=>{_1();v1();r1();t1();Q6()});class c{get credentials(){return this._authState.provider}constructor({baseURL:Z=F("ANTHROPIC_BASE_URL"),apiKey:$,authToken:X,webhookKey:J=F("ANTHROPIC_WEBHOOK_SIGNING_KEY")??null,...z}={}){if(s1.add(this),this._requestAuthFlags=new WeakMap,KX.set(this,void 0),$===void 0)$=z.profile!=null?null:F("ANTHROPIC_API_KEY")??null;if(X===void 0)X=z.profile!=null?null:F("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 Y={apiKey:$,authToken:X,webhookKey:J,...z,baseURL:Z||"https://api.anthropic.com"};if(!Y.dangerouslyAllowBrowser&&N4())throw new B(`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=Y.baseURL,this._baseURLIsExplicit=z.__baseURLIsExplicit??!!Z,this.timeout=Y.timeout??e1.DEFAULT_TIMEOUT,this.logger=Y.logger??console,this.logLevel=X8,this.logLevel=q$(Y.logLevel,"ClientOptions.logLevel",P(this))??q$(F("ANTHROPIC_LOG"),"process.env['ANTHROPIC_LOG']",P(this))??X8,this.fetchOptions=Y.fetchOptions,this.maxRetries=Y.maxRetries??2,this.fetch=Y.fetch??W4(),O(this,KX,w4,"f"),this.middleware=[...Y.middleware??[]];let V=F("ANTHROPIC_CUSTOM_HEADERS");if(V){let U={};for(let q of V.split(`
41
- `)){let H=q.indexOf(":");if(H>=0)U[q.substring(0,H).trim()]=q.substring(H+1).trim()}Y.defaultHeaders={...U,...Y.defaultHeaders}}let Q=z.__auth;if(delete Y.__auth,delete Y.__baseURLIsExplicit,this._options=Y,this.apiKey=typeof $==="string"?$:null,this.authToken=X,this.webhookKey=J,Q){if(this._authState=Q,!this._baseURLIsExplicit&&Q.baseURL)this.baseURL=Q.baseURL}else if(this._authState={provider:null,tokenCache:null,resolution:null,error:null,extraHeaders:{}},this.apiKey==null&&this.authToken==null){let U=Y.credentials??null;if(U)this._authState.provider=U,this._authState.tokenCache=this._makeTokenCache(U);else if(Y.config!=null){let q=RX(Y.config,this._credentialResolverOptions());this._authState.provider=q.provider,this._authState.tokenCache=this._makeTokenCache(q.provider),this._authState.extraHeaders=q.extraHeaders,this._applyCredentialBaseURL(q.baseURL)}else if(Y.profile!=null)this._authState.resolution=this._resolveDefaultCredentials(Y.profile);else this._authState.resolution=this._resolveDefaultCredentials()}}_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)=>{P(this).debug("credential cache write failed (best-effort)",Z)},onSafetyWarning:(Z)=>{P(this).warn(Z)}}}_credentialsFetch(){return kX(this.fetch,this.middleware,void 0,this)}_makeTokenCache(Z){return new xX(Z,($)=>{P(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 o4(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 B(`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 L4(Z)}getUserAgent(){return`${this.constructor.name}/JS ${GZ}`}defaultIdempotencyKey(){return`stainless-node-retry-${Q0()}`}makeStatusError(Z,$,X,J){return m.generate(Z,$,X,J)}buildURL(Z,$,X){let J=!K(this,s1,"m",w9).call(this)&&X||this.baseURL,z=J4(Z)?new URL(Z):new URL(J+(J.endsWith("/")&&Z.startsWith("/")?Z.slice(1):Z)),Y=this.defaultQuery(),V=Object.fromEntries(z.searchParams);if(!WX(Y)||!WX(V))$={...V,...Y,...$};if(typeof $==="object"&&$&&!Array.isArray($))z.search=this.stringifyQuery($);return z.toString()}_calculateNonstreamingTimeout(Z){if(3600*Z/128000>600)throw new B("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[Y,V]of Object.entries(this._authState.extraHeaders))if(!J.has(Y))J.set(Y,V);if(!J.get("anthropic-beta")?.split(",").map((Y)=>Y.trim())?.includes(nZ))J.append("anthropic-beta",nZ);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 aZ(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:Y,url:V,timeout:Q}=await this.buildRequest(J,{retryCount:z-$}),U="log_"+(Math.random()*16777216|0).toString(16).padStart(6,"0"),q=X===void 0?"":`, retryOf: ${X}`,H=Date.now();if(J.signal?.aborted)throw new s;let w=new AbortController,W=await this.fetchWithTimeout(V,Y,Q,w,J,{requestLogID:U,retryOfRequestLogID:X}).catch(iZ),C=Date.now();if(W instanceof globalThis.Error){let L=`retrying, ${$} attempts remaining`;if(J.signal?.aborted)throw new s;let D=wZ(W)||/timed? ?out/i.test(String(W)+("cause"in W?String(W.cause):"")),T=this.middleware.length>0||!!J.middleware?.length||this.backendMiddleware().length>0;if(T&&!D&&!X6(W))throw P(this).info(`[${U}] middleware error (not retryable)`),P(this).debug(`[${U}] middleware error (not retryable)`,LZ({retryOfRequestLogID:X,url:V,durationMs:C-H,message:W.message})),W;if($)return P(this).info(`[${U}] connection ${D?"timed out":"failed"} - ${L}`),P(this).debug(`[${U}] connection ${D?"timed out":"failed"} (${L})`,LZ({retryOfRequestLogID:X,url:V,durationMs:C-H,message:W.message})),this.retryRequest(J,$,X??U);if(P(this).info(`[${U}] connection ${D?"timed out":"failed"} - error; no more retries left`),P(this).debug(`[${U}] connection ${D?"timed out":"failed"} (error; no more retries left)`,LZ({retryOfRequestLogID:X,url:V,durationMs:C-H,message:W.message})),D)throw new v0;if(T&&!PX(W))throw W;throw new FZ({cause:W})}let A=[...W.headers.entries()].filter(([L])=>L==="request-id").map(([L,D])=>", "+L+": "+JSON.stringify(D)).join(""),j=`[${U}${q}${A}] ${Y.method} ${V} ${W.ok?"succeeded":"failed"} with status ${W.status} in ${C-H}ms`;if(!W.ok){let L=await this.shouldRetry(W,J);if($&&L){let n=`retrying, ${$} attempts remaining`;return await U4(W.body),P(this).info(`${j} - ${n}`),P(this).debug(`[${U}] response error (${n})`,LZ({retryOfRequestLogID:X,url:W.url,status:W.status,headers:W.headers,durationMs:C-H})),this.retryRequest(J,$,X??U,W.headers)}let D=L?"error; no more retries left":"error; not retryable";P(this).info(`${j} - ${D}`);let T=await W.text().catch((n)=>iZ(n).message),R=r0(T),k=R?void 0:T;throw P(this).debug(`[${U}] response error (${D})`,LZ({retryOfRequestLogID:X,url:W.url,status:W.status,headers:W.headers,message:k,durationMs:Date.now()-H})),this.makeStatusError(W.status,R,k,W.headers)}return P(this).info(j),P(this).debug(`[${U}] response start`,LZ({retryOfRequestLogID:X,url:W.url,status:W.status,headers:W.headers,durationMs:C-H})),{response:W,options:J,controller:w,requestLogID:U,retryOfRequestLogID:X,startTime:H}}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 x$(this,X,Z)}async fetchWithTimeout(Z,$,X,J,z,Y){let{signal:V,method:Q,...U}=$||{},q=this._makeAbort(J);if(V)V.addEventListener("abort",q,{once:!0});let H=globalThis.ReadableStream&&U.body instanceof globalThis.ReadableStream||typeof U.body==="object"&&U.body!==null&&Symbol.asyncIterator in U.body,w={signal:J.signal,...H?{duplex:"half"}:{},method:"GET",...U};if(Q)w.method=Q.toUpperCase();let W=this.fetch,C=async(T,R)=>{let k=setTimeout(q,X);try{return await W.call(void 0,T,R)}finally{clearTimeout(k)}},A=z===void 0?C:async(T,R={})=>{let k=typeof T==="string"?T:T instanceof URL?T.href:T.url;if(R.headers=R.headers instanceof Headers?R.headers:new Headers(R.headers),await this.prepareRequest(R,{url:k,options:z}),Y)P(this).debug(`[${Y.requestLogID}] sending request`,LZ({retryOfRequestLogID:Y.retryOfRequestLogID,method:R.method,url:k,options:z,headers:R.headers}));return C(T,R)},j=z?.middleware,L=this.backendMiddleware(),D=j?.length||L.length?[...this.middleware,...j??[],...L]:this.middleware;return await kX(A,D,z,this)(Z,w)}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,Y=J?.get("retry-after-ms");if(Y){let Q=parseFloat(Y);if(!Number.isNaN(Q))z=Q}let V=J?.get("retry-after");if(V&&!z){let Q=parseFloat(V);if(!Number.isNaN(Q))z=Q*1000;else z=Date.parse(V)-Date.now()}if(z===void 0){let Q=Z.maxRetries??this.maxRetries;z=this.calculateDefaultRetryTimeoutMillis($,Q)}return await BZ(z),this.makeRequest(Z,$-1,X)}calculateDefaultRetryTimeoutMillis(Z,$){let z=$-Z,Y=Math.min(0.5*Math.pow(2,z),8),V=1-Math.random()*0.25;return Y*V*1000}calculateNonstreamingTimeout(Z,$){if(3600000*Z/128000>600000||$!=null&&Z>$)throw new B("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:Y,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 Q=this.buildURL(z,Y,V);if("timeout"in X)Y4("timeout",X.timeout);X.timeout=X.timeout??this.timeout;let{bodyHeaders:U,body:q}=this.buildBody({options:X}),H=await this.buildHeaders({options:Z,method:J,bodyHeaders:U,retryCount:$});return{req:{method:J,headers:H,...X.signal&&{signal:X.signal},...globalThis.ReadableStream&&q instanceof globalThis.ReadableStream&&{duplex:"half"},...q&&{body:q},...this.fetchOptions??{},...X.fetchOptions??{}},url:Q,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 Y=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))}:{},...s0(),...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(Y),Y.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:Y$(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 K(this,KX,"f").call(this,{body:Z,headers:X})}}var s1,e1,KX,w9,G9="\\n\\nHuman:",O9="\\n\\nAssistant:",K0;var Z4=M(()=>{zZ();J$();CZ();V0();PZ();z$();N0();wX();TX();t0();v();U0();I4();r4();J6();y();_X();U9();H$();v1();t1();_1();r1();z$();E();w0();EZ();CZ();e1=c,KX=new WeakMap,s1=new WeakSet,w9=function(){return this.baseURL!=="https://api.anthropic.com"};c.Anthropic=e1;c.HUMAN_PROMPT=G9;c.AI_PROMPT=O9;c.DEFAULT_TIMEOUT=600000;c.AnthropicError=B;c.APIError=m;c.APIConnectionError=FZ;c.APIConnectionTimeoutError=v0;c.APIUserAbortError=s;c.NotFoundError=d0;c.ConflictError=p0;c.RateLimitError=i0;c.BadRequestError=m0;c.AuthenticationError=u0;c.InternalServerError=n0;c.PermissionDeniedError=c0;c.UnprocessableEntityError=l0;c.toFile=L$;K0=class K0 extends c{constructor(){super(...arguments);this.completions=new h0(this),this.messages=new Y0(this),this.models=new _0(this),this.beta=new p(this)}};K0.Completions=h0;K0.Messages=Y0;K0.Models=_0;K0.Beta=p});var q9=M(()=>{v();z8();PZ();E();DZ();CZ();wX()});var K5=M(()=>{Z4();_X();H$();q9();Z4();y();v()});
42
- export{O as Zqa,K as _qa,zZ as $qa,B as ara,m as bra,s as cra,FZ as dra,v0 as era,u0 as fra,d0 as gra,v as hra,P as ira,EZ as jra,_4 as kra,kZ as lra,a0 as mra,VX as nra,X4 as ora,j0 as pra,K0 as qra,K5 as rra};
@@ -1,18 +0,0 @@
1
- import{bJ as Q,eJ as F}from"./cli-1.0.13-kr3d94dn.mjs";import{_ja as b,bka as y}from"./cli-1.0.13-4dp5a597.mjs";import{Aka as x,Fka as f}from"./cli-1.0.13-mazxedqg.mjs";import{Ika as w,Vka as R}from"./cli-1.0.13-6b6kn6sd.mjs";import{Dma as $,Gma as j,yqa as K}from"./cli-1.0.13-vwmq6bde.mjs";import{hsa as v}from"./cli-1.0.13-d9nvpqpw.mjs";import{statSync as u}from"fs";import{join as Z}from"path";function P(k,q){return`${q} ${k}`}function g(){J.clear()}function C(){return{projectLoopMdPath:Z(j(),".claudin","loop.md"),userLoopMdPath:Z(w(),"loop.md")}}function h(k){for(let q of[k.projectLoopMdPath,k.userLoopMdPath])try{let z=u(q);return`${q}:${z.mtimeMs}:${z.size}`}catch(z){if(!x(z))b(`[loopSentinels] failed to stat ${q}: ${z}`)}return null}function M(k,q,z=m){let B=k.trim();if(B!==Y&&B!==G)return k;let V=h(q??C()),W=P(B,z),H=J.get(W);J.set(W,{firedOnce:!0,loopMdFingerprint:V});let X=H!==void 0&&H.loopMdFingerprint!==V;if(H===void 0||X)return d(B,X);return L(B)}function d(k,q){let z=q?`Note: the loop.md instructions changed since the last tick — re-read them and follow the updated version.
2
-
3
- `:"",B=k===G?`
4
-
5
- ${c}`:"";return`Scheduled loop tick.
6
-
7
- ${z}${D}${B}`}function L(k){if(k!==G)return"Scheduled loop tick — continue the loop per the instructions earlier in this conversation. If they are no longer in context, re-read .claudin/loop.md (or ~/.claudin/loop.md).";return`${"Scheduled loop tick — continue the loop per the instructions earlier in this conversation. If they are no longer in context, re-read .claudin/loop.md (or ~/.claudin/loop.md)."} Then, as the LAST action of the turn, call ${Q} again (prompt: ${G}) to continue the loop, or omit it to end the loop.`}var Y="<<autonomous-loop>>",G="<<autonomous-loop-dynamic>>",D=`Scheduled maintenance loop iteration.
8
-
9
- If .claudin/loop.md exists, read it and follow it.
10
- Otherwise, if ~/.claudin/loop.md exists, read it and follow it.
11
- Otherwise:
12
- - continue any unfinished work from the conversation
13
- - tend to the current branch's pull request: review comments, failed CI runs, merge conflicts
14
- - run cleanup passes such as bug hunts or simplification when nothing else is pending
15
-
16
- Do not start new initiatives outside that scope.
17
- Irreversible actions such as pushing or deleting only proceed when they continue something the transcript already authorized.`,c,m="lead",J;var U=v(()=>{K();F();y();R();f();c=`This loop is self-paced (/loop dynamic mode): when this iteration's work is done, as the LAST action of the turn either call ${Q} again — prompt set to exactly ${G}, with a delay chosen per the tool description and a one-sentence reason — to continue the loop, or omit the call to end it.`,J=new Map;$(g)});
18
- export{Y as Zh,G as _h,D as $h,g as ai,M as bi,U as ci};
@@ -1,6 +0,0 @@
1
- import{hsa as j}from"./cli-1.0.13-d9nvpqpw.mjs";function c(){let q=new Map;for(let[V,z]of Object.entries(J)){for(let[D,H]of Object.entries(z))J[D]={open:`\x1B[${H[0]}m`,close:`\x1B[${H[1]}m`},z[D]=J[D],q.set(H[0],H[1]);Object.defineProperty(J,V,{value:z,enumerable:!1})}return Object.defineProperty(J,"codes",{value:q,enumerable:!1}),J.color.close="\x1B[39m",J.bgColor.close="\x1B[49m",J.color.ansi=M(),J.color.ansi256=Y(),J.color.ansi16m=k(),J.bgColor.ansi=M(10),J.bgColor.ansi256=Y(10),J.bgColor.ansi16m=k(10),Object.defineProperties(J,{rgbToAnsi256:{value(V,z,D){if(V===z&&z===D){if(V<8)return 16;if(V>248)return 231;return Math.round((V-8)/247*24)+232}return 16+36*Math.round(V/255*5)+6*Math.round(z/255*5)+Math.round(D/255*5)},enumerable:!1},hexToRgb:{value(V){let z=/[a-f\d]{6}|[a-f\d]{3}/i.exec(V.toString(16));if(!z)return[0,0,0];let[D]=z;if(D.length===3)D=[...D].map((Q)=>Q+Q).join("");let H=Number.parseInt(D,16);return[H>>16&255,H>>8&255,H&255]},enumerable:!1},hexToAnsi256:{value:(V)=>J.rgbToAnsi256(...J.hexToRgb(V)),enumerable:!1},ansi256ToAnsi:{value(V){if(V<8)return 30+V;if(V<16)return 90+(V-8);let z,D,H;if(V>=232)z=((V-232)*10+8)/255,D=z,H=z;else{V-=16;let N=V%36;z=Math.floor(V/36)/5,D=Math.floor(N/6)/5,H=N%6/5}let Q=Math.max(z,D,H)*2;if(Q===0)return 30;let U=30+(Math.round(H)<<2|Math.round(D)<<1|Math.round(z));if(Q===2)U+=60;return U},enumerable:!1},rgbToAnsi:{value:(V,z,D)=>J.ansi256ToAnsi(J.rgbToAnsi256(V,z,D)),enumerable:!1},hexToAnsi:{value:(V)=>J.ansi256ToAnsi(J.hexToAnsi256(V)),enumerable:!1}}),J}var M=(q=0)=>(V)=>`\x1B[${V+q}m`,Y=(q=0)=>(V)=>`\x1B[${38+q};5;${V}m`,k=(q=0)=>(V,z,D)=>`\x1B[${38+q};2;${V};${z};${D}m`,J,V1,u,m,q1,p,X;var R=j(()=>{J={modifier:{reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],overline:[53,55],inverse:[7,27],hidden:[8,28],strikethrough:[9,29]},color:{black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],blackBright:[90,39],gray:[90,39],grey:[90,39],redBright:[91,39],greenBright:[92,39],yellowBright:[93,39],blueBright:[94,39],magentaBright:[95,39],cyanBright:[96,39],whiteBright:[97,39]},bgColor:{bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],bgBlackBright:[100,49],bgGray:[100,49],bgGrey:[100,49],bgRedBright:[101,49],bgGreenBright:[102,49],bgYellowBright:[103,49],bgBlueBright:[104,49],bgMagentaBright:[105,49],bgCyanBright:[106,49],bgWhiteBright:[107,49]}},V1=Object.keys(J.modifier),u=Object.keys(J.color),m=Object.keys(J.bgColor),q1=[...u,...m];p=c(),X=p});import I from"node:process";import d from"node:os";import E from"node:tty";function W(q,V=globalThis.Deno?globalThis.Deno.args:I.argv){let z=q.startsWith("-")?"":q.length===1?"-":"--",D=V.indexOf(z+q),H=V.indexOf("--");return D!==-1&&(H===-1||D<H)}function y(){if("FORCE_COLOR"in K){if(K.FORCE_COLOR==="true")return 1;if(K.FORCE_COLOR==="false")return 0;return K.FORCE_COLOR.length===0?1:Math.min(Number.parseInt(K.FORCE_COLOR,10),3)}}function g(q){if(q===0)return!1;return{level:q,hasBasic:!0,has256:q>=2,has16m:q>=3}}function i(q,{streamIsTTY:V,sniffFlags:z=!0}={}){let D=y();if(D!==void 0)B=D;let H=z?B:D;if(H===0)return 0;if(z){if(W("color=16m")||W("color=full")||W("color=truecolor"))return 3;if(W("color=256"))return 2}if("TF_BUILD"in K&&"AGENT_NAME"in K)return 1;if(q&&!V&&H===void 0)return 0;let Q=H||0;if(K.TERM==="dumb")return Q;if(I.platform==="win32"){let U=d.release().split(".");if(Number(U[0])>=10&&Number(U[2])>=10586)return Number(U[2])>=14931?3:2;return 1}if("CI"in K){if(["GITHUB_ACTIONS","GITEA_ACTIONS","CIRCLECI"].some((U)=>(U in K)))return 3;if(["TRAVIS","APPVEYOR","GITLAB_CI","BUILDKITE","DRONE"].some((U)=>(U in K))||K.CI_NAME==="codeship")return 1;return Q}if("TEAMCITY_VERSION"in K)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(K.TEAMCITY_VERSION)?1:0;if(K.COLORTERM==="truecolor")return 3;if(K.TERM==="xterm-kitty")return 3;if(K.TERM==="xterm-ghostty")return 3;if(K.TERM==="wezterm")return 3;if("TERM_PROGRAM"in K){let U=Number.parseInt((K.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(K.TERM_PROGRAM){case"iTerm.app":return U>=3?3:2;case"Apple_Terminal":return 2}}if(/-256(color)?$/i.test(K.TERM))return 2;if(/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(K.TERM))return 1;if("COLORTERM"in K)return 1;return Q}function T(q,V={}){let z=i(q,{streamIsTTY:q&&q.isTTY,...V});return g(z)}var K,B,a,A;var C=j(()=>{({env:K}=I);if(W("no-color")||W("no-colors")||W("color=false")||W("color=never"))B=0;else if(W("color")||W("colors")||W("color=true")||W("color=always"))B=1;a={stdout:T({isTTY:E.isatty(1)}),stderr:T({isTTY:E.isatty(2)})},A=a});function F(q,V,z){let D=q.indexOf(V);if(D===-1)return q;let H=V.length,Q=0,U="";do U+=q.slice(Q,D)+V+z,Q=D+H,D=q.indexOf(V,Q);while(D!==-1);return U+=q.slice(Q),U}function _(q,V,z,D){let H=0,Q="";do{let U=q[D-1]==="\r";Q+=q.slice(H,U?D-1:D)+V+(U?`\r
2
- `:`
3
- `)+z,H=D+1,D=q.indexOf(`
4
- `,H)}while(D!==-1);return Q+=q.slice(H),Q}var b=()=>{};class o{constructor(q){return v(q)}}function G(q){return v(q)}var S,h,L,Z,O,f,$,n=(q,V={})=>{if(V.level&&!(Number.isInteger(V.level)&&V.level>=0&&V.level<=3))throw Error("The `level` option should be an integer from 0 to 3");let z=S?S.level:0;q.level=V.level===void 0?z:V.level},v=(q)=>{let V=(...z)=>z.join(" ");return n(V,q),Object.setPrototypeOf(V,G.prototype),V},P=(q,V,z,...D)=>{if(q==="rgb"){if(V==="ansi16m")return X[z].ansi16m(...D);if(V==="ansi256")return X[z].ansi256(X.rgbToAnsi256(...D));return X[z].ansi(X.rgbToAnsi(...D))}if(q==="hex")return P("rgb",V,z,...X.hexToRgb(...D));return X[z][q](...D)},t,r,x=(q,V,z)=>{let D,H;if(z===void 0)D=q,H=V;else D=z.openAll+q,H=V+z.closeAll;return{open:q,close:V,openAll:D,closeAll:H,parent:z}},w=(q,V,z)=>{let D=(...H)=>l(D,H.length===1?""+H[0]:H.join(" "));return Object.setPrototypeOf(D,r),D[L]=q,D[Z]=V,D[O]=z,D},l=(q,V)=>{if(q.level<=0||!V)return q[O]?"":V;let z=q[Z];if(z===void 0)return V;let{openAll:D,closeAll:H}=z;if(V.includes("\x1B"))while(z!==void 0)V=F(V,z.close,z.open),z=z.parent;let Q=V.indexOf(`
5
- `);if(Q!==-1)V=_(V,H,D,Q);return D+V+H},s,Z1,O1;var e=j(()=>{R();C();b();({stdout:S,stderr:h}=A),L=Symbol("GENERATOR"),Z=Symbol("STYLER"),O=Symbol("IS_EMPTY"),f=["ansi","ansi","ansi256","ansi16m"],$=Object.create(null);Object.setPrototypeOf(G.prototype,Function.prototype);for(let[q,V]of Object.entries(X))$[q]={get(){let z=w(this,x(V.open,V.close,this[Z]),this[O]);return Object.defineProperty(this,q,{value:z}),z}};$.visible={get(){let q=w(this,this[Z],!0);return Object.defineProperty(this,"visible",{value:q}),q}};t=["rgb","hex","ansi256"];for(let q of t){$[q]={get(){let{level:z}=this;return function(...D){let H=x(P(q,f[z],"color",...D),X.color.close,this[Z]);return w(this,H,this[O])}}};let V="bg"+q[0].toUpperCase()+q.slice(1);$[V]={get(){let{level:z}=this;return function(...D){let H=x(P(q,f[z],"bgColor",...D),X.bgColor.close,this[Z]);return w(this,H,this[O])}}}}r=Object.defineProperties(()=>{},{...$,level:{enumerable:!0,get(){return this[L].level},set(q){this[L].level=q}}});Object.defineProperties(G.prototype,$);s=G(),Z1=G({level:h?h.level:0}),O1=s});
6
- export{o as Z8,O1 as _8,e as $8};
@@ -1,2 +0,0 @@
1
- import{hsa as M}from"./cli-1.0.13-d9nvpqpw.mjs";function J(){return"prod"}function W(){if(process.env.CLAUDE_CODE_CUSTOM_OAUTH_URL)return"-custom-oauth";switch(J()){case"local":return"-local-oauth";case"staging":return"-staging-oauth";case"prod":return""}}function $(){let k=process.env.CLAUDE_LOCAL_OAUTH_API_BASE?.replace(/\/$/,"")??"http://localhost:8000",x=process.env.CLAUDE_LOCAL_OAUTH_APPS_BASE?.replace(/\/$/,"")??"http://localhost:4000",q=process.env.CLAUDE_LOCAL_OAUTH_CONSOLE_BASE?.replace(/\/$/,"")??"http://localhost:3000";return{BASE_API_URL:k,CONSOLE_AUTHORIZE_URL:`${q}/oauth/authorize`,CLAUDE_AI_AUTHORIZE_URL:`${x}/oauth/authorize`,CLAUDE_AI_ORIGIN:x,TOKEN_URL:`${k}/v1/oauth/token`,API_KEY_URL:`${k}/api/oauth/claude_cli/create_api_key`,ROLES_URL:`${k}/api/oauth/claude_cli/roles`,CONSOLE_SUCCESS_URL:`${q}/buy_credits?returnUrl=/oauth/code/success%3Fapp%3Dclaude-code`,CLAUDEAI_SUCCESS_URL:`${q}/oauth/code/success?app=claude-code`,MANUAL_REDIRECT_URL:`${q}/oauth/code/callback`,CLIENT_ID:"22422756-60c9-4084-8eb7-27705fd5cf9a",OAUTH_FILE_SUFFIX:"-local-oauth",MCP_PROXY_URL:"http://localhost:8205",MCP_PROXY_PATH:"/v1/toolbox/shttp/mcp/{server_id}"}}function h(){let k=(()=>{switch(J()){case"local":return $();case"staging":return z;case"prod":return z}})(),x=process.env.CLAUDE_CODE_CUSTOM_OAUTH_URL;if(x){let j=x.replace(/\/$/,"");if(!m.includes(j))throw Error("CLAUDE_CODE_CUSTOM_OAUTH_URL is not an approved endpoint.");k={...k,BASE_API_URL:j,CONSOLE_AUTHORIZE_URL:`${j}/oauth/authorize`,CLAUDE_AI_AUTHORIZE_URL:`${j}/oauth/authorize`,CLAUDE_AI_ORIGIN:j,TOKEN_URL:`${j}/v1/oauth/token`,API_KEY_URL:`${j}/api/oauth/claude_cli/create_api_key`,ROLES_URL:`${j}/api/oauth/claude_cli/roles`,CONSOLE_SUCCESS_URL:`${j}/oauth/code/success?app=claude-code`,CLAUDEAI_SUCCESS_URL:`${j}/oauth/code/success?app=claude-code`,MANUAL_REDIRECT_URL:`${j}/oauth/code/callback`,OAUTH_FILE_SUFFIX:"-custom-oauth"}}let q=process.env.CLAUDE_CODE_OAUTH_CLIENT_ID;if(q)k={...k,CLIENT_ID:q};return k}var Q="user:inference",K="user:profile",V="org:create_api_key",X="oauth-2025-04-20",Y,Z,y,z,G="https://claude.ai/oauth/claude-code-client-metadata",m;var w=M(()=>{Y=[V,K],Z=[K,Q,"user:sessions:claude_code","user:mcp_servers","user:file_upload"],y=Array.from(new Set([...Y,...Z])),z={BASE_API_URL:"https://api.anthropic.com",CONSOLE_AUTHORIZE_URL:"https://platform.claude.com/oauth/authorize",CLAUDE_AI_AUTHORIZE_URL:"https://claude.com/cai/oauth/authorize",CLAUDE_AI_ORIGIN:"https://claude.ai",TOKEN_URL:"https://platform.claude.com/v1/oauth/token",API_KEY_URL:"https://api.anthropic.com/api/oauth/claude_cli/create_api_key",ROLES_URL:"https://api.anthropic.com/api/oauth/claude_cli/roles",CONSOLE_SUCCESS_URL:"https://platform.claude.com/buy_credits?returnUrl=/oauth/code/success%3Fapp%3Dclaude-code",CLAUDEAI_SUCCESS_URL:"https://platform.claude.com/oauth/code/success?app=claude-code",MANUAL_REDIRECT_URL:"https://platform.claude.com/oauth/code/callback",CLIENT_ID:"9d1c250a-e61b-44d9-88ed-5944d1962f5e",OAUTH_FILE_SUFFIX:"",MCP_PROXY_URL:"https://mcp-proxy.anthropic.com",MCP_PROXY_PATH:"/v1/mcp/{server_id}"};m=["https://beacon.claude-ai.staging.ant.dev","https://claude.fedstart.com","https://claude-staging.fedstart.com"]});
2
- export{W as Nia,Q as Oia,K as Pia,X as Qia,Y as Ria,Z as Sia,y as Tia,G as Uia,h as Via,w as Wia};
@@ -1,4 +0,0 @@
1
- import{KU as W,LU as P}from"./cli-1.0.13-wrcxv50n.mjs";import{Eea as B,Fea as G,Tea as S,Y_ as M,Z_ as R,gba as A,iba as y,qga as O,u$ as _,x_ as K,y_ as I,yga as F}from"./cli-1.0.13-p1nsb8ay.mjs";import{iia as D,jia as x}from"./cli-1.0.13-kq0mvqax.mjs";import{Xqa as $,Yqa as z}from"./cli-1.0.13-thxvtvt4.mjs";z();x();S();y();I();_();F();P();var T=[/(?:^|\/)(?:package-lock\.json|yarn\.lock|bun\.lock|bun\.lockb|pnpm-lock\.yaml|Pipfile\.lock|poetry\.lock|Cargo\.lock|Gemfile\.lock|go\.sum|composer\.lock|uv\.lock)$/,/\.generated\./,/(?:^|\/)(?:dist|build|out|target|node_modules|\.next|__pycache__)\//,/\.(?:min\.js|min\.css|map|pyc|pyo)$/,/\.(?:json|ya?ml|toml|xml|ini|cfg|conf|env|lock|txt|md|mdx|rst|csv|log|svg)$/i,/(?:^|\/)\.?(?:eslintrc|prettierrc|babelrc|editorconfig|gitignore|gitattributes|dockerignore|npmrc)/,/(?:^|\/)(?:tsconfig|jsconfig|biome|vitest\.config|jest\.config|webpack\.config|vite\.config|rollup\.config)\.[a-z]+$/,/(?:^|\/)\.(?:github|vscode|idea|claude)\//,/(?:^|\/)(?:CHANGELOG|LICENSE|CONTRIBUTING|CODEOWNERS|README)(?:\.[a-z]+)?$/i];function k(L){return!T.some((U)=>U.test(L))}function d(L,U=20){let H=new Map;for(let V of L)H.set(V,(H.get(V)||0)+1);return Array.from(H.entries()).sort((V,Q)=>Q[1]-V[1]).slice(0,U).map(([V,Q])=>`${Q.toString().padStart(6)} ${V}`).join(`
2
- `)}function E(L,U){let H=[],V=new Set,Q=new Map;for(let J=1;H.length<U&&J<=U;J++)for(let X of L){if(H.length>=U)break;if(!k(X))continue;let Y=Math.max(X.lastIndexOf("/"),X.lastIndexOf("\\")),Z=Y>=0?X.slice(Y+1):X;if(!Z||V.has(Z))continue;let q=Y>=0?X.slice(0,Y):".";if((Q.get(q)??0)>=J)continue;H.push(Z),V.add(Z),Q.set(q,(Q.get(q)??0)+1)}return H.length>=U?H:[]}async function N(){if(A.platform==="win32")return[];if(!await R())return[];try{let L=await W(),U=["log","-n","1000","--pretty=format:","--name-only","--diff-filter=M"],H=new Map,V=(J)=>{for(let X of J.split(`
3
- `)){let Y=X.trim();if(Y)H.set(Y,(H.get(Y)??0)+1)}};if(L){let{stdout:J}=await K("git",[...U,`--author=${L}`],{cwd:D()});V(J)}if(H.size<10){let{stdout:J}=await K(M(),U,{cwd:D()});V(J)}let Q=Array.from(H.entries()).sort((J,X)=>X[1]-J[1]).map(([J])=>J);return E(Q,5)}catch(L){return O(L),[]}}var b=604800000;function v(L){let U=B(),H=U.exampleFiles?.length?U.exampleFiles:["<filepath>"],Q=[...["fix lint errors","fix typecheck errors",`how does ${H[0]} work?`,`refactor ${H[Math.floor(H.length/2)]}`,"how do I log an error?",`edit ${H[H.length-1]} to...`,`write a test for ${H[0]}`,"create a util logging.py that..."]];for(let J=Q.length-1;J>0;J--){let X=Math.floor(Math.random()*(J+1));[Q[J],Q[X]]=[Q[X],Q[J]]}return Q.slice(0,L).map((J)=>`Try "${J}"`)}var p=$(()=>{return v(1)[0]??'Try "fix lint errors"'}),c=$((L)=>{return v(L)}),r=$(async()=>{let L=B(),U=Date.now(),H=L.exampleFilesGeneratedAt??0;if(U-H>b)L.exampleFiles=[];if(!L.exampleFiles?.length)N().then((V)=>{if(V.length)G((Q)=>({...Q,exampleFiles:V,exampleFilesGeneratedAt:Date.now()}))})});
4
- export{d as Ia,E as Ja,p as Ka,c as La,r as Ma};
@@ -1,2 +0,0 @@
1
- import{Dja as E,Eja as F,Ija as M}from"./cli-1.0.13-4dp5a597.mjs";import{Kra as N,sra as H}from"./cli-1.0.13-696y87my.mjs";N();M();function V(z){let C=Buffer.from(z,"base64url").toString("utf-8"),q=F(C);if(!q||typeof q!=="object"||!("version"in q)||q.version!==1)throw Error(`Unsupported work secret version: ${q&&typeof q==="object"&&"version"in q?q.version:"unknown"}`);let A=q;if(typeof A.session_ingress_token!=="string"||A.session_ingress_token.length===0)throw Error("Invalid work secret: missing or empty session_ingress_token");if(typeof A.api_base_url!=="string")throw Error("Invalid work secret: missing api_base_url");return q}function W(z,C){let q=new URL(z).hostname,A=q==="localhost"||q==="127.0.0.1",D=A?"ws":"wss",J=A?"v2":"v1",K=z.replace(/^https?:\/\//,"").replace(/\/+$/,"");return`${D}://${K}/${J}/session_ingress/ws/${C}`}function X(z,C){if(z===C)return!0;let q=z.slice(z.lastIndexOf("_")+1),A=C.slice(C.lastIndexOf("_")+1);return q.length>=4&&q===A}function Y(z,C){return`${z.replace(/\/+$/,"")}/v1/code/sessions/${C}`}async function Z(z,C){let q=await H.post(`${z}/worker/register`,{},{headers:{Authorization:`Bearer ${C}`,"Content-Type":"application/json","anthropic-version":"2023-06-01"},timeout:1e4}),A=q.data?.worker_epoch,D=typeof A==="string"?Number(A):A;if(typeof D!=="number"||!Number.isFinite(D)||!Number.isSafeInteger(D))throw Error(`registerWorker: invalid worker_epoch in response: ${E(q.data)}`);return D}
2
- export{V as Rb,W as Sb,X as Tb,Y as Ub,Z as Vb};