@unieai/code 0.0.9 → 0.0.11

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 (486) hide show
  1. package/README.en.md +67 -160
  2. package/README.md +53 -146
  3. package/dist/chunks/App-s5ex5j86.js +2 -0
  4. package/dist/chunks/ApproveApiKey-b4z6h2gn.js +2 -0
  5. package/dist/chunks/{assistant-yvtpv5sv.js → AssistantSessionChooser-g1vsya6h.js} +1 -1
  6. package/dist/chunks/BypassPermissionsModeDialog-jbg97eja.js +2 -0
  7. package/dist/chunks/ClaudeInChromeOnboarding-qa0pvwfw.js +2 -0
  8. package/dist/chunks/ClaudeMdExternalIncludesDialog-gqmed78y.js +2 -0
  9. package/dist/chunks/ConsoleOAuthFlow-yh72vs8j.js +2 -0
  10. package/dist/chunks/{DiffDialog-v8smgzpd.js → DiffDialog-t6vvtbb2.js} +1 -1
  11. package/dist/chunks/Doctor-k08ggw2j.js +2 -0
  12. package/dist/chunks/Grove-tkkskg8n.js +2 -0
  13. package/dist/chunks/ITermBackend-73waaahf.js +2 -0
  14. package/dist/chunks/{InProcessTransport-57c2w5v4.js → InProcessTransport-qwjgb17j.js} +1 -1
  15. package/dist/chunks/InvalidConfigDialog-zmqw3fj1.js +2 -0
  16. package/dist/chunks/InvalidSettingsDialog-tnd5hymg.js +2 -0
  17. package/dist/chunks/Onboarding-p0tq6pgz.js +2 -0
  18. package/dist/chunks/REPL-hjjz80kq.js +2 -0
  19. package/dist/chunks/ResumeConversation-krn9hqb1.js +2 -0
  20. package/dist/chunks/{SnapshotUpdateDialog-5yvfnp0q.js → SnapshotUpdateDialog-raq029pd.js} +1 -1
  21. package/dist/chunks/TeleportProgress-vyy2k3bv.js +2 -0
  22. package/dist/chunks/TeleportRepoMismatchDialog-ff0h2cnq.js +2 -0
  23. package/dist/chunks/TeleportResumeWrapper-esjykret.js +2 -0
  24. package/dist/chunks/{TmuxBackend-j665sv6f.js → TmuxBackend-14kmnkcb.js} +1 -1
  25. package/dist/chunks/ToolSearchTool-w4t61c7d.js +2 -0
  26. package/dist/chunks/TrustDialog-7fvaze2x.js +2 -0
  27. package/dist/chunks/TungstenTool-rv96z549.js +2 -0
  28. package/dist/chunks/add-dir-kqw72mky.js +2 -0
  29. package/dist/chunks/agents-3exybgtb.js +4 -0
  30. package/dist/chunks/{agents-e7x38q37.js → agents-z66twpqr.js} +1 -1
  31. package/dist/chunks/ant-claude-for-chrome-mcp-712xg07f.js +2 -0
  32. package/dist/chunks/api-z8svc3xt.js +2 -0
  33. package/dist/chunks/asciicast-vzd7qjbb.js +2 -0
  34. package/dist/chunks/{AssistantSessionChooser-0r5zamt1.js → assistant-ftzr3mjp.js} +1 -1
  35. package/dist/chunks/auth-gbyfq0g2.js +2 -0
  36. package/dist/chunks/auth-wk077awh.js +2 -0
  37. package/dist/chunks/backgroundHousekeeping-m8gthtkh.js +2 -0
  38. package/dist/chunks/branch-1d0b8590.js +5 -0
  39. package/dist/chunks/{bridgePointer-9q6wh2ct.js → bridgePointer-vhd47np6.js} +1 -1
  40. package/dist/chunks/btw-s3r5jhyd.js +2 -0
  41. package/dist/chunks/buddy-xzm5npk8.js +2 -0
  42. package/dist/chunks/{cachedMicrocompact-thnhx1zt.js → cachedMicrocompact-6j3zxr4g.js} +1 -1
  43. package/dist/chunks/caches-fbggdeq7.js +2 -0
  44. package/dist/chunks/chrome-mdyx0s5j.js +2 -0
  45. package/dist/chunks/{chromeNativeHost-nnjkj164.js → chromeNativeHost-8wc6wcr6.js} +1 -1
  46. package/dist/chunks/{claudeDesktop-nsangyk5.js → claudeDesktop-p5bfxmvz.js} +1 -1
  47. package/dist/chunks/{cleanup-mv462dsh.js → cleanup-q46nbce1.js} +1 -1
  48. package/dist/chunks/clear-fwad6zxy.js +2 -0
  49. package/dist/chunks/{cli-sbp2221d.js → cli-0dc8sd37.js} +2 -2
  50. package/dist/chunks/{cli-3xhqacdd.js → cli-0qt9btbe.js} +2 -2
  51. package/dist/chunks/{cli-4j5yyvek.js → cli-0w4wc1z0.js} +2 -2
  52. package/dist/chunks/{cli-r6hm1q63.js → cli-15sqp3mq.js} +2 -2
  53. package/dist/chunks/{cli-45ftgn85.js → cli-15w3eaed.js} +1 -1
  54. package/dist/chunks/{cli-b7wx1479.js → cli-19ncan36.js} +1 -1
  55. package/dist/chunks/{cli-hx28w3cq.js → cli-1jp3rm7n.js} +1 -1
  56. package/dist/chunks/{cli-90b87f45.js → cli-1n8he7s8.js} +2 -2
  57. package/dist/chunks/{cli-bthzmdgv.js → cli-1ny2386w.js} +2 -2
  58. package/dist/chunks/{cli-vq899n8p.js → cli-27mzrnr8.js} +1 -1
  59. package/dist/chunks/{cli-gnjff7md.js → cli-2rw44zfx.js} +2 -2
  60. package/dist/chunks/{cli-7gpep1x5.js → cli-2rwjx3w0.js} +1 -1
  61. package/dist/chunks/{cli-jqppy97b.js → cli-2wd8eaac.js} +2 -2
  62. package/dist/chunks/{cli-3hwpymrd.js → cli-350pymj4.js} +2 -2
  63. package/dist/chunks/{cli-w754xmyv.js → cli-3ac555qw.js} +2 -2
  64. package/dist/chunks/{cli-8kyjh67j.js → cli-3gwqrmcd.js} +1 -1
  65. package/dist/chunks/{cli-msr9n6da.js → cli-3m8n808e.js} +2 -2
  66. package/dist/chunks/{cli-ptv3h2tx.js → cli-42kma5r3.js} +1 -1
  67. package/dist/chunks/{cli-r9p0g894.js → cli-49m97nbg.js} +2 -2
  68. package/dist/chunks/{cli-bkxwwj81.js → cli-4a4bb1kf.js} +1 -1
  69. package/dist/chunks/{cli-3bxtq5dc.js → cli-4ewb3q42.js} +2 -2
  70. package/dist/chunks/{cli-v3mf1g0z.js → cli-4mvvtchx.js} +2 -2
  71. package/dist/chunks/{cli-r2p5bkx5.js → cli-4nejhkd0.js} +2 -2
  72. package/dist/chunks/{cli-dx46fn1w.js → cli-51720d82.js} +2 -2
  73. package/dist/chunks/cli-55jdp9ky.js +3 -0
  74. package/dist/chunks/{cli-6vwdnz9p.js → cli-55ntywtj.js} +1 -1
  75. package/dist/chunks/{cli-pz8vxqw0.js → cli-57yrpnaq.js} +2 -2
  76. package/dist/chunks/{cli-59ysj9y4.js → cli-5dt9yjha.js} +2 -2
  77. package/dist/chunks/{cli-e37w9dxm.js → cli-5f0w3fy6.js} +1 -1
  78. package/dist/chunks/{cli-z9jm4xjn.js → cli-5vsnhp97.js} +2 -2
  79. package/dist/chunks/{cli-x758qvv7.js → cli-61x73ksv.js} +1 -1
  80. package/dist/chunks/{cli-ye3qk73s.js → cli-66jj9zj3.js} +1 -1
  81. package/dist/chunks/{cli-zac1afnb.js → cli-6bxfdgv1.js} +1 -1
  82. package/dist/chunks/{cli-md1h6sbv.js → cli-6pdpyz1a.js} +1 -1
  83. package/dist/chunks/{cli-mejr8b5m.js → cli-6yprtw88.js} +2 -2
  84. package/dist/chunks/{cli-qs0v3mf6.js → cli-73jf8hyz.js} +2 -2
  85. package/dist/chunks/{cli-948we41z.js → cli-749tdaqc.js} +2 -2
  86. package/dist/chunks/{cli-vxxkrd5y.js → cli-764c4bsm.js} +2 -2
  87. package/dist/chunks/cli-78apjp3t.js +3 -0
  88. package/dist/chunks/{cli-k0jpcxwa.js → cli-7c99j0pt.js} +2 -2
  89. package/dist/chunks/{cli-by5b2216.js → cli-89x414pj.js} +2 -2
  90. package/dist/chunks/{cli-fqb71hy3.js → cli-8dmy2s42.js} +1 -1
  91. package/dist/chunks/cli-8hxz2qs6.js +3 -0
  92. package/dist/chunks/cli-8mk2zg4a.js +4 -0
  93. package/dist/chunks/{cli-29gcax34.js → cli-8qd16mt4.js} +2 -2
  94. package/dist/chunks/cli-95wg48h9.js +3 -0
  95. package/dist/chunks/{cli-wz9r5s81.js → cli-99mqr54v.js} +2 -2
  96. package/dist/chunks/{cli-8qk46mt3.js → cli-9aq7vxaq.js} +1 -1
  97. package/dist/chunks/{cli-zcpjf07m.js → cli-9z9r2set.js} +2 -2
  98. package/dist/chunks/{cli-2wvsym16.js → cli-a52ra30v.js} +1 -1
  99. package/dist/chunks/{cli-s6qk3rbv.js → cli-akcxtvv9.js} +2 -2
  100. package/dist/chunks/{cli-h3kcprht.js → cli-bmk0rb5v.js} +2 -2
  101. package/dist/chunks/{cli-pmzht94n.js → cli-br6zjh6x.js} +2 -2
  102. package/dist/chunks/{cli-z8hqtyjg.js → cli-c22wpdk4.js} +1 -1
  103. package/dist/chunks/{cli-zbt28krs.js → cli-c60c9qvm.js} +1 -1
  104. package/dist/chunks/{cli-3357rxva.js → cli-cqkne34j.js} +2 -2
  105. package/dist/chunks/{cli-0s65jzgr.js → cli-cwbxhdt1.js} +1 -1
  106. package/dist/chunks/{cli-xsap3gxj.js → cli-d0hzw78c.js} +1 -1
  107. package/dist/chunks/{cli-0b4dmvvw.js → cli-d53fhs6v.js} +2 -2
  108. package/dist/chunks/{cli-extf4h54.js → cli-dbdqrqmt.js} +1 -1
  109. package/dist/chunks/{cli-yf3sh3aw.js → cli-de1hwp88.js} +1 -1
  110. package/dist/chunks/cli-edkqs0ge.js +3 -0
  111. package/dist/chunks/{cli-dsnjsvqs.js → cli-er7z496e.js} +2 -2
  112. package/dist/chunks/{cli-atpfeg28.js → cli-eyw3czmn.js} +2 -2
  113. package/dist/chunks/{cli-tyxvdf66.js → cli-ezs5sney.js} +2 -2
  114. package/dist/chunks/{cli-tn47e131.js → cli-f63fdj4w.js} +2 -2
  115. package/dist/chunks/cli-fakdskp6.js +3 -0
  116. package/dist/chunks/{cli-nj726gac.js → cli-fdya77ch.js} +3 -3
  117. package/dist/chunks/{cli-b1dptek2.js → cli-fghyxar5.js} +2 -2
  118. package/dist/chunks/{cli-g1spmn9n.js → cli-fm14mg07.js} +1 -1
  119. package/dist/chunks/{cli-cr1hvkmz.js → cli-fs7yttfp.js} +2 -2
  120. package/dist/chunks/{cli-rcvta3zk.js → cli-fwrj8ybs.js} +2 -2
  121. package/dist/chunks/{cli-v77avvvk.js → cli-g4n9das2.js} +1 -1
  122. package/dist/chunks/{cli-cbdrqqf2.js → cli-g5wq5ptg.js} +2 -2
  123. package/dist/chunks/{cli-yrk194b9.js → cli-gq5fve62.js} +1 -1
  124. package/dist/chunks/{cli-nykt265k.js → cli-grxvgq2n.js} +1 -1
  125. package/dist/chunks/{cli-ffjjv4j8.js → cli-gtm212j6.js} +2 -2
  126. package/dist/chunks/{cli-skq9ktf8.js → cli-gxgdnjfn.js} +1 -1
  127. package/dist/chunks/{cli-x5z5m6y7.js → cli-h120wpk2.js} +1 -1
  128. package/dist/chunks/{cli-58t6a5n6.js → cli-h4a90xbh.js} +1 -1
  129. package/dist/chunks/cli-h4dspaac.js +3 -0
  130. package/dist/chunks/{cli-a98b285v.js → cli-hke6r0q8.js} +2 -2
  131. package/dist/chunks/{cli-jxwm52wg.js → cli-hzr2zraz.js} +1 -1
  132. package/dist/chunks/{cli-x4a9geyz.js → cli-j08dmxw5.js} +1 -1
  133. package/dist/chunks/{cli-jvs98a70.js → cli-ja540nr7.js} +1 -1
  134. package/dist/chunks/{cli-dr1ph0pp.js → cli-jegyadmb.js} +2 -2
  135. package/dist/chunks/{cli-xjx11p6m.js → cli-jgn9jprh.js} +2 -2
  136. package/dist/chunks/{cli-n3m134cf.js → cli-jj93qmmc.js} +2 -2
  137. package/dist/chunks/{cli-kje3t5yg.js → cli-jkj867t1.js} +3 -3
  138. package/dist/chunks/{cli-6he3kpeb.js → cli-k2nh5cby.js} +2 -2
  139. package/dist/chunks/{cli-3je4vtx7.js → cli-k4v08k8t.js} +2 -2
  140. package/dist/chunks/{cli-c2pn6csk.js → cli-khs3sj9k.js} +1 -1
  141. package/dist/chunks/{cli-shz2e0q5.js → cli-kq16afrr.js} +2 -2
  142. package/dist/chunks/{cli-2zh6c5xz.js → cli-kqv5b8zh.js} +1 -1
  143. package/dist/chunks/{cli-k8fd74g6.js → cli-m0z3rmf0.js} +2 -2
  144. package/dist/chunks/{cli-a72n4ej7.js → cli-m12smc5e.js} +1 -1
  145. package/dist/chunks/{cli-15zbq52w.js → cli-m8fq163z.js} +1 -1
  146. package/dist/chunks/{cli-1215h20m.js → cli-mb1qrqw1.js} +2 -2
  147. package/dist/chunks/{cli-50wh7ttg.js → cli-mbp8f3f3.js} +2 -2
  148. package/dist/chunks/{cli-5pb6kdxn.js → cli-me4e2p3e.js} +595 -595
  149. package/dist/chunks/{cli-vz1j9n38.js → cli-mj03488e.js} +2 -2
  150. package/dist/chunks/{cli-6dcra6rs.js → cli-ms5j6fff.js} +2 -2
  151. package/dist/chunks/{cli-0v6qg4zv.js → cli-msgx4pnp.js} +2 -2
  152. package/dist/chunks/cli-msmzt4c3.js +130 -0
  153. package/dist/chunks/{cli-h5yfk29j.js → cli-msw0vv86.js} +2 -2
  154. package/dist/chunks/{cli-ewts4g0p.js → cli-mzcsnm06.js} +2 -2
  155. package/dist/chunks/{cli-wr4k6ngg.js → cli-n5s5fnyj.js} +2 -2
  156. package/dist/chunks/{cli-ygq3fy9g.js → cli-ns0aaggm.js} +1 -1
  157. package/dist/chunks/{cli-1a2nss2m.js → cli-nvnj7r73.js} +1 -1
  158. package/dist/chunks/{cli-hpzy0mat.js → cli-p0vh69b9.js} +2 -2
  159. package/dist/chunks/{cli-zf7yzkn6.js → cli-p2cqnrnp.js} +2 -2
  160. package/dist/chunks/{cli-px7jhzgq.js → cli-pbc8sk2d.js} +2 -2
  161. package/dist/chunks/{cli-29078yxj.js → cli-pgg33dhw.js} +2 -2
  162. package/dist/chunks/cli-przq3zk6.js +3 -0
  163. package/dist/chunks/{cli-q9fn82b1.js → cli-q0156x0d.js} +2 -2
  164. package/dist/chunks/{cli-zdy5bccv.js → cli-q46epwyh.js} +1 -1
  165. package/dist/chunks/{cli-v8w48y51.js → cli-qaxvg7gv.js} +1 -1
  166. package/dist/chunks/{cli-ytj910yt.js → cli-qm684n63.js} +1 -1
  167. package/dist/chunks/{cli-2qec7gn4.js → cli-r3etpht1.js} +1 -1
  168. package/dist/chunks/{cli-amy2yafd.js → cli-r83ttew2.js} +2 -2
  169. package/dist/chunks/{cli-22zbzzap.js → cli-r9db9mqv.js} +1 -1
  170. package/dist/chunks/{cli-3q7meftn.js → cli-rjerv816.js} +2 -2
  171. package/dist/chunks/{cli-mx6xk0dw.js → cli-rvad3yhg.js} +2 -2
  172. package/dist/chunks/{cli-wfqsfwa2.js → cli-rxb5q8zw.js} +2 -2
  173. package/dist/chunks/{cli-7cn4gwqc.js → cli-s160fqyz.js} +2 -2
  174. package/dist/chunks/{cli-v2hg35qk.js → cli-s6vr7213.js} +2 -2
  175. package/dist/chunks/{cli-49dqgzsg.js → cli-s9fhtgmz.js} +2 -2
  176. package/dist/chunks/{cli-tezq577c.js → cli-scaqq0v9.js} +2 -2
  177. package/dist/chunks/{cli-15tr7ade.js → cli-sh9w2tbd.js} +1 -1
  178. package/dist/chunks/{cli-zd2e6bq1.js → cli-sycqd3xe.js} +4 -4
  179. package/dist/chunks/{cli-d06qr5p3.js → cli-t4j047cx.js} +2 -2
  180. package/dist/chunks/{cli-s5epnnj5.js → cli-t9jht3kb.js} +2 -2
  181. package/dist/chunks/{cli-bd1ryrzd.js → cli-tckzkegq.js} +1 -1
  182. package/dist/chunks/{cli-p2gt60aj.js → cli-tfv2qcgf.js} +1 -1
  183. package/dist/chunks/{cli-1qszxdan.js → cli-tq5z9qv3.js} +2 -2
  184. package/dist/chunks/{cli-wthnf2t5.js → cli-tt9a4124.js} +1 -1
  185. package/dist/chunks/{cli-8v5ajztt.js → cli-tyqh91zq.js} +1 -1
  186. package/dist/chunks/cli-v943fd6a.js +3 -0
  187. package/dist/chunks/{cli-wn4ywgbv.js → cli-v9f860t5.js} +2 -2
  188. package/dist/chunks/{cli-qc7zfabw.js → cli-vkvmhjha.js} +2 -2
  189. package/dist/chunks/{cli-6b6e5zj9.js → cli-vkzp66cm.js} +2 -2
  190. package/dist/chunks/{cli-6qhwqfwp.js → cli-vwg0v35a.js} +2 -2
  191. package/dist/chunks/{cli-x514vyva.js → cli-w1d8n9g3.js} +1 -1
  192. package/dist/chunks/cli-w52yvzkn.js +3 -0
  193. package/dist/chunks/{cli-et2cj5dc.js → cli-wbe1p8n2.js} +2 -2
  194. package/dist/chunks/{cli-5mdbbvnv.js → cli-wm8qb6j3.js} +1 -1
  195. package/dist/chunks/{cli-1tq57kq0.js → cli-wn2srq2e.js} +1 -1
  196. package/dist/chunks/{cli-088ac95n.js → cli-wt2bfbn0.js} +2 -2
  197. package/dist/chunks/{cli-jmypsed1.js → cli-x70v8rsj.js} +2 -2
  198. package/dist/chunks/{cli-5wh173wa.js → cli-x8xgga1a.js} +3 -3
  199. package/dist/chunks/{cli-2vc9kv40.js → cli-xfsqvp8r.js} +2 -2
  200. package/dist/chunks/{cli-6xmbrh42.js → cli-xmgm2573.js} +2 -2
  201. package/dist/chunks/{cli-d58ptbve.js → cli-xpa1neza.js} +2 -2
  202. package/dist/chunks/{cli-6bxmycm6.js → cli-yqbvprz7.js} +1 -1
  203. package/dist/chunks/{cli-bz32070f.js → cli-yrwenjxs.js} +1 -1
  204. package/dist/chunks/{cli-3p0mfsqg.js → cli-z5e72gsd.js} +1 -1
  205. package/dist/chunks/{cli-z2jpyr57.js → cli-zev50xap.js} +1 -1
  206. package/dist/chunks/{cli-mjz85907.js → cli-zjbzak9n.js} +1 -1
  207. package/dist/chunks/{cli-h2dynmt7.js → cli-zjfya500.js} +1 -1
  208. package/dist/chunks/{cli-60mdvk6q.js → cli-zp8s7q5w.js} +1 -1
  209. package/dist/chunks/{cli-znz72ctn.js → cli-zpcncwrv.js} +1 -1
  210. package/dist/chunks/{cli-ew59cmn3.js → cli-zxdnz6vp.js} +1 -1
  211. package/dist/chunks/client-dkpgx025.js +2 -0
  212. package/dist/chunks/color-zrm6r755.js +2 -0
  213. package/dist/chunks/commitAttribution-3y6pessz.js +2 -0
  214. package/dist/chunks/common-0bee37at.js +2 -0
  215. package/dist/chunks/compact-zmvj1pk0.js +4 -0
  216. package/dist/chunks/config-gj0gbg5g.js +2 -0
  217. package/dist/chunks/config-hbq35b68.js +2 -0
  218. package/dist/chunks/context-h1qc69rg.js +2 -0
  219. package/dist/chunks/context-noninteractive-7wbe6qvd.js +2 -0
  220. package/dist/chunks/conversation-fwnfp0p5.js +2 -0
  221. package/dist/chunks/{copy-bpypgpy8.js → copy-76r9v46d.js} +1 -1
  222. package/dist/chunks/cost-56r5xxqy.js +5 -0
  223. package/dist/chunks/createSession-m5y8fjy4.js +2 -0
  224. package/dist/chunks/desktop-z3jqgnw7.js +2 -0
  225. package/dist/chunks/detectRepository-w6wawmmg.js +2 -0
  226. package/dist/chunks/detection-1yb2c7hh.js +2 -0
  227. package/dist/chunks/{devtools-mt3vnaw3.js → devtools-10ba48t9.js} +1 -1
  228. package/dist/chunks/{diff-bcdc10jv.js → diff-05xxjeqc.js} +1 -1
  229. package/dist/chunks/doctor-hgwjdraj.js +2 -0
  230. package/dist/chunks/earlyInput-navj6cdn.js +2 -0
  231. package/dist/chunks/effort-a190c878.js +9 -0
  232. package/dist/chunks/executor-s42mdmqs.js +2 -0
  233. package/dist/chunks/exit-kyrjy6hb.js +2 -0
  234. package/dist/chunks/export-ct4sty4d.js +3 -0
  235. package/dist/chunks/extra-usage-noninteractive-byts9mme.js +2 -0
  236. package/dist/chunks/extra-usage-xh1mkrca.js +2 -0
  237. package/dist/chunks/fast-g4aa49jf.js +2 -0
  238. package/dist/chunks/feedback-m5r66qd5.js +2 -0
  239. package/dist/chunks/{files-fx3xz1bj.js → files-qrrrkjke.js} +1 -1
  240. package/dist/chunks/firstPartyEventLogger-mthxtmgc.js +2 -0
  241. package/dist/chunks/gates-yhakv4vb.js +2 -0
  242. package/dist/chunks/git-c39vd9dm.js +2 -0
  243. package/dist/chunks/goal-24dr7fwz.js +2 -0
  244. package/dist/chunks/growthbook-f7ag30hy.js +2 -0
  245. package/dist/chunks/heapdump-16gnh3zm.js +7 -0
  246. package/dist/chunks/help-rgcakcxe.js +2 -0
  247. package/dist/chunks/hooks-8dh43zmv.js +2 -0
  248. package/dist/chunks/{hooks-7kspbr6v.js → hooks-c7fqwas5.js} +1 -1
  249. package/dist/chunks/{ide-5bsqkr23.js → ide-q83qr9cn.js} +1 -1
  250. package/dist/chunks/index-v875zpde.js +2 -0
  251. package/dist/chunks/initReplBridge-zfwxgpsm.js +2 -0
  252. package/dist/chunks/ink-vkxsn90v.js +2 -0
  253. package/dist/chunks/{insights-z9edzgf1.js → insights-4fwap4e5.js} +1 -1
  254. package/dist/chunks/install-7nxzmgp5.js +2 -0
  255. package/dist/chunks/{install-github-app-918fh4r2.js → install-github-app-djzea7r4.js} +1 -1
  256. package/dist/chunks/install-slack-app-3rde0k08.js +2 -0
  257. package/dist/chunks/{instrumentation-b8ysw74t.js → instrumentation-223qqr23.js} +1 -1
  258. package/dist/chunks/keybindings-6t5f69wx.js +3 -0
  259. package/dist/chunks/loadAgentsDir-f8shfnw3.js +2 -0
  260. package/dist/chunks/loadPluginHooks-mdwjrjtp.js +2 -0
  261. package/dist/chunks/login-34j3xdr9.js +2 -0
  262. package/dist/chunks/logout-yew8mymc.js +2 -0
  263. package/dist/chunks/{main-sqrzjvg9.js → main-0b8hyp8h.js} +79 -79
  264. package/dist/chunks/mcp-9enw5a8j.js +2 -0
  265. package/dist/chunks/mcp-fn4yrf5y.js +3 -0
  266. package/dist/chunks/{mcp-dqh1vtvf.js → mcp-yymqpmv6.js} +3 -3
  267. package/dist/chunks/mcpServer-60jg9v58.js +2 -0
  268. package/dist/chunks/mcpServer-85gt8ypc.js +2 -0
  269. package/dist/chunks/memory-kam5z1cw.js +4 -0
  270. package/dist/chunks/{mobile-9m41g9bp.js → mobile-7zsgawnb.js} +1 -1
  271. package/dist/chunks/model-03987182.js +2 -0
  272. package/dist/chunks/model-wbxx5kcd.js +3 -0
  273. package/dist/chunks/{oauth-98khjrd8.js → oauth-y0p2y1w5.js} +1 -1
  274. package/dist/chunks/{output-style-1h6b2zf8.js → output-style-x148mzhn.js} +1 -1
  275. package/dist/chunks/parser-4y4b0e6b.js +2 -0
  276. package/dist/chunks/passes-jrmjk5zk.js +2 -0
  277. package/dist/chunks/permissions-karmgb0m.js +4 -0
  278. package/dist/chunks/plan-w0beh9bh.js +2 -0
  279. package/dist/chunks/plugin-6nwptn3s.js +2 -0
  280. package/dist/chunks/pluginStartupCheck-0nzv1ae9.js +2 -0
  281. package/dist/chunks/{plugins-pe89pa7p.js → plugins-vvf897b4.js} +2 -2
  282. package/dist/chunks/{preauthorizedConfig-g0aq6f03.js → preauthorizedConfig-p02f23jb.js} +1 -1
  283. package/dist/chunks/{print-cjjnhg9d.js → print-krwpbp2j.js} +4 -4
  284. package/dist/chunks/privacy-settings-m0mfykh0.js +2 -0
  285. package/dist/chunks/process-26nny2p0.js +2 -0
  286. package/dist/chunks/processBashCommand-8fqgv2ec.js +2 -0
  287. package/dist/chunks/{processSlashCommand-6d8rnm8v.js → processSlashCommand-q32wy80b.js} +1 -1
  288. package/dist/chunks/prompt-gw1e1gef.js +2 -0
  289. package/dist/chunks/prompt-xgw2hxrc.js +2 -0
  290. package/dist/chunks/provider-prompt-s26vatcw.js +2 -0
  291. package/dist/chunks/rate-limit-options-rd4rjfv5.js +2 -0
  292. package/dist/chunks/registry-fp7x9ekd.js +2 -0
  293. package/dist/chunks/release-notes-76y1r2s1.js +6 -0
  294. package/dist/chunks/reload-plugins-z0fepkva.js +3 -0
  295. package/dist/chunks/remote-env-nn9ngr99.js +2 -0
  296. package/dist/chunks/remoteBridgeCore-cg7qd8m4.js +2 -0
  297. package/dist/chunks/rename-fdjzyjar.js +2 -0
  298. package/dist/chunks/resume-4rvj8jbz.js +3 -0
  299. package/dist/chunks/{rewind-cpv2pwfx.js → rewind-r4g5njsg.js} +1 -1
  300. package/dist/chunks/sandbox-adapter-craea9vm.js +2 -0
  301. package/dist/chunks/sandbox-toggle-620bkz9q.js +2 -0
  302. package/dist/chunks/session-5vm1vwv1.js +3 -0
  303. package/dist/chunks/sessionFileAccessHooks-5jbvwabj.js +2 -0
  304. package/dist/chunks/sessionStorage-ffkhmn5q.js +2 -0
  305. package/dist/chunks/settings-s2bcajs6.js +2 -0
  306. package/dist/chunks/setup-fwcttwbm.js +2 -0
  307. package/dist/chunks/setup-pf09nfsj.js +7 -0
  308. package/dist/chunks/{setup-mecsw2ye.js → setup-vegs56f5.js} +1 -1
  309. package/dist/chunks/sinks-wd4ccgbf.js +2 -0
  310. package/dist/chunks/skills-evga8f7n.js +2 -0
  311. package/dist/chunks/startupProfiler-x5zbs2j7.js +2 -0
  312. package/dist/chunks/state-qpmfrvsv.js +2 -0
  313. package/dist/chunks/{stats-3v0r4e1v.js → stats-mgqf6r7c.js} +1 -1
  314. package/dist/chunks/status-78yks3jw.js +2 -0
  315. package/dist/chunks/stickers-bdp8w2gr.js +2 -0
  316. package/dist/chunks/subprocessEnv-s797f06r.js +2 -0
  317. package/dist/chunks/{systemPromptSections-htbs443y.js → systemPromptSections-07y2z2wn.js} +1 -1
  318. package/dist/chunks/tag-gd73kstd.js +12 -0
  319. package/dist/chunks/tasks-63qaca0z.js +2 -0
  320. package/dist/chunks/{teamHelpers-dddedf19.js → teamHelpers-8ykc4bxa.js} +1 -1
  321. package/dist/chunks/teammateModeSnapshot-ae9r29dy.js +2 -0
  322. package/dist/chunks/teleport-es58k4xz.js +2 -0
  323. package/dist/chunks/terminalSetup-gyh5z5e2.js +2 -0
  324. package/dist/chunks/theme-qrhbaht6.js +2 -0
  325. package/dist/chunks/thinkback-5bs7ezv5.js +2 -0
  326. package/dist/chunks/thinkback-play-1dy160y5.js +2 -0
  327. package/dist/chunks/toolSearch-6cv284b7.js +2 -0
  328. package/dist/chunks/trustedDevice-77ketbgg.js +2 -0
  329. package/dist/chunks/{ultrareviewCommand-jtmh2xb1.js → ultrareviewCommand-j23bjbf8.js} +1 -1
  330. package/dist/chunks/{update-mkzzbt54.js → update-w8wdxh3m.js} +1 -1
  331. package/dist/chunks/upgrade-nft7c1yk.js +2 -0
  332. package/dist/chunks/{upstreamproxy-hbbvxzb5.js → upstreamproxy-x405ef9p.js} +1 -1
  333. package/dist/chunks/usage-s5qgc615.js +2 -0
  334. package/dist/chunks/util-1geb93kp.js +2 -0
  335. package/dist/chunks/utils-6sb44pg8.js +2 -0
  336. package/dist/chunks/vim-kq91w44a.js +2 -0
  337. package/dist/chunks/worktree-0af6b1mt.js +2 -0
  338. package/dist/chunks/worktreeModeEnabled-ea6wb7aj.js +2 -0
  339. package/dist/cli.js +1 -1
  340. package/package.json +4 -1
  341. package/preload.ts +1 -1
  342. package/dist/chunks/App-skattzvx.js +0 -2
  343. package/dist/chunks/ApproveApiKey-1zk1g80v.js +0 -2
  344. package/dist/chunks/BypassPermissionsModeDialog-4bd5a65d.js +0 -2
  345. package/dist/chunks/ClaudeInChromeOnboarding-jrj410t2.js +0 -2
  346. package/dist/chunks/ClaudeMdExternalIncludesDialog-2bn5pwwr.js +0 -2
  347. package/dist/chunks/ConsoleOAuthFlow-8hn6958t.js +0 -2
  348. package/dist/chunks/Doctor-w0eqwfzb.js +0 -2
  349. package/dist/chunks/Grove-ygg0z9mr.js +0 -2
  350. package/dist/chunks/ITermBackend-ht0ds6se.js +0 -2
  351. package/dist/chunks/InvalidConfigDialog-h2jkde64.js +0 -2
  352. package/dist/chunks/InvalidSettingsDialog-3p7ehs0t.js +0 -2
  353. package/dist/chunks/Onboarding-np5yfyy1.js +0 -2
  354. package/dist/chunks/REPL-8811fta4.js +0 -2
  355. package/dist/chunks/ResumeConversation-d03pbgnw.js +0 -2
  356. package/dist/chunks/TeleportProgress-ghjbbh9h.js +0 -2
  357. package/dist/chunks/TeleportRepoMismatchDialog-hhcyekar.js +0 -2
  358. package/dist/chunks/TeleportResumeWrapper-66e7dnk5.js +0 -2
  359. package/dist/chunks/ToolSearchTool-dgwhh0gd.js +0 -2
  360. package/dist/chunks/TrustDialog-w9tj4t8r.js +0 -2
  361. package/dist/chunks/TungstenTool-7k2gt6pa.js +0 -2
  362. package/dist/chunks/add-dir-pg1rb88e.js +0 -2
  363. package/dist/chunks/agents-mcbqv3h3.js +0 -4
  364. package/dist/chunks/ant-claude-for-chrome-mcp-c765s2bt.js +0 -2
  365. package/dist/chunks/api-qvdz0vdp.js +0 -2
  366. package/dist/chunks/asciicast-ygqjzj6w.js +0 -2
  367. package/dist/chunks/auth-gkfrn4ga.js +0 -2
  368. package/dist/chunks/auth-y1hqesm6.js +0 -2
  369. package/dist/chunks/backgroundHousekeeping-wk8ne1wg.js +0 -2
  370. package/dist/chunks/branch-yre4hh7s.js +0 -5
  371. package/dist/chunks/btw-091q02sh.js +0 -2
  372. package/dist/chunks/buddy-5xd2vjhm.js +0 -2
  373. package/dist/chunks/caches-g4cc992y.js +0 -2
  374. package/dist/chunks/chrome-rd8crze6.js +0 -2
  375. package/dist/chunks/clear-25jzke5j.js +0 -2
  376. package/dist/chunks/cli-6hvqmebc.js +0 -3
  377. package/dist/chunks/cli-9hskw92e.js +0 -130
  378. package/dist/chunks/cli-avcnnw0n.js +0 -3
  379. package/dist/chunks/cli-e9pafjv1.js +0 -4
  380. package/dist/chunks/cli-gyp5wyzg.js +0 -3
  381. package/dist/chunks/cli-jbbxj53h.js +0 -3
  382. package/dist/chunks/cli-pbp5hza0.js +0 -3
  383. package/dist/chunks/cli-tzaj50bd.js +0 -3
  384. package/dist/chunks/cli-xzsc9n84.js +0 -3
  385. package/dist/chunks/cli-yv1znypb.js +0 -3
  386. package/dist/chunks/client-037bm52v.js +0 -2
  387. package/dist/chunks/color-ceqfke15.js +0 -2
  388. package/dist/chunks/commitAttribution-3ewwca68.js +0 -2
  389. package/dist/chunks/common-jn8w5r1w.js +0 -2
  390. package/dist/chunks/compact-631qpkbp.js +0 -4
  391. package/dist/chunks/config-6em7qq45.js +0 -2
  392. package/dist/chunks/config-h2e5ra49.js +0 -2
  393. package/dist/chunks/context-31c3znwn.js +0 -2
  394. package/dist/chunks/context-noninteractive-q418vz0p.js +0 -2
  395. package/dist/chunks/conversation-yz22h1cb.js +0 -2
  396. package/dist/chunks/cost-8rr9expn.js +0 -5
  397. package/dist/chunks/createSession-jratqxvc.js +0 -2
  398. package/dist/chunks/desktop-zq22ksq3.js +0 -2
  399. package/dist/chunks/detectRepository-djxyq37h.js +0 -2
  400. package/dist/chunks/detection-b18r43da.js +0 -2
  401. package/dist/chunks/doctor-cs43t62h.js +0 -2
  402. package/dist/chunks/earlyInput-361tx72y.js +0 -2
  403. package/dist/chunks/effort-qw83nert.js +0 -9
  404. package/dist/chunks/executor-rvxyyheh.js +0 -2
  405. package/dist/chunks/exit-kynz824m.js +0 -2
  406. package/dist/chunks/export-95j3srp6.js +0 -3
  407. package/dist/chunks/extra-usage-hxyp53v5.js +0 -2
  408. package/dist/chunks/extra-usage-noninteractive-53w28t1j.js +0 -2
  409. package/dist/chunks/fast-ec1hxnv7.js +0 -2
  410. package/dist/chunks/feedback-qtsk3t9f.js +0 -2
  411. package/dist/chunks/firstPartyEventLogger-4yfx731e.js +0 -2
  412. package/dist/chunks/gates-85t459a0.js +0 -2
  413. package/dist/chunks/git-e0mvprv8.js +0 -2
  414. package/dist/chunks/goal-ywc7exvv.js +0 -2
  415. package/dist/chunks/growthbook-ykj8089v.js +0 -2
  416. package/dist/chunks/heapdump-w6a13cfe.js +0 -7
  417. package/dist/chunks/help-enq1htxe.js +0 -2
  418. package/dist/chunks/hooks-wxm384wn.js +0 -2
  419. package/dist/chunks/initReplBridge-acrf7hyb.js +0 -2
  420. package/dist/chunks/ink-9vrw9yhe.js +0 -2
  421. package/dist/chunks/install-c8gv4wfg.js +0 -2
  422. package/dist/chunks/install-slack-app-1aqgxsb6.js +0 -2
  423. package/dist/chunks/keybindings-v92d2xht.js +0 -3
  424. package/dist/chunks/loadAgentsDir-k53rdwbr.js +0 -2
  425. package/dist/chunks/loadPluginHooks-rmzgs29p.js +0 -2
  426. package/dist/chunks/login-j9bz1g34.js +0 -2
  427. package/dist/chunks/logout-58wm6hsc.js +0 -2
  428. package/dist/chunks/mcp-z3j236hk.js +0 -3
  429. package/dist/chunks/mcp-zryxxcaz.js +0 -2
  430. package/dist/chunks/mcpServer-b2m7ewct.js +0 -2
  431. package/dist/chunks/mcpServer-xpq096r4.js +0 -2
  432. package/dist/chunks/memory-5tvqvktk.js +0 -4
  433. package/dist/chunks/model-cta1svwb.js +0 -3
  434. package/dist/chunks/model-d96jkka7.js +0 -2
  435. package/dist/chunks/parser-jpf6bfmz.js +0 -2
  436. package/dist/chunks/passes-reh6ja9j.js +0 -2
  437. package/dist/chunks/permissions-xgydmrq2.js +0 -4
  438. package/dist/chunks/plan-z4k8zj56.js +0 -2
  439. package/dist/chunks/plugin-0tztmcsg.js +0 -2
  440. package/dist/chunks/pluginStartupCheck-vxmkvt40.js +0 -2
  441. package/dist/chunks/privacy-settings-zbrc40a1.js +0 -2
  442. package/dist/chunks/process-msr26xa0.js +0 -2
  443. package/dist/chunks/processBashCommand-hnhy8brr.js +0 -2
  444. package/dist/chunks/prompt-cfaneybz.js +0 -2
  445. package/dist/chunks/prompt-wg6hfj0k.js +0 -2
  446. package/dist/chunks/provider-prompt-c8wew66t.js +0 -2
  447. package/dist/chunks/rate-limit-options-fyjqpxp3.js +0 -2
  448. package/dist/chunks/registry-ht9aazng.js +0 -2
  449. package/dist/chunks/release-notes-5v16zb9c.js +0 -6
  450. package/dist/chunks/reload-plugins-apyma8vs.js +0 -3
  451. package/dist/chunks/remote-env-p6ym55w6.js +0 -2
  452. package/dist/chunks/remoteBridgeCore-0v9x8112.js +0 -2
  453. package/dist/chunks/rename-j9rc9dwj.js +0 -2
  454. package/dist/chunks/resume-tbr3mkch.js +0 -3
  455. package/dist/chunks/sandbox-adapter-qh943bs4.js +0 -2
  456. package/dist/chunks/sandbox-toggle-1f70ejwk.js +0 -2
  457. package/dist/chunks/session-42zhjgd2.js +0 -3
  458. package/dist/chunks/sessionFileAccessHooks-1nh915er.js +0 -2
  459. package/dist/chunks/sessionStorage-j5m0nf55.js +0 -2
  460. package/dist/chunks/settings-c709knqg.js +0 -2
  461. package/dist/chunks/setup-0n2p20yw.js +0 -7
  462. package/dist/chunks/setup-2hqyyxff.js +0 -2
  463. package/dist/chunks/sinks-q6etaenz.js +0 -2
  464. package/dist/chunks/skills-xads3027.js +0 -2
  465. package/dist/chunks/startupProfiler-4wmjq0yd.js +0 -2
  466. package/dist/chunks/state-edaz98bj.js +0 -2
  467. package/dist/chunks/status-9rtty0ee.js +0 -2
  468. package/dist/chunks/stickers-m73qwecp.js +0 -2
  469. package/dist/chunks/subprocessEnv-rass28aq.js +0 -2
  470. package/dist/chunks/tag-vj93fgp6.js +0 -12
  471. package/dist/chunks/tasks-avbqta2s.js +0 -2
  472. package/dist/chunks/teammateModeSnapshot-32yfa4hf.js +0 -2
  473. package/dist/chunks/teleport-jw6w0rn4.js +0 -2
  474. package/dist/chunks/terminalSetup-ppt6v9xf.js +0 -2
  475. package/dist/chunks/theme-2csrfbca.js +0 -2
  476. package/dist/chunks/thinkback-2ahfejyt.js +0 -2
  477. package/dist/chunks/thinkback-play-kffa7rdp.js +0 -2
  478. package/dist/chunks/toolSearch-ptrcr8ec.js +0 -2
  479. package/dist/chunks/trustedDevice-xvtp79f1.js +0 -2
  480. package/dist/chunks/upgrade-c4argpvv.js +0 -2
  481. package/dist/chunks/usage-w30yajzy.js +0 -2
  482. package/dist/chunks/util-zkawe0w0.js +0 -2
  483. package/dist/chunks/utils-v86tf27x.js +0 -2
  484. package/dist/chunks/vim-3stm1kbg.js +0 -2
  485. package/dist/chunks/worktree-pbeayfjp.js +0 -2
  486. package/dist/chunks/worktreeModeEnabled-ysks760x.js +0 -2
