@claudiolabs/claudin 1.1.38 → 1.1.39

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 (805) hide show
  1. package/dist/chunks/App-1.1.39-k3pzg19w.mjs +1 -0
  2. package/dist/chunks/ApproveApiKey-1.1.39-bycvt1g5.mjs +1 -0
  3. package/dist/chunks/AutoModeOptInDialog-1.1.39-4j00w97q.mjs +1 -0
  4. package/dist/chunks/BypassPermissionsModeDialog-1.1.39-38wypq07.mjs +1 -0
  5. package/dist/chunks/ClaudeMdExternalIncludesDialog-1.1.39-edm7rsre.mjs +1 -0
  6. package/dist/chunks/ConsoleOAuthFlow-1.1.39-my209qf5.mjs +1 -0
  7. package/dist/chunks/DiffDialog-1.1.39-dt5qmt50.mjs +6 -0
  8. package/dist/chunks/Doctor-1.1.39-kv2tpcs1.mjs +1 -0
  9. package/dist/chunks/ExplorerDialog-1.1.39-d5t22ss6.mjs +6 -0
  10. package/dist/chunks/ITermBackend-1.1.39-z3zx6y4m.mjs +1 -0
  11. package/dist/chunks/InvalidConfigDialog-1.1.39-nwstppyf.mjs +1 -0
  12. package/dist/chunks/InvalidSettingsDialog-1.1.39-pfjzxc4p.mjs +1 -0
  13. package/dist/chunks/MigrationDialog-1.1.39-3mpd0tbf.mjs +1 -0
  14. package/dist/chunks/Onboarding-1.1.39-r5976zwt.mjs +1 -0
  15. package/dist/chunks/ProviderManager-1.1.39-dzacd3pt.mjs +1 -0
  16. package/dist/chunks/REPL-1.1.39-ww7zvk7k.mjs +1 -0
  17. package/dist/chunks/ResumeConversation-1.1.39-mdn16ej3.mjs +1 -0
  18. package/dist/chunks/TeleportProgress-1.1.39-tnhzkmtn.mjs +1 -0
  19. package/dist/chunks/TeleportRepoMismatchDialog-1.1.39-vz4td3jg.mjs +1 -0
  20. package/dist/chunks/TeleportResumeWrapper-1.1.39-rfjygmym.mjs +1 -0
  21. package/dist/chunks/TmuxBackend-1.1.39-vbqywsj7.mjs +9 -0
  22. package/dist/chunks/ToolSearchTool-1.1.39-bb46mna1.mjs +1 -0
  23. package/dist/chunks/TrustDialog-1.1.39-b57dgsm7.mjs +1 -0
  24. package/dist/chunks/activeProvider-1.1.39-jgfyp0cs.mjs +1 -0
  25. package/dist/chunks/add-dir-1.1.39-1wp8d118.mjs +1 -0
  26. package/dist/chunks/agentTypes-1.1.39-0x20gy8e.mjs +1 -0
  27. package/dist/chunks/agents-1.1.39-b3k5kxn7.mjs +110 -0
  28. package/dist/chunks/agents-1.1.39-nt8wcmtp.mjs +3 -0
  29. package/dist/chunks/api-1.1.39-tn9g67g0.mjs +1 -0
  30. package/dist/chunks/asciicast-1.1.39-22byg1gm.mjs +1 -0
  31. package/dist/chunks/auth-1.1.39-1x1eer36.mjs +1 -0
  32. package/dist/chunks/auth-1.1.39-vz0zkq99.mjs +1 -0
  33. package/dist/chunks/autoMode-1.1.39-sjezrxh7.mjs +52 -0
  34. package/dist/chunks/autoModeSetup-1.1.39-e6gvda2k.mjs +44 -0
  35. package/dist/chunks/autoUpdater-1.1.39-cz95xv2n.mjs +1 -0
  36. package/dist/chunks/backgroundHousekeeping-1.1.39-vsn9w5k2.mjs +1 -0
  37. package/dist/chunks/branch-1.1.39-e0ww5bkp.mjs +4 -0
  38. package/dist/chunks/bridge-1.1.39-k5vb0mmb.mjs +2 -0
  39. package/dist/chunks/bridgeConfig-1.1.39-6czf6nvj.mjs +1 -0
  40. package/dist/chunks/bridgeEnabled-1.1.39-crv4d7xn.mjs +1 -0
  41. package/dist/chunks/bridgeMain-1.1.39-488k7mc8.mjs +64 -0
  42. package/dist/chunks/bridgePointer-1.1.39-xb9s18xx.mjs +1 -0
  43. package/dist/chunks/btw-1.1.39-n1psbg89.mjs +1 -0
  44. package/dist/chunks/buddy-1.1.39-ms13d421.mjs +3 -0
  45. package/dist/chunks/cache-probe-1.1.39-j0aybz93.mjs +21 -0
  46. package/dist/chunks/cacheStats-1.1.39-dg202ye5.mjs +4 -0
  47. package/dist/chunks/caches-1.1.39-v3nps0e9.mjs +1 -0
  48. package/dist/chunks/cd-1.1.39-awhhtq1z.mjs +3 -0
  49. package/dist/chunks/claudeDesktop-1.1.39-azj9es6w.mjs +1 -0
  50. package/dist/chunks/claudemd-1.1.39-7a02xhkm.mjs +1 -0
  51. package/dist/chunks/clear-1.1.39-k197h5f0.mjs +1 -0
  52. package/dist/chunks/clearTerminal-1.1.39-twgf5kky.mjs +1 -0
  53. package/dist/chunks/cli-1.1.39-01qgb22d.mjs +4 -0
  54. package/dist/chunks/cli-1.1.39-07d1v3y9.mjs +2 -0
  55. package/dist/chunks/cli-1.1.39-0k9p4g5p.mjs +2 -0
  56. package/dist/chunks/cli-1.1.39-0mtb82ww.mjs +2 -0
  57. package/dist/chunks/cli-1.1.39-0rsjfyh1.mjs +9 -0
  58. package/dist/chunks/cli-1.1.39-0s0eqwsn.mjs +2 -0
  59. package/dist/chunks/cli-1.1.39-10wrcybe.mjs +2 -0
  60. package/dist/chunks/cli-1.1.39-111vm2e1.mjs +24 -0
  61. package/dist/chunks/cli-1.1.39-14jxs3k5.mjs +3 -0
  62. package/dist/chunks/cli-1.1.39-15jr1t97.mjs +2 -0
  63. package/dist/chunks/cli-1.1.39-17mj2gq0.mjs +2 -0
  64. package/dist/chunks/cli-1.1.39-1es853x9.mjs +2 -0
  65. package/dist/chunks/cli-1.1.39-1m7bzjpd.mjs +2 -0
  66. package/dist/chunks/cli-1.1.39-1mpe0mv2.mjs +17 -0
  67. package/dist/chunks/cli-1.1.39-1q43eavk.mjs +4 -0
  68. package/dist/chunks/cli-1.1.39-1r1cbvk8.mjs +2 -0
  69. package/dist/chunks/cli-1.1.39-1tcqp8ky.mjs +2 -0
  70. package/dist/chunks/cli-1.1.39-1wg6zvk6.mjs +2 -0
  71. package/dist/chunks/cli-1.1.39-1yysfg6y.mjs +2 -0
  72. package/dist/chunks/cli-1.1.39-212q1ba2.mjs +2 -0
  73. package/dist/chunks/cli-1.1.39-24z9gjkg.mjs +6 -0
  74. package/dist/chunks/cli-1.1.39-2gzgjcxr.mjs +6 -0
  75. package/dist/chunks/cli-1.1.39-2hgsp1ry.mjs +2 -0
  76. package/dist/chunks/cli-1.1.39-2k0w4c3v.mjs +6 -0
  77. package/dist/chunks/cli-1.1.39-2vf0yc3g.mjs +2 -0
  78. package/dist/chunks/cli-1.1.39-2x3kj4gh.mjs +2 -0
  79. package/dist/chunks/cli-1.1.39-2xmkpvn8.mjs +2 -0
  80. package/dist/chunks/cli-1.1.39-31e9rw45.mjs +2 -0
  81. package/dist/chunks/cli-1.1.39-3g0p54p8.mjs +2 -0
  82. package/dist/chunks/cli-1.1.39-3mghgnn1.mjs +24 -0
  83. package/dist/chunks/cli-1.1.39-3yy2wxqa.mjs +24 -0
  84. package/dist/chunks/cli-1.1.39-4bdssx8e.mjs +2 -0
  85. package/dist/chunks/cli-1.1.39-4he45b53.mjs +2 -0
  86. package/dist/chunks/cli-1.1.39-4p4c56cn.mjs +2 -0
  87. package/dist/chunks/cli-1.1.39-4w5sz267.mjs +2 -0
  88. package/dist/chunks/cli-1.1.39-52k1fj82.mjs +2 -0
  89. package/dist/chunks/cli-1.1.39-5gdtmek1.mjs +2 -0
  90. package/dist/chunks/cli-1.1.39-5ge6mqxz.mjs +63 -0
  91. package/dist/chunks/cli-1.1.39-5h7tfgqc.mjs +2 -0
  92. package/dist/chunks/cli-1.1.39-5r6zjkfz.mjs +2 -0
  93. package/dist/chunks/cli-1.1.39-5t4113gt.mjs +2 -0
  94. package/dist/chunks/cli-1.1.39-5xkhxv1a.mjs +2 -0
  95. package/dist/chunks/cli-1.1.39-5yxt37n7.mjs +2 -0
  96. package/dist/chunks/cli-1.1.39-5zc15zgx.mjs +2 -0
  97. package/dist/chunks/cli-1.1.39-6pkc868v.mjs +2 -0
  98. package/dist/chunks/cli-1.1.39-6y7dsvjs.mjs +2 -0
  99. package/dist/chunks/cli-1.1.39-70t1q2pm.mjs +2 -0
  100. package/dist/chunks/cli-1.1.39-75gxbxsn.mjs +7 -0
  101. package/dist/chunks/cli-1.1.39-7ck7pqh0.mjs +2 -0
  102. package/dist/chunks/cli-1.1.39-7d9k8cma.mjs +2 -0
  103. package/dist/chunks/cli-1.1.39-7hm6zgk1.mjs +15 -0
  104. package/dist/chunks/cli-1.1.39-7jhstkb2.mjs +2 -0
  105. package/dist/chunks/cli-1.1.39-7kjnzaa8.mjs +2 -0
  106. package/dist/chunks/cli-1.1.39-7tchegvs.mjs +5 -0
  107. package/dist/chunks/cli-1.1.39-7tgaawmj.mjs +2 -0
  108. package/dist/chunks/cli-1.1.39-7xc1qp70.mjs +2 -0
  109. package/dist/chunks/cli-1.1.39-89e5xfsc.mjs +2 -0
  110. package/dist/chunks/cli-1.1.39-8e62hz1p.mjs +3 -0
  111. package/dist/chunks/cli-1.1.39-8gscnd8w.mjs +2 -0
  112. package/dist/chunks/cli-1.1.39-8jw8s604.mjs +2 -0
  113. package/dist/chunks/cli-1.1.39-8k3rh435.mjs +2 -0
  114. package/dist/chunks/cli-1.1.39-8xf0xfkw.mjs +2 -0
  115. package/dist/chunks/cli-1.1.39-905jk7a7.mjs +133 -0
  116. package/dist/chunks/cli-1.1.39-9afxesb0.mjs +3 -0
  117. package/dist/chunks/cli-1.1.39-9bh2t20k.mjs +3 -0
  118. package/dist/chunks/cli-1.1.39-9dfw3wt9.mjs +2 -0
  119. package/dist/chunks/cli-1.1.39-9j9vfcg0.mjs +10 -0
  120. package/dist/chunks/cli-1.1.39-9qsdqnm7.mjs +6 -0
  121. package/dist/chunks/cli-1.1.39-9yg363zk.mjs +2 -0
  122. package/dist/chunks/cli-1.1.39-a1rc9y55.mjs +3 -0
  123. package/dist/chunks/cli-1.1.39-a40ak4sd.mjs +2 -0
  124. package/dist/chunks/cli-1.1.39-ay2p31kb.mjs +39 -0
  125. package/dist/chunks/cli-1.1.39-b1gewbgs.mjs +2 -0
  126. package/dist/chunks/cli-1.1.39-b314axe0.mjs +2 -0
  127. package/dist/chunks/cli-1.1.39-b3geta93.mjs +21 -0
  128. package/dist/chunks/cli-1.1.39-bd66bjj3.mjs +2 -0
  129. package/dist/chunks/cli-1.1.39-brzpjtja.mjs +2 -0
  130. package/dist/chunks/cli-1.1.39-c4c832m5.mjs +2 -0
  131. package/dist/chunks/cli-1.1.39-c6mm3w1n.mjs +135 -0
  132. package/dist/chunks/cli-1.1.39-c86mbrv2.mjs +2 -0
  133. package/dist/chunks/cli-1.1.39-chveh83h.mjs +2 -0
  134. package/dist/chunks/cli-1.1.39-cjc01sak.mjs +2 -0
  135. package/dist/chunks/cli-1.1.39-ck0k3rxx.mjs +2 -0
  136. package/dist/chunks/cli-1.1.39-ckty7bt1.mjs +2 -0
  137. package/dist/chunks/cli-1.1.39-cq5nwqfw.mjs +2 -0
  138. package/dist/chunks/cli-1.1.39-cvbzp08c.mjs +2 -0
  139. package/dist/chunks/cli-1.1.39-cyx7zw76.mjs +50 -0
  140. package/dist/chunks/cli-1.1.39-czh4aj72.mjs +4 -0
  141. package/dist/chunks/cli-1.1.39-d25xsy5x.mjs +2 -0
  142. package/dist/chunks/cli-1.1.39-dfrms96j.mjs +2 -0
  143. package/dist/chunks/cli-1.1.39-djtdv45d.mjs +4 -0
  144. package/dist/chunks/cli-1.1.39-dm5rqr07.mjs +8 -0
  145. package/dist/chunks/cli-1.1.39-dvfdgp8r.mjs +2 -0
  146. package/dist/chunks/cli-1.1.39-dwfknzds.mjs +2 -0
  147. package/dist/chunks/cli-1.1.39-dwgjp6zp.mjs +2 -0
  148. package/dist/chunks/cli-1.1.39-e4p7vgrg.mjs +2 -0
  149. package/dist/chunks/cli-1.1.39-e98w7pr4.mjs +2 -0
  150. package/dist/chunks/cli-1.1.39-en8a3nq6.mjs +11 -0
  151. package/dist/chunks/cli-1.1.39-epktaska.mjs +3 -0
  152. package/dist/chunks/cli-1.1.39-esp4w3m4.mjs +2 -0
  153. package/dist/chunks/cli-1.1.39-evs7a20p.mjs +9 -0
  154. package/dist/chunks/cli-1.1.39-eyp8d7vv.mjs +2 -0
  155. package/dist/chunks/cli-1.1.39-f0wf0m0n.mjs +2 -0
  156. package/dist/chunks/cli-1.1.39-f1schffw.mjs +25 -0
  157. package/dist/chunks/cli-1.1.39-f2qc1x1n.mjs +2 -0
  158. package/dist/chunks/cli-1.1.39-f5azyvet.mjs +2 -0
  159. package/dist/chunks/cli-1.1.39-fka8qdkr.mjs +2 -0
  160. package/dist/chunks/cli-1.1.39-fm08hbtj.mjs +2 -0
  161. package/dist/chunks/cli-1.1.39-fqsaf1st.mjs +2 -0
  162. package/dist/chunks/cli-1.1.39-g751n1kp.mjs +2 -0
  163. package/dist/chunks/cli-1.1.39-g7mbr2ky.mjs +2 -0
  164. package/dist/chunks/cli-1.1.39-g9rcf6cw.mjs +2 -0
  165. package/dist/chunks/cli-1.1.39-ghja51c5.mjs +2 -0
  166. package/dist/chunks/cli-1.1.39-gnkk8fs7.mjs +2 -0
  167. package/dist/chunks/cli-1.1.39-gtm67f9z.mjs +2 -0
  168. package/dist/chunks/cli-1.1.39-h06axtf8.mjs +4 -0
  169. package/dist/chunks/cli-1.1.39-h8ahn5vw.mjs +2 -0
  170. package/dist/chunks/cli-1.1.39-h90nz8dv.mjs +2 -0
  171. package/dist/chunks/cli-1.1.39-ha8fn1m0.mjs +2 -0
  172. package/dist/chunks/cli-1.1.39-hgm87yas.mjs +10 -0
  173. package/dist/chunks/cli-1.1.39-j6nvja1z.mjs +2 -0
  174. package/dist/chunks/cli-1.1.39-jmh4b6db.mjs +2 -0
  175. package/dist/chunks/cli-1.1.39-jncrq8d3.mjs +2 -0
  176. package/dist/chunks/cli-1.1.39-jq1a84j4.mjs +2 -0
  177. package/dist/chunks/cli-1.1.39-k8n2ksgh.mjs +2 -0
  178. package/dist/chunks/cli-1.1.39-kcq7gw24.mjs +60 -0
  179. package/dist/chunks/cli-1.1.39-kfztpa2h.mjs +2 -0
  180. package/dist/chunks/cli-1.1.39-kkgyntg1.mjs +7 -0
  181. package/dist/chunks/cli-1.1.39-kw258d7x.mjs +4 -0
  182. package/dist/chunks/cli-1.1.39-mhv15208.mjs +2 -0
  183. package/dist/chunks/cli-1.1.39-ms0zz1pq.mjs +2 -0
  184. package/dist/chunks/cli-1.1.39-mtdpf384.mjs +2 -0
  185. package/dist/chunks/cli-1.1.39-n8j5q839.mjs +2 -0
  186. package/dist/chunks/cli-1.1.39-nc39g50q.mjs +2 -0
  187. package/dist/chunks/cli-1.1.39-nde8mxzw.mjs +2 -0
  188. package/dist/chunks/cli-1.1.39-ne2jz4j1.mjs +12 -0
  189. package/dist/chunks/cli-1.1.39-nhgqks5q.mjs +2 -0
  190. package/dist/chunks/cli-1.1.39-nk9xnj41.mjs +2 -0
  191. package/dist/chunks/cli-1.1.39-nkv70wmc.mjs +10 -0
  192. package/dist/chunks/cli-1.1.39-nmm4w3bh.mjs +16 -0
  193. package/dist/chunks/cli-1.1.39-nnc7eg6p.mjs +2 -0
  194. package/dist/chunks/cli-1.1.39-nsgjkze0.mjs +2 -0
  195. package/dist/chunks/cli-1.1.39-nxv718fh.mjs +3 -0
  196. package/dist/chunks/cli-1.1.39-p2sg5g92.mjs +250 -0
  197. package/dist/chunks/cli-1.1.39-pc9dgxhx.mjs +5 -0
  198. package/dist/chunks/cli-1.1.39-q8q90rxq.mjs +2 -0
  199. package/dist/chunks/cli-1.1.39-rfkva6dd.mjs +42 -0
  200. package/dist/chunks/cli-1.1.39-rhqy2d5w.mjs +2 -0
  201. package/dist/chunks/cli-1.1.39-rjxm15hw.mjs +2 -0
  202. package/dist/chunks/cli-1.1.39-rp6sehng.mjs +3 -0
  203. package/dist/chunks/cli-1.1.39-rprv5zq8.mjs +25 -0
  204. package/dist/chunks/cli-1.1.39-rqs6bqnm.mjs +2 -0
  205. package/dist/chunks/cli-1.1.39-rxpy9zgc.mjs +2 -0
  206. package/dist/chunks/cli-1.1.39-s4g9xyv5.mjs +2 -0
  207. package/dist/chunks/cli-1.1.39-srjkdp3j.mjs +2 -0
  208. package/dist/chunks/cli-1.1.39-swktejeb.mjs +2 -0
  209. package/dist/chunks/cli-1.1.39-t2jqv0s9.mjs +2 -0
  210. package/dist/chunks/cli-1.1.39-t4a22cet.mjs +6 -0
  211. package/dist/chunks/cli-1.1.39-tc87f2ta.mjs +2 -0
  212. package/dist/chunks/cli-1.1.39-tjpdjpp5.mjs +15 -0
  213. package/dist/chunks/cli-1.1.39-tveshzdb.mjs +2 -0
  214. package/dist/chunks/cli-1.1.39-v92y62n9.mjs +2 -0
  215. package/dist/chunks/cli-1.1.39-vh86jjp2.mjs +4 -0
  216. package/dist/chunks/cli-1.1.39-vhqah8m7.mjs +2 -0
  217. package/dist/chunks/cli-1.1.39-vtt2tmb9.mjs +18 -0
  218. package/dist/chunks/cli-1.1.39-wdctfdbb.mjs +4 -0
  219. package/dist/chunks/cli-1.1.39-whzghgxz.mjs +2 -0
  220. package/dist/chunks/cli-1.1.39-x6jkg8mf.mjs +20 -0
  221. package/dist/chunks/cli-1.1.39-xg4cr6x8.mjs +2 -0
  222. package/dist/chunks/cli-1.1.39-xm6k98xf.mjs +2 -0
  223. package/dist/chunks/cli-1.1.39-xyddt40c.mjs +2 -0
  224. package/dist/chunks/cli-1.1.39-y341qw3m.mjs +2 -0
  225. package/dist/chunks/cli-1.1.39-yjwk9mw8.mjs +2 -0
  226. package/dist/chunks/cli-1.1.39-ypma7nx9.mjs +2 -0
  227. package/dist/chunks/cli-1.1.39-ytvr80fj.mjs +15 -0
  228. package/dist/chunks/cli-1.1.39-yyqx9zb5.mjs +5522 -0
  229. package/dist/chunks/cli-1.1.39-z1akavz2.mjs +2 -0
  230. package/dist/chunks/cli-1.1.39-z21b507j.mjs +2 -0
  231. package/dist/chunks/cli-1.1.39-z6fepfnh.mjs +2 -0
  232. package/dist/chunks/cli-1.1.39-z8ts6axr.mjs +2 -0
  233. package/dist/chunks/cli-1.1.39-zc1b8zf6.mjs +2 -0
  234. package/dist/chunks/cli-1.1.39-zdsdsv4h.mjs +3 -0
  235. package/dist/chunks/cli-1.1.39-zfb5hcs0.mjs +34 -0
  236. package/dist/chunks/client-1.1.39-zrdzybfj.mjs +1 -0
  237. package/dist/chunks/color-1.1.39-qsgg6xt0.mjs +1 -0
  238. package/dist/chunks/compact-1.1.39-ye5nj18m.mjs +2 -0
  239. package/dist/chunks/config-1.1.39-cfgcj726.mjs +1 -0
  240. package/dist/chunks/config-1.1.39-nsgxmahr.mjs +1 -0
  241. package/dist/chunks/constants-1.1.39-s4anaxa3.mjs +1 -0
  242. package/dist/chunks/context-1.1.39-a93qe83k.mjs +1 -0
  243. package/dist/chunks/context-noninteractive-1.1.39-2428zhce.mjs +1 -0
  244. package/dist/chunks/conversation-1.1.39-x581tx1z.mjs +1 -0
  245. package/dist/chunks/copilotHeaders-1.1.39-bnzefwe6.mjs +1 -0
  246. package/dist/chunks/copy-1.1.39-tqab4hm1.mjs +9 -0
  247. package/dist/chunks/cost-1.1.39-ak71khd3.mjs +1 -0
  248. package/dist/chunks/createSession-1.1.39-yv7a37ye.mjs +1 -0
  249. package/dist/chunks/debug-1.1.39-50dvjcn3.mjs +1 -0
  250. package/dist/chunks/defaultActionDeps-1.1.39-483fm6xk.mjs +1458 -0
  251. package/dist/chunks/desktop-1.1.39-hbx627a1.mjs +2 -0
  252. package/dist/chunks/detectRepository-1.1.39-nq1yyp24.mjs +1 -0
  253. package/dist/chunks/detection-1.1.39-myz8dcyc.mjs +1 -0
  254. package/dist/chunks/diff-1.1.39-zwwd0sxq.mjs +1 -0
  255. package/dist/chunks/doctor-1.1.39-bw8w0sdj.mjs +1 -0
  256. package/dist/chunks/doctorDiagnostic-1.1.39-x9azkqjy.mjs +1 -0
  257. package/dist/chunks/earlyInput-1.1.39-3wtxyym8.mjs +1 -0
  258. package/dist/chunks/effort-1.1.39-4r28x4kv.mjs +13 -0
  259. package/dist/chunks/engine-1.1.39-jjwgtndr.mjs +1 -0
  260. package/dist/chunks/envUtils-1.1.39-azqd5ff8.mjs +1 -0
  261. package/dist/chunks/errors-1.1.39-z6wpc1z1.mjs +1 -0
  262. package/dist/chunks/exampleCommands-1.1.39-fhwx5xxp.mjs +1 -0
  263. package/dist/chunks/execFileNoThrow-1.1.39-raa250pr.mjs +1 -0
  264. package/dist/chunks/exit-1.1.39-vwjekv6v.mjs +1 -0
  265. package/dist/chunks/explorer-1.1.39-rs5cjdex.mjs +1 -0
  266. package/dist/chunks/export-1.1.39-eg5q8fpq.mjs +2 -0
  267. package/dist/chunks/fast-1.1.39-j8zrdcv9.mjs +1 -0
  268. package/dist/chunks/feedback-1.1.39-tt17q1d1.mjs +16 -0
  269. package/dist/chunks/git-1.1.39-hf1cm8nf.mjs +1 -0
  270. package/dist/chunks/githubModelsCredentials-1.1.39-yb2392an.mjs +1 -0
  271. package/dist/chunks/goal-1.1.39-6q6twvx9.mjs +4 -0
  272. package/dist/chunks/headless-1.1.39-e745sf98.mjs +2 -0
  273. package/dist/chunks/heapdump-1.1.39-1mf2vt2g.mjs +6 -0
  274. package/dist/chunks/help-1.1.39-szdr1nvx.mjs +1 -0
  275. package/dist/chunks/hooks-1.1.39-5pws6gsg.mjs +79 -0
  276. package/dist/chunks/hooks-1.1.39-6tz18s8r.mjs +1 -0
  277. package/dist/chunks/ide-1.1.39-nk0vmfg1.mjs +3 -0
  278. package/dist/chunks/image-processor-napi-1.1.39-rx4ypf8k.mjs +1 -0
  279. package/dist/chunks/import-1.1.39-eyddkf9v.mjs +260 -0
  280. package/dist/chunks/inboundAttachments-1.1.39-g0fjztwj.mjs +1 -0
  281. package/dist/chunks/index-1.1.39-1wfhz9pz.mjs +1 -0
  282. package/dist/chunks/index-1.1.39-27vjd0t1.mjs +1 -0
  283. package/dist/chunks/index-1.1.39-3mp0kdhv.mjs +1 -0
  284. package/dist/chunks/index-1.1.39-aj2fb3nf.mjs +30 -0
  285. package/dist/chunks/index-1.1.39-ajb8kk03.mjs +1 -0
  286. package/dist/chunks/index-1.1.39-bznxqgpz.mjs +1 -0
  287. package/dist/chunks/index-1.1.39-cf96agzw.mjs +2 -0
  288. package/dist/chunks/index-1.1.39-d4j661cs.mjs +1 -0
  289. package/dist/chunks/index-1.1.39-dapcfrje.mjs +1 -0
  290. package/dist/chunks/index-1.1.39-e9fjpss8.mjs +1 -0
  291. package/dist/chunks/index-1.1.39-eg0vw6jg.mjs +1 -0
  292. package/dist/chunks/index-1.1.39-eqm0e7bk.mjs +1 -0
  293. package/dist/chunks/index-1.1.39-frzv879p.mjs +23 -0
  294. package/dist/chunks/index-1.1.39-fthy3yb2.mjs +1 -0
  295. package/dist/chunks/index-1.1.39-h7tvkmm7.mjs +9 -0
  296. package/dist/chunks/index-1.1.39-hn7czx81.mjs +5 -0
  297. package/dist/chunks/index-1.1.39-jeg0xvtv.mjs +1 -0
  298. package/dist/chunks/index-1.1.39-qh6j97r3.mjs +2 -0
  299. package/dist/chunks/index-1.1.39-szfdrv3c.mjs +9 -0
  300. package/dist/chunks/index-1.1.39-t358fdhx.mjs +1 -0
  301. package/dist/chunks/index-1.1.39-w73ez3fh.mjs +1 -0
  302. package/dist/chunks/index-1.1.39-xcj56xfg.mjs +1 -0
  303. package/dist/chunks/index-1.1.39-zy7eyf9r.mjs +1 -0
  304. package/dist/chunks/init-1.1.39-fm3907f2.mjs +2 -0
  305. package/dist/chunks/initReplBridge-1.1.39-76qw9tbk.mjs +1 -0
  306. package/dist/chunks/ink-1.1.39-f9cyw022.mjs +1 -0
  307. package/dist/chunks/insights-1.1.39-ee2ra979.mjs +870 -0
  308. package/dist/chunks/install-1.1.39-1hv4f4fk.mjs +1 -0
  309. package/dist/chunks/install-github-app-1.1.39-tg2jfpvx.mjs +149 -0
  310. package/dist/chunks/install-slack-app-1.1.39-69fgekh2.mjs +1 -0
  311. package/dist/chunks/interactiveHelpers-1.1.39-5caf0pb7.mjs +1 -0
  312. package/dist/chunks/latestVersionCache-1.1.39-31bygz1b.mjs +1 -0
  313. package/dist/chunks/loadAgentsDir-1.1.39-1jtdv1bq.mjs +1 -0
  314. package/dist/chunks/loadPluginHooks-1.1.39-4xw48447.mjs +1 -0
  315. package/dist/chunks/log-1.1.39-50bfm8j0.mjs +1 -0
  316. package/dist/chunks/main-1.1.39-f3n951kv.mjs +1 -0
  317. package/dist/chunks/managedEnv-1.1.39-bwtexcjv.mjs +1 -0
  318. package/dist/chunks/mcp-1.1.39-15sz3hsq.mjs +1 -0
  319. package/dist/chunks/mcp-1.1.39-h4h304ze.mjs +4 -0
  320. package/dist/chunks/mcp-1.1.39-rdsgsc15.mjs +17 -0
  321. package/dist/chunks/mcpb-1.1.39-5qywjc26.mjs +1 -0
  322. package/dist/chunks/memory-1.1.39-8edv180p.mjs +128 -0
  323. package/dist/chunks/model-1.1.39-95b780x9.mjs +2 -0
  324. package/dist/chunks/model-1.1.39-a5xmtpbv.mjs +1 -0
  325. package/dist/chunks/new-1.1.39-9476r8p1.mjs +1 -0
  326. package/dist/chunks/node-1.1.39-pqhskkn0.mjs +15 -0
  327. package/dist/chunks/node-1.1.39-xgvdgvgj.mjs +1 -0
  328. package/dist/chunks/oauth-1.1.39-5h69g0mf.mjs +1 -0
  329. package/dist/chunks/openaiShim-1.1.39-jnp9fkcv.mjs +14 -0
  330. package/dist/chunks/output-style-1.1.39-e5qsw51y.mjs +1 -0
  331. package/dist/chunks/package-V72LKFNW-1.1.39-0gcw2fkh.mjs +1 -0
  332. package/dist/chunks/permissions-1.1.39-0m2h5ctr.mjs +3 -0
  333. package/dist/chunks/permissions-1.1.39-djt32qkn.mjs +1 -0
  334. package/dist/chunks/plan-1.1.39-qcq9a7rg.mjs +1 -0
  335. package/dist/chunks/plist-1.1.39-esb4db3e.mjs +1 -0
  336. package/dist/chunks/plugin-1.1.39-xztkvc83.mjs +29 -0
  337. package/dist/chunks/pluginStartupCheck-1.1.39-pzynd625.mjs +1 -0
  338. package/dist/chunks/plugins-1.1.39-2vnnwfwq.mjs +9 -0
  339. package/dist/chunks/preActionHook-1.1.39-w6ay049g.mjs +2 -0
  340. package/dist/chunks/print-1.1.39-m20hre3d.mjs +57 -0
  341. package/dist/chunks/process-1.1.39-7pp4m6p6.mjs +1 -0
  342. package/dist/chunks/processBashCommand-1.1.39-z8xyxzeb.mjs +1 -0
  343. package/dist/chunks/processSlashCommand-1.1.39-025rdqc4.mjs +9 -0
  344. package/dist/chunks/prompt-1.1.39-8cves1th.mjs +1 -0
  345. package/dist/chunks/prompt-1.1.39-vys3tszv.mjs +1 -0
  346. package/dist/chunks/prompts-1.1.39-agk5ys12.mjs +1 -0
  347. package/dist/chunks/provider-1.1.39-ezn3013z.mjs +2 -0
  348. package/dist/chunks/providerProfiles-1.1.39-c20aqfkp.mjs +1 -0
  349. package/dist/chunks/providerValidation-1.1.39-5bwc03ac.mjs +6 -0
  350. package/dist/chunks/registerSubcommands-1.1.39-tg42q4mt.mjs +26 -0
  351. package/dist/chunks/registry-1.1.39-69kg9048.mjs +1 -0
  352. package/dist/chunks/release-notes-1.1.39-vm602996.mjs +5 -0
  353. package/dist/chunks/reload-plugins-1.1.39-hq5jb4fe.mjs +2 -0
  354. package/dist/chunks/remote-env-1.1.39-b742xwt8.mjs +1 -0
  355. package/dist/chunks/rename-1.1.39-37583s4r.mjs +1 -0
  356. package/dist/chunks/replLauncher-1.1.39-x7vm725e.mjs +1 -0
  357. package/dist/chunks/resume-1.1.39-7x78pwef.mjs +2 -0
  358. package/dist/chunks/rewind-1.1.39-36y4s8ng.mjs +1 -0
  359. package/dist/chunks/rootOptions-1.1.39-ns1nx8k9.mjs +1 -0
  360. package/dist/chunks/runWorkflowHeadless-1.1.39-8p1cbkrx.mjs +10 -0
  361. package/dist/chunks/sandbox-adapter-1.1.39-bt6cm9af.mjs +1 -0
  362. package/dist/chunks/sandbox-toggle-1.1.39-a3p74qsk.mjs +1 -0
  363. package/dist/chunks/session-1.1.39-qgpx4589.mjs +2 -0
  364. package/dist/chunks/sessionStorage-1.1.39-fp105vvb.mjs +1 -0
  365. package/dist/chunks/settings-1.1.39-qe258cgb.mjs +1 -0
  366. package/dist/chunks/setup-1.1.39-4zjv96k3.mjs +12 -0
  367. package/dist/chunks/sinks-1.1.39-6xx75cg6.mjs +1 -0
  368. package/dist/chunks/skills-1.1.39-2d5tfynf.mjs +1 -0
  369. package/dist/chunks/startupProfiler-1.1.39-jcvdrk17.mjs +1 -0
  370. package/dist/chunks/startupUpdateCheck-1.1.39-43maz2ha.mjs +1 -0
  371. package/dist/chunks/state-1.1.39-4sbpam9q.mjs +1 -0
  372. package/dist/chunks/stats-1.1.39-8p35mm3v.mjs +1 -0
  373. package/dist/chunks/status-1.1.39-1qcsfp99.mjs +1 -0
  374. package/dist/chunks/stickers-1.1.39-hppwbrtb.mjs +1 -0
  375. package/dist/chunks/subprocessEnv-1.1.39-hp2bbefp.mjs +1 -0
  376. package/dist/chunks/tasks-1.1.39-qs8xddg1.mjs +1 -0
  377. package/dist/chunks/teamHelpers-1.1.39-qnvqd2j1.mjs +1 -0
  378. package/dist/chunks/teammateModeSnapshot-1.1.39-pr2vnqzw.mjs +1 -0
  379. package/dist/chunks/teleport-1.1.39-zt8tze77.mjs +1 -0
  380. package/dist/chunks/terminalSetup-1.1.39-715qq4cf.mjs +1 -0
  381. package/dist/chunks/theme-1.1.39-gnxdfpcb.mjs +1 -0
  382. package/dist/chunks/toolPool-1.1.39-77884kvy.mjs +1 -0
  383. package/dist/chunks/toolSearch-1.1.39-b2k8yjaz.mjs +1 -0
  384. package/dist/chunks/tools-1.1.39-7nbe7hrf.mjs +1 -0
  385. package/dist/chunks/turndown.cjs-1.1.39-h0gz7em7.mjs +69 -0
  386. package/dist/chunks/types-1.1.39-jcqnbyss.mjs +1 -0
  387. package/dist/chunks/update-1.1.39-1w75psfh.mjs +72 -0
  388. package/dist/chunks/upload-1.1.39-z8ymn737.mjs +7 -0
  389. package/dist/chunks/upstreamproxy-1.1.39-j1d74feb.mjs +14 -0
  390. package/dist/chunks/usage-1.1.39-s31k5fep.mjs +1 -0
  391. package/dist/chunks/util-1.1.39-ad8sk0dp.mjs +1 -0
  392. package/dist/chunks/utils-1.1.39-ya8kcrhm.mjs +1 -0
  393. package/dist/chunks/vim-1.1.39-b6pfmpbz.mjs +1 -0
  394. package/dist/chunks/watchLoop-1.1.39-h3bxe3p9.mjs +13 -0
  395. package/dist/chunks/wiki-1.1.39-5aj4xh5m.mjs +132 -0
  396. package/dist/chunks/workflows-1.1.39-f31ham8r.mjs +1 -0
  397. package/dist/chunks/worktree-1.1.39-sf55cdqj.mjs +1 -0
  398. package/dist/chunks/worktreeModeEnabled-1.1.39-4ja3es46.mjs +1 -0
  399. package/dist/chunks/wrapper-1.1.39-r1fj52tb.mjs +7 -0
  400. package/dist/cli.mjs +2 -2
  401. package/package.json +9 -9
  402. package/dist/chunks/App-1.1.38-ywjx5zwg.mjs +0 -1
  403. package/dist/chunks/ApproveApiKey-1.1.38-g8aaewqn.mjs +0 -1
  404. package/dist/chunks/AutoModeOptInDialog-1.1.38-3xp2vky0.mjs +0 -1
  405. package/dist/chunks/BypassPermissionsModeDialog-1.1.38-ng5ew4f1.mjs +0 -1
  406. package/dist/chunks/ClaudeMdExternalIncludesDialog-1.1.38-pb4syd5b.mjs +0 -1
  407. package/dist/chunks/ConsoleOAuthFlow-1.1.38-v5m7388w.mjs +0 -1
  408. package/dist/chunks/DiffDialog-1.1.38-7xpy0azc.mjs +0 -6
  409. package/dist/chunks/Doctor-1.1.38-8c786cbs.mjs +0 -1
  410. package/dist/chunks/ExplorerDialog-1.1.38-gsmc5cbg.mjs +0 -6
  411. package/dist/chunks/ITermBackend-1.1.38-34mcvk0g.mjs +0 -1
  412. package/dist/chunks/InvalidConfigDialog-1.1.38-4tzaxt0t.mjs +0 -1
  413. package/dist/chunks/InvalidSettingsDialog-1.1.38-5aqykfy4.mjs +0 -1
  414. package/dist/chunks/MigrationDialog-1.1.38-hg33ngjd.mjs +0 -1
  415. package/dist/chunks/Onboarding-1.1.38-e0dgakf3.mjs +0 -1
  416. package/dist/chunks/ProviderManager-1.1.38-s1stmw8z.mjs +0 -1
  417. package/dist/chunks/REPL-1.1.38-24nb99vc.mjs +0 -1
  418. package/dist/chunks/ResumeConversation-1.1.38-ph61hy3h.mjs +0 -1
  419. package/dist/chunks/TeleportProgress-1.1.38-waf94h4c.mjs +0 -1
  420. package/dist/chunks/TeleportRepoMismatchDialog-1.1.38-8zeez0vw.mjs +0 -1
  421. package/dist/chunks/TeleportResumeWrapper-1.1.38-x67yqx1x.mjs +0 -1
  422. package/dist/chunks/TmuxBackend-1.1.38-s7acgm11.mjs +0 -9
  423. package/dist/chunks/ToolSearchTool-1.1.38-xdxg0v37.mjs +0 -1
  424. package/dist/chunks/TrustDialog-1.1.38-ze3nezmq.mjs +0 -1
  425. package/dist/chunks/activeProvider-1.1.38-4hejnp0f.mjs +0 -1
  426. package/dist/chunks/add-dir-1.1.38-9njmqx1q.mjs +0 -1
  427. package/dist/chunks/agentTypes-1.1.38-2vgbffh0.mjs +0 -1
  428. package/dist/chunks/agents-1.1.38-p9ee8aj6.mjs +0 -3
  429. package/dist/chunks/agents-1.1.38-td2q9455.mjs +0 -110
  430. package/dist/chunks/api-1.1.38-8mx12h9x.mjs +0 -1
  431. package/dist/chunks/asciicast-1.1.38-ge5twq4b.mjs +0 -1
  432. package/dist/chunks/auth-1.1.38-qd9cf36r.mjs +0 -1
  433. package/dist/chunks/auth-1.1.38-z9s1s7ya.mjs +0 -1
  434. package/dist/chunks/autoMode-1.1.38-k48yn49s.mjs +0 -52
  435. package/dist/chunks/autoModeSetup-1.1.38-akdcfhnr.mjs +0 -44
  436. package/dist/chunks/autoUpdater-1.1.38-x4vhee3g.mjs +0 -1
  437. package/dist/chunks/backgroundHousekeeping-1.1.38-bvd35tyn.mjs +0 -1
  438. package/dist/chunks/branch-1.1.38-ne2jsk2x.mjs +0 -4
  439. package/dist/chunks/bridge-1.1.38-vdxahb1p.mjs +0 -2
  440. package/dist/chunks/bridgeConfig-1.1.38-yf7zjpvf.mjs +0 -1
  441. package/dist/chunks/bridgeEnabled-1.1.38-eszbcc63.mjs +0 -1
  442. package/dist/chunks/bridgeMain-1.1.38-ywfxh5hm.mjs +0 -64
  443. package/dist/chunks/bridgePointer-1.1.38-jvevzgc3.mjs +0 -1
  444. package/dist/chunks/btw-1.1.38-hqjfa45a.mjs +0 -1
  445. package/dist/chunks/buddy-1.1.38-rq8ak7jk.mjs +0 -3
  446. package/dist/chunks/cache-probe-1.1.38-dvwdm93b.mjs +0 -21
  447. package/dist/chunks/cacheStats-1.1.38-pxpr6at8.mjs +0 -4
  448. package/dist/chunks/caches-1.1.38-mxte3pjs.mjs +0 -1
  449. package/dist/chunks/cd-1.1.38-nj8jwk5n.mjs +0 -3
  450. package/dist/chunks/claudeDesktop-1.1.38-94tj322p.mjs +0 -1
  451. package/dist/chunks/claudemd-1.1.38-y4ajc9p8.mjs +0 -1
  452. package/dist/chunks/clear-1.1.38-17hx54za.mjs +0 -1
  453. package/dist/chunks/clearTerminal-1.1.38-e3qy2b07.mjs +0 -1
  454. package/dist/chunks/cli-1.1.38-06jvwc43.mjs +0 -2
  455. package/dist/chunks/cli-1.1.38-0cf6ttc6.mjs +0 -2
  456. package/dist/chunks/cli-1.1.38-0dj1dmtd.mjs +0 -2
  457. package/dist/chunks/cli-1.1.38-0q1t1zs8.mjs +0 -2
  458. package/dist/chunks/cli-1.1.38-0x84gwbc.mjs +0 -2
  459. package/dist/chunks/cli-1.1.38-16r42mm1.mjs +0 -2
  460. package/dist/chunks/cli-1.1.38-1bv62dee.mjs +0 -2
  461. package/dist/chunks/cli-1.1.38-1c3thcc3.mjs +0 -10
  462. package/dist/chunks/cli-1.1.38-1e3jefp8.mjs +0 -2
  463. package/dist/chunks/cli-1.1.38-1jc6vgde.mjs +0 -25
  464. package/dist/chunks/cli-1.1.38-1k5hq477.mjs +0 -2
  465. package/dist/chunks/cli-1.1.38-1kce30qe.mjs +0 -2
  466. package/dist/chunks/cli-1.1.38-1wavwd72.mjs +0 -10
  467. package/dist/chunks/cli-1.1.38-20a2a6n3.mjs +0 -2
  468. package/dist/chunks/cli-1.1.38-21x08w6j.mjs +0 -2
  469. package/dist/chunks/cli-1.1.38-2a4wcbby.mjs +0 -2
  470. package/dist/chunks/cli-1.1.38-2jp2m8e4.mjs +0 -2
  471. package/dist/chunks/cli-1.1.38-2p7f0cx3.mjs +0 -2
  472. package/dist/chunks/cli-1.1.38-2x7b4x0w.mjs +0 -3
  473. package/dist/chunks/cli-1.1.38-2zbkp90c.mjs +0 -2
  474. package/dist/chunks/cli-1.1.38-37he9dkq.mjs +0 -2
  475. package/dist/chunks/cli-1.1.38-38f3b9as.mjs +0 -2
  476. package/dist/chunks/cli-1.1.38-3a7tvcmx.mjs +0 -2
  477. package/dist/chunks/cli-1.1.38-3c43sfc3.mjs +0 -34
  478. package/dist/chunks/cli-1.1.38-3d6qg7yb.mjs +0 -7
  479. package/dist/chunks/cli-1.1.38-3ez6bs0j.mjs +0 -39
  480. package/dist/chunks/cli-1.1.38-3gyfttrt.mjs +0 -2
  481. package/dist/chunks/cli-1.1.38-3j9z8bce.mjs +0 -11
  482. package/dist/chunks/cli-1.1.38-3q70db32.mjs +0 -2
  483. package/dist/chunks/cli-1.1.38-41hbjb5d.mjs +0 -3
  484. package/dist/chunks/cli-1.1.38-44ay6q12.mjs +0 -2
  485. package/dist/chunks/cli-1.1.38-4dvqxnwp.mjs +0 -9
  486. package/dist/chunks/cli-1.1.38-4g2k1n93.mjs +0 -133
  487. package/dist/chunks/cli-1.1.38-4vabm3a1.mjs +0 -2
  488. package/dist/chunks/cli-1.1.38-4wdys8df.mjs +0 -2
  489. package/dist/chunks/cli-1.1.38-4x6r8r0g.mjs +0 -21
  490. package/dist/chunks/cli-1.1.38-5zr9x873.mjs +0 -18
  491. package/dist/chunks/cli-1.1.38-62gxd3va.mjs +0 -2
  492. package/dist/chunks/cli-1.1.38-6dwdjwfe.mjs +0 -2
  493. package/dist/chunks/cli-1.1.38-6g33twaj.mjs +0 -2
  494. package/dist/chunks/cli-1.1.38-6hng9dxr.mjs +0 -2
  495. package/dist/chunks/cli-1.1.38-7a0vpxbg.mjs +0 -7
  496. package/dist/chunks/cli-1.1.38-7vygkwbt.mjs +0 -2
  497. package/dist/chunks/cli-1.1.38-7wqs4198.mjs +0 -2
  498. package/dist/chunks/cli-1.1.38-7y52ea97.mjs +0 -2
  499. package/dist/chunks/cli-1.1.38-7zvbnxfm.mjs +0 -2
  500. package/dist/chunks/cli-1.1.38-839xw74z.mjs +0 -24
  501. package/dist/chunks/cli-1.1.38-8br976cg.mjs +0 -2
  502. package/dist/chunks/cli-1.1.38-8jshtkmf.mjs +0 -2
  503. package/dist/chunks/cli-1.1.38-8m9096qg.mjs +0 -6
  504. package/dist/chunks/cli-1.1.38-91q945ws.mjs +0 -3
  505. package/dist/chunks/cli-1.1.38-92g30wbv.mjs +0 -2
  506. package/dist/chunks/cli-1.1.38-9p14cyab.mjs +0 -2
  507. package/dist/chunks/cli-1.1.38-9x263zph.mjs +0 -10
  508. package/dist/chunks/cli-1.1.38-a2j7607w.mjs +0 -2
  509. package/dist/chunks/cli-1.1.38-a678cgp1.mjs +0 -251
  510. package/dist/chunks/cli-1.1.38-a9wkqach.mjs +0 -2
  511. package/dist/chunks/cli-1.1.38-abavft6n.mjs +0 -6
  512. package/dist/chunks/cli-1.1.38-ac33weys.mjs +0 -2
  513. package/dist/chunks/cli-1.1.38-an3fdzsz.mjs +0 -2
  514. package/dist/chunks/cli-1.1.38-aspnz4m6.mjs +0 -2
  515. package/dist/chunks/cli-1.1.38-axhwttsc.mjs +0 -9
  516. package/dist/chunks/cli-1.1.38-azkppcr1.mjs +0 -2
  517. package/dist/chunks/cli-1.1.38-azv9c3jv.mjs +0 -2
  518. package/dist/chunks/cli-1.1.38-b56dgy8f.mjs +0 -2
  519. package/dist/chunks/cli-1.1.38-c0w5gdqr.mjs +0 -2
  520. package/dist/chunks/cli-1.1.38-c7x1esyq.mjs +0 -6
  521. package/dist/chunks/cli-1.1.38-cmnad0aj.mjs +0 -8
  522. package/dist/chunks/cli-1.1.38-cp5m26rk.mjs +0 -3
  523. package/dist/chunks/cli-1.1.38-cpq50ma6.mjs +0 -15
  524. package/dist/chunks/cli-1.1.38-cq1f1j06.mjs +0 -2
  525. package/dist/chunks/cli-1.1.38-ctcgmvy1.mjs +0 -2
  526. package/dist/chunks/cli-1.1.38-d3xjq2jk.mjs +0 -4
  527. package/dist/chunks/cli-1.1.38-dfcp3asv.mjs +0 -17
  528. package/dist/chunks/cli-1.1.38-dggxcj2x.mjs +0 -2
  529. package/dist/chunks/cli-1.1.38-dxtw8tjv.mjs +0 -2
  530. package/dist/chunks/cli-1.1.38-dz4qs0ht.mjs +0 -2
  531. package/dist/chunks/cli-1.1.38-e09rc4b8.mjs +0 -20
  532. package/dist/chunks/cli-1.1.38-e0q3xyay.mjs +0 -2
  533. package/dist/chunks/cli-1.1.38-e5by1ynv.mjs +0 -6
  534. package/dist/chunks/cli-1.1.38-e6j30tde.mjs +0 -3
  535. package/dist/chunks/cli-1.1.38-e84gxv9a.mjs +0 -2
  536. package/dist/chunks/cli-1.1.38-eafpexwg.mjs +0 -2
  537. package/dist/chunks/cli-1.1.38-exexvj4k.mjs +0 -5
  538. package/dist/chunks/cli-1.1.38-f6be5pxz.mjs +0 -2
  539. package/dist/chunks/cli-1.1.38-f7fq44hz.mjs +0 -2
  540. package/dist/chunks/cli-1.1.38-fembxywm.mjs +0 -2
  541. package/dist/chunks/cli-1.1.38-ffkc8ker.mjs +0 -42
  542. package/dist/chunks/cli-1.1.38-fgwfzs50.mjs +0 -2
  543. package/dist/chunks/cli-1.1.38-fr1kxnk2.mjs +0 -2
  544. package/dist/chunks/cli-1.1.38-frcvjcgw.mjs +0 -2
  545. package/dist/chunks/cli-1.1.38-fyw4xbm7.mjs +0 -3
  546. package/dist/chunks/cli-1.1.38-g94v4hq7.mjs +0 -2
  547. package/dist/chunks/cli-1.1.38-gdcz0rss.mjs +0 -2
  548. package/dist/chunks/cli-1.1.38-gp49bfxk.mjs +0 -2
  549. package/dist/chunks/cli-1.1.38-gqpmcnnv.mjs +0 -15
  550. package/dist/chunks/cli-1.1.38-gtjexepq.mjs +0 -2
  551. package/dist/chunks/cli-1.1.38-h013mt1h.mjs +0 -2
  552. package/dist/chunks/cli-1.1.38-h0643t2a.mjs +0 -63
  553. package/dist/chunks/cli-1.1.38-h1fqbjjb.mjs +0 -2
  554. package/dist/chunks/cli-1.1.38-h2f789qa.mjs +0 -2
  555. package/dist/chunks/cli-1.1.38-h6qtpp5r.mjs +0 -2
  556. package/dist/chunks/cli-1.1.38-h83nx1a5.mjs +0 -2
  557. package/dist/chunks/cli-1.1.38-haa4vwxj.mjs +0 -2
  558. package/dist/chunks/cli-1.1.38-hkbb3sr7.mjs +0 -2
  559. package/dist/chunks/cli-1.1.38-hvc5ed6c.mjs +0 -2
  560. package/dist/chunks/cli-1.1.38-jakpq48k.mjs +0 -2
  561. package/dist/chunks/cli-1.1.38-jr0vb3er.mjs +0 -4
  562. package/dist/chunks/cli-1.1.38-jrf85w1a.mjs +0 -2
  563. package/dist/chunks/cli-1.1.38-ka1w0zwc.mjs +0 -2
  564. package/dist/chunks/cli-1.1.38-kcykd1e5.mjs +0 -2
  565. package/dist/chunks/cli-1.1.38-kjt1gn6d.mjs +0 -135
  566. package/dist/chunks/cli-1.1.38-kns8wjke.mjs +0 -2
  567. package/dist/chunks/cli-1.1.38-kqkm7ndz.mjs +0 -2
  568. package/dist/chunks/cli-1.1.38-m66mmsr6.mjs +0 -2
  569. package/dist/chunks/cli-1.1.38-m9k89rb6.mjs +0 -2
  570. package/dist/chunks/cli-1.1.38-mbfqg6za.mjs +0 -3
  571. package/dist/chunks/cli-1.1.38-md7mbf9q.mjs +0 -2
  572. package/dist/chunks/cli-1.1.38-mh6a6g83.mjs +0 -4
  573. package/dist/chunks/cli-1.1.38-mnr9k9j8.mjs +0 -2
  574. package/dist/chunks/cli-1.1.38-n5tx4p12.mjs +0 -15
  575. package/dist/chunks/cli-1.1.38-n9xftqbp.mjs +0 -2
  576. package/dist/chunks/cli-1.1.38-ndbzsvf1.mjs +0 -4
  577. package/dist/chunks/cli-1.1.38-nmmd7xh9.mjs +0 -4
  578. package/dist/chunks/cli-1.1.38-npc1f8rb.mjs +0 -3
  579. package/dist/chunks/cli-1.1.38-nr3yx2kb.mjs +0 -4
  580. package/dist/chunks/cli-1.1.38-nzbcas3j.mjs +0 -2
  581. package/dist/chunks/cli-1.1.38-pab9ct4p.mjs +0 -2
  582. package/dist/chunks/cli-1.1.38-pah268nz.mjs +0 -2
  583. package/dist/chunks/cli-1.1.38-pdv3syxb.mjs +0 -2
  584. package/dist/chunks/cli-1.1.38-pe2vd8sk.mjs +0 -2
  585. package/dist/chunks/cli-1.1.38-pksnvm8s.mjs +0 -2
  586. package/dist/chunks/cli-1.1.38-pnngv0r7.mjs +0 -2
  587. package/dist/chunks/cli-1.1.38-q3emeb23.mjs +0 -2
  588. package/dist/chunks/cli-1.1.38-q3yhkwkh.mjs +0 -3
  589. package/dist/chunks/cli-1.1.38-q8ewcabe.mjs +0 -2
  590. package/dist/chunks/cli-1.1.38-qackcmc3.mjs +0 -2
  591. package/dist/chunks/cli-1.1.38-qebn65cx.mjs +0 -50
  592. package/dist/chunks/cli-1.1.38-qfpkjbx1.mjs +0 -2
  593. package/dist/chunks/cli-1.1.38-qv0rqvhj.mjs +0 -4
  594. package/dist/chunks/cli-1.1.38-qw1jxc9j.mjs +0 -2
  595. package/dist/chunks/cli-1.1.38-qwkjfytz.mjs +0 -2
  596. package/dist/chunks/cli-1.1.38-qyg5n01q.mjs +0 -2
  597. package/dist/chunks/cli-1.1.38-r3r6jmgz.mjs +0 -2
  598. package/dist/chunks/cli-1.1.38-rp0tsnde.mjs +0 -2
  599. package/dist/chunks/cli-1.1.38-rvjmh1y0.mjs +0 -4
  600. package/dist/chunks/cli-1.1.38-s1nggz9g.mjs +0 -16
  601. package/dist/chunks/cli-1.1.38-s8evhc7a.mjs +0 -2
  602. package/dist/chunks/cli-1.1.38-sjrfgskz.mjs +0 -2
  603. package/dist/chunks/cli-1.1.38-sywjrgh0.mjs +0 -2
  604. package/dist/chunks/cli-1.1.38-t8k5snq9.mjs +0 -24
  605. package/dist/chunks/cli-1.1.38-tk968ykv.mjs +0 -5497
  606. package/dist/chunks/cli-1.1.38-tvh77h3r.mjs +0 -2
  607. package/dist/chunks/cli-1.1.38-v40xwwad.mjs +0 -2
  608. package/dist/chunks/cli-1.1.38-vbxptsq5.mjs +0 -2
  609. package/dist/chunks/cli-1.1.38-wbww08bk.mjs +0 -2
  610. package/dist/chunks/cli-1.1.38-ww8j7xpn.mjs +0 -2
  611. package/dist/chunks/cli-1.1.38-wwezb1bz.mjs +0 -2
  612. package/dist/chunks/cli-1.1.38-x0j2v4e5.mjs +0 -2
  613. package/dist/chunks/cli-1.1.38-xag86y98.mjs +0 -24
  614. package/dist/chunks/cli-1.1.38-xf78kmy6.mjs +0 -2
  615. package/dist/chunks/cli-1.1.38-xpar3nmx.mjs +0 -2
  616. package/dist/chunks/cli-1.1.38-xpjv8r2g.mjs +0 -2
  617. package/dist/chunks/cli-1.1.38-xr1c1bn4.mjs +0 -2
  618. package/dist/chunks/cli-1.1.38-xvwb3d6n.mjs +0 -2
  619. package/dist/chunks/cli-1.1.38-y1w55df3.mjs +0 -2
  620. package/dist/chunks/cli-1.1.38-y3k2y9f2.mjs +0 -2
  621. package/dist/chunks/cli-1.1.38-y57qzkxr.mjs +0 -2
  622. package/dist/chunks/cli-1.1.38-y66mw08s.mjs +0 -2
  623. package/dist/chunks/cli-1.1.38-y79rqp8p.mjs +0 -60
  624. package/dist/chunks/cli-1.1.38-y7ahpffc.mjs +0 -2
  625. package/dist/chunks/cli-1.1.38-yctmyw1a.mjs +0 -25
  626. package/dist/chunks/cli-1.1.38-yfhvhcvt.mjs +0 -5
  627. package/dist/chunks/cli-1.1.38-ygyme6j6.mjs +0 -2
  628. package/dist/chunks/cli-1.1.38-yhp9b0b0.mjs +0 -2
  629. package/dist/chunks/cli-1.1.38-yk5s276s.mjs +0 -2
  630. package/dist/chunks/cli-1.1.38-z02gnn41.mjs +0 -2
  631. package/dist/chunks/cli-1.1.38-z2mnaz67.mjs +0 -2
  632. package/dist/chunks/cli-1.1.38-z6abxdx3.mjs +0 -2
  633. package/dist/chunks/cli-1.1.38-z8x4q5cc.mjs +0 -12
  634. package/dist/chunks/cli-1.1.38-z9faf3ft.mjs +0 -6
  635. package/dist/chunks/cli-1.1.38-zj7fa197.mjs +0 -2
  636. package/dist/chunks/cli-1.1.38-zx5nqvq6.mjs +0 -2
  637. package/dist/chunks/client-1.1.38-7hcrtb3q.mjs +0 -1
  638. package/dist/chunks/color-1.1.38-eqrtxm9k.mjs +0 -1
  639. package/dist/chunks/compact-1.1.38-ya34rk57.mjs +0 -2
  640. package/dist/chunks/config-1.1.38-bbe0h0fj.mjs +0 -1
  641. package/dist/chunks/config-1.1.38-bfaptzc8.mjs +0 -1
  642. package/dist/chunks/constants-1.1.38-yytvwzgs.mjs +0 -1
  643. package/dist/chunks/context-1.1.38-2mgwzmk2.mjs +0 -1
  644. package/dist/chunks/context-noninteractive-1.1.38-8bj0e1ac.mjs +0 -1
  645. package/dist/chunks/conversation-1.1.38-9hdq28pm.mjs +0 -1
  646. package/dist/chunks/copilotHeaders-1.1.38-s4pj5tsz.mjs +0 -1
  647. package/dist/chunks/copy-1.1.38-f83q42a2.mjs +0 -9
  648. package/dist/chunks/cost-1.1.38-8wheqk0q.mjs +0 -1
  649. package/dist/chunks/createSession-1.1.38-m815jqhf.mjs +0 -1
  650. package/dist/chunks/debug-1.1.38-0nc58m79.mjs +0 -1
  651. package/dist/chunks/defaultActionDeps-1.1.38-t4spryyh.mjs +0 -1458
  652. package/dist/chunks/desktop-1.1.38-6tbjry9x.mjs +0 -2
  653. package/dist/chunks/detectRepository-1.1.38-fkd9xdma.mjs +0 -1
  654. package/dist/chunks/detection-1.1.38-21frnq82.mjs +0 -1
  655. package/dist/chunks/diff-1.1.38-bqd4vh6q.mjs +0 -1
  656. package/dist/chunks/doctor-1.1.38-yedjk1t9.mjs +0 -1
  657. package/dist/chunks/doctorDiagnostic-1.1.38-2tq437dy.mjs +0 -1
  658. package/dist/chunks/earlyInput-1.1.38-ag144tcy.mjs +0 -1
  659. package/dist/chunks/effort-1.1.38-w8zmwjyn.mjs +0 -13
  660. package/dist/chunks/engine-1.1.38-9p06hk6t.mjs +0 -1
  661. package/dist/chunks/envUtils-1.1.38-0x5t3jcn.mjs +0 -1
  662. package/dist/chunks/errors-1.1.38-x5yfskn2.mjs +0 -1
  663. package/dist/chunks/exampleCommands-1.1.38-j3f50kg4.mjs +0 -1
  664. package/dist/chunks/execFileNoThrow-1.1.38-vtsaz9ex.mjs +0 -1
  665. package/dist/chunks/exit-1.1.38-2az07cgq.mjs +0 -1
  666. package/dist/chunks/explorer-1.1.38-f8v6fw0n.mjs +0 -1
  667. package/dist/chunks/export-1.1.38-ryfsevs9.mjs +0 -2
  668. package/dist/chunks/fast-1.1.38-pqjeb7br.mjs +0 -1
  669. package/dist/chunks/feedback-1.1.38-a735me7a.mjs +0 -16
  670. package/dist/chunks/git-1.1.38-ea24mp87.mjs +0 -1
  671. package/dist/chunks/githubModelsCredentials-1.1.38-mrk9kw4h.mjs +0 -1
  672. package/dist/chunks/goal-1.1.38-t7b2x0m7.mjs +0 -4
  673. package/dist/chunks/headless-1.1.38-xa7n2h6a.mjs +0 -2
  674. package/dist/chunks/heapdump-1.1.38-0kkahje0.mjs +0 -6
  675. package/dist/chunks/help-1.1.38-c6fc5w2g.mjs +0 -1
  676. package/dist/chunks/hooks-1.1.38-020dm4m5.mjs +0 -79
  677. package/dist/chunks/hooks-1.1.38-d6nx1th8.mjs +0 -1
  678. package/dist/chunks/ide-1.1.38-w88jdkwh.mjs +0 -3
  679. package/dist/chunks/image-processor-napi-1.1.38-dr7f0p7d.mjs +0 -1
  680. package/dist/chunks/import-1.1.38-tjgkgqtj.mjs +0 -260
  681. package/dist/chunks/inboundAttachments-1.1.38-96y0me8c.mjs +0 -1
  682. package/dist/chunks/index-1.1.38-0p1da46q.mjs +0 -1
  683. package/dist/chunks/index-1.1.38-0vkksyqf.mjs +0 -1
  684. package/dist/chunks/index-1.1.38-32wb94y5.mjs +0 -1
  685. package/dist/chunks/index-1.1.38-b7v4mc41.mjs +0 -1
  686. package/dist/chunks/index-1.1.38-d5147beb.mjs +0 -1
  687. package/dist/chunks/index-1.1.38-e7f6p4gc.mjs +0 -2
  688. package/dist/chunks/index-1.1.38-fmvxdssr.mjs +0 -1
  689. package/dist/chunks/index-1.1.38-fx4e6n5y.mjs +0 -9
  690. package/dist/chunks/index-1.1.38-g6wrndbn.mjs +0 -1
  691. package/dist/chunks/index-1.1.38-h6safnqh.mjs +0 -1
  692. package/dist/chunks/index-1.1.38-he0r1v5h.mjs +0 -1
  693. package/dist/chunks/index-1.1.38-nqht0jy4.mjs +0 -1
  694. package/dist/chunks/index-1.1.38-nzxyzk3n.mjs +0 -1
  695. package/dist/chunks/index-1.1.38-psktz1tc.mjs +0 -23
  696. package/dist/chunks/index-1.1.38-r550x6ay.mjs +0 -2
  697. package/dist/chunks/index-1.1.38-t56hya6b.mjs +0 -9
  698. package/dist/chunks/index-1.1.38-t8ehet13.mjs +0 -1
  699. package/dist/chunks/index-1.1.38-trn75xj8.mjs +0 -1
  700. package/dist/chunks/index-1.1.38-tz1ab367.mjs +0 -1
  701. package/dist/chunks/index-1.1.38-wj6bvgqh.mjs +0 -1
  702. package/dist/chunks/index-1.1.38-wwvwtd47.mjs +0 -30
  703. package/dist/chunks/index-1.1.38-x4crzvcp.mjs +0 -5
  704. package/dist/chunks/index-1.1.38-xwfqwn8f.mjs +0 -1
  705. package/dist/chunks/init-1.1.38-kt9fktc1.mjs +0 -2
  706. package/dist/chunks/initReplBridge-1.1.38-89egcf9a.mjs +0 -1
  707. package/dist/chunks/ink-1.1.38-jgsp2t7f.mjs +0 -1
  708. package/dist/chunks/insights-1.1.38-hq19aerm.mjs +0 -870
  709. package/dist/chunks/install-1.1.38-gyyxk8ck.mjs +0 -1
  710. package/dist/chunks/install-github-app-1.1.38-f2jf37sk.mjs +0 -149
  711. package/dist/chunks/install-slack-app-1.1.38-tset69kh.mjs +0 -1
  712. package/dist/chunks/interactiveHelpers-1.1.38-m06ry3jx.mjs +0 -1
  713. package/dist/chunks/latestVersionCache-1.1.38-1c7vvamf.mjs +0 -1
  714. package/dist/chunks/loadAgentsDir-1.1.38-0bgzxgy4.mjs +0 -1
  715. package/dist/chunks/loadPluginHooks-1.1.38-07neaje5.mjs +0 -1
  716. package/dist/chunks/log-1.1.38-7yxczk1m.mjs +0 -1
  717. package/dist/chunks/main-1.1.38-ckkpf6pm.mjs +0 -1
  718. package/dist/chunks/managedEnv-1.1.38-wgkdf5th.mjs +0 -1
  719. package/dist/chunks/mcp-1.1.38-5g1dkaq3.mjs +0 -4
  720. package/dist/chunks/mcp-1.1.38-pv2q4v1t.mjs +0 -1
  721. package/dist/chunks/mcp-1.1.38-rw32ezwj.mjs +0 -17
  722. package/dist/chunks/mcpb-1.1.38-2j8knvey.mjs +0 -1
  723. package/dist/chunks/memory-1.1.38-ee240zz4.mjs +0 -128
  724. package/dist/chunks/model-1.1.38-0ap9xmp3.mjs +0 -1
  725. package/dist/chunks/model-1.1.38-5qmke302.mjs +0 -2
  726. package/dist/chunks/new-1.1.38-ahnzb47c.mjs +0 -1
  727. package/dist/chunks/node-1.1.38-8hxn3e6r.mjs +0 -15
  728. package/dist/chunks/node-1.1.38-v0zbmtyr.mjs +0 -1
  729. package/dist/chunks/oauth-1.1.38-5me1vtg3.mjs +0 -1
  730. package/dist/chunks/openaiShim-1.1.38-12snq1gc.mjs +0 -14
  731. package/dist/chunks/output-style-1.1.38-zb5mtnss.mjs +0 -1
  732. package/dist/chunks/package-V72LKFNW-1.1.38-q7hcwdtx.mjs +0 -1
  733. package/dist/chunks/permissions-1.1.38-5kw7w85c.mjs +0 -1
  734. package/dist/chunks/permissions-1.1.38-nk2ndszr.mjs +0 -3
  735. package/dist/chunks/plan-1.1.38-z3dqqjh7.mjs +0 -1
  736. package/dist/chunks/plist-1.1.38-56sqgq6h.mjs +0 -1
  737. package/dist/chunks/plugin-1.1.38-03de52xp.mjs +0 -29
  738. package/dist/chunks/pluginStartupCheck-1.1.38-0v5j57bh.mjs +0 -1
  739. package/dist/chunks/plugins-1.1.38-zmnat29k.mjs +0 -9
  740. package/dist/chunks/preActionHook-1.1.38-s4pt4ahn.mjs +0 -2
  741. package/dist/chunks/print-1.1.38-9ar632da.mjs +0 -57
  742. package/dist/chunks/process-1.1.38-ndydtgs9.mjs +0 -1
  743. package/dist/chunks/processBashCommand-1.1.38-xj8xy6j7.mjs +0 -1
  744. package/dist/chunks/processSlashCommand-1.1.38-rq94k8j4.mjs +0 -9
  745. package/dist/chunks/prompt-1.1.38-q5jst5dw.mjs +0 -1
  746. package/dist/chunks/prompt-1.1.38-qwzt31qc.mjs +0 -1
  747. package/dist/chunks/prompts-1.1.38-brvz08qv.mjs +0 -1
  748. package/dist/chunks/provider-1.1.38-zvnh7rf6.mjs +0 -2
  749. package/dist/chunks/providerProfiles-1.1.38-a0jrr70y.mjs +0 -1
  750. package/dist/chunks/providerValidation-1.1.38-qj7m9ae0.mjs +0 -6
  751. package/dist/chunks/registerSubcommands-1.1.38-kn98yfrh.mjs +0 -26
  752. package/dist/chunks/registry-1.1.38-02xa1gxq.mjs +0 -1
  753. package/dist/chunks/release-notes-1.1.38-kmxj255k.mjs +0 -5
  754. package/dist/chunks/reload-plugins-1.1.38-n429fwj8.mjs +0 -2
  755. package/dist/chunks/remote-env-1.1.38-4ecvn8ra.mjs +0 -1
  756. package/dist/chunks/rename-1.1.38-ah715pv0.mjs +0 -1
  757. package/dist/chunks/replLauncher-1.1.38-d6n16rnp.mjs +0 -1
  758. package/dist/chunks/resume-1.1.38-tv3f819g.mjs +0 -2
  759. package/dist/chunks/rewind-1.1.38-6wc124dk.mjs +0 -1
  760. package/dist/chunks/rootOptions-1.1.38-d7ta609y.mjs +0 -1
  761. package/dist/chunks/runWorkflowHeadless-1.1.38-n01n145x.mjs +0 -10
  762. package/dist/chunks/sandbox-adapter-1.1.38-pyjs3awv.mjs +0 -1
  763. package/dist/chunks/sandbox-toggle-1.1.38-54tec9n4.mjs +0 -1
  764. package/dist/chunks/session-1.1.38-d20mp4b0.mjs +0 -2
  765. package/dist/chunks/sessionStorage-1.1.38-44je31rv.mjs +0 -1
  766. package/dist/chunks/settings-1.1.38-x6fb5kk1.mjs +0 -1
  767. package/dist/chunks/setup-1.1.38-cryd3k7j.mjs +0 -12
  768. package/dist/chunks/sinks-1.1.38-xt06cywv.mjs +0 -1
  769. package/dist/chunks/skills-1.1.38-7kbrgpe5.mjs +0 -1
  770. package/dist/chunks/startupProfiler-1.1.38-w24hm0h1.mjs +0 -1
  771. package/dist/chunks/startupUpdateCheck-1.1.38-pmp6wqj9.mjs +0 -1
  772. package/dist/chunks/state-1.1.38-ttzekhjw.mjs +0 -1
  773. package/dist/chunks/stats-1.1.38-w347vz1w.mjs +0 -1
  774. package/dist/chunks/status-1.1.38-h7pzkbmj.mjs +0 -1
  775. package/dist/chunks/stickers-1.1.38-p6n5mskj.mjs +0 -1
  776. package/dist/chunks/subprocessEnv-1.1.38-3b6nr5kd.mjs +0 -1
  777. package/dist/chunks/tasks-1.1.38-jrznh7eb.mjs +0 -1
  778. package/dist/chunks/teamHelpers-1.1.38-b920q217.mjs +0 -1
  779. package/dist/chunks/teammateModeSnapshot-1.1.38-30rjbjkp.mjs +0 -1
  780. package/dist/chunks/teleport-1.1.38-kqj15kwz.mjs +0 -1
  781. package/dist/chunks/terminalSetup-1.1.38-a1j9tav3.mjs +0 -1
  782. package/dist/chunks/theme-1.1.38-zqgshtd8.mjs +0 -1
  783. package/dist/chunks/toolPool-1.1.38-rjxnejc9.mjs +0 -1
  784. package/dist/chunks/toolSearch-1.1.38-bsgpwrqw.mjs +0 -1
  785. package/dist/chunks/tools-1.1.38-hphgtq98.mjs +0 -1
  786. package/dist/chunks/turndown.cjs-1.1.38-6zmefgdf.mjs +0 -69
  787. package/dist/chunks/types-1.1.38-yaz6xzxg.mjs +0 -1
  788. package/dist/chunks/update-1.1.38-qkmfgy3f.mjs +0 -72
  789. package/dist/chunks/upload-1.1.38-25jm1g5x.mjs +0 -7
  790. package/dist/chunks/upstreamproxy-1.1.38-kdzcx35q.mjs +0 -14
  791. package/dist/chunks/usage-1.1.38-17yqaf62.mjs +0 -1
  792. package/dist/chunks/util-1.1.38-e3nemqk5.mjs +0 -1
  793. package/dist/chunks/utils-1.1.38-709jv8e9.mjs +0 -1
  794. package/dist/chunks/vim-1.1.38-jtz13d73.mjs +0 -1
  795. package/dist/chunks/watchLoop-1.1.38-fb6heqjg.mjs +0 -13
  796. package/dist/chunks/wiki-1.1.38-fpkcyk67.mjs +0 -132
  797. package/dist/chunks/workflows-1.1.38-mj7dax7d.mjs +0 -1
  798. package/dist/chunks/worktree-1.1.38-9zf6zp7r.mjs +0 -1
  799. package/dist/chunks/worktreeModeEnabled-1.1.38-01veveaw.mjs +0 -1
  800. package/dist/chunks/wrapper-1.1.38-7cvdwcn2.mjs +0 -7
  801. /package/dist/chunks/{cli-1.1.38-5edb5t1a.mjs → cli-1.1.39-avfsydnr.mjs} +0 -0
  802. /package/dist/chunks/{cli-1.1.38-48ykmxgd.mjs → cli-1.1.39-erbg35qn.mjs} +0 -0
  803. /package/dist/chunks/{cli-1.1.38-fckt5c5p.mjs → cli-1.1.39-hn5s43sr.mjs} +0 -0
  804. /package/dist/chunks/{cli-1.1.38-g4av033p.mjs → cli-1.1.39-jsnryd3j.mjs} +0 -0
  805. /package/dist/chunks/{cli-1.1.38-0sbej1sm.mjs → cli-1.1.39-qnem4654.mjs} +0 -0
