@claudiolabs/claudin 1.0.7 → 1.0.8

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 (903) hide show
  1. package/dist/chunks/AgentTool-1.0.8-eje3a59q.mjs +1 -0
  2. package/dist/chunks/App-1.0.8-d2xvppcs.mjs +1 -0
  3. package/dist/chunks/ApproveApiKey-1.0.8-46gxh8v1.mjs +1 -0
  4. package/dist/chunks/AssistantSessionChooser-1.0.8-14hqa3x1.mjs +1 -0
  5. package/dist/chunks/AutoModeOptInDialog-1.0.8-wbj2exgg.mjs +1 -0
  6. package/dist/chunks/BypassPermissionsModeDialog-1.0.8-qw286z98.mjs +1 -0
  7. package/dist/chunks/ClaudeMdExternalIncludesDialog-1.0.8-d7f3p2f2.mjs +1 -0
  8. package/dist/chunks/ConsoleOAuthFlow-1.0.8-pz9144b6.mjs +1 -0
  9. package/dist/chunks/DiffDialog-1.0.8-kekremjy.mjs +7 -0
  10. package/dist/chunks/Doctor-1.0.8-y6yd83ya.mjs +1 -0
  11. package/dist/chunks/ExplorerDialog-1.0.8-sde0qmj8.mjs +6 -0
  12. package/dist/chunks/Grove-1.0.8-vaqh13j1.mjs +1 -0
  13. package/dist/chunks/ITermBackend-1.0.8-pyx0hrdr.mjs +1 -0
  14. package/dist/chunks/InvalidConfigDialog-1.0.8-9xkjpkdq.mjs +1 -0
  15. package/dist/chunks/InvalidSettingsDialog-1.0.8-sg0zxdxs.mjs +1 -0
  16. package/dist/chunks/MigrationDialog-1.0.8-sa3w4fkf.mjs +1 -0
  17. package/dist/chunks/Onboarding-1.0.8-j2grnf78.mjs +1 -0
  18. package/dist/chunks/ProviderManager-1.0.8-rhr4npaj.mjs +1 -0
  19. package/dist/chunks/REPL-1.0.8-r0frprp1.mjs +1 -0
  20. package/dist/chunks/ResumeConversation-1.0.8-y8q8w4g5.mjs +1 -0
  21. package/dist/chunks/SnapshotUpdateDialog-1.0.8-6r0afvcw.mjs +1 -0
  22. package/dist/chunks/TeleportProgress-1.0.8-8k0msa15.mjs +1 -0
  23. package/dist/chunks/TeleportRepoMismatchDialog-1.0.8-3y1gzb63.mjs +1 -0
  24. package/dist/chunks/TeleportResumeWrapper-1.0.8-sr835vjm.mjs +1 -0
  25. package/dist/chunks/TmuxBackend-1.0.8-j4ewgs24.mjs +9 -0
  26. package/dist/chunks/ToolSearchTool-1.0.8-g3jtn9j5.mjs +1 -0
  27. package/dist/chunks/TrustDialog-1.0.8-6fmeeyg3.mjs +1 -0
  28. package/dist/chunks/activeProvider-1.0.8-07gr4v39.mjs +1 -0
  29. package/dist/chunks/add-dir-1.0.8-zp69mch9.mjs +1 -0
  30. package/dist/chunks/agentTypes-1.0.8-0tz8xbhq.mjs +1 -0
  31. package/dist/chunks/agents-1.0.8-7b7qbe1b.mjs +3 -0
  32. package/dist/chunks/agents-1.0.8-hcpq0qtv.mjs +110 -0
  33. package/dist/chunks/api-1.0.8-99jqr2rt.mjs +1 -0
  34. package/dist/chunks/asciicast-1.0.8-hdy3b2tb.mjs +1 -0
  35. package/dist/chunks/assistant-1.0.8-wf6vgaxz.mjs +1 -0
  36. package/dist/chunks/auth-1.0.8-by49xah8.mjs +1 -0
  37. package/dist/chunks/auth-1.0.8-jhga5hc5.mjs +1 -0
  38. package/dist/chunks/autoMode-1.0.8-9hknbsrn.mjs +48 -0
  39. package/dist/chunks/autoUpdater-1.0.8-n0axyces.mjs +1 -0
  40. package/dist/chunks/backgroundHousekeeping-1.0.8-tthnkm6t.mjs +1 -0
  41. package/dist/chunks/branch-1.0.8-v0vyzjd1.mjs +4 -0
  42. package/dist/chunks/bridge-1.0.8-9em7eyw2.mjs +2 -0
  43. package/dist/chunks/bridgeConfig-1.0.8-rc3gw5mw.mjs +1 -0
  44. package/dist/chunks/bridgeEnabled-1.0.8-mmzmxjzj.mjs +1 -0
  45. package/dist/chunks/bridgeMain-1.0.8-kys2mqca.mjs +88 -0
  46. package/dist/chunks/bridgePointer-1.0.8-ky397f5d.mjs +1 -0
  47. package/dist/chunks/btw-1.0.8-ppch37et.mjs +1 -0
  48. package/dist/chunks/buddy-1.0.8-3j0jmxqv.mjs +3 -0
  49. package/dist/chunks/cacache-1.0.8-npx6886e.mjs +1 -0
  50. package/dist/chunks/cache-probe-1.0.8-q0q9v06f.mjs +21 -0
  51. package/dist/chunks/cacheStats-1.0.8-8g3sbes5.mjs +4 -0
  52. package/dist/chunks/caches-1.0.8-c44ykbdq.mjs +1 -0
  53. package/dist/chunks/claudeDesktop-1.0.8-3718a4er.mjs +1 -0
  54. package/dist/chunks/claudemd-1.0.8-mrm97672.mjs +1 -0
  55. package/dist/chunks/clear-1.0.8-60s1dmkm.mjs +1 -0
  56. package/dist/chunks/clearTerminal-1.0.8-s7tt8cvq.mjs +1 -0
  57. package/dist/chunks/cli-1.0.8-0g25h6r5.mjs +3 -0
  58. package/dist/chunks/cli-1.0.8-0j3a18cb.mjs +2 -0
  59. package/dist/chunks/cli-1.0.8-0w29g9sk.mjs +4 -0
  60. package/dist/chunks/cli-1.0.8-1r6dnkqd.mjs +45 -0
  61. package/dist/chunks/cli-1.0.8-1ss6x3zt.mjs +2 -0
  62. package/dist/chunks/cli-1.0.8-1tmgp7jd.mjs +2 -0
  63. package/dist/chunks/cli-1.0.8-2tqdqypv.mjs +2 -0
  64. package/dist/chunks/cli-1.0.8-2tz4jekt.mjs +2 -0
  65. package/dist/chunks/cli-1.0.8-2vmb9a3w.mjs +2 -0
  66. package/dist/chunks/cli-1.0.8-2yyas23w.mjs +2 -0
  67. package/dist/chunks/cli-1.0.8-330tdbma.mjs +2 -0
  68. package/dist/chunks/cli-1.0.8-34678988.mjs +2 -0
  69. package/dist/chunks/cli-1.0.8-3cz8c904.mjs +2 -0
  70. package/dist/chunks/cli-1.0.8-3j90qb52.mjs +2 -0
  71. package/dist/chunks/cli-1.0.8-3tw1xf7y.mjs +2 -0
  72. package/dist/chunks/cli-1.0.8-3vh4nftm.mjs +7 -0
  73. package/dist/chunks/cli-1.0.8-3w4np76x.mjs +2 -0
  74. package/dist/chunks/cli-1.0.8-45e9fjb4.mjs +21 -0
  75. package/dist/chunks/cli-1.0.8-4a1exx1w.mjs +2 -0
  76. package/dist/chunks/cli-1.0.8-4vzmdadp.mjs +2 -0
  77. package/dist/chunks/cli-1.0.8-4wgaqcjn.mjs +42 -0
  78. package/dist/chunks/cli-1.0.8-53cy4zte.mjs +34 -0
  79. package/dist/chunks/cli-1.0.8-592dqckn.mjs +12 -0
  80. package/dist/chunks/cli-1.0.8-5awx1w8e.mjs +25 -0
  81. package/dist/chunks/cli-1.0.8-5dyqgt8m.mjs +15 -0
  82. package/dist/chunks/cli-1.0.8-5gn5a7p3.mjs +2 -0
  83. package/dist/chunks/cli-1.0.8-5mzwqxg2.mjs +5 -0
  84. package/dist/chunks/cli-1.0.8-5r4z4nzj.mjs +9 -0
  85. package/dist/chunks/cli-1.0.8-5wfqemy1.mjs +17 -0
  86. package/dist/chunks/cli-1.0.8-5wwge1jc.mjs +3 -0
  87. package/dist/chunks/cli-1.0.8-628ypgq9.mjs +4 -0
  88. package/dist/chunks/cli-1.0.8-63tfdt8q.mjs +2 -0
  89. package/dist/chunks/cli-1.0.8-693zfwne.mjs +2 -0
  90. package/dist/chunks/cli-1.0.8-6fz5dc6p.mjs +2 -0
  91. package/dist/chunks/cli-1.0.8-6hge9cq0.mjs +2 -0
  92. package/dist/chunks/cli-1.0.8-6q1p5cvf.mjs +2 -0
  93. package/dist/chunks/cli-1.0.8-74y9exyb.mjs +2 -0
  94. package/dist/chunks/cli-1.0.8-74zbkhyt.mjs +67 -0
  95. package/dist/chunks/cli-1.0.8-75t3aews.mjs +2 -0
  96. package/dist/chunks/cli-1.0.8-75ta9404.mjs +2 -0
  97. package/dist/chunks/cli-1.0.8-7b6c3csb.mjs +2 -0
  98. package/dist/chunks/cli-1.0.8-7khq3d03.mjs +2 -0
  99. package/dist/chunks/cli-1.0.8-7p8001bq.mjs +2 -0
  100. package/dist/chunks/cli-1.0.8-7tm0v9g4.mjs +2 -0
  101. package/dist/chunks/cli-1.0.8-845srnq2.mjs +2 -0
  102. package/dist/chunks/cli-1.0.8-8aa4g8k7.mjs +9 -0
  103. package/dist/chunks/cli-1.0.8-8bymhd85.mjs +2 -0
  104. package/dist/chunks/cli-1.0.8-8d0pym8n.mjs +4 -0
  105. package/dist/chunks/cli-1.0.8-8eace15k.mjs +2 -0
  106. package/dist/chunks/cli-1.0.8-8f8079r1.mjs +2 -0
  107. package/dist/chunks/cli-1.0.8-8g4cyspe.mjs +2 -0
  108. package/dist/chunks/cli-1.0.8-9az1bj5r.mjs +2 -0
  109. package/dist/chunks/cli-1.0.8-9cg23m77.mjs +2 -0
  110. package/dist/chunks/cli-1.0.8-9d98s5n7.mjs +2 -0
  111. package/dist/chunks/cli-1.0.8-9e91trv9.mjs +4 -0
  112. package/dist/chunks/cli-1.0.8-9kjmxaz9.mjs +2 -0
  113. package/dist/chunks/cli-1.0.8-9ten5rvg.mjs +3 -0
  114. package/dist/chunks/cli-1.0.8-9y02shjc.mjs +6 -0
  115. package/dist/chunks/cli-1.0.8-a227an7n.mjs +4 -0
  116. package/dist/chunks/cli-1.0.8-a5h5dhvb.mjs +2 -0
  117. package/dist/chunks/cli-1.0.8-a95nzf63.mjs +3 -0
  118. package/dist/chunks/cli-1.0.8-aac9erft.mjs +18 -0
  119. package/dist/chunks/cli-1.0.8-abdc5b5p.mjs +12 -0
  120. package/dist/chunks/cli-1.0.8-acrtv429.mjs +2 -0
  121. package/dist/chunks/cli-1.0.8-ah0px9dq.mjs +2 -0
  122. package/dist/chunks/cli-1.0.8-apm2cwth.mjs +2 -0
  123. package/dist/chunks/cli-1.0.8-b1a558ty.mjs +2 -0
  124. package/dist/chunks/cli-1.0.8-b3rgrfhx.mjs +2 -0
  125. package/dist/chunks/cli-1.0.8-bce7mfng.mjs +2 -0
  126. package/dist/chunks/cli-1.0.8-bf89pdxw.mjs +3 -0
  127. package/dist/chunks/cli-1.0.8-c1m2f995.mjs +2 -0
  128. package/dist/chunks/cli-1.0.8-ch5nmk6z.mjs +6 -0
  129. package/dist/chunks/cli-1.0.8-ckzwfn2p.mjs +2 -0
  130. package/dist/chunks/cli-1.0.8-cvanywgv.mjs +4 -0
  131. package/dist/chunks/cli-1.0.8-czw324tt.mjs +2 -0
  132. package/dist/chunks/cli-1.0.8-djnb6kg8.mjs +2 -0
  133. package/dist/chunks/cli-1.0.8-dnyn56hh.mjs +2 -0
  134. package/dist/chunks/cli-1.0.8-dtv7cx85.mjs +2 -0
  135. package/dist/chunks/cli-1.0.8-e1je8bbg.mjs +2 -0
  136. package/dist/chunks/cli-1.0.8-e1rqh3t5.mjs +6 -0
  137. package/dist/chunks/cli-1.0.8-e226v5zv.mjs +2 -0
  138. package/dist/chunks/cli-1.0.8-ebmqnhat.mjs +2 -0
  139. package/dist/chunks/cli-1.0.8-ecej8h97.mjs +2 -0
  140. package/dist/chunks/cli-1.0.8-eqnts1fr.mjs +8 -0
  141. package/dist/chunks/cli-1.0.8-erf5fgz4.mjs +133 -0
  142. package/dist/chunks/cli-1.0.8-erzw5831.mjs +133 -0
  143. package/dist/chunks/cli-1.0.8-evcjjrhq.mjs +2 -0
  144. package/dist/chunks/cli-1.0.8-ewrnp0r9.mjs +2 -0
  145. package/dist/chunks/cli-1.0.8-ezvghx0v.mjs +2 -0
  146. package/dist/chunks/cli-1.0.8-f149d1z0.mjs +2 -0
  147. package/dist/chunks/cli-1.0.8-f46gq37z.mjs +2 -0
  148. package/dist/chunks/cli-1.0.8-fch83jc9.mjs +2 -0
  149. package/dist/chunks/cli-1.0.8-fmf0f85n.mjs +2 -0
  150. package/dist/chunks/cli-1.0.8-fnnr43c2.mjs +2 -0
  151. package/dist/chunks/cli-1.0.8-fnwydrx1.mjs +3 -0
  152. package/dist/chunks/cli-1.0.8-frbc2pan.mjs +2 -0
  153. package/dist/chunks/cli-1.0.8-fs06q8cs.mjs +2 -0
  154. package/dist/chunks/cli-1.0.8-g2934g2e.mjs +2 -0
  155. package/dist/chunks/cli-1.0.8-g8tpbbvt.mjs +3 -0
  156. package/dist/chunks/cli-1.0.8-g9h4ay1q.mjs +2 -0
  157. package/dist/chunks/cli-1.0.8-gmf61bcb.mjs +2 -0
  158. package/dist/chunks/cli-1.0.8-gsr9wqaw.mjs +39 -0
  159. package/dist/chunks/cli-1.0.8-gv80trp6.mjs +2 -0
  160. package/dist/chunks/cli-1.0.8-h44d6jh3.mjs +2 -0
  161. package/dist/chunks/cli-1.0.8-hbgss955.mjs +2 -0
  162. package/dist/chunks/cli-1.0.8-hgreyqck.mjs +2 -0
  163. package/dist/chunks/cli-1.0.8-hkkcv1tv.mjs +2 -0
  164. package/dist/chunks/cli-1.0.8-htq95mje.mjs +2 -0
  165. package/dist/chunks/cli-1.0.8-hy7rca6f.mjs +3 -0
  166. package/dist/chunks/cli-1.0.8-jy0q2dkm.mjs +2 -0
  167. package/dist/chunks/cli-1.0.8-jy7hzejg.mjs +2 -0
  168. package/dist/chunks/cli-1.0.8-k7vkjf05.mjs +2 -0
  169. package/dist/chunks/cli-1.0.8-k90vtehz.mjs +2 -0
  170. package/dist/chunks/cli-1.0.8-ke76gxzw.mjs +199 -0
  171. package/dist/chunks/cli-1.0.8-kfv9esqs.mjs +3 -0
  172. package/dist/chunks/cli-1.0.8-kh51d8mn.mjs +2 -0
  173. package/dist/chunks/cli-1.0.8-kzrdbzd1.mjs +2 -0
  174. package/dist/chunks/cli-1.0.8-kzyrncv0.mjs +2 -0
  175. package/dist/chunks/cli-1.0.8-m2w20tkx.mjs +2 -0
  176. package/dist/chunks/cli-1.0.8-m6fhqq8r.mjs +2 -0
  177. package/dist/chunks/cli-1.0.8-m9cg4s2e.mjs +2 -0
  178. package/dist/chunks/cli-1.0.8-mbhxente.mjs +2 -0
  179. package/dist/chunks/cli-1.0.8-mhhby5pn.mjs +6 -0
  180. package/dist/chunks/cli-1.0.8-mn87n778.mjs +2 -0
  181. package/dist/chunks/cli-1.0.8-mrepsey6.mjs +12 -0
  182. package/dist/chunks/cli-1.0.8-n2thtekm.mjs +2 -0
  183. package/dist/chunks/cli-1.0.8-n4rd5y17.mjs +2 -0
  184. package/dist/chunks/cli-1.0.8-nmrvp3xa.mjs +2 -0
  185. package/dist/chunks/cli-1.0.8-nyq2vcvp.mjs +18 -0
  186. package/dist/chunks/cli-1.0.8-p4egaq4j.mjs +5 -0
  187. package/dist/chunks/cli-1.0.8-p8h84zc9.mjs +3 -0
  188. package/dist/chunks/cli-1.0.8-pbxke3zm.mjs +24 -0
  189. package/dist/chunks/cli-1.0.8-pemd6sje.mjs +2 -0
  190. package/dist/chunks/cli-1.0.8-pzesgrb2.mjs +2 -0
  191. package/dist/chunks/cli-1.0.8-q2myd223.mjs +2 -0
  192. package/dist/chunks/cli-1.0.8-q6x8n8kc.mjs +2 -0
  193. package/dist/chunks/cli-1.0.8-qbrw3wf3.mjs +3 -0
  194. package/dist/chunks/cli-1.0.8-qcf0zmve.mjs +50 -0
  195. package/dist/chunks/cli-1.0.8-qhcghw02.mjs +2 -0
  196. package/dist/chunks/cli-1.0.8-qjcxwb3c.mjs +2 -0
  197. package/dist/chunks/cli-1.0.8-qss5sph3.mjs +59 -0
  198. package/dist/chunks/cli-1.0.8-qzqze1a1.mjs +2 -0
  199. package/dist/chunks/cli-1.0.8-r3ecr05v.mjs +2 -0
  200. package/dist/chunks/cli-1.0.8-r4zbpasa.mjs +24 -0
  201. package/dist/chunks/cli-1.0.8-rdd0jr2h.mjs +2 -0
  202. package/dist/chunks/cli-1.0.8-rg1csg40.mjs +2 -0
  203. package/dist/chunks/cli-1.0.8-rh93fw0p.mjs +2 -0
  204. package/dist/chunks/cli-1.0.8-rna8rhza.mjs +2 -0
  205. package/dist/chunks/cli-1.0.8-rnkrr7ma.mjs +2 -0
  206. package/dist/chunks/cli-1.0.8-rxf0zjys.mjs +2 -0
  207. package/dist/chunks/cli-1.0.8-rxfx9v7j.mjs +2 -0
  208. package/dist/chunks/cli-1.0.8-s5kcxz2r.mjs +4 -0
  209. package/dist/chunks/cli-1.0.8-s6nsgb78.mjs +2 -0
  210. package/dist/chunks/cli-1.0.8-sbf6n56q.mjs +2 -0
  211. package/dist/chunks/cli-1.0.8-se674t5h.mjs +4 -0
  212. package/dist/chunks/cli-1.0.8-secda9xj.mjs +2 -0
  213. package/dist/chunks/cli-1.0.8-sqbaxhfc.mjs +16 -0
  214. package/dist/chunks/cli-1.0.8-swq5n54q.mjs +2 -0
  215. package/dist/chunks/cli-1.0.8-swts6q29.mjs +2 -0
  216. package/dist/chunks/cli-1.0.8-szvwf6r4.mjs +2 -0
  217. package/dist/chunks/cli-1.0.8-tdhxr84n.mjs +3 -0
  218. package/dist/chunks/cli-1.0.8-tfjhtagk.mjs +2 -0
  219. package/dist/chunks/cli-1.0.8-tpazbzcz.mjs +2 -0
  220. package/dist/chunks/cli-1.0.8-tq72b6bb.mjs +2 -0
  221. package/dist/chunks/cli-1.0.8-tqf6s7ht.mjs +58 -0
  222. package/dist/chunks/cli-1.0.8-tz68cg1p.mjs +2 -0
  223. package/dist/chunks/cli-1.0.8-v1rafynv.mjs +2 -0
  224. package/dist/chunks/cli-1.0.8-v75s19rg.mjs +2 -0
  225. package/dist/chunks/cli-1.0.8-vb0by9ay.mjs +2 -0
  226. package/dist/chunks/cli-1.0.8-vhjjjs1z.mjs +24 -0
  227. package/dist/chunks/cli-1.0.8-vka62cmh.mjs +2 -0
  228. package/dist/chunks/cli-1.0.8-vvy0bc0g.mjs +1 -0
  229. package/dist/chunks/cli-1.0.8-vztgm8r0.mjs +2 -0
  230. package/dist/chunks/cli-1.0.8-w5wjckph.mjs +25 -0
  231. package/dist/chunks/cli-1.0.8-w6atgaqw.mjs +2 -0
  232. package/dist/chunks/cli-1.0.8-x1387pp6.mjs +2 -0
  233. package/dist/chunks/cli-1.0.8-x2z1s2gm.mjs +2 -0
  234. package/dist/chunks/cli-1.0.8-x3bjpevp.mjs +12 -0
  235. package/dist/chunks/cli-1.0.8-x4hcncpt.mjs +2 -0
  236. package/dist/chunks/cli-1.0.8-xcqdbka0.mjs +2 -0
  237. package/dist/chunks/cli-1.0.8-xhz9dm09.mjs +2 -0
  238. package/dist/chunks/cli-1.0.8-xka5xbz5.mjs +2 -0
  239. package/dist/chunks/cli-1.0.8-xv5yp3w6.mjs +2 -0
  240. package/dist/chunks/cli-1.0.8-xxrng2p1.mjs +15 -0
  241. package/dist/chunks/cli-1.0.8-xzp5af2t.mjs +2 -0
  242. package/dist/chunks/cli-1.0.8-y7jd923h.mjs +2 -0
  243. package/dist/chunks/cli-1.0.8-yb3vesbt.mjs +4 -0
  244. package/dist/chunks/cli-1.0.8-yc4a0111.mjs +20 -0
  245. package/dist/chunks/cli-1.0.8-ycxmnmhs.mjs +3 -0
  246. package/dist/chunks/cli-1.0.8-ykwgcdbt.mjs +5476 -0
  247. package/dist/chunks/cli-1.0.8-yzc0z6ex.mjs +2 -0
  248. package/dist/chunks/cli-1.0.8-z49w3x0w.mjs +4 -0
  249. package/dist/chunks/cli-1.0.8-z6x3zsb0.mjs +2 -0
  250. package/dist/chunks/cli-1.0.8-z79r5re2.mjs +17 -0
  251. package/dist/chunks/cli-1.0.8-z7v2b551.mjs +2 -0
  252. package/dist/chunks/cli-1.0.8-z96bbp08.mjs +6 -0
  253. package/dist/chunks/cli-1.0.8-zh2ygfav.mjs +2 -0
  254. package/dist/chunks/cli-1.0.8-zjckzq5j.mjs +18 -0
  255. package/dist/chunks/cli-1.0.8-znefv1yp.mjs +2 -0
  256. package/dist/chunks/cli-1.0.8-zza8ns8c.mjs +15 -0
  257. package/dist/chunks/client-1.0.8-n7dt1rfw.mjs +1 -0
  258. package/dist/chunks/color-1.0.8-jxfasz8x.mjs +1 -0
  259. package/dist/chunks/compact-1.0.8-jnbzy2qh.mjs +3 -0
  260. package/dist/chunks/config-1.0.8-p850nj3c.mjs +1 -0
  261. package/dist/chunks/config-1.0.8-xg117aq2.mjs +1 -0
  262. package/dist/chunks/constants-1.0.8-ms4fbs66.mjs +1 -0
  263. package/dist/chunks/context-1.0.8-tb27h7kb.mjs +1 -0
  264. package/dist/chunks/context-noninteractive-1.0.8-1ry2t8be.mjs +1 -0
  265. package/dist/chunks/conversation-1.0.8-v96pn05v.mjs +1 -0
  266. package/dist/chunks/copilotHeaders-1.0.8-cs9jt8ks.mjs +1 -0
  267. package/dist/chunks/copy-1.0.8-g8d8msxn.mjs +9 -0
  268. package/dist/chunks/cost-1.0.8-kx2ejbds.mjs +1 -0
  269. package/dist/chunks/createSSHSession-1.0.8-2wvpn7y4.mjs +1 -0
  270. package/dist/chunks/createSession-1.0.8-ecm6dynn.mjs +1 -0
  271. package/dist/chunks/debug-1.0.8-cphv9b4j.mjs +1 -0
  272. package/dist/chunks/defaultActionDeps-1.0.8-2k34bnzt.mjs +1446 -0
  273. package/dist/chunks/desktop-1.0.8-w6qk81xg.mjs +1 -0
  274. package/dist/chunks/detectRepository-1.0.8-q2e17deh.mjs +1 -0
  275. package/dist/chunks/detection-1.0.8-adg3pmtx.mjs +1 -0
  276. package/dist/chunks/diff-1.0.8-kcsv429q.mjs +1 -0
  277. package/dist/chunks/doctor-1.0.8-4807n5ga.mjs +1 -0
  278. package/dist/chunks/doctorDiagnostic-1.0.8-thmvp0a8.mjs +1 -0
  279. package/dist/chunks/earlyInput-1.0.8-hhf06cvs.mjs +1 -0
  280. package/dist/chunks/effort-1.0.8-k9jy349z.mjs +10 -0
  281. package/dist/chunks/engine-1.0.8-swnh66g9.mjs +1 -0
  282. package/dist/chunks/envLessBridgeConfig-1.0.8-8066f8x3.mjs +1 -0
  283. package/dist/chunks/envUtils-1.0.8-hvdz25s8.mjs +1 -0
  284. package/dist/chunks/environmentSelection-1.0.8-dgef2ag8.mjs +1 -0
  285. package/dist/chunks/environments-1.0.8-8kxx7cf7.mjs +1 -0
  286. package/dist/chunks/errors-1.0.8-yrb0dfde.mjs +1 -0
  287. package/dist/chunks/exampleCommands-1.0.8-2fp656s9.mjs +1 -0
  288. package/dist/chunks/exit-1.0.8-axxrxks1.mjs +1 -0
  289. package/dist/chunks/explorer-1.0.8-txzsk7g4.mjs +1 -0
  290. package/dist/chunks/export-1.0.8-yxhs2z6f.mjs +2 -0
  291. package/dist/chunks/extra-usage-1.0.8-mkde8ry2.mjs +1 -0
  292. package/dist/chunks/extra-usage-noninteractive-1.0.8-zq1zsj4c.mjs +1 -0
  293. package/dist/chunks/fast-1.0.8-dm74897t.mjs +1 -0
  294. package/dist/chunks/feedback-1.0.8-wnsh14ya.mjs +14 -0
  295. package/dist/chunks/firstPartyEventLogger-1.0.8-xp13dv5e.mjs +1 -0
  296. package/dist/chunks/git-1.0.8-emhr4f0a.mjs +1 -0
  297. package/dist/chunks/githubModelsCredentials-1.0.8-q88vb6k1.mjs +1 -0
  298. package/dist/chunks/goal-1.0.8-vx7pfbph.mjs +4 -0
  299. package/dist/chunks/grove-1.0.8-4vn920ab.mjs +1 -0
  300. package/dist/chunks/growthbook-1.0.8-ktn0scz1.mjs +1 -0
  301. package/dist/chunks/headless-1.0.8-kgkf00rm.mjs +2 -0
  302. package/dist/chunks/heapdump-1.0.8-e5g8ycqp.mjs +6 -0
  303. package/dist/chunks/help-1.0.8-g5kftejd.mjs +1 -0
  304. package/dist/chunks/hookChains-1.0.8-jnd1g9vp.mjs +3 -0
  305. package/dist/chunks/hooks-1.0.8-d343gmd5.mjs +1 -0
  306. package/dist/chunks/hooks-1.0.8-xq482xcs.mjs +79 -0
  307. package/dist/chunks/ide-1.0.8-4veg8hzd.mjs +3 -0
  308. package/dist/chunks/image-processor-napi-1.0.8-93bk96t4.mjs +1 -0
  309. package/dist/chunks/inboundAttachments-1.0.8-zkj9tf58.mjs +1 -0
  310. package/dist/chunks/index-1.0.8-0pnvq37m.mjs +2 -0
  311. package/dist/chunks/index-1.0.8-1pa1v81a.mjs +1 -0
  312. package/dist/chunks/index-1.0.8-464f1j1b.mjs +1 -0
  313. package/dist/chunks/index-1.0.8-4zsx151v.mjs +1 -0
  314. package/dist/chunks/index-1.0.8-7wqrymcz.mjs +2 -0
  315. package/dist/chunks/index-1.0.8-8qzz6s1v.mjs +1 -0
  316. package/dist/chunks/index-1.0.8-91cpv5tb.mjs +9 -0
  317. package/dist/chunks/index-1.0.8-9x499a6f.mjs +1 -0
  318. package/dist/chunks/index-1.0.8-aqm7z1xs.mjs +1 -0
  319. package/dist/chunks/index-1.0.8-bha1edzd.mjs +1 -0
  320. package/dist/chunks/index-1.0.8-bhzqmht2.mjs +1 -0
  321. package/dist/chunks/index-1.0.8-dh80510b.mjs +1 -0
  322. package/dist/chunks/index-1.0.8-hdnvwr7c.mjs +1 -0
  323. package/dist/chunks/index-1.0.8-ht187zbt.mjs +17 -0
  324. package/dist/chunks/index-1.0.8-jj36eqgv.mjs +1 -0
  325. package/dist/chunks/index-1.0.8-p16qr0gk.mjs +1 -0
  326. package/dist/chunks/index-1.0.8-pejsn3j4.mjs +1 -0
  327. package/dist/chunks/index-1.0.8-pzn6kwcz.mjs +1 -0
  328. package/dist/chunks/index-1.0.8-szryar06.mjs +9 -0
  329. package/dist/chunks/index-1.0.8-thkaetpe.mjs +5 -0
  330. package/dist/chunks/index-1.0.8-tnpscb0d.mjs +1 -0
  331. package/dist/chunks/index-1.0.8-xxdv7dxk.mjs +1 -0
  332. package/dist/chunks/index-1.0.8-z5xdfxxw.mjs +30 -0
  333. package/dist/chunks/init-1.0.8-krd7wa3v.mjs +1 -0
  334. package/dist/chunks/initReplBridge-1.0.8-ftx1k41m.mjs +1 -0
  335. package/dist/chunks/ink-1.0.8-pteq28sp.mjs +1 -0
  336. package/dist/chunks/insights-1.0.8-mb2z8g5h.mjs +870 -0
  337. package/dist/chunks/install-1.0.8-s99z78an.mjs +1 -0
  338. package/dist/chunks/install-github-app-1.0.8-r07c7fc8.mjs +149 -0
  339. package/dist/chunks/install-slack-app-1.0.8-mq0zjdf6.mjs +1 -0
  340. package/dist/chunks/instrumentation-1.0.8-00jpcry8.mjs +1 -0
  341. package/dist/chunks/interactiveHelpers-1.0.8-3z1ey7fr.mjs +1 -0
  342. package/dist/chunks/keybindings-1.0.8-wenkty39.mjs +2 -0
  343. package/dist/chunks/knowledge-1.0.8-cjdkk8mb.mjs +2 -0
  344. package/dist/chunks/latestVersionCache-1.0.8-rncrmhd0.mjs +1 -0
  345. package/dist/chunks/loadAgentsDir-1.0.8-9ry9xbfw.mjs +1 -0
  346. package/dist/chunks/loadPluginHooks-1.0.8-5e422tv0.mjs +1 -0
  347. package/dist/chunks/loadPluginHooks-1.0.8-gw0mb3vq.mjs +1 -0
  348. package/dist/chunks/log-1.0.8-bhyqzqd4.mjs +1 -0
  349. package/dist/chunks/main-1.0.8-sv9em0tk.mjs +1 -0
  350. package/dist/chunks/managedEnv-1.0.8-ey5201g9.mjs +1 -0
  351. package/dist/chunks/mcp-1.0.8-0wkq1z2f.mjs +1 -0
  352. package/dist/chunks/mcp-1.0.8-hft3ww8h.mjs +17 -0
  353. package/dist/chunks/mcp-1.0.8-k2y8akh4.mjs +4 -0
  354. package/dist/chunks/mcpb-1.0.8-6d4d5qg6.mjs +1 -0
  355. package/dist/chunks/memory-1.0.8-bhfq1tpv.mjs +3 -0
  356. package/dist/chunks/model-1.0.8-9x1n1hs4.mjs +2 -0
  357. package/dist/chunks/model-1.0.8-f30q5v3y.mjs +1 -0
  358. package/dist/chunks/node-1.0.8-z64w4mf3.mjs +12 -0
  359. package/dist/chunks/oauth-1.0.8-7vjm8xxp.mjs +1 -0
  360. package/dist/chunks/openaiShim-1.0.8-dxqbym7v.mjs +14 -0
  361. package/dist/chunks/output-style-1.0.8-j3vsn3xx.mjs +1 -0
  362. package/dist/chunks/package-ZZWOLTXM-1.0.8-57wby5pw.mjs +1 -0
  363. package/dist/chunks/parseConnectUrl-1.0.8-fa21hp3j.mjs +1 -0
  364. package/dist/chunks/parser-1.0.8-eddksp6m.mjs +1 -0
  365. package/dist/chunks/passes-1.0.8-82cxmwxv.mjs +1 -0
  366. package/dist/chunks/permissions-1.0.8-9qwtkcvw.mjs +1 -0
  367. package/dist/chunks/permissions-1.0.8-hkpezdb6.mjs +3 -0
  368. package/dist/chunks/plan-1.0.8-t7cypg7z.mjs +1 -0
  369. package/dist/chunks/plist-1.0.8-tx4wgdc5.mjs +1 -0
  370. package/dist/chunks/plugin-1.0.8-fpfj5qcx.mjs +29 -0
  371. package/dist/chunks/pluginStartupCheck-1.0.8-htw7er4z.mjs +1 -0
  372. package/dist/chunks/plugins-1.0.8-89t24bsm.mjs +9 -0
  373. package/dist/chunks/preActionHook-1.0.8-caxsc3mp.mjs +2 -0
  374. package/dist/chunks/print-1.0.8-491vxbzs.mjs +57 -0
  375. package/dist/chunks/privacy-settings-1.0.8-m25zra7r.mjs +1 -0
  376. package/dist/chunks/process-1.0.8-3tzpsdmr.mjs +1 -0
  377. package/dist/chunks/processBashCommand-1.0.8-czb8ax1e.mjs +1 -0
  378. package/dist/chunks/processSlashCommand-1.0.8-z2qz58yf.mjs +9 -0
  379. package/dist/chunks/prompt-1.0.8-2bbvxeh7.mjs +1 -0
  380. package/dist/chunks/prompt-1.0.8-ftnsddxg.mjs +1 -0
  381. package/dist/chunks/prompts-1.0.8-7jmnssxc.mjs +1 -0
  382. package/dist/chunks/protocolHandler-1.0.8-y3rebjd9.mjs +13 -0
  383. package/dist/chunks/provider-1.0.8-zrx7vyqk.mjs +2 -0
  384. package/dist/chunks/providerProfiles-1.0.8-n4b3xs5v.mjs +1 -0
  385. package/dist/chunks/providerValidation-1.0.8-j9gx7a1v.mjs +6 -0
  386. package/dist/chunks/rate-limit-options-1.0.8-084n6z58.mjs +1 -0
  387. package/dist/chunks/registerSubcommands-1.0.8-e9k91bmz.mjs +34 -0
  388. package/dist/chunks/registry-1.0.8-p8bc2ppg.mjs +1 -0
  389. package/dist/chunks/release-notes-1.0.8-wdtevpan.mjs +5 -0
  390. package/dist/chunks/reload-plugins-1.0.8-crrx8jkj.mjs +2 -0
  391. package/dist/chunks/remote-env-1.0.8-yb4czxha.mjs +1 -0
  392. package/dist/chunks/remoteBridgeCore-1.0.8-cg38st7c.mjs +1 -0
  393. package/dist/chunks/remoteSession-1.0.8-g9cx4dmb.mjs +1 -0
  394. package/dist/chunks/rename-1.0.8-c263drxy.mjs +1 -0
  395. package/dist/chunks/replBridgeHandle-1.0.8-51065xd1.mjs +1 -0
  396. package/dist/chunks/replLauncher-1.0.8-n5f7d6tk.mjs +1 -0
  397. package/dist/chunks/resume-1.0.8-20r9g9a8.mjs +2 -0
  398. package/dist/chunks/rewind-1.0.8-1shxcx6h.mjs +1 -0
  399. package/dist/chunks/rootOptions-1.0.8-v3mryhnd.mjs +1 -0
  400. package/dist/chunks/sandbox-adapter-1.0.8-db8n3sf2.mjs +1 -0
  401. package/dist/chunks/sandbox-toggle-1.0.8-8ysakwfc.mjs +1 -0
  402. package/dist/chunks/session-1.0.8-nf98ege7.mjs +2 -0
  403. package/dist/chunks/sessionDiscovery-1.0.8-j7e3zz3z.mjs +1 -0
  404. package/dist/chunks/sessionFileAccessHooks-1.0.8-tywx0fhs.mjs +1 -0
  405. package/dist/chunks/sessionStorage-1.0.8-3jncs1jd.mjs +1 -0
  406. package/dist/chunks/settings-1.0.8-ferv6mr5.mjs +1 -0
  407. package/dist/chunks/setup-1.0.8-r7jm4921.mjs +5 -0
  408. package/dist/chunks/sinks-1.0.8-w2zqhs5t.mjs +1 -0
  409. package/dist/chunks/skills-1.0.8-c2re0407.mjs +1 -0
  410. package/dist/chunks/startupProfiler-1.0.8-m7x42s2c.mjs +1 -0
  411. package/dist/chunks/startupUpdateCheck-1.0.8-hnq9gbsm.mjs +1 -0
  412. package/dist/chunks/state-1.0.8-mszmr9fy.mjs +1 -0
  413. package/dist/chunks/stats-1.0.8-xah6pcq3.mjs +6 -0
  414. package/dist/chunks/status-1.0.8-cb5dxyy1.mjs +1 -0
  415. package/dist/chunks/stickers-1.0.8-vr13mnk0.mjs +1 -0
  416. package/dist/chunks/subprocessEnv-1.0.8-rqxgszbc.mjs +1 -0
  417. package/dist/chunks/tasks-1.0.8-v1meznm5.mjs +1 -0
  418. package/dist/chunks/teamHelpers-1.0.8-zs8qgyey.mjs +1 -0
  419. package/dist/chunks/teammateModeSnapshot-1.0.8-828qsec1.mjs +1 -0
  420. package/dist/chunks/teleport-1.0.8-aszfnv2s.mjs +1 -0
  421. package/dist/chunks/terminalSetup-1.0.8-9n57sf46.mjs +1 -0
  422. package/dist/chunks/theme-1.0.8-da67zfgn.mjs +1 -0
  423. package/dist/chunks/thinkback-1.0.8-p4ne9wck.mjs +1 -0
  424. package/dist/chunks/thinkback-play-1.0.8-kz09z4aa.mjs +1 -0
  425. package/dist/chunks/toolPool-1.0.8-rbawjenc.mjs +1 -0
  426. package/dist/chunks/toolSearch-1.0.8-drw7db57.mjs +1 -0
  427. package/dist/chunks/tools-1.0.8-51cw7jhr.mjs +1 -0
  428. package/dist/chunks/trustedDevice-1.0.8-y6484dbh.mjs +1 -0
  429. package/dist/chunks/turndown.cjs-1.0.8-07rx7x03.mjs +69 -0
  430. package/dist/chunks/types-1.0.8-svkpkerr.mjs +1 -0
  431. package/dist/chunks/ultrareviewCommand-1.0.8-fxpy87j7.mjs +4 -0
  432. package/dist/chunks/update-1.0.8-r5hsx0vn.mjs +88 -0
  433. package/dist/chunks/upgrade-1.0.8-rfjr944q.mjs +1 -0
  434. package/dist/chunks/upload-1.0.8-xb3qq931.mjs +7 -0
  435. package/dist/chunks/upstreamproxy-1.0.8-enmg2k32.mjs +14 -0
  436. package/dist/chunks/url-handler-napi-1.0.8-4xafghrm.mjs +1 -0
  437. package/dist/chunks/usage-1.0.8-x3yk026j.mjs +1 -0
  438. package/dist/chunks/util-1.0.8-g8szktmn.mjs +1 -0
  439. package/dist/chunks/utils-1.0.8-qkwh1by0.mjs +1 -0
  440. package/dist/chunks/vim-1.0.8-qv0fhjmv.mjs +1 -0
  441. package/dist/chunks/watcher-1.0.8-y0ye7hc6.mjs +1 -0
  442. package/dist/chunks/wiki-1.0.8-3ydvpt0c.mjs +132 -0
  443. package/dist/chunks/workflows-1.0.8-1fj4wp4z.mjs +1 -0
  444. package/dist/chunks/worktree-1.0.8-x68tgvcc.mjs +1 -0
  445. package/dist/chunks/worktreeModeEnabled-1.0.8-3e98qmek.mjs +1 -0
  446. package/dist/chunks/wrapper-1.0.8-atewpqqc.mjs +7 -0
  447. package/dist/cli.mjs +2 -2
  448. package/install.cjs +17 -1
  449. package/package.json +9 -9
  450. package/dist/chunks/AgentTool-1.0.7-syk5wnkb.mjs +0 -1
  451. package/dist/chunks/App-1.0.7-9xht4gsa.mjs +0 -1
  452. package/dist/chunks/ApproveApiKey-1.0.7-dnv7dmn7.mjs +0 -1
  453. package/dist/chunks/AssistantSessionChooser-1.0.7-q24ws7x8.mjs +0 -1
  454. package/dist/chunks/AutoModeOptInDialog-1.0.7-e3kma94j.mjs +0 -1
  455. package/dist/chunks/BypassPermissionsModeDialog-1.0.7-2m1y9b7f.mjs +0 -1
  456. package/dist/chunks/ClaudeMdExternalIncludesDialog-1.0.7-1gpcb873.mjs +0 -1
  457. package/dist/chunks/ConsoleOAuthFlow-1.0.7-pyrnmhtt.mjs +0 -1
  458. package/dist/chunks/DiffDialog-1.0.7-whkynyby.mjs +0 -7
  459. package/dist/chunks/Doctor-1.0.7-3yedapcw.mjs +0 -1
  460. package/dist/chunks/ExplorerDialog-1.0.7-99ytgtp8.mjs +0 -6
  461. package/dist/chunks/Grove-1.0.7-c6wygjxb.mjs +0 -1
  462. package/dist/chunks/ITermBackend-1.0.7-a8a42yx1.mjs +0 -1
  463. package/dist/chunks/InvalidConfigDialog-1.0.7-0e1f33ss.mjs +0 -1
  464. package/dist/chunks/InvalidSettingsDialog-1.0.7-141f7djg.mjs +0 -1
  465. package/dist/chunks/MigrationDialog-1.0.7-scbcqde5.mjs +0 -1
  466. package/dist/chunks/Onboarding-1.0.7-9f7rpy9p.mjs +0 -1
  467. package/dist/chunks/ProviderManager-1.0.7-6mjnccee.mjs +0 -1
  468. package/dist/chunks/REPL-1.0.7-3xhews8d.mjs +0 -1
  469. package/dist/chunks/ResumeConversation-1.0.7-qq2sfpfr.mjs +0 -1
  470. package/dist/chunks/SnapshotUpdateDialog-1.0.7-x9djv2x5.mjs +0 -1
  471. package/dist/chunks/TeleportProgress-1.0.7-f6caprdb.mjs +0 -1
  472. package/dist/chunks/TeleportRepoMismatchDialog-1.0.7-b511561j.mjs +0 -1
  473. package/dist/chunks/TeleportResumeWrapper-1.0.7-9twx384a.mjs +0 -1
  474. package/dist/chunks/TmuxBackend-1.0.7-x3j2hxpn.mjs +0 -9
  475. package/dist/chunks/ToolSearchTool-1.0.7-1y7h6yxr.mjs +0 -1
  476. package/dist/chunks/TrustDialog-1.0.7-na359dm9.mjs +0 -1
  477. package/dist/chunks/activeProvider-1.0.7-2vx6krky.mjs +0 -1
  478. package/dist/chunks/add-dir-1.0.7-r9eb0fmb.mjs +0 -1
  479. package/dist/chunks/agentTypes-1.0.7-v46w2p6e.mjs +0 -1
  480. package/dist/chunks/agents-1.0.7-ekjscjc4.mjs +0 -3
  481. package/dist/chunks/agents-1.0.7-v22jz68n.mjs +0 -110
  482. package/dist/chunks/api-1.0.7-v520kz7p.mjs +0 -1
  483. package/dist/chunks/asciicast-1.0.7-r61pgxmk.mjs +0 -1
  484. package/dist/chunks/assistant-1.0.7-c12zzeyg.mjs +0 -1
  485. package/dist/chunks/auth-1.0.7-gv0th62c.mjs +0 -1
  486. package/dist/chunks/auth-1.0.7-y9sxvs6e.mjs +0 -1
  487. package/dist/chunks/autoMode-1.0.7-yq0m3sf6.mjs +0 -48
  488. package/dist/chunks/autoUpdater-1.0.7-6fqzjxwg.mjs +0 -1
  489. package/dist/chunks/backgroundHousekeeping-1.0.7-7mzhb52b.mjs +0 -1
  490. package/dist/chunks/branch-1.0.7-66ms82bv.mjs +0 -4
  491. package/dist/chunks/bridge-1.0.7-cd3w20b9.mjs +0 -2
  492. package/dist/chunks/bridgeConfig-1.0.7-wztmwmxc.mjs +0 -1
  493. package/dist/chunks/bridgeEnabled-1.0.7-046e65f0.mjs +0 -1
  494. package/dist/chunks/bridgeMain-1.0.7-knt8h92j.mjs +0 -88
  495. package/dist/chunks/bridgePointer-1.0.7-v2crbecf.mjs +0 -1
  496. package/dist/chunks/btw-1.0.7-eg973xg5.mjs +0 -1
  497. package/dist/chunks/buddy-1.0.7-ypvr18ck.mjs +0 -3
  498. package/dist/chunks/cacache-1.0.7-0tzh2dcw.mjs +0 -1
  499. package/dist/chunks/cache-probe-1.0.7-hhfr94gj.mjs +0 -21
  500. package/dist/chunks/cacheStats-1.0.7-51t2bh05.mjs +0 -4
  501. package/dist/chunks/caches-1.0.7-mvqghhkx.mjs +0 -1
  502. package/dist/chunks/claudeDesktop-1.0.7-1mrhcxq6.mjs +0 -1
  503. package/dist/chunks/claudemd-1.0.7-kgynnx5a.mjs +0 -1
  504. package/dist/chunks/clear-1.0.7-08jf28zt.mjs +0 -1
  505. package/dist/chunks/clearTerminal-1.0.7-z4gkskcj.mjs +0 -1
  506. package/dist/chunks/cli-1.0.7-01cbaw74.mjs +0 -2
  507. package/dist/chunks/cli-1.0.7-05enwpnp.mjs +0 -2
  508. package/dist/chunks/cli-1.0.7-073ekpkk.mjs +0 -21
  509. package/dist/chunks/cli-1.0.7-0dmnsy4c.mjs +0 -2
  510. package/dist/chunks/cli-1.0.7-0qbp0ac0.mjs +0 -17
  511. package/dist/chunks/cli-1.0.7-15qvkn0q.mjs +0 -15
  512. package/dist/chunks/cli-1.0.7-16wdg8r0.mjs +0 -18
  513. package/dist/chunks/cli-1.0.7-1fwxyw8s.mjs +0 -2
  514. package/dist/chunks/cli-1.0.7-1j68v2d8.mjs +0 -3
  515. package/dist/chunks/cli-1.0.7-1mkaw3aw.mjs +0 -2
  516. package/dist/chunks/cli-1.0.7-1r1y3a1c.mjs +0 -2
  517. package/dist/chunks/cli-1.0.7-1rw3xdy0.mjs +0 -58
  518. package/dist/chunks/cli-1.0.7-1s12ckef.mjs +0 -2
  519. package/dist/chunks/cli-1.0.7-1sgef4sw.mjs +0 -2
  520. package/dist/chunks/cli-1.0.7-1ty38mre.mjs +0 -2
  521. package/dist/chunks/cli-1.0.7-1xe7m9s1.mjs +0 -4
  522. package/dist/chunks/cli-1.0.7-1y8xdp9n.mjs +0 -2
  523. package/dist/chunks/cli-1.0.7-2438cvr1.mjs +0 -3
  524. package/dist/chunks/cli-1.0.7-2cajdt14.mjs +0 -2
  525. package/dist/chunks/cli-1.0.7-2csh6jt3.mjs +0 -2
  526. package/dist/chunks/cli-1.0.7-2k1bt916.mjs +0 -2
  527. package/dist/chunks/cli-1.0.7-2pyjzmpq.mjs +0 -2
  528. package/dist/chunks/cli-1.0.7-2wm3s497.mjs +0 -2
  529. package/dist/chunks/cli-1.0.7-2xw882yk.mjs +0 -2
  530. package/dist/chunks/cli-1.0.7-39nnxy0p.mjs +0 -2
  531. package/dist/chunks/cli-1.0.7-3arv8y4s.mjs +0 -12
  532. package/dist/chunks/cli-1.0.7-3fx5xqzq.mjs +0 -2
  533. package/dist/chunks/cli-1.0.7-3ke0fbeq.mjs +0 -6
  534. package/dist/chunks/cli-1.0.7-3kmf6s21.mjs +0 -67
  535. package/dist/chunks/cli-1.0.7-3p608q44.mjs +0 -2
  536. package/dist/chunks/cli-1.0.7-3pqhf5bj.mjs +0 -4
  537. package/dist/chunks/cli-1.0.7-3s41c41h.mjs +0 -20
  538. package/dist/chunks/cli-1.0.7-3s4ccas2.mjs +0 -2
  539. package/dist/chunks/cli-1.0.7-3xrc45nn.mjs +0 -2
  540. package/dist/chunks/cli-1.0.7-3z1z90gf.mjs +0 -4
  541. package/dist/chunks/cli-1.0.7-41jm6paw.mjs +0 -2
  542. package/dist/chunks/cli-1.0.7-45px4q2q.mjs +0 -12
  543. package/dist/chunks/cli-1.0.7-4a67zfe7.mjs +0 -2
  544. package/dist/chunks/cli-1.0.7-4qwjg996.mjs +0 -2
  545. package/dist/chunks/cli-1.0.7-538yatrk.mjs +0 -2
  546. package/dist/chunks/cli-1.0.7-5f0y2nxn.mjs +0 -2
  547. package/dist/chunks/cli-1.0.7-5h2vgm7b.mjs +0 -2
  548. package/dist/chunks/cli-1.0.7-5kc9g0m9.mjs +0 -3
  549. package/dist/chunks/cli-1.0.7-5rxjz9r1.mjs +0 -2
  550. package/dist/chunks/cli-1.0.7-65xw81pn.mjs +0 -7
  551. package/dist/chunks/cli-1.0.7-67z7m1zx.mjs +0 -15
  552. package/dist/chunks/cli-1.0.7-6ncp8ban.mjs +0 -2
  553. package/dist/chunks/cli-1.0.7-6r3vkkzw.mjs +0 -2
  554. package/dist/chunks/cli-1.0.7-6wm7jzey.mjs +0 -2
  555. package/dist/chunks/cli-1.0.7-6yr2e385.mjs +0 -2
  556. package/dist/chunks/cli-1.0.7-73e5dz55.mjs +0 -2
  557. package/dist/chunks/cli-1.0.7-757ex32c.mjs +0 -199
  558. package/dist/chunks/cli-1.0.7-7egbzjdg.mjs +0 -12
  559. package/dist/chunks/cli-1.0.7-7gmv86pv.mjs +0 -25
  560. package/dist/chunks/cli-1.0.7-7qm9503t.mjs +0 -4
  561. package/dist/chunks/cli-1.0.7-7xhry9cz.mjs +0 -8
  562. package/dist/chunks/cli-1.0.7-7yrvwwdb.mjs +0 -2
  563. package/dist/chunks/cli-1.0.7-84dx5y2m.mjs +0 -2
  564. package/dist/chunks/cli-1.0.7-8fj15s8a.mjs +0 -2
  565. package/dist/chunks/cli-1.0.7-8hepstgz.mjs +0 -2
  566. package/dist/chunks/cli-1.0.7-8pfh7aha.mjs +0 -2
  567. package/dist/chunks/cli-1.0.7-96mb1gmj.mjs +0 -2
  568. package/dist/chunks/cli-1.0.7-96qpk0ct.mjs +0 -2
  569. package/dist/chunks/cli-1.0.7-97fqbfff.mjs +0 -2
  570. package/dist/chunks/cli-1.0.7-9p7hfa00.mjs +0 -2
  571. package/dist/chunks/cli-1.0.7-9pc6jb5f.mjs +0 -2
  572. package/dist/chunks/cli-1.0.7-9ws1j17m.mjs +0 -2
  573. package/dist/chunks/cli-1.0.7-a32vv8nk.mjs +0 -2
  574. package/dist/chunks/cli-1.0.7-a78rj0kd.mjs +0 -9
  575. package/dist/chunks/cli-1.0.7-a7fahcda.mjs +0 -2
  576. package/dist/chunks/cli-1.0.7-a808xdj3.mjs +0 -3
  577. package/dist/chunks/cli-1.0.7-aa7vfbxa.mjs +0 -2
  578. package/dist/chunks/cli-1.0.7-af1m1akw.mjs +0 -2
  579. package/dist/chunks/cli-1.0.7-akbc4ch3.mjs +0 -2
  580. package/dist/chunks/cli-1.0.7-an2jwvew.mjs +0 -9
  581. package/dist/chunks/cli-1.0.7-anrcmph3.mjs +0 -3
  582. package/dist/chunks/cli-1.0.7-av93xde0.mjs +0 -2
  583. package/dist/chunks/cli-1.0.7-b16t7f1a.mjs +0 -2
  584. package/dist/chunks/cli-1.0.7-b2pf78c9.mjs +0 -2
  585. package/dist/chunks/cli-1.0.7-b778v1dh.mjs +0 -2
  586. package/dist/chunks/cli-1.0.7-baqj15a8.mjs +0 -2
  587. package/dist/chunks/cli-1.0.7-bfe6f9c6.mjs +0 -2
  588. package/dist/chunks/cli-1.0.7-bkm2xek7.mjs +0 -2
  589. package/dist/chunks/cli-1.0.7-bn0sb2w7.mjs +0 -2
  590. package/dist/chunks/cli-1.0.7-c8kxp6h0.mjs +0 -2
  591. package/dist/chunks/cli-1.0.7-cb42m3ff.mjs +0 -2
  592. package/dist/chunks/cli-1.0.7-cf47wta1.mjs +0 -2
  593. package/dist/chunks/cli-1.0.7-cs7epg9a.mjs +0 -2
  594. package/dist/chunks/cli-1.0.7-d1zc020r.mjs +0 -133
  595. package/dist/chunks/cli-1.0.7-dbyr517p.mjs +0 -4
  596. package/dist/chunks/cli-1.0.7-ddhhvx60.mjs +0 -2
  597. package/dist/chunks/cli-1.0.7-df9p9tj8.mjs +0 -24
  598. package/dist/chunks/cli-1.0.7-dhdv7vtc.mjs +0 -50
  599. package/dist/chunks/cli-1.0.7-dnn18rgf.mjs +0 -2
  600. package/dist/chunks/cli-1.0.7-dr2dca7n.mjs +0 -2
  601. package/dist/chunks/cli-1.0.7-f43w1f9g.mjs +0 -42
  602. package/dist/chunks/cli-1.0.7-f6490vr3.mjs +0 -2
  603. package/dist/chunks/cli-1.0.7-fcfrsawp.mjs +0 -2
  604. package/dist/chunks/cli-1.0.7-fckzct0z.mjs +0 -2
  605. package/dist/chunks/cli-1.0.7-ff6dfmp3.mjs +0 -2
  606. package/dist/chunks/cli-1.0.7-fmdws8pg.mjs +0 -2
  607. package/dist/chunks/cli-1.0.7-fvr9xx0m.mjs +0 -2
  608. package/dist/chunks/cli-1.0.7-g1hrx2r5.mjs +0 -18
  609. package/dist/chunks/cli-1.0.7-g42rsvs5.mjs +0 -2
  610. package/dist/chunks/cli-1.0.7-g6d9snde.mjs +0 -3
  611. package/dist/chunks/cli-1.0.7-ga6hk3n2.mjs +0 -3
  612. package/dist/chunks/cli-1.0.7-ghxmw318.mjs +0 -2
  613. package/dist/chunks/cli-1.0.7-gj1806bk.mjs +0 -2
  614. package/dist/chunks/cli-1.0.7-gk53nva2.mjs +0 -2
  615. package/dist/chunks/cli-1.0.7-gnwjbdch.mjs +0 -2
  616. package/dist/chunks/cli-1.0.7-gp71tfwe.mjs +0 -2
  617. package/dist/chunks/cli-1.0.7-gq9fp39n.mjs +0 -2
  618. package/dist/chunks/cli-1.0.7-gqf40mqk.mjs +0 -24
  619. package/dist/chunks/cli-1.0.7-h1g9rk4g.mjs +0 -4
  620. package/dist/chunks/cli-1.0.7-hd6xn6rt.mjs +0 -2
  621. package/dist/chunks/cli-1.0.7-hfcehnx9.mjs +0 -3
  622. package/dist/chunks/cli-1.0.7-hw8dxgj2.mjs +0 -2
  623. package/dist/chunks/cli-1.0.7-j31m0f1y.mjs +0 -2
  624. package/dist/chunks/cli-1.0.7-j6hxvf4r.mjs +0 -2
  625. package/dist/chunks/cli-1.0.7-j6ndkfy3.mjs +0 -2
  626. package/dist/chunks/cli-1.0.7-jn7nay2r.mjs +0 -2
  627. package/dist/chunks/cli-1.0.7-jz4phmb3.mjs +0 -3
  628. package/dist/chunks/cli-1.0.7-k38j6sgc.mjs +0 -2
  629. package/dist/chunks/cli-1.0.7-k3nnbdbv.mjs +0 -2
  630. package/dist/chunks/cli-1.0.7-kegj01e5.mjs +0 -133
  631. package/dist/chunks/cli-1.0.7-kf237s65.mjs +0 -2
  632. package/dist/chunks/cli-1.0.7-kgbv7bt5.mjs +0 -17
  633. package/dist/chunks/cli-1.0.7-khd0yqhk.mjs +0 -2
  634. package/dist/chunks/cli-1.0.7-m17d94h8.mjs +0 -2
  635. package/dist/chunks/cli-1.0.7-mv7ptsre.mjs +0 -2
  636. package/dist/chunks/cli-1.0.7-mwj9f8rw.mjs +0 -59
  637. package/dist/chunks/cli-1.0.7-mznh91ce.mjs +0 -2
  638. package/dist/chunks/cli-1.0.7-n5hf2vsh.mjs +0 -2
  639. package/dist/chunks/cli-1.0.7-na7ksfyj.mjs +0 -2
  640. package/dist/chunks/cli-1.0.7-nhg85avf.mjs +0 -2
  641. package/dist/chunks/cli-1.0.7-nnd4za11.mjs +0 -3
  642. package/dist/chunks/cli-1.0.7-p4p38dky.mjs +0 -3
  643. package/dist/chunks/cli-1.0.7-p5setvdk.mjs +0 -2
  644. package/dist/chunks/cli-1.0.7-ph9qjcjb.mjs +0 -2
  645. package/dist/chunks/cli-1.0.7-pxmf9kyf.mjs +0 -2
  646. package/dist/chunks/cli-1.0.7-pyacw9kn.mjs +0 -5
  647. package/dist/chunks/cli-1.0.7-q3ezj6q3.mjs +0 -2
  648. package/dist/chunks/cli-1.0.7-q7w0ex1x.mjs +0 -2
  649. package/dist/chunks/cli-1.0.7-qdtt526e.mjs +0 -2
  650. package/dist/chunks/cli-1.0.7-qjtqaam0.mjs +0 -2
  651. package/dist/chunks/cli-1.0.7-qknq8k3p.mjs +0 -2
  652. package/dist/chunks/cli-1.0.7-qmm35cv2.mjs +0 -39
  653. package/dist/chunks/cli-1.0.7-qxjpkptr.mjs +0 -2
  654. package/dist/chunks/cli-1.0.7-r4h75bn4.mjs +0 -2
  655. package/dist/chunks/cli-1.0.7-rbrr75z2.mjs +0 -2
  656. package/dist/chunks/cli-1.0.7-rz8h7nks.mjs +0 -2
  657. package/dist/chunks/cli-1.0.7-s11nkveb.mjs +0 -24
  658. package/dist/chunks/cli-1.0.7-s27f8y4p.mjs +0 -2
  659. package/dist/chunks/cli-1.0.7-s5mhxbhn.mjs +0 -5476
  660. package/dist/chunks/cli-1.0.7-s6jjnyxd.mjs +0 -2
  661. package/dist/chunks/cli-1.0.7-s8e8tq3y.mjs +0 -2
  662. package/dist/chunks/cli-1.0.7-sjpx2md1.mjs +0 -2
  663. package/dist/chunks/cli-1.0.7-skm59maw.mjs +0 -2
  664. package/dist/chunks/cli-1.0.7-sv4vj25b.mjs +0 -2
  665. package/dist/chunks/cli-1.0.7-t8m8vafg.mjs +0 -4
  666. package/dist/chunks/cli-1.0.7-tf8b1vhx.mjs +0 -2
  667. package/dist/chunks/cli-1.0.7-tvz0kwb6.mjs +0 -25
  668. package/dist/chunks/cli-1.0.7-txhggtd1.mjs +0 -16
  669. package/dist/chunks/cli-1.0.7-tz22r50p.mjs +0 -2
  670. package/dist/chunks/cli-1.0.7-vcsdnmc0.mjs +0 -2
  671. package/dist/chunks/cli-1.0.7-veqj11zy.mjs +0 -3
  672. package/dist/chunks/cli-1.0.7-vjgedfc4.mjs +0 -2
  673. package/dist/chunks/cli-1.0.7-vtd2sbnq.mjs +0 -3
  674. package/dist/chunks/cli-1.0.7-vw4n13wr.mjs +0 -2
  675. package/dist/chunks/cli-1.0.7-vx0rcgfm.mjs +0 -2
  676. package/dist/chunks/cli-1.0.7-w3g8c9m3.mjs +0 -18
  677. package/dist/chunks/cli-1.0.7-wahp9jjm.mjs +0 -5
  678. package/dist/chunks/cli-1.0.7-wc28nq81.mjs +0 -6
  679. package/dist/chunks/cli-1.0.7-wc4y0k3e.mjs +0 -12
  680. package/dist/chunks/cli-1.0.7-wgt5ay2x.mjs +0 -6
  681. package/dist/chunks/cli-1.0.7-wk9hs648.mjs +0 -2
  682. package/dist/chunks/cli-1.0.7-wmrv4paj.mjs +0 -45
  683. package/dist/chunks/cli-1.0.7-wqrgw4kw.mjs +0 -2
  684. package/dist/chunks/cli-1.0.7-ws7404wd.mjs +0 -2
  685. package/dist/chunks/cli-1.0.7-wwy64zs8.mjs +0 -4
  686. package/dist/chunks/cli-1.0.7-xdt2g9p7.mjs +0 -2
  687. package/dist/chunks/cli-1.0.7-xga48xv7.mjs +0 -2
  688. package/dist/chunks/cli-1.0.7-xh0afj9p.mjs +0 -2
  689. package/dist/chunks/cli-1.0.7-xhb3g1xh.mjs +0 -2
  690. package/dist/chunks/cli-1.0.7-xtj9j6ha.mjs +0 -15
  691. package/dist/chunks/cli-1.0.7-xvhkprcw.mjs +0 -2
  692. package/dist/chunks/cli-1.0.7-xxa9e3we.mjs +0 -4
  693. package/dist/chunks/cli-1.0.7-y8sq6jh3.mjs +0 -4
  694. package/dist/chunks/cli-1.0.7-yatztvfp.mjs +0 -2
  695. package/dist/chunks/cli-1.0.7-yb9sxq0k.mjs +0 -2
  696. package/dist/chunks/cli-1.0.7-ybcht1kp.mjs +0 -2
  697. package/dist/chunks/cli-1.0.7-yc90byps.mjs +0 -34
  698. package/dist/chunks/cli-1.0.7-yyqg2waz.mjs +0 -2
  699. package/dist/chunks/cli-1.0.7-z53gtmpk.mjs +0 -6
  700. package/dist/chunks/cli-1.0.7-z5vgrn57.mjs +0 -2
  701. package/dist/chunks/cli-1.0.7-z9fvy0d8.mjs +0 -2
  702. package/dist/chunks/cli-1.0.7-zjapdrt8.mjs +0 -6
  703. package/dist/chunks/cli-1.0.7-zmqm6p6t.mjs +0 -2
  704. package/dist/chunks/cli-1.0.7-zsbst1mq.mjs +0 -1
  705. package/dist/chunks/cli-1.0.7-zwr4ga8c.mjs +0 -2
  706. package/dist/chunks/client-1.0.7-n8414pey.mjs +0 -1
  707. package/dist/chunks/color-1.0.7-99fmrmyq.mjs +0 -1
  708. package/dist/chunks/compact-1.0.7-91sa41px.mjs +0 -3
  709. package/dist/chunks/config-1.0.7-bjt981nd.mjs +0 -1
  710. package/dist/chunks/config-1.0.7-vfbd76cq.mjs +0 -1
  711. package/dist/chunks/constants-1.0.7-fj97y7dq.mjs +0 -1
  712. package/dist/chunks/context-1.0.7-qmktq4pg.mjs +0 -1
  713. package/dist/chunks/context-noninteractive-1.0.7-w9828p3h.mjs +0 -1
  714. package/dist/chunks/conversation-1.0.7-d5q8rrwx.mjs +0 -1
  715. package/dist/chunks/copilotHeaders-1.0.7-mhsm6qwp.mjs +0 -1
  716. package/dist/chunks/copy-1.0.7-hznd9dqf.mjs +0 -9
  717. package/dist/chunks/cost-1.0.7-hbpz16jx.mjs +0 -1
  718. package/dist/chunks/createSSHSession-1.0.7-5s4sy0qv.mjs +0 -1
  719. package/dist/chunks/createSession-1.0.7-mha5sscw.mjs +0 -1
  720. package/dist/chunks/debug-1.0.7-6kcgjwgp.mjs +0 -1
  721. package/dist/chunks/defaultActionDeps-1.0.7-5x2a3qnr.mjs +0 -1446
  722. package/dist/chunks/desktop-1.0.7-37m19pef.mjs +0 -1
  723. package/dist/chunks/detectRepository-1.0.7-3ffa7wfs.mjs +0 -1
  724. package/dist/chunks/detection-1.0.7-bcwz3kz9.mjs +0 -1
  725. package/dist/chunks/diff-1.0.7-60vwaapm.mjs +0 -1
  726. package/dist/chunks/doctor-1.0.7-bc3r1p04.mjs +0 -1
  727. package/dist/chunks/doctorDiagnostic-1.0.7-qe18rzqr.mjs +0 -1
  728. package/dist/chunks/earlyInput-1.0.7-51cxad4b.mjs +0 -1
  729. package/dist/chunks/effort-1.0.7-mckjwtdk.mjs +0 -10
  730. package/dist/chunks/engine-1.0.7-1kqhk6mc.mjs +0 -1
  731. package/dist/chunks/envLessBridgeConfig-1.0.7-hbpge4a8.mjs +0 -1
  732. package/dist/chunks/envUtils-1.0.7-m63cpkg3.mjs +0 -1
  733. package/dist/chunks/environmentSelection-1.0.7-kg2xnt7t.mjs +0 -1
  734. package/dist/chunks/environments-1.0.7-jcrcam7e.mjs +0 -1
  735. package/dist/chunks/errors-1.0.7-vhtw6kg6.mjs +0 -1
  736. package/dist/chunks/exampleCommands-1.0.7-f254y3tf.mjs +0 -1
  737. package/dist/chunks/exit-1.0.7-f5s73g22.mjs +0 -1
  738. package/dist/chunks/explorer-1.0.7-yjpphptq.mjs +0 -1
  739. package/dist/chunks/export-1.0.7-7kn40p9m.mjs +0 -2
  740. package/dist/chunks/extra-usage-1.0.7-xwb7xfe4.mjs +0 -1
  741. package/dist/chunks/extra-usage-noninteractive-1.0.7-0dpsjjh0.mjs +0 -1
  742. package/dist/chunks/fast-1.0.7-9eg9g1mf.mjs +0 -1
  743. package/dist/chunks/feedback-1.0.7-kkw4fdj8.mjs +0 -14
  744. package/dist/chunks/firstPartyEventLogger-1.0.7-yaekw6be.mjs +0 -1
  745. package/dist/chunks/git-1.0.7-t3824xkx.mjs +0 -1
  746. package/dist/chunks/githubModelsCredentials-1.0.7-m79e1ga1.mjs +0 -1
  747. package/dist/chunks/goal-1.0.7-jkmcdmm1.mjs +0 -4
  748. package/dist/chunks/grove-1.0.7-th5kn0n5.mjs +0 -1
  749. package/dist/chunks/growthbook-1.0.7-hnr2hv9t.mjs +0 -1
  750. package/dist/chunks/headless-1.0.7-2w17kqac.mjs +0 -2
  751. package/dist/chunks/heapdump-1.0.7-1qvsds14.mjs +0 -6
  752. package/dist/chunks/help-1.0.7-33ennxwb.mjs +0 -1
  753. package/dist/chunks/hookChains-1.0.7-8gt4r1qg.mjs +0 -3
  754. package/dist/chunks/hooks-1.0.7-970fsrks.mjs +0 -1
  755. package/dist/chunks/hooks-1.0.7-xyrevnk8.mjs +0 -79
  756. package/dist/chunks/ide-1.0.7-knfed9xe.mjs +0 -3
  757. package/dist/chunks/image-processor-napi-1.0.7-5c1fwxwf.mjs +0 -1
  758. package/dist/chunks/inboundAttachments-1.0.7-5p98j8m2.mjs +0 -1
  759. package/dist/chunks/index-1.0.7-0ce2q3me.mjs +0 -17
  760. package/dist/chunks/index-1.0.7-3tbze0ns.mjs +0 -1
  761. package/dist/chunks/index-1.0.7-3z09rqyx.mjs +0 -1
  762. package/dist/chunks/index-1.0.7-4g6596jt.mjs +0 -1
  763. package/dist/chunks/index-1.0.7-59cvfmen.mjs +0 -1
  764. package/dist/chunks/index-1.0.7-63vq5fws.mjs +0 -1
  765. package/dist/chunks/index-1.0.7-6wcbk6ve.mjs +0 -5
  766. package/dist/chunks/index-1.0.7-84wm5p43.mjs +0 -1
  767. package/dist/chunks/index-1.0.7-c0jfw97a.mjs +0 -9
  768. package/dist/chunks/index-1.0.7-dds9fcry.mjs +0 -1
  769. package/dist/chunks/index-1.0.7-ecq1qwpq.mjs +0 -1
  770. package/dist/chunks/index-1.0.7-gm6exxqq.mjs +0 -30
  771. package/dist/chunks/index-1.0.7-jh8savg9.mjs +0 -9
  772. package/dist/chunks/index-1.0.7-k8k38nbt.mjs +0 -1
  773. package/dist/chunks/index-1.0.7-kyyfrf6j.mjs +0 -1
  774. package/dist/chunks/index-1.0.7-m23r2bmv.mjs +0 -1
  775. package/dist/chunks/index-1.0.7-mmm10tac.mjs +0 -2
  776. package/dist/chunks/index-1.0.7-p82yhqst.mjs +0 -1
  777. package/dist/chunks/index-1.0.7-vyafwe23.mjs +0 -1
  778. package/dist/chunks/index-1.0.7-wazwyjm7.mjs +0 -1
  779. package/dist/chunks/index-1.0.7-wd33rv5q.mjs +0 -1
  780. package/dist/chunks/index-1.0.7-yhxty6kz.mjs +0 -1
  781. package/dist/chunks/index-1.0.7-zp3vs07b.mjs +0 -2
  782. package/dist/chunks/init-1.0.7-y29e6mb3.mjs +0 -1
  783. package/dist/chunks/initReplBridge-1.0.7-14rmpkte.mjs +0 -1
  784. package/dist/chunks/ink-1.0.7-gf3qdamf.mjs +0 -1
  785. package/dist/chunks/insights-1.0.7-hd6460mk.mjs +0 -870
  786. package/dist/chunks/install-1.0.7-antesxaa.mjs +0 -1
  787. package/dist/chunks/install-github-app-1.0.7-0asc4ajr.mjs +0 -149
  788. package/dist/chunks/install-slack-app-1.0.7-zwna6gq3.mjs +0 -1
  789. package/dist/chunks/instrumentation-1.0.7-wvv85h9t.mjs +0 -1
  790. package/dist/chunks/interactiveHelpers-1.0.7-pkmbfs0b.mjs +0 -1
  791. package/dist/chunks/keybindings-1.0.7-emp8m2vr.mjs +0 -2
  792. package/dist/chunks/knowledge-1.0.7-6hv6538k.mjs +0 -2
  793. package/dist/chunks/latestVersionCache-1.0.7-t1gtsxte.mjs +0 -1
  794. package/dist/chunks/loadAgentsDir-1.0.7-j5mq4f5x.mjs +0 -1
  795. package/dist/chunks/loadPluginHooks-1.0.7-6tbrq15z.mjs +0 -1
  796. package/dist/chunks/loadPluginHooks-1.0.7-k2zgqtye.mjs +0 -1
  797. package/dist/chunks/log-1.0.7-pmgzzdy7.mjs +0 -1
  798. package/dist/chunks/main-1.0.7-esamqda3.mjs +0 -1
  799. package/dist/chunks/managedEnv-1.0.7-6mz7vwyt.mjs +0 -1
  800. package/dist/chunks/mcp-1.0.7-d4941tnp.mjs +0 -17
  801. package/dist/chunks/mcp-1.0.7-hjjdsn53.mjs +0 -4
  802. package/dist/chunks/mcp-1.0.7-skfyfspe.mjs +0 -1
  803. package/dist/chunks/mcpb-1.0.7-twwnd1ct.mjs +0 -1
  804. package/dist/chunks/memory-1.0.7-0r8q4re7.mjs +0 -3
  805. package/dist/chunks/model-1.0.7-d82p81ne.mjs +0 -2
  806. package/dist/chunks/model-1.0.7-xt8c58fg.mjs +0 -1
  807. package/dist/chunks/node-1.0.7-5h6w60zy.mjs +0 -12
  808. package/dist/chunks/oauth-1.0.7-gveatjqe.mjs +0 -1
  809. package/dist/chunks/openaiShim-1.0.7-q8aqfz40.mjs +0 -14
  810. package/dist/chunks/output-style-1.0.7-xnamzpre.mjs +0 -1
  811. package/dist/chunks/package-ZZWOLTXM-1.0.7-y8bvx3y5.mjs +0 -1
  812. package/dist/chunks/parseConnectUrl-1.0.7-we9ebc0h.mjs +0 -1
  813. package/dist/chunks/parser-1.0.7-20zgf2mq.mjs +0 -1
  814. package/dist/chunks/passes-1.0.7-gcnj20c4.mjs +0 -1
  815. package/dist/chunks/permissions-1.0.7-43y27rj9.mjs +0 -3
  816. package/dist/chunks/permissions-1.0.7-kw8fw9gd.mjs +0 -1
  817. package/dist/chunks/plan-1.0.7-z1k9hfr8.mjs +0 -1
  818. package/dist/chunks/plist-1.0.7-daxqmwqx.mjs +0 -1
  819. package/dist/chunks/plugin-1.0.7-66bqymg3.mjs +0 -29
  820. package/dist/chunks/pluginStartupCheck-1.0.7-w5krqm0w.mjs +0 -1
  821. package/dist/chunks/plugins-1.0.7-8njx3c0z.mjs +0 -9
  822. package/dist/chunks/preActionHook-1.0.7-a1hhphah.mjs +0 -2
  823. package/dist/chunks/print-1.0.7-xnncgmye.mjs +0 -57
  824. package/dist/chunks/privacy-settings-1.0.7-7gfaexn9.mjs +0 -1
  825. package/dist/chunks/process-1.0.7-9sx5xgpe.mjs +0 -1
  826. package/dist/chunks/processBashCommand-1.0.7-32dm20nc.mjs +0 -1
  827. package/dist/chunks/processSlashCommand-1.0.7-am0rnn44.mjs +0 -9
  828. package/dist/chunks/prompt-1.0.7-0yt5k7pt.mjs +0 -1
  829. package/dist/chunks/prompt-1.0.7-hfv56awc.mjs +0 -1
  830. package/dist/chunks/prompts-1.0.7-1p5km2m0.mjs +0 -1
  831. package/dist/chunks/protocolHandler-1.0.7-geqttcpz.mjs +0 -13
  832. package/dist/chunks/provider-1.0.7-y0j7q32j.mjs +0 -2
  833. package/dist/chunks/providerProfiles-1.0.7-s0zs9q1r.mjs +0 -1
  834. package/dist/chunks/providerValidation-1.0.7-aexhx4ft.mjs +0 -6
  835. package/dist/chunks/rate-limit-options-1.0.7-r4b2s2hk.mjs +0 -1
  836. package/dist/chunks/registerSubcommands-1.0.7-qmvr4jj4.mjs +0 -34
  837. package/dist/chunks/registry-1.0.7-be1gn584.mjs +0 -1
  838. package/dist/chunks/release-notes-1.0.7-tcr3xzz7.mjs +0 -5
  839. package/dist/chunks/reload-plugins-1.0.7-psfk2m91.mjs +0 -2
  840. package/dist/chunks/remote-env-1.0.7-xn5b9vx7.mjs +0 -1
  841. package/dist/chunks/remoteBridgeCore-1.0.7-hvnh9bv2.mjs +0 -1
  842. package/dist/chunks/remoteSession-1.0.7-870w4tbq.mjs +0 -1
  843. package/dist/chunks/rename-1.0.7-53emj8yj.mjs +0 -1
  844. package/dist/chunks/replBridgeHandle-1.0.7-cbrh6d8b.mjs +0 -1
  845. package/dist/chunks/replLauncher-1.0.7-zs2c9f7n.mjs +0 -1
  846. package/dist/chunks/resume-1.0.7-b5e8840g.mjs +0 -2
  847. package/dist/chunks/rewind-1.0.7-15a43rp5.mjs +0 -1
  848. package/dist/chunks/rootOptions-1.0.7-84t0zbkm.mjs +0 -1
  849. package/dist/chunks/sandbox-adapter-1.0.7-rs0gse4a.mjs +0 -1
  850. package/dist/chunks/sandbox-toggle-1.0.7-benxjznf.mjs +0 -1
  851. package/dist/chunks/session-1.0.7-9kyk2x4p.mjs +0 -2
  852. package/dist/chunks/sessionDiscovery-1.0.7-3z1nttw5.mjs +0 -1
  853. package/dist/chunks/sessionFileAccessHooks-1.0.7-wha0618t.mjs +0 -1
  854. package/dist/chunks/sessionStorage-1.0.7-tdsf7h6t.mjs +0 -1
  855. package/dist/chunks/settings-1.0.7-ew9b4r78.mjs +0 -1
  856. package/dist/chunks/setup-1.0.7-tnm7hbmj.mjs +0 -5
  857. package/dist/chunks/sinks-1.0.7-bw23nvqf.mjs +0 -1
  858. package/dist/chunks/skills-1.0.7-z5a8v4xg.mjs +0 -1
  859. package/dist/chunks/startupProfiler-1.0.7-fqfzm5cc.mjs +0 -1
  860. package/dist/chunks/startupUpdateCheck-1.0.7-enpb315n.mjs +0 -1
  861. package/dist/chunks/state-1.0.7-anf50tyt.mjs +0 -1
  862. package/dist/chunks/stats-1.0.7-xgb8h40k.mjs +0 -6
  863. package/dist/chunks/status-1.0.7-f7s47750.mjs +0 -1
  864. package/dist/chunks/stickers-1.0.7-z1wec6v6.mjs +0 -1
  865. package/dist/chunks/subprocessEnv-1.0.7-838hrdpy.mjs +0 -1
  866. package/dist/chunks/tasks-1.0.7-gnsbny7t.mjs +0 -1
  867. package/dist/chunks/teamHelpers-1.0.7-b952rdkv.mjs +0 -1
  868. package/dist/chunks/teammateModeSnapshot-1.0.7-kp8hzkhr.mjs +0 -1
  869. package/dist/chunks/teleport-1.0.7-0z0g10ms.mjs +0 -1
  870. package/dist/chunks/terminalSetup-1.0.7-fgc3myw4.mjs +0 -1
  871. package/dist/chunks/theme-1.0.7-a88j7tjj.mjs +0 -1
  872. package/dist/chunks/thinkback-1.0.7-yzkgrf3q.mjs +0 -1
  873. package/dist/chunks/thinkback-play-1.0.7-jz896tvv.mjs +0 -1
  874. package/dist/chunks/toolPool-1.0.7-zc6vp20v.mjs +0 -1
  875. package/dist/chunks/toolSearch-1.0.7-ym8fk2b2.mjs +0 -1
  876. package/dist/chunks/tools-1.0.7-612s0tqy.mjs +0 -1
  877. package/dist/chunks/trustedDevice-1.0.7-vjbr81qz.mjs +0 -1
  878. package/dist/chunks/turndown.cjs-1.0.7-gz5y243z.mjs +0 -69
  879. package/dist/chunks/types-1.0.7-16q04281.mjs +0 -1
  880. package/dist/chunks/ultrareviewCommand-1.0.7-v65pd88x.mjs +0 -4
  881. package/dist/chunks/update-1.0.7-z4et749c.mjs +0 -88
  882. package/dist/chunks/upgrade-1.0.7-hbdmpet7.mjs +0 -1
  883. package/dist/chunks/upload-1.0.7-xgyk75yh.mjs +0 -7
  884. package/dist/chunks/upstreamproxy-1.0.7-vb939aaw.mjs +0 -14
  885. package/dist/chunks/url-handler-napi-1.0.7-nfw64r47.mjs +0 -1
  886. package/dist/chunks/usage-1.0.7-kpakcv0m.mjs +0 -1
  887. package/dist/chunks/util-1.0.7-52gcb8n1.mjs +0 -1
  888. package/dist/chunks/utils-1.0.7-ckre2ymb.mjs +0 -1
  889. package/dist/chunks/vim-1.0.7-10bew4qn.mjs +0 -1
  890. package/dist/chunks/watcher-1.0.7-85c73j65.mjs +0 -1
  891. package/dist/chunks/wiki-1.0.7-yw93y8cn.mjs +0 -132
  892. package/dist/chunks/workflows-1.0.7-yatxf71n.mjs +0 -1
  893. package/dist/chunks/worktree-1.0.7-dp2np4vz.mjs +0 -1
  894. package/dist/chunks/worktreeModeEnabled-1.0.7-m222ja7h.mjs +0 -1
  895. package/dist/chunks/wrapper-1.0.7-sqtjm0k7.mjs +0 -7
  896. /package/dist/chunks/{cli-1.0.7-bc3sxk1j.mjs → cli-1.0.8-2tcfa3h7.mjs} +0 -0
  897. /package/dist/chunks/{cli-1.0.7-mcmpb4cd.mjs → cli-1.0.8-9fsgsfsr.mjs} +0 -0
  898. /package/dist/chunks/{cli-1.0.7-y94dd4yd.mjs → cli-1.0.8-by017547.mjs} +0 -0
  899. /package/dist/chunks/{cli-1.0.7-5qss5m61.mjs → cli-1.0.8-cnp4f1p9.mjs} +0 -0
  900. /package/dist/chunks/{cli-1.0.7-3qnpcgyc.mjs → cli-1.0.8-kxhxnt9t.mjs} +0 -0
  901. /package/dist/chunks/{cli-1.0.7-6rt1agkh.mjs → cli-1.0.8-p2tp1j0a.mjs} +0 -0
  902. /package/dist/chunks/{cli-1.0.7-d3txxwh5.mjs → cli-1.0.8-t5jg9csm.mjs} +0 -0
  903. /package/dist/chunks/{cli-1.0.7-pscxy55m.mjs → cli-1.0.8-wm0h5bqt.mjs} +0 -0