@@ -1,5 +1,5 @@
1
1
  // @bun
2
- import{Ac as f8,Bc as Oz}from"./cli-c2pn6csk.js";import{Ce as _8,De as jz}from"./cli-z2jpyr57.js";import{cf as x8,df as hz,ef as c8,ff as rz}from"./cli-58t6a5n6.js";import{$H as d8,Ep as wK,Fp as X8,NK as U8,OK as qP,RI as _K,Ru as n8,Su as Wz,VH as I8,iA as O8,mA as Pz,pG as V8,qG as Nz,qI as qq,rG as o8,rI as f6,sG as uz,sI as OK,tl as iK,ul as KP,yH as i8}from"./cli-5pb6kdxn.js";import{VL as _q,WL as K8,XL as Nq,YL as P8,ZL as Dq,_L as j8}from"./cli-2vc9kv40.js";import{YN as E8,ZN as mz}from"./cli-mejr8b5m.js";import{HO as b8,IO as yz,VO as oq,XO as z8,bP as C8,cP as Az}from"./cli-s6qk3rbv.js";import{BQ as S8,DQ as Dz,GQ as R,IQ as y,ZQ as R8,iQ as L8,iR as jK,nP as Z8,rP as G8,sP as Xz}from"./cli-5wh173wa.js";import{PY as t8,oZ as Uz}from"./cli-9hskw92e.js";import{t4 as aK,v4 as Bz}from"./cli-v2hg35qk.js";import{V5 as RK,W5 as fz,Y5 as fK,h6 as q8,i6 as VK,l6 as GK}from"./cli-dx46fn1w.js";import{f7 as u8,w7 as pz}from"./cli-nj726gac.js";import{B8 as r8,t8 as bq,w8 as oK}from"./cli-3bxtq5dc.js";import{U8 as o,V8 as Tz}from"./cli-s5epnnj5.js";import{a_ as s8,d_ as sz,r_ as yq,u_ as tz}from"./cli-a98b285v.js";import{Zca as h8,a$ as N8,g$ as vK}from"./cli-w754xmyv.js";import{bda as j6}from"./cli-x514vyva.js";import{c as _z}from"react/compiler-runtime";import QK from"react";import{jsxDEV as Q}from"react/jsx-dev-runtime";function w8(K){let q=_z(33),{log:j,onExit:v,onSelect:M}=K,[Y,X]=QK.useState(null),D,u;if(q[0]!==j)D=()=>{if(X(null),f6(j))OK(j).then(X)},u=[j],q[0]=j,q[1]=D,q[2]=u;else D=q[1],u=q[2];QK.useEffect(D,u);let I=f6(j)&&Y===null,O=Y??j,p;if(q[3]!==O)p=qq(O)||"",q[3]=O,q[4]=p;else p=q[4];let J=p,n;if(q[5]===Symbol.for("react.memo_cache_sentinel"))n=O8(),q[5]=n;else n=q[5];let m=n,Kq;if(q[6]===Symbol.for("react.memo_cache_sentinel"))Kq={context:"Confirmation"},q[6]=Kq;else Kq=q[6];oq("confirm:no",v,Kq);let L;if(q[7]!==Y||q[8]!==j||q[9]!==M)L=()=>{M(Y??j)},q[7]=Y,q[8]=j,q[9]=M,q[10]=L;else L=q[10];let b=L,N;if(q[11]===Symbol.for("react.memo_cache_sentinel"))N={context:"Confirmation"},q[11]=N;else N=q[11];if(oq("confirm:yes",b,N),I){let a;if(q[12]===Symbol.for("react.memo_cache_sentinel"))a=Q(_8,{message:"Loading session\u2026"},void 0,!1,void 0,this),q[12]=a;else a=q[12];let Mq;if(q[13]===Symbol.for("react.memo_cache_sentinel"))Mq=Q(R,{flexDirection:"column",padding:1,children:[a,Q(y,{dimColor:!0,children:Q(Dq,{children:Q(Nq,{action:"confirm:no",context:"Confirmation",fallback:"Esc",description:"cancel"},void 0,!1,void 0,this)},void 0,!1,void 0,this)},void 0,!1,void 0,this)]},void 0,!0,void 0,this),q[13]=Mq;else Mq=q[13];return Mq}let G;if(q[14]===Symbol.for("react.memo_cache_sentinel"))G=[],q[14]=G;else G=q[14];let Z,d;if(q[15]===Symbol.for("react.memo_cache_sentinel"))d=[],Z=new Set,q[15]=Z,q[16]=d;else Z=q[15],d=q[16];let V;if(q[17]===Symbol.for("react.memo_cache_sentinel"))V=[],q[17]=V;else V=q[17];let l;if(q[18]!==J||q[19]!==O.messages)l=Q(f8,{messages:O.messages,tools:m,commands:G,verbose:!0,toolJSX:null,toolUseConfirmQueue:d,inProgressToolUseIDs:Z,isMessageSelectorVisible:!1,conversationId:J,screen:"transcript",streamingToolUses:V,showAllInTranscript:!0,isLoading:!1},void 0,!1,void 0,this),q[18]=J,q[19]=O.messages,q[20]=l;else l=q[20];let B;if(q[21]!==O.modified)B=q8(O.modified),q[21]=O.modified,q[22]=B;else B=q[22];let U=O.gitBranch?` \xB7 ${O.gitBranch}`:"",C;if(q[23]!==O.messageCount||q[24]!==B||q[25]!==U)C=Q(y,{children:[B," \xB7"," ",O.messageCount," messages",U]},void 0,!0,void 0,this),q[23]=O.messageCount,q[24]=B,q[25]=U,q[26]=C;else C=q[26];let fq;if(q[27]===Symbol.for("react.memo_cache_sentinel"))fq=Q(y,{dimColor:!0,children:Q(Dq,{children:[Q(_q,{shortcut:"Enter",action:"resume"},void 0,!1,void 0,this),Q(Nq,{action:"confirm:no",context:"Confirmation",fallback:"Esc",description:"cancel"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)},void 0,!1,void 0,this),q[27]=fq;else fq=q[27];let A;if(q[28]!==C)A=Q(R,{flexShrink:0,flexDirection:"column",borderTopDimColor:!0,borderBottom:!1,borderLeft:!1,borderRight:!1,borderStyle:"single",paddingLeft:2,children:[C,fq]},void 0,!0,void 0,this),q[28]=C,q[29]=A;else A=q[29];let hq;if(q[30]!==l||q[31]!==A)hq=Q(R,{flexDirection:"column",children:[l,A]},void 0,!0,void 0,this),q[30]=l,q[31]=A,q[32]=hq;else hq=q[32];return hq}var v8=j6(()=>{jK();z8();Pz();GK();_K();P8();j8();K8();jz();Oz()});import{jsxDEV as O6}from"react/jsx-dev-runtime";function Yz(K,q){if(K===LK)return LK.length+w6;let j=RK(K),v=q?Math.min(j,q-w6-SK):j;return Math.max(0,v)+w6+SK}function kz(K,q){let j=q-w6-SK;if(RK(K)<=j)return K;if(j<=1)return K.charAt(0);return fK(K,j)}function $8({tabs:K,selectedIndex:q,availableWidth:j,showAllProjects:v=!1}){let M=v?"Resume (All Projects)":"Resume",Y=M.length+1,X=Math.max(vz,Mz),D=j-Y-X-2,u=Math.max(0,Math.min(q,K.length-1)),I=Math.max(20,Math.floor(D/2)),O=K.map((N)=>Yz(N,I)),p=0,J=K.length;if(O.reduce((N,G,Z)=>N+G+(Z<O.length-1?1:0),0)>D){let N=D-wz,G=O[u]??0;p=u,J=u+1;while(p>0||J<K.length){let Z=p>0,d=J<K.length;if(Z){let V=(O[p-1]??0)+1;if(G+V<=N){p--,G+=V;continue}}if(d){let V=(O[J]??0)+1;if(G+V<=N){J++,G+=V;continue}}break}}let m=p,Kq=K.length-J,L=K.slice(p,J),b=L.map((N,G)=>p+G);return O6(R,{flexDirection:"row",gap:1,children:[O6(y,{color:"suggestion",children:M},void 0,!1,void 0,this),m>0&&O6(y,{dimColor:!0,children:[M8,m]},void 0,!0,void 0,this),L.map((N,G)=>{let d=b[G]===u,V=N===LK?N:`#${kz(N,I-w6)}`;return O6(y,{backgroundColor:d?"suggestion":void 0,color:d?"inverseText":void 0,bold:d,children:[" ",V," "]},N,!0,void 0,this)}),Kq>0?O6(y,{dimColor:!0,children:[Y8,Kq,k8]},void 0,!0,void 0,this):O6(y,{dimColor:!0,children:J8},void 0,!1,void 0,this)]},void 0,!0,void 0,this)}var LK="All",w6=2,SK=1,M8="\u2190 ",Y8="\u2192",k8=" (tab to cycle)",J8="(tab to cycle)",H8=2,wz,vz,Mz;var T8=j6(()=>{fz();jK();GK();wz=M8.length+H8+1,vz=Y8.length+H8+k8.length,Mz=J8.length});import{c as Jz}from"react/compiler-runtime";import bK from"react";import{jsxDEV as p8}from"react/jsx-dev-runtime";function D8(K){let q=Jz(48),{nodes:j,onSelect:v,onCancel:M,onFocus:Y,focusNodeId:X,visibleOptionCount:D,layout:u,isDisabled:I,hideIndexes:O,isNodeExpanded:p,onExpand:J,onCollapse:n,getParentPrefix:m,getChildPrefix:Kq,onUpFromFirstItem:L}=K,b=u===void 0?"expanded":u,N=I===void 0?!1:I,G=O===void 0?!1:O,Z;if(q[0]===Symbol.for("react.memo_cache_sentinel"))Z=new Set,q[0]=Z;else Z=q[0];let[d,V]=bK.useState(Z),l=bK.useRef(!1),B=bK.useRef(null),U;if(q[1]!==d||q[2]!==p)U=(k)=>{if(p)return p(k);return d.has(k)},q[1]=d,q[2]=p,q[3]=U;else U=q[3];let C=U,fq;if(q[4]!==C||q[5]!==j){let k=function(T,vq,Zq){let Eq=!!T.children&&T.children.length>0,Cq=C(T.id);if(fq.push({node:T,depth:vq,isExpanded:Cq,hasChildren:Eq,parentId:Zq}),Eq&&Cq&&T.children)for(let f of T.children)k(f,vq+1,T.id)};fq=[];for(let T of j)k(T,0);q[4]=C,q[5]=j,q[6]=fq}else fq=q[6];let A=fq,hq=$z,a=Hz,Mq=m??hq,g=Kq??a,aq;if(q[7]!==g||q[8]!==Mq)aq=(k)=>{let T="";if(k.hasChildren)T=Mq(k.isExpanded);else if(k.depth>0)T=g(k.depth);return T+k.node.label},q[7]=g,q[8]=Mq,q[9]=aq;else aq=q[9];let s=aq,iq;if(q[10]!==s||q[11]!==A)iq=A.map((k)=>({label:s(k),description:k.node.description,dimDescription:k.node.dimDescription??!0,value:k.node.id})),q[10]=s,q[11]=A,q[12]=iq;else iq=q[12];let rq=iq,mq;if(q[13]!==A)mq=new Map,A.forEach((k)=>mq.set(k.node.id,k.node)),q[13]=A,q[14]=mq;else mq=q[14];let i=mq,Yq;if(q[15]!==A)Yq=(k)=>A.find((T)=>T.node.id===k),q[15]=A,q[16]=Yq;else Yq=q[16];let kq=Yq,Iq;if(q[17]!==kq||q[18]!==n||q[19]!==J)Iq=(k,T)=>{let vq=kq(k);if(!vq||!vq.hasChildren)return;if(T)if(J)J(k);else V((Zq)=>new Set(Zq).add(k));else if(n)n(k);else V((Zq)=>{let Eq=new Set(Zq);return Eq.delete(k),Eq})},q[17]=kq,q[18]=n,q[19]=J,q[20]=Iq;else Iq=q[20];let Jq=Iq,wq;if(q[21]!==kq||q[22]!==X||q[23]!==N||q[24]!==i||q[25]!==Y||q[26]!==Jq)wq=(k)=>{if(!X||N)return;let T=kq(X);if(!T)return;if(k.key==="right"&&T.hasChildren)k.preventDefault(),Jq(X,!0);else if(k.key==="left"){if(T.hasChildren&&T.isExpanded)k.preventDefault(),Jq(X,!1);else if(T.parentId!==void 0){if(k.preventDefault(),l.current=!0,Jq(T.parentId,!1),Y){let vq=i.get(T.parentId);if(vq)Y(vq)}}}},q[21]=kq,q[22]=X,q[23]=N,q[24]=i,q[25]=Y,q[26]=Jq,q[27]=wq;else wq=q[27];let dq=wq,Hq;if(q[28]!==i||q[29]!==v)Hq=(k)=>{let T=i.get(k);if(!T)return;v(T)},q[28]=i,q[29]=v,q[30]=Hq;else Hq=q[30];let uq=Hq,zq;if(q[31]!==i||q[32]!==Y)zq=(k)=>{if(l.current){l.current=!1;return}if(B.current===k)return;if(B.current=k,Y){let T=i.get(k);if(T)Y(T)}},q[31]=i,q[32]=Y,q[33]=zq;else zq=q[33];let lq=zq,H;if(q[34]!==X||q[35]!==uq||q[36]!==lq||q[37]!==G||q[38]!==N||q[39]!==b||q[40]!==M||q[41]!==L||q[42]!==rq||q[43]!==D)H=p8(wK,{options:rq,onChange:uq,onFocus:lq,onCancel:M,defaultFocusValue:X,visibleOptionCount:D,layout:b,isDisabled:N,hideIndexes:G,onUpFromFirstItem:L},void 0,!1,void 0,this),q[34]=X,q[35]=uq,q[36]=lq,q[37]=G,q[38]=N,q[39]=b,q[40]=M,q[41]=L,q[42]=rq,q[43]=D,q[44]=H;else H=q[44];let c;if(q[45]!==dq||q[46]!==H)c=p8(R,{tabIndex:0,autoFocus:!0,onKeyDown:dq,children:H},void 0,!1,void 0,this),q[45]=dq,q[46]=H,q[47]=c;else c=q[47];return c}function Hz(K){return" \u25B8 "}function $z(K){return K?"\u25BC ":"\u25B6 "}var y8=j6(()=>{jK();X8()});import{c as Zz}from"react/compiler-runtime";import m8 from"chalk";import"figures";import W from"react";import{jsxDEV as _}from"react/jsx-dev-runtime";function a8(K,q){let j=K.replace(/\s+/g," ").trim();return fK(j,q)}function EK({before:K,match:q,after:j},v){return m8.dim(K)+v(q)+m8.dim(j)}function Ez(K,q,j){let v=K.toLowerCase().indexOf(q.toLowerCase());if(v===-1)return null;let M=v+q.length,Y=Math.max(0,v-j),X=Math.min(K.length,M+j),D=K.slice(Y,v),u=K.slice(v,M),I=K.slice(M,X);return{before:(Y>0?"\u2026":"")+D.replace(/\s+/g," ").trimStart(),match:u.trim(),after:I.replace(/\s+/g," ").trimEnd()+(X<K.length?"\u2026":"")}}function CK(K,q,j){let{isGroupHeader:v=!1,isChild:M=!1,forkCount:Y=0}=j||{},X=v&&Y>0?Gz:M?Lz:0,D=v&&Y>0?` (+${Y} other ${Y===1?"session":"sessions"})`:"",u=K.isSidechain?" (sidechain)":"",I=q-X-u.length-D.length;return`${a8(bq(K),I)}${u}${D}`}function nK(K,q){let{isChild:j=!1,showProjectPath:v=!1}=q||{},M=j?" ":"",Y=VK(K),X=v&&K.projectPath?` \xB7 ${K.projectPath}`:"";return M+Y+X}function w7(K){let q=Zz(247),{logs:j,maxHeight:v,forceWidth:M,onCancel:Y,onSelect:X,onLogsChanged:D,onLoadMore:u,initialSearchQuery:I,showAllProjects:O,onToggleAllProjects:p,onAgenticSearch:J}=K,n=v===void 0?1/0:v,m=O===void 0?!1:O,Kq=b8(),L=M===void 0?Kq.columns:M,b=E8(Y),N=L8(),G;if(q[0]===Symbol.for("react.memo_cache_sentinel"))G=i8(),q[0]=G;else G=q[0];let Z=G,d=!1,[V]=Z8(),l;if(q[1]!==V)l=S8(V),q[1]=V,q[2]=l;else l=q[2];let B=l,U;if(q[3]!==B.warning)U=(z)=>G8(z,B.warning),q[3]=B.warning,q[4]=U;else U=q[4];let C=U,fq=!1,[A,hq]=W.useState(null),[a,Mq]=W.useState(!1),[g,aq]=W.useState(!1),[s,iq]=W.useState(!1),rq;if(q[5]===Symbol.for("react.memo_cache_sentinel"))rq=vK(),q[5]=rq;else rq=q[5];let mq=rq,[i,Yq]=W.useState(""),[kq,Iq]=W.useState(0),Jq;if(q[6]===Symbol.for("react.memo_cache_sentinel"))Jq=new Set,q[6]=Jq;else Jq=q[6];let[wq,dq]=W.useState(Jq),[Hq,uq]=W.useState(null),[zq,lq]=W.useState(1),[H,c]=W.useState("list"),[k,T]=W.useState(null),vq=W.useRef(null),[Zq,Eq]=W.useState(0),Cq;if(q[7]===Symbol.for("react.memo_cache_sentinel"))Cq={status:"idle"},q[7]=Cq;else Cq=q[7];let[f,_6]=W.useState(Cq),[e,v6]=W.useState(!1),M6=W.useRef(null),MK=H==="search"&&f.status!=="searching",Y6,k6,J6;if(q[8]===Symbol.for("react.memo_cache_sentinel"))Y6=()=>{c("list"),o("tengu_session_search_toggled",{enabled:!1})},k6=()=>{c("list"),o("tengu_session_search_toggled",{enabled:!1})},J6=["n"],q[8]=Y6,q[9]=k6,q[10]=J6;else Y6=q[8],k6=q[9],J6=q[10];let YK=I||"",H6;if(q[11]!==YK||q[12]!==MK)H6={isActive:MK,onExit:Y6,onExitUp:k6,passthroughCtrlKeys:J6,initialQuery:YK},q[11]=YK,q[12]=MK,q[13]=H6;else H6=q[13];let{query:h,setQuery:gq,cursorOffset:kK}=c8(H6),Gq=W.useDeferredValue(h),[Pq,IK]=W.useState(""),$6,T6;if(q[14]!==Gq)$6=()=>{if(!Gq){IK("");return}let z=setTimeout(IK,300,Gq);return()=>clearTimeout(z)},T6=[Gq],q[14]=Gq,q[15]=$6,q[16]=T6;else $6=q[15],T6=q[16];W.useEffect($6,T6);let[Lq,dK]=W.useState(null),[JK,lK]=W.useState(!1),p6,X6;if(q[17]===Symbol.for("react.memo_cache_sentinel"))p6=()=>{u8().then((z)=>hq(z)),o8(mq).then((z)=>{iq(z.length>1)})},X6=[mq],q[17]=p6,q[18]=X6;else p6=q[17],X6=q[18];W.useEffect(p6,X6);let jP=new Map(j.map(az)),e8;e8=null;let D6;if(q[19]!==j)D6=lz(j),q[19]=j,q[20]=D6;else D6=q[20];let nq=D6,$q=nq.length>0,y6;if(q[21]!==$q||q[22]!==nq)y6=$q?["All",...nq]:[],q[21]=$q,q[22]=nq,q[23]=y6;else y6=q[23];let jq=y6,m6=jq.length>0&&Zq<jq.length?Zq:0,gK=jq[m6],sq=gK==="All"?void 0:gK,F8=$q?1:0,t=j;if(Z){let z;if(q[24]!==j)z=j.filter(oz),q[24]=j,q[25]=z;else z=q[25];t=z}if(sq!==void 0){let z;if(q[26]!==t||q[27]!==sq){let P;if(q[29]!==sq)P=(w)=>w.tag===sq,q[29]=sq,q[30]=P;else P=q[30];z=t.filter(P),q[26]=t,q[27]=sq,q[28]=z}else z=q[28];t=z}if(a&&A){let z;if(q[31]!==A||q[32]!==t){let P;if(q[34]!==A)P=(w)=>w.gitBranch===A,q[34]=A,q[35]=P;else P=q[35];z=t.filter(P),q[31]=A,q[32]=t,q[33]=z}else z=q[33];t=z}if(s&&!g){let z;if(q[36]!==t){let P;if(q[38]===Symbol.for("react.memo_cache_sentinel"))P=(w)=>w.projectPath===mq,q[38]=P;else P=q[38];z=t.filter(P),q[36]=t,q[37]=z}else z=q[37];t=z}let A6=t,HK;q:{if(!h){HK=A6;break q}let z;if(q[39]!==A6||q[40]!==h){let P=h.toLowerCase();z=A6.filter((w)=>{let r=bq(w).toLowerCase(),E=(w.gitBranch||"").toLowerCase(),x=(w.tag||"").toLowerCase(),cq=w.prNumber?`pr #${w.prNumber} ${w.prRepository||""}`.toLowerCase():"";return r.includes(P)||E.includes(P)||x.includes(P)||cq.includes(P)}),q[39]=A6,q[40]=h,q[41]=z}else z=q[41];HK=z}let $K=HK,W6,N6;if(q[42]!==Pq||q[43]!==Gq)W6=()=>{},N6=[Gq,Pq,!1],q[42]=Pq,q[43]=Gq,q[44]=W6,q[45]=N6;else W6=q[44],N6=q[45];W.useEffect(W6,N6);let h6,r6;if(q[46]!==Pq)h6=()=>{dK(null),lK(!1);return},r6=[Pq,null,!1],q[46]=Pq,q[47]=h6,q[48]=r6;else h6=q[47],r6=q[48];W.useEffect(h6,r6);let F,Vq;if(q[49]!==Pq||q[50]!==Lq||q[51]!==$K){if(Vq=new Map,F=$K,Lq&&Pq&&Lq.query===Pq){for(let r of Lq.results)if(r.searchableText){let E=Ez(r.searchableText,Pq,bz);if(E)Vq.set(r.log,E)}let z;if(q[54]!==F)z=new Set(F.map(nz)),q[54]=F,q[55]=z;else z=q[55];let P=z,w;if(q[56]!==Lq.results||q[57]!==F||q[58]!==P){let r;if(q[60]!==P)r=(x)=>!P.has(x.messages[0]?.uuid),q[60]=P,q[61]=r;else r=q[61];let E=Lq.results.map(Cz).filter(r);w=[...F,...E],q[56]=Lq.results,q[57]=F,q[58]=P,q[59]=w}else w=q[59];F=w}q[49]=Pq,q[50]=Lq,q[51]=$K,q[52]=F,q[53]=Vq}else F=q[52],Vq=q[53];let u6;if(q[62]!==F||q[63]!==Vq)u6={filteredLogs:F,snippets:Vq},q[62]=F,q[63]=Vq,q[64]=u6;else u6=q[64];let{filteredLogs:xq,snippets:Aq}=u6,TK;q:{if(f.status==="results"&&f.results.length>0){TK=f.results;break q}TK=xq}let $=TK,Tq=Math.max(30,L-4),pK;q:{if(!Z){let P;if(q[65]===Symbol.for("react.memo_cache_sentinel"))P=[],q[65]=P;else P=q[65];pK=P;break q}let z;if(q[66]!==$||q[67]!==C||q[68]!==Tq||q[69]!==m||q[70]!==Aq){let P=dz($);z=Array.from(P.entries()).map((w)=>{let[r,E]=w,x=E[0],cq=$.indexOf(x),Sq=Aq.get(x),Wq=Sq?EK(Sq,C):null;if(E.length===1){let Rq=nK(x,{showProjectPath:m});return{id:`log:${r}:0`,value:{log:x,indexInFiltered:cq},label:CK(x,Tq),description:Wq?`${Rq}
2
+ import{Ac as f8,Bc as Oz}from"./cli-khs3sj9k.js";import{Ce as _8,De as jz}from"./cli-zev50xap.js";import{cf as x8,df as hz,ef as c8,ff as rz}from"./cli-h4a90xbh.js";import{Ep as wK,Fp as X8,KK as U8,LK as qP,OI as _K,Ou as n8,Pu as Wz,SH as I8,YH as d8,fA as O8,jA as Pz,mG as V8,nG as Nz,nI as qq,oG as o8,oI as f6,pG as uz,pI as OK,tl as iK,ul as KP,vH as i8}from"./cli-me4e2p3e.js";import{SL as _q,TL as K8,UL as Nq,VL as P8,WL as Dq,XL as j8}from"./cli-xfsqvp8r.js";import{aO as E8,bO as mz}from"./cli-6yprtw88.js";import{$O as Az,EO as b8,FO as yz,SO as oq,UO as z8,_O as C8}from"./cli-akcxtvv9.js";import{AQ as Dz,DQ as R,FQ as y,WQ as R8,fQ as L8,fR as jK,kP as Z8,oP as G8,pP as Xz,yQ as S8}from"./cli-x8xgga1a.js";import{SY as t8,rZ as Uz}from"./cli-msmzt4c3.js";import{d4 as aK,f4 as Bz}from"./cli-s6vr7213.js";import{Z5 as RK,_5 as fz,a6 as fK,l6 as q8,m6 as VK,p6 as GK}from"./cli-51720d82.js";import{A7 as pz,j7 as u8}from"./cli-fdya77ch.js";import{B8 as bq,E8 as oK,J8 as r8}from"./cli-4ewb3q42.js";import{Y8 as o,Z8 as Tz}from"./cli-t9jht3kb.js";import{e_ as s8,h_ as sz,v_ as yq,y_ as tz}from"./cli-hke6r0q8.js";import{bda as h8,e$ as N8,k$ as vK}from"./cli-3ac555qw.js";import{fda as j6}from"./cli-w1d8n9g3.js";import{c as _z}from"react/compiler-runtime";import QK from"react";import{jsxDEV as Q}from"react/jsx-dev-runtime";function w8(K){let q=_z(33),{log:j,onExit:v,onSelect:M}=K,[Y,X]=QK.useState(null),D,u;if(q[0]!==j)D=()=>{if(X(null),f6(j))OK(j).then(X)},u=[j],q[0]=j,q[1]=D,q[2]=u;else D=q[1],u=q[2];QK.useEffect(D,u);let I=f6(j)&&Y===null,O=Y??j,p;if(q[3]!==O)p=qq(O)||"",q[3]=O,q[4]=p;else p=q[4];let J=p,n;if(q[5]===Symbol.for("react.memo_cache_sentinel"))n=O8(),q[5]=n;else n=q[5];let m=n,Kq;if(q[6]===Symbol.for("react.memo_cache_sentinel"))Kq={context:"Confirmation"},q[6]=Kq;else Kq=q[6];oq("confirm:no",v,Kq);let L;if(q[7]!==Y||q[8]!==j||q[9]!==M)L=()=>{M(Y??j)},q[7]=Y,q[8]=j,q[9]=M,q[10]=L;else L=q[10];let b=L,N;if(q[11]===Symbol.for("react.memo_cache_sentinel"))N={context:"Confirmation"},q[11]=N;else N=q[11];if(oq("confirm:yes",b,N),I){let a;if(q[12]===Symbol.for("react.memo_cache_sentinel"))a=Q(_8,{message:"Loading session\u2026"},void 0,!1,void 0,this),q[12]=a;else a=q[12];let Mq;if(q[13]===Symbol.for("react.memo_cache_sentinel"))Mq=Q(R,{flexDirection:"column",padding:1,children:[a,Q(y,{dimColor:!0,children:Q(Dq,{children:Q(Nq,{action:"confirm:no",context:"Confirmation",fallback:"Esc",description:"cancel"},void 0,!1,void 0,this)},void 0,!1,void 0,this)},void 0,!1,void 0,this)]},void 0,!0,void 0,this),q[13]=Mq;else Mq=q[13];return Mq}let G;if(q[14]===Symbol.for("react.memo_cache_sentinel"))G=[],q[14]=G;else G=q[14];let Z,d;if(q[15]===Symbol.for("react.memo_cache_sentinel"))d=[],Z=new Set,q[15]=Z,q[16]=d;else Z=q[15],d=q[16];let V;if(q[17]===Symbol.for("react.memo_cache_sentinel"))V=[],q[17]=V;else V=q[17];let l;if(q[18]!==J||q[19]!==O.messages)l=Q(f8,{messages:O.messages,tools:m,commands:G,verbose:!0,toolJSX:null,toolUseConfirmQueue:d,inProgressToolUseIDs:Z,isMessageSelectorVisible:!1,conversationId:J,screen:"transcript",streamingToolUses:V,showAllInTranscript:!0,isLoading:!1},void 0,!1,void 0,this),q[18]=J,q[19]=O.messages,q[20]=l;else l=q[20];let B;if(q[21]!==O.modified)B=q8(O.modified),q[21]=O.modified,q[22]=B;else B=q[22];let U=O.gitBranch?` \xB7 ${O.gitBranch}`:"",C;if(q[23]!==O.messageCount||q[24]!==B||q[25]!==U)C=Q(y,{children:[B," \xB7"," ",O.messageCount," messages",U]},void 0,!0,void 0,this),q[23]=O.messageCount,q[24]=B,q[25]=U,q[26]=C;else C=q[26];let fq;if(q[27]===Symbol.for("react.memo_cache_sentinel"))fq=Q(y,{dimColor:!0,children:Q(Dq,{children:[Q(_q,{shortcut:"Enter",action:"resume"},void 0,!1,void 0,this),Q(Nq,{action:"confirm:no",context:"Confirmation",fallback:"Esc",description:"cancel"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)},void 0,!1,void 0,this),q[27]=fq;else fq=q[27];let A;if(q[28]!==C)A=Q(R,{flexShrink:0,flexDirection:"column",borderTopDimColor:!0,borderBottom:!1,borderLeft:!1,borderRight:!1,borderStyle:"single",paddingLeft:2,children:[C,fq]},void 0,!0,void 0,this),q[28]=C,q[29]=A;else A=q[29];let hq;if(q[30]!==l||q[31]!==A)hq=Q(R,{flexDirection:"column",children:[l,A]},void 0,!0,void 0,this),q[30]=l,q[31]=A,q[32]=hq;else hq=q[32];return hq}var v8=j6(()=>{jK();z8();Pz();GK();_K();P8();j8();K8();jz();Oz()});import{jsxDEV as O6}from"react/jsx-dev-runtime";function Yz(K,q){if(K===LK)return LK.length+w6;let j=RK(K),v=q?Math.min(j,q-w6-SK):j;return Math.max(0,v)+w6+SK}function kz(K,q){let j=q-w6-SK;if(RK(K)<=j)return K;if(j<=1)return K.charAt(0);return fK(K,j)}function $8({tabs:K,selectedIndex:q,availableWidth:j,showAllProjects:v=!1}){let M=v?"Resume (All Projects)":"Resume",Y=M.length+1,X=Math.max(vz,Mz),D=j-Y-X-2,u=Math.max(0,Math.min(q,K.length-1)),I=Math.max(20,Math.floor(D/2)),O=K.map((N)=>Yz(N,I)),p=0,J=K.length;if(O.reduce((N,G,Z)=>N+G+(Z<O.length-1?1:0),0)>D){let N=D-wz,G=O[u]??0;p=u,J=u+1;while(p>0||J<K.length){let Z=p>0,d=J<K.length;if(Z){let V=(O[p-1]??0)+1;if(G+V<=N){p--,G+=V;continue}}if(d){let V=(O[J]??0)+1;if(G+V<=N){J++,G+=V;continue}}break}}let m=p,Kq=K.length-J,L=K.slice(p,J),b=L.map((N,G)=>p+G);return O6(R,{flexDirection:"row",gap:1,children:[O6(y,{color:"suggestion",children:M},void 0,!1,void 0,this),m>0&&O6(y,{dimColor:!0,children:[M8,m]},void 0,!0,void 0,this),L.map((N,G)=>{let d=b[G]===u,V=N===LK?N:`#${kz(N,I-w6)}`;return O6(y,{backgroundColor:d?"suggestion":void 0,color:d?"inverseText":void 0,bold:d,children:[" ",V," "]},N,!0,void 0,this)}),Kq>0?O6(y,{dimColor:!0,children:[Y8,Kq,k8]},void 0,!0,void 0,this):O6(y,{dimColor:!0,children:J8},void 0,!1,void 0,this)]},void 0,!0,void 0,this)}var LK="All",w6=2,SK=1,M8="\u2190 ",Y8="\u2192",k8=" (tab to cycle)",J8="(tab to cycle)",H8=2,wz,vz,Mz;var T8=j6(()=>{fz();jK();GK();wz=M8.length+H8+1,vz=Y8.length+H8+k8.length,Mz=J8.length});import{c as Jz}from"react/compiler-runtime";import bK from"react";import{jsxDEV as p8}from"react/jsx-dev-runtime";function D8(K){let q=Jz(48),{nodes:j,onSelect:v,onCancel:M,onFocus:Y,focusNodeId:X,visibleOptionCount:D,layout:u,isDisabled:I,hideIndexes:O,isNodeExpanded:p,onExpand:J,onCollapse:n,getParentPrefix:m,getChildPrefix:Kq,onUpFromFirstItem:L}=K,b=u===void 0?"expanded":u,N=I===void 0?!1:I,G=O===void 0?!1:O,Z;if(q[0]===Symbol.for("react.memo_cache_sentinel"))Z=new Set,q[0]=Z;else Z=q[0];let[d,V]=bK.useState(Z),l=bK.useRef(!1),B=bK.useRef(null),U;if(q[1]!==d||q[2]!==p)U=(k)=>{if(p)return p(k);return d.has(k)},q[1]=d,q[2]=p,q[3]=U;else U=q[3];let C=U,fq;if(q[4]!==C||q[5]!==j){let k=function(T,vq,Zq){let Eq=!!T.children&&T.children.length>0,Cq=C(T.id);if(fq.push({node:T,depth:vq,isExpanded:Cq,hasChildren:Eq,parentId:Zq}),Eq&&Cq&&T.children)for(let f of T.children)k(f,vq+1,T.id)};fq=[];for(let T of j)k(T,0);q[4]=C,q[5]=j,q[6]=fq}else fq=q[6];let A=fq,hq=$z,a=Hz,Mq=m??hq,g=Kq??a,aq;if(q[7]!==g||q[8]!==Mq)aq=(k)=>{let T="";if(k.hasChildren)T=Mq(k.isExpanded);else if(k.depth>0)T=g(k.depth);return T+k.node.label},q[7]=g,q[8]=Mq,q[9]=aq;else aq=q[9];let s=aq,iq;if(q[10]!==s||q[11]!==A)iq=A.map((k)=>({label:s(k),description:k.node.description,dimDescription:k.node.dimDescription??!0,value:k.node.id})),q[10]=s,q[11]=A,q[12]=iq;else iq=q[12];let rq=iq,mq;if(q[13]!==A)mq=new Map,A.forEach((k)=>mq.set(k.node.id,k.node)),q[13]=A,q[14]=mq;else mq=q[14];let i=mq,Yq;if(q[15]!==A)Yq=(k)=>A.find((T)=>T.node.id===k),q[15]=A,q[16]=Yq;else Yq=q[16];let kq=Yq,Iq;if(q[17]!==kq||q[18]!==n||q[19]!==J)Iq=(k,T)=>{let vq=kq(k);if(!vq||!vq.hasChildren)return;if(T)if(J)J(k);else V((Zq)=>new Set(Zq).add(k));else if(n)n(k);else V((Zq)=>{let Eq=new Set(Zq);return Eq.delete(k),Eq})},q[17]=kq,q[18]=n,q[19]=J,q[20]=Iq;else Iq=q[20];let Jq=Iq,wq;if(q[21]!==kq||q[22]!==X||q[23]!==N||q[24]!==i||q[25]!==Y||q[26]!==Jq)wq=(k)=>{if(!X||N)return;let T=kq(X);if(!T)return;if(k.key==="right"&&T.hasChildren)k.preventDefault(),Jq(X,!0);else if(k.key==="left"){if(T.hasChildren&&T.isExpanded)k.preventDefault(),Jq(X,!1);else if(T.parentId!==void 0){if(k.preventDefault(),l.current=!0,Jq(T.parentId,!1),Y){let vq=i.get(T.parentId);if(vq)Y(vq)}}}},q[21]=kq,q[22]=X,q[23]=N,q[24]=i,q[25]=Y,q[26]=Jq,q[27]=wq;else wq=q[27];let dq=wq,Hq;if(q[28]!==i||q[29]!==v)Hq=(k)=>{let T=i.get(k);if(!T)return;v(T)},q[28]=i,q[29]=v,q[30]=Hq;else Hq=q[30];let uq=Hq,zq;if(q[31]!==i||q[32]!==Y)zq=(k)=>{if(l.current){l.current=!1;return}if(B.current===k)return;if(B.current=k,Y){let T=i.get(k);if(T)Y(T)}},q[31]=i,q[32]=Y,q[33]=zq;else zq=q[33];let lq=zq,H;if(q[34]!==X||q[35]!==uq||q[36]!==lq||q[37]!==G||q[38]!==N||q[39]!==b||q[40]!==M||q[41]!==L||q[42]!==rq||q[43]!==D)H=p8(wK,{options:rq,onChange:uq,onFocus:lq,onCancel:M,defaultFocusValue:X,visibleOptionCount:D,layout:b,isDisabled:N,hideIndexes:G,onUpFromFirstItem:L},void 0,!1,void 0,this),q[34]=X,q[35]=uq,q[36]=lq,q[37]=G,q[38]=N,q[39]=b,q[40]=M,q[41]=L,q[42]=rq,q[43]=D,q[44]=H;else H=q[44];let c;if(q[45]!==dq||q[46]!==H)c=p8(R,{tabIndex:0,autoFocus:!0,onKeyDown:dq,children:H},void 0,!1,void 0,this),q[45]=dq,q[46]=H,q[47]=c;else c=q[47];return c}function Hz(K){return" \u25B8 "}function $z(K){return K?"\u25BC ":"\u25B6 "}var y8=j6(()=>{jK();X8()});import{c as Zz}from"react/compiler-runtime";import m8 from"chalk";import"figures";import W from"react";import{jsxDEV as _}from"react/jsx-dev-runtime";function a8(K,q){let j=K.replace(/\s+/g," ").trim();return fK(j,q)}function EK({before:K,match:q,after:j},v){return m8.dim(K)+v(q)+m8.dim(j)}function Ez(K,q,j){let v=K.toLowerCase().indexOf(q.toLowerCase());if(v===-1)return null;let M=v+q.length,Y=Math.max(0,v-j),X=Math.min(K.length,M+j),D=K.slice(Y,v),u=K.slice(v,M),I=K.slice(M,X);return{before:(Y>0?"\u2026":"")+D.replace(/\s+/g," ").trimStart(),match:u.trim(),after:I.replace(/\s+/g," ").trimEnd()+(X<K.length?"\u2026":"")}}function CK(K,q,j){let{isGroupHeader:v=!1,isChild:M=!1,forkCount:Y=0}=j||{},X=v&&Y>0?Gz:M?Lz:0,D=v&&Y>0?` (+${Y} other ${Y===1?"session":"sessions"})`:"",u=K.isSidechain?" (sidechain)":"",I=q-X-u.length-D.length;return`${a8(bq(K),I)}${u}${D}`}function nK(K,q){let{isChild:j=!1,showProjectPath:v=!1}=q||{},M=j?" ":"",Y=VK(K),X=v&&K.projectPath?` \xB7 ${K.projectPath}`:"";return M+Y+X}function w7(K){let q=Zz(247),{logs:j,maxHeight:v,forceWidth:M,onCancel:Y,onSelect:X,onLogsChanged:D,onLoadMore:u,initialSearchQuery:I,showAllProjects:O,onToggleAllProjects:p,onAgenticSearch:J}=K,n=v===void 0?1/0:v,m=O===void 0?!1:O,Kq=b8(),L=M===void 0?Kq.columns:M,b=E8(Y),N=L8(),G;if(q[0]===Symbol.for("react.memo_cache_sentinel"))G=i8(),q[0]=G;else G=q[0];let Z=G,d=!1,[V]=Z8(),l;if(q[1]!==V)l=S8(V),q[1]=V,q[2]=l;else l=q[2];let B=l,U;if(q[3]!==B.warning)U=(z)=>G8(z,B.warning),q[3]=B.warning,q[4]=U;else U=q[4];let C=U,fq=!1,[A,hq]=W.useState(null),[a,Mq]=W.useState(!1),[g,aq]=W.useState(!1),[s,iq]=W.useState(!1),rq;if(q[5]===Symbol.for("react.memo_cache_sentinel"))rq=vK(),q[5]=rq;else rq=q[5];let mq=rq,[i,Yq]=W.useState(""),[kq,Iq]=W.useState(0),Jq;if(q[6]===Symbol.for("react.memo_cache_sentinel"))Jq=new Set,q[6]=Jq;else Jq=q[6];let[wq,dq]=W.useState(Jq),[Hq,uq]=W.useState(null),[zq,lq]=W.useState(1),[H,c]=W.useState("list"),[k,T]=W.useState(null),vq=W.useRef(null),[Zq,Eq]=W.useState(0),Cq;if(q[7]===Symbol.for("react.memo_cache_sentinel"))Cq={status:"idle"},q[7]=Cq;else Cq=q[7];let[f,_6]=W.useState(Cq),[e,v6]=W.useState(!1),M6=W.useRef(null),MK=H==="search"&&f.status!=="searching",Y6,k6,J6;if(q[8]===Symbol.for("react.memo_cache_sentinel"))Y6=()=>{c("list"),o("tengu_session_search_toggled",{enabled:!1})},k6=()=>{c("list"),o("tengu_session_search_toggled",{enabled:!1})},J6=["n"],q[8]=Y6,q[9]=k6,q[10]=J6;else Y6=q[8],k6=q[9],J6=q[10];let YK=I||"",H6;if(q[11]!==YK||q[12]!==MK)H6={isActive:MK,onExit:Y6,onExitUp:k6,passthroughCtrlKeys:J6,initialQuery:YK},q[11]=YK,q[12]=MK,q[13]=H6;else H6=q[13];let{query:h,setQuery:gq,cursorOffset:kK}=c8(H6),Gq=W.useDeferredValue(h),[Pq,IK]=W.useState(""),$6,T6;if(q[14]!==Gq)$6=()=>{if(!Gq){IK("");return}let z=setTimeout(IK,300,Gq);return()=>clearTimeout(z)},T6=[Gq],q[14]=Gq,q[15]=$6,q[16]=T6;else $6=q[15],T6=q[16];W.useEffect($6,T6);let[Lq,dK]=W.useState(null),[JK,lK]=W.useState(!1),p6,X6;if(q[17]===Symbol.for("react.memo_cache_sentinel"))p6=()=>{u8().then((z)=>hq(z)),o8(mq).then((z)=>{iq(z.length>1)})},X6=[mq],q[17]=p6,q[18]=X6;else p6=q[17],X6=q[18];W.useEffect(p6,X6);let jP=new Map(j.map(az)),e8;e8=null;let D6;if(q[19]!==j)D6=lz(j),q[19]=j,q[20]=D6;else D6=q[20];let nq=D6,$q=nq.length>0,y6;if(q[21]!==$q||q[22]!==nq)y6=$q?["All",...nq]:[],q[21]=$q,q[22]=nq,q[23]=y6;else y6=q[23];let jq=y6,m6=jq.length>0&&Zq<jq.length?Zq:0,gK=jq[m6],sq=gK==="All"?void 0:gK,F8=$q?1:0,t=j;if(Z){let z;if(q[24]!==j)z=j.filter(oz),q[24]=j,q[25]=z;else z=q[25];t=z}if(sq!==void 0){let z;if(q[26]!==t||q[27]!==sq){let P;if(q[29]!==sq)P=(w)=>w.tag===sq,q[29]=sq,q[30]=P;else P=q[30];z=t.filter(P),q[26]=t,q[27]=sq,q[28]=z}else z=q[28];t=z}if(a&&A){let z;if(q[31]!==A||q[32]!==t){let P;if(q[34]!==A)P=(w)=>w.gitBranch===A,q[34]=A,q[35]=P;else P=q[35];z=t.filter(P),q[31]=A,q[32]=t,q[33]=z}else z=q[33];t=z}if(s&&!g){let z;if(q[36]!==t){let P;if(q[38]===Symbol.for("react.memo_cache_sentinel"))P=(w)=>w.projectPath===mq,q[38]=P;else P=q[38];z=t.filter(P),q[36]=t,q[37]=z}else z=q[37];t=z}let A6=t,HK;q:{if(!h){HK=A6;break q}let z;if(q[39]!==A6||q[40]!==h){let P=h.toLowerCase();z=A6.filter((w)=>{let r=bq(w).toLowerCase(),E=(w.gitBranch||"").toLowerCase(),x=(w.tag||"").toLowerCase(),cq=w.prNumber?`pr #${w.prNumber} ${w.prRepository||""}`.toLowerCase():"";return r.includes(P)||E.includes(P)||x.includes(P)||cq.includes(P)}),q[39]=A6,q[40]=h,q[41]=z}else z=q[41];HK=z}let $K=HK,W6,N6;if(q[42]!==Pq||q[43]!==Gq)W6=()=>{},N6=[Gq,Pq,!1],q[42]=Pq,q[43]=Gq,q[44]=W6,q[45]=N6;else W6=q[44],N6=q[45];W.useEffect(W6,N6);let h6,r6;if(q[46]!==Pq)h6=()=>{dK(null),lK(!1);return},r6=[Pq,null,!1],q[46]=Pq,q[47]=h6,q[48]=r6;else h6=q[47],r6=q[48];W.useEffect(h6,r6);let F,Vq;if(q[49]!==Pq||q[50]!==Lq||q[51]!==$K){if(Vq=new Map,F=$K,Lq&&Pq&&Lq.query===Pq){for(let r of Lq.results)if(r.searchableText){let E=Ez(r.searchableText,Pq,bz);if(E)Vq.set(r.log,E)}let z;if(q[54]!==F)z=new Set(F.map(nz)),q[54]=F,q[55]=z;else z=q[55];let P=z,w;if(q[56]!==Lq.results||q[57]!==F||q[58]!==P){let r;if(q[60]!==P)r=(x)=>!P.has(x.messages[0]?.uuid),q[60]=P,q[61]=r;else r=q[61];let E=Lq.results.map(Cz).filter(r);w=[...F,...E],q[56]=Lq.results,q[57]=F,q[58]=P,q[59]=w}else w=q[59];F=w}q[49]=Pq,q[50]=Lq,q[51]=$K,q[52]=F,q[53]=Vq}else F=q[52],Vq=q[53];let u6;if(q[62]!==F||q[63]!==Vq)u6={filteredLogs:F,snippets:Vq},q[62]=F,q[63]=Vq,q[64]=u6;else u6=q[64];let{filteredLogs:xq,snippets:Aq}=u6,TK;q:{if(f.status==="results"&&f.results.length>0){TK=f.results;break q}TK=xq}let $=TK,Tq=Math.max(30,L-4),pK;q:{if(!Z){let P;if(q[65]===Symbol.for("react.memo_cache_sentinel"))P=[],q[65]=P;else P=q[65];pK=P;break q}let z;if(q[66]!==$||q[67]!==C||q[68]!==Tq||q[69]!==m||q[70]!==Aq){let P=dz($);z=Array.from(P.entries()).map((w)=>{let[r,E]=w,x=E[0],cq=$.indexOf(x),Sq=Aq.get(x),Wq=Sq?EK(Sq,C):null;if(E.length===1){let Rq=nK(x,{showProjectPath:m});return{id:`log:${r}:0`,value:{log:x,indexInFiltered:cq},label:CK(x,Tq),description:Wq?`${Rq}
3
3
  ${Wq}`:Rq,dimDescription:!0}}let zK=E.length-1,PK=E.slice(1).map((Rq,Kz)=>{let zz=$.indexOf(Rq),UK=Aq.get(Rq),eK=UK?EK(UK,C):null,FK=nK(Rq,{isChild:!0,showProjectPath:m});return{id:`log:${r}:${Kz+1}`,value:{log:Rq,indexInFiltered:zz},label:CK(Rq,Tq,{isChild:!0}),description:eK?`${FK}
4
4
  ${eK}`:FK,dimDescription:!0}}),BK=nK(x,{showProjectPath:m});return{id:`group:${r}`,value:{log:x,indexInFiltered:cq},label:CK(x,Tq,{isGroupHeader:!0,forkCount:zK}),description:Wq?`${BK}
5
5
  ${Wq}`:BK,dimDescription:!0,children:PK}}),q[66]=$,q[67]=C,q[68]=Tq,q[69]=m,q[70]=Aq,q[71]=z}else z=q[71];pK=z}let pq=pK,XK;q:{if(Z){let P;if(q[72]===Symbol.for("react.memo_cache_sentinel"))P=[],q[72]=P;else P=q[72];XK=P;break q}let z;if(q[73]!==$||q[74]!==C||q[75]!==Tq||q[76]!==m||q[77]!==Aq){let P;if(q[79]!==C||q[80]!==Tq||q[81]!==m||q[82]!==Aq)P=(w,r)=>{let x=bq(w)+(w.isSidechain?" (sidechain)":""),cq=a8(x,Tq),Sq=VK(w),Wq=m&&w.projectPath?` \xB7 ${w.projectPath}`:"",zK=Aq.get(w),PK=zK?EK(zK,C):null;return{label:cq,description:PK?`${Sq}${Wq}
@@ -1,5 +1,5 @@
1
1
  // @bun
2
- import{Lj as v,Mj as M,UE as U,WB as F,XB as x,YE as B}from"./cli-5pb6kdxn.js";import{$V as P,eU as j,lU as A}from"./cli-9hskw92e.js";import{f6 as G,l6 as b}from"./cli-dx46fn1w.js";import{bda as V}from"./cli-x514vyva.js";async function C(Y){let{messages:K,getAppState:W,options:{mainLoopModel:R,tools:L,agentDefinitions:N,customSystemPrompt:Z,appendSystemPrompt:_,estimateOnly:$}}=Y,Q=U(K),{messages:I}=await v(Q),X=W();return F(I,R,async()=>X.toolPermissionContext,L,N,void 0,{options:{customSystemPrompt:Z,appendSystemPrompt:_}},void 0,Q,{estimateOnly:$})}async function m(Y,K){let W=await C(K);return{type:"text",value:D(W)}}function D(Y){let{categories:K,totalTokens:W,rawMaxTokens:R,percentage:L,model:N,memoryFiles:Z,mcpTools:_,agents:$,skills:Q,messageBreakdown:I,systemTools:X,systemPromptSections:z}=Y,q=`## Context Usage
2
+ import{Lj as v,Mj as M,RE as U,TB as F,UB as x,VE as B}from"./cli-me4e2p3e.js";import{cW as P,hU as j,oU as A}from"./cli-msmzt4c3.js";import{j6 as G,p6 as b}from"./cli-51720d82.js";import{fda as V}from"./cli-w1d8n9g3.js";async function C(Y){let{messages:K,getAppState:W,options:{mainLoopModel:R,tools:L,agentDefinitions:N,customSystemPrompt:Z,appendSystemPrompt:_,estimateOnly:$}}=Y,Q=U(K),{messages:I}=await v(Q),X=W();return F(I,R,async()=>X.toolPermissionContext,L,N,void 0,{options:{customSystemPrompt:Z,appendSystemPrompt:_}},void 0,Q,{estimateOnly:$})}async function m(Y,K){let W=await C(K);return{type:"text",value:D(W)}}function D(Y){let{categories:K,totalTokens:W,rawMaxTokens:R,percentage:L,model:N,memoryFiles:Z,mcpTools:_,agents:$,skills:Q,messageBreakdown:I,systemTools:X,systemPromptSections:z}=Y,q=`## Context Usage
3
3
 
4
4
  `;q+=`**Model:** ${N}
5
5
  `,q+=`**Tokens:** ${G(W)} / ${G(R)} (${L}%)
@@ -1,3 +1,3 @@
1
1
  // @bun
2
- import{Bn as a,CC as x,DC as A,EC as p,PC as P,SC as n,SD as D,Uy as W,VD as r,Vy as i,gx as O,hx as t,ij as y,lx as R,nj as u,nx as l,tw as M,zn as K,zw as o}from"./cli-5pb6kdxn.js";import{B8 as m,w8 as $}from"./cli-3bxtq5dc.js";import{T9 as Z,Z9 as d,r_ as J,u_ as v}from"./cli-a98b285v.js";import{V_ as X,Z_ as c,Zca as g,g$ as Y}from"./cli-w754xmyv.js";import{bda as h}from"./cli-x514vyva.js";async function Tj(w){J("refreshActivePlugins: clearing settings and plugin caches"),X(),P(),W();let H=await D(),[E,F,G]=await Promise.all([x(),A(),y(Y())]),z=[...E,...F],{enabled:B,disabled:L,errors:I}=H,[S,k]=await Promise.all([Promise.all(B.map(async(j)=>{if(j.mcpServers)return Object.keys(j.mcpServers).length;let q=await K(j,I);if(q)j.mcpServers=q;return q?Object.keys(q).length:0})),Promise.all(B.map(async(j)=>{if(j.lspServers)return Object.keys(j.lspServers).length;let q=await O(j,I);if(q)j.lspServers=q;return q?Object.keys(q).length:0}))]),N=S.reduce((j,q)=>j+q,0),Q=k.reduce((j,q)=>j+q,0);w((j)=>({...j,plugins:{...j.plugins,enabled:B,disabled:L,commands:z,errors:s(j.plugins.errors,I),needsRefresh:!1},agentDefinitions:G,mcp:{...j.mcp,pluginReconnectKey:j.mcp.pluginReconnectKey+1}})),R();let T=!1;try{await M()}catch(j){T=!0,$(j),J(`refreshActivePlugins: loadPluginHooks failed: ${Z(j)}`)}let U=B.reduce((j,q)=>{if(!q.hooksConfig)return j;return j+Object.values(q.hooksConfig).reduce((b,C)=>b+(C?.reduce((_,f)=>_+f.hooks.length,0)??0),0)},0);return J(`refreshActivePlugins: ${B.length} enabled, ${E.length} commands, ${G.allAgents.length} agents, ${U} hooks, ${N} MCP, ${Q} LSP`),{enabled_count:B.length,disabled_count:L.length,command_count:E.length,skill_count:F.length,agent_count:G.allAgents.length,hook_count:U,mcp_count:N,lsp_count:Q,error_count:I.length+(T?1:0),agentDefinitions:G,pluginCommands:z,pluginSkills:F}}function s(w,H){let E=w.filter((z)=>z.source==="lsp-manager"||z.source.startsWith("plugin:")),F=new Set(H.map(V));return[...E.filter((z)=>!F.has(V(z))),...H]}function V(w){return w.type==="generic-error"?`generic-error:${w.source}:${w.error}`:`${w.type}:${w.source}`}var e=h(()=>{g();l();u();v();d();m();c();n();p();o();t();a();i();r()});
3
- export{Tj as pb,e as qb};
2
+ import{AC as A,BC as p,Bn as a,MC as P,PC as n,PD as D,Ry as W,SD as r,Sy as i,dx as O,ex as t,ij as y,ix as R,kx as l,nj as u,qw as M,ww as o,zC as x,zn as K}from"./cli-me4e2p3e.js";import{E8 as $,J8 as m}from"./cli-4ewb3q42.js";import{X9 as Z,b_ as d,v_ as J,y_ as v}from"./cli-hke6r0q8.js";import{Z_ as X,b$ as c,bda as g,k$ as Y}from"./cli-3ac555qw.js";import{fda as h}from"./cli-w1d8n9g3.js";async function Tj(w){J("refreshActivePlugins: clearing settings and plugin caches"),X(),P(),W();let H=await D(),[E,F,G]=await Promise.all([x(),A(),y(Y())]),z=[...E,...F],{enabled:B,disabled:L,errors:I}=H,[S,k]=await Promise.all([Promise.all(B.map(async(j)=>{if(j.mcpServers)return Object.keys(j.mcpServers).length;let q=await K(j,I);if(q)j.mcpServers=q;return q?Object.keys(q).length:0})),Promise.all(B.map(async(j)=>{if(j.lspServers)return Object.keys(j.lspServers).length;let q=await O(j,I);if(q)j.lspServers=q;return q?Object.keys(q).length:0}))]),N=S.reduce((j,q)=>j+q,0),Q=k.reduce((j,q)=>j+q,0);w((j)=>({...j,plugins:{...j.plugins,enabled:B,disabled:L,commands:z,errors:s(j.plugins.errors,I),needsRefresh:!1},agentDefinitions:G,mcp:{...j.mcp,pluginReconnectKey:j.mcp.pluginReconnectKey+1}})),R();let T=!1;try{await M()}catch(j){T=!0,$(j),J(`refreshActivePlugins: loadPluginHooks failed: ${Z(j)}`)}let U=B.reduce((j,q)=>{if(!q.hooksConfig)return j;return j+Object.values(q.hooksConfig).reduce((b,C)=>b+(C?.reduce((_,f)=>_+f.hooks.length,0)??0),0)},0);return J(`refreshActivePlugins: ${B.length} enabled, ${E.length} commands, ${G.allAgents.length} agents, ${U} hooks, ${N} MCP, ${Q} LSP`),{enabled_count:B.length,disabled_count:L.length,command_count:E.length,skill_count:F.length,agent_count:G.allAgents.length,hook_count:U,mcp_count:N,lsp_count:Q,error_count:I.length+(T?1:0),agentDefinitions:G,pluginCommands:z,pluginSkills:F}}function s(w,H){let E=w.filter((z)=>z.source==="lsp-manager"||z.source.startsWith("plugin:")),F=new Set(H.map(V));return[...E.filter((z)=>!F.has(V(z))),...H]}function V(w){return w.type==="generic-error"?`generic-error:${w.source}:${w.error}`:`${w.type}:${w.source}`}var e=h(()=>{g();l();u();v();d();m();c();n();p();o();t();a();i();r()});
3
+ export{Tj as ub,e as vb};
@@ -1,4 +1,4 @@
1
1
  // @bun
2
- import{C8 as F,F8 as x}from"./cli-6xmbrh42.js";import{B_ as M,O_ as I}from"./cli-1qszxdan.js";import{bda as z}from"./cli-x514vyva.js";import{execFile as D}from"child_process";import{promisify as A}from"util";async function R(q){try{let{stdout:Q}=await m("git",["worktree","list","--porcelain"],{cwd:q,timeout:5000});if(!Q)return[];return Q.split(`
2
+ import{K8 as F,N8 as x}from"./cli-xmgm2573.js";import{F_ as M,S_ as I}from"./cli-tq5z9qv3.js";import{fda as z}from"./cli-w1d8n9g3.js";import{execFile as D}from"child_process";import{promisify as A}from"util";async function R(q){try{let{stdout:Q}=await m("git",["worktree","list","--porcelain"],{cwd:q,timeout:5000});if(!Q)return[];return Q.split(`
3
3
  `).filter((V)=>V.startsWith("worktree ")).map((V)=>V.slice(9).normalize("NFC"))}catch{return[]}}var m;var U=z(()=>{m=A(D)});import{open as N,readdir as e,realpath as t,stat as s}from"fs/promises";import{join as y}from"path";function Vq(q){if(typeof q!=="string")return null;return _.test(q)?q:null}function j(q){if(!q.includes("\\"))return q;try{return JSON.parse(`"${q}"`)}catch{return q}}function Yq(q,Q){let V=[`"${Q}":"`,`"${Q}": "`];for(let Y of V){let $=q.indexOf(Y);if($<0)continue;let J=$+Y.length,G=J;while(G<q.length){if(q[G]==="\\"){G+=2;continue}if(q[G]==='"')return j(q.slice(J,G));G++}}return}function Gq(q,Q){let V=[`"${Q}":"`,`"${Q}": "`],Y;for(let $ of V){let J=0;while(!0){let G=q.indexOf($,J);if(G<0)break;let K=G+$.length,v=K;while(v<q.length){if(q[v]==="\\"){v+=2;continue}if(q[v]==='"'){Y=j(q.slice(K,v));break}v++}J=v+1}}return Y}async function vq(q,Q,V){try{let Y=await N(q,"r");try{let $=await Y.read(V,0,g,0);if($.bytesRead===0)return{head:"",tail:""};let J=V.toString("utf8",0,$.bytesRead),G=Math.max(0,Q-g),K=J;if(G>0){let v=await Y.read(V,0,g,G);K=V.toString("utf8",0,v.bytesRead)}return{head:J,tail:K}}finally{await Y.close()}}catch{return{head:"",tail:""}}}function k(q){return Math.abs(F(q)).toString(36)}function Kq(q){let Q=q.replace(/[^a-zA-Z0-9]/g,"-");if(Q.length<=L)return Q;let V=typeof Bun<"u"?Bun.hash(q).toString(36):k(q);return`${Q.slice(0,L)}-${V}`}function Wq(){return y(M(),"projects")}function p(){return E??=Buffer.from('"compact_boundary"')}function w(q){try{let Q=JSON.parse(q);if(Q.type!=="system"||Q.subtype!=="compact_boundary")return null;return{hasPreservedSegment:Boolean(Q.compactMetadata?.preservedSegment)}}catch{return null}}function H(q,Q,V,Y){let $=Y-V;if($<=0)return;if(q.len+$>q.buf.length){let J=Buffer.allocUnsafe(Math.min(Math.max(q.buf.length*2,q.len+$),q.cap));q.buf.copy(J,0,0,q.len),q.buf=J}Q.copy(q.buf,q.len,V,Y),q.len+=$}function Z(q,Q,V,Y){return Y-V>=Q.length&&q.compare(Q,0,Q.length,V,V+Q.length)===0}function o(q,Q,V){if(q.straddleSnapCarryLen=0,q.straddleSnapTailEnd=0,q.carryLen===0)return 0;let Y=q.carryBuf,$=Q.indexOf(C);if($===-1||$>=V)return 0;let J=$+1;if(Z(Y,O,0,q.carryLen))q.straddleSnapCarryLen=q.carryLen,q.straddleSnapTailEnd=J,q.lastSnapSrc=null;else if(q.carryLen<O.length)return 0;else{if(Z(Y,S,0,q.carryLen)){let G=w(Y.toString("utf-8",0,q.carryLen)+Q.toString("utf-8",0,$));if(G?.hasPreservedSegment)q.hasPreservedSegment=!0;else if(G)q.out.len=0,q.boundaryStartOffset=q.bufFileOff,q.hasPreservedSegment=!1,q.lastSnapSrc=null}H(q.out,Y,0,q.carryLen),H(q.out,Q,0,J)}return q.bufFileOff+=q.carryLen+J,q.carryLen=0,J}function c(q,Q,V){let Y=Q.indexOf(V),$=0,J=0,G=-1,K=-1,v=Q.indexOf(C);while(v!==-1){let X=v+1;if(Y!==-1&&Y<J)Y=Q.indexOf(V,J);if(Z(Q,O,J,X))H(q.out,Q,$,J),G=J,K=X,$=X;else if(Y>=J&&Y<Math.min(J+h,X)){let W=w(Q.toString("utf-8",J,v));if(W?.hasPreservedSegment)q.hasPreservedSegment=!0;else if(W)q.out.len=0,q.boundaryStartOffset=q.bufFileOff+J,q.hasPreservedSegment=!1,q.lastSnapSrc=null,G=-1,q.straddleSnapCarryLen=0,$=J;Y=Q.indexOf(V,Y+V.length)}J=X,v=Q.indexOf(C,J)}return H(q.out,Q,$,J),{lastSnapStart:G,lastSnapEnd:K,trailStart:J}}function f(q,Q,V,Y,$){if(Y!==-1){if(q.lastSnapLen=$-Y,q.lastSnapBuf===void 0||q.lastSnapLen>q.lastSnapBuf.length)q.lastSnapBuf=Buffer.allocUnsafe(q.lastSnapLen);Q.copy(q.lastSnapBuf,0,Y,$),q.lastSnapSrc=q.lastSnapBuf}else if(q.straddleSnapCarryLen>0){if(q.lastSnapLen=q.straddleSnapCarryLen+q.straddleSnapTailEnd,q.lastSnapBuf===void 0||q.lastSnapLen>q.lastSnapBuf.length)q.lastSnapBuf=Buffer.allocUnsafe(q.lastSnapLen);q.carryBuf.copy(q.lastSnapBuf,0,0,q.straddleSnapCarryLen),V.copy(q.lastSnapBuf,q.straddleSnapCarryLen,0,q.straddleSnapTailEnd),q.lastSnapSrc=q.lastSnapBuf}}function u(q,Q,V){if(q.carryLen=Q.length-V,q.carryLen>0){if(q.carryBuf===void 0||q.carryLen>q.carryBuf.length)q.carryBuf=Buffer.allocUnsafe(q.carryLen);Q.copy(q.carryBuf,0,V,Q.length)}}function d(q){if(q.carryLen>0){let Q=q.carryBuf;if(Z(Q,O,0,q.carryLen))q.lastSnapSrc=Q,q.lastSnapLen=q.carryLen;else H(q.out,Q,0,q.carryLen)}if(q.lastSnapSrc){if(q.out.len>0&&q.out.buf[q.out.len-1]!==C)H(q.out,b,0,1);H(q.out,q.lastSnapSrc,0,q.lastSnapLen)}}async function Hq(q,Q){let V=p(),Y=P,$={out:{buf:Buffer.allocUnsafe(Math.min(Q,8388608)),len:0,cap:Q+1},boundaryStartOffset:0,hasPreservedSegment:!1,lastSnapSrc:null,lastSnapLen:0,lastSnapBuf:void 0,bufFileOff:0,carryLen:0,carryBuf:void 0,straddleSnapCarryLen:0,straddleSnapTailEnd:0},J=Buffer.allocUnsafe(Y),G=await N(q,"r");try{let K=0;while(K<Q){let{bytesRead:v}=await G.read(J,0,Math.min(Y,Q-K),K);if(v===0)break;K+=v;let X=o($,J,v),W;if($.carryLen>0){let T=$.carryLen+(v-X);W=Buffer.allocUnsafe(T),$.carryBuf.copy(W,0,0,$.carryLen),J.copy(W,$.carryLen,X,v)}else W=J.subarray(X,v);let B=c($,W,V);f($,W,J,B.lastSnapStart,B.lastSnapEnd),u($,W,B.trailStart),$.bufFileOff+=B.trailStart}d($)}finally{await G.close()}return{boundaryStartOffset:$.boundaryStartOffset,postBoundaryBuf:$.out.buf.subarray(0,$.out.len),hasPreservedSegment:$.hasPreservedSegment}}var g=65536,_,L=200,P=1048576,Xq=5242880,E,O,S,C=10,b,h=256;var l=z(()=>{I();U();x();_=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;O=Buffer.from('{"type":"attribution-snapshot"'),S=Buffer.from('{"type":"system"'),b=Buffer.from([C])});
4
- export{R as d5,U as e5,g as f5,Vq as g5,Yq as h5,Gq as i5,vq as j5,Kq as k5,Wq as l5,Xq as m5,Hq as n5,l as o5};
4
+ export{R as P4,U as Q4,g as R4,Vq as S4,Yq as T4,Gq as U4,vq as V4,Kq as W4,Wq as X4,Xq as Y4,Hq as Z4,l as _4};
@@ -1,5 +1,5 @@
1
1
  // @bun
2
- import{ce as HJ,de as wQ}from"./cli-fqb71hy3.js";import{ee as wJ,fe as FQ}from"./cli-0s65jzgr.js";import{ge as RJ,he as HQ}from"./cli-22zbzzap.js";import{ie as xq,je as $J}from"./cli-x5z5m6y7.js";import{ke as Uq,le as rq,me as gJ}from"./cli-2qec7gn4.js";import{ne as FJ,oe as UQ}from"./cli-nykt265k.js";import{$r as YJ,Az as UJ,Bz as NQ,DF as l,Ex as XJ,Fx as XQ,GF as BQ,Gx as yJ,Hx as NJ,Ix as yQ,Nj as Bq,Oj as lq,Pr as QJ,Rj as $q,Rr as ZJ,Tr as zQ,VB as gq,Vj as DJ,XB as EJ,Xr as Mq,Yr as YQ,Zr as zJ,_r as GQ,ai as P,as as GJ,bi as _q,bs as KJ,cs as KQ,fn as uq,gn as mq,in as pq,jC as Oq,jn as kJ,kC as lJ,uh as tq,vh as qQ,zz as BJ}from"./cli-5pb6kdxn.js";import{YN as JJ,ZN as QQ}from"./cli-mejr8b5m.js";import{WO as qJ,XO as JQ,dP as Iq,eP as ZQ}from"./cli-s6qk3rbv.js";import{GQ as y,IQ as Z,iR as Pq}from"./cli-5wh173wa.js";import{$T as sJ,$V as TJ,BW as sq,FT as bq,KW as eJ,PV as cq,QV as dJ,SY as Eq,TV as Dq,oZ as cJ,t0 as eq,v0 as tJ}from"./cli-9hskw92e.js";import{B_ as nq,O_ as nJ}from"./cli-1qszxdan.js";import{Zca as oJ,g$ as oq}from"./cli-w754xmyv.js";import{bda as Nq}from"./cli-x514vyva.js";import{c as SJ}from"react/compiler-runtime";import{jsxDEV as B}from"react/jsx-dev-runtime";function Vq(){let J=SJ(2);if(!uq())return null;let q,K;if(J[0]===Symbol.for("react.memo_cache_sentinel")){K=Symbol.for("react.early_return_sentinel");q:{let Y=pq();if(Y.length===0){K=null;break q}let G=Y.filter(pJ),X=Y.filter(mJ);q=B(y,{flexDirection:"column",marginTop:1,marginBottom:1,children:[B(Z,{bold:!0,color:G.length>0?"error":"warning",children:"Keybinding Configuration Issues"},void 0,!1,void 0,this),B(y,{children:[B(Z,{dimColor:!0,children:"Location: "},void 0,!1,void 0,this),B(Z,{dimColor:!0,children:mq()},void 0,!1,void 0,this)]},void 0,!0,void 0,this),B(y,{marginLeft:1,flexDirection:"column",marginTop:1,children:[G.map(uJ),X.map(fJ)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)}J[0]=q,J[1]=K}else q=J[0],K=J[1];if(K!==Symbol.for("react.early_return_sentinel"))return K;return q}function fJ(J,q){return B(y,{flexDirection:"column",children:[B(y,{children:[B(Z,{dimColor:!0,children:"\u2514 "},void 0,!1,void 0,this),B(Z,{color:"warning",children:"[Warning]"},void 0,!1,void 0,this),B(Z,{dimColor:!0,children:[" ",J.message]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),J.suggestion&&B(y,{marginLeft:3,children:B(Z,{dimColor:!0,children:["\u2192 ",J.suggestion]},void 0,!0,void 0,this)},void 0,!1,void 0,this)]},`warning-${q}`,!0,void 0,this)}function uJ(J,q){return B(y,{flexDirection:"column",children:[B(y,{children:[B(Z,{dimColor:!0,children:"\u2514 "},void 0,!1,void 0,this),B(Z,{color:"error",children:"[Error]"},void 0,!1,void 0,this),B(Z,{dimColor:!0,children:[" ",J.message]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),J.suggestion&&B(y,{marginLeft:3,children:B(Z,{dimColor:!0,children:["\u2192 ",J.suggestion]},void 0,!0,void 0,this)},void 0,!1,void 0,this)]},`error-${q}`,!0,void 0,this)}function mJ(J){return J.severity==="warning"}function pJ(J){return J.severity==="error"}var jq=Nq(()=>{Pq();kJ()});import{c as VJ}from"react/compiler-runtime";import{jsxDEV as L}from"react/jsx-dev-runtime";function dq(){let J=VJ(2);if(!P.isSupportedPlatform())return null;if(!P.isSandboxEnabledInSettings())return null;let q,K;if(J[0]===Symbol.for("react.memo_cache_sentinel")){K=Symbol.for("react.early_return_sentinel");q:{let Y=P.checkDependencies(),G=Y.errors.length>0,X=Y.warnings.length>0;if(!G&&!X){K=null;break q}q=L(y,{flexDirection:"column",children:[L(Z,{bold:!0,children:"Sandbox"},void 0,!1,void 0,this),L(Z,{children:["\u2514 Status: ",L(Z,{color:G?"error":"warning",children:G?"Missing dependencies":"Available (with warnings)"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),Y.errors.map(_J),Y.warnings.map(jJ),G&&L(Z,{dimColor:!0,children:"\u2514 Run /sandbox for install instructions"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)}J[0]=q,J[1]=K}else q=J[0],K=J[1];if(K!==Symbol.for("react.early_return_sentinel"))return K;return q}function jJ(J,q){return L(Z,{color:"warning",children:["\u2514 ",J]},q,!0,void 0,this)}function _J(J,q){return L(Z,{color:"error",children:["\u2514 ",J]},q,!0,void 0,this)}var Tq=Nq(()=>{Pq();_q()});async function xJ(){let J=$q(await lq());if(J.length===0)return null;let q=J.sort((Y,G)=>G.content.length-Y.content.length).map((Y)=>`${Y.path}: ${Y.content.length.toLocaleString()} chars`);return{type:"claudemd_files",severity:"warning",message:J.length===1?`Large CLAUDE.md file detected (${J[0].content.length.toLocaleString()} chars > ${Bq.toLocaleString()})`:`${J.length} large CLAUDE.md files detected (each > ${Bq.toLocaleString()} chars)`,details:q,currentValue:J.length,threshold:Bq}}async function rJ(J){if(!J)return null;let q=rq(J);if(q<=Uq)return null;let K=J.activeAgents.filter((G)=>G.source!=="built-in").map((G)=>{let X=`${G.agentType}: ${G.whenToUse}`;return{name:G.agentType,tokens:Oq(X)}}).sort((G,X)=>X.tokens-G.tokens),Y=K.slice(0,5).map((G)=>`${G.name}: ~${G.tokens.toLocaleString()} tokens`);if(K.length>5)Y.push(`(${K.length-5} more custom agents)`);return{type:"agent_descriptions",severity:"warning",message:`Large agent descriptions (~${q.toLocaleString()} tokens > ${Uq.toLocaleString()})`,details:Y,currentValue:q,threshold:Uq}}async function aJ(J,q,K){let Y=J.filter((G)=>G.isMcp);if(Y.length===0)return null;try{let G=Eq(),{mcpToolTokens:X,mcpToolDetails:U}=await gq(J,q,K,G);if(X<=E)return null;let F=new Map;for(let R of U){let $=R.name.split("__")[1]||"unknown",N=F.get($)||{count:0,tokens:0};F.set($,{count:N.count+1,tokens:N.tokens+R.tokens})}let H=Array.from(F.entries()).sort((R,w)=>w[1].tokens-R[1].tokens),z=H.slice(0,5).map(([R,w])=>`${R}: ${w.count} tools (~${w.tokens.toLocaleString()} tokens)`);if(H.length>5)z.push(`(${H.length-5} more servers)`);return{type:"mcp_tools",severity:"warning",message:`Large MCP tools context (~${X.toLocaleString()} tokens > ${E.toLocaleString()})`,details:z,currentValue:X,threshold:E}}catch(G){let X=Y.reduce((U,F)=>{let H=(F.name?.length||0)+F.description.length;return U+Oq(H.toString())},0);if(X<=E)return null;return{type:"mcp_tools",severity:"warning",message:`Large MCP tools context (~${X.toLocaleString()} tokens estimated > ${E.toLocaleString()})`,details:[`${Y.length} MCP tools detected (token count estimated)`],currentValue:X,threshold:E}}}async function iJ(J){let q=await J(),K=P.isSandboxingEnabled()&&P.isAutoAllowBashIfSandboxedEnabled(),Y=xq(q,{sandboxAutoAllowEnabled:K});if(Y.length===0)return null;let G=Y.flatMap((X)=>[`${cq(X.rule.ruleValue)}: ${X.reason}`,` Fix: ${X.fix}`]);return{type:"unreachable_rules",severity:"warning",message:`${Y.length} ${Dq(Y.length,"unreachable permission rule")} detected`,details:G,currentValue:Y.length,threshold:0}}async function aq(J,q,K){let[Y,G,X,U]=await Promise.all([xJ(),rJ(q),aJ(J,K,q),iJ(K)]);return{claudeMdWarning:Y,agentWarning:G,mcpWarning:X,unreachableRulesWarning:U}}var E=25000;var iq=Nq(()=>{lJ();EJ();DJ();cJ();dJ();$J();_q();gJ();TJ()});import{c as WJ}from"react/compiler-runtime";import Fq from"figures";import{join as Aq}from"path";import{Suspense as RQ,use as WQ,useEffect as hQ,useState as wq}from"react";import{jsxDEV as Q,Fragment as O}from"react/jsx-dev-runtime";function LQ(J){let q=WJ(8),{promise:K}=J,Y=WQ(K);if(!Y.latest){let F;if(q[0]===Symbol.for("react.memo_cache_sentinel"))F=Q(Z,{dimColor:!0,children:"\u2514 Failed to fetch versions"},void 0,!1,void 0,this),q[0]=F;else F=q[0];return F}let G;if(q[1]!==Y.stable)G=Y.stable&&Q(Z,{children:["\u2514 Stable version: ",Y.stable]},void 0,!0,void 0,this),q[1]=Y.stable,q[2]=G;else G=q[2];let X;if(q[3]!==Y.latest)X=Q(Z,{children:["\u2514 Latest version: ",Y.latest]},void 0,!0,void 0,this),q[3]=Y.latest,q[4]=X;else X=q[4];let U;if(q[5]!==G||q[6]!==X)U=Q(O,{children:[G,X]},void 0,!0,void 0,this),q[5]=G,q[6]=X,q[7]=U;else U=q[7];return U}function cZ(J){let q=WJ(84),{onDone:K}=J,Y=l(cQ),G=l(TQ),X=l(dQ),U=l(_Q);JJ();let F;if(q[0]!==G)F=G||[],q[0]=G,q[1]=F;else F=q[1];let H=F,[z,R]=wq(null),[w,$]=wq(null),[N,hJ]=wq(null),[h,vq]=wq(null),Hq=RJ(),g;if(q[2]===Symbol.for("react.memo_cache_sentinel"))g=Mq().then(VQ),q[2]=g;else g=q[2];let LJ=g,PJ=sq()?.autoUpdatesChannel??"latest",x;if(q[3]!==Hq)x=Hq.filter(pQ),q[3]=Hq,q[4]=x;else x=q[4];let r=x,a;if(q[5]===Symbol.for("react.memo_cache_sentinel"))a=[{name:"BASH_MAX_OUTPUT_LENGTH",default:NJ,upperLimit:yJ},{name:"TASK_MAX_OUTPUT_LENGTH",default:UJ,upperLimit:BJ},{name:"CLAUDE_CODE_MAX_OUTPUT_TOKENS",...eq("claude-opus-4-7")}].map(mQ).filter(uQ),q[5]=a;else a=q[5];let Cq=a,i,o;if(q[6]!==Y||q[7]!==X||q[8]!==H)i=()=>{Mq().then(R),(async()=>{let W=Aq(nq(),"agents"),kq=Aq(oq(),".claude","agents"),{activeAgents:Sq,allAgents:OJ,failedFiles:fq}=Y,[AJ,bJ]=await Promise.all([bq(W),bq(kq)]),IJ={activeAgents:Sq.map(fQ),userAgentsDir:W,projectAgentsDir:kq,userDirExists:AJ,projectDirExists:bJ,failedFiles:fq};$(IJ);let MJ=await aq(H,{activeAgents:Sq,allAgents:OJ,failedFiles:fq},async()=>X);if(hJ(MJ),YJ()){let Lq=Aq(zJ(),"claude","locks"),vJ=KJ(Lq),CJ=GJ(Lq);vq({enabled:!0,locks:CJ,locksDir:Lq,staleLocksCleaned:vJ})}else vq({enabled:!1,locks:[],locksDir:"",staleLocksCleaned:0})})()},o=[X,H,Y],q[6]=Y,q[7]=X,q[8]=H,q[9]=i,q[10]=o;else i=q[9],o=q[10];hQ(i,o);let n;if(q[11]!==K)n=()=>{K("UnieAI Code diagnostics dismissed",{display:"system"})},q[11]=K,q[12]=n;else n=q[12];let s=n,e;if(q[13]!==s)e={"confirm:yes":s,"confirm:no":s},q[13]=s,q[14]=e;else e=q[14];let t;if(q[15]===Symbol.for("react.memo_cache_sentinel"))t={context:"Confirmation"},q[15]=t;else t=q[15];if(qJ(e,t),!z){let W;if(q[16]===Symbol.for("react.memo_cache_sentinel"))W=Q(Iq,{children:Q(Z,{dimColor:!0,children:"Checking installation status\u2026"},void 0,!1,void 0,this)},void 0,!1,void 0,this),q[16]=W;else W=q[16];return W}let qq;if(q[17]===Symbol.for("react.memo_cache_sentinel"))qq=Q(Z,{bold:!0,children:"Diagnostics"},void 0,!1,void 0,this),q[17]=qq;else qq=q[17];let A;if(q[18]!==z.installationType||q[19]!==z.version)A=Q(Z,{children:["\u2514 Currently running: ",z.installationType," (",z.version,")"]},void 0,!0,void 0,this),q[18]=z.installationType,q[19]=z.version,q[20]=A;else A=q[20];let b;if(q[21]!==z.packageManager)b=z.packageManager&&Q(Z,{children:["\u2514 Package manager: ",z.packageManager]},void 0,!0,void 0,this),q[21]=z.packageManager,q[22]=b;else b=q[22];let I;if(q[23]!==z.installationPath)I=Q(Z,{children:["\u2514 Path: ",z.installationPath]},void 0,!0,void 0,this),q[23]=z.installationPath,q[24]=I;else I=q[24];let M;if(q[25]!==z.invokedBinary)M=Q(Z,{children:["\u2514 Invoked: ",z.invokedBinary]},void 0,!0,void 0,this),q[25]=z.invokedBinary,q[26]=M;else M=q[26];let v;if(q[27]!==z.configInstallMethod)v=Q(Z,{children:["\u2514 Config install method: ",z.configInstallMethod]},void 0,!0,void 0,this),q[27]=z.configInstallMethod,q[28]=v;else v=q[28];let Rq=z.ripgrepStatus.working?"OK":"Not working",Wq=z.ripgrepStatus.mode==="embedded"?"bundled":z.ripgrepStatus.mode==="builtin"?"vendor":z.ripgrepStatus.systemPath||"system",C;if(q[29]!==Rq||q[30]!==Wq)C=Q(Z,{children:["\u2514 Search: ",Rq," (",Wq,")"]},void 0,!0,void 0,this),q[29]=Rq,q[30]=Wq,q[31]=C;else C=q[31];let k;if(q[32]!==z.recommendation)k=z.recommendation&&Q(O,{children:[Q(Z,{},void 0,!1,void 0,this),Q(Z,{color:"warning",children:["Recommendation: ",z.recommendation.split(`
2
+ import{ce as HJ,de as wQ}from"./cli-8dmy2s42.js";import{ee as wJ,fe as FQ}from"./cli-cwbxhdt1.js";import{ge as RJ,he as HQ}from"./cli-r9db9mqv.js";import{ie as xq,je as $J}from"./cli-h120wpk2.js";import{ke as Uq,le as rq,me as gJ}from"./cli-r3etpht1.js";import{ne as FJ,oe as UQ}from"./cli-grxvgq2n.js";import{$r as KQ,AF as l,Bx as XJ,Cx as XQ,DF as BQ,Dx as yJ,Ex as NJ,Fx as yQ,Mr as QJ,Nj as Bq,Oj as lq,Or as ZJ,Qr as zQ,Rj as $q,SB as gq,UB as EJ,Ur as Mq,Vj as DJ,Vr as YQ,Wr as zJ,Xr as GQ,Yr as YJ,Zr as GJ,_r as KJ,ai as P,bi as _q,fn as uq,gC as Oq,gn as mq,hC as lJ,in as pq,jn as kJ,uh as tq,vh as qQ,wz as BJ,xz as UJ,yz as NQ}from"./cli-me4e2p3e.js";import{aO as JJ,bO as QQ}from"./cli-6yprtw88.js";import{TO as qJ,UO as JQ,aP as Iq,bP as ZQ}from"./cli-akcxtvv9.js";import{DQ as y,FQ as Z,fR as Pq}from"./cli-x8xgga1a.js";import{EW as sq,IT as bq,NW as eJ,SV as cq,TV as dJ,VY as Eq,WV as Dq,cU as sJ,cW as TJ,d0 as eq,f0 as tJ,rZ as cJ}from"./cli-msmzt4c3.js";import{F_ as nq,S_ as nJ}from"./cli-tq5z9qv3.js";import{bda as oJ,k$ as oq}from"./cli-3ac555qw.js";import{fda as Nq}from"./cli-w1d8n9g3.js";import{c as SJ}from"react/compiler-runtime";import{jsxDEV as B}from"react/jsx-dev-runtime";function Vq(){let J=SJ(2);if(!uq())return null;let q,K;if(J[0]===Symbol.for("react.memo_cache_sentinel")){K=Symbol.for("react.early_return_sentinel");q:{let Y=pq();if(Y.length===0){K=null;break q}let G=Y.filter(pJ),X=Y.filter(mJ);q=B(y,{flexDirection:"column",marginTop:1,marginBottom:1,children:[B(Z,{bold:!0,color:G.length>0?"error":"warning",children:"Keybinding Configuration Issues"},void 0,!1,void 0,this),B(y,{children:[B(Z,{dimColor:!0,children:"Location: "},void 0,!1,void 0,this),B(Z,{dimColor:!0,children:mq()},void 0,!1,void 0,this)]},void 0,!0,void 0,this),B(y,{marginLeft:1,flexDirection:"column",marginTop:1,children:[G.map(uJ),X.map(fJ)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)}J[0]=q,J[1]=K}else q=J[0],K=J[1];if(K!==Symbol.for("react.early_return_sentinel"))return K;return q}function fJ(J,q){return B(y,{flexDirection:"column",children:[B(y,{children:[B(Z,{dimColor:!0,children:"\u2514 "},void 0,!1,void 0,this),B(Z,{color:"warning",children:"[Warning]"},void 0,!1,void 0,this),B(Z,{dimColor:!0,children:[" ",J.message]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),J.suggestion&&B(y,{marginLeft:3,children:B(Z,{dimColor:!0,children:["\u2192 ",J.suggestion]},void 0,!0,void 0,this)},void 0,!1,void 0,this)]},`warning-${q}`,!0,void 0,this)}function uJ(J,q){return B(y,{flexDirection:"column",children:[B(y,{children:[B(Z,{dimColor:!0,children:"\u2514 "},void 0,!1,void 0,this),B(Z,{color:"error",children:"[Error]"},void 0,!1,void 0,this),B(Z,{dimColor:!0,children:[" ",J.message]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),J.suggestion&&B(y,{marginLeft:3,children:B(Z,{dimColor:!0,children:["\u2192 ",J.suggestion]},void 0,!0,void 0,this)},void 0,!1,void 0,this)]},`error-${q}`,!0,void 0,this)}function mJ(J){return J.severity==="warning"}function pJ(J){return J.severity==="error"}var jq=Nq(()=>{Pq();kJ()});import{c as VJ}from"react/compiler-runtime";import{jsxDEV as L}from"react/jsx-dev-runtime";function dq(){let J=VJ(2);if(!P.isSupportedPlatform())return null;if(!P.isSandboxEnabledInSettings())return null;let q,K;if(J[0]===Symbol.for("react.memo_cache_sentinel")){K=Symbol.for("react.early_return_sentinel");q:{let Y=P.checkDependencies(),G=Y.errors.length>0,X=Y.warnings.length>0;if(!G&&!X){K=null;break q}q=L(y,{flexDirection:"column",children:[L(Z,{bold:!0,children:"Sandbox"},void 0,!1,void 0,this),L(Z,{children:["\u2514 Status: ",L(Z,{color:G?"error":"warning",children:G?"Missing dependencies":"Available (with warnings)"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),Y.errors.map(_J),Y.warnings.map(jJ),G&&L(Z,{dimColor:!0,children:"\u2514 Run /sandbox for install instructions"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)}J[0]=q,J[1]=K}else q=J[0],K=J[1];if(K!==Symbol.for("react.early_return_sentinel"))return K;return q}function jJ(J,q){return L(Z,{color:"warning",children:["\u2514 ",J]},q,!0,void 0,this)}function _J(J,q){return L(Z,{color:"error",children:["\u2514 ",J]},q,!0,void 0,this)}var Tq=Nq(()=>{Pq();_q()});async function xJ(){let J=$q(await lq());if(J.length===0)return null;let q=J.sort((Y,G)=>G.content.length-Y.content.length).map((Y)=>`${Y.path}: ${Y.content.length.toLocaleString()} chars`);return{type:"claudemd_files",severity:"warning",message:J.length===1?`Large CLAUDE.md file detected (${J[0].content.length.toLocaleString()} chars > ${Bq.toLocaleString()})`:`${J.length} large CLAUDE.md files detected (each > ${Bq.toLocaleString()} chars)`,details:q,currentValue:J.length,threshold:Bq}}async function rJ(J){if(!J)return null;let q=rq(J);if(q<=Uq)return null;let K=J.activeAgents.filter((G)=>G.source!=="built-in").map((G)=>{let X=`${G.agentType}: ${G.whenToUse}`;return{name:G.agentType,tokens:Oq(X)}}).sort((G,X)=>X.tokens-G.tokens),Y=K.slice(0,5).map((G)=>`${G.name}: ~${G.tokens.toLocaleString()} tokens`);if(K.length>5)Y.push(`(${K.length-5} more custom agents)`);return{type:"agent_descriptions",severity:"warning",message:`Large agent descriptions (~${q.toLocaleString()} tokens > ${Uq.toLocaleString()})`,details:Y,currentValue:q,threshold:Uq}}async function aJ(J,q,K){let Y=J.filter((G)=>G.isMcp);if(Y.length===0)return null;try{let G=Eq(),{mcpToolTokens:X,mcpToolDetails:U}=await gq(J,q,K,G);if(X<=E)return null;let F=new Map;for(let R of U){let $=R.name.split("__")[1]||"unknown",N=F.get($)||{count:0,tokens:0};F.set($,{count:N.count+1,tokens:N.tokens+R.tokens})}let H=Array.from(F.entries()).sort((R,w)=>w[1].tokens-R[1].tokens),z=H.slice(0,5).map(([R,w])=>`${R}: ${w.count} tools (~${w.tokens.toLocaleString()} tokens)`);if(H.length>5)z.push(`(${H.length-5} more servers)`);return{type:"mcp_tools",severity:"warning",message:`Large MCP tools context (~${X.toLocaleString()} tokens > ${E.toLocaleString()})`,details:z,currentValue:X,threshold:E}}catch(G){let X=Y.reduce((U,F)=>{let H=(F.name?.length||0)+F.description.length;return U+Oq(H.toString())},0);if(X<=E)return null;return{type:"mcp_tools",severity:"warning",message:`Large MCP tools context (~${X.toLocaleString()} tokens estimated > ${E.toLocaleString()})`,details:[`${Y.length} MCP tools detected (token count estimated)`],currentValue:X,threshold:E}}}async function iJ(J){let q=await J(),K=P.isSandboxingEnabled()&&P.isAutoAllowBashIfSandboxedEnabled(),Y=xq(q,{sandboxAutoAllowEnabled:K});if(Y.length===0)return null;let G=Y.flatMap((X)=>[`${cq(X.rule.ruleValue)}: ${X.reason}`,` Fix: ${X.fix}`]);return{type:"unreachable_rules",severity:"warning",message:`${Y.length} ${Dq(Y.length,"unreachable permission rule")} detected`,details:G,currentValue:Y.length,threshold:0}}async function aq(J,q,K){let[Y,G,X,U]=await Promise.all([xJ(),rJ(q),aJ(J,K,q),iJ(K)]);return{claudeMdWarning:Y,agentWarning:G,mcpWarning:X,unreachableRulesWarning:U}}var E=25000;var iq=Nq(()=>{lJ();EJ();DJ();cJ();dJ();$J();_q();gJ();TJ()});import{c as WJ}from"react/compiler-runtime";import Fq from"figures";import{join as Aq}from"path";import{Suspense as RQ,use as WQ,useEffect as hQ,useState as wq}from"react";import{jsxDEV as Q,Fragment as O}from"react/jsx-dev-runtime";function LQ(J){let q=WJ(8),{promise:K}=J,Y=WQ(K);if(!Y.latest){let F;if(q[0]===Symbol.for("react.memo_cache_sentinel"))F=Q(Z,{dimColor:!0,children:"\u2514 Failed to fetch versions"},void 0,!1,void 0,this),q[0]=F;else F=q[0];return F}let G;if(q[1]!==Y.stable)G=Y.stable&&Q(Z,{children:["\u2514 Stable version: ",Y.stable]},void 0,!0,void 0,this),q[1]=Y.stable,q[2]=G;else G=q[2];let X;if(q[3]!==Y.latest)X=Q(Z,{children:["\u2514 Latest version: ",Y.latest]},void 0,!0,void 0,this),q[3]=Y.latest,q[4]=X;else X=q[4];let U;if(q[5]!==G||q[6]!==X)U=Q(O,{children:[G,X]},void 0,!0,void 0,this),q[5]=G,q[6]=X,q[7]=U;else U=q[7];return U}function cZ(J){let q=WJ(84),{onDone:K}=J,Y=l(cQ),G=l(TQ),X=l(dQ),U=l(_Q);JJ();let F;if(q[0]!==G)F=G||[],q[0]=G,q[1]=F;else F=q[1];let H=F,[z,R]=wq(null),[w,$]=wq(null),[N,hJ]=wq(null),[h,vq]=wq(null),Hq=RJ(),g;if(q[2]===Symbol.for("react.memo_cache_sentinel"))g=Mq().then(VQ),q[2]=g;else g=q[2];let LJ=g,PJ=sq()?.autoUpdatesChannel??"latest",x;if(q[3]!==Hq)x=Hq.filter(pQ),q[3]=Hq,q[4]=x;else x=q[4];let r=x,a;if(q[5]===Symbol.for("react.memo_cache_sentinel"))a=[{name:"BASH_MAX_OUTPUT_LENGTH",default:NJ,upperLimit:yJ},{name:"TASK_MAX_OUTPUT_LENGTH",default:UJ,upperLimit:BJ},{name:"CLAUDE_CODE_MAX_OUTPUT_TOKENS",...eq("claude-opus-4-7")}].map(mQ).filter(uQ),q[5]=a;else a=q[5];let Cq=a,i,o;if(q[6]!==Y||q[7]!==X||q[8]!==H)i=()=>{Mq().then(R),(async()=>{let W=Aq(nq(),"agents"),kq=Aq(oq(),".claude","agents"),{activeAgents:Sq,allAgents:OJ,failedFiles:fq}=Y,[AJ,bJ]=await Promise.all([bq(W),bq(kq)]),IJ={activeAgents:Sq.map(fQ),userAgentsDir:W,projectAgentsDir:kq,userDirExists:AJ,projectDirExists:bJ,failedFiles:fq};$(IJ);let MJ=await aq(H,{activeAgents:Sq,allAgents:OJ,failedFiles:fq},async()=>X);if(hJ(MJ),YJ()){let Lq=Aq(zJ(),"claude","locks"),vJ=KJ(Lq),CJ=GJ(Lq);vq({enabled:!0,locks:CJ,locksDir:Lq,staleLocksCleaned:vJ})}else vq({enabled:!1,locks:[],locksDir:"",staleLocksCleaned:0})})()},o=[X,H,Y],q[6]=Y,q[7]=X,q[8]=H,q[9]=i,q[10]=o;else i=q[9],o=q[10];hQ(i,o);let n;if(q[11]!==K)n=()=>{K("UnieAI Code diagnostics dismissed",{display:"system"})},q[11]=K,q[12]=n;else n=q[12];let s=n,e;if(q[13]!==s)e={"confirm:yes":s,"confirm:no":s},q[13]=s,q[14]=e;else e=q[14];let t;if(q[15]===Symbol.for("react.memo_cache_sentinel"))t={context:"Confirmation"},q[15]=t;else t=q[15];if(qJ(e,t),!z){let W;if(q[16]===Symbol.for("react.memo_cache_sentinel"))W=Q(Iq,{children:Q(Z,{dimColor:!0,children:"Checking installation status\u2026"},void 0,!1,void 0,this)},void 0,!1,void 0,this),q[16]=W;else W=q[16];return W}let qq;if(q[17]===Symbol.for("react.memo_cache_sentinel"))qq=Q(Z,{bold:!0,children:"Diagnostics"},void 0,!1,void 0,this),q[17]=qq;else qq=q[17];let A;if(q[18]!==z.installationType||q[19]!==z.version)A=Q(Z,{children:["\u2514 Currently running: ",z.installationType," (",z.version,")"]},void 0,!0,void 0,this),q[18]=z.installationType,q[19]=z.version,q[20]=A;else A=q[20];let b;if(q[21]!==z.packageManager)b=z.packageManager&&Q(Z,{children:["\u2514 Package manager: ",z.packageManager]},void 0,!0,void 0,this),q[21]=z.packageManager,q[22]=b;else b=q[22];let I;if(q[23]!==z.installationPath)I=Q(Z,{children:["\u2514 Path: ",z.installationPath]},void 0,!0,void 0,this),q[23]=z.installationPath,q[24]=I;else I=q[24];let M;if(q[25]!==z.invokedBinary)M=Q(Z,{children:["\u2514 Invoked: ",z.invokedBinary]},void 0,!0,void 0,this),q[25]=z.invokedBinary,q[26]=M;else M=q[26];let v;if(q[27]!==z.configInstallMethod)v=Q(Z,{children:["\u2514 Config install method: ",z.configInstallMethod]},void 0,!0,void 0,this),q[27]=z.configInstallMethod,q[28]=v;else v=q[28];let Rq=z.ripgrepStatus.working?"OK":"Not working",Wq=z.ripgrepStatus.mode==="embedded"?"bundled":z.ripgrepStatus.mode==="builtin"?"vendor":z.ripgrepStatus.systemPath||"system",C;if(q[29]!==Rq||q[30]!==Wq)C=Q(Z,{children:["\u2514 Search: ",Rq," (",Wq,")"]},void 0,!0,void 0,this),q[29]=Rq,q[30]=Wq,q[31]=C;else C=q[31];let k;if(q[32]!==z.recommendation)k=z.recommendation&&Q(O,{children:[Q(Z,{},void 0,!1,void 0,this),Q(Z,{color:"warning",children:["Recommendation: ",z.recommendation.split(`
3
3
  `)[0]]},void 0,!0,void 0,this),Q(Z,{dimColor:!0,children:z.recommendation.split(`
4
4
  `)[1]},void 0,!1,void 0,this)]},void 0,!0,void 0,this),q[32]=z.recommendation,q[33]=k;else k=q[33];let S;if(q[34]!==z.multipleInstallations)S=z.multipleInstallations.length>1&&Q(O,{children:[Q(Z,{},void 0,!1,void 0,this),Q(Z,{color:"warning",children:"Warning: Multiple installations found"},void 0,!1,void 0,this),z.multipleInstallations.map(SQ)]},void 0,!0,void 0,this),q[34]=z.multipleInstallations,q[35]=S;else S=q[35];let f;if(q[36]!==z.warnings)f=z.warnings.length>0&&Q(O,{children:[Q(Z,{},void 0,!1,void 0,this),z.warnings.map(kQ)]},void 0,!0,void 0,this),q[36]=z.warnings,q[37]=f;else f=q[37];let u;if(q[38]!==r)u=r.length>0&&Q(y,{flexDirection:"column",marginTop:1,marginBottom:1,children:[Q(Z,{bold:!0,children:"Invalid Settings"},void 0,!1,void 0,this),Q(HJ,{errors:r},void 0,!1,void 0,this)]},void 0,!0,void 0,this),q[38]=r,q[39]=u;else u=q[39];let m;if(q[40]!==A||q[41]!==b||q[42]!==I||q[43]!==M||q[44]!==v||q[45]!==C||q[46]!==k||q[47]!==S||q[48]!==f||q[49]!==u)m=Q(y,{flexDirection:"column",children:[qq,A,b,I,M,v,C,k,S,f,u]},void 0,!0,void 0,this),q[40]=A,q[41]=b,q[42]=I,q[43]=M,q[44]=v,q[45]=C,q[46]=k,q[47]=S,q[48]=f,q[49]=u,q[50]=m;else m=q[50];let Jq;if(q[51]===Symbol.for("react.memo_cache_sentinel"))Jq=Q(Z,{bold:!0,children:"Updates"},void 0,!1,void 0,this),q[51]=Jq;else Jq=q[51];let hq=z.packageManager?"Managed by package manager":z.autoUpdates,p;if(q[52]!==hq)p=Q(Z,{children:["\u2514 Auto-updates:"," ",hq]},void 0,!0,void 0,this),q[52]=hq,q[53]=p;else p=q[53];let V;if(q[54]!==z.hasUpdatePermissions)V=z.hasUpdatePermissions!==null&&Q(Z,{children:["\u2514 Update permissions:"," ",z.hasUpdatePermissions?"Yes":"No (requires sudo)"]},void 0,!0,void 0,this),q[54]=z.hasUpdatePermissions,q[55]=V;else V=q[55];let Qq;if(q[56]===Symbol.for("react.memo_cache_sentinel"))Qq=Q(Z,{children:["\u2514 Auto-update channel: ",PJ]},void 0,!0,void 0,this),q[56]=Qq;else Qq=q[56];let Zq;if(q[57]===Symbol.for("react.memo_cache_sentinel"))Zq=Q(RQ,{fallback:null,children:Q(LQ,{promise:LJ},void 0,!1,void 0,this)},void 0,!1,void 0,this),q[57]=Zq;else Zq=q[57];let j;if(q[58]!==p||q[59]!==V)j=Q(y,{flexDirection:"column",children:[Jq,p,V,Qq,Zq]},void 0,!0,void 0,this),q[58]=p,q[59]=V,q[60]=j;else j=q[60];let zq,Yq,Gq,Kq;if(q[61]===Symbol.for("react.memo_cache_sentinel"))zq=Q(dq,{},void 0,!1,void 0,this),Yq=Q(FJ,{},void 0,!1,void 0,this),Gq=Q(Vq,{},void 0,!1,void 0,this),Kq=Cq.length>0&&Q(y,{flexDirection:"column",children:[Q(Z,{bold:!0,children:"Environment Variables"},void 0,!1,void 0,this),Cq.map(CQ)]},void 0,!0,void 0,this),q[61]=zq,q[62]=Yq,q[63]=Gq,q[64]=Kq;else zq=q[61],Yq=q[62],Gq=q[63],Kq=q[64];let _;if(q[65]!==h)_=h?.enabled&&Q(y,{flexDirection:"column",children:[Q(Z,{bold:!0,children:"Version Locks"},void 0,!1,void 0,this),h.staleLocksCleaned>0&&Q(Z,{dimColor:!0,children:["\u2514 Cleaned ",h.staleLocksCleaned," stale lock(s)"]},void 0,!0,void 0,this),h.locks.length===0?Q(Z,{dimColor:!0,children:"\u2514 No active version locks"},void 0,!1,void 0,this):h.locks.map(vQ)]},void 0,!0,void 0,this),q[65]=h,q[66]=_;else _=q[66];let d;if(q[67]!==w)d=w?.failedFiles&&w.failedFiles.length>0&&Q(y,{flexDirection:"column",children:[Q(Z,{bold:!0,color:"error",children:"Agent Parse Errors"},void 0,!1,void 0,this),Q(Z,{color:"error",children:["\u2514 Failed to parse ",w.failedFiles.length," agent file(s):"]},void 0,!0,void 0,this),w.failedFiles.map(MQ)]},void 0,!0,void 0,this),q[67]=w,q[68]=d;else d=q[68];let T;if(q[69]!==U)T=U.length>0&&Q(y,{flexDirection:"column",children:[Q(Z,{bold:!0,color:"error",children:"Plugin Errors"},void 0,!1,void 0,this),Q(Z,{color:"error",children:["\u2514 ",U.length," plugin error(s) detected:"]},void 0,!0,void 0,this),U.map(IQ)]},void 0,!0,void 0,this),q[69]=U,q[70]=T;else T=q[70];let c;if(q[71]!==N)c=N?.unreachableRulesWarning&&Q(y,{flexDirection:"column",children:[Q(Z,{bold:!0,color:"warning",children:"Unreachable Permission Rules"},void 0,!1,void 0,this),Q(Z,{children:["\u2514"," ",Q(Z,{color:"warning",children:[Fq.warning," ",N.unreachableRulesWarning.message]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),N.unreachableRulesWarning.details.map(bQ)]},void 0,!0,void 0,this),q[71]=N,q[72]=c;else c=q[72];let D;if(q[73]!==N)D=N&&(N.claudeMdWarning||N.agentWarning||N.mcpWarning)&&Q(y,{flexDirection:"column",children:[Q(Z,{bold:!0,children:"Context Usage Warnings"},void 0,!1,void 0,this),N.claudeMdWarning&&Q(O,{children:[Q(Z,{children:["\u2514"," ",Q(Z,{color:"warning",children:[Fq.warning," ",N.claudeMdWarning.message]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),Q(Z,{children:[" ","\u2514 Files:"]},void 0,!0,void 0,this),N.claudeMdWarning.details.map(AQ)]},void 0,!0,void 0,this),N.agentWarning&&Q(O,{children:[Q(Z,{children:["\u2514"," ",Q(Z,{color:"warning",children:[Fq.warning," ",N.agentWarning.message]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),Q(Z,{children:[" ","\u2514 Top contributors:"]},void 0,!0,void 0,this),N.agentWarning.details.map(OQ)]},void 0,!0,void 0,this),N.mcpWarning&&Q(O,{children:[Q(Z,{children:["\u2514"," ",Q(Z,{color:"warning",children:[Fq.warning," ",N.mcpWarning.message]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),Q(Z,{children:[" ","\u2514 MCP servers:"]},void 0,!0,void 0,this),N.mcpWarning.details.map(PQ)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),q[73]=N,q[74]=D;else D=q[74];let Xq;if(q[75]===Symbol.for("react.memo_cache_sentinel"))Xq=Q(y,{children:Q(wJ,{},void 0,!1,void 0,this)},void 0,!1,void 0,this),q[75]=Xq;else Xq=q[75];let yq;if(q[76]!==m||q[77]!==j||q[78]!==_||q[79]!==d||q[80]!==T||q[81]!==c||q[82]!==D)yq=Q(Iq,{children:[m,j,zq,Yq,Gq,Kq,_,d,T,c,D,Xq]},void 0,!0,void 0,this),q[76]=m,q[77]=j,q[78]=_,q[79]=d,q[80]=T,q[81]=c,q[82]=D,q[83]=yq;else yq=q[83];return yq}function PQ(J,q){return Q(Z,{dimColor:!0,children:[" ","\u2514 ",J]},q,!0,void 0,this)}function OQ(J,q){return Q(Z,{dimColor:!0,children:[" ","\u2514 ",J]},q,!0,void 0,this)}function AQ(J,q){return Q(Z,{dimColor:!0,children:[" ","\u2514 ",J]},q,!0,void 0,this)}function bQ(J,q){return Q(Z,{dimColor:!0,children:[" ","\u2514 ",J]},q,!0,void 0,this)}function IQ(J,q){return Q(Z,{dimColor:!0,children:[" ","\u2514 ",J.source||"unknown","plugin"in J&&J.plugin?` [${J.plugin}]`:"",":"," ",tq(J)]},q,!0,void 0,this)}function MQ(J,q){return Q(Z,{dimColor:!0,children:[" ","\u2514 ",J.path,": ",J.error]},q,!0,void 0,this)}function vQ(J,q){return Q(Z,{children:["\u2514 ",J.version,": PID ",J.pid," ",J.isProcessRunning?Q(Z,{children:"(running)"},void 0,!1,void 0,this):Q(Z,{color:"warning",children:"(stale)"},void 0,!1,void 0,this)]},q,!0,void 0,this)}function CQ(J,q){return Q(Z,{children:["\u2514 ",J.name,":"," ",Q(Z,{color:J.status==="capped"?"warning":"error",children:J.message},void 0,!1,void 0,this)]},q,!0,void 0,this)}function kQ(J,q){return Q(y,{flexDirection:"column",children:[Q(Z,{color:"warning",children:["Warning: ",J.issue]},void 0,!0,void 0,this),Q(Z,{children:["Fix: ",J.fix]},void 0,!0,void 0,this)]},q,!0,void 0,this)}function SQ(J,q){return Q(Z,{children:["\u2514 ",J.type," at ",J.path]},q,!0,void 0,this)}function fQ(J){return{agentType:J.agentType,source:J.source}}function uQ(J){return J.status!=="valid"}function mQ(J){let q=process.env[J.name],K=XJ(J.name,q,J.default,J.upperLimit);return{name:J.name,...K}}function pQ(J){return J.mcpErrorMetadata===void 0}function VQ(J){return(J.installationType==="native"?ZJ:QJ)().catch(jQ)}function jQ(){return{latest:null,stable:null}}function _Q(J){return J.plugins.errors}function dQ(J){return J.toolPermissionContext}function TQ(J){return J.mcp.tools}function cQ(J){return J.agentDefinitions}var DQ=Nq(()=>{jq();UQ();tJ();nJ();oJ();ZQ();FQ();Tq();wQ();HQ();QQ();Pq();JQ();BQ();qQ();zQ();iq();YQ();XQ();sJ();KQ();eJ();yQ();NQ();GQ()});
5
5
  export{cZ as ae,DQ as be};
@@ -1,3 +1,3 @@
1
1
  // @bun
2
- import{U8 as Z,V8 as j}from"./cli-s5epnnj5.js";import{$9 as x,T9 as $,Z9 as B,d_ as N,r_ as z,u_ as R}from"./cli-a98b285v.js";import{ada as H,bda as X}from"./cli-x514vyva.js";var k={};H(k,{toInfraSessionId:()=>P,toCompatSessionId:()=>O,setCseShimGate:()=>F});function F(q){W=q}function O(q){if(!q.startsWith("cse_"))return q;if(W&&!W())return q;return"session_"+q.slice(4)}function P(q){if(!q.startsWith("session_"))return q;return"cse_"+q.slice(8)}var W;var A=()=>{};function L(q){return q.replace(U,(Q,J,K)=>{if(K.length<y)return`"${J}":"[REDACTED]"`;let V=`${K.slice(0,8)}...${K.slice(-4)}`;return`"${J}":"${V}"`})}function m(q){let Q=typeof q==="string"?q:x(q),J=L(Q);if(J.length<=Y)return J;return J.slice(0,Y)+`... (${J.length} chars)`}function f(q){let Q=$(q);if(q&&typeof q==="object"&&"response"in q){let J=q.response;if(J?.data&&typeof J.data==="object"){let K=J.data,V=typeof K.message==="string"?K.message:typeof K.error==="object"&&K.error&&("message"in K.error)&&typeof K.error.message==="string"?K.error.message:void 0;if(V)return`${Q}: ${V}`}}return Q}function I(q){if(q&&typeof q==="object"&&"response"in q&&q.response&&typeof q.response.status==="number")return q.response.status;return}function M(q){if(!q||typeof q!=="object")return;if("message"in q&&typeof q.message==="string")return q.message;if("error"in q&&q.error!==null&&typeof q.error==="object"&&"message"in q.error&&typeof q.error.message==="string")return q.error.message;return}function E(q,Q,J){if(Q)z(Q);Z("tengu_bridge_repl_skipped",{reason:q,...J!==void 0&&{v2:J}})}var Y=2000,w,U,y=16;var C=X(()=>{j();R();B();N();w=["session_ingress_token","environment_secret","access_token","secret","token"],U=new RegExp(`"(${w.join("|")})"\\s*:\\s*"([^"]*)"`,"g")});
3
- export{F as wO,O as xO,P as yO,k as zO,A as AO,m as BO,f as CO,I as DO,M as EO,E as FO,C as GO};
2
+ import{Y8 as Z,Z8 as j}from"./cli-t9jht3kb.js";import{X9 as $,b_ as B,d_ as x,h_ as N,v_ as z,y_ as R}from"./cli-hke6r0q8.js";import{eda as H,fda as X}from"./cli-w1d8n9g3.js";var k={};H(k,{toInfraSessionId:()=>P,toCompatSessionId:()=>O,setCseShimGate:()=>F});function F(q){W=q}function O(q){if(!q.startsWith("cse_"))return q;if(W&&!W())return q;return"session_"+q.slice(4)}function P(q){if(!q.startsWith("session_"))return q;return"cse_"+q.slice(8)}var W;var A=()=>{};function L(q){return q.replace(U,(Q,J,K)=>{if(K.length<y)return`"${J}":"[REDACTED]"`;let V=`${K.slice(0,8)}...${K.slice(-4)}`;return`"${J}":"${V}"`})}function m(q){let Q=typeof q==="string"?q:x(q),J=L(Q);if(J.length<=Y)return J;return J.slice(0,Y)+`... (${J.length} chars)`}function f(q){let Q=$(q);if(q&&typeof q==="object"&&"response"in q){let J=q.response;if(J?.data&&typeof J.data==="object"){let K=J.data,V=typeof K.message==="string"?K.message:typeof K.error==="object"&&K.error&&("message"in K.error)&&typeof K.error.message==="string"?K.error.message:void 0;if(V)return`${Q}: ${V}`}}return Q}function I(q){if(q&&typeof q==="object"&&"response"in q&&q.response&&typeof q.response.status==="number")return q.response.status;return}function M(q){if(!q||typeof q!=="object")return;if("message"in q&&typeof q.message==="string")return q.message;if("error"in q&&q.error!==null&&typeof q.error==="object"&&"message"in q.error&&typeof q.error.message==="string")return q.error.message;return}function E(q,Q,J){if(Q)z(Q);Z("tengu_bridge_repl_skipped",{reason:q,...J!==void 0&&{v2:J}})}var Y=2000,w,U,y=16;var C=X(()=>{j();R();B();N();w=["session_ingress_token","environment_secret","access_token","secret","token"],U=new RegExp(`"(${w.join("|")})"\\s*:\\s*"([^"]*)"`,"g")});
3
+ export{F as tO,O as uO,P as vO,k as wO,A as xO,m as yO,f as zO,I as AO,M as BO,E as CO,C as DO};
@@ -1,3 +1,3 @@
1
1
  // @bun
2
- import{$T as U,FT as Y,K3 as W,N3 as V,e4 as j}from"./cli-9hskw92e.js";import{E6 as _,I6 as $,J6 as T}from"./cli-wr4k6ngg.js";import{X6 as Z,Y6 as w,Z6 as k,w7 as D}from"./cli-nj726gac.js";import{r_ as N,u_ as M}from"./cli-a98b285v.js";import{Zca as O,g$ as X}from"./cli-w754xmyv.js";O();j();M();T();U();w();D();import{realpath as v}from"fs/promises";async function b(){try{let q=await _();if(!q){N("Not in a GitHub repository, skipping path mapping update");return}let A=X(),z=k(A)??A,B;try{B=(await v(z)).normalize("NFC")}catch{B=z}let J=q.toLowerCase(),L=V().githubRepoPaths?.[J]??[];if(L[0]===B){N(`Path ${B} already tracked for repo ${J}`);return}let E=L.filter((S)=>S!==B),H=[B,...E];W((S)=>({...S,githubRepoPaths:{...S.githubRepoPaths,[J]:H}})),N(`Added ${B} to tracked paths for repo ${J}`)}catch(q){N(`Error updating repo path mapping: ${q}`)}}function y(q){let A=V(),I=q.toLowerCase();return A.githubRepoPaths?.[I]??[]}async function P(q){let A=await Promise.all(q.map(Y));return q.filter((I,z)=>A[z])}async function d(q,A){try{let I=await Z(q);if(!I)return!1;let z=$(I);if(!z)return!1;return z.toLowerCase()===A.toLowerCase()}catch{return!1}}function c(q,A){let I=V(),z=q.toLowerCase(),B=I.githubRepoPaths?.[z]??[],J=B.filter((L)=>L!==A);if(J.length===B.length)return;let Q={...I.githubRepoPaths};if(J.length===0)delete Q[z];else Q[z]=J;W((L)=>({...L,githubRepoPaths:Q})),N(`Removed ${A} from tracked paths for repo ${z}`)}
2
+ import{IT as Y,Q3 as j,cU as U,u3 as W,x3 as V}from"./cli-msmzt4c3.js";import{I6 as _,M6 as $,N6 as T}from"./cli-n5s5fnyj.js";import{$6 as Z,A7 as D,a7 as w,b7 as k}from"./cli-fdya77ch.js";import{v_ as N,y_ as M}from"./cli-hke6r0q8.js";import{bda as O,k$ as X}from"./cli-3ac555qw.js";O();j();M();T();U();w();D();import{realpath as v}from"fs/promises";async function b(){try{let q=await _();if(!q){N("Not in a GitHub repository, skipping path mapping update");return}let A=X(),z=k(A)??A,B;try{B=(await v(z)).normalize("NFC")}catch{B=z}let J=q.toLowerCase(),L=V().githubRepoPaths?.[J]??[];if(L[0]===B){N(`Path ${B} already tracked for repo ${J}`);return}let E=L.filter((S)=>S!==B),H=[B,...E];W((S)=>({...S,githubRepoPaths:{...S.githubRepoPaths,[J]:H}})),N(`Added ${B} to tracked paths for repo ${J}`)}catch(q){N(`Error updating repo path mapping: ${q}`)}}function y(q){let A=V(),I=q.toLowerCase();return A.githubRepoPaths?.[I]??[]}async function P(q){let A=await Promise.all(q.map(Y));return q.filter((I,z)=>A[z])}async function d(q,A){try{let I=await Z(q);if(!I)return!1;let z=$(I);if(!z)return!1;return z.toLowerCase()===A.toLowerCase()}catch{return!1}}function c(q,A){let I=V(),z=q.toLowerCase(),B=I.githubRepoPaths?.[z]??[],J=B.filter((L)=>L!==A);if(J.length===B.length)return;let Q={...I.githubRepoPaths};if(J.length===0)delete Q[z];else Q[z]=J;W((L)=>({...L,githubRepoPaths:Q})),N(`Removed ${A} from tracked paths for repo ${z}`)}
3
3
  export{b as A,y as B,P as C,d as D,c as E};
@@ -1,4 +1,4 @@
1
1
  // @bun
2
- import{y as j,z as v}from"./cli-znz72ctn.js";import{Ne as E}from"./cli-jbbxj53h.js";import{RK as S,SK as p}from"./cli-49dqgzsg.js";import{sR as R,uR as z}from"./cli-wn4ywgbv.js";import{d3 as w,q3 as I}from"./cli-9hskw92e.js";import{I5 as L,J5 as B}from"./cli-avcnnw0n.js";import{$9 as D,T9 as f,Z9 as u,a_ as T,d_ as m,r_ as M,u_ as h}from"./cli-a98b285v.js";I();B();z();E();import{z as Z}from"zod/v4";var F={init_retry_max_attempts:3,init_retry_base_delay_ms:500,init_retry_jitter_fraction:0.25,init_retry_max_delay_ms:4000,http_timeout_ms:1e4,uuid_dedup_buffer_size:2000,heartbeat_interval_ms:20000,heartbeat_jitter_fraction:0.1,token_refresh_buffer_ms:300000,teardown_archive_timeout_ms:1500,connect_timeout_ms:15000,min_version:"0.0.0",should_show_app_upgrade_message:!1},U=L(()=>Z.object({init_retry_max_attempts:Z.number().int().min(1).max(10).default(3),init_retry_base_delay_ms:Z.number().int().min(100).default(500),init_retry_jitter_fraction:Z.number().min(0).max(1).default(0.25),init_retry_max_delay_ms:Z.number().int().min(500).default(4000),http_timeout_ms:Z.number().int().min(2000).default(1e4),uuid_dedup_buffer_size:Z.number().int().min(100).max(50000).default(2000),heartbeat_interval_ms:Z.number().int().min(5000).max(30000).default(20000),heartbeat_jitter_fraction:Z.number().min(0).max(0.5).default(0.1),token_refresh_buffer_ms:Z.number().int().min(30000).max(1800000).default(300000),teardown_archive_timeout_ms:Z.number().int().min(500).max(2000).default(1500),connect_timeout_ms:Z.number().int().min(5000).max(60000).default(15000),min_version:Z.string().refine((J)=>{try{return R(J,"0.0.0"),!0}catch{return!1}}).default("0.0.0"),should_show_app_upgrade_message:Z.boolean().default(!1)}));async function C(){let J=await w("tengu_bridge_repl_v2_config",F),K=U().safeParse(J);return K.success?K.data:F}async function t(){let J=await C();if(J.min_version&&R(MACRO.VERSION,J.min_version))return`Your version of Claude Code (${MACRO.VERSION}) is too old for Remote Control.
2
+ import{y as j,z as v}from"./cli-zpcncwrv.js";import{Ne as E}from"./cli-78apjp3t.js";import{OK as S,PK as p}from"./cli-s9fhtgmz.js";import{pR as R,rR as z}from"./cli-v9f860t5.js";import{P2 as w,a3 as I}from"./cli-msmzt4c3.js";import{$4 as L,a5 as B}from"./cli-fakdskp6.js";import{X9 as f,b_ as u,d_ as D,e_ as T,h_ as m,v_ as M,y_ as h}from"./cli-hke6r0q8.js";I();B();z();E();import{z as Z}from"zod/v4";var F={init_retry_max_attempts:3,init_retry_base_delay_ms:500,init_retry_jitter_fraction:0.25,init_retry_max_delay_ms:4000,http_timeout_ms:1e4,uuid_dedup_buffer_size:2000,heartbeat_interval_ms:20000,heartbeat_jitter_fraction:0.1,token_refresh_buffer_ms:300000,teardown_archive_timeout_ms:1500,connect_timeout_ms:15000,min_version:"0.0.0",should_show_app_upgrade_message:!1},U=L(()=>Z.object({init_retry_max_attempts:Z.number().int().min(1).max(10).default(3),init_retry_base_delay_ms:Z.number().int().min(100).default(500),init_retry_jitter_fraction:Z.number().min(0).max(1).default(0.25),init_retry_max_delay_ms:Z.number().int().min(500).default(4000),http_timeout_ms:Z.number().int().min(2000).default(1e4),uuid_dedup_buffer_size:Z.number().int().min(100).max(50000).default(2000),heartbeat_interval_ms:Z.number().int().min(5000).max(30000).default(20000),heartbeat_jitter_fraction:Z.number().min(0).max(0.5).default(0.1),token_refresh_buffer_ms:Z.number().int().min(30000).max(1800000).default(300000),teardown_archive_timeout_ms:Z.number().int().min(500).max(2000).default(1500),connect_timeout_ms:Z.number().int().min(5000).max(60000).default(15000),min_version:Z.string().refine((J)=>{try{return R(J,"0.0.0"),!0}catch{return!1}}).default("0.0.0"),should_show_app_upgrade_message:Z.boolean().default(!1)}));async function C(){let J=await w("tengu_bridge_repl_v2_config",F),K=U().safeParse(J);return K.success?K.data:F}async function t(){let J=await C();if(J.min_version&&R(MACRO.VERSION,J.min_version))return`Your version of Claude Code (${MACRO.VERSION}) is too old for Remote Control.
3
3
  Version ${J.min_version} or higher is required. Run \`claude update\` to update.`;return null}m();import y from"axios";function e(J){let K=Buffer.from(J,"base64url").toString("utf-8"),X=T(K);if(!X||typeof X!=="object"||!("version"in X)||X.version!==1)throw Error(`Unsupported work secret version: ${X&&typeof X==="object"&&"version"in X?X.version:"unknown"}`);let Y=X;if(typeof Y.session_ingress_token!=="string"||Y.session_ingress_token.length===0)throw Error("Invalid work secret: missing or empty session_ingress_token");if(typeof Y.api_base_url!=="string")throw Error("Invalid work secret: missing api_base_url");return X}function s(J,K){let X=J.includes("localhost")||J.includes("127.0.0.1"),Y=X?"ws":"wss",x=X?"v2":"v1",W=J.replace(/^https?:\/\//,"").replace(/\/+$/,"");return`${Y}://${W}/${x}/session_ingress/ws/${K}`}function JJ(J,K){if(J===K)return!0;let X=J.slice(J.lastIndexOf("_")+1),Y=K.slice(K.lastIndexOf("_")+1);return X.length>=4&&X===Y}function KJ(J,K){return`${J.replace(/\/+$/,"")}/v1/code/sessions/${K}`}async function k(J,K){let X=await y.post(`${J}/worker/register`,{},{headers:{Authorization:`Bearer ${K}`,"Content-Type":"application/json","anthropic-version":"2023-06-01"},timeout:1e4}),Y=X.data?.worker_epoch,x=typeof Y==="string"?Number(Y):Y;if(typeof x!=="number"||!Number.isFinite(x)||!Number.isSafeInteger(x))throw Error(`registerWorker: invalid worker_epoch in response: ${D(X.data)}`);return x}h();u();p();function MJ(J){return{write:(K)=>J.write(K),writeBatch:(K)=>J.writeBatch(K),close:()=>J.close(),isConnectedStatus:()=>J.isConnectedStatus(),getStateLabel:()=>J.getStateLabel(),setOnData:(K)=>J.setOnData(K),setOnClose:(K)=>J.setOnClose(K),setOnConnect:(K)=>J.setOnConnect(K),connect:()=>void J.connect(),getLastSequenceNum:()=>0,get droppedBatchCount(){return J.droppedBatchCount},reportState:()=>{},reportMetadata:()=>{},reportDelivery:()=>{},flush:()=>Promise.resolve()}}async function PJ(J){let{sessionUrl:K,ingressToken:X,sessionId:Y,initialSequenceNum:x,getAuthToken:W}=J,H;if(W)H=()=>{let Q=W();if(!Q)return{};return{Authorization:`Bearer ${Q}`}};else S(X);let O=J.epoch??await k(K,X);M(`[bridge:repl] CCR v2: worker sessionId=${Y} epoch=${O}${J.epoch!==void 0?" (from /bridge)":" (via registerWorker)"}`);let V=new URL(K);V.pathname=V.pathname.replace(/\/$/,"")+"/worker/events/stream";let q=new v(V,{},Y,void 0,x,H),G,$=new j(q,new URL(K),{getAuthHeaders:H,heartbeatIntervalMs:J.heartbeatIntervalMs,heartbeatJitterFraction:J.heartbeatJitterFraction,onEpochMismatch:()=>{M("[bridge:repl] CCR v2: epoch superseded (409) \u2014 closing for poll-loop recovery");try{$.close(),q.close(),G?.(4090)}catch(Q){M(`[bridge:repl] CCR v2: error during epoch-mismatch cleanup: ${f(Q)}`,{level:"error"})}throw Error("epoch superseded")}});q.setOnEvent((Q)=>{$.reportDelivery(Q.event_id,"received"),$.reportDelivery(Q.event_id,"processed")});let _,N=!1,A=!1;return{write(Q){return $.writeEvent(Q)},async writeBatch(Q){for(let P of Q){if(A)break;await $.writeEvent(P)}},close(){A=!0,$.close(),q.close()},isConnectedStatus(){return N},getStateLabel(){if(q.isClosedStatus())return"closed";if(q.isConnectedStatus())return N?"connected":"init";return"connecting"},setOnData(Q){q.setOnData(Q)},setOnClose(Q){G=Q,q.setOnClose((P)=>{$.close(),Q(P??4092)})},setOnConnect(Q){_=Q},getLastSequenceNum(){return q.getLastSequenceNum()},droppedBatchCount:0,reportState(Q){$.reportState(Q)},reportMetadata(Q){$.reportMetadata(Q)},reportDelivery(Q,P){$.reportDelivery(Q,P)},flush(){return $.flush()},connect(){if(!J.outboundOnly)q.connect();$.initialize(O).then(()=>{N=!0,M(`[bridge:repl] v2 transport ready for writes (epoch=${O}, sse=${q.isConnectedStatus()?"open":"opening"})`),_?.()},(Q)=>{M(`[bridge:repl] CCR v2 initialize failed: ${f(Q)}`,{level:"error"}),$.close(),q.close(),G?.(4091)})}}}class l{_active=!1;_pending=[];get active(){return this._active}get pendingCount(){return this._pending.length}start(){this._active=!0}end(){return this._active=!1,this._pending.splice(0)}enqueue(...J){if(!this._active)return!1;return this._pending.push(...J),!0}drop(){this._active=!1;let J=this._pending.length;return this._pending.length=0,J}deactivate(){this._active=!1}}
4
- export{C as i,t as j,e as k,s as l,JJ as m,KJ as n,MJ as o,PJ as p,l as q};
4
+ export{C as m,t as n,e as o,s as p,JJ as q,KJ as r,MJ as s,PJ as t,l as u};
@@ -1,3 +1,3 @@
1
1
  // @bun
2
- import{d9 as h,e9 as G}from"./cli-wfqsfwa2.js";import{m9 as g,o9 as y}from"./cli-n3m134cf.js";import{ada as w,bda as x}from"./cli-x514vyva.js";var $={};w($,{isComputerUseSupportedPlatform:()=>J,isComputerUseMCPServer:()=>Z,getTerminalBundleId:()=>X,getCliComputerUseCapabilities:()=>Y,COMPUTER_USE_MCP_SERVER_NAME:()=>k,CLI_HOST_PLATFORM_BUNDLE_ID:()=>q,CLI_HOST_BUNDLE_ID:()=>Q});function J(b=process.platform){return b==="darwin"||b==="win32"}function X(){let b=process.env.__CFBundleIdentifier;if(b)return b;return W[g.terminal??""]??null}function Y(b=process.platform){if(b==="darwin")return{screenshotFiltering:"native",platform:"darwin"};if(b!=="win32")throw Error(`Computer Use is only supported on macOS and Windows (received ${b}).`);return{screenshotFiltering:"none",platform:"win32"}}function Z(b){return h(b)===k}var k="computer-use",q="com.anthropic.claude-code.cli-no-window",Q,W;var H=x(()=>{G();y();Q=q,W={"iTerm.app":"com.googlecode.iterm2",Apple_Terminal:"com.apple.Terminal",ghostty:"com.mitchellh.ghostty",kitty:"net.kovidgoyal.kitty",WarpTerminal:"dev.warp.Warp-Stable",vscode:"com.microsoft.VSCode"}});
3
- export{k as W8,q as X8,J as Y8,Q as Z8,X as _8,Y as $8,Z as a9,$ as b9,H as c9};
2
+ import{h9 as h,i9 as G}from"./cli-rxb5q8zw.js";import{q9 as g,s9 as y}from"./cli-jj93qmmc.js";import{eda as w,fda as x}from"./cli-w1d8n9g3.js";var $={};w($,{isComputerUseSupportedPlatform:()=>J,isComputerUseMCPServer:()=>Z,getTerminalBundleId:()=>X,getCliComputerUseCapabilities:()=>Y,COMPUTER_USE_MCP_SERVER_NAME:()=>k,CLI_HOST_PLATFORM_BUNDLE_ID:()=>q,CLI_HOST_BUNDLE_ID:()=>Q});function J(b=process.platform){return b==="darwin"||b==="win32"}function X(){let b=process.env.__CFBundleIdentifier;if(b)return b;return W[g.terminal??""]??null}function Y(b=process.platform){if(b==="darwin")return{screenshotFiltering:"native",platform:"darwin"};if(b!=="win32")throw Error(`Computer Use is only supported on macOS and Windows (received ${b}).`);return{screenshotFiltering:"none",platform:"win32"}}function Z(b){return h(b)===k}var k="computer-use",q="com.anthropic.claude-code.cli-no-window",Q,W;var H=x(()=>{G();y();Q=q,W={"iTerm.app":"com.googlecode.iterm2",Apple_Terminal:"com.apple.Terminal",ghostty:"com.mitchellh.ghostty",kitty:"net.kovidgoyal.kitty",WarpTerminal:"dev.warp.Warp-Stable",vscode:"com.microsoft.VSCode"}});
3
+ export{k as _8,q as $8,J as a9,Q as b9,X as c9,Y as d9,Z as e9,$ as f9,H as g9};
@@ -1,3 +1,3 @@
1
1
  // @bun
2
- import{bda as j}from"./cli-x514vyva.js";import{randomUUID as Y}from"crypto";var w=()=>{};function l(){return b}function i(G){b=G}function n(G){return H.has(G)?H.get(G):void 0}function r(G,J){H.set(G,J)}function s(G){return q.get(G)}function a(G,J){q.set(G,J)}function y(){b=null,H.clear(),q.clear()}function o(){return F}function E(G){F=G}function t(){F=void 0}var b=null,H,q,F;var L=j(()=>{H=new Map;q=new Map});function O(){let G=new Set;return{subscribe(J){return G.add(J),()=>{G.delete(J)}},emit(...J){for(let Q of G)Q(...J)},clear(){G.clear()}}}var _=()=>{};import{realpathSync as h}from"fs";import z from"lodash-es/sumBy.js";import{cwd as m}from"process";function k(){let G="";if(typeof process<"u"&&typeof process.cwd==="function"&&typeof h==="function"){let Q=m();try{G=h(Q).normalize("NFC")}catch{G=Q.normalize("NFC")}}return{originalCwd:G,projectRoot:G,totalCostUSD:0,totalAPIDuration:0,totalAPIDurationWithoutRetries:0,totalToolDuration:0,turnHookDurationMs:0,turnToolDurationMs:0,turnClassifierDurationMs:0,turnToolCount:0,turnHookCount:0,turnClassifierCount:0,startTime:Date.now(),lastInteractionTime:Date.now(),totalLinesAdded:0,totalLinesRemoved:0,hasUnknownModelCost:!1,cwd:G,modelUsage:{},mainLoopModelOverride:void 0,initialMainLoopModel:null,modelStrings:null,isInteractive:!1,kairosActive:!1,strictToolResultPairing:!1,sdkAgentProgressSummariesEnabled:!1,userMsgOptIn:!1,clientType:"cli",sessionSource:void 0,questionPreviewFormat:void 0,sessionIngressToken:void 0,oauthTokenFromFd:void 0,apiKeyFromFd:void 0,flagSettingsPath:void 0,flagSettingsInline:null,allowedSettingSources:["userSettings","projectSettings","localSettings","flagSettings","policySettings"],meter:null,sessionCounter:null,locCounter:null,prCounter:null,commitCounter:null,costCounter:null,tokenCounter:null,codeEditToolDecisionCounter:null,activeTimeCounter:null,statsStore:null,sessionId:Y(),parentSessionId:void 0,loggerProvider:null,eventLogger:null,meterProvider:null,tracerProvider:null,agentColorMap:new Map,agentColorIndex:0,lastAPIRequest:null,lastAPIRequestMessages:null,lastClassifierRequests:null,cachedClaudeMdContent:null,inMemoryErrorLog:[],inlinePlugins:[],chromeFlagOverride:void 0,useCoworkPlugins:!1,sessionBypassPermissionsMode:!1,scheduledTasksEnabled:!1,sessionCronTasks:[],sessionCreatedTeams:new Set,sessionTrustAccepted:!1,sessionPersistenceDisabled:!1,hasExitedPlanMode:!1,needsPlanModeExitAttachment:!1,needsAutoModeExitAttachment:!1,lspRecommendationShownThisSession:!1,initJsonSchema:null,registeredHooks:null,planSlugCache:new Map,teleportedSessionInfo:null,invokedSkills:new Map,slowOperations:[],sdkBetas:void 0,mainThreadAgentType:void 0,isRemoteMode:!1,replBridgeActive:!1,directConnectServerUrl:void 0,systemPromptSectionCache:new Map,lastEmittedDate:null,additionalDirectoriesForClaudeMd:[],allowedChannels:[],hasDevChannels:!1,sessionProjectDir:null,promptCache1hAllowlist:null,promptCache1hEligible:null,afkModeHeaderLatched:null,fastModeHeaderLatched:null,cacheEditingHeaderLatched:null,thinkingClearLatched:null,promptId:null,lastMainRequestId:void 0,lastApiCompletionTimestamp:null,pendingPostCompaction:!1}}function Vx(){return x.sessionId}function Zx(G={}){if(G.setCurrentAsParent)x.parentSessionId=x.sessionId;return x.planSlugCache.delete(x.sessionId),x.sessionId=Y(),x.sessionProjectDir=null,x.sessionId}function $x(){return x.parentSessionId}function zx(G,J=null){x.planSlugCache.delete(x.sessionId),x.sessionId=G,x.sessionProjectDir=J,B.emit(G)}function Hx(){return x.sessionProjectDir}function Kx(){return x.originalCwd}function Xx(){return x.projectRoot}function Yx(G){x.originalCwd=G.normalize("NFC")}function bx(G){x.projectRoot=G.normalize("NFC")}function qx(){return x.cwd}function Fx(G){x.cwd=G.normalize("NFC")}function Ux(){return x.directConnectServerUrl}function Bx(G){x.directConnectServerUrl=G}function Wx(G,J){x.totalAPIDuration+=G,x.totalAPIDurationWithoutRetries+=J}function Nx(){x.totalAPIDuration=0,x.totalAPIDurationWithoutRetries=0,x.totalCostUSD=0}function fx(G,J,Q){x.modelUsage[Q]=J,x.totalCostUSD+=G}function Px(){return x.totalCostUSD}function Rx(){return x.totalAPIDuration}function wx(){return Date.now()-x.startTime}function yx(){return x.totalAPIDurationWithoutRetries}function Lx(){return x.totalToolDuration}function Ox(G){x.totalToolDuration+=G,x.turnToolDurationMs+=G,x.turnToolCount++}function _x(){return x.turnHookDurationMs}function hx(G){x.turnHookDurationMs+=G,x.turnHookCount++}function Dx(){x.turnHookDurationMs=0,x.turnHookCount=0}function Mx(){return x.turnHookCount}function kx(){return x.turnToolDurationMs}function Ix(){x.turnToolDurationMs=0,x.turnToolCount=0}function Cx(){return x.turnToolCount}function px(){return x.turnClassifierDurationMs}function gx(G){x.turnClassifierDurationMs+=G,x.turnClassifierCount++}function mx(){x.turnClassifierDurationMs=0,x.turnClassifierCount=0}function vx(){return x.turnClassifierCount}function cx(){return x.statsStore}function dx(G){x.statsStore=G}function ux(G){if(G)I();else W=!0}function lx(){if(W)I()}function I(){x.lastInteractionTime=Date.now(),W=!1}function ix(G,J){x.totalLinesAdded+=G,x.totalLinesRemoved+=J}function nx(){return x.totalLinesAdded}function rx(){return x.totalLinesRemoved}function sx(){return z(Object.values(x.modelUsage),"inputTokens")}function C(){return z(Object.values(x.modelUsage),"outputTokens")}function ax(){return z(Object.values(x.modelUsage),"cacheReadInputTokens")}function ox(){return z(Object.values(x.modelUsage),"cacheCreationInputTokens")}function Ex(){return z(Object.values(x.modelUsage),"webSearchRequests")}function tx(){return C()-N}function Ax(){return f}function Sx(G){N=C(),f=G,X=0}function ex(){return X}function Tx(){X++}function x0(){x.hasUnknownModelCost=!0}function G0(){return x.hasUnknownModelCost}function J0(){return x.lastMainRequestId}function Q0(G){x.lastMainRequestId=G}function V0(){return x.lastApiCompletionTimestamp}function Z0(G){x.lastApiCompletionTimestamp=G}function $0(){x.pendingPostCompaction=!0}function z0(){let G=x.pendingPostCompaction;return x.pendingPostCompaction=!1,G}function j0(){return x.lastInteractionTime}function H0(){if(K=!0,$)clearTimeout($);$=setTimeout(()=>{K=!1,$=void 0},p),$.unref?.()}function K0(){return K}async function X0(){while(K)await new Promise((G)=>setTimeout(G,p).unref?.())}function Y0(){return x.modelUsage}function b0(G){return x.modelUsage[G]}function q0(){return x.mainLoopModelOverride}function F0(){return x.initialMainLoopModel}function U0(G){x.mainLoopModelOverride=G}function B0(G){x.initialMainLoopModel=G}function W0(){return x.sdkBetas}function N0(G){x.sdkBetas=G}function f0(){x.totalCostUSD=0,x.totalAPIDuration=0,x.totalAPIDurationWithoutRetries=0,x.totalToolDuration=0,x.startTime=Date.now(),x.totalLinesAdded=0,x.totalLinesRemoved=0,x.hasUnknownModelCost=!1,x.modelUsage={},x.promptId=null}function P0({totalCostUSD:G,totalAPIDuration:J,totalAPIDurationWithoutRetries:Q,totalToolDuration:V,totalLinesAdded:Z,totalLinesRemoved:g,lastDuration:P,modelUsage:R}){if(x.totalCostUSD=G,x.totalAPIDuration=J,x.totalAPIDurationWithoutRetries=Q,x.totalToolDuration=V,x.totalLinesAdded=Z,x.totalLinesRemoved=g,R)x.modelUsage=R;if(P)x.startTime=Date.now()-P}function R0(){throw Error("resetStateForTests can only be called in tests")}function w0(){return x.modelStrings}function y0(G){x.modelStrings=G}function L0(){x.modelStrings=null}function O0(G,J){x.meter=G,x.sessionCounter=J("claude_code.session.count",{description:"Count of CLI sessions started"}),x.locCounter=J("claude_code.lines_of_code.count",{description:"Count of lines of code modified, with the 'type' attribute indicating whether lines were added or removed"}),x.prCounter=J("claude_code.pull_request.count",{description:"Number of pull requests created"}),x.commitCounter=J("claude_code.commit.count",{description:"Number of git commits created"}),x.costCounter=J("claude_code.cost.usage",{description:"Cost of the Claude Code session",unit:"USD"}),x.tokenCounter=J("claude_code.token.usage",{description:"Number of tokens used",unit:"tokens"}),x.codeEditToolDecisionCounter=J("claude_code.code_edit_tool.decision",{description:"Count of code editing tool permission decisions (accept/reject) for Edit, Write, and NotebookEdit tools"}),x.activeTimeCounter=J("claude_code.active_time.total",{description:"Total active time in seconds",unit:"s"})}function _0(){return x.meter}function h0(){return x.sessionCounter}function D0(){return x.locCounter}function M0(){return x.prCounter}function k0(){return x.commitCounter}function I0(){return x.costCounter}function C0(){return x.tokenCounter}function p0(){return x.codeEditToolDecisionCounter}function g0(){return x.activeTimeCounter}function m0(){return x.loggerProvider}function v0(G){x.loggerProvider=G}function c0(){return x.eventLogger}function d0(G){x.eventLogger=G}function u0(){return x.meterProvider}function l0(G){x.meterProvider=G}function i0(){return x.tracerProvider}function n0(G){x.tracerProvider=G}function v(){return!x.isInteractive}function r0(){return x.isInteractive}function s0(G){x.isInteractive=G}function a0(){return x.clientType}function o0(G){x.clientType=G}function E0(){return x.sdkAgentProgressSummariesEnabled}function t0(G){x.sdkAgentProgressSummariesEnabled=G}function A0(){return x.kairosActive}function S0(G){x.kairosActive=G}function e0(){return x.replBridgeActive}function T0(G){x.replBridgeActive=G}function x1(){return x.strictToolResultPairing}function G1(G){x.strictToolResultPairing=G}function J1(){return x.userMsgOptIn}function Q1(G){x.userMsgOptIn=G}function V1(){return x.sessionSource}function Z1(G){x.sessionSource=G}function $1(){return x.questionPreviewFormat}function z1(G){x.questionPreviewFormat=G}function j1(){return x.agentColorMap}function H1(){return x.flagSettingsPath}function K1(G){x.flagSettingsPath=G}function X1(){return x.flagSettingsInline}function Y1(G){x.flagSettingsInline=G}function b1(){return x.sessionIngressToken}function q1(G){x.sessionIngressToken=G}function F1(){return x.oauthTokenFromFd}function U1(G){x.oauthTokenFromFd=G}function B1(){return x.apiKeyFromFd}function W1(G){x.apiKeyFromFd=G}function N1(G){x.lastAPIRequest=G}function f1(){return x.lastAPIRequest}function P1(G){x.lastAPIRequestMessages=G}function R1(){return x.lastAPIRequestMessages}function w1(G){x.lastClassifierRequests=G}function y1(){return x.lastClassifierRequests}function L1(G){x.cachedClaudeMdContent=G}function O1(){return x.cachedClaudeMdContent}function _1(G){if(x.inMemoryErrorLog.length>=100)x.inMemoryErrorLog.shift();x.inMemoryErrorLog.push(G)}function h1(){return x.allowedSettingSources}function D1(G){x.allowedSettingSources=G}function M1(){return v()&&x.clientType!=="claude-vscode"}function k1(G){x.inlinePlugins=G}function I1(){return x.inlinePlugins}function C1(G){x.chromeFlagOverride=G}function p1(){return x.chromeFlagOverride}function g1(G){x.useCoworkPlugins=G,y()}function m1(){return x.useCoworkPlugins}function v1(G){x.sessionBypassPermissionsMode=G}function c1(){return x.sessionBypassPermissionsMode}function d1(G){x.scheduledTasksEnabled=G}function u1(){return x.scheduledTasksEnabled}function l1(){return x.sessionCronTasks}function i1(G){x.sessionCronTasks.push(G)}function n1(G){if(G.length===0)return 0;let J=new Set(G),Q=x.sessionCronTasks.filter((Z)=>!J.has(Z.id)),V=x.sessionCronTasks.length-Q.length;if(V===0)return 0;return x.sessionCronTasks=Q,V}function r1(G){x.sessionTrustAccepted=G}function s1(){return x.sessionTrustAccepted}function a1(G){x.sessionPersistenceDisabled=G}function o1(){return x.sessionPersistenceDisabled}function E1(){return x.hasExitedPlanMode}function t1(G){x.hasExitedPlanMode=G}function A1(){return x.needsPlanModeExitAttachment}function S1(G){x.needsPlanModeExitAttachment=G}function e1(G,J){if(J==="plan"&&G!=="plan")x.needsPlanModeExitAttachment=!1;if(G==="plan"&&J!=="plan")x.needsPlanModeExitAttachment=!0}function T1(){return x.needsAutoModeExitAttachment}function x2(G){x.needsAutoModeExitAttachment=G}function G2(G,J){if(G==="auto"&&J==="plan"||G==="plan"&&J==="auto")return;let Q=G==="auto",V=J==="auto";if(V&&!Q)x.needsAutoModeExitAttachment=!1;if(Q&&!V)x.needsAutoModeExitAttachment=!0}function J2(){return x.lspRecommendationShownThisSession}function Q2(G){x.lspRecommendationShownThisSession=G}function V2(G){x.initJsonSchema=G}function Z2(){return x.initJsonSchema}function $2(G){if(!x.registeredHooks)x.registeredHooks={};for(let[J,Q]of Object.entries(G)){let V=J;if(!x.registeredHooks[V])x.registeredHooks[V]=[];x.registeredHooks[V].push(...Q)}}function z2(){return x.registeredHooks}function j2(){x.registeredHooks=null}function H2(){if(!x.registeredHooks)return;let G={};for(let[J,Q]of Object.entries(x.registeredHooks)){let V=Q.filter((Z)=>!("pluginRoot"in Z));if(V.length>0)G[J]=V}x.registeredHooks=Object.keys(G).length>0?G:null}function K2(){x.initJsonSchema=null,x.registeredHooks=null}function X2(){return x.planSlugCache}function Y2(){return x.sessionCreatedTeams}function b2(G){x.teleportedSessionInfo={isTeleported:!0,hasLoggedFirstMessage:!1,sessionId:G.sessionId}}function q2(){return x.teleportedSessionInfo}function F2(){if(x.teleportedSessionInfo)x.teleportedSessionInfo.hasLoggedFirstMessage=!0}function U2(G,J,Q,V=null){let Z=`${V??""}:${G}`;x.invokedSkills.set(Z,{skillName:G,skillPath:J,content:Q,invokedAt:Date.now(),agentId:V})}function B2(){return x.invokedSkills}function W2(G){let J=G??null,Q=new Map;for(let[V,Z]of x.invokedSkills)if(Z.agentId===J)Q.set(V,Z);return Q}function N2(G){if(!G||G.size===0){x.invokedSkills.clear();return}for(let[J,Q]of x.invokedSkills)if(Q.agentId===null||!G.has(Q.agentId))x.invokedSkills.delete(J)}function f2(G){for(let[J,Q]of x.invokedSkills)if(Q.agentId===G)x.invokedSkills.delete(J)}function P2(G,J){if(process.env.USER_TYPE!=="ant")return;if(G.includes("exec")&&G.includes("claude-prompt-"))return;let Q=Date.now();if(x.slowOperations=x.slowOperations.filter((V)=>Q-V.timestamp<U),x.slowOperations.push({operation:G,durationMs:J,timestamp:Q}),x.slowOperations.length>D)x.slowOperations=x.slowOperations.slice(-D)}function R2(){if(x.slowOperations.length===0)return M;let G=Date.now();if(x.slowOperations.some((J)=>G-J.timestamp>=U)){if(x.slowOperations=x.slowOperations.filter((J)=>G-J.timestamp<U),x.slowOperations.length===0)return M}return x.slowOperations}function w2(){return x.mainThreadAgentType}function y2(G){x.mainThreadAgentType=G}function L2(){return x.isRemoteMode}function O2(G){x.isRemoteMode=G}function _2(){return x.systemPromptSectionCache}function h2(G,J){x.systemPromptSectionCache.set(G,J)}function D2(){x.systemPromptSectionCache.clear()}function M2(){return x.lastEmittedDate}function k2(G){x.lastEmittedDate=G}function I2(){return x.additionalDirectoriesForClaudeMd}function C2(G){x.additionalDirectoriesForClaudeMd=G}function p2(){return x.allowedChannels}function g2(G){x.allowedChannels=G}function m2(){return x.hasDevChannels}function v2(G){x.hasDevChannels=G}function c2(){return x.promptCache1hAllowlist}function d2(G){x.promptCache1hAllowlist=G}function u2(){return x.promptCache1hEligible}function l2(G){x.promptCache1hEligible=G}function i2(){return x.afkModeHeaderLatched}function n2(G){x.afkModeHeaderLatched=G}function r2(){return x.fastModeHeaderLatched}function s2(G){x.fastModeHeaderLatched=G}function a2(){return x.cacheEditingHeaderLatched}function o2(G){x.cacheEditingHeaderLatched=G}function E2(){return x.thinkingClearLatched}function t2(G){x.thinkingClearLatched=G}function A2(){x.afkModeHeaderLatched=null,x.fastModeHeaderLatched=null,x.cacheEditingHeaderLatched=null,x.thinkingClearLatched=null}function S2(){return x.promptId}function e2(G){x.promptId=G}var x,B,jx,W=!1,N=0,f=null,X=0,K=!1,$,p=150,D=10,U=1e4,M;var c=j(()=>{w();L();_();x=k();B=O(),jx=B.subscribe;M=[]});
3
- export{l as P_,i as Q_,n as R_,r as S_,s as T_,a as U_,y as V_,o as W_,E as X_,t as Y_,L as Z_,O as __,_ as $_,Vx as a$,Zx as b$,$x as c$,zx as d$,jx as e$,Hx as f$,Kx as g$,Xx as h$,Yx as i$,bx as j$,qx as k$,Fx as l$,Ux as m$,Bx as n$,Wx as o$,Nx as p$,fx as q$,Px as r$,Rx as s$,wx as t$,yx as u$,Lx as v$,Ox as w$,_x as x$,hx as y$,Dx as z$,Mx as A$,kx as B$,Ix as C$,Cx as D$,px as E$,gx as F$,mx as G$,vx as H$,cx as I$,dx as J$,ux as K$,lx as L$,ix as M$,nx as N$,rx as O$,sx as P$,C as Q$,ax as R$,ox as S$,Ex as T$,tx as U$,Ax as V$,Sx as W$,ex as X$,Tx as Y$,x0 as Z$,G0 as _$,J0 as $$,Q0 as aaa,V0 as baa,Z0 as caa,$0 as daa,z0 as eaa,j0 as faa,H0 as gaa,K0 as haa,X0 as iaa,Y0 as jaa,b0 as kaa,q0 as laa,F0 as maa,U0 as naa,B0 as oaa,W0 as paa,N0 as qaa,f0 as raa,P0 as saa,R0 as taa,w0 as uaa,y0 as vaa,L0 as waa,O0 as xaa,_0 as yaa,h0 as zaa,D0 as Aaa,M0 as Baa,k0 as Caa,I0 as Daa,C0 as Eaa,p0 as Faa,g0 as Gaa,m0 as Haa,v0 as Iaa,c0 as Jaa,d0 as Kaa,u0 as Laa,l0 as Maa,i0 as Naa,n0 as Oaa,v as Paa,r0 as Qaa,s0 as Raa,a0 as Saa,o0 as Taa,E0 as Uaa,t0 as Vaa,A0 as Waa,S0 as Xaa,e0 as Yaa,T0 as Zaa,x1 as _aa,G1 as $aa,J1 as aba,Q1 as bba,V1 as cba,Z1 as dba,$1 as eba,z1 as fba,j1 as gba,H1 as hba,K1 as iba,X1 as jba,Y1 as kba,b1 as lba,q1 as mba,F1 as nba,U1 as oba,B1 as pba,W1 as qba,N1 as rba,f1 as sba,P1 as tba,R1 as uba,w1 as vba,y1 as wba,L1 as xba,O1 as yba,_1 as zba,h1 as Aba,D1 as Bba,M1 as Cba,k1 as Dba,I1 as Eba,C1 as Fba,p1 as Gba,g1 as Hba,m1 as Iba,v1 as Jba,c1 as Kba,d1 as Lba,u1 as Mba,l1 as Nba,i1 as Oba,n1 as Pba,r1 as Qba,s1 as Rba,a1 as Sba,o1 as Tba,E1 as Uba,t1 as Vba,A1 as Wba,S1 as Xba,e1 as Yba,T1 as Zba,x2 as _ba,G2 as $ba,J2 as aca,Q2 as bca,V2 as cca,Z2 as dca,$2 as eca,z2 as fca,j2 as gca,H2 as hca,K2 as ica,X2 as jca,Y2 as kca,b2 as lca,q2 as mca,F2 as nca,U2 as oca,B2 as pca,W2 as qca,N2 as rca,f2 as sca,P2 as tca,R2 as uca,w2 as vca,y2 as wca,L2 as xca,O2 as yca,_2 as zca,h2 as Aca,D2 as Bca,M2 as Cca,k2 as Dca,I2 as Eca,C2 as Fca,p2 as Gca,g2 as Hca,m2 as Ica,v2 as Jca,c2 as Kca,d2 as Lca,u2 as Mca,l2 as Nca,i2 as Oca,n2 as Pca,r2 as Qca,s2 as Rca,a2 as Sca,o2 as Tca,E2 as Uca,t2 as Vca,A2 as Wca,S2 as Xca,e2 as Yca,c as Zca};
2
+ import{fda as j}from"./cli-w1d8n9g3.js";import{randomUUID as Y}from"crypto";var w=()=>{};function l(){return b}function i(G){b=G}function n(G){return H.has(G)?H.get(G):void 0}function r(G,J){H.set(G,J)}function s(G){return q.get(G)}function a(G,J){q.set(G,J)}function y(){b=null,H.clear(),q.clear()}function o(){return F}function E(G){F=G}function t(){F=void 0}var b=null,H,q,F;var L=j(()=>{H=new Map;q=new Map});function O(){let G=new Set;return{subscribe(J){return G.add(J),()=>{G.delete(J)}},emit(...J){for(let Q of G)Q(...J)},clear(){G.clear()}}}var _=()=>{};import{realpathSync as h}from"fs";import z from"lodash-es/sumBy.js";import{cwd as m}from"process";function k(){let G="";if(typeof process<"u"&&typeof process.cwd==="function"&&typeof h==="function"){let Q=m();try{G=h(Q).normalize("NFC")}catch{G=Q.normalize("NFC")}}return{originalCwd:G,projectRoot:G,totalCostUSD:0,totalAPIDuration:0,totalAPIDurationWithoutRetries:0,totalToolDuration:0,turnHookDurationMs:0,turnToolDurationMs:0,turnClassifierDurationMs:0,turnToolCount:0,turnHookCount:0,turnClassifierCount:0,startTime:Date.now(),lastInteractionTime:Date.now(),totalLinesAdded:0,totalLinesRemoved:0,hasUnknownModelCost:!1,cwd:G,modelUsage:{},mainLoopModelOverride:void 0,initialMainLoopModel:null,modelStrings:null,isInteractive:!1,kairosActive:!1,strictToolResultPairing:!1,sdkAgentProgressSummariesEnabled:!1,userMsgOptIn:!1,clientType:"cli",sessionSource:void 0,questionPreviewFormat:void 0,sessionIngressToken:void 0,oauthTokenFromFd:void 0,apiKeyFromFd:void 0,flagSettingsPath:void 0,flagSettingsInline:null,allowedSettingSources:["userSettings","projectSettings","localSettings","flagSettings","policySettings"],meter:null,sessionCounter:null,locCounter:null,prCounter:null,commitCounter:null,costCounter:null,tokenCounter:null,codeEditToolDecisionCounter:null,activeTimeCounter:null,statsStore:null,sessionId:Y(),parentSessionId:void 0,loggerProvider:null,eventLogger:null,meterProvider:null,tracerProvider:null,agentColorMap:new Map,agentColorIndex:0,lastAPIRequest:null,lastAPIRequestMessages:null,lastClassifierRequests:null,cachedClaudeMdContent:null,inMemoryErrorLog:[],inlinePlugins:[],chromeFlagOverride:void 0,useCoworkPlugins:!1,sessionBypassPermissionsMode:!1,scheduledTasksEnabled:!1,sessionCronTasks:[],sessionCreatedTeams:new Set,sessionTrustAccepted:!1,sessionPersistenceDisabled:!1,hasExitedPlanMode:!1,needsPlanModeExitAttachment:!1,needsAutoModeExitAttachment:!1,lspRecommendationShownThisSession:!1,initJsonSchema:null,registeredHooks:null,planSlugCache:new Map,teleportedSessionInfo:null,invokedSkills:new Map,slowOperations:[],sdkBetas:void 0,mainThreadAgentType:void 0,isRemoteMode:!1,replBridgeActive:!1,directConnectServerUrl:void 0,systemPromptSectionCache:new Map,lastEmittedDate:null,additionalDirectoriesForClaudeMd:[],allowedChannels:[],hasDevChannels:!1,sessionProjectDir:null,promptCache1hAllowlist:null,promptCache1hEligible:null,afkModeHeaderLatched:null,fastModeHeaderLatched:null,cacheEditingHeaderLatched:null,thinkingClearLatched:null,promptId:null,lastMainRequestId:void 0,lastApiCompletionTimestamp:null,pendingPostCompaction:!1}}function Vx(){return x.sessionId}function Zx(G={}){if(G.setCurrentAsParent)x.parentSessionId=x.sessionId;return x.planSlugCache.delete(x.sessionId),x.sessionId=Y(),x.sessionProjectDir=null,x.sessionId}function $x(){return x.parentSessionId}function zx(G,J=null){x.planSlugCache.delete(x.sessionId),x.sessionId=G,x.sessionProjectDir=J,B.emit(G)}function Hx(){return x.sessionProjectDir}function Kx(){return x.originalCwd}function Xx(){return x.projectRoot}function Yx(G){x.originalCwd=G.normalize("NFC")}function bx(G){x.projectRoot=G.normalize("NFC")}function qx(){return x.cwd}function Fx(G){x.cwd=G.normalize("NFC")}function Ux(){return x.directConnectServerUrl}function Bx(G){x.directConnectServerUrl=G}function Wx(G,J){x.totalAPIDuration+=G,x.totalAPIDurationWithoutRetries+=J}function Nx(){x.totalAPIDuration=0,x.totalAPIDurationWithoutRetries=0,x.totalCostUSD=0}function fx(G,J,Q){x.modelUsage[Q]=J,x.totalCostUSD+=G}function Px(){return x.totalCostUSD}function Rx(){return x.totalAPIDuration}function wx(){return Date.now()-x.startTime}function yx(){return x.totalAPIDurationWithoutRetries}function Lx(){return x.totalToolDuration}function Ox(G){x.totalToolDuration+=G,x.turnToolDurationMs+=G,x.turnToolCount++}function _x(){return x.turnHookDurationMs}function hx(G){x.turnHookDurationMs+=G,x.turnHookCount++}function Dx(){x.turnHookDurationMs=0,x.turnHookCount=0}function Mx(){return x.turnHookCount}function kx(){return x.turnToolDurationMs}function Ix(){x.turnToolDurationMs=0,x.turnToolCount=0}function Cx(){return x.turnToolCount}function px(){return x.turnClassifierDurationMs}function gx(G){x.turnClassifierDurationMs+=G,x.turnClassifierCount++}function mx(){x.turnClassifierDurationMs=0,x.turnClassifierCount=0}function vx(){return x.turnClassifierCount}function cx(){return x.statsStore}function dx(G){x.statsStore=G}function ux(G){if(G)I();else W=!0}function lx(){if(W)I()}function I(){x.lastInteractionTime=Date.now(),W=!1}function ix(G,J){x.totalLinesAdded+=G,x.totalLinesRemoved+=J}function nx(){return x.totalLinesAdded}function rx(){return x.totalLinesRemoved}function sx(){return z(Object.values(x.modelUsage),"inputTokens")}function C(){return z(Object.values(x.modelUsage),"outputTokens")}function ax(){return z(Object.values(x.modelUsage),"cacheReadInputTokens")}function ox(){return z(Object.values(x.modelUsage),"cacheCreationInputTokens")}function Ex(){return z(Object.values(x.modelUsage),"webSearchRequests")}function tx(){return C()-N}function Ax(){return f}function Sx(G){N=C(),f=G,X=0}function ex(){return X}function Tx(){X++}function x0(){x.hasUnknownModelCost=!0}function G0(){return x.hasUnknownModelCost}function J0(){return x.lastMainRequestId}function Q0(G){x.lastMainRequestId=G}function V0(){return x.lastApiCompletionTimestamp}function Z0(G){x.lastApiCompletionTimestamp=G}function $0(){x.pendingPostCompaction=!0}function z0(){let G=x.pendingPostCompaction;return x.pendingPostCompaction=!1,G}function j0(){return x.lastInteractionTime}function H0(){if(K=!0,$)clearTimeout($);$=setTimeout(()=>{K=!1,$=void 0},p),$.unref?.()}function K0(){return K}async function X0(){while(K)await new Promise((G)=>setTimeout(G,p).unref?.())}function Y0(){return x.modelUsage}function b0(G){return x.modelUsage[G]}function q0(){return x.mainLoopModelOverride}function F0(){return x.initialMainLoopModel}function U0(G){x.mainLoopModelOverride=G}function B0(G){x.initialMainLoopModel=G}function W0(){return x.sdkBetas}function N0(G){x.sdkBetas=G}function f0(){x.totalCostUSD=0,x.totalAPIDuration=0,x.totalAPIDurationWithoutRetries=0,x.totalToolDuration=0,x.startTime=Date.now(),x.totalLinesAdded=0,x.totalLinesRemoved=0,x.hasUnknownModelCost=!1,x.modelUsage={},x.promptId=null}function P0({totalCostUSD:G,totalAPIDuration:J,totalAPIDurationWithoutRetries:Q,totalToolDuration:V,totalLinesAdded:Z,totalLinesRemoved:g,lastDuration:P,modelUsage:R}){if(x.totalCostUSD=G,x.totalAPIDuration=J,x.totalAPIDurationWithoutRetries=Q,x.totalToolDuration=V,x.totalLinesAdded=Z,x.totalLinesRemoved=g,R)x.modelUsage=R;if(P)x.startTime=Date.now()-P}function R0(){throw Error("resetStateForTests can only be called in tests")}function w0(){return x.modelStrings}function y0(G){x.modelStrings=G}function L0(){x.modelStrings=null}function O0(G,J){x.meter=G,x.sessionCounter=J("claude_code.session.count",{description:"Count of CLI sessions started"}),x.locCounter=J("claude_code.lines_of_code.count",{description:"Count of lines of code modified, with the 'type' attribute indicating whether lines were added or removed"}),x.prCounter=J("claude_code.pull_request.count",{description:"Number of pull requests created"}),x.commitCounter=J("claude_code.commit.count",{description:"Number of git commits created"}),x.costCounter=J("claude_code.cost.usage",{description:"Cost of the Claude Code session",unit:"USD"}),x.tokenCounter=J("claude_code.token.usage",{description:"Number of tokens used",unit:"tokens"}),x.codeEditToolDecisionCounter=J("claude_code.code_edit_tool.decision",{description:"Count of code editing tool permission decisions (accept/reject) for Edit, Write, and NotebookEdit tools"}),x.activeTimeCounter=J("claude_code.active_time.total",{description:"Total active time in seconds",unit:"s"})}function _0(){return x.meter}function h0(){return x.sessionCounter}function D0(){return x.locCounter}function M0(){return x.prCounter}function k0(){return x.commitCounter}function I0(){return x.costCounter}function C0(){return x.tokenCounter}function p0(){return x.codeEditToolDecisionCounter}function g0(){return x.activeTimeCounter}function m0(){return x.loggerProvider}function v0(G){x.loggerProvider=G}function c0(){return x.eventLogger}function d0(G){x.eventLogger=G}function u0(){return x.meterProvider}function l0(G){x.meterProvider=G}function i0(){return x.tracerProvider}function n0(G){x.tracerProvider=G}function v(){return!x.isInteractive}function r0(){return x.isInteractive}function s0(G){x.isInteractive=G}function a0(){return x.clientType}function o0(G){x.clientType=G}function E0(){return x.sdkAgentProgressSummariesEnabled}function t0(G){x.sdkAgentProgressSummariesEnabled=G}function A0(){return x.kairosActive}function S0(G){x.kairosActive=G}function e0(){return x.replBridgeActive}function T0(G){x.replBridgeActive=G}function x1(){return x.strictToolResultPairing}function G1(G){x.strictToolResultPairing=G}function J1(){return x.userMsgOptIn}function Q1(G){x.userMsgOptIn=G}function V1(){return x.sessionSource}function Z1(G){x.sessionSource=G}function $1(){return x.questionPreviewFormat}function z1(G){x.questionPreviewFormat=G}function j1(){return x.agentColorMap}function H1(){return x.flagSettingsPath}function K1(G){x.flagSettingsPath=G}function X1(){return x.flagSettingsInline}function Y1(G){x.flagSettingsInline=G}function b1(){return x.sessionIngressToken}function q1(G){x.sessionIngressToken=G}function F1(){return x.oauthTokenFromFd}function U1(G){x.oauthTokenFromFd=G}function B1(){return x.apiKeyFromFd}function W1(G){x.apiKeyFromFd=G}function N1(G){x.lastAPIRequest=G}function f1(){return x.lastAPIRequest}function P1(G){x.lastAPIRequestMessages=G}function R1(){return x.lastAPIRequestMessages}function w1(G){x.lastClassifierRequests=G}function y1(){return x.lastClassifierRequests}function L1(G){x.cachedClaudeMdContent=G}function O1(){return x.cachedClaudeMdContent}function _1(G){if(x.inMemoryErrorLog.length>=100)x.inMemoryErrorLog.shift();x.inMemoryErrorLog.push(G)}function h1(){return x.allowedSettingSources}function D1(G){x.allowedSettingSources=G}function M1(){return v()&&x.clientType!=="claude-vscode"}function k1(G){x.inlinePlugins=G}function I1(){return x.inlinePlugins}function C1(G){x.chromeFlagOverride=G}function p1(){return x.chromeFlagOverride}function g1(G){x.useCoworkPlugins=G,y()}function m1(){return x.useCoworkPlugins}function v1(G){x.sessionBypassPermissionsMode=G}function c1(){return x.sessionBypassPermissionsMode}function d1(G){x.scheduledTasksEnabled=G}function u1(){return x.scheduledTasksEnabled}function l1(){return x.sessionCronTasks}function i1(G){x.sessionCronTasks.push(G)}function n1(G){if(G.length===0)return 0;let J=new Set(G),Q=x.sessionCronTasks.filter((Z)=>!J.has(Z.id)),V=x.sessionCronTasks.length-Q.length;if(V===0)return 0;return x.sessionCronTasks=Q,V}function r1(G){x.sessionTrustAccepted=G}function s1(){return x.sessionTrustAccepted}function a1(G){x.sessionPersistenceDisabled=G}function o1(){return x.sessionPersistenceDisabled}function E1(){return x.hasExitedPlanMode}function t1(G){x.hasExitedPlanMode=G}function A1(){return x.needsPlanModeExitAttachment}function S1(G){x.needsPlanModeExitAttachment=G}function e1(G,J){if(J==="plan"&&G!=="plan")x.needsPlanModeExitAttachment=!1;if(G==="plan"&&J!=="plan")x.needsPlanModeExitAttachment=!0}function T1(){return x.needsAutoModeExitAttachment}function x2(G){x.needsAutoModeExitAttachment=G}function G2(G,J){if(G==="auto"&&J==="plan"||G==="plan"&&J==="auto")return;let Q=G==="auto",V=J==="auto";if(V&&!Q)x.needsAutoModeExitAttachment=!1;if(Q&&!V)x.needsAutoModeExitAttachment=!0}function J2(){return x.lspRecommendationShownThisSession}function Q2(G){x.lspRecommendationShownThisSession=G}function V2(G){x.initJsonSchema=G}function Z2(){return x.initJsonSchema}function $2(G){if(!x.registeredHooks)x.registeredHooks={};for(let[J,Q]of Object.entries(G)){let V=J;if(!x.registeredHooks[V])x.registeredHooks[V]=[];x.registeredHooks[V].push(...Q)}}function z2(){return x.registeredHooks}function j2(){x.registeredHooks=null}function H2(){if(!x.registeredHooks)return;let G={};for(let[J,Q]of Object.entries(x.registeredHooks)){let V=Q.filter((Z)=>!("pluginRoot"in Z));if(V.length>0)G[J]=V}x.registeredHooks=Object.keys(G).length>0?G:null}function K2(){x.initJsonSchema=null,x.registeredHooks=null}function X2(){return x.planSlugCache}function Y2(){return x.sessionCreatedTeams}function b2(G){x.teleportedSessionInfo={isTeleported:!0,hasLoggedFirstMessage:!1,sessionId:G.sessionId}}function q2(){return x.teleportedSessionInfo}function F2(){if(x.teleportedSessionInfo)x.teleportedSessionInfo.hasLoggedFirstMessage=!0}function U2(G,J,Q,V=null){let Z=`${V??""}:${G}`;x.invokedSkills.set(Z,{skillName:G,skillPath:J,content:Q,invokedAt:Date.now(),agentId:V})}function B2(){return x.invokedSkills}function W2(G){let J=G??null,Q=new Map;for(let[V,Z]of x.invokedSkills)if(Z.agentId===J)Q.set(V,Z);return Q}function N2(G){if(!G||G.size===0){x.invokedSkills.clear();return}for(let[J,Q]of x.invokedSkills)if(Q.agentId===null||!G.has(Q.agentId))x.invokedSkills.delete(J)}function f2(G){for(let[J,Q]of x.invokedSkills)if(Q.agentId===G)x.invokedSkills.delete(J)}function P2(G,J){if(process.env.USER_TYPE!=="ant")return;if(G.includes("exec")&&G.includes("claude-prompt-"))return;let Q=Date.now();if(x.slowOperations=x.slowOperations.filter((V)=>Q-V.timestamp<U),x.slowOperations.push({operation:G,durationMs:J,timestamp:Q}),x.slowOperations.length>D)x.slowOperations=x.slowOperations.slice(-D)}function R2(){if(x.slowOperations.length===0)return M;let G=Date.now();if(x.slowOperations.some((J)=>G-J.timestamp>=U)){if(x.slowOperations=x.slowOperations.filter((J)=>G-J.timestamp<U),x.slowOperations.length===0)return M}return x.slowOperations}function w2(){return x.mainThreadAgentType}function y2(G){x.mainThreadAgentType=G}function L2(){return x.isRemoteMode}function O2(G){x.isRemoteMode=G}function _2(){return x.systemPromptSectionCache}function h2(G,J){x.systemPromptSectionCache.set(G,J)}function D2(){x.systemPromptSectionCache.clear()}function M2(){return x.lastEmittedDate}function k2(G){x.lastEmittedDate=G}function I2(){return x.additionalDirectoriesForClaudeMd}function C2(G){x.additionalDirectoriesForClaudeMd=G}function p2(){return x.allowedChannels}function g2(G){x.allowedChannels=G}function m2(){return x.hasDevChannels}function v2(G){x.hasDevChannels=G}function c2(){return x.promptCache1hAllowlist}function d2(G){x.promptCache1hAllowlist=G}function u2(){return x.promptCache1hEligible}function l2(G){x.promptCache1hEligible=G}function i2(){return x.afkModeHeaderLatched}function n2(G){x.afkModeHeaderLatched=G}function r2(){return x.fastModeHeaderLatched}function s2(G){x.fastModeHeaderLatched=G}function a2(){return x.cacheEditingHeaderLatched}function o2(G){x.cacheEditingHeaderLatched=G}function E2(){return x.thinkingClearLatched}function t2(G){x.thinkingClearLatched=G}function A2(){x.afkModeHeaderLatched=null,x.fastModeHeaderLatched=null,x.cacheEditingHeaderLatched=null,x.thinkingClearLatched=null}function S2(){return x.promptId}function e2(G){x.promptId=G}var x,B,jx,W=!1,N=0,f=null,X=0,K=!1,$,p=150,D=10,U=1e4,M;var c=j(()=>{w();L();_();x=k();B=O(),jx=B.subscribe;M=[]});
3
+ export{l as T_,i as U_,n as V_,r as W_,s as X_,a as Y_,y as Z_,o as __,E as $_,t as a$,L as b$,O as c$,_ as d$,Vx as e$,Zx as f$,$x as g$,zx as h$,jx as i$,Hx as j$,Kx as k$,Xx as l$,Yx as m$,bx as n$,qx as o$,Fx as p$,Ux as q$,Bx as r$,Wx as s$,Nx as t$,fx as u$,Px as v$,Rx as w$,wx as x$,yx as y$,Lx as z$,Ox as A$,_x as B$,hx as C$,Dx as D$,Mx as E$,kx as F$,Ix as G$,Cx as H$,px as I$,gx as J$,mx as K$,vx as L$,cx as M$,dx as N$,ux as O$,lx as P$,ix as Q$,nx as R$,rx as S$,sx as T$,C as U$,ax as V$,ox as W$,Ex as X$,tx as Y$,Ax as Z$,Sx as _$,ex as $$,Tx as aaa,x0 as baa,G0 as caa,J0 as daa,Q0 as eaa,V0 as faa,Z0 as gaa,$0 as haa,z0 as iaa,j0 as jaa,H0 as kaa,K0 as laa,X0 as maa,Y0 as naa,b0 as oaa,q0 as paa,F0 as qaa,U0 as raa,B0 as saa,W0 as taa,N0 as uaa,f0 as vaa,P0 as waa,R0 as xaa,w0 as yaa,y0 as zaa,L0 as Aaa,O0 as Baa,_0 as Caa,h0 as Daa,D0 as Eaa,M0 as Faa,k0 as Gaa,I0 as Haa,C0 as Iaa,p0 as Jaa,g0 as Kaa,m0 as Laa,v0 as Maa,c0 as Naa,d0 as Oaa,u0 as Paa,l0 as Qaa,i0 as Raa,n0 as Saa,v as Taa,r0 as Uaa,s0 as Vaa,a0 as Waa,o0 as Xaa,E0 as Yaa,t0 as Zaa,A0 as _aa,S0 as $aa,e0 as aba,T0 as bba,x1 as cba,G1 as dba,J1 as eba,Q1 as fba,V1 as gba,Z1 as hba,$1 as iba,z1 as jba,j1 as kba,H1 as lba,K1 as mba,X1 as nba,Y1 as oba,b1 as pba,q1 as qba,F1 as rba,U1 as sba,B1 as tba,W1 as uba,N1 as vba,f1 as wba,P1 as xba,R1 as yba,w1 as zba,y1 as Aba,L1 as Bba,O1 as Cba,_1 as Dba,h1 as Eba,D1 as Fba,M1 as Gba,k1 as Hba,I1 as Iba,C1 as Jba,p1 as Kba,g1 as Lba,m1 as Mba,v1 as Nba,c1 as Oba,d1 as Pba,u1 as Qba,l1 as Rba,i1 as Sba,n1 as Tba,r1 as Uba,s1 as Vba,a1 as Wba,o1 as Xba,E1 as Yba,t1 as Zba,A1 as _ba,S1 as $ba,e1 as aca,T1 as bca,x2 as cca,G2 as dca,J2 as eca,Q2 as fca,V2 as gca,Z2 as hca,$2 as ica,z2 as jca,j2 as kca,H2 as lca,K2 as mca,X2 as nca,Y2 as oca,b2 as pca,q2 as qca,F2 as rca,U2 as sca,B2 as tca,W2 as uca,N2 as vca,f2 as wca,P2 as xca,R2 as yca,w2 as zca,y2 as Aca,L2 as Bca,O2 as Cca,_2 as Dca,h2 as Eca,D2 as Fca,M2 as Gca,k2 as Hca,I2 as Ica,C2 as Jca,p2 as Kca,g2 as Lca,m2 as Mca,v2 as Nca,c2 as Oca,d2 as Pca,u2 as Qca,l2 as Rca,i2 as Sca,n2 as Tca,r2 as Uca,s2 as Vca,a2 as Wca,o2 as Xca,E2 as Yca,t2 as Zca,A2 as _ca,S2 as $ca,e2 as ada,c as bda};
@@ -1,5 +1,5 @@
1
1
  // @bun
2
- import{Kw as A,Lw as l,RF as D,SF as F,VF as y,_F as r,ep as x,ip as d}from"./cli-5pb6kdxn.js";import{vQ as z,wQ as b}from"./cli-5wh173wa.js";import{A9 as T,B9 as C}from"./cli-d58ptbve.js";import{C9 as k,D9 as c}from"./cli-3q7meftn.js";import{c_ as j,d_ as m,h_ as L,l_ as p,r_ as V,u_ as E}from"./cli-a98b285v.js";import{bda as w}from"./cli-x514vyva.js";import{spawn as G,spawnSync as _}from"child_process";import I from"lodash-es/memoize.js";import{basename as O}from"path";function g(q){return!!T(q)}function N(q){let H=O(q.split(" ")[0]??"");return u.find((B)=>H.includes(B))}function f(q,H,B){if(!B)return[H];if(P.has(q))return["-g",`${H}:${B}`];if(q==="subl")return[`${H}:${B}`];return[H]}function Kq(q,H){let B=v();if(!B)return!1;let J=B.split(" "),X=J[0]??B,K=J.slice(1),Q=N(B);if(Q){let W=f(Q,q,H),Z={detached:!0,stdio:"ignore"},M;if(process.platform==="win32"){let U=W.map((S)=>`"${S}"`).join(" ");M=G(`${B} ${U}`,{...Z,shell:!0})}else M=G(X,[...K,...W],Z);return M.on("error",(U)=>V(`editor spawn failed: ${U}`,{level:"error"})),M.unref(),!0}let $=z.get(process.stdout);if(!$)return!1;let Y=H&&h.test(O(X));$.enterAlternateScreen();try{let W={stdio:"inherit"},Z;if(process.platform==="win32"){let M=Y?`+${H} `:"";Z=_(`${B} ${M}"${q}"`,{...W,shell:!0})}else{let M=[...K,...Y?[`+${H}`,q]:[q]];Z=_(X,M,W)}if(Z.error)return V(`editor spawn failed: ${Z.error}`,{level:"error"}),!1;return!0}finally{$.exitAlternateScreen()}}var u,h,P,v;var R=w(()=>{b();E();C();u=["code","cursor","windsurf","codium","subl","atom","gedit","notepad++","notepad"],h=/\b(vi|vim|nvim|nano|emacs|pico|micro|helix|hx)\b/,P=new Set(["code","cursor","windsurf","codium"]);v=I(()=>{if(process.env.VISUAL?.trim())return process.env.VISUAL.trim();if(process.env.EDITOR?.trim())return process.env.EDITOR.trim();if(process.platform==="win32")return"start /wait notepad";return["code","vi","nano"].find((H)=>g(H))})});function s(q){return N(q)!==void 0}function a(q){let H=L(),B=z.get(process.stdout);if(!B)throw Error("Ink instance not found - cannot pause rendering");let J=v();if(!J)return{content:null};try{H.statSync(q)}catch{return{content:null}}let X=!s(J);if(X)B.enterAlternateScreen();else B.pause(),B.suspendStdin();try{let K=o[J]??J;return k(`${K} "${q}"`,{stdio:"inherit"}),{content:H.readFileSync(q,{encoding:"utf-8"})}}catch(K){if(typeof K==="object"&&K!==null&&"status"in K&&typeof K.status==="number"){let Q=K.status;if(Q!==0)return{content:null,error:`${x(J)} exited with code ${Q}`}}return{content:null}}finally{if(X)B.exitAlternateScreen();else B.resumeStdin(),B.resume()}}function i(q,H,B){let J=q;for(let[X,K]of Object.entries(B))if(K.type==="text"){let Q=parseInt(X),$=K.content,Y=J.indexOf($);if(Y!==-1){let W=D($),Z=F(Q,W);J=J.slice(0,Y)+Z+J.slice(Y+$.length)}}return J}function Vq(q,H){let B=L(),J=A();try{let X=H?y(q,H):q;j(J,X,{encoding:"utf-8",flush:!0});let K=a(J);if(K.content===null)return K;let Q=K.content;if(Q.endsWith(`
2
+ import{Hw as A,Iw as l,OF as D,PF as F,SF as y,XF as r,ep as x,ip as d}from"./cli-me4e2p3e.js";import{sQ as z,tQ as b}from"./cli-x8xgga1a.js";import{E9 as T,F9 as C}from"./cli-xpa1neza.js";import{G9 as k,H9 as c}from"./cli-rjerv816.js";import{g_ as j,h_ as m,l_ as L,p_ as p,v_ as V,y_ as E}from"./cli-hke6r0q8.js";import{fda as w}from"./cli-w1d8n9g3.js";import{spawn as G,spawnSync as _}from"child_process";import I from"lodash-es/memoize.js";import{basename as O}from"path";function g(q){return!!T(q)}function N(q){let H=O(q.split(" ")[0]??"");return u.find((B)=>H.includes(B))}function f(q,H,B){if(!B)return[H];if(P.has(q))return["-g",`${H}:${B}`];if(q==="subl")return[`${H}:${B}`];return[H]}function Kq(q,H){let B=v();if(!B)return!1;let J=B.split(" "),X=J[0]??B,K=J.slice(1),Q=N(B);if(Q){let W=f(Q,q,H),Z={detached:!0,stdio:"ignore"},M;if(process.platform==="win32"){let U=W.map((S)=>`"${S}"`).join(" ");M=G(`${B} ${U}`,{...Z,shell:!0})}else M=G(X,[...K,...W],Z);return M.on("error",(U)=>V(`editor spawn failed: ${U}`,{level:"error"})),M.unref(),!0}let $=z.get(process.stdout);if(!$)return!1;let Y=H&&h.test(O(X));$.enterAlternateScreen();try{let W={stdio:"inherit"},Z;if(process.platform==="win32"){let M=Y?`+${H} `:"";Z=_(`${B} ${M}"${q}"`,{...W,shell:!0})}else{let M=[...K,...Y?[`+${H}`,q]:[q]];Z=_(X,M,W)}if(Z.error)return V(`editor spawn failed: ${Z.error}`,{level:"error"}),!1;return!0}finally{$.exitAlternateScreen()}}var u,h,P,v;var R=w(()=>{b();E();C();u=["code","cursor","windsurf","codium","subl","atom","gedit","notepad++","notepad"],h=/\b(vi|vim|nvim|nano|emacs|pico|micro|helix|hx)\b/,P=new Set(["code","cursor","windsurf","codium"]);v=I(()=>{if(process.env.VISUAL?.trim())return process.env.VISUAL.trim();if(process.env.EDITOR?.trim())return process.env.EDITOR.trim();if(process.platform==="win32")return"start /wait notepad";return["code","vi","nano"].find((H)=>g(H))})});function s(q){return N(q)!==void 0}function a(q){let H=L(),B=z.get(process.stdout);if(!B)throw Error("Ink instance not found - cannot pause rendering");let J=v();if(!J)return{content:null};try{H.statSync(q)}catch{return{content:null}}let X=!s(J);if(X)B.enterAlternateScreen();else B.pause(),B.suspendStdin();try{let K=o[J]??J;return k(`${K} "${q}"`,{stdio:"inherit"}),{content:H.readFileSync(q,{encoding:"utf-8"})}}catch(K){if(typeof K==="object"&&K!==null&&"status"in K&&typeof K.status==="number"){let Q=K.status;if(Q!==0)return{content:null,error:`${x(J)} exited with code ${Q}`}}return{content:null}}finally{if(X)B.exitAlternateScreen();else B.resumeStdin(),B.resume()}}function i(q,H,B){let J=q;for(let[X,K]of Object.entries(B))if(K.type==="text"){let Q=parseInt(X),$=K.content,Y=J.indexOf($);if(Y!==-1){let W=D($),Z=F(Q,W);J=J.slice(0,Y)+Z+J.slice(Y+$.length)}}return J}function Vq(q,H){let B=L(),J=A();try{let X=H?y(q,H):q;j(J,X,{encoding:"utf-8",flush:!0});let K=a(J);if(K.content===null)return K;let Q=K.content;if(Q.endsWith(`
3
3
  `)&&!Q.endsWith(`
4
4
 
5
5
  `))Q=Q.slice(0,-1);if(H)Q=i(Q,q,H);return{content:Q}}finally{try{B.unlinkSync(J)}catch{}}}var o;var n=w(()=>{r();b();R();c();p();d();m();l();o={code:"code -w",subl:"subl --wait"}});
@@ -1,3 +1,3 @@
1
1
  // @bun
2
- import{N3 as B,e4 as p}from"./cli-9hskw92e.js";import{bda as P}from"./cli-x514vyva.js";var j,J,G,M,N,Y,C,_,I,R,f,E,k,m,A,u,y,T,h,b,w,L,F,X,$,t,s;var H=P(()=>{j=["common","uncommon","rare","epic","legendary"],J=String.fromCharCode,G=J(100,117,99,107),M=J(103,111,111,115,101),N=J(98,108,111,98),Y=J(99,97,116),C=J(100,114,97,103,111,110),_=J(111,99,116,111,112,117,115),I=J(111,119,108),R=J(112,101,110,103,117,105,110),f=J(116,117,114,116,108,101),E=J(115,110,97,105,108),k=J(103,104,111,115,116),m=J(97,120,111,108,111,116,108),A=J(99,97,112,121,98,97,114,97),u=J(99,97,99,116,117,115),y=J(114,111,98,111,116),T=J(114,97,98,98,105,116),h=J(109,117,115,104,114,111,111,109),b=J(99,104,111,110,107),w=[G,M,N,Y,C,_,I,R,f,E,k,m,A,u,y,T,h,b],L=["\xB7","\u2726","\xD7","\u25C9","@","\xB0"],F=["none","crown","tophat","propeller","halo","wizard","beanie","tinyduck"],X=["DEBUGGING","PATIENCE","CHAOS","WISDOM","SNARK"],$={common:60,uncommon:25,rare:10,epic:4,legendary:1},t={common:"\u2605",uncommon:"\u2605\u2605",rare:"\u2605\u2605\u2605",epic:"\u2605\u2605\u2605\u2605",legendary:"\u2605\u2605\u2605\u2605\u2605"},s={common:"inactive",uncommon:"success",rare:"permission",epic:"autoAccept",legendary:"warning"}});function O(q){let z=q>>>0;return function(){z|=0,z=z+1831565813|0;let D=Math.imul(z^z>>>15,1|z);return D=D+Math.imul(D^D>>>7,61|D)^D,((D^D>>>14)>>>0)/4294967296}}function W(q){if(typeof Bun<"u")return Number(BigInt(Bun.hash(q))&0xffffffffn);let z=2166136261;for(let D=0;D<q.length;D++)z^=q.charCodeAt(D),z=Math.imul(z,16777619);return z>>>0}function Q(q,z){return z[Math.floor(q()*z.length)]}function S(q){let z=Object.values($).reduce((K,U)=>K+U,0),D=q()*z;for(let K of j)if(D-=$[K],D<0)return K;return"common"}function d(q,z){let D=i[z],K=Q(q,X),U=Q(q,X);while(U===K)U=Q(q,X);let Z={};for(let V of X)if(V===K)Z[V]=Math.min(100,D+50+Math.floor(q()*30));else if(V===U)Z[V]=Math.max(1,D-10+Math.floor(q()*15));else Z[V]=D+Math.floor(q()*40);return Z}function v(q){let z=S(q);return{bones:{rarity:z,species:Q(q,w),eye:Q(q,L),hat:z==="common"?"none":Q(q,F),shiny:q()<0.01,stats:d(q,z)},inspirationSeed:Math.floor(q()*1e9)}}function qq(q){let z=q+c;if(x?.key===z)return x.value;let D=v(O(W(z)));return x={key:z,value:D},D}function l(q){return v(O(W(q)))}function zq(){let q=B();return q.oauthAccount?.accountUuid??q.userID??"anon"}function g(q){return q.appearanceSeed??`legacy:${q.hatchedAt}:${q.name}:${q.personality}`}function a(q,z){return z.speciesOverride?{...q,species:z.speciesOverride}:q}function Dq(){let q=B().companion;if(!q)return;let{bones:z}=l(g(q)),D=a(z,q);return{...q,...D}}var i,c="friend-2026-401",x;var n=P(()=>{p();H();i={common:5,uncommon:15,rare:25,epic:35,legendary:50}});
3
- export{G as cN,M as dN,N as eN,Y as fN,C as gN,_ as hN,I as iN,R as jN,f as kN,E as lN,k as mN,m as nN,A as oN,u as pN,y as qN,T as rN,h as sN,b as tN,X as uN,t as vN,s as wN,H as xN,qq as yN,l as zN,zq as AN,Dq as BN,n as CN};
2
+ import{Q3 as p,x3 as B}from"./cli-msmzt4c3.js";import{fda as P}from"./cli-w1d8n9g3.js";var j,J,G,M,N,Y,C,_,I,R,f,E,k,m,A,u,y,T,h,b,w,L,F,X,$,t,s;var H=P(()=>{j=["common","uncommon","rare","epic","legendary"],J=String.fromCharCode,G=J(100,117,99,107),M=J(103,111,111,115,101),N=J(98,108,111,98),Y=J(99,97,116),C=J(100,114,97,103,111,110),_=J(111,99,116,111,112,117,115),I=J(111,119,108),R=J(112,101,110,103,117,105,110),f=J(116,117,114,116,108,101),E=J(115,110,97,105,108),k=J(103,104,111,115,116),m=J(97,120,111,108,111,116,108),A=J(99,97,112,121,98,97,114,97),u=J(99,97,99,116,117,115),y=J(114,111,98,111,116),T=J(114,97,98,98,105,116),h=J(109,117,115,104,114,111,111,109),b=J(99,104,111,110,107),w=[G,M,N,Y,C,_,I,R,f,E,k,m,A,u,y,T,h,b],L=["\xB7","\u2726","\xD7","\u25C9","@","\xB0"],F=["none","crown","tophat","propeller","halo","wizard","beanie","tinyduck"],X=["DEBUGGING","PATIENCE","CHAOS","WISDOM","SNARK"],$={common:60,uncommon:25,rare:10,epic:4,legendary:1},t={common:"\u2605",uncommon:"\u2605\u2605",rare:"\u2605\u2605\u2605",epic:"\u2605\u2605\u2605\u2605",legendary:"\u2605\u2605\u2605\u2605\u2605"},s={common:"inactive",uncommon:"success",rare:"permission",epic:"autoAccept",legendary:"warning"}});function O(q){let z=q>>>0;return function(){z|=0,z=z+1831565813|0;let D=Math.imul(z^z>>>15,1|z);return D=D+Math.imul(D^D>>>7,61|D)^D,((D^D>>>14)>>>0)/4294967296}}function W(q){if(typeof Bun<"u")return Number(BigInt(Bun.hash(q))&0xffffffffn);let z=2166136261;for(let D=0;D<q.length;D++)z^=q.charCodeAt(D),z=Math.imul(z,16777619);return z>>>0}function Q(q,z){return z[Math.floor(q()*z.length)]}function S(q){let z=Object.values($).reduce((K,U)=>K+U,0),D=q()*z;for(let K of j)if(D-=$[K],D<0)return K;return"common"}function d(q,z){let D=i[z],K=Q(q,X),U=Q(q,X);while(U===K)U=Q(q,X);let Z={};for(let V of X)if(V===K)Z[V]=Math.min(100,D+50+Math.floor(q()*30));else if(V===U)Z[V]=Math.max(1,D-10+Math.floor(q()*15));else Z[V]=D+Math.floor(q()*40);return Z}function v(q){let z=S(q);return{bones:{rarity:z,species:Q(q,w),eye:Q(q,L),hat:z==="common"?"none":Q(q,F),shiny:q()<0.01,stats:d(q,z)},inspirationSeed:Math.floor(q()*1e9)}}function qq(q){let z=q+c;if(x?.key===z)return x.value;let D=v(O(W(z)));return x={key:z,value:D},D}function l(q){return v(O(W(q)))}function zq(){let q=B();return q.oauthAccount?.accountUuid??q.userID??"anon"}function g(q){return q.appearanceSeed??`legacy:${q.hatchedAt}:${q.name}:${q.personality}`}function a(q,z){return z.speciesOverride?{...q,species:z.speciesOverride}:q}function Dq(){let q=B().companion;if(!q)return;let{bones:z}=l(g(q)),D=a(z,q);return{...q,...D}}var i,c="friend-2026-401",x;var n=P(()=>{p();H();i={common:5,uncommon:15,rare:25,epic:35,legendary:50}});
3
+ export{G as kN,M as lN,N as mN,Y as nN,C as oN,_ as pN,I as qN,R as rN,f as sN,E as tN,k as uN,m as vN,A as wN,u as xN,y as yN,T as zN,h as AN,b as BN,X as CN,t as DN,s as EN,H as FN,qq as GN,l as HN,zq as IN,Dq as JN,n as KN};
@@ -1,3 +1,3 @@
1
1
  // @bun
2
- import{V1 as D,r1 as q}from"./cli-9hskw92e.js";import{x9 as m,y9 as z}from"./cli-shz2e0q5.js";import{bda as x}from"./cli-x514vyva.js";function E(){return process.env.USER_TYPE==="ant"&&process.env.CLAUDE_BRIDGE_OAUTH_TOKEN||void 0}function F(){return process.env.USER_TYPE==="ant"&&process.env.CLAUDE_BRIDGE_BASE_URL||void 0}function K(){return E()??q()?.accessToken}function M(){return F()??m().BASE_API_URL}var G=x(()=>{z();D()});
2
+ import{F1 as D,b1 as q}from"./cli-msmzt4c3.js";import{B9 as m,C9 as z}from"./cli-kq16afrr.js";import{fda as x}from"./cli-w1d8n9g3.js";function E(){return process.env.USER_TYPE==="ant"&&process.env.CLAUDE_BRIDGE_OAUTH_TOKEN||void 0}function F(){return process.env.USER_TYPE==="ant"&&process.env.CLAUDE_BRIDGE_BASE_URL||void 0}function K(){return E()??q()?.accessToken}function M(){return F()??m().BASE_API_URL}var G=x(()=>{z();D()});
3
3
  export{E as dc,F as ec,K as fc,M as gc,G as hc};
@@ -1,5 +1,5 @@
1
1
  // @bun
2
- import{$Y as s,oZ as _j,tT as o,uT as Oj}from"./cli-9hskw92e.js";import{$6 as z,S6 as i,X6 as l,Y6 as Bj,Z6 as n,w7 as Tj}from"./cli-nj726gac.js";import{D7 as L,E7 as Rj}from"./cli-hpzy0mat.js";import{B8 as Hj,w8 as E}from"./cli-3bxtq5dc.js";import{I8 as r,J8 as Gj}from"./cli-mx6xk0dw.js";import{h_ as h,l_ as $j,r_ as D,u_ as kj}from"./cli-a98b285v.js";import{Zca as Zj,a$ as d,g$ as f}from"./cli-w754xmyv.js";import{bda as P}from"./cli-x514vyva.js";import{basename as qj,extname as Jj,posix as w,sep as Qj}from"path";function c(j){let J=w.sep+j.split(Qj).join(w.sep).replace(/^\/+/,""),q=qj(j).toLowerCase(),Q=Jj(j).toLowerCase();if(Vj.has(q))return!0;if(S.has(Q))return!0;let Y=q.split(".");if(Y.length>2){let W="."+Y.slice(-2).join(".");if(S.has(W))return!0}for(let W of Wj)if(J.includes(W))return!0;for(let W of Yj)if(W.test(q))return!0;return!1}var Vj,S,Wj,Yj;var m=P(()=>{Vj=new Set(["package-lock.json","yarn.lock","pnpm-lock.yaml","bun.lockb","bun.lock","composer.lock","gemfile.lock","cargo.lock","poetry.lock","pipfile.lock","shrinkwrap.json","npm-shrinkwrap.json"]),S=new Set([".lock",".min.js",".min.css",".min.html",".bundle.js",".bundle.css",".generated.ts",".generated.js",".d.ts"]),Wj=["/dist/","/build/","/out/","/output/","/node_modules/","/vendor/","/vendored/","/third_party/","/third-party/","/external/","/.next/","/.nuxt/","/.svelte-kit/","/coverage/","/__pycache__/","/.tox/","/venv/","/.venv/","/target/release/","/target/debug/"],Yj=[/^.*\.min\.[a-z]+$/i,/^.*-min\.[a-z]+$/i,/^.*\.bundle\.[a-z]+$/i,/^.*\.generated\.[a-z]+$/i,/^.*\.gen\.[a-z]+$/i,/^.*\.auto\.[a-z]+$/i,/^.*_generated\.[a-z]+$/i,/^.*_gen\.[a-z]+$/i,/^.*\.pb\.(go|js|ts|py|rb)$/i,/^.*_pb2?\.py$/i,/^.*\.pb\.h$/i,/^.*\.grpc\.[a-z]+$/i,/^.*\.swagger\.[a-z]+$/i,/^.*\.openapi\.[a-z]+$/i]});import{createHash as Mj,randomUUID as Xj}from"crypto";import{stat as F}from"fs/promises";import{isAbsolute as a,join as N,relative as C,sep as I}from"path";function M(){let j=r();return n(j)??f()}function ij(){return U}function lj(){return U==="internal"}function sj(j){let J=j.lastIndexOf("/");if(J===-1)return j;let q=j.slice(0,J),Q=j.slice(J+1),Y=Kj(Q);return`${q}/${Y}`}function Kj(j){if(j.includes("opus-4-6"))return"claude-opus-4-7";if(j.includes("opus-4-5"))return"claude-opus-4-5";if(j.includes("opus-4-1"))return"claude-opus-4-1";if(j.includes("opus-4"))return"claude-opus-4";if(j.includes("sonnet-4-6"))return"claude-sonnet-4-6";if(j.includes("sonnet-4-5"))return"claude-sonnet-4-5";if(j.includes("sonnet-4"))return"claude-sonnet-4";if(j.includes("sonnet-3-7"))return"claude-sonnet-3-7";if(j.includes("haiku-4-5"))return"claude-haiku-4-5";if(j.includes("haiku-3-5"))return"claude-haiku-3-5";return"claude"}function Uj(){return process.env.CLAUDE_CODE_ENTRYPOINT??"cli"}function aj(j,J){return`${j}/${s(J)}`}function yj(j){return Mj("sha256").update(j).digest("hex")}function y(j){let J=h(),q=M();if(!a(j))return j;let Q=j,Y=q;try{Q=J.realpathSync(j)}catch{}try{Y=J.realpathSync(q)}catch{}if(Q.startsWith(Y+I)||Q===Y)return C(Y,Q).replaceAll(I,"/");if(j.startsWith(q+I)||j===q)return C(q,j).replaceAll(I,"/");return j}function vj(j){if(a(j))return j;return N(M(),j)}function Dj(){return{fileStates:new Map,sessionBaselines:new Map,surface:Uj(),startingHeadSha:null,promptCount:0,promptCountAtLastCommit:0,permissionPromptCount:0,permissionPromptCountAtLastCommit:0,escapeCount:0,escapeCountAtLastCommit:0}}function t(j,J,q,Q,Y){let W=y(J);try{let Z;if(q===""||Q==="")Z=q===""?Q.length:q.length;else{let B=Math.min(q.length,Q.length),H=0;while(H<B&&q[H]===Q[H])H++;let O=0;while(O<B-H&&q[q.length-1-O]===Q[Q.length-1-O])O++;let b=q.length-H-O,A=Q.length-H-O;Z=Math.max(b,A)}let $=j.get(W)?.claudeContribution??0;return{contentHash:yj(Q),claudeContribution:$+Z,mtime:Y}}catch(Z){return E(Z),null}}async function tj(j){let J=y(j),q=vj(J);try{return(await F(q)).mtimeMs}catch{return Date.now()}}function Ij(j,J,q,Q,Y,W=Date.now()){let Z=y(J),k=t(j.fileStates,J,q,Q,W);if(!k)return j;let $=new Map(j.fileStates);return $.set(Z,k),D(`Attribution: Tracked ${k.claudeContribution} chars for ${Z}`),{...j,fileStates:$}}function ej(j,J,q,Q=Date.now()){return Ij(j,J,"",q,!1,Q)}function jq(j,J,q){let Q=y(J),W=j.fileStates.get(Q)?.claudeContribution??0,Z=q.length,k={contentHash:"",claudeContribution:W+Z,mtime:Date.now()},$=new Map(j.fileStates);return $.set(Q,k),D(`Attribution: Tracked deletion of ${Q} (${Z} chars removed, total contribution: ${k.claudeContribution})`),{...j,fileStates:$}}function qq(j,J){let q=new Map(j.fileStates);for(let Q of J){let Y=Q.mtime??Date.now();if(Q.type==="deleted"){let W=y(Q.path),k=q.get(W)?.claudeContribution??0,$=Q.oldContent.length;q.set(W,{contentHash:"",claudeContribution:k+$,mtime:Y}),D(`Attribution: Tracked deletion of ${W} (${$} chars removed, total contribution: ${k+$})`)}else{let W=t(q,Q.path,Q.oldContent,Q.newContent,Y);if(W){let Z=y(Q.path);q.set(Z,W),D(`Attribution: Tracked ${W.claudeContribution} chars for ${Z}`)}}}return{...j,fileStates:q}}async function Jq(j,J){let q=M(),Q=d(),Y={},W=[],Z=new Set,k={},$=0,B=0,H=new Map,O=new Map;for(let V of j){Z.add(V.surface);let K=V.sessionBaselines instanceof Map?V.sessionBaselines:new Map(Object.entries(V.sessionBaselines??{}));for(let[_,X]of K)if(!O.has(_))O.set(_,X);let T=V.fileStates instanceof Map?V.fileStates:new Map(Object.entries(V.fileStates??{}));for(let[_,X]of T){let G=H.get(_);if(G)H.set(_,{...X,claudeContribution:G.claudeContribution+X.claudeContribution});else H.set(_,X)}}let b=await Promise.all(J.map(async(V)=>{if(c(V))return{type:"generated",file:V};let K=N(q,V),T=H.get(V),_=O.get(V),X=j[0].surface,G=0,R=0;if(await Lj(V))if(T)G=T.claudeContribution,R=0;else{let v=await u(V);R=v>0?v:100}else try{let v=await F(K);if(T)G=T.claudeContribution,R=0;else if(_){let p=await u(V);R=p>0?p:v.size}else R=v.size}catch{return null}G=Math.max(0,G),R=Math.max(0,R);let g=G+R,jj=g>0?Math.round(G/g*100):0;return{type:"file",file:V,claudeChars:G,humanChars:R,percent:jj,surface:X}}));for(let V of b){if(!V)continue;if(V.type==="generated"){W.push(V.file);continue}Y[V.file]={claudeChars:V.claudeChars,humanChars:V.humanChars,percent:V.percent,surface:V.surface},$+=V.claudeChars,B+=V.humanChars,k[V.surface]=(k[V.surface]??0)+V.claudeChars}let A=$+B,e=A>0?Math.round($/A*100):0,x={};for(let[V,K]of Object.entries(k)){let T=A>0?Math.round(K/A*100):0;x[V]={claudeChars:K,percent:T}}return{version:1,summary:{claudePercent:e,claudeChars:$,humanChars:B,surfaces:Array.from(Z)},files:Y,surfaceBreakdown:x,excludedGenerated:W,sessions:[Q]}}async function u(j){let J=M();try{let q=await L(z(),["diff","--cached","--stat","--",j],{cwd:J,timeout:5000});if(q.code!==0||!q.stdout)return 0;let Q=q.stdout.split(`
2
+ import{cZ as s,rZ as _j,wT as o,xT as Oj}from"./cli-msmzt4c3.js";import{$6 as l,A7 as Tj,W6 as i,a7 as Bj,b7 as n,d7 as z}from"./cli-fdya77ch.js";import{H7 as L,I7 as Rj}from"./cli-p0vh69b9.js";import{L7 as r,M7 as Gj}from"./cli-rvad3yhg.js";import{E8 as E,J8 as Hj}from"./cli-4ewb3q42.js";import{l_ as h,p_ as $j,v_ as D,y_ as kj}from"./cli-hke6r0q8.js";import{bda as Zj,e$ as d,k$ as f}from"./cli-3ac555qw.js";import{fda as P}from"./cli-w1d8n9g3.js";import{basename as qj,extname as Jj,posix as w,sep as Qj}from"path";function c(j){let J=w.sep+j.split(Qj).join(w.sep).replace(/^\/+/,""),q=qj(j).toLowerCase(),Q=Jj(j).toLowerCase();if(Vj.has(q))return!0;if(S.has(Q))return!0;let Y=q.split(".");if(Y.length>2){let W="."+Y.slice(-2).join(".");if(S.has(W))return!0}for(let W of Wj)if(J.includes(W))return!0;for(let W of Yj)if(W.test(q))return!0;return!1}var Vj,S,Wj,Yj;var m=P(()=>{Vj=new Set(["package-lock.json","yarn.lock","pnpm-lock.yaml","bun.lockb","bun.lock","composer.lock","gemfile.lock","cargo.lock","poetry.lock","pipfile.lock","shrinkwrap.json","npm-shrinkwrap.json"]),S=new Set([".lock",".min.js",".min.css",".min.html",".bundle.js",".bundle.css",".generated.ts",".generated.js",".d.ts"]),Wj=["/dist/","/build/","/out/","/output/","/node_modules/","/vendor/","/vendored/","/third_party/","/third-party/","/external/","/.next/","/.nuxt/","/.svelte-kit/","/coverage/","/__pycache__/","/.tox/","/venv/","/.venv/","/target/release/","/target/debug/"],Yj=[/^.*\.min\.[a-z]+$/i,/^.*-min\.[a-z]+$/i,/^.*\.bundle\.[a-z]+$/i,/^.*\.generated\.[a-z]+$/i,/^.*\.gen\.[a-z]+$/i,/^.*\.auto\.[a-z]+$/i,/^.*_generated\.[a-z]+$/i,/^.*_gen\.[a-z]+$/i,/^.*\.pb\.(go|js|ts|py|rb)$/i,/^.*_pb2?\.py$/i,/^.*\.pb\.h$/i,/^.*\.grpc\.[a-z]+$/i,/^.*\.swagger\.[a-z]+$/i,/^.*\.openapi\.[a-z]+$/i]});import{createHash as Mj,randomUUID as Xj}from"crypto";import{stat as F}from"fs/promises";import{isAbsolute as a,join as N,relative as C,sep as I}from"path";function M(){let j=r();return n(j)??f()}function ij(){return U}function lj(){return U==="internal"}function sj(j){let J=j.lastIndexOf("/");if(J===-1)return j;let q=j.slice(0,J),Q=j.slice(J+1),Y=Kj(Q);return`${q}/${Y}`}function Kj(j){if(j.includes("opus-4-6"))return"claude-opus-4-7";if(j.includes("opus-4-5"))return"claude-opus-4-5";if(j.includes("opus-4-1"))return"claude-opus-4-1";if(j.includes("opus-4"))return"claude-opus-4";if(j.includes("sonnet-4-6"))return"claude-sonnet-4-6";if(j.includes("sonnet-4-5"))return"claude-sonnet-4-5";if(j.includes("sonnet-4"))return"claude-sonnet-4";if(j.includes("sonnet-3-7"))return"claude-sonnet-3-7";if(j.includes("haiku-4-5"))return"claude-haiku-4-5";if(j.includes("haiku-3-5"))return"claude-haiku-3-5";return"claude"}function Uj(){return process.env.CLAUDE_CODE_ENTRYPOINT??"cli"}function aj(j,J){return`${j}/${s(J)}`}function yj(j){return Mj("sha256").update(j).digest("hex")}function y(j){let J=h(),q=M();if(!a(j))return j;let Q=j,Y=q;try{Q=J.realpathSync(j)}catch{}try{Y=J.realpathSync(q)}catch{}if(Q.startsWith(Y+I)||Q===Y)return C(Y,Q).replaceAll(I,"/");if(j.startsWith(q+I)||j===q)return C(q,j).replaceAll(I,"/");return j}function vj(j){if(a(j))return j;return N(M(),j)}function Dj(){return{fileStates:new Map,sessionBaselines:new Map,surface:Uj(),startingHeadSha:null,promptCount:0,promptCountAtLastCommit:0,permissionPromptCount:0,permissionPromptCountAtLastCommit:0,escapeCount:0,escapeCountAtLastCommit:0}}function t(j,J,q,Q,Y){let W=y(J);try{let Z;if(q===""||Q==="")Z=q===""?Q.length:q.length;else{let B=Math.min(q.length,Q.length),H=0;while(H<B&&q[H]===Q[H])H++;let O=0;while(O<B-H&&q[q.length-1-O]===Q[Q.length-1-O])O++;let b=q.length-H-O,A=Q.length-H-O;Z=Math.max(b,A)}let $=j.get(W)?.claudeContribution??0;return{contentHash:yj(Q),claudeContribution:$+Z,mtime:Y}}catch(Z){return E(Z),null}}async function tj(j){let J=y(j),q=vj(J);try{return(await F(q)).mtimeMs}catch{return Date.now()}}function Ij(j,J,q,Q,Y,W=Date.now()){let Z=y(J),k=t(j.fileStates,J,q,Q,W);if(!k)return j;let $=new Map(j.fileStates);return $.set(Z,k),D(`Attribution: Tracked ${k.claudeContribution} chars for ${Z}`),{...j,fileStates:$}}function ej(j,J,q,Q=Date.now()){return Ij(j,J,"",q,!1,Q)}function jq(j,J,q){let Q=y(J),W=j.fileStates.get(Q)?.claudeContribution??0,Z=q.length,k={contentHash:"",claudeContribution:W+Z,mtime:Date.now()},$=new Map(j.fileStates);return $.set(Q,k),D(`Attribution: Tracked deletion of ${Q} (${Z} chars removed, total contribution: ${k.claudeContribution})`),{...j,fileStates:$}}function qq(j,J){let q=new Map(j.fileStates);for(let Q of J){let Y=Q.mtime??Date.now();if(Q.type==="deleted"){let W=y(Q.path),k=q.get(W)?.claudeContribution??0,$=Q.oldContent.length;q.set(W,{contentHash:"",claudeContribution:k+$,mtime:Y}),D(`Attribution: Tracked deletion of ${W} (${$} chars removed, total contribution: ${k+$})`)}else{let W=t(q,Q.path,Q.oldContent,Q.newContent,Y);if(W){let Z=y(Q.path);q.set(Z,W),D(`Attribution: Tracked ${W.claudeContribution} chars for ${Z}`)}}}return{...j,fileStates:q}}async function Jq(j,J){let q=M(),Q=d(),Y={},W=[],Z=new Set,k={},$=0,B=0,H=new Map,O=new Map;for(let V of j){Z.add(V.surface);let K=V.sessionBaselines instanceof Map?V.sessionBaselines:new Map(Object.entries(V.sessionBaselines??{}));for(let[_,X]of K)if(!O.has(_))O.set(_,X);let T=V.fileStates instanceof Map?V.fileStates:new Map(Object.entries(V.fileStates??{}));for(let[_,X]of T){let G=H.get(_);if(G)H.set(_,{...X,claudeContribution:G.claudeContribution+X.claudeContribution});else H.set(_,X)}}let b=await Promise.all(J.map(async(V)=>{if(c(V))return{type:"generated",file:V};let K=N(q,V),T=H.get(V),_=O.get(V),X=j[0].surface,G=0,R=0;if(await Lj(V))if(T)G=T.claudeContribution,R=0;else{let v=await u(V);R=v>0?v:100}else try{let v=await F(K);if(T)G=T.claudeContribution,R=0;else if(_){let p=await u(V);R=p>0?p:v.size}else R=v.size}catch{return null}G=Math.max(0,G),R=Math.max(0,R);let g=G+R,jj=g>0?Math.round(G/g*100):0;return{type:"file",file:V,claudeChars:G,humanChars:R,percent:jj,surface:X}}));for(let V of b){if(!V)continue;if(V.type==="generated"){W.push(V.file);continue}Y[V.file]={claudeChars:V.claudeChars,humanChars:V.humanChars,percent:V.percent,surface:V.surface},$+=V.claudeChars,B+=V.humanChars,k[V.surface]=(k[V.surface]??0)+V.claudeChars}let A=$+B,e=A>0?Math.round($/A*100):0,x={};for(let[V,K]of Object.entries(k)){let T=A>0?Math.round(K/A*100):0;x[V]={claudeChars:K,percent:T}}return{version:1,summary:{claudePercent:e,claudeChars:$,humanChars:B,surfaces:Array.from(Z)},files:Y,surfaceBreakdown:x,excludedGenerated:W,sessions:[Q]}}async function u(j){let J=M();try{let q=await L(z(),["diff","--cached","--stat","--",j],{cwd:J,timeout:5000});if(q.code!==0||!q.stdout)return 0;let Q=q.stdout.split(`
3
3
  `).filter(Boolean),Y=0;for(let W of Q)if(W.includes("file changed")||W.includes("files changed")){let Z=W.match(/(\d+) insertions?/),k=W.match(/(\d+) deletions?/),$=Z?parseInt(Z[1],10):0,B=k?parseInt(k[1],10):0;Y+=($+B)*40}return Y}catch{return 0}}async function Lj(j){let J=M();try{let q=await L(z(),["diff","--cached","--name-status","--",j],{cwd:J,timeout:5000});if(q.code===0&&q.stdout)return q.stdout.trim().startsWith("D\t")}catch{}return!1}async function Qq(){let j=M();try{let J=await L(z(),["diff","--cached","--name-only"],{cwd:j,timeout:5000});if(J.code===0&&J.stdout)return J.stdout.split(`
4
4
  `).filter(Boolean)}catch(J){E(J)}return[]}async function Vq(){let j=await i(M());if(!j)return!1;return(await Promise.all(["rebase-merge","rebase-apply","MERGE_HEAD","CHERRY_PICK_HEAD","BISECT_LOG"].map(async(Q)=>{try{return await F(N(j,Q)),!0}catch{return!1}}))).some((Q)=>Q)}function zj(j,J){let q={};for(let[Q,Y]of j.fileStates)q[Q]=Y;return{type:"attribution-snapshot",messageId:J,surface:j.surface,fileStates:q,promptCount:j.promptCount,promptCountAtLastCommit:j.promptCountAtLastCommit,permissionPromptCount:j.permissionPromptCount,permissionPromptCountAtLastCommit:j.permissionPromptCountAtLastCommit,escapeCount:j.escapeCount,escapeCountAtLastCommit:j.escapeCountAtLastCommit}}function bj(j){let J=Dj(),q=j[j.length-1];if(!q)return J;J.surface=q.surface;for(let[Q,Y]of Object.entries(q.fileStates))J.fileStates.set(Q,Y);return J.promptCount=q.promptCount??0,J.promptCountAtLastCommit=q.promptCountAtLastCommit??0,J.permissionPromptCount=q.permissionPromptCount??0,J.permissionPromptCountAtLastCommit=q.permissionPromptCountAtLastCommit??0,J.escapeCount=q.escapeCount??0,J.escapeCountAtLastCommit=q.escapeCountAtLastCommit??0,J}function Wq(j,J){let q=bj(j);J(q)}function Yq(j,J){let q={...j,promptCount:j.promptCount+1},Q=zj(q,Xj());return J(Q),q}var Aj,U=null,nj;var Ej=P(()=>{Zj();Gj();kj();Rj();$j();m();Bj();Tj();Hj();_j();Oj();Aj=["github.com:anthropics/claude-cli-internal","github.com/anthropics/claude-cli-internal","github.com:anthropics/anthropic","github.com/anthropics/anthropic","github.com:anthropics/apps","github.com/anthropics/apps","github.com:anthropics/casino","github.com/anthropics/casino","github.com:anthropics/dbt","github.com/anthropics/dbt","github.com:anthropics/dotfiles","github.com/anthropics/dotfiles","github.com:anthropics/terraform-config","github.com/anthropics/terraform-config","github.com:anthropics/hex-export","github.com/anthropics/hex-export","github.com:anthropics/feedback-v2","github.com/anthropics/feedback-v2","github.com:anthropics/labs","github.com/anthropics/labs","github.com:anthropics/argo-rollouts","github.com/anthropics/argo-rollouts","github.com:anthropics/starling-configs","github.com/anthropics/starling-configs","github.com:anthropics/ts-tools","github.com/anthropics/ts-tools","github.com:anthropics/ts-capsules","github.com/anthropics/ts-capsules","github.com:anthropics/feldspar-testing","github.com/anthropics/feldspar-testing","github.com:anthropics/trellis","github.com/anthropics/trellis","github.com:anthropics/claude-for-hiring","github.com/anthropics/claude-for-hiring","github.com:anthropics/forge-web","github.com/anthropics/forge-web","github.com:anthropics/infra-manifests","github.com/anthropics/infra-manifests","github.com:anthropics/mycro_manifests","github.com/anthropics/mycro_manifests","github.com:anthropics/mycro_configs","github.com/anthropics/mycro_configs","github.com:anthropics/mobile-apps","github.com/anthropics/mobile-apps"];nj=o(async()=>{if(U!==null)return U==="internal";let j=M(),J=await l(j);if(!J)return U="none",!1;let q=Aj.some((Q)=>J.includes(Q));return U=q?"internal":"external",q})});
5
- export{M as nL,ij as oL,lj as pL,nj as qL,sj as rL,Kj as sL,Uj as tL,aj as uL,yj as vL,y as wL,vj as xL,Dj as yL,tj as zL,Ij as AL,ej as BL,jq as CL,qq as DL,Jq as EL,u as FL,Lj as GL,Qq as HL,Vq as IL,zj as JL,bj as KL,Wq as LL,Yq as ML,Ej as NL};
5
+ export{M as kL,ij as lL,lj as mL,nj as nL,sj as oL,Kj as pL,Uj as qL,aj as rL,yj as sL,y as tL,vj as uL,Dj as vL,tj as wL,Ij as xL,ej as yL,jq as zL,qq as AL,Jq as BL,u as CL,Lj as DL,Qq as EL,Vq as FL,zj as GL,bj as HL,Wq as IL,Yq as JL,Ej as KL};
@@ -1,3 +1,3 @@
1
1
  // @bun
2
- import{$f as U,ag as B}from"./cli-zac1afnb.js";import{V1 as $,r1 as Q,sX as K,tX as Z,w1 as R}from"./cli-9hskw92e.js";import{R5 as N,S5 as _}from"./cli-3je4vtx7.js";import{B8 as Y,w8 as J}from"./cli-3bxtq5dc.js";import{bda as X}from"./cli-x514vyva.js";import{jsxDEV as F}from"react/jsx-dev-runtime";async function C(y,W){try{if(R()){let q=Q(),z=!1;if(q?.subscriptionType&&q?.rateLimitTier)z=q.subscriptionType==="max"&&q.rateLimitTier==="default_claude_max_20x";else if(q?.accessToken){let H=await K(q.accessToken);z=H?.organization?.organization_type==="claude_max"&&H?.organization?.rate_limit_tier==="default_claude_max_20x"}if(z)return setTimeout(y,0,"You are already on the highest Max subscription plan. For additional usage, run /login to switch to an API usage-billed account."),null}return await N("https://claude.ai/upgrade/max"),F(U,{startingMessage:"Starting new login following /upgrade. Exit with Ctrl-C to use existing account.",onDone:(q)=>{W.onChangeAPIKey(),y(q?"Login successful":"Login interrupted")}},void 0,!1,void 0,this)}catch(G){J(G),setTimeout(y,0,"Failed to open browser. Please visit https://claude.ai/upgrade/max to upgrade.")}return null}var L=X(()=>{Z();$();_();Y();B()});
2
+ import{$f as U,ag as B}from"./cli-6bxfdgv1.js";import{F1 as $,b1 as Q,g1 as R,vX as K,wX as Z}from"./cli-msmzt4c3.js";import{B5 as N,C5 as _}from"./cli-k4v08k8t.js";import{E8 as J,J8 as Y}from"./cli-4ewb3q42.js";import{fda as X}from"./cli-w1d8n9g3.js";import{jsxDEV as F}from"react/jsx-dev-runtime";async function C(y,W){try{if(R()){let q=Q(),z=!1;if(q?.subscriptionType&&q?.rateLimitTier)z=q.subscriptionType==="max"&&q.rateLimitTier==="default_claude_max_20x";else if(q?.accessToken){let H=await K(q.accessToken);z=H?.organization?.organization_type==="claude_max"&&H?.organization?.rate_limit_tier==="default_claude_max_20x"}if(z)return setTimeout(y,0,"You are already on the highest Max subscription plan. For additional usage, run /login to switch to an API usage-billed account."),null}return await N("https://claude.ai/upgrade/max"),F(U,{startingMessage:"Starting new login following /upgrade. Exit with Ctrl-C to use existing account.",onDone:(q)=>{W.onChangeAPIKey(),y(q?"Login successful":"Login interrupted")}},void 0,!1,void 0,this)}catch(G){J(G),setTimeout(y,0,"Failed to open browser. Please visit https://claude.ai/upgrade/max to upgrade.")}return null}var L=X(()=>{Z();$();_();Y();B()});
3
3
  export{C as Wa,L as Xa};
@@ -1,3 +1,3 @@
1
1
  // @bun
2
- import{C8 as N,F8 as L}from"./cli-6xmbrh42.js";import{S9 as _,Z9 as p,d_ as d,h_ as K,l_ as S}from"./cli-a98b285v.js";import{E_ as G,O_ as f}from"./cli-1qszxdan.js";import{Zca as c,rba as I,tba as j}from"./cli-w754xmyv.js";import{bda as W}from"./cli-x514vyva.js";var n="command-name",i="command-message",a="command-args",o="bash-input",t="bash-stdout",s="bash-stderr",r="local-command-stdout",e="local-command-stderr",JJ="local-command-caveat",VJ,z="tick",$J="task-notification",YJ="task-id",BJ="tool-use-id",WJ="task-type",ZJ="output-file",KJ="status",UJ="summary",GJ="worktree",HJ="worktreePath",QJ="worktreeBranch",XJ="remote-review",zJ="remote-review-progress",qJ="teammate-message",FJ="channel",wJ="fork-boilerplate",OJ="Your directive: ",xJ,CJ;var q=W(()=>{VJ=["bash-input","bash-stdout","bash-stderr","local-command-stdout","local-command-stderr","local-command-caveat"],xJ=["help","-h","--help"],CJ=["list","show","display","current","view","get","check","describe","print","version","about","status","?"]});function E(J){return J.sort((V,$)=>{let B=$.modified.getTime()-V.modified.getTime();if(B!==0)return B;return $.created.getTime()-V.created.getTime()})}var F=()=>{};function O(J){return J.replace(w,"").trim()||J}function x(J){return J.replace(w,"").trim()}function RJ(J){return J.replace(T,"").trim()}var w,T;var C=W(()=>{w=/<([a-z][\w-]*)(?:\s[^>]*)?>[\s\S]*?<\/\1>\n?/g;T=/<(ide_opened_file|ide_selection)(?:\s[^>]*)?>[\s\S]*?<\/\1>\n?/g});function k(){if(process.env.CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC)return"essential-traffic";if(process.env.DISABLE_TELEMETRY)return"no-telemetry";return"default"}function D(){return k()==="essential-traffic"}function NJ(){return k()!=="default"}function bJ(){if(process.env.CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC)return"CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC";return null}var R=()=>{};import v from"env-paths";import{join as U}from"path";function H(){let J=process.env.CLAUDE_CONFIG_DIR;return J?U(J,"Cache"):v("claude-cli").cache}function b(J){let V=J.replace(/[^a-zA-Z0-9]/g,"-");if(V.length<=A)return V;return`${V.slice(0,A)}-${Math.abs(N(J)).toString(36)}`}function Q(J){return b(J)}var A=200,h;var M=W(()=>{S();L();h={baseLogs:()=>U(H(),Q(K().cwd())),errors:()=>U(H(),Q(K().cwd()),"errors"),messages:()=>U(H(),Q(K().cwd()),"messages"),mcpLogs:(J)=>U(H(),Q(K().cwd()),`mcp-logs-${b(J)}`)}});import u from"lodash-es/memoize.js";function lJ(J,V){let $=J.firstPrompt?.startsWith(`<${z}>`),B=J.firstPrompt?x(J.firstPrompt):"",y=B&&!$,P=J.agentName||J.customTitle||J.summary||(y?B:void 0)||V||($?"Autonomous session":void 0)||(J.sessionId?J.sessionId.slice(0,8):"")||"";return O(P).trim()}function gJ(J){return J.toISOString().replace(/[:.]/g,"-")}function l(J){if(X.length>=m)X.shift();X.push(J)}function nJ(J){if(Y!==null)return;if(Y=J,Z.length>0){let V=[...Z];Z.length=0;for(let $ of V)switch($.type){case"error":Y.logError($.error);break;case"mcpError":Y.logMCPError($.serverName,$.error);break;case"mcpDebug":Y.logMCPDebug($.serverName,$.message);break}}}function aJ(J){let V=_(J);try{if(G(process.env.CLAUDE_CODE_USE_BEDROCK)||G(process.env.CLAUDE_CODE_USE_VERTEX)||G(process.env.CLAUDE_CODE_USE_FOUNDRY)||G(process.env.CLAUDE_CODE_USE_AZURE_OPENAI)||process.env.DISABLE_ERROR_REPORTING||D())return;let B={error:V.stack||V.message,timestamp:new Date().toISOString()};if(l(B),Y===null){Z.push({type:"error",error:V});return}Y.logError(V)}catch{}}function oJ(){return[...X]}function tJ(J,V){try{if(Y===null){Z.push({type:"mcpError",serverName:J,error:V});return}Y.logMCPError(J,V)}catch{}}function sJ(J,V){try{if(Y===null){Z.push({type:"mcpDebug",serverName:J,message:V});return}Y.logMCPDebug(J,V)}catch{}}function rJ(J,V){if(!V||!V.startsWith("repl_main_thread"))return;let{messages:$,...B}=J;I(B),j(process.env.USER_TYPE==="ant"?$:null)}var m=100,X,Z,Y=null,iJ;var g=W(()=>{c();q();F();M();C();f();p();R();d();X=[];Z=[];iJ=u(()=>{return process.argv.includes("--hard-fail")})});
3
- export{n as F7,i as G7,a as H7,o as I7,t as J7,s as K7,r as L7,e as M7,JJ as N7,VJ as O7,z as P7,$J as Q7,YJ as R7,BJ as S7,WJ as T7,ZJ as U7,KJ as V7,UJ as W7,GJ as X7,HJ as Y7,QJ as Z7,XJ as _7,zJ as $7,qJ as a8,FJ as b8,wJ as c8,OJ as d8,xJ as e8,CJ as f8,q as g8,E as h8,F as i8,h as j8,M as k8,O as l8,x as m8,RJ as n8,C as o8,D as p8,NJ as q8,bJ as r8,R as s8,lJ as t8,gJ as u8,nJ as v8,aJ as w8,oJ as x8,tJ as y8,sJ as z8,rJ as A8,g as B8};
2
+ import{K8 as N,N8 as L}from"./cli-xmgm2573.js";import{W9 as _,b_ as p,h_ as d,l_ as K,p_ as S}from"./cli-hke6r0q8.js";import{I_ as G,S_ as f}from"./cli-tq5z9qv3.js";import{bda as c,vba as I,xba as j}from"./cli-3ac555qw.js";import{fda as W}from"./cli-w1d8n9g3.js";var n="command-name",i="command-message",a="command-args",o="bash-input",t="bash-stdout",s="bash-stderr",r="local-command-stdout",e="local-command-stderr",JJ="local-command-caveat",VJ,z="tick",$J="task-notification",YJ="task-id",BJ="tool-use-id",WJ="task-type",ZJ="output-file",KJ="status",UJ="summary",GJ="worktree",HJ="worktreePath",QJ="worktreeBranch",XJ="remote-review",zJ="remote-review-progress",qJ="teammate-message",FJ="channel",wJ="fork-boilerplate",OJ="Your directive: ",xJ,CJ;var q=W(()=>{VJ=["bash-input","bash-stdout","bash-stderr","local-command-stdout","local-command-stderr","local-command-caveat"],xJ=["help","-h","--help"],CJ=["list","show","display","current","view","get","check","describe","print","version","about","status","?"]});function E(J){return J.sort((V,$)=>{let B=$.modified.getTime()-V.modified.getTime();if(B!==0)return B;return $.created.getTime()-V.created.getTime()})}var F=()=>{};function O(J){return J.replace(w,"").trim()||J}function x(J){return J.replace(w,"").trim()}function RJ(J){return J.replace(T,"").trim()}var w,T;var C=W(()=>{w=/<([a-z][\w-]*)(?:\s[^>]*)?>[\s\S]*?<\/\1>\n?/g;T=/<(ide_opened_file|ide_selection)(?:\s[^>]*)?>[\s\S]*?<\/\1>\n?/g});function k(){if(process.env.CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC)return"essential-traffic";if(process.env.DISABLE_TELEMETRY)return"no-telemetry";return"default"}function D(){return k()==="essential-traffic"}function NJ(){return k()!=="default"}function bJ(){if(process.env.CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC)return"CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC";return null}var R=()=>{};import v from"env-paths";import{join as U}from"path";function H(){let J=process.env.CLAUDE_CONFIG_DIR;return J?U(J,"Cache"):v("claude-cli").cache}function b(J){let V=J.replace(/[^a-zA-Z0-9]/g,"-");if(V.length<=A)return V;return`${V.slice(0,A)}-${Math.abs(N(J)).toString(36)}`}function Q(J){return b(J)}var A=200,h;var M=W(()=>{S();L();h={baseLogs:()=>U(H(),Q(K().cwd())),errors:()=>U(H(),Q(K().cwd()),"errors"),messages:()=>U(H(),Q(K().cwd()),"messages"),mcpLogs:(J)=>U(H(),Q(K().cwd()),`mcp-logs-${b(J)}`)}});import u from"lodash-es/memoize.js";function lJ(J,V){let $=J.firstPrompt?.startsWith(`<${z}>`),B=J.firstPrompt?x(J.firstPrompt):"",y=B&&!$,P=J.agentName||J.customTitle||J.summary||(y?B:void 0)||V||($?"Autonomous session":void 0)||(J.sessionId?J.sessionId.slice(0,8):"")||"";return O(P).trim()}function gJ(J){return J.toISOString().replace(/[:.]/g,"-")}function l(J){if(X.length>=m)X.shift();X.push(J)}function nJ(J){if(Y!==null)return;if(Y=J,Z.length>0){let V=[...Z];Z.length=0;for(let $ of V)switch($.type){case"error":Y.logError($.error);break;case"mcpError":Y.logMCPError($.serverName,$.error);break;case"mcpDebug":Y.logMCPDebug($.serverName,$.message);break}}}function aJ(J){let V=_(J);try{if(G(process.env.CLAUDE_CODE_USE_BEDROCK)||G(process.env.CLAUDE_CODE_USE_VERTEX)||G(process.env.CLAUDE_CODE_USE_FOUNDRY)||G(process.env.CLAUDE_CODE_USE_AZURE_OPENAI)||process.env.DISABLE_ERROR_REPORTING||D())return;let B={error:V.stack||V.message,timestamp:new Date().toISOString()};if(l(B),Y===null){Z.push({type:"error",error:V});return}Y.logError(V)}catch{}}function oJ(){return[...X]}function tJ(J,V){try{if(Y===null){Z.push({type:"mcpError",serverName:J,error:V});return}Y.logMCPError(J,V)}catch{}}function sJ(J,V){try{if(Y===null){Z.push({type:"mcpDebug",serverName:J,message:V});return}Y.logMCPDebug(J,V)}catch{}}function rJ(J,V){if(!V||!V.startsWith("repl_main_thread"))return;let{messages:$,...B}=J;I(B),j(process.env.USER_TYPE==="ant"?$:null)}var m=100,X,Z,Y=null,iJ;var g=W(()=>{c();q();F();M();C();f();p();R();d();X=[];Z=[];iJ=u(()=>{return process.argv.includes("--hard-fail")})});
3
+ export{n as N7,i as O7,a as P7,o as Q7,t as R7,s as S7,r as T7,e as U7,JJ as V7,VJ as W7,z as X7,$J as Y7,YJ as Z7,BJ as _7,WJ as $7,ZJ as a8,KJ as b8,UJ as c8,GJ as d8,HJ as e8,QJ as f8,XJ as g8,zJ as h8,qJ as i8,FJ as j8,wJ as k8,OJ as l8,xJ as m8,CJ as n8,q as o8,E as p8,F as q8,h as r8,M as s8,O as t8,x as u8,RJ as v8,C as w8,D as x8,NJ as y8,bJ as z8,R as A8,lJ as B8,gJ as C8,nJ as D8,aJ as E8,oJ as F8,tJ as G8,sJ as H8,rJ as I8,g as J8};