@claudiolabs/claudin 1.0.8 → 1.0.9

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 (917) hide show
  1. package/README.md +1 -0
  2. package/dist/chunks/AgentTool-1.0.9-pn7bw6yv.mjs +1 -0
  3. package/dist/chunks/App-1.0.9-4evjz5w2.mjs +1 -0
  4. package/dist/chunks/ApproveApiKey-1.0.9-bbb6t3r9.mjs +1 -0
  5. package/dist/chunks/AssistantSessionChooser-1.0.9-133vee5x.mjs +1 -0
  6. package/dist/chunks/AutoModeOptInDialog-1.0.9-1bgty08c.mjs +1 -0
  7. package/dist/chunks/BypassPermissionsModeDialog-1.0.9-acyyj7ky.mjs +1 -0
  8. package/dist/chunks/ClaudeMdExternalIncludesDialog-1.0.9-8d430r75.mjs +1 -0
  9. package/dist/chunks/ConsoleOAuthFlow-1.0.9-6ew6r9f6.mjs +1 -0
  10. package/dist/chunks/DiffDialog-1.0.9-ze7bee5g.mjs +7 -0
  11. package/dist/chunks/Doctor-1.0.9-xy0g4b33.mjs +1 -0
  12. package/dist/chunks/ExplorerDialog-1.0.9-3yjz2cvs.mjs +6 -0
  13. package/dist/chunks/Grove-1.0.9-96nwpafr.mjs +1 -0
  14. package/dist/chunks/ITermBackend-1.0.9-ywr7fk06.mjs +1 -0
  15. package/dist/chunks/InvalidConfigDialog-1.0.9-2q4w4j4t.mjs +1 -0
  16. package/dist/chunks/InvalidSettingsDialog-1.0.9-z37xr3zw.mjs +1 -0
  17. package/dist/chunks/MigrationDialog-1.0.9-z7j3qhg7.mjs +1 -0
  18. package/dist/chunks/Onboarding-1.0.9-gtxm4j8b.mjs +1 -0
  19. package/dist/chunks/ProviderManager-1.0.9-1mdk6qz8.mjs +1 -0
  20. package/dist/chunks/REPL-1.0.9-8b6q2gzd.mjs +1 -0
  21. package/dist/chunks/ResumeConversation-1.0.9-e0r40skb.mjs +1 -0
  22. package/dist/chunks/SnapshotUpdateDialog-1.0.9-02v56nb9.mjs +1 -0
  23. package/dist/chunks/TeleportProgress-1.0.9-bdgqerzr.mjs +1 -0
  24. package/dist/chunks/TeleportRepoMismatchDialog-1.0.9-vtm223ky.mjs +1 -0
  25. package/dist/chunks/TeleportResumeWrapper-1.0.9-bmyks5dc.mjs +1 -0
  26. package/dist/chunks/TmuxBackend-1.0.9-ns6fj8sv.mjs +9 -0
  27. package/dist/chunks/ToolSearchTool-1.0.9-98prvmmb.mjs +1 -0
  28. package/dist/chunks/TrustDialog-1.0.9-br4q9mkd.mjs +1 -0
  29. package/dist/chunks/activeProvider-1.0.9-5nxztxpg.mjs +1 -0
  30. package/dist/chunks/add-dir-1.0.9-ypva61t4.mjs +1 -0
  31. package/dist/chunks/agentTypes-1.0.9-x07mx3dr.mjs +1 -0
  32. package/dist/chunks/agents-1.0.9-3mfx5p6a.mjs +3 -0
  33. package/dist/chunks/agents-1.0.9-8srfrkqw.mjs +110 -0
  34. package/dist/chunks/api-1.0.9-797pjvs1.mjs +1 -0
  35. package/dist/chunks/asciicast-1.0.9-2jnc8jtk.mjs +1 -0
  36. package/dist/chunks/assistant-1.0.9-1ryssrnh.mjs +1 -0
  37. package/dist/chunks/auth-1.0.9-9xadhd5v.mjs +1 -0
  38. package/dist/chunks/auth-1.0.9-q57mj8gk.mjs +1 -0
  39. package/dist/chunks/autoMode-1.0.9-rz4pssbt.mjs +48 -0
  40. package/dist/chunks/autoUpdater-1.0.9-kx1fdq56.mjs +1 -0
  41. package/dist/chunks/backgroundHousekeeping-1.0.9-5c1na5cn.mjs +1 -0
  42. package/dist/chunks/branch-1.0.9-2857desd.mjs +4 -0
  43. package/dist/chunks/bridge-1.0.9-a2875hps.mjs +2 -0
  44. package/dist/chunks/bridgeConfig-1.0.9-pqqgvm77.mjs +1 -0
  45. package/dist/chunks/bridgeEnabled-1.0.9-z4rqrrb8.mjs +1 -0
  46. package/dist/chunks/bridgeMain-1.0.9-e08pefvd.mjs +88 -0
  47. package/dist/chunks/bridgePointer-1.0.9-zt50pndw.mjs +1 -0
  48. package/dist/chunks/btw-1.0.9-55ev3ghy.mjs +1 -0
  49. package/dist/chunks/buddy-1.0.9-6z68f6ex.mjs +3 -0
  50. package/dist/chunks/cacache-1.0.9-h1eketz5.mjs +1 -0
  51. package/dist/chunks/cache-probe-1.0.9-78r0f324.mjs +21 -0
  52. package/dist/chunks/cacheStats-1.0.9-4t8zwh7m.mjs +4 -0
  53. package/dist/chunks/caches-1.0.9-8vpcw0da.mjs +1 -0
  54. package/dist/chunks/claudeDesktop-1.0.9-7vwfj2q3.mjs +1 -0
  55. package/dist/chunks/claudemd-1.0.9-cd1jnewp.mjs +1 -0
  56. package/dist/chunks/clear-1.0.9-881ynng5.mjs +1 -0
  57. package/dist/chunks/clearTerminal-1.0.9-saxb5je9.mjs +1 -0
  58. package/dist/chunks/cli-1.0.9-01cy14p7.mjs +2 -0
  59. package/dist/chunks/cli-1.0.9-03tgqcyj.mjs +2 -0
  60. package/dist/chunks/cli-1.0.9-06kd11jd.mjs +2 -0
  61. package/dist/chunks/cli-1.0.9-0e6g8sye.mjs +4 -0
  62. package/dist/chunks/cli-1.0.9-0f3ex0vg.mjs +15 -0
  63. package/dist/chunks/cli-1.0.9-0xhf29zj.mjs +2 -0
  64. package/dist/chunks/cli-1.0.9-0xr97fha.mjs +4 -0
  65. package/dist/chunks/cli-1.0.9-11j6h2p2.mjs +2 -0
  66. package/dist/chunks/cli-1.0.9-11tj558a.mjs +2 -0
  67. package/dist/chunks/cli-1.0.9-13q9fkxq.mjs +2 -0
  68. package/dist/chunks/cli-1.0.9-19gz2k9q.mjs +3 -0
  69. package/dist/chunks/cli-1.0.9-1adzaxwy.mjs +2 -0
  70. package/dist/chunks/cli-1.0.9-1de7bab0.mjs +2 -0
  71. package/dist/chunks/cli-1.0.9-1f0bxa2a.mjs +18 -0
  72. package/dist/chunks/cli-1.0.9-1hcdwdyw.mjs +133 -0
  73. package/dist/chunks/cli-1.0.9-1p61fppv.mjs +2 -0
  74. package/dist/chunks/cli-1.0.9-1pe38ex2.mjs +2 -0
  75. package/dist/chunks/cli-1.0.9-1t8pkgtd.mjs +2 -0
  76. package/dist/chunks/cli-1.0.9-25kh81st.mjs +18 -0
  77. package/dist/chunks/cli-1.0.9-2a1jman4.mjs +3 -0
  78. package/dist/chunks/cli-1.0.9-2gdex17t.mjs +2 -0
  79. package/dist/chunks/cli-1.0.9-2hgg2mnb.mjs +2 -0
  80. package/dist/chunks/cli-1.0.9-2ncvyz2r.mjs +45 -0
  81. package/dist/chunks/cli-1.0.9-2prerh1s.mjs +2 -0
  82. package/dist/chunks/cli-1.0.9-2y9fcheg.mjs +2 -0
  83. package/dist/chunks/cli-1.0.9-3bdkmcp9.mjs +18 -0
  84. package/dist/chunks/cli-1.0.9-3ccxr1d8.mjs +2 -0
  85. package/dist/chunks/cli-1.0.9-3espt55t.mjs +20 -0
  86. package/dist/chunks/cli-1.0.9-3k1w3fc0.mjs +2 -0
  87. package/dist/chunks/cli-1.0.9-3mv7thfe.mjs +21 -0
  88. package/dist/chunks/cli-1.0.9-3n2084tg.mjs +2 -0
  89. package/dist/chunks/cli-1.0.9-3wmanrzv.mjs +2 -0
  90. package/dist/chunks/cli-1.0.9-3wn7m4cv.mjs +3 -0
  91. package/dist/chunks/cli-1.0.9-3ye1460y.mjs +2 -0
  92. package/dist/chunks/cli-1.0.9-42ww2d94.mjs +2 -0
  93. package/dist/chunks/cli-1.0.9-49sanx9h.mjs +2 -0
  94. package/dist/chunks/cli-1.0.9-4fdvygwb.mjs +25 -0
  95. package/dist/chunks/cli-1.0.9-4kjme82s.mjs +2 -0
  96. package/dist/chunks/cli-1.0.9-4vrbbav9.mjs +2 -0
  97. package/dist/chunks/cli-1.0.9-4yksn92y.mjs +2 -0
  98. package/dist/chunks/cli-1.0.9-51rze21n.mjs +2 -0
  99. package/dist/chunks/cli-1.0.9-537n2cda.mjs +2 -0
  100. package/dist/chunks/cli-1.0.9-593a1k2m.mjs +17 -0
  101. package/dist/chunks/cli-1.0.9-5afn268n.mjs +34 -0
  102. package/dist/chunks/cli-1.0.9-601tsydg.mjs +2 -0
  103. package/dist/chunks/cli-1.0.9-625zsef6.mjs +2 -0
  104. package/dist/chunks/cli-1.0.9-6424zmgd.mjs +2 -0
  105. package/dist/chunks/cli-1.0.9-67c9vgsq.mjs +5492 -0
  106. package/dist/chunks/cli-1.0.9-68er5cff.mjs +3 -0
  107. package/dist/chunks/cli-1.0.9-6q0e7nk4.mjs +3 -0
  108. package/dist/chunks/cli-1.0.9-6x8m34y6.mjs +67 -0
  109. package/dist/chunks/cli-1.0.9-6yxsfcyh.mjs +2 -0
  110. package/dist/chunks/cli-1.0.9-71jbnxs0.mjs +4 -0
  111. package/dist/chunks/cli-1.0.9-7exncgt2.mjs +4 -0
  112. package/dist/chunks/cli-1.0.9-7gewnt7b.mjs +2 -0
  113. package/dist/chunks/cli-1.0.9-7xt7m2q5.mjs +2 -0
  114. package/dist/chunks/cli-1.0.9-806xk0g7.mjs +2 -0
  115. package/dist/chunks/cli-1.0.9-81zj78t2.mjs +2 -0
  116. package/dist/chunks/cli-1.0.9-89yxpmpq.mjs +3 -0
  117. package/dist/chunks/cli-1.0.9-8f06bgf9.mjs +4 -0
  118. package/dist/chunks/cli-1.0.9-8g8n5ceb.mjs +2 -0
  119. package/dist/chunks/cli-1.0.9-8j4fe1qz.mjs +2 -0
  120. package/dist/chunks/cli-1.0.9-912srhxc.mjs +2 -0
  121. package/dist/chunks/cli-1.0.9-963yvtxd.mjs +2 -0
  122. package/dist/chunks/cli-1.0.9-9jyyb7zx.mjs +12 -0
  123. package/dist/chunks/cli-1.0.9-9p6ww1a0.mjs +2 -0
  124. package/dist/chunks/cli-1.0.9-9yr5whta.mjs +26 -0
  125. package/dist/chunks/cli-1.0.9-a0zm3d1g.mjs +2 -0
  126. package/dist/chunks/cli-1.0.9-aasy7y47.mjs +2 -0
  127. package/dist/chunks/cli-1.0.9-ajhbq50f.mjs +2 -0
  128. package/dist/chunks/cli-1.0.9-awxee62m.mjs +2 -0
  129. package/dist/chunks/cli-1.0.9-ayjdc0qr.mjs +2 -0
  130. package/dist/chunks/cli-1.0.9-az9m58wa.mjs +2 -0
  131. package/dist/chunks/cli-1.0.9-b029w2p8.mjs +2 -0
  132. package/dist/chunks/cli-1.0.9-b11n0pyq.mjs +9 -0
  133. package/dist/chunks/cli-1.0.9-b38km1fw.mjs +2 -0
  134. package/dist/chunks/cli-1.0.9-b78v72rn.mjs +2 -0
  135. package/dist/chunks/cli-1.0.9-bas5sqzw.mjs +2 -0
  136. package/dist/chunks/cli-1.0.9-bd7743tj.mjs +2 -0
  137. package/dist/chunks/cli-1.0.9-bg3jgpj8.mjs +2 -0
  138. package/dist/chunks/cli-1.0.9-bqcs2981.mjs +4 -0
  139. package/dist/chunks/cli-1.0.9-c05x7nfj.mjs +3 -0
  140. package/dist/chunks/cli-1.0.9-c5n2kbdv.mjs +17 -0
  141. package/dist/chunks/cli-1.0.9-cc6btq9c.mjs +2 -0
  142. package/dist/chunks/cli-1.0.9-cdc3drzy.mjs +2 -0
  143. package/dist/chunks/cli-1.0.9-ch1ca19q.mjs +2 -0
  144. package/dist/chunks/cli-1.0.9-cthzntz1.mjs +2 -0
  145. package/dist/chunks/cli-1.0.9-cymry1xw.mjs +2 -0
  146. package/dist/chunks/cli-1.0.9-d8rq80ph.mjs +2 -0
  147. package/dist/chunks/cli-1.0.9-dbs656rx.mjs +133 -0
  148. package/dist/chunks/cli-1.0.9-dg55k2hn.mjs +2 -0
  149. package/dist/chunks/cli-1.0.9-dg8j07p1.mjs +2 -0
  150. package/dist/chunks/cli-1.0.9-dp3xhncn.mjs +2 -0
  151. package/dist/chunks/cli-1.0.9-dvbfpdtc.mjs +24 -0
  152. package/dist/chunks/cli-1.0.9-e2f6b83v.mjs +2 -0
  153. package/dist/chunks/cli-1.0.9-e2mjjvjc.mjs +2 -0
  154. package/dist/chunks/cli-1.0.9-e491drav.mjs +2 -0
  155. package/dist/chunks/cli-1.0.9-e8n90m9g.mjs +2 -0
  156. package/dist/chunks/cli-1.0.9-ea0y4mww.mjs +2 -0
  157. package/dist/chunks/cli-1.0.9-eb7ne7cx.mjs +2 -0
  158. package/dist/chunks/cli-1.0.9-eeyg3kcg.mjs +4 -0
  159. package/dist/chunks/cli-1.0.9-efmzhqag.mjs +2 -0
  160. package/dist/chunks/cli-1.0.9-ej3ahs6j.mjs +199 -0
  161. package/dist/chunks/cli-1.0.9-eq3sypj3.mjs +2 -0
  162. package/dist/chunks/cli-1.0.9-erz57dtz.mjs +6 -0
  163. package/dist/chunks/cli-1.0.9-ez2pcj03.mjs +2 -0
  164. package/dist/chunks/cli-1.0.9-fejr36z6.mjs +2 -0
  165. package/dist/chunks/cli-1.0.9-fhj3g7hg.mjs +2 -0
  166. package/dist/chunks/cli-1.0.9-fkbdtr1w.mjs +3 -0
  167. package/dist/chunks/cli-1.0.9-fkfc8k86.mjs +2 -0
  168. package/dist/chunks/cli-1.0.9-fvw201bt.mjs +2 -0
  169. package/dist/chunks/cli-1.0.9-fw4bsz0q.mjs +2 -0
  170. package/dist/chunks/cli-1.0.9-fx0e9bkg.mjs +2 -0
  171. package/dist/chunks/cli-1.0.9-g8mgmpkc.mjs +2 -0
  172. package/dist/chunks/cli-1.0.9-gctz0hyw.mjs +24 -0
  173. package/dist/chunks/cli-1.0.9-ge04svda.mjs +2 -0
  174. package/dist/chunks/cli-1.0.9-gh82pj8t.mjs +50 -0
  175. package/dist/chunks/cli-1.0.9-gjta07sd.mjs +2 -0
  176. package/dist/chunks/cli-1.0.9-gsgbywct.mjs +25 -0
  177. package/dist/chunks/cli-1.0.9-gvp958jh.mjs +2 -0
  178. package/dist/chunks/cli-1.0.9-h5kwp1cf.mjs +2 -0
  179. package/dist/chunks/cli-1.0.9-ha9fdhs8.mjs +2 -0
  180. package/dist/chunks/cli-1.0.9-hf6frb0e.mjs +9 -0
  181. package/dist/chunks/cli-1.0.9-htsk8rvv.mjs +42 -0
  182. package/dist/chunks/cli-1.0.9-j02z8apf.mjs +2 -0
  183. package/dist/chunks/cli-1.0.9-j2832pm5.mjs +2 -0
  184. package/dist/chunks/cli-1.0.9-j297swbj.mjs +2 -0
  185. package/dist/chunks/cli-1.0.9-j500vd5e.mjs +2 -0
  186. package/dist/chunks/cli-1.0.9-j6fwd0mg.mjs +3 -0
  187. package/dist/chunks/cli-1.0.9-jcnmjs31.mjs +2 -0
  188. package/dist/chunks/cli-1.0.9-jfgy2jk6.mjs +5 -0
  189. package/dist/chunks/cli-1.0.9-jktrmswp.mjs +2 -0
  190. package/dist/chunks/cli-1.0.9-jmxz57bg.mjs +2 -0
  191. package/dist/chunks/cli-1.0.9-jq2h9s5r.mjs +2 -0
  192. package/dist/chunks/cli-1.0.9-jwye26tm.mjs +2 -0
  193. package/dist/chunks/cli-1.0.9-k7xzs5f3.mjs +2 -0
  194. package/dist/chunks/cli-1.0.9-k9k4mjr2.mjs +58 -0
  195. package/dist/chunks/cli-1.0.9-kfge7dzc.mjs +3 -0
  196. package/dist/chunks/cli-1.0.9-kw7p06w2.mjs +2 -0
  197. package/dist/chunks/cli-1.0.9-m6k5afpm.mjs +3 -0
  198. package/dist/chunks/cli-1.0.9-mx0hp5fn.mjs +2 -0
  199. package/dist/chunks/cli-1.0.9-n2eds51d.mjs +2 -0
  200. package/dist/chunks/cli-1.0.9-nc1t91tt.mjs +15 -0
  201. package/dist/chunks/cli-1.0.9-nm7ds98w.mjs +2 -0
  202. package/dist/chunks/cli-1.0.9-nz0skfsg.mjs +6 -0
  203. package/dist/chunks/cli-1.0.9-p3a08x10.mjs +2 -0
  204. package/dist/chunks/cli-1.0.9-ppa9xdxq.mjs +2 -0
  205. package/dist/chunks/cli-1.0.9-pxkbc8zc.mjs +2 -0
  206. package/dist/chunks/cli-1.0.9-q38wwdnj.mjs +2 -0
  207. package/dist/chunks/cli-1.0.9-q3fzs7rd.mjs +59 -0
  208. package/dist/chunks/cli-1.0.9-q3xyfb3x.mjs +2 -0
  209. package/dist/chunks/cli-1.0.9-q6e8xnkz.mjs +2 -0
  210. package/dist/chunks/cli-1.0.9-qb618hw7.mjs +2 -0
  211. package/dist/chunks/cli-1.0.9-qjey3ysx.mjs +3 -0
  212. package/dist/chunks/cli-1.0.9-qpvnvfac.mjs +2 -0
  213. package/dist/chunks/cli-1.0.9-qyfx57wb.mjs +2 -0
  214. package/dist/chunks/cli-1.0.9-r4ysx5t8.mjs +2 -0
  215. package/dist/chunks/cli-1.0.9-rd2hz2r7.mjs +2 -0
  216. package/dist/chunks/cli-1.0.9-rh1x9xts.mjs +2 -0
  217. package/dist/chunks/cli-1.0.9-rhvh1vdg.mjs +39 -0
  218. package/dist/chunks/cli-1.0.9-rjq71gw8.mjs +2 -0
  219. package/dist/chunks/cli-1.0.9-rm8ssvm7.mjs +2 -0
  220. package/dist/chunks/cli-1.0.9-rpw6qq2j.mjs +2 -0
  221. package/dist/chunks/cli-1.0.9-s6nk6s0k.mjs +2 -0
  222. package/dist/chunks/cli-1.0.9-sbbswdzj.mjs +2 -0
  223. package/dist/chunks/cli-1.0.9-sbm5c6f2.mjs +2 -0
  224. package/dist/chunks/cli-1.0.9-sjqe138z.mjs +16 -0
  225. package/dist/chunks/cli-1.0.9-sx5z6m5d.mjs +24 -0
  226. package/dist/chunks/cli-1.0.9-t4qshvc1.mjs +12 -0
  227. package/dist/chunks/cli-1.0.9-t80qhn8j.mjs +8 -0
  228. package/dist/chunks/cli-1.0.9-t8c5khak.mjs +2 -0
  229. package/dist/chunks/cli-1.0.9-tbzbnv01.mjs +2 -0
  230. package/dist/chunks/cli-1.0.9-tcn5dpwj.mjs +6 -0
  231. package/dist/chunks/cli-1.0.9-tcszykvk.mjs +2 -0
  232. package/dist/chunks/cli-1.0.9-th90br16.mjs +2 -0
  233. package/dist/chunks/cli-1.0.9-tkk94r4t.mjs +4 -0
  234. package/dist/chunks/cli-1.0.9-tv64yqec.mjs +2 -0
  235. package/dist/chunks/cli-1.0.9-tzke31bj.mjs +12 -0
  236. package/dist/chunks/cli-1.0.9-v1ymh1ej.mjs +7 -0
  237. package/dist/chunks/cli-1.0.9-v770djrd.mjs +2 -0
  238. package/dist/chunks/cli-1.0.9-vcf21zvy.mjs +2 -0
  239. package/dist/chunks/cli-1.0.9-vhcxraj8.mjs +2 -0
  240. package/dist/chunks/cli-1.0.9-vvwt9bfb.mjs +2 -0
  241. package/dist/chunks/cli-1.0.9-w1yvav1x.mjs +2 -0
  242. package/dist/chunks/cli-1.0.9-w5dyqxqk.mjs +2 -0
  243. package/dist/chunks/cli-1.0.9-wcm9r8rn.mjs +2 -0
  244. package/dist/chunks/cli-1.0.9-wk087awy.mjs +2 -0
  245. package/dist/chunks/cli-1.0.9-wm0q00hf.mjs +3 -0
  246. package/dist/chunks/cli-1.0.9-wny75xk9.mjs +2 -0
  247. package/dist/chunks/cli-1.0.9-x06kapeh.mjs +2 -0
  248. package/dist/chunks/cli-1.0.9-x3vqg6qp.mjs +2 -0
  249. package/dist/chunks/cli-1.0.9-x4t4nqd2.mjs +4 -0
  250. package/dist/chunks/cli-1.0.9-x4tngp24.mjs +5 -0
  251. package/dist/chunks/cli-1.0.9-x8ty0z67.mjs +12 -0
  252. package/dist/chunks/cli-1.0.9-xd6wrh53.mjs +2 -0
  253. package/dist/chunks/cli-1.0.9-xe8dc6qb.mjs +2 -0
  254. package/dist/chunks/cli-1.0.9-xtwh19d1.mjs +1 -0
  255. package/dist/chunks/cli-1.0.9-xx44tx6h.mjs +2 -0
  256. package/dist/chunks/cli-1.0.9-xyzdk3z1.mjs +2 -0
  257. package/dist/chunks/cli-1.0.9-y0zax3d9.mjs +2 -0
  258. package/dist/chunks/cli-1.0.9-y1db6cvh.mjs +2 -0
  259. package/dist/chunks/cli-1.0.9-y7sdjd9n.mjs +2 -0
  260. package/dist/chunks/cli-1.0.9-ymbxfv5d.mjs +6 -0
  261. package/dist/chunks/cli-1.0.9-ympvk0av.mjs +6 -0
  262. package/dist/chunks/cli-1.0.9-z8ywz3b3.mjs +3 -0
  263. package/dist/chunks/cli-1.0.9-z9a1abx1.mjs +15 -0
  264. package/dist/chunks/cli-1.0.9-zd316ka9.mjs +2 -0
  265. package/dist/chunks/cli-1.0.9-zqr8aygv.mjs +2 -0
  266. package/dist/chunks/cli-1.0.9-zrphfr1b.mjs +4 -0
  267. package/dist/chunks/client-1.0.9-6ytq8zpq.mjs +1 -0
  268. package/dist/chunks/color-1.0.9-6fzgjvkk.mjs +1 -0
  269. package/dist/chunks/compact-1.0.9-zezrh8xr.mjs +3 -0
  270. package/dist/chunks/config-1.0.9-wvjbx4ke.mjs +1 -0
  271. package/dist/chunks/config-1.0.9-wvne91f5.mjs +1 -0
  272. package/dist/chunks/constants-1.0.9-2fzrexcb.mjs +1 -0
  273. package/dist/chunks/context-1.0.9-ygv4e0ng.mjs +1 -0
  274. package/dist/chunks/context-noninteractive-1.0.9-jn0d4nj0.mjs +1 -0
  275. package/dist/chunks/conversation-1.0.9-gg4v7nyy.mjs +1 -0
  276. package/dist/chunks/copilotHeaders-1.0.9-eyzv69et.mjs +1 -0
  277. package/dist/chunks/copy-1.0.9-1spbc1fd.mjs +9 -0
  278. package/dist/chunks/cost-1.0.9-axf868g8.mjs +1 -0
  279. package/dist/chunks/createSSHSession-1.0.9-zp88fdrv.mjs +1 -0
  280. package/dist/chunks/createSession-1.0.9-6xv9ygwy.mjs +1 -0
  281. package/dist/chunks/debug-1.0.9-j00wf57e.mjs +1 -0
  282. package/dist/chunks/defaultActionDeps-1.0.9-yzqemm6t.mjs +1446 -0
  283. package/dist/chunks/desktop-1.0.9-zq6w2b8s.mjs +1 -0
  284. package/dist/chunks/detectRepository-1.0.9-mjzbbps4.mjs +1 -0
  285. package/dist/chunks/detection-1.0.9-yjvmg8pn.mjs +1 -0
  286. package/dist/chunks/diff-1.0.9-68dbevx4.mjs +1 -0
  287. package/dist/chunks/doctor-1.0.9-xgwzb4yw.mjs +1 -0
  288. package/dist/chunks/doctorDiagnostic-1.0.9-p8be86qt.mjs +1 -0
  289. package/dist/chunks/earlyInput-1.0.9-a7f6p18j.mjs +1 -0
  290. package/dist/chunks/effort-1.0.9-zv46qr82.mjs +10 -0
  291. package/dist/chunks/engine-1.0.9-zm715gn8.mjs +1 -0
  292. package/dist/chunks/envLessBridgeConfig-1.0.9-pbgxdbt9.mjs +1 -0
  293. package/dist/chunks/envUtils-1.0.9-jvdj5nsn.mjs +1 -0
  294. package/dist/chunks/environmentSelection-1.0.9-32y4kxzx.mjs +1 -0
  295. package/dist/chunks/environments-1.0.9-rapbbhdb.mjs +1 -0
  296. package/dist/chunks/errors-1.0.9-mr00r6m7.mjs +1 -0
  297. package/dist/chunks/exampleCommands-1.0.9-d9kwjybb.mjs +1 -0
  298. package/dist/chunks/execFileNoThrow-1.0.9-17y7nf7n.mjs +1 -0
  299. package/dist/chunks/exit-1.0.9-a8dgmc5m.mjs +1 -0
  300. package/dist/chunks/explorer-1.0.9-rr21y6bg.mjs +1 -0
  301. package/dist/chunks/export-1.0.9-m63465sz.mjs +2 -0
  302. package/dist/chunks/extra-usage-1.0.9-jyvmfa3x.mjs +1 -0
  303. package/dist/chunks/extra-usage-noninteractive-1.0.9-jr4xqktt.mjs +1 -0
  304. package/dist/chunks/fast-1.0.9-944nf8hg.mjs +1 -0
  305. package/dist/chunks/feedback-1.0.9-c6qydbzp.mjs +14 -0
  306. package/dist/chunks/firstPartyEventLogger-1.0.9-25ey9wf6.mjs +1 -0
  307. package/dist/chunks/git-1.0.9-se8gx0p4.mjs +1 -0
  308. package/dist/chunks/githubModelsCredentials-1.0.9-14n5qqvf.mjs +1 -0
  309. package/dist/chunks/goal-1.0.9-v5bwyvtb.mjs +4 -0
  310. package/dist/chunks/grove-1.0.9-twka7z5j.mjs +1 -0
  311. package/dist/chunks/growthbook-1.0.9-mghtxr31.mjs +1 -0
  312. package/dist/chunks/headless-1.0.9-m319gz5s.mjs +2 -0
  313. package/dist/chunks/heapdump-1.0.9-zk05f03w.mjs +6 -0
  314. package/dist/chunks/help-1.0.9-fjdspdd3.mjs +1 -0
  315. package/dist/chunks/hookChains-1.0.9-1p47yp2s.mjs +3 -0
  316. package/dist/chunks/hooks-1.0.9-gsae7evr.mjs +79 -0
  317. package/dist/chunks/hooks-1.0.9-ryra9j7e.mjs +1 -0
  318. package/dist/chunks/ide-1.0.9-5xk8pvc3.mjs +3 -0
  319. package/dist/chunks/image-processor-napi-1.0.9-m8xt10vv.mjs +1 -0
  320. package/dist/chunks/inboundAttachments-1.0.9-tv4b8ex4.mjs +1 -0
  321. package/dist/chunks/index-1.0.9-0mep6p2e.mjs +1 -0
  322. package/dist/chunks/index-1.0.9-41fkayp7.mjs +1 -0
  323. package/dist/chunks/index-1.0.9-4kgb526x.mjs +1 -0
  324. package/dist/chunks/index-1.0.9-6yrhew13.mjs +17 -0
  325. package/dist/chunks/index-1.0.9-90m3hak5.mjs +1 -0
  326. package/dist/chunks/index-1.0.9-93jbt8ts.mjs +1 -0
  327. package/dist/chunks/index-1.0.9-9ryfj4pb.mjs +1 -0
  328. package/dist/chunks/index-1.0.9-cq06g7a0.mjs +1 -0
  329. package/dist/chunks/index-1.0.9-f7brqkkr.mjs +1 -0
  330. package/dist/chunks/index-1.0.9-hvkdhsta.mjs +1 -0
  331. package/dist/chunks/index-1.0.9-jk2fhj8t.mjs +9 -0
  332. package/dist/chunks/index-1.0.9-kcnhr8fy.mjs +2 -0
  333. package/dist/chunks/index-1.0.9-kgymjzxf.mjs +1 -0
  334. package/dist/chunks/index-1.0.9-n9ganzdc.mjs +1 -0
  335. package/dist/chunks/index-1.0.9-p2kz6wm8.mjs +2 -0
  336. package/dist/chunks/index-1.0.9-q3kvfren.mjs +1 -0
  337. package/dist/chunks/index-1.0.9-qvjyptep.mjs +30 -0
  338. package/dist/chunks/index-1.0.9-sy14c383.mjs +1 -0
  339. package/dist/chunks/index-1.0.9-w84j6099.mjs +9 -0
  340. package/dist/chunks/index-1.0.9-xfjgkms3.mjs +1 -0
  341. package/dist/chunks/index-1.0.9-ystczwgk.mjs +1 -0
  342. package/dist/chunks/index-1.0.9-ythrtswh.mjs +5 -0
  343. package/dist/chunks/index-1.0.9-ytvws96r.mjs +1 -0
  344. package/dist/chunks/init-1.0.9-dk6ce4ec.mjs +1 -0
  345. package/dist/chunks/initReplBridge-1.0.9-xyxharkg.mjs +1 -0
  346. package/dist/chunks/ink-1.0.9-sj61qpy1.mjs +1 -0
  347. package/dist/chunks/insights-1.0.9-kc18bxsj.mjs +870 -0
  348. package/dist/chunks/install-1.0.9-41n1cava.mjs +1 -0
  349. package/dist/chunks/install-github-app-1.0.9-d0jrca5q.mjs +149 -0
  350. package/dist/chunks/install-slack-app-1.0.9-sgvf9xhe.mjs +1 -0
  351. package/dist/chunks/instrumentation-1.0.9-k55h305p.mjs +1 -0
  352. package/dist/chunks/interactiveHelpers-1.0.9-edx0pwv2.mjs +1 -0
  353. package/dist/chunks/keybindings-1.0.9-3j7rmqad.mjs +2 -0
  354. package/dist/chunks/knowledge-1.0.9-a0yrjtaw.mjs +2 -0
  355. package/dist/chunks/latestVersionCache-1.0.9-vaxbjn5a.mjs +1 -0
  356. package/dist/chunks/loadAgentsDir-1.0.9-5v5xmfae.mjs +1 -0
  357. package/dist/chunks/loadPluginHooks-1.0.9-jkz1yssz.mjs +1 -0
  358. package/dist/chunks/loadPluginHooks-1.0.9-ymdjzq3r.mjs +1 -0
  359. package/dist/chunks/log-1.0.9-zkpyqa3m.mjs +1 -0
  360. package/dist/chunks/main-1.0.9-h2389xyv.mjs +1 -0
  361. package/dist/chunks/managedEnv-1.0.9-m1nbgm9w.mjs +1 -0
  362. package/dist/chunks/mcp-1.0.9-0pffb151.mjs +4 -0
  363. package/dist/chunks/mcp-1.0.9-7te57n7g.mjs +1 -0
  364. package/dist/chunks/mcp-1.0.9-zx01gh7r.mjs +17 -0
  365. package/dist/chunks/mcpb-1.0.9-01pgh57h.mjs +1 -0
  366. package/dist/chunks/memory-1.0.9-t9n2z13b.mjs +3 -0
  367. package/dist/chunks/model-1.0.9-a1hweteq.mjs +1 -0
  368. package/dist/chunks/model-1.0.9-jpjmt8a2.mjs +2 -0
  369. package/dist/chunks/node-1.0.9-p2k460a4.mjs +12 -0
  370. package/dist/chunks/oauth-1.0.9-zjepvezc.mjs +1 -0
  371. package/dist/chunks/openaiShim-1.0.9-gapf03nh.mjs +14 -0
  372. package/dist/chunks/output-style-1.0.9-ssjrzh6q.mjs +1 -0
  373. package/dist/chunks/package-ZZWOLTXM-1.0.9-z6aewhjx.mjs +1 -0
  374. package/dist/chunks/parseConnectUrl-1.0.9-7gq7343s.mjs +1 -0
  375. package/dist/chunks/parser-1.0.9-pke5bjkh.mjs +1 -0
  376. package/dist/chunks/passes-1.0.9-r3ydzpyv.mjs +1 -0
  377. package/dist/chunks/permissions-1.0.9-97jpkg18.mjs +1 -0
  378. package/dist/chunks/permissions-1.0.9-c4jx0pxn.mjs +3 -0
  379. package/dist/chunks/plan-1.0.9-z3j9hsww.mjs +1 -0
  380. package/dist/chunks/plist-1.0.9-2acqr7kv.mjs +1 -0
  381. package/dist/chunks/plugin-1.0.9-z1m6zzew.mjs +29 -0
  382. package/dist/chunks/pluginStartupCheck-1.0.9-41sskjk2.mjs +1 -0
  383. package/dist/chunks/plugins-1.0.9-6tptm5qm.mjs +9 -0
  384. package/dist/chunks/preActionHook-1.0.9-wecvzns1.mjs +2 -0
  385. package/dist/chunks/print-1.0.9-dqymva6x.mjs +57 -0
  386. package/dist/chunks/privacy-settings-1.0.9-zyecjx4p.mjs +1 -0
  387. package/dist/chunks/process-1.0.9-2w0fkryd.mjs +1 -0
  388. package/dist/chunks/processBashCommand-1.0.9-4s05h1bj.mjs +1 -0
  389. package/dist/chunks/processSlashCommand-1.0.9-5tvxytqm.mjs +9 -0
  390. package/dist/chunks/prompt-1.0.9-nb76g2sv.mjs +1 -0
  391. package/dist/chunks/prompt-1.0.9-va3886b6.mjs +1 -0
  392. package/dist/chunks/prompts-1.0.9-m9dxdech.mjs +1 -0
  393. package/dist/chunks/protocolHandler-1.0.9-xnnv5p87.mjs +13 -0
  394. package/dist/chunks/provider-1.0.9-cvmd8h1d.mjs +2 -0
  395. package/dist/chunks/providerProfiles-1.0.9-9g0pwem4.mjs +1 -0
  396. package/dist/chunks/providerValidation-1.0.9-3rgdk5ee.mjs +6 -0
  397. package/dist/chunks/rate-limit-options-1.0.9-vk9xmrr9.mjs +1 -0
  398. package/dist/chunks/registerSubcommands-1.0.9-5jz3t4qr.mjs +34 -0
  399. package/dist/chunks/registry-1.0.9-9mvkaffy.mjs +1 -0
  400. package/dist/chunks/release-notes-1.0.9-6r7p97mn.mjs +5 -0
  401. package/dist/chunks/reload-plugins-1.0.9-xdhvgqpn.mjs +2 -0
  402. package/dist/chunks/remote-env-1.0.9-9htaxz0y.mjs +1 -0
  403. package/dist/chunks/remoteBridgeCore-1.0.9-xgvn82tp.mjs +1 -0
  404. package/dist/chunks/remoteSession-1.0.9-7s48fkf7.mjs +1 -0
  405. package/dist/chunks/rename-1.0.9-j3rs23m1.mjs +1 -0
  406. package/dist/chunks/replBridgeHandle-1.0.9-f67nzh9x.mjs +1 -0
  407. package/dist/chunks/replLauncher-1.0.9-gxjrsm7t.mjs +1 -0
  408. package/dist/chunks/resume-1.0.9-9f2xh9ad.mjs +2 -0
  409. package/dist/chunks/rewind-1.0.9-2tjbaa5s.mjs +1 -0
  410. package/dist/chunks/rootOptions-1.0.9-s35d4dq8.mjs +1 -0
  411. package/dist/chunks/runWorkflowHeadless-1.0.9-qzevh0jq.mjs +10 -0
  412. package/dist/chunks/sandbox-adapter-1.0.9-7vzjdzm5.mjs +1 -0
  413. package/dist/chunks/sandbox-toggle-1.0.9-q22mn3qe.mjs +1 -0
  414. package/dist/chunks/session-1.0.9-hnswn4q3.mjs +2 -0
  415. package/dist/chunks/sessionDiscovery-1.0.9-ap3h87gt.mjs +1 -0
  416. package/dist/chunks/sessionFileAccessHooks-1.0.9-266mnj7x.mjs +1 -0
  417. package/dist/chunks/sessionStorage-1.0.9-kdgvfddk.mjs +1 -0
  418. package/dist/chunks/settings-1.0.9-1avp22jd.mjs +1 -0
  419. package/dist/chunks/setup-1.0.9-v2ar4w15.mjs +5 -0
  420. package/dist/chunks/sinks-1.0.9-03y6p189.mjs +1 -0
  421. package/dist/chunks/skills-1.0.9-7m3bv7w4.mjs +1 -0
  422. package/dist/chunks/startupProfiler-1.0.9-3pbpjpsx.mjs +1 -0
  423. package/dist/chunks/startupUpdateCheck-1.0.9-r287g8qr.mjs +1 -0
  424. package/dist/chunks/state-1.0.9-5vj2cfb7.mjs +1 -0
  425. package/dist/chunks/stats-1.0.9-5wpymg6m.mjs +6 -0
  426. package/dist/chunks/status-1.0.9-zcea5prt.mjs +1 -0
  427. package/dist/chunks/stickers-1.0.9-01r7j7ce.mjs +1 -0
  428. package/dist/chunks/subprocessEnv-1.0.9-mknwnjve.mjs +1 -0
  429. package/dist/chunks/tasks-1.0.9-cenyj69d.mjs +1 -0
  430. package/dist/chunks/teamHelpers-1.0.9-7hr689j5.mjs +1 -0
  431. package/dist/chunks/teammateModeSnapshot-1.0.9-r6bjthhg.mjs +1 -0
  432. package/dist/chunks/teleport-1.0.9-3a8fh64n.mjs +1 -0
  433. package/dist/chunks/terminalSetup-1.0.9-dbp1dey3.mjs +1 -0
  434. package/dist/chunks/theme-1.0.9-he0pz8e5.mjs +1 -0
  435. package/dist/chunks/thinkback-1.0.9-taf9vg12.mjs +1 -0
  436. package/dist/chunks/thinkback-play-1.0.9-11em8wf4.mjs +1 -0
  437. package/dist/chunks/toolPool-1.0.9-r3vtdta9.mjs +1 -0
  438. package/dist/chunks/toolSearch-1.0.9-kwvr4k8b.mjs +1 -0
  439. package/dist/chunks/tools-1.0.9-2tg8nvhb.mjs +1 -0
  440. package/dist/chunks/trustedDevice-1.0.9-0q7ygrn2.mjs +1 -0
  441. package/dist/chunks/turndown.cjs-1.0.9-579kp1mn.mjs +69 -0
  442. package/dist/chunks/types-1.0.9-8q18d5tt.mjs +1 -0
  443. package/dist/chunks/ultrareviewCommand-1.0.9-9ejdt7py.mjs +4 -0
  444. package/dist/chunks/update-1.0.9-85n1z4v4.mjs +88 -0
  445. package/dist/chunks/upgrade-1.0.9-7q7cawa0.mjs +1 -0
  446. package/dist/chunks/upload-1.0.9-51kq9qt0.mjs +7 -0
  447. package/dist/chunks/upstreamproxy-1.0.9-59ykzeyj.mjs +14 -0
  448. package/dist/chunks/url-handler-napi-1.0.9-x7vgzkpg.mjs +1 -0
  449. package/dist/chunks/usage-1.0.9-z798edp5.mjs +1 -0
  450. package/dist/chunks/util-1.0.9-7kephmmr.mjs +1 -0
  451. package/dist/chunks/utils-1.0.9-ek4v8a00.mjs +1 -0
  452. package/dist/chunks/vim-1.0.9-kj0qj8nh.mjs +1 -0
  453. package/dist/chunks/watchLoop-1.0.9-r1awam6x.mjs +13 -0
  454. package/dist/chunks/watcher-1.0.9-9j8zqhdf.mjs +1 -0
  455. package/dist/chunks/wiki-1.0.9-w9wz311p.mjs +132 -0
  456. package/dist/chunks/workflows-1.0.9-9bwm4jqm.mjs +1 -0
  457. package/dist/chunks/worktree-1.0.9-wnbd6zc9.mjs +1 -0
  458. package/dist/chunks/worktreeModeEnabled-1.0.9-wjt137fb.mjs +1 -0
  459. package/dist/chunks/wrapper-1.0.9-dykv81xe.mjs +7 -0
  460. package/dist/cli.mjs +2 -2
  461. package/dist/help-workflow.txt +12 -0
  462. package/dist/help.txt +1 -0
  463. package/package.json +9 -9
  464. package/dist/chunks/AgentTool-1.0.8-eje3a59q.mjs +0 -1
  465. package/dist/chunks/App-1.0.8-d2xvppcs.mjs +0 -1
  466. package/dist/chunks/ApproveApiKey-1.0.8-46gxh8v1.mjs +0 -1
  467. package/dist/chunks/AssistantSessionChooser-1.0.8-14hqa3x1.mjs +0 -1
  468. package/dist/chunks/AutoModeOptInDialog-1.0.8-wbj2exgg.mjs +0 -1
  469. package/dist/chunks/BypassPermissionsModeDialog-1.0.8-qw286z98.mjs +0 -1
  470. package/dist/chunks/ClaudeMdExternalIncludesDialog-1.0.8-d7f3p2f2.mjs +0 -1
  471. package/dist/chunks/ConsoleOAuthFlow-1.0.8-pz9144b6.mjs +0 -1
  472. package/dist/chunks/DiffDialog-1.0.8-kekremjy.mjs +0 -7
  473. package/dist/chunks/Doctor-1.0.8-y6yd83ya.mjs +0 -1
  474. package/dist/chunks/ExplorerDialog-1.0.8-sde0qmj8.mjs +0 -6
  475. package/dist/chunks/Grove-1.0.8-vaqh13j1.mjs +0 -1
  476. package/dist/chunks/ITermBackend-1.0.8-pyx0hrdr.mjs +0 -1
  477. package/dist/chunks/InvalidConfigDialog-1.0.8-9xkjpkdq.mjs +0 -1
  478. package/dist/chunks/InvalidSettingsDialog-1.0.8-sg0zxdxs.mjs +0 -1
  479. package/dist/chunks/MigrationDialog-1.0.8-sa3w4fkf.mjs +0 -1
  480. package/dist/chunks/Onboarding-1.0.8-j2grnf78.mjs +0 -1
  481. package/dist/chunks/ProviderManager-1.0.8-rhr4npaj.mjs +0 -1
  482. package/dist/chunks/REPL-1.0.8-r0frprp1.mjs +0 -1
  483. package/dist/chunks/ResumeConversation-1.0.8-y8q8w4g5.mjs +0 -1
  484. package/dist/chunks/SnapshotUpdateDialog-1.0.8-6r0afvcw.mjs +0 -1
  485. package/dist/chunks/TeleportProgress-1.0.8-8k0msa15.mjs +0 -1
  486. package/dist/chunks/TeleportRepoMismatchDialog-1.0.8-3y1gzb63.mjs +0 -1
  487. package/dist/chunks/TeleportResumeWrapper-1.0.8-sr835vjm.mjs +0 -1
  488. package/dist/chunks/TmuxBackend-1.0.8-j4ewgs24.mjs +0 -9
  489. package/dist/chunks/ToolSearchTool-1.0.8-g3jtn9j5.mjs +0 -1
  490. package/dist/chunks/TrustDialog-1.0.8-6fmeeyg3.mjs +0 -1
  491. package/dist/chunks/activeProvider-1.0.8-07gr4v39.mjs +0 -1
  492. package/dist/chunks/add-dir-1.0.8-zp69mch9.mjs +0 -1
  493. package/dist/chunks/agentTypes-1.0.8-0tz8xbhq.mjs +0 -1
  494. package/dist/chunks/agents-1.0.8-7b7qbe1b.mjs +0 -3
  495. package/dist/chunks/agents-1.0.8-hcpq0qtv.mjs +0 -110
  496. package/dist/chunks/api-1.0.8-99jqr2rt.mjs +0 -1
  497. package/dist/chunks/asciicast-1.0.8-hdy3b2tb.mjs +0 -1
  498. package/dist/chunks/assistant-1.0.8-wf6vgaxz.mjs +0 -1
  499. package/dist/chunks/auth-1.0.8-by49xah8.mjs +0 -1
  500. package/dist/chunks/auth-1.0.8-jhga5hc5.mjs +0 -1
  501. package/dist/chunks/autoMode-1.0.8-9hknbsrn.mjs +0 -48
  502. package/dist/chunks/autoUpdater-1.0.8-n0axyces.mjs +0 -1
  503. package/dist/chunks/backgroundHousekeeping-1.0.8-tthnkm6t.mjs +0 -1
  504. package/dist/chunks/branch-1.0.8-v0vyzjd1.mjs +0 -4
  505. package/dist/chunks/bridge-1.0.8-9em7eyw2.mjs +0 -2
  506. package/dist/chunks/bridgeConfig-1.0.8-rc3gw5mw.mjs +0 -1
  507. package/dist/chunks/bridgeEnabled-1.0.8-mmzmxjzj.mjs +0 -1
  508. package/dist/chunks/bridgeMain-1.0.8-kys2mqca.mjs +0 -88
  509. package/dist/chunks/bridgePointer-1.0.8-ky397f5d.mjs +0 -1
  510. package/dist/chunks/btw-1.0.8-ppch37et.mjs +0 -1
  511. package/dist/chunks/buddy-1.0.8-3j0jmxqv.mjs +0 -3
  512. package/dist/chunks/cacache-1.0.8-npx6886e.mjs +0 -1
  513. package/dist/chunks/cache-probe-1.0.8-q0q9v06f.mjs +0 -21
  514. package/dist/chunks/cacheStats-1.0.8-8g3sbes5.mjs +0 -4
  515. package/dist/chunks/caches-1.0.8-c44ykbdq.mjs +0 -1
  516. package/dist/chunks/claudeDesktop-1.0.8-3718a4er.mjs +0 -1
  517. package/dist/chunks/claudemd-1.0.8-mrm97672.mjs +0 -1
  518. package/dist/chunks/clear-1.0.8-60s1dmkm.mjs +0 -1
  519. package/dist/chunks/clearTerminal-1.0.8-s7tt8cvq.mjs +0 -1
  520. package/dist/chunks/cli-1.0.8-0g25h6r5.mjs +0 -3
  521. package/dist/chunks/cli-1.0.8-0j3a18cb.mjs +0 -2
  522. package/dist/chunks/cli-1.0.8-0w29g9sk.mjs +0 -4
  523. package/dist/chunks/cli-1.0.8-1r6dnkqd.mjs +0 -45
  524. package/dist/chunks/cli-1.0.8-1ss6x3zt.mjs +0 -2
  525. package/dist/chunks/cli-1.0.8-1tmgp7jd.mjs +0 -2
  526. package/dist/chunks/cli-1.0.8-2tcfa3h7.mjs +0 -26
  527. package/dist/chunks/cli-1.0.8-2tqdqypv.mjs +0 -2
  528. package/dist/chunks/cli-1.0.8-2tz4jekt.mjs +0 -2
  529. package/dist/chunks/cli-1.0.8-2vmb9a3w.mjs +0 -2
  530. package/dist/chunks/cli-1.0.8-2yyas23w.mjs +0 -2
  531. package/dist/chunks/cli-1.0.8-330tdbma.mjs +0 -2
  532. package/dist/chunks/cli-1.0.8-34678988.mjs +0 -2
  533. package/dist/chunks/cli-1.0.8-3cz8c904.mjs +0 -2
  534. package/dist/chunks/cli-1.0.8-3j90qb52.mjs +0 -2
  535. package/dist/chunks/cli-1.0.8-3tw1xf7y.mjs +0 -2
  536. package/dist/chunks/cli-1.0.8-3vh4nftm.mjs +0 -7
  537. package/dist/chunks/cli-1.0.8-3w4np76x.mjs +0 -2
  538. package/dist/chunks/cli-1.0.8-45e9fjb4.mjs +0 -21
  539. package/dist/chunks/cli-1.0.8-4a1exx1w.mjs +0 -2
  540. package/dist/chunks/cli-1.0.8-4vzmdadp.mjs +0 -2
  541. package/dist/chunks/cli-1.0.8-4wgaqcjn.mjs +0 -42
  542. package/dist/chunks/cli-1.0.8-53cy4zte.mjs +0 -34
  543. package/dist/chunks/cli-1.0.8-592dqckn.mjs +0 -12
  544. package/dist/chunks/cli-1.0.8-5awx1w8e.mjs +0 -25
  545. package/dist/chunks/cli-1.0.8-5dyqgt8m.mjs +0 -15
  546. package/dist/chunks/cli-1.0.8-5gn5a7p3.mjs +0 -2
  547. package/dist/chunks/cli-1.0.8-5mzwqxg2.mjs +0 -5
  548. package/dist/chunks/cli-1.0.8-5r4z4nzj.mjs +0 -9
  549. package/dist/chunks/cli-1.0.8-5wfqemy1.mjs +0 -17
  550. package/dist/chunks/cli-1.0.8-5wwge1jc.mjs +0 -3
  551. package/dist/chunks/cli-1.0.8-628ypgq9.mjs +0 -4
  552. package/dist/chunks/cli-1.0.8-63tfdt8q.mjs +0 -2
  553. package/dist/chunks/cli-1.0.8-693zfwne.mjs +0 -2
  554. package/dist/chunks/cli-1.0.8-6fz5dc6p.mjs +0 -2
  555. package/dist/chunks/cli-1.0.8-6hge9cq0.mjs +0 -2
  556. package/dist/chunks/cli-1.0.8-6q1p5cvf.mjs +0 -2
  557. package/dist/chunks/cli-1.0.8-74y9exyb.mjs +0 -2
  558. package/dist/chunks/cli-1.0.8-74zbkhyt.mjs +0 -67
  559. package/dist/chunks/cli-1.0.8-75t3aews.mjs +0 -2
  560. package/dist/chunks/cli-1.0.8-75ta9404.mjs +0 -2
  561. package/dist/chunks/cli-1.0.8-7b6c3csb.mjs +0 -2
  562. package/dist/chunks/cli-1.0.8-7khq3d03.mjs +0 -2
  563. package/dist/chunks/cli-1.0.8-7p8001bq.mjs +0 -2
  564. package/dist/chunks/cli-1.0.8-7tm0v9g4.mjs +0 -2
  565. package/dist/chunks/cli-1.0.8-845srnq2.mjs +0 -2
  566. package/dist/chunks/cli-1.0.8-8aa4g8k7.mjs +0 -9
  567. package/dist/chunks/cli-1.0.8-8bymhd85.mjs +0 -2
  568. package/dist/chunks/cli-1.0.8-8d0pym8n.mjs +0 -4
  569. package/dist/chunks/cli-1.0.8-8eace15k.mjs +0 -2
  570. package/dist/chunks/cli-1.0.8-8f8079r1.mjs +0 -2
  571. package/dist/chunks/cli-1.0.8-8g4cyspe.mjs +0 -2
  572. package/dist/chunks/cli-1.0.8-9az1bj5r.mjs +0 -2
  573. package/dist/chunks/cli-1.0.8-9cg23m77.mjs +0 -2
  574. package/dist/chunks/cli-1.0.8-9d98s5n7.mjs +0 -2
  575. package/dist/chunks/cli-1.0.8-9e91trv9.mjs +0 -4
  576. package/dist/chunks/cli-1.0.8-9fsgsfsr.mjs +0 -2
  577. package/dist/chunks/cli-1.0.8-9kjmxaz9.mjs +0 -2
  578. package/dist/chunks/cli-1.0.8-9ten5rvg.mjs +0 -3
  579. package/dist/chunks/cli-1.0.8-9y02shjc.mjs +0 -6
  580. package/dist/chunks/cli-1.0.8-a227an7n.mjs +0 -4
  581. package/dist/chunks/cli-1.0.8-a5h5dhvb.mjs +0 -2
  582. package/dist/chunks/cli-1.0.8-a95nzf63.mjs +0 -3
  583. package/dist/chunks/cli-1.0.8-aac9erft.mjs +0 -18
  584. package/dist/chunks/cli-1.0.8-abdc5b5p.mjs +0 -12
  585. package/dist/chunks/cli-1.0.8-acrtv429.mjs +0 -2
  586. package/dist/chunks/cli-1.0.8-ah0px9dq.mjs +0 -2
  587. package/dist/chunks/cli-1.0.8-apm2cwth.mjs +0 -2
  588. package/dist/chunks/cli-1.0.8-b1a558ty.mjs +0 -2
  589. package/dist/chunks/cli-1.0.8-b3rgrfhx.mjs +0 -2
  590. package/dist/chunks/cli-1.0.8-bce7mfng.mjs +0 -2
  591. package/dist/chunks/cli-1.0.8-bf89pdxw.mjs +0 -3
  592. package/dist/chunks/cli-1.0.8-by017547.mjs +0 -2
  593. package/dist/chunks/cli-1.0.8-c1m2f995.mjs +0 -2
  594. package/dist/chunks/cli-1.0.8-ch5nmk6z.mjs +0 -6
  595. package/dist/chunks/cli-1.0.8-ckzwfn2p.mjs +0 -2
  596. package/dist/chunks/cli-1.0.8-cnp4f1p9.mjs +0 -2
  597. package/dist/chunks/cli-1.0.8-cvanywgv.mjs +0 -4
  598. package/dist/chunks/cli-1.0.8-czw324tt.mjs +0 -2
  599. package/dist/chunks/cli-1.0.8-djnb6kg8.mjs +0 -2
  600. package/dist/chunks/cli-1.0.8-dnyn56hh.mjs +0 -2
  601. package/dist/chunks/cli-1.0.8-dtv7cx85.mjs +0 -2
  602. package/dist/chunks/cli-1.0.8-e1je8bbg.mjs +0 -2
  603. package/dist/chunks/cli-1.0.8-e1rqh3t5.mjs +0 -6
  604. package/dist/chunks/cli-1.0.8-e226v5zv.mjs +0 -2
  605. package/dist/chunks/cli-1.0.8-ebmqnhat.mjs +0 -2
  606. package/dist/chunks/cli-1.0.8-ecej8h97.mjs +0 -2
  607. package/dist/chunks/cli-1.0.8-eqnts1fr.mjs +0 -8
  608. package/dist/chunks/cli-1.0.8-erf5fgz4.mjs +0 -133
  609. package/dist/chunks/cli-1.0.8-erzw5831.mjs +0 -133
  610. package/dist/chunks/cli-1.0.8-evcjjrhq.mjs +0 -2
  611. package/dist/chunks/cli-1.0.8-ewrnp0r9.mjs +0 -2
  612. package/dist/chunks/cli-1.0.8-ezvghx0v.mjs +0 -2
  613. package/dist/chunks/cli-1.0.8-f149d1z0.mjs +0 -2
  614. package/dist/chunks/cli-1.0.8-f46gq37z.mjs +0 -2
  615. package/dist/chunks/cli-1.0.8-fch83jc9.mjs +0 -2
  616. package/dist/chunks/cli-1.0.8-fmf0f85n.mjs +0 -2
  617. package/dist/chunks/cli-1.0.8-fnnr43c2.mjs +0 -2
  618. package/dist/chunks/cli-1.0.8-fnwydrx1.mjs +0 -3
  619. package/dist/chunks/cli-1.0.8-frbc2pan.mjs +0 -2
  620. package/dist/chunks/cli-1.0.8-fs06q8cs.mjs +0 -2
  621. package/dist/chunks/cli-1.0.8-g2934g2e.mjs +0 -2
  622. package/dist/chunks/cli-1.0.8-g8tpbbvt.mjs +0 -3
  623. package/dist/chunks/cli-1.0.8-g9h4ay1q.mjs +0 -2
  624. package/dist/chunks/cli-1.0.8-gmf61bcb.mjs +0 -2
  625. package/dist/chunks/cli-1.0.8-gsr9wqaw.mjs +0 -39
  626. package/dist/chunks/cli-1.0.8-gv80trp6.mjs +0 -2
  627. package/dist/chunks/cli-1.0.8-h44d6jh3.mjs +0 -2
  628. package/dist/chunks/cli-1.0.8-hbgss955.mjs +0 -2
  629. package/dist/chunks/cli-1.0.8-hgreyqck.mjs +0 -2
  630. package/dist/chunks/cli-1.0.8-hkkcv1tv.mjs +0 -2
  631. package/dist/chunks/cli-1.0.8-htq95mje.mjs +0 -2
  632. package/dist/chunks/cli-1.0.8-hy7rca6f.mjs +0 -3
  633. package/dist/chunks/cli-1.0.8-jy0q2dkm.mjs +0 -2
  634. package/dist/chunks/cli-1.0.8-jy7hzejg.mjs +0 -2
  635. package/dist/chunks/cli-1.0.8-k7vkjf05.mjs +0 -2
  636. package/dist/chunks/cli-1.0.8-k90vtehz.mjs +0 -2
  637. package/dist/chunks/cli-1.0.8-ke76gxzw.mjs +0 -199
  638. package/dist/chunks/cli-1.0.8-kfv9esqs.mjs +0 -3
  639. package/dist/chunks/cli-1.0.8-kh51d8mn.mjs +0 -2
  640. package/dist/chunks/cli-1.0.8-kxhxnt9t.mjs +0 -2
  641. package/dist/chunks/cli-1.0.8-kzrdbzd1.mjs +0 -2
  642. package/dist/chunks/cli-1.0.8-kzyrncv0.mjs +0 -2
  643. package/dist/chunks/cli-1.0.8-m2w20tkx.mjs +0 -2
  644. package/dist/chunks/cli-1.0.8-m6fhqq8r.mjs +0 -2
  645. package/dist/chunks/cli-1.0.8-m9cg4s2e.mjs +0 -2
  646. package/dist/chunks/cli-1.0.8-mbhxente.mjs +0 -2
  647. package/dist/chunks/cli-1.0.8-mhhby5pn.mjs +0 -6
  648. package/dist/chunks/cli-1.0.8-mn87n778.mjs +0 -2
  649. package/dist/chunks/cli-1.0.8-mrepsey6.mjs +0 -12
  650. package/dist/chunks/cli-1.0.8-n2thtekm.mjs +0 -2
  651. package/dist/chunks/cli-1.0.8-n4rd5y17.mjs +0 -2
  652. package/dist/chunks/cli-1.0.8-nmrvp3xa.mjs +0 -2
  653. package/dist/chunks/cli-1.0.8-nyq2vcvp.mjs +0 -18
  654. package/dist/chunks/cli-1.0.8-p2tp1j0a.mjs +0 -2
  655. package/dist/chunks/cli-1.0.8-p4egaq4j.mjs +0 -5
  656. package/dist/chunks/cli-1.0.8-p8h84zc9.mjs +0 -3
  657. package/dist/chunks/cli-1.0.8-pbxke3zm.mjs +0 -24
  658. package/dist/chunks/cli-1.0.8-pemd6sje.mjs +0 -2
  659. package/dist/chunks/cli-1.0.8-pzesgrb2.mjs +0 -2
  660. package/dist/chunks/cli-1.0.8-q2myd223.mjs +0 -2
  661. package/dist/chunks/cli-1.0.8-q6x8n8kc.mjs +0 -2
  662. package/dist/chunks/cli-1.0.8-qbrw3wf3.mjs +0 -3
  663. package/dist/chunks/cli-1.0.8-qcf0zmve.mjs +0 -50
  664. package/dist/chunks/cli-1.0.8-qhcghw02.mjs +0 -2
  665. package/dist/chunks/cli-1.0.8-qjcxwb3c.mjs +0 -2
  666. package/dist/chunks/cli-1.0.8-qss5sph3.mjs +0 -59
  667. package/dist/chunks/cli-1.0.8-qzqze1a1.mjs +0 -2
  668. package/dist/chunks/cli-1.0.8-r3ecr05v.mjs +0 -2
  669. package/dist/chunks/cli-1.0.8-r4zbpasa.mjs +0 -24
  670. package/dist/chunks/cli-1.0.8-rdd0jr2h.mjs +0 -2
  671. package/dist/chunks/cli-1.0.8-rg1csg40.mjs +0 -2
  672. package/dist/chunks/cli-1.0.8-rh93fw0p.mjs +0 -2
  673. package/dist/chunks/cli-1.0.8-rna8rhza.mjs +0 -2
  674. package/dist/chunks/cli-1.0.8-rnkrr7ma.mjs +0 -2
  675. package/dist/chunks/cli-1.0.8-rxf0zjys.mjs +0 -2
  676. package/dist/chunks/cli-1.0.8-rxfx9v7j.mjs +0 -2
  677. package/dist/chunks/cli-1.0.8-s5kcxz2r.mjs +0 -4
  678. package/dist/chunks/cli-1.0.8-s6nsgb78.mjs +0 -2
  679. package/dist/chunks/cli-1.0.8-sbf6n56q.mjs +0 -2
  680. package/dist/chunks/cli-1.0.8-se674t5h.mjs +0 -4
  681. package/dist/chunks/cli-1.0.8-secda9xj.mjs +0 -2
  682. package/dist/chunks/cli-1.0.8-sqbaxhfc.mjs +0 -16
  683. package/dist/chunks/cli-1.0.8-swq5n54q.mjs +0 -2
  684. package/dist/chunks/cli-1.0.8-swts6q29.mjs +0 -2
  685. package/dist/chunks/cli-1.0.8-szvwf6r4.mjs +0 -2
  686. package/dist/chunks/cli-1.0.8-t5jg9csm.mjs +0 -2
  687. package/dist/chunks/cli-1.0.8-tdhxr84n.mjs +0 -3
  688. package/dist/chunks/cli-1.0.8-tfjhtagk.mjs +0 -2
  689. package/dist/chunks/cli-1.0.8-tpazbzcz.mjs +0 -2
  690. package/dist/chunks/cli-1.0.8-tq72b6bb.mjs +0 -2
  691. package/dist/chunks/cli-1.0.8-tqf6s7ht.mjs +0 -58
  692. package/dist/chunks/cli-1.0.8-tz68cg1p.mjs +0 -2
  693. package/dist/chunks/cli-1.0.8-v1rafynv.mjs +0 -2
  694. package/dist/chunks/cli-1.0.8-v75s19rg.mjs +0 -2
  695. package/dist/chunks/cli-1.0.8-vb0by9ay.mjs +0 -2
  696. package/dist/chunks/cli-1.0.8-vhjjjs1z.mjs +0 -24
  697. package/dist/chunks/cli-1.0.8-vka62cmh.mjs +0 -2
  698. package/dist/chunks/cli-1.0.8-vvy0bc0g.mjs +0 -1
  699. package/dist/chunks/cli-1.0.8-vztgm8r0.mjs +0 -2
  700. package/dist/chunks/cli-1.0.8-w5wjckph.mjs +0 -25
  701. package/dist/chunks/cli-1.0.8-w6atgaqw.mjs +0 -2
  702. package/dist/chunks/cli-1.0.8-wm0h5bqt.mjs +0 -3
  703. package/dist/chunks/cli-1.0.8-x1387pp6.mjs +0 -2
  704. package/dist/chunks/cli-1.0.8-x2z1s2gm.mjs +0 -2
  705. package/dist/chunks/cli-1.0.8-x3bjpevp.mjs +0 -12
  706. package/dist/chunks/cli-1.0.8-x4hcncpt.mjs +0 -2
  707. package/dist/chunks/cli-1.0.8-xcqdbka0.mjs +0 -2
  708. package/dist/chunks/cli-1.0.8-xhz9dm09.mjs +0 -2
  709. package/dist/chunks/cli-1.0.8-xka5xbz5.mjs +0 -2
  710. package/dist/chunks/cli-1.0.8-xv5yp3w6.mjs +0 -2
  711. package/dist/chunks/cli-1.0.8-xxrng2p1.mjs +0 -15
  712. package/dist/chunks/cli-1.0.8-xzp5af2t.mjs +0 -2
  713. package/dist/chunks/cli-1.0.8-y7jd923h.mjs +0 -2
  714. package/dist/chunks/cli-1.0.8-yb3vesbt.mjs +0 -4
  715. package/dist/chunks/cli-1.0.8-yc4a0111.mjs +0 -20
  716. package/dist/chunks/cli-1.0.8-ycxmnmhs.mjs +0 -3
  717. package/dist/chunks/cli-1.0.8-ykwgcdbt.mjs +0 -5476
  718. package/dist/chunks/cli-1.0.8-yzc0z6ex.mjs +0 -2
  719. package/dist/chunks/cli-1.0.8-z49w3x0w.mjs +0 -4
  720. package/dist/chunks/cli-1.0.8-z6x3zsb0.mjs +0 -2
  721. package/dist/chunks/cli-1.0.8-z79r5re2.mjs +0 -17
  722. package/dist/chunks/cli-1.0.8-z7v2b551.mjs +0 -2
  723. package/dist/chunks/cli-1.0.8-z96bbp08.mjs +0 -6
  724. package/dist/chunks/cli-1.0.8-zh2ygfav.mjs +0 -2
  725. package/dist/chunks/cli-1.0.8-zjckzq5j.mjs +0 -18
  726. package/dist/chunks/cli-1.0.8-znefv1yp.mjs +0 -2
  727. package/dist/chunks/cli-1.0.8-zza8ns8c.mjs +0 -15
  728. package/dist/chunks/client-1.0.8-n7dt1rfw.mjs +0 -1
  729. package/dist/chunks/color-1.0.8-jxfasz8x.mjs +0 -1
  730. package/dist/chunks/compact-1.0.8-jnbzy2qh.mjs +0 -3
  731. package/dist/chunks/config-1.0.8-p850nj3c.mjs +0 -1
  732. package/dist/chunks/config-1.0.8-xg117aq2.mjs +0 -1
  733. package/dist/chunks/constants-1.0.8-ms4fbs66.mjs +0 -1
  734. package/dist/chunks/context-1.0.8-tb27h7kb.mjs +0 -1
  735. package/dist/chunks/context-noninteractive-1.0.8-1ry2t8be.mjs +0 -1
  736. package/dist/chunks/conversation-1.0.8-v96pn05v.mjs +0 -1
  737. package/dist/chunks/copilotHeaders-1.0.8-cs9jt8ks.mjs +0 -1
  738. package/dist/chunks/copy-1.0.8-g8d8msxn.mjs +0 -9
  739. package/dist/chunks/cost-1.0.8-kx2ejbds.mjs +0 -1
  740. package/dist/chunks/createSSHSession-1.0.8-2wvpn7y4.mjs +0 -1
  741. package/dist/chunks/createSession-1.0.8-ecm6dynn.mjs +0 -1
  742. package/dist/chunks/debug-1.0.8-cphv9b4j.mjs +0 -1
  743. package/dist/chunks/defaultActionDeps-1.0.8-2k34bnzt.mjs +0 -1446
  744. package/dist/chunks/desktop-1.0.8-w6qk81xg.mjs +0 -1
  745. package/dist/chunks/detectRepository-1.0.8-q2e17deh.mjs +0 -1
  746. package/dist/chunks/detection-1.0.8-adg3pmtx.mjs +0 -1
  747. package/dist/chunks/diff-1.0.8-kcsv429q.mjs +0 -1
  748. package/dist/chunks/doctor-1.0.8-4807n5ga.mjs +0 -1
  749. package/dist/chunks/doctorDiagnostic-1.0.8-thmvp0a8.mjs +0 -1
  750. package/dist/chunks/earlyInput-1.0.8-hhf06cvs.mjs +0 -1
  751. package/dist/chunks/effort-1.0.8-k9jy349z.mjs +0 -10
  752. package/dist/chunks/engine-1.0.8-swnh66g9.mjs +0 -1
  753. package/dist/chunks/envLessBridgeConfig-1.0.8-8066f8x3.mjs +0 -1
  754. package/dist/chunks/envUtils-1.0.8-hvdz25s8.mjs +0 -1
  755. package/dist/chunks/environmentSelection-1.0.8-dgef2ag8.mjs +0 -1
  756. package/dist/chunks/environments-1.0.8-8kxx7cf7.mjs +0 -1
  757. package/dist/chunks/errors-1.0.8-yrb0dfde.mjs +0 -1
  758. package/dist/chunks/exampleCommands-1.0.8-2fp656s9.mjs +0 -1
  759. package/dist/chunks/exit-1.0.8-axxrxks1.mjs +0 -1
  760. package/dist/chunks/explorer-1.0.8-txzsk7g4.mjs +0 -1
  761. package/dist/chunks/export-1.0.8-yxhs2z6f.mjs +0 -2
  762. package/dist/chunks/extra-usage-1.0.8-mkde8ry2.mjs +0 -1
  763. package/dist/chunks/extra-usage-noninteractive-1.0.8-zq1zsj4c.mjs +0 -1
  764. package/dist/chunks/fast-1.0.8-dm74897t.mjs +0 -1
  765. package/dist/chunks/feedback-1.0.8-wnsh14ya.mjs +0 -14
  766. package/dist/chunks/firstPartyEventLogger-1.0.8-xp13dv5e.mjs +0 -1
  767. package/dist/chunks/git-1.0.8-emhr4f0a.mjs +0 -1
  768. package/dist/chunks/githubModelsCredentials-1.0.8-q88vb6k1.mjs +0 -1
  769. package/dist/chunks/goal-1.0.8-vx7pfbph.mjs +0 -4
  770. package/dist/chunks/grove-1.0.8-4vn920ab.mjs +0 -1
  771. package/dist/chunks/growthbook-1.0.8-ktn0scz1.mjs +0 -1
  772. package/dist/chunks/headless-1.0.8-kgkf00rm.mjs +0 -2
  773. package/dist/chunks/heapdump-1.0.8-e5g8ycqp.mjs +0 -6
  774. package/dist/chunks/help-1.0.8-g5kftejd.mjs +0 -1
  775. package/dist/chunks/hookChains-1.0.8-jnd1g9vp.mjs +0 -3
  776. package/dist/chunks/hooks-1.0.8-d343gmd5.mjs +0 -1
  777. package/dist/chunks/hooks-1.0.8-xq482xcs.mjs +0 -79
  778. package/dist/chunks/ide-1.0.8-4veg8hzd.mjs +0 -3
  779. package/dist/chunks/image-processor-napi-1.0.8-93bk96t4.mjs +0 -1
  780. package/dist/chunks/inboundAttachments-1.0.8-zkj9tf58.mjs +0 -1
  781. package/dist/chunks/index-1.0.8-0pnvq37m.mjs +0 -2
  782. package/dist/chunks/index-1.0.8-1pa1v81a.mjs +0 -1
  783. package/dist/chunks/index-1.0.8-464f1j1b.mjs +0 -1
  784. package/dist/chunks/index-1.0.8-4zsx151v.mjs +0 -1
  785. package/dist/chunks/index-1.0.8-7wqrymcz.mjs +0 -2
  786. package/dist/chunks/index-1.0.8-8qzz6s1v.mjs +0 -1
  787. package/dist/chunks/index-1.0.8-91cpv5tb.mjs +0 -9
  788. package/dist/chunks/index-1.0.8-9x499a6f.mjs +0 -1
  789. package/dist/chunks/index-1.0.8-aqm7z1xs.mjs +0 -1
  790. package/dist/chunks/index-1.0.8-bha1edzd.mjs +0 -1
  791. package/dist/chunks/index-1.0.8-bhzqmht2.mjs +0 -1
  792. package/dist/chunks/index-1.0.8-dh80510b.mjs +0 -1
  793. package/dist/chunks/index-1.0.8-hdnvwr7c.mjs +0 -1
  794. package/dist/chunks/index-1.0.8-ht187zbt.mjs +0 -17
  795. package/dist/chunks/index-1.0.8-jj36eqgv.mjs +0 -1
  796. package/dist/chunks/index-1.0.8-p16qr0gk.mjs +0 -1
  797. package/dist/chunks/index-1.0.8-pejsn3j4.mjs +0 -1
  798. package/dist/chunks/index-1.0.8-pzn6kwcz.mjs +0 -1
  799. package/dist/chunks/index-1.0.8-szryar06.mjs +0 -9
  800. package/dist/chunks/index-1.0.8-thkaetpe.mjs +0 -5
  801. package/dist/chunks/index-1.0.8-tnpscb0d.mjs +0 -1
  802. package/dist/chunks/index-1.0.8-xxdv7dxk.mjs +0 -1
  803. package/dist/chunks/index-1.0.8-z5xdfxxw.mjs +0 -30
  804. package/dist/chunks/init-1.0.8-krd7wa3v.mjs +0 -1
  805. package/dist/chunks/initReplBridge-1.0.8-ftx1k41m.mjs +0 -1
  806. package/dist/chunks/ink-1.0.8-pteq28sp.mjs +0 -1
  807. package/dist/chunks/insights-1.0.8-mb2z8g5h.mjs +0 -870
  808. package/dist/chunks/install-1.0.8-s99z78an.mjs +0 -1
  809. package/dist/chunks/install-github-app-1.0.8-r07c7fc8.mjs +0 -149
  810. package/dist/chunks/install-slack-app-1.0.8-mq0zjdf6.mjs +0 -1
  811. package/dist/chunks/instrumentation-1.0.8-00jpcry8.mjs +0 -1
  812. package/dist/chunks/interactiveHelpers-1.0.8-3z1ey7fr.mjs +0 -1
  813. package/dist/chunks/keybindings-1.0.8-wenkty39.mjs +0 -2
  814. package/dist/chunks/knowledge-1.0.8-cjdkk8mb.mjs +0 -2
  815. package/dist/chunks/latestVersionCache-1.0.8-rncrmhd0.mjs +0 -1
  816. package/dist/chunks/loadAgentsDir-1.0.8-9ry9xbfw.mjs +0 -1
  817. package/dist/chunks/loadPluginHooks-1.0.8-5e422tv0.mjs +0 -1
  818. package/dist/chunks/loadPluginHooks-1.0.8-gw0mb3vq.mjs +0 -1
  819. package/dist/chunks/log-1.0.8-bhyqzqd4.mjs +0 -1
  820. package/dist/chunks/main-1.0.8-sv9em0tk.mjs +0 -1
  821. package/dist/chunks/managedEnv-1.0.8-ey5201g9.mjs +0 -1
  822. package/dist/chunks/mcp-1.0.8-0wkq1z2f.mjs +0 -1
  823. package/dist/chunks/mcp-1.0.8-hft3ww8h.mjs +0 -17
  824. package/dist/chunks/mcp-1.0.8-k2y8akh4.mjs +0 -4
  825. package/dist/chunks/mcpb-1.0.8-6d4d5qg6.mjs +0 -1
  826. package/dist/chunks/memory-1.0.8-bhfq1tpv.mjs +0 -3
  827. package/dist/chunks/model-1.0.8-9x1n1hs4.mjs +0 -2
  828. package/dist/chunks/model-1.0.8-f30q5v3y.mjs +0 -1
  829. package/dist/chunks/node-1.0.8-z64w4mf3.mjs +0 -12
  830. package/dist/chunks/oauth-1.0.8-7vjm8xxp.mjs +0 -1
  831. package/dist/chunks/openaiShim-1.0.8-dxqbym7v.mjs +0 -14
  832. package/dist/chunks/output-style-1.0.8-j3vsn3xx.mjs +0 -1
  833. package/dist/chunks/package-ZZWOLTXM-1.0.8-57wby5pw.mjs +0 -1
  834. package/dist/chunks/parseConnectUrl-1.0.8-fa21hp3j.mjs +0 -1
  835. package/dist/chunks/parser-1.0.8-eddksp6m.mjs +0 -1
  836. package/dist/chunks/passes-1.0.8-82cxmwxv.mjs +0 -1
  837. package/dist/chunks/permissions-1.0.8-9qwtkcvw.mjs +0 -1
  838. package/dist/chunks/permissions-1.0.8-hkpezdb6.mjs +0 -3
  839. package/dist/chunks/plan-1.0.8-t7cypg7z.mjs +0 -1
  840. package/dist/chunks/plist-1.0.8-tx4wgdc5.mjs +0 -1
  841. package/dist/chunks/plugin-1.0.8-fpfj5qcx.mjs +0 -29
  842. package/dist/chunks/pluginStartupCheck-1.0.8-htw7er4z.mjs +0 -1
  843. package/dist/chunks/plugins-1.0.8-89t24bsm.mjs +0 -9
  844. package/dist/chunks/preActionHook-1.0.8-caxsc3mp.mjs +0 -2
  845. package/dist/chunks/print-1.0.8-491vxbzs.mjs +0 -57
  846. package/dist/chunks/privacy-settings-1.0.8-m25zra7r.mjs +0 -1
  847. package/dist/chunks/process-1.0.8-3tzpsdmr.mjs +0 -1
  848. package/dist/chunks/processBashCommand-1.0.8-czb8ax1e.mjs +0 -1
  849. package/dist/chunks/processSlashCommand-1.0.8-z2qz58yf.mjs +0 -9
  850. package/dist/chunks/prompt-1.0.8-2bbvxeh7.mjs +0 -1
  851. package/dist/chunks/prompt-1.0.8-ftnsddxg.mjs +0 -1
  852. package/dist/chunks/prompts-1.0.8-7jmnssxc.mjs +0 -1
  853. package/dist/chunks/protocolHandler-1.0.8-y3rebjd9.mjs +0 -13
  854. package/dist/chunks/provider-1.0.8-zrx7vyqk.mjs +0 -2
  855. package/dist/chunks/providerProfiles-1.0.8-n4b3xs5v.mjs +0 -1
  856. package/dist/chunks/providerValidation-1.0.8-j9gx7a1v.mjs +0 -6
  857. package/dist/chunks/rate-limit-options-1.0.8-084n6z58.mjs +0 -1
  858. package/dist/chunks/registerSubcommands-1.0.8-e9k91bmz.mjs +0 -34
  859. package/dist/chunks/registry-1.0.8-p8bc2ppg.mjs +0 -1
  860. package/dist/chunks/release-notes-1.0.8-wdtevpan.mjs +0 -5
  861. package/dist/chunks/reload-plugins-1.0.8-crrx8jkj.mjs +0 -2
  862. package/dist/chunks/remote-env-1.0.8-yb4czxha.mjs +0 -1
  863. package/dist/chunks/remoteBridgeCore-1.0.8-cg38st7c.mjs +0 -1
  864. package/dist/chunks/remoteSession-1.0.8-g9cx4dmb.mjs +0 -1
  865. package/dist/chunks/rename-1.0.8-c263drxy.mjs +0 -1
  866. package/dist/chunks/replBridgeHandle-1.0.8-51065xd1.mjs +0 -1
  867. package/dist/chunks/replLauncher-1.0.8-n5f7d6tk.mjs +0 -1
  868. package/dist/chunks/resume-1.0.8-20r9g9a8.mjs +0 -2
  869. package/dist/chunks/rewind-1.0.8-1shxcx6h.mjs +0 -1
  870. package/dist/chunks/rootOptions-1.0.8-v3mryhnd.mjs +0 -1
  871. package/dist/chunks/sandbox-adapter-1.0.8-db8n3sf2.mjs +0 -1
  872. package/dist/chunks/sandbox-toggle-1.0.8-8ysakwfc.mjs +0 -1
  873. package/dist/chunks/session-1.0.8-nf98ege7.mjs +0 -2
  874. package/dist/chunks/sessionDiscovery-1.0.8-j7e3zz3z.mjs +0 -1
  875. package/dist/chunks/sessionFileAccessHooks-1.0.8-tywx0fhs.mjs +0 -1
  876. package/dist/chunks/sessionStorage-1.0.8-3jncs1jd.mjs +0 -1
  877. package/dist/chunks/settings-1.0.8-ferv6mr5.mjs +0 -1
  878. package/dist/chunks/setup-1.0.8-r7jm4921.mjs +0 -5
  879. package/dist/chunks/sinks-1.0.8-w2zqhs5t.mjs +0 -1
  880. package/dist/chunks/skills-1.0.8-c2re0407.mjs +0 -1
  881. package/dist/chunks/startupProfiler-1.0.8-m7x42s2c.mjs +0 -1
  882. package/dist/chunks/startupUpdateCheck-1.0.8-hnq9gbsm.mjs +0 -1
  883. package/dist/chunks/state-1.0.8-mszmr9fy.mjs +0 -1
  884. package/dist/chunks/stats-1.0.8-xah6pcq3.mjs +0 -6
  885. package/dist/chunks/status-1.0.8-cb5dxyy1.mjs +0 -1
  886. package/dist/chunks/stickers-1.0.8-vr13mnk0.mjs +0 -1
  887. package/dist/chunks/subprocessEnv-1.0.8-rqxgszbc.mjs +0 -1
  888. package/dist/chunks/tasks-1.0.8-v1meznm5.mjs +0 -1
  889. package/dist/chunks/teamHelpers-1.0.8-zs8qgyey.mjs +0 -1
  890. package/dist/chunks/teammateModeSnapshot-1.0.8-828qsec1.mjs +0 -1
  891. package/dist/chunks/teleport-1.0.8-aszfnv2s.mjs +0 -1
  892. package/dist/chunks/terminalSetup-1.0.8-9n57sf46.mjs +0 -1
  893. package/dist/chunks/theme-1.0.8-da67zfgn.mjs +0 -1
  894. package/dist/chunks/thinkback-1.0.8-p4ne9wck.mjs +0 -1
  895. package/dist/chunks/thinkback-play-1.0.8-kz09z4aa.mjs +0 -1
  896. package/dist/chunks/toolPool-1.0.8-rbawjenc.mjs +0 -1
  897. package/dist/chunks/toolSearch-1.0.8-drw7db57.mjs +0 -1
  898. package/dist/chunks/tools-1.0.8-51cw7jhr.mjs +0 -1
  899. package/dist/chunks/trustedDevice-1.0.8-y6484dbh.mjs +0 -1
  900. package/dist/chunks/turndown.cjs-1.0.8-07rx7x03.mjs +0 -69
  901. package/dist/chunks/types-1.0.8-svkpkerr.mjs +0 -1
  902. package/dist/chunks/ultrareviewCommand-1.0.8-fxpy87j7.mjs +0 -4
  903. package/dist/chunks/update-1.0.8-r5hsx0vn.mjs +0 -88
  904. package/dist/chunks/upgrade-1.0.8-rfjr944q.mjs +0 -1
  905. package/dist/chunks/upload-1.0.8-xb3qq931.mjs +0 -7
  906. package/dist/chunks/upstreamproxy-1.0.8-enmg2k32.mjs +0 -14
  907. package/dist/chunks/url-handler-napi-1.0.8-4xafghrm.mjs +0 -1
  908. package/dist/chunks/usage-1.0.8-x3yk026j.mjs +0 -1
  909. package/dist/chunks/util-1.0.8-g8szktmn.mjs +0 -1
  910. package/dist/chunks/utils-1.0.8-qkwh1by0.mjs +0 -1
  911. package/dist/chunks/vim-1.0.8-qv0fhjmv.mjs +0 -1
  912. package/dist/chunks/watcher-1.0.8-y0ye7hc6.mjs +0 -1
  913. package/dist/chunks/wiki-1.0.8-3ydvpt0c.mjs +0 -132
  914. package/dist/chunks/workflows-1.0.8-1fj4wp4z.mjs +0 -1
  915. package/dist/chunks/worktree-1.0.8-x68tgvcc.mjs +0 -1
  916. package/dist/chunks/worktreeModeEnabled-1.0.8-3e98qmek.mjs +0 -1
  917. package/dist/chunks/wrapper-1.0.8-atewpqqc.mjs +0 -7
@@ -0,0 +1,16 @@
1
+ import{r8 as P2,t8 as x8}from"./cli-1.0.9-9jyyb7zx.mjs";import{v8 as h,w8 as mZ}from"./cli-1.0.9-erz57dtz.mjs";import{H8 as d5,J8 as w8}from"./cli-1.0.9-vvwt9bfb.mjs";import{$da as r1,A9 as M4,Afa as $0,B9 as a2,H9 as R0,I9 as G1,Kea as V4,Laa as s1,Mda as d,Mea as $4,Mfa as N,Pca as P,Pea as b2,Qea as tZ,Rca as j2,Rda as p5,S9 as D5,Sda as C,Uca as Q0,Ufa as a0,V9 as cZ,Vca as M,Vda as K,aba as VZ,cda as B0,g_ as N5,i_ as dZ,jca as o1,lda as n4,mfa as m5,nda as nZ,oda as I1,oea as l,ofa as W4,pda as h8,qea as e1,rea as zZ,sca as WZ,ufa as c5,vea as Z4,w9 as T4,x9 as a,xaa as y1,xfa as L,y9 as K2,yaa as A8,z9 as b0}from"./cli-1.0.9-ej3ahs6j.mjs";import{Uga as A0,Wga as P4,eha as v1}from"./cli-1.0.9-rpw6qq2j.mjs";import{iia as I5,jia as d4,kia as j0,mia as z8,nia as G8,pia as b,qia as M0}from"./cli-1.0.9-az9m58wa.mjs";import{ria as x,uia as B2}from"./cli-1.0.9-jq2h9s5r.mjs";import{_ia as L5,cja as pZ,gja as l2,kja as y8,uja as z,wja as d0,xja as Z0}from"./cli-1.0.9-ympvk0av.mjs";import{$ja as V1,Uja as p,Wja as q1}from"./cli-1.0.9-zrphfr1b.mjs";import{cka as K5,fka as F,hka as u,jka as k2,mka as c4,pka as g}from"./cli-1.0.9-y7sdjd9n.mjs";import{Ina as f,Pna as _1,Rla as Y0,Sla as w1,Sma as p1,Spa as J0,ena as a1,eoa as J1,foa as Q1,goa as X1,hoa as Y1,ina as k4,nna as I0,ona as J2,toa as x2}from"./cli-1.0.9-3ye1460y.mjs";import{pqa as I,qqa as i0}from"./cli-1.0.9-806xk0g7.mjs";import{Mqa as k,cra as q2}from"./cli-1.0.9-1f0bxa2a.mjs";import{Ara as c2,Bra as R,Cra as e,yra as y0}from"./cli-1.0.9-j2832pm5.mjs";function T5(Z){let $=[],J=!1;async function Q(){if(J)return;if($.length===0)return;J=!0;while($.length>0){let{args:X,resolve:Y,reject:q,context:V}=$.shift();try{let G=await Z.apply(V,X);Y(G)}catch(G){q(G)}}if(J=!1,$.length>0)Q()}return function(...X){return new Promise((Y,q)=>{$.push({args:X,resolve:Y,reject:q,context:this}),Q()})}}var M5=()=>{};function C5(Z,$){return Z.find((J)=>J.includes($))??null}async function A5(){let{BedrockClient:Z}=await import("@aws-sdk/client-bedrock"),$=k2(),J=F(process.env.CLAUDE_CODE_SKIP_BEDROCK_AUTH),Q={region:$,...process.env.ANTHROPIC_BEDROCK_BASE_URL&&{endpoint:process.env.ANTHROPIC_BEDROCK_BASE_URL},...await P2(),...J&&{requestHandler:new(await import("./index-1.0.9-93jbt8ts.mjs")).NodeHttpHandler,httpAuthSchemes:[{schemeId:"smithy.api#noAuth",identityProvider:()=>async()=>({}),signer:new(await import("./index-1.0.9-cq06g7a0.mjs")).NoAuthSigner}],httpAuthSchemeProvider:()=>[{schemeId:"smithy.api#noAuth"}]}};if(!J&&!process.env.AWS_BEARER_TOKEN_BEDROCK){let X=await z0();if(X)Q.credentials={accessKeyId:X.accessKeyId,secretAccessKey:X.secretAccessKey,sessionToken:X.sessionToken}}return new Z(Q)}async function g$(){let{BedrockRuntimeClient:Z}=await import("@aws-sdk/client-bedrock-runtime"),$=k2(),J=F(process.env.CLAUDE_CODE_SKIP_BEDROCK_AUTH),Q={region:$,...process.env.ANTHROPIC_BEDROCK_BASE_URL&&{endpoint:process.env.ANTHROPIC_BEDROCK_BASE_URL},...await P2(),...J&&{requestHandler:new(await import("./index-1.0.9-93jbt8ts.mjs")).NodeHttpHandler,httpAuthSchemes:[{schemeId:"smithy.api#noAuth",identityProvider:()=>async()=>({}),signer:new(await import("./index-1.0.9-cq06g7a0.mjs")).NoAuthSigner}],httpAuthSchemeProvider:()=>[{schemeId:"smithy.api#noAuth"}]}};if(!J&&!process.env.AWS_BEARER_TOKEN_BEDROCK){let X=await z0();if(X)Q.credentials={accessKeyId:X.accessKeyId,secretAccessKey:X.secretAccessKey,sessionToken:X.sessionToken}}return new Z(Q)}function B8(Z){return Z.startsWith("anthropic.")}function H8(Z){if(!Z.startsWith("arn:"))return Z;let $=Z.lastIndexOf("/");if($===-1)return Z;return Z.substring($+1)}function R8(Z){let $=H8(Z);for(let J of j8)if($.startsWith(`${J}.anthropic.`))return J;return}function m$(Z,$){let J=R8(Z);if(J)return Z.replace(`${J}.`,`${$}.`);if(B8(Z))return`${$}.${Z}`;return Z}var S5,p$,j8;var h5=R(()=>{i0();n();g();a0();x8();S5=I(async function(){let[Z,{ListInferenceProfilesCommand:$}]=await Promise.all([A5(),import("@aws-sdk/client-bedrock")]),J=[],Q;try{do{let X=new $({...Q&&{nextToken:Q},typeEquals:"SYSTEM_DEFINED"}),Y=await Z.send(X);if(Y.inferenceProfileSummaries)J.push(...Y.inferenceProfileSummaries);Q=Y.nextToken}while(Q);return J.filter((X)=>X.inferenceProfileId?.includes("anthropic")).map((X)=>X.inferenceProfileId).filter(Boolean)}catch(X){throw N(X),X}});p$=I(async function(Z){try{let[$,{GetInferenceProfileCommand:J}]=await Promise.all([A5(),import("@aws-sdk/client-bedrock")]),Q=new J({inferenceProfileIdentifier:Z}),X=await $.send(Q);if(!X.models||X.models.length===0)return null;let Y=X.models[0];if(!Y?.modelArn)return null;let q=Y.modelArn.lastIndexOf("/");return q>=0?Y.modelArn.substring(q+1):Y.modelArn}catch($){return N($),null}});j8=["us","eu","apac","global"]});var E2,_2,v2,y2,I2,T2,M2,S2,C2,s0,o0,r0,A2,h2,f2,G0,d$,f5;var u2=R(()=>{E2={firstParty:"claude-3-7-sonnet-20250219",bedrock:"us.anthropic.claude-3-7-sonnet-20250219-v1:0",vertex:"claude-3-7-sonnet@20250219",foundry:"claude-3-7-sonnet",openai:"gpt-4o-mini",gemini:"gemini-2.0-flash",github:"github:copilot",codex:"gpt-5.5","nvidia-nim":"nvidia/llama-3.1-nemotron-70b-instruct",minimax:"MiniMax-M2.5"},_2={firstParty:"claude-3-5-sonnet-20241022",bedrock:"anthropic.claude-3-5-sonnet-20241022-v2:0",vertex:"claude-3-5-sonnet-v2@20241022",foundry:"claude-3-5-sonnet",openai:"gpt-4o-mini",gemini:"gemini-2.0-flash",github:"github:copilot",codex:"gpt-5.5","nvidia-nim":"nvidia/llama-3.1-nemotron-70b-instruct",minimax:"MiniMax-M2.5"},v2={firstParty:"claude-3-5-haiku-20241022",bedrock:"us.anthropic.claude-3-5-haiku-20241022-v1:0",vertex:"claude-3-5-haiku@20241022",foundry:"claude-3-5-haiku",openai:"gpt-4o-mini",gemini:"gemini-2.0-flash-lite",github:"github:copilot",codex:"gpt-5.5","nvidia-nim":"nvidia/llama-3.1-nemotron-70b-instruct",minimax:"MiniMax-M2.5"},y2={firstParty:"claude-haiku-4-5-20251001",bedrock:"us.anthropic.claude-haiku-4-5-20251001-v1:0",vertex:"claude-haiku-4-5@20251001",foundry:"claude-haiku-4-5",openai:"gpt-4o-mini",gemini:"gemini-2.0-flash-lite",github:"github:copilot",codex:"gpt-5.5","nvidia-nim":"nvidia/llama-3.1-nemotron-70b-instruct",minimax:"MiniMax-M2.5"},I2={firstParty:"claude-sonnet-4-20250514",bedrock:"us.anthropic.claude-sonnet-4-20250514-v1:0",vertex:"claude-sonnet-4@20250514",foundry:"claude-sonnet-4",openai:"gpt-4o-mini",gemini:"gemini-2.0-flash",github:"github:copilot",codex:"gpt-5.5","nvidia-nim":"nvidia/llama-3.1-nemotron-70b-instruct",minimax:"MiniMax-M2.5"},T2={firstParty:"claude-sonnet-4-5-20250929",bedrock:"us.anthropic.claude-sonnet-4-5-20250929-v1:0",vertex:"claude-sonnet-4-5@20250929",foundry:"claude-sonnet-4-5",openai:"gpt-4o",gemini:"gemini-2.0-flash",github:"github:copilot",codex:"gpt-5.5","nvidia-nim":"nvidia/llama-3.1-nemotron-70b-instruct",minimax:"MiniMax-M2.5"},M2={firstParty:"claude-opus-4-20250514",bedrock:"us.anthropic.claude-opus-4-20250514-v1:0",vertex:"claude-opus-4@20250514",foundry:"claude-opus-4",openai:"gpt-4o",gemini:"gemini-2.5-pro",github:"github:copilot",codex:"gpt-5.5","nvidia-nim":"nvidia/llama-3.1-nemotron-70b-instruct",minimax:"MiniMax-M2.5"},S2={firstParty:"claude-opus-4-1-20250805",bedrock:"us.anthropic.claude-opus-4-1-20250805-v1:0",vertex:"claude-opus-4-1@20250805",foundry:"claude-opus-4-1",openai:"gpt-4o",gemini:"gemini-2.5-pro",github:"github:copilot",codex:"gpt-5.5","nvidia-nim":"nvidia/llama-3.1-nemotron-70b-instruct",minimax:"MiniMax-M2.5"},C2={firstParty:"claude-opus-4-5-20251101",bedrock:"us.anthropic.claude-opus-4-5-20251101-v1:0",vertex:"claude-opus-4-5@20251101",foundry:"claude-opus-4-5",openai:"gpt-4o",gemini:"gemini-2.5-pro",github:"github:copilot",codex:"gpt-5.5","nvidia-nim":"nvidia/llama-3.1-nemotron-70b-instruct",minimax:"MiniMax-M2.5"},s0={firstParty:"claude-opus-4-6",bedrock:"us.anthropic.claude-opus-4-6-v1",vertex:"claude-opus-4-6",foundry:"claude-opus-4-6",openai:"gpt-4o",gemini:"gemini-2.5-pro",github:"github:copilot",codex:"gpt-5.5","nvidia-nim":"nvidia/llama-3.1-nemotron-70b-instruct",minimax:"MiniMax-M2.5"},o0={firstParty:"claude-opus-4-7",bedrock:"us.anthropic.claude-opus-4-7-v1",vertex:"claude-opus-4-7",foundry:"claude-opus-4-7",openai:"gpt-4o",gemini:"gemini-2.5-pro",github:"github:copilot",codex:"gpt-5.5","nvidia-nim":"nvidia/llama-3.1-nemotron-70b-instruct",minimax:"MiniMax-M2.5"},r0={firstParty:"claude-opus-4-8",bedrock:"anthropic.claude-opus-4-8",vertex:"claude-opus-4-8",foundry:"claude-opus-4-8",openai:"gpt-4o",gemini:"gemini-2.5-pro",github:"github:copilot",codex:"gpt-5.5","nvidia-nim":"nvidia/llama-3.1-nemotron-70b-instruct",minimax:"MiniMax-M2.5"},A2={firstParty:"claude-fable-5",bedrock:"anthropic.claude-fable-5",vertex:"claude-fable-5",foundry:"claude-fable-5",openai:"gpt-4o",gemini:"gemini-2.5-pro",github:"github:copilot",codex:"gpt-5.5","nvidia-nim":"nvidia/llama-3.1-nemotron-70b-instruct",minimax:"MiniMax-M2.5",mistral:"devstral-latest"},h2={firstParty:"claude-sonnet-4-6",bedrock:"us.anthropic.claude-sonnet-4-6",vertex:"claude-sonnet-4-6",foundry:"claude-sonnet-4-6",openai:"gpt-4o",gemini:"gemini-2.0-flash",github:"github:copilot",codex:"gpt-5.5","nvidia-nim":"nvidia/llama-3.1-nemotron-70b-instruct",minimax:"MiniMax-M2.5"},f2={firstParty:"claude-sonnet-5",bedrock:"anthropic.claude-sonnet-5",vertex:"claude-sonnet-5",foundry:"claude-sonnet-5",openai:"gpt-4o",gemini:"gemini-2.0-flash",github:"github:copilot",codex:"gpt-5.5","nvidia-nim":"nvidia/llama-3.1-nemotron-70b-instruct",minimax:"MiniMax-M2.5",mistral:"mistral-medium-latest"},G0={haiku35:v2,haiku45:y2,sonnet35:_2,sonnet37:E2,sonnet40:I2,sonnet45:T2,sonnet46:h2,sonnet5:f2,opus40:M2,opus41:S2,opus45:C2,opus46:s0,opus47:o0,opus48:r0,fable5:A2},d$=Object.values(G0).map((Z)=>Z.firstParty),f5=Object.fromEntries(Object.entries(G0).map(([Z,$])=>[$.firstParty,Z]))});function u5(){return Object.values(e0)}var e0,g2;var p2=R(()=>{e0={"gpt-5.5":{id:"gpt-5.5",name:"GPT-5.5",family:"gpt",attachment:!1,reasoning:!0,tool_call:!0,temperature:!0,knowledge:"2025-05",release_date:"2025-05-01",last_updated:"2025-05-01",modalities:{input:["text"],output:["text"]},open_weights:!1,cost:{input:0,output:0},limit:{context:400000,output:128000}},"gpt-5.4":{id:"gpt-5.4",name:"GPT-5.4",family:"gpt",attachment:!1,reasoning:!0,tool_call:!0,temperature:!0,knowledge:"2025-05",release_date:"2025-05-01",last_updated:"2025-05-01",modalities:{input:["text"],output:["text"]},open_weights:!1,cost:{input:0,output:0},limit:{context:400000,output:128000}},"gpt-5.2-codex":{id:"gpt-5.2-codex",name:"GPT-5.2-Codex",family:"gpt-codex",attachment:!1,reasoning:!0,tool_call:!0,temperature:!0,knowledge:"2025-05",release_date:"2025-05-01",last_updated:"2025-05-01",modalities:{input:["text"],output:["text"]},open_weights:!1,cost:{input:0,output:0},limit:{context:400000,output:128000}},"gpt-5-mini":{id:"gpt-5-mini",name:"GPT-5 mini",family:"gpt-mini",attachment:!1,reasoning:!0,tool_call:!0,temperature:!0,knowledge:"2025-05",release_date:"2025-05-01",last_updated:"2025-05-01",modalities:{input:["text"],output:["text"]},open_weights:!1,cost:{input:0,output:0},limit:{context:264000,output:64000}},"gpt-4o":{id:"gpt-4o",name:"GPT-4o",family:"gpt",attachment:!0,reasoning:!1,tool_call:!0,temperature:!0,knowledge:"2023-10",release_date:"2024-05-01",last_updated:"2024-08-06",modalities:{input:["text","image"],output:["text"]},open_weights:!1,cost:{input:0,output:0},limit:{context:128000,output:16384}},"gpt-4.1":{id:"gpt-4.1",name:"GPT-4.1",family:"gpt",attachment:!1,reasoning:!1,tool_call:!0,temperature:!0,knowledge:"2024-06",release_date:"2024-06-01",last_updated:"2024-06-01",modalities:{input:["text"],output:["text"]},open_weights:!1,cost:{input:0,output:0},limit:{context:128000,output:16384}},"claude-opus-4.7":{id:"claude-opus-4.7",name:"Claude Opus 4.7",family:"claude-opus",attachment:!0,reasoning:!0,tool_call:!0,temperature:!0,knowledge:"2026-01",release_date:"2026-04-01",last_updated:"2026-04-01",modalities:{input:["text","image"],output:["text"]},open_weights:!1,cost:{input:0,output:0},limit:{context:200000,output:32000}},"claude-sonnet-4.6":{id:"claude-sonnet-4.6",name:"Claude Sonnet 4.6",family:"claude-sonnet",attachment:!0,reasoning:!0,tool_call:!0,temperature:!0,knowledge:"2025-05",release_date:"2025-05-01",last_updated:"2025-05-01",modalities:{input:["text","image"],output:["text"]},open_weights:!1,cost:{input:0,output:0},limit:{context:200000,output:32000}},"claude-haiku-4.5":{id:"claude-haiku-4.5",name:"Claude Haiku 4.5",family:"claude-haiku",attachment:!0,reasoning:!0,tool_call:!0,temperature:!0,knowledge:"2025-05",release_date:"2025-05-01",last_updated:"2025-05-01",modalities:{input:["text","image"],output:["text"]},open_weights:!1,cost:{input:0,output:0},limit:{context:144000,output:32768}},"gemini-3.1-pro-preview":{id:"gemini-3.1-pro-preview",name:"Gemini 3.1 Pro Preview",family:"gemini-pro",attachment:!0,reasoning:!0,tool_call:!0,temperature:!0,knowledge:"2025-05",release_date:"2025-05-01",last_updated:"2025-05-01",modalities:{input:["text","image","audio"],output:["text"]},open_weights:!1,cost:{input:0,output:0},limit:{context:200000,output:64000}},"grok-code-fast-1":{id:"grok-code-fast-1",name:"Grok Code Fast 1",family:"grok",attachment:!1,reasoning:!0,tool_call:!0,temperature:!0,knowledge:"2025-05",release_date:"2025-05-01",last_updated:"2025-05-01",modalities:{input:["text"],output:["text"]},open_weights:!1,cost:{input:0,output:0},limit:{context:256000,output:64000}}},g2=Object.fromEntries(Object.values(e0).map((Z)=>[Z.id,Z.name]))});var _0={};c2(_0,{prefetchCopilotModelCatalog:()=>n2,normalizeBareCopilotModelId:()=>d2,getEffectiveCopilotModels:()=>U8,getCopilotDisplayName:()=>b8,getCatalogCopilotMaxOutputTokens:()=>P8,getCatalogCopilotContextWindow:()=>k8,getCachedCopilotCatalog:()=>N8,fetchCopilotModelCatalog:()=>t5,copilotModelSupportsAnthropicMessages:()=>O8,_setCopilotCatalogForTesting:()=>E8});function E0(){let Z=L();if(Z?.transport!=="github_copilot")return null;return(Z.baseUrl||"https://api.githubcopilot.com").replace(/\/+$/,"")}function n5(){if(!t)return!1;let Z=E0();return Z!==null&&x0===Z}function K8(){if(g5)return;g5=!0,p5(()=>{let Z=E0();if(Z&&x0!==Z)n2()})}function d2(Z){let $=Z.split("?",1)[0]??Z,J=$.lastIndexOf(":"),Q=(J===-1?$:$.slice(J+1)).trim(),X=Q.indexOf("/");return X===-1?Q:Q.slice(X+1)}function L8(Z){if(!Array.isArray(Z))return null;return Z.filter(($)=>typeof $==="string")}function D8(Z){let $=Z.id?.trim();if(!$)return null;let J=Z.capabilities?.type?.trim().toLowerCase();if(J&&J!=="chat")return null;if(Z.policy?.state==="disabled")return null;let Q=Z.capabilities?.limits??{},X=Z.capabilities?.supports??{},Y=X.vision===!0||Boolean(Q.vision),q=X.adaptive_thinking===!0||Array.isArray(X.reasoning_effort)||typeof X.max_thinking_budget==="number";return{model:{id:$,name:Z.name?.trim()||$,family:Z.capabilities?.family?.trim()||$,attachment:Y,reasoning:q,tool_call:X.tool_calls===!0,temperature:!0,knowledge:"",release_date:"",last_updated:"",modalities:{input:Y?["text","image"]:["text"],output:["text"]},open_weights:!1,cost:{input:0,output:0},limit:{context:Q.max_context_window_tokens??128000,...typeof Q.max_prompt_tokens==="number"?{input:Q.max_prompt_tokens}:{},output:Q.max_output_tokens??16384}},supportedEndpoints:L8(Z.supported_endpoints),pickerEnabled:Z.model_picker_enabled!==!1}}async function t5(){let Z=L();if(Z?.transport!=="github_copilot")return null;if(m5(Z.baseUrl)!=="copilot")return null;let $=Z.extras?.githubToken??Z.apiKey;if(!$)return null;let J=(Z.baseUrl||"https://api.githubcopilot.com").replace(/\/+$/,""),Q=new AbortController,X=setTimeout(()=>Q.abort(),F8);try{let Y=await fetch(`${J}/models`,{method:"GET",headers:{Accept:"application/json",Authorization:`Bearer ${$}`,...d5},signal:Q.signal});if(!Y.ok)return null;let q=await Y.json();if(!Array.isArray(q?.data))return null;let V=new Set,G=[];for(let B of q.data){let H=D8(B);if(!H||V.has(H.model.id))continue;V.add(H.model.id),G.push(H)}return G.length>0?G:null}catch{return z("[CopilotCatalog] /models fetch failed — using hardcoded registry"),null}finally{clearTimeout(X)}}function n2(){K8();let Z=E0();if(!Z)return;if(t&&x0!==Z)t=null,x0=null;if(Z2){if(m2===Z)return;Z2.finally(()=>n2());return}m2=Z,Z2=t5().then(($)=>{if($&&E0()===Z)t=$,x0=Z}).finally(()=>{Z2=null,m2=null})}function N8(){return t}function U8(){if(n5()){let Z=t?.filter(($)=>$.pickerEnabled).map(($)=>$.model);if(Z&&Z.length>0)return Z}return u5()}function $2(Z){if(!n5())return;let $=d2(Z);return t.find((J)=>J.model.id===$)}function b8(Z){let $=d2(Z);return $2($)?.model.name??e0[$]?.name}function O8(Z){let $=$2(Z);if(!$||$.supportedEndpoints===null)return null;return $.supportedEndpoints.some((J)=>J.includes("/v1/messages"))}function k8(Z){return $2(Z)?.model.limit.context}function P8(Z){return $2(Z)?.model.limit.output}function E8(Z){t=Z,x0=Z?E0():null}var F8=5000,t=null,x0=null,Z2=null,m2=null,g5=!1;var v0=R(()=>{$0();w8();c5();l();Z0();p2()});function W(){let Z=L();if(!Z)return"firstParty";switch(Z.transport){case"anthropic":return"firstParty";case"gemini":return"gemini";case"mistral":return"mistral";case"github_copilot":return"github";case"codex_responses":return"codex";case"bedrock":return"bedrock";case"vertex":return"vertex";case"foundry":return"foundry";case"openai_compat":{let $=Z.baseUrl?.toLowerCase()??"";if($.includes("nvidia"))return"nvidia-nim";if($.includes("minimax"))return"minimax";return"openai"}default:return"firstParty"}}function ZJ(){return W()==="firstParty"}function $J(Z){let $=L();if($?.transport!=="github_copilot")return!1;let J=Z?.trim()||$.model?.trim()||"";if(!J.toLowerCase().includes("claude-"))return!1;try{let{copilotModelSupportsAnthropicMessages:Q}=(v0(),y0(_0)),X=Q(J);if(X!==null)return X}catch{}return!0}function JJ(){return W()}function QJ(){let Z=L();if(!Z)return!0;if(Z.transport!=="anthropic")return!1;let $=Z.baseUrl;if(!$)return!0;try{let J=new URL($).host;return["api.anthropic.com"].includes(J)}catch{return!1}}var i=R(()=>{$0()});function Q2(Z){let $=Z==="codex"||Z==="github"?"openai":Z,J={};for(let Q of i5)J[Q]=G0[Q][$];return J}async function _8(){let Z=Q2("bedrock"),$;try{$=await S5()}catch(Q){return N(Q),Z}if(!$?.length)return Z;let J={};for(let Q of i5){let X=G0[Q].firstParty;J[Q]=C5($,X)||Z[Q]}return J}function l5(Z){let $=Q0().modelOverrides;if(!$)return Z;let J={...Z};for(let[Q,X]of Object.entries($)){let Y=f5[Q];if(Y&&X)J[Y]=X}return J}function X2(Z){let $;try{$=Q0().modelOverrides}catch{return Z}if(!$)return Z;for(let[J,Q]of Object.entries($))if(Q===Z)return J;return Z}function v8(){if(I0()!==null)return;if(W()!=="bedrock"){J2(Q2(W()));return}a5()}function j(){let Z=I0();if(Z===null)return v8(),l5(Q2(W()));return l5(Z)}async function BJ(){if(I0()!==null)return;if(W()!=="bedrock"){J2(Q2(W()));return}await a5()}var i5,a5;var Y2=R(()=>{J0();a0();M5();B0();h5();u2();i();i5=Object.keys(G0);a5=T5(async()=>{if(I0()!==null)return;try{let Z=await _8();J2(Z)}catch(Z){N(Z)}})});function FJ(){if(F(process.env.DISABLE_COST_WARNINGS))return!1;if(O())return!1;let $=T0(),J=X0()!==null;if(!$.hasToken&&!J)return!1;let Q=K(),X=Q.oauthAccount?.organizationRole,Y=Q.oauthAccount?.workspaceRole;if(!X||!Y)return!1;return["admin","billing"].includes(X)||["workspace_admin","workspace_billing"].includes(Y)}function KJ(){if(s5!==null)return s5;if(!O())return!1;let Z=v();if(Z==="max"||Z==="pro")return!0;let J=K().oauthAccount?.organizationRole;return!!J&&["admin","billing","owner","primary_owner"].includes(J)}var s5=null;var o5=R(()=>{n();l();g()});function UJ(Z){return Z}function bJ(){return!1}function r5(){return null}function e5(){return!1}var Z1=R(()=>{o5()});async function yJ(){let $=K().oauthAccount?.accountUuid,J=X0();if(!$||!J)return;let Q=`${b().BASE_API_URL}/api/claude_cli_profile`;try{return(await k.get(Q,{headers:{"x-api-key":J,"anthropic-beta":j0},params:{account_uuid:$},timeout:1e4})).data}catch(X){N(X)}}async function H0(Z){let $=`${b().BASE_API_URL}/api/oauth/profile`;try{return(await k.get($,{headers:{Authorization:`Bearer ${Z}`,"Content-Type":"application/json"},timeout:1e4})).data}catch(J){N(J)}}var t2=R(()=>{q2();M0();n();l();a0()});import{mkdirSync as I8,writeFileSync as T8}from"fs";function C8(Z,$,J){if(!F(process.env.CLAUDE_CODE_REMOTE))return;try{I8(V2,{recursive:!0,mode:448}),T8(Z,$,{encoding:"utf8",mode:384}),z(`Persisted ${J} to ${Z} for subprocess access`)}catch(Q){z(`Failed to persist ${J} to disk (non-fatal): ${p(Q)}`,{level:"error"})}}function $1(Z,$){try{let Q=l2().readFileSync(Z,{encoding:"utf8"}).trim();if(!Q)return null;return z(`Read ${$} from well-known file ${Z}`),Q}catch(J){if(!q1(J))z(`Failed to read ${$} from ${Z}: ${p(J)}`,{level:"debug"});return null}}function W1({envVar:Z,wellKnownPath:$,label:J,getCached:Q,setCached:X}){let Y=Q();if(Y!==void 0)return Y;let q=process.env[Z];if(!q){let G=$1($,J);return X(G),G}let V=parseInt(q,10);if(Number.isNaN(V))return z(`${Z} must be a valid file descriptor number, got: ${q}`,{level:"error"}),X(null),null;try{let G=l2(),B=process.platform==="darwin"||process.platform==="freebsd"?`/dev/fd/${V}`:`/proc/self/fd/${V}`,H=G.readFileSync(B,{encoding:"utf8"}).trim();if(!H)return z(`File descriptor contained empty ${J}`,{level:"error"}),X(null),null;return z(`Successfully read ${J} from file descriptor ${V}`),X(H),C8($,H,J),H}catch(G){z(`Failed to read ${J} from file descriptor ${V}: ${p(G)}`,{level:"error"});let B=$1($,J);return X(B),B}}function W2(){return W1({envVar:"CLAUDE_CODE_OAUTH_TOKEN_FILE_DESCRIPTOR",wellKnownPath:M8,label:"OAuth token",getCached:J1,setCached:Q1})}function i2(){return W1({envVar:"CLAUDE_CODE_API_KEY_FILE_DESCRIPTOR",wellKnownPath:S8,label:"API key",getCached:X1,setCached:Y1})}var V2="/home/claude/.claude/remote",M8,S8,fJ;var z1=R(()=>{J0();Z0();g();V1();y8();M8=`${V2}/.oauth_token`,S8=`${V2}/.api_key`,fJ=`${V2}/.session_ingress_token`});async function x1(){if(process.platform==="darwin"){let Z=a();if((await R0(`security delete-generic-password -a $USER -s "${Z}"`,{shell:!0,reject:!1})).exitCode!==0)throw Error("Failed to delete keychain entry")}}function z2(Z){return Z.slice(-20)}var B1=R(()=>{G1();a2()});function dJ(Z){return Z?.name==="CredentialsProviderError"}function j1(Z){if(!Z||typeof Z!=="object")return!1;let $=Z;if(!$.Credentials||typeof $.Credentials!=="object")return!1;let J=$.Credentials;return typeof J.AccessKeyId==="string"&&typeof J.SecretAccessKey==="string"&&typeof J.SessionToken==="string"&&J.AccessKeyId.length>0&&J.SecretAccessKey.length>0&&J.SessionToken.length>0}async function s2(){let{STSClient:Z,GetCallerIdentityCommand:$}=await import("@aws-sdk/client-sts");await new Z().send(new $({}))}async function H1(){try{z("Clearing AWS credential provider cache");let{fromIni:Z}=await import("@aws-sdk/credential-providers");await Z({ignoreCache:!0})(),z("AWS credential provider cache refreshed")}catch(Z){z("Failed to clear AWS credential cache (this is expected if no credentials are configured)")}}var R1=R(()=>{Z0()});class S{static instance=null;status={isAuthenticating:!1,output:[]};changed=Y0();static getInstance(){if(!S.instance)S.instance=new S;return S.instance}getStatus(){return{...this.status,output:[...this.status.output]}}startAuthentication(){this.status={isAuthenticating:!0,output:[]},this.changed.emit(this.getStatus())}addOutput(Z){this.status.output.push(Z),this.changed.emit(this.getStatus())}setError(Z){this.status.error=Z,this.changed.emit(this.getStatus())}endAuthentication(Z){if(Z)this.status={isAuthenticating:!1,output:[]};else this.status.isAuthenticating=!1;this.changed.emit(this.getStatus())}subscribe=this.changed.subscribe;static reset(){if(S.instance)S.instance.changed.clear(),S.instance=null}}var F1=R(()=>{w1()});var G2="claude-code-20250219",K1="interleaved-thinking-2025-05-14",S0="context-1m-2025-08-07",L1="context-management-2025-06-27",D1="structured-outputs-2025-12-15",o2="web-search-2025-03-05",N1="advanced-tool-use-2025-11-20",U1="tool-search-tool-2025-10-19",iJ="effort-2025-11-24",aJ="task-budgets-2026-03-13",b1="prompt-caching-scope-2026-01-05",sJ="extended-cache-ttl-2025-04-11",oJ="fast-mode-2026-02-01",O1="redact-thinking-2026-02-12",k1="thinking-token-count-2026-05-13",P1="token-efficient-tools-2026-03-28",rJ="afk-mode-2026-01-31",eJ="advisor-tool-2026-03-01",r2,Z3;var e2=R(()=>{r2=new Set(["interleaved-thinking-2025-05-14","context-1m-2025-08-07","tool-search-tool-2025-10-19"]),Z3=new Set(["claude-code-20250219","interleaved-thinking-2025-05-14","context-management-2025-06-27"])});function A(){if(W()!=="firstParty")return!1;return!F(process.env.CLAUDE_CODE_DISABLE_FAST_MODE)}function T1(){if(!A())return!1;return u8()===null}function f8(Z,$){switch(Z){case"free":return $==="oauth"?"Fast mode requires a paid subscription":"Fast mode unavailable during evaluation. Please purchase credits.";case"preference":return"Fast mode has been disabled by your organization";case"extra_usage_disabled":return"Fast mode requires extra usage billing · /extra-usage to enable";case"network_error":return"Fast mode unavailable due to network connectivity issues";case"unknown":return"Fast mode is currently unavailable"}}function u8(){if(W()!=="firstParty")return"Fast mode is not available on third-party providers";if(!A())return"Fast mode is not available";let Z=A0("tengu_penguins_off",null);if(Z!==null)return z(`Fast mode unavailable: ${Z}`),Z;if(!y1()&&A0("tengu_marble_sandcastle",!1))return"Fast mode requires the native binary · Install from: https://claude.com/product/claude-code";if(f()&&x2()&&!_1()){if(!P("flagSettings")?.fastMode)return z("Fast mode unavailable: Fast mode is not available in the Agent SDK"),"Fast mode is not available in the Agent SDK"}if(_.status==="disabled"){if(_.reason==="network_error"||_.reason==="unknown"){if(F(process.env.CLAUDE_CODE_SKIP_FAST_MODE_NETWORK_ERRORS))return null}let $=w()!==null?"oauth":"api-key",J=f8(_.reason,$);return z(`Fast mode unavailable: ${J}`),J}return null}function K3(){return"opus"+(f0()?"[1m]":"")}function L3(Z){if(!A())return!1;if(!T1())return!1;if(!M1(Z))return!1;let $=Q0();if($.fastModePerSessionOptIn)return!1;return $.fastMode===!0}function M1(Z){if(!A())return!1;let $=Z??h0(),J=T($).toLowerCase();return J.includes("opus-4-7")||J.includes("opus-4-6")}function g8(){if(w0.status==="cooldown"&&Date.now()>=w0.resetAt){if(A()&&!Z5)z("Fast mode cooldown expired, re-enabling fast mode"),Z5=!0,C1.emit();w0={status:"active"}}return w0}function U3(Z,$){if(!A())return;w0={status:"cooldown",resetAt:Z,reason:$},Z5=!1;let J=Z-Date.now();z(`Fast mode cooldown triggered (${$}), duration ${Math.round(J/1000)}s`),x("tengu_fast_mode_fallback_triggered",{cooldown_duration_ms:J,cooldown_reason:$}),S1.emit(Z,$)}function b3(){w0={status:"active"}}function O3(){if(_.status==="disabled")return;_={status:"disabled",reason:"preference"},j2("userSettings",{fastMode:void 0}),C((Z)=>({...Z,penguinModeOrgEnabled:!1})),$5.emit(!1)}function p8(Z){switch(Z){case"out_of_credits":return"Fast mode disabled · extra usage credits exhausted";case"org_level_disabled":case"org_service_level_disabled":return"Fast mode disabled · extra usage disabled by your organization";case"org_level_disabled_until":return"Fast mode disabled · extra usage spending cap reached";case"member_level_disabled":return"Fast mode disabled · extra usage disabled for your account";case"seat_tier_level_disabled":case"seat_tier_zero_credit_limit":case"member_zero_credit_limit":return"Fast mode disabled · extra usage not available for your plan";case"overage_not_provisioned":case"no_limits_configured":return"Fast mode requires extra usage billing · /extra-usage to enable";default:return"Fast mode disabled · extra usage not available"}}function m8(Z){return Z==="org_level_disabled_until"||Z==="out_of_credits"}function P3(Z){let $=p8(Z);if(z(`Fast mode overage rejection: ${Z??"unknown"} — ${$}`),x("tengu_fast_mode_overage_rejected",{overage_disabled_reason:Z??"unknown"}),!m8(Z))j2("userSettings",{fastMode:void 0}),C((J)=>({...J,penguinModeOrgEnabled:!1}));A1.emit($)}function c8(){return g8().status==="cooldown"}function E3(Z,$){let J=A()&&T1()&&!!$&&M1(Z);if(J&&c8())return"cooldown";if(J)return"on";return"off"}async function d8(Z){let $=`${b().BASE_API_URL}/api/claude_code_penguin_mode`,J="accessToken"in Z?{Authorization:`Bearer ${Z.accessToken}`,"anthropic-beta":j0}:{"x-api-key":Z.apiKey};return(await k.get($,{headers:J})).data}function v3(){if(!A())return;if(_.status!=="pending")return;_=K().penguinModeOrgEnabled===!0?{status:"enabled"}:{status:"disabled",reason:"unknown"}}async function y3(){if(I1())return;if(!A())return;if(C0)return z("Fast mode prefetch in progress, returning in-flight promise"),C0;let Z=X0();if(!(w()?.accessToken&&q0())&&!Z){_=K().penguinModeOrgEnabled===!0?{status:"enabled"}:{status:"disabled",reason:"preference"};return}let J=Date.now();if(J-E1<n8){z("Skipping fast mode prefetch, fetched recently");return}E1=J;let Q=async()=>{let Y=w(),q=Y?.accessToken&&q0()?{accessToken:Y.accessToken}:Z?{apiKey:Z}:null;if(!q)throw Error("No auth available");return d8(q)};async function X(){try{let Y;try{Y=await Q()}catch(V){if(k.isAxiosError(V)&&(V.response?.status===401||V.response?.status===403&&typeof V.response?.data==="string"&&V.response.data.includes("OAuth token has been revoked"))){let B=w()?.accessToken;if(B)await J5(B),Y=await Q();else throw V}else throw V}let q=_.status!=="pending"?_.status==="enabled":K().penguinModeOrgEnabled;if(_=Y.enabled?{status:"enabled"}:{status:"disabled",reason:Y.disabled_reason??"preference"},q!==Y.enabled){if(!Y.enabled)j2("userSettings",{fastMode:void 0});C((V)=>({...V,penguinModeOrgEnabled:Y.enabled})),$5.emit(Y.enabled)}z(`Org fast mode: ${Y.enabled?"enabled":`disabled (${Y.disabled_reason??"preference"})`}`)}catch(Y){_=K().penguinModeOrgEnabled===!0?{status:"enabled"}:{status:"disabled",reason:"network_error"},z(`Failed to fetch org fast mode status, defaulting to ${_.status==="enabled"?"enabled (cached)":"disabled (network_error)"}: ${Y}`,{level:"error"}),x("tengu_org_penguin_mode_fetch_failed",{})}finally{C0=null}}return C0=X(),C0}var F3="Opus 4.7",w0,Z5=!1,S1,C1,D3,N3,A1,k3,_,$5,_3,n8=30000,E1=0,C0=null;var h1=R(()=>{q2();M0();v1();J0();B2();n();A8();l();Z0();g();F0();i();h8();B0();w1();w0={status:"active"},S1=Y0(),C1=Y0(),D3=S1.subscribe,N3=C1.subscribe;A1=Y0(),k3=A1.subscribe;_={status:"pending"},$5=Y0(),_3=$5.subscribe});function r8(Z){for(let $ of o8)if($.pattern.test(Z))return $.cost;return}function Q5(Z){if(A()&&Z)return l8;return L0}function e8(Z,$){let J=Z.promptCacheWrite1hTokens??Z.promptCacheWriteTokens,Q=$.cache_creation,X=Q?(Q.ephemeral_5m_input_tokens??0)/1e6*Z.promptCacheWriteTokens+(Q.ephemeral_1h_input_tokens??0)/1e6*J:($.cache_creation_input_tokens??0)/1e6*Z.promptCacheWriteTokens;return $.input_tokens/1e6*Z.inputTokens+$.output_tokens/1e6*Z.outputTokens+($.cache_read_input_tokens??0)/1e6*Z.promptCacheReadTokens+X+($.server_tool_use?.web_search_requests??0)*Z.webSearchRequests}function ZZ(Z,$){let J=U(Z);if(J===D(s0.firstParty)||J===D(o0.firstParty)||J===D(r0.firstParty)){let X=$.speed==="fast";return Q5(X)}let Q=u1[J];if(!Q){let X=r8(Z);if(X)return X;return $Z(Z,J),u1[U(h0())]??s8}return Q}function $Z(Z,$){x("tengu_unknown_model_cost",{model:Z,shortName:$}),p1()}function JZ(Z,$){let J=ZZ(Z,$);return e8(J,$)}function h3(Z,$){let J={input_tokens:$.inputTokens,output_tokens:$.outputTokens,cache_read_input_tokens:$.cacheReadInputTokens,cache_creation_input_tokens:$.cacheCreationInputTokens};return JZ(Z,J)}function g1(Z){if(Number.isInteger(Z))return`$${Z}`;return`$${Z.toFixed(2)}`}function m1(Z){return`${g1(Z.inputTokens)}/${g1(Z.outputTokens)} per Mtok`}var K0,f1,L0,t8,l8,i8,a8,s8,o8,u1;var c1=R(()=>{B2();J0();h1();u2();F0();K0={inputTokens:3,outputTokens:15,promptCacheWriteTokens:3.75,promptCacheWrite1hTokens:6,promptCacheReadTokens:0.3,webSearchRequests:0.01},f1={inputTokens:15,outputTokens:75,promptCacheWriteTokens:18.75,promptCacheWrite1hTokens:30,promptCacheReadTokens:1.5,webSearchRequests:0.01},L0={inputTokens:5,outputTokens:25,promptCacheWriteTokens:6.25,promptCacheWrite1hTokens:10,promptCacheReadTokens:0.5,webSearchRequests:0.01},t8={inputTokens:10,outputTokens:50,promptCacheWriteTokens:12.5,promptCacheWrite1hTokens:20,promptCacheReadTokens:1,webSearchRequests:0.01},l8={inputTokens:30,outputTokens:150,promptCacheWriteTokens:37.5,promptCacheWrite1hTokens:60,promptCacheReadTokens:3,webSearchRequests:0.01},i8={inputTokens:0.8,outputTokens:4,promptCacheWriteTokens:1,promptCacheWrite1hTokens:1.6,promptCacheReadTokens:0.08,webSearchRequests:0.01},a8={inputTokens:1,outputTokens:5,promptCacheWriteTokens:1.25,promptCacheWrite1hTokens:2,promptCacheReadTokens:0.1,webSearchRequests:0.01},s8=L0,o8=[{pattern:/gpt-5-nano/i,label:"gpt-5-nano",cost:{inputTokens:0.05,outputTokens:0.4,promptCacheWriteTokens:0.05,promptCacheReadTokens:0.005,webSearchRequests:0}},{pattern:/gpt-5-mini/i,label:"gpt-5-mini",cost:{inputTokens:0.25,outputTokens:2,promptCacheWriteTokens:0.25,promptCacheReadTokens:0.025,webSearchRequests:0}},{pattern:/gpt-5/i,label:"gpt-5",cost:{inputTokens:1.25,outputTokens:10,promptCacheWriteTokens:1.25,promptCacheReadTokens:0.125,webSearchRequests:0}},{pattern:/gpt-4o-mini/i,label:"gpt-4o-mini",cost:{inputTokens:0.15,outputTokens:0.6,promptCacheWriteTokens:0.15,promptCacheReadTokens:0.075,webSearchRequests:0}},{pattern:/gpt-4o/i,label:"gpt-4o",cost:{inputTokens:2.5,outputTokens:10,promptCacheWriteTokens:2.5,promptCacheReadTokens:1.25,webSearchRequests:0}},{pattern:/gpt-4\.1/i,label:"gpt-4.1",cost:{inputTokens:2,outputTokens:8,promptCacheWriteTokens:2,promptCacheReadTokens:0.5,webSearchRequests:0}},{pattern:/o4-mini/i,label:"o4-mini",cost:{inputTokens:0.55,outputTokens:2.2,promptCacheWriteTokens:0.55,promptCacheReadTokens:0.275,webSearchRequests:0}},{pattern:/\bo3\b/i,label:"o3",cost:{inputTokens:15,outputTokens:60,promptCacheWriteTokens:15,promptCacheReadTokens:7.5,webSearchRequests:0}},{pattern:/\bo1\b/i,label:"o1",cost:{inputTokens:15,outputTokens:60,promptCacheWriteTokens:15,promptCacheReadTokens:7.5,webSearchRequests:0}},{pattern:/gemini.*2\.5.*pro/i,label:"gemini-2.5-pro",cost:{inputTokens:1.25,outputTokens:10,promptCacheWriteTokens:1.25,promptCacheReadTokens:0.125,webSearchRequests:0}},{pattern:/gemini.*2\.5.*flash/i,label:"gemini-2.5-flash",cost:{inputTokens:0.3,outputTokens:2.5,promptCacheWriteTokens:0.3,promptCacheReadTokens:0.03,webSearchRequests:0}},{pattern:/gemini.*flash/i,label:"gemini-flash",cost:{inputTokens:0.1,outputTokens:0.4,promptCacheWriteTokens:0.1,promptCacheReadTokens:0.025,webSearchRequests:0}},{pattern:/gemini.*pro/i,label:"gemini-pro",cost:{inputTokens:1.25,outputTokens:5,promptCacheWriteTokens:1.25,promptCacheReadTokens:0.125,webSearchRequests:0}},{pattern:/gemini/i,label:"gemini",cost:{inputTokens:0.3,outputTokens:2.5,promptCacheWriteTokens:0.3,promptCacheReadTokens:0.03,webSearchRequests:0}},{pattern:/deepseek/i,label:"deepseek",cost:{inputTokens:0.14,outputTokens:0.28,promptCacheWriteTokens:0.14,promptCacheReadTokens:0.0028,webSearchRequests:0}},{pattern:/kimi-for-coding/i,label:"kimi-for-coding",cost:{inputTokens:1,outputTokens:2,promptCacheWriteTokens:1,promptCacheReadTokens:0.1,webSearchRequests:0}},{pattern:/kimi/i,label:"kimi",cost:{inputTokens:0.6,outputTokens:2.5,promptCacheWriteTokens:0.6,promptCacheReadTokens:0.06,webSearchRequests:0}},{pattern:/moonshot/i,label:"moonshot",cost:{inputTokens:0.6,outputTokens:2.5,promptCacheWriteTokens:0.6,promptCacheReadTokens:0.06,webSearchRequests:0}},{pattern:/devstral/i,label:"devstral",cost:{inputTokens:0.1,outputTokens:0.3,promptCacheWriteTokens:0.1,promptCacheReadTokens:0.1,webSearchRequests:0}},{pattern:/mistral.*large.*3/i,label:"mistral-large-3",cost:{inputTokens:0.5,outputTokens:1.5,promptCacheWriteTokens:0.5,promptCacheReadTokens:0.5,webSearchRequests:0}},{pattern:/mistral.*large/i,label:"mistral-large",cost:{inputTokens:2,outputTokens:6,promptCacheWriteTokens:2,promptCacheReadTokens:2,webSearchRequests:0}},{pattern:/mistral.*medium/i,label:"mistral-medium",cost:{inputTokens:0.4,outputTokens:2,promptCacheWriteTokens:0.4,promptCacheReadTokens:0.4,webSearchRequests:0}},{pattern:/mistral.*small/i,label:"mistral-small",cost:{inputTokens:0.1,outputTokens:0.3,promptCacheWriteTokens:0.1,promptCacheReadTokens:0.1,webSearchRequests:0}},{pattern:/ministral.*8b/i,label:"ministral-8b",cost:{inputTokens:0.1,outputTokens:0.1,promptCacheWriteTokens:0.1,promptCacheReadTokens:0.1,webSearchRequests:0}},{pattern:/ministral.*3b/i,label:"ministral-3b",cost:{inputTokens:0.04,outputTokens:0.04,promptCacheWriteTokens:0.04,promptCacheReadTokens:0.04,webSearchRequests:0}},{pattern:/llama.*405/i,label:"llama-405b",cost:{inputTokens:3.5,outputTokens:3.5,promptCacheWriteTokens:3.5,promptCacheReadTokens:3.5,webSearchRequests:0}},{pattern:/llama.*70/i,label:"llama-70b",cost:{inputTokens:0.59,outputTokens:0.79,promptCacheWriteTokens:0.59,promptCacheReadTokens:0.59,webSearchRequests:0}},{pattern:/llama.*8b/i,label:"llama-8b",cost:{inputTokens:0.1,outputTokens:0.1,promptCacheWriteTokens:0.1,promptCacheReadTokens:0.1,webSearchRequests:0}},{pattern:/qwen/i,label:"qwen",cost:{inputTokens:0.5,outputTokens:1.5,promptCacheWriteTokens:0.5,promptCacheReadTokens:0.5,webSearchRequests:0}},{pattern:/minimax/i,label:"minimax",cost:{inputTokens:0.2,outputTokens:1.1,promptCacheWriteTokens:0.2,promptCacheReadTokens:0.2,webSearchRequests:0}},{pattern:/\bglm/i,label:"glm",cost:{inputTokens:0.5,outputTokens:1.5,promptCacheWriteTokens:0.5,promptCacheReadTokens:0.5,webSearchRequests:0}},{pattern:/grok.*4.*fast/i,label:"grok-4-fast",cost:{inputTokens:0.2,outputTokens:0.5,promptCacheWriteTokens:0.2,promptCacheReadTokens:0.05,webSearchRequests:0}},{pattern:/grok.*4\.20/i,label:"grok-4.20",cost:{inputTokens:2,outputTokens:6,promptCacheWriteTokens:2,promptCacheReadTokens:0.5,webSearchRequests:0}},{pattern:/grok.*4/i,label:"grok-4",cost:{inputTokens:3,outputTokens:15,promptCacheWriteTokens:3,promptCacheReadTokens:0.75,webSearchRequests:0}},{pattern:/grok/i,label:"grok",cost:{inputTokens:2,outputTokens:6,promptCacheWriteTokens:2,promptCacheReadTokens:0.5,webSearchRequests:0}},{pattern:/command-?r-?plus|command-r\+/i,label:"command-r-plus",cost:{inputTokens:2.5,outputTokens:10,promptCacheWriteTokens:2.5,promptCacheReadTokens:2.5,webSearchRequests:0}},{pattern:/command-?a\b/i,label:"command-a",cost:{inputTokens:2.5,outputTokens:10,promptCacheWriteTokens:2.5,promptCacheReadTokens:2.5,webSearchRequests:0}},{pattern:/command-?r7b/i,label:"command-r7b",cost:{inputTokens:0.0375,outputTokens:0.15,promptCacheWriteTokens:0.0375,promptCacheReadTokens:0.0375,webSearchRequests:0}},{pattern:/command-?r/i,label:"command-r",cost:{inputTokens:0.15,outputTokens:0.6,promptCacheWriteTokens:0.15,promptCacheReadTokens:0.15,webSearchRequests:0}},{pattern:/gemma.*27b/i,label:"gemma-27b",cost:{inputTokens:0.08,outputTokens:0.16,promptCacheWriteTokens:0.08,promptCacheReadTokens:0.08,webSearchRequests:0}},{pattern:/gemma.*12b/i,label:"gemma-12b",cost:{inputTokens:0.04,outputTokens:0.13,promptCacheWriteTokens:0.04,promptCacheReadTokens:0.04,webSearchRequests:0}},{pattern:/gemma/i,label:"gemma",cost:{inputTokens:0.04,outputTokens:0.08,promptCacheWriteTokens:0.04,promptCacheReadTokens:0.04,webSearchRequests:0}},{pattern:/phi-?4-?mini/i,label:"phi-4-mini",cost:{inputTokens:0.075,outputTokens:0.3,promptCacheWriteTokens:0.075,promptCacheReadTokens:0.075,webSearchRequests:0}},{pattern:/phi-?4/i,label:"phi-4",cost:{inputTokens:0.13,outputTokens:0.5,promptCacheWriteTokens:0.13,promptCacheReadTokens:0.13,webSearchRequests:0}},{pattern:/\bphi\b/i,label:"phi",cost:{inputTokens:0.13,outputTokens:0.5,promptCacheWriteTokens:0.13,promptCacheReadTokens:0.13,webSearchRequests:0}}];u1={[D(v2.firstParty)]:i8,[D(y2.firstParty)]:a8,[D(_2.firstParty)]:K0,[D(E2.firstParty)]:K0,[D(I2.firstParty)]:K0,[D(T2.firstParty)]:K0,[D(h2.firstParty)]:K0,[D(f2.firstParty)]:K0,[D(M2.firstParty)]:f1,[D(S2.firstParty)]:f1,[D(C2.firstParty)]:L0,[D(s0.firstParty)]:L0,[D(o0.firstParty)]:L0,[D(r0.firstParty)]:L0,[D(A2.firstParty)]:t8}});function m(Z){return QZ.includes(Z)}function D0(Z){return XZ.includes(Z)}var QZ,XZ;var X5=R(()=>{QZ=["sonnet","opus","haiku","fable","best","sonnet[1m]","opus[1m]","opusplan"];XZ=["sonnet","opus","haiku"]});function YZ(Z,$){if(Z.includes($))return!0;if(m(Z))return T(Z).toLowerCase().includes($);return!1}function d1(Z,$){if(!Z.startsWith($))return!1;return Z.length===$.length||Z[$.length]==="-"}function qZ(Z,$){let J=m(Z)?T(Z).toLowerCase():Z;if(d1(J,$))return!0;if(!$.startsWith("claude-")&&d1(J,`claude-${$}`))return!0;return!1}function n1(Z,$){for(let J of $){if(D0(J))continue;let Q=J.indexOf(Z);if(Q===-1)continue;let X=Q+Z.length;if(X===J.length||J[X]==="-")return!0}return!1}function t1(Z){let $=M()||{},{availableModels:J}=$;if(!J)return!0;if(J.length===0)return!1;let X=X2(Z).trim().toLowerCase(),Y=J.map((q)=>q.trim().toLowerCase());if(Y.includes(X)){if(!D0(X)||!n1(X,Y))return!0}for(let q of Y)if(D0(q)&&!n1(q,Y)&&YZ(X,q))return!0;if(m(X)){let q=T(X).toLowerCase();if(Y.includes(q))return!0}for(let q of Y)if(!D0(q)&&m(q)){if(T(q).toLowerCase()===X)return!0}for(let q of Y)if(!D0(q)&&!m(q)){if(qZ(X,q))return!0}return!1}var l1=R(()=>{B0();X5();F0();Y2()});function H2(Z){if(typeof Z!=="string")return;let $=Z.trim();return $.length>0?$:void 0}function U0(){let Z=L();if(!Z?.model)return;return e1(Z.model)}function W9(){if(process.env.ANTHROPIC_SMALL_FAST_MODEL)return process.env.ANTHROPIC_SMALL_FAST_MODEL;let Z=U0();if(W()==="gemini")return Z||"gemini-2.0-flash-lite";if(W()==="mistral")return Z||"ministral-3b-latest";if(W()==="openai")return Z||"gpt-4o-mini";if(W()==="codex")return Z||"codexspark";if(W()==="github")return Z||"github:copilot";if(W()==="nvidia-nim")return Z||"meta/llama-3.1-8b-instruct";if(W()==="minimax")return Z||"MiniMax-M2.5-highspeed";return J4()}function z9(Z){return Z===j().opus40||Z===j().opus41||Z===j().opus45||Z===j().opus46||Z===j().opus47||Z===j().opus48}function Y5(){let Z,$=a1();if($!==void 0)Z=$;else{let J=M()||{},Q=H2(J.model),Y=U0()||Q||void 0,q=r1(),V=H2(q.activeModelForProject);if(V){let G=Z4()?.id,B=q.activeModelForProjectProfileId;Z=B===void 0||B===G?V:Y}else Z=Y}if(Z&&!t1(Z))return;return Z}function G9(){let Z=Y5();if(Z!==void 0&&Z!==null)return T(Z);return Q4()}function GZ(){return N0()}function N0(){if(process.env.ANTHROPIC_DEFAULT_OPUS_MODEL)return process.env.ANTHROPIC_DEFAULT_OPUS_MODEL;let Z=U0();if(W()==="gemini")return Z||"gemini-2.5-pro";if(W()==="mistral")return Z||"devstral-latest";if(W()==="openai")return Z||"gpt-4o";if(W()==="codex")return Z||"gpt-5.5";if(W()==="github")return Z||"github:copilot";if(W()==="nvidia-nim")return Z||"nvidia/llama-3.1-nemotron-70b-instruct";if(W()==="minimax")return Z||"MiniMax-M2.7";if(W()!=="firstParty")return j().opus46;return j().opus48}function u0(){if(process.env.ANTHROPIC_DEFAULT_SONNET_MODEL)return process.env.ANTHROPIC_DEFAULT_SONNET_MODEL;let Z=U0();if(W()==="gemini")return Z||"gemini-2.0-flash";if(W()==="mistral")return Z||"mistral-medium-latest";if(W()==="openai")return Z||"gpt-4o";if(W()==="codex")return Z||"gpt-5.5";if(W()==="github")return Z||"github:copilot";if(W()==="nvidia-nim")return Z||"nvidia/llama-3.1-nemotron-70b-instruct";if(W()==="minimax")return Z||"MiniMax-M2.5";if(W()!=="firstParty")return j().sonnet45;return j().sonnet5}function J4(){if(process.env.ANTHROPIC_DEFAULT_HAIKU_MODEL)return process.env.ANTHROPIC_DEFAULT_HAIKU_MODEL;let Z=U0();if(W()==="mistral")return Z||"ministral-3b-latest";if(W()==="openai")return Z||"gpt-4o-mini";if(W()==="codex")return Z||"gpt-5.5";if(W()==="github")return Z||"github:copilot";if(W()==="gemini")return Z||"gemini-2.0-flash-lite";if(W()==="nvidia-nim")return Z||"meta/llama-3.1-8b-instruct";if(W()==="minimax")return Z||"MiniMax-M2.5-highspeed";return j().haiku45}function x9(Z){let{permissionMode:$,mainLoopModel:J,exceeds200kTokens:Q=!1}=Z;if(Y5()==="opusplan"&&$==="plan"&&!Q)return N0();if(Y5()==="haiku"&&$==="plan")return u0();return J}function h0(){let Z=U0();if(W()==="github"){let $=M()||{};return H2($.model)||Z||"github:copilot"}if(W()==="gemini")return Z||"gemini-2.0-flash";if(W()==="mistral")return Z||"devstral-latest";if(W()==="openai")return Z||"gpt-4o";if(W()==="codex")return Z||"gpt-5.5";if(R2())return N0()+(f0()?"[1m]":"");if(w2())return N0()+(f0()?"[1m]":"");return u0()}function Q4(){return T(h0())}function D(Z){if(Z=Z.toLowerCase(),Z.includes("claude-fable-5"))return"claude-fable-5";if(Z.includes("claude-opus-4-8"))return"claude-opus-4-8";if(Z.includes("claude-opus-4-7"))return"claude-opus-4-7";if(Z.includes("claude-opus-4-6"))return"claude-opus-4-6";if(Z.includes("claude-opus-4-5"))return"claude-opus-4-5";if(Z.includes("claude-opus-4-1"))return"claude-opus-4-1";if(Z.includes("claude-opus-4"))return"claude-opus-4";if(Z.includes("claude-sonnet-5"))return"claude-sonnet-5";if(Z.includes("claude-sonnet-4-6"))return"claude-sonnet-4-6";if(Z.includes("claude-sonnet-4-5"))return"claude-sonnet-4-5";if(Z.includes("claude-sonnet-4"))return"claude-sonnet-4";if(Z.includes("claude-haiku-4-5"))return"claude-haiku-4-5";if(Z.includes("claude-3-7-sonnet"))return"claude-3-7-sonnet";if(Z.includes("claude-3-5-sonnet"))return"claude-3-5-sonnet";if(Z.includes("claude-3-5-haiku"))return"claude-3-5-haiku";if(Z.includes("claude-3-opus"))return"claude-3-opus";if(Z.includes("claude-3-sonnet"))return"claude-3-sonnet";if(Z.includes("claude-3-haiku"))return"claude-3-haiku";let $=Z.match(/(claude-(\d+-\d+-)?\w+)/);if($&&$[1])return $[1];return Z}function U(Z){return D(X2(Z))}function xZ(Z=!1){if(R2()||w2()){if(f0())return`Opus 4.8 with 1M context · Most capable for complex work${Z?i1(!0):""}`;return`Opus 4.8 · Most capable for complex work${Z?i1(!0):""}`}return"Sonnet 5 · Best for everyday tasks"}function B9(Z){if(Z==="opusplan")return"Opus 4.8 in plan mode, else Sonnet 5";return Y4(T(Z))}function i1(Z){if(W()!=="firstParty")return"";let $=m1(Q5(Z));return` ·${Z?` (${s1})`:""} ${$}`}function f0(){if(V0()||W5()||W()!=="firstParty")return!1;if(O()&&v()===null)return!1;return!0}function j9(Z){if(Z==="opusplan")return"Opus Plan";if(Z==="codexplan")return"codexplan (gpt-5.5)";if(Z==="codexspark")return"codexspark (gpt-5.3-codex-spark)";if(m(Z))return o1(Z);return Y4(Z)}function X4(Z){if(W()==="openai"||W()==="gemini"||W()==="codex"||W()==="github"){if(g2[Z])return g2[Z];if(W()==="github"){let{getCopilotDisplayName:$}=(v0(),y0(_0));return $(Z)??null}return null}switch(Z){case"gpt-5.5":return"GPT-5.5";case"gpt-5.4":return"GPT-5.4";case"gpt-5.3-codex-spark":return"GPT-5.3 Codex Spark";case j().fable5:return"Fable 5";case j().opus48:return"Opus 4.8";case j().opus48+"[1m]":return"Opus 4.8 (1M context)";case j().opus47:return"Opus 4.7";case j().opus47+"[1m]":return"Opus 4.7 (1M context)";case j().opus46:return"Opus 4.6";case j().opus46+"[1m]":return"Opus 4.6 (1M context)";case j().opus45:return"Opus 4.5";case j().opus41:return"Opus 4.1";case j().opus40:return"Opus 4";case j().sonnet5:return"Sonnet 5";case j().sonnet46+"[1m]":return"Sonnet 4.6 (1M context)";case j().sonnet46:return"Sonnet 4.6";case j().sonnet45+"[1m]":return"Sonnet 4.5 (1M context)";case j().sonnet45:return"Sonnet 4.5";case j().sonnet40:return"Sonnet 4";case j().sonnet40+"[1m]":return"Sonnet 4 (1M context)";case j().sonnet37:return"Sonnet 3.7";case j().sonnet35:return"Sonnet 3.5";case j().haiku45:return"Haiku 4.5";case j().haiku35:return"Haiku 3.5";default:return null}}function Y4(Z){let $=X4(Z);if($)return $;if(Z==="github:copilot")return"GPT-4o";return Z}function H9(Z){let $=X4(Z);if($)return`Claude ${$}`;return`Claude (${Z})`}function T(Z){let $=H2(Z);if(!$)return u0();let J=$.toLowerCase(),Q=s(J),X=Q?J.replace(/\[1m]$/i,"").trim():J;if(m(X))switch(X){case"opusplan":return u0()+(Q?"[1m]":"");case"sonnet":return u0()+(Q?"[1m]":"");case"haiku":return J4()+(Q?"[1m]":"");case"opus":return N0()+(Q?"[1m]":"");case"best":return GZ();default:}if(X==="codexplan")return"gpt-5.5";if(X==="codexspark")return"gpt-5.3-codex-spark";if(X==="fable"||X==="fable5")return j().fable5;if(W()==="firstParty"&&jZ(X)&&HZ())return N0()+(Q?"[1m]":"");if(Q)return $.replace(/\[1m\]$/i,"").trim()+"[1m]";return $}function R9(Z,$){if(s(Z)||!s($))return Z;if(q5(T(Z)))return Z+"[1m]";return Z}function jZ(Z){return BZ.includes(Z)}function HZ(){return!F(process.env.CLAUDE_CODE_DISABLE_LEGACY_MODEL_REMAP)}function w9(Z){if(Z===null){if(O())return`Default (${xZ()})`;return`Default (${Q4()})`}let $=T(Z);return Z===$?$:`${Z} (${$})`}function F9(Z){if(W()==="foundry")return;let $=Z.toLowerCase().includes("[1m]"),J=U(Z);if(J.includes("claude-fable-5"))return"Fable 5";if(J.includes("claude-opus-4-8"))return $?"Opus 4.8 (with 1M context)":"Opus 4.8";if(J.includes("claude-opus-4-7"))return $?"Opus 4.7 (with 1M context)":"Opus 4.7";if(J.includes("claude-opus-4-6"))return $?"Opus 4.6 (with 1M context)":"Opus 4.6";if(J.includes("claude-opus-4-5"))return"Opus 4.5";if(J.includes("claude-opus-4-1"))return"Opus 4.1";if(J.includes("claude-opus-4"))return"Opus 4";if(J.includes("claude-sonnet-5"))return"Sonnet 5";if(J.includes("claude-sonnet-4-6"))return $?"Sonnet 4.6 (with 1M context)":"Sonnet 4.6";if(J.includes("claude-sonnet-4-5"))return $?"Sonnet 4.5 (with 1M context)":"Sonnet 4.5";if(J.includes("claude-sonnet-4"))return $?"Sonnet 4 (with 1M context)":"Sonnet 4";if(J.includes("claude-3-7-sonnet"))return"Claude 3.7 Sonnet";if(J.includes("claude-3-5-sonnet"))return"Claude 3.5 Sonnet";if(J.includes("claude-haiku-4-5"))return"Haiku 4.5";if(J.includes("claude-3-5-haiku"))return"Claude 3.5 Haiku";return}function K9(Z){return Z.replace(/\[(1|2)m\]/gi,"")}function L9(Z){let $=U(Z);return $.includes("opus-4-7")||$.includes("opus-4-8")||$.includes("fable-5")||$.includes("sonnet-5")}var BZ;var F0=R(()=>{J0();$0();l();$4();n();V5();g();zZ();Y2();c1();B0();i();VZ();l1();X5();WZ();p2();BZ=["claude-opus-4-20250514","claude-opus-4-1-20250805","claude-opus-4-0","claude-opus-4-1"]});function z5(Z){return}async function N9(){}var q4=()=>{};var j4={};c2(j4,{prefetchOpenAICompatibleModels:()=>OZ,getDiscoveredContextWindow:()=>RZ,discoverOpenAICompatibleModelOptions:()=>B4});function RZ(Z){return G4.get(Z)}function wZ(){return(L()?.baseUrl??"https://api.openai.com/v1").replace(/\/+$/,"")}function x4(Z){try{let $=new URL(Z).hostname.toLowerCase();return $.endsWith(".openai.azure.com")||$.endsWith(".cognitiveservices.azure.com")}catch{return!1}}function FZ(Z){try{return new URL(Z).hostname.toLowerCase().includes("bankr")}catch{return!1}}function KZ(Z){let $=L()?.apiKey?.trim();if(!$)return{};if(FZ(Z))return{"X-API-Key":$};let J={Authorization:`Bearer ${$}`};if(x4(Z))J["api-key"]=$;return J}function LZ(Z){let $=Z.endsWith("/v1")?`${Z}/models`:`${Z}/v1/models`,J=`${Z}/models`,Q=process.env.OPENAI_API_VERSION?.trim(),X=Q&&x4(Z)?(Y)=>{try{let q=new URL(Y);return q.searchParams.set("api-version",Q),q.toString()}catch{return Y}}:(Y)=>Y;if($===J)return[X($)];return[X($),X(J)]}function DZ(Z){try{let $=new URL(Z),J=$.pathname.replace(/\/+$/,""),X=`${J.endsWith("/v1")?J.slice(0,-3):J}/api/tags`.replace(/\/{2,}/g,"/");return`${$.origin}${X}`}catch{return null}}function NZ(Z){if(Z>=1e6)return`${Z/1e6}M ctx`;if(Z>=1000)return`${Math.round(Z/1000)}K ctx`;return`${Z} ctx`}async function UZ(Z,$){let J=new Set;for(let Q of Z)try{let X=await k.get(Q,{headers:$,timeout:z4}),Y=[];for(let q of X.data?.data??[]){let V=q.id?.trim();if(!V||J.has(V))continue;J.add(V);let G=q.name?.trim()||V,B=q.context_length??null;if(B&&B>0)G4.set(V,B);let H=B?` · ${NZ(B)}`:"";Y.push({value:V,label:G,description:`${V}${H}`})}if(Y.length>0)return Y.sort((q,V)=>{let G=String(q.value).split("/")[0]??"",B=String(V.value).split("/")[0]??"",H=G.localeCompare(B);return H!==0?H:String(q.value).localeCompare(String(V.value))}),Y}catch{z(`[ModelDiscovery] Failed to fetch OpenAI models from ${Q}`)}return[]}async function bZ(Z,$){try{let J=await k.get(Z,{headers:$,timeout:z4}),Q=new Set;return(J.data?.models??[]).map((X)=>X.name?.trim()??"").filter((X)=>{if(!X||Q.has(X))return!1;return Q.add(X),!0}).map((X)=>({value:X,label:X,description:"Ollama model"}))}catch{return z(`[ModelDiscovery] Failed to fetch Ollama models from ${Z}`),[]}}async function B4(){if(W()!=="openai")return[];let Z=wZ(),$=KZ(Z),J=await UZ(LZ(Z),$);if(J.length>0)return J;let Q=DZ(Z);if(Q)return bZ(Q,$);return[]}function OZ(){if(g0)return g0;return g0=(async()=>{if(!W4()?.startsWith("openai:"))return;try{let $=await B4();if($.length>0)V4($)}catch{}finally{g0=null}})(),g0}var z4=5000,G4,g0=null;var H4=R(()=>{q2();$0();c5();Z0();i();$4();G4=new Map});function w4(Z,$,J){let Q=L()?.model?.trim();if(Q&&Q!==J){let Y=`${Q}:${J}`;if($[Y]!==void 0)return $[Y];if(Z[Y]!==void 0)return Z[Y]}let X=R4($,J);if(X!==void 0)return X;return R4(Z,J)}function R4(Z,$){if(Z[$]!==void 0)return Z[$];let J=Object.keys(Z).sort((Q,X)=>X.length-Q.length);for(let Q of J)if($.startsWith(Q))return Z[Q];return}function F4(Z){try{let{getDiscoveredContextWindow:J}=(H4(),y0(j4)),Q=J(Z);if(Q!==void 0)return Q}catch{}let $=w4(kZ,EZ,Z);if($!==void 0)return $;try{let{getCatalogCopilotContextWindow:J}=(v0(),y0(_0));return J(Z)}catch{return}}function K4(Z){let $=w4(PZ,_Z,Z);if($!==void 0)return $;try{let{getCatalogCopilotMaxOutputTokens:J}=(v0(),y0(_0));return J(Z)}catch{return}}var kZ,PZ,EZ,_Z;var L4=R(()=>{$0();kZ={"github:copilot":128000,"github:copilot:claude-haiku-4.5":144000,"github:copilot:claude-sonnet-4.6":200000,"github:copilot:claude-opus-4.7":200000,"github:copilot:gpt-4.1":128000,"github:copilot:gpt-4o":128000,"github:copilot:gpt-5-mini":264000,"github:copilot:gpt-5.2-codex":400000,"github:copilot:gpt-5.4":400000,"github:copilot:gpt-5.5":400000,"github:copilot:gemini-3.1-pro-preview":200000,"github:copilot:grok-code-fast-1":256000,"github_copilot/claude-haiku-4.5":144000,"github_copilot/claude-sonnet-4.6":200000,"github_copilot/claude-opus-4.7":200000,"github_copilot/gpt-4.1":128000,"github_copilot/gpt-4o":128000,"github_copilot/gpt-5-mini":264000,"github_copilot/gpt-5.2-codex":400000,"github_copilot/gpt-5.4":400000,"github_copilot/gpt-5.5":400000,"github_copilot/gemini-3.1-pro-preview":200000,"github_copilot/grok-code-fast-1":256000,"gpt-5.5":1050000,"gpt-5.5-mini":400000,"gpt-5.5-nano":400000,"gpt-5.4":1050000,"gpt-5.4-mini":400000,"gpt-5.4-nano":400000,"gpt-4o":128000,"gpt-4o-mini":128000,"gpt-4.1":1047576,"gpt-4.1-mini":1047576,"gpt-4.1-nano":1047576,"gpt-4-turbo":128000,"gpt-4":8192,o1:200000,"o1-mini":128000,"o1-preview":128000,"o1-pro":200000,o3:200000,"o3-mini":200000,"o4-mini":200000,"deepseek-v4-flash":1048576,"deepseek-v4-pro":1048576,"deepseek-chat":128000,"deepseek-reasoner":128000,"llama-3.3-70b-versatile":128000,"llama-3.1-8b-instant":128000,"mixtral-8x7b-32768":32768,"mistral-large-latest":256000,"mistral-small-latest":256000,"devstral-latest":256000,"ministral-3b-latest":256000,"nvidia/llama-3.1-nemotron-70b-instruct":128000,"nvidia/llama-3.1-nemotron-ultra-253b-v1":128000,"nvidia/nemotron-mini-4b-instruct":32768,"meta/llama-3.1-405b-instruct":128000,"meta/llama-3.1-70b-instruct":128000,"meta/llama-3.1-8b-instruct":128000,"meta/llama-3.2-90b-instruct":128000,"meta/llama-3.2-1b-instruct":128000,"meta/llama-3.2-3b-instruct":128000,"meta/llama-3.3-70b-instruct":128000,"google/gemma-2-27b-it":8192,"google/gemma-2-9b-it":8192,"google/gemma-3-27b-it":131072,"google/gemma-3-12b-it":131072,"google/gemma-3-4b-it":131072,"deepseek-ai/deepseek-r1":128000,"deepseek-ai/deepseek-v3":128000,"deepseek-ai/deepseek-v3.2":128000,"qwen/qwen3-32b":128000,"qwen/qwen3-8b":128000,"qwen/qwen2.5-7b-instruct":32768,"mistralai/mistral-large-3-675b-instruct-2512":256000,"mistralai/mistral-large-2-instruct":256000,"mistralai/mistral-small-3.1-24b-instruct-2503":32768,"mistralai/mixtral-8x7b-instruct-v0.1":32768,"microsoft/phi-4-mini-instruct":16384,"microsoft/phi-3.5-mini-instruct":16384,"microsoft/phi-3-mini-128k-instruct":128000,"ibm/granite-3.3-8b-instruct":8192,"ibm/granite-8b-code-instruct":8192,"z-ai/glm5":200000,"z-ai/glm4.7":128000,"moonshotai/kimi-k2.5":200000,"moonshotai/kimi-k2-instruct":128000,"databricks/dbrx-instruct":131072,"ai21labs/jamba-1.5-large-instruct":256000,"ai21labs/jamba-1.5-mini-instruct":256000,"01-ai/yi-large":32768,"MiniMax-M2.7":204800,"MiniMax-M2.7-highspeed":204800,"MiniMax-M2.5":204800,"MiniMax-M2.5-highspeed":204800,"MiniMax-M2.1":204800,"MiniMax-M2.1-highspeed":204800,"minimax-m2.7":204800,"minimax-m2.7-highspeed":204800,"minimax-m2.5":204800,"minimax-m2.5-highspeed":204800,"minimax-m2.1":204800,"minimax-m2.1-highspeed":204800,"MiniMax-Text-01":524288,"MiniMax-Text-01-Preview":262144,"MiniMax-Vision-01":32768,"MiniMax-Vision-01-Fast":16384,"MiniMax-M2":204800,"google/gemini-2.0-flash":1048576,"google/gemini-2.5-pro":1048576,"gemini-2.0-flash":1048576,"gemini-2.5-pro":1048576,"gemini-2.5-flash":1048576,"gemini-3.1-pro":1048576,"gemini-3.1-flash-lite-preview":1048576,"llama3.3:70b":128000,"llama3.1:8b":128000,"llama3.2:3b":128000,"qwen2.5-coder:32b":32768,"qwen2.5-coder:7b":32768,"deepseek-coder-v2:16b":163840,"deepseek-r1:14b":65536,"mistral:7b":32768,"phi4:14b":16384,"gemma2:27b":8192,"codellama:13b":16384,"llama3.2:1b":128000,"qwen3:8b":128000,codestral:32768,"qwen3.6-plus":1e6,"qwen3.5-plus":1e6,"qwen3-coder-plus":1e6,"qwen3-coder-next":262144,"qwen3-max":262144,"qwen3-max-2026-01-23":262144,"kimi-k2.5":262144,"glm-5":202752,"glm-4.7":202752,"kimi-for-coding":262144,"kimi-k2.6":262144,"kimi-k2":131072,"kimi-k2-instruct":131072,"kimi-k2-thinking":262144,"moonshot-v1-8k":8192,"moonshot-v1-32k":32768,"moonshot-v1-128k":131072},PZ={"github:copilot":16384,"github:copilot:claude-haiku-4.5":32768,"github:copilot:claude-sonnet-4.6":32000,"github:copilot:claude-opus-4.7":32000,"github:copilot:gpt-4.1":16384,"github:copilot:gpt-4o":16384,"github:copilot:gpt-5-mini":64000,"github:copilot:gpt-5.2-codex":128000,"github:copilot:gpt-5.4":128000,"github:copilot:gpt-5.5":128000,"github:copilot:gemini-3.1-pro-preview":64000,"github:copilot:grok-code-fast-1":64000,"github_copilot/claude-haiku-4.5":32768,"github_copilot/claude-sonnet-4.6":32000,"github_copilot/claude-opus-4.7":32000,"github_copilot/gpt-4.1":16384,"github_copilot/gpt-4o":16384,"github_copilot/gpt-5-mini":64000,"github_copilot/gpt-5.2-codex":128000,"github_copilot/gpt-5.4":128000,"github_copilot/gpt-5.5":128000,"github_copilot/gemini-3.1-pro-preview":64000,"github_copilot/grok-code-fast-1":64000,"gpt-5.5":128000,"gpt-5.5-mini":128000,"gpt-5.5-nano":128000,"gpt-5.4":128000,"gpt-5.4-mini":128000,"gpt-5.4-nano":128000,"gpt-4o":16384,"gpt-4o-mini":16384,"gpt-4.1":32768,"gpt-4.1-mini":32768,"gpt-4.1-nano":32768,"gpt-4-turbo":4096,"gpt-4":4096,o1:1e5,"o1-mini":65536,"o1-preview":32768,"o1-pro":1e5,o3:1e5,"o3-mini":1e5,"o4-mini":1e5,"deepseek-v4-flash":262144,"deepseek-v4-pro":262144,"deepseek-chat":8192,"deepseek-reasoner":65536,"llama-3.3-70b-versatile":32768,"llama-3.1-8b-instant":8192,"mixtral-8x7b-32768":32768,"mistral-large-latest":32768,"mistral-small-latest":32768,"MiniMax-M2.7":131072,"MiniMax-M2.7-highspeed":131072,"MiniMax-M2.5":131072,"MiniMax-M2.5-highspeed":131072,"MiniMax-M2.1":131072,"MiniMax-M2.1-highspeed":131072,"minimax-m2.7":131072,"minimax-m2.7-highspeed":131072,"minimax-m2.5":131072,"minimax-m2.5-highspeed":131072,"minimax-m2.1":131072,"minimax-m2.1-highspeed":131072,"MiniMax-M2":131072,"MiniMax-Text-01":65536,"MiniMax-Text-01-Preview":65536,"MiniMax-Vision-01":16384,"MiniMax-Vision-01-Fast":16384,"google/gemini-2.0-flash":8192,"google/gemini-2.5-pro":65536,"gemini-2.0-flash":8192,"gemini-2.5-pro":65536,"gemini-2.5-flash":65536,"gemini-3.1-pro":65536,"gemini-3.1-flash-lite-preview":65536,"llama3.3:70b":4096,"llama3.1:8b":4096,"llama3.2:3b":4096,"qwen2.5-coder:32b":8192,"qwen2.5-coder:7b":8192,"deepseek-coder-v2:16b":8192,"deepseek-r1:14b":8192,"mistral:7b":4096,"phi4:14b":4096,"gemma2:27b":4096,"codellama:13b":4096,"llama3.2:1b":4096,"qwen3:8b":8192,codestral:8192,"nvidia/llama-3.1-nemotron-70b-instruct":32768,"nvidia/nemotron-mini-4b-instruct":8192,"meta/llama-3.1-405b-instruct":32768,"meta/llama-3.1-70b-instruct":32768,"meta/llama-3.2-90b-instruct":32768,"meta/llama-3.3-70b-instruct":32768,"google/gemma-2-27b-it":4096,"google/gemma-3-27b-it":16384,"google/gemma-3-12b-it":16384,"deepseek-ai/deepseek-r1":32768,"deepseek-ai/deepseek-v3":32768,"deepseek-ai/deepseek-v3.2":32768,"qwen/qwen3-32b":32768,"qwen/qwen2.5-7b-instruct":8192,"mistralai/mistral-large-3-675b-instruct-2512":32768,"mistralai/mixtral-8x7b-instruct-v0.1":8192,"microsoft/phi-4-mini-instruct":4096,"microsoft/phi-3.5-mini-instruct":4096,"ibm/granite-3.3-8b-instruct":4096,"z-ai/glm5":32768,"moonshotai/kimi-k2.5":32768,"databricks/dbrx-instruct":32768,"ai21labs/jamba-1.5-large-instruct":32768,"01-ai/yi-large":8192,"qwen3.6-plus":65536,"qwen3.5-plus":65536,"qwen3-coder-plus":65536,"qwen3-coder-next":65536,"qwen3-max":32768,"qwen3-max-2026-01-23":32768,"kimi-k2.5":32768,"glm-5":16384,"glm-4.7":16384,"kimi-for-coding":32768,"kimi-k2.6":32768,"kimi-k2":32768,"kimi-k2-instruct":32768,"kimi-k2-thinking":32768,"moonshot-v1-8k":4096,"moonshot-v1-32k":16384,"moonshot-v1-128k":32768},EZ=(()=>{try{let Z=process.env.CLAUDE_CODE_OPENAI_CONTEXT_WINDOWS;if(Z){let $=JSON.parse(Z);if(typeof $==="object"&&$!==null)return $}}catch{}return{}})(),_Z=(()=>{try{let Z=process.env.CLAUDE_CODE_OPENAI_MAX_OUTPUT_TOKENS;if(Z){let $=JSON.parse(Z);if(typeof $==="object"&&$!==null)return $}}catch{}return{}})()});function D4(){let Z=L()?.transport;return Z==="openai_compat"||Z==="gemini"||Z==="mistral"||Z==="github_copilot"||Z==="codex_responses"}function V0(){return F(process.env.CLAUDE_CODE_DISABLE_1M_CONTEXT)}function s(Z){if(V0())return!1;return/\[1m\]/i.test(Z)}function q5(Z){if(V0())return!1;let $=U(Z);return $.includes("claude-sonnet-5")||$.includes("claude-sonnet-4")||$.includes("opus-4-6")||$.includes("opus-4-7")||$.includes("opus-4-8")||$.includes("fable-5")}function p9(Z,$){if(s(Z))return 1e6;if(D4()){let Q=F4(Z);if(Q!==void 0)return Q;return console.error(`[context] Warning: model "${Z}" not in context window table — using conservative 128k default. `+"Add it to src/utils/model/openaiContextWindows.ts for accurate compaction."),vZ}let J=z5(Z);if(J?.max_input_tokens&&J.max_input_tokens>=1e5){if(J.max_input_tokens>G5&&V0())return G5;return J.max_input_tokens}if(!V0()&&(U(Z).includes("fable-5")||U(Z).includes("sonnet-5")))return 1e6;if($?.includes(S0)&&q5(Z))return 1e6;if(TZ(Z))return 1e6;return G5}function TZ(Z){if(V0())return!1;if(s(Z))return!1;if(!U(Z).includes("sonnet-4-6"))return!1;return K().clientDataCache?.coral_reef_sonnet==="true"}function m9(Z,$){if(!Z)return{used:null,remaining:null};let J=Z.input_tokens+Z.cache_creation_input_tokens+Z.cache_read_input_tokens,Q=Math.round(J/$*100),X=Math.min(100,Math.max(0,Q));return{used:X,remaining:100-X}}function c9(Z){let $,J;if(D4()){let Y=K4(Z);if(Y!==void 0)return{default:Y,upperLimit:Y}}let Q=U(Z);if(Q.includes("fable-5")||Q.includes("opus-4-7")||Q.includes("opus-4-6"))$=64000,J=128000;else if(Q.includes("sonnet-4-6"))$=32000,J=128000;else if(Q.includes("opus-4-5")||Q.includes("sonnet-4")||Q.includes("haiku-4"))$=32000,J=64000;else if(Q.includes("opus-4-1")||Q.includes("opus-4"))$=32000,J=32000;else if(Q.includes("claude-3-opus"))$=4096,J=4096;else if(Q.includes("claude-3-sonnet"))$=8192,J=8192;else if(Q.includes("claude-3-haiku"))$=4096,J=4096;else if(Q.includes("3-5-sonnet")||Q.includes("3-5-haiku"))$=8192,J=8192;else if(Q.includes("3-7-sonnet"))$=32000,J=64000;else $=yZ,J=IZ;let X=z5(Z);if(X?.max_tokens&&X.max_tokens>=4096)J=X.max_tokens,$=Math.min($,J);return{default:$,upperLimit:J}}var G5=200000,vZ,f9=20000,yZ=32000,IZ=64000,u9=8000,g9=64000;var V5=R(()=>{e2();$0();l();g();F0();q4();L4();vZ=(()=>{let Z=parseInt(process.env.CLAUDE_CODE_OPENAI_FALLBACK_CONTEXT_WINDOW??"",10);return!isNaN(Z)&&Z>0?Z:128000})()});var MZ,N4;var U4=R(()=>{i0();i();MZ=[{modelEnvVar:"ANTHROPIC_DEFAULT_OPUS_MODEL",capabilitiesEnvVar:"ANTHROPIC_DEFAULT_OPUS_MODEL_SUPPORTED_CAPABILITIES"},{modelEnvVar:"ANTHROPIC_DEFAULT_SONNET_MODEL",capabilitiesEnvVar:"ANTHROPIC_DEFAULT_SONNET_MODEL_SUPPORTED_CAPABILITIES"},{modelEnvVar:"ANTHROPIC_DEFAULT_HAIKU_MODEL",capabilitiesEnvVar:"ANTHROPIC_DEFAULT_HAIKU_MODEL_SUPPORTED_CAPABILITIES"}],N4=I((Z,$)=>{if(W()==="firstParty")return;let J=Z.toLowerCase();for(let Q of MZ){let X=process.env[Q.modelEnvVar],Y=process.env[Q.capabilitiesEnvVar];if(!X||Y===void 0)continue;if(J!==X.toLowerCase())continue;return Y.toLowerCase().split(",").map((q)=>q.trim()).includes($)}return},(Z,$)=>`${Z.toLowerCase()}:${$}`)});function SZ(Z){let $=[],J=[];for(let Q of Z)if(E4.includes(Q))$.push(Q);else J.push(Q);return{allowed:$,disallowed:J}}function VQ(Z){if(!Z||Z.length===0)return;if(O()){console.warn("Warning: Custom betas are only available for API key users. Ignoring provided betas.");return}let{allowed:$,disallowed:J}=SZ(Z);for(let Q of J)console.warn(`Warning: Beta header '${Q}' is not allowed. Only the following betas are supported: ${E4.join(", ")}`);return $.length>0?$:void 0}function b4(Z){let $=N4(Z,"interleaved_thinking");if($!==void 0)return $;let J=U(Z),Q=W();if(Q==="foundry")return!0;if(Q==="firstParty")return!J.includes("claude-3-");return J.includes("claude-opus-4")||J.includes("claude-sonnet-5")||J.includes("claude-sonnet-4")}function CZ(Z){let $=U(Z);return $.includes("claude-opus-4")||$.includes("claude-sonnet-5")||$.includes("claude-sonnet-4")||$.includes("claude-haiku-4")}function AZ(Z){let $=U(Z),J=W();if(J==="foundry")return!0;if(J==="firstParty")return!$.includes("claude-3-");return $.includes("claude-opus-4")||$.includes("claude-sonnet-5")||$.includes("claude-sonnet-4")||$.includes("claude-haiku-4")}function hZ(Z){let $=U(Z),J=W();if(J!=="firstParty"&&J!=="foundry")return!1;return $.includes("claude-fable-5")||$.includes("claude-sonnet-5")||$.includes("claude-sonnet-4-6")||$.includes("claude-sonnet-4-5")||$.includes("claude-opus-4-1")||$.includes("claude-opus-4-5")||$.includes("claude-opus-4-6")||$.includes("claude-opus-4-7")||$.includes("claude-opus-4-8")||$.includes("claude-haiku-4-5")}function WQ(Z){let $=U(Z);if(!$.startsWith("claude-"))return!1;if($.includes("claude-3-"))return!1;if(/claude-(opus|sonnet|haiku)-4(?!-[6-9])/.test($))return!1;return!0}function zQ(){let Z=W();if(Z==="vertex"||Z==="bedrock")return U1;return N1}function O4(){return(W()==="firstParty"||W()==="foundry")&&!F(process.env.CLAUDE_CODE_DISABLE_EXPERIMENTAL_BETAS)}function GQ(){if(F(process.env.CLAUDIN_DISABLE_GLOBAL_CACHE_SCOPE))return!1;return W()==="firstParty"&&!F(process.env.CLAUDE_CODE_DISABLE_EXPERIMENTAL_BETAS)}function xQ(Z,$){let J=[..._4(Z)];if($?.isAgenticQuery){if(!J.includes(G2))J.push(G2)}let Q=k4();if(!Q||Q.length===0)return J;return[...J,...Q.filter((X)=>!J.includes(X))]}function v4(){x5.cache?.clear?.(),_4.cache?.clear?.(),fZ.cache?.clear?.()}var E4,x5,_4,fZ;var y4=R(()=>{i0();v1();J0();e2();M0();n();V5();g();F0();U4();i();B0();E4=[S0];x5=I((Z)=>{let $=[],J=U(Z).includes("haiku"),Q=W(),X=O4();if(!J)$.push(G2);if(O())$.push(j0);if(s(Z))$.push(S0);if(!F(process.env.DISABLE_INTERLEAVED_THINKING)&&b4(Z))$.push(K1);if(X&&b4(Z)&&!f()&&Q0().showThinkingSummaries!==!0)$.push(O1),$.push(k1);let Y=AZ(Z);if(O4()&&Y)$.push(L1);let q=P4("tengu_tool_pear"),V=!q&&(F(process.env.CLAUDE_CODE_JSON_TOOL_USE)||A0("tengu_amber_json_tools",!1));if(X&&hZ(Z)&&q)$.push(D1);if(X&&V)$.push(P1);if(Q==="vertex"&&CZ(Z))$.push(o2);if(Q==="foundry")$.push(o2);if(X)$.push(b1);if(process.env.ANTHROPIC_BETAS)$.push(...process.env.ANTHROPIC_BETAS.split(",").map((G)=>G.trim()).filter(Boolean));return $}),_4=I((Z)=>{let $=x5(Z);if(W()==="bedrock")return $.filter((J)=>!r2.has(J));return $}),fZ=I((Z)=>{return x5(Z).filter((J)=>r2.has(J))})});import{execFile as uZ}from"child_process";function I4(Z){return new Promise(($)=>{uZ("security",["find-generic-password","-a",K2(),"-w","-s",Z],{encoding:"utf-8",timeout:gZ},(J,Q)=>{$({stdout:J?null:Q?.trim()||null,timedOut:Boolean(J&&"killed"in J&&J.killed)})})})}function wQ(){if(process.platform!=="darwin"||F2||u())return;let Z=I4(a(T4)),$=I4(a());F2=Promise.all([Z,$]).then(([J,Q])=>{if(!J.timedOut)M4(J.stdout);if(!Q.timedOut)B5={stdout:Q.stdout}})}async function FQ(){if(F2)await F2}function S4(){return B5}function j5(){B5=null}var gZ=1e4,B5=null,F2=null;var C4=R(()=>{g();a2()});function H5(Z,$,J){return new Promise((Q,X)=>{if($?.aborted){if(J?.throwOnAbort||J?.abortError)X(J.abortError?.()??Error("aborted"));else Q();return}let Y=setTimeout((V,G,B)=>{V?.removeEventListener("abort",G),B()},Z,$,q,Q);function q(){if(clearTimeout(Y),J?.throwOnAbort||J?.abortError)X(J.abortError?.()??Error("aborted"));else Q()}if($?.addEventListener("abort",q,{once:!0}),J?.unref)Y.unref()})}var A4=()=>{};function DQ(){return h4}function f4(){h4.clear()}var h4;var u4=R(()=>{h4=new Map});var y$={};c2(y$,{validateForceLoginOrg:()=>v$,saveOAuthTokensIfNeeded:()=>J8,saveApiKey:()=>v5,removeApiKey:()=>w$,refreshGcpCredentialsIfNeeded:()=>_5,refreshGcpAuth:()=>Z8,refreshAwsAuth:()=>r4,refreshAndGetAwsCredentials:()=>z0,prefetchGcpCredentialsIfSafe:()=>B$,prefetchAwsCredentialsAndBedRockInfoIfSafe:()=>j$,prefetchApiKeyFromApiKeyHelperIfSafe:()=>$$,isUsing3PServices:()=>U2,isTeamSubscriber:()=>U$,isTeamPremiumSubscriber:()=>w2,isProSubscriber:()=>W5,isOverageProvisioningAllowed:()=>D$,isOtelHeadersHelperFromProjectOrLocalSettings:()=>q8,isMaxSubscriber:()=>R2,isGcpAuthRefreshFromProjectSettings:()=>E5,isEnterpriseSubscriber:()=>b$,isCustomApiKeyApproved:()=>R$,isConsumerSubscriber:()=>E$,isClaudeAISubscriber:()=>O,isAwsCredentialExportFromProjectSettings:()=>k5,isAwsAuthRefreshFromProjectSettings:()=>b5,isAnthropicAuthEnabled:()=>P0,is1PApiCustomer:()=>L$,hasProfileScope:()=>q0,hasOpusAccess:()=>N$,hasAnthropicApiKeyAuth:()=>oZ,handleOAuth401Error:()=>J5,getSubscriptionType:()=>v,getSubscriptionName:()=>X8,getRateLimitTier:()=>Q8,getOtelHeadersFromHelper:()=>k$,getOauthAccountInfo:()=>N2,getConfiguredApiKeyHelper:()=>o,getClaudeAIOAuthTokensAsync:()=>c0,getClaudeAIOAuthTokens:()=>w,getAuthTokenSource:()=>T0,getApiKeyHelperElapsedMs:()=>rZ,getApiKeyFromConfigOrMacOSKeychain:()=>O2,getApiKeyFromApiKeyHelperCached:()=>w5,getApiKeyFromApiKeyHelper:()=>o4,getAnthropicApiKeyWithSource:()=>n0,getAnthropicApiKey:()=>X0,getAccountInformation:()=>_$,clearOAuthTokenCache:()=>y5,clearGcpCredentialsCache:()=>x$,clearAwsCredentialsCache:()=>q$,clearApiKeyHelperCache:()=>Z$,checkGcpCredentialsValid:()=>e4,checkAndRefreshOAuthTokenIfNeeded:()=>t0,calculateApiKeyHelperTTL:()=>s4});import{exec as i4}from"child_process";import{mkdir as lZ,stat as iZ}from"fs/promises";import{join as aZ}from"path";function D2(){return F(process.env.CLAUDE_CODE_REMOTE)||process.env.CLAUDE_CODE_ENTRYPOINT==="claude-desktop"}function P0(){if(u())return!1;if(process.env.ANTHROPIC_UNIX_SOCKET)return!!process.env.CLAUDE_CODE_OAUTH_TOKEN;let Z=U2(),J=(M()||{}).apiKeyHelper,Q=process.env.ANTHROPIC_AUTH_TOKEN||J||process.env.CLAUDE_CODE_API_KEY_FILE_DESCRIPTOR,X;try{({source:X}=n0({skipRetrievingKeyFromApiKeyHelper:!0}))}catch{X="none"}let Y=X==="ANTHROPIC_API_KEY"||X==="apiKeyHelper";return!(Z||Q&&!D2()||Y&&!D2())}function T0(){if(u()){if(o())return{source:"apiKeyHelper",hasToken:!0};return{source:"none",hasToken:!1}}if(process.env.ANTHROPIC_AUTH_TOKEN&&!D2())return{source:"ANTHROPIC_AUTH_TOKEN",hasToken:!0};if(process.env.CLAUDE_CODE_OAUTH_TOKEN)return{source:"CLAUDE_CODE_OAUTH_TOKEN",hasToken:!0};if(W2()){if(process.env.CLAUDE_CODE_OAUTH_TOKEN_FILE_DESCRIPTOR)return{source:"CLAUDE_CODE_OAUTH_TOKEN_FILE_DESCRIPTOR",hasToken:!0};return{source:"CCR_OAUTH_TOKEN_FILE",hasToken:!0}}if(o()&&!D2())return{source:"apiKeyHelper",hasToken:!0};let J=w();if(k0(J?.scopes)&&J?.accessToken)return{source:"claude.ai",hasToken:!0};return{source:"none",hasToken:!1}}function X0(){let{key:Z}=n0();return Z}function oZ(){try{let{key:Z,source:$}=n0({skipRetrievingKeyFromApiKeyHelper:!0});return Z!==null&&$!=="none"}catch{return!1}}function n0(Z={}){let $=(()=>{let q=L();if(q?.transport!=="anthropic")return;let V=q.apiKey?.trim();return V&&V.length>0?V:void 0})();if(u()){if($)return{key:$,source:"ANTHROPIC_API_KEY"};if(o())return{key:Z.skipRetrievingKeyFromApiKeyHelper?null:w5(),source:"apiKeyHelper"};return{key:null,source:"none"}}let J=c4()?void 0:$;if(x2()&&J)return{key:J,source:"ANTHROPIC_API_KEY"};if(F(process.env.CI)){let q=i2();if(q)return{key:q,source:"ANTHROPIC_API_KEY"};if(!U2()&&!J&&!process.env.CLAUDE_CODE_OAUTH_TOKEN&&!process.env.CLAUDE_CODE_OAUTH_TOKEN_FILE_DESCRIPTOR)throw Error("Configure an Anthropic profile via /provider or set CLAUDE_CODE_OAUTH_TOKEN");if(J&&!U2())return{key:J,source:"ANTHROPIC_API_KEY"};return{key:null,source:"none"}}if(J&&K().customApiKeyResponses?.approved?.includes(z2(J)))return{key:J,source:"ANTHROPIC_API_KEY"};let Q=i2();if(Q)return{key:Q,source:"ANTHROPIC_API_KEY"};if(o()){if(Z.skipRetrievingKeyFromApiKeyHelper)return{key:null,source:"apiKeyHelper"};return{key:w5(),source:"apiKeyHelper"}}let Y=O2();if(Y)return Y;return{key:null,source:"none"}}function o(){if(u())return P("flagSettings")?.apiKeyHelper;return(M()||{}).apiKeyHelper}function a4(){let Z=o();if(!Z)return!1;let $=P("projectSettings"),J=P("localSettings");return $?.apiKeyHelper===Z||J?.apiKeyHelper===Z}function U5(){return(M()||{}).awsAuthRefresh}function b5(){let Z=U5();if(!Z)return!1;let $=P("projectSettings"),J=P("localSettings");return $?.awsAuthRefresh===Z||J?.awsAuthRefresh===Z}function O5(){return(M()||{}).awsCredentialExport}function k5(){let Z=O5();if(!Z)return!1;let $=P("projectSettings"),J=P("localSettings");return $?.awsCredentialExport===Z||J?.awsCredentialExport===Z}function s4(){let Z=process.env.CLAUDE_CODE_API_KEY_HELPER_TTL_MS;if(Z){let $=parseInt(Z,10);if(!Number.isNaN($)&&$>=0)return $;z(`Found CLAUDE_CODE_API_KEY_HELPER_TTL_MS env var, but it was not a valid number. Got ${Z}`,{level:"error"})}return sZ}function rZ(){let Z=c?.startedAt;return Z?Date.now()-Z:0}async function o4(Z){if(!o())return null;let $=s4();if(y){if(Date.now()-y.timestamp<$)return y.value;if(!c)c={promise:g4(Z,!1,O0),startedAt:null};return y.value}if(c)return c.promise;return c={promise:g4(Z,!0,O0),startedAt:Date.now()},c.promise}async function g4(Z,$,J){try{let Q=await eZ(Z);if(J!==O0)return Q;if(Q!==null)y={value:Q,timestamp:Date.now()};return Q}catch(Q){if(J!==O0)return" ";let X=Q instanceof Error?Q.message:String(Q);if(console.error(h.red(`apiKeyHelper failed: ${X}`)),z(`Error getting API key from apiKeyHelper: ${X}`,{level:"error"}),!$&&y&&y.value!==" ")return y={...y,timestamp:Date.now()},y.value;return y={value:" ",timestamp:Date.now()}," "}finally{if(J===O0)c=null}}async function eZ(Z){let $=o();if(!$)return null;if(a4()){if(!d()&&!Z){let Y=Error(`Security: apiKeyHelper executed before workspace trust is confirmed. If you see this message, post in ${MACRO.FEEDBACK_CHANNEL}.`);return d0("apiKeyHelper invoked before trust check",Y),x("tengu_apiKeyHelper_missing_trust11",{}),null}}let J=await R0($,{shell:!0,timeout:600000,reject:!1});if(J.failed){let X=J.timedOut?"timed out":`exited ${J.exitCode}`,Y=J.stderr?.trim();throw Error(Y?`${X}: ${Y}`:X)}let Q=J.stdout?.trim();if(!Q)throw Error("did not return a value");return Q}function w5(){return y?.value??null}function Z$(){O0++,y=null,c=null}function $$(Z){if(a4()&&!d())return;o4(Z)}async function Q$(){let Z=U5();if(!Z)return!1;if(b5()){if(!d()&&!f()){let J=Error(`Security: awsAuthRefresh executed before workspace trust is confirmed. If you see this message, post in ${MACRO.FEEDBACK_CHANNEL}.`);return d0("awsAuthRefresh invoked before trust check",J),x("tengu_awsAuthRefresh_missing_trust",{}),!1}}try{return z("Fetching AWS caller identity for AWS auth refresh command"),await s2(),z("Fetched AWS caller identity, skipping AWS auth refresh command"),!1}catch{return r4(Z)}}function r4(Z){z("Running AWS auth refresh command");let $=S.getInstance();return $.startAuthentication(),new Promise((J)=>{let Q=i4(Z,{timeout:X$});Q.stdout.on("data",(X)=>{let Y=X.toString().trim();if(Y)$.addOutput(Y),z(Y,{level:"debug"})}),Q.stderr.on("data",(X)=>{let Y=X.toString().trim();if(Y)$.setError(Y),z(Y,{level:"error"})}),Q.on("close",(X,Y)=>{if(X===0)z("AWS auth refresh completed successfully"),$.endAuthentication(!0),J(!0);else{let V=Y==="SIGTERM"?h.red("AWS auth refresh timed out after 3 minutes. Run your auth command manually in a separate terminal."):h.red("Error running awsAuthRefresh (in settings or ~/.claudin/config.json):");console.error(V),$.endAuthentication(!1),J(!1)}})})}async function Y$(){let Z=O5();if(!Z)return null;if(k5()){if(!d()&&!f()){let J=Error(`Security: awsCredentialExport executed before workspace trust is confirmed. If you see this message, post in ${MACRO.FEEDBACK_CHANNEL}.`);return d0("awsCredentialExport invoked before trust check",J),x("tengu_awsCredentialExport_missing_trust",{}),null}}try{return z("Fetching AWS caller identity for credential export command"),await s2(),z("Fetched AWS caller identity, skipping AWS credential export command"),null}catch{try{z("Running AWS credential export command");let $=await R0(Z,{shell:!0,reject:!1});if($.exitCode!==0||!$.stdout)throw Error("awsCredentialExport did not return a valid value");let J=L5($.stdout.trim());if(!j1(J))throw Error("awsCredentialExport did not return valid AWS STS output structure");return z("AWS credentials retrieved from awsCredentialExport"),{accessKeyId:J.Credentials.AccessKeyId,secretAccessKey:J.Credentials.SecretAccessKey,sessionToken:J.Credentials.SessionToken}}catch($){let J=h.red("Error getting AWS credentials from awsCredentialExport (in settings or ~/.claudin/config.json):");if($ instanceof Error)console.error(J,$.message);else console.error(J,$);return null}}}function q$(){z0.cache.clear()}function P5(){return(M()||{}).gcpAuthRefresh}function E5(){let Z=P5();if(!Z)return!1;let $=P("projectSettings"),J=P("localSettings");return $?.gcpAuthRefresh===Z||J?.gcpAuthRefresh===Z}async function e4(){try{let{GoogleAuth:Z}=await import("google-auth-library"),$=new Z({scopes:["https://www.googleapis.com/auth/cloud-platform"]}),J=(async()=>{await(await $.getClient()).getAccessToken()})(),Q=H5(V$).then(()=>{throw new V8("GCP credentials check timed out")});return await Promise.race([J,Q]),!0}catch{return!1}}async function z$(){let Z=P5();if(!Z)return!1;if(E5()){if(!d()&&!f()){let J=Error(`Security: gcpAuthRefresh executed before workspace trust is confirmed. If you see this message, post in ${MACRO.FEEDBACK_CHANNEL}.`);return d0("gcpAuthRefresh invoked before trust check",J),x("tengu_gcpAuthRefresh_missing_trust",{}),!1}}try{if(z("Checking GCP credentials validity for auth refresh"),await e4())return z("GCP credentials are valid, skipping auth refresh command"),!1}catch{}return Z8(Z)}function Z8(Z){z("Running GCP auth refresh command");let $=S.getInstance();return $.startAuthentication(),new Promise((J)=>{let Q=i4(Z,{timeout:G$});Q.stdout.on("data",(X)=>{let Y=X.toString().trim();if(Y)$.addOutput(Y),z(Y,{level:"debug"})}),Q.stderr.on("data",(X)=>{let Y=X.toString().trim();if(Y)$.setError(Y),z(Y,{level:"error"})}),Q.on("close",(X,Y)=>{if(X===0)z("GCP auth refresh completed successfully"),$.endAuthentication(!0),J(!0);else{let V=Y==="SIGTERM"?h.red("GCP auth refresh timed out after 3 minutes. Run your auth command manually in a separate terminal."):h.red("Error running gcpAuthRefresh (in settings or ~/.claudin/config.json):");console.error(V),$.endAuthentication(!1),J(!1)}})})}function x$(){_5.cache.clear()}function B$(){if(!P5())return;if(E5()){if(!d()&&!f())return}_5()}function j$(){let Z=U5(),$=O5();if(!Z&&!$)return;if(b5()||k5()){if(!d()&&!f())return}z0(),j()}function H$(Z){return/^[a-zA-Z0-9-_]+$/.test(Z)}async function v5(Z){if(!H$(Z))throw Error("Invalid API key format. API key must contain only alphanumeric characters, dashes, and underscores.");await $8();let $=!1;if(process.platform==="darwin")try{let Q=a(),X=K2(),Y=Buffer.from(Z,"utf-8").toString("hex"),q=`add-generic-password -U -a "${X}" -s "${Q}" -X "${Y}"
2
+ `;await R0("security",["-i"],{input:q,reject:!1}),x("tengu_api_key_saved_to_keychain",{}),$=!0}catch(Q){N(Q),x("tengu_api_key_keychain_error",{error:p(Q)}),x("tengu_api_key_saved_to_config",{})}else x("tengu_api_key_saved_to_config",{});let J=z2(Z);C((Q)=>{let X=Q.customApiKeyResponses?.approved??[];return{...Q,primaryApiKey:$?Q.primaryApiKey:Z,customApiKeyResponses:{...Q.customApiKeyResponses,approved:X.includes(J)?X:[...X,J],rejected:Q.customApiKeyResponses?.rejected??[]}}}),O2.cache.clear?.(),j5()}function R$(Z){let $=K(),J=z2(Z);return $.customApiKeyResponses?.approved?.includes(J)??!1}async function w$(){await $8(),C((Z)=>({...Z,primaryApiKey:void 0})),O2.cache.clear?.(),j5()}async function $8(){try{await x1()}catch(Z){N(Z)}}function J8(Z){if(!k0(Z.scopes))return x("tengu_oauth_tokens_not_claude_ai",{}),{success:!0};if(!Z.refreshToken||!Z.expiresAt)return x("tengu_oauth_tokens_inference_only",{}),{success:!0};let $=b2(),J=$.name;try{let Q=$.read()||{},X=Q.claudeAiOauth;Q.claudeAiOauth={accessToken:Z.accessToken,refreshToken:Z.refreshToken,expiresAt:Z.expiresAt,scopes:Z.scopes,subscriptionType:Z.subscriptionType??X?.subscriptionType??null,rateLimitTier:Z.rateLimitTier??X?.rateLimitTier??null};let Y=$.update(Q);if(Y.success)x("tengu_oauth_tokens_saved",{storageBackend:J});else x("tengu_oauth_tokens_save_failed",{storageBackend:J});return w.cache?.clear?.(),v4(),f4(),Y}catch(Q){return N(Q),x("tengu_oauth_tokens_save_exception",{storageBackend:J,error:p(Q)}),{success:!1,warning:"Failed to save OAuth tokens"}}}function y5(){w.cache?.clear?.(),b0()}async function F$(){try{let{mtimeMs:Z}=await iZ(aZ(K5(),".credentials.json"));if(Z!==p4)p4=Z,y5()}catch{w.cache?.clear?.()}}function J5(Z){let $=R5.get(Z);if($)return $;let J=K$(Z).finally(()=>{R5.delete(Z)});return R5.set(Z,J),J}async function K$(Z){y5();let $=await c0();if(!$?.refreshToken)return!1;if($.accessToken!==Z)return x("tengu_oauth_401_recovered_from_keychain",{}),!0;return t0(0,!0)}async function c0(){if(u())return null;if(process.env.CLAUDE_CODE_OAUTH_TOKEN||W2())return w();try{let J=(await b2().readAsync())?.claudeAiOauth;if(!J?.accessToken)return null;return J}catch(Z){return N(Z),null}}function t0(Z=0,$=!1){if(Z===0&&!$){if(p0)return p0;return p0=F5(Z,$).finally(()=>{p0=null}),p0}return F5(Z,$)}async function F5(Z,$){await F$();let Q=w();if(!$){if(!Q?.refreshToken||!m0(Q.expiresAt))return!1}if(!Q?.refreshToken)return!1;if(!k0(Q.scopes))return!1;w.cache?.clear?.(),b0();let X=await c0();if(!X?.refreshToken||!m0(X.expiresAt))return!1;let Y=K5();await lZ(Y,{recursive:!0});let q;try{x("tengu_oauth_token_refresh_lock_acquiring",{}),q=await n4(Y),x("tengu_oauth_token_refresh_lock_acquired",{})}catch(V){if(V.code==="ELOCKED"){if(Z<5)return x("tengu_oauth_token_refresh_lock_retry",{retryCount:Z+1}),await H5(1000+Math.random()*1000),F5(Z+1,$);return x("tengu_oauth_token_refresh_lock_retry_limit_reached",{maxRetries:5}),!1}return N(V),x("tengu_oauth_token_refresh_lock_error",{error:p(V)}),!1}try{w.cache?.clear?.(),b0();let V=await c0();if(!V?.refreshToken||!m0(V.expiresAt))return x("tengu_oauth_token_refresh_race_resolved",{}),!1;x("tengu_oauth_token_refresh_starting",{});let G=await t4(V.refreshToken,{scopes:k0(V.scopes)?void 0:V.scopes});return J8(G),w.cache?.clear?.(),b0(),!0}catch(V){N(V),w.cache?.clear?.(),b0();let G=await c0();if(G&&!m0(G.expiresAt))return x("tengu_oauth_token_refresh_race_recovered",{}),!0;return!1}finally{x("tengu_oauth_token_refresh_lock_releasing",{}),await q(),x("tengu_oauth_token_refresh_lock_released",{})}}function O(){if(!P0())return!1;return k0(w()?.scopes)}function q0(){return w()?.scopes?.includes(d4)??!1}function L$(){{let Z=L()?.transport;if(Z==="bedrock"||Z==="vertex"||Z==="foundry")return!1}if(O())return!1;return!0}function N2(){return P0()?K().oauthAccount:void 0}function D$(){let $=N2()?.billingType;if(!O()||!$)return!1;if($!=="stripe_subscription"&&$!=="stripe_subscription_contracted"&&$!=="apple_subscription"&&$!=="google_play_subscription")return!1;return!0}function N$(){let Z=v();return Z==="max"||Z==="enterprise"||Z==="team"||Z==="pro"||Z===null}function v(){if(e5())return r5();if(!P0())return null;let Z=w();if(!Z)return null;return Z.subscriptionType??null}function R2(){return v()==="max"}function U$(){return v()==="team"}function w2(){return v()==="team"&&Q8()==="default_claude_max_5x"}function b$(){return v()==="enterprise"}function W5(){return v()==="pro"}function Q8(){if(!P0())return null;let Z=w();if(!Z)return null;return Z.rateLimitTier??null}function X8(){switch(v()){case"enterprise":return"Claude Enterprise";case"team":return"Claude Team";case"max":return"Claude Max";case"pro":return"Claude Pro";default:return"Claude API"}}function U2(){let Z=L()?.transport;if(!Z)return!1;return Z!=="anthropic"}function Y8(){return(M()||{}).otelHeadersHelper}function q8(){let Z=Y8();if(!Z)return!1;let $=P("projectSettings"),J=P("localSettings");return $?.otelHeadersHelper===Z||J?.otelHeadersHelper===Z}function k$(){let Z=Y8();if(!Z)return{};let $=parseInt(process.env.CLAUDE_CODE_OTEL_HEADERS_HELPER_DEBOUNCE_MS||O$.toString());if(L2&&Date.now()-m4<$)return L2;if(q8()){if(!d())return{}}try{let J=D5(Z,{timeout:30000})?.toString().trim();if(!J)throw Error("otelHeadersHelper did not return a valid value");let Q=L5(J);if(typeof Q!=="object"||Q===null||Array.isArray(Q))throw Error("otelHeadersHelper must return a JSON object with string key-value pairs");for(let[X,Y]of Object.entries(Q))if(typeof Y!=="string")throw Error(`otelHeadersHelper returned non-string value for key "${X}": ${typeof Y}`);return L2=Q,m4=Date.now(),L2}catch(J){throw N(Error(`Error getting OpenTelemetry headers from otelHeadersHelper (in settings): ${p(J)}`)),J}}function P$(Z){return Z==="max"||Z==="pro"}function E$(){let Z=v();return O()&&Z!==null&&P$(Z)}function _$(){if(W()!=="firstParty")return;let{source:$}=T0(),J={};if($==="CLAUDE_CODE_OAUTH_TOKEN"||$==="CLAUDE_CODE_OAUTH_TOKEN_FILE_DESCRIPTOR")J.tokenSource=$;else if(O())J.subscription=X8();else J.tokenSource=$;let{key:Q,source:X}=n0();if(Q)J.apiKeySource=X;if($==="claude.ai"||X==="/login managed key"){let q=N2()?.organizationName;if(q)J.organization=q}let Y=N2()?.emailAddress;if(($==="claude.ai"||X==="/login managed key")&&Y)J.email=Y;return J}async function v$(){if(process.env.ANTHROPIC_UNIX_SOCKET)return{valid:!0};if(!P0())return{valid:!0};let Z=P("policySettings")?.forceLoginOrgUUID;if(!Z)return{valid:!0};await t0();let $=w();if(!$)return{valid:!0};let{source:J}=T0(),Q=J==="CLAUDE_CODE_OAUTH_TOKEN"||J==="CLAUDE_CODE_OAUTH_TOKEN_FILE_DESCRIPTOR",X=await H0($.accessToken);if(!X)return{valid:!1,message:`Unable to verify organization for the current authentication token.
3
+ This machine requires organization ${Z} but the profile could not be fetched.
4
+ This may be a network error, or the token may lack the user:profile scope required for
5
+ verification (tokens from 'claude setup-token' do not include this scope).
6
+ Try again, or obtain a full-scope token via 'claude auth login'.`};let Y=X.organization.uuid;if(Y===Z)return{valid:!0};if(Q)return{valid:!1,message:`The ${J==="CLAUDE_CODE_OAUTH_TOKEN"?"CLAUDE_CODE_OAUTH_TOKEN":"CLAUDE_CODE_OAUTH_TOKEN_FILE_DESCRIPTOR"} environment variable provides a token for a
7
+ different organization than required by this machine's managed settings.
8
+
9
+ Required organization: ${Z}
10
+ Token organization: ${Y}
11
+
12
+ Remove the environment variable or obtain a token for the correct organization.`};return{valid:!1,message:`Your authentication token belongs to organization ${Y},
13
+ but this machine requires organization ${Z}.
14
+
15
+ Please log in with the correct organization: claude auth login`}}var sZ=300000,y=null,c=null,O0=0,J$=3600000,X$=180000,z0,V$=5000,W$=3600000,G$=180000,_5,O2,w,p4=0,R5,p0=null,L2=null,m4=0,O$=1740000,V8;var n=R(()=>{mZ();G1();i0();M0();B2();Y2();i();J0();$0();Z1();l4();t2();z1();B1();R1();F1();y4();l();Z0();g();V1();cZ();nZ();a0();dZ();tZ();C4();a2();B0();A4();pZ();u4();z0=N5(async()=>{let Z=await Q$(),$=await Y$();if(Z||$)await H1();return $},J$);_5=N5(async()=>{return await z$()},W$);O2=I(()=>{if(u())return null;if(process.platform==="darwin"){let $=S4();if($){if($.stdout)return{key:$.stdout,source:"/login managed key"}}else{let J=a();try{let Q=D5(`security find-generic-password -a $USER -w -s "${J}"`);if(Q)return{key:Q,source:"/login managed key"}}catch(Q){N(Q)}}}let Z=K();if(!Z.primaryApiKey)return null;return{key:Z.primaryApiKey,source:"/login managed key"}});w=I(()=>{if(u())return null;if(process.env.CLAUDE_CODE_OAUTH_TOKEN)return{accessToken:process.env.CLAUDE_CODE_OAUTH_TOKEN,refreshToken:null,expiresAt:null,scopes:["user:inference"],subscriptionType:null,rateLimitTier:null};let Z=W2();if(Z)return{accessToken:Z,refreshToken:null,expiresAt:null,scopes:["user:inference"],subscriptionType:null,rateLimitTier:null};try{let Q=b2().read()?.claudeAiOauth;if(!Q?.accessToken)return null;return Q}catch($){return N($),null}});R5=new Map;V8=class V8 extends Error{}});function k0(Z){return Boolean(Z?.includes(I5))}function I$(Z){return Z?.split(" ").filter(Boolean)??[]}function G7({codeChallenge:Z,state:$,port:J,isManual:Q,loginWithClaudeAi:X,inferenceOnly:Y,orgUUID:q,loginHint:V,loginMethod:G}){let B=X?b().CLAUDE_AI_AUTHORIZE_URL:b().CONSOLE_AUTHORIZE_URL,H=new URL(B);H.searchParams.append("code","true"),H.searchParams.append("client_id",b().CLIENT_ID),H.searchParams.append("response_type","code"),H.searchParams.append("redirect_uri",Q?b().MANUAL_REDIRECT_URL:`http://localhost:${J}/callback`);let W0=Y?[I5]:G8;if(H.searchParams.append("scope",W0.join(" ")),H.searchParams.append("code_challenge",Z),H.searchParams.append("code_challenge_method","S256"),H.searchParams.append("state",$),q)H.searchParams.append("orgUUID",q);if(V)H.searchParams.append("login_hint",V);if(G)H.searchParams.append("login_method",G);return H.toString()}async function x7(Z,$,J,Q,X=!1,Y){let q={grant_type:"authorization_code",code:Z,redirect_uri:X?b().MANUAL_REDIRECT_URL:`http://localhost:${Q}/callback`,client_id:b().CLIENT_ID,code_verifier:J,state:$};if(Y!==void 0)q.expires_in=Y;let V=await k.post(b().TOKEN_URL,q,{headers:{"Content-Type":"application/json"},timeout:15000});if(V.status!==200)throw Error(V.status===401?"Authentication failed: Invalid authorization code":`Token exchange failed (${V.status}): ${V.statusText}`);return x("tengu_oauth_token_exchange_success",{}),V.data}async function t4(Z,{scopes:$}={}){let J={grant_type:"refresh_token",refresh_token:Z,client_id:b().CLIENT_ID,scope:(($?.length)?$:z8).join(" ")};try{let Q=await k.post(b().TOKEN_URL,J,{headers:{"Content-Type":"application/json"},timeout:15000});if(Q.status!==200)throw Error(`Token refresh failed: ${Q.statusText}`);let X=Q.data,{access_token:Y,refresh_token:q=Z,expires_in:V}=X,G=Date.now()+V*1000,B=I$(X.scope);x("tengu_oauth_token_refresh_success",{});let H=K(),W0=w(),E=H.oauthAccount?.billingType!==void 0&&H.oauthAccount?.accountCreatedAt!==void 0&&H.oauthAccount?.subscriptionCreatedAt!==void 0&&W0?.subscriptionType!=null&&W0?.rateLimitTier!=null?null:await T$(Y);if(E&&H.oauthAccount){let r={};if(E.displayName!==void 0)r.displayName=E.displayName;if(typeof E.hasExtraUsageEnabled==="boolean")r.hasExtraUsageEnabled=E.hasExtraUsageEnabled;if(E.billingType!==null)r.billingType=E.billingType;if(E.accountCreatedAt!==void 0)r.accountCreatedAt=E.accountCreatedAt;if(E.subscriptionCreatedAt!==void 0)r.subscriptionCreatedAt=E.subscriptionCreatedAt;if(Object.keys(r).length>0)C((l0)=>({...l0,oauthAccount:l0.oauthAccount?{...l0.oauthAccount,...r}:l0.oauthAccount}))}return{accessToken:Y,refreshToken:q,expiresAt:G,scopes:B,subscriptionType:E?.subscriptionType??W0?.subscriptionType??null,rateLimitTier:E?.rateLimitTier??W0?.rateLimitTier??null,profile:E?.rawProfile,tokenAccount:X.account?{uuid:X.account.uuid,emailAddress:X.account.email_address,organizationUuid:X.organization?.uuid}:void 0}}catch(Q){let X=k.isAxiosError(Q)&&Q.response?.data?JSON.stringify(Q.response.data):void 0;throw x("tengu_oauth_token_refresh_failure",{error:Q.message,...X&&{responseBody:X}}),Q}}async function B7(Z){let $=await k.get(b().ROLES_URL,{headers:{Authorization:`Bearer ${Z}`}});if($.status!==200)throw Error(`Failed to fetch user roles: ${$.statusText}`);let J=$.data;if(!K().oauthAccount)throw Error("OAuth account information not found in config");C((X)=>({...X,oauthAccount:X.oauthAccount?{...X.oauthAccount,organizationRole:J.organization_role,workspaceRole:J.workspace_role,organizationName:J.organization_name}:X.oauthAccount})),x("tengu_oauth_roles_stored",{org_role:J.organization_role})}async function j7(Z){try{let $=await k.post(b().API_KEY_URL,null,{headers:{Authorization:`Bearer ${Z}`}}),J=$.data?.raw_key;if(J)return await v5(J),x("tengu_oauth_api_key",{status:"success",statusCode:$.status}),J;return null}catch($){throw x("tengu_oauth_api_key",{status:"failure",error:$ instanceof Error?$.message:String($)}),$}}function m0(Z){if(Z===null)return!1;let $=300000;return Date.now()+$>=Z}async function T$(Z){let $=await H0(Z),J=$?.organization?.organization_type,Q=null;switch(J){case"claude_max":Q="max";break;case"claude_pro":Q="pro";break;case"claude_enterprise":Q="enterprise";break;case"claude_team":Q="team";break;default:Q=null;break}let X={subscriptionType:Q,rateLimitTier:$?.organization?.rate_limit_tier??null,hasExtraUsageEnabled:$?.organization?.has_extra_usage_enabled??null,billingType:$?.organization?.billing_type??null};if($?.account?.display_name)X.displayName=$.account.display_name;if($?.account?.created_at)X.accountCreatedAt=$.account.created_at;if($?.organization?.subscription_created_at)X.subscriptionCreatedAt=$.organization.subscription_created_at;return x("tengu_oauth_profile_fetch_success",{}),{...X,rawProfile:$}}async function H7(){let $=K().oauthAccount?.organizationUuid;if($)return $;let J=w()?.accessToken;if(J===void 0||!q0())return null;let X=(await H0(J))?.organization?.uuid;if(!X)return null;return X}async function R7(){let Z=process.env.CLAUDE_CODE_ACCOUNT_UUID,$=process.env.CLAUDE_CODE_USER_EMAIL,J=process.env.CLAUDE_CODE_ORGANIZATION_UUID,Q=Boolean(Z&&$&&J);if(Z&&$&&J){if(!K().oauthAccount)W8({accountUuid:Z,emailAddress:$,organizationUuid:J})}await t0();let X=K();if(X.oauthAccount&&X.oauthAccount.billingType!==void 0&&X.oauthAccount.accountCreatedAt!==void 0&&X.oauthAccount.subscriptionCreatedAt!==void 0||!O()||!q0())return!1;let Y=w();if(Y?.accessToken){let q=await H0(Y.accessToken);if(q){if(Q)z("OAuth profile fetch succeeded, overriding env var account info",{level:"info"});return W8({accountUuid:q.account.uuid,emailAddress:q.account.email,organizationUuid:q.organization.uuid,displayName:q.account.display_name||void 0,hasExtraUsageEnabled:q.organization.has_extra_usage_enabled??!1,billingType:q.organization.billing_type??void 0,accountCreatedAt:q.account.created_at,subscriptionCreatedAt:q.organization.subscription_created_at??void 0}),!0}}return!1}function W8({accountUuid:Z,emailAddress:$,organizationUuid:J,displayName:Q,hasExtraUsageEnabled:X,billingType:Y,accountCreatedAt:q,subscriptionCreatedAt:V}){let G={accountUuid:Z,emailAddress:$,organizationUuid:J,hasExtraUsageEnabled:X,billingType:Y,accountCreatedAt:q,subscriptionCreatedAt:V};if(Q)G.displayName=Q;C((B)=>{if(B.oauthAccount?.accountUuid===G.accountUuid&&B.oauthAccount?.emailAddress===G.emailAddress&&B.oauthAccount?.organizationUuid===G.organizationUuid&&B.oauthAccount?.displayName===G.displayName&&B.oauthAccount?.hasExtraUsageEnabled===G.hasExtraUsageEnabled&&B.oauthAccount?.billingType===G.billingType&&B.oauthAccount?.accountCreatedAt===G.accountCreatedAt&&B.oauthAccount?.subscriptionCreatedAt===G.subscriptionCreatedAt)return B;return{...B,oauthAccount:G}})}var l4=R(()=>{q2();B2();M0();n();l();Z0();t2()});
16
+ export{wQ as U3,FQ as V3,C4 as W3,T5 as X3,M5 as Y3,g$ as Z3,p$ as _3,B8 as $3,R8 as a4,m$ as b4,h5 as c4,s0 as d4,o0 as e4,G0 as f4,u2 as g4,n2 as h4,U8 as i4,v0 as j4,W as k4,ZJ as l4,$J as m4,JJ as n4,QJ as o4,i as p4,j as q4,BJ as r4,Y2 as s4,FJ as t4,KJ as u4,o5 as v4,UJ as w4,bJ as x4,Z1 as y4,yJ as z4,H0 as A4,t2 as B4,k0 as C4,I$ as D4,G7 as E4,x7 as F4,t4 as G4,B7 as H4,j7 as I4,m0 as J4,T$ as K4,H7 as L4,R7 as M4,W8 as N4,l4 as O4,fJ as P4,C8 as Q4,$1 as R4,z1 as S4,z2 as T4,B1 as U4,dJ as V4,R1 as W4,S as X4,F1 as Y4,S0 as Z4,L1 as _4,D1 as $4,iJ as a5,aJ as b5,b1 as c5,sJ as d5,oJ as e5,O1 as f5,rJ as g5,eJ as h5,Z3 as i5,e2 as j5,A as k5,T1 as l5,u8 as m5,F3 as n5,K3 as o5,L3 as p5,M1 as q5,D3 as r5,N3 as s5,g8 as t5,U3 as u5,b3 as v5,O3 as w5,k3 as x5,P3 as y5,c8 as z5,E3 as A5,_3 as B5,v3 as C5,y3 as D5,h1 as E5,K0 as F5,t8 as G5,i8 as H5,a8 as I5,Q5 as J5,JZ as K5,h3 as L5,m1 as M5,c1 as N5,QZ as O5,X5 as P5,t1 as Q5,l1 as R5,W9 as S5,z9 as T5,Y5 as U5,G9 as V5,GZ as W5,N0 as X5,u0 as Y5,J4 as Z5,x9 as _5,h0 as $5,Q4 as a6,D as b6,U as c6,xZ as d6,B9 as e6,i1 as f6,f0 as g6,j9 as h6,X4 as i6,Y4 as j6,H9 as k6,T as l6,R9 as m6,HZ as n6,w9 as o6,F9 as p6,K9 as q6,L9 as r6,F0 as s6,N9 as t6,q4 as u6,B4 as v6,OZ as w6,H4 as x6,f9 as y6,u9 as z6,g9 as A6,V0 as B6,s as C6,p9 as D6,TZ as E6,m9 as F6,c9 as G6,V5 as H6,N4 as I6,U4 as J6,VQ as K6,hZ as L6,WQ as M6,zQ as N6,O4 as O6,GQ as P6,_4 as Q6,fZ as R6,xQ as S6,v4 as T6,y4 as U6,H5 as V6,A4 as W6,DQ as X6,f4 as Y6,u4 as Z6,P0 as _6,T0 as $6,X0 as a7,oZ as b7,n0 as c7,o as d7,b5 as e7,k5 as f7,s4 as g7,rZ as h7,o4 as i7,w5 as j7,Z$ as k7,$$ as l7,r4 as m7,z0 as n7,q$ as o7,E5 as p7,e4 as q7,Z8 as r7,_5 as s7,x$ as t7,B$ as u7,j$ as v7,O2 as w7,v5 as x7,R$ as y7,w$ as z7,J8 as A7,w as B7,y5 as C7,J5 as D7,c0 as E7,t0 as F7,O as G7,q0 as H7,L$ as I7,N2 as J7,D$ as K7,N$ as L7,v as M7,R2 as N7,U$ as O7,w2 as P7,b$ as Q7,W5 as R7,Q8 as S7,X8 as T7,U2 as U7,q8 as V7,k$ as W7,E$ as X7,_$ as Y7,v$ as Z7,y$ as _7,n as $7};
@@ -0,0 +1,24 @@
1
+ import{cc as DY}from"./cli-1.0.9-cc6btq9c.mjs";import{$c as iQ,Yc as LY}from"./cli-1.0.9-dg55k2hn.mjs";import{di as V0,ei as p6}from"./cli-1.0.9-25kh81st.mjs";import{Xi as pY,Yi as A6}from"./cli-1.0.9-gjta07sd.mjs";import{$N as BY,$O as lY,AB as _6,BA as CY,BK as PY,Bp as j9,CA as TY,Cp as i6,Cv as h0,DA as L6,Dv as uZ,EB as mY,EH as T0,EK as J6,Ev as k0,FB as O6,FH as s9,Fv as x0,Gv as u0,Gx as I0,Hv as p0,IJ as s,Iv as pZ,Jv as cZ,Jx as i9,KQ as wZ,Kt as ZY,Kv as c0,Lt as xQ,Lv as m0,Mt as JY,Mv as g0,Nt as lQ,Nv as d0,OJ as gY,Ot as kY,Ov as l0,PF as C0,Pm as yZ,Pv as a0,QF as o9,Qv as n0,Rs as M0,Rv as r0,Sm as $Z,Sv as i0,Tm as e0,Tv as GQ,Ty as xY,Us as b0,VJ as dY,Vs as fZ,Wy as D6,XQ as rY,Zs as r9,bO as rQ,cD as HY,cl as L9,dD as aQ,dk as KZ,dl as u6,eR as iY,el as z9,fl as q9,gk as E0,gl as bZ,gq as iZ,hl as Y0,hq as AY,iP as aY,iR as zY,il as D9,iq as FZ,jL as P9,jl as XZ,jq as _Y,kP as nY,kl as Q0,lL as F9,lR as qY,lk as hY,ll as v9,ml as A9,nl as sY,oD as NY,oP as w6,pD as nQ,pL as M9,pQ as kZ,qD as RY,sD as z6,tA as uY,tQ as xZ,vA as v6,wD as n,wL as o6,yD as U6,zB as cY}from"./cli-1.0.9-67c9vgsq.mjs";import{QW as Q9,UW as R6}from"./cli-1.0.9-dvbfpdtc.mjs";import{JX as $0,KX as j0,LX as l9,OX as P0,PX as a9,VX as F0,WX as n9,vX as y0,wX as d9}from"./cli-1.0.9-13q9fkxq.mjs";import{L0 as g9,LY as m9,e0 as p,g0 as M}from"./cli-1.0.9-q3fzs7rd.mjs";import{r3 as a,s3 as E,t3 as b,u3 as J0}from"./cli-1.0.9-e491drav.mjs";import{v3 as c9}from"./cli-1.0.9-ez2pcj03.mjs";import{$7 as G6,A5 as $Y,E5 as K6,c7 as jY}from"./cli-1.0.9-sjqe138z.mjs";import{B$ as y9,C9 as _Z,D9 as k9,Eba as $9,Ffa as U0,Ifa as p9,Lba as r6,Mfa as e,P9 as GY,R9 as dQ,R_ as a6,Ufa as w0,Vca as yY,Wba as wY,Xba as EY,Y$ as n6,Zba as V6,aaa as Y9,cda as W6,faa as T6,p_ as E9,w$ as TZ,y$ as x9}from"./cli-1.0.9-ej3ahs6j.mjs";import{dga as B0,lga as L0,pga as h9}from"./cli-1.0.9-x4t4nqd2.mjs";import{Vga as oY,eha as $6}from"./cli-1.0.9-rpw6qq2j.mjs";import{Aha as q,Bha as EZ,xha as Y,yha as h,zha as JZ}from"./cli-1.0.9-6x8m34y6.mjs";import{Eha as UY,Fha as X6,Hha as RZ,Kha as z0,Lha as q0,Mha as D0,Nha as v0,Pha as A0,Qha as _0,aia as O0,gia as u9}from"./cli-1.0.9-e2mjjvjc.mjs";import{ria as g,uia as UZ}from"./cli-1.0.9-jq2h9s5r.mjs";import{Zia as ZZ,_ia as WY,cja as PZ,uja as I,xia as Z9,xja as HZ,zia as C6}from"./cli-1.0.9-ympvk0av.mjs";import{Dja as gQ,zja as KY}from"./cli-1.0.9-a0zm3d1g.mjs";import{$ja as lZ,Gja as VY,Uja as w9,Vja as tZ}from"./cli-1.0.9-zrphfr1b.mjs";import{$la as W0,Aoa as J9,Boa as DZ,Coa as H9,Eoa as N9,Foa as X0,Hoa as B9,Ppa as IY,Spa as BZ,Vla as NZ,ama as eY,ina as OY}from"./cli-1.0.9-3ye1460y.mjs";import{Ara as hZ,Bra as OZ,Cra as rZ,xra as N0}from"./cli-1.0.9-j2832pm5.mjs";var WQ={};hZ(WQ,{selectableUserMessagesFilter:()=>S0,messagesAfterAreOnlySynthetic:()=>VQ,MessageSelector:()=>e9});import{randomUUID as t9}from"crypto";import*as QZ from"path";function R0(Q){return Q.type==="text"}function SZ(Q){return Q==="summarize"||Q==="summarize_up_to"}function e9({messages:Q,onPreRestore:Z,onRestoreMessage:X,onRestoreCode:V,onSummarize:W,onClose:H,preselectedMessage:G}){let K=I0((U)=>U.fileHistory),[B,z]=T.useState(void 0),J=M0(),L=T.useMemo(t9,[]),_=T.useMemo(()=>[...Q.filter(S0),{...s({content:""}),uuid:L}],[Q,L]),[w,v]=T.useState(_.length-1),P=Math.max(0,Math.min(w-Math.floor(CZ/2),_.length-CZ)),f=_.length>1,[D,F]=T.useState(G),[y,S]=T.useState(void 0);T.useEffect(()=>{if(!G||!J)return;let U=!1;return fZ(K,G.uuid).then((R)=>{if(!U)S(R)}),()=>{U=!0}},[G,J,K]);let[O,$]=T.useState(!1),[d,i]=T.useState(null),[o,C]=T.useState("both"),[k,x]=T.useState(""),[A,j]=T.useState("");function N(U){let R=U?[{value:"both",label:"Restore code and conversation"},{value:"conversation",label:"Restore conversation"},{value:"code",label:"Restore code"}]:[{value:"conversation",label:"Restore conversation"}],c={type:"input",placeholder:"add context (optional)",initialValue:"",allowEmptySubmitToCancel:!0,showLabelWithValue:!0,labelValueSeparator:": "};return R.push({value:"summarize",label:"Summarize from here",...c,onChange:x}),R.push({value:"nevermind",label:"Never mind"}),R}T.useEffect(()=>{g("tengu_message_selector_opened",{})},[]);async function u(U){Z(),$(!0);try{await X(U),$(!1),H()}catch(R){e(R),$(!1),z(`Failed to restore the conversation:
2
+ ${R}`)}}async function l(U){let R=Q.indexOf(U),c=Q.length-1-R;if(g("tengu_message_selector_selected",{index_from_end:c,message_type:U.type,is_current_prompt:!1}),!Q.includes(U)){H();return}if(!J){await u(U);return}let m=await fZ(K,U.uuid);F(U),S(m)}async function VZ(U){if(g("tengu_message_selector_restore_option_selected",{option:U}),!D){z("Message not found.");return}if(U==="nevermind"){if(G)H();else F(void 0);return}if(SZ(U)){Z(),$(!0),i(U),z(void 0);try{let m=U==="summarize_up_to"?"up_to":"from",YZ=(m==="up_to"?A:k).trim()||void 0;await W(D,YZ,m),$(!1),i(null),F(void 0),H()}catch(m){e(m),$(!1),i(null),F(void 0),z(`Failed to summarize:
3
+ ${m}`)}return}Z(),$(!0),z(void 0);let R=null,c=null;if(U==="code"||U==="both")try{await V(D)}catch(m){R=m,e(R)}if(U==="conversation"||U==="both")try{await X(D)}catch(m){c=m,e(c)}if($(!1),F(void 0),c&&R)z(`Failed to restore the conversation and code:
4
+ ${c}
5
+ ${R}`);else if(c)z(`Failed to restore the conversation:
6
+ ${c}`);else if(R)z(`Failed to restore the code:
7
+ ${R}`);else H()}let WZ=P0(),t=T.useCallback(()=>{if(D&&!G){F(void 0);return}g("tengu_message_selector_cancelled",{}),H()},[H,D,G]),I9=T.useCallback(()=>v((U)=>Math.max(0,U-1)),[]),C9=T.useCallback(()=>v((U)=>Math.min(_.length-1,U+1)),[_.length]),T9=T.useCallback(()=>v(0),[]),R9=T.useCallback(()=>v(_.length-1),[_.length]),f9=T.useCallback(()=>{let U=_[w];if(U)l(U)},[_,w,l]);$0("confirm:no",t,{context:"Confirmation",isActive:!D}),j0({"messageSelector:up":I9,"messageSelector:down":C9,"messageSelector:top":T9,"messageSelector:bottom":R9,"messageSelector:select":f9},{context:"MessageSelector",isActive:!O&&!B&&!D&&f});let[K0,G0]=T.useState({});T.useEffect(()=>{async function U(){if(!J)return;Promise.all(_.map(async(R,c)=>{if(R.uuid!==L){let m=b0(K,R.uuid),YZ=_.at(c+1),AZ=m?XQ(Q,R.uuid,YZ?.uuid!==L?YZ?.uuid:void 0):void 0;if(AZ!==void 0)G0((r)=>({...r,[c]:AZ}));else G0((r)=>({...r,[c]:void 0}))}}))}U()},[_,Q,L,K,J]);let vZ=J&&y?.filesChanged&&y.filesChanged.length>0,S9=!B&&!D&&!G&&f;return b(p,{flexDirection:"column",width:"100%",children:[E(F0,{color:"suggestion"}),b(p,{flexDirection:"column",marginX:1,gap:1,children:[E(M,{bold:!0,color:"suggestion",children:"Rewind"}),B&&E(a,{children:b(M,{color:"error",children:["Error: ",B]})}),!f&&E(a,{children:E(M,{children:"Nothing to rewind to yet."})}),!B&&D&&f&&b(a,{children:[b(M,{children:["Confirm you want to restore"," ",!y&&"the conversation ","to the point before you sent this message:"]}),b(p,{flexDirection:"column",paddingLeft:1,borderStyle:"single",borderRight:!1,borderTop:!1,borderBottom:!1,borderLeft:!0,borderLeftDimColor:!0,children:[E(H0,{userMessage:D,color:"text",isCurrent:!1}),b(M,{dimColor:!0,children:["(",L0(new Date(D.timestamp)),")"]})]}),E(YQ,{selectedRestoreOption:o,canRestoreCode:!!vZ,diffStatsForRestore:y}),O&&SZ(d)?b(p,{flexDirection:"row",gap:1,children:[E(T0,{}),E(M,{children:"Summarizing…"})]}):E(C0,{isDisabled:O,options:N(!!vZ),defaultFocusValue:vZ?"both":"conversation",onFocus:(U)=>C(U),onChange:(U)=>VZ(U),onCancel:()=>G?H():F(void 0)}),vZ&&E(p,{marginBottom:1,children:b(M,{dimColor:!0,children:[_Z.warning," Rewinding does not affect files edited manually or via bash."]})})]}),S9&&b(a,{children:[J?E(M,{children:"Restore the code and/or conversation to the point before…"}):E(M,{children:"Restore and fork the conversation to the point before…"}),E(p,{width:"100%",flexDirection:"column",children:_.slice(P,P+CZ).map((U,R)=>{let c=P+R,m=c===w,YZ=U.uuid===L,AZ=c in K0,r=K0[c],IZ=r?.filesChanged&&r.filesChanged.length;return b(p,{height:J?3:2,overflow:"hidden",width:"100%",flexDirection:"row",children:[E(p,{width:2,minWidth:2,children:m?b(M,{color:"permission",bold:!0,children:[_Z.pointer," "]}):E(M,{children:" "})}),b(p,{flexDirection:"column",children:[E(p,{flexShrink:1,height:1,overflow:"hidden",children:E(H0,{userMessage:U,color:m?"suggestion":void 0,isCurrent:YZ,paddingRight:10})}),J&&AZ&&E(p,{height:1,flexDirection:"row",children:r?E(a,{children:E(M,{dimColor:!m,color:"inactive",children:IZ?b(a,{children:[IZ===1&&r.filesChanged[0]?`${QZ.basename(r.filesChanged[0])} `:`${IZ} files changed `,E(f0,{diffStats:r})]}):E(a,{children:"No code changes"})})}):b(M,{dimColor:!0,color:"warning",children:[_Z.warning," No code restore"]})})]})]},U.uuid)})})]}),!D&&E(M,{dimColor:!0,italic:!0,children:WZ.pending?b(a,{children:["Press ",WZ.keyName," again to exit"]}):b(a,{children:[!B&&f&&"Enter to continue · ","Esc to exit"]})})]})]})}function ZQ(Q){switch(Q){case"summarize":return"Messages after this point will be summarized.";case"summarize_up_to":return"Preceding messages will be summarized. This and subsequent messages will remain unchanged — you will stay at the end of the conversation.";case"both":case"conversation":return"The conversation will be forked.";case"code":case"nevermind":return"The conversation will be unchanged."}}function YQ(Q){let Z=GZ.c(11),{selectedRestoreOption:X,canRestoreCode:V,diffStatsForRestore:W}=Q,H=V&&(X==="both"||X==="code"),G;if(Z[0]!==X)G=ZQ(X),Z[0]=X,Z[1]=G;else G=Z[1];let K;if(Z[2]!==G)K=E(M,{dimColor:!0,children:G}),Z[2]=G,Z[3]=K;else K=Z[3];let B;if(Z[4]!==W||Z[5]!==X||Z[6]!==H)B=!SZ(X)&&(H?E(QQ,{diffStatsForRestore:W}):E(M,{dimColor:!0,children:"The code will be unchanged."})),Z[4]=W,Z[5]=X,Z[6]=H,Z[7]=B;else B=Z[7];let z;if(Z[8]!==K||Z[9]!==B)z=b(p,{flexDirection:"column",children:[K,B]}),Z[8]=K,Z[9]=B,Z[10]=z;else z=Z[10];return z}function QQ(Q){let Z=GZ.c(14),{diffStatsForRestore:X}=Q;if(X===void 0)return;if(!X.filesChanged||!X.filesChanged[0]){let K;if(Z[0]===Symbol.for("react.memo_cache_sentinel"))K=E(M,{dimColor:!0,children:"The code has not changed (nothing will be restored)."}),Z[0]=K;else K=Z[0];return K}let V=X.filesChanged.length,W;if(V===1){let K;if(Z[1]!==X.filesChanged[0])K=QZ.basename(X.filesChanged[0]||""),Z[1]=X.filesChanged[0],Z[2]=K;else K=Z[2];W=K}else if(V===2){let K;if(Z[3]!==X.filesChanged[0])K=QZ.basename(X.filesChanged[0]||""),Z[3]=X.filesChanged[0],Z[4]=K;else K=Z[4];let B=K,z;if(Z[5]!==X.filesChanged[1])z=QZ.basename(X.filesChanged[1]||""),Z[5]=X.filesChanged[1],Z[6]=z;else z=Z[6];W=`${B} and ${z}`}else{let K;if(Z[7]!==X.filesChanged[0])K=QZ.basename(X.filesChanged[0]||""),Z[7]=X.filesChanged[0],Z[8]=K;else K=Z[8];W=`${K} and ${X.filesChanged.length-1} other files`}let H;if(Z[9]!==X)H=E(f0,{diffStats:X}),Z[9]=X,Z[10]=H;else H=Z[10];let G;if(Z[11]!==W||Z[12]!==H)G=E(a,{children:b(M,{dimColor:!0,children:["The code will be restored"," ",H," in ",W,"."]})}),Z[11]=W,Z[12]=H,Z[13]=G;else G=Z[13];return G}function f0(Q){let Z=GZ.c(7),{diffStats:X}=Q;if(!X||!X.filesChanged)return;let V;if(Z[0]!==X.insertions)V=b(M,{color:"diffAddedWord",children:["+",X.insertions," "]}),Z[0]=X.insertions,Z[1]=V;else V=Z[1];let W;if(Z[2]!==X.deletions)W=b(M,{color:"diffRemovedWord",children:["-",X.deletions]}),Z[2]=X.deletions,Z[3]=W;else W=Z[3];let H;if(Z[4]!==V||Z[5]!==W)H=b(a,{children:[V,W]}),Z[4]=V,Z[5]=W,Z[6]=H;else H=Z[6];return H}function H0(Q){let Z=GZ.c(31),{userMessage:X,color:V,dimColor:W,isCurrent:H,paddingRight:G}=Q,{columns:K}=y0();if(H){let S;if(Z[0]!==V||Z[1]!==W)S=E(p,{width:"100%",children:E(M,{italic:!0,color:V,dimColor:W,children:"(current)"})}),Z[0]=V,Z[1]=W,Z[2]=S;else S=Z[2];return S}let B=X.message.content,z=typeof B==="string"?null:B[B.length-1],J,L,_,w,v,P,f,D;if(Z[3]!==V||Z[4]!==K||Z[5]!==B||Z[6]!==W||Z[7]!==z||Z[8]!==G){D=Symbol.for("react.early_return_sentinel");Z:{let S=typeof B==="string"?B.trim():z&&R0(z)?z.text.trim():"(no prompt)",O=U0(S);if(E0(O)){let $;if(Z[17]!==V||Z[18]!==W)$=E(p,{flexDirection:"row",width:"100%",children:E(M,{italic:!0,color:V,dimColor:W,children:"((empty message))"})}),Z[17]=V,Z[18]=W,Z[19]=$;else $=Z[19];D=$;break Z}if(O.includes("<bash-input>")){let $=KZ(O,"bash-input");if($){let d;if(Z[20]===Symbol.for("react.memo_cache_sentinel"))d=E(M,{color:"bashBorder",children:"!"}),Z[20]=d;else d=Z[20];D=b(p,{flexDirection:"row",width:"100%",children:[d,b(M,{color:V,dimColor:W,children:[" ",$]})]});break Z}}if(O.includes(`<${RZ}>`)){let $=KZ(O,RZ),d=KZ(O,"command-args"),i=KZ(O,"skill-format")==="true";if($)if(i){D=E(p,{flexDirection:"row",width:"100%",children:b(M,{color:V,dimColor:W,children:["Skill(",$,")"]})});break Z}else{D=E(p,{flexDirection:"row",width:"100%",children:b(M,{color:V,dimColor:W,children:["/",$," ",d]})});break Z}}L=p,P="row",f="100%",J=M,_=V,w=W,v=G?B0(O,K-G,!0):O.slice(0,500).split(`
8
+ `).slice(0,4).join(`
9
+ `)}Z[3]=V,Z[4]=K,Z[5]=B,Z[6]=W,Z[7]=z,Z[8]=G,Z[9]=J,Z[10]=L,Z[11]=_,Z[12]=w,Z[13]=v,Z[14]=P,Z[15]=f,Z[16]=D}else J=Z[9],L=Z[10],_=Z[11],w=Z[12],v=Z[13],P=Z[14],f=Z[15],D=Z[16];if(D!==Symbol.for("react.early_return_sentinel"))return D;let F;if(Z[21]!==J||Z[22]!==_||Z[23]!==w||Z[24]!==v)F=E(J,{color:_,dimColor:w,children:v}),Z[21]=J,Z[22]=_,Z[23]=w,Z[24]=v,Z[25]=F;else F=Z[25];let y;if(Z[26]!==L||Z[27]!==P||Z[28]!==f||Z[29]!==F)y=E(L,{flexDirection:P,width:f,children:F}),Z[26]=L,Z[27]=P,Z[28]=f,Z[29]=F,Z[30]=y;else y=Z[30];return y}function XQ(Q,Z,X){let V=Q.findIndex((B)=>B.uuid===Z);if(V===-1)return;let W=X?Q.findIndex((B)=>B.uuid===X):Q.length;if(W===-1)W=Q.length;let H=[],G=0,K=0;for(let B=V+1;B<W;B++){let z=Q[B];if(!z||!xZ(z))continue;let J=z.toolUseResult;if(!J||!J.filePath||!J.structuredPatch)continue;if(!H.includes(J.filePath))H.push(J.filePath);try{if("type"in J&&J.type==="create")G+=J.content.split(/\r?\n/).length;else for(let L of J.structuredPatch){let _=TZ(L.lines,(v)=>v.startsWith("+")),w=TZ(L.lines,(v)=>v.startsWith("-"));G+=_,K+=w}}catch{continue}}return{filesChanged:H,insertions:G,deletions:K}}function S0(Q){if(Q.type!=="user")return!1;if(Array.isArray(Q.message.content)&&Q.message.content[0]?.type==="tool_result")return!1;if(kZ(Q))return!1;if(Q.isMeta)return!1;if(Q.isCompactSummary||Q.isVisibleInTranscriptOnly)return!1;let Z=Q.message.content,X=typeof Z==="string"?null:Z[Z.length-1],V=typeof Z==="string"?Z.trim():X&&R0(X)?X.text.trim():"";if(V.indexOf(`<${D0}>`)!==-1||V.indexOf(`<${v0}>`)!==-1||V.indexOf(`<${z0}>`)!==-1||V.indexOf(`<${q0}>`)!==-1||V.indexOf(`<${_0}>`)!==-1||V.indexOf(`<${A0}>`)!==-1||V.indexOf(`<${O0}`)!==-1)return!1;return!0}function VQ(Q,Z){for(let X=Z+1;X<Q.length;X++){let V=Q[X];if(!V)continue;if(kZ(V))continue;if(xZ(V))continue;if(V.type==="progress")continue;if(V.type==="system")continue;if(V.type==="attachment")continue;if(V.type==="user"&&V.isMeta)continue;if(V.type==="assistant"){let W=V.message.content;if(Array.isArray(W)){if(W.some((G)=>G.type==="text"&&G.text.trim()||G.type==="tool_use"))return!1}continue}if(V.type==="user")return!1}return!0}var GZ,T,CZ=7;var KQ=OZ(()=>{k9();UZ();i9();r9();w0();a9();g9();l9();p9();wZ();o9();s9();d9();u9();x9();h9();n9();J0();GZ=N0(m9(),1),T=N0(c9(),1)});var b6={};hZ(b6,{getCronJitterConfig:()=>M6});function M6(){let Q=oY("tengu_kairos_cron_config",XZ,j6),Z=F6().safeParse(Q);return Z.success?Z.data:XZ}var j6=60000,oZ=1800000,P6=2592000000,F6;var I6=OZ(()=>{JZ();$6();sY();EZ();F6=q(()=>Y.object({recurringFrac:Y.number().min(0).max(1),recurringCapMs:Y.number().int().min(0).max(oZ),oneShotMaxMs:Y.number().int().min(0).max(oZ),oneShotFloorMs:Y.number().int().min(0).max(oZ),oneShotMinuteMod:Y.number().int().min(1).max(60),recurringMaxAgeMs:Y.number().int().min(0).max(P6).default(XZ.recurringMaxAgeMs)}).refine((Q)=>Q.oneShotFloorMs<=Q.oneShotMaxMs))});import{mkdir as f6,readFile as S6,unlink as X9,writeFile as eZ}from"fs/promises";import{dirname as h6,join as V9}from"path";function zZ(Q){return V9(Q??eY(),k6)}async function W9(Q){let Z;try{Z=await S6(zZ(Q),"utf8")}catch{return}let X=x6().safeParse(Y9(Z,!1));return X.success?X.data:void 0}async function tY(Q,Z){let X=zZ(Z),V=ZZ(Q);try{return await eZ(X,V,{flag:"wx"}),!0}catch(W){let H=tZ(W);if(H==="EEXIST")return!1;if(H==="ENOENT"){await f6(h6(X),{recursive:!0});try{return await eZ(X,V,{flag:"wx"}),!0}catch(G){if(tZ(G)==="EEXIST")return!1;throw G}}throw W}}function sZ(Q){MZ?.(),MZ=Z9(async()=>{await qZ(Q)})}async function Z0(Q){let Z=Q?.dir,X=Q?.lockIdentity??NZ(),V={sessionId:X,pid:process.pid,acquiredAt:Date.now()};if(await tY(V,Z))return LZ=void 0,sZ(Q),I(`[ScheduledTasks] acquired scheduler lock (PID ${process.pid})`),!0;let W=await W9(Z);if(W?.sessionId===X){if(W.pid!==process.pid)await eZ(zZ(Z),ZZ(V)),sZ(Q);return!0}if(W&&Q9(W.pid)){if(LZ!==W.sessionId)LZ=W.sessionId,I(`[ScheduledTasks] scheduler lock held by session ${W.sessionId} (PID ${W.pid})`);return!1}if(W)I(`[ScheduledTasks] recovering stale scheduler lock from PID ${W.pid}`);if(await X9(zZ(Z)).catch(()=>{}),await tY(V,Z))return LZ=void 0,sZ(Q),!0;return!1}async function qZ(Q){MZ?.(),MZ=void 0,LZ=void 0;let Z=Q?.dir,X=Q?.lockIdentity??NZ(),V=await W9(Z);if(!V||V.sessionId!==X)return;try{await X9(zZ(Z)),I("[ScheduledTasks] released scheduler lock")}catch{}}var k6,x6,MZ,LZ;var K9=OZ(()=>{JZ();BZ();C6();HZ();lZ();R6();T6();EZ();PZ();k6=V9(".claudin","scheduled_tasks.lock"),x6=q(()=>Y.object({sessionId:Y.string(),pid:Y.number(),acquiredAt:Y.number()}))});var d6={};hZ(d6,{takeDueSessionWakeup:()=>O9,isRecurringTaskAged:()=>_9,createCronScheduler:()=>g6,buildMissedTaskNotification:()=>U9});function _9(Q,Z,X){if(X===0)return!1;return Boolean(Q.recurring&&!Q.permanent&&Z-Q.createdAt>=X)}function O9(Q){let Z=X0();if(!Z||Q<Z.fireAtMs)return null;return B9(),{prompt:V0(Z.prompt),reason:Z.reason}}function g6(Q){let{onFire:Z,isLoading:X,assistantMode:V=!1,onFireTask:W,onMissed:H,onWakeupFire:G,dir:K,lockIdentity:B,getJitterConfig:z,isKilled:J,filter:L}=Q,_=K||B?{dir:K,lockIdentity:B}:void 0,w=[],v=new Map,P=new Set,f=new Set,D=null,F=null,y=null,S=null,O=!1,$=!1;async function d(C){let k=await q9(K);if(O)return;if(w=k,!C)return;let x=Date.now(),A=A9(k,x).filter((j)=>!j.recurring&&!P.has(j.id)&&(!L||L(j)));if(A.length>0){for(let j of A)P.add(j.id),v.set(j.id,1/0);if(g("tengu_scheduled_task_missed",{count:A.length,taskIds:A.map((j)=>j.id).join(",")}),H)H(A);else Z(U9(A));Y0(A.map((j)=>j.id),K).catch((j)=>I(`[ScheduledTasks] failed to remove missed tasks: ${j}`)),I(`[ScheduledTasks] surfaced ${A.length} missed one-shot task(s)`)}}function i(){if(J?.())return;if(X()&&!V)return;let C=Date.now(),k=new Set,x=[],A=z?.()??XZ;function j(N,u){if(L&&!L(N))return;if(k.add(N.id),f.has(N.id))return;let l=v.get(N.id);if(l===void 0)l=N.recurring?Q0(N.cron,N.lastFiredAt??N.createdAt,N.id,A)??1/0:v9(N.cron,N.createdAt,N.id,A)??1/0,v.set(N.id,l),I(`[ScheduledTasks] scheduled ${N.id} for ${l===1/0?"never":new Date(l).toISOString()}`);if(C<l)return;I(`[ScheduledTasks] firing ${N.id}${N.recurring?" (recurring)":""}`),g("tengu_scheduled_task_fire",{recurring:N.recurring??!1,taskId:N.id});let VZ=K===void 0?V0(N.prompt,void 0,N.agentId):N.prompt;if(W)W(VZ===N.prompt?N:{...N,prompt:VZ});else Z(VZ);let WZ=_9(N,C,A.recurringMaxAgeMs);if(WZ){let t=Math.floor((C-N.createdAt)/1000/60/60);I(`[ScheduledTasks] recurring task ${N.id} aged out (${t}h since creation), deleting after final fire`),g("tengu_scheduled_task_expired",{taskId:N.id,ageHours:t})}if(N.recurring&&!WZ){let t=Q0(N.cron,C,N.id,A)??1/0;if(v.set(N.id,t),!u)x.push(N.id)}else if(u)N9([N.id]),v.delete(N.id);else f.add(N.id),Y0([N.id],K).catch((t)=>I(`[ScheduledTasks] failed to remove task ${N.id}: ${t}`)).finally(()=>f.delete(N.id)),v.delete(N.id)}if($){for(let N of w)j(N,!1);if(x.length>0){for(let N of x)f.add(N);D9(x,C,K).catch((N)=>I(`[ScheduledTasks] failed to persist lastFiredAt: ${N}`)).finally(()=>{for(let N of x)f.delete(N)})}}if(K===void 0){for(let u of H9())j(u,!0);let N=O9(C);if(N!==null)if(I("[ScheduledTasks] firing pending ScheduleWakeup"),g("tengu_schedule_wakeup_fire",{}),G)G(N.prompt,N.reason);else Z(N.prompt)}if(k.size===0){v.clear();return}for(let N of v.keys())if(!k.has(N))v.delete(N)}async function o(){if(O)return;if(D)clearInterval(D),D=null;let{default:C}=await import("./index-1.0.9-4kgb526x.mjs");if(O)return;if($=await Z0(_).catch(()=>!1),O){if($)$=!1,qZ(_);return}if(!$)y=setInterval(()=>{Z0(_).then((x)=>{if(O){if(x)qZ(_);return}if(x){if($=!0,y)clearInterval(y),y=null}}).catch((x)=>I(String(x),{level:"error"}))},m6),y.unref?.();d(!0);let k=z9(K);S=C.watch(k,{persistent:!1,ignoreInitial:!0,awaitWriteFinish:{stabilityThreshold:c6},ignorePermissionErrors:!0}),S.on("add",()=>void d(!1)),S.on("change",()=>void d(!1)),S.on("unlink",()=>{if(!O)w=[],v.clear()}),F=setInterval(i,G9),F.unref?.()}return{start(){if(O=!1,K!==void 0){I(`[ScheduledTasks] scheduler start() — dir=${K}, hasTasks=${bZ(K)}`),o();return}if(I(`[ScheduledTasks] scheduler start() — enabled=${DZ()}, hasTasks=${bZ()}`),!DZ()&&(V||bZ()))J9(!0);if(DZ()){o();return}D=setInterval((C)=>{if(DZ())C()},G9,o),D.unref?.()},stop(){if(O=!0,D)clearInterval(D),D=null;if(F)clearInterval(F),F=null;if(y)clearInterval(y),y=null;if(S?.close(),S=null,$)$=!1,qZ(_)},getNextFireTime(){let C=1/0;for(let k of v.values())if(k<C)C=k;if(K===void 0){let k=X0();if(k&&k.fireAtMs<C)C=k.fireAtMs}return C===1/0?null:C}}}function U9(Q){let Z=Q.length>1,X=`The following one-shot scheduled task${Z?"s were":" was"} missed while Claude was not running. ${Z?"They have":"It has"} already been removed from .claudin/scheduled_tasks.json.
10
+
11
+ Do NOT execute ${Z?"these prompts":"this prompt"} yet. First use the AskUserQuestion tool to ask whether to run ${Z?"each one":"it"} now. Only execute if the user confirms.`,V=Q.map((W)=>{let H=`[${L9(W.cron)}, created ${new Date(W.createdAt).toLocaleString()}]`,G=(W.prompt.match(/`+/g)??[]).reduce((B,z)=>Math.max(B,z.length),0),K="`".repeat(Math.max(3,G+1));return`${H}
12
+ ${K}
13
+ ${W.prompt}
14
+ ${K}`});return`${X}
15
+
16
+ ${V.join(`
17
+
18
+ `)}`}var G9=1000,c6=300,m6=5000;var l6=OZ(()=>{BZ();UZ();u6();sY();K9();HZ();p6()});import{randomUUID as dZ}from"crypto";JZ();EZ();GQ();var JQ=q(()=>Y.unknown()),HQ=q(()=>Y.object({matcher:Y.string().optional(),hookCallbackIds:Y.array(Y.string()),timeout:Y.number().optional()}).describe("Configuration for matching and routing hook callbacks.")),NQ=q(()=>Y.object({subtype:Y.literal("initialize"),hooks:Y.record(u0(),Y.array(HQ())).optional(),sdkMcpServers:Y.array(Y.string()).optional(),jsonSchema:Y.record(Y.string(),Y.unknown()).optional(),systemPrompt:Y.string().optional(),appendSystemPrompt:Y.string().optional(),agents:Y.record(Y.string(),g0()).optional(),promptSuggestions:Y.boolean().optional(),agentProgressSummaries:Y.boolean().optional()}).describe("Initializes the SDK session with hooks, MCP servers, and agent configuration.")),EX=q(()=>Y.object({commands:Y.array(pZ()),agents:Y.array(cZ()),output_style:Y.string(),available_output_styles:Y.array(Y.string()),models:Y.array(c0()),account:m0(),pid:Y.number().optional().describe("@internal CLI process PID for tmux socket isolation"),fast_mode_state:i0().optional()}).describe("Response from session initialization with available commands, models, and account info.")),BQ=q(()=>Y.object({subtype:Y.literal("interrupt")}).describe("Interrupts the currently running conversation turn.")),LQ=q(()=>Y.object({subtype:Y.literal("can_use_tool"),tool_name:Y.string(),input:Y.record(Y.string(),Y.unknown()),permission_suggestions:Y.array(k0()).optional(),blocked_path:Y.string().optional(),decision_reason:Y.string().optional(),title:Y.string().optional(),display_name:Y.string().optional(),tool_use_id:Y.string(),agent_id:Y.string().optional(),description:Y.string().optional()}).describe("Requests permission to use a tool with the given input.")),zQ=q(()=>Y.object({subtype:Y.literal("set_permission_mode"),mode:x0(),ultraplan:Y.boolean().optional().describe("@internal CCR ultraplan session marker.")}).describe("Sets the permission mode for tool execution handling.")),qQ=q(()=>Y.object({subtype:Y.literal("set_model"),model:Y.string().optional()}).describe("Sets the model to use for subsequent conversation turns.")),DQ=q(()=>Y.object({subtype:Y.literal("set_max_thinking_tokens"),max_thinking_tokens:Y.number().nullable()}).describe("Sets the maximum number of thinking tokens for extended thinking.")),vQ=q(()=>Y.object({subtype:Y.literal("mcp_status")}).describe("Requests the current status of all MCP server connections.")),yX=q(()=>Y.object({mcpServers:Y.array(uZ())}).describe("Response containing the current status of all MCP server connections.")),AQ=q(()=>Y.object({subtype:Y.literal("get_context_usage")}).describe("Requests a breakdown of current context window usage by category.")),_Q=q(()=>Y.object({name:Y.string(),tokens:Y.number(),color:Y.string(),isDeferred:Y.boolean().optional()})),OQ=q(()=>Y.object({color:Y.string(),isFilled:Y.boolean(),categoryName:Y.string(),tokens:Y.number(),percentage:Y.number(),squareFullness:Y.number()})),$X=q(()=>Y.object({categories:Y.array(_Q()),totalTokens:Y.number(),maxTokens:Y.number(),rawMaxTokens:Y.number(),percentage:Y.number(),gridRows:Y.array(Y.array(OQ())),model:Y.string(),memoryFiles:Y.array(Y.object({path:Y.string(),type:Y.string(),tokens:Y.number()})),mcpTools:Y.array(Y.object({name:Y.string(),serverName:Y.string(),tokens:Y.number(),isLoaded:Y.boolean().optional()})),deferredBuiltinTools:Y.array(Y.object({name:Y.string(),tokens:Y.number(),isLoaded:Y.boolean()})).optional(),systemTools:Y.array(Y.object({name:Y.string(),tokens:Y.number()})).optional(),systemPromptSections:Y.array(Y.object({name:Y.string(),tokens:Y.number()})).optional(),agents:Y.array(Y.object({agentType:Y.string(),source:Y.string(),tokens:Y.number()})),slashCommands:Y.object({totalCommands:Y.number(),includedCommands:Y.number(),tokens:Y.number()}).optional(),skills:Y.object({totalSkills:Y.number(),includedSkills:Y.number(),tokens:Y.number(),skillFrontmatter:Y.array(Y.object({name:Y.string(),source:Y.string(),tokens:Y.number()}))}).optional(),autoCompactThreshold:Y.number().optional(),isAutoCompactEnabled:Y.boolean(),messageBreakdown:Y.object({toolCallTokens:Y.number(),toolResultTokens:Y.number(),attachmentTokens:Y.number(),assistantMessageTokens:Y.number(),userMessageTokens:Y.number(),toolCallsByType:Y.array(Y.object({name:Y.string(),callTokens:Y.number(),resultTokens:Y.number()})),attachmentsByType:Y.array(Y.object({name:Y.string(),tokens:Y.number()}))}).optional(),apiUsage:Y.object({input_tokens:Y.number(),output_tokens:Y.number(),cache_creation_input_tokens:Y.number(),cache_read_input_tokens:Y.number()}).nullable()}).describe("Breakdown of current context window usage by category (system prompt, tools, messages, etc.).")),UQ=q(()=>Y.object({subtype:Y.literal("rewind_files"),user_message_id:Y.string(),dry_run:Y.boolean().optional()}).describe("Rewinds file changes made since a specific user message.")),jX=q(()=>Y.object({canRewind:Y.boolean(),error:Y.string().optional(),filesChanged:Y.array(Y.string()).optional(),insertions:Y.number().optional(),deletions:Y.number().optional()}).describe("Result of a rewindFiles operation.")),wQ=q(()=>Y.object({subtype:Y.literal("cancel_async_message"),message_uuid:Y.string()}).describe("Drops a pending async user message from the command queue by uuid. No-op if already dequeued for execution.")),PX=q(()=>Y.object({cancelled:Y.boolean()}).describe("Result of a cancel_async_message operation. cancelled=false means the message was not in the queue (already dequeued or never enqueued).")),EQ=q(()=>Y.object({subtype:Y.literal("seed_read_state"),path:Y.string(),mtime:Y.number()}).describe("Seeds the readFileState cache with a path+mtime entry. Use when a prior Read was removed from context (e.g. by snip) so Edit validation would fail despite the client having observed the Read. The mtime lets the CLI detect if the file changed since the seeded Read — same staleness check as the normal path.")),yQ=q(()=>Y.object({subtype:Y.literal("hook_callback"),callback_id:Y.string(),input:p0(),tool_use_id:Y.string().optional()}).describe("Delivers a hook callback with its input data.")),$Q=q(()=>Y.object({subtype:Y.literal("mcp_message"),server_name:Y.string(),message:JQ()}).describe("Sends a JSON-RPC message to a specific MCP server.")),jQ=q(()=>Y.object({subtype:Y.literal("mcp_set_servers"),servers:Y.record(Y.string(),h0())}).describe("Replaces the set of dynamically managed MCP servers.")),FX=q(()=>Y.object({added:Y.array(Y.string()),removed:Y.array(Y.string()),errors:Y.record(Y.string(),Y.string())}).describe("Result of replacing the set of dynamically managed MCP servers.")),PQ=q(()=>Y.object({subtype:Y.literal("reload_plugins")}).describe("Reloads plugins from disk and returns the refreshed session components.")),MX=q(()=>Y.object({commands:Y.array(pZ()),agents:Y.array(cZ()),plugins:Y.array(Y.object({name:Y.string(),path:Y.string(),source:Y.string().optional()})),mcpServers:Y.array(uZ()),error_count:Y.number()}).describe("Refreshed commands, agents, plugins, and MCP server status after reload.")),FQ=q(()=>Y.object({subtype:Y.literal("mcp_reconnect"),serverName:Y.string()}).describe("Reconnects a disconnected or failed MCP server.")),MQ=q(()=>Y.object({subtype:Y.literal("mcp_toggle"),serverName:Y.string(),enabled:Y.boolean()}).describe("Enables or disables an MCP server.")),bQ=q(()=>Y.object({subtype:Y.literal("stop_task"),task_id:Y.string()}).describe("Stops a running task.")),IQ=q(()=>Y.object({subtype:Y.literal("apply_flag_settings"),settings:Y.record(Y.string(),Y.unknown())}).describe("Merges the provided settings into the flag settings layer, updating the active configuration.")),CQ=q(()=>Y.object({subtype:Y.literal("get_settings")}).describe("Returns the effective merged settings and the raw per-source settings.")),bX=q(()=>Y.object({effective:Y.record(Y.string(),Y.unknown()),sources:Y.array(Y.object({source:Y.enum(["userSettings","projectSettings","localSettings","flagSettings","policySettings"]),settings:Y.record(Y.string(),Y.unknown())})).describe("Ordered low-to-high priority — later entries override earlier ones."),applied:Y.object({model:Y.string(),effort:Y.enum(["low","medium","high","max"]).nullable()}).optional().describe("Runtime-resolved values after env overrides, session state, and model-specific defaults are applied. Unlike `effective` (disk merge), these reflect what will actually be sent to the API.")}).describe("Effective merged settings plus raw per-source settings in merge order.")),TQ=q(()=>Y.object({subtype:Y.literal("elicitation"),mcp_server_name:Y.string(),message:Y.string(),mode:Y.enum(["form","url"]).optional(),url:Y.string().optional(),elicitation_id:Y.string().optional(),requested_schema:Y.record(Y.string(),Y.unknown()).optional()}).describe("Requests the SDK consumer to handle an MCP elicitation (user input request).")),o0=q(()=>Y.object({action:Y.enum(["accept","decline","cancel"]),content:Y.record(Y.string(),Y.unknown()).optional()}).describe("Response from the SDK consumer for an elicitation request.")),RQ=q(()=>Y.union([BQ(),LQ(),NQ(),zQ(),qQ(),DQ(),vQ(),AQ(),yQ(),$Q(),UQ(),wQ(),EQ(),jQ(),PQ(),FQ(),MQ(),bQ(),IQ(),CQ(),TQ()])),mZ=q(()=>Y.object({type:Y.literal("control_request"),request_id:Y.string(),request:RQ()})),fQ=q(()=>Y.object({subtype:Y.literal("success"),request_id:Y.string(),response:Y.record(Y.string(),Y.unknown()).optional()})),SQ=q(()=>Y.object({subtype:Y.literal("error"),request_id:Y.string(),error:Y.string(),pending_permission_requests:Y.array(Y.lazy(()=>mZ())).optional()})),s0=q(()=>Y.object({type:Y.literal("control_response"),response:Y.union([fQ(),SQ()])})),hQ=q(()=>Y.object({type:Y.literal("control_cancel_request"),request_id:Y.string()}).describe("Cancels a currently open control request.")),t0=q(()=>Y.object({type:Y.literal("keep_alive")}).describe("Keep-alive message to maintain WebSocket connection.")),kQ=q(()=>Y.object({type:Y.literal("update_environment_variables"),variables:Y.record(Y.string(),Y.string())}).describe("Updates environment variables at runtime.")),IX=q(()=>Y.union([r0(),l0(),a0(),n0(),s0(),mZ(),hQ(),t0()])),CX=q(()=>Y.union([d0(),mZ(),s0(),t0(),kQ()]));lQ();HZ();dQ();lZ();JZ();HZ();EZ();e0();xQ();var xX=q(()=>h.object({tool_name:h.string().describe("The name of the tool requesting permission"),input:h.record(h.string(),h.unknown()).describe("The input for the tool"),tool_use_id:h.string().optional().describe("The unique tool use request ID")})),YY=q(()=>h.enum(["user_temporary","user_permanent","user_reject"]).optional().catch(void 0)),uQ=q(()=>h.object({behavior:h.literal("allow"),updatedInput:h.record(h.string(),h.unknown()),updatedPermissions:h.array(ZY()).optional().catch((Q)=>{I(`Malformed updatedPermissions from SDK host ignored: ${Q.error.issues[0]?.message??"unknown"}`,{level:"warn"});return}),toolUseID:h.string().optional(),decisionClassification:YY()})),pQ=q(()=>h.object({behavior:h.literal("deny"),message:h.string(),interrupt:h.boolean().optional(),toolUseID:h.string().optional(),decisionClassification:YY()})),gZ=q(()=>h.union([uQ(),pQ()]));function jZ(Q,Z,X,V){let W={type:"permissionPromptTool",permissionPromptToolName:Z.name,toolResult:Q};if(Q.behavior==="allow"){let H=Q.updatedPermissions;if(H)V.setAppState((K)=>({...K,toolPermissionContext:yZ(K.toolPermissionContext,H)})),$Z(H);let G=Object.keys(Q.updatedInput).length>0?Q.updatedInput:X;return{...Q,updatedInput:G,decisionReason:W}}else if(Q.behavior==="deny"&&Q.interrupt)I(`SDK permission prompt deny+interrupt: tool=${Z.name} message=${Q.message}`),V.abortController.abort();return{...Q,decisionReason:W}}rQ();gQ();PZ();JZ();aQ();qY();e0();iQ();PZ();nQ();PZ();var cQ=/\u2028|\u2029/g;function mQ(Q){return Q.replace(cQ,(Z)=>Z==="\u2028"?"\\u2028":"\\u2029")}function QY(Q){return mQ(ZZ(Q))}var oQ="SandboxNetworkAccess";function sQ(Q){if(!Q)return;if(Q.type==="classifier")return Q.reason;switch(Q.type){case"rule":case"mode":case"subcommandResults":case"permissionPromptTool":return;case"hook":case"asyncAgent":case"sandboxOverride":case"workingDir":case"safetyCheck":case"other":return Q.reason}}function tQ(Q,Z,X,V){let W;try{W=Q.getActivityDescription?.(Z)??Q.getToolUseSummary?.(Z)??Q.userFacingName(Z)}catch{W=Q.name}return{tool_name:Q.name,action_description:W,tool_use_id:X,request_id:V,input:Z}}var eQ=1000;class Z6{input;replayUserMessages;structuredInput;pendingRequests=new Map;restoredWorkerState=Promise.resolve(null);inputClosed=!1;unexpectedResponseCallback;resolvedToolUseIds=new Set;prependedLines=[];onControlRequestSent;onControlRequestResolved;outbound=new NY;constructor(Q,Z){this.input=Q;this.replayUserMessages=Z;this.input=Q,this.structuredInput=this.read()}trackResolvedToolUseId(Q){if(Q.request.subtype==="can_use_tool"){if(this.resolvedToolUseIds.add(Q.request.tool_use_id),this.resolvedToolUseIds.size>eQ){let Z=this.resolvedToolUseIds.values().next().value;if(Z!==void 0)this.resolvedToolUseIds.delete(Z)}}}flushInternalEvents(){return Promise.resolve()}get internalEventsPending(){return 0}prependUserMessage(Q){this.prependedLines.push(ZZ({type:"user",session_id:"",message:{role:"user",content:Q},parent_tool_use_id:null})+`
19
+ `)}async*read(){let Q="",Z=async function*(){for(;;){if(this.prependedLines.length>0)Q=this.prependedLines.join("")+Q,this.prependedLines=[];let X=Q.indexOf(`
20
+ `);if(X===-1)break;let V=Q.slice(0,X);Q=Q.slice(X+1);let W=await this.processLine(V);if(W)GY("info","cli_stdin_message_parsed",{type:W.type}),yield W}}.bind(this);yield*Z();for await(let X of this.input)Q+=X,yield*Z();if(Q){let X=await this.processLine(Q);if(X)yield X}this.inputClosed=!0;for(let X of this.pendingRequests.values())X.reject(Error("Tool permission stream closed before response received"))}getPendingPermissionRequests(){return Array.from(this.pendingRequests.values()).map((Q)=>Q.request).filter((Q)=>Q.request.subtype==="can_use_tool")}setUnexpectedResponseCallback(Q){this.unexpectedResponseCallback=Q}injectControlResponse(Q){let Z=Q.response?.request_id;if(!Z)return;let X=this.pendingRequests.get(Z);if(!X)return;if(this.trackResolvedToolUseId(X.request),this.pendingRequests.delete(Z),this.write({type:"control_cancel_request",request_id:Z}),Q.response.subtype==="error")X.reject(Error(Q.response.error));else{let V=Q.response.response;if(X.schema)try{X.resolve(X.schema.parse(V))}catch(W){X.reject(W)}else X.resolve({})}}setOnControlRequestSent(Q){this.onControlRequestSent=Q}setOnControlRequestResolved(Q){this.onControlRequestResolved=Q}async processLine(Q){if(!Q)return;try{let Z=DY(WY(Q));if(Z.type==="keep_alive")return;if(Z.type==="update_environment_variables"){let X=Object.keys(Z.variables);for(let[V,W]of Object.entries(Z.variables))process.env[V]=W;I(`[structuredIO] applied update_environment_variables: ${X.join(", ")}`);return}if(Z.type==="control_response"){let X="uuid"in Z&&typeof Z.uuid==="string"?Z.uuid:void 0;if(X)HY(X,"completed");let V=this.pendingRequests.get(Z.response.request_id);if(!V){let G=(Z.response.subtype==="success"?Z.response.response:void 0)?.toolUseID;if(typeof G==="string"&&this.resolvedToolUseIds.has(G)){I(`Ignoring duplicate control_response for already-resolved toolUseID=${G} request_id=${Z.response.request_id}`);return}if(this.unexpectedResponseCallback)await this.unexpectedResponseCallback(Z);return}if(this.trackResolvedToolUseId(V.request),this.pendingRequests.delete(Z.response.request_id),V.request.request.subtype==="can_use_tool"&&this.onControlRequestResolved)this.onControlRequestResolved(Z.response.request_id);if(Z.response.subtype==="error"){V.reject(Error(Z.response.error));return}let W=Z.response.response;if(V.schema)try{V.resolve(V.schema.parse(W))}catch(H){V.reject(H)}else V.resolve({});if(this.replayUserMessages)return Z;return}if(Z.type!=="user"&&Z.type!=="control_request"&&Z.type!=="assistant"&&Z.type!=="system"){I(`Ignoring unknown message type: ${Z.type}`,{level:"warn"});return}if(Z.type==="control_request"){if(!Z.request)XY("Error: Missing request on control_request");return Z}if(Z.type==="assistant"||Z.type==="system")return Z;if(Z.message.role!=="user")XY(`Error: Expected message role 'user', got '${Z.message.role}'`);return Z}catch(Z){console.error(`Error parsing streaming input line: ${Q}: ${Z}`),process.exit(1)}}async write(Q){KY(QY(Q)+`
21
+ `)}async sendRequest(Q,Z,X,V=dZ()){let W={type:"control_request",request_id:V,request:Q};if(this.inputClosed)throw Error("Stream closed");if(X?.aborted)throw Error("Request aborted");if(this.outbound.enqueue(W),Q.subtype==="can_use_tool"&&this.onControlRequestSent)this.onControlRequestSent(W);let H=()=>{this.outbound.enqueue({type:"control_cancel_request",request_id:V});let G=this.pendingRequests.get(V);if(G)this.trackResolvedToolUseId(G.request),G.reject(new VY)};if(X)X.addEventListener("abort",H,{once:!0});try{return await new Promise((G,K)=>{this.pendingRequests.set(V,{request:{type:"control_request",request_id:V,request:Q},resolve:(B)=>{G(B)},reject:K,schema:Z})})}finally{if(X)X.removeEventListener("abort",H);this.pendingRequests.delete(V)}}createCanUseTool(Q){return async(Z,X,V,W,H,G)=>{let K=G??await BY(Z,X,V,W,H);if(K.behavior==="allow"||K.behavior==="deny")return K;let B=new AbortController,z=V.abortController.signal,J=()=>B.abort();z.addEventListener("abort",J,{once:!0});try{let L=Y6(Z.name,H,X,V,K.suggestions).then((P)=>({source:"hook",decision:P})),_=dZ();Q?.(tQ(Z,X,H,_));let w=this.sendRequest({subtype:"can_use_tool",tool_name:Z.name,input:X,permission_suggestions:K.suggestions,blocked_path:K.blockedPath,decision_reason:sQ(K.decisionReason),tool_use_id:H,agent_id:V.agentId},gZ(),B.signal,_).then((P)=>({source:"sdk",result:P})),v=await Promise.race([L,w]);if(v.source==="hook"){if(v.decision)return w.catch(()=>{}),B.abort(),v.decision;let P=await w;return jZ(P.result,Z,X,V)}return jZ(v.result,Z,X,V)}catch(L){return jZ({behavior:"deny",message:`Tool permission request failed: ${L}`,toolUseID:H},Z,X,V)}finally{if(this.getPendingPermissionRequests().length===0)LY("running");z.removeEventListener("abort",J)}}}createHookCallback(Q,Z){return{type:"callback",timeout:Z,callback:async(X,V,W)=>{try{return await this.sendRequest({subtype:"hook_callback",callback_id:Q,input:X,tool_use_id:V||void 0},JY(),W)}catch(H){return console.error(`Error in hook callback ${Q}:`,H),{}}}}}async handleElicitation(Q,Z,X,V,W,H,G){try{return await this.sendRequest({subtype:"elicitation",mcp_server_name:Q,message:Z,mode:W,url:H,elicitation_id:G,requested_schema:X},o0(),V)}catch{return{action:"cancel"}}}createSandboxAskCallback(){return async(Q)=>{try{return(await this.sendRequest({subtype:"can_use_tool",tool_name:oQ,input:{host:Q.host},tool_use_id:dZ(),description:`Allow network connection to ${Q.host}?`},gZ())).behavior==="allow"}catch{return!1}}}async sendMcpMessage(Q,Z){return(await this.sendRequest({subtype:"mcp_message",server_name:Q,message:Z},Y.object({mcp_response:Y.any()}))).mcp_response}}function XY(Q){console.error(Q),process.exit(1)}async function Y6(Q,Z,X,V,W){let G=V.getAppState().toolPermissionContext.mode,K=zY(Q,Z,X,V,G,W,V.abortController.signal);for await(let B of K)if(B.permissionRequestResult&&(B.permissionRequestResult.behavior==="allow"||B.permissionRequestResult.behavior==="deny")){let z=B.permissionRequestResult;if(z.behavior==="allow"){let J=z.updatedInput||X,L=z.updatedPermissions??[];if(L.length>0){$Z(L);let _=V.getAppState(),w=yZ(_.toolPermissionContext,L);V.setAppState((v)=>{if(v.toolPermissionContext===w)return v;return{...v,toolPermissionContext:w}})}return{behavior:"allow",updatedInput:J,userModified:!1,decisionReason:{type:"hook",hookName:"PermissionRequest"}}}else return{behavior:"deny",message:z.message||"Permission denied by PermissionRequest hook",decisionReason:{type:"hook",hookName:"PermissionRequest"}}}return}_Y();function HV(Q){if(Q.type!=="user")return;let Z=Q.message?.content;if(!Z)return;if(Array.isArray(Z)&&Z.length===0)return;let X="uuid"in Q&&typeof Q.uuid==="string"?Q.uuid:void 0;return{content:Array.isArray(Z)?Q6(Z):Z,uuid:X}}function Q6(Q){if(!Q.some(vY))return Q;return Q.map((Z)=>{if(!vY(Z))return Z;let X=Z.source,V=typeof X.mediaType==="string"&&X.mediaType?X.mediaType:AY(Z.source.data);return{...Z,source:{type:"base64",media_type:V,data:Z.source.data}}})}function vY(Q){if(Q.type!=="image"||Q.source?.type!=="base64")return!1;return!Q.source.media_type}BZ();J6();V6();G6();X6();K6();W6();import{randomUUID as H6}from"crypto";function N6(Q){return Q===wY?EY:Q}function OV(Q){let X=yY()?.outputStyle??PY,V={type:"system",subtype:"init",cwd:UY(),session_id:NZ(),tools:Q.tools.map((W)=>N6(W.name)),mcp_servers:Q.mcpClients.map((W)=>({name:W.name,status:W.type})),model:Q.model,permissionMode:Q.permissionMode,slash_commands:Q.commands.filter((W)=>W.userInvocable!==!1).map((W)=>W.name),apiKeySource:jY().source,betas:OY(),claude_code_version:"99.0.0",output_style:X,agents:Q.agents.map((W)=>W.agentType),skills:Q.skills.filter((W)=>W.userInvocable!==!1).map((W)=>W.name),plugins:Q.plugins.map((W)=>({name:W.name,path:W.path,source:W.source})),uuid:H6()};return V.fast_mode_state=$Y(Q.model,Q.fastMode),V}var FY={"`":"`",'"':'"',"<":">","{":"}","[":"]","(":")","'":"'"};function B6(Q,Z){if(!new RegExp(Z,"i").test(Q))return[];if(Q.startsWith("/"))return[];let V=[],W=null,H=0,G=(J)=>!!J&&/[\p{L}\p{N}_]/u.test(J);for(let J=0;J<Q.length;J++){let L=Q[J];if(W){if(W==="["&&L==="["){H=J;continue}if(L!==FY[W])continue;if(W==="'"&&G(Q[J+1]))continue;V.push({start:H,end:J+1}),W=null}else if(L==="<"&&J+1<Q.length&&/[a-zA-Z/]/.test(Q[J+1])||L==="'"&&!G(Q[J-1])||L!=="<"&&L!=="'"&&L in FY)W=L,H=J}let K=[],B=new RegExp(`\\b${Z}\\b`,"gi"),z=Q.matchAll(B);for(let J of z){if(J.index===void 0)continue;let L=J.index,_=L+J[0].length;if(V.some((P)=>L>=P.start&&L<P.end))continue;let w=Q[L-1],v=Q[_];if(w==="/"||w==="\\"||w==="-")continue;if(v==="/"||v==="\\"||v==="-"||v==="?")continue;if(v==="."&&G(Q[_+1]))continue;K.push({word:J[0],start:L,end:_})}return K}function wV(Q){return B6(Q,"ultrareview")}UZ();wZ();w6();_6();O6();v6();qY();_Y();D6();wZ();U6();A6();import{randomUUID as E6}from"crypto";BZ();UZ();wZ();L6();z6();import{randomUUID as q6}from"crypto";function MY(Q){let Z=Q.toLowerCase();return/\b(wtf|wth|ffs|omfg|shit(ty|tiest)?|dumbass|horrible|awful|piss(ed|ing)? off|piece of (shit|crap|junk)|what the (fuck|hell)|fucking? (broken|useless|terrible|awful|horrible)|fuck you|screw (this|you)|so frustrating|this sucks|damn it)\b/.test(Z)}function bY(Q){let Z=Q.toLowerCase().trim();if(Z==="continue")return!0;return/\b(keep going|go on)\b/.test(Z)}function fY(Q,Z,X,V,W,H,G){let K=q6();IY(K);let B=typeof Q==="string"?Q:Q.find((w)=>w.type==="text")?.text||"";RY(B);let z=typeof Q==="string"?Q:Q.findLast((w)=>w.type==="text")?.text||"";if(z)TY("user_prompt",{prompt_length:String(z.length),prompt:CY(z),"prompt.id":K});let J=MY(B),L=bY(B);if(g("tengu_input_prompt",{is_negative:J,is_keep_going:L}),Z.length>0){let w=typeof Q==="string"?Q.trim()?[{type:"text",text:Q}]:[]:Q;return{messages:[s({content:[...w,...Z],uuid:W,imagePasteIds:X.length>0?X:void 0,permissionMode:H,isMeta:G||void 0}),...V],shouldQuery:!0}}return{messages:[s({content:Q,uuid:W,permissionMode:H,isMeta:G||void 0}),...V],shouldQuery:!0}}async function iV({input:Q,preExpansionInput:Z,mode:X,setToolJSX:V,context:W,pastedContents:H,ideSelection:G,messages:K,setUserInputOnProcessing:B,uuid:z,isAlreadyProcessing:J,querySource:L,canUseTool:_,skipSlashCommands:w,bridgeOrigin:v,isMeta:P,skipAttachments:f}){let D=typeof Q==="string"?Q:null;if(X==="prompt"&&D!==null&&!P)B?.(D);n("query_process_user_input_base_start");let F=W.getAppState(),y=await y6(Q,X,V,W,H,G,K,z,J,L,_,F.toolPermissionContext.mode,w,v,P,f,Z);if(n("query_process_user_input_base_end"),!y.shouldQuery)return y;n("query_hooks_start");let S=hY(Q)||"";for await(let O of iY(S,F.toolPermissionContext.mode,W,W.requestPrompt)){if(O.message?.type==="progress")continue;if(O.blockingError){let $=rY(O.blockingError);return{messages:[gY(`${$}
22
+
23
+ Original prompt: ${Q}`,"warning")],shouldQuery:!1,allowedTools:y.allowedTools}}if(O.preventContinuation){let $=O.stopReason?`Operation stopped by hook: ${O.stopReason}`:"Operation stopped by hook";return y.messages.push(s({content:$})),y.shouldQuery=!1,y}if(O.additionalContexts&&O.additionalContexts.length>0)y.messages.push(kY({type:"hook_additional_context",content:O.additionalContexts.map(SY),hookName:"UserPromptSubmit",toolUseID:`hook-${E6()}`,hookEvent:"UserPromptSubmit"}));if(O.message)switch(O.message.attachment.type){case"hook_success":if(!O.message.attachment.content)break;y.messages.push({...O.message,attachment:{...O.message.attachment,content:SY(O.message.attachment.content)}});break;default:y.messages.push(O.message);break}}return n("query_hooks_end"),y}var aZ=1e4;function SY(Q){if(Q.length>aZ)return`${Q.substring(0,aZ)}… [output truncated - exceeded ${aZ} characters]`;return Q}async function y6(Q,Z,X,V,W,H,G,K,B,z,J,L,_,w,v,P,f){let D=null,F=[],y=[],S=Q;if(typeof Q==="string")D=Q;else if(Q.length>0){n("query_image_processing_start");let A=[];for(let N of Q)if(N.type==="image"){let u=await iZ(N);if(u.dimensions){let l=FZ(u.dimensions);if(l)y.push(l)}A.push(u.block)}else A.push(N);S=A,n("query_image_processing_end");let j=A[A.length-1];if(j?.type==="text")D=j.text,F=A.slice(0,-1);else F=A}if(D===null&&Z!=="prompt")throw Error(`Mode: ${Z} requires a string input.`);let O=W?Object.values(W).filter(cY):[],$=O.map((A)=>A.id),d=W?await xY(W):new Map;n("query_pasted_image_processing_start");let i=await Promise.all(O.map(async(A)=>{let j={type:"image",source:{type:"base64",media_type:A.mediaType||"image/png",data:A.content}};return g("tengu_pasted_image_resize_attempt",{original_size_bytes:A.content.length}),{resized:await iZ(j),originalDimensions:A.dimensions,sourcePath:A.sourcePath??d.get(A.id)}})),o=[];for(let{resized:A,originalDimensions:j,sourcePath:N}of i){if(A.dimensions){let u=FZ(A.dimensions,N);if(u)y.push(u)}else if(j){let u=FZ(j,N);if(u)y.push(u)}else if(N)y.push(`[Image source: ${N}]`);o.push(A.block)}n("query_pasted_image_processing_end");let C=_;if(w&&D!==null&&D.startsWith("/")){let A=pY(D),j=A?nY(A.commandName,V.options.commands):void 0;if(j)if(aY(j))C=!1;else{let N=`/${lY(j)} isn't available over Remote Control.`;return{messages:[s({content:D,uuid:K}),dY(`<local-command-stdout>${N}</local-command-stdout>`)],shouldQuery:!1,resultText:N}}}let k=!P&&D!==null&&(Z!=="prompt"||C||!D.startsWith("/"));n("query_attachment_loading_start");let x=k?await uY(mY(D,V,H??null,[],G,z)):[];if(n("query_attachment_loading_end"),D!==null&&Z==="bash"){let{processBashCommand:A}=await import("./processBashCommand-1.0.9-4s05h1bj.mjs");return nZ(await A(D,F,x,V,X),y)}if(D!==null&&!C&&D.startsWith("/")){let{processSlashCommand:A}=await import("./processSlashCommand-1.0.9-5tvxytqm.mjs"),j=await A(D,F,o,x,V,X,K,B,J);return nZ(j,y)}if(D!==null&&Z==="prompt"){let A=D.trim(),j=x.find((N)=>N.attachment.type==="agent_mention");if(j){let N=`@agent-${j.attachment.agentType}`,u=A===N,l=A.startsWith(N)&&!u;g("tengu_subagent_at_mention",{is_subagent_only:u,is_prefix:l})}}return nZ(fY(S,o,$,x,K,L,v),y)}function nZ(Q,Z){if(Z.length>0)Q.messages.push(s({content:Z.map((X)=>({type:"text",text:X})),isMeta:!0}));return Q}i6();BZ();HZ();lZ();n6();a6();w0();o6();r6();import{isAbsolute as s6,resolve as t6}from"path";function e6(Q,Z,X){let V=[],W=[],H=[];for(let[G,K]of Object.entries(Q)){let B=Z[G],z=b9(K.source,X?.projectRoot);if(!B)V.push(G);else if(K.sourceIsFallback)H.push(G);else if(!j9(z,B.source))W.push({name:G,declaredSource:z,materializedSource:B.source});else H.push(G)}return{missing:V,sourceChanged:W,upToDate:H}}async function IW(Q){let Z=P9();if(Object.keys(Z).length===0)return{installed:[],updated:[],failed:[],upToDate:[],skipped:[]};let X;try{X=await F9()}catch(J){e(J),X={}}let V=e6(Z,X,{projectRoot:W0()}),W=[...V.missing.map((J)=>({name:J,source:b9(Z[J].source),action:"install"})),...V.sourceChanged.map(({name:J,declaredSource:L})=>({name:J,source:L,action:"update"}))],H=[],G=[];for(let J of W){if(Q?.skip?.(J.name,J.source)){H.push(J.name);continue}if(J.action==="update"&&$9(J.source)&&!await y9(J.source.path)){I(`[reconcile] '${J.name}' declared path does not exist; keeping materialized entry`),H.push(J.name);continue}G.push(J)}if(G.length===0)return{installed:[],updated:[],failed:[],upToDate:V.upToDate,skipped:H};I(`[reconcile] ${G.length} marketplace(s): ${G.map((J)=>`${J.name}(${J.action})`).join(", ")}`);let K=[],B=[],z=[];for(let J=0;J<G.length;J++){let{name:L,source:_,action:w}=G[J];Q?.onProgress?.({type:"installing",name:L,action:w,index:J+1,total:G.length});try{let v=await M9(_);if(w==="install")K.push(L);else B.push(L);Q?.onProgress?.({type:"installed",name:L,alreadyMaterialized:v.alreadyMaterialized})}catch(v){let P=w9(v);z.push({name:L,error:P}),Q?.onProgress?.({type:"failed",name:L,error:P}),e(v)}}return{installed:K,updated:B,failed:z,upToDate:V.upToDate,skipped:H}}function b9(Q,Z){if((Q.source==="directory"||Q.source==="file")&&!s6(Q.path)){let X=Z??W0(),V=E9(X);return{...Q,path:t6(V??X,Q.path)}}return Q}
24
+ export{HV as la,N6 as ma,OV as na,e9 as oa,S0 as pa,VQ as qa,WQ as ra,KQ as sa,wV as ta,iV as ua,gZ as va,jZ as wa,QY as xa,oQ as ya,Z6 as za,e6 as Aa,IW as Ba,M6 as Ca,b6 as Da,I6 as Ea,g6 as Fa,d6 as Ga,l6 as Ha};
@@ -0,0 +1,12 @@
1
+ import{Ag as uZ,Bg as fz,zg as $Z}from"./cli-1.0.9-6424zmgd.mjs";import{Hh as HJ,Ih as Vz}from"./cli-1.0.9-n2eds51d.mjs";import{Sh as GJ,Th as Bz}from"./cli-1.0.9-nm7ds98w.mjs";import{$x as fQ,$z as SZ,AQ as aQ,CQ as g0,DQ as rQ,FQ as eJ,Fs as NJ,GQ as ZQ,Gx as $Q,HJ as gQ,HQ as oQ,IQ as tQ,Js as Uz,Jx as AX,KQ as OZ,Ln as zQ,Mn as $z,Nk as mZ,Ok as FX,Tn as RQ,Un as wX,Yx as UQ,Zx as jQ,_S as VQ,_x as uQ,aA as hZ,bA as TZ,cA as dJ,cT as KQ,dA as cQ,dk as _Z,dy as MQ,eA as cJ,ek as TQ,ey as EQ,fT as fZ,ho as XQ,jo as xZ,kA as e0,lA as gJ,mA as mJ,mk as IJ,nA as nJ,nk as SJ,oA as yz,qy as pQ,rT as BQ,ry as PX,sQ as nQ,to as WQ,uk as pJ,wQ as iQ,xQ as lQ,xo as uz,yy as dQ,zQ as nZ,zy as DX}from"./cli-1.0.9-67c9vgsq.mjs";import{BU as OX,sU as xQ}from"./cli-1.0.9-c5n2kbdv.mjs";import{QX as YJ,UX as qz,VX as UZ,WX as NX,vX as FZ,wX as qJ}from"./cli-1.0.9-13q9fkxq.mjs";import{BY as WJ,CY as Wz,IZ as jZ,JZ as Jz,L0 as p0,LY as u0,ZZ as hQ,_Z as KX,e0 as b,f0 as DQ,fZ as c0,g0 as g,h0 as JX,jZ as vZ}from"./cli-1.0.9-q3fzs7rd.mjs";import{r3 as f0,s3 as B,t3 as $,u3 as F0}from"./cli-1.0.9-e491drav.mjs";import{v3 as S0}from"./cli-1.0.9-ez2pcj03.mjs";import{R3 as VJ,S3 as BJ,T3 as Yz}from"./cli-1.0.9-89yxpmpq.mjs";import{$6 as JZ,$7 as xz,G7 as QQ,V6 as PQ,W6 as ZX,c7 as QZ,w7 as JQ}from"./cli-1.0.9-sjqe138z.mjs";import{v8 as gZ,w8 as GX}from"./cli-1.0.9-erz57dtz.mjs";import{C9 as v0,D9 as zJ,Gaa as SQ,Vda as DZ,aba as LX,kca as LZ,oea as HQ,sca as XJ}from"./cli-1.0.9-ej3ahs6j.mjs";import{Zfa as PZ,_fa as TJ,iga as ZZ,pga as hz}from"./cli-1.0.9-x4t4nqd2.mjs";import{Eha as RZ,Fha as Rz,Qha as KZ,Vha as wZ,Wha as NZ,gia as Dz}from"./cli-1.0.9-e2mjjvjc.mjs";import{uja as m0,xja as ez}from"./cli-1.0.9-ympvk0av.mjs";import{fka as IQ,pka as HX}from"./cli-1.0.9-y7sdjd9n.mjs";import{Spa as BX,npa as kQ}from"./cli-1.0.9-3ye1460y.mjs";import{Bra as L0,xra as N0}from"./cli-1.0.9-j2832pm5.mjs";function MZ(){if($0!==null)clearTimeout($0),$0=null;bZ=Date.now();for(let J of BZ)J()}function Qz(){if($0!==null)return;let J=Date.now()-bZ;if(J>=jZ){MZ();return}$0=setTimeout(MZ,jZ-J)}function iZ(){return EZ.useSyncExternalStore(s0.subscribe,s0.getSnapshot)}function TX(){return EZ.useSyncExternalStore(s0.subscribe,s0.getPresenceSnapshot)}var EZ,x0=null,BZ,$0=null,bZ=0,s0;var lZ=L0(()=>{Jz();EZ=N0(S0(),1),BZ=new Set;s0={update(J){let Z=x0;if(x0=J(Z),x0===Z)return;if(Z===null!==(x0===null))MZ();else Qz()},clear(){s0.update(()=>null)},read(){return x0},subscribe(J){return BZ.add(J),()=>{BZ.delete(J)}},getSnapshot(){return x0},getPresenceSnapshot(){return x0!==null},resetForTesting(){if($0!==null)clearTimeout($0),$0=null;x0=null,bZ=0,BZ.clear()}}});function sZ(J){let Z=HZ.c(6),{children:Q}=J,[z,X]=K0.useState(null),[W,q]=K0.useState(null),V;if(Z[0]!==Q||Z[1]!==W)V=B(oZ.Provider,{value:W,children:Q}),Z[0]=Q,Z[1]=W,Z[2]=V;else V=Z[2];let Y;if(Z[3]!==z||Z[4]!==V)Y=B(rZ.Provider,{value:X,children:B(tZ.Provider,{value:q,children:B(aZ.Provider,{value:z,children:V})})}),Z[3]=z,Z[4]=V,Z[5]=Y;else Y=Z[5];return Y}function eZ(){return K0.useContext(aZ)}function ZJ(){return K0.useContext(oZ)}function xX(J){let Z=HZ.c(8),Q=K0.useContext(rZ),z,X,W,q;if(Z[0]!==J||Z[1]!==Q)z=()=>{if(!Q)return;Q(J)},X=[Q,J],Z[0]=J,Z[1]=Q,Z[2]=z,Z[3]=X;else z=Z[2],X=Z[3];if(Z[4]!==Q)W=()=>{if(!Q)return;return()=>Q(null)},q=[Q],Z[4]=Q,Z[5]=W,Z[6]=q;else W=Z[5],q=Z[6];K0.useEffect(z,X),K0.useEffect(W,q)}function $X(J){let Z=HZ.c(8),Q=K0.useContext(tZ),z,X,W,q;if(Z[0]!==J||Z[1]!==Q)z=()=>{if(!Q)return;Q(J)},X=[Q,J],Z[0]=J,Z[1]=Q,Z[2]=z,Z[3]=X;else z=Z[2],X=Z[3];if(Z[4]!==Q)W=()=>{if(!Q)return;return()=>Q(null)},q=[Q],Z[4]=Q,Z[5]=W,Z[6]=q;else W=Z[5],q=Z[6];K0.useEffect(z,X),K0.useEffect(W,q)}var HZ,K0,aZ,rZ,oZ,tZ;var JJ=L0(()=>{F0();HZ=N0(u0(),1),K0=N0(S0(),1),aZ=K0.createContext(null),rZ=K0.createContext(null),oZ=K0.createContext(null),tZ=K0.createContext(null)});function GZ(J){return J.type==="attachment"&&Xz.has(J.attachment.type)}var zz,Xz;var CZ=L0(()=>{zz=["hook_success","hook_additional_context","hook_cancelled","command_permissions","agent_mention","budget_usd","critical_system_reminder","edited_image_file","edited_text_file","opened_file_in_ide","output_style","plan_mode","plan_mode_exit","plan_mode_reentry","structured_output","team_context","todo_reminder","context_efficiency","deferred_tools_delta","mcp_instructions_delta","companion_intro","token_usage","ultrathink_effort","max_turns_reached","task_reminder","auto_mode","auto_mode_exit","output_token_usage","pen_mode_enter","pen_mode_exit","verify_plan_reminder","current_session_memory","compaction_reminder","date_change","bash_git_instructions","claude_md_delta","git_status_delta","memory_delta","todo_reminder_delta"],Xz=new Set(zz)});import{fileURLToPath as Hz}from"url";function QW(J){let[Z,Q]=q0.useState(null),z=q0.useRef(J);z.current=J;let X=q0.useRef(null),W=q0.useCallback(()=>{Q(null)},[]),q=q0.useCallback((K)=>{let F=Math.max(0,K.getScrollHeight()-K.getViewportHeight());if(K.getScrollTop()+K.getPendingDelta()>=F)return;if(X.current===null)X.current=K.getScrollHeight(),Q(z.current)},[]),V=q0.useCallback((K)=>{if(!K)return;K.scrollToBottom()},[]);q0.useEffect(()=>{if(Z===null)X.current=null;else if(J<Z)X.current=null,Q(null)},[J,Z]);let Y=q0.useCallback((K,F)=>{if(Q((P)=>P===null?null:P+K),X.current!==null)X.current+=F},[]);return{dividerIndex:Z,dividerYRef:X,onScrollAway:q,onRepin:W,jumpToNew:V,shiftDivider:Y}}function Gz(J,Z){let Q=0,z=!1;for(let X=Z;X<J.length;X++){let W=J[X];if(W.type==="progress")continue;if(W.type==="assistant"&&!Lz(W))continue;let q=W.type==="assistant";if(q&&!z)Q++;z=q}return Q}function Lz(J){if(J.type!=="assistant")return!1;for(let Z of J.message.content)if(Z.type==="text"&&Z.text.trim()!=="")return!0;return!1}function zW(J,Z){if(Z===null)return;let Q=Z;while(Q<J.length&&(J[Q]?.type==="progress"||GZ(J[Q])))Q++;let z=J[Q]?.uuid;if(!z)return;let X=Gz(J,Z);return{firstUnseenUuid:z,count:Math.max(1,X)}}function XW(J){let Z=a0.c(47),{scrollable:Q,bottom:z,overlay:X,bottomFloat:W,modal:q,modalScrollRef:V,scrollRef:Y,dividerYRef:K,hidePill:F,hideSticky:P,newMessageCount:v,onPillClick:M}=J,S=F===void 0?!1:F,Z0=P===void 0?!1:P,d=v===void 0?0:v,{rows:O,columns:C}=FZ(),[_,w]=q0.useState(null),D;if(Z[0]===Symbol.for("react.memo_cache_sentinel"))D={setStickyPrompt:w},Z[0]=D;else D=Z[0];let p=D,J0;if(Z[1]!==Y)J0=(h)=>Y?.current?.subscribe(h)??wz,Z[1]=Y,Z[2]=J0;else J0=Z[2];let E=J0,k;if(Z[3]!==K||Z[4]!==Y)k=()=>{let h=Y?.current,z0=K?.current;if(!h||z0==null)return!1;return h.getScrollTop()+h.getPendingDelta()+h.getViewportHeight()<z0},Z[3]=K,Z[4]=Y,Z[5]=k;else k=Z[5];let H0=q0.useSyncExternalStore(E,k),Y0;if(Z[6]===Symbol.for("react.memo_cache_sentinel"))Y0=[],Z[6]=Y0;else Y0=Z[6];if(q0.useLayoutEffect(Fz,Y0),c0()){let h=Z0?null:_,z0=h!=null&&h!=="clicked"&&X==null?h:null,Q0=h!=null&&X==null,X0;if(Z[7]!==z0)X0=z0&&B(Oz,{text:z0.text,onClick:z0.scrollTo}),Z[7]=z0,Z[8]=X0;else X0=Z[8];let O0=Q0?0:1,T;if(Z[9]!==Q)T=B(yZ,{value:p,children:Q}),Z[9]=Q,Z[10]=T;else T=Z[10];let i;if(Z[11]!==X||Z[12]!==Y||Z[13]!==T||Z[14]!==O0)i=$(GJ,{ref:Y,flexGrow:1,flexDirection:"column",paddingTop:O0,stickyScroll:!0,children:[T,X]}),Z[11]=X,Z[12]=Y,Z[13]=T,Z[14]=O0,Z[15]=i;else i=Z[15];let o;if(Z[16]!==S||Z[17]!==d||Z[18]!==M||Z[19]!==X||Z[20]!==H0)o=!S&&H0&&X==null&&B(Nz,{count:d,onClick:M}),Z[16]=S,Z[17]=d,Z[18]=M,Z[19]=X,Z[20]=H0,Z[21]=o;else o=Z[21];let t;if(Z[22]!==W)t=W!=null&&B(b,{position:"absolute",bottom:0,right:0,opaque:!0,children:W}),Z[22]=W,Z[23]=t;else t=Z[23];let I;if(Z[24]!==i||Z[25]!==o||Z[26]!==t||Z[27]!==X0)I=$(b,{flexGrow:1,flexDirection:"column",overflow:"hidden",children:[X0,i,o,t]}),Z[24]=i,Z[25]=o,Z[26]=t,Z[27]=X0,Z[28]=I;else I=Z[28];let W0,N;if(Z[29]===Symbol.for("react.memo_cache_sentinel"))W0=B(Az,{}),N=B(Pz,{}),Z[29]=W0,Z[30]=N;else W0=Z[29],N=Z[30];let U;if(Z[31]!==z)U=$(b,{flexDirection:"column",flexShrink:0,width:"100%",maxHeight:"50%",children:[W0,N,B(b,{flexDirection:"column",width:"100%",flexGrow:1,overflowY:"hidden",children:z})]}),Z[31]=z,Z[32]=U;else U=Z[32];let R;if(Z[33]!==C||Z[34]!==q||Z[35]!==V||Z[36]!==O)R=q!=null&&B(YJ,{value:{rows:O-QJ-1,columns:C-4,scrollRef:V??null},children:$(b,{position:"absolute",bottom:0,left:0,right:0,maxHeight:O-QJ,flexDirection:"column",overflow:"hidden",opaque:!0,children:[B(b,{flexShrink:0,children:B(g,{color:"permission",children:"▔".repeat(C)})}),B(b,{flexDirection:"column",paddingX:2,flexShrink:0,overflow:"hidden",children:q})]})}),Z[33]=C,Z[34]=q,Z[35]=V,Z[36]=O,Z[37]=R;else R=Z[37];let s;if(Z[38]!==I||Z[39]!==U||Z[40]!==R)s=$(sZ,{children:[I,U,R]}),Z[38]=I,Z[39]=U,Z[40]=R,Z[41]=s;else s=Z[41];return s}let l;if(Z[42]!==z||Z[43]!==q||Z[44]!==X||Z[45]!==Q)l=$(f0,{children:[Q,z,X,q]}),Z[42]=z,Z[43]=q,Z[44]=X,Z[45]=Q,Z[46]=l;else l=Z[46];return l}function Fz(){if(!c0())return;let J=WJ.get(process.stdout);if(!J)return;return J.onHyperlinkClick=Kz,()=>{J.onHyperlinkClick=void 0}}function Kz(J){if(J.startsWith("file:"))try{VJ(Hz(J))}catch{}else BJ(J)}function wz(){}function Nz(J){let Z=a0.c(10),{count:Q,onClick:z}=J,[X,W]=q0.useState(!1),q,V;if(Z[0]===Symbol.for("react.memo_cache_sentinel"))q=()=>W(!0),V=()=>W(!1),Z[0]=q,Z[1]=V;else q=Z[0],V=Z[1];let Y=X?"userMessageBackgroundHover":"userMessageBackground",K;if(Z[2]!==Q)K=Q>0?`${Q} new ${LZ(Q,"message")}`:"Jump to bottom",Z[2]=Q,Z[3]=K;else K=Z[3];let F;if(Z[4]!==Y||Z[5]!==K)F=$(g,{backgroundColor:Y,dimColor:!0,children:[" ",K," ",v0.arrowDown," "]}),Z[4]=Y,Z[5]=K,Z[6]=F;else F=Z[6];let P;if(Z[7]!==z||Z[8]!==F)P=B(b,{position:"absolute",bottom:0,left:0,right:0,justifyContent:"center",children:B(b,{onClick:z,onMouseEnter:q,onMouseLeave:V,children:F})}),Z[7]=z,Z[8]=F,Z[9]=P;else P=Z[9];return P}function Oz(J){let Z=a0.c(8),{text:Q,onClick:z}=J,[X,W]=q0.useState(!1),q=X?"userMessageBackgroundHover":"userMessageBackground",V,Y;if(Z[0]===Symbol.for("react.memo_cache_sentinel"))V=()=>W(!0),Y=()=>W(!1),Z[0]=V,Z[1]=Y;else V=Z[0],Y=Z[1];let K;if(Z[2]!==Q)K=$(g,{color:"subtle",wrap:"truncate-end",children:[v0.pointer," ",Q]}),Z[2]=Q,Z[3]=K;else K=Z[3];let F;if(Z[4]!==z||Z[5]!==q||Z[6]!==K)F=B(b,{flexShrink:0,width:"100%",height:1,paddingRight:1,backgroundColor:q,onClick:z,onMouseEnter:V,onMouseLeave:Y,children:K}),Z[4]=z,Z[5]=q,Z[6]=K,Z[7]=F;else F=Z[7];return F}function Az(){let J=a0.c(4),Z=eZ();if(!Z||Z.suggestions.length===0)return null;let Q;if(J[0]!==Z.maxColumnWidth||J[1]!==Z.selectedSuggestion||J[2]!==Z.suggestions)Q=B(b,{position:"absolute",bottom:"100%",left:0,right:0,paddingX:2,paddingTop:1,flexDirection:"column",opaque:!0,children:B(HJ,{suggestions:Z.suggestions,selectedSuggestion:Z.selectedSuggestion,maxColumnWidth:Z.maxColumnWidth,overlay:!0})}),J[0]=Z.maxColumnWidth,J[1]=Z.selectedSuggestion,J[2]=Z.suggestions,J[3]=Q;else Q=J[3];return Q}function Pz(){let J=a0.c(2),Z=ZJ();if(!Z)return null;let Q;if(J[0]!==Z)Q=B(b,{position:"absolute",bottom:"100%",left:0,right:0,opaque:!0,children:Z}),J[0]=Z,J[1]=Q;else Q=J[1];return Q}var a0,q0,QJ=2,yZ;var LJ=L0(()=>{zJ();qz();JJ();qJ();Bz();Wz();p0();Yz();vZ();XJ();CZ();Vz();F0();a0=N0(u0(),1),q0=N0(S0(),1),yZ=q0.createContext({setStickyPrompt:()=>{}})});function FJ(J,Z){for(let Q of J)if(!Z.has(Q))return!1;return!0}var KJ=()=>{};function wJ(J){if(J.type!=="user")return!1;let Z=J.message.content[0];if(Z?.type!=="text")return!1;if(!Z.text.includes(`<${KZ}`))return!1;if(_Z(Z.text,wZ)!=="completed")return!1;return _Z(Z.text,NZ)?.startsWith(NJ)??!1}function OJ(J,Z){if(!c0())return J;if(Z)return J;let Q=[],z=0;while(z<J.length){let X=J[z];if(wJ(X)){let W=0;while(z<J.length&&wJ(J[z]))W++,z++;if(W===1)Q.push(X);else Q.push({...X,message:{role:"user",content:[{type:"text",text:`<${KZ}><${wZ}>completed</${wZ}><${NZ}>${W} background commands completed</${NZ}></${KZ}>`}]}})}else Q.push(X),z++}return Q}var AJ=L0(()=>{Dz();Uz();vZ();OZ()});function PJ(J){return J.type==="system"&&J.subtype==="stop_hook_summary"&&J.hookLabel!==void 0}function DJ(J){let Z=[],Q=0;while(Q<J.length){let z=J[Q];if(PJ(z)){let X=z.hookLabel,W=[];while(Q<J.length){let q=J[Q];if(!PJ(q)||q.hookLabel!==X)break;W.push(q),Q++}if(W.length===1)Z.push(z);else Z.push({...z,hookCount:W.reduce((q,V)=>q+V.hookCount,0),hookInfos:W.flatMap((q)=>q.hookInfos),hookErrors:W.flatMap((q)=>q.hookErrors),preventedContinuation:W.some((q)=>q.preventedContinuation),hasOutput:W.some((q)=>q.hasOutput),totalDurationMs:Math.max(...W.map((q)=>q.totalDurationMs??0))})}else Z.push(z),Q++}return Z}var UJ=()=>{};function jJ(J){return J.type==="attachment"&&J.attachment.type==="task_status"&&J.attachment.taskType==="in_process_teammate"&&J.attachment.status==="completed"}function MJ(J){let Z=[],Q=0;while(Q<J.length){let z=J[Q];if(jJ(z)){let X=0;while(Q<J.length&&jJ(J[Q]))X++,Q++;if(X===1)Z.push(z);else Z.push({type:"attachment",uuid:z.uuid,timestamp:z.timestamp,attachment:{type:"teammate_shutdown_batch",count:X}})}else Z.push(z),Q++}return Z}var EJ=()=>{};function jz(J){let Z=bJ.get(J);if(!Z)Z=new Set(J.filter((Q)=>Q.renderGroupedToolUse).map((Q)=>Q.name)),bJ.set(J,Z);return Z}function kZ(J){if(J.type==="assistant"&&J.message.content[0]?.type==="tool_use"){let Z=J.message.content[0];return{messageId:J.message.id,toolUseId:Z.id,toolName:Z.name}}return null}function CJ(J,Z,Q=!1){if(Q)return{messages:J};let z=jz(Z),X=new Map;for(let F of J){let P=kZ(F);if(P&&z.has(P.toolName)){let v=`${P.messageId}:${P.toolName}`,M=X.get(v)??[];M.push(F),X.set(v,M)}}let W=new Map,q=new Set;for(let[F,P]of X)if(P.length>=2){W.set(F,P);for(let v of P){let M=kZ(v);if(M)q.add(M.toolUseId)}}let V=new Map;for(let F of J)if(F.type==="user"){for(let P of F.message.content)if(P.type==="tool_result"&&q.has(P.tool_use_id))V.set(P.tool_use_id,F)}let Y=[],K=new Set;for(let F of J){let P=kZ(F);if(P){let v=`${P.messageId}:${P.toolName}`,M=W.get(v);if(M){if(!K.has(v)){K.add(v);let S=M[0],Z0=[];for(let O of M){let C=O.message.content[0].id,_=V.get(C);if(_)Z0.push(_)}let d={type:"grouped_tool_use",toolName:P.toolName,messages:M,results:Z0,displayMessage:S,uuid:`grouped-${S.uuid}`,timestamp:S.timestamp,messageId:P.messageId};Y.push(d)}continue}}if(F.type==="user"){let v=F.message.content.filter((M)=>M.type==="tool_result");if(v.length>0){if(v.every((S)=>q.has(S.tool_use_id)))continue}}Y.push(F)}return{messages:Y}}var bJ;var vJ=L0(()=>{bJ=new WeakMap});function AZ(J){let Z=kJ.get(J);if(Z!==void 0)return Z;let Q=Mz(J).toLowerCase();return kJ.set(J,Q),Q}function Mz(J){let Z="";switch(J.type){case"user":{let X=J.message.content;if(typeof X==="string")Z=_J.has(X)?"":X;else{let W=[];for(let q of X)if(q.type==="text"){if(!_J.has(q.text))W.push(q.text)}else if(q.type==="tool_result")W.push(bz(J.toolUseResult));Z=W.join(`
2
+ `)}break}case"assistant":{let X=J.message.content;if(Array.isArray(X))Z=X.flatMap((W)=>{if(W.type==="text")return[W.text];if(W.type==="tool_use")return[Ez(W.input)];return[]}).join(`
3
+ `);break}case"attachment":{if(J.attachment.type==="relevant_memories")Z=J.attachment.memories.map((X)=>X.content).join(`
4
+ `);else if(J.attachment.type==="queued_command"&&J.attachment.commandMode!=="task-notification"&&!J.attachment.isMeta){let X=J.attachment.prompt;Z=typeof X==="string"?X:X.flatMap((W)=>W.type==="text"?[W.text]:[]).join(`
5
+ `)}break}case"collapsed_read_search":{if(J.relevantMemories)Z=J.relevantMemories.map((X)=>X.content).join(`
6
+ `);break}default:break}let Q=Z,z=Q.indexOf("<system-reminder>");while(z>=0){let X=Q.indexOf(yJ,z);if(X<0)break;Q=Q.slice(0,z)+Q.slice(X+yJ.length),z=Q.indexOf("<system-reminder>")}return Q}function Ez(J){if(!J||typeof J!=="object")return"";let Z=J,Q=[];for(let z of["command","pattern","file_path","path","prompt","description","query","url","skill"]){let X=Z[z];if(typeof X==="string")Q.push(X)}for(let z of["args","files"]){let X=Z[z];if(Array.isArray(X)&&X.every((W)=>typeof W==="string"))Q.push(X.join(" "))}return Q.join(`
7
+ `)}function bz(J){if(!J||typeof J!=="object")return typeof J==="string"?J:"";let Z=J;if(typeof Z.stdout==="string"){let z=typeof Z.stderr==="string"?Z.stderr:"";return Z.stdout+(z?`
8
+ `+z:"")}if(Z.file&&typeof Z.file==="object"&&typeof Z.file.content==="string")return Z.file.content;let Q=[];for(let z of["content","output","result","text","message"]){let X=Z[z];if(typeof X==="string")Q.push(X)}for(let z of["filenames","lines","results"]){let X=Z[z];if(Array.isArray(X)&&X.every((W)=>typeof W==="string"))Q.push(X.join(`
9
+ `))}return Q.join(`
10
+ `)}var yJ="</system-reminder>",_J,kJ;var IZ=L0(()=>{OZ();_J=new Set([IJ,SJ]),kJ=new WeakMap});function RJ(J){let Z=hJ.c(5),{message:Q,isTranscriptMode:z}=J;if(!(z&&Q.type==="assistant"&&Q.message.model&&Q.message.content.some(Cz)))return null;let W=PZ(Q.message.model)+8,q;if(Z[0]!==Q.message.model)q=B(g,{dimColor:!0,children:Q.message.model}),Z[0]=Q.message.model,Z[1]=q;else q=Z[1];let V;if(Z[2]!==W||Z[3]!==q)V=B(b,{minWidth:W,children:q}),Z[2]=W,Z[3]=q,Z[4]=V;else V=Z[4];return V}function Cz(J){return J.type==="text"}var hJ;var xJ=L0(()=>{TJ();p0();F0();hJ=N0(u0(),1)});function uJ(J){let Z=$J.c(10),{message:Q,isTranscriptMode:z}=J;if(!(z&&Q.timestamp&&Q.type==="assistant"&&Q.message.content.some(vz)))return null;let W,q,V;if(Z[0]!==Q.timestamp)q=new Date(Q.timestamp).toLocaleTimeString("en-US",{hour:"2-digit",minute:"2-digit",hour12:!0}),W=b,V=PZ(q),Z[0]=Q.timestamp,Z[1]=W,Z[2]=q,Z[3]=V;else W=Z[1],q=Z[2],V=Z[3];let Y;if(Z[4]!==q)Y=B(g,{dimColor:!0,children:q}),Z[4]=q,Z[5]=Y;else Y=Z[5];let K;if(Z[6]!==W||Z[7]!==V||Z[8]!==Y)K=B(W,{minWidth:V,children:Y}),Z[6]=W,Z[7]=V,Z[8]=Y,Z[9]=K;else K=Z[9];return K}function vz(J){return J.type==="text"}var $J;var fJ=L0(()=>{TJ();p0();F0();$J=N0(u0(),1)});function aJ(J,Z,Q,z){for(let X=Z+1;X<J.length;X++){let W=J[X];if(W?.type==="assistant"){let q=W.message.content[0];if(q?.type==="thinking"||q?.type==="redacted_thinking")continue;if(q?.type==="tool_use"){if(SZ(q.name,q.input,Q).isCollapsible)continue;if(z.has(q.id))continue}return!0}if(W?.type==="system"||W?.type==="attachment")continue;if(W?.type==="user"){if(W.message.content[0]?.type==="tool_result")continue}if(W?.type==="grouped_tool_use"){let q=W.messages[0]?.message.content[0]?.input;if(SZ(W.toolName,q,Q).isCollapsible)continue}return!0}return!1}function _z(J){let Z=iJ.c(64),{message:Q,isUserContinuation:z,hasContentAfter:X,tools:W,commands:q,verbose:V,inProgressToolUseIDs:Y,streamingToolUseIDs:K,screen:F,canAnimate:P,onOpenRateLimitOptions:v,lastThinkingBlockId:M,latestBashOutputUUID:S,columns:Z0,isLoading:d,lookups:O}=J,C=F==="transcript",_=Q.type==="grouped_tool_use",w=Q.type==="collapsed_read_search",D;if(Z[0]!==X||Z[1]!==Y||Z[2]!==w||Z[3]!==d||Z[4]!==Q)D=w&&(TZ(Q,Y)||d&&!X),Z[0]=X,Z[1]=Y,Z[2]=w,Z[3]=d,Z[4]=Q,Z[5]=D;else D=Z[5];let p=D,J0;if(Z[6]!==w||Z[7]!==_||Z[8]!==Q)J0=_?Q.displayMessage:w?dJ(Q):Q,Z[6]=w,Z[7]=_,Z[8]=Q,Z[9]=J0;else J0=Z[9];let E=J0,k;if(Z[10]!==w||Z[11]!==_||Z[12]!==O||Z[13]!==Q)k=_||w?[]:ZQ(Q,O),Z[10]=w,Z[11]=_,Z[12]=O,Z[13]=Q,Z[14]=k;else k=Z[14];let H0=k,Y0;if(Z[15]!==Y||Z[16]!==w||Z[17]!==_||Z[18]!==O||Z[19]!==Q||Z[20]!==F||Z[21]!==K){let I=_||w?pJ:eJ(Q,O);Y0=tJ(Q,K,Y,I,F,O),Z[15]=Y,Z[16]=w,Z[17]=_,Z[18]=O,Z[19]=Q,Z[20]=F,Z[21]=K,Z[22]=Y0}else Y0=Z[22];let l=Y0,h=!1;if(P)if(_){let I;if(Z[23]!==Y||Z[24]!==Q.messages){let W0;if(Z[26]!==Y)W0=(N)=>{let U=N.message.content[0];return U?.type==="tool_use"&&Y.has(U.id)},Z[26]=Y,Z[27]=W0;else W0=Z[27];I=Q.messages.some(W0),Z[23]=Y,Z[24]=Q.messages,Z[25]=I}else I=Z[25];h=I}else if(w){let I;if(Z[28]!==Y||Z[29]!==Q)I=TZ(Q,Y),Z[28]=Y,Z[29]=Q,Z[30]=I;else I=Z[30];h=I}else{let I;if(Z[31]!==Y||Z[32]!==Q){let W0=g0(Q);I=!W0||Y.has(W0),Z[31]=Y,Z[32]=Q,Z[33]=I}else I=Z[33];h=I}let z0;if(Z[34]!==E||Z[35]!==C)z0=C&&E.type==="assistant"&&E.message.content.some(kz)&&(E.timestamp||E.message.model),Z[34]=E,Z[35]=C,Z[36]=z0;else z0=Z[36];let Q0=z0,X0=!Q0,O0=Q0?void 0:Z0,T;if(Z[37]!==q||Z[38]!==Y||Z[39]!==p||Z[40]!==l||Z[41]!==C||Z[42]!==z||Z[43]!==M||Z[44]!==S||Z[45]!==O||Z[46]!==Q||Z[47]!==v||Z[48]!==H0||Z[49]!==h||Z[50]!==X0||Z[51]!==O0||Z[52]!==W||Z[53]!==V)T=B(nJ,{message:Q,lookups:O,addMargin:X0,containerWidth:O0,tools:W,commands:q,verbose:V,inProgressToolUseIDs:Y,progressMessagesForMessage:H0,shouldAnimate:h,shouldShowDot:!0,isTranscriptMode:C,isStatic:l,onOpenRateLimitOptions:v,isActiveCollapsedGroup:p,isUserContinuation:z,lastThinkingBlockId:M,latestBashOutputUUID:S}),Z[37]=q,Z[38]=Y,Z[39]=p,Z[40]=l,Z[41]=C,Z[42]=z,Z[43]=M,Z[44]=S,Z[45]=O,Z[46]=Q,Z[47]=v,Z[48]=H0,Z[49]=h,Z[50]=X0,Z[51]=O0,Z[52]=W,Z[53]=V,Z[54]=T;else T=Z[54];let i=T;if(!Q0){let I;if(Z[55]!==i)I=B(e0,{children:i}),Z[55]=i,Z[56]=I;else I=Z[56];return I}let o;if(Z[57]!==E||Z[58]!==C)o=$(b,{flexDirection:"row",justifyContent:"flex-end",gap:1,marginTop:1,children:[B(uJ,{message:E,isTranscriptMode:C}),B(RJ,{message:E,isTranscriptMode:C})]}),Z[57]=E,Z[58]=C,Z[59]=o;else o=Z[59];let t;if(Z[60]!==Z0||Z[61]!==i||Z[62]!==o)t=B(e0,{children:$(b,{width:Z0,flexDirection:"column",children:[o,i]})}),Z[60]=Z0,Z[61]=i,Z[62]=o,Z[63]=t;else t=Z[63];return t}function kz(J){return J.type==="text"}function Iz(J,Z){if(J.type==="grouped_tool_use")return J.messages.some((z)=>{let X=z.message.content[0];return X?.type==="tool_use"&&Z.has(X.id)});if(J.type==="collapsed_read_search")return hZ(J).some((X)=>Z.has(X));let Q=g0(J);return!!Q&&Z.has(Q)}function Sz(J,Z){if(J.type==="grouped_tool_use")return J.messages.every((z)=>{let X=z.message.content[0];return X?.type==="tool_use"&&Z.has(X.id)});if(J.type==="collapsed_read_search")return hZ(J).every((X)=>Z.has(X));if(J.type==="assistant"){let z=J.message.content[0];if(z?.type==="server_tool_use")return Z.has(z.id)}let Q=g0(J);return!Q||Z.has(Q)}function Tz(J,Z){if(J.message!==Z.message)return!1;if(J.screen!==Z.screen)return!1;if(J.verbose!==Z.verbose)return!1;if(J.message.type==="collapsed_read_search"&&Z.screen!=="transcript")return!1;if(J.columns!==Z.columns)return!1;let Q=J.latestBashOutputUUID===J.message.uuid,z=Z.latestBashOutputUUID===Z.message.uuid;if(Q!==z)return!1;if(J.lastThinkingBlockId!==Z.lastThinkingBlockId&&mJ(Z.message))return!1;let X=Iz(J.message,J.streamingToolUseIDs),W=Sz(J.message,J.lookups.resolvedToolUseIDs);if(X||!W)return!1;return!0}var iJ,lJ,rJ;var oJ=L0(()=>{p0();cJ();OZ();yz();xJ();sJ();fJ();gJ();F0();iJ=N0(u0(),1),lJ=N0(S0(),1);rJ=lJ.memo(_z,Tz)});import{relative as pz}from"path";function qQ(J){return lz.filter((Z)=>Z.isActive(J))}var dz,cz,gz,mz,nz,iz,lz;var YQ=L0(()=>{p0();BQ();zJ();Rz();hz();xz();fz();uz();$z();F0();dz={id:"large-memory-files",type:"warning",isActive:(J)=>fZ(J.memoryFiles).length>0,render:(J)=>{let Z=fZ(J.memoryFiles);return B(f0,{children:Z.map((Q)=>{let z=Q.path.startsWith(RZ())?pz(RZ(),Q.path):Q.path;return $(b,{flexDirection:"row",children:[B(g,{color:"warning",children:v0.warning}),$(g,{color:"warning",children:["Large ",B(g,{bold:!0,children:z})," will impact performance (",ZZ(Q.content.length)," chars >"," ",ZZ(VQ),")",B(g,{dimColor:!0,children:" · /memory to edit"})]})]},Q.path)})})}},cz={id:"claude-ai-external-token",type:"warning",isActive:()=>{let J=JZ();return QQ()&&(J.source==="ANTHROPIC_AUTH_TOKEN"||J.source==="apiKeyHelper")},render:()=>{let J=JZ();return $(b,{flexDirection:"row",marginTop:1,children:[B(g,{color:"warning",children:v0.warning}),$(g,{color:"warning",children:["Auth conflict: Using ",J.source," instead of Claude account subscription token. Either unset ",J.source,", or run `claude /logout`."]})]})}},gz={id:"api-key-conflict",type:"warning",isActive:()=>{let{source:J}=QZ({skipRetrievingKeyFromApiKeyHelper:!0});return!!JQ()&&(J==="ANTHROPIC_API_KEY"||J==="apiKeyHelper")},render:()=>{let{source:J}=QZ({skipRetrievingKeyFromApiKeyHelper:!0});return $(b,{flexDirection:"row",marginTop:1,children:[B(g,{color:"warning",children:v0.warning}),$(g,{color:"warning",children:["Auth conflict: Using ",J," instead of Anthropic Console key. Either unset ",J,", or run `claude /logout`."]})]})}},mz={id:"both-auth-methods",type:"warning",isActive:()=>{let{source:J}=QZ({skipRetrievingKeyFromApiKeyHelper:!0}),Z=JZ();return J!=="none"&&Z.source!=="none"&&!(J==="apiKeyHelper"&&Z.source==="apiKeyHelper")},render:()=>{let{source:J}=QZ({skipRetrievingKeyFromApiKeyHelper:!0}),Z=JZ();return $(b,{flexDirection:"column",marginTop:1,children:[$(b,{flexDirection:"row",children:[B(g,{color:"warning",children:v0.warning}),$(g,{color:"warning",children:["Auth conflict: Both a token (",Z.source,") and an API key (",J,") are set. This may lead to unexpected behavior."]})]}),$(b,{flexDirection:"column",marginLeft:3,children:[$(g,{color:"warning",children:["· Trying to use"," ",Z.source==="claude.ai"?"claude.ai":Z.source,"?"," ",J==="ANTHROPIC_API_KEY"?'Unset the ANTHROPIC_API_KEY environment variable, or claude /logout then say "No" to the API key approval before login.':J==="apiKeyHelper"?"Unset the apiKeyHelper setting.":"claude /logout"]}),$(g,{color:"warning",children:["· Trying to use ",J,"?"," ",Z.source==="claude.ai"?"claude /logout to sign out of claude.ai.":`Unset the ${Z.source} environment variable.`]})]})]})}},nz={id:"large-agent-descriptions",type:"warning",isActive:(J)=>{return uZ(J.agentDefinitions)>$Z},render:(J)=>{let Z=uZ(J.agentDefinitions);return $(b,{flexDirection:"row",children:[B(g,{color:"warning",children:v0.warning}),$(g,{color:"warning",children:["Large cumulative agent descriptions will impact performance (~",ZZ(Z)," tokens >"," ",ZZ($Z),")",B(g,{dimColor:!0,children:" · /agents to manage"})]})]})}},iz={id:"jetbrains-plugin-install",type:"info",isActive:(J)=>{if(!XQ())return!1;if(!(J.config.autoInstallIdeExtension??!0))return!1;let Q=xZ();return Q!==null&&!zQ(Q)},render:()=>{let J=xZ(),Z=WQ(J);return $(b,{flexDirection:"row",gap:1,marginLeft:1,children:[B(g,{color:"ide",children:v0.arrowUp}),$(g,{children:["Install the ",B(g,{color:"ide",children:Z})," plugin from the JetBrains Marketplace:"," ",B(g,{bold:!0,children:"https://docs.claude.com/s/claude-code-jetbrains"})]})]})}},lz=[dz,nz,cz,gz,mz,iz]});async function az(){if(zZ)return zZ;return zZ=KQ().then((J)=>{XZ=J}).finally(()=>{zZ=null}),zZ}function LQ(J){let Z=GQ.c(8),{agentDefinitions:Q}=J===void 0?{}:J,[z,X]=r0.useState(XZ),W;if(Z[0]===Symbol.for("react.memo_cache_sentinel"))W=()=>{if(XZ.length>0){X(XZ);return}az().then(()=>{X(XZ)})},Z[0]=W;else W=Z[0];r0.useEffect(W,[W]);let V={config:DZ(),agentDefinitions:Q,memoryFiles:z},Y=qQ(V);if(Y.length===0)return null;let K=b,F="column",P=1,v=Y.map((S)=>B(r0.Fragment,{children:S.render(V)},S.id)),M;if(Z[1]!==K||Z[2]!==v)M=B(K,{flexDirection:F,paddingLeft:P,children:v}),Z[1]=K,Z[2]=v,Z[3]=M;else M=Z[3];return M}var GQ,r0,XZ,zZ=null;var FQ=L0(()=>{p0();BQ();HQ();YQ();F0();GQ=N0(u0(),1),r0=N0(S0(),1),XZ=[]});function wQ(J,Z,Q){let z=m.useRef(new Map),X=m.useRef(0),W=m.useRef(0),q=m.useRef({arr:new Float64Array(0),version:-1,n:-1}),V=m.useRef(new Map),Y=m.useRef(new Map),K=m.useRef(Q),F=m.useRef(!1),P=m.useRef(null),v=m.useRef(0);if(K.current!==Q){let N=K.current/Q;K.current=Q;for(let[U,R]of z.current)z.current.set(U,Math.max(1,Math.round(R*N)));X.current++,F.current=!0,v.current=2}let M=v.current>0?P.current:null,S=m.useRef(0),Z0=m.useRef(null),d=m.useCallback((N)=>J.current?.subscribe(N)??sz,[J]);m.useSyncExternalStore(d,()=>{let N=J.current;if(!N)return NaN;let U=N.getScrollTop()+N.getPendingDelta(),R=Math.floor(U/tz);return N.isSticky()?~R:R});let O=J.current?.getScrollTop()??-1,C=J.current?.getPendingDelta()??0,_=J.current?.getViewportHeight()??0,w=J.current?.isSticky()??!0;m.useMemo(()=>{let N=new Set(Z),U=!1;for(let R of z.current.keys())if(!N.has(R))z.current.delete(R),U=!0;for(let R of Y.current.keys())if(!N.has(R))Y.current.delete(R);if(U)X.current++},[Z]);let D=Z.length;if(q.current.version!==X.current||q.current.n!==D){let N=q.current.arr.length>=D+1?q.current.arr:new Float64Array(D+1);N[0]=0;for(let U=0;U<D;U++)N[U+1]=N[U]+(z.current.get(Z[U])??rz);q.current={arr:N,version:X.current,n:D}}let p=q.current.arr,J0=p[D],E,k;if(M)[E,k]=M,E=Math.min(E,D),k=Math.min(k,D);else if(_===0||O<0)E=Math.max(0,D-oz),k=D;else{if(w){let V0=_+o0;E=D;while(E>0&&J0-p[E-1]<V0)E--;k=D}else{let V0=S.current,G0=_*3,M0=Math.min(O,O+C),n0=Math.max(O,O+C),y0=n0-M0,D0=y0>G0?C<0?n0-G0:M0:M0,T0=D0+Math.min(y0,G0),i0=Math.max(0,D0-V0),h0=T0-V0,b0=i0-o0;{let H=0,L=D;while(H<L){let A=H+L>>1;if(p[A+1]<=b0)H=A+1;else L=A}E=H}{let H=P.current;if(H&&H[0]<E)for(let L=H[0];L<Math.min(E,H[1]);L++){let A=Z[L];if(V.current.has(A)&&!z.current.has(A)){E=L;break}}}let l0=_+2*o0,t0=Math.min(D,E+WZ),_0=0;k=E;while(k<t0&&(_0<l0||p[k]<h0+_+o0))_0+=z.current.get(Z[k])??pZ,k++}let N=_+2*o0,U=Math.max(0,k-WZ),R=0;for(let V0=E;V0<k;V0++)R+=z.current.get(Z[V0])??pZ;while(E>U&&R<N)E--,R+=z.current.get(Z[E])??pZ;let s=P.current,A0=Math.abs(O-W.current)+Math.abs(C);if(s&&A0>_*2){let[V0,G0]=s;if(E<V0-qZ)E=V0-qZ;if(k>G0+qZ)k=G0+qZ;if(E>k)k=Math.min(E+qZ,D)}W.current=O}if(v.current>0)v.current--;else P.current=[E,k];let H0=m.useDeferredValue(E),Y0=m.useDeferredValue(k),l=E<H0?H0:E,h=k>Y0?Y0:k;if(l>h||w)l=E,h=k;if(C>0)h=k;if(h-l>WZ){let N=(p[l]+p[h])/2;if(O-S.current<N)h=l+WZ;else l=h-WZ}let z0=S.current,Q0=p[l],X0=l===0?0:Q0+z0,O0=h===D?1/0:Math.max(Q0,p[h]-_)+z0;m.useLayoutEffect(()=>{if(w)J.current?.setClampBounds(void 0,void 0);else J.current?.setClampBounds(X0,O0)}),m.useLayoutEffect(()=>{let N=Z0.current?.yogaNode;if(N&&N.getComputedWidth()>0)S.current=N.getComputedTop();if(F.current){F.current=!1;return}let U=!1;for(let[R,s]of V.current){let A0=s.yogaNode;if(!A0)continue;let V0=A0.getComputedHeight(),G0=z.current.get(R);if(V0>0){if(G0!==V0)z.current.set(R,V0),U=!0}else if(A0.getComputedWidth()>0&&G0!==0)z.current.set(R,0),U=!0}if(U)X.current++});let T=m.useCallback((N)=>{let U=Y.current.get(N);if(!U)U=(R)=>{if(R)V.current.set(N,R);else{let s=V.current.get(N)?.yogaNode;if(s&&!F.current){let A0=s.getComputedHeight();if((A0>0||s.getComputedWidth()>0)&&z.current.get(N)!==A0)z.current.set(N,A0),X.current++}V.current.delete(N)}},Y.current.set(N,U);return U},[]),i=m.useCallback((N)=>{let U=V.current.get(Z[N])?.yogaNode;if(!U||U.getComputedWidth()===0)return-1;return U.getComputedTop()},[Z]),o=m.useCallback((N)=>V.current.get(Z[N])??null,[Z]),t=m.useCallback((N)=>z.current.get(Z[N]),[Z]),I=m.useCallback((N)=>{let U=q.current;if(N<0||N>=U.n)return;J.current?.scrollTo(U.arr[N]+S.current)},[J]),W0=J0-p[h];return{range:[l,h],topSpacer:Q0,bottomSpacer:W0,measureRef:T,spacerRef:Z0,offsets:p,getItemTop:i,getItemElement:o,getItemHeight:t,scrollToIndex:I}}var m,rz=3,o0=80,oz=30,tz,pZ=1,WZ=300,qZ=25,sz=()=>{};var NQ=L0(()=>{m=N0(S0(),1),tz=o0>>1});function QX(J){let Z=OQ.get(J);if(Z!==void 0)return Z;let Q=AZ(J);return OQ.set(J,Q),Q}function XX(J){let Z=AQ.get(J);if(Z!==void 0)return Z;let Q=WX(J);return AQ.set(J,Q),Q}function WX(J){let Z=null;if(J.type==="user"){if(J.isMeta||J.isVisibleInTranscriptOnly)return null;let z=J.message.content[0];if(z?.type!=="text")return null;Z=z.text}else if(J.type==="attachment"&&J.attachment.type==="queued_command"&&J.attachment.commandMode!=="task-notification"&&!J.attachment.isMeta){let z=J.attachment.prompt;Z=typeof z==="string"?z:z.flatMap((X)=>X.type==="text"?[X.text]:[]).join(`
11
+ `)}if(Z===null)return null;let Q=MQ(Z);if(Q.startsWith("<")||Q==="")return null;return Q}function qX(J){let Z=bQ.c(30),{itemKey:Q,msg:z,idx:X,measureRef:W,expanded:q,hovered:V,clickable:Y,onClickK:K,onEnterK:F,onLeaveK:P,renderItem:v}=J,M;if(Z[0]!==Q||Z[1]!==W)M=W(Q),Z[0]=Q,Z[1]=W,Z[2]=M;else M=Z[2];let S=q?"userMessageBackgroundHover":void 0,Z0=q?1:void 0,d;if(Z[3]!==Y||Z[4]!==z||Z[5]!==K)d=Y?(J0)=>K(z,J0.cellIsBlank):void 0,Z[3]=Y,Z[4]=z,Z[5]=K,Z[6]=d;else d=Z[6];let O;if(Z[7]!==Y||Z[8]!==Q||Z[9]!==F)O=Y?()=>F(Q):void 0,Z[7]=Y,Z[8]=Q,Z[9]=F,Z[10]=O;else O=Z[10];let C;if(Z[11]!==Y||Z[12]!==Q||Z[13]!==P)C=Y?()=>P(Q):void 0,Z[11]=Y,Z[12]=Q,Z[13]=P,Z[14]=C;else C=Z[14];let _=V&&!q?"text":void 0,w;if(Z[15]!==X||Z[16]!==z||Z[17]!==v)w=v(z,X),Z[15]=X,Z[16]=z,Z[17]=v,Z[18]=w;else w=Z[18];let D;if(Z[19]!==_||Z[20]!==w)D=B(DQ.Provider,{value:_,children:w}),Z[19]=_,Z[20]=w,Z[21]=D;else D=Z[21];let p;if(Z[22]!==M||Z[23]!==S||Z[24]!==Z0||Z[25]!==d||Z[26]!==O||Z[27]!==C||Z[28]!==D)p=B(b,{ref:M,flexDirection:"column",backgroundColor:S,paddingBottom:Z0,onClick:d,onMouseEnter:O,onMouseLeave:C,children:D}),Z[22]=M,Z[23]=S,Z[24]=Z0,Z[25]=d,Z[26]=O,Z[27]=C,Z[28]=D,Z[29]=p;else p=Z[29];return p}function CQ({messages:J,scrollRef:Z,columns:Q,itemKey:z,renderItem:X,onItemClick:W,isItemClickable:q,isItemExpanded:V,extractSearchText:Y=QX,trackStickyPrompt:K,selectedIndex:F,cursorNavRef:P,setCursor:v,jumpRef:M,onSearchMatchesChange:S,scanElement:Z0,setPositions:d}){let O=y.useRef([]),C=y.useRef(J),_=y.useRef(z);if(_.current!==z||J.length<O.current.length||J[0]!==C.current[0])O.current=J.map((H)=>z(H));else for(let H=O.current.length;H<J.length;H++)O.current.push(z(J[H]));C.current=J,_.current=z;let w=O.current,{range:D,topSpacer:p,bottomSpacer:J0,measureRef:E,spacerRef:k,offsets:H0,getItemTop:Y0,getItemElement:l,getItemHeight:h,scrollToIndex:z0}=wQ(Z,w,Q),[Q0,X0]=D,O0=y.useCallback((H)=>{if(h(H)===0)return!1;return UQ(J[H])},[h,J]);y.useImperativeHandle(P,()=>{let H=(u)=>v?.({uuid:u.uuid,msgType:u.type,expanded:!1,toolName:jQ(u)?.name}),L=F??-1,A=(u,n,r=O0)=>{for(let c=u;c>=0&&c<J.length;c+=n)if(r(c))return H(J[c]),!0;return!1},x=(u)=>O0(u)&&J[u].type==="user";return{enterCursor:()=>A(J.length-1,-1,x),navigatePrev:()=>A(L-1,-1),navigateNext:()=>{if(A(L+1,1))return;Z.current?.scrollToBottom(),v?.(null)},navigatePrevUser:()=>A(L-1,-1,x),navigateNextUser:()=>A(L+1,1,x),navigateTop:()=>A(0,1),navigateBottom:()=>A(J.length-1,-1),getSelected:()=>L>=0?J[L]??null:null}},[J,F,v,O0]);let T=y.useRef({offsets:H0,start:Q0,getItemElement:l,getItemTop:Y0,messages:J,scrollToIndex:z0});T.current={offsets:H0,start:Q0,getItemElement:l,getItemTop:Y0,messages:J,scrollToIndex:z0},y.useEffect(()=>{if(F===void 0)return;let H=T.current,L=H.getItemElement(F);if(L)Z.current?.scrollToElement(L,1);else H.scrollToIndex(F)},[F,Z]);let i=y.useRef(null),o=y.useRef({msgIdx:-1,positions:[]}),t=y.useRef(-1),I=y.useRef(0),W0=y.useRef(0),N=y.useRef(()=>{}),U=y.useRef(()=>{}),R=y.useRef({matches:[],ptr:0,screenOrd:0,prefixSum:[]}),s=y.useRef(-1),A0=y.useRef(!1);function V0(H){let L=T.current.getItemTop(H);return Math.max(0,L-dZ)}function G0(H){let L=Z.current,{msgIdx:A,positions:x}=o.current;if(!L||x.length===0||A<0){d?.(null);return}let u=Math.max(0,Math.min(H,x.length-1)),n=x[u],r=T.current.getItemTop(A),c=L.getViewportTop(),e=r-L.getScrollTop(),R0=L.getViewportHeight(),P0=c+e+n.row;if(P0<c||P0>=c+R0)L.scrollTo(Math.max(0,r+n.row-dZ)),e=r-L.getScrollTop(),P0=c+e+n.row;d?.({positions:x,rowOffset:c+e,currentIdx:u});let E0=R.current,U0=E0.prefixSum.at(-1)??0,j0=(E0.prefixSum[E0.ptr]??0)+u+1;S?.(U0,j0),m0(`highlight(i=${A}, ord=${u}/${x.length}): pos={row:${n.row},col:${n.col}} lo=${e} screenRow=${P0} badge=${j0}/${U0}`)}U.current=G0;let[M0,n0]=y.useState(0),y0=y.useCallback(()=>n0((H)=>H+1),[]);y.useEffect(()=>{let H=i.current;if(!H)return;let{idx:L,wantLast:A,tries:x}=H,u=Z.current;if(!u)return;let{getItemElement:n,getItemTop:r,scrollToIndex:c}=T.current,e=n(L),R0=e?.yogaNode?.getComputedHeight()??0;if(!e||R0===0){if(x>1){i.current=null,m0(`seek(i=${L}): no mount after scrollToIndex, skip`),N.current(A?-1:1);return}i.current={idx:L,wantLast:A,tries:x+1},c(L),y0();return}i.current=null,u.scrollTo(Math.max(0,r(L)-dZ));let P0=Z0?.(e)??[];if(o.current={msgIdx:L,positions:P0},m0(`seek(i=${L} t=${x}): ${P0.length} positions`),P0.length===0){if(++I.current>20){I.current=0;return}N.current(A?-1:1);return}I.current=0;let E0=A?P0.length-1:0;R.current.screenOrd=E0,t.current=-1,U.current(E0);let U0=W0.current;if(U0)W0.current=0,N.current(U0)},[M0]);function D0(H,L){let A=Z.current;if(!A)return;let x=T.current,{getItemElement:u,scrollToIndex:n}=x;if(H<0||H>=x.messages.length)return;d?.(null),o.current={msgIdx:-1,positions:[]},i.current={idx:H,wantLast:L,tries:0};let r=u(H),c=r?.yogaNode?.getComputedHeight()??0;if(r&&c>0)A.scrollTo(V0(H));else n(H);y0()}function T0(H){let L=R.current,{matches:A,prefixSum:x}=L,u=x.at(-1)??0;if(A.length===0)return;if(i.current){W0.current=H;return}if(t.current<0)t.current=L.ptr;let{positions:n}=o.current,r=L.screenOrd+H;if(r>=0&&r<n.length){L.screenOrd=r,G0(r),t.current=-1;return}let c=(L.ptr+H+A.length)%A.length;if(c===t.current){d?.(null),t.current=-1,m0(`step: wraparound at ptr=${c}, all ${A.length} msgs phantoms`);return}L.ptr=c,L.screenOrd=0,D0(A[c],H<0);let e=H<0?x[c+1]??u:x[c]+1;S?.(u,e)}N.current=T0,y.useImperativeHandle(M,()=>({jumpToIndex:(H)=>{let L=Z.current;if(L)L.scrollTo(V0(H))},setSearchQuery:(H)=>{i.current=null,o.current={msgIdx:-1,positions:[]},t.current=-1,d?.(null);let L=H.toLowerCase(),A=[],x=[0];if(L){let U0=T.current.messages;for(let j0=0;j0<U0.length;j0++){let k0=Y(U0[j0]),G=k0.indexOf(L),j=0;while(G>=0)j++,G=k0.indexOf(L,G+L.length);if(j>0)A.push(j0),x.push(x.at(-1)+j)}}let u=x.at(-1),n=0,r=Z.current,{offsets:c,start:e,getItemTop:R0}=T.current,P0=R0(e),E0=P0>=0?P0-c[e]:0;if(A.length>0&&r){let U0=s.current>=0?s.current:r.getScrollTop(),j0=1/0;for(let k0=0;k0<A.length;k0++){let G=Math.abs(E0+c[A[k0]]-U0);if(G<=j0)j0=G,n=k0}m0(`setSearchQuery('${H}'): ${A.length} msgs · ptr=${n} msgIdx=${A[n]} curTop=${U0} origin=${E0}`)}if(R.current={matches:A,ptr:n,screenOrd:0,prefixSum:x},A.length>0)D0(A[n],!0);else if(s.current>=0&&r)r.scrollTo(s.current);S?.(u,A.length>0?x[n+1]??u:0)},nextMatch:()=>T0(1),prevMatch:()=>T0(-1),setAnchor:()=>{let H=Z.current;if(H)s.current=H.getScrollTop()},disarmSearch:()=>{d?.(null),i.current=null,o.current={msgIdx:-1,positions:[]},t.current=-1},warmSearchIndex:async()=>{if(A0.current)return 0;let H=T.current.messages,L=500,A=0,x=performance.now();for(let n=0;n<H.length;n+=L){await PQ(0);let r=performance.now(),c=Math.min(n+L,H.length);for(let e=n;e<c;e++)Y(H[e]);A+=performance.now()-r}let u=Math.round(performance.now()-x);return m0(`warmSearchIndex: ${H.length} msgs · work=${Math.round(A)}ms wall=${u}ms chunks=${Math.ceil(H.length/L)}`),A0.current=!0,Math.round(A)}}),[Z]);let[i0,h0]=y.useState(null),b0=y.useRef({onItemClick:W,setHoveredKey:h0});b0.current={onItemClick:W,setHoveredKey:h0};let l0=y.useCallback((H,L)=>{let A=b0.current;if(!L&&A.onItemClick)A.onItemClick(H)},[]),t0=y.useCallback((H)=>{b0.current.setHoveredKey(H)},[]),_0=y.useCallback((H)=>{b0.current.setHoveredKey((L)=>L===H?null:L)},[]);return $(f0,{children:[B(b,{ref:k,height:p,flexShrink:0}),J.slice(Q0,X0).map((H,L)=>{let A=Q0+L,x=w[A],u=!!W&&(q?.(H)??!0),n=u&&i0===x,r=V?.(H);return B(qX,{itemKey:x,msg:H,idx:A,measureRef:E,expanded:r,hovered:n,clickable:u,onClickK:l0,onEnterK:t0,onLeaveK:_0,renderItem:X},x)}),J0>0&&B(b,{height:J0,flexShrink:0}),K&&B(VX,{messages:J,start:Q0,end:X0,offsets:H0,getItemTop:Y0,getItemElement:l,scrollRef:Z})]})}function VX({messages:J,start:Z,end:Q,offsets:z,getItemTop:X,getItemElement:W,scrollRef:q}){let{setStickyPrompt:V}=y.useContext(yZ),Y=y.useCallback((w)=>q.current?.subscribe(w)??YX,[q]);y.useSyncExternalStore(Y,()=>{let w=q.current;if(!w)return NaN;let D=w.getScrollTop()+w.getPendingDelta();return w.isSticky()?-1-D:D});let K=q.current?.isSticky()??!0,F=Math.max(0,(q.current?.getScrollTop()??0)+(q.current?.getPendingDelta()??0)),P=Z,v=-1;for(let w=Q-1;w>=Z;w--){let D=X(w);if(D>=0){if(D<F)break;v=D}P=w}let M=-1,S=null;if(P>0&&!K)for(let w=P-1;w>=0;w--){let D=XX(J[w]);if(D===null)continue;let p=X(w);if(p>=0&&p+1>=F)continue;M=w,S=D;break}let Z0=v>=0?v-z[P]:0,d=M>=0?Math.max(0,Z0+z[M]):-1,O=y.useRef({idx:-1,tries:0}),C=y.useRef("none"),_=y.useRef(-1);return y.useEffect(()=>{if(O.current.idx>=0)return;if(C.current==="armed"){C.current="force";return}let w=C.current==="force";if(C.current="none",!w&&_.current===M)return;if(_.current=M,S===null){V(null);return}let D=S.trimStart(),p=D.search(/\n\s*\n/),J0=(p>=0?D.slice(0,p):D).slice(0,zX).replace(/\s+/g," ").trim();if(J0===""){V(null);return}let E=M,k=d;V({text:J0,scrollTo:()=>{V("clicked"),C.current="armed";let H0=W(E);if(H0)q.current?.scrollToElement(H0,1);else q.current?.scrollTo(k),O.current={idx:E,tries:0}}})}),y.useEffect(()=>{if(O.current.idx<0)return;let w=W(O.current.idx);if(w)q.current?.scrollToElement(w,1),O.current={idx:-1,tries:0};else if(++O.current.tries>5)O.current={idx:-1,tries:0}}),null}var bQ,y,dZ=3,OQ,zX=500,AQ,YX=()=>{};var vQ=L0(()=>{NQ();p0();JX();LJ();ez();ZX();IZ();EQ();F0();bQ=N0(u0(),1),y=N0(S0(),1),OQ=new WeakMap;AQ=new WeakMap});function EX(J,Z){let Q=new Set(Z),z=new Set;return J.filter((X)=>{if(X.type==="system")return X.subtype!=="api_metrics";let W=X.message?.content[0];if(X.type==="assistant"){if(X.isApiErrorMessage)return!0;if(W?.type==="tool_use"&&W.name&&Q.has(W.name)){if("id"in W)z.add(W.id);return!0}return!1}if(X.type==="user"){if(W?.type==="tool_result")return W.tool_use_id!==void 0&&z.has(W.tool_use_id);return!X.isMeta}if(X.type==="attachment"){let q=X.attachment;return q?.type==="queued_command"&&q.commandMode==="prompt"&&!q.isMeta&&q.origin===void 0}return!1})}function bX(J,Z){let Q=new Set(Z),z=new Set,X=[],W=0;for(let q=0;q<J.length;q++){let V=J[q],Y=V.message?.content[0];if(V.type==="user"&&Y?.type!=="tool_result"&&!V.isMeta){W++;continue}if(V.type==="assistant"){if(Y?.type==="text")X[q]=W;else if(Y?.type==="tool_use"&&Y.name&&Q.has(Y.name))z.add(W)}}if(z.size===0)return J;return J.filter((q,V)=>{let Y=X[V];return Y===void 0||!z.has(Y)})}function yX(J,Z,Q=CX,z=vX){let X=Z.current,W=X?J.findIndex((Y)=>Y.uuid===X.uuid):-1,q=W>=0?W:X?Math.min(X.idx,Math.max(0,J.length-Q)):0;if(J.length-q>Q+z)q=J.length-Q;let V=J[q];if(V&&(X?.uuid!==V.uuid||X.idx!==q))Z.current={uuid:V.uuid,idx:q};else if(!V&&X)Z.current=null;return q}function _Q(J){return(J.type==="assistant"||J.type==="user"?g0(J):null)??J.uuid}function IX(J,Z){if(J.size!==Z.size)return!1;for(let Q of J)if(!Z.has(Q))return!1;return!0}function tJ(J,Z,Q,z,X,W){if(X==="transcript")return!0;switch(J.type){case"attachment":case"user":case"assistant":{if(J.type==="assistant"){let V=J.message.content[0];if(V?.type==="server_tool_use")return W.resolvedToolUseIDs.has(V.id)}let q=g0(J);if(!q)return!0;if(Z.has(q))return!1;if(Q.has(q))return!1;if(oQ(q,"PostToolUse",W))return!1;return FJ(z,W.resolvedToolUseIDs)}case"system":return J.subtype!=="api_error";case"grouped_tool_use":return J.messages.every((V)=>{let Y=V.message.content[0];return Y?.type==="tool_use"&&W.resolvedToolUseIDs.has(Y.id)});case"collapsed_read_search":return!1}}var mQ,YZ,f,UX,jX=null,yQ=null,MX=null,cZ=30,CX=200,vX=50,_X=({messages:J,tools:Z,commands:Q,verbose:z,toolJSX:X,toolUseConfirmQueue:W,inProgressToolUseIDs:q,isMessageSelectorVisible:V,conversationId:Y,screen:K,streamingToolUses:F,showAllInTranscript:P=!1,agentDefinitions:v,onOpenRateLimitOptions:M,hideLogo:S=!1,isLoading:Z0,hidePastThinking:d=!1,streamingThinking:O,hasStreamingText:C=!1,isBriefOnly:_=!1,unseenDivider:w,scrollRef:D,trackStickyPrompt:p,jumpRef:J0,onSearchMatchesChange:E,scanElement:k,setPositions:H0,disableRenderCap:Y0=!1,cursor:l=null,setCursor:h,cursorNavRef:z0,renderRange:Q0})=>{let{columns:X0}=FZ(),O0=RQ("transcript:toggleShowAll","Transcript","Ctrl+E"),T=f.useMemo(()=>nZ(J).filter(nQ),[J]),i=f.useMemo(()=>{if(!O)return!1;if(O.isStreaming)return!0;if(O.streamingEndedAt)return Date.now()-O.streamingEndedAt<30000;return!1},[O]),o=f.useMemo(()=>{if(!d)return null;if(i)return"streaming";for(let G=T.length-1;G>=0;G--){let j=T[G];if(j?.type==="assistant"){let B0=j.message.content;for(let a=B0.length-1;a>=0;a--)if(B0[a]?.type==="thinking")return`${j.uuid}:${a}`}else if(j?.type==="user"){if(!j.message.content.some((a)=>a.type==="tool_result"))return"no-thinking"}}return null},[T,d,i]),t=f.useMemo(()=>{for(let G=T.length-1;G>=0;G--){let j=T[G];if(j?.type==="user"){let B0=j.message.content;for(let a of B0)if(a.type==="text"){let w0=a.text;if(w0.startsWith("<bash-stdout")||w0.startsWith("<bash-stderr"))return j.uuid}}}return null},[T]),I=f.useMemo(()=>tQ(T),[T]),W0=f.useMemo(()=>F.filter((G)=>!q.has(G.contentBlock.id)&&!I.has(G.contentBlock.id)),[F,q,I]),N=f.useMemo(()=>W0.flatMap((G)=>{let j=gQ({content:[G.contentBlock]});return j.uuid=TQ(G.contentBlock.id,0),nZ([j])}),[W0]),U=K==="transcript",R=f.useMemo(()=>IQ(process.env.CLAUDE_CODE_DISABLE_VIRTUAL_SCROLL),[]),s=D!=null&&!R,A0=U&&!P&&!s,V0=f.useRef(null),{collapsed:G0,lookups:M0,hasTruncatedMessages:n0,hiddenMessageCount:y0}=f.useMemo(()=>{let G=z||c0()?T:iQ(T,{includeSnipped:!0}),j=aQ(G.filter((I0)=>I0.type!=="progress").filter((I0)=>!GZ(I0)).filter((I0)=>lQ(I0,U)),N),B0=[yQ,MX].filter((I0)=>I0!==null),a=[yQ].filter((I0)=>I0!==null),w0=B0.length>0&&!U?_?EX(j,B0):a.length>0?bX(j,a):j:j,C0=A0?w0.slice(-cZ):w0,VZ=A0&&w0.length>cZ,{messages:d0}=CJ(C0,Z,z),sQ=OJ(DJ(MJ(cQ(d0,Z))),z),eQ=rQ(T,C0),Zz=j.length-cZ;return{collapsed:sQ,lookups:eQ,hasTruncatedMessages:VZ,hiddenMessageCount:Zz}},[z,T,U,N,A0,Z,_]),D0=f.useMemo(()=>{let j=!s&&!Y0?yX(G0,V0):0;return Q0?G0.slice(Q0[0],Q0[1]):j>0?G0.slice(j):G0},[G0,Q0,s,Y0]),T0=f.useMemo(()=>new Set(F.map((G)=>G.contentBlock.id)),[F]),i0=$Q((G)=>G.tasks),h0=M0.asyncLaunchedToolUseIDs,b0=f.useMemo(()=>{if(h0.size===0)return null;let G=new Set;for(let[j,B0]of h0){let a=i0?.[B0]?.status;if(a==="running"||a==="requested"||a==="queued")G.add(j)}return G.size>0?G:null},[i0,h0]),l0=f.useMemo(()=>{if(!b0)return q;let G=new Set(q);for(let j of b0)G.add(j);return G},[q,b0]),t0=f.useMemo(()=>{if(!w)return-1;let G=w.firstUnseenUuid.slice(0,24);return D0.findIndex((j)=>j.uuid.slice(0,24)===G)},[w,D0]),_0=f.useMemo(()=>{if(!l)return-1;return D0.findIndex((G)=>G.uuid===l.uuid)},[l,D0]),[H,L]=f.useState(()=>new Set),A=f.useCallback((G)=>{let j=_Q(G);L((B0)=>{let a=new Set(B0);if(a.has(j))a.delete(j);else a.add(j);return a})},[]),x=f.useCallback((G)=>H.size>0&&H.has(_Q(G)),[H]),u=f.useRef(M0);u.current=M0;let n=f.useCallback((G)=>{if(G.type==="collapsed_read_search")return!0;if(G.type==="assistant"){let w0=G.message.content[0];return w0!=null&&xQ(w0)&&w0.type==="advisor_tool_result"&&w0.content.type==="advisor_result"}if(G.type!=="user")return!1;let j=G.message.content[0];if(j?.type!=="tool_result"||j.is_error||!G.toolUseResult)return!1;let B0=u.current.toolUseByToolUseID.get(j.tool_use_id)?.name;return(B0?mZ(Z,B0):void 0)?.isResultTruncated?.(G.toolUseResult)??!1},[Z]),r=(!X||!!X.shouldContinueAnimation)&&!W.length&&!V,c=l0.size>0,{progress:e}=hQ(),R0=f.useRef(null),P0=DZ().terminalProgressBarEnabled&&!kQ()&&!(jX?.isProactiveActive()??!1);f.useEffect(()=>{let G=P0?c?"indeterminate":"completed":null;if(R0.current===G)return;R0.current=G,e(G)},[e,P0,c]),f.useEffect(()=>{return()=>e(null)},[e]);let E0=f.useCallback((G)=>`${G.uuid}-${Y}`,[Y]),U0=(G,j)=>{let B0=j>0?D0[j-1]?.type:void 0,a=G.type==="user"&&B0==="user",w0=G.type==="collapsed_read_search"&&(C||aJ(D0,j,Z,T0)),C0=E0(G),VZ=B(rJ,{message:G,isUserContinuation:a,hasContentAfter:w0,tools:Z,commands:Q,verbose:z||x(G)||l?.expanded===!0&&j===_0,inProgressToolUseIDs:l0,streamingToolUseIDs:T0,screen:K,canAnimate:r,onOpenRateLimitOptions:M,lastThinkingBlockId:o,latestBashOutputUUID:t,columns:X0,isLoading:Z0,lookups:M0},C0),d0=B(uQ.Provider,{value:j===_0,children:VZ},C0);if(w&&j===t0)return[B(b,{marginTop:1,children:B(UZ,{title:`${w.count} new ${LZ(w.count,"message")}`,width:X0,color:"inactive"})},"unseen-divider"),d0];return d0},j0=f.useRef(new WeakMap),k0=f.useCallback((G)=>{let j=j0.current.get(G);if(j!==void 0)return j;let B0=AZ(G);if(G.type==="user"&&G.toolUseResult&&Array.isArray(G.message.content)){let w0=G.message.content.find((C0)=>C0.type==="tool_result");if(w0&&"tool_use_id"in w0){let C0=M0.toolUseByToolUseID.get(w0.tool_use_id),d0=(C0&&mZ(Z,C0.name))?.extractSearchText?.(G.toolUseResult);if(d0!==void 0)B0=d0}}let a=B0.toLowerCase();return j0.current.set(G,a),a},[Z,M0]);return $(f0,{children:[!S&&!(Q0&&Q0[0]>0)&&B(UX,{agentDefinitions:v}),n0&&B(UZ,{title:`${O0} to show ${gZ.bold(y0)} previous messages`,width:X0}),U&&P&&y0>0&&!Y0&&B(UZ,{title:`${O0} to hide ${gZ.bold(y0)} previous messages`,width:X0}),s?B(fQ.Provider,{value:!0,children:B(CQ,{messages:D0,scrollRef:D,columns:X0,itemKey:E0,renderItem:U0,onItemClick:A,isItemClickable:n,isItemExpanded:x,trackStickyPrompt:p,selectedIndex:_0>=0?_0:void 0,cursorNavRef:z0,setCursor:h,jumpRef:J0,onSearchMatchesChange:E,scanElement:k,setPositions:H0,extractSearchText:k0})}):D0.flatMap(U0),C&&!_&&B(kX,{}),i&&O&&!_&&B(b,{marginTop:1,children:B(dQ,{param:{type:"thinking",thinking:O.thinking},addMargin:!1,isTranscriptMode:!0,verbose:z,hideInTranscript:!1})})]})},kX=()=>{let J=iZ();if(!J)return null;return B(b,{alignItems:"flex-start",flexDirection:"row",marginTop:1,width:"100%",children:$(b,{flexDirection:"row",children:[B(b,{minWidth:2,children:B(g,{color:"text",children:SQ})}),B(b,{flexDirection:"column",children:B(pQ,{children:J})})]})})},g8;var sJ=L0(()=>{GX();KJ();BX();LX();qJ();KX();p0();wX();AX();FX();OX();AJ();UJ();cJ();EJ();HQ();HX();vZ();vJ();OZ();XJ();IZ();NX();PX();lZ();oJ();EQ();DX();CZ();gJ();FQ();vQ();F0();mQ=N0(u0(),1),YZ=N0(S0(),1),f=N0(S0(),1),UX=YZ.memo(function(Z){let Q=mQ.c(3),{agentDefinitions:z}=Z,X;if(Q[0]===Symbol.for("react.memo_cache_sentinel"))X=null,Q[0]=X;else X=Q[0];let W;if(Q[1]!==z)W=B(e0,{children:$(b,{flexDirection:"column",gap:1,children:[X,B(YZ.Suspense,{fallback:null,children:B(LQ,{agentDefinitions:z})})]})}),Q[1]=z,Q[2]=W;else W=Q[2];return W});g8=YZ.memo(_X,(J,Z)=>{let Q=Object.keys(J);for(let z of Q){if(z==="onOpenRateLimitOptions"||z==="scrollRef"||z==="trackStickyPrompt"||z==="setCursor"||z==="cursorNavRef"||z==="jumpRef"||z==="onSearchMatchesChange"||z==="scanElement"||z==="setPositions")continue;if(J[z]!==Z[z]){if(z==="streamingToolUses"){let X=J.streamingToolUses,W=Z.streamingToolUses;if(X.length===W.length&&X.every((q,V)=>q.contentBlock===W[V]?.contentBlock))continue}if(z==="inProgressToolUseIDs"){if(IX(J.inProgressToolUseIDs,Z.inProgressToolUseIDs))continue}if(z==="unseenDivider"){let X=J.unseenDivider,W=Z.unseenDivider;if(X?.firstUnseenUuid===W?.firstUnseenUuid&&X?.count===W?.count)continue}if(z==="tools"){let X=J.tools,W=Z.tools;if(X.length===W.length&&X.every((q,V)=>q.name===W[V]?.name))continue}return!1}}return!0})});
12
+ export{s0 as Ge,TX as He,lZ as Ie,xX as Je,$X as Ke,JJ as Le,QW as Me,zW as Ne,XW as Oe,LJ as Pe,g8 as Qe,sJ as Re};