@@ -0,0 +1,2 @@
1
+ import{Gfa as W,Jfa as E,L9 as V,N9 as N}from"./cli-1.1.39-p2sg5g92.mjs";import{Nqa as $,Oqa as L}from"./cli-1.1.39-z8ts6axr.mjs";import{existsSync as S}from"node:fs";import{homedir as X}from"node:os";import{join as R}from"node:path";function B(b){let q=b?.trim();return q?q:void 0}function Y(b=process.env){return B(b.GOOGLE_CLOUD_PROJECT)??B(b.GCLOUD_PROJECT)??B(b.GOOGLE_PROJECT_ID)}function k(b=process.env){let q=B(b.GEMINI_AUTH_MODE)?.toLowerCase();if(q==="api-key"||q==="adc")return q;return}function x(b=process.env){let q=B(b.GOOGLE_APPLICATION_CREDENTIALS),w=new Set;if(q)w.add(q);w.add(R(X(),".config","gcloud","application_default_credentials.json"));let F=B(b.APPDATA);if(F)w.add(R(F,"gcloud","application_default_credentials.json"));return[...w]}function K(b=process.env){return x(b).some((q)=>S(q))}function y(b){if(typeof b==="string")return B(b);return B(b?.token)}async function P(){let{GoogleAuth:b}=await import("google-auth-library");return new b({scopes:[U]})}async function Z(b,q){if(!K(b))return{kind:"none"};try{let w=await(q.createGoogleAuth??P)(),F=await w.getClient(),J=y(await F.getAccessToken());if(!J)return{kind:"none"};let Q=Y(b)??(typeof w.getProjectId==="function"?B(await w.getProjectId().catch(()=>{return})):void 0);return{kind:"adc",credential:J,...Q?{projectId:Q}:{}}}catch{return{kind:"none"}}}async function j(b=process.env,q={}){let w=k(b),F=W(),J=F?.transport==="gemini"?B(F.apiKey):void 0,O=w==="adc"?void 0:J;if(O&&(w===void 0||w==="api-key"))return{kind:"api-key",credential:O};if(w==="api-key")return{kind:"none"};if(q.createGoogleAuth)return Z(b,q);return _(B(b.GOOGLE_APPLICATION_CREDENTIALS),B(b.APPDATA),X(),Y(b))}var U="https://www.googleapis.com/auth/cloud-platform",f=300000,_;var D=$(()=>{E();N();_=V(async(b,q,w,F)=>Z({GOOGLE_APPLICATION_CREDENTIALS:b,APPDATA:q,GOOGLE_CLOUD_PROJECT:F,GCLOUD_PROJECT:F,GOOGLE_PROJECT_ID:F,HOME:w},{}),f)});
2
+ export{j as Oi,D as Pi};
@@ -0,0 +1,2 @@
1
+ import{ux as Q,vx as yq}from"./cli-1.1.39-yyqx9zb5.mjs";import{aW as Rq,bW as Uq,eW as _q}from"./cli-1.1.39-zfb5hcs0.mjs";import{$X as nq,hW as pq,tX as J,vX as L}from"./cli-1.1.39-kcq7gw24.mjs";import{C1 as H,D1 as O,E1 as Wq}from"./cli-1.1.39-n8j5q839.mjs";import{V2 as vq,W2 as Kq,n3 as kq}from"./cli-1.1.39-nmm4w3bh.mjs";import{D_ as bq,E_ as fq,f_ as Gq,h_ as gq,m_ as Nq,vea as Tq}from"./cli-1.1.39-p2sg5g92.mjs";import{Jqa as Bq,Nqa as Aq}from"./cli-1.1.39-z8ts6axr.mjs";function hq(){return Nq().editorMode==="vim"}function Fq(){if(Gq.terminal==="Apple_Terminal"&&process.platform==="darwin")return"shift + ⏎ for newline";if(Rq())return"shift + ⏎ for newline";return Uq()?"\\⏎ for newline":"backslash (\\) + return (⏎) for newline"}function cq(Y,q){if(q.ctrl||q.meta||q.escape||q.return||q.tab||q.backspace||q.delete||q.upArrow||q.downArrow||q.leftArrow||q.rightArrow||q.pageUp||q.pageDown||q.home||q.end)return!1;return Y.length>0&&!/^\s/.test(Y)&&!Y.startsWith("\x1B")}var Iq=Aq(()=>{_q();Tq();gq()});function V(Y){return Y.replace(/\+/g," + ")}function eq(Y){let q=Xq.c(99),{dimColor:z,fixedWidth:Zq,gap:c,paddingX:m}=Y,u=Q("app:toggleTranscript","Global","ctrl+o"),B;if(q[0]!==u)B=V(u),q[0]=u,q[1]=B;else B=q[1];let d=B,l=Q("app:toggleTodos","Global","ctrl+t"),f;if(q[2]!==l)f=V(l),q[2]=l,q[3]=f;else f=q[3];let x=f,i=Q("chat:undo","Chat","ctrl+_"),k;if(q[4]!==i)k=V(i),q[4]=i,q[5]=k;else k=q[5];let e=k,s=Q("chat:stash","Chat","ctrl+s"),p;if(q[6]!==s)p=V(s),q[6]=s,q[7]=p;else p=q[7];let r=p,$=Q("chat:cycleMode","Chat","shift+tab"),n;if(q[8]!==$)n=V($),q[8]=$,q[9]=n;else n=q[9];let o=n,t=Q("chat:modelPicker","Chat","alt+p"),y;if(q[10]!==t)y=V(t),q[10]=t,q[11]=y;else y=q[11];let qq=y,zq=Q("chat:fastMode","Chat","alt+o"),j;if(q[12]!==zq)j=V(zq),q[12]=zq,q[13]=j;else j=q[13];let Hq=j,Jq=Q("chat:externalEditor","Chat","ctrl+g"),C;if(q[14]!==Jq)C=V(Jq),q[14]=Jq,q[15]=C;else C=q[15];let Lq=C,Oq=Q("chat:imagePaste","Chat","ctrl+v"),S;if(q[18]!==Oq)S=V(Oq),q[18]=Oq,q[19]=S;else S=q[19];let Qq=S,Eq=V(Q("chat:increaseEffort","Chat","shift+right")),Pq=V(Q("chat:openDiff","Chat","ctrl+g")),Mq=V(Q("chat:openExplorer","Chat","ctrl+e")),wq=Q("chat:openSessions","Chat","left"),Dq=wq==="left"?"←":V(wq),Vq=Zq?28:void 0,Z;if(q[23]!==z)Z=H(J,{children:H(L,{dimColor:z,children:"! for bash mode"})}),q[23]=z,q[24]=Z;else Z=q[24];let w;if(q[25]!==z)w=H(J,{children:H(L,{dimColor:z,children:"/ for commands"})}),q[25]=z,q[26]=w;else w=q[26];let A;if(q[27]!==z)A=H(J,{children:H(L,{dimColor:z,children:"@ for file paths"})}),q[27]=z,q[28]=A;else A=q[28];let G;if(q[29]!==z)G=H(J,{children:H(L,{dimColor:z,children:"& for background"})}),q[29]=z,q[30]=G;else G=q[30];let N;if(q[31]!==z)N=H(J,{children:H(L,{dimColor:z,children:"/btw for side question"})}),q[31]=z,q[32]=N;else N=q[32];let R;if(q[33]!==Vq||q[34]!==Z||q[35]!==w||q[36]!==A||q[37]!==G||q[38]!==N)R=O(J,{flexDirection:"column",width:Vq,children:[Z,w,A,G,N,H(J,{children:O(L,{dimColor:z,children:[Mq," for file explorer"]})}),H(J,{children:O(L,{dimColor:z,children:[Pq," for diff reviewer"]})}),H(J,{children:O(L,{dimColor:z,children:[Dq," for agents"]})})]}),q[33]=Vq,q[34]=Z,q[35]=w,q[36]=A,q[37]=G,q[38]=N,q[39]=R;else R=q[39];let Yq=Zq?35:void 0,U;if(q[40]!==z)U=H(J,{children:H(L,{dimColor:z,children:"double tap esc to clear input"})}),q[40]=z,q[41]=U;else U=q[41];let F;if(q[42]!==o||q[43]!==z)F=H(J,{children:O(L,{dimColor:z,children:[o," ","to auto-accept edits"]})}),q[42]=o,q[43]=z,q[44]=F;else F=q[44];let I;if(q[45]!==z||q[46]!==d)I=H(J,{children:O(L,{dimColor:z,children:[d," for verbose output"]})}),q[45]=z,q[46]=d,q[47]=I;else I=q[47];let W;if(q[48]!==z||q[49]!==x)W=H(J,{children:O(L,{dimColor:z,children:[x," to toggle tasks"]})}),q[48]=z,q[49]=x,q[50]=W;else W=q[50];let a;if(q[51]===Symbol.for("react.memo_cache_sentinel"))a=Fq(),q[51]=a;else a=q[51];let b;if(q[52]!==z)b=H(J,{children:H(L,{dimColor:z,children:a})}),q[52]=z,q[53]=b;else b=q[53];let v;if(q[54]!==Yq||q[55]!==U||q[56]!==F||q[57]!==I||q[58]!==W||q[59]!==b)v=O(J,{flexDirection:"column",width:Yq,children:[U,F,I,W,b]}),q[54]=Yq,q[55]=U,q[56]=F,q[57]=I,q[58]=W,q[59]=b,q[61]=v;else v=q[61];let K;if(q[62]!==z||q[63]!==e)K=H(J,{children:O(L,{dimColor:z,children:[e," to undo"]})}),q[62]=z,q[63]=e,q[64]=K;else K=q[64];let X;if(q[65]!==z)X=bq()!=="windows"&&H(J,{children:H(L,{dimColor:z,children:"ctrl + z to suspend"})}),q[65]=z,q[66]=X;else X=q[66];let E;if(q[67]!==z||q[68]!==Qq)E=H(J,{children:O(L,{dimColor:z,children:[Qq," to paste images"]})}),q[67]=z,q[68]=Qq,q[69]=E;else E=q[69];let P;if(q[70]!==z||q[71]!==qq)P=H(J,{children:O(L,{dimColor:z,children:[qq," to switch model"]})}),q[70]=z,q[71]=qq,q[72]=P;else P=q[72];let M;if(q[73]!==z||q[74]!==Hq)M=vq()&&Kq()&&H(J,{children:O(L,{dimColor:z,children:[Hq," to toggle fast mode"]})}),q[73]=z,q[74]=Hq,q[75]=M;else M=q[75];let D;if(q[76]!==z||q[77]!==r)D=H(J,{children:O(L,{dimColor:z,children:[r," to stash prompt"]})}),q[76]=z,q[77]=r,q[78]=D;else D=q[78];let g;if(q[79]!==z||q[80]!==Lq)g=H(J,{children:O(L,{dimColor:z,children:[Lq," to edit in $EDITOR"]})}),q[79]=z,q[80]=Lq,q[81]=g;else g=q[81];let T;if(q[82]!==z)T=!1,q[82]=z,q[83]=T;else T=q[83];let _;if(q[84]!==K||q[85]!==X||q[86]!==E||q[87]!==P||q[88]!==M||q[89]!==D||q[90]!==g||q[91]!==T)_=O(J,{flexDirection:"column",children:[K,X,E,P,H(J,{children:O(L,{dimColor:z,children:[Eq," to change effort"]})}),M,D,g,T]}),q[84]=K,q[85]=X,q[86]=E,q[87]=P,q[88]=M,q[89]=D,q[90]=g,q[91]=T,q[92]=_;else _=q[92];let h;if(q[93]!==c||q[94]!==m||q[95]!==R||q[96]!==v||q[97]!==_)h=O(J,{paddingX:m,flexDirection:"row",gap:c,children:[R,v,_]}),q[93]=c,q[94]=m,q[95]=R,q[96]=v,q[97]=_,q[98]=h;else h=q[98];return h}var Xq;var jq=Aq(()=>{nq();fq();yq();kq();Iq();Wq();Xq=Bq(pq(),1)});
2
+ export{hq as Dg,cq as Eg,Iq as Fg,eq as Gg,jq as Hg};
@@ -0,0 +1,2 @@
1
+ import{gka as z,oka as J}from"./cli-1.1.39-e4p7vgrg.mjs";import{Nqa as F}from"./cli-1.1.39-z8ts6axr.mjs";function V(b){D=b}function W(){let b=D?.()??{};if(!z(process.env.CLAUDIN_SUBPROCESS_ENV_SCRUB))return Object.keys(b).length>0?{...process.env,...b}:process.env;let q={...process.env,...b};for(let w of L)delete q[w],delete q[`INPUT_${w}`];return q}var L,D;var M=F(()=>{J();L=["ANTHROPIC_API_KEY","CLAUDE_CODE_OAUTH_TOKEN","ANTHROPIC_AUTH_TOKEN","ANTHROPIC_FOUNDRY_API_KEY","ANTHROPIC_CUSTOM_HEADERS","OTEL_EXPORTER_OTLP_HEADERS","OTEL_EXPORTER_OTLP_LOGS_HEADERS","OTEL_EXPORTER_OTLP_METRICS_HEADERS","OTEL_EXPORTER_OTLP_TRACES_HEADERS","AWS_SECRET_ACCESS_KEY","AWS_SESSION_TOKEN","AWS_BEARER_TOKEN_BEDROCK","GOOGLE_APPLICATION_CREDENTIALS","AZURE_CLIENT_SECRET","AZURE_CLIENT_CERTIFICATE_PATH","ACTIONS_ID_TOKEN_REQUEST_TOKEN","ACTIONS_ID_TOKEN_REQUEST_URL","ACTIONS_RUNTIME_TOKEN","ACTIONS_RUNTIME_URL","ALL_INPUTS","OVERRIDE_GITHUB_TOKEN","DEFAULT_WORKFLOW_TOKEN","SSH_SIGNING_KEY"]});
2
+ export{V as gU,W as hU,M as iU};
@@ -0,0 +1,2 @@
1
+ import{cf as A,df as J,ef as $,hf as G}from"./cli-1.1.39-2hgsp1ry.mjs";import{Aea as C,Hea as x,Tea as h,k_ as O,m_ as R,s_ as b,vea as w,zea as S}from"./cli-1.1.39-p2sg5g92.mjs";import{mia as N,via as m}from"./cli-1.1.39-b1gewbgs.mjs";import{dka as F,oka as D}from"./cli-1.1.39-e4p7vgrg.mjs";import{Nqa as E}from"./cli-1.1.39-z8ts6axr.mjs";import{existsSync as T}from"fs";import{dirname as f}from"path";function M(q,z,Q={}){if(!T(q))return{outcome:"noSource",copiedKeys:0};let B=A(q);if(!B)return{outcome:"unparseableSource",copiedKeys:0};let L=T(z),U=L?A(z)??{}:{},I={...U},W=0;for(let V of Q.keys??Object.keys(B)){if(!(V in B))continue;if(V in U)continue;I[V]=B[V],W+=1}if(W===0&&L)return{outcome:"merged",copiedKeys:0};try{$(f(z)),J(z,I)}catch(V){return{outcome:"writeFailed",copiedKeys:0,message:V instanceof Error?V.message:String(V)}}return{outcome:"merged",copiedKeys:W}}var k=E(()=>{G()});import{chmodSync as v,existsSync as _,readFileSync as j,writeFileSync as y}from"fs";import{homedir as H}from"os";import{join as Z}from"path";function P(q){return Z(q,".claude")}function d(q,z,Q,B){let L=Z(q,".credentials.json"),U=Z(z,".credentials.json");if(!_(L))return 0;try{if(_(U)){let W=j(L),V=j(U);if(W.equals(V))return v(U,384),0;return B.push(`${U} already exists with different content — kept new file untouched`),0}$(z);let I=j(L);return y(U,I),v(U,384),g(I)}catch(I){return Q.push(`failed to copy .credentials.json: ${I instanceof Error?I.message:String(I)}`),0}}function g(q){try{let z=JSON.parse(q.toString("utf8"));if(z&&typeof z==="object")return Object.keys(z).length}catch{}return 1}function c(q,z,Q){let B=M(Z(q,"settings.json"),Z(z,"settings.json"),{keys:u});if(B.outcome==="unparseableSource")Q.push("legacy settings.json could not be parsed; skipped");else if(B.outcome==="writeFailed")Q.push(`failed to write settings.json: ${B.message}`);return B.copiedKeys}function K(q){return Z(q,`.claude${N()}.json`)}function l(q){return Z(q,`config${N()}.json`)}function p(q,z,Q){let B=K(q),L=l(z),U=M(B,L);if(U.outcome==="unparseableSource")return Q.push(`legacy ${B} could not be parsed; skipped`),0;if(U.outcome==="writeFailed")return Q.push(`failed to write ${L}: ${U.message}`),0;if(U.outcome==="noSource")return 0;return b(null),U.copiedKeys}function a(){let z=R().claudeToClaudinMigratedAt;if(typeof z==="string"&&z.length>0)return{migrated:!0,at:z};return{migrated:!1}}function n(q){O((z)=>({...z,claudeToClaudinMigratedAt:q}))}async function Zq(q={}){let z=q.homeDir??H(),Q=P(z),B=q.newDir??F(),L=[],U=[],I={tokens:0,settingsKeys:0,globalConfigKeys:0,anthropicProfileCreated:!1,errors:L,warnings:U,alreadyMigrated:!1,legacyDir:Q,newDir:B},W=_(K(z));if(!_(Q)&&!W)return I;let V=a();if(V.migrated&&!q.force)return I.alreadyMigrated=!0,I.migratedAt=V.at,I;try{$(B)}catch(Y){return L.push(`failed to create ${B}: ${Y instanceof Error?Y.message:String(Y)}`),I}if(_(Q))I.tokens=d(Q,B,L,U),I.settingsKeys=c(Q,B,L);if(I.globalConfigKeys=p(z,B,U),I.anthropicProfileCreated=i(B,I.tokens,U),L.length===0){let Y=new Date().toISOString();n(Y),I.migratedAt=Y}return I}function i(q,z,Q){if(z<=0)return!1;let B=Z(q,".credentials.json"),L;try{L=JSON.parse(j(B,"utf8"))}catch(X){return Q.push(`failed to read migrated .credentials.json for profile bootstrap: ${X instanceof Error?X.message:String(X)}`),!1}let I=L?.claudeAiOauth?.accessToken;if(typeof I!=="string"||I.length===0)return!1;let W=C();if(W.some((X)=>X.provider==="anthropic"))return!1;let V=S("anthropic"),Y={provider:"anthropic",name:V.name,baseUrl:V.baseUrl,model:V.model};try{if(!x(Y,{makeActive:W.length===0}))return Q.push("anthropic profile could not be saved after migration"),!1;return!0}catch(X){return Q.push(`failed to create anthropic profile: ${X instanceof Error?X.message:String(X)}`),!1}}function _q(q){if(q.alreadyMigrated)return`nothing to do (last run: ${q.migratedAt??"unknown"}). Pass --force to re-run.`;let z=[];z.push(`${q.tokens} token${q.tokens===1?"":"s"}`),z.push(`${q.settingsKeys} settings key${q.settingsKeys===1?"":"s"}`),z.push(`${q.globalConfigKeys} global config key${q.globalConfigKeys===1?"":"s"}`),z.push(q.anthropicProfileCreated?"anthropic profile created":"anthropic profile already present");let Q=z.join(", "),B=`. ${q.legacyDir} kept untouched. Run /import to bring skills, MCP servers, agents and commands.`,L=`${Q}${B}`;if(q.warnings.length>0)L+=` Warnings: ${q.warnings.join("; ")}`;if(q.errors.length>0)L+=` Errors: ${q.errors.join("; ")}`;return L}function o(q=H()){return _(P(q))}function t(q=H()){return _(K(q))}function $q(q=H()){let z=R();if(z.claudeToClaudinMigratedAt)return!1;if(z.legacyMigrationSkipped===!0)return!1;return o(q)||t(q)}function jq(){O((q)=>({...q,legacyMigrationSkipped:!0}))}var u;var s=E(()=>{m();w();G();k();D();h();u=["customApiKeyResponses","providerProfiles","activeProviderProfileId"]});
2
+ export{Zq as jd,_q as kd,o as ld,$q as md,jq as nd,s as od};
@@ -0,0 +1,2 @@
1
+ import{EO as M,FO as Hq,HO as jq,Nx as Yq,Ox as Aq,ox as kq,px as Dq}from"./cli-1.1.39-yyqx9zb5.mjs";import{$X as o,hW as s,iW as n,jW as Nq,rX as F,sX as Oq,tX as G,vX as W,zX as Kq}from"./cli-1.1.39-kcq7gw24.mjs";import{B1 as Zq,C1 as V,D1 as H,E1 as j}from"./cli-1.1.39-n8j5q839.mjs";import{F1 as hq}from"./cli-1.1.39-esp4w3m4.mjs";import{$2 as m,V2 as Jq,X2 as S,Y2 as u,Z2 as Qq,c3 as Vq,e3 as Wq,m3 as Xq,n3 as Lq,t3 as g,w3 as r,x3 as Iq}from"./cli-1.1.39-nmm4w3bh.mjs";import{d6 as i,e6 as Gq}from"./cli-1.1.39-2k0w4c3v.mjs";import{Bba as Rq,Lda as Uq,kba as y,m_ as l,vda as zq,vea as Bq}from"./cli-1.1.39-p2sg5g92.mjs";import{hga as qq,rga as Cq}from"./cli-1.1.39-h06axtf8.mjs";import{Jqa as b,Nqa as p}from"./cli-1.1.39-z8ts6axr.mjs";function t(z){let q=a.c(2),{cooldown:J}=z;if(J){let X;if(q[0]===Symbol.for("react.memo_cache_sentinel"))X=V(W,{color:"promptBorder",dimColor:!0,children:y}),q[0]=X;else X=q[0];return X}let Q;if(q[1]===Symbol.for("react.memo_cache_sentinel"))Q=V(W,{color:"fastMode",children:y}),q[1]=Q;else Q=q[1];return Q}function _(z=!0,q=!1){if(!z)return y;let J=n(l().theme);if(q)return i.dim(F("promptBorder",J)(y));return F("fastMode",J)(y)}var a;var e=p(()=>{Gq();Rq();o();Bq();Nq();Oq();j();a=b(s(),1)});function x(z,q){if(Wq(),zq("userSettings",{fastMode:z?!0:void 0}),z)q((J)=>{let Q=!m(J.mainLoopModel);return{...J,...Q?{mainLoopModel:Qq(),mainLoopModelForSession:null}:{},fastMode:!0}});else q((J)=>({...J,fastMode:!1}))}function _q(z){let q=Pq.c(30),{onDone:J,unavailableReason:Q}=z,X=M(Tq),k=M(vq),Y=Hq(),[Z,Eq]=wq.useState(k??!1),R;if(q[0]===Symbol.for("react.memo_cache_sentinel"))R=Vq(),q[0]=R;else R=q[0];let B=R,$=B.status==="cooldown",K=Q!==null,N;if(q[1]===Symbol.for("react.memo_cache_sentinel"))N=r(g(!0)),q[1]=N;else N=q[1];let d=N,O;if(q[2]!==Z||q[3]!==K||q[4]!==X||q[5]!==J||q[6]!==Y)O=function(){if(K)return;if(x(Z,Y),Z){let c=_(Z),fq=!m(X)?` · model set to ${u}`:"";J(`${c} Fast mode ON${fq} · ${d}`)}else Y(mq),J("Fast mode OFF")},q[2]=Z,q[3]=K,q[4]=X,q[5]=J,q[6]=Y,q[7]=O;else O=q[7];let v=O,C;if(q[8]!==k||q[9]!==K||q[10]!==J||q[11]!==Y)C=function(){if(K){if(k)x(!1,Y);J("Fast mode OFF",{display:"system"});return}let c=k?`${_()} Kept Fast mode ON`:"Kept Fast mode OFF";J(c,{display:"system"})},q[8]=k,q[9]=K,q[10]=J,q[11]=Y,q[12]=C;else C=q[12];let T=C,U;if(q[13]!==K)U=function(){if(K)return;Eq(uq)},q[13]=K,q[14]=U;else U=q[14];let P=U,L;if(q[15]!==v||q[16]!==P)L={"confirm:yes":v,"confirm:nextField":P,"confirm:next":P,"confirm:previous":P,"confirm:cycleMode":P,"confirm:toggle":P},q[15]=v,q[16]=P,q[17]=L;else L=q[17];let I;if(q[18]===Symbol.for("react.memo_cache_sentinel"))I={context:"Confirmation"},q[18]=I;else I=q[18];kq(L,I);let h;if(q[19]===Symbol.for("react.memo_cache_sentinel"))h=H(W,{children:[V(t,{cooldown:$})," Fast mode (research preview)"]}),q[19]=h;else h=q[19];let yq=h,w;if(q[20]!==K)w=(f)=>f.pending?H(W,{children:["Press ",f.keyName," again to exit"]}):K?V(W,{children:"Esc to cancel"}):V(W,{children:"Tab to toggle · Enter to confirm · Esc to cancel"}),q[20]=K,q[21]=w;else w=q[21];let E;if(q[22]!==Z||q[23]!==Q)E=Q?V(G,{marginLeft:2,children:V(W,{color:"error",children:Q})}):H(Zq,{children:[V(G,{flexDirection:"column",gap:0,marginLeft:2,children:H(G,{flexDirection:"row",gap:2,children:[V(W,{bold:!0,children:"Fast mode"}),V(W,{color:Z?"fastMode":void 0,bold:Z,children:Z?"ON ":"OFF"}),V(W,{dimColor:!0,children:d})]})}),$&&B.status==="cooldown"&&V(G,{marginLeft:2,children:H(W,{color:"warning",children:[B.reason==="overloaded"?"Fast mode overloaded and is temporarily unavailable":"You've hit your fast limit"," · resets in ",qq(B.resetAt-Date.now(),{hideTrailingZeros:!0})]})})]}),q[22]=Z,q[23]=Q,q[24]=E;else E=q[24];let D;if(q[25]===Symbol.for("react.memo_cache_sentinel"))D=H(W,{dimColor:!0,children:["Learn more:"," ",V(Kq,{url:"https://code.claude.com/docs/en/fast-mode",children:"https://code.claude.com/docs/en/fast-mode"})]}),q[25]=D;else D=q[25];let A;if(q[26]!==T||q[27]!==E||q[28]!==w)A=H(Yq,{title:yq,subtitle:`High-speed mode for ${u}. Billed as extra usage at a premium rate. Separate rate limits apply.`,onCancel:T,color:"fastMode",inputGuide:w,children:[E,D]}),q[26]=T,q[27]=E,q[28]=w,q[29]=A;else A=q[29];return A}function uq(z){return!z}function mq(z){return{...z,fastMode:!1}}function vq(z){return z.fastMode}function Tq(z){return z.mainLoopModel}async function cq(z,q,J){let Q=S();if(Q)return`Fast mode unavailable: ${Q}`;let{mainLoopModel:X}=q();if(x(z,J),z){let k=_(!0),Y=!m(X)?` · model set to ${u}`:"",Z=r(g(!0));return`${k} Fast mode ON${Y} · ${Z}`}else return"Fast mode OFF"}async function qz(z,q,J){if(!Jq())return null;await Xq();let Q=J?.trim().toLowerCase();if(Q==="on"||Q==="off"){let k=await cq(Q==="on",q.getAppState,q.setAppState);return z(k),null}let X=S();return V(_q,{onDone:z,unavailableReason:X})}var Pq,wq;var Fq=p(()=>{Aq();e();o();Dq();jq();Lq();Cq();Iq();Uq();j();Pq=b(s(),1),wq=b(hq(),1)});
2
+ export{_ as Zc,e as _c,_q as $c,qz as ad,Fq as bd};
@@ -0,0 +1,2 @@
1
+ import{Ic as j,Jc as E}from"./cli-1.1.39-01qgb22d.mjs";import{Xt as X,Zt as Y,gu as Z,iu as w,lu as _,nu as $,ru as f}from"./cli-1.1.39-yyqx9zb5.mjs";import{bU as W,fU as v}from"./cli-1.1.39-7d9k8cma.mjs";import{Rfa as V,Wfa as N,Zba as Q,kca as T,lea as S,vea as A}from"./cli-1.1.39-p2sg5g92.mjs";import{vja as B,yja as R}from"./cli-1.1.39-pc9dgxhx.mjs";import{Vja as L,aka as K}from"./cli-1.1.39-wdctfdbb.mjs";import{Nqa as y}from"./cli-1.1.39-z8ts6axr.mjs";function d(q){if(J=q,G!==null&&G.length>0)q(G),G=null;return()=>{J=null}}async function C(){let q=await Y(),D=X(),x=new Set;for(let[z,h]of Object.entries(q)){let F=D[z]?.autoUpdate;if(F!==void 0?F:Q(z,h))x.add(z.toLowerCase())}return x}async function M(q,D){let x=!1;for(let{scope:z}of D)try{let h=await j(q,z);if(h.success&&!h.alreadyUpToDate)x=!0,B(`Plugin autoupdate: updated ${q} from ${h.oldVersion} to ${h.newVersion}`);else if(!h.alreadyUpToDate)B(`Plugin autoupdate: failed to update ${q}: ${h.message}`,{level:"warn"})}catch(h){B(`Plugin autoupdate: error updating ${q}: ${L(h)}`,{level:"warn"})}return x?q:null}async function P(q){let D=_(),x=Object.keys(D.plugins);if(x.length===0)return[];return(await Promise.allSettled(x.map(async(h)=>{let{marketplace:F}=W(h);if(!F||!q.has(F.toLowerCase()))return null;let H=D.plugins[h];if(!H||H.length===0)return null;let O=H.filter($);if(O.length===0)return null;return M(h,O)}))).filter((h)=>h.status==="fulfilled"&&h.value!==null).map((h)=>h.value)}async function m(q){return P(q)}function t(){(async()=>{if(S()){B("Plugin autoupdate: skipped (auto-updater disabled)");return}try{let q=await C();if(q.size===0)return;let x=(await Promise.allSettled(Array.from(q).map(async(h)=>{try{await Z(h,void 0,{disableCredentialHelper:!0})}catch(F){B(`Plugin autoupdate: failed to refresh marketplace ${h}: ${L(F)}`,{level:"warn"})}}))).filter((h)=>h.status==="rejected");if(x.length>0)B(`Plugin autoupdate: ${x.length} marketplace refresh(es) failed`,{level:"warn"});B("Plugin autoupdate: checking installed plugins");let z=await m(q);if(z.length>0)if(J)J(z);else G=z}catch(q){V(q)}})()}var J=null,G=null;var U=y(()=>{E();A();R();K();N();f();w();v();T()});
2
+ export{d as oc,P as pc,t as qc,U as rc};
@@ -0,0 +1,2 @@
1
+ import{Dfa as K2,Rfa as j,Wea as X,Wfa as p,Xea as K,ofa as G2,pfa as V2}from"./cli-1.1.39-p2sg5g92.mjs";import{vja as N,yja as b}from"./cli-1.1.39-pc9dgxhx.mjs";import{Xja as W,aka as S}from"./cli-1.1.39-wdctfdbb.mjs";import{ika as Z,oka as T}from"./cli-1.1.39-e4p7vgrg.mjs";import{Nqa as V}from"./cli-1.1.39-z8ts6axr.mjs";function U(J){if(typeof J!=="string")return;let P=J.trim();return P?P:void 0}function d(J=process.env){return U(J.KIMI_OAUTH_CLIENT_ID)??"17e5f671-d194-4dfb-9706-5516cb48c098"}function I(J=process.env){return U(J.KIMI_CLI_VERSION)??"0.27.0"}function t(J){let P=J.split(".");if(P.length<2)return;try{let L=P[1].replace(/-/g,"+").replace(/_/g,"/"),H=L+"=".repeat((4-L.length%4)%4),q=Buffer.from(H,"base64").toString("utf8"),Q=JSON.parse(q);return Q&&typeof Q==="object"?Q:void 0}catch{return}}var b2="https://auth.kimi.com/api/oauth/device_authorization",m="https://auth.kimi.com/api/oauth/token",g2="urn:ietf:params:oauth:grant-type:device_code",n="kimi_code_cli",l="node",u2="k3, kimi-for-coding, kimi-for-coding-highspeed";var A=()=>{};import{arch as N2,hostname as Y2,release as o,type as X2}from"os";import{randomUUID as s}from"crypto";function D2(){return X({allowPlainTextFallback:!0})}async function O2(){if(Y)return Y;if(Z())return Y=s(),Y;let J=D2();try{let L=U((await J.readAsync())?.[a]);if(L)return Y=L,L}catch(L){if(!W(L))j(L)}let P=s();try{let L=J.read()||{};J.update({...L,[a]:P})}catch(L){j(L)}return Y=P,P}function k2(J){return{"X-Msh-Platform":n,"X-Msh-Version":I(),"X-Msh-Device-Name":Y2(),"X-Msh-Device-Model":`${X2()} ${o()} ${N2()}`,"X-Msh-Os-Version":o(),"X-Msh-Device-Id":J}}async function E(){return k2(await O2())}var a="kimiDeviceId",Y;var v=V(()=>{T();S();p();K();A()});function i(){B=null}function M(){return X({allowPlainTextFallback:!0})}function F2(J){if(!J)return;let P=t(J)?.exp;return typeof P==="number"&&Number.isFinite(P)?P*1000:void 0}function z(J){if(!J||typeof J!=="object")return;let P=J,L=U(P.accessToken);if(!L)return;let H=(q)=>typeof q==="number"&&Number.isFinite(q)?q:void 0;return{accessToken:L,refreshToken:U(P.refreshToken),profileId:U(P.profileId),expiresAt:H(P.expiresAt),lastRefreshAt:H(P.lastRefreshAt),lastRefreshFailureAt:H(P.lastRefreshFailureAt)}}function C2(J){let P=J.expiresAt??F2(J.accessToken);if(P===void 0)return!1;return P<=Date.now()+B2}function I2(J,P=Date.now()){let L=Math.max(J.lastRefreshFailureAt??0,x??0);if(!L)return!1;return P-L<z2}function A2(J,P){if(!P.trim())return`Kimi token refresh failed with status ${J}.`;try{let L=JSON.parse(P),H=U(L.error_description)??U(L.error)??P.trim();return`Kimi token refresh failed with status ${J}: ${H}`}catch{return`Kimi token refresh failed with status ${J}: ${P.trim()}`}}function q4(){if(Z())return;try{let J=M().read();return z(J?.[D])}catch(J){if(!W(J))j(J);return}}async function g(){if(Z())return;let J=Date.now();if(B&&B.expiresAt>J)return B.blob;try{let P=await M().readAsync(),L=z(P?.[D]);return B={blob:L,expiresAt:J+f2},L}catch(P){if(!W(P))j(P);return}}function r(J){if(Z())return{success:!1,warning:"Bare mode: secure storage is disabled."};let P=z(J);if(!P)return{success:!1,warning:"Kimi credentials are incomplete."};let L=M(),H=L.read()||{},q=z(H[D]),Q={...H,[D]:{...P,profileId:P.profileId??q?.profileId,expiresAt:P.expiresAt??q?.expiresAt,lastRefreshAt:P.lastRefreshAt??Date.now()}},$=L.update(Q);if(i(),$.success)x=z(Q[D])?.lastRefreshFailureAt??null;return $}function E2(J,P){if(!r({...J,lastRefreshFailureAt:P}).success)x=P}function Q4(){if(Z())return{success:!0};let J=M(),L={...J.read()||{}};delete L[D];let H=J.update(L);if(i(),H.success)x=null;else{let q=H.warning??"secure storage update failed";return j(`clearKimiCredentials: failed to remove Kimi entry (${q})`),{success:!1,warning:q}}return H}async function e(J){if(Z())return{refreshed:!1};let P=await g();if(!P)return{refreshed:!1};if(!P.refreshToken)return{refreshed:!1,credentials:P};if(!J?.force&&!C2(P))return{refreshed:!1,credentials:P};if(!J?.force&&I2(P))return{refreshed:!1,credentials:P};if(k)return k;return k=(async()=>{let L=Date.now();try{let H=await fetch(m,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded",Accept:"application/json","User-Agent":l,...await E()},body:new URLSearchParams({client_id:d(),grant_type:"refresh_token",refresh_token:P.refreshToken}),signal:AbortSignal.timeout(15000)});if(!H.ok){let C=await H.text().catch(()=>"");throw Error(A2(H.status,C))}let q=await H.json(),Q=U(q.access_token);if(!Q)throw Error("Kimi token refresh succeeded without a new access token.");let $=typeof q.expires_in==="number"&&Number.isFinite(q.expires_in)&&q.expires_in>0?q.expires_in:900,G={accessToken:Q,refreshToken:U(q.refresh_token)??P.refreshToken,profileId:P.profileId,expiresAt:Date.now()+$*1000,lastRefreshAt:Date.now()},_=r(G);if(!_.success)N(`[kimi] token refresh succeeded but credentials could not be saved: ${_.warning??"unknown error"}`,{level:"warn"});return{refreshed:!0,credentials:G}}catch(H){throw E2(P,L),H}finally{k=null}})(),k}var D="kimiCode",B2=60000,z2=60000,k=null,x=null,f2=30000,B=null;var P2=V(()=>{b();T();S();v();p();K();A()});function x2(){try{if(typeof MACRO<"u")return"1.1.39"}catch{return}return}function R(){return`claudin/${x2()??"dev"}`}var u=()=>{};function w(J){if(typeof J!=="string")return;let P=J.trim();return P?P:void 0}function L2(J=process.env){return w(J.XAI_OAUTH_CLIENT_ID)??"b1a00492-073a-47ea-816f-4c329264a828"}function H2(J){let P=J.split(".");if(P.length<2)return;try{let L=P[1].replace(/-/g,"+").replace(/_/g,"/"),H=L+"=".repeat((4-L.length%4)%4),q=Buffer.from(H,"base64").toString("utf8"),Q=JSON.parse(q);return Q&&typeof Q==="object"?Q:void 0}catch{return}}var J2="https://auth.x.ai/oauth2/token",U4="https://auth.x.ai/oauth2/device/code",j4="urn:ietf:params:oauth:grant-type:device_code",w4="openid profile email offline_access grok-cli:access api:access";var q2=()=>{};function y(){return X({allowPlainTextFallback:!0})}function Q2(J){if(!J)return;let L=H2(J)?.exp;if(typeof L==="number"&&Number.isFinite(L))return L*1000;return}function F(J){if(!J||typeof J!=="object")return;let P=J,L=w(P.accessToken);if(!L)return;let H=w(P.refreshToken),q=w(P.idToken),Q=w(P.profileId),$=typeof P.lastRefreshAt==="number"&&Number.isFinite(P.lastRefreshAt)?P.lastRefreshAt:void 0,G=typeof P.lastRefreshFailureAt==="number"&&Number.isFinite(P.lastRefreshFailureAt)?P.lastRefreshFailureAt:void 0,_=typeof P.expiresAt==="number"&&Number.isFinite(P.expiresAt)?P.expiresAt:void 0;return{accessToken:L,refreshToken:H,idToken:q,profileId:Q,expiresAt:_,lastRefreshAt:$,lastRefreshFailureAt:G}}function h2(J){let P=J.expiresAt??Q2(J.accessToken)??Q2(J.idToken);if(P===void 0)return!1;return P<=Date.now()+M2}function y2(J,P=Date.now()){let L=Math.max(J.lastRefreshFailureAt??0,h??0);if(!L)return!1;return P-L<R2}function T2(J,P){if(!P.trim())return`xAI token refresh failed with status ${J}.`;try{let L=JSON.parse(P),H=L.error&&typeof L.error==="object"?L.error:void 0,q=w(H?.code??L.code),Q=w(H?.message??L.error_description)??P.trim();return q?`xAI token refresh failed (${q}): ${Q}`:`xAI token refresh failed with status ${J}: ${Q}`}catch{return`xAI token refresh failed with status ${J}: ${P.trim()}`}}function O4(){if(Z())return;try{let J=y().read();return F(J?.[O])}catch(J){if(!W(J))j(J);return}}async function c(){if(Z())return;try{let J=await y().readAsync();return F(J?.[O])}catch(J){if(!W(J))j(J);return}}function Z2(J){if(Z())return{success:!1,warning:"Bare mode: secure storage is disabled."};let P=F(J);if(!P)return{success:!1,warning:"xAI credentials are incomplete."};let L=y(),H=L.read()||{},q=F(H[O]),Q={...H,[O]:{...P,profileId:P.profileId??q?.profileId,expiresAt:P.expiresAt??q?.expiresAt,lastRefreshAt:P.lastRefreshAt??Date.now()}},$=L.update(Q);if($.success)h=F(Q[O])?.lastRefreshFailureAt??null;return $}function S2(J,P){if(!Z2({...J,lastRefreshFailureAt:P}).success)h=P}function k4(){if(Z())return{success:!0};let J=y(),L={...J.read()||{}};delete L[O];let H=J.update(L);if(H.success)h=null;else{let q=H.warning??"secure storage update failed";return j(`clearXaiCredentials: failed to remove xAI entry (${q})`),{success:!1,warning:q}}return H}async function $2(J){if(Z())return{refreshed:!1};let P=await c();if(!P)return{refreshed:!1};if(!P.refreshToken)return{refreshed:!1,credentials:P};if(!J?.force&&!h2(P))return{refreshed:!1,credentials:P};if(!J?.force&&y2(P))return{refreshed:!1,credentials:P};if(f)return f;return f=(async()=>{let L=Date.now();try{let H=new URLSearchParams({client_id:L2(),grant_type:"refresh_token",refresh_token:P.refreshToken}),q=await fetch(J2,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded",Accept:"application/json","User-Agent":R()},body:H,signal:AbortSignal.timeout(15000)});if(!q.ok){let _2=await q.text().catch(()=>"");throw Error(T2(q.status,_2))}let Q=await q.json(),$=w(Q.access_token);if(!$)throw Error("xAI token refresh succeeded without a new access token.");let G=typeof Q.expires_in==="number"&&Number.isFinite(Q.expires_in)&&Q.expires_in>0?Q.expires_in:3600,_={accessToken:$,refreshToken:w(Q.refresh_token)??P.refreshToken,idToken:w(Q.id_token)??P.idToken,profileId:P.profileId,expiresAt:Date.now()+G*1000,lastRefreshAt:Date.now()},C=Z2(_);if(!C.success)N(`[xai] token refresh succeeded but credentials could not be saved: ${C.warning??"unknown error"}`,{level:"warn"});return{refreshed:!0,credentials:_}}catch(H){throw S2(P,L),H}finally{f=null}})(),f}var O="xai",M2=120000,R2=60000,f=null,h=null;var U2=V(()=>{b();T();S();p();K();u();q2()});function j2(){return`kimi-code-cli/${I()}`}var w2=V(()=>{A()});function W2(J){return p2.find((P)=>P.matches(J))}async function R4(J){let P=W2(J?.baseUrl);if(!P)return{};let L;if(!J?.apiKey)L=(await P.refresh().catch(async(q)=>{return N(`[${P.id}] access token refresh failed before request: ${q instanceof Error?q.message:String(q)}`,{level:"warn"}),{credentials:await P.readCredentials()}})).credentials?.accessToken??void 0;if(L||P.attachHeadersWithoutToken)return{accessToken:L,userAgent:P.userAgent(),deviceHeaders:P.deviceHeaders?await P.deviceHeaders():void 0};return{}}async function h4(J){let P=W2(J);if(!P)return"no-match";return await P.refresh({force:!0}).then(()=>!0,(H)=>{return N(`[${P.id}] force-refresh on 401 failed: ${H instanceof Error?H.message:String(H)}`,{level:"warn"}),!1})?"refreshed":"failed"}var p2;var v2=V(()=>{b();P2();v();w2();U2();u();K2();p2=[{id:"xai",matches:G2,refresh:$2,readCredentials:c,userAgent:R,attachHeadersWithoutToken:!1},{id:"kimi",matches:V2,refresh:e,readCredentials:g,userAgent:j2,deviceHeaders:E,attachHeadersWithoutToken:!0}]});
2
+ export{b2 as tY,m as uY,g2 as vY,l as wY,u2 as xY,U as yY,d as zY,A as AY,E as BY,v as CY,q4 as DY,g as EY,r as FY,Q4 as GY,e as HY,P2 as IY,j2 as JY,w2 as KY,R as LY,u as MY,J2 as NY,U4 as OY,j4 as PY,w4 as QY,w as RY,L2 as SY,q2 as TY,O4 as UY,c as VY,Z2 as WY,k4 as XY,$2 as YY,U2 as ZY,R4 as _Y,h4 as $Y,v2 as aZ};
@@ -0,0 +1,50 @@
1
+ import{hd as Yz,id as I1}from"./cli-1.1.39-1wg6zvk6.mjs";import{jd as pq,kd as lq,ld as E0,md as Gz,od as dq}from"./cli-1.1.39-ck0k3rxx.mjs";import{pd as F0,sd as k1}from"./cli-1.1.39-1r1cbvk8.mjs";import{nh as Yq,oh as L1}from"./cli-1.1.39-jq1a84j4.mjs";import{FO as Zz,HO as h1,LG as q2,Lx as eq,MG as Cz,Mx as P1,OG as U1,PG as B1,RB as qz,RE as g,SE as Tz,TB as zz,UB as Qz,VB as $z,WB as Jz,XB as m1,aF as a0,aq as rq,bF as m0,bq as M1,dP as y0,eP as z2,nx as o,px as zq,qF as H2,rF as iz,sF as y2,tF as b2,uF as L2,vF as az}from"./cli-1.1.39-yyqx9zb5.mjs";import{$X as Y0,tX as B,vX as G}from"./cli-1.1.39-kcq7gw24.mjs";import{AY as d2,BY as n2,CY as R1,DY as A4,FY as t2,GY as tq,IY as s2,LY as P2,MY as q1,NY as m2,OY as h2,PY as k2,QY as I2,RY as Z0,SY as w4,TY as z1,UY as T4,WY as g2,XY as sq,ZY as j2,tY as c2,uY as x2,vY as p2,wY as l2,xY as Gq,yY as N0,zY as _4}from"./cli-1.1.39-cvbzp08c.mjs";import{bZ as n4,cZ as i4,dZ as a4,eZ as o4,fZ as r4,gZ as Az,jZ as t4,nZ as s4,oZ as oq,pZ as e4}from"./cli-1.1.39-kfztpa2h.mjs";import{rZ as x0,sZ as U2}from"./cli-1.1.39-nxv718fh.mjs";import{B1 as G0,C1 as J,D1 as y,E1 as d}from"./cli-1.1.39-n8j5q839.mjs";import{F1 as H0}from"./cli-1.1.39-esp4w3m4.mjs";import{N3 as r0,W1 as d4,Y1 as Ez,d4 as D1}from"./cli-1.1.39-nmm4w3bh.mjs";import{$ea as c0,Aea as a,Cea as i,Dea as o0,Dfa as Mq,Fea as A0,Gea as m4,Hea as z0,Iea as Q0,Mea as $0,Nea as h4,Pea as k4,Tea as D0,Yea as y4,Zea as R2,_ea as W2,afa as b4,bfa as V2,cfa as H4,dfa as X2,efa as K2,ffa as nz,gfa as I4,hfa as F2,ifa as E4,kfa as _2,mfa as aq,nfa as I0,r9 as L0,s9 as O1,wea as Lq,xea as w0,yea as wq,zea as b0}from"./cli-1.1.39-p2sg5g92.mjs";import{ika as s,oka as P0}from"./cli-1.1.39-e4p7vgrg.mjs";import{Jqa as K0,Kqa as _1,Nqa as v}from"./cli-1.1.39-z8ts6axr.mjs";function jz(q,z=V4,Q,$){let Z=$?.activate??!0,N=a().find((V)=>V.provider==="openai"&&V.extras?.githubToken!==void 0);if(N){if(!Q0(N.id,{provider:"openai",name:N.name,baseUrl:Q||N.baseUrl,model:N.model||z,apiKey:q,extras:{...N.extras,githubToken:q}}))return{mode:"failed"};if(Z)$0(N.id);return{mode:"updated"}}if(!z0({provider:"openai",name:"GitHub Copilot",baseUrl:Q||gz,model:z,apiKey:q,extras:{githubToken:q}},{makeActive:Z}))return{mode:"failed"};return{mode:"created"}}function Q2({onDone:q,onBack:z,onChangeAPIKey:Q,activateOnSave:$=!0}){let Z=t4()?.trim()?"already-authed":"menu",[N,X]=q0.useState(Z),[V,H]=q0.useState(null),[W,L]=q0.useState(""),[w,D]=q0.useState(0),[M,P]=q0.useState(null),F=q0.useCallback(async(c,E=V4,k,x)=>{let _0=s4(c,k,x?.enterpriseDomain);if(!_0.success){H(_0.warning??"Could not save token to secure storage."),X("error");return}if(jz(c,E,x?.baseUrl,{activate:$}).mode==="failed"){H("Could not save the GitHub Copilot provider profile."),X("error");return}d4(),Q?.(),q($?"GitHub Copilot onboard complete. Copilot token stored in secure storage and as the active /provider profile.":'GitHub Copilot sign-in complete. Copilot token stored in secure storage; the profile was saved without changing the active provider — activate it from "Set active provider".',{display:"user"})},[$,Q,q]),A=q0.useCallback(async(c)=>{X("device-busy"),H(null),P(null);try{let E=await i4({domain:c});P({user_code:E.user_code,verification_uri:E.verification_uri}),await o4(E.verification_uri);let k=await a4(E.device_code,{initialInterval:E.interval,timeoutSeconds:E.expires_in,domain:c}),x=await r4(k,{domain:c});await F(x.token,V4,k,{baseUrl:x.endpoints.api?.replace(/\/+$/,"")||void 0,enterpriseDomain:c})}catch(E){H(E instanceof Error?E.message:String(E)),X("error")}},[F]);if(N==="already-authed")return y(B,{flexDirection:"column",gap:1,children:[J(G,{bold:!0,children:"GitHub Copilot"}),J(G,{children:"You are already signed in to GitHub Copilot."}),J(G,{dimColor:!0,children:'Choose "Sign in again" to refresh your token, or go back to the provider menu.'}),J(g,{options:[{label:"Sign in again",value:"sign-in-again"},{label:"Sign in with GitHub Enterprise",value:"enterprise"},{label:z?"Back to /provider menu":"Cancel",value:"back"}],onChange:(E)=>{if(E==="sign-in-again"){A();return}if(E==="enterprise"){X("enterprise-domain");return}if(z){z();return}q("GitHub onboard cancelled",{display:"system"})}})]});if(N==="enterprise-domain")return y(B,{flexDirection:"column",gap:1,children:[J(G,{bold:!0,children:"GitHub Enterprise sign-in"}),J(G,{dimColor:!0,children:"Enter your GitHub Enterprise domain (e.g. github.acme.com). Leave empty for github.com."}),y(B,{flexDirection:"row",gap:1,children:[J(G,{children:">"}),J(y0,{value:W,onChange:L,onSubmit:()=>{let E=n4(W);if(!E){A();return}A(E)},onExit:()=>X(Z),focus:!0,showCursor:!0,placeholder:"github.acme.com",columns:80,cursorOffset:w,onChangeCursorOffset:D})]}),J(G,{dimColor:!0,children:"Press Enter to continue. Press Esc to go back."})]});if(N==="error"&&V)return y(B,{flexDirection:"column",gap:1,children:[J(G,{color:"error",children:V}),J(g,{options:[{label:z?"Back to /provider menu":"Back to menu",value:"back"},{label:"Exit",value:"exit"}],onChange:(E)=>{if(E==="back"){if(z){z();return}X("menu"),H(null);return}q("GitHub onboard cancelled",{display:"system"})}})]});if(N==="device-busy")return y(B,{flexDirection:"column",gap:1,children:[J(G,{children:"GitHub Copilot sign-in"}),M?y(G0,{children:[y(G,{children:["Enter code ",J(G,{bold:!0,children:M.user_code})," at"," ",M.verification_uri]}),J(G,{dimColor:!0,children:"A browser window may have opened. Waiting for authorization..."})]}):J(G,{dimColor:!0,children:"Requesting device code from GitHub..."}),J(q2,{})]});return y(B,{flexDirection:"column",gap:1,children:[J(G,{bold:!0,children:"GitHub Copilot setup"}),J(G,{dimColor:!0,children:"Stores your token in the OS credential store (macOS Keychain when available) and creates a /provider profile so Copilot is the active provider — no manual env exports required."}),J(g,{options:[{label:"Sign in with browser",value:"device"},{label:"Sign in with GitHub Enterprise",value:"enterprise"},{label:z?"Back to /provider menu":"Cancel",value:"cancel"}],onChange:(c)=>{if(c==="cancel"){if(z){z();return}q("GitHub onboard cancelled",{display:"system"});return}if(c==="enterprise"){X("enterprise-domain");return}A()}})]})}var q0,V4="github:copilot",gz="https://api.githubcopilot.com";var $2=v(()=>{Tz();Cz();z2();Y0();Az();e4();Ez();D0();d();q0=K0(H0(),1)});function Z2(q){return[q.name,q.family??"",...q.families??[],q.parameterSize??"",q.quantizationLevel??""].join(" ").toLowerCase()}function M0(q,z){return z.some((Q)=>q.includes(Q))}function vz(q){return!M0(Z2(q),J2)}function cz(q){return q.find(vz)??null}function X4(q){let Q=`${q.parameterSize??""} ${q.name}`.toLowerCase().match(/(\d+(?:\.\d+)?)\s*b\b/);if(Q?.[1])return Number(Q[1]);if(typeof q.sizeBytes==="number"&&q.sizeBytes>0)return Number((q.sizeBytes/1e9).toFixed(1));return null}function xz(q){return(q.quantizationLevel??q.name).toLowerCase()}function pz(q,z,Q){if(q===null)return Q.push("unknown size"),0;if(z==="latency"){if(q<=4)return Q.push("tiny model for low latency"),32;if(q<=8)return Q.push("small model for fast responses"),26;if(q<=14)return Q.push("mid-sized model with acceptable latency"),16;if(q<=24)return Q.push("larger model may be slower"),8;return Q.push("large model likely slower locally"),q<=40?0:-8}if(z==="coding"){if(q>=7&&q<=14)return Q.push("strong coding size tier"),24;if(q>14&&q<=34)return Q.push("large coding-capable size tier"),28;if(q>34)return Q.push("very large model with higher quality potential"),18;return Q.push("compact model may trade off coding depth"),12}if(q>=7&&q<=14)return Q.push("great balanced size tier"),26;if(q>=3&&q<7)return Q.push("compact balanced size tier"),18;if(q>14&&q<=24)return Q.push("high quality balanced size tier"),20;if(q>24)return Q.push("large model for quality-first usage"),10;return Q.push("very small model for general usage"),8}function lz(q,z,Q){let $=xz(q);if($.includes("q4"))return Q.push("efficient Q4 quantization"),z==="latency"?8:4;if($.includes("q5"))return Q.push("balanced Q5 quantization"),z==="latency"?6:5;if($.includes("q8"))return Q.push("higher quality Q8 quantization"),z==="latency"?2:5;return 0}function dz(q,z,Q){if(z.score!==q.score)return z.score-q.score;let $=X4(q)??Number.POSITIVE_INFINITY,Z=X4(z)??Number.POSITIVE_INFINITY;if(Q==="latency")return $-Z;if(Q==="coding")return Z-$;let N=14;return Math.abs($-N)-Math.abs(Z-N)}function K4(q,z){return q.map((Q)=>{let $=Z2(Q),Z=[],N=0;if(M0($,J2))N-=40,Z.push("not a chat-first model");if(M0($,Sz))N+=z==="coding"?24:z==="balanced"?10:4,Z.push("coding-oriented model family");if(M0($,uz))N+=z==="latency"?4:z==="coding"?6:8,Z.push("strong general-purpose model family");if(M0($,fz))N+=z==="latency"?2:6,Z.push("chat/instruct tuned");if($.includes("vision")||$.includes("vl"))N-=2,Z.push("vision model adds extra overhead");N+=pz(X4(Q),z,Z),N+=lz(Q,z,Z);let X=Z.slice(0,3).join(", ");return{...Q,score:N,reasons:Z,summary:X}}).sort((Q,$)=>dz(Q,$,z))}function G2(q,z){return cz(K4(q,z))}var Sz,uz,fz,J2;var Y2=v(()=>{Sz=["coder","codellama","codegemma","codestral","devstral","starcoder","deepseek-coder","qwen2.5-coder","qwen-coder"],uz=["llama","qwen","mistral","gemma","phi","deepseek"],fz=["instruct","chat","assistant"],J2=["embed","embedding","rerank","bge","whisper"]});function oz(q){let z=`http://localhost:${q.port}/auth/callback`,Q=new URL(`${y4}/oauth/authorize`);return Q.searchParams.append("response_type","code"),Q.searchParams.append("client_id",b4()),Q.searchParams.append("redirect_uri",z),Q.searchParams.append("scope",R2),Q.searchParams.append("code_challenge",q.codeChallenge),Q.searchParams.append("code_challenge_method","S256"),Q.searchParams.append("id_token_add_organizations","true"),Q.searchParams.append("codex_cli_simplified_flow","true"),Q.searchParams.append("state",q.state),Q.searchParams.append("originator",W2),Q.toString()}function rz(){return`<!doctype html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="utf-8" />
5
+ <title>Codex Login Complete</title>
6
+ <style>
7
+ body { font-family: sans-serif; padding: 32px; line-height: 1.5; color: #111827; }
8
+ h1 { margin: 0 0 12px; font-size: 22px; }
9
+ p { margin: 0 0 10px; }
10
+ </style>
11
+ </head>
12
+ <body>
13
+ <h1>Codex login complete</h1>
14
+ <p>You can return to Claudin now.</p>
15
+ <p>Claudin will finish activating your new Codex OAuth login.</p>
16
+ </body>
17
+ </html>`}function tz(q){return`<!doctype html>
18
+ <html lang="en">
19
+ <head>
20
+ <meta charset="utf-8" />
21
+ <title>Codex Login Failed</title>
22
+ <style>
23
+ body { font-family: sans-serif; padding: 32px; line-height: 1.5; color: #111827; }
24
+ h1 { margin: 0 0 12px; font-size: 22px; color: #991b1b; }
25
+ p { margin: 0 0 10px; }
26
+ </style>
27
+ </head>
28
+ <body>
29
+ <h1>Codex login failed</h1>
30
+ <p>${X2(q)}</p>
31
+ <p>You can close this window and try again in Claudin.</p>
32
+ </body>
33
+ </html>`}function N2(){return`<!doctype html>
34
+ <html lang="en">
35
+ <head>
36
+ <meta charset="utf-8" />
37
+ <title>Codex Login Cancelled</title>
38
+ <style>
39
+ body { font-family: sans-serif; padding: 32px; line-height: 1.5; color: #111827; }
40
+ h1 { margin: 0 0 12px; font-size: 22px; }
41
+ p { margin: 0 0 10px; }
42
+ </style>
43
+ </head>
44
+ <body>
45
+ <h1>Codex login cancelled</h1>
46
+ <p>You can close this window and retry in Claudin.</p>
47
+ </body>
48
+ </html>`}async function sz(q){let z=`http://localhost:${q.port}/auth/callback`,Q=new URLSearchParams({grant_type:"authorization_code",code:q.authorizationCode,redirect_uri:z,client_id:b4(),code_verifier:q.codeVerifier}),$=await fetch(`${y4}/oauth/token`,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:Q,signal:q.signal?AbortSignal.any([q.signal,AbortSignal.timeout(15000)]):AbortSignal.timeout(15000)});if(!$.ok){let W=await $.text().catch(()=>"");throw Error(W.trim()?`Codex OAuth token exchange failed (${$.status}): ${W.trim()}`:`Codex OAuth token exchange failed with status ${$.status}.`)}let Z=await $.json(),N=c0(Z.access_token),X=c0(Z.refresh_token);if(!N||!X)throw Error("Codex OAuth completed, but the token response was missing credentials.");let V=c0(Z.id_token);return{apiKey:V?await K2(V).catch(()=>{return}):void 0,accessToken:N,refreshToken:X,idToken:V,accountId:H4(V)??H4(N)}}class L4{authCodeListener=null;port=null;tokenExchangeAbortController=null;buildCancellationError(){return Error("Codex OAuth flow was cancelled.")}async startOAuthFlow(q){let z=y2(),Q=V2(),$=new H2("/auth/callback");this.authCodeListener=$,this.port=null;try{let Z=await $.start(Q);this.port=Z;let N=L2(),X=await b2(z),V=oz({port:Z,codeChallenge:X,state:N});try{let H=await $.waitForAuthorization(N,async()=>{await q(V)}),W=new AbortController;this.tokenExchangeAbortController=W;let L;try{L=await sz({authorizationCode:H,codeVerifier:z,port:Z,signal:W.signal})}finally{if(this.tokenExchangeAbortController===W)this.tokenExchangeAbortController=null}if(this.authCodeListener!==$)throw this.buildCancellationError();return $.handleSuccessRedirect([],(w)=>{w.writeHead(200,{"Content-Type":"text/html; charset=utf-8"}),w.end(rz())}),L}catch(H){let W=this.authCodeListener===$?H:this.buildCancellationError();if($.hasPendingResponse()){let L=W instanceof Error&&W.message==="Codex OAuth flow was cancelled.";$.handleErrorRedirect((w)=>{w.writeHead(L?200:400,{"Content-Type":"text/html; charset=utf-8"}),w.end(L?N2():tz(W instanceof Error?W.message:String(W)))})}throw W}finally{this.cleanup()}}catch(Z){let N=Z instanceof Error?Z.message:String(Z);if(N.includes("EADDRINUSE")||N.includes(String(Q)))throw Error(`Codex OAuth needs localhost:${Q} for its callback. Close any app already using that port and try again.`);throw Z}}cleanup(){let q=this.buildCancellationError();if(this.tokenExchangeAbortController?.abort(q),this.tokenExchangeAbortController=null,this.authCodeListener?.hasPendingResponse())this.authCodeListener.handleErrorRedirect((z)=>{z.writeHead(200,{"Content-Type":"text/html; charset=utf-8"}),z.end(N2())});this.authCodeListener?.cancelPendingAuthorization(q),this.authCodeListener=null,this.port=null}}var w2=v(()=>{iz();az();nz()});function ez(){return new L4}function B2(q){let{onAuthenticated:z}=q,Q=q.deps?.createOAuthService??ez,$=q.deps?.openBrowser??x0,Z=q.deps?.saveCodexCredentials??F2,N=q.deps?.isBareMode??s,[X,V]=p0.useState({state:"starting"});return p0.useEffect(()=>{if(N()){V({state:"error",message:"Codex OAuth is unavailable in --bare because secure storage is disabled."});return}let H=!1,W=Q();return W.startOAuthFlow(async(L)=>{if(H)return;V({state:"waiting",authUrl:L,browserOpened:null});let w=await $(L);if(H)return;V({state:"waiting",authUrl:L,browserOpened:w})}).then(async(L)=>{if(H)return;await z(L,(D)=>{let M=Z({apiKey:L.apiKey,accessToken:L.accessToken,refreshToken:L.refreshToken,idToken:L.idToken,accountId:L.accountId,profileId:D?.profileId});if(!M.success)throw Error(M.warning??"Codex OAuth succeeded, but credentials could not be saved securely.")})}).catch((L)=>{if(H)return;V({state:"error",message:L instanceof Error?L.message:String(L)})}),()=>{H=!0,W.cleanup()}},[Q,N,z,$,Z]),X}var p0;var O2=v(()=>{w2();U2();_2();P0();p0=K0(H0(),1)});function T2(){return{"Content-Type":"application/x-www-form-urlencoded",Accept:"application/json","User-Agent":P2()}}function M2(q,z){let Q=Number(q);return Number.isFinite(Q)&&Q>0?Q*1000:z}function Z1(q,z){if(z?.aborted)return Promise.resolve();return new Promise((Q)=>{let $=setTimeout(()=>{z?.removeEventListener("abort",Z),Q()},q),Z=()=>{clearTimeout($),Q()};z?.addEventListener("abort",Z,{once:!0})})}async function G1(q){let z=q?.fetchImpl??fetch,Q=q?.signal?AbortSignal.any([q.signal,AbortSignal.timeout(15000)]):AbortSignal.timeout(15000),$=await z(h2,{method:"POST",headers:T2(),body:new URLSearchParams({client_id:w4(),scope:I2}).toString(),signal:Q});if(!$.ok){let H=await $.text().catch(()=>"");throw Error(`xAI device code request failed (${$.status})${H?`: ${H.trim()}`:""}`)}let Z=await $.json(),N=Z0(Z.device_code),X=Z0(Z.user_code),V=Z0(Z.verification_uri);if(!N||!X||!V)throw Error("xAI device code response is missing device_code / user_code / verification_uri.");return{device_code:N,user_code:X,verification_uri:V,verification_uri_complete:Z0(Z.verification_uri_complete),expires_in:typeof Z.expires_in==="number"&&Z.expires_in>0?Z.expires_in:A2/1000,interval:typeof Z.interval==="number"&&Z.interval>0?Z.interval:E2/1000}}async function Y1(q,z){let Q=z?.fetchImpl??fetch,$=z?.sleep??Z1,Z=z?.now??(()=>Date.now()),N=M2(q.expires_in,A2),X=Z()+N,V=Math.max(M2(q.interval,E2),Q1);while(Z()<X){if(z?.signal?.aborted)throw Error("xAI device authorization was cancelled.");let H=await Q(m2,{method:"POST",headers:T2(),body:new URLSearchParams({grant_type:k2,client_id:w4(),device_code:q.device_code}).toString(),signal:z?.signal});if(H.ok){let D=await H.json(),M=Z0(D.access_token),P=Z0(D.refresh_token);if(!M||!P)throw Error("xAI OAuth completed, but the token response was missing credentials.");let F=typeof D.expires_in==="number"&&Number.isFinite(D.expires_in)&&D.expires_in>0?D.expires_in:3600;return{accessToken:M,refreshToken:P,idToken:Z0(D.id_token),expiresAt:Z()+F*1000}}let W=await H.json().catch(()=>({})),L=Math.max(0,X-Z());if(W.error==="authorization_pending"){await $(Math.min(V+D2,L),z?.signal);continue}if(W.error==="slow_down"){V=Math.min(V+$1,J1),await $(Math.min(V+D2,L),z?.signal);continue}if(W.error==="access_denied"||W.error==="authorization_denied")throw Error("xAI device authorization was denied.");if(W.error==="expired_token")throw Error("xAI device code expired - please re-run login.");let w=W.error_description??W.error??"";throw Error(`xAI device token exchange failed (${H.status})${w?`: ${w}`:""}`)}throw Error("xAI device authorization timed out.")}class F4{abortController=null;async startDeviceFlow(q){let z=new AbortController;this.abortController=z;try{let Q=await G1({signal:z.signal});return await q(Q),await Y1(Q,{signal:z.signal})}finally{if(this.abortController===z)this.abortController=null}}cleanup(){this.abortController?.abort(Error("xAI device authorization was cancelled.")),this.abortController=null}}var E2=5000,Q1=1000,$1=5000,J1=60000,A2=300000,D2=3000;var C2=v(()=>{q1();z1()});function N1(){return new F4}function S2(q){let{onAuthenticated:z}=q,Q=q.deps?.createOAuthService??N1,$=q.deps?.saveXaiCredentials??g2,Z=q.deps?.isBareMode??s,[N,X]=l0.useState({state:"starting"});return l0.useEffect(()=>{if(Z()){X({state:"error",message:"xAI OAuth is unavailable in --bare because secure storage is disabled."});return}let V=!1,H=Q();return H.startDeviceFlow(async(W)=>{if(V)return;X({state:"waiting",userCode:W.user_code,verificationUri:W.verification_uri,verificationUriComplete:W.verification_uri_complete})}).then(async(W)=>{if(V)return;await z(W,(w)=>{let D=$({accessToken:W.accessToken,refreshToken:W.refreshToken,idToken:W.idToken,expiresAt:W.expiresAt,profileId:w?.profileId});if(!D.success)throw Error(D.warning??"xAI OAuth succeeded, but credentials could not be saved securely.")})}).catch((W)=>{if(V)return;X({state:"error",message:W instanceof Error?W.message:String(W)})}),()=>{V=!0,H.cleanup()}},[Q,Z,z,$]),N}var l0;var u2=v(()=>{C2();P0();j2();l0=K0(H0(),1)});async function o2(){return{"Content-Type":"application/x-www-form-urlencoded",Accept:"application/json","User-Agent":l2,...await n2()}}function v2(q,z){let Q=Number(q);return Number.isFinite(Q)&&Q>0?Q*1000:z}function K1(q,z){if(z?.aborted)return Promise.resolve();return new Promise((Q)=>{let $=setTimeout(()=>{z?.removeEventListener("abort",Z),Q()},q),Z=()=>{clearTimeout($),Q()};z?.addEventListener("abort",Z,{once:!0})})}async function H1(q){let z=q?.fetchImpl??fetch,Q=q?.signal?AbortSignal.any([q.signal,AbortSignal.timeout(15000)]):AbortSignal.timeout(15000),$=await z(c2,{method:"POST",headers:await o2(),body:new URLSearchParams({client_id:_4()}).toString(),signal:Q});if(!$.ok){let H=await $.text().catch(()=>"");throw Error(`Kimi device code request failed (${$.status})${H?`: ${H.trim()}`:""}`)}let Z=await $.json(),N=N0(Z.device_code),X=N0(Z.user_code),V=N0(Z.verification_uri);if(!N||!X||!V)throw Error("Kimi device code response is missing device_code / user_code / verification_uri.");return{device_code:N,user_code:X,verification_uri:V,verification_uri_complete:N0(Z.verification_uri_complete),expires_in:typeof Z.expires_in==="number"&&Z.expires_in>0?Z.expires_in:a2/1000,interval:typeof Z.interval==="number"&&Z.interval>0?Z.interval:i2/1000}}async function y1(q,z){let Q=z?.fetchImpl??fetch,$=z?.sleep??K1,Z=z?.now??(()=>Date.now()),N=v2(q.expires_in,a2),X=Z()+N,V=Math.max(v2(q.interval,i2),W1);while(Z()<X){if(z?.signal?.aborted)throw Error("Kimi device authorization was cancelled.");let H=await Q(x2,{method:"POST",headers:await o2(),body:new URLSearchParams({grant_type:p2,client_id:_4(),device_code:q.device_code}).toString(),signal:z?.signal});if(H.ok){let D=await H.json(),M=N0(D.access_token),P=N0(D.refresh_token);if(!M||!P)throw Error("Kimi OAuth completed, but the token response was missing credentials.");let F=typeof D.expires_in==="number"&&Number.isFinite(D.expires_in)&&D.expires_in>0?D.expires_in:900;return{accessToken:M,refreshToken:P,expiresAt:Z()+F*1000}}let W=await H.json().catch(()=>({})),L=Math.max(0,X-Z());if(W.error==="authorization_pending"){await $(Math.min(V+f2,L),z?.signal);continue}if(W.error==="slow_down"){V=Math.min(V+V1,X1),await $(Math.min(V+f2,L),z?.signal);continue}if(W.error==="access_denied"||W.error==="authorization_denied")throw Error("Kimi device authorization was denied.");if(W.error==="expired_token")throw Error("Kimi device code expired - please re-run login.");let w=W.error_description??W.error??"";throw Error(`Kimi device token exchange failed (${H.status})${w?`: ${w}`:""}`)}throw Error("Kimi device authorization timed out.")}class U4{abortController=null;async startDeviceFlow(q){let z=new AbortController;this.abortController=z;try{let Q=await H1({signal:z.signal});return await q(Q),await y1(Q,{signal:z.signal})}finally{if(this.abortController===z)this.abortController=null}}cleanup(){this.abortController?.abort(Error("Kimi device authorization was cancelled.")),this.abortController=null}}var i2=5000,W1=1000,V1=5000,X1=60000,a2=1800000,f2=3000;var r2=v(()=>{R1();d2()});function b1(){return new U4}function e2(q){let{onAuthenticated:z}=q,Q=q.deps?.createOAuthService??b1,$=q.deps?.saveKimiCredentials??t2,Z=q.deps?.isBareMode??s,N=q.deps?.openBrowser??x0,[X,V]=R0.useState({state:"starting"}),H=R0.useRef(!1);return R0.useEffect(()=>{if(Z()){V({state:"error",message:"Kimi Code OAuth is unavailable in --bare because secure storage is disabled."});return}let W=!1,L=Q();return L.startDeviceFlow(async(w)=>{if(W)return;V({state:"waiting",userCode:w.user_code,verificationUri:w.verification_uri,verificationUriComplete:w.verification_uri_complete})}).then(async(w)=>{if(W)return;await z(w,(M)=>{let P=$({accessToken:w.accessToken,refreshToken:w.refreshToken,expiresAt:w.expiresAt,profileId:M?.profileId});if(!P.success)throw Error(P.warning??"Kimi Code OAuth succeeded, but credentials could not be saved securely.")})}).catch((w)=>{if(W)return;V({state:"error",message:w instanceof Error?w.message:String(w)})}),()=>{W=!0,L.cleanup()}},[Q,Z,z,$]),R0.useEffect(()=>{if(X.state!=="waiting")return;if(H.current)return;let W=X.verificationUriComplete??X.verificationUri;if(!W)return;H.current=!0,N(W).catch(()=>{})},[N,X]),X}var R0;var qq=v(()=>{r2();U2();P0();s2();R0=K0(H0(),1)});function Qq({onBack:q,onConfigured:z}){let Q=d0.useCallback(async(Z,N)=>{await z(Z,N)},[z]);o("confirm:no",q);let $=B2({onAuthenticated:Q});if($.state==="error")return y(B,{flexDirection:"column",gap:1,children:[J(G,{color:"error",bold:!0,children:"Codex OAuth failed"}),J(G,{children:$.message}),J(G,{dimColor:!0,children:"Press Enter or Esc to go back."}),J(g,{options:[{value:"back",label:"Back",description:"Return to provider presets"}],onChange:q,onCancel:q,visibleOptionCount:1})]});return y(B,{flexDirection:"column",gap:1,children:[J(G,{color:"remember",bold:!0,children:"Codex OAuth"}),J(G,{children:"Sign in with your ChatGPT account in the browser. Claudin will store the resulting Codex credentials securely and switch this session to the new Codex login when setup completes."}),$.state==="starting"?J(G,{dimColor:!0,children:"Starting local callback and preparing your browser..."}):$.browserOpened===!1?y(G0,{children:[J(G,{color:"warning",children:"Browser did not open automatically. Visit this URL to continue:"}),J(G,{children:$.authUrl})]}):$.browserOpened===!0?y(G0,{children:[J(G,{dimColor:!0,children:"Browser opened. Finish the ChatGPT sign-in there and this setup will complete automatically."}),J(G,{children:$.authUrl})]}):J(G,{dimColor:!0,children:"Opening your browser..."}),J(G,{dimColor:!0,children:"Press Esc to cancel and go back."})]})}function $q({onBack:q,onConfigured:z}){let Q=d0.useCallback(async(Z,N)=>{await z(Z,N)},[z]);o("confirm:no",q);let $=S2({onAuthenticated:Q});if($.state==="error")return y(B,{flexDirection:"column",gap:1,children:[J(G,{color:"error",bold:!0,children:"xAI OAuth failed"}),J(G,{children:$.message}),J(G,{dimColor:!0,children:"Press Enter or Esc to go back."}),J(g,{options:[{value:"back",label:"Back",description:"Return to provider presets"}],onChange:q,onCancel:q,visibleOptionCount:1})]});return y(B,{flexDirection:"column",gap:1,children:[J(G,{color:"remember",bold:!0,children:"xAI / Grok OAuth"}),$.state==="starting"?J(G,{dimColor:!0,children:"Requesting a device code from xAI..."}):y(G0,{children:[y(G,{children:["Open this URL on any device:"," ",J(G,{bold:!0,children:$.verificationUri})]}),y(G,{children:["Enter code ",J(G,{bold:!0,children:$.userCode})]}),$.verificationUriComplete&&$.verificationUriComplete!==$.verificationUri?y(G,{dimColor:!0,children:["Or open this prefilled URL: ",$.verificationUriComplete]}):null,J(G,{dimColor:!0,children:"Waiting for you to authorize in the browser..."})]}),J(G,{dimColor:!0,children:"Press Esc to cancel and go back."})]})}function Jq({onBack:q,onConfigured:z}){let Q=d0.useCallback(async(Z,N)=>{await z(Z,N)},[z]);o("confirm:no",q);let $=e2({onAuthenticated:Q});if($.state==="error")return y(B,{flexDirection:"column",gap:1,children:[J(G,{color:"error",bold:!0,children:"Kimi Code OAuth failed"}),J(G,{children:$.message}),J(G,{dimColor:!0,children:"Press Enter or Esc to go back."}),J(g,{options:[{value:"back",label:"Back",description:"Return to Moonshot AI authentication choices"}],onChange:q,onCancel:q,visibleOptionCount:1})]});return y(B,{flexDirection:"column",gap:1,children:[J(G,{color:"remember",bold:!0,children:"Moonshot AI · Kimi Code"}),$.state==="starting"?J(G,{dimColor:!0,children:"Requesting a device code from Kimi..."}):y(G0,{children:[y(G,{children:["Open this URL on any device:"," ",J(G,{bold:!0,children:$.verificationUri})]}),y(G,{children:["Enter code ",J(G,{bold:!0,children:$.userCode})]}),$.verificationUriComplete&&$.verificationUriComplete!==$.verificationUri?y(G,{dimColor:!0,children:["Or open this prefilled URL: ",$.verificationUriComplete]}):null,J(G,{dimColor:!0,children:"Waiting for you to authorize in the browser..."})]}),J(G,{dimColor:!0,children:"Press Esc to cancel and go back."})]})}var d0;var Zq=v(()=>{m0();Y0();zq();O2();u2();qq();d();d0=K0(H0(),1)});var r,n0="\x00__manual__",Nq,Rq="Codex OAuth",Wq="codexplan",Vq="xAI / Grok (OAuth)",Xq="grok-4",Kq="Moonshot AI",Hq,h0="https://api.kimi.com/coding/v1",yq,bq;var k0=v(()=>{L1();d2();r=[{key:"name",label:"Provider name",placeholder:"e.g. Ollama Home, OpenAI Work",helpText:"A short label shown in /provider and startup setup."},{key:"baseUrl",label:"Base URL",placeholder:"e.g. http://localhost:11434/v1",helpText:"API base URL used for this provider profile."},{key:"apiKey",label:"API key",placeholder:"Leave empty if your provider does not require one",helpText:"Optional. Press Enter with empty value to skip.",optional:!0},{key:"model",label:"Default model",placeholder:"e.g. llama3.1:8b or glm-4.7; glm-4.7-flash",helpText:'Model name(s) to use. Separate multiple with ";" or ","; first is default.'}],Nq=new Set(["anthropic","bedrock","vertex","foundry"]),Hq=Gq,yq=Yq("providerProfile",(q)=>q),bq={bedrock:[{key:"awsRegion",label:"AWS region",placeholder:"e.g. us-east-1",helpText:"Region of your Bedrock-enabled AWS account. Credentials are picked up from the AWS SDK chain."}],vertex:[{key:"gcpProject",label:"GCP project ID",placeholder:"e.g. my-project-123456",helpText:"Google Cloud project where Vertex AI is enabled. Credentials are picked up from ADC."},{key:"gcpRegion",label:"GCP region",placeholder:"e.g. us-central1",helpText:"Vertex AI region for the model."}],foundry:[{key:"azureResource",label:"Azure resource",placeholder:"e.g. my-foundry-resource",helpText:"Name of your Azure AI Foundry resource. Credentials are picked up from DefaultAzureCredential."}]}});function Fq(q){return{name:q.name,baseUrl:q.baseUrl,model:q.model,apiKey:q.apiKey??""}}function B4(q){let z=b0(q);return{name:z.name,baseUrl:z.baseUrl,model:z.model,apiKey:z.apiKey??""}}function _q(q){let z={};for(let Q of q.split(/\r?\n/)){let $=Q.trim();if(!$)continue;let Z=$.indexOf(":");if(Z<=0)continue;let N=$.slice(0,Z).trim(),X=$.slice(Z+1).trim();if(N&&X)z[N]=X}return z}function Uq(q){if(!q)return"";return Object.entries(q).map(([z,Q])=>`${z}: ${Q}`).join(`
49
+ `)}function Bq(q,z){let Q={},$=q.awsRegion?.trim();if($)Q.awsRegion=$;let Z=q.gcpProject?.trim();if(Z)Q.gcpProject=Z;let N=q.gcpRegion?.trim();if(N)Q.gcpRegion=N;let X=q.azureResource?.trim();if(X)Q.azureResource=X;let V=_q(z);if(Object.keys(V).length>0)Q.customHeaders=V;return Object.keys(Q).length>0?Q:void 0}function Oq(q,z){let Q=z?" (active)":"",$=q.apiKey?"key set":"no key",Z=q.provider==="anthropic"?"anthropic":"openai-compatible",N=Lq(q.model),X=N.length<=3?N.join(", "):`${N[0]}, ${N[1]} + ${N.length-2} more`;return`${Z} · ${q.baseUrl} · ${X} · ${$}${Q}`}var O4=v(()=>{wq();D0()});function F1(q){let z=q.toLowerCase();return w1.some((Q)=>z.includes(Q))}function D4(q){try{let z=new URL(q);if(z.username)z.username="redacted";if(z.password)z.password="redacted";for(let Q of z.searchParams.keys())if(F1(Q))z.searchParams.set(Q,"redacted");return z.toString()}catch{return q.replace(/\/\/[^/@\s]+(?::[^/@\s]*)?@/g,"//redacted@").replace(/([?&](?:token|access_token|refresh_token|api_key|apikey|key|password|passwd|pwd|auth|authorization|signature|sig|secret)=)[^&#]*/gi,"$1redacted")}}var w1;var Dq=v(()=>{w1=["api_key","apikey","key","token","access_token","refresh_token","signature","sig","secret","password","passwd","pwd","auth","authorization"]});function Pq(q,z){if(q.state==="unreachable")return`Could not reach Atomic Chat at ${D4(z)}. Start the Atomic Chat app first, or enter the endpoint manually.`;if(q.state==="no_models")return"Atomic Chat is running, but no models are loaded. Download and load a model inside the Atomic Chat app first, or enter details manually.";return""}function mq(q,z){if(q.state==="unreachable")return`Could not reach Ollama at ${D4(z)}. Start Ollama first, or enter the endpoint manually.`;if(q.state==="no_models")return"Ollama is running, but no installed models were found. Pull a chat model such as qwen2.5-coder:7b or llama3.1:8b first, or enter details manually.";if(q.state==="generation_failed"){let Q=q.probeModel??"the selected model",$=q.detail?` Details: ${q.detail}.`:"";return`Ollama is reachable and models are installed, but a generation probe failed for ${Q}.${$} Run "ollama run ${Q}" once and retry, or enter details manually.`}return""}function i0(q,z){if(!z)return;return q.find((Q)=>Q.id===z)}function M4(q,z){return Boolean(q&&z&&q.id===z)}function hq(q,z){if(z){let Q=q.find(($)=>$.id===z);if(Q)return Q}return q.find((Q)=>Q.provider==="openai"&&Q.baseUrl===h0&&!Q.apiKey)}function kq(q,z){if(z){let Q=q.find(($)=>$.id===z);if(Q)return Q}return q.find((Q)=>Q.provider==="openai"&&Q.baseUrl===I0&&!Q.apiKey)}function Iq(q,z){return q.find((Q)=>Q.provider==="anthropic"&&Q.baseUrl===z&&!Q.apiKey)}var P4=v(()=>{Mq();k0();Dq()});function Eq({setScreen:q}){return y(B,{flexDirection:"column",gap:1,children:[J(G,{color:"remember",bold:!0,children:"Anthropic — choose authentication"}),J(G,{dimColor:!0,children:"Sign in with your Anthropic account in the browser, or paste an API key."}),J(g,{options:[{value:"oauth",label:"Sign in with web (OAuth)",description:"Open a browser, sign in to Claude, and store tokens in ~/.claudin/.credentials.json"},{value:"apiKey",label:"Use API key",description:"Paste an x-api-key value (sk-ant-…)"},{value:"back",label:"Back",description:"Choose a different provider"}],onChange:(z)=>{if(z==="oauth"){q("anthropic-oauth");return}if(z==="apiKey"){q("form");return}q("select-preset")},onCancel:()=>q("select-preset"),visibleOptionCount:3})]})}function Aq({setScreen:q,startCreateFromPreset:z}){return y(B,{flexDirection:"column",gap:1,children:[J(G,{color:"remember",bold:!0,children:"Moonshot AI — choose authentication"}),J(G,{dimColor:!0,children:"Sign in with your Kimi Code subscription in the browser, or paste a Moonshot AI API key."}),J(g,{options:[{value:"oauth",label:"Sign in with web (OAuth)",description:"Open a browser, sign in to Kimi Code, and store tokens in ~/.claudin/.credentials.json"},{value:"apiKey",label:"Use API key",description:"Paste a Moonshot AI API key (sk-…)"},{value:"back",label:"Back",description:"Choose a different provider"}],onChange:(Q)=>{if(Q==="oauth"){q("kimi-oauth");return}if(Q==="apiKey"){z("moonshotai");return}q("select-preset")},onCancel:()=>q("select-preset"),visibleOptionCount:3})]})}function Tq({mode:q,onDone:z,activeProfileId:Q,setErrorMessage:$,setScreen:Z,setStatusMessage:N,refreshProfiles:X,returnToMenu:V}){let H=(B1(),_1(U1)).ConsoleOAuthFlow;return J(B,{flexDirection:"column",gap:1,children:J(H,{mode:"login",onDone:()=>{let W=b0("anthropic"),L={provider:"anthropic",name:W.name,baseUrl:W.baseUrl,model:W.model},w=Iq(a(),W.baseUrl),D=q==="first-run",M=w?Q0(w.id,L):z0(L,{makeActive:D});if(!M){$("OAuth completed, but the Anthropic profile could not be saved."),Z("select-preset");return}let P=D&&w&&Q!==M.id?$0(M.id):M;if(!P){$("OAuth completed, but the Anthropic profile could not be set as the startup provider."),Z("select-preset");return}let F=`Anthropic OAuth configured: ${P.name}`;if(X(),q==="first-run"){z({action:"saved",activeProfileId:P.id,message:F});return}N(F),$(void 0),V()}})})}var Cq=v(()=>{m0();Y0();D0();P4();d()});function gq({formStepIndex:q,draft:z,setDraft:Q,setCursorOffset:$,cursorOffset:Z,editingProfileId:N,draftProvider:X,errorMessage:V,handleFormSubmit:H}){let W=r[q]??r[0],L=W.key,w=z[L];return y(B,{flexDirection:"column",gap:1,children:[J(G,{color:"remember",bold:!0,children:N?"Edit provider profile":"Create provider profile"}),J(G,{dimColor:!0,children:W.helpText}),y(G,{dimColor:!0,children:["Provider type:"," ",X==="anthropic"?"Anthropic native API":"OpenAI-compatible API"]}),y(G,{dimColor:!0,children:["Step ",q+1," of ",r.length,": ",W.label]}),y(B,{flexDirection:"row",gap:1,children:[J(G,{children:L0.pointer}),J(y0,{value:w,onChange:(D)=>Q((M)=>({...M,[L]:D})),onSubmit:H,focus:!0,showCursor:!0,placeholder:`${W.placeholder}${L0.ellipsis}`,mask:L==="apiKey"?"*":void 0,columns:80,cursorOffset:Z,onChangeCursorOffset:$})]}),V&&J(G,{color:"error",children:V}),J(G,{dimColor:!0,children:"Press Enter to continue. Press Esc to go back."})]})}function jq({pendingPreset:q,cloudExtrasStepIndex:z,draftExtras:Q,cloudExtrasCursor:$,errorMessage:Z,setDraftExtras:N,setCloudExtrasStepIndex:X,setCloudExtrasCursor:V,setErrorMessage:H,setScreen:W}){let L=q;if(L!=="bedrock"&&L!=="vertex"&&L!=="foundry")return null;let w=bq[L],D=w[z]??w[0],M=Q[D.key]??"";function P(F){let A=F.trim();if(A.length===0){H(`${D.label} is required.`);return}let W0={...Q,[D.key]:A};if(N(W0),H(void 0),z<w.length-1){X(z+1);return}X(0),W("form")}return y(B,{flexDirection:"column",gap:1,children:[J(G,{color:"remember",bold:!0,children:`${L==="bedrock"?"AWS Bedrock":L==="vertex"?"Google Vertex AI":"Azure AI Foundry"} setup`}),J(G,{dimColor:!0,children:D.helpText}),y(G,{dimColor:!0,children:["Step ",z+1," of ",w.length,": ",D.label]}),y(B,{flexDirection:"row",gap:1,children:[J(G,{children:L0.pointer}),J(y0,{value:M,onChange:(F)=>N((A)=>({...A,[D.key]:F})),onSubmit:P,focus:!0,showCursor:!0,placeholder:`${D.placeholder}${L0.ellipsis}`,columns:80,cursorOffset:$,onChangeCursorOffset:V})]}),Z&&J(G,{color:"error",children:Z}),J(G,{dimColor:!0,children:"Press Enter to continue. Press Esc to go back."})]})}function Sq({draftCustomHeaders:q,draft:z,customHeadersCursor:Q,errorMessage:$,setDraftCustomHeaders:Z,setCustomHeadersCursor:N,persistDraft:X}){return y(B,{flexDirection:"column",gap:1,children:[J(G,{color:"remember",bold:!0,children:"Custom headers (optional)"}),y(G,{dimColor:!0,children:["Add HTTP headers sent on every request. One header per line as"," ",J(G,{children:"Header: Value"}),". Leave empty to skip."]}),y(B,{flexDirection:"row",gap:1,children:[J(G,{children:L0.pointer}),J(y0,{value:q,onChange:Z,onSubmit:()=>X(z),focus:!0,showCursor:!0,placeholder:"X-Header: value",columns:80,multiline:!0,cursorOffset:Q,onChangeCursorOffset:N})]}),$&&J(G,{color:"error",children:$}),J(G,{dimColor:!0,children:"Press Enter on a blank line to save. Press Esc to go back."})]})}var uq=v(()=>{O1();Y0();z2();k0();d()});function fq({selection:q,draft:z,setDraft:Q,setScreen:$,setFormStepIndex:Z,setCursorOffset:N,persistDraft:X}){if(q.state==="loading"||q.state==="idle")return y(B,{flexDirection:"column",gap:1,children:[J(G,{color:"remember",bold:!0,children:"Checking Atomic Chat"}),J(G,{dimColor:!0,children:"Looking for loaded Atomic Chat models..."})]});if(q.state==="unavailable")return y(B,{flexDirection:"column",gap:1,children:[J(G,{color:"remember",bold:!0,children:"Atomic Chat setup"}),J(G,{dimColor:!0,children:q.message}),J(g,{options:[{value:"manual",label:"Enter manually",description:"Fill in the base URL and model yourself"},{value:"back",label:"Back",description:"Choose another provider preset"}],onChange:(V)=>{if(V==="manual"){Z(0),N(z.name.length),$("form");return}$("select-preset")},onCancel:()=>$("select-preset"),visibleOptionCount:2})]});return y(B,{flexDirection:"column",gap:1,children:[J(G,{color:"remember",bold:!0,children:"Choose an Atomic Chat model"}),J(G,{dimColor:!0,children:"Pick one of the models loaded in Atomic Chat to save into a local provider profile."}),J(g,{options:q.options,defaultValue:q.defaultValue,defaultFocusValue:q.defaultValue,inlineDescriptions:!0,visibleOptionCount:Math.min(8,q.options.length),onChange:(V)=>{let H={...z,model:V};Q(H),X(H)},onCancel:()=>$("select-preset")})]})}function vq({selection:q,draft:z,setDraft:Q,setScreen:$,setFormStepIndex:Z,setCursorOffset:N,persistDraft:X}){if(q.state==="loading"||q.state==="idle")return y(B,{flexDirection:"column",gap:1,children:[J(G,{color:"remember",bold:!0,children:"Checking Ollama"}),J(G,{dimColor:!0,children:"Looking for installed Ollama models..."})]});if(q.state==="unavailable")return y(B,{flexDirection:"column",gap:1,children:[J(G,{color:"remember",bold:!0,children:"Ollama setup"}),J(G,{dimColor:!0,children:q.message}),J(g,{options:[{value:"manual",label:"Enter manually",description:"Fill in the base URL and model yourself"},{value:"back",label:"Back",description:"Choose another provider preset"}],onChange:(V)=>{if(V==="manual"){Z(0),N(z.name.length),$("form");return}$("select-preset")},onCancel:()=>$("select-preset"),visibleOptionCount:2})]});return y(B,{flexDirection:"column",gap:1,children:[J(G,{color:"remember",bold:!0,children:"Choose an Ollama model"}),J(G,{dimColor:!0,children:"Pick one of the installed Ollama models to save into a local provider profile."}),J(g,{options:q.options,defaultValue:q.defaultValue,defaultFocusValue:q.defaultValue,inlineDescriptions:!0,visibleOptionCount:Math.min(8,q.options.length),onChange:(V)=>{let H={...z,model:V};Q(H),X(H)},onCancel:()=>$("select-preset")})]})}function cq({openAiModelSelection:q,draft:z,setDraft:Q,goToFormStep:$,goToManualModelStep:Z,finishAfterModelStep:N}){if(q.state==="loading"||q.state==="idle")return y(B,{flexDirection:"column",gap:1,children:[J(G,{color:"remember",bold:!0,children:"Fetching models"}),J(G,{dimColor:!0,children:"Looking for models on your OpenAI-compatible provider…"}),J(G,{dimColor:!0,children:"Press Esc to enter the model manually."})]});if(q.state==="unavailable")return y(B,{flexDirection:"column",gap:1,children:[J(G,{color:"remember",bold:!0,children:"Choose a model"}),J(G,{dimColor:!0,children:q.message}),J(g,{options:[{value:"manual",label:"Enter manually",description:"Type the model id yourself"},{value:"back",label:"Back",description:"Return to the API key step"}],onChange:(H)=>{if(H==="manual"){Z();return}$("apiKey")},onCancel:()=>$("apiKey"),visibleOptionCount:2})]});let X=[...q.options,{value:n0,label:"Enter a model id manually",description:"Type an id the provider did not list"}],V=q.defaultValue??n0;return y(B,{flexDirection:"column",gap:1,children:[J(G,{color:"remember",bold:!0,children:"Choose a model"}),J(G,{dimColor:!0,children:"Models from your OpenAI-compatible provider."}),J(g,{options:X,defaultValue:V,defaultFocusValue:V,inlineDescriptions:!0,visibleOptionCount:Math.min(8,X.length),onChange:(H)=>{if(H===n0){Z();return}let W={...z,model:H};Q(W),N(W)},onCancel:()=>$("apiKey")}),J(G,{dimColor:!0,children:"Enter to select · Esc to go back"})]})}var xq=v(()=>{m0();Y0();k0();d()});function nq({mode:q,onDone:z,canImportLegacyClaude:Q,setScreen:$,setCanImportLegacyClaude:Z,setErrorMessage:N,setStatusMessage:X,closeWithCancelled:V,refreshProfiles:H,returnToMenu:W,startCreateFromPreset:L}){let w=!s(),D=[...Q?[{value:"import-legacy",label:"Reuse Claude Code sign-in",description:"Copy ~/.claude/ API tokens and provider profiles. /import brings the rest."}]:[],{value:"dashscope-intl",label:"Alibaba Coding Plan",description:"Alibaba DashScope International endpoint"},{value:"dashscope-cn",label:"Alibaba Coding Plan (China)",description:"Alibaba DashScope China endpoint"},{value:"anthropic",label:"Anthropic",description:"Native Claude API (x-api-key auth)"},{value:"atomic-chat",label:"Atomic Chat",description:"Local Model Provider"},{value:"azure-openai",label:"Azure OpenAI",description:"Azure OpenAI endpoint (model=deployment name)"},{value:"foundry",label:"Azure AI Foundry",description:"Anthropic models hosted on Azure AI Foundry (resource-scoped)"},{value:"bedrock",label:"AWS Bedrock",description:"Anthropic models on AWS Bedrock (region-scoped, AWS creds)"},{value:"bankr",label:"Bankr",description:"Bankr LLM Gateway (OpenAI-compatible)"},{value:"cloudflare-workers-ai",label:"Cloudflare Workers AI",description:"Cloudflare Workers AI (OpenAI-compatible); set your account ID in the base URL"},{value:"cloudflare-ai-gateway",label:"Cloudflare AI Gateway",description:"Cloudflare AI Gateway unified endpoint; set your account ID in the base URL"},...w?[{value:"codex-oauth",label:"Codex OAuth",description:"Sign in with ChatGPT in your browser and store Codex credentials securely"},{value:"xai-oauth",label:"xAI / Grok (OAuth)",description:"Sign in with xAI in your browser and store Grok credentials securely"}]:[],{value:"github-onboard",label:"GitHub Copilot",description:"Sign in with GitHub in your browser to use Copilot models"},{value:"deepseek",label:"DeepSeek",description:"DeepSeek OpenAI-compatible endpoint"},{value:"gemini",label:"Google Gemini",description:"Gemini OpenAI-compatible endpoint"},{value:"vertex",label:"Google Vertex AI",description:"Anthropic models on Vertex AI (project + region, ADC)"},{value:"groq",label:"Groq",description:"Groq OpenAI-compatible endpoint"},{value:"lmstudio",label:"LM Studio",description:"Local LM Studio endpoint"},{value:"minimax",label:"MiniMax",description:"MiniMax API endpoint"},{value:"mistral",label:"Mistral",description:"Mistral OpenAI-compatible endpoint"},{value:"moonshotai",label:"Moonshot AI",description:"API key or Kimi Code OAuth sign-in"},{value:"nvidia-nim",label:"NVIDIA NIM",description:"NVIDIA NIM endpoint"},{value:"opencode-go",label:"OpenCode GO",description:"OpenCode GO OpenAI-compatible endpoint"},{value:"opencode-zen",label:"OpenCode Zen",description:"OpenCode Zen OpenAI-compatible endpoint"},{value:"ollama",label:"Ollama",description:"Local or remote Ollama endpoint"},{value:"openai",label:"OpenAI",description:"OpenAI API with API key"},{value:"openrouter",label:"OpenRouter",description:"OpenRouter OpenAI-compatible endpoint"},{value:"together",label:"Together AI",description:"Together chat/completions endpoint"},{value:"zai",label:"Z.AI (GLM Coding Plan)",description:"Z.AI GLM Coding Plan (OpenAI-compatible)"},{value:"custom",label:"Custom",description:"Any OpenAI-compatible provider"},...q==="first-run"?[{value:"skip",label:"Skip for now",description:"Continue with current defaults"}]:[]];return y(B,{flexDirection:"column",gap:1,children:[J(G,{color:"remember",bold:!0,children:q==="first-run"?"Set up provider":"Choose provider preset"}),J(G,{dimColor:!0,children:"Pick a preset, then confirm base URL, model, and API key."}),J(a0,{options:D,searchPlaceholder:"Search presets…",onChange:(M)=>{if(M==="skip"){V("Provider setup skipped");return}if(M==="codex-oauth"){$("codex-oauth");return}if(M==="xai-oauth"){$("xai-oauth");return}if(M==="moonshotai"){$("kimi-auth-choice");return}if(M==="github-onboard"){$("github-onboard");return}if(M==="import-legacy"){(async()=>{let P=await pq({force:!0});Z(E0()),H();let F=lq(P);if(P.errors.length>0){N(F);return}let A=i();if(q==="first-run"&&A){z({action:"saved",activeProfileId:A.id,activeProviderName:A.name,activeProviderModel:A.model,message:F});return}if(X(F),N(void 0),q==="manage")W()})();return}L(M)},onCancel:()=>{if(q==="first-run"){V("Provider setup skipped");return}W()},visibleOptionCount:Math.min(13,D.length)})]})}var iq=v(()=>{m0();Y0();P0();D0();dq();d()});function E3({mode:q,onDone:z}){let Q=Zz(),[$,Z]=O.useState([]),[N,X]=O.useState(),[V,H]=O.useState(),[W,L]=O.useState(!1),[w,D]=O.useState(),M=O.useRef(0),[P,F]=O.useState(q==="first-run"?"select-preset":"menu"),[A,W0]=O.useState(null),[c,E]=O.useState("openai"),[k,x]=O.useState(()=>B4("ollama")),[_0,T0]=O.useState({}),[C4,t0]=O.useState(""),[Nz,Rz]=O.useState(0),[Wz,Vz]=O.useState(0),[U0,g4]=O.useState(null),[s0,C0]=O.useState(0),[V0,J0]=O.useState(0),[Xz,e]=O.useState(0),[j4,u]=O.useState(),[e0,m]=O.useState(),[Kz,Hz]=O.useState(),[S4,g0]=O.useState(!1),[B0,O0]=O.useState(),[yz,j0]=O.useState({state:"idle"}),[bz,S0]=O.useState({state:"idle"}),[q4,z4]=O.useState({state:"idle"}),[Lz,wz]=O.useState(!0),[Fz,n]=O.useState(!1),Q4=O.useRef(!1),[_z,u4]=O.useState(()=>E0()),[f4,Uz]=O.useState(()=>Gz());O.useEffect(()=>{queueMicrotask(()=>{let Y=a(),R=i()?.id;Z(Y),X(R),H(o0()),D(m4()),L(A0()),wz(!1)})},[]);let $4=r[V0]??r[0],Bz=$4.key,J4=$.length>0,u0=J4,v4=O.useMemo(()=>[{value:"add",label:"Add provider",description:"Create a new provider profile"},{value:"activate",label:"Set active provider (Global)",description:w?`Currently: ${$.find((Y)=>Y.id===w)?.name??"unknown"}`:"Default profile for projects without an override",disabled:!u0},{value:"activate-project",label:"Set active provider (Project)",description:V?`Currently: ${$.find((Y)=>Y.id===V)?.name??"unknown"} (this project)`:"Override the global default for this project only",disabled:!u0},...W?[{value:"clear-project-override",label:"Clear project provider override",description:V?"Stop overriding for this project; fall back to global":"Project override points to a missing profile; clear it"}]:[],{value:"edit",label:"Edit provider",description:"Update URL, model, or key",disabled:!J4},{value:"delete",label:"Delete provider",description:"Remove a provider profile",disabled:!u0},...S4?[{value:"logout-codex-oauth",label:"Log out Codex OAuth",description:"Clear securely stored Codex OAuth credentials"}]:[],{value:"done",label:"Done",description:"Return to chat"}],[u0,J4,S4,w,V,$]),Z4=O.useCallback(()=>{if(s()){M.current+=1,g0(!1),O0(void 0);return}let Y=++M.current;(async()=>{let R=await I4();if(Y!==M.current)return;g0(Boolean(R?.apiKey||R?.accessToken||R?.refreshToken||R?.idToken)),O0(R?.profileId)})()},[]);O.useEffect(()=>{return Z4(),()=>{M.current+=1}},[Z4]),O.useEffect(()=>{if(P!=="select-ollama-model")return;let Y=!1;return j0({state:"loading"}),(async()=>{let R=await Jz({baseUrl:k.baseUrl});if(R.state!=="ready"){if(!Y)j0({state:"unavailable",message:mq(R,k.baseUrl)});return}let b=K4(R.models,"balanced"),K=G2(R.models,"balanced");if(!Y)j0({state:"ready",defaultValue:K?.name??b[0]?.name,options:b.map((U)=>({label:U.name,value:U.name,description:U.summary}))})})(),()=>{Y=!0}},[k.baseUrl,P]),O.useEffect(()=>{if(P!=="select-atomic-chat-model")return;let Y=!1;return S0({state:"loading"}),(async()=>{let R=await $z({baseUrl:k.baseUrl});if(R.state!=="ready"){if(!Y)S0({state:"unavailable",message:Pq(R,k.baseUrl)});return}if(!Y)S0({state:"ready",defaultValue:R.models[0],options:R.models.map((b)=>({label:b,value:b}))})})(),()=>{Y=!0}},[k.baseUrl,P]),O.useEffect(()=>{if(P!=="select-openai-model")return;let Y=!1;return z4({state:"loading"}),(async()=>{let R=await qz({baseUrl:k.baseUrl,apiKey:k.apiKey||void 0});if(Y)return;if(!R.ok){z4({state:"unavailable",message:zz(R)});return}let{options:b,defaultValue:K}=Qz(R.ids,k.model);z4({state:"ready",options:b,defaultValue:K})})(),()=>{Y=!0}},[k.baseUrl,k.apiKey,P]);function f(){if(Q4.current)return;Q4.current=!0,queueMicrotask(()=>{let Y=a();Z(Y),X(i()?.id),H(o0()),D(m4()),L(A0()),Z4(),Q4.current=!1})}function X0(){return null}function G4(Y){if(Y.activationWarning)return`${Y.prefix}. Saved for next startup. Warning: ${Y.warnings.join("; ")}.`;if(Y.warnings.length>0)return`${Y.prefix}. Claudin switched to it for this session with warnings: ${Y.warnings.join("; ")}.`;return`${Y.prefix}. Claudin switched to it for this session.`}async function Y4(Y){if(Y?.accessToken&&Y.accountId)return null;let R=await I4();if(!R)return"stored Codex OAuth credentials could not be loaded";if(!R.accountId)return"stored Codex OAuth credentials are missing a ChatGPT account id";return null}function c4(){rq()}async function Oz(Y){let R="provider";n(!0),u("Activating provider...");try{await new Promise((t)=>queueMicrotask(t));let b=A0(),K=$0(Y);if(!K){m("Could not change active provider."),n(!1),h();return}let U=b?i()??K:K,_=w0(U.model)||r0();if(!b)Q((t)=>({...t,mainLoopModel:_,mainLoopModelForSession:null}));R=K.name;let I=X0(),S=M4(K,B0),T=S?await Y4():null;f();let p=b&&U.id!==K.id?` (project override still active — this project keeps using ${U.name}; use "Clear project provider override" to apply the new default here)`:"",C=S?G4({prefix:`Active provider: ${K.name}${p}`,activationWarning:T,warnings:[T,I?`could not clear startup provider override (${I})`:null].filter((t)=>Boolean(t))}):I?`Active provider: ${K.name}${p}. Warning: could not clear startup provider override (${I}).`:`Active provider: ${K.name}${p}`;u(C),n(!1),z({action:"activated",activeProfileId:K.id,activeProviderName:K.name,activeProviderModel:_,message:`Provider switched to ${K.name} (${_})`}),h()}catch(b){f(),u(void 0),n(!1);let K=b instanceof Error?b.message:String(b);m(`Could not finish activating ${R}: ${K}`),h()}}async function Dz(){n(!0),u("Clearing project provider override...");try{await new Promise((R)=>queueMicrotask(R)),h4(null),f();let Y=i();if(Y){let R=w0(Y.model)||r0();F0(),Q((b)=>({...b,mainLoopModel:R,mainLoopModelForSession:null})),u(`Project override cleared. Using global default: ${Y.name}.`),n(!1),z({action:"activated",activeProfileId:Y.id,activeProviderName:Y.name,activeProviderModel:R,message:`Project override cleared — using ${Y.name} (${R})`}),h()}else u("Project provider override cleared. No global default set."),n(!1),z({action:"saved",message:"Project provider override cleared. No global default set."}),h()}catch(Y){f(),u(void 0),n(!1);let R=Y instanceof Error?Y.message:String(Y);m(`Could not clear project provider override: ${R}`),h()}}async function Mz(Y){let R="provider";n(!0),u("Setting provider for this project...");try{await new Promise((C)=>queueMicrotask(C));let b=o0(),K=h4(Y);if(!K){m("Could not set project provider override."),n(!1),h();return}let U=w0(K.model)||r0();if(b===K.id)F0();Q((C)=>({...C,mainLoopModel:U,mainLoopModelForSession:null})),R=K.name;let _=X0(),I=M4(K,B0),S=I?await Y4():null;f();let T=`Active provider for this project: ${K.name}. Other projects keep the global default.`,p=I?G4({prefix:T,activationWarning:S,warnings:[S,_?`could not clear startup provider override (${_})`:null].filter((C)=>Boolean(C))}):_?`${T} Warning: could not clear startup provider override (${_}).`:T;u(p),n(!1),z({action:"activated",activeProfileId:K.id,activeProviderName:K.name,activeProviderModel:U,message:`Provider switched to ${K.name} (${U}) for this project`}),h()}catch(b){f(),u(void 0),n(!1);let K=b instanceof Error?b.message:String(b);m(`Could not finish setting ${R} for this project: ${K}`),h()}}function h(){Hz("done"),F("menu")}function N4(Y){z({action:"cancelled",message:Y})}function x4(Y){let R=b0(Y),b={name:R.name,baseUrl:R.baseUrl,model:R.model,apiKey:R.apiKey??""};if(W0(null),E(R.provider??"openai"),x(b),T0({}),t0(""),g4(Y),J0(0),C0(0),e(b.name.length),m(void 0),Y==="ollama"){j0({state:"loading"}),F("select-ollama-model");return}if(Y==="atomic-chat"){S0({state:"loading"}),F("select-atomic-chat-model");return}if(Y==="anthropic"){F("anthropic-auth-choice");return}if(Y==="bedrock"||Y==="vertex"||Y==="foundry"){F("cloud-extras");return}F("form")}function Pz(Y){let R=$.find((K)=>K.id===Y);if(!R)return;let b=Fq(R);W0(Y),E(R.provider??"openai"),x(b),T0({awsRegion:R.extras?.awsRegion,gcpProject:R.extras?.gcpProject,gcpRegion:R.extras?.gcpRegion,azureResource:R.extras?.azureResource}),t0(Uq(R.extras?.customHeaders)),g4(null),J0(0),C0(0),e(b.name.length),m(void 0),F("form")}function f0(Y=k){let R=Bq(_0,C4),b={provider:c,name:Y.name,baseUrl:Y.baseUrl,model:Y.model,apiKey:Y.apiKey,extras:R},K=A?Q0(A,b):z0(b,{makeActive:q==="first-run"});if(!K){m("Could not save provider. Fill all required fields.");return}let U=i()?.id===K.id;if(U)F0(),Q((C)=>({...C,mainLoopModel:w0(K.model),mainLoopModelForSession:null}));let _=U?X0():null;f();let I=q==="first-run"&&!A&&A0()&&!U,S=I?i()?.name??"override target":null,T=q==="first-run"?`Added provider: ${K.name} (now active)`:`Added provider: ${K.name} (active provider unchanged)`,p=A?`Updated provider: ${K.name}`:I?`Added provider: ${K.name} (now global default — project keeps using ${S}; use "Clear project provider override" to apply here)`:T;if(u(_?`${p}. Warning: could not clear startup provider override (${_}).`:p),q==="first-run"){z({action:"saved",activeProfileId:K.id,message:`Provider configured: ${K.name}`});return}W0(null),J0(0),m(void 0),h()}function R4(Y){let R=r.findIndex((b)=>b.key===Y);J0(R<0?0:R),e(k[Y].length),m(void 0),F("form")}function p4(){if(!A&&U0&&k.model===B4(U0).model){let Y={...k,model:""};x(Y),R4("model"),e(0);return}R4("model")}function l4(Y){if(U0==="anthropic"||U0==="custom"){x(Y),F("custom-headers");return}f0(Y)}function mz(Y){let R=Y.trim();if(!$4.optional&&R.length===0){m(`${$4.label} is required.`);return}let b={...k,[Bz]:R};if(x(b),m(void 0),V0<r.length-1){let K=V0+1,U=r[K]?.key??"name";if(U==="model"&&!Nq.has(c)&&b.baseUrl.trim().length>0){F("select-openai-model");return}J0(K),e(b[U].length);return}l4(b)}function hz(){if(m(void 0),V0>0){let Y=V0-1,R=r[Y]?.key??"name";J0(Y),e(k[R].length);return}if(q==="first-run"){F("select-preset");return}h()}o("confirm:no",hz,{context:"Settings",isActive:P==="form"}),o("confirm:no",()=>p4(),{context:"Settings",isActive:P==="select-openai-model"&&(q4.state==="loading"||q4.state==="idle")});function kz(){if(m(void 0),s0>0){C0(s0-1);return}F("select-preset")}o("confirm:no",kz,{context:"Settings",isActive:P==="cloud-extras"}),o("confirm:no",()=>F("form"),{context:"Settings",isActive:P==="custom-headers"}),o("confirm:no",()=>F("select-preset"),{context:"Settings",isActive:P==="anthropic-auth-choice"||P==="anthropic-oauth"||P==="kimi-auth-choice"}),o("confirm:no",()=>F("kimi-auth-choice"),{context:"Settings",isActive:P==="kimi-oauth"});function Iz(){let Y=$.length>0,R=Y;return y(B,{flexDirection:"column",gap:1,children:[J(G,{color:"remember",bold:!0,children:"Provider manager"}),J(G,{dimColor:!0,children:"Active profile controls base URL, model, and API key used by this session."}),j4&&J(G,{children:j4}),J(B,{flexDirection:"column",children:$.length===0?J(G,{dimColor:!0,children:"No provider profiles configured yet."}):$.map((b)=>y(G,{dimColor:!0,children:["- ",b.name,": ",Oq(b,b.id===N)]},b.id))}),J(g,{options:v4,onChange:(b)=>{switch(m(void 0),b){case"add":F("select-preset");break;case"activate":if(R)F("select-active");break;case"activate-project":if(R)F("select-active-project");break;case"clear-project-override":Dz();break;case"edit":if(Y)F("select-edit");break;case"delete":if(R)F("select-delete");break;case"logout-codex-oauth":{let K=E4();if(!K.success){m(K.warning??"Could not clear Codex OAuth credentials.");break}g0(!1),O0(void 0);let U=i0(a(),B0),_=null;if(U){let I=k4(U.id);if(!I.removed){m("Codex OAuth credentials were cleared, but the Codex profile could not be removed."),f();break}c4(),_=I.activeProfileId?X0():null}f(),u(_?`Codex OAuth logged out. Warning: could not clear startup provider override (${_}).`:"Codex OAuth logged out.");break}default:N4("Provider manager closed");break}},onCancel:()=>N4("Provider manager closed"),defaultFocusValue:Kz,visibleOptionCount:v4.length})]})}function v0(Y,R,b){let K=$.map((U)=>{let _=[];if(U.id===N)_.push("active");if(V&&U.id===V)_.push("this project");if(w&&U.id===w)_.push("global default");let I=_.length>0?` (${_.join(", ")})`:"";return{value:U.id,label:`${U.name}${I}`,description:`${U.provider==="anthropic"?"anthropic":"openai-compatible"} · ${U.baseUrl} · ${U.model}`}});if(K.length===0)return y(B,{flexDirection:"column",gap:1,children:[J(G,{color:"remember",bold:!0,children:Y}),J(G,{dimColor:!0,children:R}),J(g,{options:[{value:"back",label:"Back",description:"Return to provider manager"}],onChange:()=>h(),onCancel:()=>h(),visibleOptionCount:1})]});return y(B,{flexDirection:"column",gap:1,children:[J(G,{color:"remember",bold:!0,children:Y}),J(a0,{options:K,favorites:yq,searchPlaceholder:"Search providers…",onChange:b,onCancel:()=>h(),visibleOptionCount:Math.min(10,Math.max(2,K.length))})]})}let j;switch(P){case"select-preset":j=J(nq,{mode:q,onDone:z,canImportLegacyClaude:_z,setScreen:F,setCanImportLegacyClaude:u4,setErrorMessage:m,setStatusMessage:u,closeWithCancelled:N4,refreshProfiles:f,returnToMenu:h,startCreateFromPreset:x4});break;case"select-ollama-model":j=J(vq,{selection:yz,draft:k,setDraft:x,setScreen:F,setFormStepIndex:J0,setCursorOffset:e,persistDraft:f0});break;case"select-openai-model":j=J(cq,{openAiModelSelection:q4,draft:k,setDraft:x,goToFormStep:R4,goToManualModelStep:p4,finishAfterModelStep:l4});break;case"select-atomic-chat-model":j=J(fq,{selection:bz,draft:k,setDraft:x,setScreen:F,setFormStepIndex:J0,setCursorOffset:e,persistDraft:f0});break;case"codex-oauth":j=J(Qq,{onBack:()=>F("select-preset"),onConfigured:async(Y,R)=>{let b={provider:"openai",name:Rq,baseUrl:aq,model:Wq,apiKey:""},K=i0(a(),B0),U=q==="first-run",_=K?Q0(K.id,b):z0(b,{makeActive:U});if(!_){m("Codex OAuth login finished, but the provider profile could not be saved."),h();return}let I=U&&K&&N!==_.id?$0(_.id):_;if(!I){m("Codex OAuth login finished, but the provider could not be set as the startup provider."),h();return}R({profileId:_.id}),g0(!0),O0(_.id),f();let S;if(!U)S=`Codex OAuth configured: ${_.name} (active provider unchanged — activate it from "Set active provider")`;else{let T=X0(),p=await Y4(Y),C=[p,T?`could not clear startup provider override (${T})`:null].filter((t)=>Boolean(t));S=G4({prefix:"Codex OAuth configured",activationWarning:p,warnings:C})}if(q==="first-run"){z({action:"saved",activeProfileId:I.id,message:S});return}u(S),m(void 0),h()}});break;case"xai-oauth":j=J($q,{onBack:()=>F("select-preset"),onConfigured:async(Y,R)=>{let b={provider:"openai",name:Vq,baseUrl:I0,model:Xq,apiKey:""},K=kq(a(),T4()?.profileId),U=q==="first-run",_=K?Q0(K.id,b):z0(b,{makeActive:U});if(!_){m("xAI OAuth login finished, but the provider profile could not be saved."),h();return}let I=U&&K&&N!==_.id?$0(_.id):_;if(!I){m("xAI OAuth login finished, but the provider could not be set as the startup provider."),h();return}try{R({profileId:_.id})}catch(T){m(T instanceof Error?T.message:String(T)),h();return}f();let S=U?"xAI / Grok configured. Claudin switched to it for this session.":`xAI / Grok configured: ${_.name} (active provider unchanged — activate it from "Set active provider")`;if(q==="first-run"){z({action:"saved",activeProfileId:I.id,message:S});return}u(S),m(void 0),h()}});break;case"kimi-auth-choice":j=J(Aq,{setScreen:F,startCreateFromPreset:x4});break;case"kimi-oauth":j=J(Jq,{onBack:()=>F("kimi-auth-choice"),onConfigured:async(Y,R)=>{let b={provider:"openai",name:Kq,baseUrl:h0,model:Hq,apiKey:""},K=hq(a(),A4()?.profileId),U=q==="first-run",_=K?Q0(K.id,b):z0(b,{makeActive:U});if(!_){m("Kimi Code OAuth login finished, but the provider profile could not be saved."),h();return}let I=U&&K&&N!==_.id?$0(_.id):_;if(!I){m("Kimi Code OAuth login finished, but the provider could not be set as the startup provider."),h();return}try{R({profileId:_.id})}catch(T){m(T instanceof Error?T.message:String(T)),h();return}f();let S=U?"Kimi Code configured. Claudin switched to it for this session.":`Kimi Code configured: ${_.name} (active provider unchanged — activate it from "Set active provider")`;if(q==="first-run"){z({action:"saved",activeProfileId:I.id,message:S});return}u(S),m(void 0),h()}});break;case"github-onboard":j=J(Q2,{activateOnSave:q==="first-run",onDone:(Y)=>{if(Y)u(Y),m(void 0);f(),h()},onBack:()=>F("select-preset"),onChangeAPIKey:f});break;case"anthropic-auth-choice":j=J(Eq,{setScreen:F});break;case"anthropic-oauth":j=J(Tq,{mode:q,onDone:z,activeProfileId:N,setErrorMessage:m,setScreen:F,setStatusMessage:u,refreshProfiles:f,returnToMenu:h});break;case"cloud-extras":j=J(jq,{pendingPreset:U0,cloudExtrasStepIndex:s0,draftExtras:_0,cloudExtrasCursor:Nz,errorMessage:e0,setDraftExtras:T0,setCloudExtrasStepIndex:C0,setCloudExtrasCursor:Rz,setErrorMessage:m,setScreen:F});break;case"custom-headers":j=J(Sq,{draftCustomHeaders:C4,draft:k,customHeadersCursor:Wz,errorMessage:e0,setDraftCustomHeaders:t0,setCustomHeadersCursor:Vz,persistDraft:f0});break;case"form":j=J(gq,{formStepIndex:V0,draft:k,setDraft:x,setCursorOffset:e,cursorOffset:Xz,editingProfileId:A,draftProvider:c,errorMessage:e0,handleFormSubmit:mz});break;case"select-active":j=v0("Set active provider (Global)","No providers available. Add one first.",(Y)=>{Oz(Y)});break;case"select-active-project":j=v0("Set active provider (Project)","No providers available. Add one first.",(Y)=>{Mz(Y)});break;case"select-edit":j=v0("Edit provider","No providers available. Add one first.",(Y)=>{Pz(Y)});break;case"select-delete":j=v0("Delete provider","No providers available. Add one first.",(Y)=>{let R=$.find((C)=>C.id===Y),b=R?.provider==="openai"&&R?.extras?.githubToken!==void 0,K=i0($,B0)?.id===Y,U=T4()?.profileId,_=R?.provider==="openai"&&R.baseUrl===I0&&!R.apiKey&&U===Y,I=A4()?.profileId,S=R?.provider==="openai"&&R.baseUrl===h0&&!R.apiKey&&I===Y,T=i()?.id===Y,p=k4(Y);if(!p.removed)m("Could not delete provider.");else{let C=[];if(K){let l=E4();if(!l.success)C.push(l.warning??"could not clear Codex OAuth credentials");else O0(void 0);c4()}if(b){let l=oq();if(!l.success)C.push(l.warning??"could not clear GitHub Copilot token")}if(_){let l=sq();if(!l.success)C.push(l.warning??"could not clear xAI OAuth credentials")}if(S){let l=tq();if(!l.success)C.push(l.warning??"could not clear Kimi Code OAuth credentials")}let t=p.activeProfileId?X0():null;if(t)C.push(`could not clear startup provider override (${t})`);if(f(),T){let l=i();if(l)F0(),Q((W4)=>({...W4,mainLoopModel:w0(l.model),mainLoopModelForSession:null}));else F0(),Q((W4)=>({...W4,mainLoopModel:null,mainLoopModelForSession:null}))}u(C.length>0?`Provider deleted. Warning: ${C.join("; ")}.`:"Provider deleted")}h()});break;case"menu":default:j=Iz();break}return y(eq,{color:"permission",children:[J(Yz,{enabled:f4,onDismiss:(Y)=>{u4(E0()),Uz(!1),f();let R=i();if(Y==="migrated"&&q==="first-run"&&R)z({action:"saved",activeProfileId:R.id,activeProviderName:R.name,activeProviderModel:R.model})}}),f4?null:Lz?y(B,{flexDirection:"column",gap:1,children:[J(G,{color:"remember",bold:!0,children:"Loading providers..."}),J(G,{dimColor:!0,children:"Reading provider profiles from disk."})]}):Fz?y(B,{flexDirection:"column",gap:1,children:[J(G,{color:"remember",bold:!0,children:"Activating provider..."}),J(G,{dimColor:!0,children:"Please wait while the provider is being configured."})]}):j]})}var O;var E1=v(()=>{$2();Mq();Y0();zq();h1();k1();_2();P0();wq();D1();M1();D0();e4();m1();Y2();m0();P1();I1();Zq();j2();s2();dq();k0();O4();P4();Cq();uq();xq();iq();O4();d();O=K0(H0(),1)});
50
+ export{_q as cd,D4 as dd,Dq as ed,E3 as fd,E1 as gd};
@@ -0,0 +1,4 @@
1
+ import{Bp as qJ,Dp as dJ,Ep as IJ,Fp as BJ,Gp as cJ,MS as vJ,NS as YV,Sl as hJ,nS as TJ}from"./cli-1.1.39-yyqx9zb5.mjs";import{H$ as WJ,K_ as AJ,Lda as mJ,M$ as p,Q_ as kJ,Rfa as G,Wfa as uJ,daa as fJ,m_ as VJ,v$ as c,vea as gJ,w$ as PJ,yda as f}from"./cli-1.1.39-p2sg5g92.mjs";import{Gha as v,Iha as bJ}from"./cli-1.1.39-7jhstkb2.mjs";import{hja as JJ,lja as SJ,vja as Q,yja as yJ}from"./cli-1.1.39-pc9dgxhx.mjs";import{Vja as e,aka as zJ}from"./cli-1.1.39-wdctfdbb.mjs";import{Uka as NJ,Vka as wJ}from"./cli-1.1.39-8gscnd8w.mjs";import{Jqa as LJ,Nqa as HJ}from"./cli-1.1.39-z8ts6axr.mjs";class d{paths=[];lowerPaths=[];charBits=new Int32Array(0);pathLens=new Uint16Array(0);topLevelCache=null;readyCount=0;loadFromFileList(J){let W=new Set,Z=[];for(let V of J)if(V.length>0&&!W.has(V))W.add(V),Z.push(V);this.buildIndex(Z)}loadFromFileListAsync(J){let W=()=>{},Z=new Promise((Y)=>{W=Y}),V=this.buildAsync(J,W);return{queryable:Z,done:V}}async buildAsync(J,W){let Z=new Set,V=[],Y=performance.now();for(let X=0;X<J.length;X++){let _=J[X];if(_.length>0&&!Z.has(_))Z.add(_),V.push(_);if((X&255)===255&&performance.now()-Y>4)await b(),Y=performance.now()}this.resetArrays(V),Y=performance.now();let $=!0;for(let X=0;X<V.length;X++)if(this.indexPath(X),(X&255)===255&&performance.now()-Y>4){if(this.readyCount=X+1,$)W(),$=!1;await b(),Y=performance.now()}this.readyCount=V.length,W()}buildIndex(J){this.resetArrays(J);for(let W=0;W<J.length;W++)this.indexPath(W);this.readyCount=J.length}resetArrays(J){let W=J.length;this.paths=J,this.lowerPaths=Array(W),this.charBits=new Int32Array(W),this.pathLens=new Uint16Array(W),this.readyCount=0,this.topLevelCache=CJ(J,100)}indexPath(J){let W=this.paths[J].toLowerCase();this.lowerPaths[J]=W;let Z=W.length;this.pathLens[J]=Z;let V=0;for(let Y=0;Y<Z;Y++){let $=W.charCodeAt(Y);if($>=97&&$<=122)V|=1<<$-97}this.charBits[J]=V}search(J,W){if(W<=0)return[];if(J.length===0){if(this.topLevelCache)return this.topLevelCache.slice(0,W);return[]}let Z=J!==J.toLowerCase(),V=Z?J:J.toLowerCase(),Y=Math.min(V.length,64),$=Array(Y),X=0;for(let M=0;M<Y;M++){let D=V.charAt(M);$[M]=D;let E=D.charCodeAt(0);if(E>=97&&E<=122)X|=1<<E-97}let _=Y*24+8+32,H=[],q=-1/0,{paths:B,lowerPaths:A,charBits:F,pathLens:U,readyCount:m}=this;J:for(let M=0;M<m;M++){if((F[M]&X)!==X)continue;let D=Z?B[M]:A[M],E=D.indexOf($[0]);if(E===-1)continue;y[0]=E;let C=0,g=0,u=E;for(let N=1;N<Y;N++){if(E=D.indexOf($[N],u+1),E===-1)continue J;y[N]=E;let K=E-u-1;if(K===0)g+=4;else C+=3+K*1;u=E}if(H.length===W&&_+g-C<=q)continue;let S=B[M],UJ=U[M],T=Y*16+g-C;T+=XJ(S,y[0],!0);for(let N=1;N<Y;N++)T+=XJ(S,y[N],!1);if(T+=Math.max(0,32-(UJ>>2)),H.length<W){if(H.push({path:S,fuzzScore:T}),H.length===W)H.sort((N,K)=>N.fuzzScore-K.fuzzScore),q=H[0].fuzzScore}else if(T>q){let N=0,K=H.length;while(N<K){let h=N+K>>1;if(H[h].fuzzScore<T)N=h+1;else K=h}H.splice(N,0,{path:S,fuzzScore:T}),H.shift(),q=H[0].fuzzScore}}H.sort((M,D)=>D.fuzzScore-M.fuzzScore);let I=H.length,w=Math.max(I,1),z=Array(I);for(let M=0;M<I;M++){let D=H[M].path,E=M/w,C=D.includes("test")?Math.min(E*1.05,1):E;z[M]={path:D,score:C}}return z}}function XJ(J,W,Z){if(W===0)return Z?8:0;let V=J.charCodeAt(W-1);if(jJ(V))return 8;if(RJ(V)&&GJ(J.charCodeAt(W)))return 6;return 0}function jJ(J){return J===47||J===92||J===45||J===95||J===46||J===32}function RJ(J){return J>=97&&J<=122}function GJ(J){return J>=65&&J<=90}function b(){return new Promise((J)=>setImmediate(J))}function CJ(J,W){let Z=new Set;for(let Y of J){let $=Y.length;for(let _=0;_<Y.length;_++){let H=Y.charCodeAt(_);if(H===47||H===92){$=_;break}}let X=Y.slice(0,$);if(X.length>0){if(Z.add(X),Z.size>=W)break}}let V=Array.from(Z);return V.sort((Y,$)=>{let X=Y.length-$.length;if(X!==0)return X;return Y<$?-1:Y>$?1:0}),V.slice(0,W).map((Y)=>({path:Y,score:0}))}var _J=4,y;var QJ=HJ(()=>{y=new Int32Array(64)});import{statSync as pJ}from"fs";import*as O from"path";function l(){if(!x)x=new d;return x}function TV(){x=null,j=null,R++,k=null,L=[],ZJ=[],$J=[],YJ.clear(),n=null,s=null,o=0,a=null,i=null,P=null}function xJ(J){let W=J.length,Z=Math.max(1,Math.floor(W/500)),V=-2128831035;for(let Y=0;Y<W;Y+=Z){let $=J[Y];for(let X=0;X<$.length;X++)V=(V^$.charCodeAt(X))*16777619|0;V=V*16777619|0}if(W>0){let Y=J[W-1];for(let $=0;$<Y.length;$++)V=(V^Y.charCodeAt($))*16777619|0}return`${W}:${(V>>>0).toString(16)}`}function lJ(){let J=WJ(v());if(!J)return null;try{return pJ(O.join(J,".git","index")).mtimeMs}catch{return null}}function MJ(J,W,Z){if(Z===W)return J;return J.map((V)=>{let Y=O.join(W,V);return O.relative(Z,Y)})}async function nJ(J){if(J.length===0)return;if(!x||L.length===0)return;let W=await FJ(J),Z=[...L,...ZJ,...$J,...J,...W],V=xJ(Z);if(V===P){Q("[FileIndex] skipped index rebuild — merged paths unchanged");return}await x.loadFromFileListAsync(Z).done,P=V,Q(`[FileIndex] rebuilt index with ${L.length} tracked + ${J.length} untracked files`)}async function OJ(J,W){let Z=`${J}:${W}`;if(s===Z)return n;let V=JJ(),Y=[".ignore",".rgignore"],$=[...new Set([J,W])],X=DJ.default(),_=!1,H=$.flatMap((A)=>Y.map((F)=>O.join(A,F))),q=await Promise.all(H.map((A)=>V.readFile(A,{encoding:"utf8"}).catch(()=>null)));for(let[A,F]of q.entries()){if(F===null)continue;X.add(F),_=!0,Q(`[FileIndex] loaded ignore patterns from ${H[A]}`)}let B=_?X:null;return n=B,s=Z,B}async function sJ(J,W){let Z=Date.now();Q("[FileIndex] getFilesUsingGit called");let V=WJ(v());if(!V)return Q("[FileIndex] not a git repo, returning null"),null;try{let Y=v(),$=Date.now(),X=await c(p(),["-c","core.quotepath=false","ls-files","--recurse-submodules"],{timeout:5000,abortSignal:J,cwd:V});if(Q(`[FileIndex] git ls-files (tracked) took ${Date.now()-$}ms`),X.code!==0)return Q(`[FileIndex] git ls-files failed (code=${X.code}, stderr=${X.stderr}), falling back to ripgrep`),null;let _=X.stdout.trim().split(`
2
+ `).filter(Boolean),H=MJ(_,V,Y),q=await OJ(V,Y);if(q){let A=H.length;H=q.filter(H),Q(`[FileIndex] applied ignore patterns: ${A} -> ${H.length} files`)}L=H;let B=Date.now()-Z;if(Q(`[FileIndex] git ls-files: ${H.length} tracked files in ${B}ms`),!k){let A=W?["-c","core.quotepath=false","ls-files","--others","--exclude-standard"]:["-c","core.quotepath=false","ls-files","--others"],F=R;k=c(p(),A,{timeout:1e4,cwd:V}).then(async(U)=>{if(F!==R)return;if(U.code===0){let m=U.stdout.trim().split(`
3
+ `).filter(Boolean),I=MJ(m,V,Y),w=await OJ(V,Y);if(w&&I.length>0){let z=I.length;I=w.filter(I),Q(`[FileIndex] applied ignore patterns to untracked: ${z} -> ${I.length} files`)}Q(`[FileIndex] background untracked fetch: ${I.length} files`),nJ(I)}}).catch((U)=>{Q(`[FileIndex] background untracked fetch failed: ${U}`)}).finally(()=>{k=null})}return H}catch(Y){return Q(`[FileIndex] git ls-files error: ${e(Y)}`),null}}async function FJ(J){let W=new Set,Z=performance.now();for(let V=0;V<J.length;V++)if(oJ(J,V,V+1,W),(V&255)===255&&performance.now()-Z>_J)await b(),Z=performance.now();return[...W].map((V)=>V+O.sep)}function oJ(J,W,Z,V){for(let Y=W;Y<Z;Y++){let $=O.dirname(J[Y]);while($!=="."&&!V.has($)){let X=O.dirname($);if(X===$)break;V.add($),$=X}}}async function aJ(J){return(await Promise.all(IJ.map((Z)=>BJ(Z,J)))).flatMap((Z)=>Z.map((V)=>V.filePath))}async function iJ(J,W){Q(`[FileIndex] getProjectFiles called, respectGitignore=${W}`);let Z=await sJ(J,W);if(Z!==null)return Q(`[FileIndex] using git ls-files result (${Z.length} files)`),Z;return Q("[FileIndex] git ls-files returned null, falling back to ripgrep"),KJ(J,W)}async function KJ(J,W){let Z=Date.now(),V=["--files","--follow","--hidden","--glob","!.git/","--glob","!.svn/","--glob","!.hg/","--glob","!.bzr/","--glob","!.jj/","--glob","!.sl/"];if(!W)V.push("--no-ignore-vcs");let Y=v(),X=(await qJ(V,Y,J)).map((H)=>O.relative(Y,H)),_=Date.now()-Z;return Q(`[FileIndex] ripgrep: ${X.length} files in ${_}ms`),X}async function vV(){let J=AbortSignal.timeout(1e4),W=f(),Z=VJ(),V=W.respectGitignore??Z.respectGitignore??!0;try{return await KJ(J,V)}catch(Y){return G(Y),[]}}async function rJ(){let J=AbortSignal.timeout(1e4),W=l();try{let Z=f(),V=VJ(),Y=Z.respectGitignore??V.respectGitignore??!0,$=v(),[X,_]=await Promise.all([iJ(J,Y),aJ($)]);ZJ=_;let H=[...X,..._],q=await FJ(H);$J=q;let B=[...q,...H],A=xJ(B);if(A!==i)await W.loadFromFileListAsync(B).done,i=A,P=null;else Q("[FileIndex] skipped index rebuild — tracked paths unchanged")}catch(Z){G(Z)}return W}function tJ(J,W){let Z=Math.min(J.length,W.length),V=0;while(V<Z&&J[V]===W[V])V++;return J.substring(0,V)}function UV(J){if(J.length===0)return"";let W=J.map((V)=>V.displayText),Z=W[0];for(let V=1;V<W.length;V++){let Y=W[V];if(Z=tJ(Z,Y),Z==="")return""}return Z}function r(J,W){return{id:`file-${J}`,displayText:J,metadata:W!==void 0?{score:W}:void 0}}function eJ(J,W){return J.search(W,t).map((V)=>r(V.path,V.score))}function EJ(){if(j)return;let J=lJ();if(x){if(!(J!==null&&J!==a)&&Date.now()-o<JV)return}let W=R,Z=Date.now();l(),j=rJ().then((V)=>{if(W!==R)return V;return j=null,YJ.emit(),a=J,o=Date.now(),Q(`[FileIndex] cache refresh completed in ${Date.now()-Z}ms`),V}).catch((V)=>{if(Q(`[FileIndex] Cache refresh failed: ${e(V)}`),G(V),W===R)j=null;return l()})}async function VV(){let J=JJ(),W=v();try{let Z=await J.readdir(W);return Z.sort((V,Y)=>{let $=V.isDirectory(),X=Y.isDirectory();if($!==X)return $?-1:1;let _=V.name.startsWith("."),H=Y.name.startsWith(".");if(_!==H)return _?-1:1;return V.name.toLowerCase().localeCompare(Y.name.toLowerCase())}),Z.map((V)=>{let Y=O.join(W,V.name),$=O.relative(W,Y);return V.isDirectory()?$+O.sep:$})}catch(Z){return G(Z),[]}}async function jV(J,W=!1){if(!J&&!W)return[];if(f().fileSuggestion?.type==="command"){let V={...TJ(),query:J};return(await vJ(V)).slice(0,t).map(r)}if(J===""||J==="."||J==="./"){let V=await VV();return EJ(),V.slice(0,t).map(r)}let Z=Date.now();try{let V=j!==null;EJ();let Y=J,$="."+O.sep;if(J.startsWith($))Y=J.substring(2);if(Y.startsWith("~"))Y=AJ(Y);let X=x?eJ(x,Y):[],_=Date.now()-Z;return Q(`[FileIndex] generateFileSuggestions: ${X.length} results in ${_}ms (${V?"partial":"full"} index)`),X}catch(V){return G(V),[]}}function RV(J,W,Z,V,Y,$){let X=typeof J==="string"?J:J.displayText,_=W.substring(0,V)+X+W.substring(V+Z.length);Y(_);let H=V+X.length;$(H)}var DJ,x=null,j=null,YJ,KV,R=0,k=null,L,ZJ,$J,n=null,s=null,o=0,a=null,i=null,P=null,t=100,JV=5000;var WV=HJ(()=>{cJ();QJ();gJ();bJ();yJ();zJ();PJ();SJ();fJ();YV();uJ();kJ();dJ();mJ();wJ();DJ=LJ(hJ(),1);YJ=NJ(),KV=YJ.subscribe,L=[],ZJ=[],$J=[]});
4
+ export{d as $h,QJ as ai,KV as bi,TV as ci,vV as di,UV as ei,EJ as fi,jV as gi,RV as hi,WV as ii};
@@ -0,0 +1,2 @@
1
+ import{wC as m,xC as e}from"./cli-1.1.39-yyqx9zb5.mjs";import{Nqa as n}from"./cli-1.1.39-z8ts6axr.mjs";function c(o){t.setState(()=>[...o])}var t,r=()=>t.getState(),d;var s=n(()=>{e();t=m([]),d=t.subscribe});
2
+ export{r as Pc,d as Qc,c as Rc,s as Sc};
@@ -0,0 +1,2 @@
1
+ import{hW as O}from"./cli-1.1.39-kcq7gw24.mjs";import{C1 as X,E1 as Q}from"./cli-1.1.39-n8j5q839.mjs";import{F1 as b}from"./cli-1.1.39-esp4w3m4.mjs";import{haa as W,vea as P}from"./cli-1.1.39-p2sg5g92.mjs";import{Jqa as U}from"./cli-1.1.39-z8ts6axr.mjs";P();Q();var Y=U(O(),1),J=U(b(),1);function L(D,z){let F=z/100*(D.length-1),q=Math.floor(F),k=Math.ceil(F);if(q===k)return D[q];return D[q]+(D[k]-D[q])*(F-q)}var T=1024;function V(){let D=new Map,z=new Map,F=new Map;return{increment(q,k=1){D.set(q,(D.get(q)??0)+k)},set(q,k){D.set(q,k)},observe(q,k){let y=z.get(q);if(!y)y={reservoir:[],count:0,sum:0,min:k,max:k},z.set(q,y);if(y.count++,y.sum+=k,k<y.min)y.min=k;if(k>y.max)y.max=k;if(y.reservoir.length<T)y.reservoir.push(k);else{let B=Math.floor(Math.random()*y.count);if(B<T)y.reservoir[B]=k}},add(q,k){let y=F.get(q);if(!y)y=new Set,F.set(q,y);y.add(k)},getAll(){let q=Object.fromEntries(D);for(let[k,y]of z){if(y.count===0)continue;q[`${k}_count`]=y.count,q[`${k}_min`]=y.min,q[`${k}_max`]=y.max,q[`${k}_avg`]=y.sum/y.count;let B=[...y.reservoir].sort((G,H)=>G-H);q[`${k}_p50`]=L(B,50),q[`${k}_p95`]=L(B,95),q[`${k}_p99`]=L(B,99)}for(let[k,y]of F)q[k]=y.size;return q}}}var Z=J.createContext(null);function C(D){let z=Y.c(7),{store:F,children:q}=D,k;if(z[0]===Symbol.for("react.memo_cache_sentinel"))k=V(),z[0]=k;else k=z[0];let B=F??k,G,H;if(z[1]!==B)G=()=>{let M=()=>{let N=B.getAll();if(Object.keys(N).length>0)W((A)=>({...A,lastSessionMetrics:N}))};return process.on("exit",M),()=>{process.off("exit",M)}},H=[B],z[1]=B,z[2]=G,z[3]=H;else G=z[2],H=z[3];J.useEffect(G,H);let K;if(z[4]!==q||z[5]!==B)K=X(Z.Provider,{value:B,children:q}),z[4]=q,z[5]=B,z[6]=K;else K=z[6];return K}
2
+ export{V as Qa,C as Ra};
@@ -0,0 +1,4 @@
1
+ import{Dc as Q,Ec as R,Fc as W,Gc as X,Hc as Y,Ic as Z,Jc as k}from"./cli-1.1.39-01qgb22d.mjs";import{Kj as K,Mj as U}from"./cli-1.1.39-yyqx9zb5.mjs";import{Rfa as J,Wfa as N,r9 as y,s9 as M}from"./cli-1.1.39-p2sg5g92.mjs";import{Aja as G,Eja as B}from"./cli-1.1.39-6pkc868v.mjs";import{Vja as H,aka as $}from"./cli-1.1.39-wdctfdbb.mjs";M();$();U();N();B();k();function F(v,x,q){J(v);let z=q?`${x} plugin "${q}"`:x==="disable-all"?"disable all plugins":`${x} plugins`;console.error(`${y.cross} Failed to ${z}: ${H(v)}`),process.exit(1)}async function L(v,x="user"){try{console.log(`Installing plugin "${v}"...`);let q=await Q(v,x);if(!q.success)throw Error(q.message);console.log(`${y.tick} ${q.message}`),process.exit(0)}catch(q){F(q,"install",v)}}async function A(v,x="user",q=!1){try{let z=await R(v,x,!q);if(!z.success)throw Error(z.message);console.log(`${y.tick} ${z.message}`),process.exit(0)}catch(z){F(z,"uninstall",v)}}async function C(v,x){try{let q=await W(v,x);if(!q.success)throw Error(q.message);console.log(`${y.tick} ${q.message}`),process.exit(0)}catch(q){F(q,"enable",v)}}async function f(v,x){try{let q=await X(v,x);if(!q.success)throw Error(q.message);console.log(`${y.tick} ${q.message}`),process.exit(0)}catch(q){F(q,"disable",v)}}async function O(){try{let v=await Y();if(!v.success)throw Error(v.message);console.log(`${y.tick} ${v.message}`),process.exit(0)}catch(v){F(v,"disable-all")}}async function S(v,x){try{G(`Checking for updates for plugin "${v}" at ${x} scope…
2
+ `);let q=await Z(v,x);if(!q.success)throw Error(q.message);G(`${y.tick} ${q.message}
3
+ `),await K(0)}catch(q){F(q,"update",v)}}
4
+ export{L as h,A as i,C as j,f as k,O as l,S as m};
@@ -0,0 +1,8 @@
1
+ import{Na as j}from"./cli-1.1.39-erbg35qn.mjs";import{Fe as Oq,Ke as cq}from"./cli-1.1.39-9bh2t20k.mjs";import{cT as F,eT as pq}from"./cli-1.1.39-yyqx9zb5.mjs";import{$Z as Cq,TZ as l,ZZ as bq,_Z as a}from"./cli-1.1.39-4he45b53.mjs";import{B5 as Uq,D5 as x,E3 as Yq,I3 as Zq,J5 as Lq,M3 as $q,V3 as Hq,Y3 as P,Z1 as U,_3 as Kq,c2 as O,d4 as Qq,z5 as Wq}from"./cli-1.1.39-nmm4w3bh.mjs";import{d6 as y,e6 as Mq}from"./cli-1.1.39-2k0w4c3v.mjs";import{Bda as o,Lda as B,Naa as p,O9 as d,Raa as jq,Rfa as V,T9 as Eq,U9 as c,Wfa as _,X9 as Fq,gaa as r,haa as t,jaa as Gq,k_ as Y,m_ as J,t_ as T,tda as H,v_ as dq,vda as Z,vea as W,yda as yq}from"./cli-1.1.39-p2sg5g92.mjs";import{Aga as uq,wga as E}from"./cli-1.1.39-h06axtf8.mjs";import{bja as v,dja as Rq,eja as m,hja as S,lja as Iq}from"./cli-1.1.39-pc9dgxhx.mjs";import{Dja as u,Eja as Pq}from"./cli-1.1.39-6pkc868v.mjs";import{Vja as R,Xja as f,aka as Dq}from"./cli-1.1.39-wdctfdbb.mjs";import{gka as Aq,oka as Sq}from"./cli-1.1.39-e4p7vgrg.mjs";import{Ana as G,Pna as D,Tna as Tq,Una as kq,loa as C,voa as h,yna as A,zpa as k}from"./cli-1.1.39-8gscnd8w.mjs";Mq();bq();k();Fq();Dq();Iq();Eq();_();Pq();jq();Tq();Rq();Cq();import{readFileSync as hq}from"node:fs";var fq=/--inspect(-brk)?/,b=/--inspect(-brk)?|--debug(-brk)?/;function $z(){let q=c()?fq:b,K=process.execArgv.some((X)=>q.test(X)),Q=!!process.env.NODE_OPTIONS&&b.test(process.env.NODE_OPTIONS);try{return!!global.require("inspector").url()||K||Q}catch{return K||Q}}function Hz(){(process.stderr.isTTY?process.stderr:process.stdout.isTTY?process.stdout:void 0)?.write(l)}function Jz(z){if(typeof z!=="object"||z===null)return{};let q=z,K=q.teammateMode;return{agentId:typeof q.agentId==="string"?q.agentId:void 0,agentName:typeof q.agentName==="string"?q.agentName:void 0,teamName:typeof q.teamName==="string"?q.teamName:void 0,agentColor:typeof q.agentColor==="string"?q.agentColor:void 0,planModeRequired:typeof q.planModeRequired==="boolean"?q.planModeRequired:void 0,parentSessionId:typeof q.parentSessionId==="string"?q.parentSessionId:void 0,teammateMode:K==="auto"||K==="tmux"||K==="in-process"?K:void 0,agentType:typeof q.agentType==="string"?q.agentType:void 0}}function g(z){try{let q=z.trim(),K=q.startsWith("{")&&q.endsWith("}"),Q;if(K){if(!d(q))process.stderr.write(y.red(`Error: Invalid JSON provided to --settings
2
+ `)),process.exit(1);Q=a("claude-settings",".json",{contentHash:q}),v(Q,q,"utf8")}else{let{resolvedPath:X}=m(S(),z);try{hq(X,"utf8")}catch($){if(f($))process.stderr.write(y.red(`Error: Settings file not found: ${X}
3
+ `)),process.exit(1);throw $}Q=X}C(Q),D()}catch(q){if(q instanceof Error)V(q);process.stderr.write(y.red(`Error processing settings: ${R(q)}
4
+ `)),process.exit(1)}}function n(z){try{let q=p(z);h(q),D()}catch(q){if(q instanceof Error)V(q);process.stderr.write(y.red(`Error processing --setting-sources: ${R(q)}
5
+ `)),process.exit(1)}}async function Vz(z,q){if(!process.stdin.isTTY&&!process.argv.includes("mcp")){if(q==="stream-json")return process.stdin;process.stdin.setEncoding("utf8");let K="",Q=($)=>{K+=$};process.stdin.on("data",Q);let X=await u(process.stdin,3000);if(process.stdin.off("data",Q),X)process.stderr.write(`Warning: no stdin data received in 3s, proceeding without it. If piping from a slow command, redirect stdin explicitly: < /dev/null to skip, or wait longer.
6
+ `);return[z,K].filter(Boolean).join(`
7
+ `)}return z}uq();pq();W();dq();Sq();W();_();B();function i(){let z=J();if(z.autoUpdates!==!1||z.autoUpdatesProtectedForNative===!0)return;try{let q=H("userSettings")||{};Z("userSettings",{...q,env:{...q.env,DISABLE_AUTOUPDATER:"1"}}),process.env.DISABLE_AUTOUPDATER="1",Y((K)=>{let{autoUpdates:Q,autoUpdatesProtectedForNative:X,...$}=K;return $})}catch(q){V(Error(`Failed to migrate auto-updates: ${q}`))}}W();_();B();function s(){if(!J().bypassPermissionsModeAccepted)return;try{if(!o())Z("userSettings",{skipDangerousModePermissionPrompt:!0});Y((q)=>{if(!("bypassPermissionsModeAccepted"in q))return q;let{bypassPermissionsModeAccepted:K,...Q}=q;return Q})}catch(q){V(Error(`Failed to migrate bypass permissions accepted: ${q}`))}}W();_();B();function e(){let z=r(),q=z.enableAllProjectMcpServers!==void 0,K=z.enabledMcpjsonServers&&z.enabledMcpjsonServers.length>0,Q=z.disabledMcpjsonServers&&z.disabledMcpjsonServers.length>0;if(!q&&!K&&!Q)return;try{let X=H("localSettings")||{},$={},L=[];if(q&&X.enableAllProjectMcpServers===void 0)$.enableAllProjectMcpServers=z.enableAllProjectMcpServers,L.push("enableAllProjectMcpServers");else if(q)L.push("enableAllProjectMcpServers");if(K&&z.enabledMcpjsonServers){let N=X.enabledMcpjsonServers||[];$.enabledMcpjsonServers=[...new Set([...N,...z.enabledMcpjsonServers])],L.push("enabledMcpjsonServers")}if(Q&&z.disabledMcpjsonServers){let N=X.disabledMcpjsonServers||[];$.disabledMcpjsonServers=[...new Set([...N,...z.disabledMcpjsonServers])],L.push("disabledMcpjsonServers")}if(Object.keys($).length>0)Z("localSettings",$);if(L.includes("enableAllProjectMcpServers")||L.includes("enabledMcpjsonServers")||L.includes("disabledMcpjsonServers"))t((N)=>{let{enableAllProjectMcpServers:lq,enabledMcpjsonServers:aq,disabledMcpjsonServers:gq,...xq}=N;return xq})}catch(X){V(X)}}k();W();B();var I=new Map([["claude-fable-5","claude-fable-5-1"],["anthropic.claude-fable-5","anthropic.claude-fable-5-1"]]);function w(z){return I.get(z)??z}function vq(z){if(!z)return null;let q={};if(z.model!==void 0){let K=w(z.model);if(K!==z.model)q.model=K}if(z.advisorModel!==void 0){let K=w(z.advisorModel);if(K!==z.advisorModel)q.advisorModel=K}if(z.availableModels){let K=z.availableModels.map(w);if(K.some((Q,X)=>Q!==z.availableModels?.[X]))q.availableModels=K}if(z.modelOverrides){let K=Object.entries(z.modelOverrides),Q=K.filter(([X])=>I.has(X));if(Q.length>0)q.modelOverrides={...Object.fromEntries(Q.map(([X])=>[X,void 0])),...Object.fromEntries(K.map(([X,$])=>[w(X),$]))}}return Object.keys(q).length>0?q:null}function mq(z){if(!z)return null;let K=Object.entries(z).filter(([,X])=>X.activeModelForProject!==void 0&&I.has(X.activeModelForProject));if(K.length===0)return null;let Q={...z};for(let[X,$]of K)Q[X]={...$,activeModelForProject:w($.activeModelForProject)};return Q}function qq(){let z=vq(H("userSettings"));if(z)Z("userSettings",z);let q=mq(J().projects);if(q)Y((Q)=>({...Q,projects:q}));let K=A();if(K){let Q=w(K);if(Q!==K)G(Q)}}B();function zq(){let q=H("userSettings")?.model;if(typeof q==="string"){if(q.startsWith("fennec-latest[1m]"))Z("userSettings",{model:"opus[1m]"});else if(q.startsWith("fennec-latest"))Z("userSettings",{model:"opus"});else if(q.startsWith("fennec-fast-latest")||q.startsWith("opus-4-5-fast"))Z("userSettings",{model:"opus[1m]",fastMode:!0})}}W();Qq();O();B();function Xq(){if(U()!=="firstParty")return;if(!Kq())return;let z=H("userSettings")?.model;if(z!=="claude-opus-4-20250514"&&z!=="claude-opus-4-1-20250805"&&z!=="claude-opus-4-0"&&z!=="claude-opus-4-1")return;Z("userSettings",{model:"opus"}),Y((q)=>({...q,legacyOpusMigrationTimestamp:Date.now()}))}Qq();B();function Jq(){if(!Hq())return;if(H("userSettings")?.model!=="opus")return;if(Yq(Zq()))return;let q="opus[1m]",K=P(q)===P($q())?void 0:q;Z("userSettings",{model:K})}W();function Vq(){Y((z)=>{let q=z.replBridgeEnabled;if(q===void 0)return z;if(z.remoteControlAtStartup!==void 0)return z;let K={...z,remoteControlAtStartup:Boolean(q)};return delete K.replBridgeEnabled,K})}k();W();O();B();function Bq(){if(U()!=="firstParty")return;if(J().sonnet1m45MigrationComplete)return;if(H("userSettings")?.model==="sonnet[1m]")Z("userSettings",{model:"sonnet-4-5-20250929[1m]"});if(A()==="sonnet[1m]")G("sonnet-4-5-20250929[1m]");Y((Q)=>({...Q,sonnet1m45MigrationComplete:!0}))}Lq();W();O();B();function wq(){if(U()!=="firstParty")return;if(!x()&&!Wq()&&!Uq())return;let z=H("userSettings")?.model;if(z!=="claude-sonnet-4-5-20250929"&&z!=="claude-sonnet-4-5-20250929[1m]"&&z!=="sonnet-4-5-20250929"&&z!=="sonnet-4-5-20250929[1m]")return;let q=z.endsWith("[1m]");if(Z("userSettings",{model:q?"sonnet[1m]":"sonnet"}),J().numStartups>1)Y((Q)=>({...Q,sonnet45To46MigrationTimestamp:Date.now()}))}W();_();B();function Nq(){if(J().hasResetAutoModeOptInForDefaultOffer)return;try{let q=H("userSettings");if(q?.skipAutoPermissionPrompt&&q?.permissions?.defaultMode!=="auto")Z("userSettings",{skipAutoPermissionPrompt:void 0});Y((K)=>{if(K.hasResetAutoModeOptInForDefaultOffer)return K;return{...K,hasResetAutoModeOptInForDefaultOffer:!0}})}catch(q){V(Error(`Failed to reset auto mode opt-in: ${q}`))}}Lq();W();O();B();function _q(){if(J().opusProMigrationComplete)return;if(U()!=="firstParty"||!x()){Y((Q)=>({...Q,opusProMigrationComplete:!0}));return}if(yq()?.model===void 0){let Q=Date.now();Y((X)=>({...X,opusProMigrationComplete:!0,opusProMigrationTimestamp:Q}))}else Y((Q)=>({...Q,opusProMigrationComplete:!0}))}cq();k();var M=13;function IK(){if(J().migrationVersion!==M)i(),s(),e(),_q(),Bq(),Xq(),wq(),zq(),Jq(),Vq(),qq(),Nq(),Y((z)=>z.migrationVersion===M?z:{...z,migrationVersion:M});Oq().catch(()=>{})}function PK(){if(kq()){T("info","prefetch_system_context_non_interactive"),F();return}if(Gq())T("info","prefetch_system_context_has_trust"),F();else T("info","prefetch_system_context_skipped_no_trust")}function MK(){E("eagerLoadSettings_start");let z=j("--settings");if(z)g(z);let q=j("--setting-sources");if(q!==void 0)n(q);E("eagerLoadSettings_end")}function EK(z){if(process.env.CLAUDE_CODE_ENTRYPOINT)return;let q=process.argv.slice(2),K=q.indexOf("mcp");if(K!==-1&&q[K+1]==="serve"){process.env.CLAUDE_CODE_ENTRYPOINT="mcp";return}if(Aq(process.env.CLAUDE_CODE_ACTION)){process.env.CLAUDE_CODE_ENTRYPOINT="claude-code-github-action";return}process.env.CLAUDE_CODE_ENTRYPOINT=z?"sdk-cli":"cli"}
8
+ export{$z as E,Hz as F,Jz as G,Vz as H,IK as I,PK as J,MK as K,EK as L};
@@ -0,0 +1,2 @@
1
+ import{EQ as x,HQ as B}from"./cli-1.1.39-yyqx9zb5.mjs";import{Nqa as z}from"./cli-1.1.39-z8ts6axr.mjs";function H(q){if(!q)return 0;return q.activeAgents.filter((b)=>b.source!=="built-in").reduce((b,w)=>{let y=`${w.agentType}: ${w.whenToUse}`;return b+x(y)},0)}var G=15000;var A=z(()=>{B()});
2
+ export{G as sg,H as tg,A as ug};
@@ -0,0 +1,2 @@
1
+ import{Nqa as K}from"./cli-1.1.39-z8ts6axr.mjs";import z from"node:path";function Z(j){if(j.endsWith(z.sep)||j.endsWith("/"))return P;let q=z.basename(j).toLowerCase();if(q.startsWith("readme"))return H[".md"];if(q.startsWith(".env"))return V;let B=W[q];if(B)return B;let J=z.extname(q);return H[J]??Q}function U(j){return Y[Z(j)]}var P="",D="",Q="",V="",W,H,Y;var $=K(()=>{W={"package.json":"",dockerfile:"",".dockerignore":"",".gitignore":"",".gitattributes":"",license:"","bun.lock":""},H={".ts":"",".tsx":"",".js":"",".jsx":"",".mjs":"",".cjs":"",".json":"",".md":"",".markdown":"",".toml":"",".yaml":"",".yml":"",".py":"",".rs":"",".go":"",".sh":"",".bash":"",".zsh":"",".css":"",".scss":"",".html":"",".htm":"",".png":"",".jpg":"",".jpeg":"",".gif":"",".svg":"",".webp":"",".lock":""},Y={"":"#519aba","":"#61dafb","":"#cbcb41","":"#cbcb41","":"#519aba","":"#6d8086","":"#ffbc03","":"#dea584","":"#519aba","":"#89e051","":"#563d7c","":"#f55385","":"#e34c26","":"#a074c4","":"#bbbbbb","":"#8bc34a","":"#458ee6","":"#f14c28","":"#d0bf41"}});
2
+ export{P as Bi,D as Ci,Z as Di,U as Ei,$ as Fi};
@@ -0,0 +1,2 @@
1
+ import{$X as f,hW as s,vX as t}from"./cli-1.1.39-kcq7gw24.mjs";import{C1 as n,D1 as c,E1 as r}from"./cli-1.1.39-n8j5q839.mjs";import{Jqa as m,Nqa as l}from"./cli-1.1.39-z8ts6axr.mjs";function T(){let o=i.c(1),e;if(o[0]===Symbol.for("react.memo_cache_sentinel"))e=c(t,{color:"permission",children:["Press ",n(t,{bold:!0,children:"Enter"})," to continue…"]}),o[0]=e;else e=o[0];return e}var i;var p=l(()=>{f();r();i=m(s(),1)});
2
+ export{T as mg,p as ng};
@@ -0,0 +1,2 @@
1
+ import{Ypa as M,Zpa as Y}from"./cli-1.1.39-17mj2gq0.mjs";import{Nqa as W}from"./cli-1.1.39-z8ts6axr.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.CLAUDIN_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.CLAUDIN_BASH_MAINTAIN_PROJECT_WORKING_DIR)}function z(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-5-5","VERTEX_REGION_CLAUDE_5_5_OPUS"],["claude-opus-5","VERTEX_REGION_CLAUDE_5_OPUS"],["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-5-5","VERTEX_REGION_CLAUDE_5_5_SONNET"],["claude-sonnet-5","VERTEX_REGION_CLAUDE_5_SONNET"],["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 bka,N as cka,X as dka,_ as eka,j as fka,U as gka,I as hka,S as ika,T as jka,c as kka,L as lka,w as mka,z as nka,k as oka};
@@ -0,0 +1,2 @@
1
+ import{Mr as X,cn as O,dn as P,en as Q,fk as M,fn as U,gk as W}from"./cli-1.1.39-yyqx9zb5.mjs";import{Nqa as V}from"./cli-1.1.39-z8ts6axr.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,11 @@
1
+ import{F6 as x,H6 as d}from"./cli-1.1.39-nk9xnj41.mjs";import{I6 as E,J6 as C,L6 as j,M6 as $,O6 as I,P6 as u}from"./cli-1.1.39-0k9p4g5p.mjs";import{D_ as B,E_ as b,Rfa as f,Wfa as F,k_ as O,m_ as Z,u$ as Q,v$ as X,vea as T,w$ as D}from"./cli-1.1.39-p2sg5g92.mjs";import{vja as q,yja as A}from"./cli-1.1.39-pc9dgxhx.mjs";import{Una as p,zpa as m}from"./cli-1.1.39-8gscnd8w.mjs";import{Nqa as N,Oqa as R}from"./cli-1.1.39-z8ts6axr.mjs";import{homedir as Y}from"os";async function e(){if((await Q("which",["uv"])).code===0)return q("[it2Setup] Found uv (will use uv tool install)"),"uvx";if((await Q("which",["pipx"])).code===0)return q("[it2Setup] Found pipx package manager"),"pipx";if((await Q("which",["pip"])).code===0)return q("[it2Setup] Found pip package manager"),"pip";if((await Q("which",["pip3"])).code===0)return q("[it2Setup] Found pip3 package manager"),"pip";return q("[it2Setup] No Python package manager found"),null}async function k(){return(await Q("which",["it2"])).code===0}async function qq(z){q(`[it2Setup] Installing it2 using ${z}`);let H;switch(z){case"uvx":H=await X("uv",["tool","install","it2"],{cwd:Y()});break;case"pipx":H=await X("pipx",["install","it2"],{cwd:Y()});break;case"pip":if(H=await X("pip",["install","--user","it2"],{cwd:Y()}),H.code!==0)H=await X("pip3",["install","--user","it2"],{cwd:Y()});break}if(H.code!==0){let J=H.stderr||"Unknown installation error";return f(Error(`[it2Setup] Failed to install it2: ${J}`)),{success:!1,error:J,packageManager:z}}return q("[it2Setup] it2 installed successfully"),{success:!0,packageManager:z}}async function zq(){if(q("[it2Setup] Verifying it2 setup..."),!await k())return{success:!1,error:"it2 CLI is not installed or not in PATH"};let H=await Q("it2",["session","list"]);if(H.code!==0){let J=H.stderr.toLowerCase();if(J.includes("api")||J.includes("python")||J.includes("connection refused")||J.includes("not enabled"))return q("[it2Setup] Python API not enabled in iTerm2"),{success:!1,error:"Python API not enabled in iTerm2 preferences",needsPythonApiEnabled:!0};return{success:!1,error:H.stderr||"Failed to communicate with iTerm2"}}return q("[it2Setup] it2 setup verified successfully"),{success:!0}}function Hq(){return["Almost done! Enable the Python API in iTerm2:",""," iTerm2 → Settings → General → Magic → Enable Python API","","After enabling, you may need to restart iTerm2."]}function Jq(){if(Z().iterm2It2SetupComplete!==!0)O((H)=>({...H,iterm2It2SetupComplete:!0})),q("[it2Setup] Marked it2 setup as complete")}function Kq(z){if(Z().preferTmuxOverIterm2!==z)O((J)=>({...J,preferTmuxOverIterm2:z})),q(`[it2Setup] Set preferTmuxOverIterm2 = ${z}`)}function w(){return Z().preferTmuxOverIterm2===!0}var v=N(()=>{T();A();D();F()});async function s(){if(y)return;await import("./TmuxBackend-1.1.39-vbqywsj7.mjs"),await import("./ITermBackend-1.1.39-z3zx6y4m.mjs"),y=!0}function _q(z){S=z}function $q(z){q(`[registry] registerITermBackend called, class=${z?.name||"undefined"}`),W=z}function _(){if(!S)throw Error("TmuxBackend not registered. Import TmuxBackend.ts before using the registry.");return new S}function h(){if(!W)throw Error("ITermBackend not registered. Import ITermBackend.ts before using the registry.");return new W}async function Oq(){if(await s(),K)return q(`[BackendRegistry] Using cached backend: ${K.backend.type}`),K;q("[BackendRegistry] Starting backend detection...");let z=await C(),H=$();if(q(`[BackendRegistry] Environment: insideTmux=${z}, inITerm2=${H}`),z){q("[BackendRegistry] Selected: tmux (running inside tmux session)");let L=_();return U=L,K={backend:L,isNative:!0,needsIt2Setup:!1},K}if(H){let L=w();if(L)q("[BackendRegistry] User prefers tmux over iTerm2, skipping iTerm2 detection");else{let V=await I();if(q(`[BackendRegistry] iTerm2 detected, it2 CLI available: ${V}`),V){q("[BackendRegistry] Selected: iterm2 (native iTerm2 with it2 CLI)");let M=h();return U=M,K={backend:M,isNative:!0,needsIt2Setup:!1},K}}let P=await j();if(q(`[BackendRegistry] it2 not available, tmux available: ${P}`),P){q("[BackendRegistry] Selected: tmux (fallback in iTerm2, it2 setup recommended)");let V=_();return U=V,K={backend:V,isNative:!1,needsIt2Setup:!L},K}throw q("[BackendRegistry] ERROR: iTerm2 detected but no it2 CLI and no tmux"),Error("iTerm2 detected but it2 CLI not installed. Install it2 with: pip install it2")}let J=await j();if(q(`[BackendRegistry] Not in tmux or iTerm2, tmux available: ${J}`),J){q("[BackendRegistry] Selected: tmux (external session mode)");let L=_();return U=L,K={backend:L,isNative:!1,needsIt2Setup:!1},K}throw q("[BackendRegistry] ERROR: No pane backend available"),Error(t())}function t(){switch(B()){case"macos":return`To use agent swarms, install tmux:
2
+ brew install tmux
3
+ Then start a tmux session with: tmux new-session -s claude`;case"linux":case"wsl":return`To use agent swarms, install tmux:
4
+ sudo apt install tmux # Ubuntu/Debian
5
+ sudo dnf install tmux # Fedora/RHEL
6
+ Then start a tmux session with: tmux new-session -s claude`;case"windows":return`To use agent swarms, you need tmux which requires WSL (Windows Subsystem for Linux).
7
+ Install WSL first, then inside WSL run:
8
+ sudo apt install tmux
9
+ Then start a tmux session with: tmux new-session -s claude`;default:return`To use agent swarms, install tmux using your system's package manager.
10
+ Then start a tmux session with: tmux new-session -s claude`}}function Eq(z){switch(z){case"tmux":return _();case"iterm2":return h()}}function jq(){return U}function yq(){return K}function Sq(){q("[BackendRegistry] Marking in-process fallback as active"),G=!0}function i(){return x()}function l(){if(p())return q("[BackendRegistry] isInProcessEnabled: true (non-interactive session)"),!0;let z=i(),H;if(z==="in-process")H=!0;else if(z==="tmux")H=!1;else{if(G)return q("[BackendRegistry] isInProcessEnabled: true (fallback after pane backend unavailable)"),!0;let J=E(),L=$();H=!J&&!L}return q(`[BackendRegistry] isInProcessEnabled: ${H} (mode=${z}, insideTmux=${E()}, inITerm2=${$()})`),H}function Wq(){return l()?"in-process":"tmux"}function Gq(){U=null,K=null,y=!1,G=!1}var U=null,K=null,y=!1,G=!1,S=null,W=null;var n=N(()=>{m();A();b();u();v();d()});
11
+ export{e as i6,qq as j6,zq as k6,Hq as l6,Jq as m6,Kq as n6,v as o6,s as p6,_q as q6,$q as r6,Oq as s6,Eq as t6,jq as u6,yq as v6,Sq as w6,l as x6,Wq as y6,Gq as z6,n as A6};
@@ -0,0 +1,3 @@
1
+ import{Cqa as x,Eqa as y,Iqa as C}from"./cli-1.1.39-1mpe0mv2.mjs";import{Lqa as k}from"./cli-1.1.39-z8ts6axr.mjs";var MF=k((n)=>{var K=x(),b=C(),w=y(),f=(F)=>F[K.SMITHY_CONTEXT_KEY]||(F[K.SMITHY_CONTEXT_KEY]={}),h=(F,J)=>{if(!J||J.length===0)return F;let G=[];for(let L of J)for(let Q of F)if(Q.schemeId.split("#")[1]===L)G.push(Q);for(let L of F)if(!G.find(({schemeId:Q})=>Q===L.schemeId))G.push(L);return G};function v(F){let J=new Map;for(let G of F)J.set(G.schemeId,G);return J}var j=(F,J)=>(G,L)=>async(Q)=>{let V=F.httpAuthSchemeProvider(await J.httpAuthSchemeParametersProvider(F,L,Q.input)),W=F.authSchemePreference?await F.authSchemePreference():[],Z=h(V,W),Y=v(F.httpAuthSchemes),U=w.getSmithyContext(L),$=[];for(let X of Z){let B=Y.get(X.schemeId);if(!B){$.push(`HttpAuthScheme \`${X.schemeId}\` was not enabled for this service.`);continue}let D=B.identityProvider(await J.identityProviderConfigProvider(F));if(!D){$.push(`HttpAuthScheme \`${X.schemeId}\` did not have an IdentityProvider configured.`);continue}let{identityProperties:N={},signingProperties:R={}}=X.propertiesExtractor?.(F,L)||{};X.identityProperties=Object.assign(X.identityProperties||{},N),X.signingProperties=Object.assign(X.signingProperties||{},R),U.selectedHttpAuthScheme={httpAuthOption:X,identity:await D(X.identityProperties),signer:B.signer};break}if(!U.selectedHttpAuthScheme)throw Error($.join(`
2
+ `));return G(Q)},H={step:"serialize",tags:["HTTP_AUTH_SCHEME"],name:"httpAuthSchemeMiddleware",override:!0,relation:"before",toMiddleware:"endpointV2Middleware"},P=(F,{httpAuthSchemeParametersProvider:J,identityProviderConfigProvider:G})=>({applyToStack:(L)=>{L.addRelativeTo(j(F,{httpAuthSchemeParametersProvider:J,identityProviderConfigProvider:G}),H)}}),M={step:"serialize",tags:["HTTP_AUTH_SCHEME"],name:"httpAuthSchemeMiddleware",override:!0,relation:"before",toMiddleware:"serializerMiddleware"},l=(F,{httpAuthSchemeParametersProvider:J,identityProviderConfigProvider:G})=>({applyToStack:(L)=>{L.addRelativeTo(j(F,{httpAuthSchemeParametersProvider:J,identityProviderConfigProvider:G}),M)}}),m=(F)=>(J)=>{throw J},u=(F,J)=>{},O=(F)=>(J,G)=>async(L)=>{if(!b.HttpRequest.isInstance(L.request))return J(L);let V=w.getSmithyContext(G).selectedHttpAuthScheme;if(!V)throw Error("No HttpAuthScheme was selected: unable to sign request");let{httpAuthOption:{signingProperties:W={}},identity:Z,signer:Y}=V,U=await J({...L,request:await Y.sign(L.request,Z,W)}).catch((Y.errorHandler||m)(W));return(Y.successHandler||u)(U.response,W),U},I={step:"finalizeRequest",tags:["HTTP_SIGNING"],name:"httpSigningMiddleware",aliases:["apiKeyMiddleware","tokenMiddleware","awsAuthMiddleware"],override:!0,relation:"after",toMiddleware:"retryMiddleware"},c=(F)=>({applyToStack:(J)=>{J.addRelativeTo(O(),I)}}),a=(F)=>{if(typeof F==="function")return F;let J=Promise.resolve(F);return()=>J},d=async(F,J,G,L=(V)=>V,...Q)=>{let V=new F(G);return V=L(V)??V,await J.send(V,...Q)};function g(F,J,G,L,Q){return async function*(W,Z,...Y){let U=Z,$=W.startingToken??U[G],X=!0,B;while(X){if(U[G]=$,Q)U[Q]=U[Q]??W.pageSize;if(W.client instanceof F)B=await d(J,W.client,Z,W.withCommand,...Y);else throw Error(`Invalid client, expected instance of ${F.name}`);yield B;let D=$;$=p(B,L),X=!!($&&(!W.stopOnSameToken||$!==D))}return}}var p=(F,J)=>{let G=F,L=J.split(".");for(let Q of L){if(!G||typeof G!=="object")return;G=G[Q]}return G};function s(F,J,G){if(!F.__smithy_context)F.__smithy_context={features:{}};else if(!F.__smithy_context.features)F.__smithy_context.features={};F.__smithy_context.features[J]=G}class E{authSchemes=new Map;constructor(F){for(let J in F){let G=F[J];if(G!==void 0)this.authSchemes.set(J,G)}}getIdentityProvider(F){return this.authSchemes.get(F)}}class _{async sign(F,J,G){if(!G)throw Error("request could not be signed with `apiKey` since the `name` and `in` signer properties are missing");if(!G.name)throw Error("request could not be signed with `apiKey` since the `name` signer property is missing");if(!G.in)throw Error("request could not be signed with `apiKey` since the `in` signer property is missing");if(!J.apiKey)throw Error("request could not be signed with `apiKey` since the `apiKey` is not defined");let L=b.HttpRequest.clone(F);if(G.in===K.HttpApiKeyAuthLocation.QUERY)L.query[G.name]=J.apiKey;else if(G.in===K.HttpApiKeyAuthLocation.HEADER)L.headers[G.name]=G.scheme?`${G.scheme} ${J.apiKey}`:J.apiKey;else throw Error("request can only be signed with `apiKey` locations `query` or `header`, but found: `"+G.in+"`");return L}}class z{async sign(F,J,G){let L=b.HttpRequest.clone(F);if(!J.token)throw Error("request could not be signed with `token` since the `token` is not defined");return L.headers.Authorization=`Bearer ${J.token}`,L}}class A{async sign(F,J,G){return F}}var q=(F)=>function(G){return S(G)&&G.expiration.getTime()-Date.now()<F},T=300000,r=q(T),S=(F)=>F.expiration!==void 0,o=(F,J,G)=>{if(F===void 0)return;let L=typeof F!=="function"?async()=>Promise.resolve(F):F,Q,V,W,Z=!1,Y=async(U)=>{if(!V)V=L(U);try{Q=await V,W=!0,Z=!1}finally{V=void 0}return Q};if(J===void 0)return async(U)=>{if(!W||U?.forceRefresh)Q=await Y(U);return Q};return async(U)=>{if(!W||U?.forceRefresh)Q=await Y(U);if(Z)return Q;if(!G(Q))return Z=!0,Q;if(J(Q))return await Y(U),Q;return Q}};n.requestBuilder=b.requestBuilder;n.DefaultIdentityProviderConfig=E;n.EXPIRATION_MS=T;n.HttpApiKeyAuthSigner=_;n.HttpBearerAuthSigner=z;n.NoAuthSigner=A;n.createIsIdentityExpiredFunction=q;n.createPaginator=g;n.doesIdentityRequireRefresh=S;n.getHttpAuthSchemeEndpointRuleSetPlugin=P;n.getHttpAuthSchemePlugin=l;n.getHttpSigningPlugin=c;n.getSmithyContext=f;n.httpAuthSchemeEndpointRuleSetMiddlewareOptions=H;n.httpAuthSchemeMiddleware=j;n.httpAuthSchemeMiddlewareOptions=M;n.httpSigningMiddleware=O;n.httpSigningMiddlewareOptions=I;n.isIdentityExpired=r;n.memoizeIdentityProvider=o;n.normalizeProvider=a;n.setFeature=s});
3
+ export{MF as n8};
@@ -0,0 +1,2 @@
1
+ import{Lqa as N}from"./cli-1.1.39-z8ts6axr.mjs";var zt=N((J)=>{var y=Symbol.for("react.transitional.element"),$=Symbol.for("react.portal"),Y=Symbol.for("react.fragment"),M=Symbol.for("react.strict_mode"),L=Symbol.for("react.profiler"),k=Symbol.for("react.consumer"),U=Symbol.for("react.context"),D=Symbol.for("react.forward_ref"),q=Symbol.for("react.suspense"),z=Symbol.for("react.memo"),S=Symbol.for("react.lazy"),G=Symbol.for("react.activity"),K=Symbol.for("react.view_transition"),C=Symbol.iterator;function W(t){if(t===null||typeof t!=="object")return null;return t=C&&t[C]||t["@@iterator"],typeof t==="function"?t:null}var w={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},g=Object.assign,h={};function l(t,e,r){this.props=t,this.context=e,this.refs=h,this.updater=r||w}l.prototype.isReactComponent={};l.prototype.setState=function(t,e){if(typeof t!=="object"&&typeof t!=="function"&&t!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,t,e,"setState")};l.prototype.forceUpdate=function(t){this.updater.enqueueForceUpdate(this,t,"forceUpdate")};function P(){}P.prototype=l.prototype;function v(t,e,r){this.props=t,this.context=e,this.refs=h,this.updater=r||w}var T=v.prototype=new P;T.constructor=v;g(T,l.prototype);T.isPureReactComponent=!0;var m=Array.isArray;function E(){}var s={H:null,A:null,T:null,S:null},O=Object.prototype.hasOwnProperty;function x(t,e,r){var n=r.ref;return{$$typeof:y,type:t,key:e,ref:n!==void 0?n:null,props:r}}function b(t,e){return x(t.type,e,t.props)}function R(t){return typeof t==="object"&&t!==null&&t.$$typeof===y}function B(t){var e={"=":"=0",":":"=2"};return"$"+t.replace(/[=:]/g,function(r){return e[r]})}var d=/\/+/g;function _(t,e){return typeof t==="object"&&t!==null&&t.key!=null?B(""+t.key):e.toString(36)}function Q(t){switch(t.status){case"fulfilled":return t.value;case"rejected":throw t.reason;default:switch(typeof t.status==="string"?t.then(E,E):(t.status="pending",t.then(function(e){t.status==="pending"&&(t.status="fulfilled",t.value=e)},function(e){t.status==="pending"&&(t.status="rejected",t.reason=e)})),t.status){case"fulfilled":return t.value;case"rejected":throw t.reason}}throw t}function p(t,e,r,n,o){var u=typeof t;if(u==="undefined"||u==="boolean")t=null;var i=!1;if(t===null)i=!0;else switch(u){case"bigint":case"string":case"number":i=!0;break;case"object":switch(t.$$typeof){case y:case $:i=!0;break;case S:return i=t._init,p(i(t._payload),e,r,n,o)}}if(i)return o=o(t),i=n===""?"."+_(t,0):n,m(o)?(r="",i!=null&&(r=i.replace(d,"$&/")+"/"),p(o,e,r,"",function(I){return I})):o!=null&&(R(o)&&(o=b(o,r+(o.key==null||t&&t.key===o.key?"":(""+o.key).replace(d,"$&/")+"/")+i)),e.push(o)),1;i=0;var c=n===""?".":n+":";if(m(t))for(var f=0;f<t.length;f++)n=t[f],u=c+_(n,f),i+=p(n,e,r,u,o);else if(f=W(t),typeof f==="function")for(t=f.call(t),f=0;!(n=t.next()).done;)n=n.value,u=c+_(n,f++),i+=p(n,e,r,u,o);else if(u==="object"){if(typeof t.then==="function")return p(Q(t),e,r,n,o);throw e=String(t),Error("Objects are not valid as a React child (found: "+(e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)+"). If you meant to render a collection of children, use an array instead.")}return i}function a(t,e,r){if(t==null)return t;var n=[],o=0;return p(t,n,"","",function(u){return e.call(r,u,o++)}),n}function X(t){if(t._status===-1){var e=t._result,r=e();r.then(function(n){if(t._status===0||t._status===-1)t._status=1,t._result=n,r.status===void 0&&(r.status="fulfilled",r.value=n)},function(n){if(t._status===0||t._status===-1)t._status=2,t._result=n,r.status===void 0&&(r.status="rejected",r.reason=n)}),t._status===-1&&(t._status=0,t._result=r)}if(t._status===1)return t._result.default;throw t._result}var A=typeof reportError==="function"?reportError:function(t){if(typeof window==="object"&&typeof window.ErrorEvent==="function"){var e=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof t==="object"&&t!==null&&typeof t.message==="string"?String(t.message):String(t),error:t});if(!window.dispatchEvent(e))return}else if(typeof process==="object"&&typeof process.emit==="function"){process.emit("uncaughtException",t);return}console.error(t)};function H(t){var e=s.T,r={};r.types=e!==null?e.types:null,s.T=r;try{var n=t(),o=s.S;o!==null&&o(r,n),typeof n==="object"&&n!==null&&typeof n.then==="function"&&n.then(E,A)}catch(u){A(u)}finally{e!==null&&r.types!==null&&(e.types=r.types),s.T=e}}function j(t){var e=s.T;if(e!==null){var r=e.types;r===null?e.types=[t]:r.indexOf(t)===-1&&r.push(t)}else H(j.bind(null,t))}var Z={map:a,forEach:function(t,e,r){a(t,function(){e.apply(this,arguments)},r)},count:function(t){var e=0;return a(t,function(){e++}),e},toArray:function(t){return a(t,function(e){return e})||[]},only:function(t){if(!R(t))throw Error("React.Children.only expected to receive a single React element child.");return t}};J.Activity=G;J.Children=Z;J.Component=l;J.Fragment=Y;J.Profiler=L;J.PureComponent=v;J.StrictMode=M;J.Suspense=q;J.ViewTransition=K;J.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=s;J.__COMPILER_RUNTIME={__proto__:null,c:function(t){return s.H.useMemoCache(t)}};J.addTransitionType=j;J.cache=function(t){return function(){return t.apply(null,arguments)}};J.cacheSignal=function(){return null};J.cloneElement=function(t,e,r){if(t===null||t===void 0)throw Error("The argument must be a React element, but you passed "+t+".");var n=g({},t.props),o=t.key;if(e!=null)for(u in e.key!==void 0&&(o=""+e.key),e)!O.call(e,u)||u==="key"||u==="__self"||u==="__source"||u==="ref"&&e.ref===void 0||(n[u]=e[u]);var u=arguments.length-2;if(u===1)n.children=r;else if(1<u){for(var i=Array(u),c=0;c<u;c++)i[c]=arguments[c+2];n.children=i}return x(t.type,o,n)};J.createContext=function(t){return t={$$typeof:U,_currentValue:t,_currentValue2:t,_threadCount:0,Provider:null,Consumer:null},t.Provider=t,t.Consumer={$$typeof:k,_context:t},t};J.createElement=function(t,e,r){var n,o={},u=null;if(e!=null)for(n in e.key!==void 0&&(u=""+e.key),e)O.call(e,n)&&n!=="key"&&n!=="__self"&&n!=="__source"&&(o[n]=e[n]);var i=arguments.length-2;if(i===1)o.children=r;else if(1<i){for(var c=Array(i),f=0;f<i;f++)c[f]=arguments[f+2];o.children=c}if(t&&t.defaultProps)for(n in i=t.defaultProps,i)o[n]===void 0&&(o[n]=i[n]);return x(t,u,o)};J.createRef=function(){return{current:null}};J.forwardRef=function(t){return{$$typeof:D,render:t}};J.isValidElement=R;J.lazy=function(t){return{$$typeof:S,_payload:{_status:-1,_result:t},_init:X}};J.memo=function(t,e){return{$$typeof:z,type:t,compare:e===void 0?null:e}};J.startTransition=H;J.unstable_useCacheRefresh=function(){return s.H.useCacheRefresh()};J.use=function(t){return s.H.use(t)};J.useActionState=function(t,e,r){return s.H.useActionState(t,e,r)};J.useCallback=function(t,e){return s.H.useCallback(t,e)};J.useContext=function(t){return s.H.useContext(t)};J.useDebugValue=function(){};J.useDeferredValue=function(t,e){return s.H.useDeferredValue(t,e)};J.useEffect=function(t,e){return s.H.useEffect(t,e)};J.useEffectEvent=function(t){return s.H.useEffectEvent(t)};J.useId=function(){return s.H.useId()};J.useImperativeHandle=function(t,e,r){return s.H.useImperativeHandle(t,e,r)};J.useInsertionEffect=function(t,e){return s.H.useInsertionEffect(t,e)};J.useLayoutEffect=function(t,e){return s.H.useLayoutEffect(t,e)};J.useMemo=function(t,e){return s.H.useMemo(t,e)};J.useOptimistic=function(t,e){return s.H.useOptimistic(t,e)};J.useReducer=function(t,e,r){return s.H.useReducer(t,e,r)};J.useRef=function(t){return s.H.useRef(t)};J.useState=function(t){return s.H.useState(t)};J.useSyncExternalStore=function(t,e,r){return s.H.useSyncExternalStore(t,e,r)};J.useTransition=function(){return s.H.useTransition()};J.version="19.3.0"});
2
+ export{zt as F1};
@@ -0,0 +1,9 @@
1
+ import{Eqa as V_,Fqa as su,Hqa as K_,Iqa as f_}from"./cli-1.1.39-1mpe0mv2.mjs";import{Lqa as H,Oqa as $_}from"./cli-1.1.39-z8ts6axr.mjs";var W_=H((k_)=>{var z_=$_("node:stream"),v=V_(),K=f_(),q=K_(),m=(_)=>_?.body instanceof z_.Readable||typeof ReadableStream<"u"&&_?.body instanceof ReadableStream,G_=["AuthFailure","InvalidSignatureException","RequestExpired","RequestInTheFuture","RequestTimeTooSkewed","SignatureDoesNotMatch"],J_=["BandwidthLimitExceeded","EC2ThrottledException","LimitExceededException","PriorRequestNotComplete","ProvisionedThroughputExceededException","RequestLimitExceeded","RequestThrottled","RequestThrottledException","SlowDown","ThrottledException","Throttling","ThrottlingException","TooManyRequestsException","TransactionInProgressException"],X_=["TimeoutError","RequestTimeout","RequestTimeoutException"],C_=[500,502,503,504],d_=["ECONNRESET","ECONNREFUSED","EPIPE","ETIMEDOUT"],Z_=["EHOSTUNREACH","ENETUNREACH","ENOTFOUND"],A=(_)=>_?.$retryable!==void 0,p=(_)=>G_.includes(_.name),y=(_)=>_.$metadata?.clockSkewCorrected,s=(_)=>{let u=new Set(["Failed to fetch","NetworkError when attempting to fetch resource","The Internet connection appears to be offline","Load failed","Network request failed"]);if(!(_&&_ instanceof TypeError))return!1;return u.has(_.message)},J=(_)=>_.$metadata?.httpStatusCode===429||J_.includes(_.name)||_.$retryable?.throttling==!0,X=(_,u=0)=>A(_)||y(_)||_.name==="InvalidSignatureException"&&_.message?.includes("Signature expired")||X_.includes(_.name)||d_.includes(_?.code||"")||Z_.includes(_?.code||"")||C_.includes(_.$metadata?.httpStatusCode||0)||s(_)||o(_)||_.cause!==void 0&&u<=10&&X(_.cause,u+1),a=(_)=>{if(_.$metadata?.httpStatusCode!==void 0){let u=_.$metadata.httpStatusCode;if(500<=u&&u<=599&&!X(_))return!0;return!1}return!1};function o(_){return _.code==="ERR_HTTP2_STREAM_ERROR"&&_.message.includes("NGHTTP2_REFUSED_STREAM")}var e=100,Q=20000,t=500,Z=500,r=5,__=10,g=1,c="amz-sdk-invocation-id",w="amz-sdk-request";function u_(_,u){if(!K.HttpResponse.isInstance(_))return;for(let E of Object.keys(_.headers)){let O=E.toLowerCase();if(O==="retry-after"){let T=_.headers[E],b=NaN;if(T.endsWith("GMT"))try{b=(q.parseRfc7231DateTime(T).getTime()-Date.now())/1000}catch(L){u?.trace?.("Failed to parse retry-after header"),u?.trace?.(L)}else if(T.match(/ GMT, ((\d+)|(\d+\.\d+))$/))b=Number(T.match(/ GMT, ([\d.]+)$/)?.[1]);else if(T.match(/^((\d+)|(\d+\.\d+))$/))b=Number(T);else if(Date.parse(T)>=Date.now())b=(Date.parse(T)-Date.now())/1000;if(isNaN(b))return;return new Date(Date.now()+b*1000)}else if(O==="x-amz-retry-after"){let T=_.headers[E],b=Number(T);if(isNaN(b)){u?.trace?.(`Failed to parse x-amz-retry-after=${T}`);return}return new Date(Date.now()+b)}}}function H_(_,u){return u_(_,u)}var E_=(_)=>{if(_ instanceof Error)return _;if(_ instanceof Object)return Object.assign(Error(),_);if(typeof _==="string")return Error(_);return Error(`AWS SDK error wrapper for ${_}`)};function O_(_){return(u)=>(E,O)=>async(T)=>{let b=await u.retryStrategy(),L=await u.maxAttempts();if(Q_(b)){b=b;let N=await b.acquireInitialRetryToken((O.partition_id??"")+(O.__retryLongPoll?":longpoll":"")),j=Error(),Y=0,F=0,{request:I}=T,R=K.HttpRequest.isInstance(I);if(R)I.headers[c]=q.v4();while(!0)try{if(R)I.headers[w]=`attempt=${Y+1}; max=${L}`;let{response:V,output:z}=await E(T);return b.recordSuccess(N),z.$metadata.attempts=Y+1,z.$metadata.totalRetryDelay=F,{response:V,output:z}}catch(V){let z=c_(V,u.logger);if(j=E_(V),R&&_(I))throw(O.logger instanceof v.NoOpLogger?console:O.logger)?.warn("An error was encountered in a non-retryable streaming request."),j;try{N=await b.refreshRetryTokenForRetry(N,z)}catch(x){if(typeof x.$backoff==="number")await l(x.$backoff);if(!j.$metadata)j.$metadata={};throw j.$metadata.attempts=Y+1,j.$metadata.totalRetryDelay=F,j}Y=N.getRetryCount();let k=N.getRetryDelay();F+=k,await l(k)}}else{if(b=b,b?.mode)O.userAgent=[...O.userAgent||[],["cfg/retry-mode",b.mode]];return b.retry(E,T)}}}var l=(_)=>new Promise((u)=>setTimeout(u,_)),Q_=(_)=>typeof _.acquireInitialRetryToken<"u"&&typeof _.refreshRetryTokenForRetry<"u"&&typeof _.recordSuccess<"u",c_=(_,u)=>{let E={error:_,errorType:w_(_)},O=u_(_.$response,u);if(O)E.retryAfterHint=O;return E},w_=(_)=>{if(J(_))return"THROTTLING";if(X(_))return"TRANSIENT";if(a(_))return"SERVER_ERROR";return"CLIENT_ERROR"},b_={name:"retryMiddleware",tags:["RETRY"],step:"finalizeRequest",priority:"high",override:!0};function B_(_){let u=O_(_);return(E)=>({applyToStack:(O)=>{O.add(u(E),b_)}})}class C{static setTimeoutFn=setTimeout;beta;minCapacity;minFillRate;scaleConstant;smooth;enabled=!1;availableTokens=0;lastMaxRate=0;measuredTxRate=0;requestCount=0;fillRate;lastThrottleTime;lastTimestamp=0;lastTxRateBucket;maxCapacity;timeWindow=0;constructor(_){this.beta=_?.beta??0.7,this.minCapacity=_?.minCapacity??1,this.minFillRate=_?.minFillRate??0.5,this.scaleConstant=_?.scaleConstant??0.4,this.smooth=_?.smooth??0.8,this.lastThrottleTime=this.getCurrentTimeInSeconds(),this.lastTxRateBucket=Math.floor(this.getCurrentTimeInSeconds()),this.fillRate=this.minFillRate,this.maxCapacity=this.minCapacity}async getSendToken(){return this.acquireTokenBucket(1)}updateClientSendingRate(_){let u;this.updateMeasuredRate();let E=_;if(E?.errorType==="THROTTLING"||J(E?.error??_)){let b=!this.enabled?this.measuredTxRate:Math.min(this.measuredTxRate,this.fillRate);this.lastMaxRate=b,this.calculateTimeWindow(),this.lastThrottleTime=this.getCurrentTimeInSeconds(),u=this.cubicThrottle(b),this.enableTokenBucket()}else this.calculateTimeWindow(),u=this.cubicSuccess(this.getCurrentTimeInSeconds());let T=Math.min(u,2*this.measuredTxRate);this.updateTokenBucketRate(T)}getCurrentTimeInSeconds(){return Date.now()/1000}async acquireTokenBucket(_){if(!this.enabled)return;this.refillTokenBucket();while(_>this.availableTokens){let u=(_-this.availableTokens)/this.fillRate*1000;await new Promise((E)=>C.setTimeoutFn(E,u)),this.refillTokenBucket()}this.availableTokens=this.availableTokens-_}refillTokenBucket(){let _=this.getCurrentTimeInSeconds();if(!this.lastTimestamp){this.lastTimestamp=_;return}let u=(_-this.lastTimestamp)*this.fillRate;this.availableTokens=Math.min(this.maxCapacity,this.availableTokens+u),this.lastTimestamp=_}calculateTimeWindow(){this.timeWindow=this.getPrecise(Math.pow(this.lastMaxRate*(1-this.beta)/this.scaleConstant,0.3333333333333333))}cubicThrottle(_){return this.getPrecise(_*this.beta)}cubicSuccess(_){return this.getPrecise(this.scaleConstant*Math.pow(_-this.lastThrottleTime-this.timeWindow,3)+this.lastMaxRate)}enableTokenBucket(){this.enabled=!0}updateTokenBucketRate(_){this.refillTokenBucket(),this.fillRate=Math.max(_,this.minFillRate),this.maxCapacity=Math.max(_,this.minCapacity),this.availableTokens=Math.min(this.availableTokens,this.maxCapacity)}updateMeasuredRate(){let _=this.getCurrentTimeInSeconds(),u=Math.floor(_*2)/2;if(this.requestCount++,u>this.lastTxRateBucket){let E=this.requestCount/(u-this.lastTxRateBucket);this.measuredTxRate=this.getPrecise(E*this.smooth+this.measuredTxRate*(1-this.smooth)),this.requestCount=0,this.lastTxRateBucket=u}}getPrecise(_){return parseFloat(_.toFixed(8))}}class M{static v2026=typeof process<"u"&&process.env?.SMITHY_NEW_RETRIES_2026==="true";static delay(){return M.v2026?50:100}static throttlingDelay(){return M.v2026?1000:500}static cost(){return M.v2026?14:5}static throttlingCost(){return M.v2026?5:10}static modifiedCostType(){return M.v2026?"THROTTLING":"TRANSIENT"}}class T_{x=M.delay();computeNextBackoffDelay(_){let u=Math.random(),E=2,O=u*Math.min(this.x*2**_,Q);return Math.floor(O)}setDelayBase(_){this.x=_}}class h{delay;count;cost;longPoll;constructor(_,u,E,O){this.delay=_,this.count=u,this.cost=E,this.longPoll=O}getRetryCount(){return this.count}getRetryDelay(){return Math.min(Q,this.delay)}getRetryCost(){return this.cost}isLongPoll(){return this.longPoll}}k_.RETRY_MODES=void 0;(function(_){_.STANDARD="standard",_.ADAPTIVE="adaptive"})(k_.RETRY_MODES||(k_.RETRY_MODES={}));var $=3,Y_=k_.RETRY_MODES.STANDARD,d={incompatible:1,attempts:2,capacity:3},G=class{mode=k_.RETRY_MODES.STANDARD;capacity=Z;retryBackoffStrategy;maxAttemptsProvider;baseDelay;constructor(u){if(typeof u==="number")this.maxAttemptsProvider=async()=>u;else if(typeof u==="function")this.maxAttemptsProvider=u;else if(u&&typeof u==="object")this.maxAttemptsProvider=async()=>u.maxAttempts,this.baseDelay=u.baseDelay,this.retryBackoffStrategy=u.backoff;this.maxAttemptsProvider??=async()=>$,this.baseDelay??=M.delay(),this.retryBackoffStrategy??=new T_}async acquireInitialRetryToken(u){return new h(M.delay(),0,void 0,M.v2026&&u.includes(":longpoll"))}async refreshRetryTokenForRetry(u,E){let O=await this.getMaxAttempts(),T=this.retryCode(u,E,O),b=T===0,L=u.isLongPoll?.();if(b||L){let N=E.errorType;this.retryBackoffStrategy.setDelayBase(N==="THROTTLING"?M.throttlingDelay():this.baseDelay);let j=this.retryBackoffStrategy.computeNextBackoffDelay(u.getRetryCount()),Y=j;if(E.retryAfterHint instanceof Date)Y=Math.max(j,Math.min(E.retryAfterHint.getTime()-Date.now(),j+5000));if(!b)throw Object.assign(Error("No retry token available"),{$backoff:M.v2026&&T===d.capacity&&L?Y:0});else{let F=this.getCapacityCost(N);return this.capacity-=F,new h(Y,u.getRetryCount()+1,F,u.isLongPoll?.()??!1)}}throw Error("No retry token available")}recordSuccess(u){this.capacity=Math.min(Z,this.capacity+(u.getRetryCost()??g))}getCapacity(){return this.capacity}async maxAttempts(){return this.maxAttemptsProvider()}async getMaxAttempts(){try{return await this.maxAttemptsProvider()}catch(u){return console.warn(`Max attempts provider could not resolve. Using default of ${$}`),$}}retryCode(u,E,O){let T=u.getRetryCount()+1,b=this.isRetryableError(E.errorType)?0:d.incompatible,L=T<O?0:d.attempts,N=this.capacity>=this.getCapacityCost(E.errorType)?0:d.capacity;return b||L||N}getCapacityCost(u){return u===M.modifiedCostType()?M.throttlingCost():M.cost()}isRetryableError(u){return u==="THROTTLING"||u==="TRANSIENT"}},j_=class{mode=k_.RETRY_MODES.ADAPTIVE;rateLimiter;standardRetryStrategy;constructor(u,E){let{rateLimiter:O}=E??{};this.rateLimiter=O??new C,this.standardRetryStrategy=E?new G({maxAttempts:typeof u==="number"?u:3,...E}):new G(u)}async acquireInitialRetryToken(u){let E=await this.standardRetryStrategy.acquireInitialRetryToken(u);return await this.rateLimiter.getSendToken(),E}async refreshRetryTokenForRetry(u,E){this.rateLimiter.updateClientSendingRate(E);let O=await this.standardRetryStrategy.refreshRetryTokenForRetry(u,E);return await this.rateLimiter.getSendToken(),O}recordSuccess(u){this.rateLimiter.updateClientSendingRate({}),this.standardRetryStrategy.recordSuccess(u)}async maxAttemptsProvider(){return this.standardRetryStrategy.maxAttempts()}};class P_ extends G{computeNextBackoffDelay;constructor(_,u=M.delay()){super(typeof _==="function"?_:async()=>_);if(typeof u==="number")this.computeNextBackoffDelay=()=>u;else this.computeNextBackoffDelay=u}async refreshRetryTokenForRetry(_,u){let E=await super.refreshRetryTokenForRetry(_,u);return E.getRetryDelay=()=>this.computeNextBackoffDelay(E.getRetryCount()),E}}var v_=(_,u)=>{let E=_,O=g,T=r,b=__,L=_,N=(I)=>I.name==="TimeoutError"?b:T,j=(I)=>N(I)<=L;return Object.freeze({hasRetryTokens:j,retrieveRetryTokens:(I)=>{if(!j(I))throw Error("No retry token available");let R=N(I);return L-=R,R},releaseRetryTokens:(I)=>{L+=I??O,L=Math.min(L,E)}})},L_=(_,u)=>Math.floor(Math.min(Q,Math.random()*2**u*_)),N_=(_)=>{if(!_)return!1;return A(_)||p(_)||J(_)||X(_)};class n{maxAttemptsProvider;retryDecider;delayDecider;retryQuota;mode=k_.RETRY_MODES.STANDARD;constructor(_,u){this.maxAttemptsProvider=_,this.retryDecider=u?.retryDecider??N_,this.delayDecider=u?.delayDecider??L_,this.retryQuota=u?.retryQuota??v_(Z)}shouldRetry(_,u,E){return u<E&&this.retryDecider(_)&&this.retryQuota.hasRetryTokens(_)}async getMaxAttempts(){let _;try{_=await this.maxAttemptsProvider()}catch(u){_=$}return _}async retry(_,u,E){let O,T=0,b=0,L=await this.getMaxAttempts(),{request:N}=u;if(K.HttpRequest.isInstance(N))N.headers[c]=q.v4();while(!0)try{if(K.HttpRequest.isInstance(N))N.headers[w]=`attempt=${T+1}; max=${L}`;if(E?.beforeRequest)await E.beforeRequest();let{response:j,output:Y}=await _(u);if(E?.afterRequest)E.afterRequest(j);return this.retryQuota.releaseRetryTokens(O),Y.$metadata.attempts=T+1,Y.$metadata.totalRetryDelay=b,{response:j,output:Y}}catch(j){let Y=E_(j);if(T++,this.shouldRetry(Y,T,L)){O=this.retryQuota.retrieveRetryTokens(Y);let F=this.delayDecider(J(Y)?t:e,T),I=h_(Y.$response),R=Math.max(I||0,F);b+=R,await new Promise((V)=>setTimeout(V,R));continue}if(!Y.$metadata)Y.$metadata={};throw Y.$metadata.attempts=T,Y.$metadata.totalRetryDelay=b,Y}}}var h_=(_)=>{if(!K.HttpResponse.isInstance(_))return;let u=Object.keys(_.headers).find((b)=>b.toLowerCase()==="retry-after");if(!u)return;let E=_.headers[u],O=Number(E);if(!Number.isNaN(O))return O*1000;return new Date(E).getTime()-Date.now()};class M_ extends n{rateLimiter;constructor(_,u){let{rateLimiter:E,...O}=u??{};super(_,O);this.rateLimiter=E??new C,this.mode=k_.RETRY_MODES.ADAPTIVE}async retry(_,u){return super.retry(_,u,{beforeRequest:async()=>{return this.rateLimiter.getSendToken()},afterRequest:(E)=>{this.rateLimiter.updateClientSendingRate(E)}})}}var S="AWS_MAX_ATTEMPTS",i="max_attempts",S_={environmentVariableSelector:(_)=>{let u=_[S];if(!u)return;let E=parseInt(u);if(Number.isNaN(E))throw Error(`Environment variable ${S} mast be a number, got "${u}"`);return E},configFileSelector:(_)=>{let u=_[i];if(!u)return;let E=parseInt(u);if(Number.isNaN(E))throw Error(`Shared config file entry ${i} mast be a number, got "${u}"`);return E},default:$},i_=(_)=>{let{retryStrategy:u,retryMode:E}=_,O=v.normalizeProvider(_.maxAttempts??$),T=u?Promise.resolve(u):void 0,b=async()=>await v.normalizeProvider(E)()===k_.RETRY_MODES.ADAPTIVE?new j_(O):new G(O);return Object.assign(_,{maxAttempts:O,retryStrategy:()=>T??=b()})},U_="AWS_RETRY_MODE",I_="retry_mode",q_={environmentVariableSelector:(_)=>_[U_],configFileSelector:(_)=>_[I_],default:Y_},F_=()=>(_)=>async(u)=>{let{request:E}=u;if(K.HttpRequest.isInstance(E))delete E.headers[c],delete E.headers[w];return _(u)},R_={name:"omitRetryHeadersMiddleware",tags:["RETRY","HEADERS","OMIT_RETRY_HEADERS"],relation:"before",toMiddleware:"awsAuthMiddleware",override:!0},A_=(_)=>({applyToStack:(u)=>{u.addRelativeTo(F_(),R_)}}),g_=O_(m),n_=B_(m);k_.AdaptiveRetryStrategy=j_;k_.CONFIG_MAX_ATTEMPTS=i;k_.CONFIG_RETRY_MODE=I_;k_.ConfiguredRetryStrategy=P_;k_.DEFAULT_MAX_ATTEMPTS=$;k_.DEFAULT_RETRY_DELAY_BASE=e;k_.DEFAULT_RETRY_MODE=Y_;k_.DefaultRateLimiter=C;k_.DeprecatedAdaptiveRetryStrategy=M_;k_.DeprecatedStandardRetryStrategy=n;k_.ENV_MAX_ATTEMPTS=S;k_.ENV_RETRY_MODE=U_;k_.INITIAL_RETRY_TOKENS=Z;k_.INVOCATION_ID_HEADER=c;k_.MAXIMUM_RETRY_DELAY=Q;k_.NODE_MAX_ATTEMPT_CONFIG_OPTIONS=S_;k_.NODE_RETRY_MODE_CONFIG_OPTIONS=q_;k_.NO_RETRY_INCREMENT=g;k_.REQUEST_HEADER=w;k_.RETRY_COST=r;k_.Retry=M;k_.StandardRetryStrategy=G;k_.THROTTLING_RETRY_DELAY_BASE=t;k_.TIMEOUT_RETRY_COST=__;k_.defaultDelayDecider=L_;k_.defaultRetryDecider=N_;k_.getOmitRetryHeadersPlugin=A_;k_.getRetryAfterHint=H_;k_.getRetryPlugin=n_;k_.isBrowserNetworkError=s;k_.isClockSkewCorrectedError=y;k_.isClockSkewError=p;k_.isNodeJsHttp2TransientError=o;k_.isRetryableByTrait=A;k_.isServerError=a;k_.isThrottlingError=J;k_.isTransientError=X;k_.omitRetryHeadersMiddleware=F_;k_.omitRetryHeadersMiddlewareOptions=R_;k_.resolveRetryConfig=i_;k_.retryMiddleware=g_;k_.retryMiddlewareOptions=b_});var D_=H((P)=>{Object.defineProperty(P,"__esModule",{value:!0});P.TIMEOUT_RETRY_COST=P.THROTTLING_RETRY_DELAY_BASE=P.Retry=P.RETRY_MODES=P.RETRY_COST=P.NO_RETRY_INCREMENT=P.REQUEST_HEADER=P.MAXIMUM_RETRY_DELAY=P.INVOCATION_ID_HEADER=P.INITIAL_RETRY_TOKENS=P.DEFAULT_RETRY_MODE=P.DEFAULT_RETRY_DELAY_BASE=P.DEFAULT_MAX_ATTEMPTS=P.StandardRetryStrategy=P.DefaultRateLimiter=P.ConfiguredRetryStrategy=P.AdaptiveRetryStrategy=void 0;var U=W_();Object.defineProperty(P,"AdaptiveRetryStrategy",{enumerable:!0,get:function(){return U.AdaptiveRetryStrategy}});Object.defineProperty(P,"ConfiguredRetryStrategy",{enumerable:!0,get:function(){return U.ConfiguredRetryStrategy}});Object.defineProperty(P,"DefaultRateLimiter",{enumerable:!0,get:function(){return U.DefaultRateLimiter}});Object.defineProperty(P,"StandardRetryStrategy",{enumerable:!0,get:function(){return U.StandardRetryStrategy}});Object.defineProperty(P,"DEFAULT_MAX_ATTEMPTS",{enumerable:!0,get:function(){return U.DEFAULT_MAX_ATTEMPTS}});Object.defineProperty(P,"DEFAULT_RETRY_DELAY_BASE",{enumerable:!0,get:function(){return U.DEFAULT_RETRY_DELAY_BASE}});Object.defineProperty(P,"DEFAULT_RETRY_MODE",{enumerable:!0,get:function(){return U.DEFAULT_RETRY_MODE}});Object.defineProperty(P,"INITIAL_RETRY_TOKENS",{enumerable:!0,get:function(){return U.INITIAL_RETRY_TOKENS}});Object.defineProperty(P,"INVOCATION_ID_HEADER",{enumerable:!0,get:function(){return U.INVOCATION_ID_HEADER}});Object.defineProperty(P,"MAXIMUM_RETRY_DELAY",{enumerable:!0,get:function(){return U.MAXIMUM_RETRY_DELAY}});Object.defineProperty(P,"REQUEST_HEADER",{enumerable:!0,get:function(){return U.REQUEST_HEADER}});Object.defineProperty(P,"NO_RETRY_INCREMENT",{enumerable:!0,get:function(){return U.NO_RETRY_INCREMENT}});Object.defineProperty(P,"RETRY_COST",{enumerable:!0,get:function(){return U.RETRY_COST}});Object.defineProperty(P,"RETRY_MODES",{enumerable:!0,get:function(){return U.RETRY_MODES}});Object.defineProperty(P,"Retry",{enumerable:!0,get:function(){return U.Retry}});Object.defineProperty(P,"THROTTLING_RETRY_DELAY_BASE",{enumerable:!0,get:function(){return U.THROTTLING_RETRY_DELAY_BASE}});Object.defineProperty(P,"TIMEOUT_RETRY_COST",{enumerable:!0,get:function(){return U.TIMEOUT_RETRY_COST}})});var yu=H((gu)=>{var wu=D_(),B={warningEmitted:!1},Bu=(_)=>{if(_&&!B.warningEmitted){if(process.env.AWS_SDK_JS_NODE_VERSION_SUPPORT_WARNING_DISABLED==="true"){B.warningEmitted=!0;return}let u=parseInt(_.substring(1,_.indexOf("."))),E=22;if(u<E)B.warningEmitted=!0,process.emitWarning(`NodeVersionSupportWarning: The AWS SDK for JavaScript (v3)
2
+ versions published after the first week of January 2027
3
+ will require node >=${E}. You are running node ${_}.
4
+
5
+ To continue receiving updates to AWS services, bug fixes,
6
+ and security updates please upgrade to node >=${E}.
7
+
8
+ More information can be found at: https://a.co/c895JFp`)}},vu=()=>(_,u)=>async(E)=>{return u.__retryLongPoll=!0,_(E)},hu={name:"longPollMiddleware",tags:["RETRY"],step:"initialize",override:!0},Su=(_)=>({applyToStack:(u)=>{u.add(vu(),hu)}});function iu(_,u,E){if(!_.$source)_.$source={};return _.$source[u]=E,_}wu.Retry.v2026||=typeof process==="object"&&process.env?.AWS_NEW_RETRIES_2026==="true";function qu(_,u,E){if(!_.__aws_sdk_context)_.__aws_sdk_context={features:{}};else if(!_.__aws_sdk_context.features)_.__aws_sdk_context.features={};_.__aws_sdk_context.features[u]=E}function Au(_,u,E){if(!_.$source)_.$source={};return _.$source[u]=E,_}gu.emitWarningIfUnsupportedVersion=Bu;gu.getLongPollPlugin=Su;gu.setCredentialFeature=iu;gu.setFeature=qu;gu.setTokenFeature=Au;gu.state=B});var ou=H((D)=>{Object.defineProperty(D,"__esModule",{value:!0});D.memoize=D.fromStatic=D.chain=D.TokenProviderError=D.CredentialsProviderError=D.ProviderError=void 0;var f=su();Object.defineProperty(D,"ProviderError",{enumerable:!0,get:function(){return f.ProviderError}});Object.defineProperty(D,"CredentialsProviderError",{enumerable:!0,get:function(){return f.CredentialsProviderError}});Object.defineProperty(D,"TokenProviderError",{enumerable:!0,get:function(){return f.TokenProviderError}});Object.defineProperty(D,"chain",{enumerable:!0,get:function(){return f.chain}});Object.defineProperty(D,"fromStatic",{enumerable:!0,get:function(){return f.fromValue}});Object.defineProperty(D,"memoize",{enumerable:!0,get:function(){return f.memoize}})});
9
+ export{W_ as p8,D_ as q8,yu as r8,ou as s8};