@@ -0,0 +1,16 @@
1
+ import{n8 as P2,p8 as x8}from"./cli-1.0.8-abdc5b5p.mjs";import{r8 as h,s8 as mZ}from"./cli-1.0.8-9y02shjc.mjs";import{D8 as d5,F8 as w8}from"./cli-1.0.8-fch83jc9.mjs";import{D9 as R0,E9 as G1,Gea as V4,Haa as s1,Ida as d,Iea as $4,Ifa as N,Lca as P,Lea as b2,Mea as tZ,Nca as j2,Nda as p5,O9 as D5,Oda as C,Qca as Q0,Qfa as a0,R9 as cZ,Rca as M,Rda as K,Xda as r1,Yaa as VZ,_ca as B0,c_ as N5,e_ as dZ,fca as o1,hda as n4,ifa as m5,jda as nZ,kda as I1,kea as l,kfa as W4,lda as h8,mea as e1,nea as zZ,oca as WZ,qfa as c5,rea as Z4,s9 as T4,t9 as a,taa as y1,tfa as L,u9 as K2,uaa as A8,v9 as b0,w9 as M4,wfa as $0,x9 as a2}from"./cli-1.0.8-ke76gxzw.mjs";import{Qga as A0,Sga as P4,aha as v1}from"./cli-1.0.8-a5h5dhvb.mjs";import{eia as I5,fia as d4,gia as j0,iia as z8,jia as G8,lia as b,mia as M0}from"./cli-1.0.8-2yyas23w.mjs";import{nia as x,qia as B2}from"./cli-1.0.8-gmf61bcb.mjs";import{Wia as L5,_ia as pZ,cja as l2,gja as y8,qja as z,sja as d0,tja as Z0}from"./cli-1.0.8-z96bbp08.mjs";import{Qja as p,Sja as q1,Xja as V1}from"./cli-1.0.8-0w29g9sk.mjs";import{_ja as K5,bka as F,dka as u,fka as k2,ika as c4,lka as g}from"./cli-1.0.8-swts6q29.mjs";import{Ena as f,Lna as _1,Nla as Y0,Ola as w1,Oma as p1,Opa as J0,ana as a1,aoa as J1,boa as Q1,coa as X1,doa as Y1,ena as k4,jna as I0,kna as J2,poa as x2}from"./cli-1.0.8-c1m2f995.mjs";import{lqa as I,mqa as i0}from"./cli-1.0.8-3cz8c904.mjs";import{Iqa as k,_qa as q2}from"./cli-1.0.8-zjckzq5j.mjs";import{ura as y0,wra as c2,xra as R,yra as e}from"./cli-1.0.8-by017547.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.8-tnpscb0d.mjs")).NodeHttpHandler,httpAuthSchemes:[{schemeId:"smithy.api#noAuth",identityProvider:()=>async()=>({}),signer:new(await import("./index-1.0.8-pzn6kwcz.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.8-tnpscb0d.mjs")).NodeHttpHandler,httpAuthSchemes:[{schemeId:"smithy.api#noAuth",identityProvider:()=>async()=>({}),signer:new(await import("./index-1.0.8-pzn6kwcz.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 Q3,FQ as R3,C4 as S3,T5 as T3,M5 as U3,g$ as V3,p$ as W3,B8 as X3,R8 as Y3,m$ as Z3,h5 as _3,s0 as $3,o0 as a4,G0 as b4,u2 as c4,n2 as d4,U8 as e4,v0 as f4,W as g4,ZJ as h4,$J as i4,JJ as j4,QJ as k4,i as l4,j as m4,BJ as n4,Y2 as o4,FJ as p4,KJ as q4,o5 as r4,UJ as s4,bJ as t4,Z1 as u4,yJ as v4,H0 as w4,t2 as x4,k0 as y4,I$ as z4,G7 as A4,x7 as B4,t4 as C4,B7 as D4,j7 as E4,m0 as F4,T$ as G4,H7 as H4,R7 as I4,W8 as J4,l4 as K4,fJ as L4,C8 as M4,$1 as N4,z1 as O4,z2 as P4,B1 as Q4,dJ as R4,R1 as S4,S as T4,F1 as U4,S0 as V4,L1 as W4,D1 as X4,iJ as Y4,aJ as Z4,b1 as _4,sJ as $4,oJ as a5,O1 as b5,rJ as c5,eJ as d5,Z3 as e5,e2 as f5,A as g5,T1 as h5,u8 as i5,F3 as j5,K3 as k5,L3 as l5,M1 as m5,D3 as n5,N3 as o5,g8 as p5,U3 as q5,b3 as r5,O3 as s5,k3 as t5,P3 as u5,c8 as v5,E3 as w5,_3 as x5,v3 as y5,y3 as z5,h1 as A5,K0 as B5,t8 as C5,i8 as D5,a8 as E5,Q5 as F5,JZ as G5,h3 as H5,m1 as I5,c1 as J5,QZ as K5,X5 as L5,t1 as M5,l1 as N5,W9 as O5,z9 as P5,Y5 as Q5,G9 as R5,GZ as S5,N0 as T5,u0 as U5,J4 as V5,x9 as W5,h0 as X5,Q4 as Y5,D as Z5,U as _5,xZ as $5,B9 as a6,i1 as b6,f0 as c6,j9 as d6,X4 as e6,Y4 as f6,H9 as g6,T as h6,R9 as i6,HZ as j6,w9 as k6,F9 as l6,K9 as m6,L9 as n6,F0 as o6,N9 as p6,q4 as q6,B4 as r6,OZ as s6,H4 as t6,f9 as u6,u9 as v6,g9 as w6,V0 as x6,s as y6,p9 as z6,TZ as A6,m9 as B6,c9 as C6,V5 as D6,N4 as E6,U4 as F6,VQ as G6,hZ as H6,WQ as I6,zQ as J6,O4 as K6,GQ as L6,_4 as M6,fZ as N6,xQ as O6,v4 as P6,y4 as Q6,H5 as R6,A4 as S6,DQ as T6,f4 as U6,u4 as V6,P0 as W6,T0 as X6,X0 as Y6,oZ as Z6,n0 as _6,o as $6,b5 as a7,k5 as b7,s4 as c7,rZ as d7,o4 as e7,w5 as f7,Z$ as g7,$$ as h7,r4 as i7,z0 as j7,q$ as k7,E5 as l7,e4 as m7,Z8 as n7,_5 as o7,x$ as p7,B$ as q7,j$ as r7,O2 as s7,v5 as t7,R$ as u7,w$ as v7,J8 as w7,w as x7,y5 as y7,J5 as z7,c0 as A7,t0 as B7,O as C7,q0 as D7,L$ as E7,N2 as F7,D$ as G7,N$ as H7,v as I7,R2 as J7,U$ as K7,w2 as L7,b$ as M7,W5 as N7,Q8 as O7,X8 as P7,U2 as Q7,q8 as R7,k$ as S7,E$ as T7,_$ as U7,v$ as V7,y$ as W7,n as X7};
@@ -0,0 +1,2 @@
1
+ import{KM as Q,LM as $}from"./cli-1.0.8-ykwgcdbt.mjs";import{Ala as W,Bla as E,yka as V,zka as P}from"./cli-1.0.8-c1m2f995.mjs";import{xra as L}from"./cli-1.0.8-by017547.mjs";function Z(x,q,D,G){var H=-1,J=x==null?0:x.length;while(++H<J){var K=x[H];q(G,K,D(K),x)}return G}var M;var N=L(()=>{M=Z});function B(x,q,D,G){return Q(x,function(H,J,K){q(G,H,D(H),K)}),G}var S;var U=L(()=>{$();S=B});function I(x,q){return function(D,G){var H=V(D)?M:S,J=q?q():{};return H(D,x,W(G,2),J)}}var X;var Y=L(()=>{N();U();E();P();X=I});var R,v;var C=L(()=>{Y();R=X(function(x,q,D){x[D?0:1].push(q)},function(){return[[],[]]}),v=R});
2
+ export{v as fd,C as gd};
@@ -0,0 +1,2 @@
1
+ import{lqa as M,mqa as Y}from"./cli-1.0.8-3cz8c904.mjs";import{xra as W}from"./cli-1.0.8-by017547.mjs";import{homedir as Z}from"os";import{join as Q}from"path";function $(q){if(q?.configDirEnv)return q.configDirEnv.normalize("NFC");let B=q?.homeDir??Z();return Q(B,".claudin").normalize("NFC")}function N(){return process.env.CLAUDIN_CONFIG_DIR}function _(){return Q(X(),"teams")}function j(q){let B=process.env.NODE_OPTIONS;if(!B)return!1;return B.split(/\s+/).includes(q)}function U(q){if(!q)return!1;if(typeof q==="boolean")return q;let B=q.toLowerCase().trim();return["1","true","yes","on"].includes(B)}function I(q){if(q===void 0)return!1;if(typeof q==="boolean")return!q;if(!q)return!1;let B=q.toLowerCase().trim();return["0","false","no","off"].includes(B)}function S(){return U(process.env.CLAUDE_CODE_SIMPLE)||process.argv.includes("--bare")}function T(q){let B={};if(q)for(let F of q){let[J,...K]=F.split("=");if(!J||K.length===0)throw Error(`Invalid environment variable format: ${F}, environment variables should be added as: -e KEY1=value1 -e KEY2=value2`);B[J]=K.join("=")}return B}function c(){return process.env.AWS_REGION||process.env.AWS_DEFAULT_REGION||"us-east-1"}function L(){return process.env.CLOUD_ML_REGION||"us-east5"}function w(){return U(process.env.CLAUDE_BASH_MAINTAIN_PROJECT_WORKING_DIR)}function z(){return!1}function O(){return!1}function x(q){if(q){let B=b.find(([F])=>q.startsWith(F));if(B)return process.env[B[1]]||L()}return L()}var X,b;var k=W(()=>{Y();X=M(()=>$({configDirEnv:N()}),()=>process.env.CLAUDIN_CONFIG_DIR??"");b=[["claude-haiku-4-5","VERTEX_REGION_CLAUDE_HAIKU_4_5"],["claude-3-5-haiku","VERTEX_REGION_CLAUDE_3_5_HAIKU"],["claude-3-5-sonnet","VERTEX_REGION_CLAUDE_3_5_SONNET"],["claude-3-7-sonnet","VERTEX_REGION_CLAUDE_3_7_SONNET"],["claude-opus-4-7","VERTEX_REGION_CLAUDE_4_7_OPUS"],["claude-opus-4-6","VERTEX_REGION_CLAUDE_4_6_OPUS"],["claude-opus-4-1","VERTEX_REGION_CLAUDE_4_1_OPUS"],["claude-opus-4","VERTEX_REGION_CLAUDE_4_0_OPUS"],["claude-sonnet-4-6","VERTEX_REGION_CLAUDE_4_6_SONNET"],["claude-sonnet-4-5","VERTEX_REGION_CLAUDE_4_5_SONNET"],["claude-sonnet-4","VERTEX_REGION_CLAUDE_4_0_SONNET"]]});
2
+ export{$ as Yja,N as Zja,X as _ja,_ as $ja,j as aka,U as bka,I as cka,S as dka,T as eka,c as fka,L as gka,w as hka,z as ika,O as jka,x as kka,k as lka};
@@ -0,0 +1,2 @@
1
+ import{H4 as j,K4 as I,R6 as b,S6 as c,X7 as d,x7 as f}from"./cli-1.0.8-sqbaxhfc.mjs";import{o9 as F,p9 as D}from"./cli-1.0.8-hgreyqck.mjs";import{Ifa as y,Qfa as T}from"./cli-1.0.8-ke76gxzw.mjs";import{uha as $,vha as R,wha as _,xha as E}from"./cli-1.0.8-74zbkhyt.mjs";import{lia as q,mia as m}from"./cli-1.0.8-2yyas23w.mjs";import{Via as M,_ia as U,qja as W,tja as z}from"./cli-1.0.8-z96bbp08.mjs";import{Pja as k,Qja as Y,Xja as O}from"./cli-1.0.8-0w29g9sk.mjs";import{Iqa as X,_qa as h}from"./cli-1.0.8-zjckzq5j.mjs";import{xra as A}from"./cli-1.0.8-by017547.mjs";import{randomUUID as l}from"crypto";function p(J){if(!X.isAxiosError(J))return!1;if(!J.response)return!0;if(J.response.status>=500)return!0;return!1}async function u(J,B){let N;for(let K=0;K<=x;K++)try{return await X.get(J,B)}catch(Q){if(N=Q,!p(Q))throw Q;if(K>=x)throw W(`Teleport request failed after ${K+1} attempts: ${Y(Q)}`),Q;let V=S[K]??2000;W(`Teleport request failed (attempt ${K+1}/${x+1}), retrying in ${V}ms: ${Y(Q)}`),await b(V)}throw N}async function C(){let J=f()?.accessToken;if(J===void 0)throw Error("Claude Code web sessions require authentication with a Claude.ai account. API key authentication is not sufficient. Please run /login to authenticate, or check your authentication status with /status.");let B=await j();if(!B)throw Error("Unable to get organization UUID");return{accessToken:J,orgUUID:B}}async function NJ(){let{accessToken:J,orgUUID:B}=await C(),N=`${q().BASE_API_URL}/v1/sessions`;try{let K={...L(J),"anthropic-beta":"ccr-byoc-2025-07-29","x-organization-uuid":B},Q=await u(N,{headers:K});if(Q.status!==200)throw Error(`Failed to fetch code sessions: ${Q.statusText}`);return Q.data.data.map((Z)=>{let v=Z.session_context.sources.find((G)=>G.type==="git_repository"),H=null;if(v?.url){let G=F(v.url);if(G){let[w,P]=G.split("/");if(w&&P)H={name:P,owner:{login:w},default_branch:v.revision||void 0}}}return{id:Z.id,title:Z.title||"Untitled",description:"",status:Z.session_status,repo:H,turns:[],created_at:Z.created_at,updated_at:Z.updated_at}})}catch(K){let Q=k(K);throw y(Q),K}}function L(J){return{Authorization:`Bearer ${J}`,"Content-Type":"application/json","anthropic-version":"2023-06-01"}}async function WJ(J){let{accessToken:B,orgUUID:N}=await C(),K=`${q().BASE_API_URL}/v1/sessions/${J}`,Q={...L(B),"anthropic-beta":"ccr-byoc-2025-07-29","x-organization-uuid":N},V=await X.get(K,{headers:Q,timeout:15000,validateStatus:(Z)=>Z<500});if(V.status!==200){let v=V.data?.error?.message;if(V.status===404)throw Error(`Session not found: ${J}`);if(V.status===401)throw Error("Session expired. Please run /login to sign in again.");throw Error(v||`Failed to fetch session: ${V.status} ${V.statusText}`)}return V.data}function GJ(J){return J.session_context.outcomes?.find((N)=>N.type==="git_repository")?.git_info?.branches[0]}async function vJ(J,B,N){try{let{accessToken:K,orgUUID:Q}=await C(),V=`${q().BASE_API_URL}/v1/sessions/${J}/events`,Z={...L(K),"anthropic-beta":"ccr-byoc-2025-07-29","x-organization-uuid":Q},H={events:[{uuid:N?.uuid??l(),session_id:J,type:"user",parent_tool_use_id:null,message:{role:"user",content:B}}]};W(`[sendEventToRemoteSession] Sending event to session ${J}`);let G=await X.post(V,H,{headers:Z,validateStatus:(w)=>w<500,timeout:30000});if(G.status===200||G.status===201)return W(`[sendEventToRemoteSession] Successfully sent event to session ${J}`),!0;return W(`[sendEventToRemoteSession] Failed with status ${G.status}: ${M(G.data)}`),!1}catch(K){return W(`[sendEventToRemoteSession] Error: ${Y(K)}`),!1}}async function XJ(J,B){try{let{accessToken:N,orgUUID:K}=await C(),Q=`${q().BASE_API_URL}/v1/sessions/${J}`,V={...L(N),"anthropic-beta":"ccr-byoc-2025-07-29","x-organization-uuid":K};W(`[updateSessionTitle] Updating title for session ${J}: "${B}"`);let Z=await X.patch(Q,{title:B},{headers:V,validateStatus:(v)=>v<500});if(Z.status===200)return W(`[updateSessionTitle] Successfully updated title for session ${J}`),!0;return W(`[updateSessionTitle] Failed with status ${Z.status}: ${M(Z.data)}`),!1}catch(N){return W(`[updateSessionTitle] Error: ${Y(N)}`),!1}}var S,x,$J="ccr-byoc-2025-07-29",BJ;var g=A(()=>{h();m();I();R();d();z();D();O();E();T();c();U();S=[2000,4000,8000,16000],x=S.length;BJ=_(()=>$.object({id:$.string(),title:$.string(),description:$.string(),status:$.enum(["idle","working","waiting","completed","archived","cancelled","rejected"]),repo:$.object({name:$.string(),owner:$.object({login:$.string()}),default_branch:$.string().optional()}).nullable(),turns:$.array($.string()),created_at:$.string(),updated_at:$.string()}))});
2
+ export{$J as B3,p as C3,u as D3,BJ as E3,C as F3,NJ as G3,L as H3,WJ as I3,GJ as J3,vJ as K3,XJ as L3,g as M3};
@@ -0,0 +1,3 @@
1
+ import{BH as v,CH as Bf,Ck as m,Cl as c,Dk as pf,MF as S,NF as zf,Nl as N,Ql as d,Rl as M,SS as Hf,TS as If,Wn as l,Xl as Of,Xn as $f,YB as X,ZB as qf,im as V,lR as r,nR as Zf,nm as Yf}from"./cli-1.0.8-ykwgcdbt.mjs";import{bU as u,cU as Kf}from"./cli-1.0.8-kzrdbzd1.mjs";import{H0 as Af,HY as Jf,a0 as D,c0 as T}from"./cli-1.0.8-qss5sph3.mjs";import{o3 as A,p3 as R,q3 as L}from"./cli-1.0.8-qzqze1a1.mjs";import{r3 as _f}from"./cli-1.0.8-rna8rhza.mjs";import{P9 as W,R9 as yf}from"./cli-1.0.8-ke76gxzw.mjs";import{nia as F,qia as ff}from"./cli-1.0.8-gmf61bcb.mjs";import{qja as b,tja as Gf}from"./cli-1.0.8-z96bbp08.mjs";import{tra as g,ura as e,xra as k}from"./cli-1.0.8-by017547.mjs";function E(){(If(),e(Hf)).saveWorktreeState(null),m()}function a({onDone:J,onCancel:O}){let[Y,y]=$.useState("loading"),[p,H]=$.useState([]),[G,q]=$.useState(0),[Z,_]=$.useState(),f=c();if($.useEffect(()=>{async function z(){let I=[],B=await W("git",["status","--porcelain"]);if(B.stdout)I=B.stdout.split(`
2
+ `).filter((Q)=>Q.trim()!==""),H(I);if(f){let{stdout:Q}=await W("git",["rev-list","--count",`${f.originalHeadCommit}..HEAD`]),w=parseInt(Q.trim())||0;if(q(w),I.length===0&&w===0){y("removing"),M().then(()=>{process.chdir(f.originalCwd),X(f.originalCwd),V.cache.clear?.(),_("Worktree removed (no changes)")}).catch((s)=>{b(`Failed to clean up worktree: ${s}`,{level:"error"}),_("Worktree cleanup failed, exiting anyway")}).finally(()=>{E()}).then(()=>{y("done")});return}else y("asking")}}z()},[f]),$.useEffect(()=>{if(Y==="done")J(Z)},[Y,J,Z]),!f)return J("No active worktree session found",{display:"system"}),null;if(Y==="loading"||Y==="done")return null;async function j(z){if(!f)return;let I=Boolean(f.tmuxSessionName);if(z==="keep"||z==="keep-with-tmux"){y("keeping"),F("tengu_worktree_kept",{commits:G,changed_files:p.length}),await d();try{process.chdir(f.originalCwd),X(f.originalCwd)}finally{E()}if(V.cache.clear?.(),I)_(`Worktree kept. Your work is saved at ${f.worktreePath} on branch ${f.worktreeBranch}. Reattach to tmux session with: tmux attach -t ${f.tmuxSessionName}`);else _(`Worktree kept. Your work is saved at ${f.worktreePath} on branch ${f.worktreeBranch}`);y("done")}else if(z==="keep-kill-tmux"){if(y("keeping"),F("tengu_worktree_kept",{commits:G,changed_files:p.length}),f.tmuxSessionName)await N(f.tmuxSessionName);await d();try{process.chdir(f.originalCwd),X(f.originalCwd)}finally{E()}V.cache.clear?.(),_(`Worktree kept at ${f.worktreePath} on branch ${f.worktreeBranch}. Tmux session terminated.`),y("done")}else if(z==="remove"||z==="remove-with-tmux"){if(y("removing"),F("tengu_worktree_removed",{commits:G,changed_files:p.length}),f.tmuxSessionName)await N(f.tmuxSessionName);try{await M(),process.chdir(f.originalCwd),X(f.originalCwd),V.cache.clear?.()}catch(Q){b(`Failed to clean up worktree: ${Q}`,{level:"error"}),_("Worktree cleanup failed, exiting anyway"),y("done");return}finally{E()}let B=I?" Tmux session terminated.":"";if(G>0&&p.length>0)_(`Worktree removed. ${G} ${G===1?"commit":"commits"} and uncommitted changes were discarded.${B}`);else if(G>0)_(`Worktree removed. ${G} ${G===1?"commit":"commits"} on ${f.worktreeBranch} ${G===1?"was":"were"} discarded.${B}`);else if(p.length>0)_(`Worktree removed. Uncommitted changes were discarded.${B}`);else _(`Worktree removed.${B}`);y("done")}}if(Y==="keeping")return R(D,{flexDirection:"row",marginY:1,children:[A(v,{}),A(T,{children:"Keeping worktree…"})]});if(Y==="removing")return R(D,{flexDirection:"row",marginY:1,children:[A(v,{}),A(T,{children:"Removing worktree…"})]});let x=f.worktreeBranch,P=p.length>0,U=G>0,K="";if(P&&U)K=`You have ${p.length} uncommitted ${p.length===1?"file":"files"} and ${G} ${G===1?"commit":"commits"} on ${x}. All will be lost if you remove.`;else if(P)K=`You have ${p.length} uncommitted ${p.length===1?"file":"files"}. These will be lost if you remove the worktree.`;else if(U)K=`You have ${G} ${G===1?"commit":"commits"} on ${x}. The branch will be deleted if you remove the worktree.`;else K="You are working in a worktree. Keep it to continue working there, or remove it to clean up.";function o(){if(O){O();return}j("keep")}let h=P||U?"All changes and commits will be lost.":"Clean up the worktree directory.",C=Boolean(f.tmuxSessionName),t=C?[{label:"Keep worktree and tmux session",value:"keep-with-tmux",description:`Stays at ${f.worktreePath}. Reattach with: tmux attach -t ${f.tmuxSessionName}`},{label:"Keep worktree, kill tmux session",value:"keep-kill-tmux",description:`Keeps worktree at ${f.worktreePath}, terminates tmux session.`},{label:"Remove worktree and tmux session",value:"remove-with-tmux",description:h}]:[{label:"Keep worktree",value:"keep",description:`Stays at ${f.worktreePath}`},{label:"Remove worktree",value:"remove",description:h}];return A(l,{title:"Exiting worktree session",subtitle:K,onCancel:o,children:A(S,{defaultFocusValue:C?"keep-with-tmux":"keep",options:t,onChange:j})})}var $;var i=k(()=>{ff();Gf();Af();yf();Yf();pf();qf();Of();zf();$f();Bf();L();$=g(_f(),1)});function Vf(){return u(Qf)??"Goodbye!"}function wf(J){let O=n.c(5),{showWorktree:Y,onDone:y,onCancel:p}=J,H;if(O[0]!==y)H=async function(Z){y(Z??Vf()),await r(0,"prompt_input_exit")},O[0]=y,O[1]=H;else H=O[1];let G=H;if(Y){let q;if(O[2]!==p||O[3]!==G)q=A(a,{onDone:G,onCancel:p}),O[2]=p,O[3]=G,O[4]=q;else q=O[4];return q}return null}var n,Qf;var Xf=k(()=>{Kf();Zf();i();L();n=g(Jf(),1),Qf=["Goodbye!","See ya!","Bye!","Catch you later!"]});
3
+ export{wf as kc,Xf as lc};
@@ -0,0 +1,2 @@
1
+ import{G2 as y,K2 as V}from"./cli-1.0.8-w6atgaqw.mjs";import{Baa as Q,P9 as p,R9 as K,zaa as q}from"./cli-1.0.8-ke76gxzw.mjs";import{xra as J}from"./cli-1.0.8-by017547.mjs";function j(){return!!z}async function D(){if(b!==null)return b;return b=!!z,b}function P(){return W||null}async function w(){return(await p(y,["-V"])).code===0}function E(){if(f!==null)return f;let k=process.env.TERM_PROGRAM,B=!!process.env.ITERM_SESSION_ID,H=q.terminal==="iTerm.app";return f=k==="iTerm.app"||B||H,f}async function F(){return(await p(Y,["session","list"])).code===0}function G(){b=null,f=null}var z,W,b=null,f=null,Y="it2";var Z=J(()=>{Q();K();V();z=process.env.TMUX,W=process.env.TMUX_PANE});
2
+ export{j as u2,D as v2,P as w2,w as x2,E as y2,Y as z2,F as A2,G as B2,Z as C2};
@@ -0,0 +1,2 @@
1
+ import{_q as _,nT as z}from"./cli-1.0.8-ykwgcdbt.mjs";import{A3 as f}from"./cli-1.0.8-7tm0v9g4.mjs";import{S6 as k,X7 as A,l4 as K}from"./cli-1.0.8-sqbaxhfc.mjs";import{N9 as L,N_ as T,_ca as v,kea as x,oaa as W}from"./cli-1.0.8-ke76gxzw.mjs";import{aha as H}from"./cli-1.0.8-a5h5dhvb.mjs";import{tha as b,vha as Q,wha as q,xha as V}from"./cli-1.0.8-74zbkhyt.mjs";import{mia as w}from"./cli-1.0.8-2yyas23w.mjs";import{qia as O}from"./cli-1.0.8-gmf61bcb.mjs";import{Xja as U}from"./cli-1.0.8-0w29g9sk.mjs";import{Mla as X,Opa as B}from"./cli-1.0.8-c1m2f995.mjs";import{xra as G}from"./cli-1.0.8-by017547.mjs";var Z,$;var J=G(()=>{Q();V();Z=q(()=>b.object({entries:b.record(b.string(),b.string())})),$=q(()=>b.object({userId:b.string(),version:b.number(),lastModified:b.string(),checksum:b.string(),content:Z()}))});var Y=G(()=>{B();w();A();z();x();L();U();T();K();W();v();X();k();f();H();O();_();J()});
2
+ export{Y as Bd};
@@ -0,0 +1,2 @@
1
+ import{Ib as W,Jb as z}from"./cli-1.0.8-3vh4nftm.mjs";import{Ob as R}from"./cli-1.0.8-xhz9dm09.mjs";import{OV as M,PV as w}from"./cli-1.0.8-sbf6n56q.mjs";import{qja as L,tja as j}from"./cli-1.0.8-z96bbp08.mjs";import{Qja as Z,Xja as H}from"./cli-1.0.8-0w29g9sk.mjs";j();H();w();function I(B){return{write:(G)=>B.write(G),writeBatch:(G)=>B.writeBatch(G),close:()=>B.close(),isConnectedStatus:()=>B.isConnectedStatus(),getStateLabel:()=>B.getStateLabel(),setOnData:(G)=>B.setOnData(G),setOnClose:(G)=>B.setOnClose(G),setOnConnect:(G)=>B.setOnConnect(G),connect:()=>void B.connect(),getLastSequenceNum:()=>0,get droppedBatchCount(){return B.droppedBatchCount},reportState:()=>{},reportMetadata:()=>{},reportDelivery:()=>{},flush:()=>Promise.resolve()}}async function k(B){let{sessionUrl:G,ingressToken:_,sessionId:$,initialSequenceNum:E,getAuthToken:N}=B,P;if(N)P=()=>{let x=N();if(!x)return{};return{Authorization:`Bearer ${x}`}};else M(_);let Q=B.epoch??await R(G,_);L(`[bridge:repl] CCR v2: worker sessionId=${$} epoch=${Q}${B.epoch!==void 0?" (from /bridge)":" (via registerWorker)"}`);let V=new URL(G);V.pathname=V.pathname.replace(/\/$/,"")+"/worker/events/stream";let K=new z(V,{},$,void 0,E,P),X,J=new W(K,new URL(G),{getAuthHeaders:P,heartbeatIntervalMs:B.heartbeatIntervalMs,heartbeatJitterFraction:B.heartbeatJitterFraction,onEpochMismatch:()=>{L("[bridge:repl] CCR v2: epoch superseded (409) — closing for poll-loop recovery");try{J.close(),K.close(),X?.(4090)}catch(x){L(`[bridge:repl] CCR v2: error during epoch-mismatch cleanup: ${Z(x)}`,{level:"error"})}throw Error("epoch superseded")}});K.setOnEvent((x)=>{J.reportDelivery(x.event_id,"received"),J.reportDelivery(x.event_id,"processed")});let f,Y=!1,q=!1;return{write(x){return J.writeEvent(x)},async writeBatch(x){for(let O of x){if(q)break;await J.writeEvent(O)}},close(){q=!0,J.close(),K.close()},isConnectedStatus(){return Y},getStateLabel(){if(K.isClosedStatus())return"closed";if(K.isConnectedStatus())return Y?"connected":"init";return"connecting"},setOnData(x){K.setOnData(x)},setOnClose(x){X=x,K.setOnClose((O)=>{J.close(),x(O??4092)})},setOnConnect(x){f=x},getLastSequenceNum(){return K.getLastSequenceNum()},droppedBatchCount:0,reportState(x){J.reportState(x)},reportMetadata(x){J.reportMetadata(x)},reportDelivery(x,O){J.reportDelivery(x,O)},flush(){return J.flush()},connect(){if(!B.outboundOnly)K.connect();J.initialize(Q).then(()=>{Y=!0,L(`[bridge:repl] v2 transport ready for writes (epoch=${Q}, sse=${K.isConnectedStatus()?"open":"opening"})`),f?.()},(x)=>{L(`[bridge:repl] CCR v2 initialize failed: ${Z(x)}`,{level:"error"}),J.close(),K.close(),X?.(4091)})}}}class D{_active=!1;_pending=[];get active(){return this._active}get pendingCount(){return this._pending.length}start(){this._active=!0}end(){return this._active=!1,this._pending.splice(0)}enqueue(...B){if(!this._active)return!1;return this._pending.push(...B),!0}drop(){this._active=!1;let B=this._pending.length;return this._pending.length=0,B}deactivate(){this._active=!1}}
2
+ export{I as Db,k as Eb,D as Fb};
@@ -0,0 +1,58 @@
1
+ import{$i as $,EJ as F,GA as k,GQ as a,HA as I,cj as m,jv as U,lv as h,nQ as L,vC as A,wC as p}from"./cli-1.0.8-ykwgcdbt.mjs";import{T3 as O,U3 as f}from"./cli-1.0.8-sqbaxhfc.mjs";import{cja as S,gja as E}from"./cli-1.0.8-z96bbp08.mjs";import{Vja as b,Xja as T}from"./cli-1.0.8-0w29g9sk.mjs";import{_ja as y,lka as C}from"./cli-1.0.8-swts6q29.mjs";import{xra as N}from"./cli-1.0.8-by017547.mjs";import{join as P}from"path";function D(){return`IMPORTANT: This message and these instructions are NOT part of the actual user conversation. Do NOT include any references to "documentation updates", "magic docs", or these update instructions in the document content.
2
+
3
+ Based on the user conversation above (EXCLUDING this documentation update instruction message), update the Magic Doc file to incorporate any NEW learnings, insights, or information that would be valuable to preserve.
4
+
5
+ The file {{docPath}} has already been read for you. Here are its current contents:
6
+ <current_doc_content>
7
+ {{docContents}}
8
+ </current_doc_content>
9
+
10
+ Document title: {{docTitle}}
11
+ {{customInstructions}}
12
+
13
+ Your ONLY task is to use the Edit tool to update the documentation file if there is substantial new information to add, then stop. You can make multiple edits (update multiple sections as needed) - make all Edit tool calls in parallel in a single message. If there's nothing substantial to add, simply respond with a brief explanation and do not call any tools.
14
+
15
+ CRITICAL RULES FOR EDITING:
16
+ - Preserve the Magic Doc header exactly as-is: # MAGIC DOC: {{docTitle}}
17
+ - If there's an italicized line immediately after the header, preserve it exactly as-is
18
+ - Keep the document CURRENT with the latest state of the codebase - this is NOT a changelog or history
19
+ - Update information IN-PLACE to reflect the current state - do NOT append historical notes or track changes over time
20
+ - Remove or replace outdated information rather than adding "Previously..." or "Updated to..." notes
21
+ - Clean up or DELETE sections that are no longer relevant or don't align with the document's purpose
22
+ - Fix obvious errors: typos, grammar mistakes, broken formatting, incorrect information, or confusing statements
23
+ - Keep the document well organized: use clear headings, logical section order, consistent formatting, and proper nesting
24
+
25
+ DOCUMENTATION PHILOSOPHY - READ CAREFULLY:
26
+ - BE TERSE. High signal only. No filler words or unnecessary elaboration.
27
+ - Documentation is for OVERVIEWS, ARCHITECTURE, and ENTRY POINTS - not detailed code walkthroughs
28
+ - Do NOT duplicate information that's already obvious from reading the source code
29
+ - Do NOT document every function, parameter, or line number reference
30
+ - Focus on: WHY things exist, HOW components connect, WHERE to start reading, WHAT patterns are used
31
+ - Skip: detailed implementation steps, exhaustive API docs, play-by-play narratives
32
+
33
+ What TO document:
34
+ - High-level architecture and system design
35
+ - Non-obvious patterns, conventions, or gotchas
36
+ - Key entry points and where to start reading code
37
+ - Important design decisions and their rationale
38
+ - Critical dependencies or integration points
39
+ - References to related files, docs, or code (like a wiki) - help readers navigate to relevant context
40
+
41
+ What NOT to document:
42
+ - Anything obvious from reading the code itself
43
+ - Exhaustive lists of files, functions, or parameters
44
+ - Step-by-step implementation details
45
+ - Low-level code mechanics
46
+ - Information already in CLAUDE.md or other project docs
47
+
48
+ Use the Edit tool with file_path: {{docPath}}
49
+
50
+ REMEMBER: Only update if there is substantial new information. The Magic Doc header (# MAGIC DOC: {{docTitle}}) must remain unchanged.`}async function g(){let w=S(),z=P(y(),"magic-docs","prompt.md");try{return await w.readFile(z,{encoding:"utf-8"})}catch{return D()}}function M(w,z){return w.replace(/\{\{(\w+)\}\}/g,(B,J)=>Object.prototype.hasOwnProperty.call(z,J)?z[J]:B)}async function R(w,z,B,J){let Y=await g(),K=J?`
51
+
52
+ DOCUMENT-SPECIFIC UPDATE INSTRUCTIONS:
53
+ The document author has provided specific instructions for how this file should be updated. Pay extra attention to these instructions and follow them carefully:
54
+
55
+ "${J}"
56
+
57
+ These instructions take priority over the general rules below. Make sure your updates align with these specific guidelines.`:"";return M(Y,{docContents:w,docPath:z,docTitle:B,customInstructions:K})}var j=N(()=>{C();E()});function Xw(){G.clear()}function d(w){let z=w.match(u);if(!z||!z[1])return null;let B=z[1].trim(),J=z.index+z[0].length,K=w.slice(J).match(/^\s*\n(?:\s*\n)?(.+?)(?:\n|$)/);if(K&&K[1]){let X=K[1].match(r);if(X&&X[1]){let Z=X[1].trim();return{title:B,instructions:Z}}}return{title:B}}function l(){return{agentType:"magic-docs",whenToUse:"Update Magic Docs",tools:[$],model:"sonnet",source:"built-in",baseDir:"built-in",getSystemPrompt:()=>""}}async function i(w,z){let{messages:B,systemPrompt:J,userContext:Y,systemContext:K,toolUseContext:V}=z,X=U(V.readFileState);X.delete(w.path);let Z={...V,readFileState:X},q="";try{let W=(await A.call({file_path:w.path},Z)).data;if(W.type==="text")q=W.file.content}catch(Q){if(b(Q)||Q instanceof Error&&Q.message.startsWith("File does not exist")){G.delete(w.path);return}throw Q}let H=d(q);if(!H){G.delete(w.path);return}let _=await R(q,w.path,H.title,H.instructions),x=async(Q,W)=>{if(Q.name===$&&typeof W==="object"&&W!==null&&"file_path"in W){let v=W.file_path;if(typeof v==="string"&&v===w.path)return{behavior:"allow",updatedInput:W}}return{behavior:"deny",message:`only ${$} is allowed for ${w.path}`,decisionReason:{type:"other",reason:`only ${$} is allowed`}}};for await(let Q of k({agentDefinition:l(),promptMessages:[F({content:_})],toolUseContext:Z,canUseTool:x,isAsync:!0,forkContextMessages:B,querySource:"magic_docs",override:{systemPrompt:J,userContext:Y,systemContext:K},availableTools:Z.options.tools}));}async function Zw(){}var u,r,G,Yw;var s=N(()=>{I();m();p();T();h();a();f();j();u=/^#\s*MAGIC\s+DOC:\s*(.+)$/im,r=/^[_*](.+?)[_*]\s*$/m,G=new Map;Yw=O(async function(w){let{messages:z,querySource:B}=w;if(B!=="repl_main_thread")return;if(L(z))return;if(G.size===0)return;for(let K of Array.from(G.values()))await i(K,w)})});
58
+ export{Xw as Xh,Zw as Yh,s as Zh};
@@ -0,0 +1,2 @@
1
+ import{k9 as Z,o9 as _,p9 as w}from"./cli-1.0.8-hgreyqck.mjs";import{$9 as U,N_ as T,Oda as W,Rda as V,U$ as D,_9 as Y,k_ as $,kea as j,x$ as k}from"./cli-1.0.8-ke76gxzw.mjs";import{qja as N,tja as M}from"./cli-1.0.8-z96bbp08.mjs";import{Opa as O,Xla as X}from"./cli-1.0.8-c1m2f995.mjs";O();j();M();w();D();U();T();import{realpath as v}from"fs/promises";async function b(){try{let q=await Z();if(!q){N("Not in a GitHub repository, skipping path mapping update");return}let A=X(),z=$(A)??A,B;try{B=(await v(z)).normalize("NFC")}catch{B=z}let J=q.toLowerCase(),L=V().githubRepoPaths?.[J]??[];if(L[0]===B){N(`Path ${B} already tracked for repo ${J}`);return}let E=L.filter((S)=>S!==B),H=[B,...E];W((S)=>({...S,githubRepoPaths:{...S.githubRepoPaths,[J]:H}})),N(`Added ${B} to tracked paths for repo ${J}`)}catch(q){N(`Error updating repo path mapping: ${q}`)}}function y(q){let A=V(),I=q.toLowerCase();return A.githubRepoPaths?.[I]??[]}async function P(q){let A=await Promise.all(q.map(k));return q.filter((I,z)=>A[z])}async function d(q,A){try{let I=await Y(q);if(!I)return!1;let z=_(I);if(!z)return!1;return z.toLowerCase()===A.toLowerCase()}catch{return!1}}function c(q,A){let I=V(),z=q.toLowerCase(),B=I.githubRepoPaths?.[z]??[],J=B.filter((L)=>L!==A);if(J.length===B.length)return;let Q={...I.githubRepoPaths};if(J.length===0)delete Q[z];else Q[z]=J;W((L)=>({...L,githubRepoPaths:Q})),N(`Removed ${A} from tracked paths for repo ${z}`)}
2
+ export{b as eb,y as fb,P as gb,d as hb,c as ib};
@@ -0,0 +1,2 @@
1
+ import{Gh as B,Hh as CJ}from"./cli-1.0.8-6q1p5cvf.mjs";import{$x as kq,Ax as FJ,Br as JJ,Cn as AJ,Cr as uq,Cx as QQ,Dn as rJ,Fr as MJ,Gr as QJ,MF as BJ,OF as ZQ,On as DJ,Pn as lJ,Qn as PJ,Qw as wJ,Rn as tJ,Rw as JQ,Sn as VJ,Tn as eJ,_x as Bq,ay as yJ,mr as vq,nr as n,or as NJ,vr as TJ,xr as OJ,zx as Cq}from"./cli-1.0.8-ykwgcdbt.mjs";import{GX as LJ,HX as oJ,KX as RJ,LX as aJ,TX as jJ,UX as qQ}from"./cli-1.0.8-apm2cwth.mjs";import{H0 as hJ,HY as sJ,a0 as O,c0 as D,e0 as nq,f0 as EJ}from"./cli-1.0.8-qss5sph3.mjs";import{n3 as IJ,o3 as H,p3 as j,q3 as zJ}from"./cli-1.0.8-qzqze1a1.mjs";import{r3 as nJ}from"./cli-1.0.8-rna8rhza.mjs";import{A5 as pJ,C7 as _J,D6 as GQ,X7 as HQ,Y5 as mq,_5 as s,g5 as bq,h5 as GJ,h6 as i,j5 as Eq,k6 as yq,o6 as dJ,v5 as HJ,y6 as kJ}from"./cli-1.0.8-sqbaxhfc.mjs";import{r8 as K,s8 as xJ}from"./cli-1.0.8-9y02shjc.mjs";import{Iaa as aq,Jaa as lq,Kaa as _q,Laa as tq,Lca as UJ,Maa as eq,Naa as qJ,Nca as WJ,Yaa as $J,_ca as iJ}from"./cli-1.0.8-ke76gxzw.mjs";import{nia as KJ,qia as cJ}from"./cli-1.0.8-gmf61bcb.mjs";import{tra as XJ,xra as Rq}from"./cli-1.0.8-by017547.mjs";function hq(J){let q=J.messageActionsBackground;return q==="ansi:white"||q==="ansi:whiteBright"?J.inactive:q}function mJ(J){let q=J.userMessageBackground;return q==="ansi:white"||q==="ansi:whiteBright"?J.inactive:q}function z(J,q,Q){if(q.startsWith("ansi:")){let Y=q.slice(5);if(Q==="fg")return J[Y]??J;let X=`bg${Y[0].toUpperCase()}${Y.slice(1)}`;return J[X]??J}if(q.startsWith("#"))return Q==="fg"?J.hex(q):J.bgHex(q);if(q.startsWith("ansi256(")){let Y=parseInt(q.slice(8));return Q==="fg"?J.ansi256(Y):J.bgAnsi256(Y)}let Z=bJ.exec(q);if(Z){let[Y,X,U]=[+Z[1],+Z[2],+Z[3]];return Q==="fg"?J.rgb(Y,X,U):J.bgRgb(Y,X,U)}return J}function PQ(J,q,Q,Z,Y){if(!B())return uJ(J,q,Q,Z,Y);let{suggestion:X,messageActionsBackground:U}=Y,G=U==="ansi:white"||U==="ansi:whiteBright"?Y.inactive:U,R=Y.inverseText,I=Y.suggestion,F=z(z(K,X,"bg"),R,"fg").bold,L=z(z(K,X,"fg"),G,"bg"),A=z(z(K,G,"bg"),I,"fg"),T=z(K,G,"fg"),Pq=z(K,X,"fg"),P=F(` ${J} `);if(q){if(P+=L(w),P+=A(` ${sq} ${q}`),Q>0||Z>0){if(P+=A(" ("),Q>0)P+=z(z(K,G,"bg"),Y.success,"fg")(`↑${Q}`);if(Q>0&&Z>0)P+=A(" ");if(Z>0)P+=z(z(K,G,"bg"),Y.warning,"fg")(`↓${Z}`);P+=A(")")}P+=A(" "),P+=T(w)}else P+=Pq(w);return P}function VQ(J,q,Q){if(!B()){let G=z(K,q.suggestion,"fg").bold;return`[ ${G(J)} ]`}let{suggestion:Z,inverseText:Y}=q,X=z(z(K,Z,"bg"),Y,"fg").bold,U=Q?z(z(K,Q,"bg"),Z,"fg"):z(K,Z,"fg");return X(` ${J} `)+U(w)}function jQ(J,q,Q){if(!J)return"";if(!B()){let G=z(K,q.suggestion,"fg").bold;return`[ ${G(J.trim())} ]`}let{suggestion:Z,inverseText:Y}=q,X=z(z(K,Z,"bg"),Y,"fg").bold,U=Q?z(z(K,Q,"bg"),Z,"fg"):z(K,Z,"fg");return X(` ${J}`)+U(w)}function NQ(J,q,Q){if(!J)return"";if(!B())return`[ ${z(K,q.suggestion,"fg")(J.trim())} ]`;let Z=hq(q),Y=q.suggestion,X=z(z(K,Z,"bg"),Y,"fg"),U=Q?z(z(K,Q,"bg"),Z,"fg"):z(K,Z,"fg");return X(` ${J}`)+U(w)}function rq(J,q,Q){if(!J)return"";if(!B())return`[ ${J} ]`;let Z=z(z(K,q,"bg"),Q.inverseText,"fg").bold,Y=z(K,q,"fg");return Z(` ${J} `)+Y(w)}function TQ(J,q,Q,Z,Y){if(!J)return"";if(!B()){let L=z(K,Z.suggestion,"fg")(J);if(q>0||Q>0){if(L+=" (",q>0)L+=z(K,Z.success,"fg")(`↑${q}`);if(q>0&&Q>0)L+=" ";if(Q>0)L+=z(K,Z.warning,"fg")(`↓${Q}`);L+=")"}return`[ ${L} ]`}let X=hq(Z),U=Z.suggestion,G=z(z(K,X,"bg"),U,"fg"),R=Y?z(z(K,Y,"bg"),X,"fg"):z(K,X,"fg"),I=G(` ${sq} ${J}`);if(q>0||Q>0){if(I+=G(" ("),q>0)I+=z(z(K,X,"bg"),Z.success,"fg")(`↑${q}`);if(q>0&&Q>0)I+=G(" ");if(Q>0)I+=z(z(K,X,"bg"),Z.warning,"fg")(`↓${Q}`);I+=G(")")}return I+=G(" "),I+=R(w),I}function dq(J,q){if(!q||!nq())return J;return`${Bq}${q}${kq}${J}${Bq}${kq}`}function OQ(J,q,Q,Z="PR",Y){if(!B()){let F=q==="approved"?Q.success:q==="changes_requested"?Q.error:q==="pending"?Q.warning:q==="merged"?Q.merged:Q.inactive,L=dq(z(K,F,"fg")(`#${J}`),Y);return`[ ${z(K,Q.inactive,"fg")(Z)} ${L} ]`}let X=mJ(Q),U=q==="approved"?Q.success:q==="changes_requested"?Q.error:q==="pending"?Q.warning:q==="merged"?Q.merged:Q.inactive,G=z(z(K,X,"bg"),Q.inactive,"fg"),R=z(z(K,X,"bg"),U,"fg"),I=z(K,X,"fg");return G(` ${gJ} `)+dq(R(`#${J}`),Y)+G(" ")+I(w)}function uJ(J,q,Q,Z,Y){let X=z(K,Y.suggestion,"fg").bold,U=`[ ${X(J)} ]`;if(q){let R=z(K,Y.suggestion,"fg")(q);if(Q>0||Z>0){if(R+=" (",Q>0)R+=z(K,Y.success,"fg")(`↑${Q}`);if(Q>0&&Z>0)R+=" ";if(Z>0)R+=z(K,Y.warning,"fg")(`↓${Z}`);R+=")"}U+=` [ ${R} ]`}return U}var w="",sq="",gJ="",bJ;var oq=Rq(()=>{xJ();EJ();yJ();CJ();bJ=/^rgb\(\s?(\d+),\s?(\d+),\s?(\d+)\s?\)$/});function fJ(J,q){if(vq(J))return q.suggestion;switch(J){case"low":return q.inactive;case"medium":return q.warning;case"high":return q.claude;case"xhigh":return q.error;case"max":return q.merged;default:return q.error}}function kQ(J,q,Q){if(!n(q))return;let Z=JJ(q,J),Y=fJ(Z,Q);return{pill:rq(`${Sq(Z)} ${Z}`,Y,Q),bg:Y}}function Sq(J){if(vq(J))return qJ;switch(J){case"low":return aq;case"medium":return lq;case"high":return _q;case"xhigh":return tq;case"max":return eq;default:return _q}}var ZJ=Rq(()=>{$J();QJ();oq()});function rQ(J){let q=$q.c(82),{initial:Q,sessionModel:Z,onSelect:Y,onCancel:X,isStandaloneCommand:U,showFastModeNotice:G,headerText:R,skipSettingsWrite:I}=J,F=FJ(),L=RJ(),A=Q===null?h:Q,[T,Pq]=Dq.useState(A),P=Cq(KQ),[k,vJ]=Dq.useState(!1),_=Cq(XQ),r;if(q[0]!==_)r=_!==void 0?uq(_):void 0,q[0]=_,q[1]=r;else r=q[1];let[v,fq]=Dq.useState(r),Vq=P??!1,o;if(q[2]!==Vq)o=wJ(Vq),q[2]=Vq,q[3]=o;else o=q[3];let p=o,jq;q:{if(Q!==null&&!p.some((W)=>{if(W.value===Q)return!0;if(W.value===null)return!1;try{return s(i(String(W.value)))===s(i(Q))}catch{return!1}})){let W;if(q[4]!==Q)W=yq(Q),q[4]=Q,q[5]=W;else W=q[5];let V;if(q[6]!==Q||q[7]!==W)V={value:Q,label:W,description:"Current model"},q[6]=Q,q[7]=W,q[8]=V;else V=q[8];let S;if(q[9]!==p||q[10]!==V)S=[...p,V],q[9]=p,q[10]=V,q[11]=S;else S=q[11];jq=S;break q}jq=p}let Nq=jq,a;if(q[12]!==Nq)a=Nq.map(YQ),q[12]=Nq,q[13]=a;else a=q[13];let N=a,l;if(q[14]!==A||q[15]!==N)l=N.find((W)=>{if(W.value===A)return!0;if(A===h||W.value===null)return!1;try{return s(i(String(W.value)))===s(i(String(A)))}catch{return!1}})?.value??N[0]?.value??void 0,q[14]=A,q[15]=N,q[16]=l;else l=q[16];let Tq=l,t=Math.min(10,N.length),e=Math.max(0,N.length-t),qq;if(q[17]!==T||q[18]!==N)qq=N.find((W)=>W.value===T)?.label,q[17]=T,q[18]=N,q[19]=qq;else qq=q[19];let Jq=qq,M,Qq;if(q[20]!==T){let W=gq(T);M=W?n(W):!1,Qq=W?NJ(W):!1,q[20]=T,q[21]=M,q[22]=Qq}else M=q[21],Qq=q[22];let Zq=Qq,zq;if(q[23]!==T)zq=xq(T),q[23]=T,q[24]=zq;else zq=q[24];let x=zq,d=v==="max"&&!Zq?"high":v,Yq;if(q[25]!==_||q[26]!==k)Yq=(W)=>{if(Pq(W),!k&&_===void 0)fq(xq(W))},q[25]=_,q[26]=k,q[27]=Yq;else Yq=q[27];let Oq=Yq,Xq;if(q[28]!==x||q[29]!==M||q[30]!==Zq)Xq=(W)=>{if(!M)return;fq((V)=>UQ(V??x,W,Zq)),vJ(!0)},q[28]=x,q[29]=M,q[30]=Zq,q[31]=Xq;else Xq=q[31];let Kq=Xq,Uq;if(q[32]!==Kq)Uq={"modelPicker:decreaseEffort":()=>Kq("left"),"modelPicker:increaseEffort":()=>Kq("right")},q[32]=Kq,q[33]=Uq;else Uq=q[33];let Wq;if(q[34]===Symbol.for("react.memo_cache_sentinel"))Wq={context:"ModelPicker"},q[34]=Wq;else Wq=q[34];LJ(Uq,Wq);let Gq;if(q[35]!==v||q[36]!==k||q[37]!==Y||q[38]!==F||q[39]!==I)Gq=function(V){if(KJ("tengu_model_command_menu_effort",{effort:v}),!I){let iq=OJ(v,xq(V),UJ("userSettings")?.effortLevel,k),pq=TJ(iq);if(pq!==void 0)WJ("userSettings",{effortLevel:pq});F((SJ)=>({...SJ,effortValue:iq}))}let S=gq(V),cq=k&&S&&n(S)?v:void 0;if(V===h){Y(null,cq);return}Y(V,cq)},q[35]=v,q[36]=k,q[37]=Y,q[38]=F,q[39]=I,q[40]=Gq;else Gq=q[40];let Mq=Gq,Hq;if(q[41]===Symbol.for("react.memo_cache_sentinel"))Hq=H(D,{color:"remember",bold:!0,children:"Select model"}),q[41]=Hq;else Hq=q[41];let wq=R??"Switch between Claude models. Applies to this session and future Claude Code sessions. For other/previous model names, specify with --model.",E;if(q[42]!==wq)E=H(D,{dimColor:!0,children:wq}),q[42]=wq,q[43]=E;else E=q[43];let y;if(q[44]!==Z)y=Z&&j(D,{dimColor:!0,children:["Currently using ",yq(Z)," for this session (set by plan mode). Selecting a model will undo this."]}),q[44]=Z,q[45]=y;else y=q[45];let C;if(q[46]!==E||q[47]!==y)C=j(O,{marginBottom:1,flexDirection:"column",children:[Hq,E,y]}),q[46]=E,q[47]=y,q[48]=C;else C=q[48];let Fq=X??zQ,g;if(q[49]!==Oq||q[50]!==Mq||q[51]!==Tq||q[52]!==A||q[53]!==N||q[54]!==Fq||q[55]!==t)g=H(O,{flexDirection:"column",children:H(BJ,{defaultValue:A,defaultFocusValue:Tq,options:N,onChange:Mq,onFocus:Oq,onCancel:Fq,visibleOptionCount:t})}),q[49]=Oq,q[50]=Mq,q[51]=Tq,q[52]=A,q[53]=N,q[54]=Fq,q[55]=t,q[56]=g;else g=q[56];let b;if(q[57]!==e)b=e>0&&H(O,{paddingLeft:3,children:j(D,{dimColor:!0,children:["and ",e," more…"]})}),q[57]=e,q[58]=b;else b=q[58];let m;if(q[59]!==g||q[60]!==b)m=j(O,{flexDirection:"column",marginBottom:1,children:[g,b]}),q[59]=g,q[60]=b,q[61]=m;else m=q[61];let u;if(q[62]!==d||q[63]!==x||q[64]!==Jq||q[65]!==M)u=H(O,{marginBottom:1,flexDirection:"column",children:M?j(D,{dimColor:!0,children:[H(YJ,{effort:d})," ",AJ(d)," effort",d===x?" (default)":""," ",H(D,{color:"subtle",children:"← → to adjust"})]}):j(D,{color:"subtle",children:[H(YJ,{effort:void 0})," Effort not supported",Jq?` for ${Jq}`:""]})}),q[62]=d,q[63]=x,q[64]=Jq,q[65]=M,q[66]=u;else u=q[66];let $;if(q[67]!==G)$=bq()?G?H(O,{marginBottom:1,children:j(D,{dimColor:!0,children:["Fast mode is ",H(D,{bold:!0,children:"ON"})," and available with"," ",Eq," only (/fast). Switching to other models turn off fast mode."]})}):GJ()&&!HJ()?H(O,{marginBottom:1,children:j(D,{dimColor:!0,children:["Use ",H(D,{bold:!0,children:"/fast"})," to turn on Fast mode (",Eq," only)."]})}):null:null,q[67]=G,q[68]=$;else $=q[68];let f;if(q[69]!==C||q[70]!==m||q[71]!==u||q[72]!==$)f=j(O,{flexDirection:"column",children:[C,m,u,$]}),q[69]=C,q[70]=m,q[71]=u,q[72]=$,q[73]=f;else f=q[73];let c;if(q[74]!==L||q[75]!==U)c=U&&H(D,{dimColor:!0,italic:!0,children:L.pending?j(IJ,{children:["Press ",L.keyName," again to exit"]}):j(VJ,{children:[H(DJ,{shortcut:"Enter",action:"confirm"}),H(PJ,{action:"select:cancel",context:"Select",fallback:"Esc",description:"exit"})]})}),q[74]=L,q[75]=U,q[76]=c;else c=q[76];let Iq;if(q[77]!==f||q[78]!==c)Iq=j(O,{flexDirection:"column",children:[f,c]}),q[77]=f,q[78]=c,q[79]=Iq;else Iq=q[79];let Aq=Iq;if(!U)return Aq;let Lq;if(q[80]!==Aq)Lq=H(jJ,{color:"permission",children:Aq}),q[80]=Aq,q[81]=Lq;else Lq=q[81];return Lq}function zQ(){}function YQ(J){return{...J,value:J.value===null?h:J.value}}function XQ(J){return J.effortValue}function KQ(J){return bq()?J.fastMode:!1}function gq(J){if(!J)return;return J===h?mq():i(J)}function YJ(J){let q=$q.c(5),{effort:Q}=J,Z=Q?"claude":"subtle",Y=Q??"low",X;if(q[0]!==Y)X=Sq(Y),q[0]=Y,q[1]=X;else X=q[1];let U;if(q[2]!==Z||q[3]!==X)U=H(D,{color:Z,children:X}),q[2]=Z,q[3]=X,q[4]=U;else U=q[4];return U}function UQ(J,q,Q){let Z=Q?["low","medium","high","max"]:["low","medium","high"],Y=Z.indexOf(J),X=Y!==-1?Y:Z.indexOf("high");if(q==="right")return Z[(X+1)%Z.length];else return Z[(X-1+Z.length)%Z.length]}function xq(J){let q=gq(J)??mq(),Q=MJ(q);return Q!==void 0?uq(Q):"high"}var $q,Dq,h="__NO_PREFERENCE__";var WQ=Rq(()=>{rJ();aJ();cJ();pJ();hJ();oJ();QQ();QJ();dJ();JQ();iJ();tJ();ZQ();eJ();lJ();qQ();ZJ();zJ();$q=XJ(sJ(),1),Dq=XJ(nJ(),1)});function eQ(J,q,Q){if(!_J())return!1;if(q)return!0;if(J===null||!kJ(J))return!1;let Z=J.toLowerCase().replace(/\[1m\]$/,"").trim(),Y=Z==="opus"||Z.includes("opus-4-6")||Z.includes("opus-4-7"),X=Z==="sonnet"||Z.includes("sonnet-4-6");if(Y&&Q)return!1;return Y||X}var IQ=Rq(()=>{HQ();GQ()});
2
+ export{hq as Pg,mJ as Qg,PQ as Rg,VQ as Sg,jQ as Tg,NQ as Ug,TQ as Vg,OQ as Wg,oq as Xg,kQ as Yg,Sq as Zg,ZJ as _g,rQ as $g,WQ as ah,eQ as bh,IQ as ch};
@@ -0,0 +1,2 @@
1
+ import{TN as O,UN as P,VN as Q,WN as U,Xi as M,Yi as W,ZN as X}from"./cli-1.0.8-ykwgcdbt.mjs";import{xra as V}from"./cli-1.0.8-by017547.mjs";function Y(f){return f==="projectSettings"||f==="policySettings"||f==="command"}function J(f){return O(f)}function L(f,G,q){let v=J(G.source),z=J(q.source),j=G.ruleValue.toolName;if(f==="deny")return`Remove the "${j}" deny rule from ${v}, or remove the specific allow rule from ${z}`;return`Remove the "${j}" ask rule from ${v}, or remove the specific allow rule from ${z}`}function Z(f,G,q){let{toolName:v,ruleContent:z}=f.ruleValue;if(z===void 0)return{shadowed:!1};let j=G.find((E)=>E.ruleValue.toolName===v&&E.ruleValue.ruleContent===void 0);if(!j)return{shadowed:!1};if(v===M&&q.sandboxAutoAllowEnabled){if(!Y(j.source))return{shadowed:!1}}return{shadowed:!0,shadowedBy:j,shadowType:"ask"}}function _(f,G){let{toolName:q,ruleContent:v}=f.ruleValue;if(v===void 0)return{shadowed:!1};let z=G.find((j)=>j.ruleValue.toolName===q&&j.ruleValue.ruleContent===void 0);if(!z)return{shadowed:!1};return{shadowed:!0,shadowedBy:z,shadowType:"deny"}}function F(f,G){let q=[],v=P(f),z=U(f),j=Q(f);for(let E of v){let H=_(E,j);if(H.shadowed){let K=J(H.shadowedBy.source);q.push({rule:E,reason:`Blocked by "${H.shadowedBy.ruleValue.toolName}" deny rule (from ${K})`,shadowedBy:H.shadowedBy,shadowType:"deny",fix:L("deny",H.shadowedBy,E)});continue}let I=Z(E,z,G);if(I.shadowed){let K=J(I.shadowedBy.source);q.push({rule:E,reason:`Shadowed by "${I.shadowedBy.ruleValue.toolName}" ask rule (from ${K})`,shadowedBy:I.shadowedBy,shadowType:"ask",fix:L("ask",I.shadowedBy,E)})}}return q}var $=V(()=>{W();X()});
2
+ export{F as qg,$ as rg};
@@ -0,0 +1,2 @@
1
+ import{Ax as Zf,Cx as _f,Wn as Xf,Xn as Uf,zx as g}from"./cli-1.0.8-ykwgcdbt.mjs";import{GX as Wf,HX as Tf}from"./cli-1.0.8-apm2cwth.mjs";import{$Z as cf,H0 as a,HY as n,NY as s,OY as If,_Z as F,a0 as r,c0 as q,g0 as Vf}from"./cli-1.0.8-qss5sph3.mjs";import{n3 as Qf,o3 as H,p3 as X,q3 as T}from"./cli-1.0.8-qzqze1a1.mjs";import{r3 as Rf}from"./cli-1.0.8-rna8rhza.mjs";import{A5 as hf,F5 as M,I5 as p,J5 as Ef,g5 as Nf,i5 as b,j5 as _,k5 as Hf,m5 as j,p5 as qf,r5 as zf,z5 as Jf}from"./cli-1.0.8-sqbaxhfc.mjs";import{r8 as i,s8 as yf}from"./cli-1.0.8-9y02shjc.mjs";import{Haa as w,Nca as Gf,Rda as l,Yaa as Bf,_ca as Cf,kea as Pf}from"./cli-1.0.8-ke76gxzw.mjs";import{dga as mf,lga as Of}from"./cli-1.0.8-s5kcxz2r.mjs";import{nia as D,qia as Lf}from"./cli-1.0.8-gmf61bcb.mjs";import{tra as x,xra as o}from"./cli-1.0.8-by017547.mjs";function e(m){let f=t.c(2),{cooldown:G}=m;if(G){let z;if(f[0]===Symbol.for("react.memo_cache_sentinel"))z=H(q,{color:"promptBorder",dimColor:!0,children:w}),f[0]=z;else z=f[0];return z}let N;if(f[1]===Symbol.for("react.memo_cache_sentinel"))N=H(q,{color:"fastMode",children:w}),f[1]=N;else N=f[1];return N}function U(m=!0,f=!1){if(!m)return w;let G=s(l().theme);if(f)return i.dim(F("promptBorder",G)(w));return F("fastMode",G)(w)}var t;var ff=o(()=>{yf();Bf();a();Pf();If();cf();T();t=x(n(),1)});function S(m,f){if(zf(),Gf("userSettings",{fastMode:m?!0:void 0}),m)f((G)=>{let N=!j(G.mainLoopModel);return{...G,...N?{mainLoopModel:Hf(),mainLoopModelForSession:null}:{},fastMode:!0}});else f((G)=>({...G,fastMode:!1}))}function Df(m){let f=kf.c(30),{onDone:G,unavailableReason:N}=m,z=g(vf),V=g(Af),W=Zf(),[J,wf]=Kf.useState(V??!1),y;if(f[0]===Symbol.for("react.memo_cache_sentinel"))y=qf(),f[0]=y;else y=f[0];let B=y,$=B.status==="cooldown",Q=N!==null,P;if(f[1]===Symbol.for("react.memo_cache_sentinel"))P=p(M(!0)),f[1]=P;else P=f[1];let d=P,I;if(f[2]!==J||f[3]!==Q||f[4]!==z||f[5]!==G||f[6]!==W)I=function(){if(Q)return;if(S(J,W),D("tengu_fast_mode_toggled",{enabled:J,source:"picker"}),J){let v=U(J),rf=!j(z)?` · model set to ${_}`:"";G(`${v} Fast mode ON${rf} · ${d}`)}else W(uf),G("Fast mode OFF")},f[2]=J,f[3]=Q,f[4]=z,f[5]=G,f[6]=W,f[7]=I;else I=f[7];let u=I,c;if(f[8]!==V||f[9]!==Q||f[10]!==G||f[11]!==W)c=function(){if(Q){if(V)S(!1,W);G("Fast mode OFF",{display:"system"});return}let v=V?`${U()} Kept Fast mode ON`:"Kept Fast mode OFF";G(v,{display:"system"})},f[8]=V,f[9]=Q,f[10]=G,f[11]=W,f[12]=c;else c=f[12];let A=c,L;if(f[13]!==Q)L=function(){if(Q)return;wf(jf)},f[13]=Q,f[14]=L;else L=f[14];let Z=L,O;if(f[15]!==u||f[16]!==Z)O={"confirm:yes":u,"confirm:nextField":Z,"confirm:next":Z,"confirm:previous":Z,"confirm:cycleMode":Z,"confirm:toggle":Z},f[15]=u,f[16]=Z,f[17]=O;else O=f[17];let C;if(f[18]===Symbol.for("react.memo_cache_sentinel"))C={context:"Confirmation"},f[18]=C;else C=f[18];Wf(O,C);let h;if(f[19]===Symbol.for("react.memo_cache_sentinel"))h=X(q,{children:[H(e,{cooldown:$})," Fast mode (research preview)"]}),f[19]=h;else h=f[19];let Yf=h,k;if(f[20]!==Q)k=(Y)=>Y.pending?X(q,{children:["Press ",Y.keyName," again to exit"]}):Q?H(q,{children:"Esc to cancel"}):H(q,{children:"Tab to toggle · Enter to confirm · Esc to cancel"}),f[20]=Q,f[21]=k;else k=f[21];let K;if(f[22]!==J||f[23]!==N)K=N?H(r,{marginLeft:2,children:H(q,{color:"error",children:N})}):X(Qf,{children:[H(r,{flexDirection:"column",gap:0,marginLeft:2,children:X(r,{flexDirection:"row",gap:2,children:[H(q,{bold:!0,children:"Fast mode"}),H(q,{color:J?"fastMode":void 0,bold:J,children:J?"ON ":"OFF"}),H(q,{dimColor:!0,children:d})]})}),$&&B.status==="cooldown"&&H(r,{marginLeft:2,children:X(q,{color:"warning",children:[B.reason==="overloaded"?"Fast mode overloaded and is temporarily unavailable":"You've hit your fast limit"," · resets in ",mf(B.resetAt-Date.now(),{hideTrailingZeros:!0})]})})]}),f[22]=J,f[23]=N,f[24]=K;else K=f[24];let E;if(f[25]===Symbol.for("react.memo_cache_sentinel"))E=X(q,{dimColor:!0,children:["Learn more:"," ",H(Vf,{url:"https://code.claude.com/docs/en/fast-mode",children:"https://code.claude.com/docs/en/fast-mode"})]}),f[25]=E;else E=f[25];let R;if(f[26]!==A||f[27]!==K||f[28]!==k)R=X(Xf,{title:Yf,subtitle:`High-speed mode for ${_}. Billed as extra usage at a premium rate. Separate rate limits apply.`,onCancel:A,color:"fastMode",inputGuide:k,children:[K,E]}),f[26]=A,f[27]=K,f[28]=k,f[29]=R;else R=f[29];return R}function jf(m){return!m}function uf(m){return{...m,fastMode:!1}}function Af(m){return m.fastMode}function vf(m){return m.mainLoopModel}async function Ff(m,f,G){let N=b();if(N)return`Fast mode unavailable: ${N}`;let{mainLoopModel:z}=f();if(S(m,G),D("tengu_fast_mode_toggled",{enabled:m,source:"shortcut"}),m){let V=U(!0),W=!j(z)?` · model set to ${_}`:"",J=p(M(!0));return`${V} Fast mode ON${W} · ${J}`}else return"Fast mode OFF"}async function H0(m,f,G){if(!Nf())return null;await Jf();let N=G?.trim().toLowerCase();if(N==="on"||N==="off"){let V=await Ff(N==="on",f.getAppState,f.setAppState);return m(V),null}let z=b();return D("tengu_fast_mode_picker_shown",{unavailable_reason:z??""}),H(Df,{onDone:m,unavailableReason:z})}var kf,Kf;var xf=o(()=>{Uf();ff();a();Tf();Lf();_f();hf();Of();Ef();Cf();T();kf=x(n(),1),Kf=x(Rf(),1)});
2
+ export{U as je,ff as ke,Df as le,H0 as me,xf as ne};
@@ -0,0 +1,24 @@
1
+ import{Ag as _Q,Cg as iQ}from"./cli-1.0.8-p4egaq4j.mjs";import{pi as WQ,qi as zX}from"./cli-1.0.8-5awx1w8e.mjs";import{CF as SJ,DF as YQ,Xr as CQ,fs as qX,gJ as JJ,hJ as mJ,oJ as GQ,pJ as KQ,qJ as VQ,rJ as OQ,sJ as NQ,vJ as IJ,wJ as nJ,xJ as rJ,xp as ZQ,yJ as gQ,yp as uQ}from"./cli-1.0.8-ykwgcdbt.mjs";import{FX as AQ,HX as ZX,KX as FQ,LX as $X,RX as zJ,SX as iJ,rX as bJ,sX as aJ}from"./cli-1.0.8-apm2cwth.mjs";import{H0 as WJ,QY as AJ,XZ as FJ,YZ as CJ,ZZ as oJ,a0 as N,c0 as M,m0 as t,w0 as e,xY as LJ,yY as lJ}from"./cli-1.0.8-qss5sph3.mjs";import{o3 as q,p3 as _,q3 as s}from"./cli-1.0.8-qzqze1a1.mjs";import{r3 as BJ}from"./cli-1.0.8-rna8rhza.mjs";import{r8 as i,s8 as dJ}from"./cli-1.0.8-9y02shjc.mjs";import{Ifa as x,Qfa as DJ}from"./cli-1.0.8-ke76gxzw.mjs";import{Vfa as f,Wfa as pJ,Yfa as n,aga as uJ,fga as vJ,lga as kQ}from"./cli-1.0.8-s5kcxz2r.mjs";import{Aha as UQ,Bha as aQ}from"./cli-1.0.8-acrtv429.mjs";import{tra as OJ,xra as qJ,yra as oQ}from"./cli-1.0.8-by017547.mjs";import{writeFile as fQ}from"fs/promises";import{join as hQ}from"path";function PJ(J){if(J<1000)return`${J}ms`;let U=Math.round(J/1000);if(U<60)return`${U}s`;return`${Math.floor(U/60)}m ${U%60}s`}function sJ(J){if(J==="done")return"success";if(J==="stalled"||J==="failed")return"error";if(J==="cancelled")return"warning";return"permission"}function cQ(J){if(J==="running")return"▸";if(J==="failed"||J==="stalled")return"✗";if(J==="cancelled")return"⊘";return"✓"}function tJ(J){let U=0,K=0;for(let H of J.history)for(let B of HJ(H.agents))if(K+=1,!B.failed)U+=1;return{done:U,total:K}}function eJ(J){let U=J.history.map((K)=>{let H=HJ(K.agents);return{step:K.step,done:H.filter((B)=>!B.failed).length,total:H.length,agents:K.agents,decision:K.decision}});if(J.status==="running"&&!J.history.some((K)=>K.step===J.currentStep))U.push({step:J.currentStep,done:J.agentsDone??0,total:J.agentsInPhase??0,agents:null,decision:null});return U}function JQ(J,U){return`${CJ(J)}${U}\x1B[39m`}function jJ(J,U,K){return J+" ".repeat(Math.max(0,K-U))}function xQ(J,U,K){let H=J.failed?"✗ ":"✓ ",B=JQ(J.failed?K.error:K.success,H.trimEnd())+" ",W=PJ(J.ms),X=f(W),I=Math.max(4,U-f(H)-X-1),w=n(`${J.label} ${J.model||"inherit"} · ${vJ(J.tokens)} tok`,I),S=w.length<=J.label.length?i.bold(w):i.bold(w.slice(0,J.label.length))+i.dim(w.slice(J.label.length)),F=Math.max(1,U-f(H)-f(w)-X);return B+S+" ".repeat(F)+i.dim(W)}function pQ({run:J,phaseIndex:U}){let{columns:K,rows:H}=bJ(),B=eJ(J),W=Math.min(U,Math.max(0,B.length-1)),X=B[W],{done:I,total:w}=tJ(J),[S]=AJ(),F=FJ(S),g=Math.max(6,H-6),R=g-2,l=TJ-4,v=Math.max(20,K-4-TJ-1-4-4),k=X?` ${X.step} · ${X.agents?HJ(X.agents).length:X.total} agents `:" phase ",C=B.map((D,L)=>{let V=L===W,O=D.total>0&&D.done===D.total?"✓":D.agents===null?"▸":"✓",m=n(`${V?") ":" "}${O} ${D.step}${D.total>0?` ${D.done}/${D.total}`:""}`,l);return jJ(V?JQ(F.permission,m):m,f(m),l)});while(C.length<R)C.push(" ".repeat(l));let j=!X?[jJ(i.dim("starting…"),f("starting…"),v)]:X.agents===null?[jJ(i.dim(`running… ${X.done}/${X.total} done`),f(`running… ${X.done}/${X.total} done`),v)]:HJ(X.agents).map((D)=>xQ(D,v,F));while(j.length<R)j.push(" ".repeat(v));return _(N,{flexDirection:"column",marginTop:1,children:[_(N,{flexDirection:"row",justifyContent:"space-between",children:[_(N,{flexDirection:"column",flexShrink:1,minWidth:0,children:[q(M,{bold:!0,color:"permission",wrap:"truncate",children:J.workflow}),J.description?q(M,{dimColor:!0,wrap:"truncate",children:J.description}):null]}),_(M,{color:sJ(J.status),wrap:"truncate",children:[I,"/",w," agents · ",PJ(J.updatedAt-J.startedAt)," · ",J.status]})]}),_(N,{flexDirection:"row",marginTop:1,gap:1,children:[q(N,{flexDirection:"column",flexShrink:0,width:TJ,height:g,overflow:"hidden",borderStyle:"round",borderColor:"subtle",paddingX:1,borderText:{content:" Phases ",position:"top",align:"start"},children:q(t,{lines:C.slice(0,R),width:l})}),q(N,{flexDirection:"column",flexGrow:1,height:g,overflow:"hidden",borderStyle:"round",borderColor:"subtle",paddingX:1,borderText:{content:k,position:"top",align:"start"},children:q(t,{lines:j.slice(0,R),width:v})})]})]})}function QQ({liveRun:J,onStop:U,initialRunId:K,onViewChange:H}){let[B,W]=y.useState([]),[X,I]=y.useState(0),[w,S]=y.useState(0),[F,g]=y.useState(K?{mode:"detail",runId:K}:{mode:"list"}),[R,l]=y.useState(null),[v,k]=y.useState(!1),[C,j]=y.useState(new Set);y.useEffect(()=>{IJ().then(W).catch(($)=>x($))},[J?.runId,J?.updatedAt]);let D=(J?[J,...B.filter(($)=>$.runId!==J.runId)]:B).filter(($)=>!C.has($.runId)),L=D[Math.min(X,Math.max(0,D.length-1))],V=F.mode==="detail"?D.find(($)=>$.runId===F.runId):void 0;y.useEffect(()=>{H?.(F.mode==="detail")},[F.mode,H]);let O=y.useCallback(()=>{LJ.get(process.stdout)?.prepareFullRepaint()},[]),m=y.useRef(!1);y.useEffect(()=>{if(m.current||!K)return;let $=D.findIndex((Y)=>Y.runId===K);if($>=0)I($),m.current=!0},[K,D]);let T=F.mode==="detail"?V:L,h=y.useCallback(async()=>{if(!T)return;try{let $=hQ(JJ(),`run-${T.runId}.md`);await fQ($,rJ(T)),l($)}catch($){x($)}},[T]),c=y.useCallback(async()=>{if(!L)return;try{await nJ(L.runId),j(($)=>new Set($).add(L.runId)),I(($)=>Math.max(0,Math.min($,D.length-2))),W(await IJ())}catch($){x($)}},[L,D.length]);if(e(($,Y)=>{if(F.mode==="detail"){let P=V?eJ(V).length:0;if(Y.escape)O(),g({mode:"list"});else if(Y.upArrow)O(),S((A)=>Math.max(0,A-1));else if(Y.downArrow)O(),S((A)=>Math.min(Math.max(0,P-1),A+1));else if($==="s")h();else if($==="x"&&V&&J&&V.runId===J.runId)U();return}if(v){if(k(!1),$==="y")c();return}if(Y.upArrow)I((P)=>Math.max(0,P-1));else if(Y.downArrow)I((P)=>Math.min(D.length-1,P+1));else if(Y.return&&L)O(),S(0),g({mode:"detail",runId:L.runId});else if($==="s")h();else if($==="x"&&L&&J&&L.runId===J.runId)U();else if($==="d"&&L&&L.status!=="running")k(!0)},{isActive:!0}),F.mode==="detail"){if(!V)return q(N,{paddingX:2,paddingTop:1,children:q(M,{dimColor:!0,children:"Run not found."})});return _(N,{flexDirection:"column",paddingX:2,children:[q(pQ,{run:V,phaseIndex:w}),R&&_(M,{color:"success",children:["Saved → ",R]})]})}return _(N,{flexDirection:"column",paddingTop:1,children:[q(zJ,{color:"permission",padding:4}),D.length===0?q(N,{paddingX:2,marginTop:1,children:q(M,{dimColor:!0,children:"No workflow runs yet. Start one from the Library tab."})}):_(N,{flexDirection:"column",paddingX:2,marginTop:1,children:[D.map(($,Y)=>{let{total:P}=tJ($);return _(M,{inverse:Y===X,wrap:"truncate",children:[Y===X?"▸ ":" ",q(M,{color:sJ($.status),children:cQ($.status)})," ",$.workflow," ",P," agents · ",vJ($.totalTokens)," tok · ",PJ($.updatedAt-$.startedAt)]},$.runId)}),R&&q(N,{marginTop:1,children:_(M,{color:"success",children:["Saved → ",R]})}),v&&L&&q(N,{marginTop:1,children:_(M,{color:"warning",children:['Delete run "',L.workflow,'" (',PJ(L.updatedAt-L.startedAt),")? (y/n)"]})})]})]})}var y,HJ=(J)=>J.filter((U)=>U.label!=="main"),TJ=26;var XQ=qJ(()=>{dJ();WJ();lJ();pJ();kQ();DJ();oJ();uJ();aJ();iJ();gQ();mJ();s();y=OJ(BJ(),1)});function lQ(J){let U={name:J.name};if(J.agents.length>0)U.agents=J.agents;if(J.handbackTo?.length)U.handbackTo=J.handbackTo;return U}function $Q(J,U={}){let K={name:J.name,description:J.description};if(J.main)K.main=J.main;K.steps=J.steps.map(lQ);for(let[W,X]of Object.entries(U))if(!dQ.has(W))K[W]=X;let H=ZQ(K).trimEnd(),B=J.instructions.trim();return`---
2
+ ${H}
3
+ ---
4
+ ${B?`${B}
5
+ `:""}`}function qQ(J,U,K){let H=J[U]?.name;return J.map((B,W)=>({...B,name:W===U?K:B.name,handbackTo:B.handbackTo?.map((X)=>X===H?K:X)}))}var dQ;var zQ=qJ(()=>{uQ();dQ=new Set(["name","description","main","steps"])});import{unlinkSync as nQ,writeFileSync as rQ}from"fs";import{readFile as sQ,writeFile as tQ}from"fs/promises";import{tmpdir as eQ}from"os";import{join as yJ}from"path";function UJ(J,U){return`${CJ(J)}${U}\x1B[39m`}function ZJ(J,U,K){return J+" ".repeat(Math.max(0,K-U))}function EJ(J,U,K){let H=J.slice(0,U);while(H.length<U)H.push(" ".repeat(K));return H}function MQ({sourceFile:J,onClose:U}){let{columns:K,rows:H}=bJ(),[B]=AJ(),W=FJ(B),[X,I]=E.useState(null),[w,S]=E.useState({}),[F,g]=E.useState(null),[R,l]=E.useState(!1),[v,k]=E.useState("phases"),[C,j]=E.useState(0),[D,L]=E.useState(0),[V,O]=E.useState(null),[m,T]=E.useState(null),[h,c]=E.useState(null),$=E.useCallback(()=>{LJ.get(process.stdout)?.prepareFullRepaint()},[]);E.useEffect(()=>{sQ(yJ(JJ(),J),"utf-8").then((Q)=>{let Z=GQ(Q,J.replace(/\.md$/,""));if(Z.def)I(Z.def),S(Z.rawFrontmatter);else g(Z.errors.join("; "))}).catch((Q)=>{x(Q),g("Failed to read workflow file.")})},[J]),E.useEffect(()=>{import("./agentTypes-1.0.8-0tz8xbhq.mjs").then((Q)=>Q.getKnownAgentTypes(UQ())).then(c).catch((Q)=>x(Q))},[]);let Y=E.useMemo(()=>{if(!X)return[];let Q=KQ(X);if(h)Q.push(...VQ(X,h));return Q},[X,h]),P=E.useCallback((Q)=>{$(),I((Z)=>Z?Q(Z):Z),l(!0),T(null)},[$]),A=C-1,u=X&&A>=0?X.steps[A]:void 0,YJ=C===0?["description","main"]:["name","agents","handbackTo"],bQ=E.useCallback(async()=>{if(!X)return;try{let Q=yJ(JJ(),J);await tQ(Q,$Q(X,w)),l(!1),T(`Saved → ${Q}`)}catch(Q){x(Q),T("Failed to save.")}},[X,w,J]),EQ=E.useCallback(()=>{if(!X)return;let Q=yJ(eQ(),`claudin-wf-prompt-${Date.now()}.md`);try{rQ(Q,X.instructions?`${X.instructions}
6
+ `:"");let Z=_Q(Q);if(Z.error)T(Z.error);else if(Z.content===null)T("No external editor available — set $EDITOR or $VISUAL.");else{let z=Z.content.trim();if(z!==X.instructions)P((G)=>({...G,instructions:z}))}}catch(Z){x(Z),T("Failed to open editor.")}finally{try{nQ(Q)}catch{}}},[X,P]),SQ=E.useCallback(()=>{if(!X)return;let Q=YJ[D];if($(),C===0){if(Q==="description")O({kind:"input",target:"description",value:X.description,cursor:X.description.length});else{let Z=["(default)",...[...h??[]].sort()];O({kind:"picker",target:"main",options:Z,checked:new Set([X.main??"(default)"]),cursor:Math.max(0,Z.indexOf(X.main??"(default)")),multi:!1})}return}if(!u)return;if(Q==="name")O({kind:"input",target:"name",value:u.name,cursor:u.name.length});else if(Q==="agents"){let Z=[...new Set([...[...h??[]].sort(),...u.agents])];O({kind:"picker",target:"agents",options:Z,checked:new Set(u.agents),cursor:0,multi:!0})}else{let Z=X.steps.slice(0,A).map((z)=>z.name);if(Z.length===0){T("No earlier phases to hand back to.");return}O({kind:"picker",target:"handbackTo",options:Z,checked:new Set(u.handbackTo??[]),cursor:0,multi:!0})}},[X,YJ,D,C,u,A,h,$]),RQ=E.useCallback((Q,Z)=>{let z=Z.trim();if($(),O(null),!z)return;if(Q==="description")P((G)=>({...G,description:z}));else if(Q==="name"&&A>=0)P((G)=>({...G,steps:qQ(G.steps,A,z)}));else if(Q==="addStep"){let G=C===0?0:C;P((b)=>({...b,steps:[...b.steps.slice(0,G),{name:z,agents:[]},...b.steps.slice(G)]})),j(G+1),k("phases")}},[$,C,A,P]),TQ=E.useCallback((Q)=>{if($(),O(null),Q.target==="main"){let z=Q.options[Q.cursor];P((G)=>({...G,main:z==="(default)"?void 0:z}));return}let Z=Q.options.filter((z)=>Q.checked.has(z));if(Q.target==="agents"&&A>=0)P((z)=>({...z,steps:z.steps.map((G,b)=>b===A?{...G,agents:Z}:G)}));else if(Q.target==="handbackTo"&&A>=0)P((z)=>({...z,steps:z.steps.map((G,b)=>b===A?{...G,handbackTo:Z.length?Z:void 0}:G)}))},[$,A,P]),jQ=E.useCallback(()=>{if(A<0)return;P((Q)=>({...Q,steps:Q.steps.filter((Z,z)=>z!==A)})),j((Q)=>Math.max(0,Math.min(Q,(X?.steps.length??1)-1))),k("phases")},[X,A,P]),gJ=E.useCallback((Q)=>{if(!X||A<0)return;let Z=A+Q;if(Z<0||Z>=X.steps.length)return;P((z)=>{let G=[...z.steps],[b]=G.splice(A,1);return G.splice(Z,0,b),{...z,steps:G}}),j(Z+1)},[X,A,P]);if(e((Q,Z)=>{if(!X){if(Z.escape)U();return}if(V?.kind==="input")return;if(V?.kind==="confirmDelete"){if($(),O(null),Q==="y")jQ();return}if(V?.kind==="confirmDiscard"){if($(),O(null),Q==="y")U();return}if(V?.kind==="picker"){let z=(G)=>{$(),O((b)=>b?.kind==="picker"?G(b):b)};if(Z.upArrow)z((G)=>({...G,cursor:Math.max(0,G.cursor-1)}));else if(Z.downArrow)z((G)=>({...G,cursor:Math.min(G.options.length-1,G.cursor+1)}));else if(Q===" "&&V.multi)z((G)=>{let b=G.options[G.cursor];if(b===void 0)return G;let a=new Set(G.checked);if(a.has(b))a.delete(b);else a.add(b);return{...G,checked:a}});else if(Z.return)TQ(V);else if(Z.escape)$(),O(null);return}if(Q==="s"){bQ();return}if(Q==="p"){EQ();return}if(v==="fields"){if(Z.escape)$(),k("phases");else if(Z.upArrow)$(),L((z)=>Math.max(0,z-1));else if(Z.downArrow)$(),L((z)=>Math.min(YJ.length-1,z+1));else if(Z.return)SQ();return}if(Z.escape)if(R)$(),O({kind:"confirmDiscard"});else U();else if(Z.upArrow)$(),j((z)=>Math.max(0,z-1));else if(Z.downArrow)$(),j((z)=>Math.min(X.steps.length,z+1));else if(Z.return)$(),k("fields"),L(0);else if(Q==="a")$(),O({kind:"input",target:"addStep",value:"",cursor:0});else if(Q==="d"&&C>0)$(),O({kind:"confirmDelete"});else if(Q==="K")gJ(-1);else if(Q==="J")gJ(1)},{isActive:!0}),F)return _(N,{flexDirection:"column",paddingX:2,paddingTop:1,children:[_(M,{color:"error",children:["⚠ ",F]}),_(M,{dimColor:!0,children:["Esc to go back — fix the file by hand at .claudin/workflows/",J,"."]})]});if(!X)return q(N,{paddingX:2,paddingTop:1,children:q(M,{dimColor:!0,children:"Loading…"})});let $J=Math.max(6,H-6),r=wJ-4,o=Math.max(20,K-4-wJ-1-4-4),IQ=$J-2,GJ=(Q)=>Q?") ":" ",KJ=[];{let Q=n(`${GJ(C===0)}${X.name}`,r);KJ.push(ZJ(C===0?UJ(W.permission,Q):i.bold(Q),f(Q),r));let Z=` ${"─".repeat(Math.max(1,r-2))}`;KJ.push(ZJ(i.dim(Z),f(Z),r)),X.steps.forEach((z,G)=>{let b=C===G+1,a=n(`${GJ(b)}${z.name} ${z.agents.length}`,r);KJ.push(ZJ(b?UJ(W.permission,a):a,f(a),r))})}let fJ=V?.kind==="picker",VJ,NJ,vQ=" Prompt (p to edit) ",_J=[],mQ=kJ-2,hJ=Math.max(3,$J-kJ),cJ=hJ-2;if(fJ){let Q=V;VJ=Q.target==="main"?" main orchestrator ":` ${Q.target==="agents"?"agents":"hand back to"} · ${u?.name??X.name} `;let Z=$J-2,z=Math.max(0,Math.min(Q.cursor-Math.floor(Z/2),Q.options.length-Z));NJ=Q.options.slice(z,z+Z).map((G,b)=>{let XJ=z+b===Q.cursor,RJ=Q.multi?Q.checked.has(G)?"[x] ":"[ ] ":"",xJ=Q.target==="agents"&&h&&!h.has(G),MJ=n(`${GJ(XJ)}${RJ}${G}${xJ?" (unknown)":""}`,o),wQ=XJ?UJ(W.permission,MJ):xJ?UJ(W.error,MJ):MJ;return ZJ(wQ,f(MJ),o)})}else{VJ=C===0?` ${X.name} `:` phase: ${u?.name??""} `;let Q=(z)=>{if(z==="description")return X.description||"(empty)";if(z==="main")return X.main??"(default)";if(z==="name")return u?.name??"";if(z==="agents")return u?.agents.join(", ")||"(none)";return u?.handbackTo?.join(", ")??"—"};if(NJ=YJ.map((z,G)=>{let b=v==="fields"&&G===D,a=z==="handbackTo"?"handback":z,XJ=n(`${GJ(b)}${a}: ${Q(z)}`,o),RJ=b?UJ(W.permission,XJ):i.dim(XJ.slice(0,2+a.length+1))+XJ.slice(2+a.length+1);return ZJ(RJ,f(XJ),o)}),_J=(X.instructions?X.instructions.split(`
7
+ `):[]).slice(0,cJ).map((z)=>{let G=n(z,o);return ZJ(i.dim(G),f(G),o)}),_J.length===0)_J=[ZJ(i.dim("(empty — press p to write the prompt)"),f("(empty — press p to write the prompt)"),o)]}let QJ=V?.kind==="input"?V:null,yQ=QJ?.target==="addStep"?"New phase name:":QJ?.target==="name"?"Rename phase:":"Description:";return _(N,{flexDirection:"column",marginTop:1,children:[_(N,{flexDirection:"row",justifyContent:"space-between",children:[q(M,{bold:!0,color:"permission",wrap:"truncate",children:X.name}),q(M,{color:R?"warning":"success",wrap:"truncate",children:R?"● unsaved":"saved"})]}),_(N,{flexDirection:"row",marginTop:1,gap:1,children:[q(N,{flexDirection:"column",flexShrink:0,width:wJ,height:$J,overflow:"hidden",borderStyle:"round",borderColor:"subtle",paddingX:1,borderText:{content:" Phases ",position:"top",align:"start"},children:q(t,{lines:EJ(KJ,IQ,r),width:r})}),fJ?q(N,{flexDirection:"column",flexGrow:1,height:$J,overflow:"hidden",borderStyle:"round",borderColor:"subtle",paddingX:1,borderText:{content:VJ,position:"top",align:"start"},children:q(t,{lines:EJ(NJ,$J-2,o),width:o})}):_(N,{flexDirection:"column",flexGrow:1,children:[q(N,{flexDirection:"column",height:kJ,overflow:"hidden",borderStyle:"round",borderColor:"subtle",paddingX:1,borderText:{content:VJ,position:"top",align:"start"},children:q(t,{lines:EJ(NJ,mQ,o),width:o})}),q(N,{flexDirection:"column",height:hJ,overflow:"hidden",borderStyle:"round",borderColor:"subtle",paddingX:1,borderText:{content:vQ,position:"top",align:"start"},children:q(t,{lines:EJ(_J,cJ,o),width:o})})]})]}),QJ&&_(N,{flexDirection:"column",children:[q(M,{children:yQ}),q(N,{borderStyle:"round",borderDimColor:!0,paddingLeft:1,children:q(SJ,{value:QJ.value,onChange:(Q)=>O((Z)=>Z?.kind==="input"?{...Z,value:Q}:Z),onSubmit:()=>RQ(QJ.target,QJ.value),columns:80,cursorOffset:QJ.cursor,onChangeCursorOffset:(Q)=>O((Z)=>Z?.kind==="input"?{...Z,cursor:Q}:Z),showCursor:!0})}),q(M,{dimColor:!0,children:"Enter to confirm · empty + Enter to cancel"})]}),V?.kind==="confirmDelete"&&u&&_(M,{color:"warning",children:['Delete phase "',u.name,'"? (y/n)']}),V?.kind==="confirmDiscard"&&q(M,{color:"warning",children:"Discard unsaved changes? (y/n)"}),Y.length>0&&_(M,{color:"error",wrap:"truncate",children:["⚠ ",Y.join(" · ")]}),m&&q(M,{dimColor:!0,wrap:"truncate",children:m})]})}var E,wJ=26,kJ=7;var PQ=qJ(()=>{dJ();WJ();lJ();pJ();YQ();aJ();aQ();DJ();iQ();oJ();uJ();NQ();mJ();zQ();s();E=OJ(BJ(),1)});import{unlink as JX,writeFile as QX}from"fs/promises";import{join as HQ}from"path";function DQ({onRun:J,onInputActiveChange:U,onViewChange:K}){let[H,B]=p.useState([]),[W,X]=p.useState({}),[I,w]=p.useState(0),[S,F]=p.useState("list"),[g,R]=p.useState(""),[l,v]=p.useState(0),[k,C]=p.useState(null),[j,D]=p.useState(null),L=p.useCallback(()=>{OQ().then(({defs:Y,errorsByFile:P})=>{B(Y),X(P)}).catch((Y)=>x(Y))},[]);p.useEffect(L,[L]),p.useEffect(()=>{U(S!=="list")},[S,U]),p.useEffect(()=>{K?.(j!==null)},[j,K]);let V=H[Math.min(I,Math.max(0,H.length-1))],O=(Y)=>Y.sourceFile??`${Y.name}.md`,m=V?W[O(V)]:void 0,T=(Y)=>{R(""),v(0),C(null),F(Y)},h=()=>{if(V&&g.trim())J(V,g.trim());F("list")},c=async()=>{let Y=g.trim();if(!Y){F("list");return}try{let P=HQ(JJ(),`${Y}.md`);await QX(P,XX(Y)),L(),D(`${Y}.md`)}catch(P){x(P),C("Failed to create workflow.")}F("list")},$=async()=>{if(V)try{await JX(HQ(JJ(),O(V))),C(`Deleted ${V.name}.`),L()}catch(Y){x(Y),C("Failed to delete workflow.")}F("list")};if(e((Y,P)=>{if(j!==null)return;if(S==="confirmDelete"){if(Y==="y")$();else F("list");return}if(S!=="list")return;if(P.upArrow)w((A)=>Math.max(0,A-1));else if(P.downArrow)w((A)=>Math.min(H.length-1,A+1));else if(P.return&&V)T("task");else if(Y==="n")T("new");else if(Y==="d"&&V)F("confirmDelete");else if(Y==="e"&&V)C(null),D(O(V));else if(Y==="r")L()},{isActive:!0}),j!==null)return q(N,{paddingX:2,children:q(MQ,{sourceFile:j,onClose:()=>{D(null),L()}})});if(S==="task"||S==="new"){let Y=S==="task"?`Task for "${V?.name}":`:"New workflow name:";return _(N,{flexDirection:"column",paddingTop:1,paddingX:2,children:[q(zJ,{color:"permission"}),q(N,{marginTop:1,children:q(M,{children:Y})}),q(N,{borderStyle:"round",borderDimColor:!0,marginY:1,paddingLeft:1,children:q(SJ,{value:g,onChange:R,onSubmit:S==="task"?h:()=>void c(),columns:80,cursorOffset:l,onChangeCursorOffset:v,showCursor:!0})}),q(M,{dimColor:!0,children:"Enter to confirm · empty + Enter to cancel"})]})}return _(N,{flexDirection:"column",paddingTop:1,children:[q(zJ,{color:"permission"}),_(N,{flexDirection:"column",paddingX:2,marginTop:1,children:[H.length===0?q(M,{dimColor:!0,children:'No workflows. Press "n" to create one at .claudin/workflows/.'}):H.map((Y,P)=>{let A=Boolean(W[O(Y)]?.length);return _(M,{inverse:P===I,children:[P===I?"▸ ":" ",Y.name,A?" ⚠":""," ",_(M,{dimColor:!0,children:["· ",Y.steps.length," phases"]})]},Y.name)}),V&&_(N,{flexDirection:"column",marginTop:1,children:[q(M,{dimColor:!0,children:V.description}),V.steps.map((Y)=>_(M,{dimColor:!0,children:[" ",Y.name,": ",Y.agents.join(", ")||"(terminal)",Y.handbackTo?.length?` ↩ ${Y.handbackTo.join(",")}`:""]},Y.name)),m?.length?_(M,{color:"error",children:["⚠ ",m.join("; ")]}):null]}),S==="confirmDelete"&&V&&q(N,{marginTop:1,children:_(M,{color:"warning",children:['Delete "',V.name,'"? (y/n)']})}),k&&q(N,{marginTop:1,children:q(M,{dimColor:!0,children:k})})]})]})}var p,XX=(J)=>`---
8
+ name: ${J}
9
+ description: What this workflow does
10
+ steps:
11
+ - name: explore
12
+ agents: [explorer]
13
+ - name: synthesize
14
+ agents: [synthesizer]
15
+ handbackTo: [explore]
16
+ - name: done
17
+ ---
18
+ Describe the goal and any house rules for this workflow.
19
+ `;var LQ=qJ(()=>{WJ();YQ();DJ();iJ();NQ();mJ();PQ();s();p=OJ(BJ(),1)});function BQ({hint:J,onExit:U,escActive:K=!0}){let H=FQ();return AQ("confirm:no",U,{context:"Settings",isActive:K}),q(N,{marginLeft:2,marginTop:1,children:q(M,{dimColor:!0,children:H.pending?`Press ${H.keyName} again to exit`:J})})}function NZ({context:J,onExit:U,initialTab:K,initialRunId:H}){let[B,W]=d.useState(K??"library"),[X,I]=d.useState(null),[w,S]=d.useState(!1),[F,g]=d.useState(!1),[R,l]=d.useState(!1),v=d.useRef(null),k=d.useRef(!0);d.useEffect(()=>{return k.current=!0,()=>{k.current=!1}},[]);let C=J.canUseTool??UX,j=d.useCallback((O,m)=>{v.current?.abort();let T=new AbortController;v.current=T,W("running");let h={...J,setAppState:()=>{},setAppStateForTasks:J.setAppStateForTasks??J.setAppState};WQ({def:O,task:m,toolUseContext:h,canUseTool:C,signal:T.signal,onProgress:(c)=>{if(k.current)I({...c})}}).then((c)=>{if(k.current)I({...c});let $=(c.artifact||"").slice(0,2000);CQ({value:`<task-notification>
20
+ <status>${c.status}</status>
21
+ <summary>Workflow "${O.name}" ${c.status} (run ${c.runId})</summary>
22
+ <result>${$}</result>
23
+ </task-notification>`,mode:"task-notification"})}).catch((c)=>x(c))},[J,C]),D=d.useCallback(()=>{v.current?.abort()},[]);e((O,m)=>{if(m.tab||m.leftArrow)W((T)=>T==="running"?"library":"running");else if(m.rightArrow)W("running")},{isActive:!w&&!F&&!R});let L=_(N,{flexDirection:"row",gap:1,children:[q(M,{bold:!0,color:"permission",children:"Workflows"}),_(M,{bold:B==="running",inverse:B==="running",children:[" ","Running"," "]}),_(M,{bold:B==="library",inverse:B==="library",children:[" ","Library"," "]})]}),V=()=>U("Workflows dialog dismissed",{display:"system"});if(B==="running")return _(N,{flexDirection:"column",children:[!F&&L,q(QQ,{liveRun:X,onStop:D,initialRunId:H,onViewChange:g}),q(BQ,{hint:F?"↑↓ select · esc back · s save":"Tab tabs · ↑↓ select · Enter view · s save · x stop · d delete · Esc close",escActive:!F,onExit:V})]});return _(N,{flexDirection:"column",children:[!R&&L,q(DQ,{onRun:j,onInputActiveChange:S,onViewChange:l}),q(BQ,{hint:R?"↑↓ nav · Enter edit · a add · d del · K/J move · p prompt · s save · Esc back":"Tab tabs · ↑↓ select · Enter run · n new · e edit · d delete · Esc close",escActive:!R,onExit:V})]})}var d,UX=async(J,U)=>({behavior:"allow",updatedInput:U});var YX=qJ(()=>{WJ();$X();ZX();DJ();qX();zX();XQ();LQ();s();d=OJ(BJ(),1)});
24
+ export{NZ as Yb,YX as Zb};
@@ -0,0 +1,2 @@
1
+ import{ge as _,ie as v}from"./cli-1.0.8-693zfwne.mjs";import{Je as Z,Ke as P}from"./cli-1.0.8-x3bjpevp.mjs";import{Cx as K,Mx as Y,Ox as A,yx as X}from"./cli-1.0.8-ykwgcdbt.mjs";import{BX as V,EX as C}from"./cli-1.0.8-apm2cwth.mjs";import{o3 as H,q3 as Q}from"./cli-1.0.8-qzqze1a1.mjs";import{r3 as W}from"./cli-1.0.8-rna8rhza.mjs";import{Tfa as L,Ufa as U}from"./cli-1.0.8-s5kcxz2r.mjs";import{tra as B,xra as M}from"./cli-1.0.8-by017547.mjs";function x({children:q}){let{bindings:D}=Y(),F=J.useRef(null),E=J.useRef(new Map),G=J.useRef(new Set).current;return H(V,{bindings:D,pendingChordRef:F,pendingChord:null,setPendingChord:()=>{},activeContexts:G,registerActiveContext:()=>{},unregisterActiveContext:()=>{},handlerRegistryRef:E,children:q})}function y(q){if(!("message"in q))return 1;let D=q.message.content;return Array.isArray(D)?D.length:1}async function b(q,D,F,{columns:E,verbose:G=!1,chunkSize:I=40,onProgress:$}={}){let T=(w)=>_(H(X,{children:H(x,{children:H(Z,{messages:q,tools:D,commands:[],verbose:G,toolJSX:null,toolUseConfirmQueue:[],inProgressToolUseIDs:new Set,isMessageSelectorVisible:!1,conversationId:"export",screen:"prompt",streamingToolUses:[],showAllInTranscript:!0,isLoading:!1,renderRange:w})})}),E),N=I;for(let w of q)N+=y(w);for(let w=0;w<N;w+=I){let O=await T([w,w+I]);if(L(O).trim()==="")break;await F(O),$?.(w+I)}}async function l(q,D=[],F){let E=[];return await b(q,D,(G)=>void E.push(L(G)),{columns:F}),E.join("")}var J;var j=M(()=>{U();P();C();A();K();v();Q();J=B(W(),1)});
2
+ export{l as mc,j as nc};
@@ -0,0 +1 @@
1
+ import{tha as q,vha as A,wha as x,xha as B}from"./cli-1.0.8-74zbkhyt.mjs";import{_ia as J}from"./cli-1.0.8-z96bbp08.mjs";import{Xja as G}from"./cli-1.0.8-0w29g9sk.mjs";G();J();A();B();var F=x(()=>q.object({session_id:q.string(),ws_url:q.string(),work_dir:q.string().optional()}));
@@ -0,0 +1,2 @@
1
+ import{L9 as B,N9 as p}from"./cli-1.0.8-ke76gxzw.mjs";import{nia as C,qia as y}from"./cli-1.0.8-gmf61bcb.mjs";import{Wia as T,_ia as x,qja as V,tja as M}from"./cli-1.0.8-z96bbp08.mjs";import{Qja as L,Xja as c}from"./cli-1.0.8-0w29g9sk.mjs";y();M();p();c();x();function N(W){if(W<60000)return`${Math.round(W/1000)}s`;let Z=Math.floor(W/60000),z=Math.round(W%60000/1000);return z>0?`${Z}m ${z}s`:`${Z}m`}function h(W){let z=(W.startsWith("sk-ant-si-")?W.slice(10):W).split(".");if(z.length!==3||!z[1])return null;try{return T(Buffer.from(z[1],"base64url").toString("utf8"))}catch{return null}}function E(W){let Z=h(W);if(Z!==null&&typeof Z==="object"&&"exp"in Z&&typeof Z.exp==="number")return Z.exp;return null}var F=300000,j=1800000,H=3,R=60000;function I({getAccessToken:W,onRefresh:Z,label:z,refreshBufferMs:P=F}){let O=new Map,v=new Map,w=new Map;function U(q){let Q=(w.get(q)??0)+1;return w.set(q,Q),Q}function A(q,Q){let $=E(Q);if(!$){V(`[${z}:token] Could not decode JWT expiry for sessionId=${q}, token prefix=${Q.slice(0,15)}…, keeping existing timer`);return}let X=O.get(q);if(X)clearTimeout(X);let J=U(q),Y=new Date($*1000).toISOString(),G=$*1000-Date.now()-P;if(G<=0){V(`[${z}:token] Token for sessionId=${q} expires=${Y} (past or within buffer), refreshing immediately`),K(q,J);return}V(`[${z}:token] Scheduled token refresh for sessionId=${q} in ${N(G)} (expires=${Y}, buffer=${P/1000}s)`);let k=setTimeout(K,G,q,J);O.set(q,k)}function D(q,Q){let $=O.get(q);if($)clearTimeout($);let X=U(q),J=Math.max(Q*1000-P,30000);V(`[${z}:token] Scheduled token refresh for sessionId=${q} in ${N(J)} (expires_in=${Q}s, buffer=${P/1000}s)`);let Y=setTimeout(K,J,q,X);O.set(q,Y)}async function K(q,Q){let $;try{$=await W()}catch(J){V(`[${z}:token] getAccessToken threw for sessionId=${q}: ${L(J)}`,{level:"error"})}if(w.get(q)!==Q){V(`[${z}:token] doRefresh for sessionId=${q} stale (gen ${Q} vs ${w.get(q)}), skipping`);return}if(!$){let J=(v.get(q)??0)+1;if(v.set(q,J),V(`[${z}:token] No OAuth token available for refresh, sessionId=${q} (failure ${J}/${H})`,{level:"error"}),B("error","bridge_token_refresh_no_oauth"),J<H){let Y=setTimeout(K,R,q,Q);O.set(q,Y)}return}v.delete(q),V(`[${z}:token] Refreshing token for sessionId=${q}: new token prefix=${$.slice(0,15)}…`),C("tengu_bridge_token_refreshed",{}),Z(q,$);let X=setTimeout(K,j,q,Q);O.set(q,X),V(`[${z}:token] Scheduled follow-up refresh for sessionId=${q} in ${N(j)}`)}function S(q){U(q);let Q=O.get(q);if(Q)clearTimeout(Q),O.delete(q);v.delete(q)}function _(){for(let q of w.keys())U(q);for(let q of O.values())clearTimeout(q);O.clear(),v.clear()}return{schedule:A,scheduleFromExpiresIn:D,cancel:S,cancelAll:_}}
2
+ export{E as Pb,I as Qb};