@unieai/code 0.0.11 → 0.0.13

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 (436) hide show
  1. package/dist/chunks/App-ncpmz34p.js +2 -0
  2. package/dist/chunks/ApproveApiKey-fqzjf1j3.js +2 -0
  3. package/dist/chunks/{assistant-ftzr3mjp.js → AssistantSessionChooser-wxmyvgcf.js} +1 -1
  4. package/dist/chunks/BypassPermissionsModeDialog-3ksmd8pp.js +2 -0
  5. package/dist/chunks/{ClaudeInChromeOnboarding-qa0pvwfw.js → ClaudeInChromeOnboarding-ckjppjhr.js} +1 -1
  6. package/dist/chunks/ClaudeMdExternalIncludesDialog-rrsfavte.js +2 -0
  7. package/dist/chunks/ConsoleOAuthFlow-04xt4sby.js +2 -0
  8. package/dist/chunks/{DiffDialog-t6vvtbb2.js → DiffDialog-ptnc4sgx.js} +1 -1
  9. package/dist/chunks/Doctor-kg5m2zma.js +2 -0
  10. package/dist/chunks/Grove-rf9xhe2e.js +2 -0
  11. package/dist/chunks/{ITermBackend-73waaahf.js → ITermBackend-wgbbpgpy.js} +1 -1
  12. package/dist/chunks/{InProcessTransport-qwjgb17j.js → InProcessTransport-vgh7qgjn.js} +1 -1
  13. package/dist/chunks/{InvalidConfigDialog-zmqw3fj1.js → InvalidConfigDialog-6spqsgmr.js} +1 -1
  14. package/dist/chunks/InvalidSettingsDialog-m6y6esgz.js +2 -0
  15. package/dist/chunks/{Onboarding-p0tq6pgz.js → Onboarding-j1m69bqm.js} +1 -1
  16. package/dist/chunks/REPL-qyytrhe5.js +2 -0
  17. package/dist/chunks/{ResumeConversation-krn9hqb1.js → ResumeConversation-wfhd5xb2.js} +1 -1
  18. package/dist/chunks/{SnapshotUpdateDialog-raq029pd.js → SnapshotUpdateDialog-aya2c2f9.js} +1 -1
  19. package/dist/chunks/{TeleportProgress-vyy2k3bv.js → TeleportProgress-kn3qgvd9.js} +1 -1
  20. package/dist/chunks/{TeleportRepoMismatchDialog-ff0h2cnq.js → TeleportRepoMismatchDialog-01v6e2qz.js} +1 -1
  21. package/dist/chunks/{TeleportResumeWrapper-esjykret.js → TeleportResumeWrapper-48dsm503.js} +1 -1
  22. package/dist/chunks/{TmuxBackend-14kmnkcb.js → TmuxBackend-s0bt8zqj.js} +1 -1
  23. package/dist/chunks/ToolSearchTool-4rm3kr13.js +2 -0
  24. package/dist/chunks/{TrustDialog-7fvaze2x.js → TrustDialog-xtn3kq0n.js} +1 -1
  25. package/dist/chunks/TungstenTool-3wjjz6cf.js +2 -0
  26. package/dist/chunks/{add-dir-kqw72mky.js → add-dir-z0kz5nf7.js} +1 -1
  27. package/dist/chunks/{agents-z66twpqr.js → agents-ex4cdx64.js} +1 -1
  28. package/dist/chunks/agents-w6zde2j9.js +4 -0
  29. package/dist/chunks/ant-claude-for-chrome-mcp-gr0b0jr4.js +2 -0
  30. package/dist/chunks/api-07pqphw5.js +2 -0
  31. package/dist/chunks/asciicast-2k1ztt6v.js +2 -0
  32. package/dist/chunks/{AssistantSessionChooser-g1vsya6h.js → assistant-bmwndz7j.js} +1 -1
  33. package/dist/chunks/{auth-wk077awh.js → auth-g2p039wk.js} +1 -1
  34. package/dist/chunks/auth-g509w5pr.js +2 -0
  35. package/dist/chunks/backgroundHousekeeping-hw0chw1d.js +2 -0
  36. package/dist/chunks/{branch-1d0b8590.js → branch-rdvbhvts.js} +1 -1
  37. package/dist/chunks/{bridgePointer-vhd47np6.js → bridgePointer-9rqn5tp6.js} +1 -1
  38. package/dist/chunks/{btw-s3r5jhyd.js → btw-xts6twbq.js} +1 -1
  39. package/dist/chunks/{buddy-xzm5npk8.js → buddy-yc09g048.js} +1 -1
  40. package/dist/chunks/{cachedMicrocompact-6j3zxr4g.js → cachedMicrocompact-fa2mdnyh.js} +1 -1
  41. package/dist/chunks/caches-3qzm958c.js +2 -0
  42. package/dist/chunks/{chrome-mdyx0s5j.js → chrome-gb6g0d5p.js} +1 -1
  43. package/dist/chunks/{chromeNativeHost-8wc6wcr6.js → chromeNativeHost-jsntnc29.js} +1 -1
  44. package/dist/chunks/{claudeDesktop-p5bfxmvz.js → claudeDesktop-me56qerx.js} +1 -1
  45. package/dist/chunks/{cleanup-q46nbce1.js → cleanup-hxj6tm50.js} +1 -1
  46. package/dist/chunks/clear-ssfbry3k.js +2 -0
  47. package/dist/chunks/{cli-bmk0rb5v.js → cli-07f2hk9d.js} +1 -1
  48. package/dist/chunks/{cli-h4a90xbh.js → cli-0nz8v3dj.js} +1 -1
  49. package/dist/chunks/{cli-fwrj8ybs.js → cli-16k24hzp.js} +1 -1
  50. package/dist/chunks/{cli-msmzt4c3.js → cli-192xnkcx.js} +1 -1
  51. package/dist/chunks/{cli-g4n9das2.js → cli-1eejy071.js} +1 -1
  52. package/dist/chunks/{cli-3m8n808e.js → cli-1p7nc6zb.js} +1 -1
  53. package/dist/chunks/{cli-s160fqyz.js → cli-1q1b8rgs.js} +1 -1
  54. package/dist/chunks/{cli-99mqr54v.js → cli-222ywgt0.js} +1 -1
  55. package/dist/chunks/{cli-f63fdj4w.js → cli-2428yw99.js} +1 -1
  56. package/dist/chunks/{cli-v943fd6a.js → cli-2fqrjjs9.js} +1 -1
  57. package/dist/chunks/{cli-t4j047cx.js → cli-2j6cv2kz.js} +1 -1
  58. package/dist/chunks/{cli-xpa1neza.js → cli-2sbq6ggm.js} +2 -2
  59. package/dist/chunks/{cli-8qd16mt4.js → cli-33tchr20.js} +1 -1
  60. package/dist/chunks/{cli-zjbzak9n.js → cli-3619x17q.js} +1 -1
  61. package/dist/chunks/{cli-gtm212j6.js → cli-3hrmwgsv.js} +1 -1
  62. package/dist/chunks/{cli-hzr2zraz.js → cli-3tkd82y4.js} +1 -1
  63. package/dist/chunks/{cli-zev50xap.js → cli-3tmtx9ka.js} +1 -1
  64. package/dist/chunks/{cli-xfsqvp8r.js → cli-4pwyex04.js} +1 -1
  65. package/dist/chunks/{cli-jj93qmmc.js → cli-5ajcy93q.js} +2 -2
  66. package/dist/chunks/{cli-0w4wc1z0.js → cli-5kehgkgh.js} +1 -1
  67. package/dist/chunks/{cli-fghyxar5.js → cli-601zv0wv.js} +1 -1
  68. package/dist/chunks/{cli-r3etpht1.js → cli-609dp2ck.js} +1 -1
  69. package/dist/chunks/{cli-ns0aaggm.js → cli-63wps6p0.js} +1 -1
  70. package/dist/chunks/{cli-m0z3rmf0.js → cli-64x5ghm5.js} +1 -1
  71. package/dist/chunks/{cli-de1hwp88.js → cli-67azkkwm.js} +1 -1
  72. package/dist/chunks/{cli-dbdqrqmt.js → cli-6cqemsm9.js} +1 -1
  73. package/dist/chunks/{cli-27mzrnr8.js → cli-6ee37m6j.js} +1 -1
  74. package/dist/chunks/{cli-mb1qrqw1.js → cli-6qt2xm18.js} +1 -1
  75. package/dist/chunks/{cli-49m97nbg.js → cli-7ed2q42n.js} +1 -1
  76. package/dist/chunks/{cli-s9fhtgmz.js → cli-7jw2qe69.js} +1 -1
  77. package/dist/chunks/cli-7k17xstr.js +3 -0
  78. package/dist/chunks/{cli-61x73ksv.js → cli-7n4d5yzr.js} +1 -1
  79. package/dist/chunks/{cli-p0vh69b9.js → cli-7wxv39ry.js} +2 -2
  80. package/dist/chunks/{cli-15sqp3mq.js → cli-8h10q2x8.js} +1 -1
  81. package/dist/chunks/{cli-yqbvprz7.js → cli-8j0b3b55.js} +1 -1
  82. package/dist/chunks/{cli-akcxtvv9.js → cli-8jym9hp6.js} +1 -1
  83. package/dist/chunks/{cli-4ewb3q42.js → cli-8kpqq0ea.js} +2 -2
  84. package/dist/chunks/{cli-2rw44zfx.js → cli-8xyb31dy.js} +1 -1
  85. package/dist/chunks/cli-8xz7dd7z.js +3 -0
  86. package/dist/chunks/{cli-g5wq5ptg.js → cli-8ykv66e4.js} +1 -1
  87. package/dist/chunks/{cli-jegyadmb.js → cli-8z8d5bgb.js} +1 -1
  88. package/dist/chunks/{cli-cqkne34j.js → cli-93sm9n17.js} +1 -1
  89. package/dist/chunks/{cli-q0156x0d.js → cli-97vx3m99.js} +1 -1
  90. package/dist/chunks/{cli-1jp3rm7n.js → cli-9e8f55fp.js} +1 -1
  91. package/dist/chunks/{cli-2wd8eaac.js → cli-9hqmq5g6.js} +1 -1
  92. package/dist/chunks/{cli-6bxfdgv1.js → cli-9tbmrp89.js} +1 -1
  93. package/dist/chunks/{cli-5dt9yjha.js → cli-9xtyh8c7.js} +1 -1
  94. package/dist/chunks/{cli-sh9w2tbd.js → cli-a1cx6p3g.js} +1 -1
  95. package/dist/chunks/{cli-ja540nr7.js → cli-a1dqnvy2.js} +1 -1
  96. package/dist/chunks/{cli-wt2bfbn0.js → cli-a25jeqs8.js} +1 -1
  97. package/dist/chunks/{cli-x8xgga1a.js → cli-a2d962bq.js} +2 -2
  98. package/dist/chunks/{cli-h120wpk2.js → cli-a826q5zk.js} +1 -1
  99. package/dist/chunks/{cli-k4v08k8t.js → cli-an97yxg9.js} +1 -1
  100. package/dist/chunks/{cli-m12smc5e.js → cli-asc9xmsr.js} +1 -1
  101. package/dist/chunks/{cli-hke6r0q8.js → cli-awb77t95.js} +2 -2
  102. package/dist/chunks/{cli-6yprtw88.js → cli-awe5yg6m.js} +1 -1
  103. package/dist/chunks/{cli-15w3eaed.js → cli-ax0ckqpv.js} +1 -1
  104. package/dist/chunks/{cli-mbp8f3f3.js → cli-b29enbbc.js} +1 -1
  105. package/dist/chunks/{cli-me4e2p3e.js → cli-b3k8arn1.js} +25 -25
  106. package/dist/chunks/{cli-c22wpdk4.js → cli-b5z57an7.js} +1 -1
  107. package/dist/chunks/{cli-0dc8sd37.js → cli-b8j8bm5m.js} +1 -1
  108. package/dist/chunks/{cli-51720d82.js → cli-bdgrtpsy.js} +2 -2
  109. package/dist/chunks/{cli-yrwenjxs.js → cli-bfm3f0yw.js} +1 -1
  110. package/dist/chunks/{cli-764c4bsm.js → cli-bj0csmzs.js} +1 -1
  111. package/dist/chunks/{cli-ms5j6fff.js → cli-bnr79ddy.js} +1 -1
  112. package/dist/chunks/{cli-a52ra30v.js → cli-bpj9na88.js} +1 -1
  113. package/dist/chunks/{cli-v9f860t5.js → cli-brr3bnrj.js} +1 -1
  114. package/dist/chunks/{cli-eyw3czmn.js → cli-bzrat9yd.js} +1 -1
  115. package/dist/chunks/{cli-msw0vv86.js → cli-ca1jmr8f.js} +1 -1
  116. package/dist/chunks/{cli-br6zjh6x.js → cli-ceas97gw.js} +1 -1
  117. package/dist/chunks/{cli-kqv5b8zh.js → cli-cfbfexxj.js} +1 -1
  118. package/dist/chunks/{cli-tckzkegq.js → cli-chvks6bg.js} +1 -1
  119. package/dist/chunks/cli-cmh6qwg8.js +3 -0
  120. package/dist/chunks/{cli-khs3sj9k.js → cli-d1w21hsm.js} +1 -1
  121. package/dist/chunks/{cli-z5e72gsd.js → cli-d2pn0xfj.js} +1 -1
  122. package/dist/chunks/{cli-fm14mg07.js → cli-df5r5xrp.js} +1 -1
  123. package/dist/chunks/{cli-2rwjx3w0.js → cli-dx0pk7k2.js} +1 -1
  124. package/dist/chunks/{cli-p2cqnrnp.js → cli-dy9qrrps.js} +1 -1
  125. package/dist/chunks/{cli-q46epwyh.js → cli-e3q6b1cv.js} +1 -1
  126. package/dist/chunks/{cli-fs7yttfp.js → cli-e4a4fjx9.js} +2 -2
  127. package/dist/chunks/{cli-t9jht3kb.js → cli-e5yek4vx.js} +2 -2
  128. package/dist/chunks/{cli-5f0w3fy6.js → cli-e9t5kfxm.js} +1 -1
  129. package/dist/chunks/{cli-1n8he7s8.js → cli-eh1wx76n.js} +1 -1
  130. package/dist/chunks/{cli-d0hzw78c.js → cli-ez2xsd4m.js} +1 -1
  131. package/dist/chunks/{cli-n5s5fnyj.js → cli-fdjfk8yq.js} +2 -2
  132. package/dist/chunks/{cli-rvad3yhg.js → cli-fnt125we.js} +2 -2
  133. package/dist/chunks/{cli-0qt9btbe.js → cli-fz053waw.js} +1 -1
  134. package/dist/chunks/{cli-89x414pj.js → cli-g2s3391y.js} +1 -1
  135. package/dist/chunks/cli-geka8fb7.js +3 -0
  136. package/dist/chunks/{cli-73jf8hyz.js → cli-gfweqbpz.js} +1 -1
  137. package/dist/chunks/{cli-tfv2qcgf.js → cli-gypyp608.js} +1 -1
  138. package/dist/chunks/{cli-1ny2386w.js → cli-h2t2hyz7.js} +1 -1
  139. package/dist/chunks/{cli-zp8s7q5w.js → cli-hp5gs22f.js} +1 -1
  140. package/dist/chunks/{cli-pgg33dhw.js → cli-hpxspent.js} +1 -1
  141. package/dist/chunks/{cli-ezs5sney.js → cli-hrmzaf5d.js} +2 -2
  142. package/dist/chunks/{cli-8dmy2s42.js → cli-hs2k9997.js} +1 -1
  143. package/dist/chunks/{cli-19ncan36.js → cli-j403r21v.js} +1 -1
  144. package/dist/chunks/{cli-wn2srq2e.js → cli-j4r75xsd.js} +1 -1
  145. package/dist/chunks/{cli-5vsnhp97.js → cli-jmq1x925.js} +1 -1
  146. package/dist/chunks/{cli-sycqd3xe.js → cli-jnc0ze6w.js} +4 -4
  147. package/dist/chunks/{cli-4nejhkd0.js → cli-jrwh6rs0.js} +1 -1
  148. package/dist/chunks/{cli-vwg0v35a.js → cli-jz50hv3m.js} +1 -1
  149. package/dist/chunks/{cli-vkvmhjha.js → cli-jz8jcrhh.js} +1 -1
  150. package/dist/chunks/{cli-nvnj7r73.js → cli-ktzyyx91.js} +1 -1
  151. package/dist/chunks/{cli-9aq7vxaq.js → cli-kx3r72jp.js} +1 -1
  152. package/dist/chunks/{cli-tyqh91zq.js → cli-m3r80gy0.js} +1 -1
  153. package/dist/chunks/{cli-9z9r2set.js → cli-m6amgxq3.js} +1 -1
  154. package/dist/chunks/{cli-qaxvg7gv.js → cli-mcbntv3p.js} +1 -1
  155. package/dist/chunks/{cli-pbc8sk2d.js → cli-mx33m3gs.js} +1 -1
  156. package/dist/chunks/{cli-r83ttew2.js → cli-n5wt59z1.js} +1 -1
  157. package/dist/chunks/{cli-gq5fve62.js → cli-nqvfpxp6.js} +1 -1
  158. package/dist/chunks/{cli-zpcncwrv.js → cli-pgjnzqk4.js} +1 -1
  159. package/dist/chunks/{cli-6pdpyz1a.js → cli-phwbqkv7.js} +1 -1
  160. package/dist/chunks/{cli-57yrpnaq.js → cli-ps5qshk4.js} +1 -1
  161. package/dist/chunks/{cli-4mvvtchx.js → cli-psqvdh1r.js} +1 -1
  162. package/dist/chunks/{cli-gxgdnjfn.js → cli-q0vret0x.js} +1 -1
  163. package/dist/chunks/{cli-zxdnz6vp.js → cli-q2g5mjv6.js} +1 -1
  164. package/dist/chunks/{cli-tq5z9qv3.js → cli-q8zmmp6z.js} +2 -2
  165. package/dist/chunks/{cli-j08dmxw5.js → cli-qpjkqhg2.js} +1 -1
  166. package/dist/chunks/{cli-scaqq0v9.js → cli-qrmc38f8.js} +1 -1
  167. package/dist/chunks/{cli-w1d8n9g3.js → cli-qwx84m9c.js} +1 -1
  168. package/dist/chunks/{cli-s6vr7213.js → cli-r43jhzwm.js} +1 -1
  169. package/dist/chunks/{cli-x70v8rsj.js → cli-rc3w6tqd.js} +2 -2
  170. package/dist/chunks/{cli-7c99j0pt.js → cli-rd5ax7sn.js} +1 -1
  171. package/dist/chunks/{cli-m8fq163z.js → cli-rjy86nps.js} +1 -1
  172. package/dist/chunks/cli-rwh0a2m1.js +3 -0
  173. package/dist/chunks/{cli-3gwqrmcd.js → cli-ry9g546q.js} +1 -1
  174. package/dist/chunks/{cli-8mk2zg4a.js → cli-rz03bav0.js} +1 -1
  175. package/dist/chunks/{cli-66jj9zj3.js → cli-sbm8tsyq.js} +1 -1
  176. package/dist/chunks/{cli-55ntywtj.js → cli-shsgq494.js} +1 -1
  177. package/dist/chunks/{cli-tt9a4124.js → cli-sr25begm.js} +1 -1
  178. package/dist/chunks/{cli-c60c9qvm.js → cli-swrtc7tv.js} +1 -1
  179. package/dist/chunks/{cli-cwbxhdt1.js → cli-sxe9wke0.js} +1 -1
  180. package/dist/chunks/{cli-qm684n63.js → cli-szxfz15b.js} +1 -1
  181. package/dist/chunks/{cli-w52yvzkn.js → cli-t4see9hh.js} +2 -2
  182. package/dist/chunks/cli-t5ddsvmv.js +3 -0
  183. package/dist/chunks/cli-t5yqvdb3.js +3 -0
  184. package/dist/chunks/{cli-wbe1p8n2.js → cli-t7sx6zqn.js} +1 -1
  185. package/dist/chunks/cli-t8ydjjs7.js +3 -0
  186. package/dist/chunks/{cli-3ac555qw.js → cli-tafg3e9w.js} +2 -2
  187. package/dist/chunks/{cli-zjfya500.js → cli-tpjr1pz9.js} +1 -1
  188. package/dist/chunks/{cli-d53fhs6v.js → cli-vb6aa4jk.js} +1 -1
  189. package/dist/chunks/{cli-749tdaqc.js → cli-vfh77r55.js} +1 -1
  190. package/dist/chunks/{cli-jkj867t1.js → cli-vm7dr5aa.js} +2 -2
  191. package/dist/chunks/{cli-k2nh5cby.js → cli-vqne1z50.js} +1 -1
  192. package/dist/chunks/{cli-42kma5r3.js → cli-vtsy70mz.js} +1 -1
  193. package/dist/chunks/{cli-mj03488e.js → cli-vy3e90k9.js} +1 -1
  194. package/dist/chunks/{cli-vkzp66cm.js → cli-wvctks7e.js} +1 -1
  195. package/dist/chunks/{cli-er7z496e.js → cli-wznsj6nb.js} +1 -1
  196. package/dist/chunks/{cli-msgx4pnp.js → cli-x9s7jxq5.js} +1 -1
  197. package/dist/chunks/{cli-grxvgq2n.js → cli-xqqnx8gk.js} +1 -1
  198. package/dist/chunks/{cli-rjerv816.js → cli-yaxs01at.js} +2 -2
  199. package/dist/chunks/{cli-fdya77ch.js → cli-yb5m6jwq.js} +3 -3
  200. package/dist/chunks/{cli-mzcsnm06.js → cli-yfb8bk69.js} +2 -2
  201. package/dist/chunks/{cli-rxb5q8zw.js → cli-yktdhy9p.js} +2 -2
  202. package/dist/chunks/{cli-4a4bb1kf.js → cli-yt4ezhhk.js} +1 -1
  203. package/dist/chunks/{cli-jgn9jprh.js → cli-yxsn8ang.js} +1 -1
  204. package/dist/chunks/{cli-350pymj4.js → cli-z02gsrtd.js} +2 -2
  205. package/dist/chunks/{cli-xmgm2573.js → cli-z2ewnqgr.js} +2 -2
  206. package/dist/chunks/{cli-r9db9mqv.js → cli-zqrzc3qx.js} +1 -1
  207. package/dist/chunks/{cli-wm8qb6j3.js → cli-zwn9x1p2.js} +1 -1
  208. package/dist/chunks/{cli-kq16afrr.js → cli-zxe1a0ey.js} +2 -2
  209. package/dist/chunks/client-qxx2ja27.js +2 -0
  210. package/dist/chunks/color-k1ew8kzn.js +2 -0
  211. package/dist/chunks/commitAttribution-nsa26sdx.js +2 -0
  212. package/dist/chunks/common-7t28qq0q.js +2 -0
  213. package/dist/chunks/{compact-zmvj1pk0.js → compact-kysg5kxd.js} +1 -1
  214. package/dist/chunks/config-d4kj5q8e.js +2 -0
  215. package/dist/chunks/{config-gj0gbg5g.js → config-txzzncm9.js} +1 -1
  216. package/dist/chunks/{context-h1qc69rg.js → context-aat04hqp.js} +1 -1
  217. package/dist/chunks/context-noninteractive-w54t6xnc.js +2 -0
  218. package/dist/chunks/conversation-brecqh0t.js +2 -0
  219. package/dist/chunks/{copy-76r9v46d.js → copy-zpvnnk85.js} +1 -1
  220. package/dist/chunks/cost-5fbyws6x.js +5 -0
  221. package/dist/chunks/createSession-hsp3x7vw.js +2 -0
  222. package/dist/chunks/desktop-7kdmxet0.js +2 -0
  223. package/dist/chunks/detectRepository-9xqead5f.js +2 -0
  224. package/dist/chunks/detection-z3cdks0s.js +2 -0
  225. package/dist/chunks/{devtools-10ba48t9.js → devtools-7jd4m7th.js} +1 -1
  226. package/dist/chunks/{diff-05xxjeqc.js → diff-xaw6ebj0.js} +1 -1
  227. package/dist/chunks/doctor-nbm4z0tx.js +2 -0
  228. package/dist/chunks/{earlyInput-navj6cdn.js → earlyInput-e8zh4d2d.js} +1 -1
  229. package/dist/chunks/{effort-a190c878.js → effort-bj5x7fcg.js} +1 -1
  230. package/dist/chunks/executor-e1744nra.js +2 -0
  231. package/dist/chunks/exit-894g29w2.js +2 -0
  232. package/dist/chunks/{export-ct4sty4d.js → export-tjrkechp.js} +1 -1
  233. package/dist/chunks/extra-usage-noninteractive-577ac873.js +2 -0
  234. package/dist/chunks/extra-usage-tfwmdc7z.js +2 -0
  235. package/dist/chunks/fast-1krm57mn.js +2 -0
  236. package/dist/chunks/feedback-2421cbpm.js +2 -0
  237. package/dist/chunks/{files-qrrrkjke.js → files-n3b22fs2.js} +1 -1
  238. package/dist/chunks/firstPartyEventLogger-1kwwcqdn.js +2 -0
  239. package/dist/chunks/gates-sd1cp8f2.js +2 -0
  240. package/dist/chunks/git-t6e9xdt2.js +2 -0
  241. package/dist/chunks/goal-0sxyk3va.js +2 -0
  242. package/dist/chunks/{growthbook-f7ag30hy.js → growthbook-4hx0kbpq.js} +1 -1
  243. package/dist/chunks/{heapdump-16gnh3zm.js → heapdump-2y7wcy1r.js} +1 -1
  244. package/dist/chunks/{help-rgcakcxe.js → help-a7mc9946.js} +1 -1
  245. package/dist/chunks/{hooks-c7fqwas5.js → hooks-22nm9hn0.js} +1 -1
  246. package/dist/chunks/hooks-tf9v5b0x.js +2 -0
  247. package/dist/chunks/{ide-q83qr9cn.js → ide-9x5zsk63.js} +1 -1
  248. package/dist/chunks/index-p1k4dhfc.js +2 -0
  249. package/dist/chunks/{initReplBridge-zfwxgpsm.js → initReplBridge-xjc6eaan.js} +1 -1
  250. package/dist/chunks/{ink-vkxsn90v.js → ink-9n8bszp5.js} +1 -1
  251. package/dist/chunks/{insights-4fwap4e5.js → insights-n7k1ty4n.js} +1 -1
  252. package/dist/chunks/{install-github-app-djzea7r4.js → install-github-app-zdsmjft8.js} +1 -1
  253. package/dist/chunks/{install-7nxzmgp5.js → install-rhzcmymh.js} +1 -1
  254. package/dist/chunks/install-slack-app-vhfe2dsf.js +2 -0
  255. package/dist/chunks/{instrumentation-223qqr23.js → instrumentation-5jjvsvke.js} +1 -1
  256. package/dist/chunks/keybindings-tqnmw7ng.js +3 -0
  257. package/dist/chunks/loadAgentsDir-j7pntb5v.js +2 -0
  258. package/dist/chunks/loadPluginHooks-sta7ra57.js +2 -0
  259. package/dist/chunks/login-j7x2fjw8.js +2 -0
  260. package/dist/chunks/logout-53bvwba1.js +2 -0
  261. package/dist/chunks/{main-0b8hyp8h.js → main-07p6q3f9.js} +13 -13
  262. package/dist/chunks/{mcp-fn4yrf5y.js → mcp-3mjagnnt.js} +1 -1
  263. package/dist/chunks/{mcp-9enw5a8j.js → mcp-yqhzespv.js} +1 -1
  264. package/dist/chunks/{mcp-yymqpmv6.js → mcp-yrt7dbxp.js} +3 -3
  265. package/dist/chunks/{mcpServer-85gt8ypc.js → mcpServer-f90a93nt.js} +1 -1
  266. package/dist/chunks/{mcpServer-60jg9v58.js → mcpServer-v1dy489g.js} +1 -1
  267. package/dist/chunks/{memory-kam5z1cw.js → memory-mdwb22wh.js} +1 -1
  268. package/dist/chunks/{mobile-7zsgawnb.js → mobile-j4jwvavn.js} +1 -1
  269. package/dist/chunks/{model-03987182.js → model-hz3nn362.js} +1 -1
  270. package/dist/chunks/{model-wbxx5kcd.js → model-tf1ne2j9.js} +1 -1
  271. package/dist/chunks/{oauth-y0p2y1w5.js → oauth-1b0qpxz4.js} +1 -1
  272. package/dist/chunks/{output-style-x148mzhn.js → output-style-t39s3jqx.js} +1 -1
  273. package/dist/chunks/parser-8venanpw.js +2 -0
  274. package/dist/chunks/{passes-jrmjk5zk.js → passes-s3fqswrg.js} +1 -1
  275. package/dist/chunks/{permissions-karmgb0m.js → permissions-a050zfqv.js} +1 -1
  276. package/dist/chunks/plan-gjaybyvb.js +2 -0
  277. package/dist/chunks/plugin-trf2388p.js +2 -0
  278. package/dist/chunks/pluginStartupCheck-wxmc7h98.js +2 -0
  279. package/dist/chunks/{plugins-vvf897b4.js → plugins-4py04yzf.js} +2 -2
  280. package/dist/chunks/{preauthorizedConfig-p02f23jb.js → preauthorizedConfig-hmxcgb8e.js} +1 -1
  281. package/dist/chunks/{print-krwpbp2j.js → print-pmzxgktf.js} +4 -4
  282. package/dist/chunks/privacy-settings-b2rz35r5.js +2 -0
  283. package/dist/chunks/process-n5355p53.js +2 -0
  284. package/dist/chunks/{processBashCommand-8fqgv2ec.js → processBashCommand-zkztsgn4.js} +1 -1
  285. package/dist/chunks/{processSlashCommand-q32wy80b.js → processSlashCommand-mfh1h592.js} +1 -1
  286. package/dist/chunks/prompt-2jyjhkwg.js +2 -0
  287. package/dist/chunks/prompt-b34a0h5z.js +2 -0
  288. package/dist/chunks/provider-prompt-qe4s2yzh.js +2 -0
  289. package/dist/chunks/{rate-limit-options-rd4rjfv5.js → rate-limit-options-kd432dap.js} +1 -1
  290. package/dist/chunks/registry-d7cd5dqg.js +2 -0
  291. package/dist/chunks/release-notes-rwgbn4pp.js +6 -0
  292. package/dist/chunks/reload-plugins-9axdwaaj.js +3 -0
  293. package/dist/chunks/{remote-env-nn9ngr99.js → remote-env-rg4k5em5.js} +1 -1
  294. package/dist/chunks/{remoteBridgeCore-cg7qd8m4.js → remoteBridgeCore-t980tt3v.js} +1 -1
  295. package/dist/chunks/rename-xap3rpbv.js +2 -0
  296. package/dist/chunks/{resume-4rvj8jbz.js → resume-3tc40yn9.js} +1 -1
  297. package/dist/chunks/{rewind-r4g5njsg.js → rewind-b6vg7dxs.js} +1 -1
  298. package/dist/chunks/sandbox-adapter-1z8xktva.js +2 -0
  299. package/dist/chunks/{sandbox-toggle-620bkz9q.js → sandbox-toggle-eke03mr8.js} +1 -1
  300. package/dist/chunks/{session-5vm1vwv1.js → session-53f3eza5.js} +1 -1
  301. package/dist/chunks/sessionFileAccessHooks-xscvsvqt.js +2 -0
  302. package/dist/chunks/{sessionStorage-ffkhmn5q.js → sessionStorage-rb63e8bn.js} +1 -1
  303. package/dist/chunks/settings-hp0ksjn9.js +2 -0
  304. package/dist/chunks/{setup-vegs56f5.js → setup-gravfzvg.js} +1 -1
  305. package/dist/chunks/setup-ssq8b1e6.js +2 -0
  306. package/dist/chunks/{setup-pf09nfsj.js → setup-z05dsr8q.js} +2 -2
  307. package/dist/chunks/sinks-agafqaxj.js +2 -0
  308. package/dist/chunks/{skills-evga8f7n.js → skills-41mfq71n.js} +1 -1
  309. package/dist/chunks/startupProfiler-wmf8nvfd.js +2 -0
  310. package/dist/chunks/state-rhxyy4qm.js +2 -0
  311. package/dist/chunks/{stats-mgqf6r7c.js → stats-7qg84dw1.js} +1 -1
  312. package/dist/chunks/status-sran2y9h.js +2 -0
  313. package/dist/chunks/stickers-hythmrsd.js +2 -0
  314. package/dist/chunks/subprocessEnv-b12dkzky.js +2 -0
  315. package/dist/chunks/{systemPromptSections-07y2z2wn.js → systemPromptSections-jxxyhnxe.js} +1 -1
  316. package/dist/chunks/{tag-gd73kstd.js → tag-58ndeaa9.js} +1 -1
  317. package/dist/chunks/tasks-52g28x72.js +2 -0
  318. package/dist/chunks/{teamHelpers-8ykc4bxa.js → teamHelpers-rxt9rvmd.js} +1 -1
  319. package/dist/chunks/teammateModeSnapshot-2782d4w9.js +2 -0
  320. package/dist/chunks/teleport-8gjys6yn.js +2 -0
  321. package/dist/chunks/terminalSetup-bbftxeqk.js +2 -0
  322. package/dist/chunks/theme-b38te5rz.js +2 -0
  323. package/dist/chunks/thinkback-05a9q24j.js +2 -0
  324. package/dist/chunks/thinkback-play-1nbagfm5.js +2 -0
  325. package/dist/chunks/toolSearch-7rnke366.js +2 -0
  326. package/dist/chunks/trustedDevice-2dn4981h.js +2 -0
  327. package/dist/chunks/{ultrareviewCommand-j23bjbf8.js → ultrareviewCommand-qwnsjdez.js} +1 -1
  328. package/dist/chunks/{update-w8wdxh3m.js → update-ney1krzn.js} +1 -1
  329. package/dist/chunks/upgrade-zxxxfq8c.js +2 -0
  330. package/dist/chunks/{upstreamproxy-x405ef9p.js → upstreamproxy-34wva0r5.js} +1 -1
  331. package/dist/chunks/usage-82ghrfb3.js +2 -0
  332. package/dist/chunks/util-xm9cs164.js +2 -0
  333. package/dist/chunks/utils-zs0ft181.js +2 -0
  334. package/dist/chunks/vim-6gxdrp1k.js +2 -0
  335. package/dist/chunks/worktree-xjxz4ndt.js +2 -0
  336. package/dist/chunks/worktreeModeEnabled-8ndm5yfs.js +2 -0
  337. package/dist/cli.js +1 -1
  338. package/package.json +1 -1
  339. package/preload.ts +24 -2
  340. package/dist/chunks/App-s5ex5j86.js +0 -2
  341. package/dist/chunks/ApproveApiKey-b4z6h2gn.js +0 -2
  342. package/dist/chunks/BypassPermissionsModeDialog-jbg97eja.js +0 -2
  343. package/dist/chunks/ClaudeMdExternalIncludesDialog-gqmed78y.js +0 -2
  344. package/dist/chunks/ConsoleOAuthFlow-yh72vs8j.js +0 -2
  345. package/dist/chunks/Doctor-k08ggw2j.js +0 -2
  346. package/dist/chunks/Grove-tkkskg8n.js +0 -2
  347. package/dist/chunks/InvalidSettingsDialog-tnd5hymg.js +0 -2
  348. package/dist/chunks/REPL-hjjz80kq.js +0 -2
  349. package/dist/chunks/ToolSearchTool-w4t61c7d.js +0 -2
  350. package/dist/chunks/TungstenTool-rv96z549.js +0 -2
  351. package/dist/chunks/agents-3exybgtb.js +0 -4
  352. package/dist/chunks/ant-claude-for-chrome-mcp-712xg07f.js +0 -2
  353. package/dist/chunks/api-z8svc3xt.js +0 -2
  354. package/dist/chunks/asciicast-vzd7qjbb.js +0 -2
  355. package/dist/chunks/auth-gbyfq0g2.js +0 -2
  356. package/dist/chunks/backgroundHousekeeping-m8gthtkh.js +0 -2
  357. package/dist/chunks/caches-fbggdeq7.js +0 -2
  358. package/dist/chunks/clear-fwad6zxy.js +0 -2
  359. package/dist/chunks/cli-55jdp9ky.js +0 -3
  360. package/dist/chunks/cli-78apjp3t.js +0 -3
  361. package/dist/chunks/cli-8hxz2qs6.js +0 -3
  362. package/dist/chunks/cli-95wg48h9.js +0 -3
  363. package/dist/chunks/cli-edkqs0ge.js +0 -3
  364. package/dist/chunks/cli-fakdskp6.js +0 -3
  365. package/dist/chunks/cli-h4dspaac.js +0 -3
  366. package/dist/chunks/cli-przq3zk6.js +0 -3
  367. package/dist/chunks/client-dkpgx025.js +0 -2
  368. package/dist/chunks/color-zrm6r755.js +0 -2
  369. package/dist/chunks/commitAttribution-3y6pessz.js +0 -2
  370. package/dist/chunks/common-0bee37at.js +0 -2
  371. package/dist/chunks/config-hbq35b68.js +0 -2
  372. package/dist/chunks/context-noninteractive-7wbe6qvd.js +0 -2
  373. package/dist/chunks/conversation-fwnfp0p5.js +0 -2
  374. package/dist/chunks/cost-56r5xxqy.js +0 -5
  375. package/dist/chunks/createSession-m5y8fjy4.js +0 -2
  376. package/dist/chunks/desktop-z3jqgnw7.js +0 -2
  377. package/dist/chunks/detectRepository-w6wawmmg.js +0 -2
  378. package/dist/chunks/detection-1yb2c7hh.js +0 -2
  379. package/dist/chunks/doctor-hgwjdraj.js +0 -2
  380. package/dist/chunks/executor-s42mdmqs.js +0 -2
  381. package/dist/chunks/exit-kyrjy6hb.js +0 -2
  382. package/dist/chunks/extra-usage-noninteractive-byts9mme.js +0 -2
  383. package/dist/chunks/extra-usage-xh1mkrca.js +0 -2
  384. package/dist/chunks/fast-g4aa49jf.js +0 -2
  385. package/dist/chunks/feedback-m5r66qd5.js +0 -2
  386. package/dist/chunks/firstPartyEventLogger-mthxtmgc.js +0 -2
  387. package/dist/chunks/gates-yhakv4vb.js +0 -2
  388. package/dist/chunks/git-c39vd9dm.js +0 -2
  389. package/dist/chunks/goal-24dr7fwz.js +0 -2
  390. package/dist/chunks/hooks-8dh43zmv.js +0 -2
  391. package/dist/chunks/index-v875zpde.js +0 -2
  392. package/dist/chunks/install-slack-app-3rde0k08.js +0 -2
  393. package/dist/chunks/keybindings-6t5f69wx.js +0 -3
  394. package/dist/chunks/loadAgentsDir-f8shfnw3.js +0 -2
  395. package/dist/chunks/loadPluginHooks-mdwjrjtp.js +0 -2
  396. package/dist/chunks/login-34j3xdr9.js +0 -2
  397. package/dist/chunks/logout-yew8mymc.js +0 -2
  398. package/dist/chunks/parser-4y4b0e6b.js +0 -2
  399. package/dist/chunks/plan-w0beh9bh.js +0 -2
  400. package/dist/chunks/plugin-6nwptn3s.js +0 -2
  401. package/dist/chunks/pluginStartupCheck-0nzv1ae9.js +0 -2
  402. package/dist/chunks/privacy-settings-m0mfykh0.js +0 -2
  403. package/dist/chunks/process-26nny2p0.js +0 -2
  404. package/dist/chunks/prompt-gw1e1gef.js +0 -2
  405. package/dist/chunks/prompt-xgw2hxrc.js +0 -2
  406. package/dist/chunks/provider-prompt-s26vatcw.js +0 -2
  407. package/dist/chunks/registry-fp7x9ekd.js +0 -2
  408. package/dist/chunks/release-notes-76y1r2s1.js +0 -6
  409. package/dist/chunks/reload-plugins-z0fepkva.js +0 -3
  410. package/dist/chunks/rename-fdjzyjar.js +0 -2
  411. package/dist/chunks/sandbox-adapter-craea9vm.js +0 -2
  412. package/dist/chunks/sessionFileAccessHooks-5jbvwabj.js +0 -2
  413. package/dist/chunks/settings-s2bcajs6.js +0 -2
  414. package/dist/chunks/setup-fwcttwbm.js +0 -2
  415. package/dist/chunks/sinks-wd4ccgbf.js +0 -2
  416. package/dist/chunks/startupProfiler-x5zbs2j7.js +0 -2
  417. package/dist/chunks/state-qpmfrvsv.js +0 -2
  418. package/dist/chunks/status-78yks3jw.js +0 -2
  419. package/dist/chunks/stickers-bdp8w2gr.js +0 -2
  420. package/dist/chunks/subprocessEnv-s797f06r.js +0 -2
  421. package/dist/chunks/tasks-63qaca0z.js +0 -2
  422. package/dist/chunks/teammateModeSnapshot-ae9r29dy.js +0 -2
  423. package/dist/chunks/teleport-es58k4xz.js +0 -2
  424. package/dist/chunks/terminalSetup-gyh5z5e2.js +0 -2
  425. package/dist/chunks/theme-qrhbaht6.js +0 -2
  426. package/dist/chunks/thinkback-5bs7ezv5.js +0 -2
  427. package/dist/chunks/thinkback-play-1dy160y5.js +0 -2
  428. package/dist/chunks/toolSearch-6cv284b7.js +0 -2
  429. package/dist/chunks/trustedDevice-77ketbgg.js +0 -2
  430. package/dist/chunks/upgrade-nft7c1yk.js +0 -2
  431. package/dist/chunks/usage-s5qgc615.js +0 -2
  432. package/dist/chunks/util-1geb93kp.js +0 -2
  433. package/dist/chunks/utils-6sb44pg8.js +0 -2
  434. package/dist/chunks/vim-kq91w44a.js +0 -2
  435. package/dist/chunks/worktree-0af6b1mt.js +0 -2
  436. package/dist/chunks/worktreeModeEnabled-ea6wb7aj.js +0 -2
