@claudiolabs/claudin 0.5.13 → 0.6.0

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 (851) hide show
  1. package/bin/claudin +78 -20
  2. package/dist/chunks/AgentTool-0.6.0-8f3qtrj8.mjs +1 -0
  3. package/dist/chunks/App-0.6.0-9n7fg3v4.mjs +1 -0
  4. package/dist/chunks/ApproveApiKey-0.6.0-egkvq84f.mjs +1 -0
  5. package/dist/chunks/AssistantSessionChooser-0.6.0-30jea1bv.mjs +1 -0
  6. package/dist/chunks/AutoModeOptInDialog-0.6.0-3kcrm51e.mjs +1 -0
  7. package/dist/chunks/BypassPermissionsModeDialog-0.6.0-ynatyfe7.mjs +1 -0
  8. package/dist/chunks/ClaudeMdExternalIncludesDialog-0.6.0-bfvx8vyr.mjs +1 -0
  9. package/dist/chunks/ConsoleOAuthFlow-0.6.0-ta5bxsqc.mjs +1 -0
  10. package/dist/chunks/DiffDialog-0.6.0-cw7k3rhz.mjs +3 -0
  11. package/dist/chunks/Doctor-0.6.0-w85vn7cp.mjs +1 -0
  12. package/dist/chunks/Grove-0.6.0-8pzwxvxy.mjs +1 -0
  13. package/dist/chunks/ITermBackend-0.6.0-ccznb0th.mjs +1 -0
  14. package/dist/chunks/InvalidConfigDialog-0.6.0-0za8mmqc.mjs +1 -0
  15. package/dist/chunks/InvalidSettingsDialog-0.6.0-mvr8g3r7.mjs +1 -0
  16. package/dist/chunks/MigrationDialog-0.6.0-8r6844g6.mjs +1 -0
  17. package/dist/chunks/Onboarding-0.6.0-s775c4cr.mjs +1 -0
  18. package/dist/chunks/ProviderManager-0.6.0-xgf5m2wn.mjs +1 -0
  19. package/dist/chunks/REPL-0.6.0-z46m261k.mjs +1 -0
  20. package/dist/chunks/ResumeConversation-0.6.0-4njrwnw3.mjs +1 -0
  21. package/dist/chunks/SnapshotUpdateDialog-0.6.0-1aanznj9.mjs +1 -0
  22. package/dist/chunks/TeleportProgress-0.6.0-ddvkc0ya.mjs +1 -0
  23. package/dist/chunks/TeleportRepoMismatchDialog-0.6.0-r86b0jdg.mjs +1 -0
  24. package/dist/chunks/TeleportResumeWrapper-0.6.0-m20qbr0e.mjs +1 -0
  25. package/dist/chunks/TmuxBackend-0.6.0-qb88j55p.mjs +9 -0
  26. package/dist/chunks/ToolSearchTool-0.6.0-v8recgw0.mjs +1 -0
  27. package/dist/chunks/TrustDialog-0.6.0-tdfv8cqs.mjs +1 -0
  28. package/dist/chunks/activeProvider-0.6.0-ajzxc1d4.mjs +1 -0
  29. package/dist/chunks/add-dir-0.6.0-e8scpyaj.mjs +1 -0
  30. package/dist/chunks/agents-0.6.0-69xm47ft.mjs +3 -0
  31. package/dist/chunks/agents-0.6.0-8m3ze781.mjs +110 -0
  32. package/dist/chunks/api-0.6.0-3cymw2a4.mjs +1 -0
  33. package/dist/chunks/asciicast-0.6.0-mz8jmcqs.mjs +1 -0
  34. package/dist/chunks/assistant-0.6.0-qf4d0nt8.mjs +1 -0
  35. package/dist/chunks/auth-0.6.0-6j97pezz.mjs +1 -0
  36. package/dist/chunks/auth-0.6.0-hkthtnfk.mjs +1 -0
  37. package/dist/chunks/autoMode-0.6.0-82td4ejn.mjs +48 -0
  38. package/dist/chunks/autoUpdater-0.6.0-4rrgwmxf.mjs +1 -0
  39. package/dist/chunks/backgroundHousekeeping-0.6.0-j2hd827a.mjs +1 -0
  40. package/dist/chunks/branch-0.6.0-rnjgfgek.mjs +4 -0
  41. package/dist/chunks/bridgePointer-0.6.0-4pp7berq.mjs +1 -0
  42. package/dist/chunks/btw-0.6.0-9pm632qb.mjs +1 -0
  43. package/dist/chunks/buddy-0.6.0-zyreaya9.mjs +3 -0
  44. package/dist/chunks/cacache-0.6.0-mhcyz322.mjs +1 -0
  45. package/dist/chunks/cache-probe-0.6.0-2m2g30sy.mjs +21 -0
  46. package/dist/chunks/cacheStats-0.6.0-mzcbqxz0.mjs +4 -0
  47. package/dist/chunks/caches-0.6.0-x8ev20m0.mjs +1 -0
  48. package/dist/chunks/claudeDesktop-0.6.0-66prcdq2.mjs +1 -0
  49. package/dist/chunks/claudemd-0.6.0-t41nj06r.mjs +1 -0
  50. package/dist/chunks/clear-0.6.0-g494jnyj.mjs +1 -0
  51. package/dist/chunks/clearTerminal-0.6.0-3d2y2snk.mjs +1 -0
  52. package/dist/chunks/cli-0.6.0-0ck8d1xf.mjs +3 -0
  53. package/dist/chunks/cli-0.6.0-0kx1hnqt.mjs +2 -0
  54. package/dist/chunks/cli-0.6.0-0p3mkd59.mjs +2 -0
  55. package/dist/chunks/cli-0.6.0-0yb835ch.mjs +2 -0
  56. package/dist/chunks/cli-0.6.0-1b6rqyjf.mjs +2 -0
  57. package/dist/chunks/cli-0.6.0-1bpa9gj3.mjs +2 -0
  58. package/dist/chunks/cli-0.6.0-1bzempk2.mjs +12 -0
  59. package/dist/chunks/cli-0.6.0-1cfghz45.mjs +20 -0
  60. package/dist/chunks/cli-0.6.0-1d77dayv.mjs +2 -0
  61. package/dist/chunks/cli-0.6.0-1hxw8522.mjs +2 -0
  62. package/dist/chunks/cli-0.6.0-1jem05z7.mjs +45 -0
  63. package/dist/chunks/cli-0.6.0-1zce7bz0.mjs +17 -0
  64. package/dist/chunks/cli-0.6.0-27pnyd8x.mjs +2 -0
  65. package/dist/chunks/cli-0.6.0-295jdx7b.mjs +2 -0
  66. package/dist/chunks/cli-0.6.0-2age3kgh.mjs +2 -0
  67. package/dist/chunks/cli-0.6.0-2bbdcxda.mjs +2 -0
  68. package/dist/chunks/cli-0.6.0-2c7skznf.mjs +2 -0
  69. package/dist/chunks/cli-0.6.0-2gsntzzv.mjs +2 -0
  70. package/dist/chunks/cli-0.6.0-2h139nq7.mjs +2 -0
  71. package/dist/chunks/cli-0.6.0-2hnyx7jy.mjs +2 -0
  72. package/dist/chunks/cli-0.6.0-2k2xxr4j.mjs +2 -0
  73. package/dist/chunks/cli-0.6.0-2kvggf16.mjs +2 -0
  74. package/dist/chunks/cli-0.6.0-2m8k6622.mjs +18 -0
  75. package/dist/chunks/cli-0.6.0-2m9w0jtx.mjs +2 -0
  76. package/dist/chunks/cli-0.6.0-2qtnp6rz.mjs +2 -0
  77. package/dist/chunks/cli-0.6.0-2z14r3n7.mjs +2 -0
  78. package/dist/chunks/cli-0.6.0-2ztxr2t5.mjs +2 -0
  79. package/dist/chunks/cli-0.6.0-32mypc03.mjs +4 -0
  80. package/dist/chunks/cli-0.6.0-363zfcx9.mjs +2 -0
  81. package/dist/chunks/cli-0.6.0-3jwfajtd.mjs +2 -0
  82. package/dist/chunks/cli-0.6.0-3kbabt72.mjs +2 -0
  83. package/dist/chunks/cli-0.6.0-3kxxj2zn.mjs +2 -0
  84. package/dist/chunks/cli-0.6.0-3m7j40bv.mjs +2 -0
  85. package/dist/chunks/cli-0.6.0-3ns7jd71.mjs +2 -0
  86. package/dist/chunks/cli-0.6.0-3qpvyrpf.mjs +16 -0
  87. package/dist/chunks/cli-0.6.0-3sdh6b3v.mjs +2 -0
  88. package/dist/chunks/cli-0.6.0-3wr1g3r3.mjs +2 -0
  89. package/dist/chunks/cli-0.6.0-4fzxnfth.mjs +2 -0
  90. package/dist/chunks/cli-0.6.0-4ks8fpx1.mjs +2 -0
  91. package/dist/chunks/cli-0.6.0-592v9jcz.mjs +2 -0
  92. package/dist/chunks/cli-0.6.0-59hncecf.mjs +17 -0
  93. package/dist/chunks/cli-0.6.0-5bjsew2k.mjs +2 -0
  94. package/dist/chunks/cli-0.6.0-5m6h57jc.mjs +18 -0
  95. package/dist/chunks/cli-0.6.0-5zykg2fc.mjs +2 -0
  96. package/dist/chunks/cli-0.6.0-60ma2ekn.mjs +2 -0
  97. package/dist/chunks/cli-0.6.0-60q6k4k3.mjs +3 -0
  98. package/dist/chunks/cli-0.6.0-6hak6gny.mjs +2 -0
  99. package/dist/chunks/cli-0.6.0-6tdctbcr.mjs +2 -0
  100. package/dist/chunks/cli-0.6.0-6w72esaf.mjs +3 -0
  101. package/dist/chunks/cli-0.6.0-76c1zq6n.mjs +2 -0
  102. package/dist/chunks/cli-0.6.0-7m760mbp.mjs +2 -0
  103. package/dist/chunks/cli-0.6.0-7qw68ehh.mjs +2 -0
  104. package/dist/chunks/cli-0.6.0-7qwx1xwm.mjs +2 -0
  105. package/dist/chunks/cli-0.6.0-7s0k6nw0.mjs +12 -0
  106. package/dist/chunks/cli-0.6.0-7shwamwq.mjs +4 -0
  107. package/dist/chunks/cli-0.6.0-855c2tef.mjs +2 -0
  108. package/dist/chunks/cli-0.6.0-8kh9rbvn.mjs +2 -0
  109. package/dist/chunks/cli-0.6.0-8meqksnp.mjs +9 -0
  110. package/dist/chunks/cli-0.6.0-8xf2xpy3.mjs +3 -0
  111. package/dist/chunks/cli-0.6.0-8zczwtyv.mjs +2 -0
  112. package/dist/chunks/cli-0.6.0-91exkfnc.mjs +2 -0
  113. package/dist/chunks/cli-0.6.0-97d3zsj0.mjs +2 -0
  114. package/dist/chunks/cli-0.6.0-9faq31pe.mjs +4 -0
  115. package/dist/chunks/cli-0.6.0-9gnppzfq.mjs +133 -0
  116. package/dist/chunks/cli-0.6.0-9qdj830c.mjs +4 -0
  117. package/dist/chunks/cli-0.6.0-9rq760gd.mjs +2 -0
  118. package/dist/chunks/cli-0.6.0-9rxskyst.mjs +5 -0
  119. package/dist/chunks/cli-0.6.0-9zx9qdaq.mjs +2 -0
  120. package/dist/chunks/cli-0.6.0-a21pffqx.mjs +2 -0
  121. package/dist/chunks/cli-0.6.0-a62vvs4t.mjs +2 -0
  122. package/dist/chunks/cli-0.6.0-a7h4zkhn.mjs +15 -0
  123. package/dist/chunks/cli-0.6.0-aqestr3c.mjs +193 -0
  124. package/dist/chunks/cli-0.6.0-awtw1t27.mjs +2 -0
  125. package/dist/chunks/cli-0.6.0-b6tgentw.mjs +2 -0
  126. package/dist/chunks/cli-0.6.0-bca4nx7y.mjs +4 -0
  127. package/dist/chunks/cli-0.6.0-bg7yq5wg.mjs +2 -0
  128. package/dist/chunks/cli-0.6.0-bjyadvf4.mjs +2 -0
  129. package/dist/chunks/cli-0.6.0-c1a6kyzf.mjs +2 -0
  130. package/dist/chunks/cli-0.6.0-c1hzx5ft.mjs +2 -0
  131. package/dist/chunks/cli-0.6.0-c6nqbf3d.mjs +3 -0
  132. package/dist/chunks/cli-0.6.0-caxz9dgf.mjs +2 -0
  133. package/dist/chunks/cli-0.6.0-d3wk9en8.mjs +2 -0
  134. package/dist/chunks/cli-0.6.0-d4v4gc51.mjs +2 -0
  135. package/dist/chunks/cli-0.6.0-da98vnek.mjs +3 -0
  136. package/dist/chunks/cli-0.6.0-db9z8rd6.mjs +2 -0
  137. package/dist/chunks/cli-0.6.0-djm9knfa.mjs +2 -0
  138. package/dist/chunks/cli-0.6.0-dsrnkn8r.mjs +2 -0
  139. package/dist/chunks/cli-0.6.0-dsykmkkh.mjs +2 -0
  140. package/dist/chunks/cli-0.6.0-dxwdyaw3.mjs +2 -0
  141. package/dist/chunks/cli-0.6.0-e05hymmk.mjs +2 -0
  142. package/dist/chunks/cli-0.6.0-e8a59m32.mjs +2 -0
  143. package/dist/chunks/cli-0.6.0-f7y1nm61.mjs +4 -0
  144. package/dist/chunks/cli-0.6.0-f8va1ddb.mjs +2 -0
  145. package/dist/chunks/cli-0.6.0-fdfhshmm.mjs +3 -0
  146. package/dist/chunks/cli-0.6.0-fg2kp9t9.mjs +2 -0
  147. package/dist/chunks/cli-0.6.0-fx65e0yv.mjs +2 -0
  148. package/dist/chunks/cli-0.6.0-fzxv7yps.mjs +2 -0
  149. package/dist/chunks/cli-0.6.0-g60zf7ra.mjs +2 -0
  150. package/dist/chunks/cli-0.6.0-g61jvwe5.mjs +2 -0
  151. package/dist/chunks/cli-0.6.0-g7exm24t.mjs +3 -0
  152. package/dist/chunks/cli-0.6.0-gaakjhm0.mjs +2 -0
  153. package/dist/chunks/cli-0.6.0-gassmthg.mjs +2 -0
  154. package/dist/chunks/cli-0.6.0-gec8yt9j.mjs +2 -0
  155. package/dist/chunks/cli-0.6.0-gjcmv34x.mjs +4 -0
  156. package/dist/chunks/cli-0.6.0-gw1zy408.mjs +2 -0
  157. package/dist/chunks/cli-0.6.0-h0z5ygw4.mjs +2 -0
  158. package/dist/chunks/cli-0.6.0-h88zf9sp.mjs +2 -0
  159. package/dist/chunks/cli-0.6.0-hchy51xn.mjs +15 -0
  160. package/dist/chunks/cli-0.6.0-hf8fw0bb.mjs +2 -0
  161. package/dist/chunks/cli-0.6.0-hms5fdyd.mjs +2 -0
  162. package/dist/chunks/cli-0.6.0-hraw3dez.mjs +2 -0
  163. package/dist/chunks/cli-0.6.0-hwes2c0w.mjs +6 -0
  164. package/dist/chunks/cli-0.6.0-hxhwjzmm.mjs +34 -0
  165. package/dist/chunks/cli-0.6.0-j4gvgd8r.mjs +7 -0
  166. package/dist/chunks/cli-0.6.0-j5r9tdmt.mjs +50 -0
  167. package/dist/chunks/cli-0.6.0-jb17xpd5.mjs +2 -0
  168. package/dist/chunks/cli-0.6.0-jfft7zdk.mjs +67 -0
  169. package/dist/chunks/cli-0.6.0-jpsf0t8a.mjs +9 -0
  170. package/dist/chunks/cli-0.6.0-js1fe4hv.mjs +2 -0
  171. package/dist/chunks/cli-0.6.0-k8qnaskd.mjs +8 -0
  172. package/dist/chunks/cli-0.6.0-kr9jt2p9.mjs +6 -0
  173. package/dist/chunks/cli-0.6.0-kvv5zw54.mjs +5 -0
  174. package/dist/chunks/cli-0.6.0-m47zataq.mjs +2 -0
  175. package/dist/chunks/cli-0.6.0-mkca0jw4.mjs +2 -0
  176. package/dist/chunks/cli-0.6.0-mmmmpmp3.mjs +2 -0
  177. package/dist/chunks/cli-0.6.0-mmp6g96h.mjs +2 -0
  178. package/dist/chunks/cli-0.6.0-mqdfskgd.mjs +2 -0
  179. package/dist/chunks/cli-0.6.0-mvv5jvw3.mjs +2 -0
  180. package/dist/chunks/cli-0.6.0-ndxtcmnz.mjs +2 -0
  181. package/dist/chunks/cli-0.6.0-npjb4qxf.mjs +3 -0
  182. package/dist/chunks/cli-0.6.0-npxj2hv4.mjs +2 -0
  183. package/dist/chunks/cli-0.6.0-nxpvznpz.mjs +4 -0
  184. package/dist/chunks/cli-0.6.0-nzqrvkwj.mjs +58 -0
  185. package/dist/chunks/cli-0.6.0-p3kytvrk.mjs +42 -0
  186. package/dist/chunks/cli-0.6.0-pbegwent.mjs +2 -0
  187. package/dist/chunks/cli-0.6.0-pk4x582t.mjs +2 -0
  188. package/dist/chunks/cli-0.6.0-pp6kfka3.mjs +2 -0
  189. package/dist/chunks/cli-0.6.0-pvkfx5f1.mjs +2 -0
  190. package/dist/chunks/cli-0.6.0-q63ry2jk.mjs +2 -0
  191. package/dist/chunks/cli-0.6.0-qnby905t.mjs +2 -0
  192. package/dist/chunks/cli-0.6.0-qzs04ar5.mjs +6 -0
  193. package/dist/chunks/cli-0.6.0-r3kd85yw.mjs +2 -0
  194. package/dist/chunks/cli-0.6.0-r5tyrw7e.mjs +59 -0
  195. package/dist/chunks/cli-0.6.0-r8g9yjbx.mjs +4 -0
  196. package/dist/chunks/cli-0.6.0-rrp10514.mjs +2 -0
  197. package/dist/chunks/cli-0.6.0-rvcpxnfv.mjs +2 -0
  198. package/dist/chunks/cli-0.6.0-rys3h8aw.mjs +2 -0
  199. package/dist/chunks/cli-0.6.0-rytp9dva.mjs +2 -0
  200. package/dist/chunks/cli-0.6.0-s2w74466.mjs +15 -0
  201. package/dist/chunks/cli-0.6.0-s36ckgp3.mjs +2 -0
  202. package/dist/chunks/cli-0.6.0-s4fa0ekw.mjs +2 -0
  203. package/dist/chunks/cli-0.6.0-s56fh7wm.mjs +2 -0
  204. package/dist/chunks/cli-0.6.0-s6hbyqbv.mjs +2 -0
  205. package/dist/chunks/cli-0.6.0-s7b70a0c.mjs +2 -0
  206. package/dist/chunks/cli-0.6.0-sa2mtczk.mjs +2 -0
  207. package/dist/chunks/cli-0.6.0-sd76f2sk.mjs +21 -0
  208. package/dist/chunks/cli-0.6.0-sh2rvpbt.mjs +2 -0
  209. package/dist/chunks/cli-0.6.0-ssdst17p.mjs +2 -0
  210. package/dist/chunks/cli-0.6.0-szxjcmcn.mjs +2 -0
  211. package/dist/chunks/cli-0.6.0-t2arqp0e.mjs +12 -0
  212. package/dist/chunks/cli-0.6.0-t91jvdfm.mjs +2 -0
  213. package/dist/chunks/cli-0.6.0-t93n2gev.mjs +3 -0
  214. package/dist/chunks/cli-0.6.0-tbe2ca49.mjs +3 -0
  215. package/dist/chunks/cli-0.6.0-tgc46p2a.mjs +2 -0
  216. package/dist/chunks/cli-0.6.0-tmwp0q7v.mjs +2 -0
  217. package/dist/chunks/cli-0.6.0-ttys4ffq.mjs +2 -0
  218. package/dist/chunks/cli-0.6.0-tz34279s.mjs +3 -0
  219. package/dist/chunks/cli-0.6.0-v56hqc26.mjs +25 -0
  220. package/dist/chunks/cli-0.6.0-v7kten40.mjs +2 -0
  221. package/dist/chunks/cli-0.6.0-v92kj5pr.mjs +2 -0
  222. package/dist/chunks/cli-0.6.0-vcvchaan.mjs +2 -0
  223. package/dist/chunks/cli-0.6.0-vj1q5vmq.mjs +5321 -0
  224. package/dist/chunks/cli-0.6.0-vrp1zbfc.mjs +4 -0
  225. package/dist/chunks/cli-0.6.0-vy5a76pk.mjs +18 -0
  226. package/dist/chunks/cli-0.6.0-vzmjmj1n.mjs +133 -0
  227. package/dist/chunks/cli-0.6.0-wcqzr1n7.mjs +10 -0
  228. package/dist/chunks/cli-0.6.0-wmt6ytdx.mjs +2 -0
  229. package/dist/chunks/cli-0.6.0-wnrwh53h.mjs +2 -0
  230. package/dist/chunks/cli-0.6.0-wz6en1nw.mjs +39 -0
  231. package/dist/chunks/cli-0.6.0-x7c5eyt4.mjs +2 -0
  232. package/dist/chunks/cli-0.6.0-xczg4s5m.mjs +2 -0
  233. package/dist/chunks/cli-0.6.0-xg7esvcf.mjs +2 -0
  234. package/dist/chunks/cli-0.6.0-xp74d7yz.mjs +1 -0
  235. package/dist/chunks/cli-0.6.0-xyv90m2s.mjs +2 -0
  236. package/dist/chunks/cli-0.6.0-xzvyqs4f.mjs +24 -0
  237. package/dist/chunks/cli-0.6.0-y4g2dppt.mjs +2 -0
  238. package/dist/chunks/cli-0.6.0-ycj7gxxz.mjs +2 -0
  239. package/dist/chunks/cli-0.6.0-yryz4xm4.mjs +2 -0
  240. package/dist/chunks/cli-0.6.0-zabvyppx.mjs +2 -0
  241. package/dist/chunks/cli-0.6.0-zngss8r1.mjs +2 -0
  242. package/dist/chunks/cli-0.6.0-zr99z1nr.mjs +5 -0
  243. package/dist/chunks/cli-0.6.0-zxckyy4s.mjs +2 -0
  244. package/dist/chunks/cli-0.6.0-zz1dfz4t.mjs +24 -0
  245. package/dist/chunks/client-0.6.0-djg9p1rh.mjs +1 -0
  246. package/dist/chunks/color-0.6.0-hpk7e2x9.mjs +1 -0
  247. package/dist/chunks/compact-0.6.0-gtvx4hy7.mjs +3 -0
  248. package/dist/chunks/config-0.6.0-f4jc8hpt.mjs +1 -0
  249. package/dist/chunks/config-0.6.0-jpx4jvj2.mjs +1 -0
  250. package/dist/chunks/constants-0.6.0-qe49df42.mjs +1 -0
  251. package/dist/chunks/context-0.6.0-t33461h9.mjs +1 -0
  252. package/dist/chunks/context-noninteractive-0.6.0-vh1s30rr.mjs +1 -0
  253. package/dist/chunks/conversation-0.6.0-apb71k2e.mjs +1 -0
  254. package/dist/chunks/copilotHeaders-0.6.0-2apz8tq4.mjs +1 -0
  255. package/dist/chunks/copy-0.6.0-yfzmdd0z.mjs +9 -0
  256. package/dist/chunks/cost-0.6.0-qrhnvqtm.mjs +1 -0
  257. package/dist/chunks/createSSHSession-0.6.0-2p1n5srr.mjs +1 -0
  258. package/dist/chunks/createSession-0.6.0-pcy6a299.mjs +1 -0
  259. package/dist/chunks/debug-0.6.0-39p8tt4j.mjs +1 -0
  260. package/dist/chunks/defaultActionDeps-0.6.0-8bzdvszj.mjs +1365 -0
  261. package/dist/chunks/desktop-0.6.0-vxzr6474.mjs +1 -0
  262. package/dist/chunks/detectRepository-0.6.0-wvjpx2rr.mjs +1 -0
  263. package/dist/chunks/detection-0.6.0-8thkktsw.mjs +1 -0
  264. package/dist/chunks/diff-0.6.0-g8kn9exw.mjs +1 -0
  265. package/dist/chunks/doctor-0.6.0-dxy0j0g4.mjs +1 -0
  266. package/dist/chunks/doctorDiagnostic-0.6.0-aa892edk.mjs +1 -0
  267. package/dist/chunks/earlyInput-0.6.0-gj3dyt0d.mjs +1 -0
  268. package/dist/chunks/effort-0.6.0-g5xfz2eg.mjs +10 -0
  269. package/dist/chunks/envUtils-0.6.0-tf4st484.mjs +1 -0
  270. package/dist/chunks/environmentSelection-0.6.0-r5ar2987.mjs +1 -0
  271. package/dist/chunks/environments-0.6.0-gec3hdz5.mjs +1 -0
  272. package/dist/chunks/errors-0.6.0-mf51mpgf.mjs +1 -0
  273. package/dist/chunks/exampleCommands-0.6.0-qg1e4vxh.mjs +1 -0
  274. package/dist/chunks/exit-0.6.0-xys34kqe.mjs +1 -0
  275. package/dist/chunks/export-0.6.0-135ccc8z.mjs +2 -0
  276. package/dist/chunks/extra-usage-0.6.0-aqn3jh3x.mjs +1 -0
  277. package/dist/chunks/extra-usage-noninteractive-0.6.0-yw91pfe0.mjs +1 -0
  278. package/dist/chunks/fast-0.6.0-gw4rymz7.mjs +1 -0
  279. package/dist/chunks/feedback-0.6.0-j898w96j.mjs +14 -0
  280. package/dist/chunks/firstPartyEventLogger-0.6.0-t26jt3ej.mjs +1 -0
  281. package/dist/chunks/git-0.6.0-1rjgfq8r.mjs +1 -0
  282. package/dist/chunks/githubModelsCredentials-0.6.0-ek8depe7.mjs +1 -0
  283. package/dist/chunks/goal-0.6.0-wdmxdemz.mjs +4 -0
  284. package/dist/chunks/grove-0.6.0-bge298jb.mjs +1 -0
  285. package/dist/chunks/growthbook-0.6.0-vkrtxrkt.mjs +1 -0
  286. package/dist/chunks/headless-0.6.0-kw28r6p5.mjs +2 -0
  287. package/dist/chunks/heapdump-0.6.0-5130r1vc.mjs +6 -0
  288. package/dist/chunks/help-0.6.0-krmgwd6p.mjs +1 -0
  289. package/dist/chunks/hookChains-0.6.0-esxa7jav.mjs +3 -0
  290. package/dist/chunks/hooks-0.6.0-652920vq.mjs +79 -0
  291. package/dist/chunks/hooks-0.6.0-tgtx7vah.mjs +1 -0
  292. package/dist/chunks/ide-0.6.0-j84km85e.mjs +3 -0
  293. package/dist/chunks/image-processor-napi-0.6.0-tyyms96b.mjs +1 -0
  294. package/dist/chunks/index-0.6.0-1c8mc7c5.mjs +1 -0
  295. package/dist/chunks/index-0.6.0-33tqx1q0.mjs +1 -0
  296. package/dist/chunks/index-0.6.0-4cjwvzjk.mjs +2 -0
  297. package/dist/chunks/index-0.6.0-8r6qtdvj.mjs +2 -0
  298. package/dist/chunks/index-0.6.0-9br46rw2.mjs +1 -0
  299. package/dist/chunks/index-0.6.0-apr64dfb.mjs +1 -0
  300. package/dist/chunks/index-0.6.0-e79va7fg.mjs +9 -0
  301. package/dist/chunks/index-0.6.0-f35c7dte.mjs +1 -0
  302. package/dist/chunks/index-0.6.0-fsb9nqdb.mjs +1 -0
  303. package/dist/chunks/index-0.6.0-gxd56xhn.mjs +1 -0
  304. package/dist/chunks/index-0.6.0-kbwkgp90.mjs +5 -0
  305. package/dist/chunks/index-0.6.0-mhvzn9h5.mjs +1 -0
  306. package/dist/chunks/index-0.6.0-mxm4er0h.mjs +1 -0
  307. package/dist/chunks/index-0.6.0-nny5a3rt.mjs +30 -0
  308. package/dist/chunks/index-0.6.0-nst006cq.mjs +17 -0
  309. package/dist/chunks/index-0.6.0-rv4pntam.mjs +1 -0
  310. package/dist/chunks/index-0.6.0-scwzrsg7.mjs +1 -0
  311. package/dist/chunks/index-0.6.0-w2djrw2s.mjs +9 -0
  312. package/dist/chunks/index-0.6.0-wb1ws1yr.mjs +1 -0
  313. package/dist/chunks/index-0.6.0-wjesenkh.mjs +1 -0
  314. package/dist/chunks/index-0.6.0-y9ppfz99.mjs +1 -0
  315. package/dist/chunks/index-0.6.0-zem7h5vp.mjs +1 -0
  316. package/dist/chunks/init-0.6.0-1770vy5g.mjs +1 -0
  317. package/dist/chunks/initReplBridge-0.6.0-z9198t8c.mjs +1 -0
  318. package/dist/chunks/ink-0.6.0-qwcph42h.mjs +1 -0
  319. package/dist/chunks/insights-0.6.0-cw0cadtm.mjs +870 -0
  320. package/dist/chunks/install-0.6.0-26gqe0fd.mjs +1 -0
  321. package/dist/chunks/install-github-app-0.6.0-afraccwz.mjs +149 -0
  322. package/dist/chunks/install-slack-app-0.6.0-ddv0a41d.mjs +1 -0
  323. package/dist/chunks/instrumentation-0.6.0-2rcak0p8.mjs +1 -0
  324. package/dist/chunks/interactiveHelpers-0.6.0-jxbk6fey.mjs +1 -0
  325. package/dist/chunks/keybindings-0.6.0-5ytp6650.mjs +2 -0
  326. package/dist/chunks/knowledge-0.6.0-ew766111.mjs +2 -0
  327. package/dist/chunks/latestVersionCache-0.6.0-yy47behr.mjs +1 -0
  328. package/dist/chunks/loadAgentsDir-0.6.0-80k2aj05.mjs +1 -0
  329. package/dist/chunks/loadPluginHooks-0.6.0-vhh7gzzn.mjs +1 -0
  330. package/dist/chunks/loadPluginHooks-0.6.0-ztp923sq.mjs +1 -0
  331. package/dist/chunks/log-0.6.0-9tz5q7ps.mjs +1 -0
  332. package/dist/chunks/main-0.6.0-rzx5483p.mjs +1 -0
  333. package/dist/chunks/managedEnv-0.6.0-vr46tva8.mjs +1 -0
  334. package/dist/chunks/mcp-0.6.0-0w7zg3p3.mjs +4 -0
  335. package/dist/chunks/mcp-0.6.0-6h57nk7y.mjs +1 -0
  336. package/dist/chunks/mcp-0.6.0-r1061w3f.mjs +17 -0
  337. package/dist/chunks/mcpb-0.6.0-9ka233fc.mjs +1 -0
  338. package/dist/chunks/memory-0.6.0-wzcpareq.mjs +3 -0
  339. package/dist/chunks/mobile-0.6.0-wfnegsdg.mjs +2 -0
  340. package/dist/chunks/model-0.6.0-2ncemzh6.mjs +1 -0
  341. package/dist/chunks/model-0.6.0-tefdsge4.mjs +2 -0
  342. package/dist/chunks/node-0.6.0-x0ve6mnc.mjs +12 -0
  343. package/dist/chunks/oauth-0.6.0-dqw6k0tz.mjs +1 -0
  344. package/dist/chunks/openaiShim-0.6.0-22t2dr2z.mjs +14 -0
  345. package/dist/chunks/output-style-0.6.0-6kqm6df4.mjs +1 -0
  346. package/dist/chunks/package-D6422PQU-0.6.0-vx7g6m15.mjs +1 -0
  347. package/dist/chunks/parseConnectUrl-0.6.0-fzb9qfec.mjs +1 -0
  348. package/dist/chunks/parser-0.6.0-y80gn3tg.mjs +1 -0
  349. package/dist/chunks/passes-0.6.0-0gxeeegv.mjs +1 -0
  350. package/dist/chunks/permissions-0.6.0-hke4pdcc.mjs +3 -0
  351. package/dist/chunks/plan-0.6.0-v60h02ep.mjs +1 -0
  352. package/dist/chunks/plist-0.6.0-bz14nbfw.mjs +1 -0
  353. package/dist/chunks/plugin-0.6.0-43b045ac.mjs +29 -0
  354. package/dist/chunks/pluginStartupCheck-0.6.0-rxgqz1f8.mjs +1 -0
  355. package/dist/chunks/plugins-0.6.0-c4zsb658.mjs +9 -0
  356. package/dist/chunks/preActionHook-0.6.0-bxna1trm.mjs +2 -0
  357. package/dist/chunks/print-0.6.0-09j4e2ec.mjs +57 -0
  358. package/dist/chunks/privacy-settings-0.6.0-yhesee0k.mjs +1 -0
  359. package/dist/chunks/process-0.6.0-194s5ayw.mjs +1 -0
  360. package/dist/chunks/processBashCommand-0.6.0-pfp2pv9w.mjs +1 -0
  361. package/dist/chunks/processSlashCommand-0.6.0-7xzbb466.mjs +9 -0
  362. package/dist/chunks/prompt-0.6.0-g86dhhk0.mjs +1 -0
  363. package/dist/chunks/prompt-0.6.0-zaxw8ms6.mjs +1 -0
  364. package/dist/chunks/prompts-0.6.0-dk1vzsz0.mjs +1 -0
  365. package/dist/chunks/protocolHandler-0.6.0-54sm9br3.mjs +13 -0
  366. package/dist/chunks/provider-0.6.0-f3hjdgnv.mjs +2 -0
  367. package/dist/chunks/providerProfiles-0.6.0-bxp22mqt.mjs +1 -0
  368. package/dist/chunks/providerValidation-0.6.0-pvwdjqw3.mjs +6 -0
  369. package/dist/chunks/rate-limit-options-0.6.0-y2qv27ms.mjs +1 -0
  370. package/dist/chunks/registerSubcommands-0.6.0-dh1kmqw1.mjs +34 -0
  371. package/dist/chunks/registry-0.6.0-6zvdx4fa.mjs +1 -0
  372. package/dist/chunks/release-notes-0.6.0-6p8nx2xc.mjs +5 -0
  373. package/dist/chunks/reload-plugins-0.6.0-570gszfw.mjs +2 -0
  374. package/dist/chunks/remote-env-0.6.0-sjemeetj.mjs +1 -0
  375. package/dist/chunks/remoteBridgeCore-0.6.0-ab80z440.mjs +1 -0
  376. package/dist/chunks/remoteSession-0.6.0-d07620cv.mjs +1 -0
  377. package/dist/chunks/rename-0.6.0-nyqpebf6.mjs +1 -0
  378. package/dist/chunks/replBridgeHandle-0.6.0-pvrxskrc.mjs +1 -0
  379. package/dist/chunks/replLauncher-0.6.0-1ng5ajaz.mjs +1 -0
  380. package/dist/chunks/resume-0.6.0-0gcmk4pd.mjs +2 -0
  381. package/dist/chunks/rewind-0.6.0-ktbtm3a9.mjs +1 -0
  382. package/dist/chunks/rootOptions-0.6.0-3y0nvcgg.mjs +1 -0
  383. package/dist/chunks/sandbox-adapter-0.6.0-n03pbpa8.mjs +1 -0
  384. package/dist/chunks/sandbox-toggle-0.6.0-r6ap16jq.mjs +1 -0
  385. package/dist/chunks/session-0.6.0-8wj8t5kq.mjs +2 -0
  386. package/dist/chunks/sessionDiscovery-0.6.0-ggm4y3jm.mjs +1 -0
  387. package/dist/chunks/sessionFileAccessHooks-0.6.0-zzn2r4we.mjs +1 -0
  388. package/dist/chunks/sessionStorage-0.6.0-dqq9e9s8.mjs +1 -0
  389. package/dist/chunks/settings-0.6.0-ap4tqn54.mjs +1 -0
  390. package/dist/chunks/setup-0.6.0-mgbyyc71.mjs +5 -0
  391. package/dist/chunks/sinks-0.6.0-5ekfd4ya.mjs +1 -0
  392. package/dist/chunks/skills-0.6.0-78btd7cr.mjs +1 -0
  393. package/dist/chunks/startupProfiler-0.6.0-a2shb6dh.mjs +1 -0
  394. package/dist/chunks/startupUpdateCheck-0.6.0-3ygq5msd.mjs +1 -0
  395. package/dist/chunks/state-0.6.0-m6bsf1b6.mjs +1 -0
  396. package/dist/chunks/stats-0.6.0-w163rgvd.mjs +6 -0
  397. package/dist/chunks/status-0.6.0-ce1p1nbt.mjs +1 -0
  398. package/dist/chunks/stickers-0.6.0-j9h7rsnm.mjs +1 -0
  399. package/dist/chunks/subprocessEnv-0.6.0-ep7ha98p.mjs +1 -0
  400. package/dist/chunks/tasks-0.6.0-2qdk98p6.mjs +1 -0
  401. package/dist/chunks/teamHelpers-0.6.0-z26tek6c.mjs +1 -0
  402. package/dist/chunks/teammateModeSnapshot-0.6.0-ydtqht2v.mjs +1 -0
  403. package/dist/chunks/teleport-0.6.0-sq90w2z1.mjs +1 -0
  404. package/dist/chunks/terminalSetup-0.6.0-nj633zgj.mjs +1 -0
  405. package/dist/chunks/theme-0.6.0-gbx1fx14.mjs +1 -0
  406. package/dist/chunks/thinkback-0.6.0-g650qsc0.mjs +1 -0
  407. package/dist/chunks/thinkback-play-0.6.0-x83b68dn.mjs +1 -0
  408. package/dist/chunks/toolPool-0.6.0-p2sms7a9.mjs +1 -0
  409. package/dist/chunks/toolSearch-0.6.0-wyps3eqc.mjs +1 -0
  410. package/dist/chunks/tools-0.6.0-xk9wgy5h.mjs +1 -0
  411. package/dist/chunks/trustedDevice-0.6.0-rgqjeqzg.mjs +1 -0
  412. package/dist/chunks/turndown.cjs-0.6.0-dsdamyph.mjs +69 -0
  413. package/dist/chunks/ultrareviewCommand-0.6.0-x19p2w4a.mjs +4 -0
  414. package/dist/chunks/update-0.6.0-ryw1h5dw.mjs +86 -0
  415. package/dist/chunks/upgrade-0.6.0-gwrpq422.mjs +1 -0
  416. package/dist/chunks/upstreamproxy-0.6.0-99efcy5e.mjs +14 -0
  417. package/dist/chunks/url-handler-napi-0.6.0-k1qxf5y3.mjs +1 -0
  418. package/dist/chunks/usage-0.6.0-9gygvtnp.mjs +1 -0
  419. package/dist/chunks/util-0.6.0-pnf3vdnn.mjs +1 -0
  420. package/dist/chunks/utils-0.6.0-pf338f8r.mjs +1 -0
  421. package/dist/chunks/vim-0.6.0-xr4692km.mjs +1 -0
  422. package/dist/chunks/watcher-0.6.0-cypcv0dz.mjs +1 -0
  423. package/dist/chunks/wiki-0.6.0-hj8m2rct.mjs +132 -0
  424. package/dist/chunks/worktree-0.6.0-gkckfba3.mjs +1 -0
  425. package/dist/chunks/worktreeModeEnabled-0.6.0-rrpspmv9.mjs +1 -0
  426. package/dist/chunks/wrapper-0.6.0-hdrsg1aw.mjs +7 -0
  427. package/dist/claudin-vscode.vsix +0 -0
  428. package/dist/cli.mjs +2 -2
  429. package/package.json +1 -1
  430. package/dist/chunks/AgentTool-0.5.13-6dz2gvzt.mjs +0 -1
  431. package/dist/chunks/App-0.5.13-h8h37pzk.mjs +0 -1
  432. package/dist/chunks/ApproveApiKey-0.5.13-r1fte24k.mjs +0 -1
  433. package/dist/chunks/AssistantSessionChooser-0.5.13-8r9am3rj.mjs +0 -1
  434. package/dist/chunks/AutoModeOptInDialog-0.5.13-kmhmmjcg.mjs +0 -1
  435. package/dist/chunks/BypassPermissionsModeDialog-0.5.13-2bsqjr5d.mjs +0 -1
  436. package/dist/chunks/ClaudeMdExternalIncludesDialog-0.5.13-qcb3r450.mjs +0 -1
  437. package/dist/chunks/ConsoleOAuthFlow-0.5.13-pg65frv4.mjs +0 -1
  438. package/dist/chunks/DiffDialog-0.5.13-hwy08wq9.mjs +0 -3
  439. package/dist/chunks/Doctor-0.5.13-335trspw.mjs +0 -1
  440. package/dist/chunks/Grove-0.5.13-hg0k8g49.mjs +0 -1
  441. package/dist/chunks/ITermBackend-0.5.13-jj7kn9vx.mjs +0 -1
  442. package/dist/chunks/InvalidConfigDialog-0.5.13-9azv44xk.mjs +0 -1
  443. package/dist/chunks/InvalidSettingsDialog-0.5.13-byp7h5gk.mjs +0 -1
  444. package/dist/chunks/MigrationDialog-0.5.13-zxyqfrbq.mjs +0 -1
  445. package/dist/chunks/Onboarding-0.5.13-qa2yk18p.mjs +0 -1
  446. package/dist/chunks/ProviderManager-0.5.13-c1vawvvp.mjs +0 -1
  447. package/dist/chunks/REPL-0.5.13-4rss5cn8.mjs +0 -1
  448. package/dist/chunks/ResumeConversation-0.5.13-8yg9t110.mjs +0 -1
  449. package/dist/chunks/SnapshotUpdateDialog-0.5.13-egpytwfz.mjs +0 -1
  450. package/dist/chunks/TeleportProgress-0.5.13-mqff8prx.mjs +0 -1
  451. package/dist/chunks/TeleportRepoMismatchDialog-0.5.13-vvjjc0e0.mjs +0 -1
  452. package/dist/chunks/TeleportResumeWrapper-0.5.13-hr5qx564.mjs +0 -1
  453. package/dist/chunks/TmuxBackend-0.5.13-3rqrqy3v.mjs +0 -9
  454. package/dist/chunks/ToolSearchTool-0.5.13-pc0xw8bq.mjs +0 -1
  455. package/dist/chunks/TrustDialog-0.5.13-fc0205ss.mjs +0 -1
  456. package/dist/chunks/activeProvider-0.5.13-50732cyn.mjs +0 -1
  457. package/dist/chunks/add-dir-0.5.13-sq7m6erc.mjs +0 -1
  458. package/dist/chunks/agents-0.5.13-manb7tcq.mjs +0 -3
  459. package/dist/chunks/agents-0.5.13-xvmk9xvk.mjs +0 -110
  460. package/dist/chunks/api-0.5.13-q2anppzf.mjs +0 -1
  461. package/dist/chunks/asciicast-0.5.13-qdn1gh3y.mjs +0 -1
  462. package/dist/chunks/assistant-0.5.13-2hfvn0kh.mjs +0 -1
  463. package/dist/chunks/auth-0.5.13-05zhnpsy.mjs +0 -1
  464. package/dist/chunks/auth-0.5.13-jn53extx.mjs +0 -1
  465. package/dist/chunks/autoMode-0.5.13-ejwtdvs2.mjs +0 -48
  466. package/dist/chunks/autoUpdater-0.5.13-j6cngyr7.mjs +0 -1
  467. package/dist/chunks/backgroundHousekeeping-0.5.13-rrvzf922.mjs +0 -1
  468. package/dist/chunks/branch-0.5.13-qmyekghp.mjs +0 -4
  469. package/dist/chunks/bridgePointer-0.5.13-8r4x6rgv.mjs +0 -1
  470. package/dist/chunks/btw-0.5.13-0pa7vfhq.mjs +0 -1
  471. package/dist/chunks/buddy-0.5.13-k3ac5jxx.mjs +0 -3
  472. package/dist/chunks/cacache-0.5.13-ze1bqfm6.mjs +0 -1
  473. package/dist/chunks/cache-probe-0.5.13-yc3ra4vk.mjs +0 -21
  474. package/dist/chunks/cacheStats-0.5.13-e1eg5g4e.mjs +0 -4
  475. package/dist/chunks/caches-0.5.13-75dr0q42.mjs +0 -1
  476. package/dist/chunks/claudeDesktop-0.5.13-5nptd5hj.mjs +0 -1
  477. package/dist/chunks/claudemd-0.5.13-ce8fx7gc.mjs +0 -1
  478. package/dist/chunks/clear-0.5.13-k8q15yen.mjs +0 -1
  479. package/dist/chunks/clearTerminal-0.5.13-veyek376.mjs +0 -1
  480. package/dist/chunks/cli-0.5.13-03jqbfbp.mjs +0 -2
  481. package/dist/chunks/cli-0.5.13-055v20cs.mjs +0 -2
  482. package/dist/chunks/cli-0.5.13-061m60f2.mjs +0 -2
  483. package/dist/chunks/cli-0.5.13-0fhxw4ng.mjs +0 -3
  484. package/dist/chunks/cli-0.5.13-0zgpx8rh.mjs +0 -2
  485. package/dist/chunks/cli-0.5.13-15kmd08p.mjs +0 -2
  486. package/dist/chunks/cli-0.5.13-16khcs2m.mjs +0 -3
  487. package/dist/chunks/cli-0.5.13-1eedz5bc.mjs +0 -2
  488. package/dist/chunks/cli-0.5.13-1qt91z42.mjs +0 -2
  489. package/dist/chunks/cli-0.5.13-29nzbrwv.mjs +0 -45
  490. package/dist/chunks/cli-0.5.13-2m4fm0hh.mjs +0 -2
  491. package/dist/chunks/cli-0.5.13-2v1zpnvh.mjs +0 -2
  492. package/dist/chunks/cli-0.5.13-2vy5qjm5.mjs +0 -5276
  493. package/dist/chunks/cli-0.5.13-36s1k9x2.mjs +0 -2
  494. package/dist/chunks/cli-0.5.13-3e1p9n7x.mjs +0 -2
  495. package/dist/chunks/cli-0.5.13-3ys2sjjd.mjs +0 -2
  496. package/dist/chunks/cli-0.5.13-3zrq5ggt.mjs +0 -2
  497. package/dist/chunks/cli-0.5.13-426cpksk.mjs +0 -4
  498. package/dist/chunks/cli-0.5.13-4at49cv9.mjs +0 -2
  499. package/dist/chunks/cli-0.5.13-4s4vnhj8.mjs +0 -2
  500. package/dist/chunks/cli-0.5.13-4yqsxc90.mjs +0 -2
  501. package/dist/chunks/cli-0.5.13-50cwkg00.mjs +0 -2
  502. package/dist/chunks/cli-0.5.13-5n0sdsbk.mjs +0 -2
  503. package/dist/chunks/cli-0.5.13-5tva2fr1.mjs +0 -6
  504. package/dist/chunks/cli-0.5.13-5wc80m6b.mjs +0 -2
  505. package/dist/chunks/cli-0.5.13-5x7qbneh.mjs +0 -2
  506. package/dist/chunks/cli-0.5.13-62qasgve.mjs +0 -2
  507. package/dist/chunks/cli-0.5.13-667jxcab.mjs +0 -18
  508. package/dist/chunks/cli-0.5.13-69m6gq4m.mjs +0 -2
  509. package/dist/chunks/cli-0.5.13-6c2mgdby.mjs +0 -2
  510. package/dist/chunks/cli-0.5.13-6hvwtg4n.mjs +0 -2
  511. package/dist/chunks/cli-0.5.13-6qz4fn68.mjs +0 -2
  512. package/dist/chunks/cli-0.5.13-6yehabyw.mjs +0 -2
  513. package/dist/chunks/cli-0.5.13-70f6zf2z.mjs +0 -4
  514. package/dist/chunks/cli-0.5.13-73fyz4ct.mjs +0 -2
  515. package/dist/chunks/cli-0.5.13-73hy7ka5.mjs +0 -2
  516. package/dist/chunks/cli-0.5.13-77mqds6w.mjs +0 -2
  517. package/dist/chunks/cli-0.5.13-7b4c61sf.mjs +0 -2
  518. package/dist/chunks/cli-0.5.13-7fzk2679.mjs +0 -2
  519. package/dist/chunks/cli-0.5.13-7gkctjmj.mjs +0 -2
  520. package/dist/chunks/cli-0.5.13-7je48sax.mjs +0 -15
  521. package/dist/chunks/cli-0.5.13-898bb5x7.mjs +0 -2
  522. package/dist/chunks/cli-0.5.13-89h7zw2x.mjs +0 -2
  523. package/dist/chunks/cli-0.5.13-8wrj5aqm.mjs +0 -2
  524. package/dist/chunks/cli-0.5.13-8yj2mydb.mjs +0 -2
  525. package/dist/chunks/cli-0.5.13-9r26f53q.mjs +0 -8
  526. package/dist/chunks/cli-0.5.13-a86qe2vz.mjs +0 -2
  527. package/dist/chunks/cli-0.5.13-a8k2grq1.mjs +0 -3
  528. package/dist/chunks/cli-0.5.13-a9gqqmjh.mjs +0 -6
  529. package/dist/chunks/cli-0.5.13-acgafbm9.mjs +0 -2
  530. package/dist/chunks/cli-0.5.13-adphma77.mjs +0 -2
  531. package/dist/chunks/cli-0.5.13-atfk3e81.mjs +0 -2
  532. package/dist/chunks/cli-0.5.13-athb0q85.mjs +0 -2
  533. package/dist/chunks/cli-0.5.13-b2593ngv.mjs +0 -4
  534. package/dist/chunks/cli-0.5.13-b5tqhsx5.mjs +0 -2
  535. package/dist/chunks/cli-0.5.13-b6aefc28.mjs +0 -1
  536. package/dist/chunks/cli-0.5.13-bkv5hf1d.mjs +0 -2
  537. package/dist/chunks/cli-0.5.13-bv7ax1n3.mjs +0 -2
  538. package/dist/chunks/cli-0.5.13-cf35yzvq.mjs +0 -3
  539. package/dist/chunks/cli-0.5.13-chdvhgrk.mjs +0 -2
  540. package/dist/chunks/cli-0.5.13-chgxtj5w.mjs +0 -4
  541. package/dist/chunks/cli-0.5.13-cjd4zkx5.mjs +0 -2
  542. package/dist/chunks/cli-0.5.13-cm18xc7a.mjs +0 -4
  543. package/dist/chunks/cli-0.5.13-cnzars85.mjs +0 -5
  544. package/dist/chunks/cli-0.5.13-cs4r7txx.mjs +0 -2
  545. package/dist/chunks/cli-0.5.13-cvy5zs8w.mjs +0 -39
  546. package/dist/chunks/cli-0.5.13-cwy43qr2.mjs +0 -2
  547. package/dist/chunks/cli-0.5.13-d0pk4caa.mjs +0 -24
  548. package/dist/chunks/cli-0.5.13-d1xn4v80.mjs +0 -2
  549. package/dist/chunks/cli-0.5.13-d4g5sa6y.mjs +0 -2
  550. package/dist/chunks/cli-0.5.13-d6bw823x.mjs +0 -2
  551. package/dist/chunks/cli-0.5.13-dd5wmg26.mjs +0 -15
  552. package/dist/chunks/cli-0.5.13-ddpterr2.mjs +0 -2
  553. package/dist/chunks/cli-0.5.13-dxs15ka8.mjs +0 -24
  554. package/dist/chunks/cli-0.5.13-dzq8ey2j.mjs +0 -2
  555. package/dist/chunks/cli-0.5.13-efbkgz8j.mjs +0 -2
  556. package/dist/chunks/cli-0.5.13-ejy68mbm.mjs +0 -34
  557. package/dist/chunks/cli-0.5.13-epjykaww.mjs +0 -17
  558. package/dist/chunks/cli-0.5.13-evjnfa9k.mjs +0 -10
  559. package/dist/chunks/cli-0.5.13-f1akqq6k.mjs +0 -2
  560. package/dist/chunks/cli-0.5.13-f1e673b2.mjs +0 -2
  561. package/dist/chunks/cli-0.5.13-f6tattxs.mjs +0 -4
  562. package/dist/chunks/cli-0.5.13-fcrp5w0b.mjs +0 -3
  563. package/dist/chunks/cli-0.5.13-fdyfmbdw.mjs +0 -2
  564. package/dist/chunks/cli-0.5.13-fgckevv1.mjs +0 -2
  565. package/dist/chunks/cli-0.5.13-fjs5qecq.mjs +0 -2
  566. package/dist/chunks/cli-0.5.13-frerk7s6.mjs +0 -2
  567. package/dist/chunks/cli-0.5.13-g76ge0hv.mjs +0 -2
  568. package/dist/chunks/cli-0.5.13-ga5kmq1w.mjs +0 -2
  569. package/dist/chunks/cli-0.5.13-gb0363rs.mjs +0 -2
  570. package/dist/chunks/cli-0.5.13-gd8h6ejm.mjs +0 -15
  571. package/dist/chunks/cli-0.5.13-gpnjdq6k.mjs +0 -12
  572. package/dist/chunks/cli-0.5.13-gtn64dxk.mjs +0 -12
  573. package/dist/chunks/cli-0.5.13-gw433gw1.mjs +0 -9
  574. package/dist/chunks/cli-0.5.13-h04mqqtv.mjs +0 -17
  575. package/dist/chunks/cli-0.5.13-h1jy4w92.mjs +0 -2
  576. package/dist/chunks/cli-0.5.13-h9wt4xcx.mjs +0 -25
  577. package/dist/chunks/cli-0.5.13-hgrj8csf.mjs +0 -4
  578. package/dist/chunks/cli-0.5.13-hwcqeqbn.mjs +0 -2
  579. package/dist/chunks/cli-0.5.13-hxsc43y5.mjs +0 -2
  580. package/dist/chunks/cli-0.5.13-j2wbmw1t.mjs +0 -2
  581. package/dist/chunks/cli-0.5.13-j7mzv9r7.mjs +0 -2
  582. package/dist/chunks/cli-0.5.13-j97wk70q.mjs +0 -2
  583. package/dist/chunks/cli-0.5.13-jc4m6d2k.mjs +0 -3
  584. package/dist/chunks/cli-0.5.13-jqns71dy.mjs +0 -2
  585. package/dist/chunks/cli-0.5.13-k0a2tvhb.mjs +0 -2
  586. package/dist/chunks/cli-0.5.13-k18wsy2t.mjs +0 -2
  587. package/dist/chunks/cli-0.5.13-k8vf1rgk.mjs +0 -2
  588. package/dist/chunks/cli-0.5.13-khtf0a93.mjs +0 -9
  589. package/dist/chunks/cli-0.5.13-kry2fk76.mjs +0 -2
  590. package/dist/chunks/cli-0.5.13-kt5d0qv4.mjs +0 -2
  591. package/dist/chunks/cli-0.5.13-ktrr6zcr.mjs +0 -2
  592. package/dist/chunks/cli-0.5.13-kz59bkh7.mjs +0 -6
  593. package/dist/chunks/cli-0.5.13-mpqhbtwc.mjs +0 -2
  594. package/dist/chunks/cli-0.5.13-mrtzh5nm.mjs +0 -2
  595. package/dist/chunks/cli-0.5.13-mwrgy706.mjs +0 -2
  596. package/dist/chunks/cli-0.5.13-n30tm5c8.mjs +0 -2
  597. package/dist/chunks/cli-0.5.13-n3xnwgn1.mjs +0 -2
  598. package/dist/chunks/cli-0.5.13-nc37z94b.mjs +0 -2
  599. package/dist/chunks/cli-0.5.13-nkaxbfpd.mjs +0 -2
  600. package/dist/chunks/cli-0.5.13-nqkxsn2m.mjs +0 -133
  601. package/dist/chunks/cli-0.5.13-p4f4h0g7.mjs +0 -16
  602. package/dist/chunks/cli-0.5.13-p6q4xbrv.mjs +0 -2
  603. package/dist/chunks/cli-0.5.13-p70x9j1v.mjs +0 -193
  604. package/dist/chunks/cli-0.5.13-p7q9grjp.mjs +0 -2
  605. package/dist/chunks/cli-0.5.13-p9fwmgwy.mjs +0 -2
  606. package/dist/chunks/cli-0.5.13-q2mxeckt.mjs +0 -2
  607. package/dist/chunks/cli-0.5.13-qdtebkgs.mjs +0 -2
  608. package/dist/chunks/cli-0.5.13-qfxggvke.mjs +0 -18
  609. package/dist/chunks/cli-0.5.13-qkjyj942.mjs +0 -2
  610. package/dist/chunks/cli-0.5.13-qrn019we.mjs +0 -2
  611. package/dist/chunks/cli-0.5.13-qs5d8j4d.mjs +0 -2
  612. package/dist/chunks/cli-0.5.13-qv3v2ydv.mjs +0 -3
  613. package/dist/chunks/cli-0.5.13-r0m7bt05.mjs +0 -2
  614. package/dist/chunks/cli-0.5.13-r442vgxt.mjs +0 -2
  615. package/dist/chunks/cli-0.5.13-rd990xfy.mjs +0 -2
  616. package/dist/chunks/cli-0.5.13-rfsjgvne.mjs +0 -2
  617. package/dist/chunks/cli-0.5.13-rmc7f4b8.mjs +0 -2
  618. package/dist/chunks/cli-0.5.13-rppjxrmy.mjs +0 -2
  619. package/dist/chunks/cli-0.5.13-rqjp9raj.mjs +0 -58
  620. package/dist/chunks/cli-0.5.13-rrqv533k.mjs +0 -2
  621. package/dist/chunks/cli-0.5.13-s005ka5h.mjs +0 -2
  622. package/dist/chunks/cli-0.5.13-s1wx3grp.mjs +0 -2
  623. package/dist/chunks/cli-0.5.13-s58vke8w.mjs +0 -2
  624. package/dist/chunks/cli-0.5.13-s719y89z.mjs +0 -2
  625. package/dist/chunks/cli-0.5.13-sfjdg8y7.mjs +0 -4
  626. package/dist/chunks/cli-0.5.13-sww17qtj.mjs +0 -42
  627. package/dist/chunks/cli-0.5.13-t0zrxwck.mjs +0 -3
  628. package/dist/chunks/cli-0.5.13-t6q9ebdp.mjs +0 -2
  629. package/dist/chunks/cli-0.5.13-teedketa.mjs +0 -2
  630. package/dist/chunks/cli-0.5.13-tg8xt9zq.mjs +0 -3
  631. package/dist/chunks/cli-0.5.13-thgp6asf.mjs +0 -21
  632. package/dist/chunks/cli-0.5.13-tqs67xcg.mjs +0 -2
  633. package/dist/chunks/cli-0.5.13-tr9s34te.mjs +0 -59
  634. package/dist/chunks/cli-0.5.13-tvfs784w.mjs +0 -2
  635. package/dist/chunks/cli-0.5.13-tyh63jx3.mjs +0 -2
  636. package/dist/chunks/cli-0.5.13-ve50w85d.mjs +0 -2
  637. package/dist/chunks/cli-0.5.13-vee98ybt.mjs +0 -2
  638. package/dist/chunks/cli-0.5.13-vfkw26ed.mjs +0 -3
  639. package/dist/chunks/cli-0.5.13-vhjxq97s.mjs +0 -2
  640. package/dist/chunks/cli-0.5.13-vhvwgvqz.mjs +0 -2
  641. package/dist/chunks/cli-0.5.13-vqrqsmg4.mjs +0 -3
  642. package/dist/chunks/cli-0.5.13-vt1mnr9f.mjs +0 -2
  643. package/dist/chunks/cli-0.5.13-w20nxjkz.mjs +0 -5
  644. package/dist/chunks/cli-0.5.13-wbq0xatn.mjs +0 -2
  645. package/dist/chunks/cli-0.5.13-wfyf1thm.mjs +0 -2
  646. package/dist/chunks/cli-0.5.13-wyr6xtxm.mjs +0 -2
  647. package/dist/chunks/cli-0.5.13-x3f97qaq.mjs +0 -2
  648. package/dist/chunks/cli-0.5.13-x3t2vpfh.mjs +0 -2
  649. package/dist/chunks/cli-0.5.13-x8dtpekr.mjs +0 -2
  650. package/dist/chunks/cli-0.5.13-xgcr3a63.mjs +0 -2
  651. package/dist/chunks/cli-0.5.13-xnxmkmta.mjs +0 -5
  652. package/dist/chunks/cli-0.5.13-xvg417w8.mjs +0 -7
  653. package/dist/chunks/cli-0.5.13-xxa4mzdx.mjs +0 -2
  654. package/dist/chunks/cli-0.5.13-xxpqtp1x.mjs +0 -2
  655. package/dist/chunks/cli-0.5.13-xzeqt5b9.mjs +0 -2
  656. package/dist/chunks/cli-0.5.13-y3hmh09p.mjs +0 -2
  657. package/dist/chunks/cli-0.5.13-y9wywv5c.mjs +0 -2
  658. package/dist/chunks/cli-0.5.13-yc6wyazy.mjs +0 -67
  659. package/dist/chunks/cli-0.5.13-yf4tqq6c.mjs +0 -20
  660. package/dist/chunks/cli-0.5.13-yk8r9pqr.mjs +0 -2
  661. package/dist/chunks/cli-0.5.13-yskavx3s.mjs +0 -12
  662. package/dist/chunks/cli-0.5.13-ytqyx6qh.mjs +0 -2
  663. package/dist/chunks/cli-0.5.13-ywwd10c0.mjs +0 -4
  664. package/dist/chunks/cli-0.5.13-z0f17269.mjs +0 -2
  665. package/dist/chunks/cli-0.5.13-z1aye5ce.mjs +0 -2
  666. package/dist/chunks/cli-0.5.13-zk96c5kc.mjs +0 -3
  667. package/dist/chunks/cli-0.5.13-zkqc4zsj.mjs +0 -4
  668. package/dist/chunks/cli-0.5.13-zms1a287.mjs +0 -50
  669. package/dist/chunks/cli-0.5.13-znj1x5bb.mjs +0 -133
  670. package/dist/chunks/client-0.5.13-wkzv25nn.mjs +0 -1
  671. package/dist/chunks/color-0.5.13-yd46yzt2.mjs +0 -1
  672. package/dist/chunks/compact-0.5.13-3bw7kt91.mjs +0 -3
  673. package/dist/chunks/config-0.5.13-mwq6ejza.mjs +0 -1
  674. package/dist/chunks/config-0.5.13-t1bvsttc.mjs +0 -1
  675. package/dist/chunks/context-0.5.13-zffaf66t.mjs +0 -1
  676. package/dist/chunks/context-noninteractive-0.5.13-r7fhc6wz.mjs +0 -1
  677. package/dist/chunks/conversation-0.5.13-3vvb99cj.mjs +0 -1
  678. package/dist/chunks/copy-0.5.13-zh3ctvbe.mjs +0 -9
  679. package/dist/chunks/cost-0.5.13-kaah7wjm.mjs +0 -1
  680. package/dist/chunks/createSSHSession-0.5.13-gn1tyhwh.mjs +0 -1
  681. package/dist/chunks/createSession-0.5.13-q4atr39q.mjs +0 -1
  682. package/dist/chunks/debug-0.5.13-tsk3c3gg.mjs +0 -1
  683. package/dist/chunks/defaultActionDeps-0.5.13-eep8ghf6.mjs +0 -1177
  684. package/dist/chunks/desktop-0.5.13-wahg3gbx.mjs +0 -1
  685. package/dist/chunks/detectRepository-0.5.13-xek1s6f7.mjs +0 -1
  686. package/dist/chunks/detection-0.5.13-f8b6t5he.mjs +0 -1
  687. package/dist/chunks/diff-0.5.13-515a1hs6.mjs +0 -1
  688. package/dist/chunks/doctor-0.5.13-zafz1vsm.mjs +0 -1
  689. package/dist/chunks/doctorDiagnostic-0.5.13-fd90ctm0.mjs +0 -1
  690. package/dist/chunks/earlyInput-0.5.13-b58bf771.mjs +0 -1
  691. package/dist/chunks/effort-0.5.13-0yah2d2h.mjs +0 -10
  692. package/dist/chunks/envUtils-0.5.13-g4pw1v3n.mjs +0 -1
  693. package/dist/chunks/environmentSelection-0.5.13-9qw5cb9h.mjs +0 -1
  694. package/dist/chunks/environments-0.5.13-2a6akk4c.mjs +0 -1
  695. package/dist/chunks/errors-0.5.13-7p8kdhe8.mjs +0 -1
  696. package/dist/chunks/exampleCommands-0.5.13-fxpyc0yh.mjs +0 -1
  697. package/dist/chunks/exit-0.5.13-gs0h7d0d.mjs +0 -1
  698. package/dist/chunks/export-0.5.13-d2yz4k76.mjs +0 -2
  699. package/dist/chunks/extra-usage-0.5.13-571qzpk6.mjs +0 -1
  700. package/dist/chunks/extra-usage-noninteractive-0.5.13-ky55gxd6.mjs +0 -1
  701. package/dist/chunks/fast-0.5.13-2g61p9d0.mjs +0 -1
  702. package/dist/chunks/feedback-0.5.13-2mk1kd03.mjs +0 -14
  703. package/dist/chunks/firstPartyEventLogger-0.5.13-2t54ma0f.mjs +0 -1
  704. package/dist/chunks/git-0.5.13-rd7xcgr3.mjs +0 -1
  705. package/dist/chunks/githubModelsCredentials-0.5.13-skfy40r3.mjs +0 -1
  706. package/dist/chunks/grove-0.5.13-g8qwzetx.mjs +0 -1
  707. package/dist/chunks/growthbook-0.5.13-hnyag67m.mjs +0 -1
  708. package/dist/chunks/headless-0.5.13-05rns8kj.mjs +0 -2
  709. package/dist/chunks/heapdump-0.5.13-4eq6h79m.mjs +0 -6
  710. package/dist/chunks/help-0.5.13-8pfrra9q.mjs +0 -1
  711. package/dist/chunks/hookChains-0.5.13-vvmpgx47.mjs +0 -3
  712. package/dist/chunks/hooks-0.5.13-c2ksw8k4.mjs +0 -1
  713. package/dist/chunks/hooks-0.5.13-zer0dcqm.mjs +0 -79
  714. package/dist/chunks/ide-0.5.13-r40xcg67.mjs +0 -3
  715. package/dist/chunks/image-processor-napi-0.5.13-gf9xnpk4.mjs +0 -1
  716. package/dist/chunks/index-0.5.13-06mj6naw.mjs +0 -1
  717. package/dist/chunks/index-0.5.13-12hemzfc.mjs +0 -1
  718. package/dist/chunks/index-0.5.13-4559xg8z.mjs +0 -17
  719. package/dist/chunks/index-0.5.13-5gmbch0k.mjs +0 -9
  720. package/dist/chunks/index-0.5.13-5qstd1y9.mjs +0 -1
  721. package/dist/chunks/index-0.5.13-5zhr2qys.mjs +0 -1
  722. package/dist/chunks/index-0.5.13-7t4ww1cj.mjs +0 -1
  723. package/dist/chunks/index-0.5.13-9zz559q7.mjs +0 -1
  724. package/dist/chunks/index-0.5.13-ap2xd7mn.mjs +0 -1
  725. package/dist/chunks/index-0.5.13-c9pk5nd1.mjs +0 -2
  726. package/dist/chunks/index-0.5.13-d9sdxhsy.mjs +0 -1
  727. package/dist/chunks/index-0.5.13-ej6cywk8.mjs +0 -30
  728. package/dist/chunks/index-0.5.13-fbjdwyd8.mjs +0 -1
  729. package/dist/chunks/index-0.5.13-fertw6vb.mjs +0 -1
  730. package/dist/chunks/index-0.5.13-jwf634zt.mjs +0 -1
  731. package/dist/chunks/index-0.5.13-nny2e7sx.mjs +0 -5
  732. package/dist/chunks/index-0.5.13-np7s1rcw.mjs +0 -1
  733. package/dist/chunks/index-0.5.13-qkvpat3t.mjs +0 -9
  734. package/dist/chunks/index-0.5.13-qq60ettc.mjs +0 -1
  735. package/dist/chunks/index-0.5.13-rty9gaxf.mjs +0 -2
  736. package/dist/chunks/index-0.5.13-yqdcztr9.mjs +0 -1
  737. package/dist/chunks/index-0.5.13-zhze2z09.mjs +0 -1
  738. package/dist/chunks/init-0.5.13-yn5gjx3n.mjs +0 -1
  739. package/dist/chunks/initReplBridge-0.5.13-3q7t27y6.mjs +0 -1
  740. package/dist/chunks/ink-0.5.13-hp9a2nw1.mjs +0 -1
  741. package/dist/chunks/insights-0.5.13-k7b8vcre.mjs +0 -870
  742. package/dist/chunks/install-0.5.13-bfn6wvkn.mjs +0 -1
  743. package/dist/chunks/install-github-app-0.5.13-jgte5vf5.mjs +0 -149
  744. package/dist/chunks/install-slack-app-0.5.13-6jhm4499.mjs +0 -1
  745. package/dist/chunks/instrumentation-0.5.13-qe85v218.mjs +0 -1
  746. package/dist/chunks/interactiveHelpers-0.5.13-pzrtv38g.mjs +0 -1
  747. package/dist/chunks/keybindings-0.5.13-nekhy7ew.mjs +0 -2
  748. package/dist/chunks/knowledge-0.5.13-gzztvqej.mjs +0 -2
  749. package/dist/chunks/latestVersionCache-0.5.13-68b2ccpy.mjs +0 -1
  750. package/dist/chunks/loadAgentsDir-0.5.13-0dsj5wv6.mjs +0 -1
  751. package/dist/chunks/loadPluginHooks-0.5.13-0z0wcvtq.mjs +0 -1
  752. package/dist/chunks/loadPluginHooks-0.5.13-fzcfd312.mjs +0 -1
  753. package/dist/chunks/log-0.5.13-gdx6qzh8.mjs +0 -1
  754. package/dist/chunks/main-0.5.13-n87gjwzq.mjs +0 -1
  755. package/dist/chunks/managedEnv-0.5.13-53yr3zwe.mjs +0 -1
  756. package/dist/chunks/mcp-0.5.13-nmspb2zq.mjs +0 -4
  757. package/dist/chunks/mcp-0.5.13-rw2g8qaa.mjs +0 -17
  758. package/dist/chunks/mcp-0.5.13-th2ze7ya.mjs +0 -1
  759. package/dist/chunks/mcpb-0.5.13-m2r7m7gz.mjs +0 -1
  760. package/dist/chunks/memory-0.5.13-exfd915f.mjs +0 -3
  761. package/dist/chunks/mobile-0.5.13-chn8dbj3.mjs +0 -2
  762. package/dist/chunks/model-0.5.13-02rcx381.mjs +0 -1
  763. package/dist/chunks/model-0.5.13-nn224m13.mjs +0 -2
  764. package/dist/chunks/node-0.5.13-qaeqsj1w.mjs +0 -12
  765. package/dist/chunks/oauth-0.5.13-9kyat49f.mjs +0 -1
  766. package/dist/chunks/openaiShim-0.5.13-h22myqt0.mjs +0 -14
  767. package/dist/chunks/output-style-0.5.13-6fyp1e9p.mjs +0 -1
  768. package/dist/chunks/package-D6422PQU-0.5.13-qhrrn6zr.mjs +0 -1
  769. package/dist/chunks/parseConnectUrl-0.5.13-1qc35s39.mjs +0 -1
  770. package/dist/chunks/parser-0.5.13-pat6pqc3.mjs +0 -1
  771. package/dist/chunks/passes-0.5.13-e04rjkwz.mjs +0 -1
  772. package/dist/chunks/permissions-0.5.13-hayn4a0z.mjs +0 -3
  773. package/dist/chunks/plan-0.5.13-837bdxnq.mjs +0 -1
  774. package/dist/chunks/plist-0.5.13-wbmvsbtw.mjs +0 -1
  775. package/dist/chunks/plugin-0.5.13-wfbqn2r6.mjs +0 -29
  776. package/dist/chunks/pluginStartupCheck-0.5.13-6kztma6y.mjs +0 -1
  777. package/dist/chunks/plugins-0.5.13-661zwqh0.mjs +0 -9
  778. package/dist/chunks/preActionHook-0.5.13-jnvd55h3.mjs +0 -2
  779. package/dist/chunks/print-0.5.13-tp9qh9m9.mjs +0 -57
  780. package/dist/chunks/privacy-settings-0.5.13-kd3r9h57.mjs +0 -1
  781. package/dist/chunks/process-0.5.13-kkfgtfp6.mjs +0 -1
  782. package/dist/chunks/processBashCommand-0.5.13-9yggekvh.mjs +0 -1
  783. package/dist/chunks/processSlashCommand-0.5.13-q15qa3ee.mjs +0 -9
  784. package/dist/chunks/prompt-0.5.13-h2tvhh01.mjs +0 -1
  785. package/dist/chunks/prompt-0.5.13-x601wxwy.mjs +0 -1
  786. package/dist/chunks/prompts-0.5.13-76a9ns5g.mjs +0 -1
  787. package/dist/chunks/protocolHandler-0.5.13-kvfdrr12.mjs +0 -13
  788. package/dist/chunks/provider-0.5.13-tgwe2fwj.mjs +0 -2
  789. package/dist/chunks/providerProfiles-0.5.13-hyx6zffe.mjs +0 -1
  790. package/dist/chunks/providerValidation-0.5.13-8z62br8d.mjs +0 -6
  791. package/dist/chunks/rate-limit-options-0.5.13-wz5ew5he.mjs +0 -1
  792. package/dist/chunks/registerSubcommands-0.5.13-xgwprw2n.mjs +0 -34
  793. package/dist/chunks/registry-0.5.13-cx3vtv28.mjs +0 -1
  794. package/dist/chunks/release-notes-0.5.13-pcbc1edt.mjs +0 -5
  795. package/dist/chunks/reload-plugins-0.5.13-pvwtgp6y.mjs +0 -2
  796. package/dist/chunks/remote-env-0.5.13-mj63srey.mjs +0 -1
  797. package/dist/chunks/remoteBridgeCore-0.5.13-vmb8vyd9.mjs +0 -1
  798. package/dist/chunks/remoteSession-0.5.13-ext2r1fs.mjs +0 -1
  799. package/dist/chunks/rename-0.5.13-c388bb34.mjs +0 -1
  800. package/dist/chunks/replBridgeHandle-0.5.13-d9e8m6a4.mjs +0 -1
  801. package/dist/chunks/replLauncher-0.5.13-q4xjb3n7.mjs +0 -1
  802. package/dist/chunks/resume-0.5.13-zwms595g.mjs +0 -2
  803. package/dist/chunks/rewind-0.5.13-nf9en5kj.mjs +0 -1
  804. package/dist/chunks/rootOptions-0.5.13-ys6f60ez.mjs +0 -1
  805. package/dist/chunks/sandbox-adapter-0.5.13-0kn0krrs.mjs +0 -1
  806. package/dist/chunks/sandbox-toggle-0.5.13-mbhkfqtx.mjs +0 -1
  807. package/dist/chunks/session-0.5.13-ef059m1s.mjs +0 -2
  808. package/dist/chunks/sessionDiscovery-0.5.13-rqf5h984.mjs +0 -1
  809. package/dist/chunks/sessionFileAccessHooks-0.5.13-skb8p6b9.mjs +0 -1
  810. package/dist/chunks/sessionStorage-0.5.13-hfsdsdg8.mjs +0 -1
  811. package/dist/chunks/settings-0.5.13-dvj3rntg.mjs +0 -1
  812. package/dist/chunks/setup-0.5.13-0qy4tjwk.mjs +0 -5
  813. package/dist/chunks/sinks-0.5.13-r38g34n1.mjs +0 -1
  814. package/dist/chunks/skills-0.5.13-zd2n7d2t.mjs +0 -1
  815. package/dist/chunks/startupProfiler-0.5.13-rvngf74z.mjs +0 -1
  816. package/dist/chunks/startupUpdateCheck-0.5.13-kepbkbnb.mjs +0 -1
  817. package/dist/chunks/state-0.5.13-9j8t0pbx.mjs +0 -1
  818. package/dist/chunks/stats-0.5.13-6083a1n1.mjs +0 -6
  819. package/dist/chunks/status-0.5.13-043z2z1k.mjs +0 -1
  820. package/dist/chunks/stickers-0.5.13-haw56t8e.mjs +0 -1
  821. package/dist/chunks/subprocessEnv-0.5.13-6fym13ah.mjs +0 -1
  822. package/dist/chunks/tasks-0.5.13-prxqgrk6.mjs +0 -1
  823. package/dist/chunks/teamHelpers-0.5.13-ea9wnqk5.mjs +0 -1
  824. package/dist/chunks/teammateModeSnapshot-0.5.13-fzz13a9m.mjs +0 -1
  825. package/dist/chunks/teleport-0.5.13-cwvgxg78.mjs +0 -1
  826. package/dist/chunks/terminalSetup-0.5.13-cswcvej0.mjs +0 -1
  827. package/dist/chunks/theme-0.5.13-yq4dm16b.mjs +0 -1
  828. package/dist/chunks/thinkback-0.5.13-gf1n5td1.mjs +0 -1
  829. package/dist/chunks/thinkback-play-0.5.13-fjwrqzd7.mjs +0 -1
  830. package/dist/chunks/toolPool-0.5.13-kt2xjpf7.mjs +0 -1
  831. package/dist/chunks/toolSearch-0.5.13-p0zpbh8d.mjs +0 -1
  832. package/dist/chunks/tools-0.5.13-jd6408d0.mjs +0 -1
  833. package/dist/chunks/trustedDevice-0.5.13-8vncqgx8.mjs +0 -1
  834. package/dist/chunks/turndown.cjs-0.5.13-0pxd6ddw.mjs +0 -69
  835. package/dist/chunks/ultrareviewCommand-0.5.13-5w0fawcq.mjs +0 -4
  836. package/dist/chunks/update-0.5.13-r5daertf.mjs +0 -86
  837. package/dist/chunks/upgrade-0.5.13-02ypar0z.mjs +0 -1
  838. package/dist/chunks/upstreamproxy-0.5.13-qxsd8pz8.mjs +0 -14
  839. package/dist/chunks/url-handler-napi-0.5.13-fvyp50k0.mjs +0 -1
  840. package/dist/chunks/usage-0.5.13-qzx2m9s9.mjs +0 -1
  841. package/dist/chunks/util-0.5.13-f4gpmja3.mjs +0 -1
  842. package/dist/chunks/utils-0.5.13-3qpq89q5.mjs +0 -1
  843. package/dist/chunks/vim-0.5.13-mg62q0nt.mjs +0 -1
  844. package/dist/chunks/watcher-0.5.13-q568pd2n.mjs +0 -1
  845. package/dist/chunks/wiki-0.5.13-yzex4wbz.mjs +0 -132
  846. package/dist/chunks/worktree-0.5.13-7q98jvfb.mjs +0 -1
  847. package/dist/chunks/worktreeModeEnabled-0.5.13-rhsc6esa.mjs +0 -1
  848. package/dist/chunks/wrapper-0.5.13-7xwpyrgq.mjs +0 -7
  849. /package/dist/chunks/{cli-0.5.13-epw9z05w.mjs → cli-0.6.0-hcx40dgf.mjs} +0 -0
  850. /package/dist/chunks/{cli-0.5.13-07hv5jdz.mjs → cli-0.6.0-ktf52b8k.mjs} +0 -0
  851. /package/dist/chunks/{cli-0.5.13-c4q1pthh.mjs → cli-0.6.0-td7dsace.mjs} +0 -0
