@claudiolabs/claudin 1.1.28 → 1.1.29

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 (915) hide show
  1. package/dist/chunks/AgentTool-1.1.29-awhbrkah.mjs +1 -0
  2. package/dist/chunks/App-1.1.29-pm1xvr3g.mjs +1 -0
  3. package/dist/chunks/ApproveApiKey-1.1.29-c44twxse.mjs +1 -0
  4. package/dist/chunks/AssistantSessionChooser-1.1.29-f11by8v4.mjs +1 -0
  5. package/dist/chunks/AutoModeOptInDialog-1.1.29-vnqj2te2.mjs +1 -0
  6. package/dist/chunks/BypassPermissionsModeDialog-1.1.29-z2ah9t9j.mjs +1 -0
  7. package/dist/chunks/ClaudeMdExternalIncludesDialog-1.1.29-30pn689g.mjs +1 -0
  8. package/dist/chunks/ConsoleOAuthFlow-1.1.29-sja8s9ck.mjs +1 -0
  9. package/dist/chunks/DiffDialog-1.1.29-k98h1gzp.mjs +6 -0
  10. package/dist/chunks/Doctor-1.1.29-ab8tjfg7.mjs +1 -0
  11. package/dist/chunks/ExplorerDialog-1.1.29-16y5q4ta.mjs +6 -0
  12. package/dist/chunks/ITermBackend-1.1.29-rk6hjgv2.mjs +1 -0
  13. package/dist/chunks/InvalidConfigDialog-1.1.29-kwjexf2x.mjs +1 -0
  14. package/dist/chunks/InvalidSettingsDialog-1.1.29-479a268q.mjs +1 -0
  15. package/dist/chunks/MigrationDialog-1.1.29-vshc8a59.mjs +1 -0
  16. package/dist/chunks/Onboarding-1.1.29-snkzzfjw.mjs +1 -0
  17. package/dist/chunks/ProviderManager-1.1.29-x67swksb.mjs +1 -0
  18. package/dist/chunks/REPL-1.1.29-yw76hfjs.mjs +1 -0
  19. package/dist/chunks/ResumeConversation-1.1.29-033m6wha.mjs +1 -0
  20. package/dist/chunks/SnapshotUpdateDialog-1.1.29-kbtx0xa6.mjs +1 -0
  21. package/dist/chunks/TeleportProgress-1.1.29-dq4fkj22.mjs +1 -0
  22. package/dist/chunks/TeleportRepoMismatchDialog-1.1.29-x5fsxqa3.mjs +1 -0
  23. package/dist/chunks/TeleportResumeWrapper-1.1.29-18h9wdn7.mjs +1 -0
  24. package/dist/chunks/TmuxBackend-1.1.29-42z37x43.mjs +9 -0
  25. package/dist/chunks/ToolSearchTool-1.1.29-dkk7q8sf.mjs +1 -0
  26. package/dist/chunks/TrustDialog-1.1.29-944b5g4w.mjs +1 -0
  27. package/dist/chunks/activeProvider-1.1.29-j7qknp7t.mjs +1 -0
  28. package/dist/chunks/add-dir-1.1.29-na3kdm45.mjs +1 -0
  29. package/dist/chunks/agentTypes-1.1.29-fjjae3tn.mjs +1 -0
  30. package/dist/chunks/agents-1.1.29-gdcf24kq.mjs +110 -0
  31. package/dist/chunks/agents-1.1.29-hbyggbar.mjs +3 -0
  32. package/dist/chunks/api-1.1.29-tb280rgw.mjs +1 -0
  33. package/dist/chunks/asciicast-1.1.29-69mc9agv.mjs +1 -0
  34. package/dist/chunks/assistant-1.1.29-qmvynqfb.mjs +1 -0
  35. package/dist/chunks/auth-1.1.29-k2h0c136.mjs +1 -0
  36. package/dist/chunks/auth-1.1.29-mkh8s4y7.mjs +1 -0
  37. package/dist/chunks/autoMode-1.1.29-5enddc49.mjs +52 -0
  38. package/dist/chunks/autoModeSetup-1.1.29-p4hp4dv6.mjs +44 -0
  39. package/dist/chunks/autoUpdater-1.1.29-sk8rt0mh.mjs +1 -0
  40. package/dist/chunks/backgroundHousekeeping-1.1.29-qxt8xakt.mjs +1 -0
  41. package/dist/chunks/branch-1.1.29-0zwfdt6s.mjs +4 -0
  42. package/dist/chunks/bridge-1.1.29-ee6b7cck.mjs +2 -0
  43. package/dist/chunks/bridgeConfig-1.1.29-4wseqmtn.mjs +1 -0
  44. package/dist/chunks/bridgeEnabled-1.1.29-2r501b1s.mjs +1 -0
  45. package/dist/chunks/bridgeMain-1.1.29-sk2e5ssh.mjs +88 -0
  46. package/dist/chunks/bridgePointer-1.1.29-mjz0jnns.mjs +1 -0
  47. package/dist/chunks/btw-1.1.29-arf7x19m.mjs +1 -0
  48. package/dist/chunks/buddy-1.1.29-awsva6y8.mjs +3 -0
  49. package/dist/chunks/cache-probe-1.1.29-67egf5jw.mjs +21 -0
  50. package/dist/chunks/cacheStats-1.1.29-yk1h4vdq.mjs +4 -0
  51. package/dist/chunks/caches-1.1.29-8ryyt679.mjs +1 -0
  52. package/dist/chunks/cd-1.1.29-w9gepxqm.mjs +3 -0
  53. package/dist/chunks/claudeDesktop-1.1.29-7g8vpmk4.mjs +1 -0
  54. package/dist/chunks/claudemd-1.1.29-z00d07f9.mjs +1 -0
  55. package/dist/chunks/clear-1.1.29-aj6vgn4b.mjs +1 -0
  56. package/dist/chunks/clearTerminal-1.1.29-95xqw9gq.mjs +1 -0
  57. package/dist/chunks/cli-1.1.29-0kfg7hf8.mjs +2 -0
  58. package/dist/chunks/cli-1.1.29-0rnfn0gy.mjs +2 -0
  59. package/dist/chunks/cli-1.1.29-0s73ykp6.mjs +3 -0
  60. package/dist/chunks/cli-1.1.29-0tf52nkw.mjs +8 -0
  61. package/dist/chunks/cli-1.1.29-0v2ryegc.mjs +2 -0
  62. package/dist/chunks/cli-1.1.29-0vpcc8vm.mjs +2 -0
  63. package/dist/chunks/cli-1.1.29-11hr4111.mjs +2 -0
  64. package/dist/chunks/cli-1.1.29-13gvy0m9.mjs +25 -0
  65. package/dist/chunks/cli-1.1.29-153rxzts.mjs +2 -0
  66. package/dist/chunks/cli-1.1.29-17kpfbq0.mjs +2 -0
  67. package/dist/chunks/cli-1.1.29-1dqp4d2w.mjs +2 -0
  68. package/dist/chunks/cli-1.1.29-1pqjxrp8.mjs +2 -0
  69. package/dist/chunks/cli-1.1.29-20bcsb6f.mjs +15 -0
  70. package/dist/chunks/cli-1.1.29-23gv5dgk.mjs +2 -0
  71. package/dist/chunks/cli-1.1.29-247v5hpd.mjs +2 -0
  72. package/dist/chunks/cli-1.1.29-252q86ck.mjs +2 -0
  73. package/dist/chunks/cli-1.1.29-27h8nqm5.mjs +2 -0
  74. package/dist/chunks/cli-1.1.29-29svre2k.mjs +133 -0
  75. package/dist/chunks/cli-1.1.29-2e5s8gsb.mjs +24 -0
  76. package/dist/chunks/cli-1.1.29-2ezms0yf.mjs +2 -0
  77. package/dist/chunks/cli-1.1.29-2hejf6pj.mjs +2 -0
  78. package/dist/chunks/cli-1.1.29-2mcxe125.mjs +2 -0
  79. package/dist/chunks/cli-1.1.29-2sjtk1zb.mjs +2 -0
  80. package/dist/chunks/cli-1.1.29-2tyhgmxe.mjs +2 -0
  81. package/dist/chunks/cli-1.1.29-2yev8mxw.mjs +6 -0
  82. package/dist/chunks/cli-1.1.29-31y8na35.mjs +2 -0
  83. package/dist/chunks/cli-1.1.29-34nqdrk5.mjs +2 -0
  84. package/dist/chunks/cli-1.1.29-35kpvqby.mjs +4 -0
  85. package/dist/chunks/cli-1.1.29-3776marx.mjs +9 -0
  86. package/dist/chunks/cli-1.1.29-37j436rz.mjs +2 -0
  87. package/dist/chunks/cli-1.1.29-3dnft82a.mjs +2 -0
  88. package/dist/chunks/cli-1.1.29-3fcr0sm5.mjs +2 -0
  89. package/dist/chunks/cli-1.1.29-3s4wcn65.mjs +4 -0
  90. package/dist/chunks/cli-1.1.29-40v483aw.mjs +58 -0
  91. package/dist/chunks/cli-1.1.29-4ahf2sg4.mjs +2 -0
  92. package/dist/chunks/cli-1.1.29-4bemzx23.mjs +2 -0
  93. package/dist/chunks/cli-1.1.29-4p953chd.mjs +2 -0
  94. package/dist/chunks/cli-1.1.29-4pdnzc5j.mjs +2 -0
  95. package/dist/chunks/cli-1.1.29-4q271q7a.mjs +2 -0
  96. package/dist/chunks/cli-1.1.29-4w9b7g8h.mjs +3 -0
  97. package/dist/chunks/cli-1.1.29-4xqgqvwm.mjs +2 -0
  98. package/dist/chunks/cli-1.1.29-4yztmbcx.mjs +17 -0
  99. package/dist/chunks/cli-1.1.29-55khgk00.mjs +9 -0
  100. package/dist/chunks/cli-1.1.29-566mygcr.mjs +2 -0
  101. package/dist/chunks/cli-1.1.29-57e9kkv7.mjs +12 -0
  102. package/dist/chunks/cli-1.1.29-57f3k3fp.mjs +5 -0
  103. package/dist/chunks/cli-1.1.29-5bm4np8j.mjs +2 -0
  104. package/dist/chunks/cli-1.1.29-5gydp5n7.mjs +6 -0
  105. package/dist/chunks/cli-1.1.29-5mpj7dft.mjs +2 -0
  106. package/dist/chunks/cli-1.1.29-5p2zzfpq.mjs +4 -0
  107. package/dist/chunks/cli-1.1.29-5pbjmqzt.mjs +2 -0
  108. package/dist/chunks/cli-1.1.29-5svhj1v0.mjs +18 -0
  109. package/dist/chunks/cli-1.1.29-6g47vtst.mjs +2 -0
  110. package/dist/chunks/cli-1.1.29-6kvtrk8a.mjs +2 -0
  111. package/dist/chunks/cli-1.1.29-6mbq5wth.mjs +3 -0
  112. package/dist/chunks/cli-1.1.29-6ngsfhk3.mjs +17 -0
  113. package/dist/chunks/cli-1.1.29-6q1q5fa3.mjs +2 -0
  114. package/dist/chunks/cli-1.1.29-6qykmvew.mjs +2 -0
  115. package/dist/chunks/cli-1.1.29-6t6n6ctd.mjs +2 -0
  116. package/dist/chunks/cli-1.1.29-71e5px3b.mjs +2 -0
  117. package/dist/chunks/cli-1.1.29-740d0ga1.mjs +2 -0
  118. package/dist/chunks/cli-1.1.29-79tgwbnn.mjs +2 -0
  119. package/dist/chunks/cli-1.1.29-7p975zzx.mjs +2 -0
  120. package/dist/chunks/cli-1.1.29-7peev9wq.mjs +3 -0
  121. package/dist/chunks/cli-1.1.29-7pfvq0z6.mjs +60 -0
  122. package/dist/chunks/cli-1.1.29-7vrxybxh.mjs +15 -0
  123. package/dist/chunks/cli-1.1.29-834b4680.mjs +2 -0
  124. package/dist/chunks/cli-1.1.29-8398r1x1.mjs +2 -0
  125. package/dist/chunks/cli-1.1.29-842m4sds.mjs +2 -0
  126. package/dist/chunks/cli-1.1.29-84fpb4zk.mjs +2 -0
  127. package/dist/chunks/cli-1.1.29-89nqwnk6.mjs +3 -0
  128. package/dist/chunks/cli-1.1.29-8c371c3k.mjs +2 -0
  129. package/dist/chunks/cli-1.1.29-8dsnjzad.mjs +2 -0
  130. package/dist/chunks/cli-1.1.29-8eeh9yez.mjs +2 -0
  131. package/dist/chunks/cli-1.1.29-8k2xw0ns.mjs +16 -0
  132. package/dist/chunks/cli-1.1.29-8s0k2ydg.mjs +2 -0
  133. package/dist/chunks/cli-1.1.29-995n5c8r.mjs +2 -0
  134. package/dist/chunks/cli-1.1.29-9fkgjjzm.mjs +2 -0
  135. package/dist/chunks/cli-1.1.29-9n8sz71q.mjs +6 -0
  136. package/dist/chunks/cli-1.1.29-9qc9kyz8.mjs +6 -0
  137. package/dist/chunks/cli-1.1.29-9s3rafev.mjs +2 -0
  138. package/dist/chunks/cli-1.1.29-9s9kgzze.mjs +2 -0
  139. package/dist/chunks/cli-1.1.29-a1p2bm8x.mjs +4 -0
  140. package/dist/chunks/cli-1.1.29-a6pnwve8.mjs +206 -0
  141. package/dist/chunks/cli-1.1.29-aa81cr7r.mjs +2 -0
  142. package/dist/chunks/cli-1.1.29-aazftc8x.mjs +4 -0
  143. package/dist/chunks/cli-1.1.29-ajwqka67.mjs +2 -0
  144. package/dist/chunks/cli-1.1.29-akx5bp37.mjs +2 -0
  145. package/dist/chunks/cli-1.1.29-am1n3767.mjs +5553 -0
  146. package/dist/chunks/cli-1.1.29-aptcshv0.mjs +2 -0
  147. package/dist/chunks/cli-1.1.29-ar7jahd2.mjs +2 -0
  148. package/dist/chunks/cli-1.1.29-bpvwqqqm.mjs +3 -0
  149. package/dist/chunks/cli-1.1.29-bzfhb58d.mjs +21 -0
  150. package/dist/chunks/cli-1.1.29-c67xmzgw.mjs +2 -0
  151. package/dist/chunks/cli-1.1.29-c7eatffy.mjs +7 -0
  152. package/dist/chunks/cli-1.1.29-ccmw3ns3.mjs +2 -0
  153. package/dist/chunks/cli-1.1.29-cgska4m2.mjs +2 -0
  154. package/dist/chunks/cli-1.1.29-cjy4bmpv.mjs +2 -0
  155. package/dist/chunks/cli-1.1.29-cwngf5s4.mjs +2 -0
  156. package/dist/chunks/cli-1.1.29-df0crs3h.mjs +2 -0
  157. package/dist/chunks/cli-1.1.29-dfra4ygt.mjs +2 -0
  158. package/dist/chunks/cli-1.1.29-dpzd32s9.mjs +2 -0
  159. package/dist/chunks/cli-1.1.29-dseazhey.mjs +34 -0
  160. package/dist/chunks/cli-1.1.29-e7b3rw2q.mjs +2 -0
  161. package/dist/chunks/cli-1.1.29-enk5zgkk.mjs +2 -0
  162. package/dist/chunks/cli-1.1.29-eq7p29fp.mjs +2 -0
  163. package/dist/chunks/cli-1.1.29-erh6v56f.mjs +2 -0
  164. package/dist/chunks/cli-1.1.29-es8f8tm1.mjs +2 -0
  165. package/dist/chunks/cli-1.1.29-ex9733z1.mjs +2 -0
  166. package/dist/chunks/cli-1.1.29-f103mqc1.mjs +133 -0
  167. package/dist/chunks/cli-1.1.29-f56z0kjj.mjs +2 -0
  168. package/dist/chunks/cli-1.1.29-f8qh0czy.mjs +24 -0
  169. package/dist/chunks/cli-1.1.29-fhwjnhs2.mjs +12 -0
  170. package/dist/chunks/cli-1.1.29-fsht50yz.mjs +2 -0
  171. package/dist/chunks/cli-1.1.29-g2g0bf6s.mjs +2 -0
  172. package/dist/chunks/cli-1.1.29-g9nssmee.mjs +2 -0
  173. package/dist/chunks/cli-1.1.29-gd1bzvdb.mjs +20 -0
  174. package/dist/chunks/cli-1.1.29-gfwfhh3b.mjs +4 -0
  175. package/dist/chunks/cli-1.1.29-gfyabc3h.mjs +2 -0
  176. package/dist/chunks/cli-1.1.29-gycpj0z6.mjs +2 -0
  177. package/dist/chunks/cli-1.1.29-h1ej5qf0.mjs +2 -0
  178. package/dist/chunks/cli-1.1.29-h4fg85xm.mjs +2 -0
  179. package/dist/chunks/cli-1.1.29-hez6jzkx.mjs +2 -0
  180. package/dist/chunks/cli-1.1.29-hsa1qk75.mjs +2 -0
  181. package/dist/chunks/cli-1.1.29-j17q2nnf.mjs +2 -0
  182. package/dist/chunks/cli-1.1.29-j3n6rxnx.mjs +2 -0
  183. package/dist/chunks/cli-1.1.29-k0yj3sf0.mjs +2 -0
  184. package/dist/chunks/cli-1.1.29-kcfqkdev.mjs +24 -0
  185. package/dist/chunks/cli-1.1.29-kd96jtpb.mjs +2 -0
  186. package/dist/chunks/cli-1.1.29-kjbjanmr.mjs +2 -0
  187. package/dist/chunks/cli-1.1.29-krg96g94.mjs +2 -0
  188. package/dist/chunks/cli-1.1.29-ksekfz16.mjs +3 -0
  189. package/dist/chunks/cli-1.1.29-kywbej24.mjs +3 -0
  190. package/dist/chunks/cli-1.1.29-m4bwjmrm.mjs +2 -0
  191. package/dist/chunks/cli-1.1.29-m4j21s8k.mjs +3 -0
  192. package/dist/chunks/cli-1.1.29-m7rehwdd.mjs +58 -0
  193. package/dist/chunks/cli-1.1.29-mcacd7ag.mjs +2 -0
  194. package/dist/chunks/cli-1.1.29-mn3z3w8e.mjs +2 -0
  195. package/dist/chunks/cli-1.1.29-mwntmkzh.mjs +39 -0
  196. package/dist/chunks/cli-1.1.29-mxtxy5qg.mjs +2 -0
  197. package/dist/chunks/cli-1.1.29-mxxghqnd.mjs +2 -0
  198. package/dist/chunks/cli-1.1.29-nkb4dq83.mjs +2 -0
  199. package/dist/chunks/cli-1.1.29-nn0hkwgq.mjs +2 -0
  200. package/dist/chunks/cli-1.1.29-nx6ynaex.mjs +6 -0
  201. package/dist/chunks/cli-1.1.29-nxbgdt4q.mjs +2 -0
  202. package/dist/chunks/cli-1.1.29-nxvs12dw.mjs +2 -0
  203. package/dist/chunks/cli-1.1.29-pbydvpcy.mjs +7 -0
  204. package/dist/chunks/cli-1.1.29-pf67dsfj.mjs +42 -0
  205. package/dist/chunks/cli-1.1.29-pwsznt80.mjs +2 -0
  206. package/dist/chunks/cli-1.1.29-q4fv8e5e.mjs +2 -0
  207. package/dist/chunks/cli-1.1.29-q7nywp06.mjs +2 -0
  208. package/dist/chunks/cli-1.1.29-q9atby2h.mjs +2 -0
  209. package/dist/chunks/cli-1.1.29-qqcjvb8v.mjs +3 -0
  210. package/dist/chunks/cli-1.1.29-qyg6dttd.mjs +2 -0
  211. package/dist/chunks/cli-1.1.29-qz5zy9rd.mjs +4 -0
  212. package/dist/chunks/cli-1.1.29-ra7737c1.mjs +2 -0
  213. package/dist/chunks/cli-1.1.29-rah0vfkh.mjs +1 -0
  214. package/dist/chunks/cli-1.1.29-rbtgtxtr.mjs +2 -0
  215. package/dist/chunks/cli-1.1.29-rcf2pvf2.mjs +2 -0
  216. package/dist/chunks/cli-1.1.29-rd1s45en.mjs +24 -0
  217. package/dist/chunks/cli-1.1.29-rfz718th.mjs +6 -0
  218. package/dist/chunks/cli-1.1.29-rn9a55ga.mjs +2 -0
  219. package/dist/chunks/cli-1.1.29-rnrvwymv.mjs +2 -0
  220. package/dist/chunks/cli-1.1.29-rse83jw9.mjs +2 -0
  221. package/dist/chunks/cli-1.1.29-s7njwf37.mjs +15 -0
  222. package/dist/chunks/cli-1.1.29-s8attyep.mjs +2 -0
  223. package/dist/chunks/cli-1.1.29-sb5dzja5.mjs +2 -0
  224. package/dist/chunks/cli-1.1.29-scf5dmr2.mjs +50 -0
  225. package/dist/chunks/cli-1.1.29-sgfpybka.mjs +2 -0
  226. package/dist/chunks/cli-1.1.29-smn5dd7n.mjs +2 -0
  227. package/dist/chunks/cli-1.1.29-snxnt4nr.mjs +2 -0
  228. package/dist/chunks/cli-1.1.29-t64smfse.mjs +2 -0
  229. package/dist/chunks/cli-1.1.29-tf20f72b.mjs +2 -0
  230. package/dist/chunks/cli-1.1.29-tg84q1yd.mjs +20 -0
  231. package/dist/chunks/cli-1.1.29-tyew653x.mjs +3 -0
  232. package/dist/chunks/cli-1.1.29-tz817yh8.mjs +2 -0
  233. package/dist/chunks/cli-1.1.29-v4wsvara.mjs +2 -0
  234. package/dist/chunks/cli-1.1.29-v6y1118n.mjs +4 -0
  235. package/dist/chunks/cli-1.1.29-v9bvr1aw.mjs +5 -0
  236. package/dist/chunks/cli-1.1.29-vd6b2ckm.mjs +2 -0
  237. package/dist/chunks/cli-1.1.29-vmmpxa0v.mjs +2 -0
  238. package/dist/chunks/cli-1.1.29-vp3z0245.mjs +2 -0
  239. package/dist/chunks/cli-1.1.29-vr34j6s2.mjs +3 -0
  240. package/dist/chunks/cli-1.1.29-vv1sy2ya.mjs +25 -0
  241. package/dist/chunks/cli-1.1.29-vws4vx43.mjs +2 -0
  242. package/dist/chunks/cli-1.1.29-vybx7rvs.mjs +10 -0
  243. package/dist/chunks/cli-1.1.29-we6vghby.mjs +2 -0
  244. package/dist/chunks/cli-1.1.29-wscghnfp.mjs +2 -0
  245. package/dist/chunks/cli-1.1.29-wv5r6reg.mjs +2 -0
  246. package/dist/chunks/cli-1.1.29-wxg06wve.mjs +2 -0
  247. package/dist/chunks/cli-1.1.29-xfcy5e42.mjs +2 -0
  248. package/dist/chunks/cli-1.1.29-xfhxkzzh.mjs +2 -0
  249. package/dist/chunks/cli-1.1.29-xftqnjy0.mjs +4 -0
  250. package/dist/chunks/cli-1.1.29-xjh2k6ex.mjs +3 -0
  251. package/dist/chunks/cli-1.1.29-xrwps5rg.mjs +3 -0
  252. package/dist/chunks/cli-1.1.29-y3v15ehz.mjs +2 -0
  253. package/dist/chunks/cli-1.1.29-yddrcp23.mjs +2 -0
  254. package/dist/chunks/cli-1.1.29-ykat6ksh.mjs +2 -0
  255. package/dist/chunks/cli-1.1.29-ymcd1d05.mjs +2 -0
  256. package/dist/chunks/cli-1.1.29-ypgjht1s.mjs +2 -0
  257. package/dist/chunks/cli-1.1.29-yv3r7f00.mjs +2 -0
  258. package/dist/chunks/cli-1.1.29-zb1qmpq0.mjs +45 -0
  259. package/dist/chunks/cli-1.1.29-ze1sanxc.mjs +2 -0
  260. package/dist/chunks/cli-1.1.29-zf1md9se.mjs +2 -0
  261. package/dist/chunks/cli-1.1.29-zh2qqpcy.mjs +2 -0
  262. package/dist/chunks/cli-1.1.29-zqccyb2h.mjs +2 -0
  263. package/dist/chunks/client-1.1.29-abnv29yp.mjs +1 -0
  264. package/dist/chunks/color-1.1.29-h2d0ea1p.mjs +1 -0
  265. package/dist/chunks/compact-1.1.29-071ysk4h.mjs +3 -0
  266. package/dist/chunks/config-1.1.29-jhy41xna.mjs +1 -0
  267. package/dist/chunks/config-1.1.29-wzvad2ns.mjs +1 -0
  268. package/dist/chunks/constants-1.1.29-5536grwb.mjs +1 -0
  269. package/dist/chunks/context-1.1.29-qxvktpnx.mjs +1 -0
  270. package/dist/chunks/context-noninteractive-1.1.29-rypt767r.mjs +1 -0
  271. package/dist/chunks/conversation-1.1.29-yr51bv23.mjs +1 -0
  272. package/dist/chunks/copilotHeaders-1.1.29-h3z6avxk.mjs +1 -0
  273. package/dist/chunks/copy-1.1.29-ze2g86qn.mjs +9 -0
  274. package/dist/chunks/cost-1.1.29-bn9nefss.mjs +1 -0
  275. package/dist/chunks/createSSHSession-1.1.29-5fe73ss4.mjs +1 -0
  276. package/dist/chunks/createSession-1.1.29-rscwvwx3.mjs +1 -0
  277. package/dist/chunks/debug-1.1.29-hsa8740f.mjs +1 -0
  278. package/dist/chunks/defaultActionDeps-1.1.29-nrkya6cw.mjs +1534 -0
  279. package/dist/chunks/desktop-1.1.29-wzh1a3fx.mjs +1 -0
  280. package/dist/chunks/detectRepository-1.1.29-tgssqtyy.mjs +1 -0
  281. package/dist/chunks/detection-1.1.29-f3hp0x2s.mjs +1 -0
  282. package/dist/chunks/diff-1.1.29-h7fm7n04.mjs +1 -0
  283. package/dist/chunks/doctor-1.1.29-5ccr1m55.mjs +1 -0
  284. package/dist/chunks/doctorDiagnostic-1.1.29-vmnf895k.mjs +1 -0
  285. package/dist/chunks/earlyInput-1.1.29-d0ktjabf.mjs +1 -0
  286. package/dist/chunks/effort-1.1.29-xxzxaym4.mjs +13 -0
  287. package/dist/chunks/engine-1.1.29-9ekq4v2g.mjs +1 -0
  288. package/dist/chunks/envLessBridgeConfig-1.1.29-8c9jjpjy.mjs +1 -0
  289. package/dist/chunks/envUtils-1.1.29-593t90q5.mjs +1 -0
  290. package/dist/chunks/environmentSelection-1.1.29-g5qpphd9.mjs +1 -0
  291. package/dist/chunks/environments-1.1.29-x2aa2eet.mjs +1 -0
  292. package/dist/chunks/errors-1.1.29-jgx19cvb.mjs +1 -0
  293. package/dist/chunks/exampleCommands-1.1.29-wxzjn2xw.mjs +1 -0
  294. package/dist/chunks/execFileNoThrow-1.1.29-hexzsnhv.mjs +1 -0
  295. package/dist/chunks/exit-1.1.29-h788x2yv.mjs +1 -0
  296. package/dist/chunks/explorer-1.1.29-wtr7bga1.mjs +1 -0
  297. package/dist/chunks/export-1.1.29-42ve1rgm.mjs +2 -0
  298. package/dist/chunks/extra-usage-1.1.29-y1e1m369.mjs +1 -0
  299. package/dist/chunks/extra-usage-noninteractive-1.1.29-gq3g80nm.mjs +1 -0
  300. package/dist/chunks/fast-1.1.29-h6r42366.mjs +1 -0
  301. package/dist/chunks/feedback-1.1.29-st43crhj.mjs +14 -0
  302. package/dist/chunks/firstPartyEventLogger-1.1.29-ckcepqgc.mjs +1 -0
  303. package/dist/chunks/git-1.1.29-j563zwhc.mjs +1 -0
  304. package/dist/chunks/githubModelsCredentials-1.1.29-vk8m9ket.mjs +1 -0
  305. package/dist/chunks/goal-1.1.29-p7hzmh24.mjs +4 -0
  306. package/dist/chunks/growthbook-1.1.29-3549rcjz.mjs +1 -0
  307. package/dist/chunks/headless-1.1.29-5vx8fpbe.mjs +2 -0
  308. package/dist/chunks/heapdump-1.1.29-rp203g47.mjs +6 -0
  309. package/dist/chunks/help-1.1.29-3y5b0e2g.mjs +1 -0
  310. package/dist/chunks/hookChains-1.1.29-ga4rejj3.mjs +3 -0
  311. package/dist/chunks/hooks-1.1.29-b38tdtzk.mjs +1 -0
  312. package/dist/chunks/hooks-1.1.29-ygwx2459.mjs +79 -0
  313. package/dist/chunks/ide-1.1.29-67nmghjh.mjs +3 -0
  314. package/dist/chunks/image-processor-napi-1.1.29-z1xa8jsd.mjs +1 -0
  315. package/dist/chunks/import-1.1.29-627psf8x.mjs +261 -0
  316. package/dist/chunks/inboundAttachments-1.1.29-9dtr0d37.mjs +1 -0
  317. package/dist/chunks/index-1.1.29-101dgedk.mjs +9 -0
  318. package/dist/chunks/index-1.1.29-3mknam1s.mjs +1 -0
  319. package/dist/chunks/index-1.1.29-3rjcfsf3.mjs +1 -0
  320. package/dist/chunks/index-1.1.29-4ye92se8.mjs +1 -0
  321. package/dist/chunks/index-1.1.29-568ncn0w.mjs +1 -0
  322. package/dist/chunks/index-1.1.29-5zbg7qfm.mjs +1 -0
  323. package/dist/chunks/index-1.1.29-6pe6cr8p.mjs +1 -0
  324. package/dist/chunks/index-1.1.29-cpvbfs32.mjs +5 -0
  325. package/dist/chunks/index-1.1.29-e90xbdas.mjs +23 -0
  326. package/dist/chunks/index-1.1.29-efsdrxv3.mjs +1 -0
  327. package/dist/chunks/index-1.1.29-gy6pctgv.mjs +1 -0
  328. package/dist/chunks/index-1.1.29-jghqwznd.mjs +1 -0
  329. package/dist/chunks/index-1.1.29-k42kw8w5.mjs +1 -0
  330. package/dist/chunks/index-1.1.29-kvaapa6z.mjs +1 -0
  331. package/dist/chunks/index-1.1.29-mwtftmry.mjs +9 -0
  332. package/dist/chunks/index-1.1.29-q7ydx0h2.mjs +2 -0
  333. package/dist/chunks/index-1.1.29-r4y0qs9x.mjs +1 -0
  334. package/dist/chunks/index-1.1.29-rgsmqr6q.mjs +1 -0
  335. package/dist/chunks/index-1.1.29-tfnnf0k2.mjs +1 -0
  336. package/dist/chunks/index-1.1.29-v640rrh6.mjs +1 -0
  337. package/dist/chunks/index-1.1.29-v7vcnkxr.mjs +30 -0
  338. package/dist/chunks/index-1.1.29-xwekv48p.mjs +2 -0
  339. package/dist/chunks/index-1.1.29-z8a1fx6p.mjs +1 -0
  340. package/dist/chunks/init-1.1.29-h07twh7g.mjs +1 -0
  341. package/dist/chunks/initReplBridge-1.1.29-ae1e53vd.mjs +1 -0
  342. package/dist/chunks/ink-1.1.29-jkk9zn2g.mjs +1 -0
  343. package/dist/chunks/insights-1.1.29-awyethqq.mjs +870 -0
  344. package/dist/chunks/install-1.1.29-yhkejpep.mjs +1 -0
  345. package/dist/chunks/install-github-app-1.1.29-jsrj24s4.mjs +149 -0
  346. package/dist/chunks/install-slack-app-1.1.29-gts768ac.mjs +1 -0
  347. package/dist/chunks/instrumentation-1.1.29-mhgk5gm7.mjs +1 -0
  348. package/dist/chunks/interactiveHelpers-1.1.29-nz689brn.mjs +1 -0
  349. package/dist/chunks/keybindings-1.1.29-gh9axh60.mjs +2 -0
  350. package/dist/chunks/knowledge-1.1.29-hfwtr4gz.mjs +2 -0
  351. package/dist/chunks/latestVersionCache-1.1.29-hfeprnvk.mjs +1 -0
  352. package/dist/chunks/loadAgentsDir-1.1.29-m2np7bm8.mjs +1 -0
  353. package/dist/chunks/loadPluginHooks-1.1.29-zpz05b3t.mjs +1 -0
  354. package/dist/chunks/log-1.1.29-fw86q3jh.mjs +1 -0
  355. package/dist/chunks/main-1.1.29-w3b4z9p1.mjs +1 -0
  356. package/dist/chunks/managedEnv-1.1.29-r7qb1f8v.mjs +1 -0
  357. package/dist/chunks/mcp-1.1.29-jyq80had.mjs +4 -0
  358. package/dist/chunks/mcp-1.1.29-rj6rmrwj.mjs +17 -0
  359. package/dist/chunks/mcp-1.1.29-v1dw736k.mjs +1 -0
  360. package/dist/chunks/mcpb-1.1.29-2eqhsr4h.mjs +1 -0
  361. package/dist/chunks/memory-1.1.29-f9bfe5q1.mjs +77 -0
  362. package/dist/chunks/model-1.1.29-3cbf7nj8.mjs +1 -0
  363. package/dist/chunks/model-1.1.29-65mwx0jt.mjs +2 -0
  364. package/dist/chunks/node-1.1.29-9gdbqzzb.mjs +15 -0
  365. package/dist/chunks/node-1.1.29-g8j45zsn.mjs +1 -0
  366. package/dist/chunks/oauth-1.1.29-rzdyddzx.mjs +1 -0
  367. package/dist/chunks/openaiShim-1.1.29-3v0weah8.mjs +14 -0
  368. package/dist/chunks/output-style-1.1.29-kh5kpq0r.mjs +1 -0
  369. package/dist/chunks/package-OS7RONXY-1.1.29-wartca0p.mjs +1 -0
  370. package/dist/chunks/parseConnectUrl-1.1.29-1pk3egnf.mjs +1 -0
  371. package/dist/chunks/parser-1.1.29-j664c2gz.mjs +1 -0
  372. package/dist/chunks/passes-1.1.29-daz9sxtn.mjs +1 -0
  373. package/dist/chunks/permissions-1.1.29-2t8t5tw7.mjs +1 -0
  374. package/dist/chunks/permissions-1.1.29-yrdqzbx5.mjs +3 -0
  375. package/dist/chunks/plan-1.1.29-bz008b9p.mjs +1 -0
  376. package/dist/chunks/plist-1.1.29-35acgftn.mjs +1 -0
  377. package/dist/chunks/plugin-1.1.29-8f04719q.mjs +29 -0
  378. package/dist/chunks/pluginStartupCheck-1.1.29-xb113h6m.mjs +1 -0
  379. package/dist/chunks/plugins-1.1.29-qvtkwvvz.mjs +9 -0
  380. package/dist/chunks/preActionHook-1.1.29-y3pz26pa.mjs +2 -0
  381. package/dist/chunks/print-1.1.29-efswnrv9.mjs +57 -0
  382. package/dist/chunks/process-1.1.29-58f1e2bp.mjs +1 -0
  383. package/dist/chunks/processBashCommand-1.1.29-d1jsv2w2.mjs +1 -0
  384. package/dist/chunks/processSlashCommand-1.1.29-b3y0q14a.mjs +9 -0
  385. package/dist/chunks/prompt-1.1.29-62tsknn0.mjs +1 -0
  386. package/dist/chunks/prompt-1.1.29-jhbfphh7.mjs +1 -0
  387. package/dist/chunks/prompts-1.1.29-3z4c3ek4.mjs +1 -0
  388. package/dist/chunks/protocolHandler-1.1.29-rdwh19s1.mjs +13 -0
  389. package/dist/chunks/provider-1.1.29-3zvq773g.mjs +2 -0
  390. package/dist/chunks/providerProfiles-1.1.29-607et4qp.mjs +1 -0
  391. package/dist/chunks/providerValidation-1.1.29-yenzyrfm.mjs +6 -0
  392. package/dist/chunks/rate-limit-options-1.1.29-298ja1r1.mjs +1 -0
  393. package/dist/chunks/registerSubcommands-1.1.29-4jd1spvm.mjs +26 -0
  394. package/dist/chunks/registry-1.1.29-m25stkr0.mjs +1 -0
  395. package/dist/chunks/release-notes-1.1.29-22baamfx.mjs +5 -0
  396. package/dist/chunks/reload-plugins-1.1.29-phv53y08.mjs +2 -0
  397. package/dist/chunks/remote-env-1.1.29-2ey2vymh.mjs +1 -0
  398. package/dist/chunks/remoteBridgeCore-1.1.29-eafsxes0.mjs +1 -0
  399. package/dist/chunks/remoteSession-1.1.29-hs2wyhc3.mjs +1 -0
  400. package/dist/chunks/rename-1.1.29-75kb3avp.mjs +1 -0
  401. package/dist/chunks/replBridgeHandle-1.1.29-dz6hhgez.mjs +1 -0
  402. package/dist/chunks/replLauncher-1.1.29-09a6pk1q.mjs +1 -0
  403. package/dist/chunks/resume-1.1.29-685rb92g.mjs +2 -0
  404. package/dist/chunks/rewind-1.1.29-7nw7f08p.mjs +1 -0
  405. package/dist/chunks/rootOptions-1.1.29-9cr8rvbr.mjs +1 -0
  406. package/dist/chunks/runWorkflowHeadless-1.1.29-xmaezf6n.mjs +10 -0
  407. package/dist/chunks/sandbox-adapter-1.1.29-db9nwpd6.mjs +1 -0
  408. package/dist/chunks/sandbox-toggle-1.1.29-wzeynybm.mjs +1 -0
  409. package/dist/chunks/session-1.1.29-m8fppsh2.mjs +2 -0
  410. package/dist/chunks/sessionDiscovery-1.1.29-ast9gceq.mjs +1 -0
  411. package/dist/chunks/sessionFileAccessHooks-1.1.29-h1eqvpq2.mjs +1 -0
  412. package/dist/chunks/sessionStorage-1.1.29-aykc0gmj.mjs +1 -0
  413. package/dist/chunks/settings-1.1.29-0c2fyzj5.mjs +1 -0
  414. package/dist/chunks/setup-1.1.29-y2wjm0r9.mjs +12 -0
  415. package/dist/chunks/sinks-1.1.29-5rs2f8yn.mjs +1 -0
  416. package/dist/chunks/skills-1.1.29-cp2813x4.mjs +1 -0
  417. package/dist/chunks/startupProfiler-1.1.29-kh45g8fh.mjs +1 -0
  418. package/dist/chunks/startupUpdateCheck-1.1.29-82s33sqm.mjs +1 -0
  419. package/dist/chunks/state-1.1.29-p67vvgkh.mjs +1 -0
  420. package/dist/chunks/stats-1.1.29-by56pge2.mjs +1 -0
  421. package/dist/chunks/status-1.1.29-hw493zns.mjs +1 -0
  422. package/dist/chunks/stickers-1.1.29-8s1sjy27.mjs +1 -0
  423. package/dist/chunks/subprocessEnv-1.1.29-qz9p5e81.mjs +1 -0
  424. package/dist/chunks/tasks-1.1.29-337vzgbz.mjs +1 -0
  425. package/dist/chunks/teamHelpers-1.1.29-85qvaaf6.mjs +1 -0
  426. package/dist/chunks/teammateModeSnapshot-1.1.29-k78c522w.mjs +1 -0
  427. package/dist/chunks/teleport-1.1.29-c44n1v9b.mjs +1 -0
  428. package/dist/chunks/terminalSetup-1.1.29-rrwvk8ab.mjs +1 -0
  429. package/dist/chunks/theme-1.1.29-y04xza5k.mjs +1 -0
  430. package/dist/chunks/thinkback-1.1.29-s3hjbm7q.mjs +1 -0
  431. package/dist/chunks/thinkback-play-1.1.29-2bhrtfq9.mjs +1 -0
  432. package/dist/chunks/toolPool-1.1.29-gfpcfj2x.mjs +1 -0
  433. package/dist/chunks/toolSearch-1.1.29-vfnsb7j0.mjs +1 -0
  434. package/dist/chunks/tools-1.1.29-w11mxfwv.mjs +1 -0
  435. package/dist/chunks/trustedDevice-1.1.29-qwyypx3m.mjs +1 -0
  436. package/dist/chunks/turndown.cjs-1.1.29-yxqqz6t4.mjs +69 -0
  437. package/dist/chunks/types-1.1.29-2v59e63g.mjs +1 -0
  438. package/dist/chunks/ultrareviewCommand-1.1.29-a115pcna.mjs +4 -0
  439. package/dist/chunks/update-1.1.29-3zmwqt73.mjs +72 -0
  440. package/dist/chunks/upgrade-1.1.29-xpe0b67z.mjs +1 -0
  441. package/dist/chunks/upload-1.1.29-d3tkf4nc.mjs +7 -0
  442. package/dist/chunks/upstreamproxy-1.1.29-fqatj32w.mjs +14 -0
  443. package/dist/chunks/url-handler-napi-1.1.29-9w1d0vdc.mjs +1 -0
  444. package/dist/chunks/usage-1.1.29-6mr5tsjn.mjs +1 -0
  445. package/dist/chunks/util-1.1.29-94aahqex.mjs +1 -0
  446. package/dist/chunks/utils-1.1.29-jg1xnwx8.mjs +1 -0
  447. package/dist/chunks/vim-1.1.29-hf5m1934.mjs +1 -0
  448. package/dist/chunks/watchLoop-1.1.29-7z8smp5m.mjs +13 -0
  449. package/dist/chunks/watcher-1.1.29-qeqe2296.mjs +1 -0
  450. package/dist/chunks/wiki-1.1.29-cr99gpcx.mjs +132 -0
  451. package/dist/chunks/workflows-1.1.29-v6f0e3am.mjs +1 -0
  452. package/dist/chunks/worktree-1.1.29-qf1zfstj.mjs +1 -0
  453. package/dist/chunks/worktreeModeEnabled-1.1.29-qxpsmfqy.mjs +1 -0
  454. package/dist/chunks/wrapper-1.1.29-b7y6s4vd.mjs +7 -0
  455. package/dist/cli.mjs +2 -2
  456. package/package.json +9 -9
  457. package/dist/chunks/AgentTool-1.1.28-hdgcephe.mjs +0 -1
  458. package/dist/chunks/App-1.1.28-rdhr58j6.mjs +0 -1
  459. package/dist/chunks/ApproveApiKey-1.1.28-dn460p70.mjs +0 -1
  460. package/dist/chunks/AssistantSessionChooser-1.1.28-k16de89c.mjs +0 -1
  461. package/dist/chunks/AutoModeOptInDialog-1.1.28-19td2te8.mjs +0 -1
  462. package/dist/chunks/BypassPermissionsModeDialog-1.1.28-011pgh7b.mjs +0 -1
  463. package/dist/chunks/ClaudeMdExternalIncludesDialog-1.1.28-ych5693j.mjs +0 -1
  464. package/dist/chunks/ConsoleOAuthFlow-1.1.28-7p5bx0b5.mjs +0 -1
  465. package/dist/chunks/DiffDialog-1.1.28-nkct57y5.mjs +0 -6
  466. package/dist/chunks/Doctor-1.1.28-xerfvzx5.mjs +0 -1
  467. package/dist/chunks/ExplorerDialog-1.1.28-ne9ftnxx.mjs +0 -6
  468. package/dist/chunks/ITermBackend-1.1.28-07enf929.mjs +0 -1
  469. package/dist/chunks/InvalidConfigDialog-1.1.28-mcsd53vd.mjs +0 -1
  470. package/dist/chunks/InvalidSettingsDialog-1.1.28-rmrgfzbv.mjs +0 -1
  471. package/dist/chunks/MigrationDialog-1.1.28-w5mh2w2b.mjs +0 -1
  472. package/dist/chunks/Onboarding-1.1.28-7q9nc8c9.mjs +0 -1
  473. package/dist/chunks/ProviderManager-1.1.28-08ytr6ma.mjs +0 -1
  474. package/dist/chunks/REPL-1.1.28-pxy1ag0k.mjs +0 -1
  475. package/dist/chunks/ResumeConversation-1.1.28-b2pk1nan.mjs +0 -1
  476. package/dist/chunks/SnapshotUpdateDialog-1.1.28-xa772x92.mjs +0 -1
  477. package/dist/chunks/TeleportProgress-1.1.28-6x6ca6kq.mjs +0 -1
  478. package/dist/chunks/TeleportRepoMismatchDialog-1.1.28-vy7p3j3e.mjs +0 -1
  479. package/dist/chunks/TeleportResumeWrapper-1.1.28-egnv67by.mjs +0 -1
  480. package/dist/chunks/TmuxBackend-1.1.28-y1ss2e0h.mjs +0 -9
  481. package/dist/chunks/ToolSearchTool-1.1.28-7w099741.mjs +0 -1
  482. package/dist/chunks/TrustDialog-1.1.28-49aey2f6.mjs +0 -1
  483. package/dist/chunks/activeProvider-1.1.28-gw9e23bc.mjs +0 -1
  484. package/dist/chunks/add-dir-1.1.28-5j989gf2.mjs +0 -1
  485. package/dist/chunks/agentTypes-1.1.28-hxk0wpj5.mjs +0 -1
  486. package/dist/chunks/agents-1.1.28-3yth9sa4.mjs +0 -110
  487. package/dist/chunks/agents-1.1.28-4qdh001q.mjs +0 -3
  488. package/dist/chunks/api-1.1.28-znpy0eyy.mjs +0 -1
  489. package/dist/chunks/asciicast-1.1.28-r6dsend4.mjs +0 -1
  490. package/dist/chunks/assistant-1.1.28-16hn1f6b.mjs +0 -1
  491. package/dist/chunks/auth-1.1.28-bw7dane8.mjs +0 -1
  492. package/dist/chunks/auth-1.1.28-ht6j3ag3.mjs +0 -1
  493. package/dist/chunks/autoMode-1.1.28-nyaf1s0s.mjs +0 -52
  494. package/dist/chunks/autoModeSetup-1.1.28-sjjeha2m.mjs +0 -44
  495. package/dist/chunks/autoUpdater-1.1.28-070wmr6y.mjs +0 -1
  496. package/dist/chunks/backgroundHousekeeping-1.1.28-y5mjznxx.mjs +0 -1
  497. package/dist/chunks/branch-1.1.28-5d97ysjr.mjs +0 -4
  498. package/dist/chunks/bridge-1.1.28-62qv0wgq.mjs +0 -2
  499. package/dist/chunks/bridgeConfig-1.1.28-m986jcxg.mjs +0 -1
  500. package/dist/chunks/bridgeEnabled-1.1.28-0fs5tkxx.mjs +0 -1
  501. package/dist/chunks/bridgeMain-1.1.28-pyr5gvmx.mjs +0 -88
  502. package/dist/chunks/bridgePointer-1.1.28-wpzz2yca.mjs +0 -1
  503. package/dist/chunks/btw-1.1.28-p1tk901s.mjs +0 -1
  504. package/dist/chunks/buddy-1.1.28-thrnzpdp.mjs +0 -3
  505. package/dist/chunks/cache-probe-1.1.28-bb4xsnev.mjs +0 -21
  506. package/dist/chunks/cacheStats-1.1.28-9p9fmxas.mjs +0 -4
  507. package/dist/chunks/caches-1.1.28-t6dq2xtp.mjs +0 -1
  508. package/dist/chunks/cd-1.1.28-84z1kqam.mjs +0 -3
  509. package/dist/chunks/claudeDesktop-1.1.28-3x0y2w87.mjs +0 -1
  510. package/dist/chunks/claudemd-1.1.28-skmb6ar5.mjs +0 -1
  511. package/dist/chunks/clear-1.1.28-78f1rnc5.mjs +0 -1
  512. package/dist/chunks/clearTerminal-1.1.28-sx5qqtxb.mjs +0 -1
  513. package/dist/chunks/cli-1.1.28-01g60h7m.mjs +0 -2
  514. package/dist/chunks/cli-1.1.28-040xb4f8.mjs +0 -2
  515. package/dist/chunks/cli-1.1.28-0c0kb6x2.mjs +0 -24
  516. package/dist/chunks/cli-1.1.28-0njtm2nf.mjs +0 -60
  517. package/dist/chunks/cli-1.1.28-0vgve5rw.mjs +0 -24
  518. package/dist/chunks/cli-1.1.28-12g8qyfk.mjs +0 -58
  519. package/dist/chunks/cli-1.1.28-130w2y17.mjs +0 -50
  520. package/dist/chunks/cli-1.1.28-13j6r7pz.mjs +0 -2
  521. package/dist/chunks/cli-1.1.28-14abe08r.mjs +0 -4
  522. package/dist/chunks/cli-1.1.28-1jd8x2af.mjs +0 -2
  523. package/dist/chunks/cli-1.1.28-1mscaejt.mjs +0 -2
  524. package/dist/chunks/cli-1.1.28-1q409efb.mjs +0 -2
  525. package/dist/chunks/cli-1.1.28-1rrn1mhr.mjs +0 -2
  526. package/dist/chunks/cli-1.1.28-1vrff9a3.mjs +0 -5
  527. package/dist/chunks/cli-1.1.28-2arzkhzs.mjs +0 -2
  528. package/dist/chunks/cli-1.1.28-2dafhgjv.mjs +0 -34
  529. package/dist/chunks/cli-1.1.28-2esp2ssp.mjs +0 -6
  530. package/dist/chunks/cli-1.1.28-2q7dztmb.mjs +0 -2
  531. package/dist/chunks/cli-1.1.28-2wem9fnx.mjs +0 -2
  532. package/dist/chunks/cli-1.1.28-2ykcw73j.mjs +0 -2
  533. package/dist/chunks/cli-1.1.28-2zhmwh7t.mjs +0 -2
  534. package/dist/chunks/cli-1.1.28-30yw5q4z.mjs +0 -4
  535. package/dist/chunks/cli-1.1.28-347ygvzg.mjs +0 -6
  536. package/dist/chunks/cli-1.1.28-36891pwy.mjs +0 -2
  537. package/dist/chunks/cli-1.1.28-36y6830c.mjs +0 -2
  538. package/dist/chunks/cli-1.1.28-37rkgevh.mjs +0 -2
  539. package/dist/chunks/cli-1.1.28-3bj091x6.mjs +0 -2
  540. package/dist/chunks/cli-1.1.28-3fssr567.mjs +0 -2
  541. package/dist/chunks/cli-1.1.28-3p6j7k4a.mjs +0 -2
  542. package/dist/chunks/cli-1.1.28-4kda7s33.mjs +0 -2
  543. package/dist/chunks/cli-1.1.28-4kxqqtpz.mjs +0 -2
  544. package/dist/chunks/cli-1.1.28-4mpm44jj.mjs +0 -9
  545. package/dist/chunks/cli-1.1.28-4qh42y9g.mjs +0 -2
  546. package/dist/chunks/cli-1.1.28-4sx3zr2c.mjs +0 -3
  547. package/dist/chunks/cli-1.1.28-58rs1ja0.mjs +0 -2
  548. package/dist/chunks/cli-1.1.28-5edzsdcr.mjs +0 -6
  549. package/dist/chunks/cli-1.1.28-5y1xeh89.mjs +0 -206
  550. package/dist/chunks/cli-1.1.28-638dshxx.mjs +0 -42
  551. package/dist/chunks/cli-1.1.28-6bc84c0n.mjs +0 -2
  552. package/dist/chunks/cli-1.1.28-6x9c71q9.mjs +0 -2
  553. package/dist/chunks/cli-1.1.28-6y7vtevf.mjs +0 -17
  554. package/dist/chunks/cli-1.1.28-75thpvfa.mjs +0 -2
  555. package/dist/chunks/cli-1.1.28-7amn29ks.mjs +0 -2
  556. package/dist/chunks/cli-1.1.28-7e3nqd5c.mjs +0 -2
  557. package/dist/chunks/cli-1.1.28-7fz4fqgd.mjs +0 -2
  558. package/dist/chunks/cli-1.1.28-7g65bppm.mjs +0 -2
  559. package/dist/chunks/cli-1.1.28-7nye6zs7.mjs +0 -4
  560. package/dist/chunks/cli-1.1.28-7pmtq82j.mjs +0 -2
  561. package/dist/chunks/cli-1.1.28-7vvtkeeh.mjs +0 -25
  562. package/dist/chunks/cli-1.1.28-7x94aewp.mjs +0 -2
  563. package/dist/chunks/cli-1.1.28-7zpfvkxq.mjs +0 -2
  564. package/dist/chunks/cli-1.1.28-81p0zmxc.mjs +0 -2
  565. package/dist/chunks/cli-1.1.28-83k0knzj.mjs +0 -2
  566. package/dist/chunks/cli-1.1.28-8ahmbnjh.mjs +0 -2
  567. package/dist/chunks/cli-1.1.28-8avwqt1z.mjs +0 -4
  568. package/dist/chunks/cli-1.1.28-8jrfznkw.mjs +0 -2
  569. package/dist/chunks/cli-1.1.28-8v2vx373.mjs +0 -2
  570. package/dist/chunks/cli-1.1.28-943993zt.mjs +0 -2
  571. package/dist/chunks/cli-1.1.28-94sk1z8g.mjs +0 -5
  572. package/dist/chunks/cli-1.1.28-95fs05hq.mjs +0 -2
  573. package/dist/chunks/cli-1.1.28-9e74kqtd.mjs +0 -2
  574. package/dist/chunks/cli-1.1.28-9s4pee5a.mjs +0 -2
  575. package/dist/chunks/cli-1.1.28-a00k75hj.mjs +0 -2
  576. package/dist/chunks/cli-1.1.28-a79xcdg3.mjs +0 -2
  577. package/dist/chunks/cli-1.1.28-ad15rvp0.mjs +0 -2
  578. package/dist/chunks/cli-1.1.28-ak2bzv1v.mjs +0 -16
  579. package/dist/chunks/cli-1.1.28-atrbc4s7.mjs +0 -2
  580. package/dist/chunks/cli-1.1.28-avxe0zxq.mjs +0 -15
  581. package/dist/chunks/cli-1.1.28-b2jq83aj.mjs +0 -15
  582. package/dist/chunks/cli-1.1.28-be8cxh1e.mjs +0 -2
  583. package/dist/chunks/cli-1.1.28-bfs5hmfp.mjs +0 -3
  584. package/dist/chunks/cli-1.1.28-bqtpnyqr.mjs +0 -2
  585. package/dist/chunks/cli-1.1.28-brh6rw23.mjs +0 -2
  586. package/dist/chunks/cli-1.1.28-bsqgt8m4.mjs +0 -2
  587. package/dist/chunks/cli-1.1.28-bwbz3v3j.mjs +0 -2
  588. package/dist/chunks/cli-1.1.28-bwgr7j8z.mjs +0 -2
  589. package/dist/chunks/cli-1.1.28-by5acg3a.mjs +0 -2
  590. package/dist/chunks/cli-1.1.28-c9nh8cpr.mjs +0 -2
  591. package/dist/chunks/cli-1.1.28-cb5wemmj.mjs +0 -7
  592. package/dist/chunks/cli-1.1.28-cfq2wwx5.mjs +0 -2
  593. package/dist/chunks/cli-1.1.28-cyrrpdkd.mjs +0 -2
  594. package/dist/chunks/cli-1.1.28-d5h3kve6.mjs +0 -24
  595. package/dist/chunks/cli-1.1.28-davs3ve8.mjs +0 -58
  596. package/dist/chunks/cli-1.1.28-denmqz0s.mjs +0 -2
  597. package/dist/chunks/cli-1.1.28-dqsxqszf.mjs +0 -2
  598. package/dist/chunks/cli-1.1.28-dy3tnnyd.mjs +0 -3
  599. package/dist/chunks/cli-1.1.28-e2mfhtpx.mjs +0 -2
  600. package/dist/chunks/cli-1.1.28-egskcwa5.mjs +0 -2
  601. package/dist/chunks/cli-1.1.28-ek683x01.mjs +0 -2
  602. package/dist/chunks/cli-1.1.28-epzkhgww.mjs +0 -2
  603. package/dist/chunks/cli-1.1.28-erqn7gwg.mjs +0 -6
  604. package/dist/chunks/cli-1.1.28-es8var4t.mjs +0 -2
  605. package/dist/chunks/cli-1.1.28-ev0gfjgf.mjs +0 -24
  606. package/dist/chunks/cli-1.1.28-evvcbjb6.mjs +0 -2
  607. package/dist/chunks/cli-1.1.28-f0vrbk1t.mjs +0 -2
  608. package/dist/chunks/cli-1.1.28-f1n8p9v2.mjs +0 -12
  609. package/dist/chunks/cli-1.1.28-f3rdt4zg.mjs +0 -2
  610. package/dist/chunks/cli-1.1.28-f8av9yzr.mjs +0 -39
  611. package/dist/chunks/cli-1.1.28-fetsedc8.mjs +0 -2
  612. package/dist/chunks/cli-1.1.28-ffy07rnm.mjs +0 -2
  613. package/dist/chunks/cli-1.1.28-fjbefwwe.mjs +0 -2
  614. package/dist/chunks/cli-1.1.28-fnd6z5bq.mjs +0 -2
  615. package/dist/chunks/cli-1.1.28-fv1twt9b.mjs +0 -8
  616. package/dist/chunks/cli-1.1.28-h00s5n5y.mjs +0 -2
  617. package/dist/chunks/cli-1.1.28-h7p3dmnv.mjs +0 -2
  618. package/dist/chunks/cli-1.1.28-hb02sa63.mjs +0 -2
  619. package/dist/chunks/cli-1.1.28-hkfays5k.mjs +0 -2
  620. package/dist/chunks/cli-1.1.28-hx5j3q23.mjs +0 -17
  621. package/dist/chunks/cli-1.1.28-hxbkncxe.mjs +0 -2
  622. package/dist/chunks/cli-1.1.28-hyd7kkyr.mjs +0 -2
  623. package/dist/chunks/cli-1.1.28-j5m0kc75.mjs +0 -3
  624. package/dist/chunks/cli-1.1.28-j6nysca9.mjs +0 -2
  625. package/dist/chunks/cli-1.1.28-jqnzq23v.mjs +0 -3
  626. package/dist/chunks/cli-1.1.28-jr3jtfkf.mjs +0 -2
  627. package/dist/chunks/cli-1.1.28-jwg70mjs.mjs +0 -2
  628. package/dist/chunks/cli-1.1.28-k0ewezmj.mjs +0 -20
  629. package/dist/chunks/cli-1.1.28-k10f3f7z.mjs +0 -3
  630. package/dist/chunks/cli-1.1.28-k7pnt9ba.mjs +0 -2
  631. package/dist/chunks/cli-1.1.28-kaddwxsy.mjs +0 -2
  632. package/dist/chunks/cli-1.1.28-kc8f0nz7.mjs +0 -3
  633. package/dist/chunks/cli-1.1.28-khcgtk4a.mjs +0 -2
  634. package/dist/chunks/cli-1.1.28-knfg26kb.mjs +0 -2
  635. package/dist/chunks/cli-1.1.28-m6k4d2wx.mjs +0 -2
  636. package/dist/chunks/cli-1.1.28-mdexghj2.mjs +0 -2
  637. package/dist/chunks/cli-1.1.28-mk8zwqb2.mjs +0 -4
  638. package/dist/chunks/cli-1.1.28-mkm05wf9.mjs +0 -2
  639. package/dist/chunks/cli-1.1.28-mpjz8znf.mjs +0 -3
  640. package/dist/chunks/cli-1.1.28-mqmy0gy0.mjs +0 -2
  641. package/dist/chunks/cli-1.1.28-mvkxhjmj.mjs +0 -2
  642. package/dist/chunks/cli-1.1.28-mx413hqd.mjs +0 -3
  643. package/dist/chunks/cli-1.1.28-n2jx5w3n.mjs +0 -2
  644. package/dist/chunks/cli-1.1.28-n7v87yyn.mjs +0 -2
  645. package/dist/chunks/cli-1.1.28-n8d1x31e.mjs +0 -2
  646. package/dist/chunks/cli-1.1.28-neqd5cwa.mjs +0 -2
  647. package/dist/chunks/cli-1.1.28-nq2qxnzx.mjs +0 -10
  648. package/dist/chunks/cli-1.1.28-nqjbqqb6.mjs +0 -4
  649. package/dist/chunks/cli-1.1.28-nyvjfkx6.mjs +0 -2
  650. package/dist/chunks/cli-1.1.28-p11zcjmv.mjs +0 -2
  651. package/dist/chunks/cli-1.1.28-pabfwpqr.mjs +0 -2
  652. package/dist/chunks/cli-1.1.28-pdxwmetp.mjs +0 -25
  653. package/dist/chunks/cli-1.1.28-pfnc9p9n.mjs +0 -2
  654. package/dist/chunks/cli-1.1.28-prd0t983.mjs +0 -9
  655. package/dist/chunks/cli-1.1.28-pykx8k1j.mjs +0 -4
  656. package/dist/chunks/cli-1.1.28-q14qmewe.mjs +0 -2
  657. package/dist/chunks/cli-1.1.28-q43r6snq.mjs +0 -2
  658. package/dist/chunks/cli-1.1.28-q6dv65zx.mjs +0 -2
  659. package/dist/chunks/cli-1.1.28-qb921m5a.mjs +0 -3
  660. package/dist/chunks/cli-1.1.28-qf1qq8t0.mjs +0 -3
  661. package/dist/chunks/cli-1.1.28-qhqkr80z.mjs +0 -45
  662. package/dist/chunks/cli-1.1.28-qj312jgw.mjs +0 -2
  663. package/dist/chunks/cli-1.1.28-qjn28vhw.mjs +0 -2
  664. package/dist/chunks/cli-1.1.28-qrx5ata3.mjs +0 -2
  665. package/dist/chunks/cli-1.1.28-qvpamm5s.mjs +0 -4
  666. package/dist/chunks/cli-1.1.28-qvr8rkg2.mjs +0 -2
  667. package/dist/chunks/cli-1.1.28-qzg6n6hj.mjs +0 -2
  668. package/dist/chunks/cli-1.1.28-r81y1681.mjs +0 -3
  669. package/dist/chunks/cli-1.1.28-rbjeq16x.mjs +0 -2
  670. package/dist/chunks/cli-1.1.28-rbne7wtq.mjs +0 -4
  671. package/dist/chunks/cli-1.1.28-rez81jab.mjs +0 -6
  672. package/dist/chunks/cli-1.1.28-rq49kn4q.mjs +0 -2
  673. package/dist/chunks/cli-1.1.28-rt0aect8.mjs +0 -2
  674. package/dist/chunks/cli-1.1.28-rwfwz209.mjs +0 -2
  675. package/dist/chunks/cli-1.1.28-s1pbcd86.mjs +0 -3
  676. package/dist/chunks/cli-1.1.28-s2pcpdyc.mjs +0 -2
  677. package/dist/chunks/cli-1.1.28-s6w8jb6z.mjs +0 -2
  678. package/dist/chunks/cli-1.1.28-smb1frk6.mjs +0 -2
  679. package/dist/chunks/cli-1.1.28-ss8nzmnb.mjs +0 -12
  680. package/dist/chunks/cli-1.1.28-sx3mmc5d.mjs +0 -2
  681. package/dist/chunks/cli-1.1.28-sz8sgxj4.mjs +0 -2
  682. package/dist/chunks/cli-1.1.28-t5yawarz.mjs +0 -2
  683. package/dist/chunks/cli-1.1.28-tt0c354s.mjs +0 -2
  684. package/dist/chunks/cli-1.1.28-v1p12e3g.mjs +0 -2
  685. package/dist/chunks/cli-1.1.28-v5r7bmzh.mjs +0 -2
  686. package/dist/chunks/cli-1.1.28-v5ypq0r2.mjs +0 -2
  687. package/dist/chunks/cli-1.1.28-v6ewa1y0.mjs +0 -2
  688. package/dist/chunks/cli-1.1.28-vctvnrwx.mjs +0 -133
  689. package/dist/chunks/cli-1.1.28-vf3j29kt.mjs +0 -2
  690. package/dist/chunks/cli-1.1.28-vgfss8e4.mjs +0 -2
  691. package/dist/chunks/cli-1.1.28-vje1ac31.mjs +0 -7
  692. package/dist/chunks/cli-1.1.28-vphadsag.mjs +0 -2
  693. package/dist/chunks/cli-1.1.28-vyzp74xh.mjs +0 -3
  694. package/dist/chunks/cli-1.1.28-w0kxa99b.mjs +0 -2
  695. package/dist/chunks/cli-1.1.28-w6cd3j36.mjs +0 -20
  696. package/dist/chunks/cli-1.1.28-wew8jymx.mjs +0 -2
  697. package/dist/chunks/cli-1.1.28-wmyy1pdj.mjs +0 -2
  698. package/dist/chunks/cli-1.1.28-wvj52k91.mjs +0 -2
  699. package/dist/chunks/cli-1.1.28-wze93r29.mjs +0 -2
  700. package/dist/chunks/cli-1.1.28-x04zkwy5.mjs +0 -18
  701. package/dist/chunks/cli-1.1.28-x0ypcq4e.mjs +0 -2
  702. package/dist/chunks/cli-1.1.28-x13sctb2.mjs +0 -2
  703. package/dist/chunks/cli-1.1.28-xv2tg10n.mjs +0 -2
  704. package/dist/chunks/cli-1.1.28-y173v5ak.mjs +0 -133
  705. package/dist/chunks/cli-1.1.28-y4k1f7he.mjs +0 -2
  706. package/dist/chunks/cli-1.1.28-y5w3ev7m.mjs +0 -2
  707. package/dist/chunks/cli-1.1.28-yaa1gft3.mjs +0 -15
  708. package/dist/chunks/cli-1.1.28-ypzyse5q.mjs +0 -2
  709. package/dist/chunks/cli-1.1.28-yv5gzenz.mjs +0 -2
  710. package/dist/chunks/cli-1.1.28-yyk292aq.mjs +0 -6
  711. package/dist/chunks/cli-1.1.28-z4kzjv3v.mjs +0 -21
  712. package/dist/chunks/cli-1.1.28-z5mbbt38.mjs +0 -2
  713. package/dist/chunks/cli-1.1.28-zarbrcn7.mjs +0 -2
  714. package/dist/chunks/cli-1.1.28-ze1j03ww.mjs +0 -1
  715. package/dist/chunks/cli-1.1.28-zhftjycn.mjs +0 -5553
  716. package/dist/chunks/cli-1.1.28-zqpvgqxf.mjs +0 -2
  717. package/dist/chunks/cli-1.1.28-zv9zfwz9.mjs +0 -2
  718. package/dist/chunks/client-1.1.28-59t63af8.mjs +0 -1
  719. package/dist/chunks/color-1.1.28-gmbrq89g.mjs +0 -1
  720. package/dist/chunks/compact-1.1.28-14hmkmd6.mjs +0 -3
  721. package/dist/chunks/config-1.1.28-b69ey9g1.mjs +0 -1
  722. package/dist/chunks/config-1.1.28-cryax439.mjs +0 -1
  723. package/dist/chunks/constants-1.1.28-63cv4s6z.mjs +0 -1
  724. package/dist/chunks/context-1.1.28-09kfp2sa.mjs +0 -1
  725. package/dist/chunks/context-noninteractive-1.1.28-h9279pbh.mjs +0 -1
  726. package/dist/chunks/conversation-1.1.28-qnj7ywxq.mjs +0 -1
  727. package/dist/chunks/copilotHeaders-1.1.28-yjrmx9z1.mjs +0 -1
  728. package/dist/chunks/copy-1.1.28-az1n9y3n.mjs +0 -9
  729. package/dist/chunks/cost-1.1.28-507xt42s.mjs +0 -1
  730. package/dist/chunks/createSSHSession-1.1.28-m9ecjhc1.mjs +0 -1
  731. package/dist/chunks/createSession-1.1.28-gbrmw9ad.mjs +0 -1
  732. package/dist/chunks/debug-1.1.28-k9m06yz6.mjs +0 -1
  733. package/dist/chunks/defaultActionDeps-1.1.28-4sxh2jyw.mjs +0 -1534
  734. package/dist/chunks/desktop-1.1.28-ycc1hv5c.mjs +0 -1
  735. package/dist/chunks/detectRepository-1.1.28-mxrqqjv6.mjs +0 -1
  736. package/dist/chunks/detection-1.1.28-06p2mev8.mjs +0 -1
  737. package/dist/chunks/diff-1.1.28-d9a2n60t.mjs +0 -1
  738. package/dist/chunks/doctor-1.1.28-qef12k2p.mjs +0 -1
  739. package/dist/chunks/doctorDiagnostic-1.1.28-v5rq4x27.mjs +0 -1
  740. package/dist/chunks/earlyInput-1.1.28-xr89w719.mjs +0 -1
  741. package/dist/chunks/effort-1.1.28-yjbwr68r.mjs +0 -13
  742. package/dist/chunks/engine-1.1.28-yv6qdcgp.mjs +0 -1
  743. package/dist/chunks/envLessBridgeConfig-1.1.28-tpjzc2ar.mjs +0 -1
  744. package/dist/chunks/envUtils-1.1.28-n17cxj8h.mjs +0 -1
  745. package/dist/chunks/environmentSelection-1.1.28-c7vj172q.mjs +0 -1
  746. package/dist/chunks/environments-1.1.28-08b7gpg6.mjs +0 -1
  747. package/dist/chunks/errors-1.1.28-eysc80qa.mjs +0 -1
  748. package/dist/chunks/exampleCommands-1.1.28-gk1ma509.mjs +0 -1
  749. package/dist/chunks/execFileNoThrow-1.1.28-4nc53n56.mjs +0 -1
  750. package/dist/chunks/exit-1.1.28-7rjnfzc2.mjs +0 -1
  751. package/dist/chunks/explorer-1.1.28-hf7jvkfg.mjs +0 -1
  752. package/dist/chunks/export-1.1.28-3xgdy7gr.mjs +0 -2
  753. package/dist/chunks/extra-usage-1.1.28-6wkgsscs.mjs +0 -1
  754. package/dist/chunks/extra-usage-noninteractive-1.1.28-03hnqa8n.mjs +0 -1
  755. package/dist/chunks/fast-1.1.28-gf0rb9by.mjs +0 -1
  756. package/dist/chunks/feedback-1.1.28-dvdyq5v7.mjs +0 -14
  757. package/dist/chunks/firstPartyEventLogger-1.1.28-rd6eskzg.mjs +0 -1
  758. package/dist/chunks/git-1.1.28-ktf61jaz.mjs +0 -1
  759. package/dist/chunks/githubModelsCredentials-1.1.28-re8t0b2z.mjs +0 -1
  760. package/dist/chunks/goal-1.1.28-s7n55rqn.mjs +0 -4
  761. package/dist/chunks/growthbook-1.1.28-jcs0qzz8.mjs +0 -1
  762. package/dist/chunks/headless-1.1.28-yzfk04g2.mjs +0 -2
  763. package/dist/chunks/heapdump-1.1.28-hgfac8pe.mjs +0 -6
  764. package/dist/chunks/help-1.1.28-yhrv28x1.mjs +0 -1
  765. package/dist/chunks/hookChains-1.1.28-9y5pz734.mjs +0 -3
  766. package/dist/chunks/hooks-1.1.28-pwy1h39c.mjs +0 -79
  767. package/dist/chunks/hooks-1.1.28-xhtrbwa5.mjs +0 -1
  768. package/dist/chunks/ide-1.1.28-27vb56tk.mjs +0 -3
  769. package/dist/chunks/image-processor-napi-1.1.28-b092deny.mjs +0 -1
  770. package/dist/chunks/import-1.1.28-bqs6ebec.mjs +0 -261
  771. package/dist/chunks/inboundAttachments-1.1.28-0jb4nc2j.mjs +0 -1
  772. package/dist/chunks/index-1.1.28-0p3tfhd7.mjs +0 -23
  773. package/dist/chunks/index-1.1.28-30ges9rx.mjs +0 -1
  774. package/dist/chunks/index-1.1.28-3kg2kmpd.mjs +0 -1
  775. package/dist/chunks/index-1.1.28-76ztpb54.mjs +0 -1
  776. package/dist/chunks/index-1.1.28-a6fzpa8n.mjs +0 -1
  777. package/dist/chunks/index-1.1.28-ac1sbem8.mjs +0 -9
  778. package/dist/chunks/index-1.1.28-axnrgqkq.mjs +0 -1
  779. package/dist/chunks/index-1.1.28-b5b1qact.mjs +0 -1
  780. package/dist/chunks/index-1.1.28-bqm5cnw1.mjs +0 -1
  781. package/dist/chunks/index-1.1.28-bt937784.mjs +0 -1
  782. package/dist/chunks/index-1.1.28-bxtzy977.mjs +0 -2
  783. package/dist/chunks/index-1.1.28-dgnx1m4x.mjs +0 -9
  784. package/dist/chunks/index-1.1.28-dtfxav1q.mjs +0 -1
  785. package/dist/chunks/index-1.1.28-gk3v69b8.mjs +0 -1
  786. package/dist/chunks/index-1.1.28-m2nnkj3d.mjs +0 -1
  787. package/dist/chunks/index-1.1.28-qk8rhq5n.mjs +0 -1
  788. package/dist/chunks/index-1.1.28-vgc6r0g0.mjs +0 -1
  789. package/dist/chunks/index-1.1.28-w2a4k4md.mjs +0 -2
  790. package/dist/chunks/index-1.1.28-wajajmmp.mjs +0 -1
  791. package/dist/chunks/index-1.1.28-xaw4tf13.mjs +0 -30
  792. package/dist/chunks/index-1.1.28-y7jd8m9f.mjs +0 -1
  793. package/dist/chunks/index-1.1.28-ymg3kz4x.mjs +0 -5
  794. package/dist/chunks/index-1.1.28-z85wbmey.mjs +0 -1
  795. package/dist/chunks/init-1.1.28-vt168swt.mjs +0 -1
  796. package/dist/chunks/initReplBridge-1.1.28-vtkc85kf.mjs +0 -1
  797. package/dist/chunks/ink-1.1.28-8bcvzs97.mjs +0 -1
  798. package/dist/chunks/insights-1.1.28-hcccjwbm.mjs +0 -870
  799. package/dist/chunks/install-1.1.28-azeaj14w.mjs +0 -1
  800. package/dist/chunks/install-github-app-1.1.28-jr58yj7c.mjs +0 -149
  801. package/dist/chunks/install-slack-app-1.1.28-ca73e004.mjs +0 -1
  802. package/dist/chunks/instrumentation-1.1.28-v5fj6zfn.mjs +0 -1
  803. package/dist/chunks/interactiveHelpers-1.1.28-k8pjx51r.mjs +0 -1
  804. package/dist/chunks/keybindings-1.1.28-szefym9t.mjs +0 -2
  805. package/dist/chunks/knowledge-1.1.28-twc2bf6q.mjs +0 -2
  806. package/dist/chunks/latestVersionCache-1.1.28-swqk1ppm.mjs +0 -1
  807. package/dist/chunks/loadAgentsDir-1.1.28-gvzkk593.mjs +0 -1
  808. package/dist/chunks/loadPluginHooks-1.1.28-j5fvzh5b.mjs +0 -1
  809. package/dist/chunks/log-1.1.28-744tvnnz.mjs +0 -1
  810. package/dist/chunks/main-1.1.28-ngd4qj24.mjs +0 -1
  811. package/dist/chunks/managedEnv-1.1.28-v3t5y08t.mjs +0 -1
  812. package/dist/chunks/mcp-1.1.28-bjtwbjwv.mjs +0 -17
  813. package/dist/chunks/mcp-1.1.28-k0p4t3rs.mjs +0 -1
  814. package/dist/chunks/mcp-1.1.28-pxxge6kd.mjs +0 -4
  815. package/dist/chunks/mcpb-1.1.28-rjvsf8d4.mjs +0 -1
  816. package/dist/chunks/memory-1.1.28-437zyh3m.mjs +0 -77
  817. package/dist/chunks/model-1.1.28-1weg50dg.mjs +0 -2
  818. package/dist/chunks/model-1.1.28-qbnnaa17.mjs +0 -1
  819. package/dist/chunks/node-1.1.28-f9q7m0bb.mjs +0 -15
  820. package/dist/chunks/node-1.1.28-q18jbvyv.mjs +0 -1
  821. package/dist/chunks/oauth-1.1.28-nv1bmgrh.mjs +0 -1
  822. package/dist/chunks/openaiShim-1.1.28-qt0bgn0p.mjs +0 -14
  823. package/dist/chunks/output-style-1.1.28-xpmnvzvz.mjs +0 -1
  824. package/dist/chunks/package-OS7RONXY-1.1.28-s8fma63p.mjs +0 -1
  825. package/dist/chunks/parseConnectUrl-1.1.28-9e7g8r3q.mjs +0 -1
  826. package/dist/chunks/parser-1.1.28-hahczgmc.mjs +0 -1
  827. package/dist/chunks/passes-1.1.28-73vxd2mh.mjs +0 -1
  828. package/dist/chunks/permissions-1.1.28-4dzfyh6m.mjs +0 -1
  829. package/dist/chunks/permissions-1.1.28-mh27xg9k.mjs +0 -3
  830. package/dist/chunks/plan-1.1.28-awnhzrk0.mjs +0 -1
  831. package/dist/chunks/plist-1.1.28-yf5fjx19.mjs +0 -1
  832. package/dist/chunks/plugin-1.1.28-m9j8cnkz.mjs +0 -29
  833. package/dist/chunks/pluginStartupCheck-1.1.28-w4yvsmat.mjs +0 -1
  834. package/dist/chunks/plugins-1.1.28-rgr19gwa.mjs +0 -9
  835. package/dist/chunks/preActionHook-1.1.28-bq157gz5.mjs +0 -2
  836. package/dist/chunks/print-1.1.28-g8smjzce.mjs +0 -57
  837. package/dist/chunks/process-1.1.28-tk5w2b0a.mjs +0 -1
  838. package/dist/chunks/processBashCommand-1.1.28-0a601ws2.mjs +0 -1
  839. package/dist/chunks/processSlashCommand-1.1.28-2mq2y7nd.mjs +0 -9
  840. package/dist/chunks/prompt-1.1.28-tj8v37yx.mjs +0 -1
  841. package/dist/chunks/prompt-1.1.28-x4mxe7n2.mjs +0 -1
  842. package/dist/chunks/prompts-1.1.28-z2rx5cb6.mjs +0 -1
  843. package/dist/chunks/protocolHandler-1.1.28-cvce24s6.mjs +0 -13
  844. package/dist/chunks/provider-1.1.28-wd0k9dj9.mjs +0 -2
  845. package/dist/chunks/providerProfiles-1.1.28-ansdm0bp.mjs +0 -1
  846. package/dist/chunks/providerValidation-1.1.28-xkpar3nj.mjs +0 -6
  847. package/dist/chunks/rate-limit-options-1.1.28-kv8762wq.mjs +0 -1
  848. package/dist/chunks/registerSubcommands-1.1.28-464hjqs0.mjs +0 -26
  849. package/dist/chunks/registry-1.1.28-a9wz892f.mjs +0 -1
  850. package/dist/chunks/release-notes-1.1.28-3dsn738r.mjs +0 -5
  851. package/dist/chunks/reload-plugins-1.1.28-8kfgxbx6.mjs +0 -2
  852. package/dist/chunks/remote-env-1.1.28-x46beyd7.mjs +0 -1
  853. package/dist/chunks/remoteBridgeCore-1.1.28-1pr9890h.mjs +0 -1
  854. package/dist/chunks/remoteSession-1.1.28-0dbsb9gr.mjs +0 -1
  855. package/dist/chunks/rename-1.1.28-m7z3qe6s.mjs +0 -1
  856. package/dist/chunks/replBridgeHandle-1.1.28-h8cn3e2b.mjs +0 -1
  857. package/dist/chunks/replLauncher-1.1.28-dc94xnm0.mjs +0 -1
  858. package/dist/chunks/resume-1.1.28-mr6necqk.mjs +0 -2
  859. package/dist/chunks/rewind-1.1.28-dk5z09nd.mjs +0 -1
  860. package/dist/chunks/rootOptions-1.1.28-g6c2bc4a.mjs +0 -1
  861. package/dist/chunks/runWorkflowHeadless-1.1.28-2r5z099n.mjs +0 -10
  862. package/dist/chunks/sandbox-adapter-1.1.28-9gkyj8zg.mjs +0 -1
  863. package/dist/chunks/sandbox-toggle-1.1.28-mvyww40e.mjs +0 -1
  864. package/dist/chunks/session-1.1.28-8xwfxnzq.mjs +0 -2
  865. package/dist/chunks/sessionDiscovery-1.1.28-6twnc7gm.mjs +0 -1
  866. package/dist/chunks/sessionFileAccessHooks-1.1.28-w6yt6st1.mjs +0 -1
  867. package/dist/chunks/sessionStorage-1.1.28-rfvff5qy.mjs +0 -1
  868. package/dist/chunks/settings-1.1.28-b3wrgfej.mjs +0 -1
  869. package/dist/chunks/setup-1.1.28-6vt58sg8.mjs +0 -12
  870. package/dist/chunks/sinks-1.1.28-rdvsx829.mjs +0 -1
  871. package/dist/chunks/skills-1.1.28-b53h2c2v.mjs +0 -1
  872. package/dist/chunks/startupProfiler-1.1.28-mk4vmdef.mjs +0 -1
  873. package/dist/chunks/startupUpdateCheck-1.1.28-0p8x3xh5.mjs +0 -1
  874. package/dist/chunks/state-1.1.28-fd27gqw0.mjs +0 -1
  875. package/dist/chunks/stats-1.1.28-fmezsyc4.mjs +0 -1
  876. package/dist/chunks/status-1.1.28-67a4bkc3.mjs +0 -1
  877. package/dist/chunks/stickers-1.1.28-0g68m8nd.mjs +0 -1
  878. package/dist/chunks/subprocessEnv-1.1.28-548a2kyv.mjs +0 -1
  879. package/dist/chunks/tasks-1.1.28-h3xfz4f4.mjs +0 -1
  880. package/dist/chunks/teamHelpers-1.1.28-4twfmqhf.mjs +0 -1
  881. package/dist/chunks/teammateModeSnapshot-1.1.28-7p6f8wg0.mjs +0 -1
  882. package/dist/chunks/teleport-1.1.28-zdrc7v25.mjs +0 -1
  883. package/dist/chunks/terminalSetup-1.1.28-fbkk7v65.mjs +0 -1
  884. package/dist/chunks/theme-1.1.28-tj36fh0f.mjs +0 -1
  885. package/dist/chunks/thinkback-1.1.28-x1bq9k3h.mjs +0 -1
  886. package/dist/chunks/thinkback-play-1.1.28-3jdfk2q7.mjs +0 -1
  887. package/dist/chunks/toolPool-1.1.28-fpt8xrnv.mjs +0 -1
  888. package/dist/chunks/toolSearch-1.1.28-mvqt18a8.mjs +0 -1
  889. package/dist/chunks/tools-1.1.28-a9t3fc6d.mjs +0 -1
  890. package/dist/chunks/trustedDevice-1.1.28-9e0gqehg.mjs +0 -1
  891. package/dist/chunks/turndown.cjs-1.1.28-dhs0afg7.mjs +0 -69
  892. package/dist/chunks/types-1.1.28-51fcbp8c.mjs +0 -1
  893. package/dist/chunks/ultrareviewCommand-1.1.28-d4ca5c58.mjs +0 -4
  894. package/dist/chunks/update-1.1.28-t9v2gpbh.mjs +0 -72
  895. package/dist/chunks/upgrade-1.1.28-12174ed0.mjs +0 -1
  896. package/dist/chunks/upload-1.1.28-whe18m8m.mjs +0 -7
  897. package/dist/chunks/upstreamproxy-1.1.28-bnjrek99.mjs +0 -14
  898. package/dist/chunks/url-handler-napi-1.1.28-0gh9dbnj.mjs +0 -1
  899. package/dist/chunks/usage-1.1.28-6m1bv4x5.mjs +0 -1
  900. package/dist/chunks/util-1.1.28-cvpx898d.mjs +0 -1
  901. package/dist/chunks/utils-1.1.28-ztac8cf7.mjs +0 -1
  902. package/dist/chunks/vim-1.1.28-rrv9qbr2.mjs +0 -1
  903. package/dist/chunks/watchLoop-1.1.28-rtznty0c.mjs +0 -13
  904. package/dist/chunks/watcher-1.1.28-7v4bd9pm.mjs +0 -1
  905. package/dist/chunks/wiki-1.1.28-m0y2n8rc.mjs +0 -132
  906. package/dist/chunks/workflows-1.1.28-k9wt163q.mjs +0 -1
  907. package/dist/chunks/worktree-1.1.28-5bjehwgc.mjs +0 -1
  908. package/dist/chunks/worktreeModeEnabled-1.1.28-d1yy7627.mjs +0 -1
  909. package/dist/chunks/wrapper-1.1.28-qgyry9mh.mjs +0 -7
  910. /package/dist/chunks/{cli-1.1.28-m37hk495.mjs → cli-1.1.29-09pf4n9h.mjs} +0 -0
  911. /package/dist/chunks/{cli-1.1.28-f658tc1w.mjs → cli-1.1.29-8zfk7gyk.mjs} +0 -0
  912. /package/dist/chunks/{cli-1.1.28-m7x3ax7z.mjs → cli-1.1.29-h0m93zmw.mjs} +0 -0
  913. /package/dist/chunks/{cli-1.1.28-7d7hz6b4.mjs → cli-1.1.29-skjcgaw2.mjs} +0 -0
  914. /package/dist/chunks/{cli-1.1.28-qzdtd4w8.mjs → cli-1.1.29-v507w0kc.mjs} +0 -0
  915. /package/dist/chunks/{cli-1.1.28-43p679k7.mjs → cli-1.1.29-vk67t66v.mjs} +0 -0
@@ -1,42 +0,0 @@
1
- import{Rta as H5,Tta as YX,Vta as C,Wta as EZ}from"./cli-1.1.28-3fssr567.mjs";function q(Z,$,X,J,z){if(J==="m")throw TypeError("Private method is not writable");if(J==="a"&&!z)throw TypeError("Private accessor was defined without a setter");if(typeof $==="function"?Z!==$||!z:!$.has(Z))throw TypeError("Cannot write private member to an object whose class did not declare it");return J==="a"?z.call(Z,X):z?z.value=X:$.set(Z,X),X}function Y(Z,$,X,J){if(X==="a"&&!J)throw TypeError("Private accessor was defined without a getter");if(typeof $==="function"?Z!==$||!J:!$.has(Z))throw TypeError("Cannot read private member from an object whose class did not declare it");return X==="m"?J:X==="a"?J.call(Z):J?J.value:$.get(Z)}var KZ=()=>{};function qZ(Z){return typeof Z==="object"&&Z!==null&&(("name"in Z)&&Z.name==="AbortError"||("message"in Z)&&String(Z.message).includes("FetchRequestCanceledException"))}var Z0=(Z)=>{if(Z instanceof Error)return Z;if(typeof Z==="object"&&Z!==null){try{let $=Object.prototype.toString.call(Z);if($==="[object Error]"||$==="[object DOMException]"){let X=Error(Z.message,Z.cause?{cause:Z.cause}:{});if(Z.stack)X.stack=Z.stack;if(Z.cause&&!X.cause)X.cause=Z.cause;if(Z.name)X.name=Z.name;return X}}catch{}try{return Error(JSON.stringify(Z))}catch{}}return Error(Z)};var gZ=()=>{};var H,v,e,PZ,t0,I$,s0,e0,Z8,$8,X8,J8,z8,Y8;var m=C(()=>{gZ();H=class H extends Error{};v=class v extends H{constructor(Z,$,X,J,z){super(`${v.makeMessage(Z,$,X)}`);this.status=Z,this.headers=J,this.requestID=J?.get("request-id"),this.workspaceID=J?.get("anthropic-workspace-id"),this.error=$,this.type=z??null}static makeMessage(Z,$,X){let J=$?.message?typeof $.message==="string"?$.message:JSON.stringify($.message):$?JSON.stringify($):X;if(Z&&J)return`${Z} ${J}`;if(Z)return`${Z} status code (no body)`;if(J)return J;return"(no status code or body)"}static generate(Z,$,X,J){if(!Z||!J)return new PZ({message:X,cause:Z0($)});let z=$,Q=z?.error?.type;if(Z===400)return new s0(Z,z,X,J,Q);if(Z===401)return new e0(Z,z,X,J,Q);if(Z===403)return new Z8(Z,z,X,J,Q);if(Z===404)return new $8(Z,z,X,J,Q);if(Z===409)return new X8(Z,z,X,J,Q);if(Z===422)return new J8(Z,z,X,J,Q);if(Z===429)return new z8(Z,z,X,J,Q);if(Z>=500)return new Y8(Z,z,X,J,Q);return new v(Z,z,X,J,Q)}};e=class e extends v{constructor({message:Z}={}){super(void 0,void 0,Z||"Request was aborted.",void 0)}};PZ=class PZ extends v{constructor({message:Z,cause:$}){super(void 0,void 0,Z||"Connection error.",void 0);if($)this.cause=$}};t0=class t0 extends PZ{constructor({message:Z}={}){super({message:Z??"Request timed out."})}};I$=class I$ extends H{constructor(Z,{cause:$}={}){super(Z??"Retryable error.");if($!==void 0)this.cause=$}};s0=class s0 extends v{};e0=class e0 extends v{};Z8=class Z8 extends v{};$8=class $8 extends v{};X8=class X8 extends v{};J8=class J8 extends v{};z8=class z8 extends v{};Y8=class Y8 extends v{}});var _Z;var Q8=C(()=>{_Z=class _Z extends Error{constructor(Z){let $=typeof Z==="string"?Z:Z.map((X)=>{if(X.type==="text")return X.text;return`[${X.type}]`}).join(" ");super($);this.name="ToolError",this.content=Z}}});function K6(Z,$){if(!(Z>=Q6))throw new H(`${$} must be at least ${Q6}ms (got ${Z}); to run without memory sync, pass \`memorySyncIntervalMs: null\` to the worker instead`)}var tJ=15000,Q6=5000;var V6=C(()=>{m()});function lX(){let Z,$;return{promise:new Promise((J,z)=>{Z=J,$=z}),resolve:Z,reject:$}}var N6=()=>{};var w0=function(){let{crypto:Z}=globalThis;if(Z?.randomUUID)return w0=Z.randomUUID.bind(Z),Z.randomUUID();let $=new Uint8Array(1),X=Z?()=>Z.getRandomValues($)[0]:()=>Math.random()*255&255;return"10000000-1000-4000-8000-100000000000".replace(/[018]/g,(J)=>(+J^X()&15>>+J/4).toString(16))};var y$=()=>{};function K8(Z){if(typeof Z!=="object")return{};return Z??{}}function nX(Z){if(!Z)return!0;for(let $ in Z)return!1;return!0}function U6(Z,$){return Object.prototype.hasOwnProperty.call(Z,$)}function aX(Z){return Z!=null&&typeof Z==="object"&&!Array.isArray(Z)}function vZ(Z){}var j7,W6=(Z)=>{return j7.test(Z)},ZZ=(Z)=>(ZZ=Array.isArray,ZZ(Z)),iX,G6=(Z,$)=>{if(typeof $!=="number"||!Number.isInteger($))throw new H(`${Z} must be an integer`);if($<0)throw new H(`${Z} must be a positive integer`);return $},V8=(Z)=>{try{return JSON.parse(Z)}catch($){return}};var XZ=C(()=>{m();j7=/^[a-z][a-z0-9+.-]*:/i,iX=ZZ});var TZ=(Z,$)=>new Promise((X)=>{if($?.aborted)return X();let J=()=>{clearTimeout(z),X()},z=setTimeout(()=>{$?.removeEventListener("abort",J),X()},Z);$?.addEventListener("abort",J,{once:!0})});var C0=()=>{};var wZ="0.123.0";var N8=()=>{};function E7(){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 D7(){if(typeof navigator>"u"||!navigator)return null;let Z=[{key:"edge",pattern:/Edge(?:\W+(\d+)\.(\d+)(?:\.(\d+))?)?/},{key:"ie",pattern:/MSIE(?:\W+(\d+)\.(\d+)(?:\.(\d+))?)?/},{key:"ie",pattern:/Trident(?:.*rv\:(\d+)\.(\d+)(?:\.(\d+))?)?/},{key:"chrome",pattern:/Chrome(?:\W+(\d+)\.(\d+)(?:\.(\d+))?)?/},{key:"firefox",pattern:/Firefox(?:\W+(\d+)\.(\d+)(?:\.(\d+))?)?/},{key:"safari",pattern:/(?:Version\W+(\d+)\.(\d+)(?:\.(\d+))?)?(?:\W+Mobile\S*)?\W+Safari/}];for(let{key:$,pattern:X}of Z){let J=X.exec(navigator.userAgent);if(J){let z=J[1]||0,Q=J[2]||0,V=J[3]||0;return{browser:$,version:`${z}.${Q}.${V}`}}}return null}var C6=()=>{return typeof window<"u"&&typeof window.document<"u"&&typeof navigator<"u"},F7=()=>{let Z=E7();if(Z==="deno")return{"X-Stainless-Lang":"js","X-Stainless-Package-Version":wZ,"X-Stainless-OS":q6(Deno.build.os),"X-Stainless-Arch":O6(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":wZ,"X-Stainless-OS":"Unknown","X-Stainless-Arch":`other:${EdgeRuntime}`,"X-Stainless-Runtime":"edge","X-Stainless-Runtime-Version":globalThis.process?.version??"unknown"};if(Z==="node")return{"X-Stainless-Lang":"js","X-Stainless-Package-Version":wZ,"X-Stainless-OS":q6(globalThis.process.platform??"unknown"),"X-Stainless-Arch":O6(globalThis.process.arch??"unknown"),"X-Stainless-Runtime":"node","X-Stainless-Runtime-Version":globalThis.process.version??"unknown"};let $=D7();if($)return{"X-Stainless-Lang":"js","X-Stainless-Package-Version":wZ,"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":wZ,"X-Stainless-OS":"Unknown","X-Stainless-Arch":"unknown","X-Stainless-Runtime":"unknown","X-Stainless-Runtime-Version":"unknown"}},O6=(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"},q6=(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"},w6,W8=()=>{return w6??(w6=F7())};var f$=C(()=>{N8()});function R7(Z,$){return()=>Z.removeEventListener("abort",$)}function B6(Z,$,X){k$.set(Z,R7($,X))}function H6(Z,$){if(k$.has($))M6?.register(Z,$,$)}function SZ(Z){let $=k$.get(Z);if($)k$.delete(Z),M6?.unregister(Z),$()}var k$,M6;var h$=C(()=>{k$=new WeakMap,M6=typeof globalThis.FinalizationRegistry==="function"?new globalThis.FinalizationRegistry((Z)=>SZ(Z)):null});function T6(){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 rX(...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 b$(Z){let $=Symbol.asyncIterator in Z?Z[Symbol.asyncIterator]():Z[Symbol.iterator]();return rX({start(){},async pull(X){let{done:J,value:z}=await $.next();if(J)X.close();else X.enqueue(z)},async cancel(){await $.return?.()}})}function U8(Z){if(Z[Symbol.asyncIterator])return Z;let $=Z.getReader();return{async next(){try{let X=await $.read();if(X?.done)$.releaseLock();return X}catch(X){throw $.releaseLock(),X}},async return(){let X=$.cancel();return $.releaseLock(),await X,{done:!0,value:void 0}},[Symbol.asyncIterator](){return this}}}async function x6(Z){if(Z===null||typeof Z!=="object")return;if(Z[Symbol.asyncIterator]){await Z[Symbol.asyncIterator]().return?.();return}let $=Z.getReader(),X=$.cancel();$.releaseLock(),await X}var M0=()=>{};var A6=({headers:Z,body:$})=>{return{bodyHeaders:{"content-type":"application/json"},body:JSON.stringify($)}};var oX=()=>{};var tX="RFC3986",sX=(Z)=>String(Z),eX,L6="RFC1738";var Z1=C(()=>{eX={RFC1738:(Z)=>String(Z).replace(/%20/g,"+"),RFC3986:sX}});function j6(Z){if(!Z||typeof Z!=="object")return!1;return!!(Z.constructor&&Z.constructor.isBuffer&&Z.constructor.isBuffer(Z))}function X1(Z,$){if(ZZ(Z)){let X=[];for(let J=0;J<Z.length;J+=1)X.push($(Z[J]));return X}return $(Z)}var g$=(Z,$)=>(g$=Object.hasOwn??Function.prototype.call.bind(Object.prototype.hasOwnProperty),g$(Z,$)),jZ,$1=1024,S6=(Z,$,X,J,z)=>{if(Z.length===0)return Z;let Q=Z;if(typeof Z==="symbol")Q=Symbol.prototype.toString.call(Z);else if(typeof Z!=="string")Q=String(Z);if(X==="iso-8859-1")return escape(Q).replace(/%u[0-9a-f]{4}/gi,function(K){return"%26%23"+parseInt(K.slice(2),16)+"%3B"});let V="";for(let K=0;K<Q.length;K+=$1){let G=Q.length>=$1?Q.slice(K,K+$1):Q,w=[];for(let x=0;x<G.length;++x){let O=G.charCodeAt(x);if(O===45||O===46||O===95||O===126||O>=48&&O<=57||O>=65&&O<=90||O>=97&&O<=122||z===L6&&(O===40||O===41)){w[w.length]=G.charAt(x);continue}if(O<128){w[w.length]=jZ[O];continue}if(O<2048){w[w.length]=jZ[192|O>>6]+jZ[128|O&63];continue}if(O<55296||O>=57344){w[w.length]=jZ[224|O>>12]+jZ[128|O>>6&63]+jZ[128|O&63];continue}x+=1,O=65536+((O&1023)<<10|G.charCodeAt(x)&1023),w[w.length]=jZ[240|O>>18]+jZ[128|O>>12&63]+jZ[128|O>>6&63]+jZ[128|O&63]}V+=w.join("")}return V};var E6=C(()=>{Z1();XZ();jZ=(()=>{let Z=[];for(let $=0;$<256;++$)Z.push("%"+(($<16?"0":"")+$.toString(16)).toUpperCase());return Z})()});function y7(Z){return typeof Z==="string"||typeof Z==="number"||typeof Z==="boolean"||typeof Z==="symbol"||typeof Z==="bigint"}function P6(Z,$,X,J,z,Q,V,K,G,w,x,O,U,B,T,P,S,j){let A=Z,F=j,y=0,h=!1;while((F=F.get(J1))!==void 0&&!h){let i=F.get(Z);if(y+=1,typeof i<"u")if(i===y)throw RangeError("Cyclic object value");else h=!0;if(typeof F.get(J1)>"u")y=0}if(typeof w==="function")A=w($,A);else if(A instanceof Date)A=U?.(A);else if(X==="comma"&&ZZ(A))A=X1(A,function(i){if(i instanceof Date)return U?.(i);return i});if(A===null){if(Q)return G&&!P?G($,o.encoder,S,"key",B):$;A=""}if(y7(A)||j6(A)){if(G){let i=P?$:G($,o.encoder,S,"key",B);return[T?.(i)+"="+T?.(G(A,o.encoder,S,"value",B))]}return[T?.($)+"="+T?.(String(A))]}let g=[];if(typeof A>"u")return g;let _;if(X==="comma"&&ZZ(A)){if(P&&G)A=X1(A,G);_=[{value:A.length>0?A.join(",")||null:void 0}]}else if(ZZ(w))_=w;else{let i=Object.keys(A);_=x?i.sort(x):i}let n=K?String($).replace(/\./g,"%2E"):String($),u=J&&ZZ(A)&&A.length===1?n+"[]":n;if(z&&ZZ(A)&&A.length===0)return u+"[]";for(let i=0;i<_.length;++i){let OZ=_[i],eZ=typeof OZ==="object"&&typeof OZ.value<"u"?OZ.value:A[OZ];if(V&&eZ===null)continue;let pX=O&&K?OZ.replace(/\./g,"%2E"):OZ,L7=ZZ(A)?typeof X==="function"?X(u,pX):u:u+(O?"."+pX:"["+pX+"]");j.set(Z,y);let Y6=new WeakMap;Y6.set(J1,j),R6(g,P6(eZ,L7,X,J,z,Q,V,K,X==="comma"&&P&&ZZ(A)?null:G,w,x,O,U,B,T,P,S,Y6))}return g}function f7(Z=o){if(typeof Z.allowEmptyArrays<"u"&&typeof Z.allowEmptyArrays!=="boolean")throw TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(typeof Z.encodeDotInKeys<"u"&&typeof Z.encodeDotInKeys!=="boolean")throw TypeError("`encodeDotInKeys` option can only be `true` or `false`, when provided");if(Z.encoder!==null&&typeof Z.encoder<"u"&&typeof Z.encoder!=="function")throw TypeError("Encoder has to be a function.");let $=Z.charset||o.charset;if(typeof Z.charset<"u"&&Z.charset!=="utf-8"&&Z.charset!=="iso-8859-1")throw TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");let X=tX;if(typeof Z.format<"u"){if(!g$(eX,Z.format))throw TypeError("Unknown format option provided.");X=Z.format}let J=eX[X],z=o.filter;if(typeof Z.filter==="function"||ZZ(Z.filter))z=Z.filter;let Q;if(Z.arrayFormat&&Z.arrayFormat in D6)Q=Z.arrayFormat;else if("indices"in Z)Q=Z.indices?"indices":"repeat";else Q=o.arrayFormat;if("commaRoundTrip"in Z&&typeof Z.commaRoundTrip!=="boolean")throw TypeError("`commaRoundTrip` must be a boolean, or absent");let V=typeof Z.allowDots>"u"?!!Z.encodeDotInKeys===!0?!0:o.allowDots:!!Z.allowDots;return{addQueryPrefix:typeof Z.addQueryPrefix==="boolean"?Z.addQueryPrefix:o.addQueryPrefix,allowDots:V,allowEmptyArrays:typeof Z.allowEmptyArrays==="boolean"?!!Z.allowEmptyArrays:o.allowEmptyArrays,arrayFormat:Q,charset:$,charsetSentinel:typeof Z.charsetSentinel==="boolean"?Z.charsetSentinel:o.charsetSentinel,commaRoundTrip:!!Z.commaRoundTrip,delimiter:typeof Z.delimiter>"u"?o.delimiter:Z.delimiter,encode:typeof Z.encode==="boolean"?Z.encode:o.encode,encodeDotInKeys:typeof Z.encodeDotInKeys==="boolean"?Z.encodeDotInKeys:o.encodeDotInKeys,encoder:typeof Z.encoder==="function"?Z.encoder:o.encoder,encodeValuesOnly:typeof Z.encodeValuesOnly==="boolean"?Z.encodeValuesOnly:o.encodeValuesOnly,filter:z,format:X,formatter:J,serializeDate:typeof Z.serializeDate==="function"?Z.serializeDate:o.serializeDate,skipNulls:typeof Z.skipNulls==="boolean"?Z.skipNulls:o.skipNulls,sort:typeof Z.sort==="function"?Z.sort:null,strictNullHandling:typeof Z.strictNullHandling==="boolean"?Z.strictNullHandling:o.strictNullHandling}}function I6(Z,$={}){let X=Z,J=f7($),z,Q;if(typeof J.filter==="function")Q=J.filter,X=Q("",X);else if(ZZ(J.filter))Q=J.filter,z=Q;let V=[];if(typeof X!=="object"||X===null)return"";let K=D6[J.arrayFormat],G=K==="comma"&&J.commaRoundTrip;if(!z)z=Object.keys(X);if(J.sort)z.sort(J.sort);let w=new WeakMap;for(let U=0;U<z.length;++U){let B=z[U];if(J.skipNulls&&X[B]===null)continue;R6(V,P6(X[B],B,K,G,J.allowEmptyArrays,J.strictNullHandling,J.skipNulls,J.encodeDotInKeys,J.encode?J.encoder:null,J.filter,J.sort,J.allowDots,J.serializeDate,J.format,J.formatter,J.encodeValuesOnly,J.charset,w))}let x=V.join(J.delimiter),O=J.addQueryPrefix===!0?"?":"";if(J.charsetSentinel)if(J.charset==="iso-8859-1")O+="utf8=%26%2310003%3B&";else O+="utf8=%E2%9C%93&";return x.length>0?O+x:""}var D6,R6=function(Z,$){Array.prototype.push.apply(Z,ZZ($)?$:[$])},F6,o,J1;var y6=C(()=>{E6();Z1();XZ();D6={brackets(Z){return String(Z)+"[]"},comma:"comma",indices(Z,$){return String(Z)+"["+$+"]"},repeat(Z){return String(Z)}},o={addQueryPrefix:!1,allowDots:!1,allowEmptyArrays:!1,arrayFormat:"indices",charset:"utf-8",charsetSentinel:!1,delimiter:"&",encode:!0,encodeDotInKeys:!1,encoder:S6,encodeValuesOnly:!1,format:tX,formatter:sX,indices:!1,serializeDate(Z){return(F6??(F6=Function.prototype.call.bind(Date.prototype.toISOString)))(Z)},skipNulls:!1,strictNullHandling:!1};J1={}});function f6(Z){return I6(Z,{arrayFormat:"brackets"})}var z1=C(()=>{y6()});function v$(Z){if(!Z)return;let $;try{$=new URL(Z)}catch(J){throw new b(`Invalid token endpoint base URL "${Z}": ${J}`)}if($.protocol==="https:")return;let X=$.hostname.toLowerCase().replace(/^\[|\]$/g,"");if($.protocol==="http:"&&(X==="localhost"||X==="127.0.0.1"||X==="::1"))return;throw new b(`Refusing to send credential over non-https token endpoint "${Z}"`)}async function m$(Z,$){let X=await b7(Z),J;try{J=JSON.parse(X)}catch{throw new b(`Token endpoint returned non-JSON response (status ${Z.status})`,Z.status,JZ(X),$)}if(!J.access_token)throw new b(`Token endpoint response missing access_token: ${JSON.stringify(JZ(J))}`,Z.status,JZ(J),$);if(J.token_type&&J.token_type.toLowerCase()!=="bearer")throw new b(`Token endpoint response: unsupported token_type "${J.token_type}" (want Bearer)`,Z.status,JZ(J),$);return J}function JZ(Z){if(Z==null)return Z;if(typeof Z==="string"){let $;try{$=JSON.parse(Z)}catch{if(Z.length<=Y1)return Z;return Z.slice(0,Y1)+`... <${Z.length-Y1} more chars>`}return JSON.stringify(JZ($))}if(typeof Z==="object"&&!Array.isArray(Z)){let $={};for(let[X,J]of Object.entries(Z))if(h7.has(X))$[X]=J;return $}return null}async function u$(Z,$=(X)=>console.warn(`anthropic-sdk: ${X}`)){if(typeof process>"u"||process.platform==="win32")return;let{fs:X}=await import("./node-1.1.28-q18jbvyv.mjs"),J=Z,z;try{J=await X.promises.realpath(Z),z=await X.promises.stat(J)}catch{return}let Q=z.mode&511;if(Q&18)throw new b(`Credentials file at ${J} is group/world-writable (mode 0o${Q.toString(8)}); this allows other local users to plant tokens. Run \`chmod 600 ${J}\`.`);if(Q&36)throw new b(`Credentials file at ${J} is group/world-readable (mode 0o${Q.toString(8)}); run \`chmod 600 ${J}\` before retrying.`);if(typeof process.getuid==="function"&&z.uid!==process.getuid())$(`credentials file at ${J} is owned by uid ${z.uid} (current process uid ${process.getuid()}); verify this is intentional.`)}async function c$(Z,$){let{fs:X,path:J}=await import("./node-1.1.28-q18jbvyv.mjs"),z=J.dirname(Z);await X.promises.mkdir(z,{recursive:!0,mode:448});let Q=`${Z}.${process.pid}.${Math.random().toString(36).slice(2)}.tmp`;try{let V=await X.promises.open(Q,"w",384);try{await V.writeFile(JSON.stringify($,null,2)),await V.sync()}finally{await V.close()}await X.promises.rename(Q,Z)}catch(V){throw await X.promises.unlink(Q).catch(()=>{}),V}try{let V=await X.promises.open(z,"r");try{await V.sync()}finally{await V.close()}}catch{}}async function b7(Z){if(!Z.body)return"";let $=Z.body.getReader(),X=[],J=0;for(;;){let{done:Q,value:V}=await $.read();if(Q)break;if(J+V.length>k6){let K=k6-J;if(K>0)X.push(V.subarray(0,K));await $.cancel();break}X.push(V),J+=V.length}let z;if(X.length===1)z=X[0];else{z=new Uint8Array(X.reduce((V,K)=>V+K.length,0));let Q=0;for(let V of X)z.set(V,Q),Q+=V.length}return new TextDecoder("utf-8").decode(z)}var h6="urn:ietf:params:oauth:grant-type:jwt-bearer",b6="refresh_token",_$="/v1/oauth/token",$0="oauth-2025-04-20",g6="oidc-federation-2026-04-01",_6=120,B0=30,v6=5,k6=1048576,Y1=2000,h7,b;var H0=C(()=>{m();h7=new Set(["error","error_description","error_uri"]);b=class b extends H{constructor(Z,$=null,X=null,J=null){super(Z);this.statusCode=$,this.body=X,this.requestId=J}}});function xZ(){return Math.floor(Date.now()/1000)}var G8=()=>{};class Q1{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-xZ();if(X>_6)return $.token;if(X>B0)return this.backgroundRefresh(),$.token;return(await this.refresh()).token}invalidate(){this.cached=null,this.nextForce=!0}refresh(Z=!1){if(this.pendingRefresh&&!Z)return this.pendingRefresh;return this.doRefresh(Z)}backgroundRefresh(){if(this.pendingRefresh)return;if(xZ()-this.lastAdvisoryError<v6)return;this.doRefresh().catch((Z)=>{this.lastAdvisoryError=xZ(),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 m6=C(()=>{H0();G8()});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 T0=()=>{};function d6(Z){let $=0;for(let z of Z)$+=z.length;let X=new Uint8Array($),J=0;for(let z of Z)X.set(z,J),J+=z.length;return X}function x0(Z){let $;return(u6??($=new globalThis.TextEncoder,u6=$.encode.bind($)))(Z)}function O8(Z){let $;return(c6??($=new globalThis.TextDecoder,c6=$.decode.bind($)))(Z)}var u6,c6;var q8=()=>{};var p6=(Z)=>{if(typeof globalThis.Buffer<"u"){let $=globalThis.Buffer.from(Z,"base64");return new Uint8Array($.buffer,$.byteOffset,$.byteLength)}if(typeof atob<"u"){let $=atob(Z),X=new Uint8Array($.length);for(let J=0;J<$.length;J++)X[J]=$.charCodeAt(J);return X}throw new H("Cannot decode base64 string; Expected `Buffer` or `atob` to be defined")};var K1=C(()=>{m();q8()});function w8(){}function d$(Z,$,X){if(!$||p$[Z]>p$[X])return w8;else return $[Z].bind($)}function N1(Z,$){let X=l6.get(Z);if(X&&X[0]===$)return X[1];let J={error:d$("error",Z,$),warn:d$("warn",Z,$),info:d$("info",Z,$),debug:d$("debug",Z,$)};return l6.set(Z,[$,J]),J}function k(Z){let $=Z.logger,X=Z.logLevel??"off";if(!$)return g7;return N1($,X)}function n6(){let Z=f("ANTHROPIC_LOG");if(!V1||Z!==i6)i6=Z,V1=N1(console,l$(Z,"process.env['ANTHROPIC_LOG']",N1(console,C8))??C8);return V1}var C8="warn",p$,l$=(Z,$,X)=>{if(!Z)return;if(U6(p$,Z))return Z;X.warn(`${$} was set to ${JSON.stringify(Z)}, expected one of ${JSON.stringify(Object.keys(p$))}`);return},g7,l6,i6,V1,FZ=(Z)=>{if(Z.options)Z.options={...Z.options},delete Z.options.headers;if(Z.headers)Z.headers=Object.fromEntries((Z.headers instanceof Headers?[...Z.headers]:Object.entries(Z.headers)).map(([$,X])=>[$,$.toLowerCase()==="authorization"||$.toLowerCase()==="api-key"||$.toLowerCase()==="x-api-key"||$.toLowerCase()==="cookie"||$.toLowerCase()==="set-cookie"?"***":X]));if("retryOfRequestLogID"in Z){if(Z.retryOfRequestLogID)Z.retryOf=Z.retryOfRequestLogID;delete Z.retryOfRequestLogID}return Z};var IZ=C(()=>{XZ();T0();p$={off:0,error:200,warn:300,info:400,debug:500};g7={error:w8,warn:w8,info:w8,debug:w8},l6=new WeakMap});var a6=C(()=>{XZ();K1();T0();IZ();y$();C0();z1()});function r6(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(!_7.test(Z))throw Error(`profile name "${Z}" contains disallowed characters (allowed: letters, digits, '_', '.', '-')`)}var i$="1.0",_7,o6=async(Z)=>{var $,X;let J=await W1();if(J===null)return null;let z=Z??await s6();if(z===null)return null;r6(z);let{fs:Q,path:V}=await import("./node-1.1.28-q18jbvyv.mjs"),K=V.join(J,"configs",`${z}.json`),G;try{G=await Q.promises.readFile(K,"utf-8")}catch(O){if(O?.code!=="ENOENT")throw Error(`failed to read config file ${K}: ${O}`);G=null}if(G===null){let O=f("ANTHROPIC_ORGANIZATION_ID"),U=f("ANTHROPIC_IDENTITY_TOKEN_FILE"),B=f("ANTHROPIC_FEDERATION_RULE_ID");if(B&&O)return{fromFile:!1,config:{organization_id:O,workspace_id:f("ANTHROPIC_WORKSPACE_ID"),base_url:f("ANTHROPIC_BASE_URL"),authentication:{type:"oidc_federation",federation_rule_id:B,service_account_id:f("ANTHROPIC_SERVICE_ACCOUNT_ID"),identity_token:U?{source:"file",path:U}:void 0,scope:f("ANTHROPIC_SCOPE")}}};return null}let w;try{w=JSON.parse(G)}catch(O){throw Error(`failed to parse config file ${K}: ${O}`)}if(!w.authentication)throw Error(`config file ${K} is missing "authentication"`);let x=w.authentication.type;if(x!=="oidc_federation"&&x!=="user_oauth")throw Error(`authentication.type "${x}" is not a known authentication type`);if(w.organization_id??(w.organization_id=f("ANTHROPIC_ORGANIZATION_ID")),w.workspace_id??(w.workspace_id=f("ANTHROPIC_WORKSPACE_ID")),w.base_url??(w.base_url=f("ANTHROPIC_BASE_URL")),($=w.authentication).scope??($.scope=f("ANTHROPIC_SCOPE")),w.authentication.type==="oidc_federation"){if(!w.authentication.identity_token){let O=f("ANTHROPIC_IDENTITY_TOKEN_FILE");if(O)w.authentication.identity_token={source:"file",path:O}}if(!w.authentication.federation_rule_id)w.authentication.federation_rule_id=f("ANTHROPIC_FEDERATION_RULE_ID")??"";(X=w.authentication).service_account_id??(X.service_account_id=f("ANTHROPIC_SERVICE_ACCOUNT_ID"))}return{config:w,fromFile:!0}},t6=async(Z,$)=>{if(Z?.authentication.credentials_path)return Z.authentication.credentials_path;let X=await W1();if(!X)return null;let J=$??await s6();if(!J)return null;r6(J);let{path:z}=await import("./node-1.1.28-q18jbvyv.mjs");return z.join(X,"credentials",`${J}.json`)},W1=async()=>{if(!v7())return null;let{path:Z}=await import("./node-1.1.28-q18jbvyv.mjs"),$=f("ANTHROPIC_CONFIG_DIR");if($)return $;if(W8()["X-Stainless-OS"]==="Windows"){let Q=f("APPDATA");if(Q)return Z.join(Q,"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},v7=()=>{let Z=W8()["X-Stainless-Runtime"];return Z==="node"||Z==="deno"},s6=async()=>{let Z=await W1();if(!Z)return null;let $=f("ANTHROPIC_PROFILE");if($)return $;let{fs:X,path:J}=await import("./node-1.1.28-q18jbvyv.mjs"),z=J.join(Z,"active_config");try{return(await X.promises.readFile(z,"utf-8")).trim()||"default"}catch(Q){if(Q?.code!=="ENOENT")throw Error(`failed to read ${z}: ${Q}`);return"default"}};var U1=C(()=>{f$();a6();_7=/^[A-Za-z0-9_.-]+$/});function G1(Z){if(!Z)throw new H("Identity token file path is empty");return async()=>{let{fs:$}=await import("./node-1.1.28-q18jbvyv.mjs"),X;try{X=await $.promises.readFile(Z,"utf-8")}catch(z){throw new H(`Failed to read identity token file at ${Z}: ${z}`)}let J=X.trim();if(!J)throw new H(`Identity token file at ${Z} is empty`);return J}}function e6(Z){if(!Z)throw new H("Identity token value is empty");return()=>Z}var Z9=C(()=>{m()});function $9(Z){return async()=>{v$(Z.baseURL);let $=await Z.identityTokenProvider();if($.length>16384)throw new b(`Identity token is ${Math.ceil($.length/1024)} KiB, exceeds the 16 KiB assertion limit`);let X={grant_type:h6,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}${_$}`,z;try{z=await Z.fetch(J,{method:"POST",headers:{"Content-Type":"application/json","anthropic-beta":`${$0},${g6}`,"User-Agent":Z.userAgent||`anthropic-sdk-typescript/${wZ} oidcFederationProvider`},body:JSON.stringify(X)})}catch(G){throw new b(`Failed to reach token endpoint ${J}: ${G}`)}let Q=z.headers.get("Request-Id");if(!z.ok){let G=await z.text().catch(()=>""),w=JZ(G),x="";if(z.status===401)x=` Ensure your federation rule matches your identity token. ${Z.workspaceId?"":"If your federation rule is scoped to multiple workspaces, set the ANTHROPIC_WORKSPACE_ID environment variable, the 'workspace_id' config key, or the `workspaceId` option. "}View your authentication events in the Workload identity page of Claude Console for more details.`;throw new b(`Token exchange failed with status ${z.status}${Q?` (request-id ${Q})`:""}: ${w}${x}`,z.status,w,Q)}let V=await m$(z,Q),K=Number(V.expires_in);if(!Number.isFinite(K))throw new b(`Token endpoint response missing required fields: ${JSON.stringify(JZ(V))}`,z.status,JZ(V),Q);return{token:V.access_token,expiresAt:xZ()+K}}}var X9=C(()=>{H0();G8();N8()});function J9(Z){return async($)=>{let{fs:X}=await import("./node-1.1.28-q18jbvyv.mjs");await u$(Z.credentialsPath,Z.onSafetyWarning);let J;try{J=await X.promises.readFile(Z.credentialsPath,"utf-8")}catch(S){throw new b(`Credentials file not found at ${Z.credentialsPath}: ${S}`)}let z;try{z=JSON.parse(J)}catch(S){throw new b(`Credentials file at ${Z.credentialsPath} is not valid JSON: ${S}`)}let Q=z.access_token;if(!Q)throw new b(`Credentials file at ${Z.credentialsPath} must include 'access_token'`);let V=z.expires_at;if(!$?.forceRefresh&&(V==null||xZ()<V-B0))return{token:Q,expiresAt:V??null};let K=z.refresh_token;if(!Z.clientId||!K)throw new b(`Access token at ${Z.credentialsPath} has expired and no refresh is available (client_id ${Z.clientId?"set":"empty"}, refresh_token ${K?"set":"empty"})`);v$(Z.baseURL);let G={grant_type:b6,refresh_token:K,client_id:Z.clientId},w=`${Z.baseURL}${_$}`,x;try{x=await Z.fetch(w,{method:"POST",headers:{"Content-Type":"application/json","anthropic-beta":$0,"User-Agent":Z.userAgent||`anthropic-sdk-typescript/${wZ} userOAuthProvider`},body:JSON.stringify(G)})}catch(S){throw new b(`User OAuth refresh failed to reach token endpoint: ${S}`)}let O=x.headers.get("Request-Id");if(!x.ok){let S=await x.text().catch(()=>"");throw new b(`User OAuth refresh failed (HTTP ${x.status}): ${JZ(S)}`,x.status,JZ(S),O)}let U=await m$(x,O),B=Number(U.expires_in);if(!Number.isFinite(B))throw new b(`User OAuth refresh response missing or invalid expires_in: ${JSON.stringify(JZ(U))}`,x.status,JZ(U),O);let T=xZ()+B,P=U.refresh_token||K;return await c$(Z.credentialsPath,{...z,version:i$,type:"oauth_token",access_token:U.access_token,expires_at:T,refresh_token:P}),{token:U.access_token,expiresAt:T}}}var z9=C(()=>{U1();H0();G8();N8()});function O1(Z,$){let X=Z.authentication.credentials_path??null,J=(Z.base_url||$.baseURL).replace(/\/+$/,""),z=m7(Z,X,J,$),Q={};if(Z.workspace_id&&Z.authentication.type==="user_oauth")Q["anthropic-workspace-id"]=Z.workspace_id;return{provider:z,extraHeaders:Q,baseURL:Z.base_url||void 0}}async function Y9(Z,$){let X=await o6($);if(!X)return null;let{config:J,fromFile:z}=X,Q=J.authentication.credentials_path||!z?J:{...J,authentication:{...J.authentication,credentials_path:await t6(J,$)??void 0}};return O1(Q,Z)}function m7(Z,$,X,J){switch(Z.authentication.type){case"oidc_federation":{let z=Z.authentication,Q=u7(z);if(!Q)throw new b("oidc_federation config requires an identity token (set authentication.identity_token, ANTHROPIC_IDENTITY_TOKEN_FILE, or ANTHROPIC_IDENTITY_TOKEN)");if(!z.federation_rule_id)throw new b("oidc_federation config requires 'federation_rule_id'. Set it in authentication.federation_rule_id in your profile, or via ANTHROPIC_FEDERATION_RULE_ID (profile takes precedence).");if(!Z.organization_id)throw new b("oidc_federation config requires organization_id (set ANTHROPIC_ORGANIZATION_ID or config.organization_id)");let V=$9({identityTokenProvider:Q,federationRuleId:z.federation_rule_id,organizationId:Z.organization_id,serviceAccountId:z.service_account_id,workspaceId:Z.workspace_id,baseURL:X,fetch:J.fetch,userAgent:J.userAgent});if($)return c7(V,$,J.onCacheWriteError,J.onSafetyWarning);return V}case"user_oauth":{if(!$)throw new b("user_oauth config requires authentication.credentials_path (or load via a profile so it defaults to <config_dir>/credentials/<profile>.json)");return J9({credentialsPath:$,clientId:Z.authentication.client_id,baseURL:X,fetch:J.fetch,userAgent:J.userAgent,onSafetyWarning:J.onSafetyWarning})}default:{let z=Z.authentication.type;throw new b(`authentication.type "${z}" is not a known authentication type`)}}}function u7(Z){if(Z.identity_token){let J=Z.identity_token.source;if(J!=="file")throw new b(`identity_token.source "${J}" is not supported by this SDK version (only "file")`);if(!Z.identity_token.path)throw new b('identity_token.source "file" requires a non-empty path');return G1(Z.identity_token.path)}let $=f("ANTHROPIC_IDENTITY_TOKEN_FILE");if($)return G1($);let X=f("ANTHROPIC_IDENTITY_TOKEN");if(X)return e6(X);return null}function c7(Z,$,X,J){return async(z)=>{let{fs:Q}=await import("./node-1.1.28-q18jbvyv.mjs");await u$($,J);let V;try{let G=await Q.promises.readFile($,"utf-8");V=JSON.parse(G);let w=V?.access_token;if(w&&!z?.forceRefresh){let x=V?.expires_at;if(x==null||xZ()<x-B0)return{token:w,expiresAt:x??null}}}catch(G){if(G?.code!=="ENOENT"&&!(G instanceof SyntaxError))X?.(G)}let K=await Z(z);try{await c$($,{...V??{},version:i$,type:"oauth_token",access_token:K.token,expires_at:K.expiresAt})}catch(G){X?.(G)}return K}}var Q9=C(()=>{T0();U1();H0();G8();Z9();X9();z9()});class mZ{constructor(){VZ.set(this,void 0),NZ.set(this,void 0),q(this,VZ,new Uint8Array,"f"),q(this,NZ,null,"f")}decode(Z){if(Z==null)return[];let $=Z instanceof ArrayBuffer?new Uint8Array(Z):typeof Z==="string"?x0(Z):Z;q(this,VZ,d6([Y(this,VZ,"f"),$]),"f");let X=[],J;while((J=d7(Y(this,VZ,"f"),Y(this,NZ,"f")))!=null){if(J.carriage&&Y(this,NZ,"f")==null){q(this,NZ,J.index,"f");continue}if(Y(this,NZ,"f")!=null&&(J.index!==Y(this,NZ,"f")+1||J.carriage)){X.push(O8(Y(this,VZ,"f").subarray(0,Y(this,NZ,"f")-1))),q(this,VZ,Y(this,VZ,"f").subarray(Y(this,NZ,"f")),"f"),q(this,NZ,null,"f");continue}let z=Y(this,NZ,"f")!==null?J.preceding-1:J.preceding,Q=O8(Y(this,VZ,"f").subarray(0,z));X.push(Q),q(this,VZ,Y(this,VZ,"f").subarray(J.index),"f"),q(this,NZ,null,"f")}return X}flush(){if(!Y(this,VZ,"f").length)return[];return this.decode(`
2
- `)}}function d7(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 K9(Z){for(let J=0;J<Z.length-1;J++){if(Z[J]===10&&Z[J+1]===10)return J+2;if(Z[J]===13&&Z[J+1]===13)return J+2;if(Z[J]===13&&Z[J+1]===10&&J+3<Z.length&&Z[J+2]===13&&Z[J+3]===10)return J+4}return-1}var VZ,NZ;var q1=C(()=>{KZ();q8();VZ=new WeakMap,NZ=new WeakMap;mZ.NEWLINE_CHARS=new Set([`
3
- `,"\r"]);mZ.NEWLINE_REGEXP=/\r\n|[\n\r]/g});async function*V9(Z,$){if(!Z.body){if($.abort(),typeof globalThis.navigator<"u"&&globalThis.navigator.product==="ReactNative")throw new H("The default react-native fetch implementation does not support streaming. Please use expo/fetch: https://docs.expo.dev/versions/latest/sdk/expo/#expofetch-api");throw new H("Attempted to iterate over a response with no body")}let X=new N9,J=new mZ,z=U8(Z.body);for await(let Q of p7(z))for(let V of J.decode(Q)){let K=X.decode(V);if(K)yield K}for(let Q of J.flush()){let V=X.decode(Q);if(V)yield V}}async function*p7(Z){let $=new Uint8Array;for await(let X of Z){if(X==null)continue;let J=X instanceof ArrayBuffer?new Uint8Array(X):typeof X==="string"?x0(X):X,z=new Uint8Array($.length+J.length);z.set($),z.set(J,$.length),$=z;let Q;while((Q=K9($))!==-1)yield $.slice(0,Q),$=$.slice(Q)}if($.length>0)yield $}class N9{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]=l7(Z,":");if(J.startsWith(" "))J=J.substring(1);if($==="event")this.event=J;else if($==="data")this.data.push(J);return null}}function l7(Z,$){let X=Z.indexOf($);if(X!==-1)return[Z.substring(0,X),$,Z.substring(X+$.length)];return[Z,"",""]}var M8,$Z;var B8=C(()=>{KZ();m();M0();q1();M0();gZ();XZ();q8();IZ();m();h$();$Z=class $Z{constructor(Z,$,X){this.iterator=Z,M8.set(this,void 0),this.controller=$,q(this,M8,X,"f")}static rawEvents(Z,$=new AbortController){return V9(Z,$)}static fromSSEResponse(Z,$,X){let J=!1,z=X?k(X):console;async function*Q(){if(J)throw new H("Cannot iterate over a consumed stream, use `.tee()` to split the stream.");J=!0;let V=!1;try{for await(let K of V9(Z,$)){if(K.event==="completion")try{yield JSON.parse(K.data)}catch(G){throw z.error("Could not parse message into JSON:",K.data),z.error("From chunk:",K.raw),G}if(K.event==="message_start"||K.event==="message_delta"||K.event==="message_stop"||K.event==="content_block_start"||K.event==="content_block_delta"||K.event==="content_block_stop"||K.event==="message"||K.event==="user.message"||K.event==="user.interrupt"||K.event==="user.tool_confirmation"||K.event==="user.custom_tool_result"||K.event==="user.tool_result"||K.event==="agent.message"||K.event==="agent.thinking"||K.event==="agent.tool_use"||K.event==="agent.tool_result"||K.event==="agent.mcp_tool_use"||K.event==="agent.mcp_tool_result"||K.event==="agent.custom_tool_use"||K.event==="agent.thread_context_compacted"||K.event==="session.status_running"||K.event==="session.status_idle"||K.event==="session.status_rescheduled"||K.event==="session.status_terminated"||K.event==="session.error"||K.event==="session.deleted"||K.event==="session.updated"||K.event==="span.model_request_start"||K.event==="span.model_request_end"||K.event==="span.outcome_evaluation_start"||K.event==="span.outcome_evaluation_ongoing"||K.event==="span.outcome_evaluation_end"||K.event==="user.define_outcome"||K.event==="agent.thread_message_received"||K.event==="agent.thread_message_sent"||K.event==="agent.session_thread_message_received"||K.event==="agent.session_thread_message_sent"||K.event==="session.thread_created"||K.event==="session.thread_status_created"||K.event==="session.thread_status_running"||K.event==="session.thread_status_idle"||K.event==="session.thread_status_rescheduled"||K.event==="session.thread_status_terminated"||K.event==="event_start"||K.event==="event_delta"||K.event==="system.message")try{yield JSON.parse(K.data)}catch(G){throw z.error("Could not parse message into JSON:",K.data),z.error("From chunk:",K.raw),G}if(K.event==="ping")continue;if(K.event==="error"){let G=V8(K.data)??K.data,w=G?.error?.type;throw new v(void 0,G,void 0,Z.headers,w)}}V=!0}catch(K){if(qZ(K))return;throw K}finally{if(!V)$.abort();SZ($)}}return new $Z(Q,$,X)}static fromReadableStream(Z,$,X){let J=!1;async function*z(){let V=new mZ,K=U8(Z);for await(let G of K)for(let w of V.decode(G))yield w;for(let G of V.flush())yield G}async function*Q(){if(J)throw new H("Cannot iterate over a consumed stream, use `.tee()` to split the stream.");J=!0;let V=!1;try{for await(let K of z()){if(V)continue;if(K)yield JSON.parse(K)}V=!0}catch(K){if(qZ(K))return;throw K}finally{if(!V)$.abort();SZ($)}}return new $Z(Q,$,X)}[(M8=new WeakMap,Symbol.asyncIterator)](){return this.iterator()}tee(){let Z=[],$=[],X=this.iterator(),J=(z)=>{return{next:()=>{if(z.length===0){let Q=X.next();Z.push(Q),$.push(Q)}return z.shift()}}};return[new $Z(()=>J(Z),this.controller,Y(this,M8,"f")),new $Z(()=>J($),this.controller,Y(this,M8,"f"))]}toReadableStream(){let Z=this,$;return rX({async start(){$=Z[Symbol.asyncIterator]()},async pull(X){try{let{value:J,done:z}=await $.next();if(z)return X.close();let Q=x0(JSON.stringify(J)+`
5
- `);X.enqueue(Q)}catch(J){X.error(J)}},async cancel(){await $.return?.()}})}}});async function n$(Z,$){let{response:X,requestLogID:J,retryOfRequestLogID:z,startTime:Q}=$,V=await(async()=>{if($.options.stream)return k(Z).debug("response",X.status,X.url,X.headers,X.body),$Z.fromSSEResponse(X,$.controller,Z);if(X.status===204)return null;if($.options.__binaryResponse)return X;let G=X.headers.get("content-type")?.split(";")[0]?.trim();if(G?.includes("application/json")||G?.endsWith("+json")){if(X.headers.get("content-length")==="0")return;let U=await X.json();return H8(U,X)}return await X.text()})().finally(()=>{if(!$.options.stream&&!$.options.__binaryResponse)SZ($.controller)});return k(Z).debug(`[${J}] response parsed`,FZ({retryOfRequestLogID:z,url:X.url,status:X.status,body:V,durationMs:Date.now()-Q})),V}function H8(Z,$){if(!Z||typeof Z!=="object"||Array.isArray(Z))return Z;return Object.defineProperties(Z,{_request_id:{value:$.headers.get("request-id"),enumerable:!1},_workspace_id:{value:$.headers.get("anthropic-workspace-id"),enumerable:!1}})}var a$=C(()=>{B8();IZ();h$()});function w1(Z){return typeof Z==="object"&&Z!==null&&U9.has(Z)}function G9(Z){let $=new Set;while(typeof Z==="object"&&Z!==null&&!$.has(Z)){if($.add(Z),w1(Z)||qZ(Z)||Z instanceof PZ||Z instanceof I$)return!0;Z=Z.cause}return!1}function C1(Z,$,X,J){return async(z,Q={})=>{if($.length===0)return Z.call(void 0,z,Q);let V=Q.headers instanceof Headers?Q.headers:new Headers(Q.headers),K=await n7(Z,$,X,J)({...Q,headers:V,url:typeof z==="string"?z:z instanceof URL?z.href:z.url});if(K.bodyUsed||K.body?.locked)throw new H("middleware consumed the response body; use response.clone() to inspect it, or return new Response(body, response) to consume and replace it");return K}}function i7(Z,$){let X=new WeakMap;return{options:Z,logger:$?k($):n6(),parse(J){if(Z?.stream&&J.ok)return W9(J,Z,$);let z=X.get(J);if(!z)z=W9(J,Z,$),X.set(J,z);return z}}}async function W9(Z,$,X){if(Z.bodyUsed||Z.body?.locked)throw new H("cannot ctx.parse() a response whose body was already consumed; call ctx.parse() instead of reading the body, or read via response.clone()");if($?.stream&&Z.ok)return $Z.fromSSEResponse(Z.clone(),new AbortController,X);if(Z.status===204)return null;if($?.__binaryResponse)return Z;let z=Z.headers.get("content-type")?.split(";")[0]?.trim();if(z?.includes("application/json")||z?.endsWith("+json")){if(Z.headers.get("content-length")==="0")return;return H8(await Z.clone().json(),Z)}return await Z.clone().text()}function n7(Z,$,X,J){let z=async({url:V,...K})=>{try{return await Z.call(void 0,V,K)}catch(G){let w=Z0(G);throw U9.add(w),w}},Q=i7(X,J);for(let V=$.length-1;V>=0;V--){let K=$[V],G=z;z=async(w)=>K(w,G,Q)}return z}var U9;var O9=C(()=>{gZ();a$();IZ();m();B8();U9=new WeakSet});var T8,X0;var r$=C(()=>{KZ();a$();X0=class X0 extends Promise{constructor(Z,$,X=n$){super((J)=>{J(null)});this.responsePromise=$,this.parseResponse=X,T8.set(this,void 0),q(this,T8,Z,"f")}_thenUnwrap(Z){return new X0(Y(this,T8,"f"),this.responsePromise,async($,X)=>H8(Z(await this.parseResponse($,X),X),X.response))}asResponse(){return this.responsePromise.then((Z)=>Z.response)}async withResponse(){let[Z,$]=await Promise.all([this.parse(),this.asResponse()]);return{data:Z,response:$,request_id:$.headers.get("request-id"),workspace_id:$.headers.get("anthropic-workspace-id")}}parse(){if(!this.parsedPromise)this.parsedPromise=this.responsePromise.then((Z)=>this.parseResponse(Y(this,T8,"f"),Z));return this.parsedPromise}then(Z,$){return this.parse().then(Z,$)}catch(Z){return this.parse().catch(Z)}finally(Z){return this.parse().finally(Z)}};T8=new WeakMap});var o$,t$,s$,t,L,M1;var D=C(()=>{KZ();m();a$();r$();XZ();t$=class t${constructor(Z,$,X,J){o$.set(this,void 0),q(this,o$,Z,"f"),this.options=J,this.response=$,this.body=X}hasNextPage(){if(!this.getPaginatedItems().length)return!1;return this.nextPageRequestOptions()!=null}async getNextPage(){let Z=this.nextPageRequestOptions();if(!Z)throw new H("No next page expected; please check `.hasNextPage()` before calling `.getNextPage()`.");return await Y(this,o$,"f").requestAPIList(this.constructor,Z)}async*iterPages(){let Z=this;yield Z;while(Z.hasNextPage())Z=await Z.getNextPage(),yield Z}async*[(o$=new WeakMap,Symbol.asyncIterator)](){for await(let Z of this.iterPages())for(let $ of Z.getPaginatedItems())yield $}};s$=class s$ extends X0{constructor(Z,$,X){super(Z,$,async(J,z)=>new X(J,z.response,await n$(J,z),z.options))}async*[Symbol.asyncIterator](){let Z=await this;for await(let $ of Z)yield $}};t=class t extends t${constructor(Z,$,X,J){super(Z,$,X,J);this.data=X.data||[],this.has_more=X.has_more||!1,this.first_id=X.first_id||null,this.last_id=X.last_id||null}getPaginatedItems(){return this.data??[]}hasNextPage(){if(this.has_more===!1)return!1;return super.hasNextPage()}nextPageRequestOptions(){if(this.options.query?.before_id){let $=this.first_id;if(!$)return null;return{...this.options,query:{...K8(this.options.query),before_id:$}}}let Z=this.last_id;if(!Z)return null;return{...this.options,query:{...K8(this.options.query),after_id:Z}}}};L=class L extends t${constructor(Z,$,X,J){super(Z,$,X,J);this.data=X.data||[],this.next_page=X.next_page||null}getPaginatedItems(){return this.data??[]}nextPageRequestOptions(){let Z=this.next_page;if(!Z)return null;return{...this.options,query:{...K8(this.options.query),page:Z}}}};M1=class M1 extends t${constructor(Z,$,X,J){super(Z,$,X,J);this.data=X.data||[],this.next_page=X.next_page||null,this.prev_page=X.prev_page||null}getPaginatedItems(){return this.data??[]}nextPageRequestOptions(){let Z=this.next_page;if(!Z)return null;return{...this.options,query:{...K8(this.options.query),page:Z}}}}});function J0(Z,$,X){return H1(),new File(Z,$??"unknown_file",X)}function x8(Z,$){let X=typeof Z==="object"&&Z!==null&&(("name"in Z)&&Z.name&&String(Z.name)||("url"in Z)&&Z.url&&String(Z.url)||("filename"in Z)&&Z.filename&&String(Z.filename)||("path"in Z)&&Z.path&&String(Z.path))||"";return $?X.split(/[\\/]/).pop()||void 0:X}function r7(Z){let $=typeof Z==="function"?Z:Z.fetch,X=q9.get($);if(X)return X;let J=(async()=>{try{let z="Response"in $?$.Response:(await $("data:,")).constructor,Q=new FormData;if(Q.toString()===await new z(Q).text())return!1;return!0}catch{return!0}})();return q9.set($,J),J}var H1=()=>{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`.":""))}},T1=(Z)=>Z!=null&&typeof Z==="object"&&typeof Z[Symbol.asyncIterator]==="function",CZ=async(Z,$,X=!0)=>{return{...Z,body:await o7(Z.body,$,X)}},q9,o7=async(Z,$,X=!0)=>{if(!await r7($))throw TypeError("The provided fetch function does not support file uploads with the current global FormData class.");let J=new FormData;return await Promise.all(Object.entries(Z||{}).map(([z,Q])=>B1(J,z,Q,X))),J},B1=async(Z,$,X,J)=>{if(X===void 0)return;if(X==null)throw TypeError(`Received null for "${$}"; to pass null in FormData, you must use the string 'null'`);if(typeof X==="string"||typeof X==="number"||typeof X==="boolean")Z.append($,String(X));else if(X instanceof Response){let z={},Q=X.headers.get("Content-Type");if(Q)z={type:Q};Z.append($,J0([await X.blob()],x8(X,J),z))}else if(T1(X))Z.append($,J0([await new Response(b$(X)).blob()],x8(X,J)));else if(X instanceof Blob)Z.append($,J0([X],x8(X,J)||void 0,{type:X.type}));else if(Array.isArray(X))await Promise.all(X.map((z)=>B1(Z,$+"[]",z,J)));else if(typeof X.then==="function")throw TypeError(`Received a Promise for "${$}"; await it first, e.g. \`await toFile(...)\``);else if(X instanceof ArrayBuffer||ArrayBuffer.isView(X))throw TypeError(`Received ${X.constructor.name} for "${$}"; to upload raw bytes, wrap them with \`await toFile(bytes, 'filename')\``);else if(typeof X==="object")await Promise.all(Object.entries(X).map(([z,Q])=>B1(Z,`${$}[${z}]`,Q,J)));else throw TypeError(`Invalid value given to form, expected a string, number, boolean, object, Array, File or Blob but got ${X} instead`)};var yZ=C(()=>{M0();q9=new WeakMap});async function e$(Z,$,X){if(H1(),Z=await Z,$||($=x8(Z,!0)),t7(Z)){if(Z instanceof File&&$==null&&X==null)return Z;return J0([await Z.arrayBuffer()],$??Z.name,{type:Z.type,lastModified:Z.lastModified,...X})}if(s7(Z)){let z=await Z.blob();return $||($=new URL(Z.url).pathname.split(/[\\/]/).pop()),J0(await x1(z),$,X)}let J=await x1(Z);if(!X?.type){let z=J.find((Q)=>typeof Q==="object"&&("type"in Q)&&Q.type);if(typeof z==="string")X={...X,type:z}}return J0(J,$,X)}async function x1(Z){let $=[];if(typeof Z==="string"||ArrayBuffer.isView(Z)||Z instanceof ArrayBuffer)$.push(Z);else if(w9(Z))$.push(Z instanceof Blob?Z:await Z.arrayBuffer());else if(T1(Z))for await(let X of Z)$.push(...await x1(X));else{let X=Z?.constructor?.name;throw Error(`Unexpected data type: ${typeof Z}${X?`; constructor: ${X}`:""}${e7(Z)}`)}return $}function e7(Z){if(typeof Z!=="object"||Z===null)return"";return`; props: [${Object.getOwnPropertyNames(Z).map((X)=>`"${X}"`).join(", ")}]`}var w9=(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",t7=(Z)=>Z!=null&&typeof Z==="object"&&typeof Z.name==="string"&&typeof Z.lastModified==="number"&&w9(Z),s7=(Z)=>Z!=null&&typeof Z==="object"&&typeof Z.url==="string"&&typeof Z.blob==="function";var C9=C(()=>{yZ();yZ()});var A1=C(()=>{C9()});var M9=()=>{};class M{constructor(Z){this._client=Z}}var E=()=>{};function*$5(Z){if(!Z)return;if(B9 in Z){let{values:J,nulls:z}=Z;yield*J.entries();for(let Q of z)yield[Q,null];return}let $=!1,X;if(Z instanceof Headers)X=Z.entries();else if(iX(Z))X=Z;else $=!0,X=Object.entries(Z??{});for(let J of X){let z=J[0];if(typeof z!=="string")throw TypeError("expected header name to be a string");let Q=iX(J[1])?J[1]:[J[1]],V=!1;for(let K of Q){if(K===void 0)continue;if($&&!V)V=!0,yield[z,ZX];yield[z,K]}}}var B9,ZX,X5,H9=(Z,$)=>{let X=Z?Z.split(",").map((J)=>J.trim()).filter(Boolean):[];for(let J of $.split(",").map((z)=>z.trim()))if(J&&!X.includes(J))X.push(J);return X.join(", ")},N=(Z)=>{let $=new Headers,X=new Set;for(let J of Z){let z=new Set;for(let[Q,V]of $5(J)){let K=Q.toLowerCase();if(X5.has(K)){if(V===ZX)continue;if(V===null)$.delete(Q),X.add(K);else $.set(Q,H9($.get(Q),V)),X.delete(K);continue}if(V===ZX||!z.has(K)){if($.delete(Q),z.add(K),V===ZX)continue}if(V===null)$.delete(Q),X.add(K);else $.append(Q,V),X.delete(K)}}return{[B9]:!0,values:$,nulls:X}};var R=C(()=>{XZ();B9=Symbol.for("brand.privateNullableHeaders");ZX=Symbol("clear"),X5=new Set(["x-stainless-helper"])});function x9(Z){return Z.replace(/[^A-Za-z0-9\-._~!$&'()*+,;=:@]+/g,encodeURIComponent)}var T9,J5=(Z=x9)=>function(X,...J){if(X.length===1)return X[0];let z=!1,Q=[],V=X.reduce((x,O,U)=>{if(/[?#]/.test(O))z=!0;let B=J[U],T=(z?encodeURIComponent:Z)(""+B);if(U!==J.length&&(B==null||typeof B==="object"&&B.toString===Object.getPrototypeOf(Object.getPrototypeOf(B.hasOwnProperty??T9)??T9)?.toString))T=B+"",Q.push({start:x.length+O.length,length:T.length,error:`Value of type ${Object.prototype.toString.call(B).slice(8,-1)} is not a valid path parameter`});return x+O+(U===J.length?"":T)},""),K=V.split(/[?#]/,1)[0],G=/(?<=^|\/)(?:\.|%2e){1,2}(?=\/|$)/gi,w;while((w=G.exec(K))!==null)Q.push({start:w.index,length:w[0].length,error:`Value "${w[0]}" can't be safely passed as a path parameter`});if(Q.sort((x,O)=>x.start-O.start),Q.length>0){let x=0,O=Q.reduce((U,B)=>{let T=" ".repeat(B.start-x),P="^".repeat(B.length);return x=B.start+B.length,U+T+P},"");throw new H(`Path parameters result in path with invalid segments:
6
- ${Q.map((U)=>U.error).join(`
7
- `)}
8
- ${V}
9
- ${O}`)}return V},W;var I=C(()=>{m();T9=Object.freeze(Object.create(null)),W=J5(x9)});var A8;var L1=C(()=>{E();D();R();I();A8=class A8 extends M{retrieve(Z,$={},X){let{betas:J}=$??{};return this._client.get(W`/v1/deployment_runs/${Z}?beta=true`,{...X,headers:N([{"anthropic-beta":[...J??[],"managed-agents-2026-04-01"].toString()},X?.headers])})}list(Z={},$){let{betas:X,...J}=Z??{};return this._client.getAPIList("/v1/deployment_runs?beta=true",L,{query:J,...$,headers:N([{"anthropic-beta":[...X??[],"managed-agents-2026-04-01"].toString()},$?.headers])})}}});var L8;var S1=C(()=>{E();D();R();I();L8=class L8 extends M{create(Z,$){let{betas:X,...J}=Z;return this._client.post("/v1/deployments?beta=true",{body:J,...$,headers:N([{"anthropic-beta":[...X??[],"managed-agents-2026-04-01"].toString()},$?.headers])})}retrieve(Z,$={},X){let{betas:J}=$??{};return this._client.get(W`/v1/deployments/${Z}?beta=true`,{...X,headers:N([{"anthropic-beta":[...J??[],"managed-agents-2026-04-01"].toString()},X?.headers])})}update(Z,$,X){let{betas:J,...z}=$;return this._client.post(W`/v1/deployments/${Z}?beta=true`,{body:z,...X,headers:N([{"anthropic-beta":[...J??[],"managed-agents-2026-04-01"].toString()},X?.headers])})}list(Z={},$){let{betas:X,...J}=Z??{};return this._client.getAPIList("/v1/deployments?beta=true",L,{query:J,...$,headers:N([{"anthropic-beta":[...X??[],"managed-agents-2026-04-01"].toString()},$?.headers])})}archive(Z,$={},X){let{betas:J}=$??{};return this._client.post(W`/v1/deployments/${Z}/archive?beta=true`,{...X,headers:N([{"anthropic-beta":[...J??[],"managed-agents-2026-04-01"].toString()},X?.headers])})}pause(Z,$={},X){let{betas:J}=$??{};return this._client.post(W`/v1/deployments/${Z}/pause?beta=true`,{...X,headers:N([{"anthropic-beta":[...J??[],"managed-agents-2026-04-01"].toString()},X?.headers])})}run(Z,$={},X){let{betas:J}=$??{};return this._client.post(W`/v1/deployments/${Z}/run?beta=true`,{...X,headers:N([{"anthropic-beta":[...J??[],"managed-agents-2026-04-01"].toString()},X?.headers])})}unpause(Z,$={},X){let{betas:J}=$??{};return this._client.post(W`/v1/deployments/${Z}/unpause?beta=true`,{...X,headers:N([{"anthropic-beta":[...J??[],"managed-agents-2026-04-01"].toString()},X?.headers])})}}});var S8;var j1=C(()=>{E();D();R();I();S8=class S8 extends M{create(Z,$){let{betas:X,...J}=Z;return this._client.post("/v1/dreams?beta=true",{body:J,...$,headers:N([{"anthropic-beta":[...X??[],"dreaming-2026-04-21"].toString()},$?.headers])})}retrieve(Z,$={},X){let{betas:J}=$??{};return this._client.get(W`/v1/dreams/${Z}?beta=true`,{...X,headers:N([{"anthropic-beta":[...J??[],"dreaming-2026-04-21"].toString()},X?.headers])})}list(Z={},$){let{betas:X,...J}=Z??{};return this._client.getAPIList("/v1/dreams?beta=true",L,{query:J,...$,headers:N([{"anthropic-beta":[...X??[],"dreaming-2026-04-21"].toString()},$?.headers])})}archive(Z,$={},X){let{betas:J}=$??{};return this._client.post(W`/v1/dreams/${Z}/archive?beta=true`,{...X,headers:N([{"anthropic-beta":[...J??[],"dreaming-2026-04-21"].toString()},X?.headers])})}cancel(Z,$={},X){let{betas:J}=$??{};return this._client.post(W`/v1/dreams/${Z}/cancel?beta=true`,{...X,headers:N([{"anthropic-beta":[...J??[],"dreaming-2026-04-21"].toString()},X?.headers])})}}});function F8(Z){return{["x-stainless-helper"]:Z}}function $X(Z){return typeof Z==="object"&&Z!==null&&j8 in Z}function E1(Z,$){let X=new Set;if(Z){for(let J of Z)if($X(J))X.add(J[j8])}if($)for(let J of $){if($X(J))X.add(J[j8]);let z=J.content;if(Array.isArray(z)){for(let Q of z)if($X(Q))X.add(Q[j8])}}return Array.from(X)}function JX(Z,$){let X=E1(Z,$);if(X.length===0)return{};return{["x-stainless-helper"]:X.join(", ")}}function zX(Z){if($X(Z))return{["x-stainless-helper"]:Z[j8]};return{}}var E8="x-stainless-helper",XX="x-stainless-helper-method",j8;var AZ=C(()=>{j8=Symbol("anthropic.sdk.stainlessHelper")});var D8;var F1=C(()=>{E();D();R();AZ();yZ();I();D8=class D8 extends M{list(Z={},$){let{betas:X,...J}=Z??{};return this._client.getAPIList("/v1/files?beta=true",L,{query:J,...$,headers:N([{...X?.toString()!=null?{"anthropic-beta":X?.toString()}:void 0},$?.headers])})}delete(Z,$={},X){let{betas:J}=$??{};return this._client.delete(W`/v1/files/${Z}?beta=true`,{...X,headers:N([{...J?.toString()!=null?{"anthropic-beta":J?.toString()}:void 0},X?.headers])})}download(Z,$={},X){let{betas:J}=$??{};return this._client.get(W`/v1/files/${Z}/content?beta=true`,{...X,headers:N([{Accept:"application/binary",...J?.toString()!=null?{"anthropic-beta":J?.toString()}:void 0},X?.headers]),__binaryResponse:!0})}retrieveMetadata(Z,$={},X){let{betas:J}=$??{};return this._client.get(W`/v1/files/${Z}?beta=true`,{...X,headers:N([{...J?.toString()!=null?{"anthropic-beta":J?.toString()}:void 0},X?.headers])})}upload(Z,$){let{betas:X,...J}=Z;return this._client.post("/v1/files?beta=true",CZ({body:J,...$,headers:N([{...X?.toString()!=null?{"anthropic-beta":X?.toString()}:void 0},zX(J.file),$?.headers])},this._client))}}});var R8;var D1=C(()=>{E();D();R();I();R8=class R8 extends M{retrieve(Z,$={},X){let{betas:J}=$??{};return this._client.get(W`/v1/models/${Z}?beta=true`,{...X,headers:N([{...J?.toString()!=null?{"anthropic-beta":J?.toString()}:void 0},X?.headers])})}list(Z={},$){let{betas:X,...J}=Z??{};return this._client.getAPIList("/v1/models?beta=true",t,{query:J,...$,headers:N([{...X?.toString()!=null?{"anthropic-beta":X?.toString()}:void 0},$?.headers])})}}});var P8;var R1=C(()=>{E();D();R();I();P8=class P8 extends M{create(Z,$){let{betas:X,...J}=Z;return this._client.post("/v1/user_profiles?beta=true",{body:J,...$,headers:N([{"anthropic-beta":[...X??[],"user-profiles-2026-08-18"].toString()},$?.headers])})}retrieve(Z,$={},X){let{betas:J}=$??{};return this._client.get(W`/v1/user_profiles/${Z}?beta=true`,{...X,headers:N([{"anthropic-beta":[...J??[],"user-profiles-2026-08-18"].toString()},X?.headers])})}update(Z,$,X){let{betas:J,...z}=$;return this._client.post(W`/v1/user_profiles/${Z}?beta=true`,{body:z,...X,headers:N([{"anthropic-beta":[...J??[],"user-profiles-2026-08-18"].toString()},X?.headers])})}list(Z={},$){let{betas:X,...J}=Z??{};return this._client.getAPIList("/v1/user_profiles?beta=true",L,{query:J,...$,headers:N([{"anthropic-beta":[...X??[],"user-profiles-2026-08-18"].toString()},$?.headers])})}createEnrollmentURL(Z,$={},X){let{betas:J}=$??{};return this._client.post(W`/v1/user_profiles/${Z}/enrollment_url?beta=true`,{...X,headers:N([{"anthropic-beta":[...J??[],"user-profiles-2026-08-18"].toString()},X?.headers])})}}});var j9=YX((L9)=>{Object.defineProperty(L9,"__esModule",{value:!0});L9.timingSafeEqual=void 0;function A9(Z,$=""){if(!Z)throw Error($)}function W5(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:$);A9(Z instanceof DataView),A9($ instanceof DataView);let X=Z.byteLength,J=0,z=-1;while(++z<X)J|=Z.getUint8(z)^$.getUint8(z);return J===0}L9.timingSafeEqual=W5});var D9=YX((WZ)=>{var U5=WZ&&WZ.__extends||function(){var Z=function($,X){return Z=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(J,z){J.__proto__=z}||function(J,z){for(var Q in z)if(z.hasOwnProperty(Q))J[Q]=z[Q]},Z($,X)};return function($,X){Z($,X);function J(){this.constructor=$}$.prototype=X===null?Object.create(X):(J.prototype=X.prototype,new J)}}();Object.defineProperty(WZ,"__esModule",{value:!0});var a=256,P1=function(){function Z($){if($===void 0)$="=";this._paddingCharacter=$}return Z.prototype.encodedLength=function($){if(!this._paddingCharacter)return($*8+5)/6|0;return($+2)/3*4|0},Z.prototype.encode=function($){var X="",J=0;for(;J<$.length-2;J+=3){var z=$[J]<<16|$[J+1]<<8|$[J+2];X+=this._encodeByte(z>>>18&63),X+=this._encodeByte(z>>>12&63),X+=this._encodeByte(z>>>6&63),X+=this._encodeByte(z>>>0&63)}var Q=$.length-J;if(Q>0){var z=$[J]<<16|(Q===2?$[J+1]<<8:0);if(X+=this._encodeByte(z>>>18&63),X+=this._encodeByte(z>>>12&63),Q===2)X+=this._encodeByte(z>>>6&63);else X+=this._paddingCharacter||"";X+=this._paddingCharacter||""}return X},Z.prototype.maxDecodedLength=function($){if(!this._paddingCharacter)return($*6+7)/8|0;return $/4*3|0},Z.prototype.decodedLength=function($){return this.maxDecodedLength($.length-this._getPaddingLength($))},Z.prototype.decode=function($){if($.length===0)return new Uint8Array(0);var X=this._getPaddingLength($),J=$.length-X,z=new Uint8Array(this.maxDecodedLength(J)),Q=0,V=0,K=0,G=0,w=0,x=0,O=0;for(;V<J-4;V+=4)G=this._decodeChar($.charCodeAt(V+0)),w=this._decodeChar($.charCodeAt(V+1)),x=this._decodeChar($.charCodeAt(V+2)),O=this._decodeChar($.charCodeAt(V+3)),z[Q++]=G<<2|w>>>4,z[Q++]=w<<4|x>>>2,z[Q++]=x<<6|O,K|=G&a,K|=w&a,K|=x&a,K|=O&a;if(V<J-1)G=this._decodeChar($.charCodeAt(V)),w=this._decodeChar($.charCodeAt(V+1)),z[Q++]=G<<2|w>>>4,K|=G&a,K|=w&a;if(V<J-2)x=this._decodeChar($.charCodeAt(V+2)),z[Q++]=w<<4|x>>>2,K|=x&a;if(V<J-3)O=this._decodeChar($.charCodeAt(V+3)),z[Q++]=x<<6|O,K|=O&a;if(K!==0)throw Error("Base64Coder: incorrect characters for decoding");return z},Z.prototype._encodeByte=function($){var X=$;return X+=65,X+=25-$>>>8&6,X+=51-$>>>8&-75,X+=61-$>>>8&-15,X+=62-$>>>8&3,String.fromCharCode(X)},Z.prototype._decodeChar=function($){var X=a;return X+=(42-$&$-44)>>>8&-a+$-43+62,X+=(46-$&$-48)>>>8&-a+$-47+63,X+=(47-$&$-58)>>>8&-a+$-48+52,X+=(64-$&$-91)>>>8&-a+$-65+0,X+=(96-$&$-123)>>>8&-a+$-97+26,X},Z.prototype._getPaddingLength=function($){var X=0;if(this._paddingCharacter){for(var J=$.length-1;J>=0;J--){if($[J]!==this._paddingCharacter)break;X++}if($.length<4||X>2)throw Error("Base64Coder: incorrect padding")}return X},Z}();WZ.Coder=P1;var I8=new P1;function G5(Z){return I8.encode(Z)}WZ.encode=G5;function O5(Z){return I8.decode(Z)}WZ.decode=O5;var E9=function(Z){U5($,Z);function $(){return Z!==null&&Z.apply(this,arguments)||this}return $.prototype._encodeByte=function(X){var J=X;return J+=65,J+=25-X>>>8&6,J+=51-X>>>8&-75,J+=61-X>>>8&-13,J+=62-X>>>8&49,String.fromCharCode(J)},$.prototype._decodeChar=function(X){var J=a;return J+=(44-X&X-46)>>>8&-a+X-45+62,J+=(94-X&X-96)>>>8&-a+X-95+63,J+=(47-X&X-58)>>>8&-a+X-48+52,J+=(64-X&X-91)>>>8&-a+X-65+0,J+=(96-X&X-123)>>>8&-a+X-97+26,J},$}(P1);WZ.URLSafeCoder=E9;var F9=new E9;function q5(Z){return F9.encode(Z)}WZ.encodeURLSafe=q5;function w5(Z){return F9.decode(Z)}WZ.decodeURLSafe=w5;WZ.encodedLength=function(Z){return I8.encodedLength(Z)};WZ.maxDecodedLength=function(Z){return I8.maxDecodedLength(Z)};WZ.decodedLength=function(Z){return I8.decodedLength(Z)}});var P9=YX((R9,QX)=>{(function(Z,$){var X={};$(X);var J=X.default;for(var z in X)J[z]=X[z];if(typeof QX==="object"&&typeof QX.exports==="object")QX.exports=J;else if(typeof define==="function"&&define.amd)define(function(){return J});else Z.sha256=J})(R9,function(Z){Z.__esModule=!0,Z.digestLength=32,Z.blockSize=64;var $=new Uint32Array([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]);function X(O,U,B,T,P){var S,j,A,F,y,h,g,_,n,u,i,OZ,eZ;while(P>=64){S=U[0],j=U[1],A=U[2],F=U[3],y=U[4],h=U[5],g=U[6],_=U[7];for(u=0;u<16;u++)i=T+u*4,O[u]=(B[i]&255)<<24|(B[i+1]&255)<<16|(B[i+2]&255)<<8|B[i+3]&255;for(u=16;u<64;u++)n=O[u-2],OZ=(n>>>17|n<<15)^(n>>>19|n<<13)^n>>>10,n=O[u-15],eZ=(n>>>7|n<<25)^(n>>>18|n<<14)^n>>>3,O[u]=(OZ+O[u-7]|0)+(eZ+O[u-16]|0);for(u=0;u<64;u++)OZ=(((y>>>6|y<<26)^(y>>>11|y<<21)^(y>>>25|y<<7))+(y&h^~y&g)|0)+(_+($[u]+O[u]|0)|0)|0,eZ=((S>>>2|S<<30)^(S>>>13|S<<19)^(S>>>22|S<<10))+(S&j^S&A^j&A)|0,_=g,g=h,h=y,y=F+OZ|0,F=A,A=j,j=S,S=OZ+eZ|0;U[0]+=S,U[1]+=j,U[2]+=A,U[3]+=F,U[4]+=y,U[5]+=h,U[6]+=g,U[7]+=_,T+=64,P-=64}return T}var J=function(){function O(){this.digestLength=Z.digestLength,this.blockSize=Z.blockSize,this.state=new Int32Array(8),this.temp=new Int32Array(64),this.buffer=new Uint8Array(128),this.bufferLength=0,this.bytesHashed=0,this.finished=!1,this.reset()}return O.prototype.reset=function(){return this.state[0]=1779033703,this.state[1]=3144134277,this.state[2]=1013904242,this.state[3]=2773480762,this.state[4]=1359893119,this.state[5]=2600822924,this.state[6]=528734635,this.state[7]=1541459225,this.bufferLength=0,this.bytesHashed=0,this.finished=!1,this},O.prototype.clean=function(){for(var U=0;U<this.buffer.length;U++)this.buffer[U]=0;for(var U=0;U<this.temp.length;U++)this.temp[U]=0;this.reset()},O.prototype.update=function(U,B){if(B===void 0)B=U.length;if(this.finished)throw Error("SHA256: can't update because hash was finished.");var T=0;if(this.bytesHashed+=B,this.bufferLength>0){while(this.bufferLength<64&&B>0)this.buffer[this.bufferLength++]=U[T++],B--;if(this.bufferLength===64)X(this.temp,this.state,this.buffer,0,64),this.bufferLength=0}if(B>=64)T=X(this.temp,this.state,U,T,B),B%=64;while(B>0)this.buffer[this.bufferLength++]=U[T++],B--;return this},O.prototype.finish=function(U){if(!this.finished){var B=this.bytesHashed,T=this.bufferLength,P=B/536870912|0,S=B<<3,j=B%64<56?64:128;this.buffer[T]=128;for(var A=T+1;A<j-8;A++)this.buffer[A]=0;this.buffer[j-8]=P>>>24&255,this.buffer[j-7]=P>>>16&255,this.buffer[j-6]=P>>>8&255,this.buffer[j-5]=P>>>0&255,this.buffer[j-4]=S>>>24&255,this.buffer[j-3]=S>>>16&255,this.buffer[j-2]=S>>>8&255,this.buffer[j-1]=S>>>0&255,X(this.temp,this.state,this.buffer,0,j),this.finished=!0}for(var A=0;A<8;A++)U[A*4+0]=this.state[A]>>>24&255,U[A*4+1]=this.state[A]>>>16&255,U[A*4+2]=this.state[A]>>>8&255,U[A*4+3]=this.state[A]>>>0&255;return this},O.prototype.digest=function(){var U=new Uint8Array(this.digestLength);return this.finish(U),U},O.prototype._saveState=function(U){for(var B=0;B<this.state.length;B++)U[B]=this.state[B]},O.prototype._restoreState=function(U,B){for(var T=0;T<this.state.length;T++)this.state[T]=U[T];this.bytesHashed=B,this.finished=!1,this.bufferLength=0},O}();Z.Hash=J;var z=function(){function O(U){this.inner=new J,this.outer=new J,this.blockSize=this.inner.blockSize,this.digestLength=this.inner.digestLength;var B=new Uint8Array(this.blockSize);if(U.length>this.blockSize)new J().update(U).finish(B).clean();else for(var T=0;T<U.length;T++)B[T]=U[T];for(var T=0;T<B.length;T++)B[T]^=54;this.inner.update(B);for(var T=0;T<B.length;T++)B[T]^=106;this.outer.update(B),this.istate=new Uint32Array(8),this.ostate=new Uint32Array(8),this.inner._saveState(this.istate),this.outer._saveState(this.ostate);for(var T=0;T<B.length;T++)B[T]=0}return O.prototype.reset=function(){return this.inner._restoreState(this.istate,this.inner.blockSize),this.outer._restoreState(this.ostate,this.outer.blockSize),this},O.prototype.clean=function(){for(var U=0;U<this.istate.length;U++)this.ostate[U]=this.istate[U]=0;this.inner.clean(),this.outer.clean()},O.prototype.update=function(U){return this.inner.update(U),this},O.prototype.finish=function(U){if(this.outer.finished)this.outer.finish(U);else this.inner.finish(U),this.outer.update(U,this.digestLength).finish(U);return this},O.prototype.digest=function(){var U=new Uint8Array(this.digestLength);return this.finish(U),U},O}();Z.HMAC=z;function Q(O){var U=new J().update(O),B=U.digest();return U.clean(),B}Z.hash=Q,Z.default=Q;function V(O,U){var B=new z(O).update(U),T=B.digest();return B.clean(),T}Z.hmac=V;function K(O,U,B,T){var P=T[0];if(P===0)throw Error("hkdf: cannot expand more");if(U.reset(),P>1)U.update(O);if(B)U.update(B);U.update(T),U.finish(O),T[0]++}var G=new Uint8Array(Z.digestLength);function w(O,U,B,T){if(U===void 0)U=G;if(T===void 0)T=32;var P=new Uint8Array([1]),S=V(U,O),j=new z(S),A=new Uint8Array(j.digestLength),F=A.length,y=new Uint8Array(T);for(var h=0;h<T;h++){if(F===A.length)K(A,j,B,P),F=0;y[h]=A[F++]}return j.clean(),A.fill(0),P.fill(0),y}Z.hkdf=w;function x(O,U,B,T){var P=new z(O),S=P.digestLength,j=new Uint8Array(4),A=new Uint8Array(S),F=new Uint8Array(S),y=new Uint8Array(T);for(var h=0;h*S<T;h++){var g=h+1;j[0]=g>>>24&255,j[1]=g>>>16&255,j[2]=g>>>8&255,j[3]=g>>>0&255,P.reset(),P.update(U),P.update(j),P.finish(F);for(var _=0;_<S;_++)A[_]=F[_];for(var _=2;_<=B;_++){P.reset(),P.update(F).finish(F);for(var n=0;n<S;n++)A[n]^=F[n]}for(var _=0;_<S&&h*S+_<T;_++)y[h*S+_]=A[_]}for(var h=0;h<S;h++)A[h]=F[h]=0;for(var h=0;h<4;h++)j[h]=0;return P.clean(),y}Z.pbkdf2=x})});var h9=YX((f9)=>{Object.defineProperty(f9,"__esModule",{value:!0});f9.Webhook=f9.WebhookVerificationError=void 0;var C5=j9(),I9=D9(),M5=P9(),y9=300;class I1 extends Error{constructor(Z){super(Z);Object.setPrototypeOf(this,I1.prototype),this.name="ExtendableError",this.stack=Error(Z).stack}}class uZ extends I1{constructor(Z){super(Z);Object.setPrototypeOf(this,uZ.prototype),this.name="WebhookVerificationError"}}f9.WebhookVerificationError=uZ;class y8{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(y8.prefix))Z=Z.substring(y8.prefix.length);this.key=I9.decode(Z)}}verify(Z,$){let X={};for(let O of Object.keys($))X[O.toLowerCase()]=$[O];let J=X["webhook-id"],z=X["webhook-signature"],Q=X["webhook-timestamp"];if(!z||!J||!Q)throw new uZ("Missing required headers");let V=this.verifyTimestamp(Q),G=this.sign(J,V,Z).split(",")[1],w=z.split(" "),x=new globalThis.TextEncoder;for(let O of w){let[U,B]=O.split(",");if(U!=="v1")continue;if((0,C5.timingSafeEqual)(x.encode(B),x.encode(G)))return JSON.parse(Z.toString())}throw new uZ("No matching signature found")}sign(Z,$,X){if(typeof X==="string");else if(X.constructor.name==="Buffer")X=X.toString();else throw Error("Expected payload to be of type string or Buffer.");let J=new TextEncoder,z=Math.floor($.getTime()/1000),Q=J.encode(`${Z}.${z}.${X}`);return`v1,${I9.encode(M5.hmac(this.key,Q))}`}verifyTimestamp(Z){let $=Math.floor(Date.now()/1000),X=parseInt(Z,10);if(isNaN(X))throw new uZ("Invalid Signature Headers");if($-X>y9)throw new uZ("Message timestamp too old");if(X>$+y9)throw new uZ("Message timestamp too new");return new Date(X*1000)}}f9.Webhook=y8;y8.prefix="whsec_"});var b9,f8;var y1=C(()=>{E();b9=H5(h9(),1);f8=class f8 extends M{parseUnverified(Z){return JSON.parse(Z)}unwrap(Z,$){let X=$?.headers;if(X==null)throw Error("Webhook headers are required in order to verify the signature");let J=$.key===void 0?this._client.webhookKey:$.key;if(!J)throw Error("Webhook key must not be null or empty in order to unwrap");return new b9.Webhook(J).verify(Z,X),JSON.parse(Z)}}});var k8;var f1=C(()=>{E();D();R();I();k8=class k8 extends M{list(Z,$={},X){let{betas:J,...z}=$??{};return this._client.getAPIList(W`/v1/agents/${Z}/versions?beta=true`,L,{query:z,...X,headers:N([{"anthropic-beta":[...J??[],"managed-agents-2026-04-01"].toString()},X?.headers])})}}});var A0;var k1=C(()=>{E();f1();f1();D();R();I();A0=class A0 extends M{constructor(){super(...arguments);this.versions=new k8(this._client)}create(Z,$){let{betas:X,...J}=Z;return this._client.post("/v1/agents?beta=true",{body:J,...$,headers:N([{"anthropic-beta":[...X??[],"managed-agents-2026-04-01"].toString()},$?.headers])})}retrieve(Z,$={},X){let{betas:J,...z}=$??{};return this._client.get(W`/v1/agents/${Z}?beta=true`,{query:z,...X,headers:N([{"anthropic-beta":[...J??[],"managed-agents-2026-04-01"].toString()},X?.headers])})}update(Z,$,X){let{betas:J,...z}=$;return this._client.post(W`/v1/agents/${Z}?beta=true`,{body:z,...X,headers:N([{"anthropic-beta":[...J??[],"managed-agents-2026-04-01"].toString()},X?.headers])})}list(Z={},$){let{betas:X,...J}=Z??{};return this._client.getAPIList("/v1/agents?beta=true",L,{query:J,...$,headers:N([{"anthropic-beta":[...X??[],"managed-agents-2026-04-01"].toString()},$?.headers])})}archive(Z,$={},X){let{betas:J}=$??{};return this._client.post(W`/v1/agents/${Z}/archive?beta=true`,{...X,headers:N([{"anthropic-beta":[...J??[],"managed-agents-2026-04-01"].toString()},X?.headers])})}};A0.Versions=k8});function cZ(Z,$){if(!Z)return()=>{};if(Z.aborted)return $.abort(),()=>{};let X=()=>$.abort();return Z.addEventListener("abort",X),()=>Z.removeEventListener("abort",X)}var KX=()=>{};function fZ(Z,$){return Z instanceof v&&Z.status===$}function g9(Z){return Z instanceof v&&typeof Z.status==="number"&&Z.status>=400&&Z.status<500}function dZ(Z){return g9(Z)&&!fZ(Z,408)&&!fZ(Z,409)&&!fZ(Z,429)}function VX(Z,$,X){return Math.min($*2**Z,X)}function h1(Z,$){return Z+Math.random()*($-Z)}function NX(Z){return Z*(1-Math.random()*0.25)}var h8=C(()=>{m()});function WX(Z,{authToken:$,helper:X}){if(!$)throw new H(`copyClientForHelper: expected a non-empty authToken but received ${JSON.stringify($)}`);let J=Z,z=J._options.defaultHeaders,Q=J._authState?.extraHeaders,V=Q?Object.fromEntries(Object.entries(Q).filter(([G])=>{let w=G.toLowerCase();return w!=="authorization"&&w!=="x-api-key"})):void 0,K=N([V,z,{[E8]:X}]);return Z.withOptions({apiKey:null,authToken:$,baseURL:Z.baseURL,credentials:void 0,defaultHeaders:K})}var b1=C(()=>{m();R();AZ()});function F5(Z){return VX(Z,S5,j5)}class _9{constructor(Z,$){j0.set(this,void 0),wX.set(this,void 0),E0.set(this,void 0),_8.set(this,0),q(this,j0,Z,"f"),q(this,wX,$,"f")}onEmptyPoll(){let Z=Date.now(),$={component:"work-poller",environment_id:Y(this,wX,"f")};if(Y(this,E0,"f")===void 0)q(this,E0,q(this,_8,Z,"f"),"f"),Y(this,j0,"f").info("idle; polling for work",$);else if(Z-Y(this,_8,"f")>=E5)q(this,_8,Z,"f"),Y(this,j0,"f").info(`still polling; idle for ${Math.round((Z-Y(this,E0,"f"))/1000)}s`,$);else Y(this,j0,"f").debug("poll returned no work",$)}onClaim(){q(this,E0,void 0,"f")}}function D5(){let $=globalThis.process?.env?.HOSTNAME;return $?`${$}-${w0()}`:w0()}var L0,UX,MZ,GX,OX,qX,b8,g8,S0,j0,wX,E0,_8,L5=999,S5=1000,j5=60000,E5=300000,z0;var CX=C(()=>{KZ();m();IZ();C0();y$();KX();R();h8();b1();h8();z0=class z0{constructor(Z){L0.set(this,void 0),UX.set(this,!1),MZ.set(this,void 0),GX.set(this,void 0),OX.set(this,void 0),qX.set(this,void 0),b8.set(this,void 0),g8.set(this,void 0),S0.set(this,void 0),this.client=Z.client,this.environmentId=Z.environmentId,this.environmentKey=Z.environmentKey,this.workerId=Z.workerId??D5(),q(this,L0,WX(Z.client,{authToken:Z.environmentKey,helper:"environments-work-poller"}),"f"),q(this,OX,Z.autoStop??!0,"f"),q(this,qX,Z.drain??!1,"f"),q(this,b8,Z.blockMs===void 0?L5:Z.blockMs,"f"),q(this,g8,Z.reclaimOlderThanMs??null,"f"),q(this,S0,Z.requestOptions,"f"),q(this,MZ,new AbortController,"f"),q(this,GX,cZ(Z.signal,Y(this,MZ,"f")),"f")}get signal(){return Y(this,MZ,"f").signal}abort(){Y(this,MZ,"f").abort()}async*[(L0=new WeakMap,UX=new WeakMap,MZ=new WeakMap,GX=new WeakMap,OX=new WeakMap,qX=new WeakMap,b8=new WeakMap,g8=new WeakMap,S0=new WeakMap,Symbol.asyncIterator)](){if(Y(this,UX,"f"))throw new H("Cannot iterate over a consumed WorkPoller");q(this,UX,!0,"f");let Z=k(this.client);Z.info("poller starting",{component:"work-poller",environment_id:this.environmentId});let $=new _9(Z,this.environmentId);try{let X=0;while(!Y(this,MZ,"f").signal.aborted){let J;try{J=await Y(this,L0,"f").beta.environments.work.poll(this.environmentId,{"Anthropic-Worker-ID":this.workerId,...Y(this,b8,"f")!==null?{block_ms:Y(this,b8,"f")}:{},...Y(this,g8,"f")!==null?{reclaim_older_than_ms:Y(this,g8,"f")}:{}},{headers:N([Y(this,S0,"f")?.headers]),signal:Y(this,MZ,"f").signal})}catch(z){if(Y(this,MZ,"f").signal.aborted)return;if(dZ(z))throw Z.error("poll failed permanently, stopping poller",{error:String(z)}),z;let Q=NX(F5(X));Z.warn("poll failed, backing off",{error:String(z),backoff_ms:Q}),X++,await TZ(Q,Y(this,MZ,"f").signal);continue}if(X=0,J==null){if(Y(this,qX,"f"))return;$.onEmptyPoll(),await TZ(h1(1000,3000),Y(this,MZ,"f").signal);continue}$.onClaim(),Z.info("claimed work",{component:"work-poller",environment_id:this.environmentId,work_id:J.id,work_type:J.data.type});try{await Y(this,L0,"f").beta.environments.work.ack(J.id,{environment_id:J.environment_id},{headers:N([Y(this,S0,"f")?.headers]),signal:Y(this,MZ,"f").signal})}catch(z){Z.error("ack failed",{work_id:J.id,error:String(z)});continue}try{yield J}finally{if(Y(this,OX,"f"))try{await Y(this,L0,"f").beta.environments.work.stop(J.id,{environment_id:J.environment_id},{headers:N([Y(this,S0,"f")?.headers])})}catch(z){if(!fZ(z,409))Z.warn("stop failed",{work_id:J.id,error:String(z)})}}}}finally{Y(this,GX,"f").call(this)}}};j0=new WeakMap,wX=new WeakMap,E0=new WeakMap,_8=new WeakMap});class g1{constructor(){F0.set(this,[]),pZ.set(this,[]),D0.set(this,!1)}push(Z){if(Y(this,D0,"f"))return!1;let $=Y(this,pZ,"f").shift();if($)$({done:!1,value:Z});else Y(this,F0,"f").push(Z);return!0}close(){if(Y(this,D0,"f"))return;q(this,D0,!0,"f");while(Y(this,pZ,"f").length>0)Y(this,pZ,"f").shift()({done:!0,value:void 0})}next(Z){if(Y(this,F0,"f").length>0)return Promise.resolve({done:!1,value:Y(this,F0,"f").shift()});if(Y(this,D0,"f")||Z?.aborted)return Promise.resolve({done:!0,value:void 0});return new Promise(($)=>{let X=(z)=>{Z?.removeEventListener("abort",J),$(z)},J=()=>{let z=Y(this,pZ,"f").indexOf(X);if(z>=0)Y(this,pZ,"f").splice(z,1);$({done:!0,value:void 0})};Y(this,pZ,"f").push(X),Z?.addEventListener("abort",J,{once:!0})})}tryShift(){return Y(this,F0,"f").shift()}}var F0,pZ,D0;var v9=C(()=>{KZ();F0=new WeakMap,pZ=new WeakMap,D0=new WeakMap});function _1(Z){return"name"in Z?Z.name:("mcp_server_name"in Z)?Z.mcp_server_name:Z.type}function R5(Z){return Z instanceof _Z?Z.content:`Error: ${Z instanceof Error?Z.message:String(Z)}`}async function m9(Z,$,X){try{let J=Z.parse?Z.parse($):$;return{content:await Z.run(J,X),isError:!1}}catch(J){return{content:R5(J),isError:!0}}}var u9=C(()=>{Q8()});function o9(Z){return Z.type==="session.status_idle"&&Z.stop_reason?.type==="end_turn"}class t9{constructor(Z,$){v8.set(this,void 0),AX.set(this,void 0),R0.set(this,new Set),Y0.set(this,!1),LZ.set(this,void 0),q(this,v8,Z,"f"),q(this,AX,$,"f")}noteEvent(Z){if(Z.type==="user.tool_confirmation")return;if(o9(Z))this.arm();else this.disarm()}block(Z){if(Y(this,R0,"f").add(Z),Y(this,LZ,"f")!==void 0)q(this,Y0,!0,"f"),clearTimeout(Y(this,LZ,"f")),q(this,LZ,void 0,"f")}unblock(Z){if(Y(this,R0,"f").delete(Z),Y(this,R0,"f").size===0&&Y(this,Y0,"f"))this.arm()}arm(){if(Y(this,v8,"f")<=0)return;if(Y(this,R0,"f").size>0){q(this,Y0,!0,"f");return}if(q(this,Y0,!1,"f"),Y(this,LZ,"f")!==void 0)clearTimeout(Y(this,LZ,"f"));q(this,LZ,setTimeout(Y(this,AX,"f"),Y(this,v8,"f")),"f")}disarm(){if(q(this,Y0,!1,"f"),Y(this,LZ,"f")!==void 0)clearTimeout(Y(this,LZ,"f")),q(this,LZ,void 0,"f")}}function g5(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 _5(Z){if(typeof Z==="string")return[{type:"text",text:Z||"(no output)"}];let $=Z.map((X)=>{if(X.type==="text")return{type:"text",text:X.text||"(no output)"};if(X.type==="image"||X.type==="document")return X;if(X.type==="search_result")return{type:"search_result",source:X.source,title:X.title,content:X.content.map((J)=>({type:"text",text:J.text})),citations:{enabled:X.citations?.enabled??!1}};return{type:"text",text:JSON.stringify(X)}});return $.length>0?$:[{type:"text",text:"(no output)"}]}var v8,AX,R0,Y0,LZ,c,MX,s,BX,m8,LX,r,I0,UZ,y0,lZ,P0,kZ,SX,u8,BZ,HX,a9,c9,d9,p9,v1,l9,TX,xX,m1,i9,r9,n9=500,P5=1e4,I5=120000,y5=30000,f5=1000,k5=30000,h5=300000,b5=60000,Q0;var jX=C(()=>{KZ();m();IZ();C0();h8();KX();v9();R();AZ();u9();v8=new WeakMap,AX=new WeakMap,R0=new WeakMap,Y0=new WeakMap,LZ=new WeakMap;Q0=class Q0{constructor(Z,$){c.add(this),MX.set(this,!1),s.set(this,void 0),BX.set(this,void 0),m8.set(this,void 0),LX.set(this,void 0),r.set(this,void 0),I0.set(this,new Set),UZ.set(this,new Set),y0.set(this,new Map),lZ.set(this,new Map),P0.set(this,new g1),kZ.set(this,0),SX.set(this,h5),u8.set(this,null),BZ.set(this,void 0),this.client=$.client,this.sessionId=Z,this.tools=$.tools,this.maxIdleMs=$.maxIdleMs??b5,q(this,r,k($.client),"f"),q(this,LX,new Map($.tools.map((X)=>[_1(X),X])),"f"),q(this,s,new AbortController,"f"),q(this,BX,cZ($.signal,Y(this,s,"f")),"f"),q(this,m8,$.requestOptions,"f"),q(this,BZ,new t9(this.maxIdleMs,()=>{Y(this,r,"f").info("session idle after end_turn; stopping",{component:"session-tool-runner",session_id:this.sessionId,max_idle_ms:this.maxIdleMs}),Y(this,s,"f").abort()}),"f")}get signal(){return Y(this,s,"f").signal}abort(){Y(this,s,"f").abort()}_setSendRetryWindow(Z){q(this,SX,Z,"f")}async*[(MX=new WeakMap,s=new WeakMap,BX=new WeakMap,m8=new WeakMap,LX=new WeakMap,r=new WeakMap,I0=new WeakMap,UZ=new WeakMap,y0=new WeakMap,lZ=new WeakMap,P0=new WeakMap,kZ=new WeakMap,SX=new WeakMap,u8=new WeakMap,BZ=new WeakMap,c=new WeakSet,Symbol.asyncIterator)](){if(Y(this,MX,"f"))throw new H("Cannot iterate over a consumed SessionToolRunner");q(this,MX,!0,"f"),Y(this,r,"f").info("session tool runner starting",{component:"session-tool-runner",session_id:this.sessionId});let Z=Y(this,c,"m",a9).call(this).catch(($)=>{if(!Y(this,s,"f").signal.aborted)Y(this,r,"f").error("stream loop failed",{error:String($)});Y(this,s,"f").abort()});try{while(!0){let X=await Y(this,P0,"f").next(Y(this,s,"f").signal);if(X.done)break;yield X.value}await Z;let $;while(($=Y(this,P0,"f").tryShift())!==void 0)yield $}finally{Y(this,s,"f").abort(),Y(this,BZ,"f").disarm(),await Z;try{await Y(this,c,"m",r9).call(this)}catch($){Y(this,r,"f").warn("drain failed",{error:String($)})}Y(this,P0,"f").close();for(let $ of this.tools)try{await $.close?.()}catch(X){Y(this,r,"f").warn("tool.close failed",{tool:_1($),error:String(X)})}Y(this,BX,"f").call(this)}}};HX=function(){return{...Y(this,m8,"f"),headers:N([F8("session-tool-runner"),Y(this,m8,"f")?.headers]),signal:Y(this,s,"f").signal}},a9=async function(){let $=Y(this,s,"f"),X=n9;while(!$.signal.aborted){try{let J=await this.client.beta.sessions.events.stream(this.sessionId,{},Y(this,c,"m",HX).call(this));await Y(this,c,"m",c9).call(this);for await(let z of J)if(X=n9,await Y(this,c,"m",p9).call(this,z))return}catch(J){if($.signal.throwIfAborted(),dZ(J))throw Y(this,r,"f").error("permanent stream failure, shutting down",{error:String(J)}),$.abort(),J;Y(this,r,"f").warn("stream disconnected, reconnecting",{error:String(J),backoff_ms:X})}$.signal.throwIfAborted(),await TZ(X,$.signal),X=Math.min(X*2,P5)}},c9=async function(){let $=Y(this,s,"f"),X=[],J=!1;try{for await(let V of this.client.beta.sessions.events.list(this.sessionId,{limit:1000},Y(this,c,"m",HX).call(this)))Y(this,c,"m",d9).call(this,V,X),J=o9(V)}catch(V){$.signal.throwIfAborted(),Y(this,r,"f").warn("reconcile list failed",{error:String(V)});for(let K of X)Y(this,I0,"f").delete(K.id);return}let z=X.filter((V)=>!Y(this,UZ,"f").has(V.id));Y(this,BZ,"f").disarm();for(let V of z)await Y(this,c,"m",v1).call(this,V);for(let V of[...Y(this,lZ,"f").values()]){let K=Y(this,y0,"f").get(V.id);if(K!==void 0)await Y(this,c,"m",TX).call(this,V,K)}let Q=z.filter((V)=>!Y(this,UZ,"f").has(V.id)&&!Y(this,lZ,"f").has(V.id));if(J&&Q.length===0)Y(this,BZ,"f").arm();else Y(this,BZ,"f").disarm()},d9=function($,X){if($.type==="agent.tool_use"||$.type==="agent.custom_tool_use"){if(Y(this,I0,"f").add($.id),!Y(this,UZ,"f").has($.id))X.push($)}else if($.type==="user.tool_result")Y(this,UZ,"f").add($.tool_use_id);else if($.type==="user.custom_tool_result")Y(this,UZ,"f").add($.custom_tool_use_id);else if($.type==="user.tool_confirmation"){if(!Y(this,UZ,"f").has($.tool_use_id))Y(this,y0,"f").set($.tool_use_id,$.result)}},p9=async function($){switch(Y(this,BZ,"f").noteEvent($),$.type){case"agent.tool_use":case"agent.custom_tool_use":if(!Y(this,I0,"f").has($.id))Y(this,I0,"f").add($.id),await Y(this,c,"m",v1).call(this,$);return!1;case"user.tool_confirmation":return await Y(this,c,"m",l9).call(this,$),!1;case"user.tool_result":return Y(this,UZ,"f").add($.tool_use_id),!1;case"user.custom_tool_result":return Y(this,UZ,"f").add($.custom_tool_use_id),!1;case"session.status_terminated":case"session.deleted":return Y(this,r,"f").info("session terminated",{component:"session-tool-runner",session_id:this.sessionId}),Y(this,s,"f").abort(),!0;default:return!1}},v1=async function($){let X=$.evaluated_permission,J=X==="deny"?"deny":Y(this,y0,"f").get($.id);if(J===void 0){if(X===void 0||X==="allow")await Y(this,c,"m",m1).call(this,$,void 0);else if(!Y(this,lZ,"f").has($.id))Y(this,r,"f").info("tool call awaiting confirmation; holding",{component:"session-tool-runner",session_id:this.sessionId,tool:$.name,tool_use_id:$.id}),Y(this,lZ,"f").set($.id,$),Y(this,BZ,"f").block($.id);return}await Y(this,c,"m",TX).call(this,$,J)},l9=async function($){Y(this,y0,"f").set($.tool_use_id,$.result);let X=Y(this,lZ,"f").get($.tool_use_id);if(X===void 0)return;await Y(this,c,"m",TX).call(this,X,$.result)},TX=async function($,X){let J=Y(this,lZ,"f").delete($.id);if(X==="allow"){if(Y(this,r,"f").info("tool call confirmed",{component:"session-tool-runner",session_id:this.sessionId,tool:$.name,tool_use_id:$.id}),!J)Y(this,BZ,"f").block($.id);try{await Y(this,c,"m",m1).call(this,$,"allow")}finally{Y(this,BZ,"f").unblock($.id)}return}if(J)Y(this,BZ,"f").unblock($.id);Y(this,UZ,"f").add($.id),Y(this,r,"f").info("tool call denied; not executing",{component:"session-tool-runner",session_id:this.sessionId,tool:$.name,tool_use_id:$.id}),Y(this,c,"m",xX).call(this,{event:$,toolUseId:$.id,name:$.name,isError:!1,posted:!1,confirmation:"deny"})},xX=function($){Y(this,P0,"f").push($)},m1=async function($,X){var J,z;if(Y(this,UZ,"f").has($.id))return;Y(this,r,"f").info("executing tool",{component:"session-tool-runner",session_id:this.sessionId,tool:$.name,tool_use_id:$.id}),q(this,kZ,(J=Y(this,kZ,"f"),J++,J),"f");try{let Q=Y(this,LX,"f").get($.name);if(!Q){Y(this,r,"f").info("tool not owned by this runner; leaving the tool_use_id pending for its owner",{component:"session-tool-runner",session_id:this.sessionId,tool:$.name,tool_use_id:$.id}),Y(this,c,"m",xX).call(this,{event:$,toolUseId:$.id,name:$.name,isError:!1,posted:!1,confirmation:X});return}let V,K,G=new AbortController,w=cZ(Y(this,s,"f").signal,G),x=setTimeout(()=>G.abort(),I5);try{let B=await m9(Q,$.input,{toolUse:$,toolUseBlock:$,signal:G.signal});V=B.content,K=B.isError}finally{clearTimeout(x),w()}let O=g5($,K,_5(V)),U=await Y(this,c,"m",i9).call(this,O,$.id);Y(this,c,"m",xX).call(this,{event:$,result:O,toolUseId:$.id,name:$.name,isError:K,posted:U,confirmation:X})}finally{if(q(this,kZ,(z=Y(this,kZ,"f"),z--,z),"f"),Y(this,kZ,"f")===0)Y(this,u8,"f")?.call(this)}},i9=async function($,X){let J=Y(this,s,"f"),z=Date.now(),Q,V=0;while(!0){V++,J.signal.throwIfAborted();try{return await this.client.beta.sessions.events.send(this.sessionId,{events:[$]},Y(this,c,"m",HX).call(this)),Y(this,UZ,"f").add(X),!0}catch(K){if(Q=K,dZ(K))break;let G=Y(this,SX,"f")-(Date.now()-z);if(G<=0)break;let w=Math.min(NX(VX(V-1,f5,k5)),G);Y(this,r,"f").warn("tool result send failed; retrying",{tool_use_id:X,attempt:V,backoff_ms:w,error:String(K)}),await TZ(w,J.signal)}}return Y(this,r,"f").error("failed to send tool result",{tool_use_id:X,attempts:V,error:String(Q)}),!1},r9=async function(){if(Y(this,kZ,"f")===0)return;if(await Promise.race([new Promise(($)=>q(this,u8,$,"f")),TZ(y5)]),q(this,u8,null,"f"),Y(this,kZ,"f")>0)Y(this,r,"f").warn("drain timeout exceeded")}});function u5(Z){return Z.resources.some(($)=>$.type==="memory_store")}function c5(Z){if(!Z)return null;let $;try{let J=Z.replace(/-/g,"+").replace(/_/g,"/"),z=J.padEnd(Math.ceil(J.length/4)*4,"=");$=JSON.parse(O8(p6(z)))}catch{return null}if($===null||typeof $!=="object"||Array.isArray($))return null;let X=$.sessions_token;return typeof X==="string"&&X!==""?X:null}class p8{constructor(Z){if(EX.add(this),c8.set(this,void 0),Z.unrestrictedPaths!==void 0)throw new H("The `unrestrictedPaths` option you passed to EnvironmentWorker (or client.beta.environments.work.worker()) is no longer supported. The worker's file tools (read, write, edit, glob, grep) are now always confined to `workdir` plus the session's memory folders. Remove `unrestrictedPaths` from your options; to let the file tools reach any other directory, add it to `AgentToolContext.allowedRoots` from a `tools` factory.");if(this.client=Z.client,this.environmentId=Z.environmentId,this.environmentKey=Z.environmentKey,this.tools=Z.tools,this.workdir=Z.workdir??process.cwd(),this.maxFileBytes=Z.maxFileBytes,this.maxIdleMs=Z.maxIdleMs,Z.memorySyncIntervalMs!=null)K6(Z.memorySyncIntervalMs,"memorySyncIntervalMs");this.memorySyncIntervalMs=Z.memorySyncIntervalMs,this.memorySyncDeletions=Z.memorySyncDeletions??"enabled",this.workerId=Z.workerId,this.requestOptions=Z.requestOptions,q(this,c8,Z.signal,"f")}async run(Z){let{environmentId:$,environmentKey:X}=this;if($===void 0||X===void 0)throw new H("EnvironmentWorker.run: environmentId and environmentKey are required to poll for work");let J=Z??Y(this,c8,"f"),z=new z0({client:this.client,environmentId:$,environmentKey:X,...this.workerId!==void 0?{workerId:this.workerId}:{},...J?{signal:J}:{},...this.requestOptions!==void 0?{requestOptions:this.requestOptions}:{},autoStop:!1});for await(let Q of z)try{await Y(this,EX,"m",u1).call(this,Q,X,z.signal)}catch(V){if(z.signal?.aborted)throw V;k(this.client).error("work item failed",{work_id:Q.id,error:String(V)})}}async handleItem(Z){let $=Z?.workId??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"),Q=Z?.workSecret||f("ANTHROPIC_WORK_SECRET")||null;if(!$)throw new H("handleItem: workId is required — pass it or set ANTHROPIC_WORK_ID");if(!X)throw new H("handleItem: environmentId is required — pass it or set ANTHROPIC_ENVIRONMENT_ID");if(!J)throw new H("handleItem: sessionId is required — pass it or set ANTHROPIC_SESSION_ID");if(!z)throw new H("handleItem: environmentKey is required — pass it, construct the worker with it, or set ANTHROPIC_ENVIRONMENT_KEY");let V={id:$,environment_id:X,secret:Q,data:{type:"session",id:J}};await Y(this,EX,"m",u1).call(this,V,z,Z?.signal??Y(this,c8,"f"))}}async function e9(Z,$){let X;try{return await Promise.race([Z.then(()=>!1,()=>!1),new Promise((J)=>{X=setTimeout(()=>J(!0),$)})])}finally{if(X!==void 0)clearTimeout(X)}}async function d5(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(!fZ(z,409))X.error("force-stop on exit failed",{work_id:$.id,error:String(z)})}}class Z7{constructor(Z){d8.set(this,void 0),f0.set(this,void 0),q(this,d8,Z,"f")}get signal(){return Y(this,d8,"f").signal}finish(Z){q(this,f0,Y(this,f0,"f")??Z,"f"),Y(this,d8,"f").abort()}get lost(){return Y(this,f0,"f")==="lease_lost"||Y(this,f0,"f")==="assumed_lost"}}function p5(Z){let $=Z instanceof v?Z.error:void 0;for(let X of["error","details","current_state"]){if(!aX($))return{};$=$[X]}return aX($)?$:{}}async function l5(Z,$,X,J,z,Q){let V=s9,K=v5,G=Date.now(),w=m5,x=async()=>{let O=new AbortController,U=cZ(X.signal,O),B=setTimeout(()=>O.abort(),V);try{let T=await Z.beta.environments.work.heartbeat($.id,{environment_id:$.environment_id,expected_last_heartbeat:w},{...z,headers:N([z?.headers]),signal:O.signal});if(G=Date.now(),w=T.last_heartbeat,T.ttl_seconds>0)K=T.ttl_seconds*1000,V=Math.max(1000,Math.min(K/2,s9)),Q?.(K);if(T.state==="stopping"||T.state==="stopped")J.info("heartbeat signals shutdown",{work_id:$.id,state:T.state}),X.finish("control_plane_stop");if(!T.lease_extended)J.warn("lease not extended, shutting down",{work_id:$.id}),X.finish("control_plane_stop")}catch(T){if(X.signal.throwIfAborted(),fZ(T,412)){let P=p5(T);J.error("lease lost: heartbeat precondition failed",{work_id:$.id,server_state:P.state,server_ttl_seconds:P.ttl_seconds,server_last_heartbeat:P.last_heartbeat}),X.finish("lease_lost");return}if(dZ(T))throw J.error("permanent heartbeat failure",{work_id:$.id,error:String(T)}),X.finish("heartbeat_rejected"),T;if(Date.now()-G>K){J.error("lease assumed lost: no successful heartbeat in ttl",{work_id:$.id,ttl_ms:K,error:String(T)}),X.finish("assumed_lost");return}J.warn("transient heartbeat failure",{work_id:$.id,error:String(T)})}finally{clearTimeout(B),U()}};await x();while(!X.signal.aborted)await TZ(V,X.signal),X.signal.throwIfAborted(),await x()}var EX,c8,u1,d8,f0,s9=30000,v5=90000,m5="NO_HEARTBEAT";var c1=C(()=>{KZ();m();IZ();K1();q8();T0();C0();h8();KX();XZ();R();jX();CX();b1();V6();c8=new WeakMap,EX=new WeakSet,u1=async function($,X,J){let z=k(this.client),Q=c5($.secret);if($.secret&&Q===null)z.warn("work item carried a secret payload but no sessions token could be extracted; falling back to the environment key",{work_id:$.id});let V=Q??X,K=WX(this.client,{authToken:V,helper:"environments-worker"}),G=$.data.id,w=new AbortController,x=cZ(J,w),O=new Z7(w),U=await import("./node-1.1.28-f9q7m0bb.mjs"),B,T,P=l5(K,$,O,z,this.requestOptions,(F)=>{B=F,T?._setSendRetryWindow(F)}).catch((F)=>{if(!w.signal.aborted)z.error("heartbeat loop failed",{work_id:$.id,error:String(F)});w.abort()}),S=async()=>{},j,A=!1;try{if($.data.type!=="session"){z.debug("skipping non-session work item",{work_id:$.id,type:$.data.type});return}let F=await K.beta.sessions.retrieve(G);if(Q===null&&this.memorySyncIntervalMs!==null&&u5(F))throw new U.SessionMemoryError(`cannot mount the session's memories: the work item carried no sessions token (work_id=${$.id}, session_id=${G}); the memory endpoints reject the environment key, so the poller must issue a per-item \`secret\` carrying \`sessions_token\`, or set \`memorySyncIntervalMs: null\` to run without memory`);let y={workdir:this.workdir,client:K,session:F,...this.maxFileBytes!==void 0?{maxFileBytes:this.maxFileBytes}:{}};try{S=await U.setupSkills(y)}catch(g){z.warn("skill setup failed",{session_id:G,work_id:$.id,error:String(g)})}if(Q!==null&&this.memorySyncIntervalMs!==null)j=new U.SessionMemoryStores(K,{workdir:this.workdir,...this.memorySyncIntervalMs!==void 0?{syncIntervalMs:this.memorySyncIntervalMs}:{},syncDeletions:this.memorySyncDeletions}),await j.download(F),y.allowedRoots=j.roots,y.readOnlyRoots=j.readOnlyRoots;else z.debug("memory stores disabled for this item",{work_id:$.id});let h=typeof this.tools==="function"?this.tools(y):this.tools??U.betaAgentToolset20260401(y);if(T=new Q0(G,{client:K,tools:h,...this.maxIdleMs!==void 0?{maxIdleMs:this.maxIdleMs}:{},...this.requestOptions!==void 0?{requestOptions:this.requestOptions}:{},signal:w.signal}),B!==void 0)T._setSendRetryWindow(B);for await(let g of T)if(j)await j.syncIfDue();A=!w.signal.aborted}finally{try{await S().catch((F)=>{z.warn("skill cleanup failed",{session_id:G,work_id:$.id,error:String(F)})})}finally{if(j){let F=U.MEMORY_FLUSH_TIMEOUT_MS;if(A){if(await e9(j.finish(),F))z.warn(`final memory sync cut off after ${F}ms; the flush that follows still uploads changed files`,{session_id:G,work_id:$.id})}let y=new AbortController;if(await e9(j.flushWrites(y.signal),F))y.abort(),z.warn(`memory flush cut off after ${F}ms; changed files it had not uploaded yet are not saved`,{session_id:G,work_id:$.id});await j.dispose().catch((g)=>{z.warn("memory store cleanup failed",{session_id:G,work_id:$.id,error:String(g)})})}}if(O.finish("runner_done"),x(),await P,O.lost)z.info("lease lost; released without stopping it",{session_id:G,work_id:$.id});else await d5(K,$,z,this.requestOptions)}};d8=new WeakMap,f0=new WeakMap});var K0;var d1=C(()=>{E();D();R();I();CX();c1();CX();c1();K0=class K0 extends M{retrieve(Z,$,X){let{environment_id:J,betas:z}=$;return this._client.get(W`/v1/environments/${J}/work/${Z}?beta=true`,{...X,headers:N([{"anthropic-beta":[...z??[],"managed-agents-2026-04-01"].toString()},X?.headers])})}update(Z,$,X){let{environment_id:J,betas:z,...Q}=$;return this._client.post(W`/v1/environments/${J}/work/${Z}?beta=true`,{body:Q,...X,headers:N([{"anthropic-beta":[...z??[],"managed-agents-2026-04-01"].toString()},X?.headers])})}list(Z,$={},X){let{betas:J,...z}=$??{};return this._client.getAPIList(W`/v1/environments/${Z}/work?beta=true`,L,{query:z,...X,headers:N([{"anthropic-beta":[...J??[],"managed-agents-2026-04-01"].toString()},X?.headers])})}ack(Z,$,X){let{environment_id:J,betas:z}=$;return this._client.post(W`/v1/environments/${J}/work/${Z}/ack?beta=true`,{...X,headers:N([{"anthropic-beta":[...z??[],"managed-agents-2026-04-01"].toString()},X?.headers])})}heartbeat(Z,$,X){let{environment_id:J,desired_ttl_seconds:z,expected_last_heartbeat:Q,betas:V}=$;return this._client.post(W`/v1/environments/${J}/work/${Z}/heartbeat?beta=true`,{query:{desired_ttl_seconds:z,expected_last_heartbeat:Q},...X,headers:N([{"anthropic-beta":[...V??[],"managed-agents-2026-04-01"].toString()},X?.headers])})}poll(Z,$={},X){let{betas:J,"Anthropic-Worker-ID":z,...Q}=$??{};return this._client.get(W`/v1/environments/${Z}/work/poll?beta=true`,{query:Q,...X,headers:N([{"anthropic-beta":[...J??[],"managed-agents-2026-04-01"].toString(),...z!=null?{"Anthropic-Worker-ID":z}:void 0},X?.headers])})}stats(Z,$={},X){let{betas:J}=$??{};return this._client.get(W`/v1/environments/${Z}/work/stats?beta=true`,{...X,headers:N([{"anthropic-beta":[...J??[],"managed-agents-2026-04-01"].toString()},X?.headers])})}stop(Z,$,X){let{environment_id:J,betas:z,...Q}=$;return this._client.post(W`/v1/environments/${J}/work/${Z}/stop?beta=true`,{body:Q,...X,headers:N([{"anthropic-beta":[...z??[],"managed-agents-2026-04-01"].toString()},X?.headers])})}poller(Z){return new z0({...Z,client:this._client})}worker(Z){return new p8({...Z,client:this._client})}};K0.WorkPoller=z0;K0.EnvironmentWorker=p8});var k0;var p1=C(()=>{E();d1();d1();D();R();I();k0=class k0 extends M{constructor(){super(...arguments);this.work=new K0(this._client)}create(Z,$){let{betas:X,...J}=Z;return this._client.post("/v1/environments?beta=true",{body:J,...$,headers:N([{"anthropic-beta":[...X??[],"managed-agents-2026-04-01"].toString()},$?.headers])})}retrieve(Z,$={},X){let{betas:J}=$??{};return this._client.get(W`/v1/environments/${Z}?beta=true`,{...X,headers:N([{"anthropic-beta":[...J??[],"managed-agents-2026-04-01"].toString()},X?.headers])})}update(Z,$,X){let{betas:J,...z}=$;return this._client.post(W`/v1/environments/${Z}?beta=true`,{body:z,...X,headers:N([{"anthropic-beta":[...J??[],"managed-agents-2026-04-01"].toString()},X?.headers])})}list(Z={},$){let{betas:X,...J}=Z??{};return this._client.getAPIList("/v1/environments?beta=true",L,{query:J,...$,headers:N([{"anthropic-beta":[...X??[],"managed-agents-2026-04-01"].toString()},$?.headers])})}delete(Z,$={},X){let{betas:J}=$??{};return this._client.delete(W`/v1/environments/${Z}?beta=true`,{...X,headers:N([{"anthropic-beta":[...J??[],"managed-agents-2026-04-01"].toString()},X?.headers])})}archive(Z,$={},X){let{betas:J}=$??{};return this._client.post(W`/v1/environments/${Z}/archive?beta=true`,{...X,headers:N([{"anthropic-beta":[...J??[],"managed-agents-2026-04-01"].toString()},X?.headers])})}};k0.Work=K0});var l8;var l1=C(()=>{E();D();R();I();l8=class l8 extends M{create(Z,$,X){let{view:J,betas:z,...Q}=$;return this._client.post(W`/v1/memory_stores/${Z}/memories?beta=true`,{query:{view:J},body:Q,...X,headers:N([{"anthropic-beta":[...z??[],"agent-memory-2026-07-22"].toString()},X?.headers])})}retrieve(Z,$,X){let{memory_store_id:J,betas:z,...Q}=$;return this._client.get(W`/v1/memory_stores/${J}/memories/${Z}?beta=true`,{query:Q,...X,headers:N([{"anthropic-beta":[...z??[],"agent-memory-2026-07-22"].toString()},X?.headers])})}update(Z,$,X){let{memory_store_id:J,view:z,betas:Q,...V}=$;return this._client.post(W`/v1/memory_stores/${J}/memories/${Z}?beta=true`,{query:{view:z},body:V,...X,headers:N([{"anthropic-beta":[...Q??[],"agent-memory-2026-07-22"].toString()},X?.headers])})}list(Z,$={},X){let{betas:J,...z}=$??{};return this._client.getAPIList(W`/v1/memory_stores/${Z}/memories?beta=true`,L,{query:z,...X,headers:N([{"anthropic-beta":[...J??[],"agent-memory-2026-07-22"].toString()},X?.headers])})}delete(Z,$,X){let{memory_store_id:J,expected_content_sha256:z,betas:Q}=$;return this._client.delete(W`/v1/memory_stores/${J}/memories/${Z}?beta=true`,{query:{expected_content_sha256:z},...X,headers:N([{"anthropic-beta":[...Q??[],"agent-memory-2026-07-22"].toString()},X?.headers])})}}});var i8;var i1=C(()=>{E();D();R();I();i8=class i8 extends M{retrieve(Z,$,X){let{memory_store_id:J,betas:z,...Q}=$;return this._client.get(W`/v1/memory_stores/${J}/memory_versions/${Z}?beta=true`,{query:Q,...X,headers:N([{"anthropic-beta":[...z??[],"agent-memory-2026-07-22"].toString()},X?.headers])})}list(Z,$={},X){let{betas:J,...z}=$??{};return this._client.getAPIList(W`/v1/memory_stores/${Z}/memory_versions?beta=true`,L,{query:z,...X,headers:N([{"anthropic-beta":[...J??[],"agent-memory-2026-07-22"].toString()},X?.headers])})}redact(Z,$,X){let{memory_store_id:J,betas:z}=$;return this._client.post(W`/v1/memory_stores/${J}/memory_versions/${Z}/redact?beta=true`,{...X,headers:N([{"anthropic-beta":[...z??[],"agent-memory-2026-07-22"].toString()},X?.headers])})}}});var V0;var n1=C(()=>{E();l1();l1();i1();i1();D();R();I();V0=class V0 extends M{constructor(){super(...arguments);this.memories=new l8(this._client),this.memoryVersions=new i8(this._client)}create(Z,$){let{betas:X,...J}=Z;return this._client.post("/v1/memory_stores?beta=true",{body:J,...$,headers:N([{"anthropic-beta":[...X??[],"agent-memory-2026-07-22"].toString()},$?.headers])})}retrieve(Z,$={},X){let{betas:J}=$??{};return this._client.get(W`/v1/memory_stores/${Z}?beta=true`,{...X,headers:N([{"anthropic-beta":[...J??[],"agent-memory-2026-07-22"].toString()},X?.headers])})}update(Z,$,X){let{betas:J,...z}=$;return this._client.post(W`/v1/memory_stores/${Z}?beta=true`,{body:z,...X,headers:N([{"anthropic-beta":[...J??[],"agent-memory-2026-07-22"].toString()},X?.headers])})}list(Z={},$){let{betas:X,...J}=Z??{};return this._client.getAPIList("/v1/memory_stores?beta=true",L,{query:J,...$,headers:N([{"anthropic-beta":[...X??[],"agent-memory-2026-07-22"].toString()},$?.headers])})}delete(Z,$={},X){let{betas:J}=$??{};return this._client.delete(W`/v1/memory_stores/${Z}?beta=true`,{...X,headers:N([{"anthropic-beta":[...J??[],"agent-memory-2026-07-22"].toString()},X?.headers])})}archive(Z,$={},X){let{betas:J}=$??{};return this._client.post(W`/v1/memory_stores/${Z}/archive?beta=true`,{...X,headers:N([{"anthropic-beta":[...J??[],"agent-memory-2026-07-22"].toString()},X?.headers])})}};V0.Memories=l8;V0.MemoryVersions=i8});var h0=C(()=>{m()});var b0;var a1=C(()=>{m();M0();q1();b0=class b0{constructor(Z,$){this.iterator=Z,this.controller=$}async*decoder(){let Z=new mZ;for await(let $ of this.iterator)for(let X of Z.decode($))yield JSON.parse(X);for(let $ of Z.flush())yield JSON.parse($)}[Symbol.asyncIterator](){return this.decoder()}static fromResponse(Z,$){if(!Z.body){if($.abort(),typeof globalThis.navigator<"u"&&globalThis.navigator.product==="ReactNative")throw new H("The default react-native fetch implementation does not support streaming. Please use expo/fetch: https://docs.expo.dev/versions/latest/sdk/expo/#expofetch-api");throw new H("Attempted to iterate over a response with no body")}return new b0(U8(Z.body),$)}}});var n8;var r1=C(()=>{E();D();R();a1();h0();I();n8=class n8 extends M{create(Z,$){let{betas:X,user_profile_id:J,...z}=Z;return this._client.post("/v1/messages/batches?beta=true",{body:z,...$,headers:N([{"anthropic-beta":[...X??[],"message-batches-2024-09-24"].toString(),...J!=null?{"anthropic-user-profile-id":J}:void 0},$?.headers])})}retrieve(Z,$={},X){let{betas:J}=$??{};return this._client.get(W`/v1/messages/batches/${Z}?beta=true`,{...X,headers:N([{"anthropic-beta":[...J??[],"message-batches-2024-09-24"].toString()},X?.headers])})}list(Z={},$){let{betas:X,...J}=Z??{};return this._client.getAPIList("/v1/messages/batches?beta=true",t,{query:J,...$,headers:N([{"anthropic-beta":[...X??[],"message-batches-2024-09-24"].toString()},$?.headers])})}delete(Z,$={},X){let{betas:J}=$??{};return this._client.delete(W`/v1/messages/batches/${Z}?beta=true`,{...X,headers:N([{"anthropic-beta":[...J??[],"message-batches-2024-09-24"].toString()},X?.headers])})}cancel(Z,$={},X){let{betas:J}=$??{};return this._client.post(W`/v1/messages/batches/${Z}/cancel?beta=true`,{...X,headers:N([{"anthropic-beta":[...J??[],"message-batches-2024-09-24"].toString()},X?.headers])})}async results(Z,$={},X){let J=await this.retrieve(Z);if(!J.results_url)throw new H(`No batch \`results_url\`; Has it finished processing? ${J.processing_status} - ${J.id}`);let{betas:z}=$??{};return this._client.get(J.results_url,{...X,headers:N([{"anthropic-beta":[...z??[],"message-batches-2024-09-24"].toString(),Accept:"application/binary"},X?.headers]),stream:!0,__binaryResponse:!0})._thenUnwrap((Q,V)=>b0.fromResponse(V.response,V.controller))}}});var FX;var o1=C(()=>{FX={"claude-opus-4@20250514":8192,"anthropic.claude-opus-4-1-20250805-v1:0":8192,"claude-opus-4-1@20250805":8192}});function $7(Z){return Z?.output_format??Z?.output_config?.format}function t1(Z,$,X){let J=$7($);if(!$||!("parse"in(J??{})))return{...Z,content:Z.content.map((z)=>{if(z.type==="text"){let Q=Object.defineProperty({...z},"parsed_output",{value:null,enumerable:!1});return Object.defineProperty(Q,"parsed",{get(){return X.logger.warn("The `parsed` property on `text` blocks is deprecated, please use `parsed_output` instead."),null},enumerable:!1})}return z}),parsed_output:null};return s1(Z,$,X)}function s1(Z,$,X){let J=null,z=Z.content.map((Q)=>{if(Q.type==="text"){let V=s5($,Q.text);if(J===null)J=V;let K=Object.defineProperty({...Q},"parsed_output",{value:V,enumerable:!1});return Object.defineProperty(K,"parsed",{get(){return X.logger.warn("The `parsed` property on `text` blocks is deprecated, please use `parsed_output` instead."),V},enumerable:!1})}return Q});return{...Z,content:z,parsed_output:J}}function s5(Z,$){let X=$7(Z);if(X?.type!=="json_schema")return null;try{if("parse"in X)return X.parse($);return JSON.parse($)}catch(J){throw new H(`Failed to parse structured output: ${J}`)}}var e1=C(()=>{m()});var Z4=C(()=>{B8()});var e5=(Z)=>{let $=0,X=[];while($<Z.length){let J=Z[$];if(J==="\\"){$++;continue}if(J==="{"){X.push({type:"brace",value:"{"}),$++;continue}if(J==="}"){X.push({type:"brace",value:"}"}),$++;continue}if(J==="["){X.push({type:"paren",value:"["}),$++;continue}if(J==="]"){X.push({type:"paren",value:"]"}),$++;continue}if(J===":"){X.push({type:"separator",value:":"}),$++;continue}if(J===","){X.push({type:"delimiter",value:","}),$++;continue}if(J==='"'){let K="",G=!1;J=Z[++$];while(J!=='"'){if($===Z.length){G=!0;break}if(J==="\\"){if($++,$===Z.length){G=!0;break}K+=J+Z[$],J=Z[++$]}else K+=J,J=Z[++$]}if(J=Z[++$],!G)X.push({type:"string",value:K});continue}if(J&&/\s/.test(J)){$++;continue}let Q=/[0-9]/;if(J&&Q.test(J)||J==="-"||J==="."){let K="";if(J==="-")K+=J,J=Z[++$];while(J&&(Q.test(J)||J==="."||J==="e"||J==="E"||(J==="-"||J==="+")&&(K[K.length-1]==="e"||K[K.length-1]==="E")))K+=J,J=Z[++$];X.push({type:"number",value:K});continue}let V=/[a-z]/i;if(J&&V.test(J)){let K="";while(J&&V.test(J)){if($===Z.length)break;K+=J,J=Z[++$]}if(K=="true"||K=="false"||K==="null")X.push({type:"name",value:K});else{$++;continue}continue}$++}return X},g0=(Z)=>{if(Z.length===0)return Z;let $=Z[Z.length-1];switch($.type){case"separator":return Z=Z.slice(0,Z.length-1),g0(Z);break;case"number":let X=$.value[$.value.length-1];if(X==="."||X==="-"||X==="+"||X==="e"||X==="E")return Z=Z.slice(0,Z.length-1),g0(Z);case"string":let J=Z[Z.length-2];if(J?.type==="delimiter")return Z=Z.slice(0,Z.length-1),g0(Z);else if(J?.type==="brace"&&J.value==="{")return Z=Z.slice(0,Z.length-1),g0(Z);break;case"delimiter":return Z=Z.slice(0,Z.length-1),g0(Z);break}return Z},ZJ=(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},$J=(Z)=>{let $="";return Z.map((X)=>{switch(X.type){case"string":$+='"'+X.value+'"';break;default:$+=X.value;break}}),$},X7=(Z)=>JSON.parse($J(ZJ(g0(e5(Z)))));var J7=()=>{};function DX(Z,$){let X={};for(let Q of Object.keys(Z))if(Q!=="input")X[Q]=Z[Q];Object.defineProperty(X,iZ,{value:$,enumerable:!1,writable:!0});let J,z=!1;return Object.defineProperty(X,"input",{enumerable:!0,configurable:!0,get(){if(!z)J=$?X7($):{},z=!0;return J}}),X}var iZ="__json_buf";var $4=C(()=>{J7()});function K4(Z){return Z.type==="tool_use"||Z.type==="server_tool_use"||Z.type==="mcp_tool_use"}var zZ,nZ,_0,a8,RX,r8,o8,PX,t8,DZ,s8,IX,yX,N0,fX,kX,hX,e8,X4,z7,Z$,J4,z4,Y4,Y7,Q4,$$;var Q7=C(()=>{KZ();AZ();h0();gZ();XZ();Z4();e1();$4();$$=class $${constructor(Z,$){zZ.add(this),this.messages=[],this.receivedMessages=[],nZ.set(this,void 0),_0.set(this,null),this.controller=new AbortController,a8.set(this,void 0),RX.set(this,()=>{}),r8.set(this,()=>{}),o8.set(this,void 0),PX.set(this,()=>{}),t8.set(this,()=>{}),DZ.set(this,{}),s8.set(this,!1),IX.set(this,!1),yX.set(this,!1),N0.set(this,!1),fX.set(this,void 0),kX.set(this,void 0),hX.set(this,void 0),e8.set(this,void 0),Z$.set(this,(X)=>{if(q(this,IX,!0,"f"),qZ(X))X=new e;if(X instanceof e)return q(this,yX,!0,"f"),this._emit("abort",X);if(X instanceof H)return this._emit("error",X);if(X instanceof Error){let J=new H(X.message);return J.cause=X,this._emit("error",J)}return this._emit("error",new H(String(X)))}),q(this,a8,new Promise((X,J)=>{q(this,RX,X,"f"),q(this,r8,J,"f")}),"f"),q(this,o8,new Promise((X,J)=>{q(this,PX,X,"f"),q(this,t8,J,"f")}),"f"),Y(this,a8,"f").catch(()=>{}),Y(this,o8,"f").catch(()=>{}),q(this,_0,Z,"f"),q(this,e8,$?.logger??console,"f")}get response(){return Y(this,fX,"f")}get request_id(){return Y(this,kX,"f")}get workspace_id(){return Y(this,hX,"f")}async withResponse(){q(this,N0,!0,"f");let Z=await Y(this,a8,"f");if(!Z)throw Error("Could not resolve a `Response` object");return{data:this,response:Z,request_id:Z.headers.get("request-id"),workspace_id:Z.headers.get("anthropic-workspace-id")}}static fromReadableStream(Z){let $=new $$(null);return $._run(()=>$._fromReadableStream(Z)),$}static createMessage(Z,$,X,{logger:J}={}){let z=new $$($,{logger:J});for(let Q of $.messages)z._addMessageParam(Q);return q(z,_0,{...$,stream:!0},"f"),z._run(()=>z._createMessage(Z,{...$,stream:!0},{...X,headers:{...X?.headers,[XX]:"stream"}})),z}_run(Z){Z().then(()=>{this._emitFinal(),this._emit("end")},Y(this,Z$,"f"))}_addMessageParam(Z){this.messages.push(Z)}_addMessage(Z,$=!0){if(this.receivedMessages.push(Z),$)this._emit("message",Z)}async _createMessage(Z,$,X){let J=X?.signal,z;if(J){if(J.aborted)this.controller.abort();z=this.controller.abort.bind(this.controller),J.addEventListener("abort",z)}try{Y(this,zZ,"m",J4).call(this);let{response:Q,data:V}=await Z.create({...$,stream:!0},{...X,signal:this.controller.signal}).withResponse();this._connected(Q);for await(let K of V)Y(this,zZ,"m",z4).call(this,K);if(V.controller.signal?.aborted)throw new e;Y(this,zZ,"m",Y4).call(this)}finally{if(J&&z)J.removeEventListener("abort",z)}}_connected(Z){if(this.ended)return;q(this,fX,Z,"f"),q(this,kX,Z?.headers.get("request-id"),"f"),q(this,hX,Z?.headers.get("anthropic-workspace-id"),"f"),Y(this,RX,"f").call(this,Z),this._emit("connect")}get ended(){return Y(this,s8,"f")}get errored(){return Y(this,IX,"f")}get aborted(){return Y(this,yX,"f")}abort(){this.controller.abort()}on(Z,$){return(Y(this,DZ,"f")[Z]||(Y(this,DZ,"f")[Z]=[])).push({listener:$}),this}off(Z,$){let X=Y(this,DZ,"f")[Z];if(!X)return this;let J=X.findIndex((z)=>z.listener===$);if(J>=0)X.splice(J,1);return this}once(Z,$){return(Y(this,DZ,"f")[Z]||(Y(this,DZ,"f")[Z]=[])).push({listener:$,once:!0}),this}emitted(Z){return new Promise(($,X)=>{if(q(this,N0,!0,"f"),Z!=="error")this.once("error",X);this.once(Z,$)})}async done(){q(this,N0,!0,"f"),await Y(this,o8,"f")}get currentMessage(){return Y(this,nZ,"f")}async finalMessage(){return await this.done(),Y(this,zZ,"m",X4).call(this)}async finalText(){return await this.done(),Y(this,zZ,"m",z7).call(this)}_emit(Z,...$){if(Y(this,s8,"f"))return;if(Z==="end")q(this,s8,!0,"f"),Y(this,PX,"f").call(this);let X=Y(this,DZ,"f")[Z];if(X)Y(this,DZ,"f")[Z]=X.filter((J)=>!J.once),X.forEach(({listener:J})=>J(...$));if(Z==="abort"){let J=$[0];if(!Y(this,N0,"f")&&!X?.length)Promise.reject(J);Y(this,r8,"f").call(this,J),Y(this,t8,"f").call(this,J),this._emit("end");return}if(Z==="error"){let J=$[0];if(!Y(this,N0,"f")&&!X?.length)Promise.reject(J);Y(this,r8,"f").call(this,J),Y(this,t8,"f").call(this,J),this._emit("end")}}_emitFinal(){if(this.receivedMessages.at(-1))this._emit("finalMessage",Y(this,zZ,"m",X4).call(this))}async _fromReadableStream(Z,$){let X=$?.signal,J;if(X){if(X.aborted)this.controller.abort();J=this.controller.abort.bind(this.controller),X.addEventListener("abort",J)}try{Y(this,zZ,"m",J4).call(this),this._connected(null);let z=$Z.fromReadableStream(Z,this.controller);for await(let Q of z)Y(this,zZ,"m",z4).call(this,Q);if(z.controller.signal?.aborted)throw new e;Y(this,zZ,"m",Y4).call(this)}finally{if(X&&J)X.removeEventListener("abort",J)}}[(nZ=new WeakMap,_0=new WeakMap,a8=new WeakMap,RX=new WeakMap,r8=new WeakMap,o8=new WeakMap,PX=new WeakMap,t8=new WeakMap,DZ=new WeakMap,s8=new WeakMap,IX=new WeakMap,yX=new WeakMap,N0=new WeakMap,fX=new WeakMap,kX=new WeakMap,hX=new WeakMap,e8=new WeakMap,Z$=new WeakMap,zZ=new WeakSet,X4=function(){if(this.receivedMessages.length===0)throw new H("stream ended without producing a Message with role=assistant");return this.receivedMessages.at(-1)},z7=function(){if(this.receivedMessages.length===0)throw new H("stream ended without producing a Message with role=assistant");let $=this.receivedMessages.at(-1).content.filter((X)=>X.type==="text").map((X)=>X.text);if($.length===0)throw new H("stream ended without producing a content block with type=text");return $.join(" ")},J4=function(){if(this.ended)return;q(this,nZ,void 0,"f")},z4=function($){if(this.ended)return;let X=Y(this,zZ,"m",Y7).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(K4(J)&&Y(this,DZ,"f").inputJson?.length){let z;try{z=J.input}catch(Q){Y(this,Z$,"f").call(this,Y(this,zZ,"m",Q4).call(this,J,Q));break}this._emit("inputJson",$.delta.partial_json,z)}break}case"thinking_delta":{if(J.type==="thinking")this._emit("thinking",$.delta.thinking,J.thinking);break}case"signature_delta":{if(J.type==="thinking")this._emit("signature",J.signature);break}case"compaction_delta":{if(J.type==="compaction"&&J.content)this._emit("compaction",J.content);break}default:vZ($.delta)}break}case"message_stop":{this._addMessageParam(X),this._addMessage(t1(X,Y(this,_0,"f"),{logger:Y(this,e8,"f")}),!0);break}case"content_block_stop":{this._emit("contentBlock",X.content.at(-1));break}case"message_start":{q(this,nZ,X,"f");break}case"content_block_start":case"message_delta":break}},Y4=function(){if(this.ended)throw new H("stream has ended, this shouldn't happen");let $=Y(this,nZ,"f");if(!$)throw new H("request ended without sending any chunks");return q(this,nZ,void 0,"f"),t1($,Y(this,_0,"f"),{logger:Y(this,e8,"f")})},Y7=function($){let X=Y(this,nZ,"f");if($.type==="message_start"){if(X)throw new H(`Unexpected event order, got ${$.type} before receiving "message_stop"`);return $.message}if(!X)throw new H(`Unexpected event order, got ${$.type} before "message_start"`);switch($.type){case"message_stop":return X;case"message_delta":if(X.stop_reason=$.delta.stop_reason,X.stop_sequence=$.delta.stop_sequence,X.stop_details=$.delta.stop_details,X.usage.output_tokens=$.usage.output_tokens,$.delta.container!=null)X.container=$.delta.container;if($.context_management!=null)X.context_management=$.context_management;if($.input_transformations!=null)X.input_transformations=$.input_transformations;if($.usage.input_tokens!=null)X.usage.input_tokens=$.usage.input_tokens;if($.usage.cache_creation_input_tokens!=null)X.usage.cache_creation_input_tokens=$.usage.cache_creation_input_tokens;if($.usage.cache_read_input_tokens!=null)X.usage.cache_read_input_tokens=$.usage.cache_read_input_tokens;if($.usage.server_tool_use!=null)X.usage.server_tool_use=$.usage.server_tool_use;if($.usage.iterations!=null)X.usage.iterations=$.usage.iterations;if($.usage.fallback_credit!=null)X.usage.fallback_credit=$.usage.fallback_credit;if($.usage.output_tokens_details!=null)X.usage.output_tokens_details=$.usage.output_tokens_details;return X;case"content_block_start":if(X.content.push($.content_block),$.content_block.type==="fallback")X.model=$.content_block.to.model;return X;case"content_block_delta":{let J=X.content.at($.index);switch($.delta.type){case"text_delta":{if(J?.type==="text")X.content[$.index]={...J,text:(J.text||"")+$.delta.text};break}case"citations_delta":{if(J?.type==="text")X.content[$.index]={...J,citations:[...J.citations??[],$.delta.citation]};break}case"input_json_delta":{if(J&&K4(J)){let z=(J[iZ]||"")+$.delta.partial_json;X.content[$.index]=DX(J,z)}break}case"thinking_delta":{if(J?.type==="thinking")X.content[$.index]={...J,thinking:J.thinking+$.delta.thinking};break}case"signature_delta":{if(J?.type==="thinking")X.content[$.index]={...J,signature:$.delta.signature};break}case"compaction_delta":{if(J?.type==="compaction")X.content[$.index]={...J,content:(J.content||"")+$.delta.content,encrypted_content:$.delta.encrypted_content};break}default:vZ($.delta)}return X}case"content_block_stop":{let J=X.content.at($.index);if(J&&K4(J)&&iZ in J){let z;try{z=J.input}catch(Q){z={},Y(this,Z$,"f").call(this,Y(this,zZ,"m",Q4).call(this,J,Q))}Object.defineProperty(J,"input",{value:z,enumerable:!0,configurable:!0,writable:!0})}return X}}},Q4=function($,X){let J=$[iZ];return new H(`Unable to parse tool parameter JSON from model. Please retry your request or adjust your prompt. Error: ${X}. JSON: ${J}`)},Symbol.asyncIterator)](){let Z=[],$=[],X=!1;return this.on("streamEvent",(J)=>{let z=$.shift();if(z)z.resolve(J);else Z.push(J)}),this.on("end",()=>{X=!0;for(let J of $)J.resolve(void 0);$.length=0}),this.on("abort",(J)=>{X=!0;for(let z of $)z.reject(J);$.length=0}),this.on("error",(J)=>{X=!0;for(let z of $)z.reject(J);$.length=0}),{next:async()=>{if(!Z.length){if(X)return{value:void 0,done:!0};return new Promise((z,Q)=>$.push({resolve:z,reject:Q})).then((z)=>z?{value:z,done:!1}:{value:void 0,done:!0})}return{value:Z.shift(),done:!1}},return:async()=>{return this.abort(),{value:void 0,done:!0}}}}toReadableStream(){return new $Z(this[Symbol.asyncIterator].bind(this),this.controller).toReadableStream()}}});var K7=1e5,V7=`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 N7=()=>{};async function XJ(Z,$=Z.messages.at(-1),X){if(!$||$.role!=="assistant"||!$.content||typeof $.content==="string")return null;let J=$.content.filter((V)=>V.type==="tool_use");if(J.length===0)return null;let z=zJ(Z);return{role:"user",content:await Promise.all(J.map(async(V)=>{let K=Z.tools.find((G)=>("name"in G?G.name:("mcp_server_name"in G)?G.mcp_server_name:G.type)===V.name);if(!K||!("run"in K)||!z.has(V.name))return JJ(V);try{let G=V.input;if("parse"in K&&K.parse)G=K.parse(G);let w=await K.run(G,{toolUse:V,toolUseBlock:V,signal:X?.signal});return{type:"tool_result",tool_use_id:V.id,content:w}}catch(G){return{type:"tool_result",tool_use_id:V.id,content:G instanceof _Z?G.content:`Error: ${G instanceof Error?G.message:String(G)}`,is_error:!0}}}))}}function JJ(Z){return{type:"tool_result",tool_use_id:Z.id,content:`Error: Tool '${Z.name}' not found`,is_error:!0}}function zJ(Z){let $=new Set;for(let X of Z.tools)if("run"in X)$.add(X.name);for(let X of Z.messages){if(X.role!=="system"||typeof X.content==="string")continue;for(let J of X.content)YJ(J,$)}return $}function YJ(Z,$){switch(Z.type){case"tool_removal":case"tool_addition":QJ(Z,$);break}}function QJ(Z,$){let X=KJ(Z.tool);if(X===void 0)return;if(Z.type==="tool_removal")$.delete(X);else $.add(X)}function KJ(Z){switch(Z.type){case"tool_reference":return Z.name;default:return}}function VJ(Z){if(Z===null)return"stop";switch(Z){case"tool_use":return"run_tools";case"pause_turn":case"compaction":return"resume";case"end_turn":case"stop_sequence":case"max_tokens":case"model_context_window_exceeded":case"refusal":return"stop";default:return vZ(Z),"stop"}}var X$,v0,W0,d,YZ,GZ,hZ,aZ,J$,W7,V4,z$;var N4=C(()=>{KZ();Q8();m();R();N6();XZ();N7();AZ();z$=class z${constructor(Z,$,X){X$.add(this),this.client=Z,v0.set(this,!1),W0.set(this,!1),d.set(this,void 0),YZ.set(this,void 0),GZ.set(this,void 0),hZ.set(this,void 0),aZ.set(this,void 0),J$.set(this,0),q(this,d,{params:{...$,messages:structuredClone($.messages)}},"f");let J=E1($.tools,$.messages);if(q(this,YZ,{...X,headers:N([F8("BetaToolRunner"),J.length?{[E8]:J.join(", ")}:void 0,X?.headers])},"f"),q(this,aZ,lX(),"f"),$.compactionControl?.enabled)console.warn('Anthropic: The `compactionControl` parameter is deprecated and will be removed in a future version. Use server-side compaction instead by passing `edits: [{ type: "compact_20260112" }]` in the params passed to `toolRunner()`. See https://platform.claude.com/docs/en/build-with-claude/compaction')}async*[(v0=new WeakMap,W0=new WeakMap,d=new WeakMap,YZ=new WeakMap,GZ=new WeakMap,hZ=new WeakMap,aZ=new WeakMap,J$=new WeakMap,X$=new WeakSet,W7=async function(){let $=Y(this,d,"f").params.compactionControl;if(!$||!$.enabled)return!1;let X=0;if(Y(this,GZ,"f")!==void 0)try{let G=await Y(this,GZ,"f");X=G.usage.input_tokens+(G.usage.cache_creation_input_tokens??0)+(G.usage.cache_read_input_tokens??0)+G.usage.output_tokens}catch{return!1}let J=$.contextTokenThreshold??K7;if(X<J)return!1;let z=$.model??Y(this,d,"f").params.model,Q=$.summaryPrompt??V7,V=Y(this,d,"f").params.messages;if(V[V.length-1].role==="assistant"){let G=V[V.length-1];if(Array.isArray(G.content)){let w=G.content.filter((x)=>x.type!=="tool_use");if(w.length===0)V.pop();else G.content=w}}let K=await this.client.beta.messages.create({model:z,messages:[...V,{role:"user",content:[{type:"text",text:Q}]}],max_tokens:Y(this,d,"f").params.max_tokens},{signal:Y(this,YZ,"f").signal,headers:N([Y(this,YZ,"f").headers,F8("compaction")])});if(K.content[0]?.type!=="text")throw new H("Expected text response for compaction");return Y(this,d,"f").params.messages=[{role:"user",content:K.content}],!0},Symbol.asyncIterator)](){var Z;if(Y(this,v0,"f"))throw new H("Cannot iterate over a consumed stream");q(this,v0,!0,"f"),q(this,W0,!0,"f"),q(this,hZ,void 0,"f");try{while(!0){let $;try{if(Y(this,d,"f").params.max_iterations&&Y(this,J$,"f")>=Y(this,d,"f").params.max_iterations)break;q(this,W0,!1,"f"),q(this,hZ,void 0,"f"),q(this,J$,(Z=Y(this,J$,"f"),Z++,Z),"f"),q(this,GZ,void 0,"f");let{max_iterations:X,compactionControl:J,...z}=Y(this,d,"f").params;if(z.stream)$=this.client.beta.messages.stream({...z},Y(this,YZ,"f")),q(this,GZ,$.finalMessage(),"f"),Y(this,GZ,"f").catch(()=>{}),yield $;else q(this,GZ,this.client.beta.messages.create({...z,stream:!1},Y(this,YZ,"f")),"f"),yield Y(this,GZ,"f");if(!await Y(this,X$,"m",W7).call(this)){if(!Y(this,W0,"f")){let K=await Y(this,GZ,"f"),G=VJ(K.stop_reason);Y(this,d,"f").params.messages.push({role:K.role,content:K.content});let{container:w}=Y(this,d,"f").params;if(K.container){if(w==null)Y(this,d,"f").params.container=K.container.id;else if(typeof w==="object"&&w.id==null)Y(this,d,"f").params.container={...w,id:K.container.id}}if(G==="stop")break;if(G==="resume")continue}let V=await Y(this,X$,"m",V4).call(this,Y(this,d,"f").params.messages.at(-1));if(V)Y(this,d,"f").params.messages.push(V);else if(!Y(this,W0,"f"))break}}finally{if($)$.abort()}}if(!Y(this,GZ,"f"))throw new H("ToolRunner concluded without a message from the server");Y(this,aZ,"f").resolve(await Y(this,GZ,"f"))}catch($){throw q(this,v0,!1,"f"),Y(this,aZ,"f").promise.catch(()=>{}),Y(this,aZ,"f").reject($),q(this,aZ,lX(),"f"),$}}setMessagesParams(Z){if(typeof Z==="function")Y(this,d,"f").params=Z(Y(this,d,"f").params);else Y(this,d,"f").params=Z;q(this,W0,!0,"f"),q(this,hZ,void 0,"f")}setRequestOptions(Z){if(typeof Z==="function")q(this,YZ,Z(Y(this,YZ,"f")),"f");else q(this,YZ,{...Y(this,YZ,"f"),...Z},"f")}async generateToolResponse(Z=Y(this,YZ,"f").signal){let $=await Y(this,GZ,"f")??this.params.messages.at(-1);if(!$)return null;return Y(this,X$,"m",V4).call(this,$,Z)}done(){return Y(this,aZ,"f").promise}async runUntilDone(){if(!Y(this,v0,"f"))for await(let Z of this);return this.done()}get params(){return Y(this,d,"f").params}pushMessages(...Z){this.setMessagesParams(($)=>({...$,messages:[...$.messages,...Z]}))}then(Z,$){return this.runUntilDone().then(Z,$)}};V4=async function($,X=Y(this,YZ,"f").signal){if(Y(this,hZ,"f")!==void 0)return Y(this,hZ,"f");return q(this,hZ,XJ(Y(this,d,"f").params,$,{...Y(this,YZ,"f"),signal:X}),"f"),Y(this,hZ,"f")}});function G7(Z){if(!Z.output_format)return Z;if(Z.output_config?.format)throw new H("Both output_format and output_config.format were provided. Please use only output_config.format (output_format is deprecated).");let{output_format:$,...X}=Z;return{...X,output_config:{...Z.output_config,format:$}}}var U7,NJ,rZ;var W4=C(()=>{h0();r1();E();o1();R();AZ();e1();Q7();N4();Q8();r1();N4();Q8();U7={},NJ=["claude-mythos-preview","claude-opus-4-6"];rZ=class rZ extends M{constructor(){super(...arguments);this.batches=new n8(this._client)}create(Z,$){let X=G7(Z),{betas:J,user_profile_id:z,...Q}=X;if(Q.model in U7)console.warn(`The model '${Q.model}' is deprecated and will reach end-of-life on ${U7[Q.model]}
32
- Please migrate to a newer model. Visit https://docs.anthropic.com/en/docs/resources/model-deprecations for more information.`);if(NJ.includes(Q.model)&&Q.thinking&&Q.thinking.type==="enabled")console.warn(`Using Claude with ${Q.model} and 'thinking.type=enabled' is deprecated. Use 'thinking.type=adaptive' instead which results in better model performance in our testing: https://platform.claude.com/docs/en/build-with-claude/adaptive-thinking`);let V=$?.timeout??this._client._options.timeout;if(!Q.stream&&V==null){let G=FX[Q.model]??void 0;V=this._client.calculateNonstreamingTimeout(Q.max_tokens,G)}let K=JX(Q.tools,Q.messages);return this._client.post("/v1/messages?beta=true",{body:Q,timeout:V??600000,...$,headers:N([{...J?.toString()!=null?{"anthropic-beta":J?.toString()}:void 0,...z!=null?{"anthropic-user-profile-id":z}:void 0},K,$?.headers]),stream:X.stream??!1})}parse(Z,$){return $={...$,headers:N([{"anthropic-beta":[...Z.betas??[],"structured-outputs-2025-12-15"].toString()},$?.headers])},this.create(Z,$).then((X)=>s1(X,Z,{logger:this._client.logger??console}))}stream(Z,$){return $$.createMessage(this,Z,$)}countTokens(Z,$){let X=G7(Z),{betas:J,user_profile_id:z,...Q}=X;return this._client.post("/v1/messages/count_tokens?beta=true",{body:Q,...$,headers:N([{"anthropic-beta":[...J??[],"token-counting-2024-11-01"].toString(),...z!=null?{"anthropic-user-profile-id":z}:void 0},$?.headers])})}toolRunner(Z,$){return new z$(this._client,Z,$)}};rZ.Batches=n8;rZ.BetaToolRunner=z$;rZ.ToolError=_Z});var Y$;var U4=C(()=>{E();D();I();Y$=class Y$ extends M{retrieve(Z,$){return this._client.get(W`/v1/organizations/api_keys/${Z}?beta=true`,$)}update(Z,$,X){return this._client.post(W`/v1/organizations/api_keys/${Z}?beta=true`,{body:$,...X})}list(Z={},$){return this._client.getAPIList("/v1/organizations/api_keys?beta=true",t,{query:Z,...$})}}});var Q$;var G4=C(()=>{E();Q$=class Q$ extends M{retrieve(Z){return this._client.get("/v1/organizations/compliance_settings?beta=true",Z)}update(Z,$){return this._client.post("/v1/organizations/compliance_settings?beta=true",{body:Z,...$})}}});var K$;var O4=C(()=>{E();D();I();K$=class K$ extends M{create(Z,$){return this._client.post("/v1/organizations/external_keys?beta=true",{body:Z,...$})}retrieve(Z,$){return this._client.get(W`/v1/organizations/external_keys/${Z}?beta=true`,$)}update(Z,$,X){return this._client.post(W`/v1/organizations/external_keys/${Z}?beta=true`,{body:$,...X})}list(Z={},$){return this._client.getAPIList("/v1/organizations/external_keys?beta=true",L,{query:Z,...$})}delete(Z,$){return this._client.delete(W`/v1/organizations/external_keys/${Z}?beta=true`,$)}validate(Z,$){return this._client.post(W`/v1/organizations/external_keys/${Z}/validate?beta=true`,$)}}});var V$;var q4=C(()=>{E();D();I();V$=class V$ extends M{create(Z,$){return this._client.post("/v1/organizations/invites?beta=true",{body:Z,...$})}retrieve(Z,$){return this._client.get(W`/v1/organizations/invites/${Z}?beta=true`,$)}list(Z={},$){return this._client.getAPIList("/v1/organizations/invites?beta=true",t,{query:Z,...$})}delete(Z,$){return this._client.delete(W`/v1/organizations/invites/${Z}?beta=true`,$)}}});var N$;var w4=C(()=>{E();D();N$=class N$ extends M{list(Z={},$){return this._client.getAPIList("/v1/organizations/rate_limits?beta=true",L,{query:Z,...$})}}});var W$;var C4=C(()=>{E();D();I();W$=class W$ extends M{retrieve(Z,$){return this._client.get(W`/v1/organizations/users/${Z}?beta=true`,$)}update(Z,$,X){return this._client.post(W`/v1/organizations/users/${Z}?beta=true`,{body:$,...X})}list(Z={},$){return this._client.getAPIList("/v1/organizations/users?beta=true",t,{query:Z,...$})}remove(Z,$){return this._client.delete(W`/v1/organizations/users/${Z}?beta=true`,$)}}});var U$;var M4=C(()=>{E();D();R();I();U$=class U$ extends M{create(Z,$){let{betas:X,...J}=Z;return this._client.post("/v1/organizations/federation_issuers?beta=true",{body:J,...$,headers:N([{...X?.toString()!=null?{"anthropic-beta":X?.toString()}:void 0},$?.headers])})}retrieve(Z,$={},X){let{betas:J}=$??{};return this._client.get(W`/v1/organizations/federation_issuers/${Z}?beta=true`,{...X,headers:N([{...J?.toString()!=null?{"anthropic-beta":J?.toString()}:void 0},X?.headers])})}update(Z,$,X){let{betas:J,...z}=$;return this._client.post(W`/v1/organizations/federation_issuers/${Z}?beta=true`,{body:z,...X,headers:N([{...J?.toString()!=null?{"anthropic-beta":J?.toString()}:void 0},X?.headers])})}list(Z={},$){let{betas:X,...J}=Z??{};return this._client.getAPIList("/v1/organizations/federation_issuers?beta=true",L,{query:J,...$,headers:N([{...X?.toString()!=null?{"anthropic-beta":X?.toString()}:void 0},$?.headers])})}archive(Z,$={},X){let{betas:J}=$??{};return this._client.post(W`/v1/organizations/federation_issuers/${Z}/archive?beta=true`,{...X,headers:N([{...J?.toString()!=null?{"anthropic-beta":J?.toString()}:void 0},X?.headers])})}}});var G$;var B4=C(()=>{E();D();R();I();G$=class G$ extends M{list(Z,$={},X){let{betas:J,...z}=$??{};return this._client.getAPIList(W`/v1/organizations/federation_rules/${Z}/workspaces?beta=true`,L,{query:z,...X,headers:N([{...J?.toString()!=null?{"anthropic-beta":J?.toString()}:void 0},X?.headers])})}add(Z,$,X){let{betas:J,...z}=$;return this._client.post(W`/v1/organizations/federation_rules/${Z}/workspaces?beta=true`,{body:z,...X,headers:N([{...J?.toString()!=null?{"anthropic-beta":J?.toString()}:void 0},X?.headers])})}remove(Z,$,X){let{federation_rule_id:J,betas:z}=$;return this._client.delete(W`/v1/organizations/federation_rules/${J}/workspaces/${Z}?beta=true`,{...X,headers:N([{...z?.toString()!=null?{"anthropic-beta":z?.toString()}:void 0},X?.headers])})}}});var m0;var H4=C(()=>{E();B4();B4();D();R();I();m0=class m0 extends M{constructor(){super(...arguments);this.workspaces=new G$(this._client)}create(Z,$){let{betas:X,...J}=Z;return this._client.post("/v1/organizations/federation_rules?beta=true",{body:J,...$,headers:N([{...X?.toString()!=null?{"anthropic-beta":X?.toString()}:void 0},$?.headers])})}retrieve(Z,$={},X){let{betas:J}=$??{};return this._client.get(W`/v1/organizations/federation_rules/${Z}?beta=true`,{...X,headers:N([{...J?.toString()!=null?{"anthropic-beta":J?.toString()}:void 0},X?.headers])})}update(Z,$,X){let{betas:J,...z}=$;return this._client.post(W`/v1/organizations/federation_rules/${Z}?beta=true`,{body:z,...X,headers:N([{...J?.toString()!=null?{"anthropic-beta":J?.toString()}:void 0},X?.headers])})}list(Z={},$){let{betas:X,...J}=Z??{};return this._client.getAPIList("/v1/organizations/federation_rules?beta=true",L,{query:J,...$,headers:N([{...X?.toString()!=null?{"anthropic-beta":X?.toString()}:void 0},$?.headers])})}archive(Z,$={},X){let{betas:J}=$??{};return this._client.post(W`/v1/organizations/federation_rules/${Z}/archive?beta=true`,{...X,headers:N([{...J?.toString()!=null?{"anthropic-beta":J?.toString()}:void 0},X?.headers])})}};m0.Workspaces=G$});var U0;var T4=C(()=>{E();M4();M4();H4();H4();U0=class U0 extends M{constructor(){super(...arguments);this.issuers=new U$(this._client),this.rules=new m0(this._client)}};U0.Issuers=U$;U0.Rules=m0});var O$;var x4=C(()=>{E();D();R();I();O$=class O$ extends M{list(Z,$={},X){let{betas:J,...z}=$??{};return this._client.getAPIList(W`/v1/organizations/service_accounts/${Z}/workspaces?beta=true`,L,{query:z,...X,headers:N([{...J?.toString()!=null?{"anthropic-beta":J?.toString()}:void 0},X?.headers])})}add(Z,$,X){let{betas:J,...z}=$;return this._client.post(W`/v1/organizations/service_accounts/${Z}/workspaces?beta=true`,{body:z,...X,headers:N([{...J?.toString()!=null?{"anthropic-beta":J?.toString()}:void 0},X?.headers])})}remove(Z,$,X){let{service_account_id:J,betas:z}=$;return this._client.delete(W`/v1/organizations/service_accounts/${J}/workspaces/${Z}?beta=true`,{...X,headers:N([{...z?.toString()!=null?{"anthropic-beta":z?.toString()}:void 0},X?.headers])})}}});var u0;var A4=C(()=>{E();x4();x4();D();R();I();u0=class u0 extends M{constructor(){super(...arguments);this.workspaces=new O$(this._client)}create(Z,$){let{betas:X,...J}=Z;return this._client.post("/v1/organizations/service_accounts?beta=true",{body:J,...$,headers:N([{...X?.toString()!=null?{"anthropic-beta":X?.toString()}:void 0},$?.headers])})}retrieve(Z,$={},X){let{betas:J}=$??{};return this._client.get(W`/v1/organizations/service_accounts/${Z}?beta=true`,{...X,headers:N([{...J?.toString()!=null?{"anthropic-beta":J?.toString()}:void 0},X?.headers])})}update(Z,$,X){let{betas:J,...z}=$;return this._client.post(W`/v1/organizations/service_accounts/${Z}?beta=true`,{body:z,...X,headers:N([{...J?.toString()!=null?{"anthropic-beta":J?.toString()}:void 0},X?.headers])})}list(Z={},$){let{betas:X,...J}=Z??{};return this._client.getAPIList("/v1/organizations/service_accounts?beta=true",L,{query:J,...$,headers:N([{...X?.toString()!=null?{"anthropic-beta":X?.toString()}:void 0},$?.headers])})}archive(Z,$={},X){let{betas:J}=$??{};return this._client.post(W`/v1/organizations/service_accounts/${Z}/archive?beta=true`,{...X,headers:N([{...J?.toString()!=null?{"anthropic-beta":J?.toString()}:void 0},X?.headers])})}};u0.Workspaces=O$});var q$;var L4=C(()=>{E();D();I();q$=class q$ extends M{retrieve(Z,$,X){let{workspace_id:J}=$;return this._client.get(W`/v1/organizations/workspaces/${J}/members/${Z}?beta=true`,X)}update(Z,$,X){let{workspace_id:J,...z}=$;return this._client.post(W`/v1/organizations/workspaces/${J}/members/${Z}?beta=true`,{body:z,...X})}list(Z,$={},X){return this._client.getAPIList(W`/v1/organizations/workspaces/${Z}/members?beta=true`,t,{query:$,...X})}add(Z,$,X){return this._client.post(W`/v1/organizations/workspaces/${Z}/members?beta=true`,{body:$,...X})}remove(Z,$,X){let{workspace_id:J}=$;return this._client.delete(W`/v1/organizations/workspaces/${J}/members/${Z}?beta=true`,X)}}});var w$;var S4=C(()=>{E();D();I();w$=class w$ extends M{list(Z,$={},X){return this._client.getAPIList(W`/v1/organizations/workspaces/${Z}/rate_limits?beta=true`,L,{query:$,...X})}}});var C$;var j4=C(()=>{E();D();R();I();C$=class C$ extends M{retrieve(Z,$,X){let{workspace_id:J,betas:z}=$;return this._client.get(W`/v1/organizations/workspaces/${J}/service_accounts/${Z}?beta=true`,{...X,headers:N([{...z?.toString()!=null?{"anthropic-beta":z?.toString()}:void 0},X?.headers])})}update(Z,$,X){let{workspace_id:J,betas:z,...Q}=$;return this._client.post(W`/v1/organizations/workspaces/${J}/service_accounts/${Z}?beta=true`,{body:Q,...X,headers:N([{...z?.toString()!=null?{"anthropic-beta":z?.toString()}:void 0},X?.headers])})}list(Z,$={},X){let{betas:J,...z}=$??{};return this._client.getAPIList(W`/v1/organizations/workspaces/${Z}/service_accounts?beta=true`,L,{query:z,...X,headers:N([{...J?.toString()!=null?{"anthropic-beta":J?.toString()}:void 0},X?.headers])})}add(Z,$,X){let{betas:J,...z}=$;return this._client.post(W`/v1/organizations/workspaces/${Z}/service_accounts?beta=true`,{body:z,...X,headers:N([{...J?.toString()!=null?{"anthropic-beta":J?.toString()}:void 0},X?.headers])})}remove(Z,$,X){let{workspace_id:J,betas:z}=$;return this._client.delete(W`/v1/organizations/workspaces/${J}/service_accounts/${Z}?beta=true`,{...X,headers:N([{...z?.toString()!=null?{"anthropic-beta":z?.toString()}:void 0},X?.headers])})}}});var oZ;var E4=C(()=>{E();L4();L4();S4();S4();j4();j4();D();R();I();oZ=class oZ extends M{constructor(){super(...arguments);this.rateLimits=new w$(this._client),this.members=new q$(this._client),this.serviceAccounts=new C$(this._client)}create(Z,$){let{betas:X,...J}=Z;return this._client.post("/v1/organizations/workspaces?beta=true",{body:J,...$,headers:N([{...X?.toString()!=null?{"anthropic-beta":X?.toString()}:void 0},$?.headers])})}retrieve(Z,$){return this._client.get(W`/v1/organizations/workspaces/${Z}?beta=true`,$)}update(Z,$,X){return this._client.post(W`/v1/organizations/workspaces/${Z}?beta=true`,{body:$,...X})}list(Z={},$){return this._client.getAPIList("/v1/organizations/workspaces?beta=true",t,{query:Z,...$})}archive(Z,$){return this._client.post(W`/v1/organizations/workspaces/${Z}/archive?beta=true`,$)}};oZ.RateLimits=w$;oZ.Members=q$;oZ.ServiceAccounts=C$});var QZ;var F4=C(()=>{E();U4();U4();G4();G4();O4();O4();q4();q4();w4();w4();C4();C4();T4();T4();A4();A4();E4();E4();QZ=class QZ extends M{constructor(){super(...arguments);this.apiKeys=new Y$(this._client),this.externalKeys=new K$(this._client),this.federation=new U0(this._client),this.invites=new V$(this._client),this.serviceAccounts=new u0(this._client),this.users=new W$(this._client),this.workspaces=new oZ(this._client),this.rateLimits=new N$(this._client),this.complianceSettings=new Q$(this._client)}retrieve(Z){return this._client.get("/v1/organizations/me?beta=true",Z)}};QZ.APIKeys=Y$;QZ.ExternalKeys=K$;QZ.Federation=U0;QZ.Invites=V$;QZ.ServiceAccounts=u0;QZ.Users=W$;QZ.Workspaces=oZ;QZ.RateLimits=N$;QZ.ComplianceSettings=Q$});var c0;var D4=C(()=>{E();D();R();I();jX();jX();c0=class c0 extends M{list(Z,$={},X){let{betas:J,...z}=$??{};return this._client.getAPIList(W`/v1/sessions/${Z}/events?beta=true`,L,{query:z,...X,headers:N([{"anthropic-beta":[...J??[],"managed-agents-2026-04-01"].toString()},X?.headers])})}send(Z,$,X){let{betas:J,...z}=$;return this._client.post(W`/v1/sessions/${Z}/events?beta=true`,{body:z,...X,headers:N([{"anthropic-beta":[...J??[],"managed-agents-2026-04-01"].toString()},X?.headers])})}stream(Z,$={},X){let{betas:J,...z}=$??{};return this._client.get(W`/v1/sessions/${Z}/events/stream?beta=true`,{query:z,...X,headers:N([{"anthropic-beta":[...J??[],"managed-agents-2026-04-01"].toString()},X?.headers]),stream:!0})}toolRunner(Z,$){return new Q0(Z,{...$,client:this._client})}};c0.SessionToolRunner=Q0});var M$;var R4=C(()=>{E();D();R();I();M$=class M$ extends M{retrieve(Z,$,X){let{session_id:J,betas:z}=$;return this._client.get(W`/v1/sessions/${J}/resources/${Z}?beta=true`,{...X,headers:N([{"anthropic-beta":[...z??[],"managed-agents-2026-04-01"].toString()},X?.headers])})}update(Z,$,X){let{session_id:J,betas:z,...Q}=$;return this._client.post(W`/v1/sessions/${J}/resources/${Z}?beta=true`,{body:Q,...X,headers:N([{"anthropic-beta":[...z??[],"managed-agents-2026-04-01"].toString()},X?.headers])})}list(Z,$={},X){let{betas:J,...z}=$??{};return this._client.getAPIList(W`/v1/sessions/${Z}/resources?beta=true`,L,{query:z,...X,headers:N([{"anthropic-beta":[...J??[],"managed-agents-2026-04-01"].toString()},X?.headers])})}delete(Z,$,X){let{session_id:J,betas:z}=$;return this._client.delete(W`/v1/sessions/${J}/resources/${Z}?beta=true`,{...X,headers:N([{"anthropic-beta":[...z??[],"managed-agents-2026-04-01"].toString()},X?.headers])})}add(Z,$,X){let{betas:J,...z}=$;return this._client.post(W`/v1/sessions/${Z}/resources?beta=true`,{body:z,...X,headers:N([{"anthropic-beta":[...J??[],"managed-agents-2026-04-01"].toString()},X?.headers])})}}});var B$;var P4=C(()=>{E();D();R();I();B$=class B$ extends M{list(Z,$,X){let{session_id:J,betas:z,...Q}=$;return this._client.getAPIList(W`/v1/sessions/${J}/threads/${Z}/events?beta=true`,L,{query:Q,...X,headers:N([{"anthropic-beta":[...z??[],"managed-agents-2026-04-01"].toString()},X?.headers])})}stream(Z,$,X){let{session_id:J,betas:z,...Q}=$;return this._client.get(W`/v1/sessions/${J}/threads/${Z}/stream?beta=true`,{query:Q,...X,headers:N([{"anthropic-beta":[...z??[],"managed-agents-2026-04-01"].toString()},X?.headers]),stream:!0})}}});var d0;var I4=C(()=>{E();P4();P4();D();R();I();d0=class d0 extends M{constructor(){super(...arguments);this.events=new B$(this._client)}retrieve(Z,$,X){let{session_id:J,betas:z}=$;return this._client.get(W`/v1/sessions/${J}/threads/${Z}?beta=true`,{...X,headers:N([{"anthropic-beta":[...z??[],"managed-agents-2026-04-01"].toString()},X?.headers])})}list(Z,$={},X){let{betas:J,...z}=$??{};return this._client.getAPIList(W`/v1/sessions/${Z}/threads?beta=true`,L,{query:z,...X,headers:N([{"anthropic-beta":[...J??[],"managed-agents-2026-04-01"].toString()},X?.headers])})}archive(Z,$,X){let{session_id:J,betas:z}=$;return this._client.post(W`/v1/sessions/${J}/threads/${Z}/archive?beta=true`,{...X,headers:N([{"anthropic-beta":[...z??[],"managed-agents-2026-04-01"].toString()},X?.headers])})}};d0.Events=B$});var tZ;var y4=C(()=>{E();D4();D4();R4();R4();I4();I4();D();R();I();tZ=class tZ extends M{constructor(){super(...arguments);this.events=new c0(this._client),this.resources=new M$(this._client),this.threads=new d0(this._client)}create(Z,$){let{betas:X,...J}=Z;return this._client.post("/v1/sessions?beta=true",{body:J,...$,headers:N([{"anthropic-beta":[...X??[],"managed-agents-2026-04-01"].toString()},$?.headers])})}retrieve(Z,$={},X){let{betas:J}=$??{};return this._client.get(W`/v1/sessions/${Z}?beta=true`,{...X,headers:N([{"anthropic-beta":[...J??[],"managed-agents-2026-04-01"].toString()},X?.headers])})}update(Z,$,X){let{betas:J,...z}=$;return this._client.post(W`/v1/sessions/${Z}?beta=true`,{body:z,...X,headers:N([{"anthropic-beta":[...J??[],"managed-agents-2026-04-01"].toString()},X?.headers])})}list(Z={},$){let{betas:X,...J}=Z??{};return this._client.getAPIList("/v1/sessions?beta=true",M1,{query:J,...$,headers:N([{"anthropic-beta":[...X??[],"managed-agents-2026-04-01"].toString()},$?.headers])})}delete(Z,$={},X){let{betas:J}=$??{};return this._client.delete(W`/v1/sessions/${Z}?beta=true`,{...X,headers:N([{"anthropic-beta":[...J??[],"managed-agents-2026-04-01"].toString()},X?.headers])})}archive(Z,$={},X){let{betas:J}=$??{};return this._client.post(W`/v1/sessions/${Z}/archive?beta=true`,{...X,headers:N([{"anthropic-beta":[...J??[],"managed-agents-2026-04-01"].toString()},X?.headers])})}};tZ.Events=c0;tZ.Resources=M$;tZ.Threads=d0});var H$;var f4=C(()=>{E();D();R();yZ();I();H$=class H$ extends M{create(Z,$,X){let{betas:J,...z}=$;return this._client.post(W`/v1/skills/${Z}/versions?beta=true`,CZ({body:z,...X,headers:N([{...J?.toString()!=null?{"anthropic-beta":J?.toString()}:void 0},X?.headers])},this._client,!1))}retrieve(Z,$,X){let{skill_id:J,betas:z}=$;return this._client.get(W`/v1/skills/${J}/versions/${Z}?beta=true`,{...X,headers:N([{...z?.toString()!=null?{"anthropic-beta":z?.toString()}:void 0},X?.headers])})}list(Z,$={},X){let{betas:J,...z}=$??{};return this._client.getAPIList(W`/v1/skills/${Z}/versions?beta=true`,L,{query:z,...X,headers:N([{...J?.toString()!=null?{"anthropic-beta":J?.toString()}:void 0},X?.headers])})}delete(Z,$,X){let{skill_id:J,betas:z}=$;return this._client.delete(W`/v1/skills/${J}/versions/${Z}?beta=true`,{...X,headers:N([{...z?.toString()!=null?{"anthropic-beta":z?.toString()}:void 0},X?.headers])})}download(Z,$,X){let{skill_id:J,betas:z}=$;return this._client.get(W`/v1/skills/${J}/versions/${Z}/content?beta=true`,{...X,headers:N([{Accept:"application/binary",...z?.toString()!=null?{"anthropic-beta":z?.toString()}:void 0},X?.headers]),__binaryResponse:!0})}}});var p0;var k4=C(()=>{E();f4();f4();D();R();yZ();I();p0=class p0 extends M{constructor(){super(...arguments);this.versions=new H$(this._client)}create(Z,$){let{betas:X,...J}=Z;return this._client.post("/v1/skills?beta=true",CZ({body:J,...$,headers:N([{...X?.toString()!=null?{"anthropic-beta":X?.toString()}:void 0},$?.headers])},this._client,!1))}retrieve(Z,$={},X){let{betas:J}=$??{};return this._client.get(W`/v1/skills/${Z}?beta=true`,{...X,headers:N([{...J?.toString()!=null?{"anthropic-beta":J?.toString()}:void 0},X?.headers])})}list(Z={},$){let{betas:X,...J}=Z??{};return this._client.getAPIList("/v1/skills?beta=true",L,{query:J,...$,headers:N([{...X?.toString()!=null?{"anthropic-beta":X?.toString()}:void 0},$?.headers])})}delete(Z,$={},X){let{betas:J}=$??{};return this._client.delete(W`/v1/skills/${Z}?beta=true`,{...X,headers:N([{...J?.toString()!=null?{"anthropic-beta":J?.toString()}:void 0},X?.headers])})}};p0.Versions=H$});var T$;var h4=C(()=>{E();D();R();I();T$=class T$ extends M{create(Z,$,X){let{betas:J,...z}=$;return this._client.post(W`/v1/tunnels/${Z}/certificates?beta=true`,{body:z,...X,headers:N([{"anthropic-beta":[...J??[],"mcp-tunnels-2026-06-22"].toString()},X?.headers])})}retrieve(Z,$,X){let{tunnel_id:J,betas:z}=$;return this._client.get(W`/v1/tunnels/${J}/certificates/${Z}?beta=true`,{...X,headers:N([{"anthropic-beta":[...z??[],"mcp-tunnels-2026-06-22"].toString()},X?.headers])})}list(Z,$={},X){let{betas:J,...z}=$??{};return this._client.getAPIList(W`/v1/tunnels/${Z}/certificates?beta=true`,L,{query:z,...X,headers:N([{"anthropic-beta":[...J??[],"mcp-tunnels-2026-06-22"].toString()},X?.headers])})}archive(Z,$,X){let{tunnel_id:J,betas:z}=$;return this._client.post(W`/v1/tunnels/${J}/certificates/${Z}/archive?beta=true`,{...X,headers:N([{"anthropic-beta":[...z??[],"mcp-tunnels-2026-06-22"].toString()},X?.headers])})}}});var l0;var b4=C(()=>{E();h4();h4();D();R();I();l0=class l0 extends M{constructor(){super(...arguments);this.certificates=new T$(this._client)}create(Z,$){let{betas:X,...J}=Z;return this._client.post("/v1/tunnels?beta=true",{body:J,...$,headers:N([{"anthropic-beta":[...X??[],"mcp-tunnels-2026-06-22"].toString()},$?.headers])})}retrieve(Z,$={},X){let{betas:J}=$??{};return this._client.get(W`/v1/tunnels/${Z}?beta=true`,{...X,headers:N([{"anthropic-beta":[...J??[],"mcp-tunnels-2026-06-22"].toString()},X?.headers])})}list(Z={},$){let{betas:X,...J}=Z??{};return this._client.getAPIList("/v1/tunnels?beta=true",L,{query:J,...$,headers:N([{"anthropic-beta":[...X??[],"mcp-tunnels-2026-06-22"].toString()},$?.headers])})}archive(Z,$={},X){let{betas:J}=$??{};return this._client.post(W`/v1/tunnels/${Z}/archive?beta=true`,{...X,headers:N([{"anthropic-beta":[...J??[],"mcp-tunnels-2026-06-22"].toString()},X?.headers])})}revealToken(Z,$={},X){let{betas:J}=$??{};return this._client.post(W`/v1/tunnels/${Z}/reveal_token?beta=true`,{...X,headers:N([{"anthropic-beta":[...J??[],"mcp-tunnels-2026-06-22"].toString()},X?.headers])})}rotateToken(Z,$,X){let{betas:J,...z}=$;return this._client.post(W`/v1/tunnels/${Z}/rotate_token?beta=true`,{body:z,...X,headers:N([{"anthropic-beta":[...J??[],"mcp-tunnels-2026-06-22"].toString()},X?.headers])})}};l0.Certificates=T$});var x$;var g4=C(()=>{E();D();R();I();x$=class x$ extends M{create(Z,$,X){let{betas:J,...z}=$;return this._client.post(W`/v1/vaults/${Z}/credentials?beta=true`,{body:z,...X,headers:N([{"anthropic-beta":[...J??[],"managed-agents-2026-04-01"].toString()},X?.headers])})}retrieve(Z,$,X){let{vault_id:J,betas:z}=$;return this._client.get(W`/v1/vaults/${J}/credentials/${Z}?beta=true`,{...X,headers:N([{"anthropic-beta":[...z??[],"managed-agents-2026-04-01"].toString()},X?.headers])})}update(Z,$,X){let{vault_id:J,betas:z,...Q}=$;return this._client.post(W`/v1/vaults/${J}/credentials/${Z}?beta=true`,{body:Q,...X,headers:N([{"anthropic-beta":[...z??[],"managed-agents-2026-04-01"].toString()},X?.headers])})}list(Z,$={},X){let{betas:J,...z}=$??{};return this._client.getAPIList(W`/v1/vaults/${Z}/credentials?beta=true`,L,{query:z,...X,headers:N([{"anthropic-beta":[...J??[],"managed-agents-2026-04-01"].toString()},X?.headers])})}delete(Z,$,X){let{vault_id:J,betas:z}=$;return this._client.delete(W`/v1/vaults/${J}/credentials/${Z}?beta=true`,{...X,headers:N([{"anthropic-beta":[...z??[],"managed-agents-2026-04-01"].toString()},X?.headers])})}archive(Z,$,X){let{vault_id:J,betas:z}=$;return this._client.post(W`/v1/vaults/${J}/credentials/${Z}/archive?beta=true`,{...X,headers:N([{"anthropic-beta":[...z??[],"managed-agents-2026-04-01"].toString()},X?.headers])})}mcpOAuthValidate(Z,$,X){let{vault_id:J,betas:z}=$;return this._client.post(W`/v1/vaults/${J}/credentials/${Z}/mcp_oauth_validate?beta=true`,{...X,headers:N([{"anthropic-beta":[...z??[],"managed-agents-2026-04-01"].toString()},X?.headers])})}}});var i0;var _4=C(()=>{E();g4();g4();D();R();I();i0=class i0 extends M{constructor(){super(...arguments);this.credentials=new x$(this._client)}create(Z,$){let{betas:X,...J}=Z;return this._client.post("/v1/vaults?beta=true",{body:J,...$,headers:N([{"anthropic-beta":[...X??[],"managed-agents-2026-04-01"].toString()},$?.headers])})}retrieve(Z,$={},X){let{betas:J}=$??{};return this._client.get(W`/v1/vaults/${Z}?beta=true`,{...X,headers:N([{"anthropic-beta":[...J??[],"managed-agents-2026-04-01"].toString()},X?.headers])})}update(Z,$,X){let{betas:J,...z}=$;return this._client.post(W`/v1/vaults/${Z}?beta=true`,{body:z,...X,headers:N([{"anthropic-beta":[...J??[],"managed-agents-2026-04-01"].toString()},X?.headers])})}list(Z={},$){let{betas:X,...J}=Z??{};return this._client.getAPIList("/v1/vaults?beta=true",L,{query:J,...$,headers:N([{"anthropic-beta":[...X??[],"managed-agents-2026-04-01"].toString()},$?.headers])})}delete(Z,$={},X){let{betas:J}=$??{};return this._client.delete(W`/v1/vaults/${Z}?beta=true`,{...X,headers:N([{"anthropic-beta":[...J??[],"managed-agents-2026-04-01"].toString()},X?.headers])})}archive(Z,$={},X){let{betas:J}=$??{};return this._client.post(W`/v1/vaults/${Z}/archive?beta=true`,{...X,headers:N([{"anthropic-beta":[...J??[],"managed-agents-2026-04-01"].toString()},X?.headers])})}};i0.Credentials=x$});var p;var v4=C(()=>{E();L1();L1();S1();S1();j1();j1();F1();F1();D1();D1();R1();R1();y1();y1();k1();k1();p1();p1();n1();n1();W4();W4();F4();F4();y4();y4();k4();k4();b4();b4();_4();_4();p=class p extends M{constructor(){super(...arguments);this.models=new R8(this._client),this.messages=new rZ(this._client),this.agents=new A0(this._client),this.environments=new k0(this._client),this.sessions=new tZ(this._client),this.deployments=new L8(this._client),this.deploymentRuns=new A8(this._client),this.vaults=new i0(this._client),this.memoryStores=new V0(this._client),this.files=new D8(this._client),this.skills=new p0(this._client),this.webhooks=new f8(this._client),this.userProfiles=new P8(this._client),this.dreams=new S8(this._client),this.tunnels=new l0(this._client),this.organization=new QZ(this._client)}};p.Models=R8;p.Messages=rZ;p.Agents=A0;p.Environments=k0;p.Sessions=tZ;p.Deployments=L8;p.DeploymentRuns=A8;p.Vaults=i0;p.MemoryStores=V0;p.Files=D8;p.Skills=p0;p.Webhooks=f8;p.UserProfiles=P8;p.Dreams=S8;p.Tunnels=l0;p.Organization=QZ});var n0;var m4=C(()=>{E();R();n0=class n0 extends M{create(Z,$){let{betas:X,...J}=Z;return this._client.post("/v1/complete",{body:J,timeout:this._client._options.timeout??600000,...$,headers:N([{...X?.toString()!=null?{"anthropic-beta":X?.toString()}:void 0},$?.headers]),stream:Z.stream??!1})}}});var a0;var u4=C(()=>{E();D();R();AZ();yZ();I();a0=class a0 extends M{list(Z={},$){return this._client.getAPIList("/v1/files",L,{query:Z,...$})}delete(Z,$){return this._client.delete(W`/v1/files/${Z}`,$)}download(Z,$){return this._client.get(W`/v1/files/${Z}/content`,{...$,headers:N([{Accept:"application/binary"},$?.headers]),__binaryResponse:!0})}retrieveMetadata(Z,$){return this._client.get(W`/v1/files/${Z}`,$)}upload(Z,$){return this._client.post("/v1/files",CZ({body:Z,...$,headers:N([zX(Z.file),$?.headers])},this._client))}}});function O7(Z){return Z?.output_config?.format}function c4(Z,$,X){let J=O7($);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 d4(Z,$,X)}function d4(Z,$,X){let J=null,z=Z.content.map((Q)=>{if(Q.type==="text"){let V=vJ($,Q.text);if(J===null)J=V;return Object.defineProperty({...Q},"parsed_output",{value:V,enumerable:!1})}return Q});return{...Z,content:z,parsed_output:J}}function vJ(Z,$){let X=O7(Z);if(X?.type!=="json_schema")return null;try{if("parse"in X)return X.parse($);return JSON.parse($)}catch(J){throw new H(`Failed to parse structured output: ${J}`)}}var p4=C(()=>{m()});function o4(Z){return Z.type==="tool_use"||Z.type==="server_tool_use"}var HZ,sZ,r0,A$,bX,L$,S$,gX,j$,RZ,E$,_X,vX,G0,mX,uX,cX,F$,l4,q7,i4,n4,a4,r4,w7,D$;var C7=C(()=>{KZ();AZ();gZ();XZ();h0();Z4();p4();$4();D$=class D${constructor(Z,$){HZ.add(this),this.messages=[],this.receivedMessages=[],sZ.set(this,void 0),r0.set(this,null),this.controller=new AbortController,A$.set(this,void 0),bX.set(this,()=>{}),L$.set(this,()=>{}),S$.set(this,void 0),gX.set(this,()=>{}),j$.set(this,()=>{}),RZ.set(this,{}),E$.set(this,!1),_X.set(this,!1),vX.set(this,!1),G0.set(this,!1),mX.set(this,void 0),uX.set(this,void 0),cX.set(this,void 0),F$.set(this,void 0),i4.set(this,(X)=>{if(q(this,_X,!0,"f"),qZ(X))X=new e;if(X instanceof e)return q(this,vX,!0,"f"),this._emit("abort",X);if(X instanceof H)return this._emit("error",X);if(X instanceof Error){let J=new H(X.message);return J.cause=X,this._emit("error",J)}return this._emit("error",new H(String(X)))}),q(this,A$,new Promise((X,J)=>{q(this,bX,X,"f"),q(this,L$,J,"f")}),"f"),q(this,S$,new Promise((X,J)=>{q(this,gX,X,"f"),q(this,j$,J,"f")}),"f"),Y(this,A$,"f").catch(()=>{}),Y(this,S$,"f").catch(()=>{}),q(this,r0,Z,"f"),q(this,F$,$?.logger??console,"f")}get response(){return Y(this,mX,"f")}get request_id(){return Y(this,uX,"f")}get workspace_id(){return Y(this,cX,"f")}async withResponse(){q(this,G0,!0,"f");let Z=await Y(this,A$,"f");if(!Z)throw Error("Could not resolve a `Response` object");return{data:this,response:Z,request_id:Z.headers.get("request-id"),workspace_id:Z.headers.get("anthropic-workspace-id")}}static fromReadableStream(Z){let $=new D$(null);return $._run(()=>$._fromReadableStream(Z)),$}static createMessage(Z,$,X,{logger:J}={}){let z=new D$($,{logger:J});for(let Q of $.messages)z._addMessageParam(Q);return q(z,r0,{...$,stream:!0},"f"),z._run(()=>z._createMessage(Z,{...$,stream:!0},{...X,headers:{...X?.headers,[XX]:"stream"}})),z}_run(Z){Z().then(()=>{this._emitFinal(),this._emit("end")},Y(this,i4,"f"))}_addMessageParam(Z){this.messages.push(Z)}_addMessage(Z,$=!0){if(this.receivedMessages.push(Z),$)this._emit("message",Z)}async _createMessage(Z,$,X){let J=X?.signal,z;if(J){if(J.aborted)this.controller.abort();z=this.controller.abort.bind(this.controller),J.addEventListener("abort",z)}try{Y(this,HZ,"m",n4).call(this);let{response:Q,data:V}=await Z.create({...$,stream:!0},{...X,signal:this.controller.signal}).withResponse();this._connected(Q);for await(let K of V)Y(this,HZ,"m",a4).call(this,K);if(V.controller.signal?.aborted)throw new e;Y(this,HZ,"m",r4).call(this)}finally{if(J&&z)J.removeEventListener("abort",z)}}_connected(Z){if(this.ended)return;q(this,mX,Z,"f"),q(this,uX,Z?.headers.get("request-id"),"f"),q(this,cX,Z?.headers.get("anthropic-workspace-id"),"f"),Y(this,bX,"f").call(this,Z),this._emit("connect")}get ended(){return Y(this,E$,"f")}get errored(){return Y(this,_X,"f")}get aborted(){return Y(this,vX,"f")}abort(){this.controller.abort()}on(Z,$){return(Y(this,RZ,"f")[Z]||(Y(this,RZ,"f")[Z]=[])).push({listener:$}),this}off(Z,$){let X=Y(this,RZ,"f")[Z];if(!X)return this;let J=X.findIndex((z)=>z.listener===$);if(J>=0)X.splice(J,1);return this}once(Z,$){return(Y(this,RZ,"f")[Z]||(Y(this,RZ,"f")[Z]=[])).push({listener:$,once:!0}),this}emitted(Z){return new Promise(($,X)=>{if(q(this,G0,!0,"f"),Z!=="error")this.once("error",X);this.once(Z,$)})}async done(){q(this,G0,!0,"f"),await Y(this,S$,"f")}get currentMessage(){return Y(this,sZ,"f")}async finalMessage(){return await this.done(),Y(this,HZ,"m",l4).call(this)}async finalText(){return await this.done(),Y(this,HZ,"m",q7).call(this)}_emit(Z,...$){if(Y(this,E$,"f"))return;if(Z==="end")q(this,E$,!0,"f"),Y(this,gX,"f").call(this);let X=Y(this,RZ,"f")[Z];if(X)Y(this,RZ,"f")[Z]=X.filter((J)=>!J.once),X.forEach(({listener:J})=>J(...$));if(Z==="abort"){let J=$[0];if(!Y(this,G0,"f")&&!X?.length)Promise.reject(J);Y(this,L$,"f").call(this,J),Y(this,j$,"f").call(this,J),this._emit("end");return}if(Z==="error"){let J=$[0];if(!Y(this,G0,"f")&&!X?.length)Promise.reject(J);Y(this,L$,"f").call(this,J),Y(this,j$,"f").call(this,J),this._emit("end")}}_emitFinal(){if(this.receivedMessages.at(-1))this._emit("finalMessage",Y(this,HZ,"m",l4).call(this))}async _fromReadableStream(Z,$){let X=$?.signal,J;if(X){if(X.aborted)this.controller.abort();J=this.controller.abort.bind(this.controller),X.addEventListener("abort",J)}try{Y(this,HZ,"m",n4).call(this),this._connected(null);let z=$Z.fromReadableStream(Z,this.controller);for await(let Q of z)Y(this,HZ,"m",a4).call(this,Q);if(z.controller.signal?.aborted)throw new e;Y(this,HZ,"m",r4).call(this)}finally{if(X&&J)X.removeEventListener("abort",J)}}[(sZ=new WeakMap,r0=new WeakMap,A$=new WeakMap,bX=new WeakMap,L$=new WeakMap,S$=new WeakMap,gX=new WeakMap,j$=new WeakMap,RZ=new WeakMap,E$=new WeakMap,_X=new WeakMap,vX=new WeakMap,G0=new WeakMap,mX=new WeakMap,uX=new WeakMap,cX=new WeakMap,F$=new WeakMap,i4=new WeakMap,HZ=new WeakSet,l4=function(){if(this.receivedMessages.length===0)throw new H("stream ended without producing a Message with role=assistant");return this.receivedMessages.at(-1)},q7=function(){if(this.receivedMessages.length===0)throw new H("stream ended without producing a Message with role=assistant");let $=this.receivedMessages.at(-1).content.filter((X)=>X.type==="text").map((X)=>X.text);if($.length===0)throw new H("stream ended without producing a content block with type=text");return $.join(" ")},n4=function(){if(this.ended)return;q(this,sZ,void 0,"f")},a4=function($){if(this.ended)return;let X=Y(this,HZ,"m",w7).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(o4(J)&&Y(this,RZ,"f").inputJson?.length)this._emit("inputJson",$.delta.partial_json,J.input);break}case"thinking_delta":{if(J.type==="thinking")this._emit("thinking",$.delta.thinking,J.thinking);break}case"signature_delta":{if(J.type==="thinking")this._emit("signature",J.signature);break}default:vZ($.delta)}break}case"message_stop":{this._addMessageParam(X),this._addMessage(c4(X,Y(this,r0,"f"),{logger:Y(this,F$,"f")}),!0);break}case"content_block_stop":{this._emit("contentBlock",X.content.at(-1));break}case"message_start":{q(this,sZ,X,"f");break}case"content_block_start":case"message_delta":break}},r4=function(){if(this.ended)throw new H("stream has ended, this shouldn't happen");let $=Y(this,sZ,"f");if(!$)throw new H("request ended without sending any chunks");return q(this,sZ,void 0,"f"),c4($,Y(this,r0,"f"),{logger:Y(this,F$,"f")})},w7=function($){let X=Y(this,sZ,"f");if($.type==="message_start"){if(X)throw new H(`Unexpected event order, got ${$.type} before receiving "message_stop"`);return $.message}if(!X)throw new H(`Unexpected event order, got ${$.type} before "message_start"`);switch($.type){case"message_stop":return X;case"message_delta":if(X.stop_reason=$.delta.stop_reason,X.stop_sequence=$.delta.stop_sequence,X.stop_details=$.delta.stop_details,X.usage.output_tokens=$.usage.output_tokens,$.delta.container!=null)X.container=$.delta.container;if($.usage.input_tokens!=null)X.usage.input_tokens=$.usage.input_tokens;if($.usage.cache_creation_input_tokens!=null)X.usage.cache_creation_input_tokens=$.usage.cache_creation_input_tokens;if($.usage.cache_read_input_tokens!=null)X.usage.cache_read_input_tokens=$.usage.cache_read_input_tokens;if($.usage.server_tool_use!=null)X.usage.server_tool_use=$.usage.server_tool_use;if($.usage.output_tokens_details!=null)X.usage.output_tokens_details=$.usage.output_tokens_details;return X;case"content_block_start":return X.content.push({...$.content_block}),X;case"content_block_delta":{let J=X.content.at($.index);switch($.delta.type){case"text_delta":{if(J?.type==="text")X.content[$.index]={...J,text:(J.text||"")+$.delta.text};break}case"citations_delta":{if(J?.type==="text")X.content[$.index]={...J,citations:[...J.citations??[],$.delta.citation]};break}case"input_json_delta":{if(J&&o4(J)){let z=(J[iZ]||"")+$.delta.partial_json;X.content[$.index]=DX(J,z)}break}case"thinking_delta":{if(J?.type==="thinking")X.content[$.index]={...J,thinking:J.thinking+$.delta.thinking};break}case"signature_delta":{if(J?.type==="thinking")X.content[$.index]={...J,signature:$.delta.signature};break}default:vZ($.delta)}return X}case"content_block_stop":{let J=X.content.at($.index);if(J&&o4(J)&&iZ in J)Object.defineProperty(J,"input",{value:J.input,enumerable:!0,configurable:!0,writable:!0});return X}}},Symbol.asyncIterator)](){let Z=[],$=[],X=!1;return this.on("streamEvent",(J)=>{let z=$.shift();if(z)z.resolve(J);else Z.push(J)}),this.on("end",()=>{X=!0;for(let J of $)J.resolve(void 0);$.length=0}),this.on("abort",(J)=>{X=!0;for(let z of $)z.reject(J);$.length=0}),this.on("error",(J)=>{X=!0;for(let z of $)z.reject(J);$.length=0}),{next:async()=>{if(!Z.length){if(X)return{value:void 0,done:!0};return new Promise((z,Q)=>$.push({resolve:z,reject:Q})).then((z)=>z?{value:z,done:!1}:{value:void 0,done:!0})}return{value:Z.shift(),done:!1}},return:async()=>{return this.abort(),{value:void 0,done:!0}}}}toReadableStream(){return new $Z(this[Symbol.asyncIterator].bind(this),this.controller).toReadableStream()}}});var R$;var t4=C(()=>{E();D();R();a1();h0();I();R$=class R$ extends M{create(Z,$){let{user_profile_id:X,...J}=Z;return this._client.post("/v1/messages/batches",{body:J,...$,headers:N([{...X!=null?{"anthropic-user-profile-id":X}:void 0},$?.headers])})}retrieve(Z,$){return this._client.get(W`/v1/messages/batches/${Z}`,$)}list(Z={},$){return this._client.getAPIList("/v1/messages/batches",t,{query:Z,...$})}delete(Z,$){return this._client.delete(W`/v1/messages/batches/${Z}`,$)}cancel(Z,$){return this._client.post(W`/v1/messages/batches/${Z}/cancel`,$)}async results(Z,$){let X=await this.retrieve(Z);if(!X.results_url)throw new H(`No batch \`results_url\`; Has it finished processing? ${X.processing_status} - ${X.id}`);return this._client.get(X.results_url,{...$,headers:N([{Accept:"application/binary"},$?.headers]),stream:!0,__binaryResponse:!0})._thenUnwrap((J,z)=>b0.fromResponse(z.response,z.controller))}}});var O0,M7,uJ;var s4=C(()=>{E();R();AZ();C7();p4();t4();t4();o1();O0=class O0 extends M{constructor(){super(...arguments);this.batches=new R$(this._client)}create(Z,$){let{user_profile_id:X,...J}=Z;if(J.model in M7)console.warn(`The model '${J.model}' is deprecated and will reach end-of-life on ${M7[J.model]}
33
- Please migrate to a newer model. Visit https://docs.anthropic.com/en/docs/resources/model-deprecations for more information.`);if(uJ.includes(J.model)&&J.thinking&&J.thinking.type==="enabled")console.warn(`Using Claude with ${J.model} and 'thinking.type=enabled' is deprecated. Use 'thinking.type=adaptive' instead which results in better model performance in our testing: https://platform.claude.com/docs/en/build-with-claude/adaptive-thinking`);let z=$?.timeout??this._client._options.timeout;if(!J.stream&&z==null){let V=FX[J.model]??void 0;z=this._client.calculateNonstreamingTimeout(J.max_tokens,V)}let Q=JX(J.tools,J.messages);return this._client.post("/v1/messages",{body:J,timeout:z??600000,...$,headers:N([{...X!=null?{"anthropic-user-profile-id":X}:void 0},Q,$?.headers]),stream:Z.stream??!1})}parse(Z,$){return this.create(Z,$).then((X)=>d4(X,Z,{logger:this._client.logger??console}))}stream(Z,$){return D$.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])})}};M7={},uJ=["claude-mythos-preview","claude-opus-4-6"];O0.Batches=R$});var o0;var e4=C(()=>{E();D();R();I();o0=class o0 extends M{retrieve(Z,$={},X){let{betas:J}=$??{};return this._client.get(W`/v1/models/${Z}`,{...X,headers:N([{...J?.toString()!=null?{"anthropic-beta":J?.toString()}:void 0},X?.headers])})}list(Z={},$){let{betas:X,...J}=Z??{};return this._client.getAPIList("/v1/models",t,{query:J,...$,headers:N([{...X?.toString()!=null?{"anthropic-beta":X?.toString()}:void 0},$?.headers])})}}});var P$;var Z6=C(()=>{E();D();yZ();I();P$=class P$ extends M{create(Z,$,X){return this._client.post(W`/v1/skills/${Z}/versions`,CZ({body:$,...X},this._client,!1))}retrieve(Z,$,X){let{skill_id:J}=$;return this._client.get(W`/v1/skills/${J}/versions/${Z}`,X)}list(Z,$={},X){return this._client.getAPIList(W`/v1/skills/${Z}/versions`,L,{query:$,...X})}delete(Z,$,X){let{skill_id:J}=$;return this._client.delete(W`/v1/skills/${J}/versions/${Z}`,X)}}});var q0;var $6=C(()=>{E();Z6();Z6();D();yZ();I();q0=class q0 extends M{constructor(){super(...arguments);this.versions=new P$(this._client)}create(Z,$){return this._client.post("/v1/skills",CZ({body:Z,...$},this._client,!1))}retrieve(Z,$){return this._client.get(W`/v1/skills/${Z}`,$)}list(Z={},$){return this._client.getAPIList("/v1/skills",L,{query:Z,...$})}delete(Z,$){return this._client.delete(W`/v1/skills/${Z}`,$)}};q0.Versions=P$});var B7=C(()=>{v4();m4();u4();s4();e4();$6();M9()});class l{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(X6.add(this),this._requestAuthFlags=new WeakMap,dX.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 Q={apiKey:$,authToken:X,webhookKey:J,...z,baseURL:Z||"https://api.anthropic.com"};if(!Q.dangerouslyAllowBrowser&&C6())throw new H(`It looks like you're running in a browser-like environment.
34
-
35
- This is disabled by default, as it risks exposing your secret API credentials to attackers.
36
- If you understand the risks and have appropriate mitigations in place,
37
- you can set the \`dangerouslyAllowBrowser\` option to \`true\`, e.g.,
38
-
39
- new Anthropic({ apiKey, dangerouslyAllowBrowser: true });
40
- `);this.baseURL=Q.baseURL,this._baseURLIsExplicit=z.__baseURLIsExplicit??!!Z,this.timeout=Q.timeout??J6.DEFAULT_TIMEOUT,this.logger=Q.logger??console,this.logLevel=C8,this.logLevel=l$(Q.logLevel,"ClientOptions.logLevel",k(this))??l$(f("ANTHROPIC_LOG"),"process.env['ANTHROPIC_LOG']",k(this))??C8,this.fetchOptions=Q.fetchOptions,this.maxRetries=Q.maxRetries??2,this.fetch=Q.fetch??T6(),q(this,dX,A6,"f"),this.middleware=[...Q.middleware??[]];let V=f("ANTHROPIC_CUSTOM_HEADERS");if(V){let G={};for(let w of V.split(`
41
- `)){let x=w.indexOf(":");if(x>=0)G[w.substring(0,x).trim()]=w.substring(x+1).trim()}Q.defaultHeaders={...G,...Q.defaultHeaders}}let K=z.__auth;if(delete Q.__auth,delete Q.__baseURLIsExplicit,this._options=Q,this.apiKey=typeof $==="string"?$:null,this.authToken=X,this.webhookKey=J,K){if(this._authState=K,!this._baseURLIsExplicit&&K.baseURL)this.baseURL=K.baseURL}else if(this._authState={provider:null,tokenCache:null,resolution:null,error:null,extraHeaders:{}},this.apiKey==null&&this.authToken==null){let G=Q.credentials??null;if(G)this._authState.provider=G,this._authState.tokenCache=this._makeTokenCache(G);else if(Q.config!=null){let w=O1(Q.config,this._credentialResolverOptions());this._authState.provider=w.provider,this._authState.tokenCache=this._makeTokenCache(w.provider),this._authState.extraHeaders=w.extraHeaders,this._applyCredentialBaseURL(w.baseURL)}else if(Q.profile!=null)this._authState.resolution=this._resolveDefaultCredentials(Q.profile);else if(this._shouldResolveDefaultCredentials())this._authState.resolution=this._resolveDefaultCredentials()}}_shouldResolveDefaultCredentials(){return!0}_applyCredentialBaseURL(Z){if(!Z)return;let $=Z.replace(/\/+$/,"");if(this._authState.baseURL=$,!this._baseURLIsExplicit)this.baseURL=$}_credentialResolverOptions(){return{baseURL:this.baseURL,fetch:this._credentialsFetch(),userAgent:this.getUserAgent(),onCacheWriteError:(Z)=>{k(this).debug("credential cache write failed (best-effort)",Z)},onSafetyWarning:(Z)=>{k(this).warn(Z)}}}_credentialsFetch(){return C1(this.fetch,this.middleware,void 0,this)}_makeTokenCache(Z){return new Q1(Z,($)=>{k(this).debug("advisory token refresh failed; serving cached token",$)})}withOptions(Z){let $="credentials"in Z||"config"in Z||"profile"in Z,X="apiKey"in Z||"authToken"in Z||$,J={...this._options,...this._baseURLIsExplicit?{baseURL:this.baseURL}:{},maxRetries:this.maxRetries,timeout:this.timeout,logger:this.logger,logLevel:this.logLevel,fetch:this.fetch,fetchOptions:this.fetchOptions,middleware:this.middleware,apiKey:this.apiKey,authToken:this.authToken,webhookKey:this.webhookKey,credentials:this.credentials,...$?{credentials:void 0,config:void 0,profile:void 0}:{},...Z,__auth:X?void 0:this._authState,__baseURLIsExplicit:"baseURL"in Z?!0:this._baseURLIsExplicit};return new this.constructor(J)}async _resolveDefaultCredentials(Z){try{let $=await Y9(this._credentialResolverOptions(),Z);if($)this._authState.provider=$.provider,this._authState.tokenCache=this._makeTokenCache($.provider),this._authState.extraHeaders=$.extraHeaders,this._applyCredentialBaseURL($.baseURL);else if(Z!=null)throw new H(`Profile "${Z}" could not be resolved (no <config_dir>/configs/${Z}.json found).`)}catch($){this._authState.error=$}finally{this._authState.resolution=null}}defaultQuery(){return this._options.defaultQuery}validateHeaders({values:Z,nulls:$}){if(Z.get("x-api-key")||Z.get("authorization"))return;if(this._authState.error)throw this._authState.error;if(this._authState.tokenCache||this._authState.resolution)return;if(this.apiKey&&Z.get("x-api-key"))return;if($.has("x-api-key"))return;if(this.authToken&&Z.get("authorization"))return;if($.has("authorization"))return;throw Error('Could not resolve authentication method. Expected one of apiKey, authToken, credentials, config, or profile to be set. Or for one of the "X-Api-Key" or "Authorization" headers to be explicitly omitted')}_authFlags(Z){let $=this._requestAuthFlags.get(Z);if(!$)$={usedTokenCache:!1,didRefreshFor401:!1},this._requestAuthFlags.set(Z,$);return $}async authHeaders(Z){if(this._authState.resolution)await this._authState.resolution;if(this._authState.error)return;if(this._authState.tokenCache&&this.apiKey==null){let $=await this._authState.tokenCache.getToken();return this._authFlags(Z).usedTokenCache=!0,N([{Authorization:`Bearer ${$}`}])}return N([await this.apiKeyAuth(Z),await this.bearerAuth(Z)])}async apiKeyAuth(Z){if(this.apiKey==null)return;return N([{"X-Api-Key":this.apiKey}])}async bearerAuth(Z){if(this.authToken==null)return;return N([{Authorization:`Bearer ${this.authToken}`}])}stringifyQuery(Z){return f6(Z)}getUserAgent(){return`Anthropic/JS ${wZ}`}defaultIdempotencyKey(){return`stainless-node-retry-${w0()}`}makeStatusError(Z,$,X,J){return v.generate(Z,$,X,J)}buildURL(Z,$,X){let J=!Y(this,X6,"m",H7).call(this)&&X||this.baseURL,z=W6(Z)?new URL(Z):new URL(J+(J.endsWith("/")&&Z.startsWith("/")?Z.slice(1):Z)),Q=this.defaultQuery(),V=Object.fromEntries(z.searchParams);if(!nX(Q)||!nX(V))$={...V,...Q,...$};if(typeof $==="object"&&$&&!Array.isArray($))z.search=this.stringifyQuery($);return z.toString()}_calculateNonstreamingTimeout(Z){if(3600*Z/128000>600)throw new H("Streaming is required for operations that may take longer than 10 minutes. See https://github.com/anthropics/anthropic-sdk-typescript#streaming-responses for more details");return 600000}async prepareOptions(Z){}async prepareRequest(Z,{url:$,options:X}){if(this._authState.tokenCache&&this.apiKey==null){let J=Z.headers instanceof Headers?Z.headers:new Headers(Z.headers);for(let[Q,V]of Object.entries(this._authState.extraHeaders))if(!J.has(Q))J.set(Q,V);if(!J.get("anthropic-beta")?.split(",").map((Q)=>Q.trim())?.includes($0))J.append("anthropic-beta",$0);Z.headers=J}}backendMiddleware(){return[]}get(Z,$){return this.methodRequest("get",Z,$)}post(Z,$){return this.methodRequest("post",Z,$)}patch(Z,$){return this.methodRequest("patch",Z,$)}put(Z,$){return this.methodRequest("put",Z,$)}delete(Z,$){return this.methodRequest("delete",Z,$)}methodRequest(Z,$,X){return this.request(Promise.resolve(X).then((J)=>{return{method:Z,path:$,...J}}))}request(Z,$=null){return new X0(this,this.makeRequest(Z,$,void 0))}async makeRequest(Z,$,X){let J=await Z,z=J.maxRetries??this.maxRetries;if($==null)$=z,this._requestAuthFlags.delete(J);await this.prepareOptions(J);let{req:Q,url:V,timeout:K}=await this.buildRequest(J,{retryCount:z-$}),G="log_"+(Math.random()*16777216|0).toString(16).padStart(6,"0"),w=X===void 0?"":`, retryOf: ${X}`,x=Date.now();if(J.signal?.aborted)throw new e;let O=new AbortController,U=await this.fetchWithTimeout(V,Q,K,O,J,{requestLogID:G,retryOfRequestLogID:X}).catch(Z0),B=Date.now();if(U instanceof globalThis.Error){SZ(O);let S=`retrying, ${$} attempts remaining`;if(J.signal?.aborted)throw new e;let j=qZ(U)||/timed? ?out/i.test(String(U)+("cause"in U?String(U.cause):"")),A=this.middleware.length>0||!!J.middleware?.length||this.backendMiddleware().length>0;if(A&&!j&&!G9(U))throw k(this).info(`[${G}] middleware error (not retryable)`),k(this).debug(`[${G}] middleware error (not retryable)`,FZ({retryOfRequestLogID:X,url:V,durationMs:B-x,message:U.message})),U;if($)return k(this).info(`[${G}] connection ${j?"timed out":"failed"} - ${S}`),k(this).debug(`[${G}] connection ${j?"timed out":"failed"} (${S})`,FZ({retryOfRequestLogID:X,url:V,durationMs:B-x,message:U.message})),this.retryRequest(J,$,X??G);if(k(this).info(`[${G}] connection ${j?"timed out":"failed"} - error; no more retries left`),k(this).debug(`[${G}] connection ${j?"timed out":"failed"} (error; no more retries left)`,FZ({retryOfRequestLogID:X,url:V,durationMs:B-x,message:U.message})),j)throw new t0;if(A&&!w1(U))throw U;throw new PZ({cause:U})}let T=[...U.headers.entries()].filter(([S])=>S==="request-id"||S==="anthropic-workspace-id").map(([S,j])=>", "+S+": "+JSON.stringify(j)).join(""),P=`[${G}${w}${T}] ${Q.method} ${V} ${U.ok?"succeeded":"failed"} with status ${U.status} in ${B-x}ms`;if(!U.ok){let S=await this.shouldRetry(U,J);if($&&S){let g=`retrying, ${$} attempts remaining`;return await x6(U.body),SZ(O),k(this).info(`${P} - ${g}`),k(this).debug(`[${G}] response error (${g})`,FZ({retryOfRequestLogID:X,url:U.url,status:U.status,headers:U.headers,durationMs:B-x})),this.retryRequest(J,$,X??G,U.headers)}let j=S?"error; no more retries left":"error; not retryable";k(this).info(`${P} - ${j}`);let A=await U.text().catch((g)=>Z0(g).message),F=V8(A),y=F?void 0:A;throw k(this).debug(`[${G}] response error (${j})`,FZ({retryOfRequestLogID:X,url:U.url,status:U.status,headers:U.headers,message:y,durationMs:Date.now()-x})),SZ(O),this.makeStatusError(U.status,F,y,U.headers)}return k(this).info(P),k(this).debug(`[${G}] response start`,FZ({retryOfRequestLogID:X,url:U.url,status:U.status,headers:U.headers,durationMs:B-x})),H6(U.body??U,O),{response:U,options:J,controller:O,requestLogID:G,retryOfRequestLogID:X,startTime:x}}getAPIList(Z,$,X){return this.requestAPIList($,X&&"then"in X?X.then((J)=>({method:"get",path:Z,...J})):{method:"get",path:Z,...X})}requestAPIList(Z,$){let X=this.makeRequest($,null,void 0);return new s$(this,X,Z)}async fetchWithTimeout(Z,$,X,J,z,Q){let{signal:V,method:K,...G}=$||{},w=this._makeAbort(J);if(V)V.addEventListener("abort",w,{once:!0}),B6(J,V,w);let x=globalThis.ReadableStream&&G.body instanceof globalThis.ReadableStream||typeof G.body==="object"&&G.body!==null&&Symbol.asyncIterator in G.body,O={signal:J.signal,...x?{duplex:"half"}:{},method:"GET",...G};if(K)O.method=K.toUpperCase();let U=this.fetch,B=async(A,F)=>{let y=setTimeout(w,X);try{return await U.call(void 0,A,F)}finally{clearTimeout(y)}},T=z===void 0?B:async(A,F={})=>{let y=typeof A==="string"?A:A instanceof URL?A.href:A.url;if(F.headers=F.headers instanceof Headers?F.headers:new Headers(F.headers),await this.prepareRequest(F,{url:y,options:z}),Q)k(this).debug(`[${Q.requestLogID}] sending request`,FZ({retryOfRequestLogID:Q.retryOfRequestLogID,method:F.method,url:y,options:z,headers:F.headers}));return B(A,F)},P=z?.middleware,S=this.backendMiddleware(),j=P?.length||S.length?[...this.middleware,...P??[],...S]:this.middleware;return await C1(T,j,z,this)(Z,O)}async shouldRetry(Z,$){let X=this._authFlags($);if(Z.status===401&&this._authState.tokenCache&&X.usedTokenCache&&!X.didRefreshFor401)return X.didRefreshFor401=!0,this._authState.tokenCache.invalidate(),!0;let J=Z.headers.get("x-should-retry");if(J==="true")return!0;if(J==="false")return!1;if(Z.status===408)return!0;if(Z.status===409)return!0;if(Z.status===429)return!0;if(Z.status>=500)return!0;return!1}async retryRequest(Z,$,X,J){let z,Q=J?.get("retry-after-ms");if(Q){let K=parseFloat(Q);if(!Number.isNaN(K))z=K}let V=J?.get("retry-after");if(V&&!z){let K=parseFloat(V);if(!Number.isNaN(K))z=K*1000;else z=Date.parse(V)-Date.now()}if(z===void 0){let K=Z.maxRetries??this.maxRetries;z=this.calculateDefaultRetryTimeoutMillis($,K)}return await TZ(z),this.makeRequest(Z,$-1,X)}calculateDefaultRetryTimeoutMillis(Z,$){let z=$-Z,Q=Math.min(0.5*Math.pow(2,z),8),V=1-Math.random()*0.25;return Q*V*1000}calculateNonstreamingTimeout(Z,$){if(3600000*Z/128000>600000||$!=null&&Z>$)throw new H("Streaming is required for operations that may take longer than 10 minutes. See https://github.com/anthropics/anthropic-sdk-typescript#long-requests for more details");return 600000}async buildRequest(Z,{retryCount:$=0}={}){let X={...Z},{method:J,path:z,query:Q,defaultBaseURL:V}=X;if(this._authState.resolution)await this._authState.resolution;if(!this._baseURLIsExplicit&&this._authState.baseURL&&this.baseURL!==this._authState.baseURL)this.baseURL=this._authState.baseURL;let K=this.buildURL(z,Q,V);if("timeout"in X)G6("timeout",X.timeout);X.timeout=X.timeout??this.timeout;let{bodyHeaders:G,body:w}=this.buildBody({options:X}),x=await this.buildHeaders({options:Z,method:J,bodyHeaders:G,retryCount:$});return{req:{method:J,headers:x,...X.signal&&{signal:X.signal},...globalThis.ReadableStream&&w instanceof globalThis.ReadableStream&&{duplex:"half"},...w&&{body:w},...this.fetchOptions??{},...X.fetchOptions??{}},url:K,timeout:X.timeout}}async buildHeaders({options:Z,method:$,bodyHeaders:X,retryCount:J}){let z={};if(this.idempotencyHeader&&$!=="get"){if(!Z.idempotencyKey)Z.idempotencyKey=this.defaultIdempotencyKey();z[this.idempotencyHeader]=Z.idempotencyKey}let Q=N([z,{Accept:"application/json","User-Agent":this.getUserAgent(),"X-Stainless-Retry-Count":String(J),...Z.timeout?{"X-Stainless-Timeout":String(Math.trunc(Z.timeout/1000))}:{},...W8(),...this._options.dangerouslyAllowBrowser?{"anthropic-dangerous-direct-browser-access":"true"}:void 0,"anthropic-version":"2023-06-01"},await this.authHeaders(Z),this._options.defaultHeaders,X,Z.headers]);return this.validateHeaders(Q),Q.values}_makeAbort(Z){return()=>Z.abort()}buildBody({options:{body:Z,headers:$}}){if(!Z)return{bodyHeaders:void 0,body:void 0};let X=N([$]);if(ArrayBuffer.isView(Z)||Z instanceof ArrayBuffer||Z instanceof DataView||typeof Z==="string"&&X.values.has("content-type")||globalThis.Blob&&Z instanceof globalThis.Blob||Z instanceof FormData||Z instanceof URLSearchParams||globalThis.ReadableStream&&Z instanceof globalThis.ReadableStream)return{bodyHeaders:void 0,body:Z};else if(typeof Z==="object"&&((Symbol.asyncIterator in Z)||(Symbol.iterator in Z)&&("next"in Z)&&typeof Z.next==="function"))return{bodyHeaders:void 0,body:b$(Z)};else if(typeof Z==="object"&&X.values.get("content-type")==="application/x-www-form-urlencoded")return{bodyHeaders:{"content-type":"application/x-www-form-urlencoded"},body:this.stringifyQuery(Z)};else return Y(this,dX,"f").call(this,{body:Z,headers:X})}}var X6,J6,dX,H7,T7="\\n\\nHuman:",x7="\\n\\nAssistant:",bZ;var z6=C(()=>{KZ();y$();XZ();C0();gZ();f$();h$();M0();oX();z1();N8();m();H0();m6();Q9();O9();D();A1();B7();r$();m4();u4();e4();v4();s4();$6();f$();R();T0();IZ();XZ();J6=l,dX=new WeakMap,X6=new WeakSet,H7=function(){return this.baseURL!=="https://api.anthropic.com"};l.Anthropic=J6;l.HUMAN_PROMPT=T7;l.AI_PROMPT=x7;l.DEFAULT_TIMEOUT=600000;l.AnthropicError=H;l.APIError=v;l.APIConnectionError=PZ;l.APIConnectionTimeoutError=t0;l.APIUserAbortError=e;l.NotFoundError=$8;l.ConflictError=X8;l.RateLimitError=z8;l.BadRequestError=s0;l.AuthenticationError=e0;l.InternalServerError=Y8;l.PermissionDeniedError=Z8;l.UnprocessableEntityError=J8;l.toFile=e$;bZ=class bZ extends l{constructor(){super(...arguments);this.completions=new n0(this),this.messages=new O0(this),this.models=new o0(this),this.files=new a0(this),this.skills=new q0(this),this.beta=new p(this)}};bZ.Completions=n0;bZ.Messages=O0;bZ.Models=o0;bZ.Files=a0;bZ.Skills=q0;bZ.Beta=p});var A7=C(()=>{m();B8();gZ();R();AZ();XZ();oX()});var lJ=C(()=>{z6();A1();r$();A7();z6();D();m()});
42
- export{q as Dsa,Y as Esa,KZ as Fsa,H as Gsa,v as Hsa,e as Isa,PZ as Jsa,t0 as Ksa,e0 as Lsa,$8 as Msa,m as Nsa,x0 as Osa,O8 as Psa,q8 as Qsa,k as Rsa,IZ as Ssa,a6 as Tsa,fZ as Usa,h8 as Vsa,_Z as Wsa,Q8 as Xsa,tJ as Ysa,Q6 as Zsa,K6 as _sa,V6 as $sa,lX as ata,N6 as bta,h0 as cta,bZ as dta,lJ as eta};
@@ -1,2 +0,0 @@
1
- import{ci as SJ,di as YQ}from"./cli-1.1.28-p11zcjmv.mjs";import{Di as S,Ei as CJ}from"./cli-1.1.28-by5acg3a.mjs";import{Ar as h,Br as jJ,Dx as wJ,Eo as DJ,Ex as QQ,Fo as tJ,Go as LJ,Ho as eJ,Io as RJ,Jo as qQ,Kr as NJ,Nr as TJ,Pr as OJ,Py as Sq,Qy as _q,Ry as gJ,Tr as QJ,Vr as fq,Yr as MJ,Zr as ZJ,aH as FJ,bH as zQ,oy as bq,py as BJ,ry as ZQ,so as IJ,to as oJ,yr as xq}from"./cli-1.1.28-zhftjycn.mjs";import{lZ as AJ,mZ as lJ,pZ as PJ,qZ as aJ,yZ as VJ,zZ as JQ}from"./cli-1.1.28-n2jx5w3n.mjs";import{L1 as M,N1 as V,P1 as sq,Q1 as EJ,m0 as hJ,q2 as rJ}from"./cli-1.1.28-0njtm2nf.mjs";import{a5 as GJ,b5 as D,c5 as T,d5 as YJ}from"./cli-1.1.28-v5ypq0r2.mjs";import{e5 as sJ}from"./cli-1.1.28-yv5gzenz.mjs";import{$7 as Cq,M7 as uq,O7 as r,O9 as PQ,V6 as mq,W6 as WJ,Y6 as gq,Y7 as p,d8 as dJ,i7 as HJ,n7 as nJ,p8 as _J,t9 as kJ,u8 as AQ}from"./cli-1.1.28-ak2bzv1v.mjs";import{i_ as X,j_ as yJ}from"./cli-1.1.28-erqn7gwg.mjs";import{$ca as JJ,Wca as aq,Xca as tq,Yca as vq,Zca as eq,_ca as qJ,kda as cJ}from"./cli-1.1.28-5y1xeh89.mjs";import{Dka as UJ,Gka as pJ}from"./cli-1.1.28-knfg26kb.mjs";import{Rta as XJ,Vta as Dq}from"./cli-1.1.28-3fssr567.mjs";function rq(J){let q=J.messageActionsBackground;return q==="ansi:white"||q==="ansi:whiteBright"?J.inactive:q}function mJ(J){let q=J.userMessageBackground;return q==="ansi:white"||q==="ansi:whiteBright"?J.inactive:q}function Y(J,q,Q){if(q.startsWith("ansi:")){let z=q.slice(5),K=J;if(Q==="fg")return K[z]??J;let U=`bg${z[0].toUpperCase()}${z.slice(1)}`;return K[U]??J}if(q.startsWith("#"))return Q==="fg"?J.hex(q):J.bgHex(q);if(q.startsWith("ansi256(")){let z=parseInt(q.slice(8));return Q==="fg"?J.ansi256(z):J.bgAnsi256(z)}let Z=$J.exec(q);if(Z){let[z,K,U]=[+Z[1],+Z[2],+Z[3]];return Q==="fg"?J.rgb(z,K,U):J.bgRgb(z,K,U)}return J}function NQ(J,q,Q,Z,z){if(!S())return fJ(J,q,Q,Z,z);let{suggestion:K,messageActionsBackground:U}=z,H=U==="ansi:white"||U==="ansi:whiteBright"?z.inactive:U,G=z.inverseText,A=z.suggestion,L=Y(Y(X,K,"bg"),G,"fg").bold,I=Y(Y(X,K,"fg"),H,"bg"),P=Y(Y(X,H,"bg"),A,"fg"),R=Y(X,H,"fg"),w=Y(X,K,"fg"),j=L(` ${J} `);if(q){if(j+=I(F),j+=P(` ${hq} ${q}`),Q>0||Z>0){if(j+=P(" ("),Q>0)j+=Y(Y(X,H,"bg"),z.success,"fg")(`↑${Q}`);if(Q>0&&Z>0)j+=P(" ");if(Z>0)j+=Y(Y(X,H,"bg"),z.warning,"fg")(`↓${Z}`);j+=P(")")}j+=P(" "),j+=R(F)}else j+=w(F);return j}function TQ(J,q,Q){if(!S()){let H=Y(X,q.suggestion,"fg").bold;return`[ ${H(J)} ]`}let{suggestion:Z,inverseText:z}=q,K=Y(Y(X,Z,"bg"),z,"fg").bold,U=Q?Y(Y(X,Q,"bg"),Z,"fg"):Y(X,Z,"fg");return K(` ${J} `)+U(F)}function OQ(J,q,Q){if(!J)return"";if(!S()){let H=Y(X,q.suggestion,"fg").bold;return`[ ${H(J.trim())} ]`}let{suggestion:Z,inverseText:z}=q,K=Y(Y(X,Z,"bg"),z,"fg").bold,U=Q?Y(Y(X,Q,"bg"),Z,"fg"):Y(X,Z,"fg");return K(` ${J}`)+U(F)}function MQ(J,q,Q){if(!J)return"";if(!S())return`[ ${Y(X,q.suggestion,"fg")(J.trim())} ]`;let Z=rq(q),z=q.suggestion,K=Y(Y(X,Z,"bg"),z,"fg"),U=Q?Y(Y(X,Q,"bg"),Z,"fg"):Y(X,Z,"fg");return K(` ${J}`)+U(F)}function oq(J,q,Q){if(!J)return"";if(!S())return`[ ${J} ]`;let Z=Y(Y(X,q,"bg"),Q.inverseText,"fg").bold,z=Y(X,q,"fg");return Z(` ${J} `)+z(F)}function uJ(J,q,Q,Z){if(!S())return"";let z=J+q;if(z<=0)return"";let K=Math.round(J/z*kq);return Q(nq.repeat(K))+Z(nq.repeat(kq-K))}function wQ(J,q,Q=Number.POSITIVE_INFINITY){let Z=Y(X,q.success,"fg"),z=Y(X,q.error,"fg"),K=Y(X,q.inactive,"fg"),U=J.branch,H=U?{count:U,ref:U.base}:J.uncommitted?{count:J.uncommitted,ref:"HEAD"}:{count:J.session},{count:G,ref:A}=H;if(G.added<=0&&G.removed<=0)return null;let L=[],I=0;if(A)L.push(K(A)),I+=A.length;if(G.added>0){let w=`+${G.added}`;L.push(Z(w)),I+=w.length}if(G.removed>0){let w=`-${G.removed}`;L.push(z(w)),I+=w.length}let P=uJ(G.added,G.removed,Z,z);if(P)L.push(P),I+=kq;let R=I+L.length-1+4;if(R>Q)return null;return{text:`${K("[")} ${L.join(" ")} ${K("]")}`,width:R}}function BQ(J,q,Q,Z,z){if(!J)return"";if(!S()){let I=Y(X,Z.suggestion,"fg")(J);if(q>0||Q>0){if(I+=" (",q>0)I+=Y(X,Z.success,"fg")(`↑${q}`);if(q>0&&Q>0)I+=" ";if(Q>0)I+=Y(X,Z.warning,"fg")(`↓${Q}`);I+=")"}return`[ ${I} ]`}let K=rq(Z),U=Z.suggestion,H=Y(Y(X,K,"bg"),U,"fg"),G=z?Y(Y(X,z,"bg"),K,"fg"):Y(X,K,"fg"),A=H(` ${hq} ${J}`);if(q>0||Q>0){if(A+=H(" ("),q>0)A+=Y(Y(X,K,"bg"),Z.success,"fg")(`↑${q}`);if(q>0&&Q>0)A+=H(" ");if(Q>0)A+=Y(Y(X,K,"bg"),Z.warning,"fg")(`↓${Q}`);A+=H(")")}return A+=H(" "),A+=G(F),A}function dq(J,q){if(!q||!sq())return J;return`${Sq}${q}${_q}${J}${Sq}${_q}`}function FQ(J,q,Q,Z="PR",z){if(!S()){let L=q==="approved"?Q.success:q==="changes_requested"?Q.error:q==="pending"?Q.warning:q==="merged"?Q.merged:Q.inactive,I=dq(Y(X,L,"fg")(`#${J}`),z);return`[ ${Y(X,Q.inactive,"fg")(Z)} ${I} ]`}let K=mJ(Q),U=q==="approved"?Q.success:q==="changes_requested"?Q.error:q==="pending"?Q.warning:q==="merged"?Q.merged:Q.inactive,H=Y(Y(X,K,"bg"),Q.inactive,"fg"),G=Y(Y(X,K,"bg"),U,"fg"),A=Y(X,K,"fg");return H(` ${bJ} `)+dq(G(`#${J}`),z)+H(" ")+A(F)}function fJ(J,q,Q,Z,z){let K=Y(X,z.suggestion,"fg").bold,U=`[ ${K(J)} ]`;if(q){let G=Y(X,z.suggestion,"fg")(q);if(Q>0||Z>0){if(G+=" (",Q>0)G+=Y(X,z.success,"fg")(`↑${Q}`);if(Q>0&&Z>0)G+=" ";if(Z>0)G+=Y(X,z.warning,"fg")(`↓${Z}`);G+=")"}U+=` [ ${G} ]`}return U}var F="",hq="",bJ="",$J,kq=4,nq="■";var lq=Dq(()=>{yJ();EJ();gJ();CJ();$J=/^rgb\(\s?(\d+),\s?(\d+),\s?(\d+)\s?\)$/});function iJ(J,q){if(xq(J))return q.suggestion;switch(J){case"low":return q.inactive;case"medium":return q.warning;case"high":return q.claude;case"xhigh":return q.error;case"max":return q.merged;default:return q.error}}function xQ(J,q,Q){if(!h(q))return;let Z=QJ(q,J),z=iJ(Z,Q);return{pill:oq(`${yq(Z)} ${Z}`,z,Q),bg:z}}function yq(J){if(xq(J))return JJ;switch(J){case"low":return aq;case"medium":return tq;case"high":return vq;case"xhigh":return eq;case"max":return qJ;default:return vq}}var zJ=Dq(()=>{cJ();ZJ();lq()});function tQ(J){let q=cq.c(82),{initial:Q,sessionModel:Z,onSelect:z,onCancel:K,isStandaloneCommand:U,showFastModeNotice:H,headerText:G,skipSettingsWrite:A}=J,L=BJ(),I=PJ(),P=Q===null?n:Q,[R,w]=Lq.useState(P),j=bq(HQ),[_,vJ]=Lq.useState(!1),k=bq(WQ),o;if(q[0]!==k)o=k!==void 0?fq(k):void 0,q[0]=k,q[1]=o;else o=q[1];let[v,iq]=Lq.useState(o),Rq=j??!1,l;if(q[2]!==Rq)l=wJ(Rq),q[2]=Rq,q[3]=l;else l=q[3];let d=l,Vq;q:{if(Q!==null&&!d.some((W)=>{if(W.value===Q)return!0;if(W.value===null)return!1;try{return r(p(String(W.value)))===r(p(Q))}catch{return!1}})){let W;if(q[4]!==Q)W=Cq(Q),q[4]=Q,q[5]=W;else W=q[5];let N;if(q[6]!==Q||q[7]!==W)N={value:Q,label:W,description:"Current model"},q[6]=Q,q[7]=W,q[8]=N;else N=q[8];let x;if(q[9]!==d||q[10]!==N)x=[...d,N],q[9]=d,q[10]=N,q[11]=x;else x=q[11];Vq=x;break q}Vq=d}let jq=Vq,a;if(q[12]!==jq)a=jq.map(UQ),q[12]=jq,q[13]=a;else a=q[13];let O=a,t;if(q[14]!==P||q[15]!==O)t=O.find((W)=>{if(W.value===P)return!0;if(P===n||W.value===null)return!1;try{return r(p(String(W.value)))===r(p(String(P)))}catch{return!1}})?.value??O[0]?.value??void 0,q[14]=P,q[15]=O,q[16]=t;else t=q[16];let Nq=t,Tq=Math.min(10,O.length),e=0,qq;if(q[17]!==R||q[18]!==O)qq=O.find((W)=>W.value===R)?.label,q[17]=R,q[18]=O,q[19]=qq;else qq=q[19];let Jq=qq,B,Qq;if(q[20]!==R){let W=$q(R);B=W?h(W):!1,Qq=W?jJ(W):!1,q[20]=R,q[21]=B,q[22]=Qq}else B=q[21],Qq=q[22];let Zq=Qq,zq;if(q[23]!==R)zq=Eq(R),q[23]=R,q[24]=zq;else zq=q[24];let y=zq,s=v==="max"&&!Zq?"high":v,Yq;if(q[25]!==k||q[26]!==_)Yq=(W)=>{if(w(W),!_&&k===void 0)iq(Eq(W))},q[25]=k,q[26]=_,q[27]=Yq;else Yq=q[27];let Oq=Yq,Kq;if(q[28]!==y||q[29]!==B||q[30]!==Zq)Kq=(W)=>{if(!B)return;iq((N)=>GQ(N??y,W,Zq)),vJ(!0)},q[28]=y,q[29]=B,q[30]=Zq,q[31]=Kq;else Kq=q[31];let Xq=Kq,Uq;if(q[32]!==Xq)Uq={"modelPicker:decreaseEffort":()=>Xq("left"),"modelPicker:increaseEffort":()=>Xq("right")},q[32]=Xq,q[33]=Uq;else Uq=q[33];let Wq;if(q[34]===Symbol.for("react.memo_cache_sentinel"))Wq={context:"ModelPicker"},q[34]=Wq;else Wq=q[34];AJ(Uq,Wq);let Hq;if(q[35]!==v||q[36]!==_||q[37]!==z||q[38]!==L||q[39]!==A)Hq=function(N){if(UJ("",{effort:v}),!A){let Fq=OJ(v,Eq(N),TJ(),_);if(Fq!==void 0)NJ(Fq);L((xJ)=>({...xJ,effortValue:Fq}))}let x=$q(N),pq=_&&x&&h(x)?v:void 0;if(N===n){z(null,pq);return}z(N,pq)},q[35]=v,q[36]=_,q[37]=z,q[38]=L,q[39]=A,q[40]=Hq;else Hq=q[40];let Mq=Hq,Gq;if(q[41]===Symbol.for("react.memo_cache_sentinel"))Gq=D(V,{color:"remember",bold:!0,children:"Select model"}),q[41]=Gq;else Gq=q[41];let wq=G??"Switch between Claude models. Applies to this session and future Claudin sessions. For other/previous model names, specify with --model.",E;if(q[42]!==wq)E=D(V,{dimColor:!0,children:wq}),q[42]=wq,q[43]=E;else E=q[43];let g;if(q[44]!==Z)g=Z&&T(V,{dimColor:!0,children:["Currently using ",Cq(Z)," for this session (set by plan mode). Selecting a model will undo this."]}),q[44]=Z,q[45]=g;else g=q[45];let C;if(q[46]!==E||q[47]!==g)C=T(M,{marginBottom:1,flexDirection:"column",children:[Gq,E,g]}),q[46]=E,q[47]=g,q[48]=C;else C=q[48];let Bq=K??XQ,b;if(q[49]!==Oq||q[50]!==Mq||q[51]!==Nq||q[52]!==P||q[53]!==O||q[54]!==Bq||q[55]!==Tq)b=D(M,{flexDirection:"column",children:D(FJ,{defaultValue:P,defaultFocusValue:Nq,options:O,onChange:Mq,onFocus:Oq,onCancel:Bq,visibleOptionCount:Tq,favorites:KQ,searchPlaceholder:"Search models…",showOverflowCount:!0})}),q[49]=Oq,q[50]=Mq,q[51]=Nq,q[52]=P,q[53]=O,q[54]=Bq,q[55]=Tq,q[56]=b;else b=q[56];let $;if(q[57]!==e)$=e>0&&D(M,{paddingLeft:3,children:T(V,{dimColor:!0,children:["and ",e," more…"]})}),q[57]=e,q[58]=$;else $=q[58];let m;if(q[59]!==b||q[60]!==$)m=T(M,{flexDirection:"column",marginBottom:1,children:[b,$]}),q[59]=b,q[60]=$,q[61]=m;else m=q[61];let u;if(q[62]!==s||q[63]!==y||q[64]!==Jq||q[65]!==B)u=D(M,{marginBottom:1,flexDirection:"column",children:B?T(V,{dimColor:!0,children:[D(KJ,{effort:s})," ",IJ(s)," effort",s===y?" (default)":""," ",D(V,{color:"subtle",children:"← → to adjust"})]}):T(V,{color:"subtle",children:[D(KJ,{effort:void 0})," Effort not supported",Jq?` for ${Jq}`:""]})}),q[62]=s,q[63]=y,q[64]=Jq,q[65]=B,q[66]=u;else u=q[66];let f;if(q[67]!==H)f=mq()?H?D(M,{marginBottom:1,children:T(V,{dimColor:!0,children:["Fast mode is ",D(V,{bold:!0,children:"ON"})," and available with"," ",gq," only (/fast). Switching to other models turn off fast mode."]})}):WJ()&&!HJ()?D(M,{marginBottom:1,children:T(V,{dimColor:!0,children:["Use ",D(V,{bold:!0,children:"/fast"})," to turn on Fast mode (",gq," only)."]})}):null:null,q[67]=H,q[68]=f;else f=q[68];let c;if(q[69]!==C||q[70]!==m||q[71]!==u||q[72]!==f)c=T(M,{flexDirection:"column",children:[C,m,u,f]}),q[69]=C,q[70]=m,q[71]=u,q[72]=f,q[73]=c;else c=q[73];let i;if(q[74]!==I||q[75]!==U)i=U&&D(V,{dimColor:!0,italic:!0,children:I.pending?T(GJ,{children:["Press ",I.keyName," again to exit"]}):T(RJ,{children:[D(DJ,{shortcut:"Enter",action:"confirm"}),D(LJ,{action:"select:cancel",context:"Select",fallback:"Esc",description:"exit"})]})}),q[74]=I,q[75]=U,q[76]=i;else i=q[76];let Iq;if(q[77]!==c||q[78]!==i)Iq=T(M,{flexDirection:"column",children:[c,i]}),q[77]=c,q[78]=i,q[79]=Iq;else Iq=q[79];let Aq=Iq;if(!U)return Aq;let Pq;if(q[80]!==Aq)Pq=D(VJ,{color:"permission",children:Aq}),q[80]=Aq,q[81]=Pq;else Pq=q[81];return Pq}function XQ(){}function UQ(J){return{...J,value:J.value===null?n:J.value}}function WQ(J){return J.effortValue}function HQ(J){return mq()?J.fastMode:!1}function $q(J){if(!J)return;return J===n?uq():p(J)}function KJ(J){let q=cq.c(5),{effort:Q}=J,Z=Q?"claude":"subtle",z=Q??"low",K;if(q[0]!==z)K=yq(z),q[0]=z,q[1]=K;else K=q[1];let U;if(q[2]!==Z||q[3]!==K)U=D(V,{color:Z,children:K}),q[2]=Z,q[3]=K,q[4]=U;else U=q[4];return U}function GQ(J,q,Q){let Z=Q?["low","medium","high","max"]:["low","medium","high"],z=Z.indexOf(J),K=z!==-1?z:Z.indexOf("high");if(q==="right")return Z[(K+1)%Z.length];else return Z[(K-1+Z.length)%Z.length]}function Eq(J){let q=$q(J)??uq(),Q=MJ(q);return Q!==void 0?fq(Q):"high"}var cq,Lq,n="__NO_PREFERENCE__",KQ;var IQ=Dq(()=>{oJ();aJ();pJ();nJ();rJ();lJ();ZQ();ZJ();dJ();QQ();eJ();zQ();YQ();qQ();tJ();JQ();zJ();YJ();cq=XJ(hJ(),1),Lq=XJ(sJ(),1),KQ=SJ("model",(J)=>J===n?null:J)});function ZZ(J,q,Q){if(!kJ())return!1;if(q)return!0;if(J===null||!_J(J))return!1;let Z=J.toLowerCase().replace(/\[1m\]$/,"").trim(),z=Z==="opus"||Z.includes("opus-4-6")||Z.includes("opus-4-7"),K=Z==="sonnet"||Z.includes("sonnet-4-6");if(z&&Q)return!1;return z||K}var DQ=Dq(()=>{PQ();AQ()});
2
- export{rq as Nh,mJ as Oh,NQ as Ph,TQ as Qh,OQ as Rh,MQ as Sh,wQ as Th,BQ as Uh,FQ as Vh,lq as Wh,xQ as Xh,yq as Yh,zJ as Zh,tQ as _h,IQ as $h,ZZ as ai,DQ as bi};
@@ -1,2 +0,0 @@
1
- import{lh as j,nh as l}from"./cli-1.1.28-davs3ve8.mjs";import{rh as W,xh as i}from"./cli-1.1.28-mk8zwqb2.mjs";import{$O as M,CP as b,DP as o,Dz as V,EU as G,Fz as S,Px as U,QU as r,Qx as m,RU as R,SU as f,TU as F,UU as u,VU as t,Vv as _,aR as x,bP as n,bx as B,dE as L,eE as h,gw as $,gx as p,hw as D,iD as d,ix as N,jx as g,kR as s,mD as E,nD as C,ok as Z,pk as P,sj as Y,tj as A}from"./cli-1.1.28-zhftjycn.mjs";import{l$ as Q,r$ as k}from"./cli-1.1.28-rt0aect8.mjs";import{W$ as O,baa as I,xba as X,yba as v}from"./cli-1.1.28-5y1xeh89.mjs";import{Fra as K,csa as T,tra as J}from"./cli-1.1.28-wvj52k91.mjs";import{Vta as y,Wta as w}from"./cli-1.1.28-3fssr567.mjs";function Mq(H=new Set){let z=H.size>0;if(u.cache.clear?.(),F.cache.clear?.(),f.cache.clear?.(),Y.cache.clear?.(),W(),x(),!z)N();if(R(null),K(null),b(),_(),G("session_start"),V(),X.clear(),Z(),!z)B();if(Q(),M(),!z)U();J(H),O(),L(),$(),j(),E(),import("./utils-1.1.28-ztac8cf7.mjs").then(({clearWebFetchCache:q})=>q()),import("./ToolSearchTool-1.1.28-7w099741.mjs").then(({clearToolSearchDescriptionCache:q})=>q()),import("./loadAgentsDir-1.1.28-gvzkk593.mjs").then(({clearAgentDefinitionsCache:q})=>q()),import("./prompt-1.1.28-tj8v37yx.mjs").then(({clearPromptCache:q})=>q())}var c=y(()=>{T();s();A();t();i();p();m();g();P();o();D();l();h();d();n();r();k();I();v();S();C()});
2
- export{Mq as dh,c as eh};