@@ -1,3 +1,3 @@
1
1
  // @bun
2
- import{Wf as Qq,Xf as Wq}from"./cli-15sqp3mq.js";import{EO as Jq,FO as Dq,TO as i,UO as _q,WO as Lq,YO as Pq,ZO as Sq}from"./cli-akcxtvv9.js";import{DQ as K,FQ as F,fR as jq}from"./cli-x8xgga1a.js";import{Z5 as l,_5 as Eq}from"./cli-51720d82.js";import{fda as wq}from"./cli-w1d8n9g3.js";import{c as o}from"react/compiler-runtime";import{createContext as mq,useContext as s,useEffect as pq,useState as r}from"react";import{jsxDEV as U}from"react/jsx-dev-runtime";function lq(A){let q=o(25),{title:J,color:X,defaultTab:P,children:L,hidden:G,useFullWidth:O,selectedTab:z,onTabChange:Z,banner:g,disableNavigation:a,initialHeaderFocused:n,contentHeight:R,navFromContent:d}=A,Uq=n===void 0?!0:n,Xq=d===void 0?!1:d,{columns:t}=Jq(),Y=L.map(gq),e=P?Y.findIndex((Q)=>P===Q[0]):0,I=z!==void 0,[Yq,Zq]=r(e!==-1?e:0),qq=I?Y.findIndex((Q)=>Q[0]===z):-1,N=I?qq!==-1?qq:0:Yq,M=Pq(),[k,v]=r(Uq),V;if(q[0]===Symbol.for("react.memo_cache_sentinel"))V=()=>v(!0),q[0]=V;else V=q[0];let kq=V,w;if(q[1]===Symbol.for("react.memo_cache_sentinel"))w=()=>v(!1),q[1]=w;else w=q[1];let zq=w,[Nq,Aq]=r(0),E;if(q[2]===Symbol.for("react.memo_cache_sentinel"))E=()=>{return Aq(fq),()=>Aq(Fq)},q[2]=E;else E=q[2];let Mq=E,j=Nq>0,D=(Q)=>{let p=(N+Y.length+Q)%Y.length,H=Y[p]?.[0];if(I&&Z&&H)Z(H);else Zq(p);v(!0)},C=!G&&!a&&k,_;if(q[3]!==C)_={context:"Tabs",isActive:C},q[3]=C,q[4]=_;else _=q[4];i({"tabs:next":()=>D(1),"tabs:previous":()=>D(-1)},_);let S;if(q[5]!==k||q[6]!==G||q[7]!==j)S=(Q)=>{if(!k||!j||G)return;if(Q.key==="down")Q.preventDefault(),v(!1)},q[5]=k,q[6]=G,q[7]=j,q[8]=S;else S=q[8];let T=S,x=Xq&&!k&&j&&!G&&!a,W;if(q[9]!==x)W={context:"Tabs",isActive:x},q[9]=x,q[10]=W;else W=q[10];i({"tabs:next":()=>{D(1),v(!0)},"tabs:previous":()=>{D(-1),v(!0)}},W);let vq=J?l(J)+1:0,Bq=Y.reduce(Hq,0),Kq=vq+Bq,Gq=O?Math.max(0,t-Kq):0,y=O?t:void 0,b=K,yq="column",Oq=0,Rq=!0,u=M?0:void 0,$=!G&&U(K,{flexDirection:"row",gap:1,flexShrink:M?0:void 0,children:[J!==void 0&&U(F,{bold:!0,color:X,children:J},void 0,!1,void 0,this),Y.map((Q,p)=>{let[H,Vq]=Q,h=N===p,c=X&&h&&k;return U(F,{backgroundColor:c?X:void 0,color:c?"inverseText":void 0,inverse:h&&!c,bold:h,children:[" ",Vq," "]},H,!0,void 0,this)}),Gq>0&&U(F,{children:" ".repeat(Gq)},void 0,!1,void 0,this)]},void 0,!0,void 0,this),B;if(q[11]!==L||q[12]!==R||q[13]!==y||q[14]!==G||q[15]!==M||q[16]!==N)B=M?U(K,{width:y,marginTop:G?0:1,flexShrink:0,children:U(Qq,{ref:M,flexDirection:"column",flexShrink:0,children:L},N,!1,void 0,this)},void 0,!1,void 0,this):U(K,{width:y,marginTop:G?0:1,height:R,overflowY:R!==void 0?"hidden":void 0,children:L},void 0,!1,void 0,this),q[11]=L,q[12]=R,q[13]=y,q[14]=G,q[15]=M,q[16]=N,q[17]=B;else B=q[17];let m;if(q[18]!==b||q[19]!==g||q[20]!==T||q[21]!==u||q[22]!==$||q[23]!==B)m=U(b,{flexDirection:yq,tabIndex:Oq,autoFocus:Rq,onKeyDown:T,flexShrink:u,children:[$,g,B]},void 0,!0,void 0,this),q[18]=b,q[19]=g,q[20]=T,q[21]=u,q[22]=$,q[23]=B,q[24]=m;else m=q[24];return U(f.Provider,{value:{selectedTab:Y[N][0],width:y,headerFocused:k,focusHeader:kq,blurHeader:zq,registerOptIn:Mq},children:m},void 0,!1,void 0,this)}function Hq(A,q){let[,J]=q;return A+(J?l(J):0)+2+1}function Fq(A){return A-1}function fq(A){return A+1}function gq(A){return[A.props.id??A.props.title,A.props.title]}function oq(A){let q=o(4),{title:J,id:X,children:P}=A,{selectedTab:L,width:G}=s(f),O=Lq();if(L!==(X??J))return null;let z=O?0:void 0,Z;if(q[0]!==P||q[1]!==z||q[2]!==G)Z=U(K,{width:G,flexShrink:z,children:P},void 0,!1,void 0,this),q[0]=P,q[1]=z,q[2]=G,q[3]=Z;else Z=q[3];return Z}function sq(){let{width:A}=s(f);return A}function aq(){let A=o(6),{headerFocused:q,focusHeader:J,blurHeader:X,registerOptIn:P}=s(f),L;if(A[0]!==P)L=[P],A[0]=P,A[1]=L;else L=A[1];pq(P,L);let G;if(A[2]!==X||A[3]!==J||A[4]!==q)G={headerFocused:q,focusHeader:J,blurHeader:X},A[2]=X,A[3]=J,A[4]=q,A[5]=G;else G=A[5];return G}var f;var Iq=wq(()=>{Sq();Dq();Wq();Eq();jq();_q();f=mq({selectedTab:void 0,width:void 0,headerFocused:!1,focusHeader:()=>{},blurHeader:()=>{},registerOptIn:()=>()=>{}})});
2
+ import{Wf as Qq,Xf as Wq}from"./cli-8h10q2x8.js";import{EO as Jq,FO as Dq,TO as i,UO as _q,WO as Lq,YO as Pq,ZO as Sq}from"./cli-8jym9hp6.js";import{DQ as K,FQ as F,fR as jq}from"./cli-a2d962bq.js";import{$5 as l,a6 as Eq}from"./cli-bdgrtpsy.js";import{hda as wq}from"./cli-qwx84m9c.js";import{c as o}from"react/compiler-runtime";import{createContext as mq,useContext as s,useEffect as pq,useState as r}from"react";import{jsxDEV as U}from"react/jsx-dev-runtime";function lq(A){let q=o(25),{title:J,color:X,defaultTab:P,children:L,hidden:G,useFullWidth:O,selectedTab:z,onTabChange:Z,banner:g,disableNavigation:a,initialHeaderFocused:n,contentHeight:R,navFromContent:d}=A,Uq=n===void 0?!0:n,Xq=d===void 0?!1:d,{columns:t}=Jq(),Y=L.map(gq),e=P?Y.findIndex((Q)=>P===Q[0]):0,I=z!==void 0,[Yq,Zq]=r(e!==-1?e:0),qq=I?Y.findIndex((Q)=>Q[0]===z):-1,N=I?qq!==-1?qq:0:Yq,M=Pq(),[k,v]=r(Uq),V;if(q[0]===Symbol.for("react.memo_cache_sentinel"))V=()=>v(!0),q[0]=V;else V=q[0];let kq=V,w;if(q[1]===Symbol.for("react.memo_cache_sentinel"))w=()=>v(!1),q[1]=w;else w=q[1];let zq=w,[Nq,Aq]=r(0),E;if(q[2]===Symbol.for("react.memo_cache_sentinel"))E=()=>{return Aq(fq),()=>Aq(Fq)},q[2]=E;else E=q[2];let Mq=E,j=Nq>0,D=(Q)=>{let p=(N+Y.length+Q)%Y.length,H=Y[p]?.[0];if(I&&Z&&H)Z(H);else Zq(p);v(!0)},C=!G&&!a&&k,_;if(q[3]!==C)_={context:"Tabs",isActive:C},q[3]=C,q[4]=_;else _=q[4];i({"tabs:next":()=>D(1),"tabs:previous":()=>D(-1)},_);let S;if(q[5]!==k||q[6]!==G||q[7]!==j)S=(Q)=>{if(!k||!j||G)return;if(Q.key==="down")Q.preventDefault(),v(!1)},q[5]=k,q[6]=G,q[7]=j,q[8]=S;else S=q[8];let T=S,x=Xq&&!k&&j&&!G&&!a,W;if(q[9]!==x)W={context:"Tabs",isActive:x},q[9]=x,q[10]=W;else W=q[10];i({"tabs:next":()=>{D(1),v(!0)},"tabs:previous":()=>{D(-1),v(!0)}},W);let vq=J?l(J)+1:0,Bq=Y.reduce(Hq,0),Kq=vq+Bq,Gq=O?Math.max(0,t-Kq):0,y=O?t:void 0,b=K,yq="column",Oq=0,Rq=!0,u=M?0:void 0,$=!G&&U(K,{flexDirection:"row",gap:1,flexShrink:M?0:void 0,children:[J!==void 0&&U(F,{bold:!0,color:X,children:J},void 0,!1,void 0,this),Y.map((Q,p)=>{let[H,Vq]=Q,h=N===p,c=X&&h&&k;return U(F,{backgroundColor:c?X:void 0,color:c?"inverseText":void 0,inverse:h&&!c,bold:h,children:[" ",Vq," "]},H,!0,void 0,this)}),Gq>0&&U(F,{children:" ".repeat(Gq)},void 0,!1,void 0,this)]},void 0,!0,void 0,this),B;if(q[11]!==L||q[12]!==R||q[13]!==y||q[14]!==G||q[15]!==M||q[16]!==N)B=M?U(K,{width:y,marginTop:G?0:1,flexShrink:0,children:U(Qq,{ref:M,flexDirection:"column",flexShrink:0,children:L},N,!1,void 0,this)},void 0,!1,void 0,this):U(K,{width:y,marginTop:G?0:1,height:R,overflowY:R!==void 0?"hidden":void 0,children:L},void 0,!1,void 0,this),q[11]=L,q[12]=R,q[13]=y,q[14]=G,q[15]=M,q[16]=N,q[17]=B;else B=q[17];let m;if(q[18]!==b||q[19]!==g||q[20]!==T||q[21]!==u||q[22]!==$||q[23]!==B)m=U(b,{flexDirection:yq,tabIndex:Oq,autoFocus:Rq,onKeyDown:T,flexShrink:u,children:[$,g,B]},void 0,!0,void 0,this),q[18]=b,q[19]=g,q[20]=T,q[21]=u,q[22]=$,q[23]=B,q[24]=m;else m=q[24];return U(f.Provider,{value:{selectedTab:Y[N][0],width:y,headerFocused:k,focusHeader:kq,blurHeader:zq,registerOptIn:Mq},children:m},void 0,!1,void 0,this)}function Hq(A,q){let[,J]=q;return A+(J?l(J):0)+2+1}function Fq(A){return A-1}function fq(A){return A+1}function gq(A){return[A.props.id??A.props.title,A.props.title]}function oq(A){let q=o(4),{title:J,id:X,children:P}=A,{selectedTab:L,width:G}=s(f),O=Lq();if(L!==(X??J))return null;let z=O?0:void 0,Z;if(q[0]!==P||q[1]!==z||q[2]!==G)Z=U(K,{width:G,flexShrink:z,children:P},void 0,!1,void 0,this),q[0]=P,q[1]=z,q[2]=G,q[3]=Z;else Z=q[3];return Z}function sq(){let{width:A}=s(f);return A}function aq(){let A=o(6),{headerFocused:q,focusHeader:J,blurHeader:X,registerOptIn:P}=s(f),L;if(A[0]!==P)L=[P],A[0]=P,A[1]=L;else L=A[1];pq(P,L);let G;if(A[2]!==X||A[3]!==J||A[4]!==q)G={headerFocused:q,focusHeader:J,blurHeader:X},A[2]=X,A[3]=J,A[4]=q,A[5]=G;else G=A[5];return G}var f;var Iq=wq(()=>{Sq();Dq();Wq();Eq();jq();_q();f=mq({selectedTab:void 0,width:void 0,headerFocused:!1,focusHeader:()=>{},blurHeader:()=>{},registerOptIn:()=>()=>{}})});
3
3
  export{lq as gf,oq as hf,sq as if,aq as jf,Iq as kf};
@@ -1,3 +1,3 @@
1
1
  // @bun
2
- import{od as Z,pd as _,qd as $,td as O}from"./cli-89x414pj.js";import{Ed as Y,Jd as x}from"./cli-q46epwyh.js";import{eD as U,jD as W,oD as S,pD as X,zD as V}from"./cli-me4e2p3e.js";import{X9 as Q,b_ as C,v_ as R,y_ as K}from"./cli-hke6r0q8.js";x();K();C();V();S();O();function b(G,J,L){let H=new Set(J.plugins.map((z)=>z.name)),A=`@${L}`,q=[];for(let z of Object.keys(G.plugins)){if(!z.endsWith(A))continue;let h=z.slice(0,-A.length);if(!H.has(h))q.push(z)}return q}async function F(){await Z();let G=X(),J=_(),L=await U(),H=[];for(let A of Object.keys(L))try{let q=await W(A);if(!q.forceRemoveDeletedPlugins)continue;let z=b(G,q,A);for(let h of z){if(h in J)continue;let T=G.plugins[h]??[];if(!T.some((B)=>B.scope==="user"||B.scope==="project"||B.scope==="local"))continue;for(let B of T){let{scope:E}=B;if(E!=="user"&&E!=="project"&&E!=="local")continue;try{await Y(h,E)}catch(v){R(`Failed to auto-uninstall delisted plugin ${h} from ${E}: ${Q(v)}`,{level:"error"})}}await $(h),H.push(h)}}catch(q){R(`Failed to check for delisted plugins in "${A}": ${Q(q)}`,{level:"warn"})}return H}
2
+ import{od as Z,pd as _,qd as $,td as O}from"./cli-g2s3391y.js";import{Ed as Y,Jd as x}from"./cli-e3q6b1cv.js";import{eD as U,jD as W,oD as S,pD as X,zD as V}from"./cli-b3k8arn1.js";import{A_ as K,Z9 as Q,d_ as C,x_ as R}from"./cli-awb77t95.js";x();K();C();V();S();O();function b(G,J,L){let H=new Set(J.plugins.map((z)=>z.name)),A=`@${L}`,q=[];for(let z of Object.keys(G.plugins)){if(!z.endsWith(A))continue;let h=z.slice(0,-A.length);if(!H.has(h))q.push(z)}return q}async function F(){await Z();let G=X(),J=_(),L=await U(),H=[];for(let A of Object.keys(L))try{let q=await W(A);if(!q.forceRemoveDeletedPlugins)continue;let z=b(G,q,A);for(let h of z){if(h in J)continue;let T=G.plugins[h]??[];if(!T.some((B)=>B.scope==="user"||B.scope==="project"||B.scope==="local"))continue;for(let B of T){let{scope:E}=B;if(E!=="user"&&E!=="project"&&E!=="local")continue;try{await Y(h,E)}catch(v){R(`Failed to auto-uninstall delisted plugin ${h} from ${E}: ${Q(v)}`,{level:"error"})}}await $(h),H.push(h)}}catch(q){R(`Failed to check for delisted plugins in "${A}": ${Q(q)}`,{level:"warn"})}return H}
3
3
  export{F as qa};
@@ -1,5 +1,5 @@
1
1
  // @bun