@@ -0,0 +1,42 @@
1
+ import{bpa as H9,dpa as Y$,fpa as M,gpa as JZ}from"./cli-0.6.0-szxjcmcn.mjs";function w(Z,$,X,J,z){if(J==="m")throw TypeError("Private method is not writable");if(J==="a"&&!z)throw TypeError("Private accessor was defined without a setter");if(typeof $==="function"?Z!==$||!z:!$.has(Z))throw TypeError("Cannot write private member to an object whose class did not declare it");return J==="a"?z.call(Z,X):z?z.value=X:$.set(Z,X),X}function K(Z,$,X,J){if(X==="a"&&!J)throw TypeError("Private accessor was defined without a getter");if(typeof $==="function"?Z!==$||!J:!$.has(Z))throw TypeError("Cannot read private member from an object whose class did not declare it");return X==="m"?J:X==="a"?J.call(Z):J?J.value:$.get(Z)}var XZ=()=>{};function BZ(Z){return typeof Z==="object"&&Z!==null&&(("name"in Z)&&Z.name==="AbortError"||("message"in Z)&&String(Z.message).includes("FetchRequestCanceledException"))}var R0=(Z)=>{if(Z instanceof Error)return Z;if(typeof Z==="object"&&Z!==null){try{if(Object.prototype.toString.call(Z)==="[object Error]"){let $=Error(Z.message,Z.cause?{cause:Z.cause}:{});if(Z.stack)$.stack=Z.stack;if(Z.cause&&!$.cause)$.cause=Z.cause;if(Z.name)$.name=Z.name;return $}}catch{}try{return Error(JSON.stringify(Z))}catch{}}return Error(Z)};var Z0=()=>{};var H,v,t,vZ,P0,I0,k0,y0,f0,b0,h0,g0,_0;var u=M(()=>{Z0();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.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 vZ({message:X,cause:R0($)});let z=$,Y=z?.error?.type;if(Z===400)return new I0(Z,z,X,J,Y);if(Z===401)return new k0(Z,z,X,J,Y);if(Z===403)return new y0(Z,z,X,J,Y);if(Z===404)return new f0(Z,z,X,J,Y);if(Z===409)return new b0(Z,z,X,J,Y);if(Z===422)return new h0(Z,z,X,J,Y);if(Z===429)return new g0(Z,z,X,J,Y);if(Z>=500)return new _0(Z,z,X,J,Y);return new v(Z,z,X,J,Y)}};t=class t extends v{constructor({message:Z}={}){super(void 0,void 0,Z||"Request was aborted.",void 0)}};vZ=class vZ extends v{constructor({message:Z,cause:$}){super(void 0,void 0,Z||"Connection error.",void 0);if($)this.cause=$}};P0=class P0 extends vZ{constructor({message:Z}={}){super({message:Z??"Request timed out."})}};I0=class I0 extends v{};k0=class k0 extends v{};y0=class y0 extends v{};f0=class f0 extends v{};b0=class b0 extends v{};h0=class h0 extends v{};g0=class g0 extends v{};_0=class _0 extends v{}});var SZ;var v0=M(()=>{SZ=class SZ 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 g$(){let Z,$;return{promise:new Promise((J,z)=>{Z=J,$=z}),resolve:Z,reject:$}}var T1=()=>{};var $0=function(){let{crypto:Z}=globalThis;if(Z?.randomUUID)return $0=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 g8=()=>{};function _8(Z){if(typeof Z!=="object")return{};return Z??{}}function v$(Z){if(!Z)return!0;for(let $ in Z)return!1;return!0}function A1(Z,$){return Object.prototype.hasOwnProperty.call(Z,$)}var P6,D1=(Z)=>{return P6.test(Z)},s=(Z)=>(s=Array.isArray,s(Z)),_$,L1=(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 CZ=M(()=>{u();P6=/^[a-z][a-z0-9+.-]*:/i,_$=s});var qZ=(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 X0=()=>{};var NZ="0.100.1";var m0=()=>{};function I6(){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 y6(){if(typeof navigator>"u"||!navigator)return null;let Z=[{key:"edge",pattern:/Edge(?:\W+(\d+)\.(\d+)(?:\.(\d+))?)?/},{key:"ie",pattern:/MSIE(?:\W+(\d+)\.(\d+)(?:\.(\d+))?)?/},{key:"ie",pattern:/Trident(?:.*rv\:(\d+)\.(\d+)(?:\.(\d+))?)?/},{key:"chrome",pattern:/Chrome(?:\W+(\d+)\.(\d+)(?:\.(\d+))?)?/},{key:"firefox",pattern:/Firefox(?:\W+(\d+)\.(\d+)(?:\.(\d+))?)?/},{key:"safari",pattern:/(?:Version\W+(\d+)\.(\d+)(?:\.(\d+))?)?(?:\W+Mobile\S*)?\W+Safari/}];for(let{key:$,pattern:X}of Z){let J=X.exec(navigator.userAgent);if(J){let z=J[1]||0,Y=J[2]||0,V=J[3]||0;return{browser:$,version:`${z}.${Y}.${V}`}}}return null}var R1=()=>{return typeof window<"u"&&typeof window.document<"u"&&typeof navigator<"u"},k6=()=>{let Z=I6();if(Z==="deno")return{"X-Stainless-Lang":"js","X-Stainless-Package-Version":NZ,"X-Stainless-OS":j1(Deno.build.os),"X-Stainless-Arch":S1(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":NZ,"X-Stainless-OS":"Unknown","X-Stainless-Arch":`other:${EdgeRuntime}`,"X-Stainless-Runtime":"edge","X-Stainless-Runtime-Version":globalThis.process.version};if(Z==="node")return{"X-Stainless-Lang":"js","X-Stainless-Package-Version":NZ,"X-Stainless-OS":j1(globalThis.process.platform??"unknown"),"X-Stainless-Arch":S1(globalThis.process.arch??"unknown"),"X-Stainless-Runtime":"node","X-Stainless-Runtime-Version":globalThis.process.version??"unknown"};let $=y6();if($)return{"X-Stainless-Lang":"js","X-Stainless-Package-Version":NZ,"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":NZ,"X-Stainless-OS":"Unknown","X-Stainless-Arch":"unknown","X-Stainless-Runtime":"unknown","X-Stainless-Runtime-Version":"unknown"}},S1=(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"},j1=(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"},E1,c0=()=>{return E1??(E1=k6())};var m8=M(()=>{m0()});function P1(){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 m$(...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 c8(Z){let $=Symbol.asyncIterator in Z?Z[Symbol.asyncIterator]():Z[Symbol.iterator]();return m$({start(){},async pull(X){let{done:J,value:z}=await $.next();if(J)X.close();else X.enqueue(z)},async cancel(){await $.return?.()}})}function u0(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 I1(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 J0=()=>{};var k1=({headers:Z,body:$})=>{return{bodyHeaders:{"content-type":"application/json"},body:JSON.stringify($)}};var y1=()=>{};var c$="RFC3986",u$=(Z)=>String(Z),d$,f1="RFC1738";var p$=M(()=>{d$={RFC1738:(Z)=>String(Z).replace(/%20/g,"+"),RFC3986:u$}});function h1(Z){if(!Z||typeof Z!=="object")return!1;return!!(Z.constructor&&Z.constructor.isBuffer&&Z.constructor.isBuffer(Z))}function i$(Z,$){if(s(Z)){let X=[];for(let J=0;J<Z.length;J+=1)X.push($(Z[J]));return X}return $(Z)}var u8=(Z,$)=>(u8=Object.hasOwn??Function.prototype.call.bind(Object.prototype.hasOwnProperty),u8(Z,$)),xZ,l$=1024,b1=(Z,$,X,J,z)=>{if(Z.length===0)return Z;let Y=Z;if(typeof Z==="symbol")Y=Symbol.prototype.toString.call(Z);else if(typeof Z!=="string")Y=String(Z);if(X==="iso-8859-1")return escape(Y).replace(/%u[0-9a-f]{4}/gi,function(Q){return"%26%23"+parseInt(Q.slice(2),16)+"%3B"});let V="";for(let Q=0;Q<Y.length;Q+=l$){let W=Y.length>=l$?Y.slice(Q,Q+l$):Y,O=[];for(let x=0;x<W.length;++x){let U=W.charCodeAt(x);if(U===45||U===46||U===95||U===126||U>=48&&U<=57||U>=65&&U<=90||U>=97&&U<=122||z===f1&&(U===40||U===41)){O[O.length]=W.charAt(x);continue}if(U<128){O[O.length]=xZ[U];continue}if(U<2048){O[O.length]=xZ[192|U>>6]+xZ[128|U&63];continue}if(U<55296||U>=57344){O[O.length]=xZ[224|U>>12]+xZ[128|U>>6&63]+xZ[128|U&63];continue}x+=1,U=65536+((U&1023)<<10|W.charCodeAt(x)&1023),O[O.length]=xZ[240|U>>18]+xZ[128|U>>12&63]+xZ[128|U>>6&63]+xZ[128|U&63]}V+=O.join("")}return V};var g1=M(()=>{p$();CZ();xZ=(()=>{let Z=[];for(let $=0;$<256;++$)Z.push("%"+(($<16?"0":"")+$.toString(16)).toUpperCase());return Z})()});function h6(Z){return typeof Z==="string"||typeof Z==="number"||typeof Z==="boolean"||typeof Z==="symbol"||typeof Z==="bigint"}function c1(Z,$,X,J,z,Y,V,Q,W,O,x,U,N,C,B,L,D,A){let F=Z,h=A,y=0,P=!1;while((h=h.get(n$))!==void 0&&!P){let c=h.get(Z);if(y+=1,typeof c<"u")if(c===y)throw RangeError("Cyclic object value");else P=!0;if(typeof h.get(n$)>"u")y=0}if(typeof O==="function")F=O($,F);else if(F instanceof Date)F=N?.(F);else if(X==="comma"&&s(F))F=i$(F,function(c){if(c instanceof Date)return N?.(c);return c});if(F===null){if(Y)return W&&!L?W($,i.encoder,D,"key",C):$;F=""}if(h6(F)||h1(F)){if(W){let c=L?$:W($,i.encoder,D,"key",C);return[B?.(c)+"="+B?.(W(F,i.encoder,D,"value",C))]}return[B?.($)+"="+B?.(String(F))]}let l=[];if(typeof F>"u")return l;let b;if(X==="comma"&&s(F)){if(L&&W)F=i$(F,W);b=[{value:F.length>0?F.join(",")||null:void 0}]}else if(s(O))b=O;else{let c=Object.keys(F);b=x?c.sort(x):c}let d=Q?String($).replace(/\./g,"%2E"):String($),g=J&&s(F)&&F.length===1?d+"[]":d;if(z&&s(F)&&F.length===0)return g+"[]";for(let c=0;c<b.length;++c){let GZ=b[c],_Z=typeof GZ==="object"&&typeof GZ.value<"u"?GZ.value:F[GZ];if(V&&_Z===null)continue;let h$=U&&Q?GZ.replace(/\./g,"%2E"):GZ,E6=s(F)?typeof X==="function"?X(g,h$):g:g+(U?"."+h$:"["+h$+"]");A.set(Z,y);let F1=new WeakMap;F1.set(n$,A),m1(l,c1(_Z,E6,X,J,z,Y,V,Q,X==="comma"&&L&&s(F)?null:W,O,x,U,N,C,B,L,D,F1))}return l}function g6(Z=i){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||i.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=c$;if(typeof Z.format<"u"){if(!u8(d$,Z.format))throw TypeError("Unknown format option provided.");X=Z.format}let J=d$[X],z=i.filter;if(typeof Z.filter==="function"||s(Z.filter))z=Z.filter;let Y;if(Z.arrayFormat&&Z.arrayFormat in v1)Y=Z.arrayFormat;else if("indices"in Z)Y=Z.indices?"indices":"repeat";else Y=i.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:i.allowDots:!!Z.allowDots;return{addQueryPrefix:typeof Z.addQueryPrefix==="boolean"?Z.addQueryPrefix:i.addQueryPrefix,allowDots:V,allowEmptyArrays:typeof Z.allowEmptyArrays==="boolean"?!!Z.allowEmptyArrays:i.allowEmptyArrays,arrayFormat:Y,charset:$,charsetSentinel:typeof Z.charsetSentinel==="boolean"?Z.charsetSentinel:i.charsetSentinel,commaRoundTrip:!!Z.commaRoundTrip,delimiter:typeof Z.delimiter>"u"?i.delimiter:Z.delimiter,encode:typeof Z.encode==="boolean"?Z.encode:i.encode,encodeDotInKeys:typeof Z.encodeDotInKeys==="boolean"?Z.encodeDotInKeys:i.encodeDotInKeys,encoder:typeof Z.encoder==="function"?Z.encoder:i.encoder,encodeValuesOnly:typeof Z.encodeValuesOnly==="boolean"?Z.encodeValuesOnly:i.encodeValuesOnly,filter:z,format:X,formatter:J,serializeDate:typeof Z.serializeDate==="function"?Z.serializeDate:i.serializeDate,skipNulls:typeof Z.skipNulls==="boolean"?Z.skipNulls:i.skipNulls,sort:typeof Z.sort==="function"?Z.sort:null,strictNullHandling:typeof Z.strictNullHandling==="boolean"?Z.strictNullHandling:i.strictNullHandling}}function u1(Z,$={}){let X=Z,J=g6($),z,Y;if(typeof J.filter==="function")Y=J.filter,X=Y("",X);else if(s(J.filter))Y=J.filter,z=Y;let V=[];if(typeof X!=="object"||X===null)return"";let Q=v1[J.arrayFormat],W=Q==="comma"&&J.commaRoundTrip;if(!z)z=Object.keys(X);if(J.sort)z.sort(J.sort);let O=new WeakMap;for(let N=0;N<z.length;++N){let C=z[N];if(J.skipNulls&&X[C]===null)continue;m1(V,c1(X[C],C,Q,W,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,O))}let x=V.join(J.delimiter),U=J.addQueryPrefix===!0?"?":"";if(J.charsetSentinel)if(J.charset==="iso-8859-1")U+="utf8=%26%2310003%3B&";else U+="utf8=%E2%9C%93&";return x.length>0?U+x:""}var v1,m1=function(Z,$){Array.prototype.push.apply(Z,s($)?$:[$])},_1,i,n$;var d1=M(()=>{g1();p$();CZ();v1={brackets(Z){return String(Z)+"[]"},comma:"comma",indices(Z,$){return String(Z)+"["+$+"]"},repeat(Z){return String(Z)}},i={addQueryPrefix:!1,allowDots:!1,allowEmptyArrays:!1,arrayFormat:"indices",charset:"utf-8",charsetSentinel:!1,delimiter:"&",encode:!0,encodeDotInKeys:!1,encoder:b1,encodeValuesOnly:!1,format:c$,formatter:u$,indices:!1,serializeDate(Z){return(_1??(_1=Function.prototype.call.bind(Date.prototype.toISOString)))(Z)},skipNulls:!1,strictNullHandling:!1};n$={}});function p1(Z){return u1(Z,{arrayFormat:"brackets"})}var a$=M(()=>{d1()});function p8(Z){if(!Z)return;let $;try{$=new URL(Z)}catch(J){throw new R(`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 R(`Refusing to send credential over non-https token endpoint "${Z}"`)}async function l8(Z,$){let X=await m6(Z),J;try{J=JSON.parse(X)}catch{throw new R(`Token endpoint returned non-JSON response (status ${Z.status})`,Z.status,ZZ(X),$)}if(!J.access_token)throw new R(`Token endpoint response missing access_token: ${JSON.stringify(ZZ(J))}`,Z.status,ZZ(J),$);if(J.token_type&&J.token_type.toLowerCase()!=="bearer")throw new R(`Token endpoint response: unsupported token_type "${J.token_type}" (want Bearer)`,Z.status,ZZ(J),$);return J}function ZZ(Z){if(Z==null)return Z;if(typeof Z==="string"){let $;try{$=JSON.parse(Z)}catch{if(Z.length<=r$)return Z;return Z.slice(0,r$)+`... <${Z.length-r$} more chars>`}return JSON.stringify(ZZ($))}if(typeof Z==="object"&&!Array.isArray(Z)){let $={};for(let[X,J]of Object.entries(Z))if(v6.has(X))$[X]=J;return $}return null}async function i8(Z,$=(X)=>console.warn(`anthropic-sdk: ${X}`)){if(typeof process>"u"||process.platform==="win32")return;let X=await import("node:fs"),J=Z,z;try{J=await X.promises.realpath(Z),z=await X.promises.stat(J)}catch{return}let Y=z.mode&511;if(Y&18)throw new R(`Credentials file at ${J} is group/world-writable (mode 0o${Y.toString(8)}); this allows other local users to plant tokens. Run \`chmod 600 ${J}\`.`);if(Y&36)throw new R(`Credentials file at ${J} is group/world-readable (mode 0o${Y.toString(8)}); run \`chmod 600 ${J}\` before retrying.`);if(typeof process.getuid==="function"&&z.uid!==process.getuid())$(`credentials file at ${J} is owned by uid ${z.uid} (current process uid ${process.getuid()}); verify this is intentional.`)}async function n8(Z,$){let X=await import("node:fs"),z=(await import("node:path")).dirname(Z);await X.promises.mkdir(z,{recursive:!0,mode:448});let Y=`${Z}.${process.pid}.${Math.random().toString(36).slice(2)}.tmp`;try{let V=await X.promises.open(Y,"w",384);try{await V.writeFile(JSON.stringify($,null,2)),await V.sync()}finally{await V.close()}await X.promises.rename(Y,Z)}catch(V){throw await X.promises.unlink(Y).catch(()=>{}),V}try{let V=await X.promises.open(z,"r");try{await V.sync()}finally{await V.close()}}catch{}}async function m6(Z){if(!Z.body)return"";let $=Z.body.getReader(),X=[],J=0;for(;;){let{done:Y,value:V}=await $.read();if(Y)break;if(J+V.length>l1){let Q=l1-J;if(Q>0)X.push(V.subarray(0,Q));await $.cancel();break}X.push(V),J+=V.length}let z;if(X.length===1)z=X[0];else{z=new Uint8Array(X.reduce((V,Q)=>V+Q.length,0));let Y=0;for(let V of X)z.set(V,Y),Y+=V.length}return new TextDecoder("utf-8").decode(z)}var i1="urn:ietf:params:oauth:grant-type:jwt-bearer",n1="refresh_token",d8="/v1/oauth/token",mZ="oauth-2025-04-20",a1="oidc-federation-2026-04-01",r1=120,z0=30,o1=5,l1=1048576,r$=2000,v6,R;var Y0=M(()=>{u();v6=new Set(["error","error_description","error_uri"]);R=class R extends H{constructor(Z,$=null,X=null,J=null){super(Z);this.statusCode=$,this.body=X,this.requestId=J}}});function OZ(){return Math.floor(Date.now()/1000)}var d0=()=>{};class o${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-OZ();if(X>r1)return $.token;if(X>z0)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(OZ()-this.lastAdvisoryError<o1)return;this.doRefresh().catch((Z)=>{this.lastAdvisoryError=OZ(),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 t1=M(()=>{Y0();d0()});var S=(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 p0=()=>{};function Z4(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 K0(Z){let $;return(s1??($=new globalThis.TextEncoder,s1=$.encode.bind($)))(Z)}function t$(Z){let $;return(e1??($=new globalThis.TextDecoder,e1=$.decode.bind($)))(Z)}var s1,e1;var a8=()=>{};var $4=M(()=>{u();a8()});function l0(){}function r8(Z,$,X){if(!$||o8[Z]>o8[X])return l0;else return $[Z].bind($)}function k(Z){let $=Z.logger,X=Z.logLevel??"off";if(!$)return c6;let J=X4.get($);if(J&&J[0]===X)return J[1];let z={error:r8("error",$,X),warn:r8("warn",$,X),info:r8("info",$,X),debug:r8("debug",$,X)};return X4.set($,[X,z]),z}var o8,s$=(Z,$,X)=>{if(!Z)return;if(A1(o8,Z))return Z;k(X).warn(`${$} was set to ${JSON.stringify(Z)}, expected one of ${JSON.stringify(Object.keys(o8))}`);return},c6,X4,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 jZ=M(()=>{CZ();o8={off:0,error:200,warn:300,info:400,debug:500};c6={error:l0,warn:l0,info:l0,debug:l0},X4=new WeakMap});var J4=M(()=>{CZ();$4();p0();jZ();g8();X0();a$()});function z4(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(!u6.test(Z))throw Error(`profile name "${Z}" contains disallowed characters (allowed: letters, digits, '_', '.', '-')`)}var t8="1.0",u6,Y4=async(Z)=>{var $,X;let J=await e$();if(J===null)return null;let z=Z??await Q4();if(z===null)return null;z4(z);let Y=await import("node:fs"),Q=(await import("node:path")).join(J,"configs",`${z}.json`),W;try{W=await Y.promises.readFile(Q,"utf-8")}catch(U){if(U?.code!=="ENOENT")throw Error(`failed to read config file ${Q}: ${U}`);W=null}if(W===null){let U=S("ANTHROPIC_ORGANIZATION_ID"),N=S("ANTHROPIC_IDENTITY_TOKEN_FILE"),C=S("ANTHROPIC_FEDERATION_RULE_ID");if(C&&U)return{fromFile:!1,config:{organization_id:U,workspace_id:S("ANTHROPIC_WORKSPACE_ID"),base_url:S("ANTHROPIC_BASE_URL"),authentication:{type:"oidc_federation",federation_rule_id:C,service_account_id:S("ANTHROPIC_SERVICE_ACCOUNT_ID"),identity_token:N?{source:"file",path:N}:void 0,scope:S("ANTHROPIC_SCOPE")}}};return null}let O;try{O=JSON.parse(W)}catch(U){throw Error(`failed to parse config file ${Q}: ${U}`)}if(!O.authentication)throw Error(`config file ${Q} is missing "authentication"`);let x=O.authentication.type;if(x!=="oidc_federation"&&x!=="user_oauth")throw Error(`authentication.type "${x}" is not a known authentication type`);if(O.organization_id??(O.organization_id=S("ANTHROPIC_ORGANIZATION_ID")),O.workspace_id??(O.workspace_id=S("ANTHROPIC_WORKSPACE_ID")),O.base_url??(O.base_url=S("ANTHROPIC_BASE_URL")),($=O.authentication).scope??($.scope=S("ANTHROPIC_SCOPE")),O.authentication.type==="oidc_federation"){if(!O.authentication.identity_token){let U=S("ANTHROPIC_IDENTITY_TOKEN_FILE");if(U)O.authentication.identity_token={source:"file",path:U}}if(!O.authentication.federation_rule_id)O.authentication.federation_rule_id=S("ANTHROPIC_FEDERATION_RULE_ID")??"";(X=O.authentication).service_account_id??(X.service_account_id=S("ANTHROPIC_SERVICE_ACCOUNT_ID"))}return{config:O,fromFile:!0}},K4=async(Z,$)=>{if(Z?.authentication.credentials_path)return Z.authentication.credentials_path;let X=await e$();if(!X)return null;let J=$??await Q4();if(!J)return null;return z4(J),(await import("node:path")).join(X,"credentials",`${J}.json`)},e$=async()=>{if(!d6())return null;let Z=await import("node:path"),$=S("ANTHROPIC_CONFIG_DIR");if($)return $;if(c0()["X-Stainless-OS"]==="Windows"){let Y=S("APPDATA");if(Y)return Z.join(Y,"Anthropic");let V=S("USERPROFILE");if(V)return Z.join(V,"AppData","Roaming","Anthropic");return null}let J=S("XDG_CONFIG_HOME");if(J)return Z.join(J,"anthropic");let z=S("HOME");if(z)return Z.join(z,".config","anthropic");return null},d6=()=>{let Z=c0()["X-Stainless-Runtime"];return Z==="node"||Z==="deno"},Q4=async()=>{let Z=await e$();if(!Z)return null;let $=S("ANTHROPIC_PROFILE");if($)return $;let X=await import("node:fs"),z=(await import("node:path")).join(Z,"active_config");try{return(await X.promises.readFile(z,"utf-8")).trim()||"default"}catch(Y){if(Y?.code!=="ENOENT")throw Error(`failed to read ${z}: ${Y}`);return"default"}};var ZX=M(()=>{m8();J4();u6=/^[A-Za-z0-9_.-]+$/});function $X(Z){if(!Z)throw new H("Identity token file path is empty");return async()=>{let $=await import("node:fs"),X;try{X=await $.promises.readFile(Z,"utf-8")}catch(z){throw new H(`Failed to read identity token file at ${Z}: ${z}`)}let J=X.trim();if(!J)throw new H(`Identity token file at ${Z} is empty`);return J}}function V4(Z){if(!Z)throw new H("Identity token value is empty");return()=>Z}var G4=M(()=>{u()});function N4(Z){return async()=>{p8(Z.baseURL);let $=await Z.identityTokenProvider();if($.length>16384)throw new R(`Identity token is ${Math.ceil($.length/1024)} KiB, exceeds the 16 KiB assertion limit`);let X={grant_type:i1,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}${d8}`,z;try{z=await Z.fetch(J,{method:"POST",headers:{"Content-Type":"application/json","anthropic-beta":`${mZ},${a1}`,"User-Agent":Z.userAgent||`anthropic-sdk-typescript/${NZ} oidcFederationProvider`},body:JSON.stringify(X)})}catch(W){throw new R(`Failed to reach token endpoint ${J}: ${W}`)}let Y=z.headers.get("Request-Id");if(!z.ok){let W=await z.text().catch(()=>""),O=ZZ(W),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 R(`Token exchange failed with status ${z.status}${Y?` (request-id ${Y})`:""}: ${O}${x}`,z.status,O,Y)}let V=await l8(z,Y),Q=Number(V.expires_in);if(!Number.isFinite(Q))throw new R(`Token endpoint response missing required fields: ${JSON.stringify(ZZ(V))}`,z.status,ZZ(V),Y);return{token:V.access_token,expiresAt:OZ()+Q}}}var U4=M(()=>{Y0();d0();m0()});function W4(Z){return async($)=>{let X=await import("node:fs");await i8(Z.credentialsPath,Z.onSafetyWarning);let J;try{J=await X.promises.readFile(Z.credentialsPath,"utf-8")}catch(D){throw new R(`Credentials file not found at ${Z.credentialsPath}: ${D}`)}let z;try{z=JSON.parse(J)}catch(D){throw new R(`Credentials file at ${Z.credentialsPath} is not valid JSON: ${D}`)}let Y=z.access_token;if(!Y)throw new R(`Credentials file at ${Z.credentialsPath} must include 'access_token'`);let V=z.expires_at;if(!$?.forceRefresh&&(V==null||OZ()<V-z0))return{token:Y,expiresAt:V??null};let Q=z.refresh_token;if(!Z.clientId||!Q)throw new R(`Access token at ${Z.credentialsPath} has expired and no refresh is available (client_id ${Z.clientId?"set":"empty"}, refresh_token ${Q?"set":"empty"})`);p8(Z.baseURL);let W={grant_type:n1,refresh_token:Q,client_id:Z.clientId},O=`${Z.baseURL}${d8}`,x;try{x=await Z.fetch(O,{method:"POST",headers:{"Content-Type":"application/json","anthropic-beta":mZ,"User-Agent":Z.userAgent||`anthropic-sdk-typescript/${NZ} userOAuthProvider`},body:JSON.stringify(W)})}catch(D){throw new R(`User OAuth refresh failed to reach token endpoint: ${D}`)}let U=x.headers.get("Request-Id");if(!x.ok){let D=await x.text().catch(()=>"");throw new R(`User OAuth refresh failed (HTTP ${x.status}): ${ZZ(D)}`,x.status,ZZ(D),U)}let N=await l8(x,U),C=Number(N.expires_in);if(!Number.isFinite(C))throw new R(`User OAuth refresh response missing or invalid expires_in: ${JSON.stringify(ZZ(N))}`,x.status,ZZ(N),U);let B=OZ()+C,L=N.refresh_token||Q;return await n8(Z.credentialsPath,{...z,version:t8,type:"oauth_token",access_token:N.access_token,expires_at:B,refresh_token:L}),{token:N.access_token,expiresAt:B}}}var w4=M(()=>{ZX();Y0();d0();m0()});function XX(Z,$){let X=Z.authentication.credentials_path??null,J=(Z.base_url||$.baseURL).replace(/\/+$/,""),z=p6(Z,X,J,$),Y={};if(Z.workspace_id&&Z.authentication.type==="user_oauth")Y["anthropic-workspace-id"]=Z.workspace_id;return{provider:z,extraHeaders:Y,baseURL:Z.base_url||void 0}}async function q4(Z,$){let X=await Y4($);if(!X)return null;let{config:J,fromFile:z}=X,Y=J.authentication.credentials_path||!z?J:{...J,authentication:{...J.authentication,credentials_path:await K4(J,$)??void 0}};return XX(Y,Z)}function p6(Z,$,X,J){switch(Z.authentication.type){case"oidc_federation":{let z=Z.authentication,Y=l6(z);if(!Y)throw new R("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 R("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 R("oidc_federation config requires organization_id (set ANTHROPIC_ORGANIZATION_ID or config.organization_id)");let V=N4({identityTokenProvider:Y,federationRuleId:z.federation_rule_id,organizationId:Z.organization_id,serviceAccountId:z.service_account_id,workspaceId:Z.workspace_id,baseURL:X,fetch:J.fetch,userAgent:J.userAgent});if($)return i6(V,$,J.onCacheWriteError,J.onSafetyWarning);return V}case"user_oauth":{if(!$)throw new R("user_oauth config requires authentication.credentials_path (or load via a profile so it defaults to <config_dir>/credentials/<profile>.json)");return W4({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 R(`authentication.type "${z}" is not a known authentication type`)}}}function l6(Z){if(Z.identity_token){let J=Z.identity_token.source;if(J!=="file")throw new R(`identity_token.source "${J}" is not supported by this SDK version (only "file")`);if(!Z.identity_token.path)throw new R('identity_token.source "file" requires a non-empty path');return $X(Z.identity_token.path)}let $=S("ANTHROPIC_IDENTITY_TOKEN_FILE");if($)return $X($);let X=S("ANTHROPIC_IDENTITY_TOKEN");if(X)return V4(X);return null}function i6(Z,$,X,J){return async(z)=>{let Y=await import("node:fs");await i8($,J);let V;try{let W=await Y.promises.readFile($,"utf-8");V=JSON.parse(W);let O=V?.access_token;if(O&&!z?.forceRefresh){let x=V?.expires_at;if(x==null||OZ()<x-z0)return{token:O,expiresAt:x??null}}}catch(W){if(W?.code!=="ENOENT"&&!(W instanceof SyntaxError))X?.(W)}let Q=await Z(z);try{await n8($,{...V??{},version:t8,type:"oauth_token",access_token:Q.token,expires_at:Q.expiresAt})}catch(W){X?.(W)}return Q}}var O4=M(()=>{p0();ZX();Y0();d0();G4();U4();w4()});class EZ{constructor(){zZ.set(this,void 0),YZ.set(this,void 0),w(this,zZ,new Uint8Array,"f"),w(this,YZ,null,"f")}decode(Z){if(Z==null)return[];let $=Z instanceof ArrayBuffer?new Uint8Array(Z):typeof Z==="string"?K0(Z):Z;w(this,zZ,Z4([K(this,zZ,"f"),$]),"f");let X=[],J;while((J=n6(K(this,zZ,"f"),K(this,YZ,"f")))!=null){if(J.carriage&&K(this,YZ,"f")==null){w(this,YZ,J.index,"f");continue}if(K(this,YZ,"f")!=null&&(J.index!==K(this,YZ,"f")+1||J.carriage)){X.push(t$(K(this,zZ,"f").subarray(0,K(this,YZ,"f")-1))),w(this,zZ,K(this,zZ,"f").subarray(K(this,YZ,"f")),"f"),w(this,YZ,null,"f");continue}let z=K(this,YZ,"f")!==null?J.preceding-1:J.preceding,Y=t$(K(this,zZ,"f").subarray(0,z));X.push(Y),w(this,zZ,K(this,zZ,"f").subarray(J.index),"f"),w(this,YZ,null,"f")}return X}flush(){if(!K(this,zZ,"f").length)return[];return this.decode(`
2
+ `)}}function n6(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 M4(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 zZ,YZ;var JX=M(()=>{XZ();a8();zZ=new WeakMap,YZ=new WeakMap;EZ.NEWLINE_CHARS=new Set([`
3
+ `,"\r"]);EZ.NEWLINE_REGEXP=/\r\n|[\n\r]/g});async function*a6(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 C4,J=new EZ,z=u0(Z.body);for await(let Y of r6(z))for(let V of J.decode(Y)){let Q=X.decode(V);if(Q)yield Q}for(let Y of J.flush()){let V=X.decode(Y);if(V)yield V}}async function*r6(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"?K0(X):X,z=new Uint8Array($.length+J.length);z.set($),z.set(J,$.length),$=z;let Y;while((Y=M4($))!==-1)yield $.slice(0,Y),$=$.slice(Y)}if($.length>0)yield $}class C4{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]=o6(Z,":");if(J.startsWith(" "))J=J.substring(1);if($==="event")this.event=J;else if($==="data")this.data.push(J);return null}}function o6(Z,$){let X=Z.indexOf($);if(X!==-1)return[Z.substring(0,X),$,Z.substring(X+$.length)];return[Z,"",""]}var i0,KZ;var zX=M(()=>{XZ();u();J0();JX();J0();Z0();CZ();a8();jZ();u();KZ=class KZ{constructor(Z,$,X){this.iterator=Z,i0.set(this,void 0),this.controller=$,w(this,i0,X,"f")}static fromSSEResponse(Z,$,X){let J=!1,z=X?k(X):console;async function*Y(){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 Q of a6(Z,$)){if(Q.event==="completion")try{yield JSON.parse(Q.data)}catch(W){throw z.error("Could not parse message into JSON:",Q.data),z.error("From chunk:",Q.raw),W}if(Q.event==="message_start"||Q.event==="message_delta"||Q.event==="message_stop"||Q.event==="content_block_start"||Q.event==="content_block_delta"||Q.event==="content_block_stop"||Q.event==="message"||Q.event==="user.message"||Q.event==="user.interrupt"||Q.event==="user.tool_confirmation"||Q.event==="user.custom_tool_result"||Q.event==="user.tool_result"||Q.event==="agent.message"||Q.event==="agent.thinking"||Q.event==="agent.tool_use"||Q.event==="agent.tool_result"||Q.event==="agent.mcp_tool_use"||Q.event==="agent.mcp_tool_result"||Q.event==="agent.custom_tool_use"||Q.event==="agent.thread_context_compacted"||Q.event==="session.status_running"||Q.event==="session.status_idle"||Q.event==="session.status_rescheduled"||Q.event==="session.status_terminated"||Q.event==="session.error"||Q.event==="session.deleted"||Q.event==="session.updated"||Q.event==="span.model_request_start"||Q.event==="span.model_request_end"||Q.event==="span.outcome_evaluation_start"||Q.event==="span.outcome_evaluation_ongoing"||Q.event==="span.outcome_evaluation_end"||Q.event==="user.define_outcome"||Q.event==="agent.thread_message_received"||Q.event==="agent.thread_message_sent"||Q.event==="agent.session_thread_message_received"||Q.event==="agent.session_thread_message_sent"||Q.event==="session.thread_created"||Q.event==="session.thread_status_created"||Q.event==="session.thread_status_running"||Q.event==="session.thread_status_idle"||Q.event==="session.thread_status_rescheduled"||Q.event==="session.thread_status_terminated")try{yield JSON.parse(Q.data)}catch(W){throw z.error("Could not parse message into JSON:",Q.data),z.error("From chunk:",Q.raw),W}if(Q.event==="ping")continue;if(Q.event==="error"){let W=v8(Q.data)??Q.data,O=W?.error?.type;throw new v(void 0,W,void 0,Z.headers,O)}}V=!0}catch(Q){if(BZ(Q))return;throw Q}finally{if(!V)$.abort()}}return new KZ(Y,$,X)}static fromReadableStream(Z,$,X){let J=!1;async function*z(){let V=new EZ,Q=u0(Z);for await(let W of Q)for(let O of V.decode(W))yield O;for(let W of V.flush())yield W}async function*Y(){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 Q of z()){if(V)continue;if(Q)yield JSON.parse(Q)}V=!0}catch(Q){if(BZ(Q))return;throw Q}finally{if(!V)$.abort()}}return new KZ(Y,$,X)}[(i0=new WeakMap,Symbol.asyncIterator)](){return this.iterator()}tee(){let Z=[],$=[],X=this.iterator(),J=(z)=>{return{next:()=>{if(z.length===0){let Y=X.next();Z.push(Y),$.push(Y)}return z.shift()}}};return[new KZ(()=>J(Z),this.controller,K(this,i0,"f")),new KZ(()=>J($),this.controller,K(this,i0,"f"))]}toReadableStream(){let Z=this,$;return m$({async start(){$=Z[Symbol.asyncIterator]()},async pull(X){try{let{value:J,done:z}=await $.next();if(z)return X.close();let Y=K0(JSON.stringify(J)+`
5
+ `);X.enqueue(Y)}catch(J){X.error(J)}},async cancel(){await $.return?.()}})}}});async function s8(Z,$){let{response:X,requestLogID:J,retryOfRequestLogID:z,startTime:Y}=$,V=await(async()=>{if($.options.stream){if(k(Z).debug("response",X.status,X.url,X.headers,X.body),$.options.__streamClass)return $.options.__streamClass.fromSSEResponse(X,$.controller);return KZ.fromSSEResponse(X,$.controller)}if(X.status===204)return null;if($.options.__binaryResponse)return X;let W=X.headers.get("content-type")?.split(";")[0]?.trim();if(W?.includes("application/json")||W?.endsWith("+json")){if(X.headers.get("content-length")==="0")return;let N=await X.json();return YX(N,X)}return await X.text()})();return k(Z).debug(`[${J}] response parsed`,FZ({retryOfRequestLogID:z,url:X.url,status:X.status,body:V,durationMs:Date.now()-Y})),V}function YX(Z,$){if(!Z||typeof Z!=="object"||Array.isArray(Z))return Z;return Object.defineProperty(Z,"_request_id",{value:$.headers.get("request-id"),enumerable:!1})}var KX=M(()=>{zX();jZ()});var n0,cZ;var e8=M(()=>{XZ();KX();cZ=class cZ extends Promise{constructor(Z,$,X=s8){super((J)=>{J(null)});this.responsePromise=$,this.parseResponse=X,n0.set(this,void 0),w(this,n0,Z,"f")}_thenUnwrap(Z){return new cZ(K(this,n0,"f"),this.responsePromise,async($,X)=>YX(Z(await this.parseResponse($,X),X),X.response))}asResponse(){return this.responsePromise.then((Z)=>Z.response)}async withResponse(){let[Z,$]=await Promise.all([this.parse(),this.asResponse()]);return{data:Z,response:$,request_id:$.headers.get("request-id")}}parse(){if(!this.parsedPromise)this.parsedPromise=this.responsePromise.then((Z)=>this.parseResponse(K(this,n0,"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)}};n0=new WeakMap});var Z$,QX,$$,MZ,j;var f=M(()=>{XZ();u();KX();e8();CZ();QX=class QX{constructor(Z,$,X,J){Z$.set(this,void 0),w(this,Z$,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 K(this,Z$,"f").requestAPIList(this.constructor,Z)}async*iterPages(){let Z=this;yield Z;while(Z.hasNextPage())Z=await Z.getNextPage(),yield Z}async*[(Z$=new WeakMap,Symbol.asyncIterator)](){for await(let Z of this.iterPages())for(let $ of Z.getPaginatedItems())yield $}};$$=class $$ extends cZ{constructor(Z,$,X){super(Z,$,async(J,z)=>new X(J,z.response,await s8(J,z),z.options))}async*[Symbol.asyncIterator](){let Z=await this;for await(let $ of Z)yield $}};MZ=class MZ extends QX{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:{..._8(this.options.query),before_id:$}}}let Z=this.last_id;if(!Z)return null;return{...this.options,query:{..._8(this.options.query),after_id:Z}}}};j=class j extends QX{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:{..._8(this.options.query),page:Z}}}}});function uZ(Z,$,X){return GX(),new File(Z,$??"unknown_file",X)}function a0(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 s6(Z){let $=typeof Z==="function"?Z:Z.fetch,X=x4.get($);if(X)return X;let J=(async()=>{try{let z="Response"in $?$.Response:(await $("data:,")).constructor,Y=new FormData;if(Y.toString()===await new z(Y).text())return!1;return!0}catch{return!0}})();return x4.set($,J),J}var GX=()=>{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`.":""))}},NX=(Z)=>Z!=null&&typeof Z==="object"&&typeof Z[Symbol.asyncIterator]==="function",Q0=async(Z,$,X=!0)=>{return{...Z,body:await e6(Z.body,$,X)}},x4,e6=async(Z,$,X=!0)=>{if(!await s6($))throw TypeError("The provided fetch function does not support file uploads with the current global FormData class.");let J=new FormData;return await Promise.all(Object.entries(Z||{}).map(([z,Y])=>VX(J,z,Y,X))),J},Z9=(Z)=>Z instanceof Blob&&("name"in Z),VX=async(Z,$,X,J)=>{if(X===void 0)return;if(X==null)throw TypeError(`Received null for "${$}"; to pass null in FormData, you must use the string 'null'`);if(typeof X==="string"||typeof X==="number"||typeof X==="boolean")Z.append($,String(X));else if(X instanceof Response){let z={},Y=X.headers.get("Content-Type");if(Y)z={type:Y};Z.append($,uZ([await X.blob()],a0(X,J),z))}else if(NX(X))Z.append($,uZ([await new Response(c8(X)).blob()],a0(X,J)));else if(Z9(X))Z.append($,uZ([X],a0(X,J),{type:X.type}));else if(Array.isArray(X))await Promise.all(X.map((z)=>VX(Z,$+"[]",z,J)));else if(typeof X==="object")await Promise.all(Object.entries(X).map(([z,Y])=>VX(Z,`${$}[${z}]`,Y,J)));else throw TypeError(`Invalid value given to form, expected a string, number, boolean, object, Array, File or Blob but got ${X} instead`)};var V0=M(()=>{J0();x4=new WeakMap});async function X$(Z,$,X){if(GX(),Z=await Z,$||($=a0(Z,!0)),$9(Z)){if(Z instanceof File&&$==null&&X==null)return Z;return uZ([await Z.arrayBuffer()],$??Z.name,{type:Z.type,lastModified:Z.lastModified,...X})}if(X9(Z)){let z=await Z.blob();return $||($=new URL(Z.url).pathname.split(/[\\/]/).pop()),uZ(await UX(z),$,X)}let J=await UX(Z);if(!X?.type){let z=J.find((Y)=>typeof Y==="object"&&("type"in Y)&&Y.type);if(typeof z==="string")X={...X,type:z}}return uZ(J,$,X)}async function UX(Z){let $=[];if(typeof Z==="string"||ArrayBuffer.isView(Z)||Z instanceof ArrayBuffer)$.push(Z);else if(H4(Z))$.push(Z instanceof Blob?Z:await Z.arrayBuffer());else if(NX(Z))for await(let X of Z)$.push(...await UX(X));else{let X=Z?.constructor?.name;throw Error(`Unexpected data type: ${typeof Z}${X?`; constructor: ${X}`:""}${J9(Z)}`)}return $}function J9(Z){if(typeof Z!=="object"||Z===null)return"";return`; props: [${Object.getOwnPropertyNames(Z).map((X)=>`"${X}"`).join(", ")}]`}var H4=(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",$9=(Z)=>Z!=null&&typeof Z==="object"&&typeof Z.name==="string"&&typeof Z.lastModified==="number"&&H4(Z),X9=(Z)=>Z!=null&&typeof Z==="object"&&typeof Z.url==="string"&&typeof Z.blob==="function";var B4=M(()=>{V0();V0()});var WX=M(()=>{B4()});var F4=()=>{};class T{constructor(Z){this._client=Z}}var I=()=>{};function*Y9(Z){if(!Z)return;if(T4 in Z){let{values:J,nulls:z}=Z;yield*J.entries();for(let Y of z)yield[Y,null];return}let $=!1,X;if(Z instanceof Headers)X=Z.entries();else if(_$(Z))X=Z;else $=!0,X=Object.entries(Z??{});for(let J of X){let z=J[0];if(typeof z!=="string")throw TypeError("expected header name to be a string");let Y=_$(J[1])?J[1]:[J[1]],V=!1;for(let Q of Y){if(Q===void 0)continue;if($&&!V)V=!0,yield[z,null];yield[z,Q]}}}var T4,G=(Z)=>{let $=new Headers,X=new Set;for(let J of Z){let z=new Set;for(let[Y,V]of Y9(J)){let Q=Y.toLowerCase();if(!z.has(Q))$.delete(Y),z.add(Q);if(V===null)$.delete(Y),X.add(Q);else $.append(Y,V),X.delete(Q)}}return{[T4]:!0,values:$,nulls:X}};var E=M(()=>{CZ();T4=Symbol.for("brand.privateNullableHeaders")});function J$(Z){return typeof Z==="object"&&Z!==null&&r0 in Z}function wX(Z,$){let X=new Set;if(Z){for(let J of Z)if(J$(J))X.add(J[r0])}if($)for(let J of $){if(J$(J))X.add(J[r0]);if(Array.isArray(J.content)){for(let z of J.content)if(J$(z))X.add(z[r0])}}return Array.from(X)}function z$(Z,$){let X=wX(Z,$);if(X.length===0)return{};return{"x-stainless-helper":X.join(", ")}}function D4(Z){if(J$(Z))return{"x-stainless-helper":Z[r0]};return{}}var r0;var o0=M(()=>{r0=Symbol("anthropic.sdk.stainlessHelper")});function L4(Z){return Z.replace(/[^A-Za-z0-9\-._~!$&'()*+,;=:@]+/g,encodeURIComponent)}var A4,K9=(Z=L4)=>function(X,...J){if(X.length===1)return X[0];let z=!1,Y=[],V=X.reduce((x,U,N)=>{if(/[?#]/.test(U))z=!0;let C=J[N],B=(z?encodeURIComponent:Z)(""+C);if(N!==J.length&&(C==null||typeof C==="object"&&C.toString===Object.getPrototypeOf(Object.getPrototypeOf(C.hasOwnProperty??A4)??A4)?.toString))B=C+"",Y.push({start:x.length+U.length,length:B.length,error:`Value of type ${Object.prototype.toString.call(C).slice(8,-1)} is not a valid path parameter`});return x+U+(N===J.length?"":B)},""),Q=V.split(/[?#]/,1)[0],W=/(?<=^|\/)(?:\.|%2e){1,2}(?=\/|$)/gi,O;while((O=W.exec(Q))!==null)Y.push({start:O.index,length:O[0].length,error:`Value "${O[0]}" can't be safely passed as a path parameter`});if(Y.sort((x,U)=>x.start-U.start),Y.length>0){let x=0,U=Y.reduce((N,C)=>{let B=" ".repeat(C.start-x),L="^".repeat(C.length);return x=C.start+C.length,N+B+L},"");throw new H(`Path parameters result in path with invalid segments:
6
+ ${Y.map((N)=>N.error).join(`
7
+ `)}
8
+ ${V}
9
+ ${U}`)}return V},q;var _=M(()=>{u();A4=Object.freeze(Object.create(null)),q=K9(L4)});var t0;var qX=M(()=>{I();f();E();o0();V0();_();t0=class t0 extends T{list(Z={},$){let{betas:X,...J}=Z??{};return this._client.getAPIList("/v1/files?beta=true",MZ,{query:J,...$,headers:G([{"anthropic-beta":[...X??[],"files-api-2025-04-14"].toString()},$?.headers])})}delete(Z,$={},X){let{betas:J}=$??{};return this._client.delete(q`/v1/files/${Z}?beta=true`,{...X,headers:G([{"anthropic-beta":[...J??[],"files-api-2025-04-14"].toString()},X?.headers])})}download(Z,$={},X){let{betas:J}=$??{};return this._client.get(q`/v1/files/${Z}/content?beta=true`,{...X,headers:G([{"anthropic-beta":[...J??[],"files-api-2025-04-14"].toString(),Accept:"application/binary"},X?.headers]),__binaryResponse:!0})}retrieveMetadata(Z,$={},X){let{betas:J}=$??{};return this._client.get(q`/v1/files/${Z}?beta=true`,{...X,headers:G([{"anthropic-beta":[...J??[],"files-api-2025-04-14"].toString()},X?.headers])})}upload(Z,$){let{betas:X,...J}=Z;return this._client.post("/v1/files?beta=true",Q0({body:J,...$,headers:G([{"anthropic-beta":[...X??[],"files-api-2025-04-14"].toString()},D4(J.file),$?.headers])},this._client))}}});var s0;var OX=M(()=>{I();f();E();_();s0=class s0 extends T{retrieve(Z,$={},X){let{betas:J}=$??{};return this._client.get(q`/v1/models/${Z}?beta=true`,{...X,headers:G([{...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",MZ,{query:J,...$,headers:G([{...X?.toString()!=null?{"anthropic-beta":X?.toString()}:void 0},$?.headers])})}}});var e0;var MX=M(()=>{I();f();E();_();e0=class e0 extends T{create(Z,$){let{betas:X,...J}=Z;return this._client.post("/v1/user_profiles?beta=true",{body:J,...$,headers:G([{"anthropic-beta":[...X??[],"user-profiles-2026-03-24"].toString()},$?.headers])})}retrieve(Z,$={},X){let{betas:J}=$??{};return this._client.get(q`/v1/user_profiles/${Z}?beta=true`,{...X,headers:G([{"anthropic-beta":[...J??[],"user-profiles-2026-03-24"].toString()},X?.headers])})}update(Z,$,X){let{betas:J,...z}=$;return this._client.post(q`/v1/user_profiles/${Z}?beta=true`,{body:z,...X,headers:G([{"anthropic-beta":[...J??[],"user-profiles-2026-03-24"].toString()},X?.headers])})}list(Z={},$){let{betas:X,...J}=Z??{};return this._client.getAPIList("/v1/user_profiles?beta=true",j,{query:J,...$,headers:G([{"anthropic-beta":[...X??[],"user-profiles-2026-03-24"].toString()},$?.headers])})}createEnrollmentURL(Z,$={},X){let{betas:J}=$??{};return this._client.post(q`/v1/user_profiles/${Z}/enrollment_url?beta=true`,{...X,headers:G([{"anthropic-beta":[...J??[],"user-profiles-2026-03-24"].toString()},X?.headers])})}}});var R4=Y$((j4)=>{Object.defineProperty(j4,"__esModule",{value:!0});j4.timingSafeEqual=void 0;function S4(Z,$=""){if(!Z)throw Error($)}function N9(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:$);S4(Z instanceof DataView),S4($ instanceof DataView);let X=Z.byteLength,J=0,z=-1;while(++z<X)J|=Z.getUint8(z)^$.getUint8(z);return J===0}j4.timingSafeEqual=N9});var k4=Y$((QZ)=>{var U9=QZ&&QZ.__extends||function(){var Z=function($,X){return Z=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(J,z){J.__proto__=z}||function(J,z){for(var Y in z)if(z.hasOwnProperty(Y))J[Y]=z[Y]},Z($,X)};return function($,X){Z($,X);function J(){this.constructor=$}$.prototype=X===null?Object.create(X):(J.prototype=X.prototype,new J)}}();Object.defineProperty(QZ,"__esModule",{value:!0});var p=256,CX=function(){function Z($){if($===void 0)$="=";this._paddingCharacter=$}return Z.prototype.encodedLength=function($){if(!this._paddingCharacter)return($*8+5)/6|0;return($+2)/3*4|0},Z.prototype.encode=function($){var X="",J=0;for(;J<$.length-2;J+=3){var z=$[J]<<16|$[J+1]<<8|$[J+2];X+=this._encodeByte(z>>>18&63),X+=this._encodeByte(z>>>12&63),X+=this._encodeByte(z>>>6&63),X+=this._encodeByte(z>>>0&63)}var Y=$.length-J;if(Y>0){var z=$[J]<<16|(Y===2?$[J+1]<<8:0);if(X+=this._encodeByte(z>>>18&63),X+=this._encodeByte(z>>>12&63),Y===2)X+=this._encodeByte(z>>>6&63);else X+=this._paddingCharacter||"";X+=this._paddingCharacter||""}return X},Z.prototype.maxDecodedLength=function($){if(!this._paddingCharacter)return($*6+7)/8|0;return $/4*3|0},Z.prototype.decodedLength=function($){return this.maxDecodedLength($.length-this._getPaddingLength($))},Z.prototype.decode=function($){if($.length===0)return new Uint8Array(0);var X=this._getPaddingLength($),J=$.length-X,z=new Uint8Array(this.maxDecodedLength(J)),Y=0,V=0,Q=0,W=0,O=0,x=0,U=0;for(;V<J-4;V+=4)W=this._decodeChar($.charCodeAt(V+0)),O=this._decodeChar($.charCodeAt(V+1)),x=this._decodeChar($.charCodeAt(V+2)),U=this._decodeChar($.charCodeAt(V+3)),z[Y++]=W<<2|O>>>4,z[Y++]=O<<4|x>>>2,z[Y++]=x<<6|U,Q|=W&p,Q|=O&p,Q|=x&p,Q|=U&p;if(V<J-1)W=this._decodeChar($.charCodeAt(V)),O=this._decodeChar($.charCodeAt(V+1)),z[Y++]=W<<2|O>>>4,Q|=W&p,Q|=O&p;if(V<J-2)x=this._decodeChar($.charCodeAt(V+2)),z[Y++]=O<<4|x>>>2,Q|=x&p;if(V<J-3)U=this._decodeChar($.charCodeAt(V+3)),z[Y++]=x<<6|U,Q|=U&p;if(Q!==0)throw Error("Base64Coder: incorrect characters for decoding");return z},Z.prototype._encodeByte=function($){var X=$;return X+=65,X+=25-$>>>8&6,X+=51-$>>>8&-75,X+=61-$>>>8&-15,X+=62-$>>>8&3,String.fromCharCode(X)},Z.prototype._decodeChar=function($){var X=p;return X+=(42-$&$-44)>>>8&-p+$-43+62,X+=(46-$&$-48)>>>8&-p+$-47+63,X+=(47-$&$-58)>>>8&-p+$-48+52,X+=(64-$&$-91)>>>8&-p+$-65+0,X+=(96-$&$-123)>>>8&-p+$-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}();QZ.Coder=CX;var Z8=new CX;function W9(Z){return Z8.encode(Z)}QZ.encode=W9;function w9(Z){return Z8.decode(Z)}QZ.decode=w9;var P4=function(Z){U9($,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=p;return J+=(44-X&X-46)>>>8&-p+X-45+62,J+=(94-X&X-96)>>>8&-p+X-95+63,J+=(47-X&X-58)>>>8&-p+X-48+52,J+=(64-X&X-91)>>>8&-p+X-65+0,J+=(96-X&X-123)>>>8&-p+X-97+26,J},$}(CX);QZ.URLSafeCoder=P4;var I4=new P4;function q9(Z){return I4.encode(Z)}QZ.encodeURLSafe=q9;function O9(Z){return I4.decode(Z)}QZ.decodeURLSafe=O9;QZ.encodedLength=function(Z){return Z8.encodedLength(Z)};QZ.maxDecodedLength=function(Z){return Z8.maxDecodedLength(Z)};QZ.decodedLength=function(Z){return Z8.decodedLength(Z)}});var f4=Y$((y4,K$)=>{(function(Z,$){var X={};$(X);var J=X.default;for(var z in X)J[z]=X[z];if(typeof K$==="object"&&typeof K$.exports==="object")K$.exports=J;else if(typeof define==="function"&&define.amd)define(function(){return J});else Z.sha256=J})(y4,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(U,N,C,B,L){var D,A,F,h,y,P,l,b,d,g,c,GZ,_Z;while(L>=64){D=N[0],A=N[1],F=N[2],h=N[3],y=N[4],P=N[5],l=N[6],b=N[7];for(g=0;g<16;g++)c=B+g*4,U[g]=(C[c]&255)<<24|(C[c+1]&255)<<16|(C[c+2]&255)<<8|C[c+3]&255;for(g=16;g<64;g++)d=U[g-2],GZ=(d>>>17|d<<15)^(d>>>19|d<<13)^d>>>10,d=U[g-15],_Z=(d>>>7|d<<25)^(d>>>18|d<<14)^d>>>3,U[g]=(GZ+U[g-7]|0)+(_Z+U[g-16]|0);for(g=0;g<64;g++)GZ=(((y>>>6|y<<26)^(y>>>11|y<<21)^(y>>>25|y<<7))+(y&P^~y&l)|0)+(b+($[g]+U[g]|0)|0)|0,_Z=((D>>>2|D<<30)^(D>>>13|D<<19)^(D>>>22|D<<10))+(D&A^D&F^A&F)|0,b=l,l=P,P=y,y=h+GZ|0,h=F,F=A,A=D,D=GZ+_Z|0;N[0]+=D,N[1]+=A,N[2]+=F,N[3]+=h,N[4]+=y,N[5]+=P,N[6]+=l,N[7]+=b,B+=64,L-=64}return B}var J=function(){function U(){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 U.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},U.prototype.clean=function(){for(var N=0;N<this.buffer.length;N++)this.buffer[N]=0;for(var N=0;N<this.temp.length;N++)this.temp[N]=0;this.reset()},U.prototype.update=function(N,C){if(C===void 0)C=N.length;if(this.finished)throw Error("SHA256: can't update because hash was finished.");var B=0;if(this.bytesHashed+=C,this.bufferLength>0){while(this.bufferLength<64&&C>0)this.buffer[this.bufferLength++]=N[B++],C--;if(this.bufferLength===64)X(this.temp,this.state,this.buffer,0,64),this.bufferLength=0}if(C>=64)B=X(this.temp,this.state,N,B,C),C%=64;while(C>0)this.buffer[this.bufferLength++]=N[B++],C--;return this},U.prototype.finish=function(N){if(!this.finished){var C=this.bytesHashed,B=this.bufferLength,L=C/536870912|0,D=C<<3,A=C%64<56?64:128;this.buffer[B]=128;for(var F=B+1;F<A-8;F++)this.buffer[F]=0;this.buffer[A-8]=L>>>24&255,this.buffer[A-7]=L>>>16&255,this.buffer[A-6]=L>>>8&255,this.buffer[A-5]=L>>>0&255,this.buffer[A-4]=D>>>24&255,this.buffer[A-3]=D>>>16&255,this.buffer[A-2]=D>>>8&255,this.buffer[A-1]=D>>>0&255,X(this.temp,this.state,this.buffer,0,A),this.finished=!0}for(var F=0;F<8;F++)N[F*4+0]=this.state[F]>>>24&255,N[F*4+1]=this.state[F]>>>16&255,N[F*4+2]=this.state[F]>>>8&255,N[F*4+3]=this.state[F]>>>0&255;return this},U.prototype.digest=function(){var N=new Uint8Array(this.digestLength);return this.finish(N),N},U.prototype._saveState=function(N){for(var C=0;C<this.state.length;C++)N[C]=this.state[C]},U.prototype._restoreState=function(N,C){for(var B=0;B<this.state.length;B++)this.state[B]=N[B];this.bytesHashed=C,this.finished=!1,this.bufferLength=0},U}();Z.Hash=J;var z=function(){function U(N){this.inner=new J,this.outer=new J,this.blockSize=this.inner.blockSize,this.digestLength=this.inner.digestLength;var C=new Uint8Array(this.blockSize);if(N.length>this.blockSize)new J().update(N).finish(C).clean();else for(var B=0;B<N.length;B++)C[B]=N[B];for(var B=0;B<C.length;B++)C[B]^=54;this.inner.update(C);for(var B=0;B<C.length;B++)C[B]^=106;this.outer.update(C),this.istate=new Uint32Array(8),this.ostate=new Uint32Array(8),this.inner._saveState(this.istate),this.outer._saveState(this.ostate);for(var B=0;B<C.length;B++)C[B]=0}return U.prototype.reset=function(){return this.inner._restoreState(this.istate,this.inner.blockSize),this.outer._restoreState(this.ostate,this.outer.blockSize),this},U.prototype.clean=function(){for(var N=0;N<this.istate.length;N++)this.ostate[N]=this.istate[N]=0;this.inner.clean(),this.outer.clean()},U.prototype.update=function(N){return this.inner.update(N),this},U.prototype.finish=function(N){if(this.outer.finished)this.outer.finish(N);else this.inner.finish(N),this.outer.update(N,this.digestLength).finish(N);return this},U.prototype.digest=function(){var N=new Uint8Array(this.digestLength);return this.finish(N),N},U}();Z.HMAC=z;function Y(U){var N=new J().update(U),C=N.digest();return N.clean(),C}Z.hash=Y,Z.default=Y;function V(U,N){var C=new z(U).update(N),B=C.digest();return C.clean(),B}Z.hmac=V;function Q(U,N,C,B){var L=B[0];if(L===0)throw Error("hkdf: cannot expand more");if(N.reset(),L>1)N.update(U);if(C)N.update(C);N.update(B),N.finish(U),B[0]++}var W=new Uint8Array(Z.digestLength);function O(U,N,C,B){if(N===void 0)N=W;if(B===void 0)B=32;var L=new Uint8Array([1]),D=V(N,U),A=new z(D),F=new Uint8Array(A.digestLength),h=F.length,y=new Uint8Array(B);for(var P=0;P<B;P++){if(h===F.length)Q(F,A,C,L),h=0;y[P]=F[h++]}return A.clean(),F.fill(0),L.fill(0),y}Z.hkdf=O;function x(U,N,C,B){var L=new z(U),D=L.digestLength,A=new Uint8Array(4),F=new Uint8Array(D),h=new Uint8Array(D),y=new Uint8Array(B);for(var P=0;P*D<B;P++){var l=P+1;A[0]=l>>>24&255,A[1]=l>>>16&255,A[2]=l>>>8&255,A[3]=l>>>0&255,L.reset(),L.update(N),L.update(A),L.finish(h);for(var b=0;b<D;b++)F[b]=h[b];for(var b=2;b<=C;b++){L.reset(),L.update(h).finish(h);for(var d=0;d<D;d++)F[d]^=h[d]}for(var b=0;b<D&&P*D+b<B;b++)y[P*D+b]=F[b]}for(var P=0;P<D;P++)F[P]=h[P]=0;for(var P=0;P<4;P++)A[P]=0;return L.clean(),y}Z.pbkdf2=x})});var v4=Y$((g4)=>{Object.defineProperty(g4,"__esModule",{value:!0});g4.Webhook=g4.WebhookVerificationError=void 0;var M9=R4(),b4=k4(),C9=f4(),h4=300;class xX extends Error{constructor(Z){super(Z);Object.setPrototypeOf(this,xX.prototype),this.name="ExtendableError",this.stack=Error(Z).stack}}class RZ extends xX{constructor(Z){super(Z);Object.setPrototypeOf(this,RZ.prototype),this.name="WebhookVerificationError"}}g4.WebhookVerificationError=RZ;class $8{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($8.prefix))Z=Z.substring($8.prefix.length);this.key=b4.decode(Z)}}verify(Z,$){let X={};for(let U of Object.keys($))X[U.toLowerCase()]=$[U];let J=X["webhook-id"],z=X["webhook-signature"],Y=X["webhook-timestamp"];if(!z||!J||!Y)throw new RZ("Missing required headers");let V=this.verifyTimestamp(Y),W=this.sign(J,V,Z).split(",")[1],O=z.split(" "),x=new globalThis.TextEncoder;for(let U of O){let[N,C]=U.split(",");if(N!=="v1")continue;if((0,M9.timingSafeEqual)(x.encode(C),x.encode(W)))return JSON.parse(Z.toString())}throw new RZ("No matching signature found")}sign(Z,$,X){if(typeof X==="string");else if(X.constructor.name==="Buffer")X=X.toString();else throw Error("Expected payload to be of type string or Buffer.");let J=new TextEncoder,z=Math.floor($.getTime()/1000),Y=J.encode(`${Z}.${z}.${X}`);return`v1,${b4.encode(C9.hmac(this.key,Y))}`}verifyTimestamp(Z){let $=Math.floor(Date.now()/1000),X=parseInt(Z,10);if(isNaN(X))throw new RZ("Invalid Signature Headers");if($-X>h4)throw new RZ("Message timestamp too old");if(X>$+h4)throw new RZ("Message timestamp too new");return new Date(X*1000)}}g4.Webhook=$8;$8.prefix="whsec_"});var m4,X8;var HX=M(()=>{I();m4=H9(v4(),1);X8=class X8 extends T{unwrap(Z,{headers:$,key:X}){if($!==void 0){let J=X===void 0?this._client.webhookKey:X;if(J===null)throw Error("Webhook key must not be null in order to unwrap");new m4.Webhook(J).verify(Z,$)}return JSON.parse(Z)}}});var J8;var BX=M(()=>{I();f();E();_();J8=class J8 extends T{list(Z,$={},X){let{betas:J,...z}=$??{};return this._client.getAPIList(q`/v1/agents/${Z}/versions?beta=true`,j,{query:z,...X,headers:G([{"anthropic-beta":[...J??[],"managed-agents-2026-04-01"].toString()},X?.headers])})}}});var G0;var FX=M(()=>{I();BX();BX();f();E();_();G0=class G0 extends T{constructor(){super(...arguments);this.versions=new J8(this._client)}create(Z,$){let{betas:X,...J}=Z;return this._client.post("/v1/agents?beta=true",{body:J,...$,headers:G([{"anthropic-beta":[...X??[],"managed-agents-2026-04-01"].toString()},$?.headers])})}retrieve(Z,$={},X){let{betas:J,...z}=$??{};return this._client.get(q`/v1/agents/${Z}?beta=true`,{query:z,...X,headers:G([{"anthropic-beta":[...J??[],"managed-agents-2026-04-01"].toString()},X?.headers])})}update(Z,$,X){let{betas:J,...z}=$;return this._client.post(q`/v1/agents/${Z}?beta=true`,{body:z,...X,headers:G([{"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",j,{query:J,...$,headers:G([{"anthropic-beta":[...X??[],"managed-agents-2026-04-01"].toString()},$?.headers])})}archive(Z,$={},X){let{betas:J}=$??{};return this._client.post(q`/v1/agents/${Z}/archive?beta=true`,{...X,headers:G([{"anthropic-beta":[...J??[],"managed-agents-2026-04-01"].toString()},X?.headers])})}};G0.Versions=J8});function dZ(Z,$){if(!Z)return()=>{};if(Z.aborted)return $.abort(),()=>{};let X=()=>$.abort();return Z.addEventListener("abort",X),()=>Z.removeEventListener("abort",X)}var Q$=()=>{};function PZ(Z,$){return Z instanceof v&&Z.status===$}function c4(Z){return Z instanceof v&&typeof Z.status==="number"&&Z.status>=400&&Z.status<500}function IZ(Z){return c4(Z)&&!PZ(Z,408)&&!PZ(Z,409)&&!PZ(Z,429)}function u4(Z,$,X){return Math.min($*2**Z,X)}function TX(Z,$){return Z+Math.random()*($-Z)}function d4(Z){return Z*(1-Math.random()*0.25)}var z8=M(()=>{u()});function V$(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,Y=J._authState?.extraHeaders,V=Y?Object.fromEntries(Object.entries(Y).filter(([W])=>{let O=W.toLowerCase();return O!=="authorization"&&O!=="x-api-key"})):void 0,Q=G([V,z,{"x-stainless-helper":X}]);return Z.withOptions({apiKey:null,authToken:$,baseURL:Z.baseURL,credentials:void 0,defaultHeaders:Q})}var DX=M(()=>{u();E()});function S9(Z){return u4(Z,A9,L9)}function j9(){let $=globalThis.process?.env?.HOSTNAME;return $?`${$}-${$0()}`:$0()}var N0,G$,UZ,N$,U$,W$,Y8,K8,U0,D9=999,A9=1000,L9=60000,pZ;var w$=M(()=>{XZ();u();jZ();X0();g8();Q$();E();z8();DX();z8();pZ=class pZ{constructor(Z){N0.set(this,void 0),G$.set(this,!1),UZ.set(this,void 0),N$.set(this,void 0),U$.set(this,void 0),W$.set(this,void 0),Y8.set(this,void 0),K8.set(this,void 0),U0.set(this,void 0),this.client=Z.client,this.environmentId=Z.environmentId,this.environmentKey=Z.environmentKey,this.workerId=Z.workerId??j9(),w(this,N0,V$(Z.client,{authToken:Z.environmentKey,helper:"environments-work-poller"}),"f"),w(this,U$,Z.autoStop??!0,"f"),w(this,W$,Z.drain??!1,"f"),w(this,Y8,Z.blockMs===void 0?D9:Z.blockMs,"f"),w(this,K8,Z.reclaimOlderThanMs??null,"f"),w(this,U0,Z.requestOptions,"f"),w(this,UZ,new AbortController,"f"),w(this,N$,dZ(Z.signal,K(this,UZ,"f")),"f")}get signal(){return K(this,UZ,"f").signal}abort(){K(this,UZ,"f").abort()}async*[(N0=new WeakMap,G$=new WeakMap,UZ=new WeakMap,N$=new WeakMap,U$=new WeakMap,W$=new WeakMap,Y8=new WeakMap,K8=new WeakMap,U0=new WeakMap,Symbol.asyncIterator)](){if(K(this,G$,"f"))throw new H("Cannot iterate over a consumed WorkPoller");w(this,G$,!0,"f");let Z=k(this.client);Z.info("poller starting",{component:"work-poller",environment_id:this.environmentId});try{let $=0;while(!K(this,UZ,"f").signal.aborted){let X;try{X=await K(this,N0,"f").beta.environments.work.poll(this.environmentId,{"Anthropic-Worker-ID":this.workerId,...K(this,Y8,"f")!==null?{block_ms:K(this,Y8,"f")}:{},...K(this,K8,"f")!==null?{reclaim_older_than_ms:K(this,K8,"f")}:{}},{headers:G([K(this,U0,"f")?.headers]),signal:K(this,UZ,"f").signal})}catch(J){if(K(this,UZ,"f").signal.aborted)return;if(IZ(J))throw Z.error("poll failed permanently, stopping poller",{error:String(J)}),J;let z=d4(S9($));Z.warn("poll failed, backing off",{error:String(J),backoff_ms:z}),$++,await qZ(z,K(this,UZ,"f").signal);continue}if($=0,X==null){if(K(this,W$,"f"))return;await qZ(TX(1000,3000),K(this,UZ,"f").signal);continue}Z.info("claimed work",{component:"work-poller",environment_id:this.environmentId,work_id:X.id,work_type:X.data.type});try{await K(this,N0,"f").beta.environments.work.ack(X.id,{environment_id:X.environment_id},{headers:G([K(this,U0,"f")?.headers]),signal:K(this,UZ,"f").signal})}catch(J){Z.error("ack failed",{work_id:X.id,error:String(J)});continue}try{yield X}finally{if(K(this,U$,"f"))try{await K(this,N0,"f").beta.environments.work.stop(X.id,{environment_id:X.environment_id},{headers:G([K(this,U0,"f")?.headers])})}catch(J){if(!PZ(J,409))Z.warn("stop failed",{work_id:X.id,error:String(J)})}}}}finally{K(this,N$,"f").call(this)}}}});class AX{constructor(){W0.set(this,[]),kZ.set(this,[]),w0.set(this,!1)}push(Z){if(K(this,w0,"f"))return!1;let $=K(this,kZ,"f").shift();if($)$({done:!1,value:Z});else K(this,W0,"f").push(Z);return!0}close(){if(K(this,w0,"f"))return;w(this,w0,!0,"f");while(K(this,kZ,"f").length>0)K(this,kZ,"f").shift()({done:!0,value:void 0})}next(Z){if(K(this,W0,"f").length>0)return Promise.resolve({done:!1,value:K(this,W0,"f").shift()});if(K(this,w0,"f")||Z?.aborted)return Promise.resolve({done:!0,value:void 0});return new Promise(($)=>{let X=(z)=>{Z?.removeEventListener("abort",J),$(z)},J=()=>{let z=K(this,kZ,"f").indexOf(X);if(z>=0)K(this,kZ,"f").splice(z,1);$({done:!0,value:void 0})};K(this,kZ,"f").push(X),Z?.addEventListener("abort",J,{once:!0})})}tryShift(){return K(this,W0,"f").shift()}}var W0,kZ,w0;var p4=M(()=>{XZ();W0=new WeakMap,kZ=new WeakMap,w0=new WeakMap});function LX(Z){return"name"in Z?Z.name:Z.mcp_server_name}function E9(Z){return Z instanceof SZ?Z.content:`Error: ${Z instanceof Error?Z.message:String(Z)}`}async function l4(Z,$,X){try{let J=Z.parse?Z.parse($):$;return{content:await Z.run(J,X),isError:!1}}catch(J){return{content:E9(J),isError:!0}}}var i4=M(()=>{v0()});function e4(Z){return Z.type==="session.status_idle"&&Z.stop_reason?.type==="end_turn"}function f9(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 b9(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 n,q$,r,O$,V8,C$,e,q0,HZ,lZ,TZ,G8,O0,M$,Z6,n4,a4,r4,SX,Q8,jX,o4,$6,R9="SessionToolRunner",t4=500,P9=1e4,I9=120000,k9=30000,s4=3,y9=60000,iZ;var x$=M(()=>{XZ();u();jZ();X0();z8();Q$();p4();E();i4();iZ=class iZ{constructor(Z,$){n.add(this),q$.set(this,!1),r.set(this,void 0),O$.set(this,void 0),V8.set(this,void 0),C$.set(this,void 0),e.set(this,void 0),q0.set(this,new Set),HZ.set(this,new Set),lZ.set(this,new AX),TZ.set(this,0),G8.set(this,null),O0.set(this,void 0),this.client=$.client,this.sessionId=Z,this.tools=$.tools,this.maxIdleMs=$.maxIdleMs??y9,w(this,e,k($.client),"f"),w(this,C$,new Map($.tools.map((X)=>[LX(X),X])),"f"),w(this,r,new AbortController,"f"),w(this,O$,dZ($.signal,K(this,r,"f")),"f"),w(this,V8,$.requestOptions,"f")}get signal(){return K(this,r,"f").signal}abort(){K(this,r,"f").abort()}async*[(q$=new WeakMap,r=new WeakMap,O$=new WeakMap,V8=new WeakMap,C$=new WeakMap,e=new WeakMap,q0=new WeakMap,HZ=new WeakMap,lZ=new WeakMap,TZ=new WeakMap,G8=new WeakMap,O0=new WeakMap,n=new WeakSet,Symbol.asyncIterator)](){if(K(this,q$,"f"))throw new H("Cannot iterate over a consumed SessionToolRunner");w(this,q$,!0,"f"),K(this,e,"f").info("session tool runner starting",{component:"session-tool-runner",session_id:this.sessionId});let Z=K(this,n,"m",Z6).call(this).catch(($)=>{if(!K(this,r,"f").signal.aborted)K(this,e,"f").error("stream loop failed",{error:String($)});K(this,r,"f").abort()});try{while(!0){let X=await K(this,lZ,"f").next(K(this,r,"f").signal);if(X.done)break;yield X.value}await Z;let $;while(($=K(this,lZ,"f").tryShift())!==void 0)yield $}finally{K(this,r,"f").abort(),K(this,n,"m",Q8).call(this),await Z;try{await K(this,n,"m",$6).call(this)}catch($){K(this,e,"f").warn("drain failed",{error:String($)})}K(this,lZ,"f").close();for(let $ of this.tools)try{await $.close?.()}catch(X){K(this,e,"f").warn("tool.close failed",{tool:LX($),error:String(X)})}K(this,O$,"f").call(this)}}};M$=function(){return{...K(this,V8,"f"),headers:G([{"x-stainless-helper":R9},K(this,V8,"f")?.headers]),signal:K(this,r,"f").signal}},Z6=async function(){let $=K(this,r,"f"),X=t4;while(!$.signal.aborted){try{let J=await this.client.beta.sessions.events.stream(this.sessionId,{},K(this,n,"m",M$).call(this));await K(this,n,"m",n4).call(this);for await(let z of J)if(X=t4,await K(this,n,"m",r4).call(this,z))return}catch(J){if($.signal.throwIfAborted(),IZ(J))throw K(this,e,"f").error("permanent stream failure, shutting down",{error:String(J)}),$.abort(),J;K(this,e,"f").warn("stream disconnected, reconnecting",{error:String(J),backoff_ms:X})}$.signal.throwIfAborted(),await qZ(X,$.signal),X=Math.min(X*2,P9)}},n4=async function(){let $=K(this,r,"f"),X=[],J=!1;try{for await(let Y of this.client.beta.sessions.events.list(this.sessionId,{limit:1000},K(this,n,"m",M$).call(this)))K(this,n,"m",a4).call(this,Y,X),J=e4(Y)}catch(Y){$.signal.throwIfAborted(),K(this,e,"f").warn("reconcile list failed",{error:String(Y)});for(let V of X)K(this,q0,"f").delete(V.id);return}let z=X.filter((Y)=>!K(this,HZ,"f").has(Y.id));if(J&&z.length===0)K(this,n,"m",SX).call(this);else K(this,n,"m",Q8).call(this);for(let Y of z)await K(this,n,"m",jX).call(this,Y)},a4=function($,X){if($.type==="agent.tool_use"||$.type==="agent.custom_tool_use"){if(K(this,q0,"f").add($.id),!K(this,HZ,"f").has($.id))X.push($)}else if($.type==="user.tool_result")K(this,HZ,"f").add($.tool_use_id);else if($.type==="user.custom_tool_result")K(this,HZ,"f").add($.custom_tool_use_id)},r4=async function($){if(e4($))K(this,n,"m",SX).call(this);else K(this,n,"m",Q8).call(this);switch($.type){case"agent.tool_use":case"agent.custom_tool_use":if(!K(this,q0,"f").has($.id))K(this,q0,"f").add($.id),await K(this,n,"m",jX).call(this,$);return!1;case"user.tool_result":return K(this,HZ,"f").add($.tool_use_id),!1;case"user.custom_tool_result":return K(this,HZ,"f").add($.custom_tool_use_id),!1;case"session.status_terminated":case"session.deleted":return K(this,e,"f").info("session terminated",{component:"session-tool-runner",session_id:this.sessionId}),K(this,r,"f").abort(),!0;default:return!1}},SX=function(){if(K(this,n,"m",Q8).call(this),this.maxIdleMs<=0)return;w(this,O0,setTimeout(()=>{K(this,e,"f").info("session idle after end_turn; stopping",{component:"session-tool-runner",session_id:this.sessionId,max_idle_ms:this.maxIdleMs}),K(this,r,"f").abort()},this.maxIdleMs),"f")},Q8=function(){if(K(this,O0,"f")!==void 0)clearTimeout(K(this,O0,"f")),w(this,O0,void 0,"f")},jX=async function($){var X,J;if(K(this,HZ,"f").has($.id))return;K(this,e,"f").info("executing tool",{component:"session-tool-runner",session_id:this.sessionId,tool:$.name,tool_use_id:$.id}),w(this,TZ,(X=K(this,TZ,"f"),X++,X),"f");try{let z=K(this,C$,"f").get($.name);if(!z){K(this,e,"f").info("tool not owned by this runner; leaving the tool_use_id pending for its owner",{component:"session-tool-runner",session_id:this.sessionId,tool:$.name,tool_use_id:$.id}),K(this,lZ,"f").push({event:$,toolUseId:$.id,name:$.name,isError:!1,posted:!1});return}let Y,V,Q=new AbortController,W=dZ(K(this,r,"f").signal,Q),O=setTimeout(()=>Q.abort(),I9);try{let N=await l4(z,$.input,{toolUse:$,toolUseBlock:$,signal:Q.signal});Y=N.content,V=N.isError}finally{clearTimeout(O),W()}let x=f9($,V,b9(Y)),U=await K(this,n,"m",o4).call(this,x,$.id);K(this,lZ,"f").push({event:$,result:x,toolUseId:$.id,name:$.name,isError:V,posted:U})}finally{if(w(this,TZ,(J=K(this,TZ,"f"),J--,J),"f"),K(this,TZ,"f")===0)K(this,G8,"f")?.call(this)}},o4=async function($,X){let J=K(this,r,"f"),z;for(let Y=0;Y<s4;Y++){J.signal.throwIfAborted();try{return await this.client.beta.sessions.events.send(this.sessionId,{events:[$]},K(this,n,"m",M$).call(this)),K(this,HZ,"f").add(X),!0}catch(V){if(z=V,IZ(V))break;if(Y<s4-1)await qZ((Y+1)*1000,J.signal)}}return K(this,e,"f").error("failed to send tool result",{tool_use_id:X,error:String(z)}),!1},$6=async function(){if(K(this,TZ,"f")===0)return;if(await Promise.race([new Promise(($)=>w(this,G8,$,"f")),qZ(k9)]),w(this,G8,null,"f"),K(this,TZ,"f")>0)K(this,e,"f").warn("drain timeout exceeded")}});class U8{constructor(Z){H$.add(this),N8.set(this,void 0),this.client=Z.client,this.environmentId=Z.environmentId,this.environmentKey=Z.environmentKey,this.tools=Z.tools,this.workdir=Z.workdir??process.cwd(),this.unrestrictedPaths=Z.unrestrictedPaths,this.maxFileBytes=Z.maxFileBytes,this.maxIdleMs=Z.maxIdleMs,this.workerId=Z.workerId,this.requestOptions=Z.requestOptions,w(this,N8,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??K(this,N8,"f"),z=new pZ({client:this.client,environmentId:$,environmentKey:X,...this.workerId!==void 0?{workerId:this.workerId}:{},...J?{signal:J}:{},...this.requestOptions!==void 0?{requestOptions:this.requestOptions}:{},autoStop:!1});for await(let Y of z)await K(this,H$,"m",EX).call(this,Y,X,z.signal)}async handleItem(Z){let $=Z?.workId??S("ANTHROPIC_WORK_ID"),X=Z?.environmentId??S("ANTHROPIC_ENVIRONMENT_ID"),J=Z?.sessionId??S("ANTHROPIC_SESSION_ID"),z=Z?.environmentKey??this.environmentKey??S("ANTHROPIC_ENVIRONMENT_KEY");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 Y={id:$,environment_id:X,data:{type:"session",id:J}};await K(this,H$,"m",EX).call(this,Y,z,Z?.signal??K(this,N8,"f"))}}async function g9(Z,$,X,J){try{await Z.beta.environments.work.stop($.id,{environment_id:$.environment_id,force:!0},{...J,headers:G([J?.headers])})}catch(z){if(!PZ(z,409))X.error("force-stop on exit failed",{work_id:$.id,error:String(z)})}}async function _9(Z,$,X,J,z){let Y=X6,V=h9,Q=async()=>{try{let W=await Z.beta.environments.work.heartbeat($.id,{environment_id:$.environment_id,expected_last_heartbeat:V},{...z,headers:G([z?.headers]),signal:X.signal});if(V=W.last_heartbeat,W.ttl_seconds>0)Y=Math.max(1000,Math.min(W.ttl_seconds*1000/2,X6));if(W.state==="stopping"||W.state==="stopped")J.info("heartbeat signals shutdown",{work_id:$.id,state:W.state}),X.abort();if(!W.lease_extended)J.warn("lease not extended, shutting down",{work_id:$.id}),X.abort()}catch(W){if(X.signal.throwIfAborted(),IZ(W))throw J.error("permanent heartbeat failure",{work_id:$.id,error:String(W)}),X.abort(),W;J.warn("transient heartbeat failure",{work_id:$.id,error:String(W)})}};await Q();while(!X.signal.aborted)await qZ(Y,X.signal),X.signal.throwIfAborted(),await Q()}var H$,N8,EX,X6=30000,h9="NO_HEARTBEAT";var RX=M(()=>{XZ();u();jZ();p0();X0();z8();Q$();E();x$();w$();DX();N8=new WeakMap,H$=new WeakSet,EX=async function($,X,J){let z=k(this.client),Y=V$(this.client,{authToken:X,helper:"environments-worker"}),V=$.data.id,Q={workdir:this.workdir,client:this.client,sessionId:V,...this.unrestrictedPaths!==void 0?{unrestrictedPaths:this.unrestrictedPaths}:{},...this.maxFileBytes!==void 0?{maxFileBytes:this.maxFileBytes}:{}},W=await import("./node-0.6.0-x0ve6mnc.mjs"),O=async()=>{};try{O=await W.setupSkills(Q)}catch(B){z.warn("skill setup failed",{session_id:V,work_id:$.id,error:String(B)})}let x=typeof this.tools==="function"?this.tools(Q):this.tools??W.betaAgentToolset20260401(Q),U=new AbortController,N=dZ(J,U),C=_9(Y,$,U,z,this.requestOptions).catch((B)=>{if(!U.signal.aborted)z.error("heartbeat loop failed",{work_id:$.id,error:String(B)});U.abort()});try{let B=new iZ(V,{client:Y,tools:x,...this.maxIdleMs!==void 0?{maxIdleMs:this.maxIdleMs}:{},...this.requestOptions!==void 0?{requestOptions:this.requestOptions}:{},signal:U.signal});for await(let L of B);}finally{U.abort(),N(),await C,await O().catch((B)=>{z.warn("skill cleanup failed",{session_id:V,work_id:$.id,error:String(B)})}),await g9(Y,$,z,this.requestOptions)}}});var nZ;var PX=M(()=>{I();f();E();_();w$();RX();w$();RX();nZ=class nZ extends T{retrieve(Z,$,X){let{environment_id:J,betas:z}=$;return this._client.get(q`/v1/environments/${J}/work/${Z}?beta=true`,{...X,headers:G([{"anthropic-beta":[...z??[],"managed-agents-2026-04-01"].toString()},X?.headers])})}update(Z,$,X){let{environment_id:J,betas:z,...Y}=$;return this._client.post(q`/v1/environments/${J}/work/${Z}?beta=true`,{body:Y,...X,headers:G([{"anthropic-beta":[...z??[],"managed-agents-2026-04-01"].toString()},X?.headers])})}list(Z,$={},X){let{betas:J,...z}=$??{};return this._client.getAPIList(q`/v1/environments/${Z}/work?beta=true`,j,{query:z,...X,headers:G([{"anthropic-beta":[...J??[],"managed-agents-2026-04-01"].toString()},X?.headers])})}ack(Z,$,X){let{environment_id:J,betas:z}=$;return this._client.post(q`/v1/environments/${J}/work/${Z}/ack?beta=true`,{...X,headers:G([{"anthropic-beta":[...z??[],"managed-agents-2026-04-01"].toString()},X?.headers])})}heartbeat(Z,$,X){let{environment_id:J,desired_ttl_seconds:z,expected_last_heartbeat:Y,betas:V}=$;return this._client.post(q`/v1/environments/${J}/work/${Z}/heartbeat?beta=true`,{query:{desired_ttl_seconds:z,expected_last_heartbeat:Y},...X,headers:G([{"anthropic-beta":[...V??[],"managed-agents-2026-04-01"].toString()},X?.headers])})}poll(Z,$={},X){let{betas:J,"Anthropic-Worker-ID":z,...Y}=$??{};return this._client.get(q`/v1/environments/${Z}/work/poll?beta=true`,{query:Y,...X,headers:G([{"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(q`/v1/environments/${Z}/work/stats?beta=true`,{...X,headers:G([{"anthropic-beta":[...J??[],"managed-agents-2026-04-01"].toString()},X?.headers])})}stop(Z,$,X){let{environment_id:J,betas:z,...Y}=$;return this._client.post(q`/v1/environments/${J}/work/${Z}/stop?beta=true`,{body:Y,...X,headers:G([{"anthropic-beta":[...z??[],"managed-agents-2026-04-01"].toString()},X?.headers])})}poller(Z){return new pZ({...Z,client:this._client})}worker(Z){return new U8({...Z,client:this._client})}};nZ.WorkPoller=pZ;nZ.EnvironmentWorker=U8});var M0;var IX=M(()=>{I();PX();PX();f();E();_();M0=class M0 extends T{constructor(){super(...arguments);this.work=new nZ(this._client)}create(Z,$){let{betas:X,...J}=Z;return this._client.post("/v1/environments?beta=true",{body:J,...$,headers:G([{"anthropic-beta":[...X??[],"managed-agents-2026-04-01"].toString()},$?.headers])})}retrieve(Z,$={},X){let{betas:J}=$??{};return this._client.get(q`/v1/environments/${Z}?beta=true`,{...X,headers:G([{"anthropic-beta":[...J??[],"managed-agents-2026-04-01"].toString()},X?.headers])})}update(Z,$,X){let{betas:J,...z}=$;return this._client.post(q`/v1/environments/${Z}?beta=true`,{body:z,...X,headers:G([{"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",j,{query:J,...$,headers:G([{"anthropic-beta":[...X??[],"managed-agents-2026-04-01"].toString()},$?.headers])})}delete(Z,$={},X){let{betas:J}=$??{};return this._client.delete(q`/v1/environments/${Z}?beta=true`,{...X,headers:G([{"anthropic-beta":[...J??[],"managed-agents-2026-04-01"].toString()},X?.headers])})}archive(Z,$={},X){let{betas:J}=$??{};return this._client.post(q`/v1/environments/${Z}/archive?beta=true`,{...X,headers:G([{"anthropic-beta":[...J??[],"managed-agents-2026-04-01"].toString()},X?.headers])})}};M0.Work=nZ});var W8;var kX=M(()=>{I();f();E();_();W8=class W8 extends T{create(Z,$,X){let{view:J,betas:z,...Y}=$;return this._client.post(q`/v1/memory_stores/${Z}/memories?beta=true`,{query:{view:J},body:Y,...X,headers:G([{"anthropic-beta":[...z??[],"managed-agents-2026-04-01"].toString()},X?.headers])})}retrieve(Z,$,X){let{memory_store_id:J,betas:z,...Y}=$;return this._client.get(q`/v1/memory_stores/${J}/memories/${Z}?beta=true`,{query:Y,...X,headers:G([{"anthropic-beta":[...z??[],"managed-agents-2026-04-01"].toString()},X?.headers])})}update(Z,$,X){let{memory_store_id:J,view:z,betas:Y,...V}=$;return this._client.post(q`/v1/memory_stores/${J}/memories/${Z}?beta=true`,{query:{view:z},body:V,...X,headers:G([{"anthropic-beta":[...Y??[],"managed-agents-2026-04-01"].toString()},X?.headers])})}list(Z,$={},X){let{betas:J,...z}=$??{};return this._client.getAPIList(q`/v1/memory_stores/${Z}/memories?beta=true`,j,{query:z,...X,headers:G([{"anthropic-beta":[...J??[],"managed-agents-2026-04-01"].toString()},X?.headers])})}delete(Z,$,X){let{memory_store_id:J,expected_content_sha256:z,betas:Y}=$;return this._client.delete(q`/v1/memory_stores/${J}/memories/${Z}?beta=true`,{query:{expected_content_sha256:z},...X,headers:G([{"anthropic-beta":[...Y??[],"managed-agents-2026-04-01"].toString()},X?.headers])})}}});var w8;var yX=M(()=>{I();f();E();_();w8=class w8 extends T{retrieve(Z,$,X){let{memory_store_id:J,betas:z,...Y}=$;return this._client.get(q`/v1/memory_stores/${J}/memory_versions/${Z}?beta=true`,{query:Y,...X,headers:G([{"anthropic-beta":[...z??[],"managed-agents-2026-04-01"].toString()},X?.headers])})}list(Z,$={},X){let{betas:J,...z}=$??{};return this._client.getAPIList(q`/v1/memory_stores/${Z}/memory_versions?beta=true`,j,{query:z,...X,headers:G([{"anthropic-beta":[...J??[],"managed-agents-2026-04-01"].toString()},X?.headers])})}redact(Z,$,X){let{memory_store_id:J,betas:z}=$;return this._client.post(q`/v1/memory_stores/${J}/memory_versions/${Z}/redact?beta=true`,{...X,headers:G([{"anthropic-beta":[...z??[],"managed-agents-2026-04-01"].toString()},X?.headers])})}}});var aZ;var fX=M(()=>{I();kX();kX();yX();yX();f();E();_();aZ=class aZ extends T{constructor(){super(...arguments);this.memories=new W8(this._client),this.memoryVersions=new w8(this._client)}create(Z,$){let{betas:X,...J}=Z;return this._client.post("/v1/memory_stores?beta=true",{body:J,...$,headers:G([{"anthropic-beta":[...X??[],"managed-agents-2026-04-01"].toString()},$?.headers])})}retrieve(Z,$={},X){let{betas:J}=$??{};return this._client.get(q`/v1/memory_stores/${Z}?beta=true`,{...X,headers:G([{"anthropic-beta":[...J??[],"managed-agents-2026-04-01"].toString()},X?.headers])})}update(Z,$,X){let{betas:J,...z}=$;return this._client.post(q`/v1/memory_stores/${Z}?beta=true`,{body:z,...X,headers:G([{"anthropic-beta":[...J??[],"managed-agents-2026-04-01"].toString()},X?.headers])})}list(Z={},$){let{betas:X,...J}=Z??{};return this._client.getAPIList("/v1/memory_stores?beta=true",j,{query:J,...$,headers:G([{"anthropic-beta":[...X??[],"managed-agents-2026-04-01"].toString()},$?.headers])})}delete(Z,$={},X){let{betas:J}=$??{};return this._client.delete(q`/v1/memory_stores/${Z}?beta=true`,{...X,headers:G([{"anthropic-beta":[...J??[],"managed-agents-2026-04-01"].toString()},X?.headers])})}archive(Z,$={},X){let{betas:J}=$??{};return this._client.post(q`/v1/memory_stores/${Z}/archive?beta=true`,{...X,headers:G([{"anthropic-beta":[...J??[],"managed-agents-2026-04-01"].toString()},X?.headers])})}};aZ.Memories=W8;aZ.MemoryVersions=w8});var C0=M(()=>{u()});var x0;var bX=M(()=>{u();J0();JX();x0=class x0{constructor(Z,$){this.iterator=Z,this.controller=$}async*decoder(){let Z=new EZ;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 x0(u0(Z.body),$)}}});var q8;var hX=M(()=>{I();f();E();bX();C0();_();q8=class q8 extends T{create(Z,$){let{betas:X,...J}=Z;return this._client.post("/v1/messages/batches?beta=true",{body:J,...$,headers:G([{"anthropic-beta":[...X??[],"message-batches-2024-09-24"].toString()},$?.headers])})}retrieve(Z,$={},X){let{betas:J}=$??{};return this._client.get(q`/v1/messages/batches/${Z}?beta=true`,{...X,headers:G([{"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",MZ,{query:J,...$,headers:G([{"anthropic-beta":[...X??[],"message-batches-2024-09-24"].toString()},$?.headers])})}delete(Z,$={},X){let{betas:J}=$??{};return this._client.delete(q`/v1/messages/batches/${Z}?beta=true`,{...X,headers:G([{"anthropic-beta":[...J??[],"message-batches-2024-09-24"].toString()},X?.headers])})}cancel(Z,$={},X){let{betas:J}=$??{};return this._client.post(q`/v1/messages/batches/${Z}/cancel?beta=true`,{...X,headers:G([{"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:G([{"anthropic-beta":[...z??[],"message-batches-2024-09-24"].toString(),Accept:"application/binary"},X?.headers]),stream:!0,__binaryResponse:!0})._thenUnwrap((Y,V)=>x0.fromResponse(V.response,V.controller))}}});var B$;var gX=M(()=>{B$={"claude-opus-4-20250514":8192,"claude-opus-4-0":8192,"claude-4-opus-20250514":8192,"anthropic.claude-opus-4-20250514-v1:0":8192,"claude-opus-4@20250514":8192,"claude-opus-4-1-20250805":8192,"anthropic.claude-opus-4-1-20250805-v1:0":8192,"claude-opus-4-1@20250805":8192}});function J6(Z){return Z?.output_format??Z?.output_config?.format}function _X(Z,$,X){let J=J6($);if(!$||!("parse"in(J??{})))return{...Z,content:Z.content.map((z)=>{if(z.type==="text"){let Y=Object.defineProperty({...z},"parsed_output",{value:null,enumerable:!1});return Object.defineProperty(Y,"parsed",{get(){return X.logger.warn("The `parsed` property on `text` blocks is deprecated, please use `parsed_output` instead."),null},enumerable:!1})}return z}),parsed_output:null};return vX(Z,$,X)}function vX(Z,$,X){let J=null,z=Z.content.map((Y)=>{if(Y.type==="text"){let V=l9($,Y.text);if(J===null)J=V;let Q=Object.defineProperty({...Y},"parsed_output",{value:V,enumerable:!1});return Object.defineProperty(Q,"parsed",{get(){return X.logger.warn("The `parsed` property on `text` blocks is deprecated, please use `parsed_output` instead."),V},enumerable:!1})}return Y});return{...Z,content:z,parsed_output:J}}function l9(Z,$){let X=J6(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 mX=M(()=>{u()});var i9=(Z)=>{let $=0,X=[];while($<Z.length){let J=Z[$];if(J==="\\"){$++;continue}if(J==="{"){X.push({type:"brace",value:"{"}),$++;continue}if(J==="}"){X.push({type:"brace",value:"}"}),$++;continue}if(J==="["){X.push({type:"paren",value:"["}),$++;continue}if(J==="]"){X.push({type:"paren",value:"]"}),$++;continue}if(J===":"){X.push({type:"separator",value:":"}),$++;continue}if(J===","){X.push({type:"delimiter",value:","}),$++;continue}if(J==='"'){let Q="",W=!1;J=Z[++$];while(J!=='"'){if($===Z.length){W=!0;break}if(J==="\\"){if($++,$===Z.length){W=!0;break}Q+=J+Z[$],J=Z[++$]}else Q+=J,J=Z[++$]}if(J=Z[++$],!W)X.push({type:"string",value:Q});continue}if(J&&/\s/.test(J)){$++;continue}let Y=/[0-9]/;if(J&&Y.test(J)||J==="-"||J==="."){let Q="";if(J==="-")Q+=J,J=Z[++$];while(J&&Y.test(J)||J===".")Q+=J,J=Z[++$];X.push({type:"number",value:Q});continue}let V=/[a-z]/i;if(J&&V.test(J)){let Q="";while(J&&V.test(J)){if($===Z.length)break;Q+=J,J=Z[++$]}if(Q=="true"||Q=="false"||Q==="null")X.push({type:"name",value:Q});else{$++;continue}continue}$++}return X},H0=(Z)=>{if(Z.length===0)return Z;let $=Z[Z.length-1];switch($.type){case"separator":return Z=Z.slice(0,Z.length-1),H0(Z);break;case"number":let X=$.value[$.value.length-1];if(X==="."||X==="-")return Z=Z.slice(0,Z.length-1),H0(Z);case"string":let J=Z[Z.length-2];if(J?.type==="delimiter")return Z=Z.slice(0,Z.length-1),H0(Z);else if(J?.type==="brace"&&J.value==="{")return Z=Z.slice(0,Z.length-1),H0(Z);break;case"delimiter":return Z=Z.slice(0,Z.length-1),H0(Z);break}return Z},n9=(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},a9=(Z)=>{let $="";return Z.map((X)=>{switch(X.type){case"string":$+='"'+X.value+'"';break;default:$+=X.value;break}}),$},F$=(Z)=>JSON.parse(a9(n9(H0(i9(Z)))));var cX=()=>{};var uX=M(()=>{zX()});function Q6(Z){return Z.type==="tool_use"||Z.type==="server_tool_use"||Z.type==="mcp_tool_use"}function V6(Z){}var WZ,yZ,B0,O8,T$,M8,C8,D$,x8,DZ,H8,A$,L$,rZ,S$,j$,B8,dX,z6,E$,pX,lX,iX,Y6,K6="__json_buf",F8;var G6=M(()=>{XZ();cX();C0();Z0();uX();mX();F8=class F8{constructor(Z,$){WZ.add(this),this.messages=[],this.receivedMessages=[],yZ.set(this,void 0),B0.set(this,null),this.controller=new AbortController,O8.set(this,void 0),T$.set(this,()=>{}),M8.set(this,()=>{}),C8.set(this,void 0),D$.set(this,()=>{}),x8.set(this,()=>{}),DZ.set(this,{}),H8.set(this,!1),A$.set(this,!1),L$.set(this,!1),rZ.set(this,!1),S$.set(this,void 0),j$.set(this,void 0),B8.set(this,void 0),E$.set(this,(X)=>{if(w(this,A$,!0,"f"),BZ(X))X=new t;if(X instanceof t)return w(this,L$,!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)))}),w(this,O8,new Promise((X,J)=>{w(this,T$,X,"f"),w(this,M8,J,"f")}),"f"),w(this,C8,new Promise((X,J)=>{w(this,D$,X,"f"),w(this,x8,J,"f")}),"f"),K(this,O8,"f").catch(()=>{}),K(this,C8,"f").catch(()=>{}),w(this,B0,Z,"f"),w(this,B8,$?.logger??console,"f")}get response(){return K(this,S$,"f")}get request_id(){return K(this,j$,"f")}async withResponse(){w(this,rZ,!0,"f");let Z=await K(this,O8,"f");if(!Z)throw Error("Could not resolve a `Response` object");return{data:this,response:Z,request_id:Z.headers.get("request-id")}}static fromReadableStream(Z){let $=new F8(null);return $._run(()=>$._fromReadableStream(Z)),$}static createMessage(Z,$,X,{logger:J}={}){let z=new F8($,{logger:J});for(let Y of $.messages)z._addMessageParam(Y);return w(z,B0,{...$,stream:!0},"f"),z._run(()=>z._createMessage(Z,{...$,stream:!0},{...X,headers:{...X?.headers,"X-Stainless-Helper-Method":"stream"}})),z}_run(Z){Z().then(()=>{this._emitFinal(),this._emit("end")},K(this,E$,"f"))}_addMessageParam(Z){this.messages.push(Z)}_addMessage(Z,$=!0){if(this.receivedMessages.push(Z),$)this._emit("message",Z)}async _createMessage(Z,$,X){let J=X?.signal,z;if(J){if(J.aborted)this.controller.abort();z=this.controller.abort.bind(this.controller),J.addEventListener("abort",z)}try{K(this,WZ,"m",pX).call(this);let{response:Y,data:V}=await Z.create({...$,stream:!0},{...X,signal:this.controller.signal}).withResponse();this._connected(Y);for await(let Q of V)K(this,WZ,"m",lX).call(this,Q);if(V.controller.signal?.aborted)throw new t;K(this,WZ,"m",iX).call(this)}finally{if(J&&z)J.removeEventListener("abort",z)}}_connected(Z){if(this.ended)return;w(this,S$,Z,"f"),w(this,j$,Z?.headers.get("request-id"),"f"),K(this,T$,"f").call(this,Z),this._emit("connect")}get ended(){return K(this,H8,"f")}get errored(){return K(this,A$,"f")}get aborted(){return K(this,L$,"f")}abort(){this.controller.abort()}on(Z,$){return(K(this,DZ,"f")[Z]||(K(this,DZ,"f")[Z]=[])).push({listener:$}),this}off(Z,$){let X=K(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(K(this,DZ,"f")[Z]||(K(this,DZ,"f")[Z]=[])).push({listener:$,once:!0}),this}emitted(Z){return new Promise(($,X)=>{if(w(this,rZ,!0,"f"),Z!=="error")this.once("error",X);this.once(Z,$)})}async done(){w(this,rZ,!0,"f"),await K(this,C8,"f")}get currentMessage(){return K(this,yZ,"f")}async finalMessage(){return await this.done(),K(this,WZ,"m",dX).call(this)}async finalText(){return await this.done(),K(this,WZ,"m",z6).call(this)}_emit(Z,...$){if(K(this,H8,"f"))return;if(Z==="end")w(this,H8,!0,"f"),K(this,D$,"f").call(this);let X=K(this,DZ,"f")[Z];if(X)K(this,DZ,"f")[Z]=X.filter((J)=>!J.once),X.forEach(({listener:J})=>J(...$));if(Z==="abort"){let J=$[0];if(!K(this,rZ,"f")&&!X?.length)Promise.reject(J);K(this,M8,"f").call(this,J),K(this,x8,"f").call(this,J),this._emit("end");return}if(Z==="error"){let J=$[0];if(!K(this,rZ,"f")&&!X?.length)Promise.reject(J);K(this,M8,"f").call(this,J),K(this,x8,"f").call(this,J),this._emit("end")}}_emitFinal(){if(this.receivedMessages.at(-1))this._emit("finalMessage",K(this,WZ,"m",dX).call(this))}async _fromReadableStream(Z,$){let X=$?.signal,J;if(X){if(X.aborted)this.controller.abort();J=this.controller.abort.bind(this.controller),X.addEventListener("abort",J)}try{K(this,WZ,"m",pX).call(this),this._connected(null);let z=KZ.fromReadableStream(Z,this.controller);for await(let Y of z)K(this,WZ,"m",lX).call(this,Y);if(z.controller.signal?.aborted)throw new t;K(this,WZ,"m",iX).call(this)}finally{if(X&&J)X.removeEventListener("abort",J)}}[(yZ=new WeakMap,B0=new WeakMap,O8=new WeakMap,T$=new WeakMap,M8=new WeakMap,C8=new WeakMap,D$=new WeakMap,x8=new WeakMap,DZ=new WeakMap,H8=new WeakMap,A$=new WeakMap,L$=new WeakMap,rZ=new WeakMap,S$=new WeakMap,j$=new WeakMap,B8=new WeakMap,E$=new WeakMap,WZ=new WeakSet,dX=function(){if(this.receivedMessages.length===0)throw new H("stream ended without producing a Message with role=assistant");return this.receivedMessages.at(-1)},z6=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(" ")},pX=function(){if(this.ended)return;w(this,yZ,void 0,"f")},lX=function($){if(this.ended)return;let X=K(this,WZ,"m",Y6).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(Q6(J)&&J.input)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}case"compaction_delta":{if(J.type==="compaction"&&J.content)this._emit("compaction",J.content);break}default:V6($.delta)}break}case"message_stop":{this._addMessageParam(X),this._addMessage(_X(X,K(this,B0,"f"),{logger:K(this,B8,"f")}),!0);break}case"content_block_stop":{this._emit("contentBlock",X.content.at(-1));break}case"message_start":{w(this,yZ,X,"f");break}case"content_block_start":case"message_delta":break}},iX=function(){if(this.ended)throw new H("stream has ended, this shouldn't happen");let $=K(this,yZ,"f");if(!$)throw new H("request ended without sending any chunks");return w(this,yZ,void 0,"f"),_X($,K(this,B0,"f"),{logger:K(this,B8,"f")})},Y6=function($){let X=K(this,yZ,"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.container=$.delta.container,X.stop_reason=$.delta.stop_reason,X.stop_sequence=$.delta.stop_sequence,X.usage.output_tokens=$.usage.output_tokens,X.context_management=$.context_management,$.usage.input_tokens!=null)X.usage.input_tokens=$.usage.input_tokens;if($.usage.cache_creation_input_tokens!=null)X.usage.cache_creation_input_tokens=$.usage.cache_creation_input_tokens;if($.usage.cache_read_input_tokens!=null)X.usage.cache_read_input_tokens=$.usage.cache_read_input_tokens;if($.usage.server_tool_use!=null)X.usage.server_tool_use=$.usage.server_tool_use;if($.usage.iterations!=null)X.usage.iterations=$.usage.iterations;return X;case"content_block_start":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&&Q6(J)){let z=J[K6]||"";z+=$.delta.partial_json;let Y={...J};if(Object.defineProperty(Y,K6,{value:z,enumerable:!1,writable:!0}),z)try{Y.input=F$(z)}catch(V){let Q=new H(`Unable to parse tool parameter JSON from model. Please retry your request or adjust your prompt. Error: ${V}. JSON: ${z}`);K(this,E$,"f").call(this,Q)}X.content[$.index]=Y}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:V6($.delta)}return X}case"content_block_stop":return X}},Symbol.asyncIterator)](){let Z=[],$=[],X=!1;return this.on("streamEvent",(J)=>{let z=$.shift();if(z)z.resolve(J);else Z.push(J)}),this.on("end",()=>{X=!0;for(let J of $)J.resolve(void 0);$.length=0}),this.on("abort",(J)=>{X=!0;for(let z of $)z.reject(J);$.length=0}),this.on("error",(J)=>{X=!0;for(let z of $)z.reject(J);$.length=0}),{next:async()=>{if(!Z.length){if(X)return{value:void 0,done:!0};return new Promise((z,Y)=>$.push({resolve:z,reject:Y})).then((z)=>z?{value:z,done:!1}:{value:void 0,done:!0})}return{value:Z.shift(),done:!1}},return:async()=>{return this.abort(),{value:void 0,done:!0}}}}toReadableStream(){return new KZ(this[Symbol.asyncIterator].bind(this),this.controller).toReadableStream()}}});var N6=1e5,U6=`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 W6=()=>{};async function r9(Z,$=Z.messages.at(-1),X){if(!$||$.role!=="assistant"||!$.content||typeof $.content==="string")return null;let J=$.content.filter((Y)=>Y.type==="tool_use");if(J.length===0)return null;return{role:"user",content:await Promise.all(J.map(async(Y)=>{let V=Z.tools.find((Q)=>("name"in Q?Q.name:Q.mcp_server_name)===Y.name);if(!V||!("run"in V))return{type:"tool_result",tool_use_id:Y.id,content:`Error: Tool '${Y.name}' not found`,is_error:!0};try{let Q=Y.input;if("parse"in V&&V.parse)Q=V.parse(Q);let W=await V.run(Q,{toolUse:Y,toolUseBlock:Y,signal:X?.signal});return{type:"tool_result",tool_use_id:Y.id,content:W}}catch(Q){return{type:"tool_result",tool_use_id:Y.id,content:Q instanceof SZ?Q.content:`Error: ${Q instanceof Error?Q.message:String(Q)}`,is_error:!0}}}))}}var T8,F0,oZ,a,$Z,VZ,AZ,fZ,D8,w6,nX,A8;var aX=M(()=>{XZ();v0();u();E();T1();W6();o0();A8=class A8{constructor(Z,$,X){T8.add(this),this.client=Z,F0.set(this,!1),oZ.set(this,!1),a.set(this,void 0),$Z.set(this,void 0),VZ.set(this,void 0),AZ.set(this,void 0),fZ.set(this,void 0),D8.set(this,0),w(this,a,{params:{...$,messages:structuredClone($.messages)}},"f");let z=["BetaToolRunner",...wX($.tools,$.messages)].join(", ");if(w(this,$Z,{...X,headers:G([{"x-stainless-helper":z},X?.headers])},"f"),w(this,fZ,g$(),"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*[(F0=new WeakMap,oZ=new WeakMap,a=new WeakMap,$Z=new WeakMap,VZ=new WeakMap,AZ=new WeakMap,fZ=new WeakMap,D8=new WeakMap,T8=new WeakSet,w6=async function(){let $=K(this,a,"f").params.compactionControl;if(!$||!$.enabled)return!1;let X=0;if(K(this,VZ,"f")!==void 0)try{let W=await K(this,VZ,"f");X=W.usage.input_tokens+(W.usage.cache_creation_input_tokens??0)+(W.usage.cache_read_input_tokens??0)+W.usage.output_tokens}catch{return!1}let J=$.contextTokenThreshold??N6;if(X<J)return!1;let z=$.model??K(this,a,"f").params.model,Y=$.summaryPrompt??U6,V=K(this,a,"f").params.messages;if(V[V.length-1].role==="assistant"){let W=V[V.length-1];if(Array.isArray(W.content)){let O=W.content.filter((x)=>x.type!=="tool_use");if(O.length===0)V.pop();else W.content=O}}let Q=await this.client.beta.messages.create({model:z,messages:[...V,{role:"user",content:[{type:"text",text:Y}]}],max_tokens:K(this,a,"f").params.max_tokens},{signal:K(this,$Z,"f").signal,headers:G([K(this,$Z,"f").headers,{"x-stainless-helper":"compaction"}])});if(Q.content[0]?.type!=="text")throw new H("Expected text response for compaction");return K(this,a,"f").params.messages=[{role:"user",content:Q.content}],!0},Symbol.asyncIterator)](){var Z;if(K(this,F0,"f"))throw new H("Cannot iterate over a consumed stream");w(this,F0,!0,"f"),w(this,oZ,!0,"f"),w(this,AZ,void 0,"f");try{while(!0){let $;try{if(K(this,a,"f").params.max_iterations&&K(this,D8,"f")>=K(this,a,"f").params.max_iterations)break;w(this,oZ,!1,"f"),w(this,AZ,void 0,"f"),w(this,D8,(Z=K(this,D8,"f"),Z++,Z),"f"),w(this,VZ,void 0,"f");let{max_iterations:X,compactionControl:J,...z}=K(this,a,"f").params;if(z.stream)$=this.client.beta.messages.stream({...z},K(this,$Z,"f")),w(this,VZ,$.finalMessage(),"f"),K(this,VZ,"f").catch(()=>{}),yield $;else w(this,VZ,this.client.beta.messages.create({...z,stream:!1},K(this,$Z,"f")),"f"),yield K(this,VZ,"f");if(!await K(this,T8,"m",w6).call(this)){if(!K(this,oZ,"f")){let{role:Q,content:W}=await K(this,VZ,"f");K(this,a,"f").params.messages.push({role:Q,content:W})}let V=await K(this,T8,"m",nX).call(this,K(this,a,"f").params.messages.at(-1));if(V)K(this,a,"f").params.messages.push(V);else if(!K(this,oZ,"f"))break}}finally{if($)$.abort()}}if(!K(this,VZ,"f"))throw new H("ToolRunner concluded without a message from the server");K(this,fZ,"f").resolve(await K(this,VZ,"f"))}catch($){throw w(this,F0,!1,"f"),K(this,fZ,"f").promise.catch(()=>{}),K(this,fZ,"f").reject($),w(this,fZ,g$(),"f"),$}}setMessagesParams(Z){if(typeof Z==="function")K(this,a,"f").params=Z(K(this,a,"f").params);else K(this,a,"f").params=Z;w(this,oZ,!0,"f"),w(this,AZ,void 0,"f")}setRequestOptions(Z){if(typeof Z==="function")w(this,$Z,Z(K(this,$Z,"f")),"f");else w(this,$Z,{...K(this,$Z,"f"),...Z},"f")}async generateToolResponse(Z=K(this,$Z,"f").signal){let $=await K(this,VZ,"f")??this.params.messages.at(-1);if(!$)return null;return K(this,T8,"m",nX).call(this,$,Z)}done(){return K(this,fZ,"f").promise}async runUntilDone(){if(!K(this,F0,"f"))for await(let Z of this);return this.done()}get params(){return K(this,a,"f").params}pushMessages(...Z){this.setMessagesParams(($)=>({...$,messages:[...$.messages,...Z]}))}then(Z,$){return this.runUntilDone().then(Z,$)}};nX=async function($,X=K(this,$Z,"f").signal){if(K(this,AZ,"f")!==void 0)return K(this,AZ,"f");return w(this,AZ,r9(K(this,a,"f").params,$,{...K(this,$Z,"f"),signal:X}),"f"),K(this,AZ,"f")}});function O6(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 q6,o9,bZ;var rX=M(()=>{C0();hX();I();gX();E();o0();mX();G6();aX();v0();hX();aX();v0();q6={"claude-1.3":"November 6th, 2024","claude-1.3-100k":"November 6th, 2024","claude-instant-1.1":"November 6th, 2024","claude-instant-1.1-100k":"November 6th, 2024","claude-instant-1.2":"November 6th, 2024","claude-3-sonnet-20240229":"July 21st, 2025","claude-3-opus-20240229":"January 5th, 2026","claude-2.1":"July 21st, 2025","claude-2.0":"July 21st, 2025","claude-3-7-sonnet-latest":"February 19th, 2026","claude-3-7-sonnet-20250219":"February 19th, 2026"},o9=["claude-mythos-preview","claude-opus-4-6"];bZ=class bZ extends T{constructor(){super(...arguments);this.batches=new q8(this._client)}create(Z,$){let X=O6(Z),{betas:J,...z}=X;if(z.model in q6)console.warn(`The model '${z.model}' is deprecated and will reach end-of-life on ${q6[z.model]}
32
+ Please migrate to a newer model. Visit https://docs.anthropic.com/en/docs/resources/model-deprecations for more information.`);if(o9.includes(z.model)&&z.thinking&&z.thinking.type==="enabled")console.warn(`Using Claude with ${z.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 Y=this._client._options.timeout;if(!z.stream&&Y==null){let Q=B$[z.model]??void 0;Y=this._client.calculateNonstreamingTimeout(z.max_tokens,Q)}let V=z$(z.tools,z.messages);return this._client.post("/v1/messages?beta=true",{body:z,timeout:Y??600000,...$,headers:G([{...J?.toString()!=null?{"anthropic-beta":J?.toString()}:void 0},V,$?.headers]),stream:X.stream??!1})}parse(Z,$){return $={...$,headers:G([{"anthropic-beta":[...Z.betas??[],"structured-outputs-2025-12-15"].toString()},$?.headers])},this.create(Z,$).then((X)=>vX(X,Z,{logger:this._client.logger??console}))}stream(Z,$){return F8.createMessage(this,Z,$)}countTokens(Z,$){let X=O6(Z),{betas:J,...z}=X;return this._client.post("/v1/messages/count_tokens?beta=true",{body:z,...$,headers:G([{"anthropic-beta":[...J??[],"token-counting-2024-11-01"].toString()},$?.headers])})}toolRunner(Z,$){return new A8(this._client,Z,$)}};bZ.Batches=q8;bZ.BetaToolRunner=A8;bZ.ToolError=SZ});var T0;var oX=M(()=>{I();f();E();_();x$();x$();T0=class T0 extends T{list(Z,$={},X){let{betas:J,...z}=$??{};return this._client.getAPIList(q`/v1/sessions/${Z}/events?beta=true`,j,{query:z,...X,headers:G([{"anthropic-beta":[...J??[],"managed-agents-2026-04-01"].toString()},X?.headers])})}send(Z,$,X){let{betas:J,...z}=$;return this._client.post(q`/v1/sessions/${Z}/events?beta=true`,{body:z,...X,headers:G([{"anthropic-beta":[...J??[],"managed-agents-2026-04-01"].toString()},X?.headers])})}stream(Z,$={},X){let{betas:J}=$??{};return this._client.get(q`/v1/sessions/${Z}/events/stream?beta=true`,{...X,headers:G([{"anthropic-beta":[...J??[],"managed-agents-2026-04-01"].toString()},X?.headers]),stream:!0})}toolRunner(Z,$){return new iZ(Z,{...$,client:this._client})}};T0.SessionToolRunner=iZ});var L8;var tX=M(()=>{I();f();E();_();L8=class L8 extends T{retrieve(Z,$,X){let{session_id:J,betas:z}=$;return this._client.get(q`/v1/sessions/${J}/resources/${Z}?beta=true`,{...X,headers:G([{"anthropic-beta":[...z??[],"managed-agents-2026-04-01"].toString()},X?.headers])})}update(Z,$,X){let{session_id:J,betas:z,...Y}=$;return this._client.post(q`/v1/sessions/${J}/resources/${Z}?beta=true`,{body:Y,...X,headers:G([{"anthropic-beta":[...z??[],"managed-agents-2026-04-01"].toString()},X?.headers])})}list(Z,$={},X){let{betas:J,...z}=$??{};return this._client.getAPIList(q`/v1/sessions/${Z}/resources?beta=true`,j,{query:z,...X,headers:G([{"anthropic-beta":[...J??[],"managed-agents-2026-04-01"].toString()},X?.headers])})}delete(Z,$,X){let{session_id:J,betas:z}=$;return this._client.delete(q`/v1/sessions/${J}/resources/${Z}?beta=true`,{...X,headers:G([{"anthropic-beta":[...z??[],"managed-agents-2026-04-01"].toString()},X?.headers])})}add(Z,$,X){let{betas:J,...z}=$;return this._client.post(q`/v1/sessions/${Z}/resources?beta=true`,{body:z,...X,headers:G([{"anthropic-beta":[...J??[],"managed-agents-2026-04-01"].toString()},X?.headers])})}}});var S8;var sX=M(()=>{I();f();E();_();S8=class S8 extends T{list(Z,$,X){let{session_id:J,betas:z,...Y}=$;return this._client.getAPIList(q`/v1/sessions/${J}/threads/${Z}/events?beta=true`,j,{query:Y,...X,headers:G([{"anthropic-beta":[...z??[],"managed-agents-2026-04-01"].toString()},X?.headers])})}stream(Z,$,X){let{session_id:J,betas:z}=$;return this._client.get(q`/v1/sessions/${J}/threads/${Z}/stream?beta=true`,{...X,headers:G([{"anthropic-beta":[...z??[],"managed-agents-2026-04-01"].toString()},X?.headers]),stream:!0})}}});var D0;var eX=M(()=>{I();sX();sX();f();E();_();D0=class D0 extends T{constructor(){super(...arguments);this.events=new S8(this._client)}retrieve(Z,$,X){let{session_id:J,betas:z}=$;return this._client.get(q`/v1/sessions/${J}/threads/${Z}?beta=true`,{...X,headers:G([{"anthropic-beta":[...z??[],"managed-agents-2026-04-01"].toString()},X?.headers])})}list(Z,$={},X){let{betas:J,...z}=$??{};return this._client.getAPIList(q`/v1/sessions/${Z}/threads?beta=true`,j,{query:z,...X,headers:G([{"anthropic-beta":[...J??[],"managed-agents-2026-04-01"].toString()},X?.headers])})}archive(Z,$,X){let{session_id:J,betas:z}=$;return this._client.post(q`/v1/sessions/${J}/threads/${Z}/archive?beta=true`,{...X,headers:G([{"anthropic-beta":[...z??[],"managed-agents-2026-04-01"].toString()},X?.headers])})}};D0.Events=S8});var hZ;var Z1=M(()=>{I();oX();oX();tX();tX();eX();eX();f();E();_();hZ=class hZ extends T{constructor(){super(...arguments);this.events=new T0(this._client),this.resources=new L8(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:G([{"anthropic-beta":[...X??[],"managed-agents-2026-04-01"].toString()},$?.headers])})}retrieve(Z,$={},X){let{betas:J}=$??{};return this._client.get(q`/v1/sessions/${Z}?beta=true`,{...X,headers:G([{"anthropic-beta":[...J??[],"managed-agents-2026-04-01"].toString()},X?.headers])})}update(Z,$,X){let{betas:J,...z}=$;return this._client.post(q`/v1/sessions/${Z}?beta=true`,{body:z,...X,headers:G([{"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",j,{query:J,...$,headers:G([{"anthropic-beta":[...X??[],"managed-agents-2026-04-01"].toString()},$?.headers])})}delete(Z,$={},X){let{betas:J}=$??{};return this._client.delete(q`/v1/sessions/${Z}?beta=true`,{...X,headers:G([{"anthropic-beta":[...J??[],"managed-agents-2026-04-01"].toString()},X?.headers])})}archive(Z,$={},X){let{betas:J}=$??{};return this._client.post(q`/v1/sessions/${Z}/archive?beta=true`,{...X,headers:G([{"anthropic-beta":[...J??[],"managed-agents-2026-04-01"].toString()},X?.headers])})}};hZ.Events=T0;hZ.Resources=L8;hZ.Threads=D0});var j8;var $1=M(()=>{I();f();E();V0();_();j8=class j8 extends T{create(Z,$={},X){let{betas:J,...z}=$??{};return this._client.post(q`/v1/skills/${Z}/versions?beta=true`,Q0({body:z,...X,headers:G([{"anthropic-beta":[...J??[],"skills-2025-10-02"].toString()},X?.headers])},this._client,!1))}retrieve(Z,$,X){let{skill_id:J,betas:z}=$;return this._client.get(q`/v1/skills/${J}/versions/${Z}?beta=true`,{...X,headers:G([{"anthropic-beta":[...z??[],"skills-2025-10-02"].toString()},X?.headers])})}list(Z,$={},X){let{betas:J,...z}=$??{};return this._client.getAPIList(q`/v1/skills/${Z}/versions?beta=true`,j,{query:z,...X,headers:G([{"anthropic-beta":[...J??[],"skills-2025-10-02"].toString()},X?.headers])})}delete(Z,$,X){let{skill_id:J,betas:z}=$;return this._client.delete(q`/v1/skills/${J}/versions/${Z}?beta=true`,{...X,headers:G([{"anthropic-beta":[...z??[],"skills-2025-10-02"].toString()},X?.headers])})}download(Z,$,X){let{skill_id:J,betas:z}=$;return this._client.get(q`/v1/skills/${J}/versions/${Z}/content?beta=true`,{...X,headers:G([{"anthropic-beta":[...z??[],"skills-2025-10-02"].toString(),Accept:"application/binary"},X?.headers]),__binaryResponse:!0})}}});var A0;var X1=M(()=>{I();$1();$1();f();E();V0();_();A0=class A0 extends T{constructor(){super(...arguments);this.versions=new j8(this._client)}create(Z={},$){let{betas:X,...J}=Z??{};return this._client.post("/v1/skills?beta=true",Q0({body:J,...$,headers:G([{"anthropic-beta":[...X??[],"skills-2025-10-02"].toString()},$?.headers])},this._client,!1))}retrieve(Z,$={},X){let{betas:J}=$??{};return this._client.get(q`/v1/skills/${Z}?beta=true`,{...X,headers:G([{"anthropic-beta":[...J??[],"skills-2025-10-02"].toString()},X?.headers])})}list(Z={},$){let{betas:X,...J}=Z??{};return this._client.getAPIList("/v1/skills?beta=true",j,{query:J,...$,headers:G([{"anthropic-beta":[...X??[],"skills-2025-10-02"].toString()},$?.headers])})}delete(Z,$={},X){let{betas:J}=$??{};return this._client.delete(q`/v1/skills/${Z}?beta=true`,{...X,headers:G([{"anthropic-beta":[...J??[],"skills-2025-10-02"].toString()},X?.headers])})}};A0.Versions=j8});var E8;var J1=M(()=>{I();f();E();_();E8=class E8 extends T{create(Z,$,X){let{betas:J,...z}=$;return this._client.post(q`/v1/vaults/${Z}/credentials?beta=true`,{body:z,...X,headers:G([{"anthropic-beta":[...J??[],"managed-agents-2026-04-01"].toString()},X?.headers])})}retrieve(Z,$,X){let{vault_id:J,betas:z}=$;return this._client.get(q`/v1/vaults/${J}/credentials/${Z}?beta=true`,{...X,headers:G([{"anthropic-beta":[...z??[],"managed-agents-2026-04-01"].toString()},X?.headers])})}update(Z,$,X){let{vault_id:J,betas:z,...Y}=$;return this._client.post(q`/v1/vaults/${J}/credentials/${Z}?beta=true`,{body:Y,...X,headers:G([{"anthropic-beta":[...z??[],"managed-agents-2026-04-01"].toString()},X?.headers])})}list(Z,$={},X){let{betas:J,...z}=$??{};return this._client.getAPIList(q`/v1/vaults/${Z}/credentials?beta=true`,j,{query:z,...X,headers:G([{"anthropic-beta":[...J??[],"managed-agents-2026-04-01"].toString()},X?.headers])})}delete(Z,$,X){let{vault_id:J,betas:z}=$;return this._client.delete(q`/v1/vaults/${J}/credentials/${Z}?beta=true`,{...X,headers:G([{"anthropic-beta":[...z??[],"managed-agents-2026-04-01"].toString()},X?.headers])})}archive(Z,$,X){let{vault_id:J,betas:z}=$;return this._client.post(q`/v1/vaults/${J}/credentials/${Z}/archive?beta=true`,{...X,headers:G([{"anthropic-beta":[...z??[],"managed-agents-2026-04-01"].toString()},X?.headers])})}mcpOAuthValidate(Z,$,X){let{vault_id:J,betas:z}=$;return this._client.post(q`/v1/vaults/${J}/credentials/${Z}/mcp_oauth_validate?beta=true`,{...X,headers:G([{"anthropic-beta":[...z??[],"managed-agents-2026-04-01"].toString()},X?.headers])})}}});var L0;var z1=M(()=>{I();J1();J1();f();E();_();L0=class L0 extends T{constructor(){super(...arguments);this.credentials=new E8(this._client)}create(Z,$){let{betas:X,...J}=Z;return this._client.post("/v1/vaults?beta=true",{body:J,...$,headers:G([{"anthropic-beta":[...X??[],"managed-agents-2026-04-01"].toString()},$?.headers])})}retrieve(Z,$={},X){let{betas:J}=$??{};return this._client.get(q`/v1/vaults/${Z}?beta=true`,{...X,headers:G([{"anthropic-beta":[...J??[],"managed-agents-2026-04-01"].toString()},X?.headers])})}update(Z,$,X){let{betas:J,...z}=$;return this._client.post(q`/v1/vaults/${Z}?beta=true`,{body:z,...X,headers:G([{"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",j,{query:J,...$,headers:G([{"anthropic-beta":[...X??[],"managed-agents-2026-04-01"].toString()},$?.headers])})}delete(Z,$={},X){let{betas:J}=$??{};return this._client.delete(q`/v1/vaults/${Z}?beta=true`,{...X,headers:G([{"anthropic-beta":[...J??[],"managed-agents-2026-04-01"].toString()},X?.headers])})}archive(Z,$={},X){let{betas:J}=$??{};return this._client.post(q`/v1/vaults/${Z}/archive?beta=true`,{...X,headers:G([{"anthropic-beta":[...J??[],"managed-agents-2026-04-01"].toString()},X?.headers])})}};L0.Credentials=E8});var o;var Y1=M(()=>{I();qX();qX();OX();OX();MX();MX();HX();HX();FX();FX();IX();IX();fX();fX();rX();rX();Z1();Z1();X1();X1();z1();z1();o=class o extends T{constructor(){super(...arguments);this.models=new s0(this._client),this.messages=new bZ(this._client),this.agents=new G0(this._client),this.environments=new M0(this._client),this.sessions=new hZ(this._client),this.vaults=new L0(this._client),this.memoryStores=new aZ(this._client),this.files=new t0(this._client),this.skills=new A0(this._client),this.webhooks=new X8(this._client),this.userProfiles=new e0(this._client)}};o.Models=s0;o.Messages=bZ;o.Agents=G0;o.Environments=M0;o.Sessions=hZ;o.Vaults=L0;o.MemoryStores=aZ;o.Files=t0;o.Skills=A0;o.Webhooks=X8;o.UserProfiles=e0});var S0;var K1=M(()=>{I();E();S0=class S0 extends T{create(Z,$){let{betas:X,...J}=Z;return this._client.post("/v1/complete",{body:J,timeout:this._client._options.timeout??600000,...$,headers:G([{...X?.toString()!=null?{"anthropic-beta":X?.toString()}:void 0},$?.headers]),stream:Z.stream??!1})}}});function M6(Z){return Z?.output_config?.format}function Q1(Z,$,X){let J=M6($);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 V1(Z,$,X)}function V1(Z,$,X){let J=null,z=Z.content.map((Y)=>{if(Y.type==="text"){let V=Q5($,Y.text);if(J===null)J=V;return Object.defineProperty({...Y},"parsed_output",{value:V,enumerable:!1})}return Y});return{...Z,content:z,parsed_output:J}}function Q5(Z,$){let X=M6(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 G1=M(()=>{u()});function B6(Z){return Z.type==="tool_use"||Z.type==="server_tool_use"}function F6(Z){}var wZ,gZ,j0,R8,R$,P8,I8,P$,k8,LZ,y8,I$,k$,tZ,y$,f$,f8,N1,C6,U1,W1,w1,q1,x6,H6="__json_buf",b8;var T6=M(()=>{XZ();Z0();C0();uX();cX();G1();b8=class b8{constructor(Z,$){wZ.add(this),this.messages=[],this.receivedMessages=[],gZ.set(this,void 0),j0.set(this,null),this.controller=new AbortController,R8.set(this,void 0),R$.set(this,()=>{}),P8.set(this,()=>{}),I8.set(this,void 0),P$.set(this,()=>{}),k8.set(this,()=>{}),LZ.set(this,{}),y8.set(this,!1),I$.set(this,!1),k$.set(this,!1),tZ.set(this,!1),y$.set(this,void 0),f$.set(this,void 0),f8.set(this,void 0),U1.set(this,(X)=>{if(w(this,I$,!0,"f"),BZ(X))X=new t;if(X instanceof t)return w(this,k$,!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)))}),w(this,R8,new Promise((X,J)=>{w(this,R$,X,"f"),w(this,P8,J,"f")}),"f"),w(this,I8,new Promise((X,J)=>{w(this,P$,X,"f"),w(this,k8,J,"f")}),"f"),K(this,R8,"f").catch(()=>{}),K(this,I8,"f").catch(()=>{}),w(this,j0,Z,"f"),w(this,f8,$?.logger??console,"f")}get response(){return K(this,y$,"f")}get request_id(){return K(this,f$,"f")}async withResponse(){w(this,tZ,!0,"f");let Z=await K(this,R8,"f");if(!Z)throw Error("Could not resolve a `Response` object");return{data:this,response:Z,request_id:Z.headers.get("request-id")}}static fromReadableStream(Z){let $=new b8(null);return $._run(()=>$._fromReadableStream(Z)),$}static createMessage(Z,$,X,{logger:J}={}){let z=new b8($,{logger:J});for(let Y of $.messages)z._addMessageParam(Y);return w(z,j0,{...$,stream:!0},"f"),z._run(()=>z._createMessage(Z,{...$,stream:!0},{...X,headers:{...X?.headers,"X-Stainless-Helper-Method":"stream"}})),z}_run(Z){Z().then(()=>{this._emitFinal(),this._emit("end")},K(this,U1,"f"))}_addMessageParam(Z){this.messages.push(Z)}_addMessage(Z,$=!0){if(this.receivedMessages.push(Z),$)this._emit("message",Z)}async _createMessage(Z,$,X){let J=X?.signal,z;if(J){if(J.aborted)this.controller.abort();z=this.controller.abort.bind(this.controller),J.addEventListener("abort",z)}try{K(this,wZ,"m",W1).call(this);let{response:Y,data:V}=await Z.create({...$,stream:!0},{...X,signal:this.controller.signal}).withResponse();this._connected(Y);for await(let Q of V)K(this,wZ,"m",w1).call(this,Q);if(V.controller.signal?.aborted)throw new t;K(this,wZ,"m",q1).call(this)}finally{if(J&&z)J.removeEventListener("abort",z)}}_connected(Z){if(this.ended)return;w(this,y$,Z,"f"),w(this,f$,Z?.headers.get("request-id"),"f"),K(this,R$,"f").call(this,Z),this._emit("connect")}get ended(){return K(this,y8,"f")}get errored(){return K(this,I$,"f")}get aborted(){return K(this,k$,"f")}abort(){this.controller.abort()}on(Z,$){return(K(this,LZ,"f")[Z]||(K(this,LZ,"f")[Z]=[])).push({listener:$}),this}off(Z,$){let X=K(this,LZ,"f")[Z];if(!X)return this;let J=X.findIndex((z)=>z.listener===$);if(J>=0)X.splice(J,1);return this}once(Z,$){return(K(this,LZ,"f")[Z]||(K(this,LZ,"f")[Z]=[])).push({listener:$,once:!0}),this}emitted(Z){return new Promise(($,X)=>{if(w(this,tZ,!0,"f"),Z!=="error")this.once("error",X);this.once(Z,$)})}async done(){w(this,tZ,!0,"f"),await K(this,I8,"f")}get currentMessage(){return K(this,gZ,"f")}async finalMessage(){return await this.done(),K(this,wZ,"m",N1).call(this)}async finalText(){return await this.done(),K(this,wZ,"m",C6).call(this)}_emit(Z,...$){if(K(this,y8,"f"))return;if(Z==="end")w(this,y8,!0,"f"),K(this,P$,"f").call(this);let X=K(this,LZ,"f")[Z];if(X)K(this,LZ,"f")[Z]=X.filter((J)=>!J.once),X.forEach(({listener:J})=>J(...$));if(Z==="abort"){let J=$[0];if(!K(this,tZ,"f")&&!X?.length)Promise.reject(J);K(this,P8,"f").call(this,J),K(this,k8,"f").call(this,J),this._emit("end");return}if(Z==="error"){let J=$[0];if(!K(this,tZ,"f")&&!X?.length)Promise.reject(J);K(this,P8,"f").call(this,J),K(this,k8,"f").call(this,J),this._emit("end")}}_emitFinal(){if(this.receivedMessages.at(-1))this._emit("finalMessage",K(this,wZ,"m",N1).call(this))}async _fromReadableStream(Z,$){let X=$?.signal,J;if(X){if(X.aborted)this.controller.abort();J=this.controller.abort.bind(this.controller),X.addEventListener("abort",J)}try{K(this,wZ,"m",W1).call(this),this._connected(null);let z=KZ.fromReadableStream(Z,this.controller);for await(let Y of z)K(this,wZ,"m",w1).call(this,Y);if(z.controller.signal?.aborted)throw new t;K(this,wZ,"m",q1).call(this)}finally{if(X&&J)X.removeEventListener("abort",J)}}[(gZ=new WeakMap,j0=new WeakMap,R8=new WeakMap,R$=new WeakMap,P8=new WeakMap,I8=new WeakMap,P$=new WeakMap,k8=new WeakMap,LZ=new WeakMap,y8=new WeakMap,I$=new WeakMap,k$=new WeakMap,tZ=new WeakMap,y$=new WeakMap,f$=new WeakMap,f8=new WeakMap,U1=new WeakMap,wZ=new WeakSet,N1=function(){if(this.receivedMessages.length===0)throw new H("stream ended without producing a Message with role=assistant");return this.receivedMessages.at(-1)},C6=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(" ")},W1=function(){if(this.ended)return;w(this,gZ,void 0,"f")},w1=function($){if(this.ended)return;let X=K(this,wZ,"m",x6).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(B6(J)&&J.input)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:F6($.delta)}break}case"message_stop":{this._addMessageParam(X),this._addMessage(Q1(X,K(this,j0,"f"),{logger:K(this,f8,"f")}),!0);break}case"content_block_stop":{this._emit("contentBlock",X.content.at(-1));break}case"message_start":{w(this,gZ,X,"f");break}case"content_block_start":case"message_delta":break}},q1=function(){if(this.ended)throw new H("stream has ended, this shouldn't happen");let $=K(this,gZ,"f");if(!$)throw new H("request ended without sending any chunks");return w(this,gZ,void 0,"f"),Q1($,K(this,j0,"f"),{logger:K(this,f8,"f")})},x6=function($){let X=K(this,gZ,"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,$.delta.stop_details!=null)X.stop_details=$.delta.stop_details;if(X.usage.output_tokens=$.usage.output_tokens,$.usage.input_tokens!=null)X.usage.input_tokens=$.usage.input_tokens;if($.usage.cache_creation_input_tokens!=null)X.usage.cache_creation_input_tokens=$.usage.cache_creation_input_tokens;if($.usage.cache_read_input_tokens!=null)X.usage.cache_read_input_tokens=$.usage.cache_read_input_tokens;if($.usage.server_tool_use!=null)X.usage.server_tool_use=$.usage.server_tool_use;return X;case"content_block_start":return X.content.push({...$.content_block}),X;case"content_block_delta":{let J=X.content.at($.index);switch($.delta.type){case"text_delta":{if(J?.type==="text")X.content[$.index]={...J,text:(J.text||"")+$.delta.text};break}case"citations_delta":{if(J?.type==="text")X.content[$.index]={...J,citations:[...J.citations??[],$.delta.citation]};break}case"input_json_delta":{if(J&&B6(J)){let z=J[H6]||"";z+=$.delta.partial_json;let Y={...J};if(Object.defineProperty(Y,H6,{value:z,enumerable:!1,writable:!0}),z)Y.input=F$(z);X.content[$.index]=Y}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:F6($.delta)}return X}case"content_block_stop":return X}},Symbol.asyncIterator)](){let Z=[],$=[],X=!1;return this.on("streamEvent",(J)=>{let z=$.shift();if(z)z.resolve(J);else Z.push(J)}),this.on("end",()=>{X=!0;for(let J of $)J.resolve(void 0);$.length=0}),this.on("abort",(J)=>{X=!0;for(let z of $)z.reject(J);$.length=0}),this.on("error",(J)=>{X=!0;for(let z of $)z.reject(J);$.length=0}),{next:async()=>{if(!Z.length){if(X)return{value:void 0,done:!0};return new Promise((z,Y)=>$.push({resolve:z,reject:Y})).then((z)=>z?{value:z,done:!1}:{value:void 0,done:!0})}return{value:Z.shift(),done:!1}},return:async()=>{return this.abort(),{value:void 0,done:!0}}}}toReadableStream(){return new KZ(this[Symbol.asyncIterator].bind(this),this.controller).toReadableStream()}}});var h8;var O1=M(()=>{I();f();E();bX();C0();_();h8=class h8 extends T{create(Z,$){return this._client.post("/v1/messages/batches",{body:Z,...$})}retrieve(Z,$){return this._client.get(q`/v1/messages/batches/${Z}`,$)}list(Z={},$){return this._client.getAPIList("/v1/messages/batches",MZ,{query:Z,...$})}delete(Z,$){return this._client.delete(q`/v1/messages/batches/${Z}`,$)}cancel(Z,$){return this._client.post(q`/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:G([{Accept:"application/binary"},$?.headers]),stream:!0,__binaryResponse:!0})._thenUnwrap((J,z)=>x0.fromResponse(z.response,z.controller))}}});var sZ,D6,G5;var M1=M(()=>{I();E();o0();T6();G1();O1();O1();gX();sZ=class sZ extends T{constructor(){super(...arguments);this.batches=new h8(this._client)}create(Z,$){if(Z.model in D6)console.warn(`The model '${Z.model}' is deprecated and will reach end-of-life on ${D6[Z.model]}
33
+ Please migrate to a newer model. Visit https://docs.anthropic.com/en/docs/resources/model-deprecations for more information.`);if(G5.includes(Z.model)&&Z.thinking&&Z.thinking.type==="enabled")console.warn(`Using Claude with ${Z.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 X=this._client._options.timeout;if(!Z.stream&&X==null){let z=B$[Z.model]??void 0;X=this._client.calculateNonstreamingTimeout(Z.max_tokens,z)}let J=z$(Z.tools,Z.messages);return this._client.post("/v1/messages",{body:Z,timeout:X??600000,...$,headers:G([J,$?.headers]),stream:Z.stream??!1})}parse(Z,$){return this.create(Z,$).then((X)=>V1(X,Z,{logger:this._client.logger??console}))}stream(Z,$){return b8.createMessage(this,Z,$,{logger:this._client.logger??console})}countTokens(Z,$){return this._client.post("/v1/messages/count_tokens",{body:Z,...$})}};D6={"claude-1.3":"November 6th, 2024","claude-1.3-100k":"November 6th, 2024","claude-instant-1.1":"November 6th, 2024","claude-instant-1.1-100k":"November 6th, 2024","claude-instant-1.2":"November 6th, 2024","claude-3-sonnet-20240229":"July 21st, 2025","claude-3-opus-20240229":"January 5th, 2026","claude-2.1":"July 21st, 2025","claude-2.0":"July 21st, 2025","claude-3-7-sonnet-latest":"February 19th, 2026","claude-3-7-sonnet-20250219":"February 19th, 2026","claude-3-5-haiku-latest":"February 19th, 2026","claude-3-5-haiku-20241022":"February 19th, 2026","claude-opus-4-0":"June 15th, 2026","claude-opus-4-20250514":"June 15th, 2026","claude-sonnet-4-0":"June 15th, 2026","claude-sonnet-4-20250514":"June 15th, 2026"},G5=["claude-mythos-preview","claude-opus-4-6"];sZ.Batches=h8});var E0;var C1=M(()=>{I();f();E();_();E0=class E0 extends T{retrieve(Z,$={},X){let{betas:J}=$??{};return this._client.get(q`/v1/models/${Z}`,{...X,headers:G([{...J?.toString()!=null?{"anthropic-beta":J?.toString()}:void 0},X?.headers])})}list(Z={},$){let{betas:X,...J}=Z??{};return this._client.getAPIList("/v1/models",MZ,{query:J,...$,headers:G([{...X?.toString()!=null?{"anthropic-beta":X?.toString()}:void 0},$?.headers])})}}});var A6=M(()=>{Y1();K1();M1();C1();F4()});class m{get credentials(){return this._authState.provider}constructor({baseURL:Z=S("ANTHROPIC_BASE_URL"),apiKey:$,authToken:X,webhookKey:J=S("ANTHROPIC_WEBHOOK_SIGNING_KEY")??null,...z}={}){if(x1.add(this),this._requestAuthFlags=new WeakMap,b$.set(this,void 0),$===void 0)$=z.profile!=null?null:S("ANTHROPIC_API_KEY")??null;if(X===void 0)X=z.profile!=null?null:S("ANTHROPIC_AUTH_TOKEN")??null;if(z.profile!=null&&(z.credentials!=null||z.config!=null))throw TypeError("Pass at most one of `profile`, `credentials`, or `config`.");let Y={apiKey:$,authToken:X,webhookKey:J,...z,baseURL:Z||"https://api.anthropic.com"};if(!Y.dangerouslyAllowBrowser&&R1())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=Y.baseURL,this._baseURLIsExplicit=z.__baseURLIsExplicit??!!Z,this.timeout=Y.timeout??H1.DEFAULT_TIMEOUT,this.logger=Y.logger??console;let V="warn";this.logLevel=V,this.logLevel=s$(Y.logLevel,"ClientOptions.logLevel",this)??s$(S("ANTHROPIC_LOG"),"process.env['ANTHROPIC_LOG']",this)??V,this.fetchOptions=Y.fetchOptions,this.maxRetries=Y.maxRetries??2,this.fetch=Y.fetch??P1(),w(this,b$,k1,"f");let Q=S("ANTHROPIC_CUSTOM_HEADERS");if(Q){let O={};for(let x of Q.split(`
41
+ `)){let U=x.indexOf(":");if(U>=0)O[x.substring(0,U).trim()]=x.substring(U+1).trim()}Y.defaultHeaders={...O,...Y.defaultHeaders}}let W=z.__auth;if(delete Y.__auth,delete Y.__baseURLIsExplicit,this._options=Y,this.apiKey=typeof $==="string"?$:null,this.authToken=X,this.webhookKey=J,W){if(this._authState=W,!this._baseURLIsExplicit&&W.baseURL)this.baseURL=W.baseURL}else if(this._authState={provider:null,tokenCache:null,resolution:null,error:null,extraHeaders:{}},this.apiKey==null&&this.authToken==null){let O=Y.credentials??null;if(O)this._authState.provider=O,this._authState.tokenCache=this._makeTokenCache(O);else if(Y.config!=null){let x=XX(Y.config,this._credentialResolverOptions());this._authState.provider=x.provider,this._authState.tokenCache=this._makeTokenCache(x.provider),this._authState.extraHeaders=x.extraHeaders,this._applyCredentialBaseURL(x.baseURL)}else if(Y.profile!=null)this._authState.resolution=this._resolveDefaultCredentials(Y.profile);else this._authState.resolution=this._resolveDefaultCredentials()}}_applyCredentialBaseURL(Z){if(!Z)return;let $=Z.replace(/\/+$/,"");if(this._authState.baseURL=$,!this._baseURLIsExplicit)this.baseURL=$}_credentialResolverOptions(){return{baseURL:this.baseURL,fetch:this.fetch,userAgent:this.getUserAgent(),onCacheWriteError:(Z)=>{k(this).debug("credential cache write failed (best-effort)",Z)},onSafetyWarning:(Z)=>{k(this).warn(Z)}}}_makeTokenCache(Z){return new o$(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,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 q4(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,G([{Authorization:`Bearer ${$}`}])}return G([await this.apiKeyAuth(Z),await this.bearerAuth(Z)])}async apiKeyAuth(Z){if(this.apiKey==null)return;return G([{"X-Api-Key":this.apiKey}])}async bearerAuth(Z){if(this.authToken==null)return;return G([{Authorization:`Bearer ${this.authToken}`}])}stringifyQuery(Z){return p1(Z)}getUserAgent(){return`${this.constructor.name}/JS ${NZ}`}defaultIdempotencyKey(){return`stainless-node-retry-${$0()}`}makeStatusError(Z,$,X,J){return v.generate(Z,$,X,J)}buildURL(Z,$,X){let J=!K(this,x1,"m",L6).call(this)&&X||this.baseURL,z=D1(Z)?new URL(Z):new URL(J+(J.endsWith("/")&&Z.startsWith("/")?Z.slice(1):Z)),Y=this.defaultQuery(),V=Object.fromEntries(z.searchParams);if(!v$(Y)||!v$(V))$={...V,...Y,...$};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[Y,V]of Object.entries(this._authState.extraHeaders))if(!J.has(Y))J.set(Y,V);if(!J.get("anthropic-beta")?.split(",").map((Y)=>Y.trim())?.includes(mZ))J.append("anthropic-beta",mZ);Z.headers=J}}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 cZ(this,this.makeRequest(Z,$,void 0))}async makeRequest(Z,$,X){let J=await Z,z=J.maxRetries??this.maxRetries;if($==null)$=z,this._requestAuthFlags.delete(J);await this.prepareOptions(J);let{req:Y,url:V,timeout:Q}=await this.buildRequest(J,{retryCount:z-$});await this.prepareRequest(Y,{url:V,options:J});let W="log_"+(Math.random()*16777216|0).toString(16).padStart(6,"0"),O=X===void 0?"":`, retryOf: ${X}`,x=Date.now();if(k(this).debug(`[${W}] sending request`,FZ({retryOfRequestLogID:X,method:J.method,url:V,options:J,headers:Y.headers})),J.signal?.aborted)throw new t;let U=new AbortController,N=await this.fetchWithTimeout(V,Y,Q,U).catch(R0),C=Date.now();if(N instanceof globalThis.Error){let D=`retrying, ${$} attempts remaining`;if(J.signal?.aborted)throw new t;let A=BZ(N)||/timed? ?out/i.test(String(N)+("cause"in N?String(N.cause):""));if($)return k(this).info(`[${W}] connection ${A?"timed out":"failed"} - ${D}`),k(this).debug(`[${W}] connection ${A?"timed out":"failed"} (${D})`,FZ({retryOfRequestLogID:X,url:V,durationMs:C-x,message:N.message})),this.retryRequest(J,$,X??W);if(k(this).info(`[${W}] connection ${A?"timed out":"failed"} - error; no more retries left`),k(this).debug(`[${W}] connection ${A?"timed out":"failed"} (error; no more retries left)`,FZ({retryOfRequestLogID:X,url:V,durationMs:C-x,message:N.message})),A)throw new P0;throw new vZ({cause:N})}let B=[...N.headers.entries()].filter(([D])=>D==="request-id").map(([D,A])=>", "+D+": "+JSON.stringify(A)).join(""),L=`[${W}${O}${B}] ${Y.method} ${V} ${N.ok?"succeeded":"failed"} with status ${N.status} in ${C-x}ms`;if(!N.ok){let D=await this.shouldRetry(N,J);if($&&D){let l=`retrying, ${$} attempts remaining`;return await I1(N.body),k(this).info(`${L} - ${l}`),k(this).debug(`[${W}] response error (${l})`,FZ({retryOfRequestLogID:X,url:N.url,status:N.status,headers:N.headers,durationMs:C-x})),this.retryRequest(J,$,X??W,N.headers)}let A=D?"error; no more retries left":"error; not retryable";k(this).info(`${L} - ${A}`);let F=await N.text().catch((l)=>R0(l).message),h=v8(F),y=h?void 0:F;throw k(this).debug(`[${W}] response error (${A})`,FZ({retryOfRequestLogID:X,url:N.url,status:N.status,headers:N.headers,message:y,durationMs:Date.now()-x})),this.makeStatusError(N.status,h,y,N.headers)}return k(this).info(L),k(this).debug(`[${W}] response start`,FZ({retryOfRequestLogID:X,url:N.url,status:N.status,headers:N.headers,durationMs:C-x})),{response:N,options:J,controller:U,requestLogID:W,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 $$(this,X,Z)}async fetchWithTimeout(Z,$,X,J){let{signal:z,method:Y,...V}=$||{},Q=this._makeAbort(J);if(z)z.addEventListener("abort",Q,{once:!0});let W=setTimeout(Q,X),O=globalThis.ReadableStream&&V.body instanceof globalThis.ReadableStream||typeof V.body==="object"&&V.body!==null&&Symbol.asyncIterator in V.body,x={signal:J.signal,...O?{duplex:"half"}:{},method:"GET",...V};if(Y)x.method=Y.toUpperCase();try{return await this.fetch.call(void 0,Z,x)}finally{clearTimeout(W)}}async shouldRetry(Z,$){let X=this._authFlags($);if(Z.status===401&&this._authState.tokenCache&&X.usedTokenCache&&!X.didRefreshFor401)return X.didRefreshFor401=!0,this._authState.tokenCache.invalidate(),!0;let J=Z.headers.get("x-should-retry");if(J==="true")return!0;if(J==="false")return!1;if(Z.status===408)return!0;if(Z.status===409)return!0;if(Z.status===429)return!0;if(Z.status>=500)return!0;return!1}async retryRequest(Z,$,X,J){let z,Y=J?.get("retry-after-ms");if(Y){let Q=parseFloat(Y);if(!Number.isNaN(Q))z=Q}let V=J?.get("retry-after");if(V&&!z){let Q=parseFloat(V);if(!Number.isNaN(Q))z=Q*1000;else z=Date.parse(V)-Date.now()}if(z===void 0){let Q=Z.maxRetries??this.maxRetries;z=this.calculateDefaultRetryTimeoutMillis($,Q)}return await qZ(z),this.makeRequest(Z,$-1,X)}calculateDefaultRetryTimeoutMillis(Z,$){let z=$-Z,Y=Math.min(0.5*Math.pow(2,z),8),V=1-Math.random()*0.25;return Y*V*1000}calculateNonstreamingTimeout(Z,$){if(3600000*Z/128000>600000||$!=null&&Z>$)throw new 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:Y,defaultBaseURL:V}=X;if(this._authState.resolution)await this._authState.resolution;if(!this._baseURLIsExplicit&&this._authState.baseURL&&this.baseURL!==this._authState.baseURL)this.baseURL=this._authState.baseURL;let Q=this.buildURL(z,Y,V);if("timeout"in X)L1("timeout",X.timeout);X.timeout=X.timeout??this.timeout;let{bodyHeaders:W,body:O}=this.buildBody({options:X}),x=await this.buildHeaders({options:Z,method:J,bodyHeaders:W,retryCount:$});return{req:{method:J,headers:x,...X.signal&&{signal:X.signal},...globalThis.ReadableStream&&O instanceof globalThis.ReadableStream&&{duplex:"half"},...O&&{body:O},...this.fetchOptions??{},...X.fetchOptions??{}},url:Q,timeout:X.timeout}}async buildHeaders({options:Z,method:$,bodyHeaders:X,retryCount:J}){let z={};if(this.idempotencyHeader&&$!=="get"){if(!Z.idempotencyKey)Z.idempotencyKey=this.defaultIdempotencyKey();z[this.idempotencyHeader]=Z.idempotencyKey}let Y=G([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))}:{},...c0(),...this._options.dangerouslyAllowBrowser?{"anthropic-dangerous-direct-browser-access":"true"}:void 0,"anthropic-version":"2023-06-01"},await this.authHeaders(Z),this._options.defaultHeaders,X,Z.headers]);return this.validateHeaders(Y),Y.values}_makeAbort(Z){return()=>Z.abort()}buildBody({options:{body:Z,headers:$}}){if(!Z)return{bodyHeaders:void 0,body:void 0};let X=G([$]);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:c8(Z)};else if(typeof Z==="object"&&X.values.get("content-type")==="application/x-www-form-urlencoded")return{bodyHeaders:{"content-type":"application/x-www-form-urlencoded"},body:this.stringifyQuery(Z)};else return K(this,b$,"f").call(this,{body:Z,headers:X})}}var x1,H1,b$,L6,S6="\\n\\nHuman:",j6="\\n\\nAssistant:",eZ;var B1=M(()=>{XZ();g8();CZ();X0();Z0();m8();J0();y1();a$();m0();u();Y0();t1();O4();f();WX();A6();e8();K1();C1();Y1();M1();m8();E();p0();jZ();CZ();H1=m,b$=new WeakMap,x1=new WeakSet,L6=function(){return this.baseURL!=="https://api.anthropic.com"};m.Anthropic=H1;m.HUMAN_PROMPT=S6;m.AI_PROMPT=j6;m.DEFAULT_TIMEOUT=600000;m.AnthropicError=H;m.APIError=v;m.APIConnectionError=vZ;m.APIConnectionTimeoutError=P0;m.APIUserAbortError=t;m.NotFoundError=f0;m.ConflictError=b0;m.RateLimitError=g0;m.BadRequestError=I0;m.AuthenticationError=k0;m.InternalServerError=_0;m.PermissionDeniedError=y0;m.UnprocessableEntityError=h0;m.toFile=X$;eZ=class eZ extends m{constructor(){super(...arguments);this.completions=new S0(this),this.messages=new sZ(this),this.models=new E0(this),this.beta=new o(this)}};eZ.Completions=S0;eZ.Messages=sZ;eZ.Models=E0;eZ.Beta=o});var U5=M(()=>{B1();WX();e8();B1();f();u()});
42
+ export{w as Xna,K as Yna,XZ as Zna,H as _na,v as $na,t as aoa,vZ as boa,P0 as coa,k0 as doa,f0 as eoa,u as foa,k as goa,jZ as hoa,J4 as ioa,SZ as joa,v0 as koa,g$ as loa,T1 as moa,C0 as noa,eZ as ooa,U5 as poa};
@@ -0,0 +1,2 @@
1
+ import{mK as Q,nK as $}from"./cli-0.6.0-vj1q5vmq.mjs";import{eia as V,fia as P,gja as W,hja as E}from"./cli-0.6.0-qnby905t.mjs";import{fpa as L}from"./cli-0.6.0-szxjcmcn.mjs";function Z(x,q,D,G){var H=-1,J=x==null?0:x.length;while(++H<J){var K=x[H];q(G,K,D(K),x)}return G}var M;var N=L(()=>{M=Z});function B(x,q,D,G){return Q(x,function(H,J,K){q(G,H,D(H),K)}),G}var S;var U=L(()=>{$();S=B});function I(x,q){return function(D,G){var H=V(D)?M:S,J=q?q():{};return H(D,x,W(G,2),J)}}var X;var Y=L(()=>{N();U();E();P();X=I});var R,v;var C=L(()=>{Y();R=X(function(x,q,D){x[D?0:1].push(q)},function(){return[[],[]]}),v=R});
2
+ export{v as Dc,C as Ec};
@@ -0,0 +1,2 @@
1
+ import{CX as T,DX as X,EX as I,GX as Y,HX as p,UX as v,VX as Z,WX as D}from"./cli-0.6.0-r5tyrw7e.mjs";import{p0 as P,r0 as V}from"./cli-0.6.0-ycj7gxxz.mjs";import{s0 as H}from"./cli-0.6.0-0p3mkd59.mjs";import{Dka as W,wna as F}from"./cli-0.6.0-qnby905t.mjs";import{bpa as A,fpa as C}from"./cli-0.6.0-szxjcmcn.mjs";function B({children:_,ref:$,stickyScroll:g,...K}){let E=J.useRef(null),[,w]=J.useState(0),L=J.useRef(new Set),N=J.useRef(!1),U=()=>{for(let q of L.current)q()};function O(q){if(W(),T(q),Y(),U(),N.current)return;N.current=!0,queueMicrotask(()=>{N.current=!1,X(q)})}return J.useImperativeHandle($,()=>({scrollTo(q){let z=E.current;if(!z)return;z.stickyScroll=!1,z.pendingScrollDelta=void 0,z.scrollAnchor=void 0,z.scrollTop=Math.max(0,Math.floor(q)),O(z)},scrollToElement(q,z=0){let G=E.current;if(!G)return;G.stickyScroll=!1,G.pendingScrollDelta=void 0,G.scrollAnchor={el:q,offset:z},O(G)},scrollBy(q){let z=E.current;if(!z)return;z.stickyScroll=!1,z.scrollAnchor=void 0,z.pendingScrollDelta=(z.pendingScrollDelta??0)+Math.floor(q),O(z)},scrollToBottom(){let q=E.current;if(!q)return;q.pendingScrollDelta=void 0,q.stickyScroll=!0,T(q),U(),w((z)=>z+1)},getScrollTop(){return E.current?.scrollTop??0},getPendingDelta(){return E.current?.pendingScrollDelta??0},getScrollHeight(){return E.current?.scrollHeight??0},getFreshScrollHeight(){return E.current?.childNodes[0]?.yogaNode?.getComputedHeight()??E.current?.scrollHeight??0},getViewportHeight(){return E.current?.scrollViewportHeight??0},getViewportTop(){return E.current?.scrollViewportTop??0},isSticky(){let q=E.current;if(!q)return!1;return q.stickyScroll??Boolean(q.attributes.stickyScroll)},subscribe(q){return L.current.add(q),()=>L.current.delete(q)},setClampBounds(q,z){let G=E.current;if(!G)return;G.scrollClampMin=q,G.scrollClampMax=z}}),[]),P("ink-box",{ref:(q)=>{if(E.current=q,q)q.scrollTop??=0},style:{flexWrap:"nowrap",flexDirection:K.flexDirection??"row",flexGrow:K.flexGrow??0,flexShrink:K.flexShrink??1,...K,overflowX:"scroll",overflowY:"scroll"},...g?{stickyScroll:!0}:{},children:P(Z,{flexDirection:"column",flexGrow:1,flexShrink:0,width:"100%",children:_})})}var J,u;var M=C(()=>{F();I();p();v();D();V();J=A(H(),1);u=B});
2
+ export{u as Lg,M as Mg};
@@ -0,0 +1,2 @@
1
+ import{vU as M,xU as X}from"./cli-0.6.0-h88zf9sp.mjs";import{Eaa as K,Kaa as L,Taa as W,X9 as B,e_ as V}from"./cli-0.6.0-aqestr3c.mjs";import{fpa as Q}from"./cli-0.6.0-szxjcmcn.mjs";async function F(){let b=await M();if(b.length===0)return{availableEnvironments:[],selectedEnvironment:null,selectedEnvironmentSource:null};let z=L()?.remote?.defaultEnvironmentId,H=b.find((x)=>x.kind!=="bridge")??b[0],J=null;if(z){let x=b.find((q)=>q.environment_id===z);if(x){H=x;for(let q=B.length-1;q>=0;q--){let y=B[q];if(!y||y==="flagSettings")continue;if(K(y)?.remote?.defaultEnvironmentId===z){J=y;break}}}}return{availableEnvironments:b,selectedEnvironment:H,selectedEnvironmentSource:J}}var Y=Q(()=>{V();W();X()});
2
+ export{F as Pb,Y as Qb};
@@ -0,0 +1,2 @@
1
+ import{RW as f}from"./cli-0.6.0-r5tyrw7e.mjs";import{p0 as p,r0 as c}from"./cli-0.6.0-ycj7gxxz.mjs";import{s0 as M}from"./cli-0.6.0-0p3mkd59.mjs";import{bpa as o}from"./cli-0.6.0-szxjcmcn.mjs";c();var n=o(f(),1),r=o(M(),1),d=r.createContext(void 0);function a(F){let e=n.c(3),{getFpsMetrics:s,children:i}=F,t;if(e[0]!==i||e[1]!==s)t=p(d.Provider,{value:s,children:i}),e[0]=i,e[1]=s,e[2]=t;else t=e[2];return t}function l(){return r.useContext(d)}
2
+ export{a as zb,l as Ab};
@@ -0,0 +1,2 @@
1
+ import{RW as O}from"./cli-0.6.0-r5tyrw7e.mjs";import{p0 as X,r0 as Q}from"./cli-0.6.0-ycj7gxxz.mjs";import{s0 as b}from"./cli-0.6.0-0p3mkd59.mjs";import{Qba as W,bca as P}from"./cli-0.6.0-aqestr3c.mjs";import{bpa as U}from"./cli-0.6.0-szxjcmcn.mjs";P();Q();var Y=U(O(),1),J=U(b(),1);function L(D,z){let F=z/100*(D.length-1),q=Math.floor(F),k=Math.ceil(F);if(q===k)return D[q];return D[q]+(D[k]-D[q])*(F-q)}var T=1024;function V(){let D=new Map,z=new Map,F=new Map;return{increment(q,k=1){D.set(q,(D.get(q)??0)+k)},set(q,k){D.set(q,k)},observe(q,k){let y=z.get(q);if(!y)y={reservoir:[],count:0,sum:0,min:k,max:k},z.set(q,y);if(y.count++,y.sum+=k,k<y.min)y.min=k;if(k>y.max)y.max=k;if(y.reservoir.length<T)y.reservoir.push(k);else{let B=Math.floor(Math.random()*y.count);if(B<T)y.reservoir[B]=k}},add(q,k){let y=F.get(q);if(!y)y=new Set,F.set(q,y);y.add(k)},getAll(){let q=Object.fromEntries(D);for(let[k,y]of z){if(y.count===0)continue;q[`${k}_count`]=y.count,q[`${k}_min`]=y.min,q[`${k}_max`]=y.max,q[`${k}_avg`]=y.sum/y.count;let B=[...y.reservoir].sort((G,H)=>G-H);q[`${k}_p50`]=L(B,50),q[`${k}_p95`]=L(B,95),q[`${k}_p99`]=L(B,99)}for(let[k,y]of F)q[k]=y.size;return q}}}var Z=J.createContext(null);function C(D){let z=Y.c(7),{store:F,children:q}=D,k;if(z[0]===Symbol.for("react.memo_cache_sentinel"))k=V(),z[0]=k;else k=z[0];let B=F??k,G,H;if(z[1]!==B)G=()=>{let M=()=>{let N=B.getAll();if(Object.keys(N).length>0)W((A)=>({...A,lastSessionMetrics:N}))};return process.on("exit",M),()=>{process.off("exit",M)}},H=[B],z[1]=B,z[2]=G,z[3]=H;else G=z[2],H=z[3];J.useEffect(G,H);let K;if(z[4]!==q||z[5]!==B)K=X(Z.Provider,{value:B,children:q}),z[4]=q,z[5]=B,z[6]=K;else K=z[6];return K}
2
+ export{V as xb,C as yb};
@@ -0,0 +1,2 @@
1
+ import{Ana as P1,Bna as Y5,Cna as w8,Dna as q,Ena as y,Fna as S,Gna as kQ,Hna as L,Ina as a,Jna as n5,Kna as e8,Lna as R5,Mna as _8,Nna as E,Ona as h8,Pna as P,Qna as x1,Rna as d,Sna as xQ,Tna as r,Una as UQ,Vna as T5,Wna as UY,xna as _Q,yna as YJ,zna as v}from"./cli-0.6.0-s56fh7wm.mjs";import{epa as aQ,fpa as X}from"./cli-0.6.0-szxjcmcn.mjs";function h$(){this.__data__=new v,this.size=0}var QQ;var $Q=X(()=>{P1();QQ=h$});function n$(Q){var J=this.__data__,Y=J.delete(Q);return this.size=J.size,Y}var JQ;var YQ=X(()=>{JQ=n$});function b$(Q){return this.__data__.get(Q)}var ZQ;var XQ=X(()=>{ZQ=b$});function i$(Q){return this.__data__.has(Q)}var HQ;var WQ=X(()=>{HQ=i$});function l$(Q,J){var Y=this.__data__;if(Y instanceof v){var Z=Y.__data__;if(!d||Z.length<u$-1)return Z.push([Q,J]),this.size=++Y.size,this;Y=this.__data__=new r(Z)}return Y.set(Q,J),this.size=Y.size,this}var u$=200,KQ;var GQ=X(()=>{P1();xQ();UQ();KQ=l$});function g(Q){var J=this.__data__=new v(Q);this.size=J.size}var p;var I1=X(()=>{P1();$Q();YQ();XQ();WQ();GQ();g.prototype.clear=QQ;g.prototype.delete=JQ;g.prototype.get=ZQ;g.prototype.has=HQ;g.prototype.set=KQ;p=g});function c$(Q){return this.__data__.set(Q,T$),this}var T$="__lodash_hash_undefined__",BQ;var NQ=X(()=>{BQ=c$});function r$(Q){return this.__data__.has(Q)}var wQ;var zQ=X(()=>{wQ=r$});function o(Q){var J=-1,Y=Q==null?0:Q.length;this.__data__=new r;while(++J<Y)this.add(Q[J])}var FQ;var RQ=X(()=>{UQ();NQ();zQ();o.prototype.add=o.prototype.push=BQ;o.prototype.has=wQ;FQ=o});function o$(Q,J){var Y=-1,Z=Q==null?0:Q.length;while(++Y<Z)if(J(Q[Y],Y,Q))return!0;return!1}var qQ;var DQ=X(()=>{qQ=o$});function s$(Q,J){return Q.has(J)}var OQ;var VQ=X(()=>{OQ=s$});function e$(Q,J,Y,Z,H,W){var x=Y&a$,U=Q.length,B=J.length;if(U!=B&&!(x&&B>U))return!1;var K=W.get(Q),F=W.get(J);if(K&&F)return K==J&&F==Q;var z=-1,N=!0,V=Y&t$?new FQ:void 0;W.set(Q,J),W.set(J,Q);while(++z<U){var R=Q[z],D=J[z];if(Z)var f=x?Z(D,R,z,J,Q,W):Z(R,D,z,Q,J,W);if(f!==void 0){if(f)continue;N=!1;break}if(V){if(!qQ(J,function(C,_){if(!OQ(V,_)&&(R===C||H(R,C,Y,Z,W)))return V.push(_)})){N=!1;break}}else if(!(R===D||H(R,D,Y,Z,W))){N=!1;break}}return W.delete(Q),W.delete(J),N}var a$=1,t$=2,s;var C1=X(()=>{RQ();DQ();VQ();s=e$});var QJ,_1;var MQ=X(()=>{y();QJ=q.Uint8Array,_1=QJ});function $J(Q){var J=-1,Y=Array(Q.size);return Q.forEach(function(Z,H){Y[++J]=[H,Z]}),Y}var LQ;var fQ=X(()=>{LQ=$J});function JJ(Q){var J=-1,Y=Array(Q.size);return Q.forEach(function(Z){Y[++J]=Z}),Y}var PQ;var IQ=X(()=>{PQ=JJ});function RJ(Q,J,Y,Z,H,W,x){switch(Y){case FJ:if(Q.byteLength!=J.byteLength||Q.byteOffset!=J.byteOffset)return!1;Q=Q.buffer,J=J.buffer;case zJ:if(Q.byteLength!=J.byteLength||!W(new _1(Q),new _1(J)))return!1;return!0;case HJ:case WJ:case KJ:return _Q(+Q,+J);case xJ:return Q.name==J.name&&Q.message==J.message;case GJ:case NJ:return Q==J+"";case UJ:var U=LQ;case BJ:var B=Z&ZJ;if(U||(U=PQ),Q.size!=J.size&&!B)return!1;var K=x.get(Q);if(K)return K==J;Z|=XJ,x.set(Q,J);var F=s(U(Q),U(J),Z,H,W,x);return x.delete(Q),F;case wJ:if(k1)return k1.call(Q)==k1.call(J)}return!1}var ZJ=1,XJ=2,HJ="[object Boolean]",WJ="[object Date]",xJ="[object Error]",UJ="[object Map]",KJ="[object Number]",GJ="[object RegExp]",BJ="[object Set]",NJ="[object String]",wJ="[object Symbol]",zJ="[object ArrayBuffer]",FJ="[object DataView]",CQ,k1,EQ;var vQ=X(()=>{kQ();MQ();YJ();C1();fQ();IQ();CQ=S?S.prototype:void 0,k1=CQ?CQ.valueOf:void 0;EQ=RJ});function qJ(Q,J){var Y=-1,Z=J.length,H=Q.length;while(++Y<Z)Q[H+Y]=J[Y];return Q}var dQ;var gQ=X(()=>{dQ=qJ});var DJ,w;var M=X(()=>{DJ=Array.isArray,w=DJ});function OJ(Q,J,Y){var Z=J(Q);return w(Q)?Z:dQ(Z,Y(Q))}var pQ;var yQ=X(()=>{gQ();M();pQ=OJ});function VJ(Q,J){var Y=-1,Z=Q==null?0:Q.length,H=0,W=[];while(++Y<Z){var x=Q[Y];if(J(x,Y,Q))W[H++]=x}return W}var SQ;var mQ=X(()=>{SQ=VJ});function MJ(){return[]}var AQ;var jQ=X(()=>{AQ=MJ});var LJ,fJ,hQ,PJ,nQ;var bQ=X(()=>{mQ();jQ();LJ=Object.prototype,fJ=LJ.propertyIsEnumerable,hQ=Object.getOwnPropertySymbols,PJ=!hQ?AQ:function(Q){if(Q==null)return[];return Q=Object(Q),SQ(hQ(Q),function(J){return fJ.call(Q,J)})},nQ=PJ});function IJ(Q,J){var Y=-1,Z=Array(Q);while(++Y<Q)Z[Y]=J(Y);return Z}var iQ;var uQ=X(()=>{iQ=IJ});function CJ(Q){return Q!=null&&typeof Q=="object"}var O;var m=X(()=>{O=CJ});function kJ(Q){return O(Q)&&L(Q)==_J}var _J="[object Arguments]",E1;var lQ=X(()=>{a();m();E1=kJ});var TQ,EJ,vJ,dJ,t;var v1=X(()=>{lQ();m();TQ=Object.prototype,EJ=TQ.hasOwnProperty,vJ=TQ.propertyIsEnumerable,dJ=E1(function(){return arguments}())?E1:function(Q){return O(Q)&&EJ.call(Q,"callee")&&!vJ.call(Q,"callee")},t=dJ});function gJ(){return!1}var cQ;var rQ=X(()=>{cQ=gJ});var Q1={};aQ(Q1,{default:()=>A});var tQ,oQ,pJ,sQ,yJ,SJ,A;var d1=X(()=>{y();rQ();tQ=typeof Q1=="object"&&Q1&&!Q1.nodeType&&Q1,oQ=tQ&&typeof e=="object"&&e&&!e.nodeType&&e,pJ=oQ&&oQ.exports===tQ,sQ=pJ?q.Buffer:void 0,yJ=sQ?sQ.isBuffer:void 0,SJ=yJ||cQ,A=SJ});function jJ(Q,J){var Y=typeof Q;return J=J==null?mJ:J,!!J&&(Y=="number"||Y!="symbol"&&AJ.test(Q))&&(Q>-1&&Q%1==0&&Q<J)}var mJ=9007199254740991,AJ,$1;var g1=X(()=>{AJ=/^(?:0|[1-9]\d*)$/;$1=jJ});function nJ(Q){return typeof Q=="number"&&Q>-1&&Q%1==0&&Q<=hJ}var hJ=9007199254740991,j;var J1=X(()=>{j=nJ});function B8(Q){return O(Q)&&j(Q.length)&&!!G[L(Q)]}var bJ="[object Arguments]",iJ="[object Array]",uJ="[object Boolean]",lJ="[object Date]",TJ="[object Error]",cJ="[object Function]",rJ="[object Map]",oJ="[object Number]",sJ="[object Object]",aJ="[object RegExp]",tJ="[object Set]",eJ="[object String]",Q8="[object WeakMap]",$8="[object ArrayBuffer]",J8="[object DataView]",Y8="[object Float32Array]",Z8="[object Float64Array]",X8="[object Int8Array]",H8="[object Int16Array]",W8="[object Int32Array]",x8="[object Uint8Array]",U8="[object Uint8ClampedArray]",K8="[object Uint16Array]",G8="[object Uint32Array]",G,eQ;var Q5=X(()=>{a();J1();m();G={};G[Y8]=G[Z8]=G[X8]=G[H8]=G[W8]=G[x8]=G[U8]=G[K8]=G[G8]=!0;G[bJ]=G[iJ]=G[$8]=G[uJ]=G[J8]=G[lJ]=G[TJ]=G[cJ]=G[rJ]=G[oJ]=G[sJ]=G[aJ]=G[tJ]=G[eJ]=G[Q8]=!1;eQ=B8});function N8(Q){return function(J){return Q(J)}}var $5;var J5=X(()=>{$5=N8});var Z1={};aQ(Z1,{default:()=>X1});var Z5,i,z8,p1,F8,X1;var X5=X(()=>{w8();Z5=typeof Z1=="object"&&Z1&&!Z1.nodeType&&Z1,i=Z5&&typeof Y1=="object"&&Y1&&!Y1.nodeType&&Y1,z8=i&&i.exports===Z5,p1=z8&&Y5.process,F8=function(){try{var Q=i&&i.require&&i.require("util").types;if(Q)return Q;return p1&&p1.binding&&p1.binding("util")}catch(J){}}(),X1=F8});var H5,R8,H1;var y1=X(()=>{Q5();J5();X5();H5=X1&&X1.isTypedArray,R8=H5?$5(H5):eQ,H1=R8});function O8(Q,J){var Y=w(Q),Z=!Y&&t(Q),H=!Y&&!Z&&A(Q),W=!Y&&!Z&&!H&&H1(Q),x=Y||Z||H||W,U=x?iQ(Q.length,String):[],B=U.length;for(var K in Q)if((J||D8.call(Q,K))&&!(x&&(K=="length"||H&&(K=="offset"||K=="parent")||W&&(K=="buffer"||K=="byteLength"||K=="byteOffset")||$1(K,B))))U.push(K);return U}var q8,D8,W5;var x5=X(()=>{uQ();v1();M();d1();g1();y1();q8=Object.prototype,D8=q8.hasOwnProperty;W5=O8});function M8(Q){var J=Q&&Q.constructor,Y=typeof J=="function"&&J.prototype||V8;return Q===Y}var V8,U5;var K5=X(()=>{V8=Object.prototype;U5=M8});function L8(Q,J){return function(Y){return Q(J(Y))}}var G5;var B5=X(()=>{G5=L8});var f8,N5;var w5=X(()=>{B5();f8=G5(Object.keys,Object),N5=f8});function C8(Q){if(!U5(Q))return N5(Q);var J=[];for(var Y in Object(Q))if(I8.call(Q,Y)&&Y!="constructor")J.push(Y);return J}var P8,I8,z5;var F5=X(()=>{K5();w5();P8=Object.prototype,I8=P8.hasOwnProperty;z5=C8});function k8(Q){return Q!=null&&j(Q.length)&&!R5(Q)}var q5;var D5=X(()=>{_8();J1();q5=k8});function E8(Q){return q5(Q)?W5(Q):z5(Q)}var W1;var S1=X(()=>{x5();F5();D5();W1=E8});function v8(Q){return pQ(Q,W1,nQ)}var m1;var O5=X(()=>{yQ();bQ();S1();m1=v8});function y8(Q,J,Y,Z,H,W){var x=Y&d8,U=m1(Q),B=U.length,K=m1(J),F=K.length;if(B!=F&&!x)return!1;var z=B;while(z--){var N=U[z];if(!(x?N in J:p8.call(J,N)))return!1}var V=W.get(Q),R=W.get(J);if(V&&R)return V==J&&R==Q;var D=!0;W.set(Q,J),W.set(J,Q);var f=x;while(++z<B){N=U[z];var C=Q[N],_=J[N];if(Z)var e1=x?Z(_,C,N,J,Q,W):Z(C,_,N,Q,J,W);if(!(e1===void 0?C===_||H(C,_,Y,Z,W):e1)){D=!1;break}f||(f=N=="constructor")}if(D&&!f){var T=Q.constructor,c=J.constructor;if(T!=c&&(("constructor"in Q)&&("constructor"in J))&&!(typeof T=="function"&&T instanceof T&&typeof c=="function"&&c instanceof c))D=!1}return W.delete(Q),W.delete(J),D}var d8=1,g8,p8,V5;var M5=X(()=>{O5();g8=Object.prototype,p8=g8.hasOwnProperty;V5=y8});var S8,U1;var L5=X(()=>{x1();y();S8=P(q,"DataView"),U1=S8});var m8,K1;var f5=X(()=>{x1();y();m8=P(q,"Promise"),K1=m8});var A8,G1;var P5=X(()=>{x1();y();A8=P(q,"Set"),G1=A8});var j8,B1;var I5=X(()=>{x1();y();j8=P(q,"WeakMap"),B1=j8});var C5="[object Map]",n8="[object Object]",_5="[object Promise]",k5="[object Set]",E5="[object WeakMap]",v5="[object DataView]",b8,i8,u8,l8,T8,k,A1;var d5=X(()=>{L5();xQ();f5();P5();I5();a();h8();b8=E(U1),i8=E(d),u8=E(K1),l8=E(G1),T8=E(B1),k=L;if(U1&&k(new U1(new ArrayBuffer(1)))!=v5||d&&k(new d)!=C5||K1&&k(K1.resolve())!=_5||G1&&k(new G1)!=k5||B1&&k(new B1)!=E5)k=function(Q){var J=L(Q),Y=J==n8?Q.constructor:void 0,Z=Y?E(Y):"";if(Z)switch(Z){case b8:return v5;case i8:return C5;case u8:return _5;case l8:return k5;case T8:return E5}return J};A1=k});function o8(Q,J,Y,Z,H,W){var x=w(Q),U=w(J),B=x?p5:A1(Q),K=U?p5:A1(J);B=B==g5?N1:B,K=K==g5?N1:K;var F=B==N1,z=K==N1,N=B==K;if(N&&A(Q)){if(!A(J))return!1;x=!0,F=!1}if(N&&!F)return W||(W=new p),x||H1(Q)?s(Q,J,Y,Z,H,W):EQ(Q,J,B,Y,Z,H,W);if(!(Y&c8)){var V=F&&y5.call(Q,"__wrapped__"),R=z&&y5.call(J,"__wrapped__");if(V||R){var D=V?Q.value():Q,f=R?J.value():J;return W||(W=new p),H(D,f,Y,Z,W)}}if(!N)return!1;return W||(W=new p),V5(Q,J,Y,Z,H,W)}var c8=1,g5="[object Arguments]",p5="[object Array]",N1="[object Object]",r8,y5,S5;var m5=X(()=>{I1();C1();vQ();M5();d5();M();d1();y1();r8=Object.prototype,y5=r8.hasOwnProperty;S5=o8});function A5(Q,J,Y,Z,H){if(Q===J)return!0;if(Q==null||J==null||!O(Q)&&!O(J))return Q!==Q&&J!==J;return S5(Q,J,Y,Z,A5,H)}var w1;var j1=X(()=>{m5();m();w1=A5});function t8(Q,J,Y,Z){var H=Y.length,W=H,x=!Z;if(Q==null)return!W;Q=Object(Q);while(H--){var U=Y[H];if(x&&U[2]?U[1]!==Q[U[0]]:!(U[0]in Q))return!1}while(++H<W){U=Y[H];var B=U[0],K=Q[B],F=U[1];if(x&&U[2]){if(K===void 0&&!(B in Q))return!1}else{var z=new p;if(Z)var N=Z(K,F,B,Q,J,z);if(!(N===void 0?w1(F,K,s8|a8,Z,z):N))return!1}}return!0}var s8=1,a8=2,j5;var h5=X(()=>{I1();j1();j5=t8});function QY(Q){return Q===Q&&!n5(Q)}var z1;var h1=X(()=>{e8();z1=QY});function $Y(Q){var J=W1(Q),Y=J.length;while(Y--){var Z=J[Y],H=Q[Z];J[Y]=[Z,H,z1(H)]}return J}var b5;var i5=X(()=>{h1();S1();b5=$Y});function JY(Q,J){return function(Y){if(Y==null)return!1;return Y[Q]===J&&(J!==void 0||(Q in Object(Y)))}}var F1;var n1=X(()=>{F1=JY});function YY(Q){var J=b5(Q);if(J.length==1&&J[0][2])return F1(J[0][0],J[0][1]);return function(Y){return Y===Q||j5(Y,Q,J)}}var u5;var l5=X(()=>{h5();i5();n1();u5=YY});function XY(Q){return typeof Q=="symbol"||O(Q)&&L(Q)==ZY}var ZY="[object Symbol]",h;var R1=X(()=>{a();m();h=XY});function xY(Q,J){if(w(Q))return!1;var Y=typeof Q;if(Y=="number"||Y=="symbol"||Y=="boolean"||Q==null||h(Q))return!0;return WY.test(Q)||!HY.test(Q)||J!=null&&Q in Object(J)}var HY,WY,n;var q1=X(()=>{M();R1();HY=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,WY=/^\w*$/;n=xY});function GY(Q){var J=T5(Q,function(Z){if(Y.size===KY)Y.clear();return Z}),Y=J.cache;return J}var KY=500,c5;var r5=X(()=>{UY();c5=GY});var BY,NY,wY,o5;var s5=X(()=>{r5();BY=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,NY=/\\(\\)?/g,wY=c5(function(Q){var J=[];if(Q.charCodeAt(0)===46)J.push("");return Q.replace(BY,function(Y,Z,H,W){J.push(H?W.replace(NY,"$1"):Z||Y)}),J}),o5=wY});function zY(Q,J){var Y=-1,Z=Q==null?0:Q.length,H=Array(Z);while(++Y<Z)H[Y]=J(Q[Y],Y,Q);return H}var a5;var t5=X(()=>{a5=zY});function $$(Q){if(typeof Q=="string")return Q;if(w(Q))return a5(Q,$$)+"";if(h(Q))return Q$?Q$.call(Q):"";var J=Q+"";return J=="0"&&1/Q==-FY?"-0":J}var FY=1/0,e5,Q$,J$;var Y$=X(()=>{kQ();t5();M();R1();e5=S?S.prototype:void 0,Q$=e5?e5.toString:void 0;J$=$$});function RY(Q){return Q==null?"":J$(Q)}var Z$;var X$=X(()=>{Y$();Z$=RY});function qY(Q,J){if(w(Q))return Q;return n(Q,J)?[Q]:o5(Z$(Q))}var D1;var b1=X(()=>{M();q1();s5();X$();D1=qY});function OY(Q){if(typeof Q=="string"||h(Q))return Q;var J=Q+"";return J=="0"&&1/Q==-DY?"-0":J}var DY=1/0,I;var u=X(()=>{R1();I=OY});function VY(Q,J){J=D1(J,Q);var Y=0,Z=J.length;while(Q!=null&&Y<Z)Q=Q[I(J[Y++])];return Y&&Y==Z?Q:void 0}var O1;var i1=X(()=>{b1();u();O1=VY});function MY(Q,J,Y){var Z=Q==null?void 0:O1(Q,J);return Z===void 0?Y:Z}var H$;var W$=X(()=>{i1();H$=MY});function LY(Q,J){return Q!=null&&J in Object(Q)}var x$;var U$=X(()=>{x$=LY});function fY(Q,J,Y){J=D1(J,Q);var Z=-1,H=J.length,W=!1;while(++Z<H){var x=I(J[Z]);if(!(W=Q!=null&&Y(Q,x)))break;Q=Q[x]}if(W||++Z!=H)return W;return H=Q==null?0:Q.length,!!H&&j(H)&&$1(x,H)&&(w(Q)||t(Q))}var K$;var G$=X(()=>{b1();v1();M();g1();J1();u();K$=fY});function PY(Q,J){return Q!=null&&K$(Q,J,x$)}var B$;var N$=X(()=>{U$();G$();B$=PY});function _Y(Q,J){if(n(Q)&&z1(J))return F1(I(Q),J);return function(Y){var Z=H$(Y,Q);return Z===void 0&&Z===J?B$(Y,Q):w1(J,Z,IY|CY)}}var IY=1,CY=2,w$;var z$=X(()=>{j1();W$();N$();q1();h1();n1();u();w$=_Y});function kY(Q){return Q}var F$;var R$=X(()=>{F$=kY});function EY(Q){return function(J){return J==null?void 0:J[Q]}}var q$;var D$=X(()=>{q$=EY});function vY(Q){return function(J){return O1(J,Q)}}var O$;var V$=X(()=>{i1();O$=vY});function dY(Q){return n(Q)?q$(I(Q)):O$(Q)}var M$;var L$=X(()=>{D$();V$();q1();u();M$=dY});function gY(Q){if(typeof Q=="function")return Q;if(Q==null)return F$;if(typeof Q=="object")return w(Q)?w$(Q[0],Q[1]):u5(Q);return M$(Q)}var f$;var P$=X(()=>{l5();z$();R$();M();L$();f$=gY});function pY(Q,J){var Y,Z=-1,H=Q.length;while(++Z<H){var W=J(Q[Z]);if(W!==void 0)Y=Y===void 0?W:Y+W}return Y}var I$;var C$=X(()=>{I$=pY});function yY(Q,J){return Q&&Q.length?I$(Q,f$(J,2)):0}var b;var _$=X(()=>{P$();C$();b=yY});import{randomUUID as u1}from"crypto";var k$=()=>{};function nX(){return l1}function bX(Q){l1=Q}function iX(Q){return V1.has(Q)?V1.get(Q):void 0}function uX(Q,J){V1.set(Q,J)}function lX(Q){return T1.get(Q)}function TX(Q,J){T1.set(Q,J)}function E$(){l1=null,V1.clear(),T1.clear()}function cX(){return c1}function rX(Q){c1=Q}function oX(){c1=void 0}var l1=null,V1,T1,c1;var v$=X(()=>{V1=new Map;T1=new Map});function d$(){let Q=new Set;return{subscribe(J){return Q.add(J),()=>{Q.delete(J)}},emit(...J){for(let Y of Q)Y(...J)},clear(){Q.clear()}}}var g$=()=>{};import{realpathSync as p$}from"fs";import{cwd as SY}from"process";function Z9(Q){return r1.add(Q),()=>r1.delete(Q)}function X9(){L1()}function L1(){for(let Q of r1)try{Q()}catch{}}function y$(){let Q="";if(typeof process<"u"&&typeof process.cwd==="function"&&typeof p$==="function"){let Y=SY();try{Q=p$(Y).normalize("NFC")}catch{Q=Y.normalize("NFC")}}return{originalCwd:Q,projectRoot:Q,totalCostUSD:0,totalAPIDuration:0,totalAPIDurationWithoutRetries:0,totalToolDuration:0,turnHookDurationMs:0,turnToolDurationMs:0,turnClassifierDurationMs:0,turnToolCount:0,turnHookCount:0,turnClassifierCount:0,startTime:Date.now(),lastInteractionTime:Date.now(),totalLinesAdded:0,totalLinesRemoved:0,hasUnknownModelCost:!1,cwd:Q,modelUsage:{},mainLoopModelOverride:void 0,initialMainLoopModel:null,modelStrings:null,isInteractive:!1,kairosActive:!1,strictToolResultPairing:!1,sdkAgentProgressSummariesEnabled:!1,userMsgOptIn:!1,clientType:"cli",sessionSource:void 0,questionPreviewFormat:void 0,sessionIngressToken:void 0,oauthTokenFromFd:void 0,apiKeyFromFd:void 0,flagSettingsPath:void 0,flagSettingsInline:null,allowedSettingSources:["userSettings","projectSettings","localSettings","flagSettings","policySettings"],meter:null,sessionCounter:null,locCounter:null,prCounter:null,commitCounter:null,costCounter:null,tokenCounter:null,codeEditToolDecisionCounter:null,activeTimeCounter:null,statsStore:null,sessionId:u1(),parentSessionId:void 0,loggerProvider:null,eventLogger:null,meterProvider:null,tracerProvider:null,agentColorMap:new Map,agentColorIndex:0,lastAPIRequest:null,lastAPIRequestMessages:null,lastClassifierRequests:null,cachedClaudeMdContent:null,inMemoryErrorLog:[],inlinePlugins:[],useCoworkPlugins:!1,sessionBypassPermissionsMode:!1,scheduledTasksEnabled:!1,sessionCronTasks:[],pendingSessionWakeup:null,sessionCreatedTeams:new Set,sessionTrustAccepted:!1,sessionPersistenceDisabled:!1,hasExitedPlanMode:!1,needsPlanModeExitAttachment:!1,needsAutoModeExitAttachment:!1,lspRecommendationShownThisSession:!1,initJsonSchema:null,registeredHooks:null,planSlugCache:new Map,teleportedSessionInfo:null,invokedSkills:new Map,slowOperations:[],sdkBetas:void 0,mainThreadAgentType:void 0,isRemoteMode:!1,directConnectServerUrl:void 0,systemPromptSectionCache:new Map,lastEmittedDate:null,additionalDirectoriesForClaudeMd:[],allowedChannels:[],hasDevChannels:!1,sessionProjectDir:null,largeSystemPromptDetected:null,afkModeHeaderLatched:null,fastModeHeaderLatched:null,thinkingClearLatched:null,lspDeferLatchedTools:null,deferredDeltaLegacySession:!1,sessionEpochMs:Date.now()-process.uptime()*1000,promptId:null,lastMainRequestId:void 0,lastApiCompletionTimestamp:null,pendingPostCompaction:!1}}function H9(){return $.sessionId}function W9(Q={}){if(Q.setCurrentAsParent)$.parentSessionId=$.sessionId;return $.planSlugCache.delete($.sessionId),$.sessionId=u1(),$.sessionProjectDir=null,S$($.sessionId),$.sessionId}function x9(){return $.parentSessionId}function U9(Q,J=null){$.planSlugCache.delete($.sessionId),$.sessionId=Q,$.sessionProjectDir=J,S$(Q)}function S$(Q){$.pendingSessionWakeup=null,jY(),$.sessionEpochMs=Date.now(),o1.emit(Q)}function G9(){return $.sessionProjectDir}function B9(){return $.originalCwd}function N9(){return $.projectRoot}function w9(Q){$.originalCwd=Q.normalize("NFC")}function z9(Q){$.projectRoot=Q.normalize("NFC")}function F9(){return $.cwd}function R9(Q){$.cwd=Q.normalize("NFC")}function q9(){return $.directConnectServerUrl}function D9(Q){$.directConnectServerUrl=Q}function O9(Q,J){$.totalAPIDuration+=Q,$.totalAPIDurationWithoutRetries+=J}function V9(){$.totalAPIDuration=0,$.totalAPIDurationWithoutRetries=0,$.totalCostUSD=0}function M9(Q,J,Y){$.modelUsage[Y]=J,$.totalCostUSD+=Q}function L9(){return $.totalCostUSD}function f9(){return $.totalAPIDuration}function P9(){return Date.now()-$.startTime}function I9(){return $.totalAPIDurationWithoutRetries}function C9(){return $.totalToolDuration}function _9(Q){$.totalToolDuration+=Q,$.turnToolDurationMs+=Q,$.turnToolCount++}function k9(){return $.turnHookDurationMs}function E9(Q){$.turnHookDurationMs+=Q,$.turnHookCount++}function v9(){$.turnHookDurationMs=0,$.turnHookCount=0}function d9(){return $.turnHookCount}function g9(){return $.turnToolDurationMs}function p9(){$.turnToolDurationMs=0,$.turnToolCount=0}function y9(){return $.turnToolCount}function S9(){return $.turnClassifierDurationMs}function m9(Q){$.turnClassifierDurationMs+=Q,$.turnClassifierCount++}function A9(){$.turnClassifierDurationMs=0,$.turnClassifierCount=0}function j9(){return $.turnClassifierCount}function h9(){return $.statsStore}function n9(Q){$.statsStore=Q}function b9(Q){if(Q)m$();else s1=!0}function i9(){if(s1)m$()}function m$(){$.lastInteractionTime=Date.now(),s1=!1}function u9(Q,J){$.totalLinesAdded+=Q,$.totalLinesRemoved+=J}function l9(){return $.totalLinesAdded}function T9(){return $.totalLinesRemoved}function c9(){return b(Object.values($.modelUsage),"inputTokens")}function A$(){return b(Object.values($.modelUsage),"outputTokens")}function r9(){return b(Object.values($.modelUsage),"cacheReadInputTokens")}function o9(){return b(Object.values($.modelUsage),"cacheCreationInputTokens")}function s9(){return b(Object.values($.modelUsage),"webSearchRequests")}function a9(){return A$()-a1}function t9(){return t1}function e9(Q){a1=A$(),t1=Q,f1=0}function QH(){return f1}function $H(){f1++}function JH(){$.hasUnknownModelCost=!0}function YH(){return $.hasUnknownModelCost}function ZH(){return $.lastMainRequestId}function XH(Q){$.lastMainRequestId=Q}function HH(){return $.lastApiCompletionTimestamp}function WH(Q){$.lastApiCompletionTimestamp=Q}function xH(){$.pendingPostCompaction=!0}function UH(){let Q=$.pendingPostCompaction;return $.pendingPostCompaction=!1,Q}function KH(){return $.lastInteractionTime}function GH(){if(M1=!0,l)clearTimeout(l);l=setTimeout(()=>{M1=!1,l=void 0},j$),l.unref?.()}function BH(){return M1}async function NH(){while(M1)await new Promise((Q)=>setTimeout(Q,j$).unref?.())}function wH(){return $.modelUsage}function zH(Q){return $.modelUsage[Q]}function FH(){return $.mainLoopModelOverride}function RH(){return $.initialMainLoopModel}function qH(Q){$.mainLoopModelOverride=Q}function DH(Q){$.initialMainLoopModel=Q}function OH(){return $.sdkBetas}function VH(Q){$.sdkBetas=Q}function MH(){$.totalCostUSD=0,$.totalAPIDuration=0,$.totalAPIDurationWithoutRetries=0,$.totalToolDuration=0,$.startTime=Date.now(),$.totalLinesAdded=0,$.totalLinesRemoved=0,$.hasUnknownModelCost=!1,$.modelUsage={},$.promptId=null}function LH({totalCostUSD:Q,totalAPIDuration:J,totalAPIDurationWithoutRetries:Y,totalToolDuration:Z,totalLinesAdded:H,totalLinesRemoved:W,lastDuration:x,modelUsage:U}){if($.totalCostUSD=Q,$.totalAPIDuration=J,$.totalAPIDurationWithoutRetries=Y,$.totalToolDuration=Z,$.totalLinesAdded=H,$.totalLinesRemoved=W,U)$.modelUsage=U;if(x)$.startTime=Date.now()-x}function fH(){throw Error("resetStateForTests can only be called in tests")}function PH(){return $.modelStrings}function IH(Q){$.modelStrings=Q}function CH(){$.modelStrings=null}function _H(Q,J){$.meter=Q,$.sessionCounter=J("claude_code.session.count",{description:"Count of CLI sessions started"}),$.locCounter=J("claude_code.lines_of_code.count",{description:"Count of lines of code modified, with the 'type' attribute indicating whether lines were added or removed"}),$.prCounter=J("claude_code.pull_request.count",{description:"Number of pull requests created"}),$.commitCounter=J("claude_code.commit.count",{description:"Number of git commits created"}),$.costCounter=J("claude_code.cost.usage",{description:"Cost of the Claude Code session",unit:"USD"}),$.tokenCounter=J("claude_code.token.usage",{description:"Number of tokens used",unit:"tokens"}),$.codeEditToolDecisionCounter=J("claude_code.code_edit_tool.decision",{description:"Count of code editing tool permission decisions (accept/reject) for Edit, Write, and NotebookEdit tools"}),$.activeTimeCounter=J("claude_code.active_time.total",{description:"Total active time in seconds",unit:"s"})}function kH(){return $.meter}function EH(){return $.sessionCounter}function vH(){return $.locCounter}function dH(){return $.prCounter}function gH(){return $.commitCounter}function pH(){return $.costCounter}function yH(){return $.tokenCounter}function SH(){return $.codeEditToolDecisionCounter}function mH(){return $.activeTimeCounter}function AH(){return $.loggerProvider}function jH(Q){$.loggerProvider=Q}function hH(){return $.eventLogger}function nH(Q){$.eventLogger=Q}function bH(){return $.meterProvider}function iH(Q){$.meterProvider=Q}function uH(){return $.tracerProvider}function lH(Q){$.tracerProvider=Q}function mY(){return!$.isInteractive}function TH(){return $.isInteractive}function cH(Q){$.isInteractive=Q}function rH(){return $.clientType}function oH(Q){$.clientType=Q}function sH(){return $.sdkAgentProgressSummariesEnabled}function aH(Q){$.sdkAgentProgressSummariesEnabled=Q}function tH(){return $.kairosActive}function eH(Q){$.kairosActive=Q,L1()}function Q4(){return $.strictToolResultPairing}function $4(Q){$.strictToolResultPairing=Q}function J4(){return $.userMsgOptIn}function Y4(Q){$.userMsgOptIn=Q,L1()}function Z4(){return $.sessionSource}function X4(Q){$.sessionSource=Q}function H4(){return $.questionPreviewFormat}function W4(Q){$.questionPreviewFormat=Q}function x4(){return $.agentColorMap}function U4(){return $.flagSettingsPath}function K4(Q){$.flagSettingsPath=Q}function G4(){return $.flagSettingsInline}function B4(Q){$.flagSettingsInline=Q}function N4(){return $.sessionIngressToken}function w4(Q){$.sessionIngressToken=Q}function z4(){return $.oauthTokenFromFd}function F4(Q){$.oauthTokenFromFd=Q}function R4(){return $.apiKeyFromFd}function q4(Q){$.apiKeyFromFd=Q}function D4(Q){$.lastAPIRequest=Q}function O4(){return $.lastAPIRequest}function V4(Q){$.lastAPIRequestMessages=Q}function M4(){return $.lastAPIRequestMessages}function L4(Q){$.lastClassifierRequests=Q}function f4(){return $.lastClassifierRequests}function P4(Q){$.cachedClaudeMdContent=Q}function I4(){return $.cachedClaudeMdContent}function C4(Q){if($.inMemoryErrorLog.length>=100)$.inMemoryErrorLog.shift();$.inMemoryErrorLog.push(Q)}function _4(){return $.allowedSettingSources}function k4(Q){$.allowedSettingSources=Q}function E4(){return mY()&&$.clientType!=="claude-vscode"}function v4(Q){$.inlinePlugins=Q}function d4(){return $.inlinePlugins}function g4(Q){$.useCoworkPlugins=Q,E$()}function p4(){return $.useCoworkPlugins}function y4(Q){$.sessionBypassPermissionsMode=Q}function S4(){return $.sessionBypassPermissionsMode}function m4(Q){$.scheduledTasksEnabled=Q}function A4(){return $.scheduledTasksEnabled}function j4(){return $.sessionCronTasks}function h4(Q){$.sessionCronTasks.push(Q)}function n4(Q){if(Q.length===0)return 0;let J=new Set(Q),Y=$.sessionCronTasks.filter((H)=>!J.has(H.id)),Z=$.sessionCronTasks.length-Y.length;if(Z===0)return 0;return $.sessionCronTasks=Y,Z}function b4(){return $.pendingSessionWakeup}function i4(Q){let J=$.pendingSessionWakeup!==null;return $.pendingSessionWakeup=Q,J}function u4(){$.pendingSessionWakeup=null}function l4(Q){$.sessionTrustAccepted=Q}function T4(){return $.sessionTrustAccepted}function c4(Q){$.sessionPersistenceDisabled=Q}function r4(){return $.sessionPersistenceDisabled}function o4(){return $.hasExitedPlanMode}function s4(Q){$.hasExitedPlanMode=Q}function a4(){return $.needsPlanModeExitAttachment}function t4(Q){$.needsPlanModeExitAttachment=Q}function e4(Q,J){if(J==="plan"&&Q!=="plan")$.needsPlanModeExitAttachment=!1;if(Q==="plan"&&J!=="plan")$.needsPlanModeExitAttachment=!0}function Q3(){return $.needsAutoModeExitAttachment}function $3(Q){$.needsAutoModeExitAttachment=Q}function J3(Q,J){if(Q==="auto"&&J==="plan"||Q==="plan"&&J==="auto")return;let Y=Q==="auto",Z=J==="auto";if(Z&&!Y)$.needsAutoModeExitAttachment=!1;if(Y&&!Z)$.needsAutoModeExitAttachment=!0}function Y3(){return $.lspRecommendationShownThisSession}function Z3(Q){$.lspRecommendationShownThisSession=Q}function X3(Q){$.initJsonSchema=Q}function H3(){return $.initJsonSchema}function W3(Q){if(!$.registeredHooks)$.registeredHooks={};for(let[J,Y]of Object.entries(Q)){let Z=J;if(!$.registeredHooks[Z])$.registeredHooks[Z]=[];$.registeredHooks[Z].push(...Y)}}function x3(){return $.registeredHooks}function U3(){$.registeredHooks=null}function K3(){if(!$.registeredHooks)return;let Q={};for(let[J,Y]of Object.entries($.registeredHooks)){let Z=Y.filter((H)=>!("pluginRoot"in H));if(Z.length>0)Q[J]=Z}$.registeredHooks=Object.keys(Q).length>0?Q:null}function G3(){$.initJsonSchema=null,$.registeredHooks=null}function B3(){return $.planSlugCache}function N3(){return $.sessionCreatedTeams}function w3(Q){$.teleportedSessionInfo={isTeleported:!0,hasLoggedFirstMessage:!1,sessionId:Q.sessionId}}function z3(){return $.teleportedSessionInfo}function F3(){if($.teleportedSessionInfo)$.teleportedSessionInfo.hasLoggedFirstMessage=!0}function R3(Q,J,Y,Z=null){let H=`${Z??""}:${Q}`;$.invokedSkills.set(H,{skillName:Q,skillPath:J,content:Y,invokedAt:Date.now(),agentId:Z})}function q3(){return $.invokedSkills}function D3(Q){let J=Q??null,Y=new Map;for(let[Z,H]of $.invokedSkills)if(H.agentId===J)Y.set(Z,H);return Y}function O3(Q){if(!Q||Q.size===0){$.invokedSkills.clear();return}for(let[J,Y]of $.invokedSkills)if(Y.agentId===null||!Q.has(Y.agentId))$.invokedSkills.delete(J)}function V3(Q){for(let[J,Y]of $.invokedSkills)if(Y.agentId===Q)$.invokedSkills.delete(J)}function M3(Q,J){}function L3(){return AY}function f3(){return $.mainThreadAgentType}function P3(Q){$.mainThreadAgentType=Q}function I3(){return $.isRemoteMode}function C3(Q){$.isRemoteMode=Q}function _3(){return $.systemPromptSectionCache}function k3(Q,J){$.systemPromptSectionCache.set(Q,J)}function E3(){$.systemPromptSectionCache.clear()}function v3(){return $.lastEmittedDate}function d3(Q){$.lastEmittedDate=Q}function g3(){return $.additionalDirectoriesForClaudeMd}function p3(Q){$.additionalDirectoriesForClaudeMd=Q}function y3(){return $.allowedChannels}function S3(Q){$.allowedChannels=Q,L1()}function m3(){return $.hasDevChannels}function A3(Q){$.hasDevChannels=Q}function j3(){return $.largeSystemPromptDetected}function h3(Q){$.largeSystemPromptDetected=Q}function n3(){return $.afkModeHeaderLatched}function b3(Q){$.afkModeHeaderLatched=Q}function i3(){return $.fastModeHeaderLatched}function u3(Q){$.fastModeHeaderLatched=Q}function l3(){return $.thinkingClearLatched}function T3(Q){$.thinkingClearLatched=Q}function c3(Q){return $.lspDeferLatchedTools?.has(Q)??!1}function r3(Q){if(!$.lspDeferLatchedTools)$.lspDeferLatchedTools=new Set;$.lspDeferLatchedTools.add(Q)}function o3(){return $.deferredDeltaLegacySession}function s3(Q){$.deferredDeltaLegacySession=Q}function jY(){$.afkModeHeaderLatched=null,$.fastModeHeaderLatched=null,$.thinkingClearLatched=null,$.lspDeferLatchedTools=null,$.deferredDeltaLegacySession=!1}function a3(){return $.sessionEpochMs}function t3(){return $.promptId}function e3(Q){$.promptId=Q}function QW(){return!1}function $W(){return null}var r1,$,o1,K9,s1=!1,a1=0,t1=null,f1=0,M1=!1,l,j$=150,AY;var hY=X(()=>{_$();k$();v$();g$();r1=new Set;$=y$();o1=d$();K9=o1.subscribe;AY=[]});
2
+ export{p as Uha,I1 as Vha,FQ as Wha,RQ as Xha,OQ as Yha,VQ as Zha,_1 as _ha,MQ as $ha,PQ as aia,IQ as bia,dQ as cia,gQ as dia,w as eia,M as fia,pQ as gia,yQ as hia,SQ as iia,mQ as jia,AQ as kia,jQ as lia,nQ as mia,bQ as nia,O as oia,m as pia,t as qia,v1 as ria,A as sia,d1 as tia,$1 as uia,g1 as via,$5 as wia,J5 as xia,X1 as yia,X5 as zia,H1 as Aia,y1 as Bia,W5 as Cia,x5 as Dia,U5 as Eia,K5 as Fia,G5 as Gia,B5 as Hia,q5 as Iia,D5 as Jia,W1 as Kia,S1 as Lia,m1 as Mia,O5 as Nia,G1 as Oia,P5 as Pia,A1 as Qia,d5 as Ria,w1 as Sia,j1 as Tia,h as Uia,R1 as Via,a5 as Wia,t5 as Xia,Z$ as Yia,X$ as Zia,D1 as _ia,b1 as $ia,I as aja,u as bja,O1 as cja,i1 as dja,F$ as eja,R$ as fja,f$ as gja,P$ as hja,nX as ija,bX as jja,iX as kja,uX as lja,lX as mja,TX as nja,E$ as oja,cX as pja,rX as qja,oX as rja,v$ as sja,d$ as tja,g$ as uja,Z9 as vja,X9 as wja,H9 as xja,W9 as yja,x9 as zja,U9 as Aja,K9 as Bja,G9 as Cja,B9 as Dja,N9 as Eja,w9 as Fja,z9 as Gja,F9 as Hja,R9 as Ija,q9 as Jja,D9 as Kja,O9 as Lja,V9 as Mja,M9 as Nja,L9 as Oja,f9 as Pja,P9 as Qja,I9 as Rja,C9 as Sja,_9 as Tja,k9 as Uja,E9 as Vja,v9 as Wja,d9 as Xja,g9 as Yja,p9 as Zja,y9 as _ja,S9 as $ja,m9 as aka,A9 as bka,j9 as cka,h9 as dka,n9 as eka,b9 as fka,i9 as gka,u9 as hka,l9 as ika,T9 as jka,c9 as kka,A$ as lka,r9 as mka,o9 as nka,s9 as oka,a9 as pka,t9 as qka,e9 as rka,QH as ska,$H as tka,JH as uka,YH as vka,ZH as wka,XH as xka,HH as yka,WH as zka,xH as Aka,UH as Bka,KH as Cka,GH as Dka,BH as Eka,NH as Fka,wH as Gka,zH as Hka,FH as Ika,RH as Jka,qH as Kka,DH as Lka,OH as Mka,VH as Nka,MH as Oka,LH as Pka,fH as Qka,PH as Rka,IH as Ska,CH as Tka,_H as Uka,kH as Vka,EH as Wka,vH as Xka,dH as Yka,gH as Zka,pH as _ka,yH as $ka,SH as ala,mH as bla,AH as cla,jH as dla,hH as ela,nH as fla,bH as gla,iH as hla,uH as ila,lH as jla,mY as kla,TH as lla,cH as mla,rH as nla,oH as ola,sH as pla,aH as qla,tH as rla,eH as sla,Q4 as tla,$4 as ula,J4 as vla,Y4 as wla,Z4 as xla,X4 as yla,H4 as zla,W4 as Ala,x4 as Bla,U4 as Cla,K4 as Dla,G4 as Ela,B4 as Fla,N4 as Gla,w4 as Hla,z4 as Ila,F4 as Jla,R4 as Kla,q4 as Lla,D4 as Mla,O4 as Nla,V4 as Ola,M4 as Pla,L4 as Qla,f4 as Rla,P4 as Sla,I4 as Tla,C4 as Ula,_4 as Vla,k4 as Wla,E4 as Xla,v4 as Yla,d4 as Zla,g4 as _la,p4 as $la,y4 as ama,S4 as bma,m4 as cma,A4 as dma,j4 as ema,h4 as fma,n4 as gma,b4 as hma,i4 as ima,u4 as jma,l4 as kma,T4 as lma,c4 as mma,r4 as nma,o4 as oma,s4 as pma,a4 as qma,t4 as rma,e4 as sma,Q3 as tma,$3 as uma,J3 as vma,Y3 as wma,Z3 as xma,X3 as yma,H3 as zma,W3 as Ama,x3 as Bma,U3 as Cma,K3 as Dma,G3 as Ema,B3 as Fma,N3 as Gma,w3 as Hma,z3 as Ima,F3 as Jma,R3 as Kma,q3 as Lma,D3 as Mma,O3 as Nma,V3 as Oma,M3 as Pma,L3 as Qma,f3 as Rma,P3 as Sma,I3 as Tma,C3 as Uma,_3 as Vma,k3 as Wma,E3 as Xma,v3 as Yma,d3 as Zma,g3 as _ma,p3 as $ma,y3 as ana,S3 as bna,m3 as cna,A3 as dna,j3 as ena,h3 as fna,n3 as gna,b3 as hna,i3 as ina,u3 as jna,l3 as kna,T3 as lna,c3 as mna,r3 as nna,o3 as ona,s3 as pna,jY as qna,a3 as rna,t3 as sna,e3 as tna,QW as una,$W as vna,hY as wna};
@@ -0,0 +1,6 @@
1
+ import{fpa as j}from"./cli-0.6.0-szxjcmcn.mjs";function c(){let q=new Map;for(let[V,z]of Object.entries(J)){for(let[D,H]of Object.entries(z))J[D]={open:`\x1B[${H[0]}m`,close:`\x1B[${H[1]}m`},z[D]=J[D],q.set(H[0],H[1]);Object.defineProperty(J,V,{value:z,enumerable:!1})}return Object.defineProperty(J,"codes",{value:q,enumerable:!1}),J.color.close="\x1B[39m",J.bgColor.close="\x1B[49m",J.color.ansi=M(),J.color.ansi256=Y(),J.color.ansi16m=k(),J.bgColor.ansi=M(10),J.bgColor.ansi256=Y(10),J.bgColor.ansi16m=k(10),Object.defineProperties(J,{rgbToAnsi256:{value(V,z,D){if(V===z&&z===D){if(V<8)return 16;if(V>248)return 231;return Math.round((V-8)/247*24)+232}return 16+36*Math.round(V/255*5)+6*Math.round(z/255*5)+Math.round(D/255*5)},enumerable:!1},hexToRgb:{value(V){let z=/[a-f\d]{6}|[a-f\d]{3}/i.exec(V.toString(16));if(!z)return[0,0,0];let[D]=z;if(D.length===3)D=[...D].map((Q)=>Q+Q).join("");let H=Number.parseInt(D,16);return[H>>16&255,H>>8&255,H&255]},enumerable:!1},hexToAnsi256:{value:(V)=>J.rgbToAnsi256(...J.hexToRgb(V)),enumerable:!1},ansi256ToAnsi:{value(V){if(V<8)return 30+V;if(V<16)return 90+(V-8);let z,D,H;if(V>=232)z=((V-232)*10+8)/255,D=z,H=z;else{V-=16;let N=V%36;z=Math.floor(V/36)/5,D=Math.floor(N/6)/5,H=N%6/5}let Q=Math.max(z,D,H)*2;if(Q===0)return 30;let U=30+(Math.round(H)<<2|Math.round(D)<<1|Math.round(z));if(Q===2)U+=60;return U},enumerable:!1},rgbToAnsi:{value:(V,z,D)=>J.ansi256ToAnsi(J.rgbToAnsi256(V,z,D)),enumerable:!1},hexToAnsi:{value:(V)=>J.ansi256ToAnsi(J.hexToAnsi256(V)),enumerable:!1}}),J}var M=(q=0)=>(V)=>`\x1B[${V+q}m`,Y=(q=0)=>(V)=>`\x1B[${38+q};5;${V}m`,k=(q=0)=>(V,z,D)=>`\x1B[${38+q};2;${V};${z};${D}m`,J,V1,u,m,q1,p,X;var R=j(()=>{J={modifier:{reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],overline:[53,55],inverse:[7,27],hidden:[8,28],strikethrough:[9,29]},color:{black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],blackBright:[90,39],gray:[90,39],grey:[90,39],redBright:[91,39],greenBright:[92,39],yellowBright:[93,39],blueBright:[94,39],magentaBright:[95,39],cyanBright:[96,39],whiteBright:[97,39]},bgColor:{bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],bgBlackBright:[100,49],bgGray:[100,49],bgGrey:[100,49],bgRedBright:[101,49],bgGreenBright:[102,49],bgYellowBright:[103,49],bgBlueBright:[104,49],bgMagentaBright:[105,49],bgCyanBright:[106,49],bgWhiteBright:[107,49]}},V1=Object.keys(J.modifier),u=Object.keys(J.color),m=Object.keys(J.bgColor),q1=[...u,...m];p=c(),X=p});import I from"node:process";import d from"node:os";import E from"node:tty";function W(q,V=globalThis.Deno?globalThis.Deno.args:I.argv){let z=q.startsWith("-")?"":q.length===1?"-":"--",D=V.indexOf(z+q),H=V.indexOf("--");return D!==-1&&(H===-1||D<H)}function y(){if("FORCE_COLOR"in K){if(K.FORCE_COLOR==="true")return 1;if(K.FORCE_COLOR==="false")return 0;return K.FORCE_COLOR.length===0?1:Math.min(Number.parseInt(K.FORCE_COLOR,10),3)}}function g(q){if(q===0)return!1;return{level:q,hasBasic:!0,has256:q>=2,has16m:q>=3}}function i(q,{streamIsTTY:V,sniffFlags:z=!0}={}){let D=y();if(D!==void 0)B=D;let H=z?B:D;if(H===0)return 0;if(z){if(W("color=16m")||W("color=full")||W("color=truecolor"))return 3;if(W("color=256"))return 2}if("TF_BUILD"in K&&"AGENT_NAME"in K)return 1;if(q&&!V&&H===void 0)return 0;let Q=H||0;if(K.TERM==="dumb")return Q;if(I.platform==="win32"){let U=d.release().split(".");if(Number(U[0])>=10&&Number(U[2])>=10586)return Number(U[2])>=14931?3:2;return 1}if("CI"in K){if(["GITHUB_ACTIONS","GITEA_ACTIONS","CIRCLECI"].some((U)=>(U in K)))return 3;if(["TRAVIS","APPVEYOR","GITLAB_CI","BUILDKITE","DRONE"].some((U)=>(U in K))||K.CI_NAME==="codeship")return 1;return Q}if("TEAMCITY_VERSION"in K)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(K.TEAMCITY_VERSION)?1:0;if(K.COLORTERM==="truecolor")return 3;if(K.TERM==="xterm-kitty")return 3;if(K.TERM==="xterm-ghostty")return 3;if(K.TERM==="wezterm")return 3;if("TERM_PROGRAM"in K){let U=Number.parseInt((K.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(K.TERM_PROGRAM){case"iTerm.app":return U>=3?3:2;case"Apple_Terminal":return 2}}if(/-256(color)?$/i.test(K.TERM))return 2;if(/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(K.TERM))return 1;if("COLORTERM"in K)return 1;return Q}function T(q,V={}){let z=i(q,{streamIsTTY:q&&q.isTTY,...V});return g(z)}var K,B,a,A;var C=j(()=>{({env:K}=I);if(W("no-color")||W("no-colors")||W("color=false")||W("color=never"))B=0;else if(W("color")||W("colors")||W("color=true")||W("color=always"))B=1;a={stdout:T({isTTY:E.isatty(1)}),stderr:T({isTTY:E.isatty(2)})},A=a});function F(q,V,z){let D=q.indexOf(V);if(D===-1)return q;let H=V.length,Q=0,U="";do U+=q.slice(Q,D)+V+z,Q=D+H,D=q.indexOf(V,Q);while(D!==-1);return U+=q.slice(Q),U}function _(q,V,z,D){let H=0,Q="";do{let U=q[D-1]==="\r";Q+=q.slice(H,U?D-1:D)+V+(U?`\r
2
+ `:`
3
+ `)+z,H=D+1,D=q.indexOf(`
4
+ `,H)}while(D!==-1);return Q+=q.slice(H),Q}var b=()=>{};class o{constructor(q){return v(q)}}function G(q){return v(q)}var S,h,L,Z,O,f,$,n=(q,V={})=>{if(V.level&&!(Number.isInteger(V.level)&&V.level>=0&&V.level<=3))throw Error("The `level` option should be an integer from 0 to 3");let z=S?S.level:0;q.level=V.level===void 0?z:V.level},v=(q)=>{let V=(...z)=>z.join(" ");return n(V,q),Object.setPrototypeOf(V,G.prototype),V},P=(q,V,z,...D)=>{if(q==="rgb"){if(V==="ansi16m")return X[z].ansi16m(...D);if(V==="ansi256")return X[z].ansi256(X.rgbToAnsi256(...D));return X[z].ansi(X.rgbToAnsi(...D))}if(q==="hex")return P("rgb",V,z,...X.hexToRgb(...D));return X[z][q](...D)},t,r,x=(q,V,z)=>{let D,H;if(z===void 0)D=q,H=V;else D=z.openAll+q,H=V+z.closeAll;return{open:q,close:V,openAll:D,closeAll:H,parent:z}},w=(q,V,z)=>{let D=(...H)=>l(D,H.length===1?""+H[0]:H.join(" "));return Object.setPrototypeOf(D,r),D[L]=q,D[Z]=V,D[O]=z,D},l=(q,V)=>{if(q.level<=0||!V)return q[O]?"":V;let z=q[Z];if(z===void 0)return V;let{openAll:D,closeAll:H}=z;if(V.includes("\x1B"))while(z!==void 0)V=F(V,z.close,z.open),z=z.parent;let Q=V.indexOf(`
5
+ `);if(Q!==-1)V=_(V,H,D,Q);return D+V+H},s,Z1,O1;var e=j(()=>{R();C();b();({stdout:S,stderr:h}=A),L=Symbol("GENERATOR"),Z=Symbol("STYLER"),O=Symbol("IS_EMPTY"),f=["ansi","ansi","ansi256","ansi16m"],$=Object.create(null);Object.setPrototypeOf(G.prototype,Function.prototype);for(let[q,V]of Object.entries(X))$[q]={get(){let z=w(this,x(V.open,V.close,this[Z]),this[O]);return Object.defineProperty(this,q,{value:z}),z}};$.visible={get(){let q=w(this,this[Z],!0);return Object.defineProperty(this,"visible",{value:q}),q}};t=["rgb","hex","ansi256"];for(let q of t){$[q]={get(){let{level:z}=this;return function(...D){let H=x(P(q,f[z],"color",...D),X.color.close,this[Z]);return w(this,H,this[O])}}};let V="bg"+q[0].toUpperCase()+q.slice(1);$[V]={get(){let{level:z}=this;return function(...D){let H=x(P(q,f[z],"bgColor",...D),X.bgColor.close,this[Z]);return w(this,H,this[O])}}}}r=Object.defineProperties(()=>{},{...$,level:{enumerable:!0,get(){return this[L].level},set(q){this[L].level=q}}});Object.defineProperties(G.prototype,$);s=G(),Z1=G({level:h?h.level:0}),O1=s});
6
+ export{o as r5,O1 as s5,e as t5};
@@ -0,0 +1,2 @@
1
+ import{Oq as I,Rq as X}from"./cli-0.6.0-vj1q5vmq.mjs";import{Jha as H,Tha as W}from"./cli-0.6.0-2gsntzzv.mjs";import{fpa as V}from"./cli-0.6.0-szxjcmcn.mjs";function q(f){J=f}function F(f){z=f}function K(f){N=f}function Q(){return O}function R(f,B){if(O=f,J?.(f,B),f==="requires_action"&&B)G=!0,z?.({pending_action:B});else if(G)G=!1,z?.({pending_action:null});if(f==="idle")z?.({task_summary:null});if(H(process.env.CLAUDE_CODE_EMIT_SESSION_STATE_EVENTS))I({type:"system",subtype:"session_state_changed",state:f})}function _(f){z?.(f)}function j(f){N?.(f)}var J=null,z=null,N=null,G=!1,O="idle";var Y=V(()=>{W();X()});
2
+ export{q as jc,F as kc,K as lc,Q as mc,R as nc,_ as oc,j as pc,Y as qc};