2
- import{A6 as H,E6 as b,F6 as k,G6 as O}from"./cli-ezs5sney.js";import{Y8 as h,Z8 as HK}from"./cli-t9jht3kb.js";import{g_ as r,h_ as CK,l_ as a,p_ as zK,v_ as D,y_ as MK}from"./cli-hke6r0q8.js";import{F_ as c,I_ as m,S_ as UK}from"./cli-tq5z9qv3.js";import{bda as BK,e$ as l}from"./cli-3ac555qw.js";import{fda as z,gda as ZK}from"./cli-w1d8n9g3.js";import i from"emoji-regex";import{eastAsianWidth as E}from"get-east-asian-width";import o from"strip-ansi";function e(K){if(typeof K!=="string"||K.length===0)return 0;let V=!0;for(let Y=0;Y<K.length;Y++){let $=K.charCodeAt(Y);if($>=127||$===27){V=!1;break}}if(V){let Y=0;for(let $=0;$<K.length;$++)if(K.charCodeAt($)>31)Y++;return Y}if(K.includes("\x1B")){if(K=o(K),K.length===0)return 0}if(!t(K)){let Y=0;for(let $ of K){let q=$.codePointAt(0);if(!L(q))Y+=E(q,{ambiguousAsWide:!1})}return Y}let Q=0;for(let{segment:Y}of H().segment(K)){if(w.lastIndex=0,w.test(Y)){Q+=KK(Y);continue}for(let $ of Y){let q=$.codePointAt(0);if(!L(q)){Q+=E(q,{ambiguousAsWide:!1});break}}}return Q}function t(K){for(let V of K){let Q=V.codePointAt(0);if(Q>=127744&&Q<=129791)return!0;if(Q>=9728&&Q<=10175)return!0;if(Q>=127462&&Q<=127487)return!0;if(Q>=65024&&Q<=65039)return!0;if(Q===8205)return!0}return!1}function KK(K){let V=K.codePointAt(0);if(V>=127462&&V<=127487){let Q=0;for(let Y of K)Q++;return Q===1?1:2}if(K.length===2){if(K.codePointAt(1)===65039&&(V>=48&&V<=57||V===35||V===42))return 1}return 2}function L(K){if(K>=32&&K<127)return!1;if(K>=160&&K<768)return K===173;if(K<=31||K>=127&&K<=159)return!0;if(K>=8203&&K<=8205||K===65279||K>=8288&&K<=8292)return!0;if(K>=65024&&K<=65039||K>=917760&&K<=917999)return!0;if(K>=768&&K<=879||K>=6832&&K<=6911||K>=7616&&K<=7679||K>=8400&&K<=8447||K>=65056&&K<=65071)return!0;if(K>=2304&&K<=3407){let V=K&127;if(V<=3)return!0;if(V>=58&&V<=79)return!0;if(V>=81&&V<=87)return!0;if(V>=98&&V<=99)return!0}if(K===3633||K>=3636&&K<=3642||K>=3655&&K<=3662||K===3761||K>=3764&&K<=3772||K>=3784&&K<=3789)return!0;if(K>=1536&&K<=1541||K===1757||K===1807||K===2274)return!0;if(K>=55296&&K<=57343)return!0;if(K>=917504&&K<=917631)return!0;return!1}var w,I,QK,J;var S=z(()=>{O();w=i();I=typeof Bun<"u"&&typeof Bun.stringWidth==="function"?Bun.stringWidth:null,QK={ambiguousIsNarrow:!0},J=I?(K)=>I(K,QK):e});function VK(K,V){if(J(K)<=V)return K;if(V<=0)return"\u2026";if(V<5)return j(K,V);let Q=K.lastIndexOf("/"),Y=Q>=0?K.slice(Q):K,$=Q>=0?K.slice(0,Q):"",q=J(Y);if(q>=V-1)return A(K,V);let X=V-1-q;if(X<=0)return A(Y,V);return T($,X)+"\u2026"+Y}function j(K,V){if(J(K)<=V)return K;if(V<=1)return"\u2026";let Q=0,Y="";for(let{segment:$}of H().segment(K)){let q=J($);if(Q+q>V-1)break;Y+=$,Q+=q}return Y+"\u2026"}function A(K,V){if(J(K)<=V)return K;if(V<=1)return"\u2026";let Q=[...H().segment(K)],Y=0,$=Q.length;for(let q=Q.length-1;q>=0;q--){let X=J(Q[q].segment);if(Y+X>V-1)break;Y+=X,$=q}return"\u2026"+Q.slice($).map((q)=>q.segment).join("")}function T(K,V){if(J(K)<=V)return K;if(V<=0)return"";let Q=0,Y="";for(let{segment:$}of H().segment(K)){let q=J($);if(Q+q>V)break;Y+=$,Q+=q}return Y}function YK(K,V,Q=!1){let Y=K;if(Q){let $=K.indexOf(`
2
+ import{C6 as H,G6 as b,H6 as k,I6 as O}from"./cli-hrmzaf5d.js";import{$8 as HK,_8 as h}from"./cli-e5yek4vx.js";import{A_ as MK,i_ as r,j_ as CK,n_ as a,r_ as zK,x_ as D}from"./cli-awb77t95.js";import{H_ as c,K_ as m,U_ as UK}from"./cli-q8zmmp6z.js";import{dda as BK,g$ as l}from"./cli-tafg3e9w.js";import{hda as z,ida as ZK}from"./cli-qwx84m9c.js";import i from"emoji-regex";import{eastAsianWidth as E}from"get-east-asian-width";import o from"strip-ansi";function e(K){if(typeof K!=="string"||K.length===0)return 0;let V=!0;for(let Y=0;Y<K.length;Y++){let $=K.charCodeAt(Y);if($>=127||$===27){V=!1;break}}if(V){let Y=0;for(let $=0;$<K.length;$++)if(K.charCodeAt($)>31)Y++;return Y}if(K.includes("\x1B")){if(K=o(K),K.length===0)return 0}if(!t(K)){let Y=0;for(let $ of K){let q=$.codePointAt(0);if(!L(q))Y+=E(q,{ambiguousAsWide:!1})}return Y}let Q=0;for(let{segment:Y}of H().segment(K)){if(w.lastIndex=0,w.test(Y)){Q+=KK(Y);continue}for(let $ of Y){let q=$.codePointAt(0);if(!L(q)){Q+=E(q,{ambiguousAsWide:!1});break}}}return Q}function t(K){for(let V of K){let Q=V.codePointAt(0);if(Q>=127744&&Q<=129791)return!0;if(Q>=9728&&Q<=10175)return!0;if(Q>=127462&&Q<=127487)return!0;if(Q>=65024&&Q<=65039)return!0;if(Q===8205)return!0}return!1}function KK(K){let V=K.codePointAt(0);if(V>=127462&&V<=127487){let Q=0;for(let Y of K)Q++;return Q===1?1:2}if(K.length===2){if(K.codePointAt(1)===65039&&(V>=48&&V<=57||V===35||V===42))return 1}return 2}function L(K){if(K>=32&&K<127)return!1;if(K>=160&&K<768)return K===173;if(K<=31||K>=127&&K<=159)return!0;if(K>=8203&&K<=8205||K===65279||K>=8288&&K<=8292)return!0;if(K>=65024&&K<=65039||K>=917760&&K<=917999)return!0;if(K>=768&&K<=879||K>=6832&&K<=6911||K>=7616&&K<=7679||K>=8400&&K<=8447||K>=65056&&K<=65071)return!0;if(K>=2304&&K<=3407){let V=K&127;if(V<=3)return!0;if(V>=58&&V<=79)return!0;if(V>=81&&V<=87)return!0;if(V>=98&&V<=99)return!0}if(K===3633||K>=3636&&K<=3642||K>=3655&&K<=3662||K===3761||K>=3764&&K<=3772||K>=3784&&K<=3789)return!0;if(K>=1536&&K<=1541||K===1757||K===1807||K===2274)return!0;if(K>=55296&&K<=57343)return!0;if(K>=917504&&K<=917631)return!0;return!1}var w,I,QK,J;var S=z(()=>{O();w=i();I=typeof Bun<"u"&&typeof Bun.stringWidth==="function"?Bun.stringWidth:null,QK={ambiguousIsNarrow:!0},J=I?(K)=>I(K,QK):e});function VK(K,V){if(J(K)<=V)return K;if(V<=0)return"\u2026";if(V<5)return j(K,V);let Q=K.lastIndexOf("/"),Y=Q>=0?K.slice(Q):K,$=Q>=0?K.slice(0,Q):"",q=J(Y);if(q>=V-1)return A(K,V);let X=V-1-q;if(X<=0)return A(Y,V);return T($,X)+"\u2026"+Y}function j(K,V){if(J(K)<=V)return K;if(V<=1)return"\u2026";let Q=0,Y="";for(let{segment:$}of H().segment(K)){let q=J($);if(Q+q>V-1)break;Y+=$,Q+=q}return Y+"\u2026"}function A(K,V){if(J(K)<=V)return K;if(V<=1)return"\u2026";let Q=[...H().segment(K)],Y=0,$=Q.length;for(let q=Q.length-1;q>=0;q--){let X=J(Q[q].segment);if(Y+X>V-1)break;Y+=X,$=q}return"\u2026"+Q.slice($).map((q)=>q.segment).join("")}function T(K,V){if(J(K)<=V)return K;if(V<=0)return"";let Q=0,Y="";for(let{segment:$}of H().segment(K)){let q=J($);if(Q+q>V)break;Y+=$,Q+=q}return Y}function YK(K,V,Q=!1){let Y=K;if(Q){let $=K.indexOf(`
3
3
  `);if($!==-1){if(Y=K.substring(0,$),J(Y)+1>V)return j(Y,V);return`${Y}\u2026`}}if(J(Y)<=V)return Y;return j(Y,V)}var f=z(()=>{S();O()});function N(K){let V=K/1024;if(V<1)return`${K} bytes`;if(V<1024)return`${V.toFixed(1).replace(/\.0$/,"")}KB`;let Q=V/1024;if(Q<1024)return`${Q.toFixed(1).replace(/\.0$/,"")}MB`;return`${(Q/1024).toFixed(1).replace(/\.0$/,"")}GB`}function TK(K){return`${(K/1000).toFixed(1)}s`}function fK(K,V){if(K<60000){if(K===0)return"0s";if(K<1)return`${(K/1000).toFixed(1)}s`;return`${Math.floor(K/1000).toString()}s`}let Q=Math.floor(K/86400000),Y=Math.floor(K%86400000/3600000),$=Math.floor(K%3600000/60000),q=Math.round(K%60000/1000);if(q===60)q=0,$++;if($===60)$=0,Y++;if(Y===24)Y=0,Q++;let X=V?.hideTrailingZeros;if(V?.mostSignificantOnly){if(Q>0)return`${Q}d`;if(Y>0)return`${Y}h`;if($>0)return`${$}m`;return`${q}s`}if(Q>0){if(X&&Y===0&&$===0)return`${Q}d`;if(X&&$===0)return`${Q}d ${Y}h`;return`${Q}d ${Y}h ${$}m`}if(Y>0){if(X&&$===0&&q===0)return`${Y}h`;if(X&&q===0)return`${Y}h ${$}m`;return`${Y}h ${$}m ${q}s`}if($>0){if(X&&q===0)return`${$}m`;return`${$}m ${q}s`}return`${q}s`}function qK(K){let V=K>=1000;return $K(V).format(K).toLowerCase()}function WK(K){return qK(K).replace(".0","")}function W(K,V={}){let{style:Q="narrow",numeric:Y="always",now:$=new Date}=V,q=K.getTime()-$.getTime(),X=Math.trunc(q/1000),Z=[{unit:"year",seconds:31536000,shortUnit:"y"},{unit:"month",seconds:2592000,shortUnit:"mo"},{unit:"week",seconds:604800,shortUnit:"w"},{unit:"day",seconds:86400,shortUnit:"d"},{unit:"hour",seconds:3600,shortUnit:"h"},{unit:"minute",seconds:60,shortUnit:"m"},{unit:"second",seconds:1,shortUnit:"s"}];for(let{unit:B,seconds:U,shortUnit:G}of Z)if(Math.abs(X)>=U){let C=Math.trunc(X/U);if(Q==="narrow")return X<0?`${Math.abs(C)}${G} ago`:`in ${C}${G}`;return b("long",Y).format(C,B)}if(Q==="narrow")return X<=0?"0s ago":"in 0s";return b(Q,Y).format(0,"second")}function XK(K,V={}){let{now:Q=new Date,...Y}=V;if(K>Q)return W(K,{...Y,now:Q});return W(K,{...Y,numeric:"always",now:Q})}function xK(K){let V=K.fileSize!==void 0?N(K.fileSize):`${K.messageCount} messages`,Q=[XK(K.modified,{style:"short"}),...K.gitBranch?[K.gitBranch]:[],V];if(K.tag)Q.push(`#${K.tag}`);if(K.agentSetting)Q.push(`@${K.agentSetting}`);if(K.prNumber)Q.push(K.prRepository?`${K.prRepository}#${K.prNumber}`:`#${K.prNumber}`);return Q.join(" \xB7 ")}function JK(K,V=!1,Q=!0){if(!K)return;let Y=new Date(K*1000),$=new Date,q=Y.getMinutes();if((Y.getTime()-$.getTime())/3600000>24){let B={month:"short",day:"numeric",hour:Q?"numeric":void 0,minute:!Q||q===0?void 0:"2-digit",hour12:Q?!0:void 0};if(Y.getFullYear()!==$.getFullYear())B.year="numeric";return Y.toLocaleString("en-US",B).replace(/ ([AP]M)/i,(G,C)=>C.toLowerCase())+(V?` (${k()})`:"")}return Y.toLocaleTimeString("en-US",{hour:"numeric",minute:q===0?void 0:"2-digit",hour12:!0}).replace(/ ([AP]M)/i,(B,U)=>U.toLowerCase())+(V?` (${k()})`:"")}function uK(K,V=!1,Q=!0){let Y=new Date(K);return`${JK(Math.floor(Y.getTime()/1000),V,Q)}`}var R=null,F=null,$K=(K)=>{if(K){if(!R)R=new Intl.NumberFormat("en-US",{notation:"compact",maximumFractionDigits:1,minimumFractionDigits:1});return R}else{if(!F)F=new Intl.NumberFormat("en-US",{notation:"compact",maximumFractionDigits:1,minimumFractionDigits:0});return F}};var x=z(()=>{O();f()});function _(){if(!y)y=ZK("perf_hooks").performance;return y}function v(K){return K.toFixed(3)}function u(K,V,Q,Y,$,q,X=""){let Z=Y?` | RSS: ${N(Y.rss)}, Heap: ${N(Y.heapUsed)}`:"";return`[+${v(K).padStart($)}ms] (+${v(V).padStart(q)}ms) ${Q}${X}${Z}`}var y=null;var p=z(()=>{x()});import{dirname as jK,join as NK}from"path";function GK(K){if(!n)return;if(_().mark(K),M)s.push(process.memoryUsage())}function P(){if(!M)return"Startup profiling not enabled";let V=_().getEntriesByType("mark");if(V.length===0)return"No profiling checkpoints recorded";let Q=[];Q.push("=".repeat(80)),Q.push("STARTUP PROFILING REPORT"),Q.push("=".repeat(80)),Q.push("");let Y=0;for(let[q,X]of V.entries())Q.push(u(X.startTime,X.startTime-Y,X.name,s[q],8,7)),Y=X.startTime;let $=V[V.length-1];return Q.push(""),Q.push(`Total startup time: ${v($?.startTime??0)}ms`),Q.push("=".repeat(80)),Q.join(`
4
4
  `)}function iK(){if(g)return;if(g=!0,AK(),M){let K=OK(),V=jK(K);a().mkdirSync(V),r(K,P(),{encoding:"utf8",flush:!0}),D("Startup profiling report:"),D(P())}}function oK(){return M}function OK(){return NK(c(),"startup-perf",`${l()}.txt`)}function AK(){if(!d)return;let V=_().getEntriesByType("mark");if(V.length===0)return;let Q=new Map;for(let $ of V)Q.set($.name,$.startTime);let Y={};for(let[$,[q,X]]of Object.entries(_K)){let Z=Q.get(q),B=Q.get(X);if(Z!==void 0&&B!==void 0)Y[`${$}_ms`]=Math.round(B-Z)}Y.checkpoint_count=V.length,h("tengu_startup_perf",Y)}var M,vK=0.005,d,n,s,_K,g=!1;var RK=z(()=>{BK();HK();MK();UK();zK();p();CK();M=m(process.env.CLAUDE_CODE_PROFILE_STARTUP),d=process.env.USER_TYPE==="ant"||Math.random()<vK,n=M||d,s=[],_K={import_time:["cli_entry","main_tsx_imports_loaded"],init_time:["init_function_start","init_function_end"],settings_time:["eagerLoadSettings_start","eagerLoadSettings_end"],total_time:["cli_entry","main_after_run"]};if(n)GK("profiler_initialized")});
5
- export{J as Z5,S as _5,VK as $5,j as a6,A as b6,T as c6,YK as d6,f as e6,N as f6,TK as g6,fK as h6,qK as i6,WK as j6,W as k6,XK as l6,xK as m6,JK as n6,uK as o6,x as p6,_ as q6,v as r6,u as s6,p as t6,GK as u6,iK as v6,oK as w6,OK as x6,AK as y6,RK as z6};
5
+ export{J as $5,S as a6,VK as b6,j as c6,A as d6,T as e6,YK as f6,f as g6,N as h6,TK as i6,fK as j6,qK as k6,WK as l6,W as m6,XK as n6,xK as o6,JK as p6,uK as q6,x as r6,_ as s6,v as t6,u as u6,p as v6,GK as w6,iK as x6,oK as y6,OK as z6,AK as A6,RK as B6};
@@ -1,3 +1,3 @@
1
1
  // @bun
2
- import{fda as B}from"./cli-w1d8n9g3.js";function F(z){let k=z.trim();if(!k.startsWith("/"))return null;let b=k.slice(1).split(" ");if(!b[0])return null;let j=b[0],l=!1,q=1;if(b.length>1&&b[1]==="(MCP)")j=j+" (MCP)",l=!0,q=2;let A=b.slice(q).join(" ");return{commandName:j,args:A,isMcp:l}}var C=()=>{};
2
+ import{hda as B}from"./cli-qwx84m9c.js";function F(z){let k=z.trim();if(!k.startsWith("/"))return null;let b=k.slice(1).split(" ");if(!b[0])return null;let j=b[0],l=!1,q=1;if(b.length>1&&b[1]==="(MCP)")j=j+" (MCP)",l=!0,q=2;let A=b.slice(q).join(" ");return{commandName:j,args:A,isMcp:l}}var C=()=>{};
3
3
  export{F as tg,C as ug};
@@ -1,3 +1,3 @@
1
1
  // @bun
2
- import{fda as N}from"./cli-w1d8n9g3.js";import{LRUCache as O}from"lru-cache";import{normalize as q}from"path";class K{cache;constructor(b,j){this.cache=new O({max:b,maxSize:j,sizeCalculation:(p)=>Math.max(1,Buffer.byteLength(p.content))})}get(b){return this.cache.get(q(b))}set(b,j){return this.cache.set(q(b),j),this}has(b){return this.cache.has(q(b))}delete(b){return this.cache.delete(q(b))}clear(){this.cache.clear()}get size(){return this.cache.size}get max(){return this.cache.max}get maxSize(){return this.cache.maxSize}get calculatedSize(){return this.cache.calculatedSize}keys(){return this.cache.keys()}entries(){return this.cache.entries()}dump(){return this.cache.dump()}load(b){this.cache.load(b)}}function R(b,j=Q){return new K(b,j)}function M(b){return Object.fromEntries(b.entries())}function U(b){return Array.from(b.keys())}function V(b){let j=R(b.max,b.maxSize);return j.load(b.dump()),j}function W(b,j){let p=V(b);for(let[w,G]of j.entries()){let J=p.get(w);if(!J||G.timestamp>J.timestamp)p.set(w,G)}return p}var I=100,Q=26214400;var $=()=>{};
2
+ import{hda as N}from"./cli-qwx84m9c.js";import{LRUCache as O}from"lru-cache";import{normalize as q}from"path";class K{cache;constructor(b,j){this.cache=new O({max:b,maxSize:j,sizeCalculation:(p)=>Math.max(1,Buffer.byteLength(p.content))})}get(b){return this.cache.get(q(b))}set(b,j){return this.cache.set(q(b),j),this}has(b){return this.cache.has(q(b))}delete(b){return this.cache.delete(q(b))}clear(){this.cache.clear()}get size(){return this.cache.size}get max(){return this.cache.max}get maxSize(){return this.cache.maxSize}get calculatedSize(){return this.cache.calculatedSize}keys(){return this.cache.keys()}entries(){return this.cache.entries()}dump(){return this.cache.dump()}load(b){this.cache.load(b)}}function R(b,j=Q){return new K(b,j)}function M(b){return Object.fromEntries(b.entries())}function U(b){return Array.from(b.keys())}function V(b){let j=R(b.max,b.maxSize);return j.load(b.dump()),j}function W(b,j){let p=V(b);for(let[w,G]of j.entries()){let J=p.get(w);if(!J||G.timestamp>J.timestamp)p.set(w,G)}return p}var I=100,Q=26214400;var $=()=>{};
3
3
  export{I as LN,R as MN,M as NN,U as ON,V as PN,W as QN,$ as RN};
@@ -1,3 +1,3 @@
1
1
  // @bun
2
- import{sS as u,tS as i,vS as p}from"./cli-6pdpyz1a.js";import{AS as v,BS as d,DS as A,zS as a}from"./cli-p2cqnrnp.js";import{_8 as m,g9 as b}from"./cli-350pymj4.js";import{v_ as r,y_ as f}from"./cli-hke6r0q8.js";import{fda as s}from"./cli-w1d8n9g3.js";function g(o){let e=o.screenRecording!==!1;return{granted:o.accessibility&&e,accessibility:o.accessibility,screenRecording:e}}var l=()=>{};import{format as t}from"util";class c{silly(o,...e){r(t(o,...e),{level:"debug"})}debug(o,...e){r(t(o,...e),{level:"debug"})}info(o,...e){r(t(o,...e),{level:"info"})}warn(o,...e){r(t(o,...e),{level:"warn"})}error(o,...e){r(t(o,...e),{level:"error"})}}function R(){if(n)return n;return n={serverName:m,logger:new c,executor:d({getMouseAnimationEnabled:()=>i().mouseAnimation,getHideBeforeActionEnabled:()=>i().hideBeforeAction}),ensureOsPermissions:async()=>{let o=await a("check_permissions",{}),e=g(o);return e.granted?{granted:!0}:{granted:!1,accessibility:e.accessibility,screenRecording:e.screenRecording}},isDisabled:()=>!u(),getSubGates:i,getAutoUnhideEnabled:()=>!0,cropRawPatch:()=>null},n}var n;var E=s(()=>{f();b();A();p();l();v()});
2
+ import{sS as u,tS as i,vS as p}from"./cli-phwbqkv7.js";import{AS as v,BS as d,DS as A,zS as a}from"./cli-dy9qrrps.js";import{a9 as m,i9 as b}from"./cli-z02gsrtd.js";import{A_ as f,x_ as r}from"./cli-awb77t95.js";import{hda as s}from"./cli-qwx84m9c.js";function g(o){let e=o.screenRecording!==!1;return{granted:o.accessibility&&e,accessibility:o.accessibility,screenRecording:e}}var l=()=>{};import{format as t}from"util";class c{silly(o,...e){r(t(o,...e),{level:"debug"})}debug(o,...e){r(t(o,...e),{level:"debug"})}info(o,...e){r(t(o,...e),{level:"info"})}warn(o,...e){r(t(o,...e),{level:"warn"})}error(o,...e){r(t(o,...e),{level:"error"})}}function R(){if(n)return n;return n={serverName:m,logger:new c,executor:d({getMouseAnimationEnabled:()=>i().mouseAnimation,getHideBeforeActionEnabled:()=>i().hideBeforeAction}),ensureOsPermissions:async()=>{let o=await a("check_permissions",{}),e=g(o);return e.granted?{granted:!0}:{granted:!1,accessibility:e.accessibility,screenRecording:e.screenRecording}},isDisabled:()=>!u(),getSubGates:i,getAutoUnhideEnabled:()=>!0,cropRawPatch:()=>null},n}var n;var E=s(()=>{f();b();A();p();l();v()});
3
3
  export{R as qS,E as rS};
@@ -1,3 +1,3 @@
1
1
  // @bun
2
- import{AF as z,DF as X}from"./cli-me4e2p3e.js";import{$Y as C,H2 as I,a3 as Q,lZ as H,rZ as P}from"./cli-msmzt4c3.js";import{fda as O}from"./cli-w1d8n9g3.js";import{useEffect as T,useReducer as V}from"react";function v(){let J=z((q)=>q.mainLoopModel),K=z((q)=>q.mainLoopModelForSession),[,N]=V((q)=>q+1,0);return T(()=>I(N),[]),H(K??J??C())}var W=O(()=>{Q();X();P()});
2
+ import{AF as z,DF as X}from"./cli-b3k8arn1.js";import{$Y as C,H2 as I,a3 as Q,lZ as H,rZ as P}from"./cli-192xnkcx.js";import{hda as O}from"./cli-qwx84m9c.js";import{useEffect as T,useReducer as V}from"react";function v(){let J=z((q)=>q.mainLoopModel),K=z((q)=>q.mainLoopModelForSession),[,N]=V((q)=>q+1,0);return T(()=>I(N),[]),H(K??J??C())}var W=O(()=>{Q();X();P()});
3
3
  export{v as ig,W as jg};
@@ -1,3 +1,3 @@
1
1
  // @bun
2
- import{fda as w,gda as z}from"./cli-w1d8n9g3.js";function j(){if(!k)k=z("semver");return k}function B(f,h){if(typeof Bun<"u")return Bun.semver.order(f,h)===1;return j().gt(f,h,{loose:!0})}function C(f,h){if(typeof Bun<"u")return Bun.semver.order(f,h)>=0;return j().gte(f,h,{loose:!0})}function D(f,h){if(typeof Bun<"u")return Bun.semver.order(f,h)===-1;return j().lt(f,h,{loose:!0})}function E(f,h){if(typeof Bun<"u")return Bun.semver.satisfies(f,h);return j().satisfies(f,h,{loose:!0})}var k;var A=()=>{};
2
+ import{hda as w,ida as z}from"./cli-qwx84m9c.js";function j(){if(!k)k=z("semver");return k}function B(f,h){if(typeof Bun<"u")return Bun.semver.order(f,h)===1;return j().gt(f,h,{loose:!0})}function C(f,h){if(typeof Bun<"u")return Bun.semver.order(f,h)>=0;return j().gte(f,h,{loose:!0})}function D(f,h){if(typeof Bun<"u")return Bun.semver.order(f,h)===-1;return j().lt(f,h,{loose:!0})}function E(f,h){if(typeof Bun<"u")return Bun.semver.satisfies(f,h);return j().satisfies(f,h,{loose:!0})}var k;var A=()=>{};
3
3
  export{B as nR,C as oR,D as pR,E as qR,A as rR};
@@ -1,5 +1,5 @@
1
1
  // @bun
2
- import{BQ as w,CQ as Sv,HQ as E,IQ as Gv,fR as Dv}from"./cli-x8xgga1a.js";import{C3 as L,D3 as N,Q3 as k,YT as n,cU as Bv,u3 as U,x3 as S}from"./cli-msmzt4c3.js";import{U3 as Xv,X3 as Yv,Y3 as bv}from"./cli-msw0vv86.js";import{c5 as Qv,g5 as Fv}from"./cli-mb1qrqw1.js";import{G7 as B,I7 as C}from"./cli-p0vh69b9.js";import{L7 as u,M7 as wv}from"./cli-rvad3yhg.js";import{E8 as W,J8 as p}from"./cli-4ewb3q42.js";import{q9 as Y,s9 as yv}from"./cli-jj93qmmc.js";import{$9 as j,b_ as vv,d_ as Jv,e_ as Kv,h_ as Mv,l_ as r,p_ as Zv,v_ as y,y_ as Uv}from"./cli-hke6r0q8.js";import{fda as b}from"./cli-w1d8n9g3.js";import Rv from"lodash-es/memoize.js";import{join as Wv}from"path";function Hv(){let v=r().existsSync(Wv(u(),"CLAUDE.md")),G=n(u());return[{key:"workspace",text:"Ask Claude to create a new app or clone a repository",isComplete:!1,isCompletable:!0,isEnabled:G},{key:"claudemd",text:"Run /init to create an AGENTS.md (or CLAUDE.md) file with instructions for UnieAI Code",isComplete:v,isCompletable:!0,isEnabled:!G}]}function a(){return Hv().filter(({isCompletable:v,isEnabled:G})=>v&&G).every(({isComplete:v})=>v)}function o(){if(L().hasCompletedProjectOnboarding)return;if(a())N((v)=>({...v,hasCompletedProjectOnboarding:!0}))}function rv(){N((v)=>({...v,projectOnboardingSeenCount:v.projectOnboardingSeenCount+1}))}var sv;var l=b(()=>{k();wv();Bv();Zv();sv=Rv(()=>{let v=L();if(v.hasCompletedProjectOnboarding||v.projectOnboardingSeenCount>=4||process.env.IS_DEMO)return!1;return!a()})});import{stat as h}from"fs/promises";import{homedir as zv}from"os";import{join as Vv}from"path";function _v(v){U((G)=>({...G,appleTerminalSetupInProgress:!0,appleTerminalBackupPath:v}))}function I(){U((v)=>({...v,appleTerminalSetupInProgress:!1}))}function Iv(){let v=S();return{inProgress:v.appleTerminalSetupInProgress??!1,backupPath:v.appleTerminalBackupPath||null}}function x(){return Vv(zv(),"Library","Preferences","com.apple.Terminal.plist")}async function i(){let v=x(),G=`${v}.bak`;try{let{code:$}=await B("defaults",["export","com.apple.Terminal",v]);if($!==0)return null;try{await h(v)}catch{return null}return await B("defaults",["export","com.apple.Terminal",G]),_v(G),G}catch($){return W($),null}}async function t(){let{inProgress:v,backupPath:G}=Iv();if(!v)return{status:"no_backup"};if(!G)return I(),{status:"no_backup"};try{await h(G)}catch{return I(),{status:"no_backup"}}try{let{code:$}=await B("defaults",["import","com.apple.Terminal",G]);if($!==0)return{status:"failed",backupPath:G};return await B("killall",["cfprefsd"]),I(),{status:"restored"}}catch($){return W(Error(`Failed to restore Terminal.app settings with: ${$}`)),I(),{status:"failed",backupPath:G}}}var e=b(()=>{k();C();p()});import $G from"chalk";import{homedir as xv}from"os";import{dirname as JG,join as V}from"path";function Av(){let v=process.env.SHELL||"",G=xv(),$=V(G,".claude");if(v.endsWith("/zsh")||v.endsWith("/zsh.exe")){let J=V($,"completion.zsh");return{name:"zsh",rcFile:V(G,".zshrc"),cacheFile:J,completionLine:`[[ -f "${J}" ]] && source "${J}"`,shellFlag:"zsh"}}if(v.endsWith("/bash")||v.endsWith("/bash.exe")){let J=V($,"completion.bash");return{name:"bash",rcFile:V(G,".bashrc"),cacheFile:J,completionLine:`[ -f "${J}" ] && source "${J}"`,shellFlag:"bash"}}if(v.endsWith("/fish")||v.endsWith("/fish.exe")){let J=process.env.XDG_CONFIG_HOME||V(G,".config"),q=V($,"completion.fish");return{name:"fish",rcFile:V(J,"fish","config.fish"),cacheFile:q,completionLine:`[ -f "${q}" ] && source "${q}"`,shellFlag:"fish"}}return null}async function BG(){let v=Av();if(!v)return;y(`update: Regenerating ${v.name} completion cache`);let G=process.argv[1]||"claude";if((await B(G,["completion",v.shellFlag,"--output",v.cacheFile])).code!==0){y(`update: Failed to regenerate ${v.name} completion cache`);return}y(`update: Regenerated ${v.name} completion cache at ${v.cacheFile}`)}var $v=b(()=>{Sv();Gv();Uv();vv();C();p()});import Z from"chalk";import{randomBytes as f}from"crypto";import{copyFile as c,mkdir as g,readFile as d,writeFile as m}from"fs/promises";import{homedir as s,platform as D}from"os";import{dirname as Ov,join as z}from"path";import{pathToFileURL as jv}from"url";function uv(){let v=process.env.VSCODE_GIT_ASKPASS_MAIN??"",G=process.env.PATH??"";return v.includes(".vscode-server")||v.includes(".cursor-server")||v.includes(".windsurf-server")||G.includes(".vscode-server")||G.includes(".cursor-server")||G.includes(".windsurf-server")}function kG(){if(!Y.terminal||!(Y.terminal in O))return null;return O[Y.terminal]??null}function R(v){if(!E())return v;return`\x1B]8;;${jv(v).href}\x07${v}\x1B]8;;\x07`}function Lv(){return D()==="darwin"&&Y.terminal==="Apple_Terminal"||Y.terminal==="vscode"||Y.terminal==="cursor"||Y.terminal==="windsurf"||Y.terminal==="alacritty"||Y.terminal==="zed"}async function Nv(v){let G="";switch(Y.terminal){case"Apple_Terminal":G=await kv(v);break;case"vscode":G=await P("VSCode",v);break;case"cursor":G=await P("Cursor",v);break;case"windsurf":G=await P("Windsurf",v);break;case"alacritty":G=await pv(v);break;case"zed":G=await Cv(v);break;case null:break}return U(($)=>{if(["vscode","cursor","windsurf","alacritty","zed"].includes(Y.terminal??"")){if($.shiftEnterKeyBindingInstalled===!0)return $;return{...$,shiftEnterKeyBindingInstalled:!0}}else if(Y.terminal==="Apple_Terminal"){if($.optionAsMetaKeyInstalled===!0)return $;return{...$,optionAsMetaKeyInstalled:!0}}return $}),o(),G}function pG(){return S().shiftEnterKeyBindingInstalled===!0}function CG(){return S().hasUsedBackslashReturn===!0}function EG(){if(!S().hasUsedBackslashReturn)U((G)=>({...G,hasUsedBackslashReturn:!0}))}async function PG(v,G,$){if(Y.terminal&&Y.terminal in O){let q=`Shift+Enter is natively supported in ${O[Y.terminal]}.
2
+ import{BQ as w,CQ as Sv,HQ as E,IQ as Gv,fR as Dv}from"./cli-a2d962bq.js";import{C3 as L,D3 as N,Q3 as k,YT as n,cU as Bv,u3 as U,x3 as S}from"./cli-192xnkcx.js";import{U3 as Xv,X3 as Yv,Y3 as bv}from"./cli-ca1jmr8f.js";import{c5 as Qv,g5 as Fv}from"./cli-6qt2xm18.js";import{I7 as B,K7 as C}from"./cli-7wxv39ry.js";import{N7 as u,O7 as wv}from"./cli-fnt125we.js";import{G8 as W,L8 as p}from"./cli-8kpqq0ea.js";import{s9 as Y,u9 as yv}from"./cli-5ajcy93q.js";import{A_ as Uv,b_ as j,d_ as vv,f_ as Jv,g_ as Kv,j_ as Mv,n_ as r,r_ as Zv,x_ as y}from"./cli-awb77t95.js";import{hda as b}from"./cli-qwx84m9c.js";import Rv from"lodash-es/memoize.js";import{join as Wv}from"path";function Hv(){let v=r().existsSync(Wv(u(),"CLAUDE.md")),G=n(u());return[{key:"workspace",text:"Ask Claude to create a new app or clone a repository",isComplete:!1,isCompletable:!0,isEnabled:G},{key:"claudemd",text:"Run /init to create an AGENTS.md (or CLAUDE.md) file with instructions for UnieAI Code",isComplete:v,isCompletable:!0,isEnabled:!G}]}function a(){return Hv().filter(({isCompletable:v,isEnabled:G})=>v&&G).every(({isComplete:v})=>v)}function o(){if(L().hasCompletedProjectOnboarding)return;if(a())N((v)=>({...v,hasCompletedProjectOnboarding:!0}))}function rv(){N((v)=>({...v,projectOnboardingSeenCount:v.projectOnboardingSeenCount+1}))}var sv;var l=b(()=>{k();wv();Bv();Zv();sv=Rv(()=>{let v=L();if(v.hasCompletedProjectOnboarding||v.projectOnboardingSeenCount>=4||process.env.IS_DEMO)return!1;return!a()})});import{stat as h}from"fs/promises";import{homedir as zv}from"os";import{join as Vv}from"path";function _v(v){U((G)=>({...G,appleTerminalSetupInProgress:!0,appleTerminalBackupPath:v}))}function I(){U((v)=>({...v,appleTerminalSetupInProgress:!1}))}function Iv(){let v=S();return{inProgress:v.appleTerminalSetupInProgress??!1,backupPath:v.appleTerminalBackupPath||null}}function x(){return Vv(zv(),"Library","Preferences","com.apple.Terminal.plist")}async function i(){let v=x(),G=`${v}.bak`;try{let{code:$}=await B("defaults",["export","com.apple.Terminal",v]);if($!==0)return null;try{await h(v)}catch{return null}return await B("defaults",["export","com.apple.Terminal",G]),_v(G),G}catch($){return W($),null}}async function t(){let{inProgress:v,backupPath:G}=Iv();if(!v)return{status:"no_backup"};if(!G)return I(),{status:"no_backup"};try{await h(G)}catch{return I(),{status:"no_backup"}}try{let{code:$}=await B("defaults",["import","com.apple.Terminal",G]);if($!==0)return{status:"failed",backupPath:G};return await B("killall",["cfprefsd"]),I(),{status:"restored"}}catch($){return W(Error(`Failed to restore Terminal.app settings with: ${$}`)),I(),{status:"failed",backupPath:G}}}var e=b(()=>{k();C();p()});import $G from"chalk";import{homedir as xv}from"os";import{dirname as JG,join as V}from"path";function Av(){let v=process.env.SHELL||"",G=xv(),$=V(G,".claude");if(v.endsWith("/zsh")||v.endsWith("/zsh.exe")){let J=V($,"completion.zsh");return{name:"zsh",rcFile:V(G,".zshrc"),cacheFile:J,completionLine:`[[ -f "${J}" ]] && source "${J}"`,shellFlag:"zsh"}}if(v.endsWith("/bash")||v.endsWith("/bash.exe")){let J=V($,"completion.bash");return{name:"bash",rcFile:V(G,".bashrc"),cacheFile:J,completionLine:`[ -f "${J}" ] && source "${J}"`,shellFlag:"bash"}}if(v.endsWith("/fish")||v.endsWith("/fish.exe")){let J=process.env.XDG_CONFIG_HOME||V(G,".config"),q=V($,"completion.fish");return{name:"fish",rcFile:V(J,"fish","config.fish"),cacheFile:q,completionLine:`[ -f "${q}" ] && source "${q}"`,shellFlag:"fish"}}return null}async function BG(){let v=Av();if(!v)return;y(`update: Regenerating ${v.name} completion cache`);let G=process.argv[1]||"claude";if((await B(G,["completion",v.shellFlag,"--output",v.cacheFile])).code!==0){y(`update: Failed to regenerate ${v.name} completion cache`);return}y(`update: Regenerated ${v.name} completion cache at ${v.cacheFile}`)}var $v=b(()=>{Sv();Gv();Uv();vv();C();p()});import Z from"chalk";import{randomBytes as f}from"crypto";import{copyFile as c,mkdir as g,readFile as d,writeFile as m}from"fs/promises";import{homedir as s,platform as D}from"os";import{dirname as Ov,join as z}from"path";import{pathToFileURL as jv}from"url";function uv(){let v=process.env.VSCODE_GIT_ASKPASS_MAIN??"",G=process.env.PATH??"";return v.includes(".vscode-server")||v.includes(".cursor-server")||v.includes(".windsurf-server")||G.includes(".vscode-server")||G.includes(".cursor-server")||G.includes(".windsurf-server")}function kG(){if(!Y.terminal||!(Y.terminal in O))return null;return O[Y.terminal]??null}function R(v){if(!E())return v;return`\x1B]8;;${jv(v).href}\x07${v}\x1B]8;;\x07`}function Lv(){return D()==="darwin"&&Y.terminal==="Apple_Terminal"||Y.terminal==="vscode"||Y.terminal==="cursor"||Y.terminal==="windsurf"||Y.terminal==="alacritty"||Y.terminal==="zed"}async function Nv(v){let G="";switch(Y.terminal){case"Apple_Terminal":G=await kv(v);break;case"vscode":G=await P("VSCode",v);break;case"cursor":G=await P("Cursor",v);break;case"windsurf":G=await P("Windsurf",v);break;case"alacritty":G=await pv(v);break;case"zed":G=await Cv(v);break;case null:break}return U(($)=>{if(["vscode","cursor","windsurf","alacritty","zed"].includes(Y.terminal??"")){if($.shiftEnterKeyBindingInstalled===!0)return $;return{...$,shiftEnterKeyBindingInstalled:!0}}else if(Y.terminal==="Apple_Terminal"){if($.optionAsMetaKeyInstalled===!0)return $;return{...$,optionAsMetaKeyInstalled:!0}}return $}),o(),G}function pG(){return S().shiftEnterKeyBindingInstalled===!0}function CG(){return S().hasUsedBackslashReturn===!0}function EG(){if(!S().hasUsedBackslashReturn)U((G)=>({...G,hasUsedBackslashReturn:!0}))}async function PG(v,G,$){if(Y.terminal&&Y.terminal in O){let q=`Shift+Enter is natively supported in ${O[Y.terminal]}.
3
3
 
4
4
  No configuration needed. Just use Shift+Enter to add newlines.`;return v(q),null}if(!Lv()){let q=Y.terminal||"your current terminal",K=Qv(),X="";if(K==="macos")X=` \u2022 macOS: Apple Terminal
5
5
  `;else if(K==="windows")X=` \u2022 Windows: Windows Terminal
@@ -1,5 +1,5 @@
1
1
  // @bun
2
- import{$4 as V,a5 as S}from"./cli-fakdskp6.js";import{C7 as y,D7 as I}from"./cli-mzcsnm06.js";import{E8 as z,J8 as _}from"./cli-4ewb3q42.js";import{d_ as T,h_ as m}from"./cli-hke6r0q8.js";import{fda as v,hda as x,ida as M}from"./cli-w1d8n9g3.js";function H(U){return U.startsWith("\uFEFF")?U.slice(1):U}var X=()=>{};import{open as J,readFile as R,stat as c}from"fs/promises";import{applyEdits as L,modify as b,parse as w}from"jsonc-parser/lib/esm/main.js";function A(U,W){try{return{ok:!0,value:JSON.parse(H(U))}}catch(q){if(W)z(q);return{ok:!1}}}function $F(U){if(!U)return null;try{return w(H(U))}catch(W){return z(W),null}}function E(U){let W=C,q=U.length,k=W(U);if(!k.error||k.done||k.read>=q)return k.values;let{values:G,read:Q}=k;while(Q<q){let $=typeof U==="string"?U.indexOf(`
2
+ import{$4 as V,a5 as S}from"./cli-t5ddsvmv.js";import{E7 as y,F7 as I}from"./cli-yfb8bk69.js";import{G8 as z,L8 as _}from"./cli-8kpqq0ea.js";import{f_ as T,j_ as m}from"./cli-awb77t95.js";import{hda as v,jda as x,kda as M}from"./cli-qwx84m9c.js";function H(U){return U.startsWith("\uFEFF")?U.slice(1):U}var X=()=>{};import{open as J,readFile as R,stat as c}from"fs/promises";import{applyEdits as L,modify as b,parse as w}from"jsonc-parser/lib/esm/main.js";function A(U,W){try{return{ok:!0,value:JSON.parse(H(U))}}catch(q){if(W)z(q);return{ok:!1}}}function $F(U){if(!U)return null;try{return w(H(U))}catch(W){return z(W),null}}function E(U){let W=C,q=U.length,k=W(U);if(!k.error||k.done||k.read>=q)return k.values;let{values:G,read:Q}=k;while(Q<q){let $=typeof U==="string"?U.indexOf(`
3
3
  `,Q):U.indexOf(10,Q);if($===-1)break;Q=$+1;let Z=W(U,Q);if(Z.values.length>0)G=G.concat(Z.values);if(!Z.error||Z.done||Z.read>=q)break;Q=Z.read}return G}function i(U){let W=U.length,q=0;if(U[0]===239&&U[1]===187&&U[2]===191)q=3;let k=[];while(q<W){let G=U.indexOf(10,q);if(G===-1)G=W;let Q=U.toString("utf8",q,G).trim();if(q=G+1,!Q)continue;try{k.push(JSON.parse(Q))}catch{}}return k}function p(U){let W=H(U),q=W.length,k=0,G=[];while(k<q){let Q=W.indexOf(`
4
4
  `,k);if(Q===-1)Q=q;let $=W.substring(k,Q).trim();if(k=Q+1,!$)continue;try{G.push(JSON.parse($))}catch{}}return G}function D(U){if(C)return E(U);if(typeof U==="string")return p(U);return i(U)}async function HF(U){let Z=[];try{let{size:W}=await c(U);if(W<=K)return D(await R(U));const q=x(Z,await J(U,"r"),1);let k=Buffer.allocUnsafe(K);let G=0;let Q=W-K;while(G<K){let{bytesRead:P}=await q.read(k,G,K-G,Q+G);if(P===0)break;G+=P}let $=k.indexOf(10);if($!==-1&&$<G-1)return D(k.subarray($+1,G));return D(k.subarray(0,G))}catch(B){var h=B,g=1}finally{var N=M(Z,h,g);N&&await N}}function KF(U,W){try{if(!U||U.trim()==="")return T([W],null,4);let q=H(U),k=w(q);if(Array.isArray(k)){let G=k.length,Z=b(q,G===0?[0]:[G],W,{formattingOptions:{insertSpaces:!0,tabSize:4},isArrayInsertion:!0});if(!Z||Z.length===0){let B=[...k,W];return T(B,null,4)}return L(q,Z)}else return T([W],null,4)}catch(q){return z(q),T([W],null,4)}}var j=8192,Y,ZF,C,K=104857600;var u=v(()=>{X();_();I();m();Y=y(A,(U)=>U,50),ZF=Object.assign(function(W,q=!0){if(!W)return null;let k=W.length>j?A(W,q):Y(W,q);return k.ok?k.value:null},{cache:Y.cache});C=(()=>{if(typeof Bun>"u")return!1;let W=Bun.JSONL;if(!W?.parseChunk)return!1;return W.parseChunk})()});import{z as F}from"zod/v4";var DF,PF,f,l,O,d,o,s,r,t,n,a,e,XF;var FF=v(()=>{S();DF=V(()=>F.enum(["local","user","project","dynamic","enterprise","claudeai","managed"])),PF=V(()=>F.enum(["stdio","sse","sse-ide","http","ws","sdk"])),f=V(()=>F.object({type:F.literal("stdio").optional(),command:F.string().min(1,"Command cannot be empty"),args:F.array(F.string()).default([]),env:F.record(F.string(),F.string()).optional()})),l=V(()=>F.boolean()),O=V(()=>F.object({clientId:F.string().optional(),callbackPort:F.number().int().positive().optional(),authServerMetadataUrl:F.string().url().startsWith("https://",{message:"authServerMetadataUrl must use https://"}).optional(),xaa:l().optional()})),d=V(()=>F.object({type:F.literal("sse"),url:F.string(),headers:F.record(F.string(),F.string()).optional(),headersHelper:F.string().optional(),oauth:O().optional()})),o=V(()=>F.object({type:F.literal("sse-ide"),url:F.string(),ideName:F.string(),ideRunningInWindows:F.boolean().optional()})),s=V(()=>F.object({type:F.literal("ws-ide"),url:F.string(),ideName:F.string(),authToken:F.string().optional(),ideRunningInWindows:F.boolean().optional()})),r=V(()=>F.object({type:F.literal("http"),url:F.string(),headers:F.record(F.string(),F.string()).optional(),headersHelper:F.string().optional(),oauth:O().optional()})),t=V(()=>F.object({type:F.literal("ws"),url:F.string(),headers:F.record(F.string(),F.string()).optional(),headersHelper:F.string().optional()})),n=V(()=>F.object({type:F.literal("sdk"),name:F.string()})),a=V(()=>F.object({type:F.literal("claudeai-proxy"),url:F.string(),id:F.string()})),e=V(()=>F.union([f(),d(),o(),s(),r(),t(),n(),a()])),XF=V(()=>F.object({mcpServers:F.record(F.string(),e())}))});
5
5
  export{H as R3,X as S3,ZF as T3,$F as U3,D as V3,HF as W3,KF as X3,u as Y3,DF as Z3,f as _3,e as $3,XF as a4,FF as b4};
@@ -1,3 +1,3 @@
1
1
  // @bun
2
- import{F1 as I,GX as j,JX as h,b1 as f}from"./cli-msmzt4c3.js";import{$4 as y,a5 as E}from"./cli-fakdskp6.js";import{D5 as b,E5 as T}from"./cli-pgg33dhw.js";import{M6 as _,N6 as R}from"./cli-n5s5fnyj.js";import{E8 as F,J8 as D}from"./cli-4ewb3q42.js";import{B9 as Y,C9 as m}from"./cli-kq16afrr.js";import{W9 as k,X9 as X,b_ as O,d_ as M,h_ as U,v_ as W,y_ as z}from"./cli-hke6r0q8.js";import{fda as A}from"./cli-w1d8n9g3.js";import q from"axios";import{randomUUID as c}from"crypto";import N from"zod/v4";function d(J){if(!q.isAxiosError(J))return!1;if(!J.response)return!0;if(J.response.status>=500)return!0;return!1}async function l(J,$){let B;for(let K=0;K<=x;K++)try{return await q.get(J,$)}catch(Q){if(B=Q,!d(Q))throw Q;if(K>=x)throw W(`Teleport request failed after ${K+1} attempts: ${X(Q)}`),Q;let V=S[K]??2000;W(`Teleport request failed (attempt ${K+1}/${x+1}), retrying in ${V}ms: ${X(Q)}`),await b(V)}throw B}async function C(){let J=f()?.accessToken;if(J===void 0)throw Error("Claude Code web sessions require authentication with a Claude.ai account. API key authentication is not sufficient. Please run /login to authenticate, or check your authentication status with /status.");let $=await j();if(!$)throw Error("Unable to get organization UUID");return{accessToken:J,orgUUID:$}}async function $J(){let{accessToken:J,orgUUID:$}=await C(),B=`${Y().BASE_API_URL}/v1/sessions`;try{let K={...L(J),"anthropic-beta":"ccr-byoc-2025-07-29","x-organization-uuid":$},Q=await l(B,{headers:K});if(Q.status!==200)throw Error(`Failed to fetch code sessions: ${Q.statusText}`);return Q.data.data.map((Z)=>{let v=Z.session_context.sources.find((G)=>G.type==="git_repository"),H=null;if(v?.url){let G=_(v.url);if(G){let[w,P]=G.split("/");if(w&&P)H={name:P,owner:{login:w},default_branch:v.revision||void 0}}}return{id:Z.id,title:Z.title||"Untitled",description:"",status:Z.session_status,repo:H,turns:[],created_at:Z.created_at,updated_at:Z.updated_at}})}catch(K){let Q=k(K);throw F(Q),K}}function L(J){return{Authorization:`Bearer ${J}`,"Content-Type":"application/json","anthropic-version":"2023-06-01"}}async function BJ(J){let{accessToken:$,orgUUID:B}=await C(),K=`${Y().BASE_API_URL}/v1/sessions/${J}`,Q={...L($),"anthropic-beta":"ccr-byoc-2025-07-29","x-organization-uuid":B},V=await q.get(K,{headers:Q,timeout:15000,validateStatus:(Z)=>Z<500});if(V.status!==200){let v=V.data?.error?.message;if(V.status===404)throw Error(`Session not found: ${J}`);if(V.status===401)throw Error("Session expired. Please run /login to sign in again.");throw Error(v||`Failed to fetch session: ${V.status} ${V.statusText}`)}return V.data}function NJ(J){return J.session_context.outcomes?.find((B)=>B.type==="git_repository")?.git_info?.branches[0]}async function WJ(J,$,B){try{let{accessToken:K,orgUUID:Q}=await C(),V=`${Y().BASE_API_URL}/v1/sessions/${J}/events`,Z={...L(K),"anthropic-beta":"ccr-byoc-2025-07-29","x-organization-uuid":Q},H={events:[{uuid:B?.uuid??c(),session_id:J,type:"user",parent_tool_use_id:null,message:{role:"user",content:$}}]};W(`[sendEventToRemoteSession] Sending event to session ${J}`);let G=await q.post(V,H,{headers:Z,validateStatus:(w)=>w<500,timeout:30000});if(G.status===200||G.status===201)return W(`[sendEventToRemoteSession] Successfully sent event to session ${J}`),!0;return W(`[sendEventToRemoteSession] Failed with status ${G.status}: ${M(G.data)}`),!1}catch(K){return W(`[sendEventToRemoteSession] Error: ${X(K)}`),!1}}async function GJ(J,$){try{let{accessToken:B,orgUUID:K}=await C(),Q=`${Y().BASE_API_URL}/v1/sessions/${J}`,V={...L(B),"anthropic-beta":"ccr-byoc-2025-07-29","x-organization-uuid":K};W(`[updateSessionTitle] Updating title for session ${J}: "${$}"`);let Z=await q.patch(Q,{title:$},{headers:V,validateStatus:(v)=>v<500});if(Z.status===200)return W(`[updateSessionTitle] Successfully updated title for session ${J}`),!0;return W(`[updateSessionTitle] Failed with status ${Z.status}: ${M(Z.data)}`),!1}catch(B){return W(`[updateSessionTitle] Error: ${X(B)}`),!1}}var S,x,VJ="ccr-byoc-2025-07-29",ZJ;var p=A(()=>{m();h();I();z();R();O();E();D();T();U();S=[2000,4000,8000,16000],x=S.length;ZJ=y(()=>N.object({id:N.string(),title:N.string(),description:N.string(),status:N.enum(["idle","working","waiting","completed","archived","cancelled","rejected"]),repo:N.object({name:N.string(),owner:N.object({login:N.string()}),default_branch:N.string().optional()}).nullable(),turns:N.array(N.string()),created_at:N.string(),updated_at:N.string()}))});
2
+ import{F1 as I,GX as j,JX as h,b1 as f}from"./cli-192xnkcx.js";import{$4 as y,a5 as E}from"./cli-t5ddsvmv.js";import{D5 as b,E5 as T}from"./cli-hpxspent.js";import{O6 as _,P6 as R}from"./cli-fdjfk8yq.js";import{G8 as F,L8 as D}from"./cli-8kpqq0ea.js";import{D9 as Y,E9 as m}from"./cli-zxe1a0ey.js";import{A_ as z,Y9 as k,Z9 as X,d_ as O,f_ as M,j_ as U,x_ as W}from"./cli-awb77t95.js";import{hda as A}from"./cli-qwx84m9c.js";import q from"axios";import{randomUUID as c}from"crypto";import N from"zod/v4";function d(J){if(!q.isAxiosError(J))return!1;if(!J.response)return!0;if(J.response.status>=500)return!0;return!1}async function l(J,$){let B;for(let K=0;K<=x;K++)try{return await q.get(J,$)}catch(Q){if(B=Q,!d(Q))throw Q;if(K>=x)throw W(`Teleport request failed after ${K+1} attempts: ${X(Q)}`),Q;let V=S[K]??2000;W(`Teleport request failed (attempt ${K+1}/${x+1}), retrying in ${V}ms: ${X(Q)}`),await b(V)}throw B}async function C(){let J=f()?.accessToken;if(J===void 0)throw Error("Claude Code web sessions require authentication with a Claude.ai account. API key authentication is not sufficient. Please run /login to authenticate, or check your authentication status with /status.");let $=await j();if(!$)throw Error("Unable to get organization UUID");return{accessToken:J,orgUUID:$}}async function $J(){let{accessToken:J,orgUUID:$}=await C(),B=`${Y().BASE_API_URL}/v1/sessions`;try{let K={...L(J),"anthropic-beta":"ccr-byoc-2025-07-29","x-organization-uuid":$},Q=await l(B,{headers:K});if(Q.status!==200)throw Error(`Failed to fetch code sessions: ${Q.statusText}`);return Q.data.data.map((Z)=>{let v=Z.session_context.sources.find((G)=>G.type==="git_repository"),H=null;if(v?.url){let G=_(v.url);if(G){let[w,P]=G.split("/");if(w&&P)H={name:P,owner:{login:w},default_branch:v.revision||void 0}}}return{id:Z.id,title:Z.title||"Untitled",description:"",status:Z.session_status,repo:H,turns:[],created_at:Z.created_at,updated_at:Z.updated_at}})}catch(K){let Q=k(K);throw F(Q),K}}function L(J){return{Authorization:`Bearer ${J}`,"Content-Type":"application/json","anthropic-version":"2023-06-01"}}async function BJ(J){let{accessToken:$,orgUUID:B}=await C(),K=`${Y().BASE_API_URL}/v1/sessions/${J}`,Q={...L($),"anthropic-beta":"ccr-byoc-2025-07-29","x-organization-uuid":B},V=await q.get(K,{headers:Q,timeout:15000,validateStatus:(Z)=>Z<500});if(V.status!==200){let v=V.data?.error?.message;if(V.status===404)throw Error(`Session not found: ${J}`);if(V.status===401)throw Error("Session expired. Please run /login to sign in again.");throw Error(v||`Failed to fetch session: ${V.status} ${V.statusText}`)}return V.data}function NJ(J){return J.session_context.outcomes?.find((B)=>B.type==="git_repository")?.git_info?.branches[0]}async function WJ(J,$,B){try{let{accessToken:K,orgUUID:Q}=await C(),V=`${Y().BASE_API_URL}/v1/sessions/${J}/events`,Z={...L(K),"anthropic-beta":"ccr-byoc-2025-07-29","x-organization-uuid":Q},H={events:[{uuid:B?.uuid??c(),session_id:J,type:"user",parent_tool_use_id:null,message:{role:"user",content:$}}]};W(`[sendEventToRemoteSession] Sending event to session ${J}`);let G=await q.post(V,H,{headers:Z,validateStatus:(w)=>w<500,timeout:30000});if(G.status===200||G.status===201)return W(`[sendEventToRemoteSession] Successfully sent event to session ${J}`),!0;return W(`[sendEventToRemoteSession] Failed with status ${G.status}: ${M(G.data)}`),!1}catch(K){return W(`[sendEventToRemoteSession] Error: ${X(K)}`),!1}}async function GJ(J,$){try{let{accessToken:B,orgUUID:K}=await C(),Q=`${Y().BASE_API_URL}/v1/sessions/${J}`,V={...L(B),"anthropic-beta":"ccr-byoc-2025-07-29","x-organization-uuid":K};W(`[updateSessionTitle] Updating title for session ${J}: "${$}"`);let Z=await q.patch(Q,{title:$},{headers:V,validateStatus:(v)=>v<500});if(Z.status===200)return W(`[updateSessionTitle] Successfully updated title for session ${J}`),!0;return W(`[updateSessionTitle] Failed with status ${Z.status}: ${M(Z.data)}`),!1}catch(B){return W(`[updateSessionTitle] Error: ${X(B)}`),!1}}var S,x,VJ="ccr-byoc-2025-07-29",ZJ;var p=A(()=>{m();h();I();z();R();O();E();D();T();U();S=[2000,4000,8000,16000],x=S.length;ZJ=y(()=>N.object({id:N.string(),title:N.string(),description:N.string(),status:N.enum(["idle","working","waiting","completed","archived","cancelled","rejected"]),repo:N.object({name:N.string(),owner:N.object({login:N.string()}),default_branch:N.string().optional()}).nullable(),turns:N.array(N.string()),created_at:N.string(),updated_at:N.string()}))});
3
3
  export{VJ as eS,d as fS,l as gS,ZJ as hS,C as iS,$J as jS,L as kS,BJ as lS,NJ as mS,WJ as nS,GJ as oS,p as pS};
@@ -1,3 +1,3 @@
1
1
  // @bun
2
- import{mg as Y,og as O,pg as R,qg as b}from"./cli-fm14mg07.js";import{FQ as Q,fR as W}from"./cli-x8xgga1a.js";import{Q3 as D,u3 as F,x3 as L}from"./cli-msmzt4c3.js";import{d6 as X,p6 as p}from"./cli-51720d82.js";import{Y8 as w,Z8 as j}from"./cli-t9jht3kb.js";import{fda as S}from"./cli-w1d8n9g3.js";import{c as G}from"react/compiler-runtime";import{useState as c}from"react";import{jsxDEV as K,Fragment as l}from"react/jsx-dev-runtime";function v(){let k=Y();if(!k||!k.available||k.granted)return!1;return R(k)!==null}function T(){if(!v())return!1;let k=L();if(k.hasVisitedExtraUsage)return!1;if((k.overageCreditUpsellSeenCount??0)>=$)return!1;return!0}function f(){if(Y()!==null)return;O()}function r(){let[k]=c(C);return k}function C(){return f(),T()}function n(){let k=0;F((q)=>{return k=(q.overageCreditUpsellSeenCount??0)+1,{...q,overageCreditUpsellSeenCount:k}}),w("tengu_overage_credit_upsell_shown",{seen_count:k})}function E(k){return`${k} in extra usage for third-party apps \xB7 /extra-usage`}function B(k){return`${k} in extra usage`}function i(k){let q=G(8),{maxWidth:z,twoLine:y}=k,Z,H;if(q[0]!==z||q[1]!==y){H=Symbol.for("react.early_return_sentinel");k:{let I=Y();if(!I){H=null;break k}let N=R(I);if(!N){H=null;break k}if(y){let _=B(N),J;if(q[4]!==z)J=z?X(M,z):M,q[4]=z,q[5]=J;else J=q[5];let P;if(q[6]!==J)P=K(Q,{dimColor:!0,children:J},void 0,!1,void 0,this),q[6]=J,q[7]=P;else P=q[7];H=K(l,{children:[K(Q,{color:"claude",children:z?X(_,z):_},void 0,!1,void 0,this),P]},void 0,!0,void 0,this);break k}let U=E(N),A=z?X(U,z):U,V=Math.min(B(N).length,A.length);Z=K(Q,{dimColor:!0,children:[K(Q,{color:"claude",children:A.slice(0,V)},void 0,!1,void 0,this),A.slice(V)]},void 0,!0,void 0,this)}q[0]=z,q[1]=y,q[2]=Z,q[3]=H}else Z=q[2],H=q[3];if(H!==Symbol.for("react.early_return_sentinel"))return H;return Z}function a(){let k=Y(),q=k?R(k):null,z=q?B(q):"extra usage credit";return{title:z,lines:[],customContent:{content:K(Q,{dimColor:!0,children:M},void 0,!1,void 0,this),width:Math.max(z.length,M.length)}}}var $=3,M="On us. Works on third-party apps \xB7 /extra-usage";var u=S(()=>{W();j();b();D();p()});
2
+ import{mg as Y,og as O,pg as R,qg as b}from"./cli-df5r5xrp.js";import{FQ as Q,fR as W}from"./cli-a2d962bq.js";import{Q3 as D,u3 as F,x3 as L}from"./cli-192xnkcx.js";import{f6 as X,r6 as p}from"./cli-bdgrtpsy.js";import{$8 as j,_8 as w}from"./cli-e5yek4vx.js";import{hda as S}from"./cli-qwx84m9c.js";import{c as G}from"react/compiler-runtime";import{useState as c}from"react";import{jsxDEV as K,Fragment as l}from"react/jsx-dev-runtime";function v(){let k=Y();if(!k||!k.available||k.granted)return!1;return R(k)!==null}function T(){if(!v())return!1;let k=L();if(k.hasVisitedExtraUsage)return!1;if((k.overageCreditUpsellSeenCount??0)>=$)return!1;return!0}function f(){if(Y()!==null)return;O()}function r(){let[k]=c(C);return k}function C(){return f(),T()}function n(){let k=0;F((q)=>{return k=(q.overageCreditUpsellSeenCount??0)+1,{...q,overageCreditUpsellSeenCount:k}}),w("tengu_overage_credit_upsell_shown",{seen_count:k})}function E(k){return`${k} in extra usage for third-party apps \xB7 /extra-usage`}function B(k){return`${k} in extra usage`}function i(k){let q=G(8),{maxWidth:z,twoLine:y}=k,Z,H;if(q[0]!==z||q[1]!==y){H=Symbol.for("react.early_return_sentinel");k:{let I=Y();if(!I){H=null;break k}let N=R(I);if(!N){H=null;break k}if(y){let _=B(N),J;if(q[4]!==z)J=z?X(M,z):M,q[4]=z,q[5]=J;else J=q[5];let P;if(q[6]!==J)P=K(Q,{dimColor:!0,children:J},void 0,!1,void 0,this),q[6]=J,q[7]=P;else P=q[7];H=K(l,{children:[K(Q,{color:"claude",children:z?X(_,z):_},void 0,!1,void 0,this),P]},void 0,!0,void 0,this);break k}let U=E(N),A=z?X(U,z):U,V=Math.min(B(N).length,A.length);Z=K(Q,{dimColor:!0,children:[K(Q,{color:"claude",children:A.slice(0,V)},void 0,!1,void 0,this),A.slice(V)]},void 0,!0,void 0,this)}q[0]=z,q[1]=y,q[2]=Z,q[3]=H}else Z=q[2],H=q[3];if(H!==Symbol.for("react.early_return_sentinel"))return H;return Z}function a(){let k=Y(),q=k?R(k):null,z=q?B(q):"extra usage credit";return{title:z,lines:[],customContent:{content:K(Q,{dimColor:!0,children:M},void 0,!1,void 0,this),width:Math.max(z.length,M.length)}}}var $=3,M="On us. Works on third-party apps \xB7 /extra-usage";var u=S(()=>{W();j();b();D();p()});
3
3
  export{v as Xe,T as Ye,r as Ze,n as _e,i as $e,a as af,u as bf};
@@ -1,3 +1,3 @@
1
1
  // @bun
2
- import{fda as o}from"./cli-w1d8n9g3.js";function s(r){return{async connect(e){}}}var t;var n=o(()=>{t=[]});
2
+ import{hda as o}from"./cli-qwx84m9c.js";function s(r){return{async connect(e){}}}var t;var n=o(()=>{t=[]});
3
3
  export{t as vg,s as wg,n as xg};
@@ -0,0 +1,3 @@
1
+ // @bun
2
+ import{F5 as L,H5 as _,I5 as M,J5 as R,L5 as S,M5 as C,N5 as m,O5 as w,P5 as h,Q5 as T,R5 as y,S5 as G,T5 as D,U5 as p,V5 as Y,W5 as z,X5 as f,Y5 as I,Z5 as A,_5 as g}from"./cli-t4see9hh.js";import{hda as v,ida as b}from"./cli-qwx84m9c.js";function U(J){return J-Date.now()<=k}function t(){return!!z()?.refreshToken}class K{async startDeviceFlow(J={}){let N=M(J.studioUrl),P=await C(N),Q=u(N,P);if(await J.onPrompt?.({userCode:P.user_code,verificationUriComplete:Q,studioUrl:N}),J.openBrowser)try{await J.openBrowser(Q)}catch{}return await a(N,P,J.pollSignal,J.gatewayUrl)}async ensureFreshTokens(){I();let J=await f();if(!J)return null;if(!U(J.expiresAt))return J;let N=await w(J.studioUrl,J.refreshToken),P={...J,accessToken:N.access_token,refreshToken:N.refresh_token,expiresAt:Date.now()+N.expires_in*1000},Q=Y(P);if(!Q.success)throw Error(Q.warning??"Failed to persist refreshed UnieAI tokens");return P}async ensureFreshAccessToken(){return(await this.ensureFreshTokens())?.accessToken??null}async getOrgs(){let J=await this.ensureFreshTokens();if(!J)throw Error("Not logged in to UnieAI Studio.");return G(J.studioUrl,J.accessToken)}async getConfig(J){let N=await this.ensureFreshTokens();if(!N)throw Error("Not logged in to UnieAI Studio.");let P=J??N.activeOrgId;if(!P)throw Error('No active organization. Run "claude auth orgs --unieai" to pick one.');return D(N.studioUrl,N.accessToken,P)}async setActiveOrg(J){let N=await this.ensureFreshTokens();if(!N)throw Error("Not logged in to UnieAI Studio.");let P={...N,activeOrgId:J},Q=Y(P);if(!Q.success)throw Error(Q.warning??"Failed to update active organization");return P}async logout(){let J=z();if(J?.accessToken){let N=J.gatewayKeyId;if(!N&&J.activeOrgId)try{N=(await D(J.studioUrl,J.accessToken,J.activeOrgId))?.provider?.unieai?.options?.apiKeyId}catch{}if(N)await h(J.studioUrl,J.accessToken,N)}if(J?.refreshToken)try{await T(J.studioUrl,J.refreshToken)}catch{}return A()}}function u(J,N){let P=N.verification_uri_complete;if(/^https?:\/\//i.test(P))return P;let Q=P.startsWith("/")?P:`/${P}`;return`${J}${Q}`}async function a(J,N,P,Q){let X=Math.max(N.interval,1)*1000,j=Date.now()+N.expires_in*1000;while(Date.now()<j){if(P?.aborted)return{kind:"error",message:"Login cancelled."};await d(X,P);let $=await m(J,N.device_code);switch($.kind){case"success":return{kind:"success",tokens:await l(J,$.tokens,Q)};case"pending":continue;case"slow_down":X+=5000;continue;case"expired":return{kind:"expired"};case"denied":return{kind:"denied"};case"error":return{kind:"error",message:$.description?`${$.error}: ${$.description}`:$.error}}}return{kind:"expired"}}async function l(J,N,P){let Q,X=[];try{Q=await y(J,N.access_token)}catch{}try{X=await G(J,N.access_token)}catch{}let j=P?.trim(),$={accessToken:N.access_token,refreshToken:N.refresh_token,expiresAt:Date.now()+N.expires_in*1000,studioUrl:J,accountId:Q?.id,email:Q?.email,activeOrgId:X[0]?.id,...j?{gatewayBaseURL:R(j),gatewayBaseURLLocked:!0}:{}},H=Y($);if(!H.success)throw Error(H.warning??"Failed to persist UnieAI Studio tokens");return $}async function d(J,N){return new Promise((P)=>{if(N?.aborted){P();return}let Q=setTimeout(()=>{N?.removeEventListener("abort",X),P()},J),X=()=>{clearTimeout(Q),N?.removeEventListener("abort",X),P()};N?.addEventListener("abort",X,{once:!0})})}async function o(){let J=new K;try{return await J.ensureFreshTokens()}catch{return null}}async function s(){try{let{saveGlobalConfig:J}=await import("./config-txzzncm9.js"),Q=(await new K().getConfig())?.provider?.unieai,X=Q?.models??{},j=z()?.studioUrl,H=!j||_(j)===L?"UnieAI Studio":`UnieAI Studio (${j})`,F=[],V=[];for(let[Z,q]of Object.entries(X)){let B=(q&&typeof q==="object"&&"name"in q&&typeof q.name==="string"?q.name:"")||Z;V.push(Z),F.push({value:Z,label:B,description:`${H} \xB7 ${Z}`})}if(J((Z)=>({...Z,unieaiModelOptionsCache:F})),V.length>0)try{let Z=await import("./settings-hp0ksjn9.js"),q=Z.getSettingsForSource("userSettings")??{},B=q.model;if(!B||!V.includes(B))Z.updateSettingsForSource("userSettings",{...q,model:V[0]})}catch{}let x=Q?.options,O=x?.apiKey??Q?.apiKey,E=x?.apiKeyId??Q?.apiKeyId,c=x?.baseURL??Q?.baseURL,W=z();if(W&&O){let Z=S({studioUrl:W.studioUrl,userGatewayUrl:W.gatewayBaseURLLocked?W.gatewayBaseURL:void 0,configBaseURL:c});Y({...W,gatewayApiKey:O,gatewayBaseURL:Z,...E?{gatewayKeyId:E}:{},availableModelIds:V})}return F.length}catch{return 0}}var k=300000;var r=v(()=>{p();g()});
3
+ export{U as JR,t as KR,K as LR,o as MR,s as NR,r as OR};
@@ -1,5 +1,5 @@
1
1
  // @bun
2
- import{Cc as xK,Dc as lK,Ec as gK,Fc as h_,Gc as D6,Ic as IK,Jc as k_,Kc as oK,Lc as sK,Mc as uK}from"./cli-8mk2zg4a.js";import{$d as x7,_d as cK}from"./cli-zjfya500.js";import{ke as I_,le as s_,me as kP}from"./cli-r3etpht1.js";import{$e as HK,Ze as r_,_e as v_,af as tK,bf as TK}from"./cli-kqv5b8zh.js";import{Rf as T8,Sf as Jf}from"./cli-k2nh5cby.js";import{Wf as o8,Xf as Af}from"./cli-15sqp3mq.js";import{ig as O_,jg as YK}from"./cli-a52ra30v.js";import{AE as zf,AF as h6,Bq as gP,DA as a8,DF as hK,Dg as Q_,Eg as tP,Ei as pK,FE as w6,HA as Ef,Hq as Pf,Iq as IP,Mo as J$,Nj as o$,No as rP,Oj as D$,RE as pf,Rj as l_,SE as Yf,Sz as L7,Uo as A$,Us as Z_,VE as I6,Vj as u$,Vs as SK,Wo as g_,Ws as W7,YD as E8,ZD as C8,ai as bK,bi as V7,ep as n$,hE as Of,ip as vP,kl as t7,mn as C$,nn as V$,oA as t_,oE as n_,on as _f,pA as x_,pE as wf,pn as Kf,pv as Cq,qA as c_,qE as rf,qv as w_,rA as j$,rE as q8,rv as f$,sA as jf,sn as t$,sv as P$,tE as vf,tn as c$,tq as $f,tv as _P,uA as O$,uE as kf,uq as lP,vq as ff,wE as w$,xE as r$,yE as v$,zE as Mf,zi as j_}from"./cli-me4e2p3e.js";import{QL as qf,RL as xP}from"./cli-xfsqvp8r.js";import{TN as vK,UN as Q6,VN as q_,WN as kK,ZN as Q8}from"./cli-g5wq5ptg.js";import{cO as EK,eO as CK,fO as VK,gO as c7}from"./cli-eyw3czmn.js";import{$O as g8,EO as q6,FO as t6,VO as H8,ZO as uf,_O as Y6}from"./cli-akcxtvv9.js";import{BQ as Y_,DQ as z,EQ as E$,FQ as r,GQ as SP,TQ as yK,fR as pq,hP as NK,iP as C7,qP as Bq,sQ as h8,tQ as of,uP as V6,vQ as Q$,wQ as cP}from"./cli-x8xgga1a.js";import{$2 as aK,A0 as S6,D0 as e6,EW as P6,F1 as wP,LU as e_,NW as __,Q3 as j6,WV as C6,X0 as H$,a3 as J7,cU as E7,cW as z8,g1 as T$,gZ as iK,hZ as P_,rZ as y_,u3 as Eq,vU as U$,wU as mK,x3 as Tq,xU as ZK}from"./cli-msmzt4c3.js";import{A5 as p8,B5 as Y8,C5 as Tf}from"./cli-k4v08k8t.js";import{D5 as b$,E5 as yP}from"./cli-pgg33dhw.js";import{Z5 as uq,_5 as n6,d6 as Uq,i6 as y6,l6 as B8,p6 as X6,z6 as b7}from"./cli-51720d82.js";import{L7 as a6,M7 as U8}from"./cli-rvad3yhg.js";import{Y7 as x6,b8 as l6,c8 as g6,o8 as bf}from"./cli-4ewb3q42.js";import{Y8 as rK,Z8 as k7}from"./cli-t9jht3kb.js";import{q9 as V8,s9 as xf}from"./cli-jj93qmmc.js";import{q_ as E_,s_ as C_,v_ as r6,w_ as V_,y_ as RK}from"./cli-hke6r0q8.js";import{I_ as m6,S_ as LK}from"./cli-tq5z9qv3.js";import{Bca as B$,bda as VP}from"./cli-3ac555qw.js";import{fda as _q}from"./cli-w1d8n9g3.js";import{c as u_}from"react/compiler-runtime";import{createContext as R6,useContext as N6,useEffect as K8,useState as _8}from"react";import{jsxDEV as L6}from"react/jsx-dev-runtime";function O8(_){let q=u_(6),{children:K}=_,[$,f]=_8(null),[P,j]=_8(null),w;if(q[0]!==K||q[1]!==P)w=L6(P8.Provider,{value:P,children:K},void 0,!1,void 0,this),q[0]=K,q[1]=P,q[2]=w;else w=q[2];let O;if(q[3]!==$||q[4]!==w)O=L6(f8.Provider,{value:f,children:L6(j8.Provider,{value:j,children:L6($8.Provider,{value:$,children:w},void 0,!1,void 0,this)},void 0,!1,void 0,this)},void 0,!1,void 0,this),q[3]=$,q[4]=w,q[5]=O;else O=q[5];return O}function w8(){return N6($8)}function r8(){return N6(P8)}function kj(_){let q=u_(4),K=N6(f8),$,f;if(q[0]!==_||q[1]!==K)$=()=>{if(!K)return;return K(_),()=>K(null)},f=[K,_],q[0]=_,q[1]=K,q[2]=$,q[3]=f;else $=q[2],f=q[3];K8($,f)}function Mj(_){let q=u_(4),K=N6(j8),$,f;if(q[0]!==_||q[1]!==K)$=()=>{if(!K)return;return K(_),()=>K(null)},f=[K,_],q[0]=_,q[1]=K,q[2]=$,q[3]=f;else $=q[2],f=q[3];K8($,f)}var $8,f8,P8,j8;var v8=_q(()=>{$8=R6(null),f8=R6(null),P8=R6(null),j8=R6(null)});function b6(_){return _.type==="attachment"&&Hf.has(_.attachment.type)}var hf,Hf;var J_=_q(()=>{hf=["hook_success","hook_additional_context","hook_cancelled","command_permissions","agent_mention","budget_usd","critical_system_reminder","edited_image_file","edited_text_file","opened_file_in_ide","output_style","plan_mode","plan_mode_exit","plan_mode_reentry","structured_output","team_context","todo_reminder","context_efficiency","deferred_tools_delta","mcp_instructions_delta","companion_intro","token_usage","ultrathink_effort","max_turns_reached","task_reminder","auto_mode","auto_mode_exit","output_token_usage","pen_mode_enter","pen_mode_exit","verify_plan_reminder","current_session_memory","compaction_reminder","date_change"],Hf=new Set(hf)});import{c as A6}from"react/compiler-runtime";import u8 from"figures";import{createContext as nf,useCallback as E6,useEffect as Xf,useLayoutEffect as af,useRef as k8,useState as c6,useSyncExternalStore as Wf}from"react";import{fileURLToPath as Df}from"url";import{jsxDEV as rq,Fragment as Nf}from"react/jsx-dev-runtime";function ij(_){let[q,K]=c6(null),$=k8(_);$.current=_;let f=k8(null),P=E6(()=>{K(null)},[]),j=E6((v)=>{let k=Math.max(0,v.getScrollHeight()-v.getViewportHeight());if(v.getScrollTop()+v.getPendingDelta()>=k)return;if(f.current===null)f.current=v.getScrollHeight(),K($.current)},[]),w=E6((v)=>{if(!v)return;v.scrollToBottom()},[]);Xf(()=>{if(q===null)f.current=null;else if(_<q)f.current=null,K(null)},[_,q]);let O=E6((v,k)=>{if(K((M)=>M===null?null:M+v),f.current!==null)f.current+=k},[]);return{dividerIndex:q,dividerYRef:f,onScrollAway:j,onRepin:P,jumpToNew:w,shiftDivider:O}}function mf(_,q){let K=0,$=!1;for(let f=q;f<_.length;f++){let P=_[f];if(P.type==="progress")continue;if(P.type==="assistant"&&!yf(P))continue;let j=P.type==="assistant";if(j&&!$)K++;$=j}return K}function yf(_){if(_.type!=="assistant")return!1;for(let q of _.message.content)if(q.type==="text"&&q.text.trim()!=="")return!0;return!1}function Gj(_,q){if(q===null)return;let K=q;while(K<_.length&&(_[K]?.type==="progress"||b6(_[K])))K++;let $=_[K]?.uuid;if(!$)return;let f=mf(_,q);return{firstUnseenUuid:$,count:Math.max(1,f)}}function dj(_){let q=A6(47),{scrollable:K,bottom:$,overlay:f,bottomFloat:P,modal:j,modalScrollRef:w,scrollRef:O,dividerYRef:v,hidePill:k,hideSticky:M,newMessageCount:p,onPillClick:u}=_,W=k===void 0?!1:k,C=M===void 0?!1:M,S=p===void 0?0:p,{rows:T,columns:m}=q6(),[e,o]=c6(null),J;if(q[0]===Symbol.for("react.memo_cache_sentinel"))J={setStickyPrompt:o},q[0]=J;else J=q[0];let d=J,U;if(q[1]!==O)U=(L)=>O?.current?.subscribe(L)??Zf,q[1]=O,q[2]=U;else U=q[2];let D=U,Z;if(q[3]!==v||q[4]!==O)Z=()=>{let L=O?.current,V=v?.current;if(!L||V==null)return!1;return L.getScrollTop()+L.getPendingDelta()+L.getViewportHeight()<V},q[3]=v,q[4]=O,q[5]=Z;else Z=q[5];let jq=Wf(D,Z),B;if(q[6]===Symbol.for("react.memo_cache_sentinel"))B=[],q[6]=B;else B=q[6];if(af(Sf,B),Bq()){let L=C?null:e,V=L!=null&&L!=="clicked"&&f==null?L:null,s=L!=null&&f==null,I;if(q[7]!==V)I=V&&rq(df,{text:V.text,onClick:V.scrollTo},void 0,!1,void 0,this),q[7]=V,q[8]=I;else I=q[8];let Oq=s?0:1,i;if(q[9]!==K)i=rq(A_,{value:d,children:K},void 0,!1,void 0,this),q[9]=K,q[10]=i;else i=q[10];let x;if(q[11]!==f||q[12]!==O||q[13]!==i||q[14]!==Oq)x=rq(o8,{ref:O,flexGrow:1,flexDirection:"column",paddingTop:Oq,stickyScroll:!0,children:[i,f]},void 0,!0,void 0,this),q[11]=f,q[12]=O,q[13]=i,q[14]=Oq,q[15]=x;else x=q[15];let Kq;if(q[16]!==W||q[17]!==S||q[18]!==u||q[19]!==f||q[20]!==jq)Kq=!W&&jq&&f==null&&rq(Gf,{count:S,onClick:u},void 0,!1,void 0,this),q[16]=W,q[17]=S,q[18]=u,q[19]=f,q[20]=jq,q[21]=Kq;else Kq=q[21];let $q;if(q[22]!==P)$q=P!=null&&rq(z,{position:"absolute",bottom:0,right:0,opaque:!0,children:P},void 0,!1,void 0,this),q[22]=P,q[23]=$q;else $q=q[23];let R;if(q[24]!==x||q[25]!==Kq||q[26]!==$q||q[27]!==I)R=rq(z,{flexGrow:1,flexDirection:"column",overflow:"hidden",children:[I,x,Kq,$q]},void 0,!0,void 0,this),q[24]=x,q[25]=Kq,q[26]=$q,q[27]=I,q[28]=R;else R=q[28];let wq,A;if(q[29]===Symbol.for("react.memo_cache_sentinel"))wq=rq(Lf,{},void 0,!1,void 0,this),A=rq(Rf,{},void 0,!1,void 0,this),q[29]=wq,q[30]=A;else wq=q[29],A=q[30];let y;if(q[31]!==$)y=rq(z,{flexDirection:"column",flexShrink:0,width:"100%",maxHeight:"50%",children:[wq,A,rq(z,{flexDirection:"column",width:"100%",flexGrow:1,overflowY:"hidden",children:$},void 0,!1,void 0,this)]},void 0,!0,void 0,this),q[31]=$,q[32]=y;else y=q[32];let E;if(q[33]!==m||q[34]!==j||q[35]!==w||q[36]!==T)E=j!=null&&rq(H8,{value:{rows:T-M8-1,columns:m-4,scrollRef:w??null},children:rq(z,{position:"absolute",bottom:0,left:0,right:0,maxHeight:T-M8,flexDirection:"column",overflow:"hidden",opaque:!0,children:[rq(z,{flexShrink:0,children:rq(r,{color:"permission",children:"\u2594".repeat(m)},void 0,!1,void 0,this)},void 0,!1,void 0,this),rq(z,{flexDirection:"column",paddingX:2,flexShrink:0,overflow:"hidden",children:j},void 0,!1,void 0,this)]},void 0,!0,void 0,this)},void 0,!1,void 0,this),q[33]=m,q[34]=j,q[35]=w,q[36]=T,q[37]=E;else E=q[37];let Q;if(q[38]!==R||q[39]!==y||q[40]!==E)Q=rq(O8,{children:[R,y,E]},void 0,!0,void 0,this),q[38]=R,q[39]=y,q[40]=E,q[41]=Q;else Q=q[41];return Q}let b;if(q[42]!==$||q[43]!==j||q[44]!==f||q[45]!==K)b=rq(Nf,{children:[K,$,f,j]},void 0,!0,void 0,this),q[42]=$,q[43]=j,q[44]=f,q[45]=K,q[46]=b;else b=q[46];return b}function Sf(){if(!Bq())return;let _=h8.get(process.stdout);if(!_)return;return _.onHyperlinkClick=ef,()=>{_.onHyperlinkClick=void 0}}function ef(_){if(_.startsWith("file:"))try{p8(Df(_))}catch{}else Y8(_)}function Zf(){}function Gf(_){let q=A6(10),{count:K,onClick:$}=_,[f,P]=c6(!1),j,w;if(q[0]===Symbol.for("react.memo_cache_sentinel"))j=()=>P(!0),w=()=>P(!1),q[0]=j,q[1]=w;else j=q[0],w=q[1];let O=f?"userMessageBackgroundHover":"userMessageBackground",v;if(q[2]!==K)v=K>0?`${K} new ${C6(K,"message")}`:"Jump to bottom",q[2]=K,q[3]=v;else v=q[3];let k;if(q[4]!==O||q[5]!==v)k=rq(r,{backgroundColor:O,dimColor:!0,children:[" ",v," ",u8.arrowDown," "]},void 0,!0,void 0,this),q[4]=O,q[5]=v,q[6]=k;else k=q[6];let M;if(q[7]!==$||q[8]!==k)M=rq(z,{position:"absolute",bottom:0,left:0,right:0,justifyContent:"center",children:rq(z,{onClick:$,onMouseEnter:j,onMouseLeave:w,children:k},void 0,!1,void 0,this)},void 0,!1,void 0,this),q[7]=$,q[8]=k,q[9]=M;else M=q[9];return M}function df(_){let q=A6(8),{text:K,onClick:$}=_,[f,P]=c6(!1),j=f?"userMessageBackgroundHover":"userMessageBackground",w,O;if(q[0]===Symbol.for("react.memo_cache_sentinel"))w=()=>P(!0),O=()=>P(!1),q[0]=w,q[1]=O;else w=q[0],O=q[1];let v;if(q[2]!==K)v=rq(r,{color:"subtle",wrap:"truncate-end",children:[u8.pointer," ",K]},void 0,!0,void 0,this),q[2]=K,q[3]=v;else v=q[3];let k;if(q[4]!==$||q[5]!==j||q[6]!==v)k=rq(z,{flexShrink:0,width:"100%",height:1,paddingRight:1,backgroundColor:j,onClick:$,onMouseEnter:w,onMouseLeave:O,children:v},void 0,!1,void 0,this),q[4]=$,q[5]=j,q[6]=v,q[7]=k;else k=q[7];return k}function Lf(){let _=A6(4),q=w8();if(!q||q.suggestions.length===0)return null;let K;if(_[0]!==q.maxColumnWidth||_[1]!==q.selectedSuggestion||_[2]!==q.suggestions)K=rq(z,{position:"absolute",bottom:"100%",left:0,right:0,paddingX:2,paddingTop:1,flexDirection:"column",opaque:!0,children:rq(T8,{suggestions:q.suggestions,selectedSuggestion:q.selectedSuggestion,maxColumnWidth:q.maxColumnWidth,overlay:!0},void 0,!1,void 0,this)},void 0,!1,void 0,this),_[0]=q.maxColumnWidth,_[1]=q.selectedSuggestion,_[2]=q.suggestions,_[3]=K;else K=_[3];return K}function Rf(){let _=A6(2),q=r8();if(!q)return null;let K;if(_[0]!==q)K=rq(z,{position:"absolute",bottom:"100%",left:0,right:0,opaque:!0,children:q},void 0,!1,void 0,this),_[0]=q,_[1]=K;else K=_[1];return K}var M8=2,A_;var J8=_q(()=>{uf();v8();t6();Af();of();pq();Tf();V6();z8();J_();Jf();A_=nf({setStickyPrompt:()=>{}})});function A8(_,q){for(let K of _)if(!q.has(K))return!1;return!0}var n8=()=>{};function X8(_){if(_.type!=="user")return!1;let q=_.message.content[0];if(q?.type!=="text")return!1;if(!q.text.includes(`<${x6}`))return!1;if(n_(q.text,l6)!=="completed")return!1;return n_(q.text,g6)?.startsWith(a8)??!1}function W8(_,q){if(!Bq())return _;if(q)return _;let K=[],$=0;while($<_.length){let f=_[$];if(X8(f)){let P=0;while($<_.length&&X8(_[$]))P++,$++;if(P===1)K.push(f);else K.push({...f,message:{role:"user",content:[{type:"text",text:`<${x6}><${l6}>completed</${l6}><${g6}>${P} background commands completed</${g6}></${x6}>`}]}})}else K.push(f),$++}return K}var D8=_q(()=>{bf();Ef();V6();I6()});function m8(_){return _.type==="system"&&_.subtype==="stop_hook_summary"&&_.hookLabel!==void 0}function y8(_){let q=[],K=0;while(K<_.length){let $=_[K];if(m8($)){let f=$.hookLabel,P=[];while(K<_.length){let j=_[K];if(!m8(j)||j.hookLabel!==f)break;P.push(j),K++}if(P.length===1)q.push($);else q.push({...$,hookCount:P.reduce((j,w)=>j+w.hookCount,0),hookInfos:P.flatMap((j)=>j.hookInfos),hookErrors:P.flatMap((j)=>j.hookErrors),preventedContinuation:P.some((j)=>j.preventedContinuation),hasOutput:P.some((j)=>j.hasOutput),totalDurationMs:Math.max(...P.map((j)=>j.totalDurationMs??0))})}else q.push($),K++}return q}var S8=()=>{};function e8(_){return _.type==="attachment"&&_.attachment.type==="task_status"&&_.attachment.taskType==="in_process_teammate"&&_.attachment.status==="completed"}function Z8(_){let q=[],K=0;while(K<_.length){let $=_[K];if(e8($)){let f=0;while(K<_.length&&e8(_[K]))f++,K++;if(f===1)q.push($);else q.push({type:"attachment",uuid:$.uuid,timestamp:$.timestamp,attachment:{type:"teammate_shutdown_batch",count:f}})}else q.push($),K++}return q}var i8=()=>{};function Cf(_){let q=G8.get(_);if(!q)q=new Set(_.filter((K)=>K.renderGroupedToolUse).map((K)=>K.name)),G8.set(_,q);return q}function X_(_){if(_.type==="assistant"&&_.message.content[0]?.type==="tool_use"){let q=_.message.content[0];return{messageId:_.message.id,toolUseId:q.id,toolName:q.name}}return null}function d8(_,q,K=!1){if(K)return{messages:_};let $=Cf(q),f=new Map;for(let k of _){let M=X_(k);if(M&&$.has(M.toolName)){let p=`${M.messageId}:${M.toolName}`,u=f.get(p)??[];u.push(k),f.set(p,u)}}let P=new Map,j=new Set;for(let[k,M]of f)if(M.length>=2){P.set(k,M);for(let p of M){let u=X_(p);if(u)j.add(u.toolUseId)}}let w=new Map;for(let k of _)if(k.type==="user"){for(let M of k.message.content)if(M.type==="tool_result"&&j.has(M.tool_use_id))w.set(M.tool_use_id,k)}let O=[],v=new Set;for(let k of _){let M=X_(k);if(M){let p=`${M.messageId}:${M.toolName}`,u=P.get(p);if(u){if(!v.has(p)){v.add(p);let W=u[0],C=[];for(let T of u){let m=T.message.content[0].id,e=w.get(m);if(e)C.push(e)}let S={type:"grouped_tool_use",toolName:M.toolName,messages:u,results:C,displayMessage:W,uuid:`grouped-${W.uuid}`,timestamp:W.timestamp,messageId:M.messageId};O.push(S)}continue}}if(k.type==="user"){let p=k.message.content.filter((u)=>u.type==="tool_result");if(p.length>0){if(p.every((W)=>j.has(W.tool_use_id)))continue}}O.push(k)}return{messages:O}}var G8;var L8=_q(()=>{G8=new WeakMap});function s6(_){let q=b8.get(_);if(q!==void 0)return q;let K=Vf(_).toLowerCase();return b8.set(_,K),K}function Vf(_){let q="";switch(_.type){case"user":{let f=_.message.content;if(typeof f==="string")q=N8.has(f)?"":f;else{let P=[];for(let j of f)if(j.type==="text"){if(!N8.has(j.text))P.push(j.text)}else if(j.type==="tool_result")P.push(cf(_.toolUseResult));q=P.join(`
2
+ import{Cc as xK,Dc as lK,Ec as gK,Fc as h_,Gc as D6,Ic as IK,Jc as k_,Kc as oK,Lc as sK,Mc as uK}from"./cli-rz03bav0.js";import{$d as x7,_d as cK}from"./cli-tpjr1pz9.js";import{ke as I_,le as s_,me as kP}from"./cli-609dp2ck.js";import{$e as HK,Ze as r_,_e as v_,af as tK,bf as TK}from"./cli-cfbfexxj.js";import{Rf as T8,Sf as Jf}from"./cli-vqne1z50.js";import{Wf as o8,Xf as Af}from"./cli-8h10q2x8.js";import{ig as O_,jg as YK}from"./cli-bpj9na88.js";import{AE as zf,AF as h6,Bq as gP,DA as a8,DF as hK,Dg as Q_,Eg as tP,Ei as pK,FE as w6,HA as Ef,Hq as Pf,Iq as IP,Mo as J$,Nj as o$,No as rP,Oj as D$,RE as pf,Rj as l_,SE as Yf,Sz as L7,Uo as A$,Us as Z_,VE as I6,Vj as u$,Vs as SK,Wo as g_,Ws as W7,YD as E8,ZD as C8,ai as bK,bi as V7,ep as n$,hE as Of,ip as vP,kl as t7,mn as C$,nn as V$,oA as t_,oE as n_,on as _f,pA as x_,pE as wf,pn as Kf,pv as Cq,qA as c_,qE as rf,qv as w_,rA as j$,rE as q8,rv as f$,sA as jf,sn as t$,sv as P$,tE as vf,tn as c$,tq as $f,tv as _P,uA as O$,uE as kf,uq as lP,vq as ff,wE as w$,xE as r$,yE as v$,zE as Mf,zi as j_}from"./cli-b3k8arn1.js";import{QL as qf,RL as xP}from"./cli-4pwyex04.js";import{TN as vK,UN as Q6,VN as q_,WN as kK,ZN as Q8}from"./cli-8ykv66e4.js";import{cO as EK,eO as CK,fO as VK,gO as c7}from"./cli-bzrat9yd.js";import{$O as g8,EO as q6,FO as t6,VO as H8,ZO as uf,_O as Y6}from"./cli-8jym9hp6.js";import{BQ as Y_,DQ as z,EQ as E$,FQ as r,GQ as SP,TQ as yK,fR as pq,hP as NK,iP as C7,qP as Bq,sQ as h8,tQ as of,uP as V6,vQ as Q$,wQ as cP}from"./cli-a2d962bq.js";import{$2 as aK,A0 as S6,D0 as e6,EW as P6,F1 as wP,LU as e_,NW as __,Q3 as j6,WV as C6,X0 as H$,a3 as J7,cU as E7,cW as z8,g1 as T$,gZ as iK,hZ as P_,rZ as y_,u3 as Eq,vU as U$,wU as mK,x3 as Tq,xU as ZK}from"./cli-192xnkcx.js";import{A5 as p8,B5 as Y8,C5 as Tf}from"./cli-an97yxg9.js";import{D5 as b$,E5 as yP}from"./cli-hpxspent.js";import{$5 as uq,B6 as b7,a6 as n6,f6 as Uq,k6 as y6,n6 as B8,r6 as X6}from"./cli-bdgrtpsy.js";import{N7 as a6,O7 as U8}from"./cli-fnt125we.js";import{_7 as x6,d8 as l6,e8 as g6,q8 as bf}from"./cli-8kpqq0ea.js";import{$8 as k7,_8 as rK}from"./cli-e5yek4vx.js";import{s9 as V8,u9 as xf}from"./cli-5ajcy93q.js";import{A_ as RK,s_ as E_,u_ as C_,x_ as r6,y_ as V_}from"./cli-awb77t95.js";import{K_ as m6,U_ as LK}from"./cli-q8zmmp6z.js";import{Dca as B$,dda as VP}from"./cli-tafg3e9w.js";import{hda as _q}from"./cli-qwx84m9c.js";import{c as u_}from"react/compiler-runtime";import{createContext as R6,useContext as N6,useEffect as K8,useState as _8}from"react";import{jsxDEV as L6}from"react/jsx-dev-runtime";function O8(_){let q=u_(6),{children:K}=_,[$,f]=_8(null),[P,j]=_8(null),w;if(q[0]!==K||q[1]!==P)w=L6(P8.Provider,{value:P,children:K},void 0,!1,void 0,this),q[0]=K,q[1]=P,q[2]=w;else w=q[2];let O;if(q[3]!==$||q[4]!==w)O=L6(f8.Provider,{value:f,children:L6(j8.Provider,{value:j,children:L6($8.Provider,{value:$,children:w},void 0,!1,void 0,this)},void 0,!1,void 0,this)},void 0,!1,void 0,this),q[3]=$,q[4]=w,q[5]=O;else O=q[5];return O}function w8(){return N6($8)}function r8(){return N6(P8)}function kj(_){let q=u_(4),K=N6(f8),$,f;if(q[0]!==_||q[1]!==K)$=()=>{if(!K)return;return K(_),()=>K(null)},f=[K,_],q[0]=_,q[1]=K,q[2]=$,q[3]=f;else $=q[2],f=q[3];K8($,f)}function Mj(_){let q=u_(4),K=N6(j8),$,f;if(q[0]!==_||q[1]!==K)$=()=>{if(!K)return;return K(_),()=>K(null)},f=[K,_],q[0]=_,q[1]=K,q[2]=$,q[3]=f;else $=q[2],f=q[3];K8($,f)}var $8,f8,P8,j8;var v8=_q(()=>{$8=R6(null),f8=R6(null),P8=R6(null),j8=R6(null)});function b6(_){return _.type==="attachment"&&Hf.has(_.attachment.type)}var hf,Hf;var J_=_q(()=>{hf=["hook_success","hook_additional_context","hook_cancelled","command_permissions","agent_mention","budget_usd","critical_system_reminder","edited_image_file","edited_text_file","opened_file_in_ide","output_style","plan_mode","plan_mode_exit","plan_mode_reentry","structured_output","team_context","todo_reminder","context_efficiency","deferred_tools_delta","mcp_instructions_delta","companion_intro","token_usage","ultrathink_effort","max_turns_reached","task_reminder","auto_mode","auto_mode_exit","output_token_usage","pen_mode_enter","pen_mode_exit","verify_plan_reminder","current_session_memory","compaction_reminder","date_change"],Hf=new Set(hf)});import{c as A6}from"react/compiler-runtime";import u8 from"figures";import{createContext as nf,useCallback as E6,useEffect as Xf,useLayoutEffect as af,useRef as k8,useState as c6,useSyncExternalStore as Wf}from"react";import{fileURLToPath as Df}from"url";import{jsxDEV as rq,Fragment as Nf}from"react/jsx-dev-runtime";function ij(_){let[q,K]=c6(null),$=k8(_);$.current=_;let f=k8(null),P=E6(()=>{K(null)},[]),j=E6((v)=>{let k=Math.max(0,v.getScrollHeight()-v.getViewportHeight());if(v.getScrollTop()+v.getPendingDelta()>=k)return;if(f.current===null)f.current=v.getScrollHeight(),K($.current)},[]),w=E6((v)=>{if(!v)return;v.scrollToBottom()},[]);Xf(()=>{if(q===null)f.current=null;else if(_<q)f.current=null,K(null)},[_,q]);let O=E6((v,k)=>{if(K((M)=>M===null?null:M+v),f.current!==null)f.current+=k},[]);return{dividerIndex:q,dividerYRef:f,onScrollAway:j,onRepin:P,jumpToNew:w,shiftDivider:O}}function mf(_,q){let K=0,$=!1;for(let f=q;f<_.length;f++){let P=_[f];if(P.type==="progress")continue;if(P.type==="assistant"&&!yf(P))continue;let j=P.type==="assistant";if(j&&!$)K++;$=j}return K}function yf(_){if(_.type!=="assistant")return!1;for(let q of _.message.content)if(q.type==="text"&&q.text.trim()!=="")return!0;return!1}function Gj(_,q){if(q===null)return;let K=q;while(K<_.length&&(_[K]?.type==="progress"||b6(_[K])))K++;let $=_[K]?.uuid;if(!$)return;let f=mf(_,q);return{firstUnseenUuid:$,count:Math.max(1,f)}}function dj(_){let q=A6(47),{scrollable:K,bottom:$,overlay:f,bottomFloat:P,modal:j,modalScrollRef:w,scrollRef:O,dividerYRef:v,hidePill:k,hideSticky:M,newMessageCount:p,onPillClick:u}=_,W=k===void 0?!1:k,C=M===void 0?!1:M,S=p===void 0?0:p,{rows:T,columns:m}=q6(),[e,o]=c6(null),J;if(q[0]===Symbol.for("react.memo_cache_sentinel"))J={setStickyPrompt:o},q[0]=J;else J=q[0];let d=J,U;if(q[1]!==O)U=(L)=>O?.current?.subscribe(L)??Zf,q[1]=O,q[2]=U;else U=q[2];let D=U,Z;if(q[3]!==v||q[4]!==O)Z=()=>{let L=O?.current,V=v?.current;if(!L||V==null)return!1;return L.getScrollTop()+L.getPendingDelta()+L.getViewportHeight()<V},q[3]=v,q[4]=O,q[5]=Z;else Z=q[5];let jq=Wf(D,Z),B;if(q[6]===Symbol.for("react.memo_cache_sentinel"))B=[],q[6]=B;else B=q[6];if(af(Sf,B),Bq()){let L=C?null:e,V=L!=null&&L!=="clicked"&&f==null?L:null,s=L!=null&&f==null,I;if(q[7]!==V)I=V&&rq(df,{text:V.text,onClick:V.scrollTo},void 0,!1,void 0,this),q[7]=V,q[8]=I;else I=q[8];let Oq=s?0:1,i;if(q[9]!==K)i=rq(A_,{value:d,children:K},void 0,!1,void 0,this),q[9]=K,q[10]=i;else i=q[10];let x;if(q[11]!==f||q[12]!==O||q[13]!==i||q[14]!==Oq)x=rq(o8,{ref:O,flexGrow:1,flexDirection:"column",paddingTop:Oq,stickyScroll:!0,children:[i,f]},void 0,!0,void 0,this),q[11]=f,q[12]=O,q[13]=i,q[14]=Oq,q[15]=x;else x=q[15];let Kq;if(q[16]!==W||q[17]!==S||q[18]!==u||q[19]!==f||q[20]!==jq)Kq=!W&&jq&&f==null&&rq(Gf,{count:S,onClick:u},void 0,!1,void 0,this),q[16]=W,q[17]=S,q[18]=u,q[19]=f,q[20]=jq,q[21]=Kq;else Kq=q[21];let $q;if(q[22]!==P)$q=P!=null&&rq(z,{position:"absolute",bottom:0,right:0,opaque:!0,children:P},void 0,!1,void 0,this),q[22]=P,q[23]=$q;else $q=q[23];let R;if(q[24]!==x||q[25]!==Kq||q[26]!==$q||q[27]!==I)R=rq(z,{flexGrow:1,flexDirection:"column",overflow:"hidden",children:[I,x,Kq,$q]},void 0,!0,void 0,this),q[24]=x,q[25]=Kq,q[26]=$q,q[27]=I,q[28]=R;else R=q[28];let wq,A;if(q[29]===Symbol.for("react.memo_cache_sentinel"))wq=rq(Lf,{},void 0,!1,void 0,this),A=rq(Rf,{},void 0,!1,void 0,this),q[29]=wq,q[30]=A;else wq=q[29],A=q[30];let y;if(q[31]!==$)y=rq(z,{flexDirection:"column",flexShrink:0,width:"100%",maxHeight:"50%",children:[wq,A,rq(z,{flexDirection:"column",width:"100%",flexGrow:1,overflowY:"hidden",children:$},void 0,!1,void 0,this)]},void 0,!0,void 0,this),q[31]=$,q[32]=y;else y=q[32];let E;if(q[33]!==m||q[34]!==j||q[35]!==w||q[36]!==T)E=j!=null&&rq(H8,{value:{rows:T-M8-1,columns:m-4,scrollRef:w??null},children:rq(z,{position:"absolute",bottom:0,left:0,right:0,maxHeight:T-M8,flexDirection:"column",overflow:"hidden",opaque:!0,children:[rq(z,{flexShrink:0,children:rq(r,{color:"permission",children:"\u2594".repeat(m)},void 0,!1,void 0,this)},void 0,!1,void 0,this),rq(z,{flexDirection:"column",paddingX:2,flexShrink:0,overflow:"hidden",children:j},void 0,!1,void 0,this)]},void 0,!0,void 0,this)},void 0,!1,void 0,this),q[33]=m,q[34]=j,q[35]=w,q[36]=T,q[37]=E;else E=q[37];let Q;if(q[38]!==R||q[39]!==y||q[40]!==E)Q=rq(O8,{children:[R,y,E]},void 0,!0,void 0,this),q[38]=R,q[39]=y,q[40]=E,q[41]=Q;else Q=q[41];return Q}let b;if(q[42]!==$||q[43]!==j||q[44]!==f||q[45]!==K)b=rq(Nf,{children:[K,$,f,j]},void 0,!0,void 0,this),q[42]=$,q[43]=j,q[44]=f,q[45]=K,q[46]=b;else b=q[46];return b}function Sf(){if(!Bq())return;let _=h8.get(process.stdout);if(!_)return;return _.onHyperlinkClick=ef,()=>{_.onHyperlinkClick=void 0}}function ef(_){if(_.startsWith("file:"))try{p8(Df(_))}catch{}else Y8(_)}function Zf(){}function Gf(_){let q=A6(10),{count:K,onClick:$}=_,[f,P]=c6(!1),j,w;if(q[0]===Symbol.for("react.memo_cache_sentinel"))j=()=>P(!0),w=()=>P(!1),q[0]=j,q[1]=w;else j=q[0],w=q[1];let O=f?"userMessageBackgroundHover":"userMessageBackground",v;if(q[2]!==K)v=K>0?`${K} new ${C6(K,"message")}`:"Jump to bottom",q[2]=K,q[3]=v;else v=q[3];let k;if(q[4]!==O||q[5]!==v)k=rq(r,{backgroundColor:O,dimColor:!0,children:[" ",v," ",u8.arrowDown," "]},void 0,!0,void 0,this),q[4]=O,q[5]=v,q[6]=k;else k=q[6];let M;if(q[7]!==$||q[8]!==k)M=rq(z,{position:"absolute",bottom:0,left:0,right:0,justifyContent:"center",children:rq(z,{onClick:$,onMouseEnter:j,onMouseLeave:w,children:k},void 0,!1,void 0,this)},void 0,!1,void 0,this),q[7]=$,q[8]=k,q[9]=M;else M=q[9];return M}function df(_){let q=A6(8),{text:K,onClick:$}=_,[f,P]=c6(!1),j=f?"userMessageBackgroundHover":"userMessageBackground",w,O;if(q[0]===Symbol.for("react.memo_cache_sentinel"))w=()=>P(!0),O=()=>P(!1),q[0]=w,q[1]=O;else w=q[0],O=q[1];let v;if(q[2]!==K)v=rq(r,{color:"subtle",wrap:"truncate-end",children:[u8.pointer," ",K]},void 0,!0,void 0,this),q[2]=K,q[3]=v;else v=q[3];let k;if(q[4]!==$||q[5]!==j||q[6]!==v)k=rq(z,{flexShrink:0,width:"100%",height:1,paddingRight:1,backgroundColor:j,onClick:$,onMouseEnter:w,onMouseLeave:O,children:v},void 0,!1,void 0,this),q[4]=$,q[5]=j,q[6]=v,q[7]=k;else k=q[7];return k}function Lf(){let _=A6(4),q=w8();if(!q||q.suggestions.length===0)return null;let K;if(_[0]!==q.maxColumnWidth||_[1]!==q.selectedSuggestion||_[2]!==q.suggestions)K=rq(z,{position:"absolute",bottom:"100%",left:0,right:0,paddingX:2,paddingTop:1,flexDirection:"column",opaque:!0,children:rq(T8,{suggestions:q.suggestions,selectedSuggestion:q.selectedSuggestion,maxColumnWidth:q.maxColumnWidth,overlay:!0},void 0,!1,void 0,this)},void 0,!1,void 0,this),_[0]=q.maxColumnWidth,_[1]=q.selectedSuggestion,_[2]=q.suggestions,_[3]=K;else K=_[3];return K}function Rf(){let _=A6(2),q=r8();if(!q)return null;let K;if(_[0]!==q)K=rq(z,{position:"absolute",bottom:"100%",left:0,right:0,opaque:!0,children:q},void 0,!1,void 0,this),_[0]=q,_[1]=K;else K=_[1];return K}var M8=2,A_;var J8=_q(()=>{uf();v8();t6();Af();of();pq();Tf();V6();z8();J_();Jf();A_=nf({setStickyPrompt:()=>{}})});function A8(_,q){for(let K of _)if(!q.has(K))return!1;return!0}var n8=()=>{};function X8(_){if(_.type!=="user")return!1;let q=_.message.content[0];if(q?.type!=="text")return!1;if(!q.text.includes(`<${x6}`))return!1;if(n_(q.text,l6)!=="completed")return!1;return n_(q.text,g6)?.startsWith(a8)??!1}function W8(_,q){if(!Bq())return _;if(q)return _;let K=[],$=0;while($<_.length){let f=_[$];if(X8(f)){let P=0;while($<_.length&&X8(_[$]))P++,$++;if(P===1)K.push(f);else K.push({...f,message:{role:"user",content:[{type:"text",text:`<${x6}><${l6}>completed</${l6}><${g6}>${P} background commands completed</${g6}></${x6}>`}]}})}else K.push(f),$++}return K}var D8=_q(()=>{bf();Ef();V6();I6()});function m8(_){return _.type==="system"&&_.subtype==="stop_hook_summary"&&_.hookLabel!==void 0}function y8(_){let q=[],K=0;while(K<_.length){let $=_[K];if(m8($)){let f=$.hookLabel,P=[];while(K<_.length){let j=_[K];if(!m8(j)||j.hookLabel!==f)break;P.push(j),K++}if(P.length===1)q.push($);else q.push({...$,hookCount:P.reduce((j,w)=>j+w.hookCount,0),hookInfos:P.flatMap((j)=>j.hookInfos),hookErrors:P.flatMap((j)=>j.hookErrors),preventedContinuation:P.some((j)=>j.preventedContinuation),hasOutput:P.some((j)=>j.hasOutput),totalDurationMs:Math.max(...P.map((j)=>j.totalDurationMs??0))})}else q.push($),K++}return q}var S8=()=>{};function e8(_){return _.type==="attachment"&&_.attachment.type==="task_status"&&_.attachment.taskType==="in_process_teammate"&&_.attachment.status==="completed"}function Z8(_){let q=[],K=0;while(K<_.length){let $=_[K];if(e8($)){let f=0;while(K<_.length&&e8(_[K]))f++,K++;if(f===1)q.push($);else q.push({type:"attachment",uuid:$.uuid,timestamp:$.timestamp,attachment:{type:"teammate_shutdown_batch",count:f}})}else q.push($),K++}return q}var i8=()=>{};function Cf(_){let q=G8.get(_);if(!q)q=new Set(_.filter((K)=>K.renderGroupedToolUse).map((K)=>K.name)),G8.set(_,q);return q}function X_(_){if(_.type==="assistant"&&_.message.content[0]?.type==="tool_use"){let q=_.message.content[0];return{messageId:_.message.id,toolUseId:q.id,toolName:q.name}}return null}function d8(_,q,K=!1){if(K)return{messages:_};let $=Cf(q),f=new Map;for(let k of _){let M=X_(k);if(M&&$.has(M.toolName)){let p=`${M.messageId}:${M.toolName}`,u=f.get(p)??[];u.push(k),f.set(p,u)}}let P=new Map,j=new Set;for(let[k,M]of f)if(M.length>=2){P.set(k,M);for(let p of M){let u=X_(p);if(u)j.add(u.toolUseId)}}let w=new Map;for(let k of _)if(k.type==="user"){for(let M of k.message.content)if(M.type==="tool_result"&&j.has(M.tool_use_id))w.set(M.tool_use_id,k)}let O=[],v=new Set;for(let k of _){let M=X_(k);if(M){let p=`${M.messageId}:${M.toolName}`,u=P.get(p);if(u){if(!v.has(p)){v.add(p);let W=u[0],C=[];for(let T of u){let m=T.message.content[0].id,e=w.get(m);if(e)C.push(e)}let S={type:"grouped_tool_use",toolName:M.toolName,messages:u,results:C,displayMessage:W,uuid:`grouped-${W.uuid}`,timestamp:W.timestamp,messageId:M.messageId};O.push(S)}continue}}if(k.type==="user"){let p=k.message.content.filter((u)=>u.type==="tool_result");if(p.length>0){if(p.every((W)=>j.has(W.tool_use_id)))continue}}O.push(k)}return{messages:O}}var G8;var L8=_q(()=>{G8=new WeakMap});function s6(_){let q=b8.get(_);if(q!==void 0)return q;let K=Vf(_).toLowerCase();return b8.set(_,K),K}function Vf(_){let q="";switch(_.type){case"user":{let f=_.message.content;if(typeof f==="string")q=N8.has(f)?"":f;else{let P=[];for(let j of f)if(j.type==="text"){if(!N8.has(j.text))P.push(j.text)}else if(j.type==="tool_result")P.push(cf(_.toolUseResult));q=P.join(`
3
3
  `)}break}case"assistant":{let f=_.message.content;if(Array.isArray(f))q=f.flatMap((P)=>{if(P.type==="text")return[P.text];if(P.type==="tool_use")return[tf(P.input)];return[]}).join(`
4
4
  `);break}case"attachment":{if(_.attachment.type==="relevant_memories")q=_.attachment.memories.map((f)=>f.content).join(`
5
5
  `);else if(_.attachment.type==="queued_command"&&_.attachment.commandMode!=="task-notification"&&!_.attachment.isMeta){let f=_.attachment.prompt;q=typeof f==="string"?f:f.flatMap((P)=>P.type==="text"?[P.text]:[]).join(`
@@ -1,3 +1,3 @@
1
1
  // @bun
2
- import{nd as oq}from"./cli-89x414pj.js";import{AF as t,BF as Xq,CF as Gq,Cn as Aq,DF as mq,Dn as Hq,EF as fq,FF as aq,Fn as gq,Hn as jq,In as Dq,Ip as a,Kp as o,Lp as i,Mp as c,Nn as r,Op as F,Pp as n,Rn as Yq,Sp as pq,Tn as T,Un as s,Vn as Cq,Xn as hq,Zk as Nq,ao as Mq,jo as uq,lp as Jq,op as dq}from"./cli-me4e2p3e.js";import{EV as bq,a3 as xq,zV as wq}from"./cli-msmzt4c3.js";import{G8 as R,H8 as G,J8 as vq}from"./cli-4ewb3q42.js";import{Y8 as x,Z8 as Iq}from"./cli-t9jht3kb.js";import{X9 as I,b_ as Vq,h_ as Zq,v_ as kq,y_ as Sq}from"./cli-hke6r0q8.js";import{bda as zq,e$ as Pq}from"./cli-3ac555qw.js";import{fda as l}from"./cli-w1d8n9g3.js";var _q=l(()=>{Zq();xq()});import{basename as Fq}from"path";import{useCallback as g,useEffect as m,useRef as C}from"react";import{PromptListChangedNotificationSchema as Uq,ResourceListChangedNotificationSchema as Qq,ToolListChangedNotificationSchema as lq}from"@modelcontextprotocol/sdk/types.js";import rq from"lodash-es/omit.js";import $q from"lodash-es/reject.js";function Kq(w){let k="plugin"in w?w.plugin:"no-plugin";return`${w.type}:${w.source}:${k}`}function Oq(w,k){if(k.length===0)return;w((X)=>{let v=new Set(X.plugins.errors.map((D)=>Kq(D))),Z=k.filter((D)=>!v.has(Kq(D)));if(Z.length===0)return X;return{...X,plugins:{...X.plugins,errors:[...X.plugins.errors,...Z]}}})}function Wq(w,k=!1){let X=Gq(),v=t((q)=>q.authVersion),Z=t((q)=>q.mcp.pluginReconnectKey),D=Xq(),Y=C(new Map),b=C(new Set),u=C(null);m(()=>{},[D]);let{addNotification:N}=fq(),Eq=16,B=C([]),V=C(null),d=g(()=>{V.current=null;let q=B.current;if(q.length===0)return;B.current=[],D((z)=>{let P=z.mcp;for(let h of q){let{tools:$,commands:A,resources:M,..._}=h,H=_.type==="disabled"||_.type==="failed"?$??[]:$,K=_.type==="disabled"||_.type==="failed"?A??[]:A,J=_.type==="disabled"||_.type==="failed"?M??[]:M,j=wq(_.name),U=P.clients.findIndex((L)=>L.name===_.name)===-1?[...P.clients,_]:P.clients.map((L)=>L.name===_.name?_:L),p=H===void 0?P.tools:[...$q(P.tools,(L)=>L.name?.startsWith(j)),...H],y=K===void 0?P.commands:[...$q(P.commands,(L)=>hq(L,_.name)),...K],Q=J===void 0?P.resources:{...P.resources,...J.length>0?{[_.name]:J}:rq(P.resources,_.name)};P={...P,clients:U,tools:p,commands:y,resources:Q}}return{...z,mcp:P}})},[D]),f=g((q)=>{if(B.current.push(q),V.current===null)V.current=setTimeout(d,Eq)},[d]),W=g(({client:q,tools:z,commands:P,resources:h})=>{switch(f({...q,tools:z,commands:P,resources:h}),q.type){case"connected":{if(Jq(q.client,q.name,D),q.client.onclose=()=>{let $=q.config.type??"stdio";if(a(q.name,q.config).catch(()=>{kq(`Failed to invalidate the server cache: ${q.name}`)}),T(q.name)){G(q.name,"Server is disabled, skipping automatic reconnection");return}if($!=="stdio"&&$!=="sdk"){let A=cq($);G(q.name,`${A} transport closed/disconnected, attempting automatic reconnection`);let M=Y.current.get(q.name);if(M)clearTimeout(M),Y.current.delete(q.name);(async()=>{for(let H=1;H<=S;H++){if(T(q.name)){G(q.name,"Server disabled during reconnection, stopping retry"),Y.current.delete(q.name);return}f({...q,type:"pending",reconnectAttempt:H,maxReconnectAttempts:S});let K=Date.now();try{let j=await F(q.name,q.config),O=Date.now()-K;if(j.client.type==="connected"){G(q.name,`${A} reconnection successful after ${O}ms (attempt ${H})`),Y.current.delete(q.name),W(j);return}if(G(q.name,`${A} reconnection attempt ${H} completed with status: ${j.client.type}`),H===S){G(q.name,`Max reconnection attempts (${S}) reached, giving up`),Y.current.delete(q.name),W(j);return}}catch(j){let O=Date.now()-K;if(R(q.name,`${A} reconnection attempt ${H} failed after ${O}ms: ${j}`),H===S){G(q.name,`Max reconnection attempts (${S}) reached, giving up`),Y.current.delete(q.name),f({...q,type:"failed"});return}}let J=Math.min(sq*Math.pow(2,H-1),iq);G(q.name,`Scheduling reconnection attempt ${H+1} in ${J}ms`),await new Promise((j)=>{let O=setTimeout(j,J);Y.current.set(q.name,O)})}})()}else f({...q,type:"failed"})},!1)switch($.action){case"register":case"skip":}if(q.capabilities?.tools?.listChanged)q.client.setNotificationHandler(lq,async()=>{G(q.name,"Received tools/list_changed notification, refreshing tools");try{let $=o.cache.get(q.name);o.cache.delete(q.name);let A=await o(q),M=A.length;if($)$.then((_)=>{x("tengu_mcp_list_changed",{type:"tools",previousCount:_.length,newCount:M})},()=>{x("tengu_mcp_list_changed",{type:"tools",newCount:M})});else x("tengu_mcp_list_changed",{type:"tools",newCount:M});f({...q,tools:A})}catch($){R(q.name,`Failed to refresh tools after list_changed notification: ${I($)}`)}});if(q.capabilities?.prompts?.listChanged)q.client.setNotificationHandler(Uq,async()=>{G(q.name,"Received prompts/list_changed notification, refreshing prompts"),x("tengu_mcp_list_changed",{type:"prompts"});try{c.cache.delete(q.name);let[$,A]=await Promise.all([c(q),Promise.resolve([])]);f({...q,commands:[...$,...A]}),Bq?.()}catch($){R(q.name,`Failed to refresh prompts after list_changed notification: ${I($)}`)}});if(q.capabilities?.resources?.listChanged)q.client.setNotificationHandler(Qq,async()=>{G(q.name,"Received resources/list_changed notification, refreshing resources"),x("tengu_mcp_list_changed",{type:"resources"});try{i.cache.delete(q.name);{let $=await i(q);f({...q,resources:$})}}catch($){R(q.name,`Failed to refresh resources after list_changed notification: ${I($)}`)}});break}case"needs-auth":case"failed":case"pending":case"disabled":break}},[f]),qq=Pq();m(()=>{async function q(){let{servers:z,errors:P}=k?{servers:{},errors:[]}:await r(w),h={...z,...w};Oq(D,P),D(($)=>{let{stale:A,...M}=Mq($.mcp,h);for(let K of A){let J=Y.current.get(K.name);if(J)clearTimeout(J),Y.current.delete(K.name);if(K.type==="connected")K.client.onclose=void 0,a(K.name,K.config).catch(()=>{})}let _=new Set(M.clients.map((K)=>K.name)),H=Object.entries(h).filter(([K])=>!_.has(K)).map(([K,J])=>({name:K,type:T(K)?"disabled":"pending",config:J}));if(H.length===0&&A.length===0)return $;return{...$,mcp:{...$.mcp,...M,clients:[...M.clients,...H]}}})}q().catch((z)=>{R("useManageMCPConnections",`Failed to initialize servers as pending: ${I(z)}`)})},[k,w,D,qq,Z]),m(()=>{let q=!1;async function z(){let P;if(k||Yq())P=Promise.resolve({});else Hq(),P=Aq();let{servers:h,errors:$}=k?{servers:{},errors:[]}:await r(w,P);if(q)return;Oq(D,$);let A={...h,...w},M=Object.fromEntries(Object.entries(A).filter(([j])=>!T(j)));n(W,M).catch((j)=>{R("useManageMcpConnections",`Failed to get MCP resources: ${I(j)}`)});let _={};if(!k){if(_=Dq(await P).allowed,q)return;if(Object.keys(_).length>0){let{servers:j}=jq(_,A);_=j}if(Object.keys(_).length>0){D((O)=>{let U=new Set(O.mcp.clients.map((y)=>y.name)),p=Object.entries(_).filter(([y])=>!U.has(y)).map(([y,Q])=>({name:y,type:T(y)?"disabled":"pending",config:Q}));if(p.length===0)return O;return{...O,mcp:{...O.mcp,clients:[...O.mcp.clients,...p]}}});let j=Object.fromEntries(Object.entries(_).filter(([O])=>!T(O)));n(W,j).catch((O)=>{R("useManageMcpConnections",`Failed to get claude.ai MCP resources: ${I(O)}`)})}}let H={...A,..._},K={enterprise:0,global:0,project:0,user:0,plugin:0,claudeai:0},J=[];for(let[j,O]of Object.entries(H)){if(O.scope==="enterprise")K.enterprise++;else if(O.scope==="user")K.global++;else if(O.scope==="project")K.project++;else if(O.scope==="local")K.user++;else if(O.scope==="dynamic")K.plugin++;else if(O.scope==="claudeai")K.claudeai++;if(process.env.USER_TYPE==="ant"&&!T(j)&&(O.type===void 0||O.type==="stdio")&&"command"in O)J.push(Fq(O.command))}x("tengu_mcp_servers",{...K,...process.env.USER_TYPE==="ant"&&J.length>0?{stdio_commands:J.sort().join(",")}:{}})}return z(),()=>{q=!0}},[k,w,W,D,v,qq,Z]),m(()=>{let q=Y.current;return()=>{for(let z of q.values())clearTimeout(z);if(q.clear(),V.current!==null)clearTimeout(V.current),V.current=null,d()}},[d]);let Rq=g(async(q)=>{let z=X.getState().mcp.clients.find(($)=>$.name===q);if(!z)throw Error(`MCP server ${q} not found`);let P=Y.current.get(q);if(P)clearTimeout(P),Y.current.delete(q);let h=await F(q,z.config);return W(h),h},[X,W]),Tq=g(async(q)=>{let z=X.getState().mcp.clients.find((h)=>h.name===q);if(!z)throw Error(`MCP server ${q} not found`);if(z.type!=="disabled"){let h=Y.current.get(q);if(h)clearTimeout(h),Y.current.delete(q);if(s(q,!1),z.type==="connected")await a(q,z.config);f({name:q,type:"disabled",config:z.config})}else{s(q,!0),f({name:q,type:"pending",config:z.config});let h=await F(q,z.config);W(h)}},[X,f,W]);return{reconnectMcpServer:Rq,toggleMcpServer:Tq}}function cq(w){switch(w){case"http":return"HTTP";case"ws":case"ws-ide":return"WebSocket";default:return"SSE"}}var Bq=null,S=5,sq=1000,iq=30000;var yq=l(()=>{zq();pq();Iq();Cq();Sq();zq();aq();mq();Vq();vq();Nq();oq();_q();gq();dq();bq();uq()});import{c as nq}from"react/compiler-runtime";import{createContext as tq,useContext as Lq}from"react";import{jsxDEV as eq}from"react/jsx-dev-runtime";function U6(){let w=Lq(e);if(!w)throw Error("useMcpReconnect must be used within MCPConnectionManager");return w.reconnectMcpServer}function Q6(){let w=Lq(e);if(!w)throw Error("useMcpToggleEnabled must be used within MCPConnectionManager");return w.toggleMcpServer}function l6(w){let k=nq(6),{children:X,dynamicMcpConfig:v,isStrictMcpConfig:Z}=w,{reconnectMcpServer:D,toggleMcpServer:Y}=Wq(v,Z),b;if(k[0]!==D||k[1]!==Y)b={reconnectMcpServer:D,toggleMcpServer:Y},k[0]=D,k[1]=Y,k[2]=b;else b=k[2];let u=b,N;if(k[3]!==X||k[4]!==u)N=eq(e.Provider,{value:u,children:X},void 0,!1,void 0,this),k[3]=X,k[4]=u,k[5]=N;else N=k[5];return N}var e;var q6=l(()=>{yq();e=tq(null)});
2
+ import{nd as oq}from"./cli-g2s3391y.js";import{AF as t,BF as Xq,CF as Gq,Cn as Aq,DF as mq,Dn as Hq,EF as fq,FF as aq,Fn as gq,Hn as jq,In as Dq,Ip as a,Kp as o,Lp as i,Mp as c,Nn as r,Op as F,Pp as n,Rn as Yq,Sp as pq,Tn as T,Un as s,Vn as Cq,Xn as hq,Zk as Nq,ao as Mq,jo as uq,lp as Jq,op as dq}from"./cli-b3k8arn1.js";import{EV as bq,a3 as xq,zV as wq}from"./cli-192xnkcx.js";import{I8 as R,J8 as G,L8 as vq}from"./cli-8kpqq0ea.js";import{$8 as Iq,_8 as x}from"./cli-e5yek4vx.js";import{A_ as Sq,Z9 as I,d_ as Vq,j_ as Zq,x_ as kq}from"./cli-awb77t95.js";import{dda as zq,g$ as Pq}from"./cli-tafg3e9w.js";import{hda as l}from"./cli-qwx84m9c.js";var _q=l(()=>{Zq();xq()});import{basename as Fq}from"path";import{useCallback as g,useEffect as m,useRef as C}from"react";import{PromptListChangedNotificationSchema as Uq,ResourceListChangedNotificationSchema as Qq,ToolListChangedNotificationSchema as lq}from"@modelcontextprotocol/sdk/types.js";import rq from"lodash-es/omit.js";import $q from"lodash-es/reject.js";function Kq(w){let k="plugin"in w?w.plugin:"no-plugin";return`${w.type}:${w.source}:${k}`}function Oq(w,k){if(k.length===0)return;w((X)=>{let v=new Set(X.plugins.errors.map((D)=>Kq(D))),Z=k.filter((D)=>!v.has(Kq(D)));if(Z.length===0)return X;return{...X,plugins:{...X.plugins,errors:[...X.plugins.errors,...Z]}}})}function Wq(w,k=!1){let X=Gq(),v=t((q)=>q.authVersion),Z=t((q)=>q.mcp.pluginReconnectKey),D=Xq(),Y=C(new Map),b=C(new Set),u=C(null);m(()=>{},[D]);let{addNotification:N}=fq(),Eq=16,B=C([]),V=C(null),d=g(()=>{V.current=null;let q=B.current;if(q.length===0)return;B.current=[],D((z)=>{let P=z.mcp;for(let h of q){let{tools:$,commands:A,resources:M,..._}=h,H=_.type==="disabled"||_.type==="failed"?$??[]:$,K=_.type==="disabled"||_.type==="failed"?A??[]:A,J=_.type==="disabled"||_.type==="failed"?M??[]:M,j=wq(_.name),U=P.clients.findIndex((L)=>L.name===_.name)===-1?[...P.clients,_]:P.clients.map((L)=>L.name===_.name?_:L),p=H===void 0?P.tools:[...$q(P.tools,(L)=>L.name?.startsWith(j)),...H],y=K===void 0?P.commands:[...$q(P.commands,(L)=>hq(L,_.name)),...K],Q=J===void 0?P.resources:{...P.resources,...J.length>0?{[_.name]:J}:rq(P.resources,_.name)};P={...P,clients:U,tools:p,commands:y,resources:Q}}return{...z,mcp:P}})},[D]),f=g((q)=>{if(B.current.push(q),V.current===null)V.current=setTimeout(d,Eq)},[d]),W=g(({client:q,tools:z,commands:P,resources:h})=>{switch(f({...q,tools:z,commands:P,resources:h}),q.type){case"connected":{if(Jq(q.client,q.name,D),q.client.onclose=()=>{let $=q.config.type??"stdio";if(a(q.name,q.config).catch(()=>{kq(`Failed to invalidate the server cache: ${q.name}`)}),T(q.name)){G(q.name,"Server is disabled, skipping automatic reconnection");return}if($!=="stdio"&&$!=="sdk"){let A=cq($);G(q.name,`${A} transport closed/disconnected, attempting automatic reconnection`);let M=Y.current.get(q.name);if(M)clearTimeout(M),Y.current.delete(q.name);(async()=>{for(let H=1;H<=S;H++){if(T(q.name)){G(q.name,"Server disabled during reconnection, stopping retry"),Y.current.delete(q.name);return}f({...q,type:"pending",reconnectAttempt:H,maxReconnectAttempts:S});let K=Date.now();try{let j=await F(q.name,q.config),O=Date.now()-K;if(j.client.type==="connected"){G(q.name,`${A} reconnection successful after ${O}ms (attempt ${H})`),Y.current.delete(q.name),W(j);return}if(G(q.name,`${A} reconnection attempt ${H} completed with status: ${j.client.type}`),H===S){G(q.name,`Max reconnection attempts (${S}) reached, giving up`),Y.current.delete(q.name),W(j);return}}catch(j){let O=Date.now()-K;if(R(q.name,`${A} reconnection attempt ${H} failed after ${O}ms: ${j}`),H===S){G(q.name,`Max reconnection attempts (${S}) reached, giving up`),Y.current.delete(q.name),f({...q,type:"failed"});return}}let J=Math.min(sq*Math.pow(2,H-1),iq);G(q.name,`Scheduling reconnection attempt ${H+1} in ${J}ms`),await new Promise((j)=>{let O=setTimeout(j,J);Y.current.set(q.name,O)})}})()}else f({...q,type:"failed"})},!1)switch($.action){case"register":case"skip":}if(q.capabilities?.tools?.listChanged)q.client.setNotificationHandler(lq,async()=>{G(q.name,"Received tools/list_changed notification, refreshing tools");try{let $=o.cache.get(q.name);o.cache.delete(q.name);let A=await o(q),M=A.length;if($)$.then((_)=>{x("tengu_mcp_list_changed",{type:"tools",previousCount:_.length,newCount:M})},()=>{x("tengu_mcp_list_changed",{type:"tools",newCount:M})});else x("tengu_mcp_list_changed",{type:"tools",newCount:M});f({...q,tools:A})}catch($){R(q.name,`Failed to refresh tools after list_changed notification: ${I($)}`)}});if(q.capabilities?.prompts?.listChanged)q.client.setNotificationHandler(Uq,async()=>{G(q.name,"Received prompts/list_changed notification, refreshing prompts"),x("tengu_mcp_list_changed",{type:"prompts"});try{c.cache.delete(q.name);let[$,A]=await Promise.all([c(q),Promise.resolve([])]);f({...q,commands:[...$,...A]}),Bq?.()}catch($){R(q.name,`Failed to refresh prompts after list_changed notification: ${I($)}`)}});if(q.capabilities?.resources?.listChanged)q.client.setNotificationHandler(Qq,async()=>{G(q.name,"Received resources/list_changed notification, refreshing resources"),x("tengu_mcp_list_changed",{type:"resources"});try{i.cache.delete(q.name);{let $=await i(q);f({...q,resources:$})}}catch($){R(q.name,`Failed to refresh resources after list_changed notification: ${I($)}`)}});break}case"needs-auth":case"failed":case"pending":case"disabled":break}},[f]),qq=Pq();m(()=>{async function q(){let{servers:z,errors:P}=k?{servers:{},errors:[]}:await r(w),h={...z,...w};Oq(D,P),D(($)=>{let{stale:A,...M}=Mq($.mcp,h);for(let K of A){let J=Y.current.get(K.name);if(J)clearTimeout(J),Y.current.delete(K.name);if(K.type==="connected")K.client.onclose=void 0,a(K.name,K.config).catch(()=>{})}let _=new Set(M.clients.map((K)=>K.name)),H=Object.entries(h).filter(([K])=>!_.has(K)).map(([K,J])=>({name:K,type:T(K)?"disabled":"pending",config:J}));if(H.length===0&&A.length===0)return $;return{...$,mcp:{...$.mcp,...M,clients:[...M.clients,...H]}}})}q().catch((z)=>{R("useManageMCPConnections",`Failed to initialize servers as pending: ${I(z)}`)})},[k,w,D,qq,Z]),m(()=>{let q=!1;async function z(){let P;if(k||Yq())P=Promise.resolve({});else Hq(),P=Aq();let{servers:h,errors:$}=k?{servers:{},errors:[]}:await r(w,P);if(q)return;Oq(D,$);let A={...h,...w},M=Object.fromEntries(Object.entries(A).filter(([j])=>!T(j)));n(W,M).catch((j)=>{R("useManageMcpConnections",`Failed to get MCP resources: ${I(j)}`)});let _={};if(!k){if(_=Dq(await P).allowed,q)return;if(Object.keys(_).length>0){let{servers:j}=jq(_,A);_=j}if(Object.keys(_).length>0){D((O)=>{let U=new Set(O.mcp.clients.map((y)=>y.name)),p=Object.entries(_).filter(([y])=>!U.has(y)).map(([y,Q])=>({name:y,type:T(y)?"disabled":"pending",config:Q}));if(p.length===0)return O;return{...O,mcp:{...O.mcp,clients:[...O.mcp.clients,...p]}}});let j=Object.fromEntries(Object.entries(_).filter(([O])=>!T(O)));n(W,j).catch((O)=>{R("useManageMcpConnections",`Failed to get claude.ai MCP resources: ${I(O)}`)})}}let H={...A,..._},K={enterprise:0,global:0,project:0,user:0,plugin:0,claudeai:0},J=[];for(let[j,O]of Object.entries(H)){if(O.scope==="enterprise")K.enterprise++;else if(O.scope==="user")K.global++;else if(O.scope==="project")K.project++;else if(O.scope==="local")K.user++;else if(O.scope==="dynamic")K.plugin++;else if(O.scope==="claudeai")K.claudeai++;if(process.env.USER_TYPE==="ant"&&!T(j)&&(O.type===void 0||O.type==="stdio")&&"command"in O)J.push(Fq(O.command))}x("tengu_mcp_servers",{...K,...process.env.USER_TYPE==="ant"&&J.length>0?{stdio_commands:J.sort().join(",")}:{}})}return z(),()=>{q=!0}},[k,w,W,D,v,qq,Z]),m(()=>{let q=Y.current;return()=>{for(let z of q.values())clearTimeout(z);if(q.clear(),V.current!==null)clearTimeout(V.current),V.current=null,d()}},[d]);let Rq=g(async(q)=>{let z=X.getState().mcp.clients.find(($)=>$.name===q);if(!z)throw Error(`MCP server ${q} not found`);let P=Y.current.get(q);if(P)clearTimeout(P),Y.current.delete(q);let h=await F(q,z.config);return W(h),h},[X,W]),Tq=g(async(q)=>{let z=X.getState().mcp.clients.find((h)=>h.name===q);if(!z)throw Error(`MCP server ${q} not found`);if(z.type!=="disabled"){let h=Y.current.get(q);if(h)clearTimeout(h),Y.current.delete(q);if(s(q,!1),z.type==="connected")await a(q,z.config);f({name:q,type:"disabled",config:z.config})}else{s(q,!0),f({name:q,type:"pending",config:z.config});let h=await F(q,z.config);W(h)}},[X,f,W]);return{reconnectMcpServer:Rq,toggleMcpServer:Tq}}function cq(w){switch(w){case"http":return"HTTP";case"ws":case"ws-ide":return"WebSocket";default:return"SSE"}}var Bq=null,S=5,sq=1000,iq=30000;var yq=l(()=>{zq();pq();Iq();Cq();Sq();zq();aq();mq();Vq();vq();Nq();oq();_q();gq();dq();bq();uq()});import{c as nq}from"react/compiler-runtime";import{createContext as tq,useContext as Lq}from"react";import{jsxDEV as eq}from"react/jsx-dev-runtime";function U6(){let w=Lq(e);if(!w)throw Error("useMcpReconnect must be used within MCPConnectionManager");return w.reconnectMcpServer}function Q6(){let w=Lq(e);if(!w)throw Error("useMcpToggleEnabled must be used within MCPConnectionManager");return w.toggleMcpServer}function l6(w){let k=nq(6),{children:X,dynamicMcpConfig:v,isStrictMcpConfig:Z}=w,{reconnectMcpServer:D,toggleMcpServer:Y}=Wq(v,Z),b;if(k[0]!==D||k[1]!==Y)b={reconnectMcpServer:D,toggleMcpServer:Y},k[0]=D,k[1]=Y,k[2]=b;else b=k[2];let u=b,N;if(k[3]!==X||k[4]!==u)N=eq(e.Provider,{value:u,children:X},void 0,!1,void 0,this),k[3]=X,k[4]=u,k[5]=N;else N=k[5];return N}var e;var q6=l(()=>{yq();e=tq(null)});
3
3
  export{_q as dd,U6 as ed,Q6 as fd,l6 as gd,q6 as hd};
@@ -1,3 +1,3 @@
1
1
  // @bun
2
- import{iS as $,kS as m,pS as L}from"./cli-br6zjh6x.js";import{F1 as M,Q3 as H,j1 as P,u3 as Q,x3 as V}from"./cli-msmzt4c3.js";import{A8 as k,E8 as Z,J8 as D,x8 as Y}from"./cli-4ewb3q42.js";import{B9 as X,C9 as R}from"./cli-kq16afrr.js";import{fda as F}from"./cli-w1d8n9g3.js";import S from"axios";async function E(){try{let{accessToken:B,orgUUID:z}=await $(),J=`${X().BASE_API_URL}/api/oauth/organizations/${z}/overage_credit_grant`;return(await S.get(J,{headers:m(B)})).data}catch(B){return Z(B),null}}function O(){let B=P()?.organizationUuid;if(!B)return null;let z=V().overageCreditGrantCache?.[B];if(!z)return null;if(Date.now()-z.timestamp>q)return null;return z.info}function x(){let B=P()?.organizationUuid;if(!B)return;let z=V().overageCreditGrantCache;if(!z||!(B in z))return;Q((J)=>{let K={...J.overageCreditGrantCache};return delete K[B],{...J,overageCreditGrantCache:K}})}async function I(){if(Y())return;let B=P()?.organizationUuid;if(!B)return;let z=await E();if(!z)return;Q((J)=>{let K=J.overageCreditGrantCache?.[B],N=K?.info,W=N&&N.available===z.available&&N.eligible===z.eligible&&N.granted===z.granted&&N.amount_minor_units===z.amount_minor_units&&N.currency===z.currency;if(W&&K&&Date.now()-K.timestamp<=q)return J;let w={info:W?N:z,timestamp:Date.now()};return{...J,overageCreditGrantCache:{...J.overageCreditGrantCache,[B]:w}}})}function C(B){if(B.amount_minor_units==null||!B.currency)return null;if(B.currency.toUpperCase()==="USD"){let z=B.amount_minor_units/100;return Number.isInteger(z)?`$${z}`:`$${z.toFixed(2)}`}return null}var q=3600000;var _=F(()=>{R();M();H();D();k();L()});
2
+ import{iS as $,kS as m,pS as L}from"./cli-ceas97gw.js";import{F1 as M,Q3 as H,j1 as P,u3 as Q,x3 as V}from"./cli-192xnkcx.js";import{C8 as k,G8 as Z,L8 as D,z8 as Y}from"./cli-8kpqq0ea.js";import{D9 as X,E9 as R}from"./cli-zxe1a0ey.js";import{hda as F}from"./cli-qwx84m9c.js";import S from"axios";async function E(){try{let{accessToken:B,orgUUID:z}=await $(),J=`${X().BASE_API_URL}/api/oauth/organizations/${z}/overage_credit_grant`;return(await S.get(J,{headers:m(B)})).data}catch(B){return Z(B),null}}function O(){let B=P()?.organizationUuid;if(!B)return null;let z=V().overageCreditGrantCache?.[B];if(!z)return null;if(Date.now()-z.timestamp>q)return null;return z.info}function x(){let B=P()?.organizationUuid;if(!B)return;let z=V().overageCreditGrantCache;if(!z||!(B in z))return;Q((J)=>{let K={...J.overageCreditGrantCache};return delete K[B],{...J,overageCreditGrantCache:K}})}async function I(){if(Y())return;let B=P()?.organizationUuid;if(!B)return;let z=await E();if(!z)return;Q((J)=>{let K=J.overageCreditGrantCache?.[B],N=K?.info,W=N&&N.available===z.available&&N.eligible===z.eligible&&N.granted===z.granted&&N.amount_minor_units===z.amount_minor_units&&N.currency===z.currency;if(W&&K&&Date.now()-K.timestamp<=q)return J;let w={info:W?N:z,timestamp:Date.now()};return{...J,overageCreditGrantCache:{...J.overageCreditGrantCache,[B]:w}}})}function C(B){if(B.amount_minor_units==null||!B.currency)return null;if(B.currency.toUpperCase()==="USD"){let z=B.amount_minor_units/100;return Number.isInteger(z)?`$${z}`:`$${z.toFixed(2)}`}return null}var q=3600000;var _=F(()=>{R();M();H();D();k();L()});
3
3
  export{O as mg,x as ng,I as og,C as pg,_ as qg};
@@ -1,3 +1,3 @@
1
1
  // @bun
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}`)}
2
+ import{IT as Y,Q3 as j,cU as U,u3 as W,x3 as V}from"./cli-192xnkcx.js";import{K6 as _,O6 as $,P6 as T}from"./cli-fdjfk8yq.js";import{C7 as D,b7 as Z,c7 as w,d7 as k}from"./cli-yb5m6jwq.js";import{A_ as M,x_ as N}from"./cli-awb77t95.js";import{dda as O,m$ as X}from"./cli-tafg3e9w.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{JS as F,LS as r}from"./cli-gtm212j6.js";import{QS as h,RS as y,VS as zK}from"./cli-0qt9btbe.js";import{D5 as z,E5 as YK}from"./cli-pgg33dhw.js";import{G7 as j,I7 as i}from"./cli-p0vh69b9.js";import{a9 as u,b9 as g,d9 as m,g9 as GK}from"./cli-350pymj4.js";import{v_ as M,y_ as s}from"./cli-hke6r0q8.js";import{F_ as S,S_ as p}from"./cli-tq5z9qv3.js";import{fda as W}from"./cli-w1d8n9g3.js";function R($){return[[...$,...n],$]}var n;var T=W(()=>{n=["-i","https://pypi.tuna.tsinghua.edu.cn/simple/","--trusted-host","pypi.tuna.tsinghua.edu.cn"]});import{createHash as a}from"crypto";import{readFile as U,mkdir as o,access as l,writeFile as D}from"fs/promises";import G from"path";import{fileURLToPath as t}from"url";function KK(){if(!k)return;return{...process.env,PYTHONIOENCODING:"utf-8",PYTHONUTF8:"1"}}function B(){return k?G.join(O,"Scripts","python.exe"):G.join(O,"bin","python3")}async function N($){try{return await l($),!0}catch{return!1}}async function E($,K,X){let{code:J,stdout:Q,stderr:Y}=await j($,K,{useCwd:!1});if(J!==0)throw Error(`${X} failed with code ${J}: ${Y||Q||"unknown error"}`);return Q}async function XK($,K,X=(J)=>j(B(),J,{useCwd:!1})){let J="";for(let Q of R($)){let{code:Y,stdout:q,stderr:d}=await X(Q);if(Y===0)return;if(!J)J=`${K} failed with code ${Y}: ${d||q||"unknown error"}`}throw Error(J||`${K} failed`)}async function $K($,K=XK){await K(["-m","pip","install","--upgrade","pip"],"pip upgrade"),await K(["-m","pip","install","-r",$],"python dependency install")}async function ZK(){let $=await F();if($.pythonPath)return $.pythonPath;return k?"python":"python3"}async function JK(){await o(V,{recursive:!0});let $=k?"requirements-win.txt":"requirements.txt",K=G.join(v,"runtime",$),X=G.join(v,"runtime",x);if(await N(K))await D(I,await U(K,"utf8"),"utf8");if(await N(X))await D(b,await U(X,"utf8"),"utf8")}async function QK(){if(A)return A;A=(async()=>{if(await JK(),!await N(B())){M("creating runtime venv at %s",{level:"debug"});let Q=await ZK();await E(Q,["-m","venv",O],"python venv creation")}let $=k?G.join(O,"Scripts","pip.exe"):G.join(O,"bin","pip");if(!await N($))M("bootstrapping pip with ensurepip",{level:"debug"}),await E(B(),["-m","ensurepip","--upgrade"],"ensurepip");let K=await U(I,"utf8"),X=a("sha256").update(K).digest("hex"),J="";try{J=(await U(C,"utf8")).trim()}catch{}if(J!==X)M("installing python runtime dependencies",{level:"debug"}),await $K(I),await D(C,`${X}
2
+ import{JS as F,LS as r}from"./cli-3hrmwgsv.js";import{QS as h,RS as y,VS as zK}from"./cli-fz053waw.js";import{D5 as z,E5 as YK}from"./cli-hpxspent.js";import{I7 as j,K7 as i}from"./cli-7wxv39ry.js";import{c9 as u,d9 as g,f9 as m,i9 as GK}from"./cli-z02gsrtd.js";import{A_ as s,x_ as M}from"./cli-awb77t95.js";import{H_ as S,U_ as p}from"./cli-q8zmmp6z.js";import{hda as W}from"./cli-qwx84m9c.js";function R($){return[[...$,...n],$]}var n;var T=W(()=>{n=["-i","https://pypi.tuna.tsinghua.edu.cn/simple/","--trusted-host","pypi.tuna.tsinghua.edu.cn"]});import{createHash as a}from"crypto";import{readFile as U,mkdir as o,access as l,writeFile as D}from"fs/promises";import G from"path";import{fileURLToPath as t}from"url";function KK(){if(!k)return;return{...process.env,PYTHONIOENCODING:"utf-8",PYTHONUTF8:"1"}}function B(){return k?G.join(O,"Scripts","python.exe"):G.join(O,"bin","python3")}async function N($){try{return await l($),!0}catch{return!1}}async function E($,K,X){let{code:J,stdout:Q,stderr:Y}=await j($,K,{useCwd:!1});if(J!==0)throw Error(`${X} failed with code ${J}: ${Y||Q||"unknown error"}`);return Q}async function XK($,K,X=(J)=>j(B(),J,{useCwd:!1})){let J="";for(let Q of R($)){let{code:Y,stdout:q,stderr:d}=await X(Q);if(Y===0)return;if(!J)J=`${K} failed with code ${Y}: ${d||q||"unknown error"}`}throw Error(J||`${K} failed`)}async function $K($,K=XK){await K(["-m","pip","install","--upgrade","pip"],"pip upgrade"),await K(["-m","pip","install","-r",$],"python dependency install")}async function ZK(){let $=await F();if($.pythonPath)return $.pythonPath;return k?"python":"python3"}async function JK(){await o(V,{recursive:!0});let $=k?"requirements-win.txt":"requirements.txt",K=G.join(v,"runtime",$),X=G.join(v,"runtime",x);if(await N(K))await D(I,await U(K,"utf8"),"utf8");if(await N(X))await D(b,await U(X,"utf8"),"utf8")}async function QK(){if(A)return A;A=(async()=>{if(await JK(),!await N(B())){M("creating runtime venv at %s",{level:"debug"});let Q=await ZK();await E(Q,["-m","venv",O],"python venv creation")}let $=k?G.join(O,"Scripts","pip.exe"):G.join(O,"bin","pip");if(!await N($))M("bootstrapping pip with ensurepip",{level:"debug"}),await E(B(),["-m","ensurepip","--upgrade"],"ensurepip");let K=await U(I,"utf8"),X=a("sha256").update(K).digest("hex"),J="";try{J=(await U(C,"utf8")).trim()}catch{}if(J!==X)M("installing python runtime dependencies",{level:"debug"}),await $K(I),await D(C,`${X}
3
3
  `,"utf8")})();try{await A}catch($){throw A=void 0,$}}async function Z($,K={}){await QK();let{code:X,stdout:J,stderr:Q}=await j(B(),[b,$,"--payload",JSON.stringify(K)],{useCwd:!1,env:KK()});if(X!==0&&!J.trim())throw Error(Q||`Python helper ${$} failed with code ${X}`);let Y;try{Y=JSON.parse(J)}catch{throw Error(Q||J||`Python helper ${$} returned invalid JSON`)}if(!Y.ok)throw Error(Y.error?.message||`Python helper ${$} failed`);return Y.result}var e,v,V,O,C,k,I,x,b,A;var H=W(()=>{i();s();p();T();r();e=G.dirname(t(import.meta.url)),v=G.resolve(e,"../../.."),V=G.join(S(),".runtime"),O=G.join(V,"venv"),C=G.join(V,"requirements.sha256"),k=process.platform==="win32",I=G.join(V,"requirements.txt"),x=k?"win_helper.py":"mac_helper.py",b=G.join(V,x)});function f($,K,X){let J=Math.round($*X),Q=Math.round(K*X);return y(J,Q,h)}function w($){return{...$,displayId:$.displayId??$.id,label:$.label??$.name}}async function AK(){return Z("read_clipboard",{})}async function OK($){await Z("write_clipboard",{text:$})}async function c(){if(process.platform==="win32")return Z("read_clipboard",{});return AK()}async function L($){if(process.platform==="win32"){await Z("write_clipboard",{text:$});return}await OK($)}async function VK($){let K;try{K=await c()}catch{}try{if(await L($),process.platform==="darwin")await z(40),await Z("paste_clipboard",{}),await z(180);else await Z("key",{keySequence:"ctrl+v",repeat:1}),await z(100)}finally{if(typeof K==="string")try{await L(K)}catch{}}}function CK($){if(!u())throw Error(`createCliExecutor called on ${process.platform}. Computer control is only supported on macOS and Windows.`);return{capabilities:{...m(),hostBundleId:kK},async prepareForAction(K,X){return Z("prepare_for_action",{})},async previewHideSet(K,X){return Z("preview_hide_set",{})},async getDisplaySize(K){return w(await Z("get_display_size",{displayId:K}))},async listDisplays(){return(await Z("list_displays",{})).map((X)=>w(X))},async findWindowDisplays(K){return Z("find_window_displays",{bundleIds:K})},async resolvePrepareCapture(K){let X=await this.getDisplaySize(K.preferredDisplayId),[J,Q]=f(X.width,X.height,X.scaleFactor),Y=await Z("resolve_prepare_capture",{preferredDisplayId:K.preferredDisplayId,targetWidth:J,targetHeight:Q,jpegQuality:P});return{...Y,display:w(Y.display),resolvedDisplayId:Y.resolvedDisplayId??Y.displayId}},async screenshot(K){let X=await this.getDisplaySize(K.displayId),[J,Q]=f(X.width,X.height,X.scaleFactor);return await Z("screenshot",{displayId:K.displayId,targetWidth:J,targetHeight:Q,jpegQuality:P})},async zoom(K,X,J){let Q=await this.getDisplaySize(J),[Y,q]=f(K.w,K.h,Q.scaleFactor);return Z("zoom",{x:K.x,y:K.y,width:K.w,height:K.h,targetWidth:Y,targetHeight:q})},async key(K,X){await Z("key",{keySequence:K,repeat:X??1})},async holdKey(K,X){await Z("hold_key",{keyNames:K,durationMs:X})},async type(K,X){if(X.viaClipboard){await VK(K);return}await Z("type",{text:K})},readClipboard:c,writeClipboard:L,async click(K,X,J,Q,Y){await Z("click",{x:K,y:X,button:J,count:Q,modifiers:Y}),await z(_)},async mouseDown(){await Z("mouse_down",{})},async mouseUp(){await Z("mouse_up",{})},async getCursorPosition(){return Z("cursor_position",{})},async drag(K,X){await Z("drag",{from:K,to:X}),await z(_)},async moveMouse(K,X){await Z("move_mouse",{x:K,y:X}),await z(_)},async scroll(K,X,J,Q){await Z("scroll",{x:K,y:X,deltaX:J,deltaY:Q})},async getFrontmostApp(){return Z("frontmost_app",{})},async appUnderPoint(K,X){return Z("app_under_point",{x:K,y:X})},async listInstalledApps(){return Z("list_installed_apps",{})},async listRunningApps(){return Z("list_running_apps",{})},async openApp(K){await Z("open_app",{bundleId:K})}}}async function EK($){return}var P=0.75,_=50,kK;var MK=W(()=>{zK();YK();GK();H();kK=process.env.CC_HAHA_COMPUTER_USE_HOST_BUNDLE_ID||g});
4
4
  export{Z as zS,H as AS,CK as BS,EK as CS,MK as DS};
@@ -1,5 +1,5 @@
1
1
  // @bun
2
- import{Ld as g,Rd as Nq}from"./cli-66jj9zj3.js";import{CD as b,Ch as A,DD as vq,Eh as D,Fh as Rq,GD as Jq,Gh as h,HD as Qq,Hh as S,Ih as m,JD as Dq,Jh as Aq,KD as y,LD as Xq,MC as v,MD as Yq,Mi as l,NC as P,ND as $q,OD as zq,Oi as wq,PC as jq,PD as c,SD as Eq,dD as e,gi as i,hi as Fq,jD as qq,kD as I,oD as Cq,pD as O,qD as Gq,sD as d,tD as Hq,tx as n,ux as Oq,wh as t,yh as Mq,zD as Lq}from"./cli-me4e2p3e.js";import{BW as L,NW as Tq,WV as V,cW as Bq,zW as F}from"./cli-msmzt4c3.js";import{E8 as s,J8 as _q}from"./cli-4ewb3q42.js";import{W9 as p,Z9 as N,b_ as Wq,l_ as a,p_ as Kq}from"./cli-hke6r0q8.js";import{bda as Uq,k$ as f}from"./cli-3ac555qw.js";import{fda as xq}from"./cli-w1d8n9g3.js";import{dirname as Vq,join as o}from"path";function r(q){if(!k.includes(q))throw Error(`Invalid scope "${q}". Must be one of: ${k.join(", ")}`)}function QG(q){return k.includes(q)}function Zq(q){return q==="project"||q==="local"?f():void 0}function XG(q){return h(F("projectSettings")?.enabledPlugins?.[q])}function bq(q){let H=q.includes("@"),G=["local","project","user"];for(let X of G){let J=F(D(X))?.enabledPlugins;if(!J)continue;for(let Y of Object.keys(J))if(H?Y===q:Y.startsWith(`${q}@`))return{pluginId:Y,scope:X}}return null}function yq(q,H){let{name:G,marketplace:X}=A(q);return H.find((J)=>{if(J.name===q||J.name===G)return!0;if(X&&J.source)return J.name===G&&J.source.includes(`@${X}`);return!1})}function kq(q){let{name:H}=A(q),G=O();if(G.plugins[q]?.length)return{pluginId:q,pluginName:H};let X=Object.keys(G.plugins).find((J)=>{let{name:Y}=A(J);return Y===H&&(G.plugins[J]?.length??0)>0});if(X)return{pluginId:X,pluginName:H};return null}function fq(q){let G=O().plugins[q];if(!G||G.length===0)return{scope:"user"};let X=f(),J=G.find((Z)=>Z.scope==="local"&&Z.projectPath===X);if(J)return{scope:J.scope,projectPath:J.projectPath};let Y=G.find((Z)=>Z.scope==="project"&&Z.projectPath===X);if(Y)return{scope:Y.scope,projectPath:Y.projectPath};let z=G.find((Z)=>Z.scope==="user");if(z)return{scope:z.scope};return{scope:G[0].scope,projectPath:G[0].projectPath}}async function YG(q,H="user"){r(H);let{name:G,marketplace:X}=A(q),J,Y,z;if(X){let $=await I(q);if($)J=$.entry,Y=X,z=$.marketplaceInstallLocation}else{let $=await e();for(let[B,K]of Object.entries($))try{let M=(await qq(B)).plugins.find((R)=>R.name===G);if(M){J=M,Y=B,z=K.installLocation;break}}catch(x){s(p(x));continue}}if(!J||!Y){let $=X?`marketplace "${X}"`:"any configured marketplace";return{success:!1,message:`Plugin "${G}" not found in ${$}`}}let Z=J,W=`${Z.name}@${Y}`,Q=await Qq({pluginId:W,entry:Z,scope:H,marketplaceInstallLocation:z});if(!Q.ok)switch(Q.reason){case"local-source-no-location":return{success:!1,message:`Cannot install local plugin "${Q.pluginName}" without marketplace install location`};case"settings-write-failed":return{success:!1,message:`Failed to update settings: ${Q.message}`};case"resolution-failed":return{success:!1,message:Jq(Q.resolution)};case"blocked-by-policy":return{success:!1,message:`Plugin "${Q.pluginName}" is blocked by your organization's policy and cannot be installed`};case"dependency-blocked-by-policy":return{success:!1,message:`Plugin "${Q.pluginName}" depends on "${Q.blockedDependency}", which is blocked by your organization's policy`}}return{success:!0,message:`Successfully installed plugin: ${W} (scope: ${H})${Q.depNote}`,pluginId:W,pluginName:Z.name,scope:H}}async function $G(q,H="user",G=!0){r(H);let{enabled:X,disabled:J}=await c(),Y=[...X,...J],z=yq(q,Y),Z=D(H),W=F(Z),Q,$;if(z)Q=Object.keys(W?.enabledPlugins??{}).find((U)=>U===q||U===z.name||U.startsWith(`${z.name}@`))??(q.includes("@")?q:z.name),$=z.name;else{let U=kq(q);if(!U)return{success:!1,message:`Plugin "${q}" not found in installed plugins`};Q=U.pluginId,$=U.pluginName}let B=Zq(H),x=O().plugins[Q],M=x?.find((U)=>U.scope===H&&U.projectPath===B);if(!M){let{scope:U}=fq(Q);if(U!==H&&x&&x.length>0){if(U==="project")return{success:!1,message:`Plugin "${q}" is enabled at project scope (.claude/settings.json, shared with your team). To disable just for you: claude plugin disable ${q} --scope local`};return{success:!1,message:`Plugin "${q}" is installed in ${U} scope, not ${H}. Use --scope ${U} to uninstall.`}}return{success:!1,message:`Plugin "${q}" is not installed in ${H} scope. Use --scope to specify the correct scope.`}}let R=M.installPath,_={...W?.enabledPlugins};_[Q]=void 0,L(Z,{enabledPlugins:_}),v(),Gq(Q,H,B);let w=O().plugins[Q],j=!w||w.length===0;if(j&&R)await P(R);if(j){if(l(Q),G)await i(Q)}let C=S(Q,Y),E=m(C);return{success:!0,message:`Successfully uninstalled plugin: ${$} (scope: ${H})${E}`,pluginId:Q,pluginName:$,scope:H,reverseDependents:C.length>0?C:void 0}}async function u(q,H,G){let X=H?"enable":"disable";if(t(q)){let{error:_}=L("userSettings",{enabledPlugins:{...F("userSettings")?.enabledPlugins,[q]:H}});if(_)return{success:!1,message:`Failed to ${X} built-in plugin: ${_.message}`};v();let{name:T}=A(q);return{success:!0,message:`Successfully ${X}d built-in plugin: ${T}`,pluginId:q,pluginName:T,scope:"user"}}if(G)r(G);let J,Y,z=bq(q);if(G)if(Y=G,z)J=z.pluginId;else if(q.includes("@"))J=q;else return{success:!1,message:`Plugin "${q}" not found in settings. Use plugin@marketplace format.`};else if(z)J=z.pluginId,Y=z.scope;else if(q.includes("@"))J=q,Y="user";else return{success:!1,message:`Plugin "${q}" not found in any editable settings scope. Use plugin@marketplace format.`};if(H&&n(J))return{success:!1,message:`Plugin "${J}" is blocked by your organization's policy and cannot be enabled`};let Z=D(Y),W=F(Z)?.enabledPlugins?.[J],Q={user:0,project:1,local:2},$=G&&z&&Q[G]>Q[z.scope];if(G&&W===void 0&&z&&z.scope!==G&&!$)return{success:!1,message:`Plugin "${q}" is installed at ${z.scope} scope, not ${G}. Use --scope ${z.scope} or omit --scope to auto-detect.`};let B=G&&!$?h(W):g().has(J);if(H===B)return{success:!1,message:`Plugin "${q}" is already ${H?"enabled":"disabled"}${G?` at ${G} scope`:""}`};let K;if(!H){let{enabled:_,disabled:T}=await c(),w=S(J,[..._,...T]);if(w.length>0)K=w}let{error:x}=L(Z,{enabledPlugins:{...F(Z)?.enabledPlugins,[J]:H}});if(x)return{success:!1,message:`Failed to ${X} plugin: ${x.message}`};v();let{name:M}=A(J),R=m(K);return{success:!0,message:`Successfully ${X}d plugin: ${M} (scope: ${Y})${R}`,pluginId:J,pluginName:M,scope:Y,reverseDependents:K}}async function zG(q,H){return u(q,!0,H)}async function ZG(q,H){return u(q,!1,H)}async function xG(){let q=g();if(q.size===0)return{success:!0,message:"No enabled plugins to disable"};let H=[],G=[];for(let[X]of q){let J=await u(X,!1);if(J.success)H.push(X);else G.push(`${X}: ${J.message}`)}if(G.length>0)return{success:!1,message:`Disabled ${H.length} ${V(H.length,"plugin")}, ${G.length} failed:
2
+ import{Ld as g,Rd as Nq}from"./cli-sbm8tsyq.js";import{CD as b,Ch as A,DD as vq,Eh as D,Fh as Rq,GD as Jq,Gh as h,HD as Qq,Hh as S,Ih as m,JD as Dq,Jh as Aq,KD as y,LD as Xq,MC as v,MD as Yq,Mi as l,NC as P,ND as $q,OD as zq,Oi as wq,PC as jq,PD as c,SD as Eq,dD as e,gi as i,hi as Fq,jD as qq,kD as I,oD as Cq,pD as O,qD as Gq,sD as d,tD as Hq,tx as n,ux as Oq,wh as t,yh as Mq,zD as Lq}from"./cli-b3k8arn1.js";import{BW as L,NW as Tq,WV as V,cW as Bq,zW as F}from"./cli-192xnkcx.js";import{G8 as s,L8 as _q}from"./cli-8kpqq0ea.js";import{$9 as N,Y9 as p,d_ as Wq,n_ as a,r_ as Kq}from"./cli-awb77t95.js";import{dda as Uq,m$ as f}from"./cli-tafg3e9w.js";import{hda as xq}from"./cli-qwx84m9c.js";import{dirname as Vq,join as o}from"path";function r(q){if(!k.includes(q))throw Error(`Invalid scope "${q}". Must be one of: ${k.join(", ")}`)}function QG(q){return k.includes(q)}function Zq(q){return q==="project"||q==="local"?f():void 0}function XG(q){return h(F("projectSettings")?.enabledPlugins?.[q])}function bq(q){let H=q.includes("@"),G=["local","project","user"];for(let X of G){let J=F(D(X))?.enabledPlugins;if(!J)continue;for(let Y of Object.keys(J))if(H?Y===q:Y.startsWith(`${q}@`))return{pluginId:Y,scope:X}}return null}function yq(q,H){let{name:G,marketplace:X}=A(q);return H.find((J)=>{if(J.name===q||J.name===G)return!0;if(X&&J.source)return J.name===G&&J.source.includes(`@${X}`);return!1})}function kq(q){let{name:H}=A(q),G=O();if(G.plugins[q]?.length)return{pluginId:q,pluginName:H};let X=Object.keys(G.plugins).find((J)=>{let{name:Y}=A(J);return Y===H&&(G.plugins[J]?.length??0)>0});if(X)return{pluginId:X,pluginName:H};return null}function fq(q){let G=O().plugins[q];if(!G||G.length===0)return{scope:"user"};let X=f(),J=G.find((Z)=>Z.scope==="local"&&Z.projectPath===X);if(J)return{scope:J.scope,projectPath:J.projectPath};let Y=G.find((Z)=>Z.scope==="project"&&Z.projectPath===X);if(Y)return{scope:Y.scope,projectPath:Y.projectPath};let z=G.find((Z)=>Z.scope==="user");if(z)return{scope:z.scope};return{scope:G[0].scope,projectPath:G[0].projectPath}}async function YG(q,H="user"){r(H);let{name:G,marketplace:X}=A(q),J,Y,z;if(X){let $=await I(q);if($)J=$.entry,Y=X,z=$.marketplaceInstallLocation}else{let $=await e();for(let[B,K]of Object.entries($))try{let M=(await qq(B)).plugins.find((R)=>R.name===G);if(M){J=M,Y=B,z=K.installLocation;break}}catch(x){s(p(x));continue}}if(!J||!Y){let $=X?`marketplace "${X}"`:"any configured marketplace";return{success:!1,message:`Plugin "${G}" not found in ${$}`}}let Z=J,W=`${Z.name}@${Y}`,Q=await Qq({pluginId:W,entry:Z,scope:H,marketplaceInstallLocation:z});if(!Q.ok)switch(Q.reason){case"local-source-no-location":return{success:!1,message:`Cannot install local plugin "${Q.pluginName}" without marketplace install location`};case"settings-write-failed":return{success:!1,message:`Failed to update settings: ${Q.message}`};case"resolution-failed":return{success:!1,message:Jq(Q.resolution)};case"blocked-by-policy":return{success:!1,message:`Plugin "${Q.pluginName}" is blocked by your organization's policy and cannot be installed`};case"dependency-blocked-by-policy":return{success:!1,message:`Plugin "${Q.pluginName}" depends on "${Q.blockedDependency}", which is blocked by your organization's policy`}}return{success:!0,message:`Successfully installed plugin: ${W} (scope: ${H})${Q.depNote}`,pluginId:W,pluginName:Z.name,scope:H}}async function $G(q,H="user",G=!0){r(H);let{enabled:X,disabled:J}=await c(),Y=[...X,...J],z=yq(q,Y),Z=D(H),W=F(Z),Q,$;if(z)Q=Object.keys(W?.enabledPlugins??{}).find((U)=>U===q||U===z.name||U.startsWith(`${z.name}@`))??(q.includes("@")?q:z.name),$=z.name;else{let U=kq(q);if(!U)return{success:!1,message:`Plugin "${q}" not found in installed plugins`};Q=U.pluginId,$=U.pluginName}let B=Zq(H),x=O().plugins[Q],M=x?.find((U)=>U.scope===H&&U.projectPath===B);if(!M){let{scope:U}=fq(Q);if(U!==H&&x&&x.length>0){if(U==="project")return{success:!1,message:`Plugin "${q}" is enabled at project scope (.claude/settings.json, shared with your team). To disable just for you: claude plugin disable ${q} --scope local`};return{success:!1,message:`Plugin "${q}" is installed in ${U} scope, not ${H}. Use --scope ${U} to uninstall.`}}return{success:!1,message:`Plugin "${q}" is not installed in ${H} scope. Use --scope to specify the correct scope.`}}let R=M.installPath,_={...W?.enabledPlugins};_[Q]=void 0,L(Z,{enabledPlugins:_}),v(),Gq(Q,H,B);let w=O().plugins[Q],j=!w||w.length===0;if(j&&R)await P(R);if(j){if(l(Q),G)await i(Q)}let C=S(Q,Y),E=m(C);return{success:!0,message:`Successfully uninstalled plugin: ${$} (scope: ${H})${E}`,pluginId:Q,pluginName:$,scope:H,reverseDependents:C.length>0?C:void 0}}async function u(q,H,G){let X=H?"enable":"disable";if(t(q)){let{error:_}=L("userSettings",{enabledPlugins:{...F("userSettings")?.enabledPlugins,[q]:H}});if(_)return{success:!1,message:`Failed to ${X} built-in plugin: ${_.message}`};v();let{name:T}=A(q);return{success:!0,message:`Successfully ${X}d built-in plugin: ${T}`,pluginId:q,pluginName:T,scope:"user"}}if(G)r(G);let J,Y,z=bq(q);if(G)if(Y=G,z)J=z.pluginId;else if(q.includes("@"))J=q;else return{success:!1,message:`Plugin "${q}" not found in settings. Use plugin@marketplace format.`};else if(z)J=z.pluginId,Y=z.scope;else if(q.includes("@"))J=q,Y="user";else return{success:!1,message:`Plugin "${q}" not found in any editable settings scope. Use plugin@marketplace format.`};if(H&&n(J))return{success:!1,message:`Plugin "${J}" is blocked by your organization's policy and cannot be enabled`};let Z=D(Y),W=F(Z)?.enabledPlugins?.[J],Q={user:0,project:1,local:2},$=G&&z&&Q[G]>Q[z.scope];if(G&&W===void 0&&z&&z.scope!==G&&!$)return{success:!1,message:`Plugin "${q}" is installed at ${z.scope} scope, not ${G}. Use --scope ${z.scope} or omit --scope to auto-detect.`};let B=G&&!$?h(W):g().has(J);if(H===B)return{success:!1,message:`Plugin "${q}" is already ${H?"enabled":"disabled"}${G?` at ${G} scope`:""}`};let K;if(!H){let{enabled:_,disabled:T}=await c(),w=S(J,[..._,...T]);if(w.length>0)K=w}let{error:x}=L(Z,{enabledPlugins:{...F(Z)?.enabledPlugins,[J]:H}});if(x)return{success:!1,message:`Failed to ${X} plugin: ${x.message}`};v();let{name:M}=A(J),R=m(K);return{success:!0,message:`Successfully ${X}d plugin: ${M} (scope: ${Y})${R}`,pluginId:J,pluginName:M,scope:Y,reverseDependents:K}}async function zG(q,H){return u(q,!0,H)}async function ZG(q,H){return u(q,!1,H)}async function xG(){let q=g();if(q.size===0)return{success:!0,message:"No enabled plugins to disable"};let H=[],G=[];for(let[X]of q){let J=await u(X,!1);if(J.success)H.push(X);else G.push(`${X}: ${J.message}`)}if(G.length>0)return{success:!1,message:`Disabled ${H.length} ${V(H.length,"plugin")}, ${G.length} failed:
3
3
  ${G.join(`
4
4
  `)}`};return{success:!0,message:`Disabled ${H.length} ${V(H.length,"plugin")}`}}async function UG(q,H){let{name:G,marketplace:X}=A(q),J=X?`${G}@${X}`:q,Y=await I(q);if(!Y)return{success:!1,message:`Plugin "${G}" not found`,pluginId:J,scope:H};let{entry:z,marketplaceInstallLocation:Z}=Y,Q=d().plugins[J];if(!Q||Q.length===0)return{success:!1,message:`Plugin "${G}" is not installed`,pluginId:J,scope:H};let $=Zq(H),B=Q.find((K)=>K.scope===H&&K.projectPath===$);if(!B){let K=$?`${H} (${$})`:H;return{success:!1,message:`Plugin "${G}" is not installed at scope ${K}`,pluginId:J,scope:H}}return hq({pluginId:J,pluginName:G,entry:z,marketplaceInstallLocation:Z,installation:B,scope:H,projectPath:$})}async function hq({pluginId:q,pluginName:H,entry:G,marketplaceInstallLocation:X,installation:J,scope:Y,projectPath:z}){let Z=a(),W=J.version,Q,$,B=!1,K;if(typeof G.source!=="string"){let x=await $q(G.source,{manifest:{name:G.name}});Q=x.path,B=!0,K=x.gitCommitSha,$=await b(q,G.source,x.manifest,x.path,G.version,x.gitCommitSha)}else{let x;try{x=await Z.stat(X)}catch(T){if(N(T))return{success:!1,message:`Marketplace directory not found at ${X}`,pluginId:q,scope:Y};throw T}let M=x.isDirectory()?X:Vq(X);Q=o(M,G.source);try{await Z.stat(Q)}catch(T){if(N(T))return{success:!1,message:`Plugin source not found at ${Q}`,pluginId:q,scope:Y};throw T}let R,_=o(Q,".claude-plugin","plugin.json");try{R=await zq(_,G.name,G.source)}catch{}$=await b(q,G.source,R,Q,G.version)}try{let x=y(q,$),M=Xq(q,$);if(J.version===$||J.installPath===x||J.installPath===M)return{success:!0,message:`${H} is already at the latest version (${$}).`,pluginId:q,newVersion:$,oldVersion:W,alreadyUpToDate:!0,scope:Y};x=await Yq(Q,q,$,G);let _=J.installPath;if(Hq(q,Y,z,x,$,K),_&&_!==x){let j=d();if(!Object.values(j.plugins).some((E)=>E.some((U)=>U.installPath===_)))await P(_)}let T=z?`${Y} (${z})`:Y;return{success:!0,message:`Plugin "${H}" updated from ${W||"unknown"} to ${$} for scope ${T}. Restart to apply changes.`,pluginId:q,newVersion:$,oldVersion:W,scope:Y}}finally{if(B&&Q!==y(q,$))await Z.rm(Q,{recursive:!0,force:!0})}}var k,JG;var Sq=xq(()=>{Uq();Mq();Wq();Kq();_q();jq();Aq();Lq();Cq();Fq();Rq();Dq();Eq();wq();Oq();Nq();vq();Tq();Bq();k=["user","project","local"],JG=["user","project","local","managed"]});
5
5
  export{k as yd,JG as zd,QG as Ad,XG as Bd,fq as Cd,YG as Dd,$G as Ed,zG as Fd,ZG as Gd,xG as Hd,UG as Id,Sq as Jd};
@@ -1,3 +1,3 @@
1
1
  // @bun
2
- import{Z8 as Y}from"./cli-t9jht3kb.js";import{y_ as U}from"./cli-hke6r0q8.js";import{fda as F}from"./cli-w1d8n9g3.js";var O,K;var G=F(()=>{O=Promise.resolve(),K=new Set(["if","then","elif","else","fi","while","until","for","in","do","done","case","esac","function","select"])});async function C(){}async function y(z){if(!z||z.length>V)return null;return null}async function b(z){if(!z||z.length>V)return null;return null}function T(z){if(z.type==="declaration_command"){let J=z.children[0];return J&&q.has(J.text)?[J.text]:[]}let Z=[],$=!1;for(let J of z.children){if(J.type==="variable_assignment")continue;if(J.type==="command_name"||!$&&J.type==="word"){$=!0,Z.push(J.text);continue}if(Q.has(J.type))Z.push(M(J.text));else if(H.has(J.type))break}return Z}function M(z){return z.length>=2&&(z[0]==='"'&&z.at(-1)==='"'||z[0]==="'"&&z.at(-1)==="'")?z.slice(1,-1):z}var V=1e4,q,Q,H,u;var W=F(()=>{Y();U();G();q=new Set(["export","declare","typeset","readonly","local","unset","unsetenv"]),Q=new Set(["word","string","raw_string","number"]),H=new Set(["command_substitution","process_substitution"]);u=Symbol("parse-aborted")});
3
- export{K as O8,G as P8,C as Q8,y as R8,u as S8,b as T8,T as U8,W as V8};
2
+ import{$8 as Y}from"./cli-e5yek4vx.js";import{A_ as U}from"./cli-awb77t95.js";import{hda as F}from"./cli-qwx84m9c.js";var O,K;var G=F(()=>{O=Promise.resolve(),K=new Set(["if","then","elif","else","fi","while","until","for","in","do","done","case","esac","function","select"])});async function C(){}async function y(z){if(!z||z.length>V)return null;return null}async function b(z){if(!z||z.length>V)return null;return null}function T(z){if(z.type==="declaration_command"){let J=z.children[0];return J&&q.has(J.text)?[J.text]:[]}let Z=[],$=!1;for(let J of z.children){if(J.type==="variable_assignment")continue;if(J.type==="command_name"||!$&&J.type==="word"){$=!0,Z.push(J.text);continue}if(Q.has(J.type))Z.push(M(J.text));else if(H.has(J.type))break}return Z}function M(z){return z.length>=2&&(z[0]==='"'&&z.at(-1)==='"'||z[0]==="'"&&z.at(-1)==="'")?z.slice(1,-1):z}var V=1e4,q,Q,H,u;var W=F(()=>{Y();U();G();q=new Set(["export","declare","typeset","readonly","local","unset","unsetenv"]),Q=new Set(["word","string","raw_string","number"]),H=new Set(["command_substitution","process_substitution"]);u=Symbol("parse-aborted")});
3
+ export{K as Q8,G as R8,C as S8,y as T8,u as U8,b as V8,T as W8,W as X8};
@@ -1,3 +1,3 @@
1
1
  // @bun
2
- import{fda as A}from"./cli-w1d8n9g3.js";function C(h){let b;for(let j in h)if(j.startsWith("_PROTO_")){if(b===void 0)b={...h};delete b[j]}return b??h}function D(h){if(x!==null)return;if(x=h,z.length>0){let b=[...z];if(z.length=0,process.env.USER_TYPE==="ant")x.logEvent("analytics_sink_attached",{queued_event_count:b.length});queueMicrotask(()=>{for(let j of b)if(j.async)x.logEventAsync(j.eventName,j.metadata);else x.logEvent(j.eventName,j.metadata)})}}function F(h,b){if(x===null){z.push({eventName:h,metadata:b,async:!1});return}x.logEvent(h,b)}var z,x=null;var B=A(()=>{z=[]});
3
- export{C as W8,D as X8,F as Y8,B as Z8};
2
+ import{hda as A}from"./cli-qwx84m9c.js";function C(h){let b;for(let j in h)if(j.startsWith("_PROTO_")){if(b===void 0)b={...h};delete b[j]}return b??h}function D(h){if(x!==null)return;if(x=h,z.length>0){let b=[...z];if(z.length=0,process.env.USER_TYPE==="ant")x.logEvent("analytics_sink_attached",{queued_event_count:b.length});queueMicrotask(()=>{for(let j of b)if(j.async)x.logEventAsync(j.eventName,j.metadata);else x.logEvent(j.eventName,j.metadata)})}}function F(h,b){if(x===null){z.push({eventName:h,metadata:b,async:!1});return}x.logEvent(h,b)}var z,x=null;var B=A(()=>{z=[]});
3
+ export{C as Y8,D as Z8,F as _8,B as $8};