@unieai/code 0.0.12 → 0.0.14

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 (435) 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-bpg86z4h.js +2 -0
  17. package/dist/chunks/{ResumeConversation-krn9hqb1.js → ResumeConversation-ymc529y6.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-sycqd3xe.js → cli-5c6e6txh.js} +48 -48
  67. package/dist/chunks/{cli-0w4wc1z0.js → cli-5kehgkgh.js} +1 -1
  68. package/dist/chunks/{cli-fghyxar5.js → cli-601zv0wv.js} +1 -1
  69. package/dist/chunks/{cli-r3etpht1.js → cli-609dp2ck.js} +1 -1
  70. package/dist/chunks/{cli-ns0aaggm.js → cli-63wps6p0.js} +1 -1
  71. package/dist/chunks/{cli-m0z3rmf0.js → cli-64x5ghm5.js} +1 -1
  72. package/dist/chunks/{cli-de1hwp88.js → cli-67azkkwm.js} +1 -1
  73. package/dist/chunks/{cli-dbdqrqmt.js → cli-6cqemsm9.js} +1 -1
  74. package/dist/chunks/{cli-27mzrnr8.js → cli-6ee37m6j.js} +1 -1
  75. package/dist/chunks/{cli-mb1qrqw1.js → cli-6qt2xm18.js} +1 -1
  76. package/dist/chunks/{cli-49m97nbg.js → cli-7ed2q42n.js} +1 -1
  77. package/dist/chunks/{cli-s9fhtgmz.js → cli-7jw2qe69.js} +1 -1
  78. package/dist/chunks/cli-7k17xstr.js +3 -0
  79. package/dist/chunks/{cli-61x73ksv.js → cli-7n4d5yzr.js} +1 -1
  80. package/dist/chunks/{cli-p0vh69b9.js → cli-7wxv39ry.js} +2 -2
  81. package/dist/chunks/{cli-15sqp3mq.js → cli-8h10q2x8.js} +1 -1
  82. package/dist/chunks/{cli-yqbvprz7.js → cli-8j0b3b55.js} +1 -1
  83. package/dist/chunks/{cli-akcxtvv9.js → cli-8jym9hp6.js} +1 -1
  84. package/dist/chunks/{cli-4ewb3q42.js → cli-8kpqq0ea.js} +2 -2
  85. package/dist/chunks/{cli-2rw44zfx.js → cli-8xyb31dy.js} +1 -1
  86. package/dist/chunks/cli-8xz7dd7z.js +3 -0
  87. package/dist/chunks/{cli-g5wq5ptg.js → cli-8ykv66e4.js} +1 -1
  88. package/dist/chunks/{cli-jegyadmb.js → cli-8z8d5bgb.js} +1 -1
  89. package/dist/chunks/{cli-cqkne34j.js → cli-93sm9n17.js} +1 -1
  90. package/dist/chunks/{cli-q0156x0d.js → cli-97vx3m99.js} +1 -1
  91. package/dist/chunks/{cli-1jp3rm7n.js → cli-9e8f55fp.js} +1 -1
  92. package/dist/chunks/{cli-2wd8eaac.js → cli-9hqmq5g6.js} +1 -1
  93. package/dist/chunks/{cli-6bxfdgv1.js → cli-9tbmrp89.js} +1 -1
  94. package/dist/chunks/{cli-5dt9yjha.js → cli-9xtyh8c7.js} +1 -1
  95. package/dist/chunks/{cli-sh9w2tbd.js → cli-a1cx6p3g.js} +1 -1
  96. package/dist/chunks/{cli-ja540nr7.js → cli-a1dqnvy2.js} +1 -1
  97. package/dist/chunks/{cli-wt2bfbn0.js → cli-a25jeqs8.js} +1 -1
  98. package/dist/chunks/{cli-x8xgga1a.js → cli-a2d962bq.js} +2 -2
  99. package/dist/chunks/{cli-h120wpk2.js → cli-a826q5zk.js} +1 -1
  100. package/dist/chunks/{cli-k4v08k8t.js → cli-an97yxg9.js} +1 -1
  101. package/dist/chunks/{cli-m12smc5e.js → cli-asc9xmsr.js} +1 -1
  102. package/dist/chunks/{cli-hke6r0q8.js → cli-awb77t95.js} +2 -2
  103. package/dist/chunks/{cli-6yprtw88.js → cli-awe5yg6m.js} +1 -1
  104. package/dist/chunks/{cli-15w3eaed.js → cli-ax0ckqpv.js} +1 -1
  105. package/dist/chunks/{cli-mbp8f3f3.js → cli-b29enbbc.js} +1 -1
  106. package/dist/chunks/{cli-me4e2p3e.js → cli-b3k8arn1.js} +25 -25
  107. package/dist/chunks/{cli-c22wpdk4.js → cli-b5z57an7.js} +1 -1
  108. package/dist/chunks/{cli-0dc8sd37.js → cli-b8j8bm5m.js} +1 -1
  109. package/dist/chunks/{cli-51720d82.js → cli-bdgrtpsy.js} +2 -2
  110. package/dist/chunks/{cli-yrwenjxs.js → cli-bfm3f0yw.js} +1 -1
  111. package/dist/chunks/{cli-764c4bsm.js → cli-bj0csmzs.js} +1 -1
  112. package/dist/chunks/{cli-ms5j6fff.js → cli-bnr79ddy.js} +1 -1
  113. package/dist/chunks/{cli-a52ra30v.js → cli-bpj9na88.js} +1 -1
  114. package/dist/chunks/{cli-v9f860t5.js → cli-brr3bnrj.js} +1 -1
  115. package/dist/chunks/{cli-eyw3czmn.js → cli-bzrat9yd.js} +1 -1
  116. package/dist/chunks/{cli-msw0vv86.js → cli-ca1jmr8f.js} +1 -1
  117. package/dist/chunks/{cli-br6zjh6x.js → cli-ceas97gw.js} +1 -1
  118. package/dist/chunks/{cli-kqv5b8zh.js → cli-cfbfexxj.js} +1 -1
  119. package/dist/chunks/{cli-tckzkegq.js → cli-chvks6bg.js} +1 -1
  120. package/dist/chunks/cli-cmh6qwg8.js +3 -0
  121. package/dist/chunks/{cli-khs3sj9k.js → cli-d1w21hsm.js} +1 -1
  122. package/dist/chunks/{cli-z5e72gsd.js → cli-d2pn0xfj.js} +1 -1
  123. package/dist/chunks/{cli-fm14mg07.js → cli-df5r5xrp.js} +1 -1
  124. package/dist/chunks/{cli-2rwjx3w0.js → cli-dx0pk7k2.js} +1 -1
  125. package/dist/chunks/{cli-p2cqnrnp.js → cli-dy9qrrps.js} +1 -1
  126. package/dist/chunks/{cli-q46epwyh.js → cli-e3q6b1cv.js} +1 -1
  127. package/dist/chunks/{cli-fs7yttfp.js → cli-e4a4fjx9.js} +2 -2
  128. package/dist/chunks/{cli-t9jht3kb.js → cli-e5yek4vx.js} +2 -2
  129. package/dist/chunks/{cli-5f0w3fy6.js → cli-e9t5kfxm.js} +1 -1
  130. package/dist/chunks/{cli-1n8he7s8.js → cli-eh1wx76n.js} +1 -1
  131. package/dist/chunks/{cli-d0hzw78c.js → cli-ez2xsd4m.js} +1 -1
  132. package/dist/chunks/{cli-n5s5fnyj.js → cli-fdjfk8yq.js} +2 -2
  133. package/dist/chunks/{cli-rvad3yhg.js → cli-fnt125we.js} +2 -2
  134. package/dist/chunks/{cli-0qt9btbe.js → cli-fz053waw.js} +1 -1
  135. package/dist/chunks/{cli-89x414pj.js → cli-g2s3391y.js} +1 -1
  136. package/dist/chunks/cli-geka8fb7.js +3 -0
  137. package/dist/chunks/{cli-73jf8hyz.js → cli-gfweqbpz.js} +1 -1
  138. package/dist/chunks/{cli-tfv2qcgf.js → cli-gypyp608.js} +1 -1
  139. package/dist/chunks/{cli-1ny2386w.js → cli-h2t2hyz7.js} +1 -1
  140. package/dist/chunks/{cli-zp8s7q5w.js → cli-hp5gs22f.js} +1 -1
  141. package/dist/chunks/{cli-pgg33dhw.js → cli-hpxspent.js} +1 -1
  142. package/dist/chunks/{cli-ezs5sney.js → cli-hrmzaf5d.js} +2 -2
  143. package/dist/chunks/{cli-8dmy2s42.js → cli-hs2k9997.js} +1 -1
  144. package/dist/chunks/{cli-19ncan36.js → cli-j403r21v.js} +1 -1
  145. package/dist/chunks/{cli-wn2srq2e.js → cli-j4r75xsd.js} +1 -1
  146. package/dist/chunks/{cli-5vsnhp97.js → cli-jmq1x925.js} +1 -1
  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-6h6y0rzf.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/dist/chunks/App-s5ex5j86.js +0 -2
  340. package/dist/chunks/ApproveApiKey-b4z6h2gn.js +0 -2
  341. package/dist/chunks/BypassPermissionsModeDialog-jbg97eja.js +0 -2
  342. package/dist/chunks/ClaudeMdExternalIncludesDialog-gqmed78y.js +0 -2
  343. package/dist/chunks/ConsoleOAuthFlow-yh72vs8j.js +0 -2
  344. package/dist/chunks/Doctor-k08ggw2j.js +0 -2
  345. package/dist/chunks/Grove-tkkskg8n.js +0 -2
  346. package/dist/chunks/InvalidSettingsDialog-tnd5hymg.js +0 -2
  347. package/dist/chunks/REPL-hjjz80kq.js +0 -2
  348. package/dist/chunks/ToolSearchTool-w4t61c7d.js +0 -2
  349. package/dist/chunks/TungstenTool-rv96z549.js +0 -2
  350. package/dist/chunks/agents-3exybgtb.js +0 -4
  351. package/dist/chunks/ant-claude-for-chrome-mcp-712xg07f.js +0 -2
  352. package/dist/chunks/api-z8svc3xt.js +0 -2
  353. package/dist/chunks/asciicast-vzd7qjbb.js +0 -2
  354. package/dist/chunks/auth-gbyfq0g2.js +0 -2
  355. package/dist/chunks/backgroundHousekeeping-m8gthtkh.js +0 -2
  356. package/dist/chunks/caches-fbggdeq7.js +0 -2
  357. package/dist/chunks/clear-fwad6zxy.js +0 -2
  358. package/dist/chunks/cli-55jdp9ky.js +0 -3
  359. package/dist/chunks/cli-78apjp3t.js +0 -3
  360. package/dist/chunks/cli-8hxz2qs6.js +0 -3
  361. package/dist/chunks/cli-95wg48h9.js +0 -3
  362. package/dist/chunks/cli-edkqs0ge.js +0 -3
  363. package/dist/chunks/cli-fakdskp6.js +0 -3
  364. package/dist/chunks/cli-h4dspaac.js +0 -3
  365. package/dist/chunks/cli-przq3zk6.js +0 -3
  366. package/dist/chunks/client-dkpgx025.js +0 -2
  367. package/dist/chunks/color-zrm6r755.js +0 -2
  368. package/dist/chunks/commitAttribution-3y6pessz.js +0 -2
  369. package/dist/chunks/common-0bee37at.js +0 -2
  370. package/dist/chunks/config-hbq35b68.js +0 -2
  371. package/dist/chunks/context-noninteractive-7wbe6qvd.js +0 -2
  372. package/dist/chunks/conversation-fwnfp0p5.js +0 -2
  373. package/dist/chunks/cost-56r5xxqy.js +0 -5
  374. package/dist/chunks/createSession-m5y8fjy4.js +0 -2
  375. package/dist/chunks/desktop-z3jqgnw7.js +0 -2
  376. package/dist/chunks/detectRepository-w6wawmmg.js +0 -2
  377. package/dist/chunks/detection-1yb2c7hh.js +0 -2
  378. package/dist/chunks/doctor-hgwjdraj.js +0 -2
  379. package/dist/chunks/executor-s42mdmqs.js +0 -2
  380. package/dist/chunks/exit-kyrjy6hb.js +0 -2
  381. package/dist/chunks/extra-usage-noninteractive-byts9mme.js +0 -2
  382. package/dist/chunks/extra-usage-xh1mkrca.js +0 -2
  383. package/dist/chunks/fast-g4aa49jf.js +0 -2
  384. package/dist/chunks/feedback-m5r66qd5.js +0 -2
  385. package/dist/chunks/firstPartyEventLogger-mthxtmgc.js +0 -2
  386. package/dist/chunks/gates-yhakv4vb.js +0 -2
  387. package/dist/chunks/git-c39vd9dm.js +0 -2
  388. package/dist/chunks/goal-24dr7fwz.js +0 -2
  389. package/dist/chunks/hooks-8dh43zmv.js +0 -2
  390. package/dist/chunks/index-v875zpde.js +0 -2
  391. package/dist/chunks/install-slack-app-3rde0k08.js +0 -2
  392. package/dist/chunks/keybindings-6t5f69wx.js +0 -3
  393. package/dist/chunks/loadAgentsDir-f8shfnw3.js +0 -2
  394. package/dist/chunks/loadPluginHooks-mdwjrjtp.js +0 -2
  395. package/dist/chunks/login-34j3xdr9.js +0 -2
  396. package/dist/chunks/logout-yew8mymc.js +0 -2
  397. package/dist/chunks/parser-4y4b0e6b.js +0 -2
  398. package/dist/chunks/plan-w0beh9bh.js +0 -2
  399. package/dist/chunks/plugin-6nwptn3s.js +0 -2
  400. package/dist/chunks/pluginStartupCheck-0nzv1ae9.js +0 -2
  401. package/dist/chunks/privacy-settings-m0mfykh0.js +0 -2
  402. package/dist/chunks/process-26nny2p0.js +0 -2
  403. package/dist/chunks/prompt-gw1e1gef.js +0 -2
  404. package/dist/chunks/prompt-xgw2hxrc.js +0 -2
  405. package/dist/chunks/provider-prompt-s26vatcw.js +0 -2
  406. package/dist/chunks/registry-fp7x9ekd.js +0 -2
  407. package/dist/chunks/release-notes-76y1r2s1.js +0 -6
  408. package/dist/chunks/reload-plugins-z0fepkva.js +0 -3
  409. package/dist/chunks/rename-fdjzyjar.js +0 -2
  410. package/dist/chunks/sandbox-adapter-craea9vm.js +0 -2
  411. package/dist/chunks/sessionFileAccessHooks-5jbvwabj.js +0 -2
  412. package/dist/chunks/settings-s2bcajs6.js +0 -2
  413. package/dist/chunks/setup-fwcttwbm.js +0 -2
  414. package/dist/chunks/sinks-wd4ccgbf.js +0 -2
  415. package/dist/chunks/startupProfiler-x5zbs2j7.js +0 -2
  416. package/dist/chunks/state-qpmfrvsv.js +0 -2
  417. package/dist/chunks/status-78yks3jw.js +0 -2
  418. package/dist/chunks/stickers-bdp8w2gr.js +0 -2
  419. package/dist/chunks/subprocessEnv-s797f06r.js +0 -2
  420. package/dist/chunks/tasks-63qaca0z.js +0 -2
  421. package/dist/chunks/teammateModeSnapshot-ae9r29dy.js +0 -2
  422. package/dist/chunks/teleport-es58k4xz.js +0 -2
  423. package/dist/chunks/terminalSetup-gyh5z5e2.js +0 -2
  424. package/dist/chunks/theme-qrhbaht6.js +0 -2
  425. package/dist/chunks/thinkback-5bs7ezv5.js +0 -2
  426. package/dist/chunks/thinkback-play-1dy160y5.js +0 -2
  427. package/dist/chunks/toolSearch-6cv284b7.js +0 -2
  428. package/dist/chunks/trustedDevice-77ketbgg.js +0 -2
  429. package/dist/chunks/upgrade-nft7c1yk.js +0 -2
  430. package/dist/chunks/usage-s5qgc615.js +0 -2
  431. package/dist/chunks/util-1geb93kp.js +0 -2
  432. package/dist/chunks/utils-6sb44pg8.js +0 -2
  433. package/dist/chunks/vim-kq91w44a.js +0 -2
  434. package/dist/chunks/worktree-0af6b1mt.js +0 -2
  435. package/dist/chunks/worktreeModeEnabled-ea6wb7aj.js +0 -2
@@ -1,5 +1,5 @@
1
1
  // @bun
2
- import{Fv as A,Gv as d,Jg as G,Mg as p,VE as i,gE as C,hl as F,iC as k,iE as _,il as r,jC as L,kC as l}from"./cli-me4e2p3e.js";import{PN as U,RN as u}from"./cli-764c4bsm.js";import{wT as O,xT as h}from"./cli-msmzt4c3.js";import{$9 as b,b_ as I,l_ as y,p_ as D}from"./cli-hke6r0q8.js";import{F_ as j,S_ as T}from"./cli-tq5z9qv3.js";import{fda as N}from"./cli-w1d8n9g3.js";import{join as M}from"path";function f(){return`IMPORTANT: This message and these instructions are NOT part of the actual user conversation. Do NOT include any references to "documentation updates", "magic docs", or these update instructions in the document content.
2
+ import{Fv as A,Gv as d,Jg as G,Mg as p,VE as i,gE as C,hl as F,iC as k,iE as _,il as r,jC as L,kC as l}from"./cli-b3k8arn1.js";import{PN as U,RN as u}from"./cli-bj0csmzs.js";import{wT as O,xT as h}from"./cli-192xnkcx.js";import{b_ as b,d_ as I,n_ as y,r_ as D}from"./cli-awb77t95.js";import{H_ as j,U_ as T}from"./cli-q8zmmp6z.js";import{hda as N}from"./cli-qwx84m9c.js";import{join as M}from"path";function f(){return`IMPORTANT: This message and these instructions are NOT part of the actual user conversation. Do NOT include any references to "documentation updates", "magic docs", or these update instructions in the document content.
3
3
 
4
4
  Based on the user conversation above (EXCLUDING this documentation update instruction message), update the Magic Doc file to incorporate any NEW learnings, insights, or information that would be valuable to preserve.
5
5
 
@@ -1,3 +1,3 @@
1
1
  // @bun
2
- import{Nh as E,Oh as p,Ph as e,ci as S,gh as h,hh as Oq,hi as qq,ih as n,kh as Uq}from"./cli-me4e2p3e.js";import{gV as c,iV as d,lV as u,mV as g,rV as Wq}from"./cli-msmzt4c3.js";import{E8 as D,J8 as r}from"./cli-4ewb3q42.js";import{X9 as W,Y9 as O,Z9 as C,b_ as _,d_ as P,e_ as v,h_ as f,l_ as M,p_ as y,v_ as V,y_ as t}from"./cli-hke6r0q8.js";import{fda as N}from"./cli-w1d8n9g3.js";import{homedir as o}from"os";import{resolve as s}from"path";async function kq(Z){let q=Z.trim(),$=M(),Q=q.match(/^([a-zA-Z0-9._-]+@[^:]+:.+?(?:\.git)?)(#(.+))?$/);if(Q?.[1]){let z=Q[1],G=Q[3];return G?{source:"git",url:z,ref:G}:{source:"git",url:z}}if(q.startsWith("http://")||q.startsWith("https://")){let z=q.match(/^([^#]+)(#(.+))?$/),G=z?.[1]||q,X=z?.[3];if(G.endsWith(".git")||G.includes("/_git/"))return X?{source:"git",url:G,ref:X}:{source:"git",url:G};let Y;try{Y=new URL(G)}catch(J){return{source:"url",url:G}}if(Y.hostname==="github.com"||Y.hostname==="www.github.com"){if(Y.pathname.match(/^\/([^/]+\/[^/]+?)(\/|\.git|$)/)?.[1]){let K=G.endsWith(".git")?G:`${G}.git`;return X?{source:"git",url:K,ref:X}:{source:"git",url:K}}}return{source:"url",url:G}}let x=process.platform==="win32"&&(q.startsWith(".\\")||q.startsWith("..\\")||/^[a-zA-Z]:[/\\]/.test(q));if(q.startsWith("./")||q.startsWith("../")||q.startsWith("/")||q.startsWith("~")||x){let z=s(q.startsWith("~")?q.replace(/^~/,o()):q),G;try{G=await $.stat(z)}catch(X){let Y=O(X);return{error:Y==="ENOENT"?`Path does not exist: ${z}`:`Cannot access path: ${z} (${Y??X})`}}if(G.isFile())if(z.endsWith(".json"))return{source:"file",path:z};else return{error:`File path must point to a .json file (marketplace.json), but got: ${z}`};else if(G.isDirectory())return{source:"directory",path:z};else return{error:`Path is neither a file nor a directory: ${z}`}}if(q.includes("/")&&!q.startsWith("@")){if(q.includes(":"))return null;let z=q.match(/^([^#@]+)(?:[#@](.+))?$/),G=z?.[1]||q,X=z?.[2];return X?{source:"github",repo:G,ref:X}:{source:"github",repo:G}}return null}var a=N(()=>{_();y()});import Qq from"axios";import{randomBytes as Xq}from"crypto";import{readFile as Zq,rename as $q,unlink as Bq,writeFile as Gq}from"fs/promises";import{join as Yq}from"path";function m(){return Yq(S(),Jq)}async function xq(){let Z=m();try{let q=await Zq(Z,{encoding:"utf-8"}),$=v(q);if(typeof $!=="object"||$===null||!("version"in $)||!("fetchedAt"in $)||!("counts"in $))return V("Install counts cache has invalid structure"),null;let Q=$;if(Q.version!==L)return V(`Install counts cache version mismatch (got ${Q.version}, expected ${L})`),null;if(typeof Q.fetchedAt!=="string"||!Array.isArray(Q.counts))return V("Install counts cache has invalid structure"),null;let B=new Date(Q.fetchedAt).getTime();if(Number.isNaN(B))return V("Install counts cache has invalid fetchedAt timestamp"),null;if(!Q.counts.every((G)=>typeof G==="object"&&G!==null&&typeof G.plugin==="string"&&typeof G.unique_installs==="number"))return V("Install counts cache has malformed entries"),null;if(Date.now()-B>Kq)return V("Install counts cache is stale (>24h old)"),null;return{version:Q.version,fetchedAt:Q.fetchedAt,counts:Q.counts}}catch(q){if(O(q)!=="ENOENT")V(`Failed to load install counts cache: ${W(q)}`);return null}}async function zq(Z){let q=m(),$=`${q}.${Xq(8).toString("hex")}.tmp`;try{let Q=S();await M().mkdir(Q);let B=P(Z,null,2);await Gq($,B,{encoding:"utf-8",mode:384}),await $q($,q),V("Install counts cache saved successfully")}catch(Q){D(Q);try{await Bq($)}catch{}}}async function Hq(){V(`Fetching install counts from ${I}`);let Z=performance.now();try{let q=await Qq.get(I,{timeout:1e4});if(!q.data?.plugins||!Array.isArray(q.data.plugins))throw Error("Invalid response format from install counts API");return E("install_counts",I,"success",performance.now()-Z),q.data.plugins}catch(q){throw E("install_counts",I,"failure",performance.now()-Z,p(q)),q}}async function gq(){let Z=await xq();if(Z){V("Using cached install counts"),E("install_counts",I,"cache_hit",0);let q=new Map;for(let $ of Z.counts)q.set($.plugin,$.unique_installs);return q}try{let q=await Hq(),$={version:L,fetchedAt:new Date().toISOString(),counts:q};await zq($);let Q=new Map;for(let B of q)Q.set(B.plugin,B.unique_installs);return Q}catch(q){return D(q),V(`Failed to fetch install counts: ${W(q)}`),null}}function hq(Z){if(Z<1000)return String(Z);if(Z<1e6){let B=(Z/1000).toFixed(1);return B.endsWith(".0")?`${B.slice(0,-2)}K`:`${B}K`}let $=(Z/1e6).toFixed(1);return $.endsWith(".0")?`${$.slice(0,-2)}M`:`${$}M`}var L=1,Jq="install-counts-cache.json",I="https://raw.githubusercontent.com/anthropics/claude-plugins-official/refs/heads/stats/stats/plugin-installs.json",Kq=86400000;var Vq=N(()=>{t();_();y();r();f();e();qq()});import{readdir as vq,readFile as A,stat as Rq}from"fs/promises";import*as H from"path";import{z as Aq}from"zod/v4";function wq(Z){let q=H.basename(Z),$=H.basename(H.dirname(Z));if(q==="plugin.json")return"plugin";if(q==="marketplace.json")return"marketplace";if($===".claude-plugin")return"plugin";return"unknown"}function F(Z){return Z.issues.map((q)=>({path:q.path.join(".")||"root",message:q.message,code:q.code}))}function w(Z,q,$,Q){if(Z.includes(".."))$.push({path:q,message:Q?`Path contains "..": ${Z}. ${Q}`:`Path contains ".." which could be a path traversal attempt: ${Z}`})}function Mq(Z){let q=Z.replace(/^(\.\.\/)+/,"");return`Plugin source paths are resolved relative to the marketplace root (the directory containing .claude-plugin/), not relative to marketplace.json. Use "${q!==Z?`./${q}`:"./plugins/my-plugin"}" instead of "${Z}".`}async function j(Z){let q=[],$=[],Q=H.resolve(Z),B;try{B=await A(Q,{encoding:"utf-8"})}catch(X){let Y=O(X),J;if(Y==="ENOENT")J=`File not found: ${Q}`;else if(Y==="EISDIR")J=`Path is not a file: ${Q}`;else J=`Failed to read file: ${W(X)}`;return{success:!1,errors:[{path:"file",message:J,code:Y}],warnings:[],filePath:Q,fileType:"plugin"}}let x;try{x=v(B)}catch(X){return{success:!1,errors:[{path:"json",message:`Invalid JSON syntax: ${W(X)}`}],warnings:[],filePath:Q,fileType:"plugin"}}if(x&&typeof x==="object"){let X=x;if(X.commands)(Array.isArray(X.commands)?X.commands:[X.commands]).forEach((J,K)=>{if(typeof J==="string")w(J,`commands[${K}]`,q)});if(X.agents)(Array.isArray(X.agents)?X.agents:[X.agents]).forEach((J,K)=>{if(typeof J==="string")w(J,`agents[${K}]`,q)});if(X.skills)(Array.isArray(X.skills)?X.skills:[X.skills]).forEach((J,K)=>{if(typeof J==="string")w(J,`skills[${K}]`,q)})}let z=x;if(typeof x==="object"&&x!==null){let X=x,Y=Object.keys(X).filter((J)=>Iq.has(J));if(Y.length>0){let J={...X};for(let K of Y)delete J[K],$.push({path:K,message:`Field '${K}' belongs in the marketplace entry (marketplace.json), `+"not plugin.json. It's harmless here but unused \u2014 Claude Code "+"ignores it at load time."});z=J}}let G=d().strict().safeParse(z);if(!G.success)q.push(...F(G.error));if(G.success){let X=G.data;if(!/^[a-z0-9]+(-[a-z0-9]+)*$/.test(X.name))$.push({path:"name",message:`Plugin name "${X.name}" is not kebab-case. Claude Code accepts it, but the Claude.ai marketplace sync requires kebab-case (lowercase letters, digits, and hyphens only, e.g., "my-plugin").`});if(!X.version)$.push({path:"version",message:'No version specified. Consider adding a version following semver (e.g., "1.0.0")'});if(!X.description)$.push({path:"description",message:"No description provided. Adding a description helps users understand what your plugin does"});if(!X.author)$.push({path:"author",message:"No author information provided. Consider adding author details for plugin attribution"})}return{success:q.length===0,errors:q,warnings:$,filePath:Q,fileType:"plugin"}}async function k(Z){let q=[],$=[],Q=H.resolve(Z),B;try{B=await A(Q,{encoding:"utf-8"})}catch(X){let Y=O(X),J;if(Y==="ENOENT")J=`File not found: ${Q}`;else if(Y==="EISDIR")J=`Path is not a file: ${Q}`;else J=`Failed to read file: ${W(X)}`;return{success:!1,errors:[{path:"file",message:J,code:Y}],warnings:[],filePath:Q,fileType:"marketplace"}}let x;try{x=v(B)}catch(X){return{success:!1,errors:[{path:"json",message:`Invalid JSON syntax: ${W(X)}`}],warnings:[],filePath:Q,fileType:"marketplace"}}if(x&&typeof x==="object"){let X=x;if(Array.isArray(X.plugins))X.plugins.forEach((Y,J)=>{if(Y&&typeof Y==="object"&&"source"in Y){let K=Y.source;if(typeof K==="string")w(K,`plugins[${J}].source`,q,Mq(K));if(K&&typeof K==="object"&&"path"in K&&typeof K.path==="string")w(K.path,`plugins[${J}].source.path`,q)}})}let G=g().extend({plugins:Aq.array(u().strict())}).strict().safeParse(x);if(!G.success)q.push(...F(G.error));if(G.success){let X=G.data;if(!X.plugins||X.plugins.length===0)$.push({path:"plugins",message:"Marketplace has no plugins defined"});if(X.plugins){X.plugins.forEach((K,U)=>{if(X.plugins.filter((R)=>R.name===K.name).length>1)q.push({path:`plugins[${U}].name`,message:`Duplicate plugin name "${K.name}" found in marketplace`})});let Y=H.dirname(Q),J=H.basename(Y)===".claude-plugin"?H.dirname(Y):Y;for(let[K,U]of X.plugins.entries()){if(!U.version||typeof U.source!=="string"||!U.source.startsWith("./"))continue;let T=H.join(J,U.source,".claude-plugin","plugin.json"),R;try{let i=await A(T,{encoding:"utf-8"}),b=v(i);if(typeof b.version==="string")R=b.version}catch{continue}if(R&&R!==U.version)$.push({path:`plugins[${K}].version`,message:`Entry declares version "${U.version}" but ${U.source}/.claude-plugin/plugin.json says "${R}". `+"At install time, plugin.json wins (calculatePluginVersion precedence) \u2014 the entry version is silently ignored. "+`Update this entry to "${R}" to match.`})}}if(!X.metadata?.description)$.push({path:"metadata.description",message:"No marketplace description provided. Adding a description helps users understand what this marketplace offers"})}return{success:q.length===0,errors:q,warnings:$,filePath:Q,fileType:"marketplace"}}function Eq(Z,q,$){let Q=[],B=[],x=q.match(n);if(!x)return B.push({path:"frontmatter",message:"No frontmatter block found. Add YAML frontmatter between --- delimiters at the top of the file to set description and other metadata."}),{success:!0,errors:Q,warnings:B,filePath:Z,fileType:$};let z=x[1]||"",G;try{G=h(z)}catch(K){return Q.push({path:"frontmatter",message:`YAML frontmatter failed to parse: ${W(K)}. At runtime this ${$} loads with empty metadata (all frontmatter fields silently dropped).`}),{success:!1,errors:Q,warnings:B,filePath:Z,fileType:$}}if(G===null||typeof G!=="object"||Array.isArray(G))return Q.push({path:"frontmatter",message:`Frontmatter must be a YAML mapping (key: value pairs), got ${Array.isArray(G)?"an array":G===null?"null":typeof G}.`}),{success:!1,errors:Q,warnings:B,filePath:Z,fileType:$};let X=G;if(X.description!==void 0){let K=X.description;if(typeof K!=="string"&&typeof K!=="number"&&typeof K!=="boolean"&&K!==null)Q.push({path:"description",message:`description must be a string, got ${Array.isArray(K)?"array":typeof K}. At runtime this value is dropped.`})}else B.push({path:"description",message:`No description in frontmatter. A description helps users and Claude understand when to use this ${$}.`});if(X.name!==void 0&&X.name!==null&&typeof X.name!=="string")Q.push({path:"name",message:`name must be a string, got ${typeof X.name}.`});let Y=X["allowed-tools"];if(Y!==void 0&&Y!==null){if(typeof Y!=="string"&&!Array.isArray(Y))Q.push({path:"allowed-tools",message:`allowed-tools must be a string or array of strings, got ${typeof Y}.`});else if(Array.isArray(Y)&&Y.some((K)=>typeof K!=="string"))Q.push({path:"allowed-tools",message:"allowed-tools array must contain only strings."})}let J=X.shell;if(J!==void 0&&J!==null)if(typeof J!=="string")Q.push({path:"shell",message:`shell must be a string, got ${typeof J}.`});else{let K=J.trim().toLowerCase();if(K!=="bash"&&K!=="powershell")Q.push({path:"shell",message:`shell must be 'bash' or 'powershell', got '${J}'.`})}return{success:Q.length===0,errors:Q,warnings:B,filePath:Z,fileType:$}}async function Nq(Z){let q;try{q=await A(Z,{encoding:"utf-8"})}catch(B){if(O(B)==="ENOENT")return{success:!0,errors:[],warnings:[],filePath:Z,fileType:"hooks"};return{success:!1,errors:[{path:"file",message:`Failed to read file: ${W(B)}`}],warnings:[],filePath:Z,fileType:"hooks"}}let $;try{$=v(q)}catch(B){return{success:!1,errors:[{path:"json",message:`Invalid JSON syntax: ${W(B)}. At runtime this breaks the entire plugin load.`}],warnings:[],filePath:Z,fileType:"hooks"}}let Q=c().safeParse($);if(!Q.success)return{success:!1,errors:F(Q.error),warnings:[],filePath:Z,fileType:"hooks"};return{success:!0,errors:[],warnings:[],filePath:Z,fileType:"hooks"}}async function l(Z,q){let $;try{$=await vq(Z,{withFileTypes:!0})}catch(B){let x=O(B);if(x==="ENOENT"||x==="ENOTDIR")return[];throw B}if(q)return $.filter((B)=>B.isDirectory()).map((B)=>H.join(Z,B.name,"SKILL.md"));let Q=[];for(let B of $){let x=H.join(Z,B.name);if(B.isDirectory())Q.push(...await l(x,!1));else if(B.isFile()&&B.name.toLowerCase().endsWith(".md"))Q.push(x)}return Q}async function eq(Z){let q=[],$=[["skill",H.join(Z,"skills")],["agent",H.join(Z,"agents")],["command",H.join(Z,"commands")]];for(let[B,x]of $){let z=await l(x,B==="skill");for(let G of z){let X;try{X=await A(G,{encoding:"utf-8"})}catch(J){if(C(J))continue;q.push({success:!1,errors:[{path:"file",message:`Failed to read: ${W(J)}`}],warnings:[],filePath:G,fileType:B});continue}let Y=Eq(G,X,B);if(Y.errors.length>0||Y.warnings.length>0)q.push(Y)}}let Q=await Nq(H.join(Z,"hooks","hooks.json"));if(Q.errors.length>0||Q.warnings.length>0)q.push(Q);return q}async function qQ(Z){let q=H.resolve(Z),$=null;try{$=await Rq(q)}catch(B){if(!C(B))throw B}if($?.isDirectory()){let B=H.join(q,".claude-plugin","marketplace.json"),x=await k(B);if(x.errors[0]?.code!=="ENOENT")return x;let z=H.join(q,".claude-plugin","plugin.json"),G=await j(z);if(G.errors[0]?.code!=="ENOENT")return G;return{success:!1,errors:[{path:"directory",message:"No manifest found in directory. Expected .claude-plugin/marketplace.json or .claude-plugin/plugin.json"}],warnings:[],filePath:q,fileType:"plugin"}}switch(wq(Z)){case"plugin":return j(Z);case"marketplace":return k(Z);case"unknown":{try{let B=await A(q,{encoding:"utf-8"}),x=v(B);if(Array.isArray(x.plugins))return k(Z)}catch(B){if(O(B)==="ENOENT")return{success:!1,errors:[{path:"file",message:`File not found: ${q}`}],warnings:[],filePath:q,fileType:"plugin"}}return j(Z)}}}var Iq;var _q=N(()=>{_();Uq();f();Oq();Wq();Iq=new Set(["category","source","tags","strict","id"])});
2
+ import{Nh as E,Oh as p,Ph as e,ci as S,gh as h,hh as Oq,hi as qq,ih as n,kh as Uq}from"./cli-b3k8arn1.js";import{gV as c,iV as d,lV as u,mV as g,rV as Wq}from"./cli-192xnkcx.js";import{G8 as D,L8 as r}from"./cli-8kpqq0ea.js";import{$9 as C,A_ as t,Z9 as W,_9 as O,d_ as _,f_ as P,g_ as v,j_ as f,n_ as M,r_ as y,x_ as V}from"./cli-awb77t95.js";import{hda as N}from"./cli-qwx84m9c.js";import{homedir as o}from"os";import{resolve as s}from"path";async function kq(Z){let q=Z.trim(),$=M(),Q=q.match(/^([a-zA-Z0-9._-]+@[^:]+:.+?(?:\.git)?)(#(.+))?$/);if(Q?.[1]){let z=Q[1],G=Q[3];return G?{source:"git",url:z,ref:G}:{source:"git",url:z}}if(q.startsWith("http://")||q.startsWith("https://")){let z=q.match(/^([^#]+)(#(.+))?$/),G=z?.[1]||q,X=z?.[3];if(G.endsWith(".git")||G.includes("/_git/"))return X?{source:"git",url:G,ref:X}:{source:"git",url:G};let Y;try{Y=new URL(G)}catch(J){return{source:"url",url:G}}if(Y.hostname==="github.com"||Y.hostname==="www.github.com"){if(Y.pathname.match(/^\/([^/]+\/[^/]+?)(\/|\.git|$)/)?.[1]){let K=G.endsWith(".git")?G:`${G}.git`;return X?{source:"git",url:K,ref:X}:{source:"git",url:K}}}return{source:"url",url:G}}let x=process.platform==="win32"&&(q.startsWith(".\\")||q.startsWith("..\\")||/^[a-zA-Z]:[/\\]/.test(q));if(q.startsWith("./")||q.startsWith("../")||q.startsWith("/")||q.startsWith("~")||x){let z=s(q.startsWith("~")?q.replace(/^~/,o()):q),G;try{G=await $.stat(z)}catch(X){let Y=O(X);return{error:Y==="ENOENT"?`Path does not exist: ${z}`:`Cannot access path: ${z} (${Y??X})`}}if(G.isFile())if(z.endsWith(".json"))return{source:"file",path:z};else return{error:`File path must point to a .json file (marketplace.json), but got: ${z}`};else if(G.isDirectory())return{source:"directory",path:z};else return{error:`Path is neither a file nor a directory: ${z}`}}if(q.includes("/")&&!q.startsWith("@")){if(q.includes(":"))return null;let z=q.match(/^([^#@]+)(?:[#@](.+))?$/),G=z?.[1]||q,X=z?.[2];return X?{source:"github",repo:G,ref:X}:{source:"github",repo:G}}return null}var a=N(()=>{_();y()});import Qq from"axios";import{randomBytes as Xq}from"crypto";import{readFile as Zq,rename as $q,unlink as Bq,writeFile as Gq}from"fs/promises";import{join as Yq}from"path";function m(){return Yq(S(),Jq)}async function xq(){let Z=m();try{let q=await Zq(Z,{encoding:"utf-8"}),$=v(q);if(typeof $!=="object"||$===null||!("version"in $)||!("fetchedAt"in $)||!("counts"in $))return V("Install counts cache has invalid structure"),null;let Q=$;if(Q.version!==L)return V(`Install counts cache version mismatch (got ${Q.version}, expected ${L})`),null;if(typeof Q.fetchedAt!=="string"||!Array.isArray(Q.counts))return V("Install counts cache has invalid structure"),null;let B=new Date(Q.fetchedAt).getTime();if(Number.isNaN(B))return V("Install counts cache has invalid fetchedAt timestamp"),null;if(!Q.counts.every((G)=>typeof G==="object"&&G!==null&&typeof G.plugin==="string"&&typeof G.unique_installs==="number"))return V("Install counts cache has malformed entries"),null;if(Date.now()-B>Kq)return V("Install counts cache is stale (>24h old)"),null;return{version:Q.version,fetchedAt:Q.fetchedAt,counts:Q.counts}}catch(q){if(O(q)!=="ENOENT")V(`Failed to load install counts cache: ${W(q)}`);return null}}async function zq(Z){let q=m(),$=`${q}.${Xq(8).toString("hex")}.tmp`;try{let Q=S();await M().mkdir(Q);let B=P(Z,null,2);await Gq($,B,{encoding:"utf-8",mode:384}),await $q($,q),V("Install counts cache saved successfully")}catch(Q){D(Q);try{await Bq($)}catch{}}}async function Hq(){V(`Fetching install counts from ${I}`);let Z=performance.now();try{let q=await Qq.get(I,{timeout:1e4});if(!q.data?.plugins||!Array.isArray(q.data.plugins))throw Error("Invalid response format from install counts API");return E("install_counts",I,"success",performance.now()-Z),q.data.plugins}catch(q){throw E("install_counts",I,"failure",performance.now()-Z,p(q)),q}}async function gq(){let Z=await xq();if(Z){V("Using cached install counts"),E("install_counts",I,"cache_hit",0);let q=new Map;for(let $ of Z.counts)q.set($.plugin,$.unique_installs);return q}try{let q=await Hq(),$={version:L,fetchedAt:new Date().toISOString(),counts:q};await zq($);let Q=new Map;for(let B of q)Q.set(B.plugin,B.unique_installs);return Q}catch(q){return D(q),V(`Failed to fetch install counts: ${W(q)}`),null}}function hq(Z){if(Z<1000)return String(Z);if(Z<1e6){let B=(Z/1000).toFixed(1);return B.endsWith(".0")?`${B.slice(0,-2)}K`:`${B}K`}let $=(Z/1e6).toFixed(1);return $.endsWith(".0")?`${$.slice(0,-2)}M`:`${$}M`}var L=1,Jq="install-counts-cache.json",I="https://raw.githubusercontent.com/anthropics/claude-plugins-official/refs/heads/stats/stats/plugin-installs.json",Kq=86400000;var Vq=N(()=>{t();_();y();r();f();e();qq()});import{readdir as vq,readFile as A,stat as Rq}from"fs/promises";import*as H from"path";import{z as Aq}from"zod/v4";function wq(Z){let q=H.basename(Z),$=H.basename(H.dirname(Z));if(q==="plugin.json")return"plugin";if(q==="marketplace.json")return"marketplace";if($===".claude-plugin")return"plugin";return"unknown"}function F(Z){return Z.issues.map((q)=>({path:q.path.join(".")||"root",message:q.message,code:q.code}))}function w(Z,q,$,Q){if(Z.includes(".."))$.push({path:q,message:Q?`Path contains "..": ${Z}. ${Q}`:`Path contains ".." which could be a path traversal attempt: ${Z}`})}function Mq(Z){let q=Z.replace(/^(\.\.\/)+/,"");return`Plugin source paths are resolved relative to the marketplace root (the directory containing .claude-plugin/), not relative to marketplace.json. Use "${q!==Z?`./${q}`:"./plugins/my-plugin"}" instead of "${Z}".`}async function j(Z){let q=[],$=[],Q=H.resolve(Z),B;try{B=await A(Q,{encoding:"utf-8"})}catch(X){let Y=O(X),J;if(Y==="ENOENT")J=`File not found: ${Q}`;else if(Y==="EISDIR")J=`Path is not a file: ${Q}`;else J=`Failed to read file: ${W(X)}`;return{success:!1,errors:[{path:"file",message:J,code:Y}],warnings:[],filePath:Q,fileType:"plugin"}}let x;try{x=v(B)}catch(X){return{success:!1,errors:[{path:"json",message:`Invalid JSON syntax: ${W(X)}`}],warnings:[],filePath:Q,fileType:"plugin"}}if(x&&typeof x==="object"){let X=x;if(X.commands)(Array.isArray(X.commands)?X.commands:[X.commands]).forEach((J,K)=>{if(typeof J==="string")w(J,`commands[${K}]`,q)});if(X.agents)(Array.isArray(X.agents)?X.agents:[X.agents]).forEach((J,K)=>{if(typeof J==="string")w(J,`agents[${K}]`,q)});if(X.skills)(Array.isArray(X.skills)?X.skills:[X.skills]).forEach((J,K)=>{if(typeof J==="string")w(J,`skills[${K}]`,q)})}let z=x;if(typeof x==="object"&&x!==null){let X=x,Y=Object.keys(X).filter((J)=>Iq.has(J));if(Y.length>0){let J={...X};for(let K of Y)delete J[K],$.push({path:K,message:`Field '${K}' belongs in the marketplace entry (marketplace.json), `+"not plugin.json. It's harmless here but unused \u2014 Claude Code "+"ignores it at load time."});z=J}}let G=d().strict().safeParse(z);if(!G.success)q.push(...F(G.error));if(G.success){let X=G.data;if(!/^[a-z0-9]+(-[a-z0-9]+)*$/.test(X.name))$.push({path:"name",message:`Plugin name "${X.name}" is not kebab-case. Claude Code accepts it, but the Claude.ai marketplace sync requires kebab-case (lowercase letters, digits, and hyphens only, e.g., "my-plugin").`});if(!X.version)$.push({path:"version",message:'No version specified. Consider adding a version following semver (e.g., "1.0.0")'});if(!X.description)$.push({path:"description",message:"No description provided. Adding a description helps users understand what your plugin does"});if(!X.author)$.push({path:"author",message:"No author information provided. Consider adding author details for plugin attribution"})}return{success:q.length===0,errors:q,warnings:$,filePath:Q,fileType:"plugin"}}async function k(Z){let q=[],$=[],Q=H.resolve(Z),B;try{B=await A(Q,{encoding:"utf-8"})}catch(X){let Y=O(X),J;if(Y==="ENOENT")J=`File not found: ${Q}`;else if(Y==="EISDIR")J=`Path is not a file: ${Q}`;else J=`Failed to read file: ${W(X)}`;return{success:!1,errors:[{path:"file",message:J,code:Y}],warnings:[],filePath:Q,fileType:"marketplace"}}let x;try{x=v(B)}catch(X){return{success:!1,errors:[{path:"json",message:`Invalid JSON syntax: ${W(X)}`}],warnings:[],filePath:Q,fileType:"marketplace"}}if(x&&typeof x==="object"){let X=x;if(Array.isArray(X.plugins))X.plugins.forEach((Y,J)=>{if(Y&&typeof Y==="object"&&"source"in Y){let K=Y.source;if(typeof K==="string")w(K,`plugins[${J}].source`,q,Mq(K));if(K&&typeof K==="object"&&"path"in K&&typeof K.path==="string")w(K.path,`plugins[${J}].source.path`,q)}})}let G=g().extend({plugins:Aq.array(u().strict())}).strict().safeParse(x);if(!G.success)q.push(...F(G.error));if(G.success){let X=G.data;if(!X.plugins||X.plugins.length===0)$.push({path:"plugins",message:"Marketplace has no plugins defined"});if(X.plugins){X.plugins.forEach((K,U)=>{if(X.plugins.filter((R)=>R.name===K.name).length>1)q.push({path:`plugins[${U}].name`,message:`Duplicate plugin name "${K.name}" found in marketplace`})});let Y=H.dirname(Q),J=H.basename(Y)===".claude-plugin"?H.dirname(Y):Y;for(let[K,U]of X.plugins.entries()){if(!U.version||typeof U.source!=="string"||!U.source.startsWith("./"))continue;let T=H.join(J,U.source,".claude-plugin","plugin.json"),R;try{let i=await A(T,{encoding:"utf-8"}),b=v(i);if(typeof b.version==="string")R=b.version}catch{continue}if(R&&R!==U.version)$.push({path:`plugins[${K}].version`,message:`Entry declares version "${U.version}" but ${U.source}/.claude-plugin/plugin.json says "${R}". `+"At install time, plugin.json wins (calculatePluginVersion precedence) \u2014 the entry version is silently ignored. "+`Update this entry to "${R}" to match.`})}}if(!X.metadata?.description)$.push({path:"metadata.description",message:"No marketplace description provided. Adding a description helps users understand what this marketplace offers"})}return{success:q.length===0,errors:q,warnings:$,filePath:Q,fileType:"marketplace"}}function Eq(Z,q,$){let Q=[],B=[],x=q.match(n);if(!x)return B.push({path:"frontmatter",message:"No frontmatter block found. Add YAML frontmatter between --- delimiters at the top of the file to set description and other metadata."}),{success:!0,errors:Q,warnings:B,filePath:Z,fileType:$};let z=x[1]||"",G;try{G=h(z)}catch(K){return Q.push({path:"frontmatter",message:`YAML frontmatter failed to parse: ${W(K)}. At runtime this ${$} loads with empty metadata (all frontmatter fields silently dropped).`}),{success:!1,errors:Q,warnings:B,filePath:Z,fileType:$}}if(G===null||typeof G!=="object"||Array.isArray(G))return Q.push({path:"frontmatter",message:`Frontmatter must be a YAML mapping (key: value pairs), got ${Array.isArray(G)?"an array":G===null?"null":typeof G}.`}),{success:!1,errors:Q,warnings:B,filePath:Z,fileType:$};let X=G;if(X.description!==void 0){let K=X.description;if(typeof K!=="string"&&typeof K!=="number"&&typeof K!=="boolean"&&K!==null)Q.push({path:"description",message:`description must be a string, got ${Array.isArray(K)?"array":typeof K}. At runtime this value is dropped.`})}else B.push({path:"description",message:`No description in frontmatter. A description helps users and Claude understand when to use this ${$}.`});if(X.name!==void 0&&X.name!==null&&typeof X.name!=="string")Q.push({path:"name",message:`name must be a string, got ${typeof X.name}.`});let Y=X["allowed-tools"];if(Y!==void 0&&Y!==null){if(typeof Y!=="string"&&!Array.isArray(Y))Q.push({path:"allowed-tools",message:`allowed-tools must be a string or array of strings, got ${typeof Y}.`});else if(Array.isArray(Y)&&Y.some((K)=>typeof K!=="string"))Q.push({path:"allowed-tools",message:"allowed-tools array must contain only strings."})}let J=X.shell;if(J!==void 0&&J!==null)if(typeof J!=="string")Q.push({path:"shell",message:`shell must be a string, got ${typeof J}.`});else{let K=J.trim().toLowerCase();if(K!=="bash"&&K!=="powershell")Q.push({path:"shell",message:`shell must be 'bash' or 'powershell', got '${J}'.`})}return{success:Q.length===0,errors:Q,warnings:B,filePath:Z,fileType:$}}async function Nq(Z){let q;try{q=await A(Z,{encoding:"utf-8"})}catch(B){if(O(B)==="ENOENT")return{success:!0,errors:[],warnings:[],filePath:Z,fileType:"hooks"};return{success:!1,errors:[{path:"file",message:`Failed to read file: ${W(B)}`}],warnings:[],filePath:Z,fileType:"hooks"}}let $;try{$=v(q)}catch(B){return{success:!1,errors:[{path:"json",message:`Invalid JSON syntax: ${W(B)}. At runtime this breaks the entire plugin load.`}],warnings:[],filePath:Z,fileType:"hooks"}}let Q=c().safeParse($);if(!Q.success)return{success:!1,errors:F(Q.error),warnings:[],filePath:Z,fileType:"hooks"};return{success:!0,errors:[],warnings:[],filePath:Z,fileType:"hooks"}}async function l(Z,q){let $;try{$=await vq(Z,{withFileTypes:!0})}catch(B){let x=O(B);if(x==="ENOENT"||x==="ENOTDIR")return[];throw B}if(q)return $.filter((B)=>B.isDirectory()).map((B)=>H.join(Z,B.name,"SKILL.md"));let Q=[];for(let B of $){let x=H.join(Z,B.name);if(B.isDirectory())Q.push(...await l(x,!1));else if(B.isFile()&&B.name.toLowerCase().endsWith(".md"))Q.push(x)}return Q}async function eq(Z){let q=[],$=[["skill",H.join(Z,"skills")],["agent",H.join(Z,"agents")],["command",H.join(Z,"commands")]];for(let[B,x]of $){let z=await l(x,B==="skill");for(let G of z){let X;try{X=await A(G,{encoding:"utf-8"})}catch(J){if(C(J))continue;q.push({success:!1,errors:[{path:"file",message:`Failed to read: ${W(J)}`}],warnings:[],filePath:G,fileType:B});continue}let Y=Eq(G,X,B);if(Y.errors.length>0||Y.warnings.length>0)q.push(Y)}}let Q=await Nq(H.join(Z,"hooks","hooks.json"));if(Q.errors.length>0||Q.warnings.length>0)q.push(Q);return q}async function qQ(Z){let q=H.resolve(Z),$=null;try{$=await Rq(q)}catch(B){if(!C(B))throw B}if($?.isDirectory()){let B=H.join(q,".claude-plugin","marketplace.json"),x=await k(B);if(x.errors[0]?.code!=="ENOENT")return x;let z=H.join(q,".claude-plugin","plugin.json"),G=await j(z);if(G.errors[0]?.code!=="ENOENT")return G;return{success:!1,errors:[{path:"directory",message:"No manifest found in directory. Expected .claude-plugin/marketplace.json or .claude-plugin/plugin.json"}],warnings:[],filePath:q,fileType:"plugin"}}switch(wq(Z)){case"plugin":return j(Z);case"marketplace":return k(Z);case"unknown":{try{let B=await A(q,{encoding:"utf-8"}),x=v(B);if(Array.isArray(x.plugins))return k(Z)}catch(B){if(O(B)==="ENOENT")return{success:!1,errors:[{path:"file",message:`File not found: ${q}`}],warnings:[],filePath:q,fileType:"plugin"}}return j(Z)}}}var Iq;var _q=N(()=>{_();Uq();f();Oq();Wq();Iq=new Set(["category","source","tags","strict","id"])});
3
3
  export{kq as Xc,a as Yc,gq as Zc,hq as _c,Vq as $c,eq as ad,qQ as bd,_q as cd};
@@ -1,4 +1,4 @@
1
1
  // @bun
2
- import{Ag as u,zg as k}from"./cli-ja540nr7.js";import{C8 as z,D8 as H,J8 as y,r8 as $,s8 as W}from"./cli-4ewb3q42.js";import{I9 as B,J9 as N,K9 as O,M9 as L,d_ as q,h_ as w,l_ as V,p_ as C,v_ as X,y_ as E}from"./cli-hke6r0q8.js";import{bda as A,e$ as Z}from"./cli-3ac555qw.js";u();A();N();W();L();E();C();y();w();import P from"axios";import{dirname as F,join as x}from"path";var D=z(new Date);function T(){return x($.errors(),D+".jsonl")}function J(G){return x($.mcpLogs(G),D+".jsonl")}function S(G){let K=B(G);return{write(Q){K.write(q(Q)+`
2
+ import{Ag as u,zg as k}from"./cli-a1dqnvy2.js";import{E8 as z,F8 as H,L8 as y,t8 as $,u8 as W}from"./cli-8kpqq0ea.js";import{A_ as E,K9 as B,L9 as N,M9 as O,O9 as L,f_ as q,j_ as w,n_ as V,r_ as C,x_ as X}from"./cli-awb77t95.js";import{dda as A,g$ as Z}from"./cli-tafg3e9w.js";u();A();N();W();L();E();C();y();w();import P from"axios";import{dirname as F,join as x}from"path";var D=z(new Date);function T(){return x($.errors(),D+".jsonl")}function J(G){return x($.mcpLogs(G),D+".jsonl")}function S(G){let K=B(G);return{write(Q){K.write(q(Q)+`
3
3
  `)},flush:K.flush,dispose:K.dispose}}var _=new Map;function R(G){let K=_.get(G);if(!K){let Q=F(G);K=S({writeFn:(U)=>{try{V().appendFileSync(G,U)}catch{V().mkdirSync(Q),V().appendFileSync(G,U)}},flushIntervalMs:1000,maxBufferSize:50}),_.set(G,K),O(async()=>K?.dispose())}return K}function f(G,K){if(process.env.USER_TYPE!=="ant")return;let Q={timestamp:new Date().toISOString(),...K,cwd:V().cwd(),userType:process.env.USER_TYPE,sessionId:Z(),version:MACRO.VERSION};R(G).write(Q)}function v(G){if(typeof G==="string")return G;if(G&&typeof G==="object"){let K=G;if(typeof K.message==="string")return K.message;if(typeof K.error==="object"&&K.error&&"message"in K.error&&typeof K.error.message==="string")return K.error.message}return}function I(G){let K=G.stack||G.message,Q="";if(P.isAxiosError(G)&&G.config?.url){let U=[`url=${G.config.url}`];if(G.response?.status!==void 0)U.push(`status=${G.response.status}`);let Y=v(G.response?.data);if(Y)U.push(`body=${Y}`);Q=`[${U.join(",")}] `}X(`${G.name}: ${Q}${K}`,{level:"error"}),f(T(),{error:`${Q}${K}`})}function j(G,K){X(`MCP server "${G}" ${K}`,{level:"error"});let Q=J(G),Y={error:K instanceof Error?K.stack||K.message:String(K),timestamp:new Date().toISOString(),sessionId:Z(),cwd:V().cwd()};R(Q).write(Y)}function b(G,K){X(`MCP server "${G}": ${K}`);let Q=J(G),U={debug:K,timestamp:new Date().toISOString(),sessionId:Z(),cwd:V().cwd()};R(Q).write(U)}function M(){H({logError:I,logMCPError:j,logMCPDebug:b,getErrorsPath:T,getMCPLogsPath:J}),X("Error log sink initialized")}function r(){M(),k()}
4
4
  export{r as F};
@@ -1,3 +1,3 @@
1
1
  // @bun
2
- import{cda as O,eda as X,fda as W}from"./cli-w1d8n9g3.js";var Y={};X(Y,{resetCachedMCState:()=>S,markToolsSentToAPI:()=>P,isModelSupportedForCacheEditing:()=>N,isCachedMicrocompactEnabled:()=>G,getCoordinatorUserContext:()=>w,getCachedMCConfig:()=>I,default:()=>z,createCachedMCState:()=>C,checkProtectedNamespace:()=>j,__stubMissing:()=>k});var J=function(){},K,F,z,k=!0,C,G,N,I,P,S,j,w;var Z=W(()=>{K={get(q,B){if(B==="__esModule")return!0;if(B==="default")return new Proxy(J,K);if(B===Symbol.toPrimitive)return()=>{return};if(B===Symbol.iterator)return function*(){};if(B===Symbol.asyncIterator)return async function*(){};if(B==="then")return;return new Proxy(J,K)},apply(){return new Proxy(J,K)},construct(){return new Proxy(J,K)}},F=new Proxy(J,K),z=F,C=F,G=F,N=F,I=F,P=F,S=F,j=F,w=F});import T from"lodash-es/memoize.js";import{homedir as A}from"os";import{join as H}from"path";function f(){return H(D(),"teams")}function h(q){let B=process.env.NODE_OPTIONS;if(!B)return!1;return B.split(/\s+/).includes(q)}function M(q){if(!q)return!1;if(typeof q==="boolean")return q;let B=q.toLowerCase().trim();return["1","true","yes","on"].includes(B)}function E(q){if(q===void 0)return!1;if(typeof q==="boolean")return!q;if(!q)return!1;let B=q.toLowerCase().trim();return["0","false","no","off"].includes(B)}function m(){return M(process.env.CLAUDE_CODE_SIMPLE)||process.argv.includes("--bare")}function g(q){let B={};if(q)for(let L of q){let[Q,...U]=L.split("=");if(!Q||U.length===0)throw Error(`Invalid environment variable format: ${L}, environment variables should be added as: -e KEY1=value1 -e KEY2=value2`);B[Q]=U.join("=")}return B}function u(){return process.env.AWS_REGION||process.env.AWS_DEFAULT_REGION||"us-east-1"}function $(){return process.env.CLOUD_ML_REGION||"us-east5"}function _(){return M(process.env.CLAUDE_BASH_MAINTAIN_PROJECT_WORKING_DIR)}function d(){return process.env.USER_TYPE==="ant"&&M(process.env.COO_RUNNING_ON_HOMESPACE)}function V(){if(process.env.USER_TYPE==="ant")return(Z(),O(Y)).checkProtectedNamespace();return!1}function i(q){if(q){let B=c.find(([L])=>q.startsWith(L));if(B)return process.env[B[1]]||$()}return $()}var D,c;var x=W(()=>{D=T(()=>{return(process.env.CLAUDE_CONFIG_DIR??H(A(),".claude")).normalize("NFC")},()=>process.env.CLAUDE_CONFIG_DIR);c=[["claude-haiku-4-5","VERTEX_REGION_CLAUDE_HAIKU_4_5"],["claude-3-5-haiku","VERTEX_REGION_CLAUDE_3_5_HAIKU"],["claude-3-5-sonnet","VERTEX_REGION_CLAUDE_3_5_SONNET"],["claude-3-7-sonnet","VERTEX_REGION_CLAUDE_3_7_SONNET"],["claude-opus-4-1","VERTEX_REGION_CLAUDE_4_1_OPUS"],["claude-opus-4","VERTEX_REGION_CLAUDE_4_0_OPUS"],["claude-sonnet-4-6","VERTEX_REGION_CLAUDE_4_6_SONNET"],["claude-sonnet-4-5","VERTEX_REGION_CLAUDE_4_5_SONNET"],["claude-sonnet-4","VERTEX_REGION_CLAUDE_4_0_SONNET"]]});
3
- export{D as F_,f as G_,h as H_,M as I_,E as J_,m as K_,g as L_,u as M_,$ as N_,_ as O_,d as P_,V as Q_,i as R_,x as S_};
2
+ import{eda as O,gda as X,hda as W}from"./cli-qwx84m9c.js";var Y={};X(Y,{resetCachedMCState:()=>S,markToolsSentToAPI:()=>P,isModelSupportedForCacheEditing:()=>N,isCachedMicrocompactEnabled:()=>G,getCoordinatorUserContext:()=>w,getCachedMCConfig:()=>I,default:()=>z,createCachedMCState:()=>C,checkProtectedNamespace:()=>j,__stubMissing:()=>k});var J=function(){},K,F,z,k=!0,C,G,N,I,P,S,j,w;var Z=W(()=>{K={get(q,B){if(B==="__esModule")return!0;if(B==="default")return new Proxy(J,K);if(B===Symbol.toPrimitive)return()=>{return};if(B===Symbol.iterator)return function*(){};if(B===Symbol.asyncIterator)return async function*(){};if(B==="then")return;return new Proxy(J,K)},apply(){return new Proxy(J,K)},construct(){return new Proxy(J,K)}},F=new Proxy(J,K),z=F,C=F,G=F,N=F,I=F,P=F,S=F,j=F,w=F});import T from"lodash-es/memoize.js";import{homedir as A}from"os";import{join as H}from"path";function f(){return H(D(),"teams")}function h(q){let B=process.env.NODE_OPTIONS;if(!B)return!1;return B.split(/\s+/).includes(q)}function M(q){if(!q)return!1;if(typeof q==="boolean")return q;let B=q.toLowerCase().trim();return["1","true","yes","on"].includes(B)}function E(q){if(q===void 0)return!1;if(typeof q==="boolean")return!q;if(!q)return!1;let B=q.toLowerCase().trim();return["0","false","no","off"].includes(B)}function m(){return M(process.env.CLAUDE_CODE_SIMPLE)||process.argv.includes("--bare")}function g(q){let B={};if(q)for(let L of q){let[Q,...U]=L.split("=");if(!Q||U.length===0)throw Error(`Invalid environment variable format: ${L}, environment variables should be added as: -e KEY1=value1 -e KEY2=value2`);B[Q]=U.join("=")}return B}function u(){return process.env.AWS_REGION||process.env.AWS_DEFAULT_REGION||"us-east-1"}function $(){return process.env.CLOUD_ML_REGION||"us-east5"}function _(){return M(process.env.CLAUDE_BASH_MAINTAIN_PROJECT_WORKING_DIR)}function d(){return process.env.USER_TYPE==="ant"&&M(process.env.COO_RUNNING_ON_HOMESPACE)}function V(){if(process.env.USER_TYPE==="ant")return(Z(),O(Y)).checkProtectedNamespace();return!1}function i(q){if(q){let B=c.find(([L])=>q.startsWith(L));if(B)return process.env[B[1]]||$()}return $()}var D,c;var x=W(()=>{D=T(()=>{return(process.env.CLAUDE_CONFIG_DIR??H(A(),".claude")).normalize("NFC")},()=>process.env.CLAUDE_CONFIG_DIR);c=[["claude-haiku-4-5","VERTEX_REGION_CLAUDE_HAIKU_4_5"],["claude-3-5-haiku","VERTEX_REGION_CLAUDE_3_5_HAIKU"],["claude-3-5-sonnet","VERTEX_REGION_CLAUDE_3_5_SONNET"],["claude-3-7-sonnet","VERTEX_REGION_CLAUDE_3_7_SONNET"],["claude-opus-4-1","VERTEX_REGION_CLAUDE_4_1_OPUS"],["claude-opus-4","VERTEX_REGION_CLAUDE_4_0_OPUS"],["claude-sonnet-4-6","VERTEX_REGION_CLAUDE_4_6_SONNET"],["claude-sonnet-4-5","VERTEX_REGION_CLAUDE_4_5_SONNET"],["claude-sonnet-4","VERTEX_REGION_CLAUDE_4_0_SONNET"]]});
3
+ export{D as H_,f as I_,h as J_,M as K_,E as L_,m as M_,g as N_,u as O_,$ as P_,_ as Q_,d as R_,V as S_,i as T_,x as U_};
@@ -1,3 +1,3 @@
1
1
  // @bun
2
- import{FQ as e,fR as o}from"./cli-x8xgga1a.js";import{fda as M}from"./cli-w1d8n9g3.js";import{c as A}from"react/compiler-runtime";import q from"figures";import{jsxDEV as n}from"react/jsx-dev-runtime";function H(k){let _=A(5),{status:v,withSpace:P}=k,w=P===void 0?!1:P,$=h[v],K=!$.color,f=w&&" ",r;if(_[0]!==$.color||_[1]!==$.icon||_[2]!==K||_[3]!==f)r=n(e,{color:$.color,dimColor:K,children:[$.icon,f]},void 0,!0,void 0,this),_[0]=$.color,_[1]=$.icon,_[2]=K,_[3]=f,_[4]=r;else r=_[4];return r}var h;var p=M(()=>{o();h={success:{icon:q.tick,color:"success"},error:{icon:q.cross,color:"error"},warning:{icon:q.warning,color:"warning"},info:{icon:q.info,color:"suggestion"},pending:{icon:q.circle,color:void 0},loading:{icon:"\u2026",color:void 0}}});
2
+ import{FQ as e,fR as o}from"./cli-a2d962bq.js";import{hda as M}from"./cli-qwx84m9c.js";import{c as A}from"react/compiler-runtime";import q from"figures";import{jsxDEV as n}from"react/jsx-dev-runtime";function H(k){let _=A(5),{status:v,withSpace:P}=k,w=P===void 0?!1:P,$=h[v],K=!$.color,f=w&&" ",r;if(_[0]!==$.color||_[1]!==$.icon||_[2]!==K||_[3]!==f)r=n(e,{color:$.color,dimColor:K,children:[$.icon,f]},void 0,!0,void 0,this),_[0]=$.color,_[1]=$.icon,_[2]=K,_[3]=f,_[4]=r;else r=_[4];return r}var h;var p=M(()=>{o();h={success:{icon:q.tick,color:"success"},error:{icon:q.cross,color:"error"},warning:{icon:q.warning,color:"warning"},info:{icon:q.info,color:"suggestion"},pending:{icon:q.circle,color:void 0},loading:{icon:"\u2026",color:void 0}}});
3
3
  export{H as lf,p as mf};
@@ -1,3 +1,3 @@
1
1
  // @bun
2
- import{fda as e}from"./cli-w1d8n9g3.js";import{z as n}from"zod/v4";function i(){}function o(){}var s,t;var a=e(()=>{s=n.object({}).passthrough(),t={name:"tungsten",aliases:[],maxResultSizeChars:0,inputSchema:s,async description(){return"Unavailable in this local recovery build."},async prompt(){return"TungstenTool is unavailable in this local recovery build."},async call(){return{data:{success:!1,error:"TungstenTool is unavailable in this local recovery build."}}},isConcurrencySafe(){return!0},isEnabled(){return!1},isReadOnly(){return!0},async checkPermissions(){return{behavior:"deny",message:"TungstenTool is unavailable in this local recovery build."}}}});
2
+ import{hda as e}from"./cli-qwx84m9c.js";import{z as n}from"zod/v4";function i(){}function o(){}var s,t;var a=e(()=>{s=n.object({}).passthrough(),t={name:"tungsten",aliases:[],maxResultSizeChars:0,inputSchema:s,async description(){return"Unavailable in this local recovery build."},async prompt(){return"TungstenTool is unavailable in this local recovery build."},async call(){return{data:{success:!1,error:"TungstenTool is unavailable in this local recovery build."}}},isConcurrencySafe(){return!0},isEnabled(){return!1},isReadOnly(){return!0},async checkPermissions(){return{behavior:"deny",message:"TungstenTool is unavailable in this local recovery build."}}}});
3
3
  export{t as sR,i as tR,o as uR,a as vR};
@@ -1,3 +1,3 @@
1
1
  // @bun
2
2
  var{defineProperty:h,getOwnPropertyNames:k,getOwnPropertyDescriptor:l}=Object,m=Object.prototype.hasOwnProperty;function n(b){return this[b]}var q=(b)=>{var a=(i??=new WeakMap).get(b),c;if(a)return a;if(a=h({},"__esModule",{value:!0}),b&&typeof b==="object"||typeof b==="function"){for(var d of k(b))if(!m.call(a,d))h(a,d,{get:n.bind(b,d),enumerable:!(c=l(b,d))||c.enumerable})}return i.set(b,a),a},i,r=(b,a)=>()=>(a||b((a={exports:{}}).exports,a),a.exports);var o=(b)=>b;function p(b,a){this[b]=o.bind(null,a)}var s=(b,a)=>{for(var c in a)h(b,c,{get:a[c],enumerable:!0,configurable:!0,set:p.bind(a,c)})};var t=(b,a)=>()=>(b&&(a=b(b=0)),a);var u=import.meta.require,v=(b,a,c)=>{if(a!=null){if(typeof a!=="object"&&typeof a!=="function")throw TypeError('Object expected to be assigned to "using" declaration');let d;if(c)d=a[Symbol.asyncDispose];if(d===void 0)d=a[Symbol.dispose];if(typeof d!=="function")throw TypeError("Object not disposable");b.push([c,d,a])}else if(c)b.push([c]);return a},w=(b,a,c)=>{let d=(e)=>a=c?new SuppressedError(e,a,"An error was suppressed during disposal"):(c=!0,e),f=(e)=>{while(e=b.pop())try{var j=e[1]&&e[1].call(e[2]);if(e[0])return Promise.resolve(j).then(f,(g)=>(d(g),f()))}catch(g){d(g)}if(c)throw a};return f()};
3
- export{q as cda,r as dda,s as eda,t as fda,u as gda,v as hda,w as ida};
3
+ export{q as eda,r as fda,s as gda,t as hda,u as ida,v as jda,w as kda};
@@ -1,3 +1,3 @@
1
1
  // @bun
2
- import{I_ as q,S_ as L}from"./cli-tq5z9qv3.js";import{eda as _,fda as J,gda as U}from"./cli-w1d8n9g3.js";function x(u,M){return u.flatMap((z,D)=>D?[M(D),z]:[z])}function C(u,M){let z=0;for(let D of u)z+=+!!M(D);return z}function c(u){return[...new Set(u)]}var F=()=>{};function K(){if(!O)O=U("proper-lockfile");return O}function i(u,M){return K().lock(u,M)}function s(u,M){return K().lockSync(u,M)}function o(u,M){return K().unlock(u,M)}function n(u,M){return K().check(u,M)}var O;var j=()=>{};import{AsyncLocalStorage as A}from"async_hooks";function B(){return Q.getStore()}function Y(u,M){return Q.run(u,M)}function Z(){return Q.getStore()!==void 0}function $(u){return{...u,isInProcess:!0}}var Q;var R=J(()=>{Q=new A});var l={};_(l,{waitForTeammatesToBecomeIdle:()=>p,setDynamicTeamContext:()=>w,runWithTeammateContext:()=>Y,isTeammate:()=>f,isTeamLead:()=>g,isPlanModeRequired:()=>T,isInProcessTeammate:()=>Z,hasWorkingInProcessTeammates:()=>k,hasActiveInProcessTeammates:()=>d,getTeammateContext:()=>B,getTeammateColor:()=>y,getTeamName:()=>I,getParentSessionId:()=>v,getDynamicTeamContext:()=>S,getAgentName:()=>P,getAgentId:()=>E,createTeammateContext:()=>$,clearDynamicTeamContext:()=>h});function v(){let u=B();if(u)return u.parentSessionId;return b?.parentSessionId}function w(u){b=u}function h(){b=null}function S(){return b}function E(){let u=B();if(u)return u.agentId;return b?.agentId}function P(){let u=B();if(u)return u.agentName;return b?.agentName}function I(u){let M=B();if(M)return M.teamName;if(b?.teamName)return b.teamName;return u?.teamName}function f(){if(B())return!0;return!!(b?.agentId&&b?.teamName)}function y(){let u=B();if(u)return u.color;return b?.color}function T(){let u=B();if(u)return u.planModeRequired;if(b!==null)return b.planModeRequired;return q(process.env.CLAUDE_CODE_PLAN_MODE_REQUIRED)}function g(u){if(!u?.leadAgentId)return!1;let M=E(),z=u.leadAgentId;if(M===z)return!0;if(!M)return!0;return!1}function d(u){for(let M of Object.values(u.tasks))if(M.type==="in_process_teammate"&&M.status==="running")return!0;return!1}function k(u){for(let M of Object.values(u.tasks))if(M.type==="in_process_teammate"&&M.status==="running"&&!M.isIdle)return!0;return!1}function p(u,M){let z=[];for(let[D,G]of Object.entries(M.tasks))if(G.type==="in_process_teammate"&&G.status==="running"&&!G.isIdle)z.push(D);if(z.length===0)return Promise.resolve();return new Promise((D)=>{let G=z.length,V=()=>{if(G--,G===0)D()};u((W)=>{let N={...W.tasks};for(let X of z){let H=N[X];if(H&&H.type==="in_process_teammate")if(H.isIdle)V();else N[X]={...H,onIdleCallbacks:[...H.onIdleCallbacks??[],V]}}return{...W,tasks:N}})})}var b=null;var r=J(()=>{R();L();R()});
2
+ import{K_ as q,U_ as L}from"./cli-q8zmmp6z.js";import{gda as _,hda as J,ida as U}from"./cli-qwx84m9c.js";function x(u,M){return u.flatMap((z,D)=>D?[M(D),z]:[z])}function C(u,M){let z=0;for(let D of u)z+=+!!M(D);return z}function c(u){return[...new Set(u)]}var F=()=>{};function K(){if(!O)O=U("proper-lockfile");return O}function i(u,M){return K().lock(u,M)}function s(u,M){return K().lockSync(u,M)}function o(u,M){return K().unlock(u,M)}function n(u,M){return K().check(u,M)}var O;var j=()=>{};import{AsyncLocalStorage as A}from"async_hooks";function B(){return Q.getStore()}function Y(u,M){return Q.run(u,M)}function Z(){return Q.getStore()!==void 0}function $(u){return{...u,isInProcess:!0}}var Q;var R=J(()=>{Q=new A});var l={};_(l,{waitForTeammatesToBecomeIdle:()=>p,setDynamicTeamContext:()=>w,runWithTeammateContext:()=>Y,isTeammate:()=>f,isTeamLead:()=>g,isPlanModeRequired:()=>T,isInProcessTeammate:()=>Z,hasWorkingInProcessTeammates:()=>k,hasActiveInProcessTeammates:()=>d,getTeammateContext:()=>B,getTeammateColor:()=>y,getTeamName:()=>I,getParentSessionId:()=>v,getDynamicTeamContext:()=>S,getAgentName:()=>P,getAgentId:()=>E,createTeammateContext:()=>$,clearDynamicTeamContext:()=>h});function v(){let u=B();if(u)return u.parentSessionId;return b?.parentSessionId}function w(u){b=u}function h(){b=null}function S(){return b}function E(){let u=B();if(u)return u.agentId;return b?.agentId}function P(){let u=B();if(u)return u.agentName;return b?.agentName}function I(u){let M=B();if(M)return M.teamName;if(b?.teamName)return b.teamName;return u?.teamName}function f(){if(B())return!0;return!!(b?.agentId&&b?.teamName)}function y(){let u=B();if(u)return u.color;return b?.color}function T(){let u=B();if(u)return u.planModeRequired;if(b!==null)return b.planModeRequired;return q(process.env.CLAUDE_CODE_PLAN_MODE_REQUIRED)}function g(u){if(!u?.leadAgentId)return!1;let M=E(),z=u.leadAgentId;if(M===z)return!0;if(!M)return!0;return!1}function d(u){for(let M of Object.values(u.tasks))if(M.type==="in_process_teammate"&&M.status==="running")return!0;return!1}function k(u){for(let M of Object.values(u.tasks))if(M.type==="in_process_teammate"&&M.status==="running"&&!M.isIdle)return!0;return!1}function p(u,M){let z=[];for(let[D,G]of Object.entries(M.tasks))if(G.type==="in_process_teammate"&&G.status==="running"&&!G.isIdle)z.push(D);if(z.length===0)return Promise.resolve();return new Promise((D)=>{let G=z.length,V=()=>{if(G--,G===0)D()};u((W)=>{let N={...W.tasks};for(let X of z){let H=N[X];if(H&&H.type==="in_process_teammate")if(H.isIdle)V();else N[X]={...H,onIdleCallbacks:[...H.onIdleCallbacks??[],V]}}return{...W,tasks:N}})})}var b=null;var r=J(()=>{R();L();R()});
3
3
  export{x as c4,C as d4,c as e4,F as f4,i as g4,s as h4,o as i4,n as j4,j as k4,B as l4,Y as m4,Z as n4,$ as o4,R as p4,v as q4,S as r4,E as s4,P as t4,I as u4,f as v4,y as w4,T as x4,g as y4,d as z4,k as A4,p as B4,l as C4,r as D4};
@@ -1,3 +1,3 @@
1
1
  // @bun
2
- import{fda as K}from"./cli-w1d8n9g3.js";function C(f){return(j)=>{if(j.code==="EPIPE")f.destroy()}}function M(){process.stdout.on("error",C(process.stdout)),process.stderr.on("error",C(process.stderr))}function G(f,j){if(f.destroyed)return;f.write(j)}function N(f){G(process.stdout,f)}function Q(f){G(process.stderr,f)}function R(f){console.error(f),process.exit(1)}function S(f,j){return new Promise((H)=>{let q=(J)=>{clearTimeout(B),f.off("end",z),f.off("data",A),H(J)},z=()=>q(!1),A=()=>clearTimeout(B),B=setTimeout(q,j,!0);f.once("end",z),f.once("data",A)})}var L=()=>{};
3
- export{M as z_,N as A_,Q as B_,R as C_,S as D_,L as E_};
2
+ import{hda as K}from"./cli-qwx84m9c.js";function C(f){return(j)=>{if(j.code==="EPIPE")f.destroy()}}function M(){process.stdout.on("error",C(process.stdout)),process.stderr.on("error",C(process.stderr))}function G(f,j){if(f.destroyed)return;f.write(j)}function N(f){G(process.stdout,f)}function Q(f){G(process.stderr,f)}function R(f){console.error(f),process.exit(1)}function S(f,j){return new Promise((H)=>{let q=(J)=>{clearTimeout(B),f.off("end",z),f.off("data",A),H(J)},z=()=>q(!1),A=()=>clearTimeout(B),B=setTimeout(q,j,!0);f.once("end",z),f.once("data",A)})}var L=()=>{};
3
+ export{M as B_,N as C_,Q as D_,R as E_,S as F_,L as G_};
@@ -1,3 +1,3 @@
1
1
  // @bun
2
- import{eq as H,hq as L}from"./cli-me4e2p3e.js";import{hU as G,oU as K}from"./cli-msmzt4c3.js";import{fda as J}from"./cli-w1d8n9g3.js";function T(q,w){let z=new Map;for(let h of w)z.set(h.agentType,h);let C=new Set,E=[];for(let h of q){let F=`${h.agentType}:${h.source}`;if(C.has(F))continue;C.add(F);let x=z.get(h.agentType),I=x&&x.source!==h.source?x.source:void 0;E.push({...h,overriddenBy:I})}return E}function U(q){let w=q.model||H();if(!w)return;return w==="inherit"?"inherit":w}function V(q){return G(q).toLowerCase()}function W(q,w){return q.agentType.localeCompare(w.agentType,void 0,{sensitivity:"base"})}var R;var O=J(()=>{L();K();R=[{label:"User agents",source:"userSettings"},{label:"Project agents",source:"projectSettings"},{label:"Local agents",source:"localSettings"},{label:"Managed agents",source:"policySettings"},{label:"Plugin agents",source:"plugin"},{label:"CLI arg agents",source:"flagSettings"},{label:"Built-in agents",source:"built-in"}]});
2
+ import{eq as H,hq as L}from"./cli-b3k8arn1.js";import{hU as G,oU as K}from"./cli-192xnkcx.js";import{hda as J}from"./cli-qwx84m9c.js";function T(q,w){let z=new Map;for(let h of w)z.set(h.agentType,h);let C=new Set,E=[];for(let h of q){let F=`${h.agentType}:${h.source}`;if(C.has(F))continue;C.add(F);let x=z.get(h.agentType),I=x&&x.source!==h.source?x.source:void 0;E.push({...h,overriddenBy:I})}return E}function U(q){let w=q.model||H();if(!w)return;return w==="inherit"?"inherit":w}function V(q){return G(q).toLowerCase()}function W(q,w){return q.agentType.localeCompare(w.agentType,void 0,{sensitivity:"base"})}var R;var O=J(()=>{L();K();R=[{label:"User agents",source:"userSettings"},{label:"Project agents",source:"projectSettings"},{label:"Local agents",source:"localSettings"},{label:"Managed agents",source:"policySettings"},{label:"Plugin agents",source:"plugin"},{label:"CLI arg agents",source:"flagSettings"},{label:"Built-in agents",source:"built-in"}]});
3
3
  export{R as jb,T as kb,U as lb,V as mb,W as nb,O as ob};
@@ -1,3 +1,3 @@
1
1
  // @bun
2
- import{AF as Lq,Ai as Tq,BF as JJ,DF as mJ,Di as aq,Ei as Sq,Ep as tq,Qz as qJ,Rz as yJ,dr as CJ,pi as _,qi as uq,ti as dq,vi as $q,yi as _q}from"./cli-me4e2p3e.js";import{SL as iq,TL as PJ,UL as lq,VL as NJ,WL as oq,XL as bJ}from"./cli-xfsqvp8r.js";import{aO as sq,bO as RJ}from"./cli-6yprtw88.js";import{TO as fq,UO as IJ,aP as eq,bP as LJ}from"./cli-akcxtvv9.js";import{DQ as K,FQ as G,fR as AJ}from"./cli-x8xgga1a.js";import{AU as gq,AY as nq,BU as Mq,BW as pq,CU as Bq,DU as Dq,F1 as SJ,FY as WJ,LU as kJ,NW as HJ,_Z as ZJ,aZ as mq,f0 as _J,g1 as zJ,lY as yq,lZ as rq,mY as Eq,oY as Nq,oZ as bq,rZ as BJ,zW as cq}from"./cli-msmzt4c3.js";import{Y8 as xq,Z8 as KJ}from"./cli-t9jht3kb.js";import{fda as Aq}from"./cli-w1d8n9g3.js";function cJ(Q,q){if(!_(q))return;let Z=_q(q,Q);return`${Pq(Z)} ${Z} \xB7 /effort`}function Pq(Q){switch(Q){case"low":return gq;case"medium":return Mq;case"high":return Bq;case"max":return Dq;default:return Bq}}var vq=Aq(()=>{kJ();Sq()});import{c as QJ}from"react/compiler-runtime";import TJ from"lodash-es/capitalize.js";import{useState as Iq}from"react";import{jsxDEV as J,Fragment as MJ}from"react/jsx-dev-runtime";function GQ(Q){let q=QJ(82),{initial:Z,sessionModel:U,onSelect:X,onCancel:Y,isStandaloneCommand:H,showFastModeNotice:Zq,headerText:UJ,skipSettingsWrite:zq}=Q,Uq=JJ(),S=sq(),A=Z===null?Qq:Z,[W,XJ]=Iq(A),GJ=Lq(OJ),[P,YJ]=Iq(!1),I=Lq(FJ),v;if(q[0]!==I)v=I!==void 0?Tq(I):void 0,q[0]=I,q[1]=v;else v=q[1];let[R,jq]=Iq(v),Xq=GJ??!1,V;if(q[2]!==Xq)V=qJ(Xq),q[2]=Xq,q[3]=V;else V=q[3];let M=V,Gq;q:{if(Z!==null&&!M.some((z)=>z.value===Z)){let z;if(q[4]!==Z)z=bq(Z),q[4]=Z,q[5]=z;else z=q[5];let w;if(q[6]!==Z||q[7]!==z)w={value:Z,label:z,description:"Current model"},q[6]=Z,q[7]=z,q[8]=w;else w=q[8];let N;if(q[9]!==M||q[10]!==w)N=[...M,w],q[9]=M,q[10]=w,q[11]=N;else N=q[11];Gq=N;break q}Gq=M}let Yq=Gq,x;if(q[12]!==Yq)x=Yq.map(hJ),q[12]=Yq,q[13]=x;else x=q[13];let k=x,c;if(q[14]!==A||q[15]!==k)c=k.some((z)=>z.value===A)?A:k[0]?.value??void 0,q[14]=A,q[15]=k,q[16]=c;else c=q[16];let wq=c,p=Math.min(10,k.length),E=Math.max(0,k.length-p),n;if(q[17]!==W||q[18]!==k)n=k.find((z)=>z.value===W)?.label,q[17]=W,q[18]=k,q[19]=n;else n=q[19];let r=n,B,u;if(q[20]!==W){let z=Cq(W);B=z?_(z):!1,u=z?uq(z):!1,q[20]=W,q[21]=B,q[22]=u}else B=q[21],u=q[22];let d=u,$;if(q[23]!==W)$=Rq(W),q[23]=W,q[24]=$;else $=q[24];let b=$,D=R==="max"&&!d?"high":R,a;if(q[25]!==I||q[26]!==P)a=(z)=>{if(XJ(z),!P&&I===void 0)jq(Rq(z))},q[25]=I,q[26]=P,q[27]=a;else a=q[27];let kq=a,i;if(q[28]!==b||q[29]!==B||q[30]!==d)i=(z)=>{if(!B)return;jq((w)=>gJ(w??b,z,d)),YJ(!0)},q[28]=b,q[29]=B,q[30]=d,q[31]=i;else i=q[31];let f=i,s;if(q[32]!==f)s={"modelPicker:decreaseEffort":()=>f("left"),"modelPicker:increaseEffort":()=>f("right")},q[32]=f,q[33]=s;else s=q[33];let l;if(q[34]===Symbol.for("react.memo_cache_sentinel"))l={context:"ModelPicker"},q[34]=l;else l=q[34];fq(s,l);let o;if(q[35]!==R||q[36]!==P||q[37]!==X||q[38]!==Uq||q[39]!==zq)o=function(w){if(xq("tengu_model_command_menu_effort",{effort:R}),!zq){let Fq=$q(R,Rq(w),cq("userSettings")?.effortLevel,P),Oq=dq(Fq);if(Oq!==void 0)pq("userSettings",{effortLevel:Oq});Uq((wJ)=>({...wJ,effortValue:Fq}))}let N=Cq(w),hq=P&&N&&_(N)?R:void 0;if(w===Qq){X(null,hq);return}X(w,hq)},q[35]=R,q[36]=P,q[37]=X,q[38]=Uq,q[39]=zq,q[40]=o;else o=q[40];let Kq=o,e;if(q[41]===Symbol.for("react.memo_cache_sentinel"))e=J(G,{color:"remember",bold:!0,children:"Select model"},void 0,!1,void 0,this),q[41]=e;else e=q[41];let Hq=UJ??"Switch between Claude models. Applies to this session and future UnieAI Code sessions. For other/previous model names, specify with --model.",L;if(q[42]!==Hq)L=J(G,{dimColor:!0,children:Hq},void 0,!1,void 0,this),q[42]=Hq,q[43]=L;else L=q[43];let C;if(q[44]!==U)C=U&&J(G,{dimColor:!0,children:["Currently using ",bq(U)," for this session (set by plan mode). Selecting a model will undo this."]},void 0,!0,void 0,this),q[44]=U,q[45]=C;else C=q[45];let y;if(q[46]!==L||q[47]!==C)y=J(K,{marginBottom:1,flexDirection:"column",children:[e,L,C]},void 0,!0,void 0,this),q[46]=L,q[47]=C,q[48]=y;else y=q[48];let Wq=Y??jJ,m;if(q[49]!==kq||q[50]!==Kq||q[51]!==wq||q[52]!==A||q[53]!==k||q[54]!==Wq||q[55]!==p)m=J(K,{flexDirection:"column",children:J(tq,{defaultValue:A,defaultFocusValue:wq,options:k,onChange:Kq,onFocus:kq,onCancel:Wq,visibleOptionCount:p},void 0,!1,void 0,this)},void 0,!1,void 0,this),q[49]=kq,q[50]=Kq,q[51]=wq,q[52]=A,q[53]=k,q[54]=Wq,q[55]=p,q[56]=m;else m=q[56];let T;if(q[57]!==E)T=E>0&&J(K,{paddingLeft:3,children:J(G,{dimColor:!0,children:["and ",E," more\u2026"]},void 0,!0,void 0,this)},void 0,!1,void 0,this),q[57]=E,q[58]=T;else T=q[58];let j;if(q[59]!==m||q[60]!==T)j=J(K,{flexDirection:"column",marginBottom:1,children:[m,T]},void 0,!0,void 0,this),q[59]=m,q[60]=T,q[61]=j;else j=q[61];let h;if(q[62]!==D||q[63]!==b||q[64]!==r||q[65]!==B)h=J(K,{marginBottom:1,flexDirection:"column",children:B?J(G,{dimColor:!0,children:[J(Vq,{effort:D},void 0,!1,void 0,this)," ",TJ(D)," effort",D===b?" (default)":""," ",J(G,{color:"subtle",children:"\u2190 \u2192 to adjust"},void 0,!1,void 0,this)]},void 0,!0,void 0,this):J(G,{color:"subtle",children:[J(Vq,{effort:void 0},void 0,!1,void 0,this)," Effort not supported",r?` for ${r}`:""]},void 0,!0,void 0,this)},void 0,!1,void 0,this),q[62]=D,q[63]=b,q[64]=r,q[65]=B,q[66]=h;else h=q[66];let F;if(q[67]!==Zq)F=yq()?Zq?J(K,{marginBottom:1,children:J(G,{dimColor:!0,children:["Fast mode is ",J(G,{bold:!0,children:"ON"},void 0,!1,void 0,this)," and available with"," ",Nq," only (/fast). Switching to other models turn off fast mode."]},void 0,!0,void 0,this)},void 0,!1,void 0,this):Eq()&&!nq()?J(K,{marginBottom:1,children:J(G,{dimColor:!0,children:["Use ",J(G,{bold:!0,children:"/fast"},void 0,!1,void 0,this)," to turn on Fast mode (",Nq," only)."]},void 0,!0,void 0,this)},void 0,!1,void 0,this):null:null,q[67]=Zq,q[68]=F;else F=q[68];let O;if(q[69]!==y||q[70]!==j||q[71]!==h||q[72]!==F)O=J(K,{flexDirection:"column",children:[y,j,h,F]},void 0,!0,void 0,this),q[69]=y,q[70]=j,q[71]=h,q[72]=F,q[73]=O;else O=q[73];let g;if(q[74]!==S||q[75]!==H)g=H&&J(G,{dimColor:!0,italic:!0,children:S.pending?J(MJ,{children:["Press ",S.keyName," again to exit"]},void 0,!0,void 0,this):J(oq,{children:[J(iq,{shortcut:"Enter",action:"confirm"},void 0,!1,void 0,this),J(lq,{action:"select:cancel",context:"Select",fallback:"Esc",description:"exit"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)},void 0,!1,void 0,this),q[74]=S,q[75]=H,q[76]=g;else g=q[76];let t;if(q[77]!==O||q[78]!==g)t=J(K,{flexDirection:"column",children:[O,g]},void 0,!0,void 0,this),q[77]=O,q[78]=g,q[79]=t;else t=q[79];let qq=t;if(!H)return qq;let Jq;if(q[80]!==qq)Jq=J(eq,{color:"permission",children:qq},void 0,!1,void 0,this),q[80]=qq,q[81]=Jq;else Jq=q[81];return Jq}function jJ(){}function hJ(Q){return{...Q,value:Q.value===null?Qq:Q.value}}function FJ(Q){return Q.effortValue}function OJ(Q){return yq()?Q.fastMode:!1}function Cq(Q){if(!Q)return;return Q===Qq?mq():rq(Q)}function Vq(Q){let q=QJ(5),{effort:Z}=Q,U=Z?"claude":"subtle",X=Z??"low",Y;if(q[0]!==X)Y=Pq(X),q[0]=X,q[1]=Y;else Y=q[1];let H;if(q[2]!==U||q[3]!==Y)H=J(G,{color:U,children:Y},void 0,!1,void 0,this),q[2]=U,q[3]=Y,q[4]=H;else H=q[4];return H}function gJ(Q,q,Z){let U=Z?["low","medium","high","max"]:["low","medium","high"],X=U.indexOf(Q),Y=X!==-1?X:U.indexOf("high");if(q==="right")return U[(Y+1)%U.length];else return U[(Y-1+U.length)%U.length]}function Rq(Q){let q=Cq(Q)??mq(),Z=aq(q);return Z!==void 0?Tq(Z):"high"}var Qq="__NO_PREFERENCE__";var DJ=Aq(()=>{RJ();KJ();WJ();AJ();IJ();mJ();Sq();BJ();yJ();HJ();NJ();CJ();bJ();PJ();LJ();vq()});function HQ(Q,q,Z){if(!zJ())return!1;if(q)return!0;if(Q===null||!ZJ(Q))return!1;let U=Q.toLowerCase().replace(/\[1m\]$/,"").trim(),X=U==="opus"||U.includes("opus-4-6"),Y=U==="sonnet"||U.includes("sonnet-4-6");if(X&&Z)return!1;return X||Y}var vJ=Aq(()=>{SJ();_J()});
2
+ import{AF as Lq,Ai as Tq,BF as JJ,DF as mJ,Di as aq,Ei as Sq,Ep as tq,Qz as qJ,Rz as yJ,dr as CJ,pi as _,qi as uq,ti as dq,vi as $q,yi as _q}from"./cli-b3k8arn1.js";import{SL as iq,TL as PJ,UL as lq,VL as NJ,WL as oq,XL as bJ}from"./cli-4pwyex04.js";import{aO as sq,bO as RJ}from"./cli-awe5yg6m.js";import{TO as fq,UO as IJ,aP as eq,bP as LJ}from"./cli-8jym9hp6.js";import{DQ as K,FQ as G,fR as AJ}from"./cli-a2d962bq.js";import{AU as gq,AY as nq,BU as Mq,BW as pq,CU as Bq,DU as Dq,F1 as SJ,FY as WJ,LU as kJ,NW as HJ,_Z as ZJ,aZ as mq,f0 as _J,g1 as zJ,lY as yq,lZ as rq,mY as Eq,oY as Nq,oZ as bq,rZ as BJ,zW as cq}from"./cli-192xnkcx.js";import{$8 as KJ,_8 as xq}from"./cli-e5yek4vx.js";import{hda as Aq}from"./cli-qwx84m9c.js";function cJ(Q,q){if(!_(q))return;let Z=_q(q,Q);return`${Pq(Z)} ${Z} \xB7 /effort`}function Pq(Q){switch(Q){case"low":return gq;case"medium":return Mq;case"high":return Bq;case"max":return Dq;default:return Bq}}var vq=Aq(()=>{kJ();Sq()});import{c as QJ}from"react/compiler-runtime";import TJ from"lodash-es/capitalize.js";import{useState as Iq}from"react";import{jsxDEV as J,Fragment as MJ}from"react/jsx-dev-runtime";function GQ(Q){let q=QJ(82),{initial:Z,sessionModel:U,onSelect:X,onCancel:Y,isStandaloneCommand:H,showFastModeNotice:Zq,headerText:UJ,skipSettingsWrite:zq}=Q,Uq=JJ(),S=sq(),A=Z===null?Qq:Z,[W,XJ]=Iq(A),GJ=Lq(OJ),[P,YJ]=Iq(!1),I=Lq(FJ),v;if(q[0]!==I)v=I!==void 0?Tq(I):void 0,q[0]=I,q[1]=v;else v=q[1];let[R,jq]=Iq(v),Xq=GJ??!1,V;if(q[2]!==Xq)V=qJ(Xq),q[2]=Xq,q[3]=V;else V=q[3];let M=V,Gq;q:{if(Z!==null&&!M.some((z)=>z.value===Z)){let z;if(q[4]!==Z)z=bq(Z),q[4]=Z,q[5]=z;else z=q[5];let w;if(q[6]!==Z||q[7]!==z)w={value:Z,label:z,description:"Current model"},q[6]=Z,q[7]=z,q[8]=w;else w=q[8];let N;if(q[9]!==M||q[10]!==w)N=[...M,w],q[9]=M,q[10]=w,q[11]=N;else N=q[11];Gq=N;break q}Gq=M}let Yq=Gq,x;if(q[12]!==Yq)x=Yq.map(hJ),q[12]=Yq,q[13]=x;else x=q[13];let k=x,c;if(q[14]!==A||q[15]!==k)c=k.some((z)=>z.value===A)?A:k[0]?.value??void 0,q[14]=A,q[15]=k,q[16]=c;else c=q[16];let wq=c,p=Math.min(10,k.length),E=Math.max(0,k.length-p),n;if(q[17]!==W||q[18]!==k)n=k.find((z)=>z.value===W)?.label,q[17]=W,q[18]=k,q[19]=n;else n=q[19];let r=n,B,u;if(q[20]!==W){let z=Cq(W);B=z?_(z):!1,u=z?uq(z):!1,q[20]=W,q[21]=B,q[22]=u}else B=q[21],u=q[22];let d=u,$;if(q[23]!==W)$=Rq(W),q[23]=W,q[24]=$;else $=q[24];let b=$,D=R==="max"&&!d?"high":R,a;if(q[25]!==I||q[26]!==P)a=(z)=>{if(XJ(z),!P&&I===void 0)jq(Rq(z))},q[25]=I,q[26]=P,q[27]=a;else a=q[27];let kq=a,i;if(q[28]!==b||q[29]!==B||q[30]!==d)i=(z)=>{if(!B)return;jq((w)=>gJ(w??b,z,d)),YJ(!0)},q[28]=b,q[29]=B,q[30]=d,q[31]=i;else i=q[31];let f=i,s;if(q[32]!==f)s={"modelPicker:decreaseEffort":()=>f("left"),"modelPicker:increaseEffort":()=>f("right")},q[32]=f,q[33]=s;else s=q[33];let l;if(q[34]===Symbol.for("react.memo_cache_sentinel"))l={context:"ModelPicker"},q[34]=l;else l=q[34];fq(s,l);let o;if(q[35]!==R||q[36]!==P||q[37]!==X||q[38]!==Uq||q[39]!==zq)o=function(w){if(xq("tengu_model_command_menu_effort",{effort:R}),!zq){let Fq=$q(R,Rq(w),cq("userSettings")?.effortLevel,P),Oq=dq(Fq);if(Oq!==void 0)pq("userSettings",{effortLevel:Oq});Uq((wJ)=>({...wJ,effortValue:Fq}))}let N=Cq(w),hq=P&&N&&_(N)?R:void 0;if(w===Qq){X(null,hq);return}X(w,hq)},q[35]=R,q[36]=P,q[37]=X,q[38]=Uq,q[39]=zq,q[40]=o;else o=q[40];let Kq=o,e;if(q[41]===Symbol.for("react.memo_cache_sentinel"))e=J(G,{color:"remember",bold:!0,children:"Select model"},void 0,!1,void 0,this),q[41]=e;else e=q[41];let Hq=UJ??"Switch between Claude models. Applies to this session and future UnieAI Code sessions. For other/previous model names, specify with --model.",L;if(q[42]!==Hq)L=J(G,{dimColor:!0,children:Hq},void 0,!1,void 0,this),q[42]=Hq,q[43]=L;else L=q[43];let C;if(q[44]!==U)C=U&&J(G,{dimColor:!0,children:["Currently using ",bq(U)," for this session (set by plan mode). Selecting a model will undo this."]},void 0,!0,void 0,this),q[44]=U,q[45]=C;else C=q[45];let y;if(q[46]!==L||q[47]!==C)y=J(K,{marginBottom:1,flexDirection:"column",children:[e,L,C]},void 0,!0,void 0,this),q[46]=L,q[47]=C,q[48]=y;else y=q[48];let Wq=Y??jJ,m;if(q[49]!==kq||q[50]!==Kq||q[51]!==wq||q[52]!==A||q[53]!==k||q[54]!==Wq||q[55]!==p)m=J(K,{flexDirection:"column",children:J(tq,{defaultValue:A,defaultFocusValue:wq,options:k,onChange:Kq,onFocus:kq,onCancel:Wq,visibleOptionCount:p},void 0,!1,void 0,this)},void 0,!1,void 0,this),q[49]=kq,q[50]=Kq,q[51]=wq,q[52]=A,q[53]=k,q[54]=Wq,q[55]=p,q[56]=m;else m=q[56];let T;if(q[57]!==E)T=E>0&&J(K,{paddingLeft:3,children:J(G,{dimColor:!0,children:["and ",E," more\u2026"]},void 0,!0,void 0,this)},void 0,!1,void 0,this),q[57]=E,q[58]=T;else T=q[58];let j;if(q[59]!==m||q[60]!==T)j=J(K,{flexDirection:"column",marginBottom:1,children:[m,T]},void 0,!0,void 0,this),q[59]=m,q[60]=T,q[61]=j;else j=q[61];let h;if(q[62]!==D||q[63]!==b||q[64]!==r||q[65]!==B)h=J(K,{marginBottom:1,flexDirection:"column",children:B?J(G,{dimColor:!0,children:[J(Vq,{effort:D},void 0,!1,void 0,this)," ",TJ(D)," effort",D===b?" (default)":""," ",J(G,{color:"subtle",children:"\u2190 \u2192 to adjust"},void 0,!1,void 0,this)]},void 0,!0,void 0,this):J(G,{color:"subtle",children:[J(Vq,{effort:void 0},void 0,!1,void 0,this)," Effort not supported",r?` for ${r}`:""]},void 0,!0,void 0,this)},void 0,!1,void 0,this),q[62]=D,q[63]=b,q[64]=r,q[65]=B,q[66]=h;else h=q[66];let F;if(q[67]!==Zq)F=yq()?Zq?J(K,{marginBottom:1,children:J(G,{dimColor:!0,children:["Fast mode is ",J(G,{bold:!0,children:"ON"},void 0,!1,void 0,this)," and available with"," ",Nq," only (/fast). Switching to other models turn off fast mode."]},void 0,!0,void 0,this)},void 0,!1,void 0,this):Eq()&&!nq()?J(K,{marginBottom:1,children:J(G,{dimColor:!0,children:["Use ",J(G,{bold:!0,children:"/fast"},void 0,!1,void 0,this)," to turn on Fast mode (",Nq," only)."]},void 0,!0,void 0,this)},void 0,!1,void 0,this):null:null,q[67]=Zq,q[68]=F;else F=q[68];let O;if(q[69]!==y||q[70]!==j||q[71]!==h||q[72]!==F)O=J(K,{flexDirection:"column",children:[y,j,h,F]},void 0,!0,void 0,this),q[69]=y,q[70]=j,q[71]=h,q[72]=F,q[73]=O;else O=q[73];let g;if(q[74]!==S||q[75]!==H)g=H&&J(G,{dimColor:!0,italic:!0,children:S.pending?J(MJ,{children:["Press ",S.keyName," again to exit"]},void 0,!0,void 0,this):J(oq,{children:[J(iq,{shortcut:"Enter",action:"confirm"},void 0,!1,void 0,this),J(lq,{action:"select:cancel",context:"Select",fallback:"Esc",description:"exit"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)},void 0,!1,void 0,this),q[74]=S,q[75]=H,q[76]=g;else g=q[76];let t;if(q[77]!==O||q[78]!==g)t=J(K,{flexDirection:"column",children:[O,g]},void 0,!0,void 0,this),q[77]=O,q[78]=g,q[79]=t;else t=q[79];let qq=t;if(!H)return qq;let Jq;if(q[80]!==qq)Jq=J(eq,{color:"permission",children:qq},void 0,!1,void 0,this),q[80]=qq,q[81]=Jq;else Jq=q[81];return Jq}function jJ(){}function hJ(Q){return{...Q,value:Q.value===null?Qq:Q.value}}function FJ(Q){return Q.effortValue}function OJ(Q){return yq()?Q.fastMode:!1}function Cq(Q){if(!Q)return;return Q===Qq?mq():rq(Q)}function Vq(Q){let q=QJ(5),{effort:Z}=Q,U=Z?"claude":"subtle",X=Z??"low",Y;if(q[0]!==X)Y=Pq(X),q[0]=X,q[1]=Y;else Y=q[1];let H;if(q[2]!==U||q[3]!==Y)H=J(G,{color:U,children:Y},void 0,!1,void 0,this),q[2]=U,q[3]=Y,q[4]=H;else H=q[4];return H}function gJ(Q,q,Z){let U=Z?["low","medium","high","max"]:["low","medium","high"],X=U.indexOf(Q),Y=X!==-1?X:U.indexOf("high");if(q==="right")return U[(Y+1)%U.length];else return U[(Y-1+U.length)%U.length]}function Rq(Q){let q=Cq(Q)??mq(),Z=aq(q);return Z!==void 0?Tq(Z):"high"}var Qq="__NO_PREFERENCE__";var DJ=Aq(()=>{RJ();KJ();WJ();AJ();IJ();mJ();Sq();BJ();yJ();HJ();NJ();CJ();bJ();PJ();LJ();vq()});function HQ(Q,q,Z){if(!zJ())return!1;if(q)return!0;if(Q===null||!ZJ(Q))return!1;let U=Q.toLowerCase().replace(/\[1m\]$/,"").trim(),X=U==="opus"||U.includes("opus-4-6"),Y=U==="sonnet"||U.includes("sonnet-4-6");if(X&&Z)return!1;return X||Y}var vJ=Aq(()=>{SJ();_J()});
3
3
  export{cJ as Oe,Pq as Pe,vq as Qe,GQ as Re,DJ as Se,HQ as Te,vJ as Ue};
@@ -0,0 +1,3 @@
1
+ // @bun
2
+ import{Ck as _,Vj as f}from"./cli-b3k8arn1.js";import{F1 as x,H1 as K,NW as T,Q3 as A,_W as W,a3 as k,rU as L}from"./cli-192xnkcx.js";import{$4 as q,a5 as Q}from"./cli-t5ddsvmv.js";import{E5 as v}from"./cli-hpxspent.js";import{C7 as H,S6 as w}from"./cli-yb5m6jwq.js";import{$8 as B}from"./cli-e5yek4vx.js";import{E9 as U}from"./cli-zxe1a0ey.js";import{d_ as O}from"./cli-awb77t95.js";import{d$ as $,dda as X}from"./cli-tafg3e9w.js";import{hda as G}from"./cli-qwx84m9c.js";import{z as b}from"zod/v4";var V,Z;var J=G(()=>{Q();V=q(()=>b.object({entries:b.record(b.string(),b.string())})),Z=q(()=>b.object({userId:b.string(),version:b.number(),lastModified:b.string(),checksum:b.string(),content:V()}))});import r from"axios";import o from"lodash-es/pickBy.js";var Y=G(()=>{X();U();x();f();A();w();O();H();W();L();T();$();v();K();k();B();_();J()});
3
+ export{Y as tb};
@@ -1,5 +1,5 @@
1
1
  // @bun
2
- import{Hw as A,Iw as l,OF as D,PF as F,SF as y,XF as r,ep as x,ip as d}from"./cli-me4e2p3e.js";import{sQ as z,tQ as b}from"./cli-x8xgga1a.js";import{E9 as T,F9 as C}from"./cli-xpa1neza.js";import{G9 as k,H9 as c}from"./cli-rjerv816.js";import{g_ as j,h_ as m,l_ as L,p_ as p,v_ as V,y_ as E}from"./cli-hke6r0q8.js";import{fda as w}from"./cli-w1d8n9g3.js";import{spawn as G,spawnSync as _}from"child_process";import I from"lodash-es/memoize.js";import{basename as O}from"path";function g(q){return!!T(q)}function N(q){let H=O(q.split(" ")[0]??"");return u.find((B)=>H.includes(B))}function f(q,H,B){if(!B)return[H];if(P.has(q))return["-g",`${H}:${B}`];if(q==="subl")return[`${H}:${B}`];return[H]}function Kq(q,H){let B=v();if(!B)return!1;let J=B.split(" "),X=J[0]??B,K=J.slice(1),Q=N(B);if(Q){let W=f(Q,q,H),Z={detached:!0,stdio:"ignore"},M;if(process.platform==="win32"){let U=W.map((S)=>`"${S}"`).join(" ");M=G(`${B} ${U}`,{...Z,shell:!0})}else M=G(X,[...K,...W],Z);return M.on("error",(U)=>V(`editor spawn failed: ${U}`,{level:"error"})),M.unref(),!0}let $=z.get(process.stdout);if(!$)return!1;let Y=H&&h.test(O(X));$.enterAlternateScreen();try{let W={stdio:"inherit"},Z;if(process.platform==="win32"){let M=Y?`+${H} `:"";Z=_(`${B} ${M}"${q}"`,{...W,shell:!0})}else{let M=[...K,...Y?[`+${H}`,q]:[q]];Z=_(X,M,W)}if(Z.error)return V(`editor spawn failed: ${Z.error}`,{level:"error"}),!1;return!0}finally{$.exitAlternateScreen()}}var u,h,P,v;var R=w(()=>{b();E();C();u=["code","cursor","windsurf","codium","subl","atom","gedit","notepad++","notepad"],h=/\b(vi|vim|nvim|nano|emacs|pico|micro|helix|hx)\b/,P=new Set(["code","cursor","windsurf","codium"]);v=I(()=>{if(process.env.VISUAL?.trim())return process.env.VISUAL.trim();if(process.env.EDITOR?.trim())return process.env.EDITOR.trim();if(process.platform==="win32")return"start /wait notepad";return["code","vi","nano"].find((H)=>g(H))})});function s(q){return N(q)!==void 0}function a(q){let H=L(),B=z.get(process.stdout);if(!B)throw Error("Ink instance not found - cannot pause rendering");let J=v();if(!J)return{content:null};try{H.statSync(q)}catch{return{content:null}}let X=!s(J);if(X)B.enterAlternateScreen();else B.pause(),B.suspendStdin();try{let K=o[J]??J;return k(`${K} "${q}"`,{stdio:"inherit"}),{content:H.readFileSync(q,{encoding:"utf-8"})}}catch(K){if(typeof K==="object"&&K!==null&&"status"in K&&typeof K.status==="number"){let Q=K.status;if(Q!==0)return{content:null,error:`${x(J)} exited with code ${Q}`}}return{content:null}}finally{if(X)B.exitAlternateScreen();else B.resumeStdin(),B.resume()}}function i(q,H,B){let J=q;for(let[X,K]of Object.entries(B))if(K.type==="text"){let Q=parseInt(X),$=K.content,Y=J.indexOf($);if(Y!==-1){let W=D($),Z=F(Q,W);J=J.slice(0,Y)+Z+J.slice(Y+$.length)}}return J}function Vq(q,H){let B=L(),J=A();try{let X=H?y(q,H):q;j(J,X,{encoding:"utf-8",flush:!0});let K=a(J);if(K.content===null)return K;let Q=K.content;if(Q.endsWith(`
2
+ import{Hw as A,Iw as l,OF as D,PF as F,SF as y,XF as r,ep as x,ip as d}from"./cli-b3k8arn1.js";import{sQ as z,tQ as b}from"./cli-a2d962bq.js";import{G9 as T,H9 as C}from"./cli-2sbq6ggm.js";import{I9 as k,J9 as c}from"./cli-yaxs01at.js";import{A_ as E,i_ as j,j_ as m,n_ as L,r_ as p,x_ as V}from"./cli-awb77t95.js";import{hda as w}from"./cli-qwx84m9c.js";import{spawn as G,spawnSync as _}from"child_process";import I from"lodash-es/memoize.js";import{basename as O}from"path";function g(q){return!!T(q)}function N(q){let H=O(q.split(" ")[0]??"");return u.find((B)=>H.includes(B))}function f(q,H,B){if(!B)return[H];if(P.has(q))return["-g",`${H}:${B}`];if(q==="subl")return[`${H}:${B}`];return[H]}function Kq(q,H){let B=v();if(!B)return!1;let J=B.split(" "),X=J[0]??B,K=J.slice(1),Q=N(B);if(Q){let W=f(Q,q,H),Z={detached:!0,stdio:"ignore"},M;if(process.platform==="win32"){let U=W.map((S)=>`"${S}"`).join(" ");M=G(`${B} ${U}`,{...Z,shell:!0})}else M=G(X,[...K,...W],Z);return M.on("error",(U)=>V(`editor spawn failed: ${U}`,{level:"error"})),M.unref(),!0}let $=z.get(process.stdout);if(!$)return!1;let Y=H&&h.test(O(X));$.enterAlternateScreen();try{let W={stdio:"inherit"},Z;if(process.platform==="win32"){let M=Y?`+${H} `:"";Z=_(`${B} ${M}"${q}"`,{...W,shell:!0})}else{let M=[...K,...Y?[`+${H}`,q]:[q]];Z=_(X,M,W)}if(Z.error)return V(`editor spawn failed: ${Z.error}`,{level:"error"}),!1;return!0}finally{$.exitAlternateScreen()}}var u,h,P,v;var R=w(()=>{b();E();C();u=["code","cursor","windsurf","codium","subl","atom","gedit","notepad++","notepad"],h=/\b(vi|vim|nvim|nano|emacs|pico|micro|helix|hx)\b/,P=new Set(["code","cursor","windsurf","codium"]);v=I(()=>{if(process.env.VISUAL?.trim())return process.env.VISUAL.trim();if(process.env.EDITOR?.trim())return process.env.EDITOR.trim();if(process.platform==="win32")return"start /wait notepad";return["code","vi","nano"].find((H)=>g(H))})});function s(q){return N(q)!==void 0}function a(q){let H=L(),B=z.get(process.stdout);if(!B)throw Error("Ink instance not found - cannot pause rendering");let J=v();if(!J)return{content:null};try{H.statSync(q)}catch{return{content:null}}let X=!s(J);if(X)B.enterAlternateScreen();else B.pause(),B.suspendStdin();try{let K=o[J]??J;return k(`${K} "${q}"`,{stdio:"inherit"}),{content:H.readFileSync(q,{encoding:"utf-8"})}}catch(K){if(typeof K==="object"&&K!==null&&"status"in K&&typeof K.status==="number"){let Q=K.status;if(Q!==0)return{content:null,error:`${x(J)} exited with code ${Q}`}}return{content:null}}finally{if(X)B.exitAlternateScreen();else B.resumeStdin(),B.resume()}}function i(q,H,B){let J=q;for(let[X,K]of Object.entries(B))if(K.type==="text"){let Q=parseInt(X),$=K.content,Y=J.indexOf($);if(Y!==-1){let W=D($),Z=F(Q,W);J=J.slice(0,Y)+Z+J.slice(Y+$.length)}}return J}function Vq(q,H){let B=L(),J=A();try{let X=H?y(q,H):q;j(J,X,{encoding:"utf-8",flush:!0});let K=a(J);if(K.content===null)return K;let Q=K.content;if(Q.endsWith(`
3
3
  `)&&!Q.endsWith(`
4
4
 
5
5
  `))Q=Q.slice(0,-1);if(H)Q=i(Q,q,H);return{content:Q}}finally{try{B.unlinkSync(J)}catch{}}}var o;var n=w(()=>{r();b();R();c();p();d();m();l();o={code:"code -w",subl:"subl --wait"}});
@@ -1,4 +1,4 @@
1
1
  // @bun
2
- import{$d as r,Wd as b,Xd as I}from"./cli-zjfya500.js";import{OI as i,vI as T}from"./cli-me4e2p3e.js";import{nR as v,rR as h}from"./cli-v9f860t5.js";import{EW as A,F1 as o,NW as n,RT as P,cU as g,g1 as x,t1 as L}from"./cli-msmzt4c3.js";import{U5 as y,Y5 as d}from"./cli-w52yvzkn.js";import{Z5 as k,_5 as W,a6 as G,c6 as R,d6 as F,p6 as p}from"./cli-51720d82.js";import{L7 as E,M7 as m}from"./cli-rvad3yhg.js";import{bda as c,e$ as f,q$ as _}from"./cli-3ac555qw.js";import{fda as u}from"./cli-w1d8n9g3.js";function kq(z){if(z>=70)return"horizontal";return"compact"}function Bq(z,J,q){if(J==="horizontal"){let Y=q,K=S+O+H+Y,Z=z-K,$=Math.max(30,Z),B=Math.min(Y+$+H+O,z-S);if(B<Y+$+H+O)$=B-Y-H-O;return{leftWidth:Y,rightWidth:$,totalWidth:B}}let Q=Math.min(z-S,N+20);return{leftWidth:Q,rightWidth:Q,totalWidth:Q}}function Xq(z,J,q){let Q=Math.max(k(z),k(J),k(q),20);return Math.min(Q+4,N)}function Vq(z){if(!z||z.length>l)return"Welcome back!";return`Welcome back ${z}!`}function Uq(z,J){if(k(z)<=J)return z;let q="/",Q="\u2026",Y=1,K=1,Z=z.split(q),$=Z[0]||"",B=Z[Z.length-1]||"",D=k($),V=k(B);if(Z.length===1)return G(z,J);if($===""&&Y+K+V>=J)return`${q}${G(B,Math.max(1,J-K))}`;if($!==""&&Y*2+K+V>=J)return`${Q}${q}${G(B,Math.max(1,J-Y-K))}`;if(Z.length===2){let X=J-Y-K-V;return`${R($,X)}${Q}${q}${B}`}let M=J-D-V-Y-2*K;if(M<=0){let X=Math.max(0,J-V-Y-2*K);return`${R($,X)}${q}${Q}${q}${B}`}let C=[];for(let X=Z.length-2;X>0;X--){let U=Z[X];if(U&&k(U)+K<=M)C.unshift(U),M-=k(U)+K;else break}if(C.length===0)return`${$}${q}${Q}${q}${B}`;return`${$}${q}${Q}${q}${C.join(q)}${q}${B}`}async function wq(){if(j)return j;let z=f();return j=T(10).then((J)=>{return w=J.filter((q)=>{if(q.isSidechain)return!1;if(q.sessionId===z)return!1;if(q.summary?.includes("I apologize"))return!1;let Q=q.summary&&q.summary!=="No prompt",Y=q.firstPrompt&&q.firstPrompt!=="No prompt";return Q||Y}).slice(0,3),w}).catch(()=>{return w=[],w}),j}function Hq(){return w}function Oq(){let z=process.env.DEMO_VERSION??MACRO.VERSION,J=_(),q=process.env.DEMO_VERSION?"/code/claude":P(E()),Q=J?`${q} in ${J.replace(/^https?:\/\//,"")}`:q,K=y()?.refreshToken?"UnieAI Studio":x()?L():"API Usage Billing",Z=A().agent;return{version:z,cwd:Q,billingType:K,agentName:Z}}function jq(z,J,q){if(k(z)+3+k(J)>q)return{shouldSplit:!0,truncatedModel:F(z,q),truncatedBilling:F(J,q)};return{shouldSplit:!1,truncatedModel:F(z,Math.max(q-k(J)-3,10)),truncatedBilling:J}}function Gq(z){if(process.env.USER_TYPE==="ant"){let K=MACRO.VERSION_CHANGELOG;if(K)return K.trim().split(`
2
+ import{$d as r,Wd as b,Xd as I}from"./cli-tpjr1pz9.js";import{OI as i,vI as T}from"./cli-b3k8arn1.js";import{nR as v,rR as h}from"./cli-brr3bnrj.js";import{EW as A,F1 as o,NW as n,RT as P,cU as g,g1 as x,t1 as L}from"./cli-192xnkcx.js";import{W5 as y,_5 as d}from"./cli-t4see9hh.js";import{$5 as k,a6 as W,c6 as G,e6 as R,f6 as F,r6 as p}from"./cli-bdgrtpsy.js";import{N7 as E,O7 as m}from"./cli-fnt125we.js";import{dda as c,g$ as f,s$ as _}from"./cli-tafg3e9w.js";import{hda as u}from"./cli-qwx84m9c.js";function kq(z){if(z>=70)return"horizontal";return"compact"}function Bq(z,J,q){if(J==="horizontal"){let Y=q,K=S+O+H+Y,Z=z-K,$=Math.max(30,Z),B=Math.min(Y+$+H+O,z-S);if(B<Y+$+H+O)$=B-Y-H-O;return{leftWidth:Y,rightWidth:$,totalWidth:B}}let Q=Math.min(z-S,N+20);return{leftWidth:Q,rightWidth:Q,totalWidth:Q}}function Xq(z,J,q){let Q=Math.max(k(z),k(J),k(q),20);return Math.min(Q+4,N)}function Vq(z){if(!z||z.length>l)return"Welcome back!";return`Welcome back ${z}!`}function Uq(z,J){if(k(z)<=J)return z;let q="/",Q="\u2026",Y=1,K=1,Z=z.split(q),$=Z[0]||"",B=Z[Z.length-1]||"",D=k($),V=k(B);if(Z.length===1)return G(z,J);if($===""&&Y+K+V>=J)return`${q}${G(B,Math.max(1,J-K))}`;if($!==""&&Y*2+K+V>=J)return`${Q}${q}${G(B,Math.max(1,J-Y-K))}`;if(Z.length===2){let X=J-Y-K-V;return`${R($,X)}${Q}${q}${B}`}let M=J-D-V-Y-2*K;if(M<=0){let X=Math.max(0,J-V-Y-2*K);return`${R($,X)}${q}${Q}${q}${B}`}let C=[];for(let X=Z.length-2;X>0;X--){let U=Z[X];if(U&&k(U)+K<=M)C.unshift(U),M-=k(U)+K;else break}if(C.length===0)return`${$}${q}${Q}${q}${B}`;return`${$}${q}${Q}${q}${C.join(q)}${q}${B}`}async function wq(){if(j)return j;let z=f();return j=T(10).then((J)=>{return w=J.filter((q)=>{if(q.isSidechain)return!1;if(q.sessionId===z)return!1;if(q.summary?.includes("I apologize"))return!1;let Q=q.summary&&q.summary!=="No prompt",Y=q.firstPrompt&&q.firstPrompt!=="No prompt";return Q||Y}).slice(0,3),w}).catch(()=>{return w=[],w}),j}function Hq(){return w}function Oq(){let z=process.env.DEMO_VERSION??MACRO.VERSION,J=_(),q=process.env.DEMO_VERSION?"/code/claude":P(E()),Q=J?`${q} in ${J.replace(/^https?:\/\//,"")}`:q,K=y()?.refreshToken?"UnieAI Studio":x()?L():"API Usage Billing",Z=A().agent;return{version:z,cwd:Q,billingType:K,agentName:Z}}function jq(z,J,q){if(k(z)+3+k(J)>q)return{shouldSplit:!0,truncatedModel:F(z,q),truncatedBilling:F(J,q)};return{shouldSplit:!1,truncatedModel:F(z,Math.max(q-k(J)-3,10)),truncatedBilling:J}}function Gq(z){if(process.env.USER_TYPE==="ant"){let K=MACRO.VERSION_CHANGELOG;if(K)return K.trim().split(`
3
3
  `).filter(Boolean).slice(0,z);return[]}let J=b();if(!J)return[];let q;try{q=I(J)}catch{return[]}let Q=[],Y=Object.keys(q).sort((K,Z)=>v(K,Z)?-1:1).slice(0,3);for(let K of Y){let Z=q[K];if(Z)Q.push(...Z)}return Q.slice(0,z)}var N=50,l=20,S=4,H=1,O=2,w,j=null;var s=u(()=>{c();W();o();d();m();g();p();r();h();i();n();w=[]});
4
4
  export{kq as Cc,Bq as Dc,Xq as Ec,Vq as Fc,Uq as Gc,wq as Hc,Hq as Ic,Oq as Jc,jq as Kc,Gq as Lc,s as Mc};
@@ -1,3 +1,3 @@
1
1
  // @bun
2
- import{Ah as D,Bh as O,ED as m,Eh as _,FD as h,Fh as S,JD as c,kD as R,oD as b,rD as w,yD as M,zD as P,zh as L}from"./cli-me4e2p3e.js";import{BW as A,EW as C,NW as j,jV as x,rV as E,zW as B}from"./cli-msmzt4c3.js";import{L7 as U,M7 as T}from"./cli-rvad3yhg.js";import{E8 as N,J8 as v}from"./cli-4ewb3q42.js";import{v_ as G,y_ as F}from"./cli-hke6r0q8.js";import{fda as y}from"./cli-w1d8n9g3.js";import{join as I}from"path";async function qq(){let q=C(),z=[],W=L();for(let[K,Q]of Object.entries(W))if(K.includes("@")&&Q)z.push(K);if(q.enabledPlugins)for(let[K,Q]of Object.entries(q.enabledPlugins)){if(!K.includes("@"))continue;let J=z.indexOf(K);if(Q){if(J===-1)z.push(K)}else if(J!==-1)z.splice(J,1)}return z}function zq(){let q=new Map,z=L();for(let[K,Q]of Object.entries(z)){if(!K.includes("@"))continue;if(Q===!0)q.set(K,"flag");else if(Q===!1)q.delete(K)}let W=[{scope:"managed",source:"policySettings"},{scope:"user",source:"userSettings"},{scope:"project",source:"projectSettings"},{scope:"local",source:"localSettings"},{scope:"flag",source:"flagSettings"}];for(let{scope:K,source:Q}of W){let J=B(Q);if(!J?.enabledPlugins)continue;for(let[V,Y]of Object.entries(J.enabledPlugins)){if(!V.includes("@"))continue;if(V in z&&z[V]!==Y)G(`Plugin ${V} from --add-dir (${z[V]}) overridden by ${Q} (${Y})`);if(Y===!0)q.set(V,K);else if(Y===!1)q.delete(V)}}return G(`Found ${q.size} enabled plugins with scopes: ${Array.from(q.entries()).map(([K,Q])=>`${K}(${Q})`).join(", ")}`),q}function Jq(q){return q!=="flag"}function Kq(q){return O[q]}async function p(){M().catch((W)=>{N(W)});let q=w(),z=Object.keys(q.plugins);return G(`Found ${z.length} installed plugins`),z}async function Qq(q){try{let z=await p(),W=q.filter((J)=>!z.includes(J));return(await Promise.all(W.map(async(J)=>{try{let V=await R(J);return{pluginId:J,found:V!==null&&V!==void 0}}catch(V){return G(`Failed to check plugin ${J} in marketplace: ${V}`),{pluginId:J,found:!1}}}))).filter(({found:J})=>J).map(({pluginId:J})=>J)}catch(z){return N(z),[]}}async function Vq(q,z,W="user"){let K=W!=="user"?U():void 0,Q=_(W),J=B(Q),V={...J?.enabledPlugins},Y=[],k=[];for(let H=0;H<q.length;H++){let X=q[H];if(!X)continue;if(z)z(X,H+1,q.length);try{let Z=await R(X);if(!Z){k.push({name:X,error:"Plugin not found in any marketplace"});continue}let{entry:$,marketplaceInstallLocation:f}=Z;if(!x($.source))await m(X,$,W,K);else h({pluginId:X,installPath:I(f,$.source),version:$.version},W,K);V[X]=!0,Y.push(X)}catch(Z){let $=Z instanceof Error?Z.message:String(Z);k.push({name:X,error:$}),N(Z)}}return A(Q,{...J,enabledPlugins:V}),{installed:Y,failed:k}}var a=y(()=>{T();F();v();j();D();P();b();S();c();E()});
2
+ import{Ah as D,Bh as O,ED as m,Eh as _,FD as h,Fh as S,JD as c,kD as R,oD as b,rD as w,yD as M,zD as P,zh as L}from"./cli-b3k8arn1.js";import{BW as A,EW as C,NW as j,jV as x,rV as E,zW as B}from"./cli-192xnkcx.js";import{N7 as U,O7 as T}from"./cli-fnt125we.js";import{G8 as N,L8 as v}from"./cli-8kpqq0ea.js";import{A_ as F,x_ as G}from"./cli-awb77t95.js";import{hda as y}from"./cli-qwx84m9c.js";import{join as I}from"path";async function qq(){let q=C(),z=[],W=L();for(let[K,Q]of Object.entries(W))if(K.includes("@")&&Q)z.push(K);if(q.enabledPlugins)for(let[K,Q]of Object.entries(q.enabledPlugins)){if(!K.includes("@"))continue;let J=z.indexOf(K);if(Q){if(J===-1)z.push(K)}else if(J!==-1)z.splice(J,1)}return z}function zq(){let q=new Map,z=L();for(let[K,Q]of Object.entries(z)){if(!K.includes("@"))continue;if(Q===!0)q.set(K,"flag");else if(Q===!1)q.delete(K)}let W=[{scope:"managed",source:"policySettings"},{scope:"user",source:"userSettings"},{scope:"project",source:"projectSettings"},{scope:"local",source:"localSettings"},{scope:"flag",source:"flagSettings"}];for(let{scope:K,source:Q}of W){let J=B(Q);if(!J?.enabledPlugins)continue;for(let[V,Y]of Object.entries(J.enabledPlugins)){if(!V.includes("@"))continue;if(V in z&&z[V]!==Y)G(`Plugin ${V} from --add-dir (${z[V]}) overridden by ${Q} (${Y})`);if(Y===!0)q.set(V,K);else if(Y===!1)q.delete(V)}}return G(`Found ${q.size} enabled plugins with scopes: ${Array.from(q.entries()).map(([K,Q])=>`${K}(${Q})`).join(", ")}`),q}function Jq(q){return q!=="flag"}function Kq(q){return O[q]}async function p(){M().catch((W)=>{N(W)});let q=w(),z=Object.keys(q.plugins);return G(`Found ${z.length} installed plugins`),z}async function Qq(q){try{let z=await p(),W=q.filter((J)=>!z.includes(J));return(await Promise.all(W.map(async(J)=>{try{let V=await R(J);return{pluginId:J,found:V!==null&&V!==void 0}}catch(V){return G(`Failed to check plugin ${J} in marketplace: ${V}`),{pluginId:J,found:!1}}}))).filter(({found:J})=>J).map(({pluginId:J})=>J)}catch(z){return N(z),[]}}async function Vq(q,z,W="user"){let K=W!=="user"?U():void 0,Q=_(W),J=B(Q),V={...J?.enabledPlugins},Y=[],k=[];for(let H=0;H<q.length;H++){let X=q[H];if(!X)continue;if(z)z(X,H+1,q.length);try{let Z=await R(X);if(!Z){k.push({name:X,error:"Plugin not found in any marketplace"});continue}let{entry:$,marketplaceInstallLocation:f}=Z;if(!x($.source))await m(X,$,W,K);else h({pluginId:X,installPath:I(f,$.source),version:$.version},W,K);V[X]=!0,Y.push(X)}catch(Z){let $=Z instanceof Error?Z.message:String(Z);k.push({name:X,error:$}),N(Z)}}return A(Q,{...J,enabledPlugins:V}),{installed:Y,failed:k}}var a=y(()=>{T();F();v();j();D();P();b();S();c();E()});
3
3
  export{qq as Kd,zq as Ld,Jq as Md,Kq as Nd,p as Od,Qq as Pd,Vq as Qd,a as Rd};
@@ -1,4 +1,4 @@
1
1
  // @bun
2
- import{Ce as l,De as Pq}from"./cli-zev50xap.js";import{Mq as V,Nq as Kq,OI as rq,PH as L}from"./cli-me4e2p3e.js";import{DQ as X,FQ as r,WQ as t,fR as $q}from"./cli-x8xgga1a.js";import{oR as G,rR as s}from"./cli-v9f860t5.js";import{IT as Z,cU as x}from"./cli-msmzt4c3.js";import{B5 as d,C5 as fq}from"./cli-k4v08k8t.js";import{G7 as M,I7 as C}from"./cli-p0vh69b9.js";import{L7 as D,M7 as c}from"./cli-rvad3yhg.js";import{X9 as b,b_ as _q,v_ as J,y_ as E}from"./cli-hke6r0q8.js";import{bda as g,e$ as n}from"./cli-3ac555qw.js";import{fda as A}from"./cli-w1d8n9g3.js";import{readdir as I}from"fs/promises";import{join as F}from"path";import{coerce as W}from"semver";function o(){return!0}function U(f){let q=o()?"claude-dev":"claude",_=new URL(`${q}://resume`);return _.searchParams.set("session",f),_.searchParams.set("cwd",D()),_.toString()}async function S(){if(o())return!0;let f=process.platform;if(f==="darwin")return Z("/Applications/Claude.app");else if(f==="linux"){let{code:q,stdout:_}=await M("xdg-mime",["query","default","x-scheme-handler/claude"]);return q===0&&_.trim().length>0}else if(f==="win32"){let{code:q}=await M("reg",["query","HKEY_CLASSES_ROOT\\claude","/ve"]);return q===0}return!1}async function Q(){let f=process.platform;if(f==="darwin"){let{code:q,stdout:_}=await M("defaults",["read","/Applications/Claude.app/Contents/Info.plist","CFBundleShortVersionString"]);if(q!==0)return null;let K=_.trim();return K.length>0?K:null}else if(f==="win32"){let q=process.env.LOCALAPPDATA;if(!q)return null;let _=F(q,"AnthropicClaude");try{let O=(await I(_)).filter((P)=>P.startsWith("app-")).map((P)=>P.slice(4)).filter((P)=>W(P)!==null).sort((P,v)=>{let Y=W(P),H=W(v);return Y.compare(H)});return O.length>0?O[O.length-1]:null}catch{return null}}return null}async function e(){if(!await S())return{status:"not-installed"};let q;try{q=await Q()}catch{return{status:"ready",version:"unknown"}}if(!q)return{status:"ready",version:"unknown"};let _=W(q);if(!_||!G(_.version,B))return{status:"version-too-old",version:q};return{status:"ready",version:q}}async function qq(f){let q=process.platform;if(J(`Opening deep link: ${f}`),q==="darwin"){if(o()){let{code:K}=await M("osascript",["-e",`tell application "Electron" to open location "${f}"`]);return K===0}let{code:_}=await M("open",[f]);return _===0}else if(q==="linux"){let{code:_}=await M("xdg-open",[f]);return _===0}else if(q==="win32"){let{code:_}=await M("cmd",["/c","start","",f]);return _===0}return!1}async function i(){let f=n();if(!await S())return{success:!1,error:"Claude Desktop is not installed. Install it from https://claude.ai/download"};let _=U(f);if(!await qq(_))return{success:!1,error:"Failed to open Claude Desktop. Please try opening it manually.",deepLinkUrl:_};return{success:!0,deepLinkUrl:_}}var B="1.1.2396";var N=A(()=>{g();c();E();C();x();s()});import{c as jq}from"react/compiler-runtime";import{useEffect as Oq,useState as T}from"react";import{jsxDEV as h}from"react/jsx-dev-runtime";function wq(){switch(process.platform){case"win32":return"https://claude.ai/api/desktop/win32/x64/exe/latest/redirect";default:return"https://claude.ai/api/desktop/darwin/universal/dmg/latest/redirect"}}function iq(f){let q=jq(20),{onDone:_}=f,[K,O]=T("checking"),[P,v]=T(null),[Y,H]=T(""),z;if(q[0]!==P||q[1]!==_||q[2]!==K)z=($)=>{if(K==="error"){_(P??"Unknown error",{display:"system"});return}if(K==="prompt-download"){if($==="y"||$==="Y")d(wq()).catch(hq),_(`Starting download. Re-run /desktop once you\u2019ve installed the app.
2
+ import{Ce as l,De as Pq}from"./cli-3tmtx9ka.js";import{Mq as V,Nq as Kq,OI as rq,PH as L}from"./cli-b3k8arn1.js";import{DQ as X,FQ as r,WQ as t,fR as $q}from"./cli-a2d962bq.js";import{oR as G,rR as s}from"./cli-brr3bnrj.js";import{IT as Z,cU as x}from"./cli-192xnkcx.js";import{B5 as d,C5 as fq}from"./cli-an97yxg9.js";import{I7 as M,K7 as C}from"./cli-7wxv39ry.js";import{N7 as D,O7 as c}from"./cli-fnt125we.js";import{A_ as E,Z9 as b,d_ as _q,x_ as J}from"./cli-awb77t95.js";import{dda as g,g$ as n}from"./cli-tafg3e9w.js";import{hda as A}from"./cli-qwx84m9c.js";import{readdir as I}from"fs/promises";import{join as F}from"path";import{coerce as W}from"semver";function o(){return!0}function U(f){let q=o()?"claude-dev":"claude",_=new URL(`${q}://resume`);return _.searchParams.set("session",f),_.searchParams.set("cwd",D()),_.toString()}async function S(){if(o())return!0;let f=process.platform;if(f==="darwin")return Z("/Applications/Claude.app");else if(f==="linux"){let{code:q,stdout:_}=await M("xdg-mime",["query","default","x-scheme-handler/claude"]);return q===0&&_.trim().length>0}else if(f==="win32"){let{code:q}=await M("reg",["query","HKEY_CLASSES_ROOT\\claude","/ve"]);return q===0}return!1}async function Q(){let f=process.platform;if(f==="darwin"){let{code:q,stdout:_}=await M("defaults",["read","/Applications/Claude.app/Contents/Info.plist","CFBundleShortVersionString"]);if(q!==0)return null;let K=_.trim();return K.length>0?K:null}else if(f==="win32"){let q=process.env.LOCALAPPDATA;if(!q)return null;let _=F(q,"AnthropicClaude");try{let O=(await I(_)).filter((P)=>P.startsWith("app-")).map((P)=>P.slice(4)).filter((P)=>W(P)!==null).sort((P,v)=>{let Y=W(P),H=W(v);return Y.compare(H)});return O.length>0?O[O.length-1]:null}catch{return null}}return null}async function e(){if(!await S())return{status:"not-installed"};let q;try{q=await Q()}catch{return{status:"ready",version:"unknown"}}if(!q)return{status:"ready",version:"unknown"};let _=W(q);if(!_||!G(_.version,B))return{status:"version-too-old",version:q};return{status:"ready",version:q}}async function qq(f){let q=process.platform;if(J(`Opening deep link: ${f}`),q==="darwin"){if(o()){let{code:K}=await M("osascript",["-e",`tell application "Electron" to open location "${f}"`]);return K===0}let{code:_}=await M("open",[f]);return _===0}else if(q==="linux"){let{code:_}=await M("xdg-open",[f]);return _===0}else if(q==="win32"){let{code:_}=await M("cmd",["/c","start","",f]);return _===0}return!1}async function i(){let f=n();if(!await S())return{success:!1,error:"Claude Desktop is not installed. Install it from https://claude.ai/download"};let _=U(f);if(!await qq(_))return{success:!1,error:"Failed to open Claude Desktop. Please try opening it manually.",deepLinkUrl:_};return{success:!0,deepLinkUrl:_}}var B="1.1.2396";var N=A(()=>{g();c();E();C();x();s()});import{c as jq}from"react/compiler-runtime";import{useEffect as Oq,useState as T}from"react";import{jsxDEV as h}from"react/jsx-dev-runtime";function wq(){switch(process.platform){case"win32":return"https://claude.ai/api/desktop/win32/x64/exe/latest/redirect";default:return"https://claude.ai/api/desktop/darwin/universal/dmg/latest/redirect"}}function iq(f){let q=jq(20),{onDone:_}=f,[K,O]=T("checking"),[P,v]=T(null),[Y,H]=T(""),z;if(q[0]!==P||q[1]!==_||q[2]!==K)z=($)=>{if(K==="error"){_(P??"Unknown error",{display:"system"});return}if(K==="prompt-download"){if($==="y"||$==="Y")d(wq()).catch(hq),_(`Starting download. Re-run /desktop once you\u2019ve installed the app.
3
3
  Learn more at ${R}`,{display:"system"});else if($==="n"||$==="N")_(`The desktop app is required for /desktop. Learn more at ${R}`,{display:"system"})}},q[0]=P,q[1]=_,q[2]=K,q[3]=z;else z=q[3];t(z);let k,p;if(q[4]!==_)k=()=>{(async function(){O("checking");let j=await e();if(j.status==="not-installed"){H("Claude Desktop is not installed."),O("prompt-download");return}if(j.status==="version-too-old"){H(`Claude Desktop needs to be updated (found v${j.version}, need v1.1.2396+).`),O("prompt-download");return}O("flushing"),await L(),O("opening");let y=await i();if(!y.success){v(y.error??"Failed to open Claude Desktop"),O("error");return}O("success"),setTimeout(Mq,500,_)})().catch((w)=>{v(b(w)),O("error")})},p=[_],q[4]=_,q[5]=k,q[6]=p;else k=q[5],p=q[6];if(Oq(k,p),K==="error"){let $;if(q[7]!==P)$=h(r,{color:"error",children:["Error: ",P]},void 0,!0,void 0,this),q[7]=P,q[8]=$;else $=q[8];let w;if(q[9]===Symbol.for("react.memo_cache_sentinel"))w=h(r,{dimColor:!0,children:"Press any key to continue\u2026"},void 0,!1,void 0,this),q[9]=w;else w=q[9];let j;if(q[10]!==$)j=h(X,{flexDirection:"column",paddingX:2,children:[$,w]},void 0,!0,void 0,this),q[10]=$,q[11]=j;else j=q[11];return j}if(K==="prompt-download"){let $;if(q[12]!==Y)$=h(r,{children:Y},void 0,!1,void 0,this),q[12]=Y,q[13]=$;else $=q[13];let w;if(q[14]===Symbol.for("react.memo_cache_sentinel"))w=h(r,{children:"Download now? (y/n)"},void 0,!1,void 0,this),q[14]=w;else w=q[14];let j;if(q[15]!==$)j=h(X,{flexDirection:"column",paddingX:2,children:[$,w]},void 0,!0,void 0,this),q[15]=$,q[16]=j;else j=q[16];return j}let a;if(q[17]===Symbol.for("react.memo_cache_sentinel"))a={checking:"Checking for Claude Desktop\u2026",flushing:"Saving session\u2026",opening:"Opening Claude Desktop\u2026",success:"Opening in Claude Desktop\u2026"},q[17]=a;else a=q[17];let u=a[K],m;if(q[18]!==u)m=h(l,{message:u},void 0,!1,void 0,this),q[18]=u,q[19]=m;else m=q[19];return m}async function Mq(f){f("Session transferred to Claude Desktop",{display:"system"}),await V(0,"other")}function hq(){}var R="https://clau.de/desktop";var Yq=A(()=>{$q();fq();N();_q();Kq();rq();Pq()});
4
4
  export{iq as Ae,Yq as Be};
@@ -1,3 +1,3 @@
1
1
  // @bun
2
- import{qa as P}from"./cli-0dc8sd37.js";import{pd as M,td as Bq}from"./cli-89x414pj.js";import{AF as h,BC as s,BF as A,Bn as o,DF as e,EF as _,FF as qq,PD as f,Pi as O,Qi as p,SD as r,dx as L,ex as t,ix as N,kx as a,qw as k,ww as n,zC as E,zn as R}from"./cli-me4e2p3e.js";import{d4 as K,f4 as l}from"./cli-s6vr7213.js";import{O6 as I,Q6 as d}from"./cli-fdya77ch.js";import{E8 as F,J8 as i}from"./cli-4ewb3q42.js";import{Y8 as y,Z8 as b}from"./cli-t9jht3kb.js";import{W9 as D,b_ as g,v_ as H,y_ as m}from"./cli-hke6r0q8.js";qq();b();a();e();l();m();d();g();i();p();s();n();t();o();import{useCallback as Gq,useEffect as x}from"react";Bq();r();function Iq({enabled:Y=!0}={}){let $=A(),U=h((G)=>G.plugins.needsRefresh),{addNotification:Z}=_(),j=Gq(async()=>{try{let{enabled:G,disabled:T,errors:Q}=await f();await P();let V=M();if(Object.keys(V).length>0)Z({key:"plugin-delisted-flagged",text:"Plugins flagged. Check /plugins",color:"warning",priority:"high"});let W=[],X=[];try{W=await E()}catch(q){let B=q instanceof Error?q.message:String(q);Q.push({type:"generic-error",source:"plugin-commands",error:`Failed to load plugin commands: ${B}`})}try{X=await O()}catch(q){let B=q instanceof Error?q.message:String(q);Q.push({type:"generic-error",source:"plugin-agents",error:`Failed to load plugin agents: ${B}`})}try{await k()}catch(q){let B=q instanceof Error?q.message:String(q);Q.push({type:"generic-error",source:"plugin-hooks",error:`Failed to load plugin hooks: ${B}`})}let S=(await Promise.all(G.map(async(q)=>{if(q.mcpServers)return Object.keys(q.mcpServers).length;let B=await R(q,Q);if(B)q.mcpServers=B;return B?Object.keys(B).length:0}))).reduce((q,B)=>q+B,0),u=(await Promise.all(G.map(async(q)=>{if(q.lspServers)return Object.keys(q.lspServers).length;let B=await L(q,Q);if(B)q.lspServers=B;return B?Object.keys(B).length:0}))).reduce((q,B)=>q+B,0);N(),$((q)=>{let B=q.plugins.errors.filter((J)=>J.source==="lsp-manager"||J.source.startsWith("plugin:")),z=new Set(Q.map((J)=>J.type==="generic-error"?`generic-error:${J.source}:${J.error}`:`${J.type}:${J.source}`)),C=[...B.filter((J)=>{let v=J.type==="generic-error"?`generic-error:${J.source}:${J.error}`:`${J.type}:${J.source}`;return!z.has(v)}),...Q];return{...q,plugins:{...q.plugins,enabled:G,disabled:T,commands:W,errors:C}}}),H(`Loaded plugins - Enabled: ${G.length}, Disabled: ${T.length}, Commands: ${W.length}, Agents: ${X.length}, Errors: ${Q.length}`);let c=G.reduce((q,B)=>{if(!B.hooksConfig)return q;return q+Object.values(B.hooksConfig).reduce((z,w)=>z+(w?.reduce((C,J)=>C+J.hooks.length,0)??0),0)},0);return{enabled_count:G.length,disabled_count:T.length,inline_count:K(G,(q)=>q.source.endsWith("@inline")),marketplace_count:K(G,(q)=>!q.source.endsWith("@inline")),error_count:Q.length,skill_count:W.length,agent_count:X.length,hook_count:c,mcp_count:S,lsp_count:u,ant_enabled_names:process.env.USER_TYPE==="ant"&&G.length>0?G.map((q)=>q.name).sort().join(","):void 0}}catch(G){let T=D(G);return F(T),H(`Error loading plugins: ${G}`),$((Q)=>{let V=Q.plugins.errors.filter((X)=>X.source==="lsp-manager"||X.source.startsWith("plugin:")),W={type:"generic-error",source:"plugin-system",error:T.message};return{...Q,plugins:{...Q.plugins,enabled:[],disabled:[],commands:[],errors:[...V,W]}}}),{enabled_count:0,disabled_count:0,inline_count:0,marketplace_count:0,error_count:1,skill_count:0,agent_count:0,hook_count:0,mcp_count:0,lsp_count:0,load_failed:!0,ant_enabled_names:void 0}}},[$,Z]);x(()=>{if(!Y)return;j().then((G)=>{let{ant_enabled_names:T,...Q}=G,V={...Q,has_custom_plugin_cache_dir:!!process.env.CLAUDE_CODE_PLUGIN_CACHE_DIR};y("tengu_plugins_loaded",{...V,...T!==void 0&&{enabled_names:T}}),I("info","tengu_plugins_loaded",V)})},[j,Y]),x(()=>{if(!Y||!U)return;Z({key:"plugin-reload-pending",text:"Plugins changed. Run /reload-plugins to activate.",color:"suggestion",priority:"low"})},[Y,U,Z])}
2
+ import{qa as P}from"./cli-b8j8bm5m.js";import{pd as M,td as Bq}from"./cli-g2s3391y.js";import{AF as h,BC as s,BF as A,Bn as o,DF as e,EF as _,FF as qq,PD as f,Pi as O,Qi as p,SD as r,dx as L,ex as t,ix as N,kx as a,qw as k,ww as n,zC as E,zn as R}from"./cli-b3k8arn1.js";import{d4 as K,f4 as l}from"./cli-r43jhzwm.js";import{Q6 as I,S6 as d}from"./cli-yb5m6jwq.js";import{G8 as F,L8 as i}from"./cli-8kpqq0ea.js";import{$8 as b,_8 as y}from"./cli-e5yek4vx.js";import{A_ as m,Y9 as D,d_ as g,x_ as H}from"./cli-awb77t95.js";qq();b();a();e();l();m();d();g();i();p();s();n();t();o();import{useCallback as Gq,useEffect as x}from"react";Bq();r();function Iq({enabled:Y=!0}={}){let $=A(),U=h((G)=>G.plugins.needsRefresh),{addNotification:Z}=_(),j=Gq(async()=>{try{let{enabled:G,disabled:T,errors:Q}=await f();await P();let V=M();if(Object.keys(V).length>0)Z({key:"plugin-delisted-flagged",text:"Plugins flagged. Check /plugins",color:"warning",priority:"high"});let W=[],X=[];try{W=await E()}catch(q){let B=q instanceof Error?q.message:String(q);Q.push({type:"generic-error",source:"plugin-commands",error:`Failed to load plugin commands: ${B}`})}try{X=await O()}catch(q){let B=q instanceof Error?q.message:String(q);Q.push({type:"generic-error",source:"plugin-agents",error:`Failed to load plugin agents: ${B}`})}try{await k()}catch(q){let B=q instanceof Error?q.message:String(q);Q.push({type:"generic-error",source:"plugin-hooks",error:`Failed to load plugin hooks: ${B}`})}let S=(await Promise.all(G.map(async(q)=>{if(q.mcpServers)return Object.keys(q.mcpServers).length;let B=await R(q,Q);if(B)q.mcpServers=B;return B?Object.keys(B).length:0}))).reduce((q,B)=>q+B,0),u=(await Promise.all(G.map(async(q)=>{if(q.lspServers)return Object.keys(q.lspServers).length;let B=await L(q,Q);if(B)q.lspServers=B;return B?Object.keys(B).length:0}))).reduce((q,B)=>q+B,0);N(),$((q)=>{let B=q.plugins.errors.filter((J)=>J.source==="lsp-manager"||J.source.startsWith("plugin:")),z=new Set(Q.map((J)=>J.type==="generic-error"?`generic-error:${J.source}:${J.error}`:`${J.type}:${J.source}`)),C=[...B.filter((J)=>{let v=J.type==="generic-error"?`generic-error:${J.source}:${J.error}`:`${J.type}:${J.source}`;return!z.has(v)}),...Q];return{...q,plugins:{...q.plugins,enabled:G,disabled:T,commands:W,errors:C}}}),H(`Loaded plugins - Enabled: ${G.length}, Disabled: ${T.length}, Commands: ${W.length}, Agents: ${X.length}, Errors: ${Q.length}`);let c=G.reduce((q,B)=>{if(!B.hooksConfig)return q;return q+Object.values(B.hooksConfig).reduce((z,w)=>z+(w?.reduce((C,J)=>C+J.hooks.length,0)??0),0)},0);return{enabled_count:G.length,disabled_count:T.length,inline_count:K(G,(q)=>q.source.endsWith("@inline")),marketplace_count:K(G,(q)=>!q.source.endsWith("@inline")),error_count:Q.length,skill_count:W.length,agent_count:X.length,hook_count:c,mcp_count:S,lsp_count:u,ant_enabled_names:process.env.USER_TYPE==="ant"&&G.length>0?G.map((q)=>q.name).sort().join(","):void 0}}catch(G){let T=D(G);return F(T),H(`Error loading plugins: ${G}`),$((Q)=>{let V=Q.plugins.errors.filter((X)=>X.source==="lsp-manager"||X.source.startsWith("plugin:")),W={type:"generic-error",source:"plugin-system",error:T.message};return{...Q,plugins:{...Q.plugins,enabled:[],disabled:[],commands:[],errors:[...V,W]}}}),{enabled_count:0,disabled_count:0,inline_count:0,marketplace_count:0,error_count:1,skill_count:0,agent_count:0,hook_count:0,mcp_count:0,lsp_count:0,load_failed:!0,ant_enabled_names:void 0}}},[$,Z]);x(()=>{if(!Y)return;j().then((G)=>{let{ant_enabled_names:T,...Q}=G,V={...Q,has_custom_plugin_cache_dir:!!process.env.CLAUDE_CODE_PLUGIN_CACHE_DIR};y("tengu_plugins_loaded",{...V,...T!==void 0&&{enabled_names:T}}),I("info","tengu_plugins_loaded",V)})},[j,Y]),x(()=>{if(!Y||!U)return;Z({key:"plugin-reload-pending",text:"Plugins changed. Run /reload-plugins to activate.",color:"suggestion",priority:"low"})},[Y,U,Z])}
3
3
  export{Iq as P};
@@ -1,3 +1,3 @@
1
1
  // @bun
2
- import{UQ as O,dR as j,fR as v}from"./cli-x8xgga1a.js";import{fda as A}from"./cli-w1d8n9g3.js";import{c as e}from"react/compiler-runtime";import{useLayoutEffect as o}from"react";import{PassThrough as p}from"stream";import z from"strip-ansi";import{jsxDEV as M,Fragment as n}from"react/jsx-dev-runtime";function Y(q){let _=e(5),{children:$}=q,{exit:f}=O(),K,w;if(_[0]!==f)K=()=>{let k=setTimeout(f,0);return()=>clearTimeout(k)},w=[f],_[0]=f,_[1]=K,_[2]=w;else K=_[1],w=_[2];o(K,w);let r;if(_[3]!==$)r=M(n,{children:$},void 0,!1,void 0,this),_[3]=$,_[4]=r;else r=_[4];return r}function h(q){let _=q.indexOf(P);if(_===-1)return q;let $=_+P.length,f=q.indexOf(a,$);if(f===-1)return q;return q.slice($,f)}function H(q,_){return new Promise(async($)=>{let f="",K=new p;if(_!==void 0)K.columns=_;K.on("data",(r)=>{f+=r.toString()}),await(await j(M(Y,{children:q},void 0,!1,void 0,this),{stdout:K,patchConsole:!1})).waitUntilExit(),await $(h(f))})}async function C(q,_){let $=await H(q,_);return z($)}var P="\x1B[?2026h",a="\x1B[?2026l";var D=A(()=>{v()});
2
+ import{UQ as O,dR as j,fR as v}from"./cli-a2d962bq.js";import{hda as A}from"./cli-qwx84m9c.js";import{c as e}from"react/compiler-runtime";import{useLayoutEffect as o}from"react";import{PassThrough as p}from"stream";import z from"strip-ansi";import{jsxDEV as M,Fragment as n}from"react/jsx-dev-runtime";function Y(q){let _=e(5),{children:$}=q,{exit:f}=O(),K,w;if(_[0]!==f)K=()=>{let k=setTimeout(f,0);return()=>clearTimeout(k)},w=[f],_[0]=f,_[1]=K,_[2]=w;else K=_[1],w=_[2];o(K,w);let r;if(_[3]!==$)r=M(n,{children:$},void 0,!1,void 0,this),_[3]=$,_[4]=r;else r=_[4];return r}function h(q){let _=q.indexOf(P);if(_===-1)return q;let $=_+P.length,f=q.indexOf(a,$);if(f===-1)return q;return q.slice($,f)}function H(q,_){return new Promise(async($)=>{let f="",K=new p;if(_!==void 0)K.columns=_;K.on("data",(r)=>{f+=r.toString()}),await(await j(M(Y,{children:q},void 0,!1,void 0,this),{stdout:K,patchConsole:!1})).waitUntilExit(),await $(h(f))})}async function C(q,_){let $=await H(q,_);return z($)}var P="\x1B[?2026h",a="\x1B[?2026l";var D=A(()=>{v()});
3
3
  export{H as nf,C as of,D as pf};
@@ -1,3 +1,3 @@
1
1
  // @bun
2
- import{FQ as q,fR as h}from"./cli-x8xgga1a.js";import{fda as $}from"./cli-w1d8n9g3.js";import{c as v}from"react/compiler-runtime";import{jsxDEV as K}from"react/jsx-dev-runtime";function r(){let f=v(1),_;if(f[0]===Symbol.for("react.memo_cache_sentinel"))_=K(q,{color:"permission",children:["Press ",K(q,{bold:!0,children:"Enter"},void 0,!1,void 0,this)," to continue\u2026"]},void 0,!0,void 0,this),f[0]=_;else _=f[0];return _}var w=$(()=>{h()});
2
+ import{FQ as q,fR as h}from"./cli-a2d962bq.js";import{hda as $}from"./cli-qwx84m9c.js";import{c as v}from"react/compiler-runtime";import{jsxDEV as K}from"react/jsx-dev-runtime";function r(){let f=v(1),_;if(f[0]===Symbol.for("react.memo_cache_sentinel"))_=K(q,{color:"permission",children:["Press ",K(q,{bold:!0,children:"Enter"},void 0,!1,void 0,this)," to continue\u2026"]},void 0,!0,void 0,this),f[0]=_;else _=f[0];return _}var w=$(()=>{h()});
3
3
  export{r as ee,w as fe};
@@ -1,3 +1,3 @@
1
1
  // @bun
2
- import{AF as Kq,BF as fq,DF as Dq,Ep as Iq,Mq,Nq as dq,dr as wq,ty as Uq,uy as Aq,vy as Eq,yy as Rq,zy as mq}from"./cli-me4e2p3e.js";import{QL as Wq,RL as yq,SL as s,TL as _q,WL as kq,XL as jq}from"./cli-xfsqvp8r.js";import{aO as Oq,bO as Vq}from"./cli-6yprtw88.js";import{EO as Zq,FO as Bq,QO as zq,RO as Hq,SO as Fq,UO as vq}from"./cli-akcxtvv9.js";import{DQ as L,FQ as X,fR as Pq,kP as Qq,lP as Xq,mP as Yq}from"./cli-x8xgga1a.js";import{BW as Nq,NW as bq}from"./cli-msmzt4c3.js";import{fda as Cq}from"./cli-w1d8n9g3.js";import{c as Sq}from"react/compiler-runtime";import{jsxDEV as G,Fragment as Lq}from"react/jsx-dev-runtime";function JG(p){let q=Sq(59),{onThemeSelect:g,showIntroText:$,helpText:e,showHelpTextBelow:t,hideEscToCancel:qq,skipExitHandling:Gq,onCancel:c}=p,C=$===void 0?!1:$,Q=e===void 0?"":e,Y=t===void 0?!1:t,T=qq===void 0?!1:qq,b=Gq===void 0?!1:Gq,[r]=Qq(),P=Xq(),{columns:h}=Zq(),B;if(q[0]===Symbol.for("react.memo_cache_sentinel"))B=Uq(),q[0]=B;else B=q[0];let a=B,H;if(q[1]!==r)H=a===null?Aq(r):null,q[1]=r,q[2]=H;else H=q[2];let y=H,{setPreviewTheme:l,savePreview:x,cancelPreview:_}=Yq(),v=Kq(pq)??!1,i=fq();zq("ThemePicker");let o=Wq("theme:toggleSyntaxHighlighting","ThemePicker","ctrl+t"),V;if(q[3]!==i||q[4]!==v)V=()=>{if(a===null){let J=!v;Nq("userSettings",{syntaxHighlightingDisabled:J}),i((N)=>({...N,settings:{...N.settings,syntaxHighlightingDisabled:J}}))}},q[3]=i,q[4]=v,q[5]=V;else V=q[5];let j;if(q[6]===Symbol.for("react.memo_cache_sentinel"))j={context:"ThemePicker"},q[6]=j;else j=q[6];Fq("theme:toggleSyntaxHighlighting",V,j);let d=Oq(b?uq:void 0),w;if(q[7]===Symbol.for("react.memo_cache_sentinel"))w=[...[],{label:"Dark mode",value:"dark"},{label:"Light mode",value:"light"},{label:"Dark mode (colorblind-friendly)",value:"dark-daltonized"},{label:"Light mode (colorblind-friendly)",value:"light-daltonized"},{label:"Dark mode (ANSI colors only)",value:"dark-ansi"},{label:"Light mode (ANSI colors only)",value:"light-ansi"}],q[7]=w;else w=q[7];let Jq=w,Z;if(q[8]!==C)Z=C?G(X,{children:"Let's get started."},void 0,!1,void 0,this):G(X,{bold:!0,color:"permission",children:"Theme"},void 0,!1,void 0,this),q[8]=C,q[9]=Z;else Z=q[9];let E;if(q[10]===Symbol.for("react.memo_cache_sentinel"))E=G(X,{bold:!0,children:"Choose the text style that looks best with your terminal"},void 0,!1,void 0,this),q[10]=E;else E=q[10];let z;if(q[11]!==Q||q[12]!==Y)z=Q&&!Y&&G(X,{dimColor:!0,children:Q},void 0,!1,void 0,this),q[11]=Q,q[12]=Y,q[13]=z;else z=q[13];let W;if(q[14]!==z)W=G(L,{flexDirection:"column",children:[E,z]},void 0,!0,void 0,this),q[14]=z,q[15]=W;else W=q[15];let F;if(q[16]!==l)F=(J)=>{l(J)},q[16]=l,q[17]=F;else F=q[17];let O;if(q[18]!==g||q[19]!==x)O=(J)=>{x(),g(J)},q[18]=g,q[19]=x,q[20]=O;else O=q[20];let k;if(q[21]!==_||q[22]!==c||q[23]!==b)k=b?()=>{_(),c?.()}:async()=>{_(),await Mq(0)},q[21]=_,q[22]=c,q[23]=b,q[24]=k;else k=q[24];let I;if(q[25]!==F||q[26]!==O||q[27]!==k||q[28]!==P)I=G(Iq,{options:Jq,onFocus:F,onChange:O,onCancel:k,visibleOptionCount:Jq.length,defaultValue:P,defaultFocusValue:P},void 0,!1,void 0,this),q[25]=F,q[26]=O,q[27]=k,q[28]=P,q[29]=I;else I=q[29];let M;if(q[30]!==Z||q[31]!==W||q[32]!==I)M=G(L,{flexDirection:"column",gap:1,children:[Z,W,I]},void 0,!0,void 0,this),q[30]=Z,q[31]=W,q[32]=I,q[33]=M;else M=q[33];let m;if(q[34]===Symbol.for("react.memo_cache_sentinel"))m={oldStart:1,newStart:1,oldLines:3,newLines:3,lines:[" function greet() {",'- console.log("Hello, World!");','+ console.log("Hello, Claude!");'," }"]},q[34]=m;else m=q[34];let U;if(q[35]!==h)U=G(L,{flexDirection:"column",borderTop:!0,borderBottom:!0,borderLeft:!1,borderRight:!1,borderStyle:"dashed",borderColor:"subtle",children:G(Rq,{patch:m,dim:!1,filePath:"demo.js",firstLine:null,width:h},void 0,!1,void 0,this)},void 0,!1,void 0,this),q[35]=h,q[36]=U;else U=q[36];let n=a==="env"?`Syntax highlighting disabled (via CLAUDE_CODE_SYNTAX_HIGHLIGHT=${process.env.CLAUDE_CODE_SYNTAX_HIGHLIGHT})`:v?`Syntax highlighting disabled (${o} to enable)`:y?`Syntax theme: ${y.theme}${y.source?` (from ${y.source})`:""} (${o} to disable)`:`Syntax highlighting enabled (${o} to disable)`,A;if(q[37]!==n)A=G(X,{dimColor:!0,children:[" ",n]},void 0,!0,void 0,this),q[37]=n,q[38]=A;else A=q[38];let R;if(q[39]!==U||q[40]!==A)R=G(L,{flexDirection:"column",width:"100%",children:[U,A]},void 0,!0,void 0,this),q[39]=U,q[40]=A,q[41]=R;else R=q[41];let D;if(q[42]!==M||q[43]!==R)D=G(L,{flexDirection:"column",gap:1,children:[M,R]},void 0,!0,void 0,this),q[42]=M,q[43]=R,q[44]=D;else D=q[44];let S=D;if(!C){let J;if(q[45]!==S)J=G(L,{flexDirection:"column",children:S},void 0,!1,void 0,this),q[45]=S,q[46]=J;else J=q[46];let N;if(q[47]!==Q||q[48]!==Y)N=Y&&Q&&G(L,{marginLeft:3,children:G(X,{dimColor:!0,children:Q},void 0,!1,void 0,this)},void 0,!1,void 0,this),q[47]=Q,q[48]=Y,q[49]=N;else N=q[49];let K;if(q[50]!==d||q[51]!==T)K=!T&&G(L,{children:G(X,{dimColor:!0,italic:!0,children:d.pending?G(Lq,{children:["Press ",d.keyName," again to exit"]},void 0,!0,void 0,this):G(kq,{children:[G(s,{shortcut:"Enter",action:"select"},void 0,!1,void 0,this),G(s,{shortcut:"Esc",action:"cancel"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)},void 0,!1,void 0,this)},void 0,!1,void 0,this),q[50]=d,q[51]=T,q[52]=K;else K=q[52];let f;if(q[53]!==N||q[54]!==K)f=G(L,{marginTop:1,children:[N,K]},void 0,!0,void 0,this),q[53]=N,q[54]=K,q[55]=f;else f=q[55];let u;if(q[56]!==J||q[57]!==f)u=G(Lq,{children:[J,f]},void 0,!0,void 0,this),q[56]=J,q[57]=f,q[58]=u;else u=q[58];return u}return S}function uq(){}function pq(p){return p.settings.syntaxHighlightingDisabled}var gq=Cq(()=>{Vq();Bq();Pq();Hq();vq();yq();Dq();dq();bq();wq();jq();_q();Eq();mq()});
2
+ import{AF as Kq,BF as fq,DF as Dq,Ep as Iq,Mq,Nq as dq,dr as wq,ty as Uq,uy as Aq,vy as Eq,yy as Rq,zy as mq}from"./cli-b3k8arn1.js";import{QL as Wq,RL as yq,SL as s,TL as _q,WL as kq,XL as jq}from"./cli-4pwyex04.js";import{aO as Oq,bO as Vq}from"./cli-awe5yg6m.js";import{EO as Zq,FO as Bq,QO as zq,RO as Hq,SO as Fq,UO as vq}from"./cli-8jym9hp6.js";import{DQ as L,FQ as X,fR as Pq,kP as Qq,lP as Xq,mP as Yq}from"./cli-a2d962bq.js";import{BW as Nq,NW as bq}from"./cli-192xnkcx.js";import{hda as Cq}from"./cli-qwx84m9c.js";import{c as Sq}from"react/compiler-runtime";import{jsxDEV as G,Fragment as Lq}from"react/jsx-dev-runtime";function JG(p){let q=Sq(59),{onThemeSelect:g,showIntroText:$,helpText:e,showHelpTextBelow:t,hideEscToCancel:qq,skipExitHandling:Gq,onCancel:c}=p,C=$===void 0?!1:$,Q=e===void 0?"":e,Y=t===void 0?!1:t,T=qq===void 0?!1:qq,b=Gq===void 0?!1:Gq,[r]=Qq(),P=Xq(),{columns:h}=Zq(),B;if(q[0]===Symbol.for("react.memo_cache_sentinel"))B=Uq(),q[0]=B;else B=q[0];let a=B,H;if(q[1]!==r)H=a===null?Aq(r):null,q[1]=r,q[2]=H;else H=q[2];let y=H,{setPreviewTheme:l,savePreview:x,cancelPreview:_}=Yq(),v=Kq(pq)??!1,i=fq();zq("ThemePicker");let o=Wq("theme:toggleSyntaxHighlighting","ThemePicker","ctrl+t"),V;if(q[3]!==i||q[4]!==v)V=()=>{if(a===null){let J=!v;Nq("userSettings",{syntaxHighlightingDisabled:J}),i((N)=>({...N,settings:{...N.settings,syntaxHighlightingDisabled:J}}))}},q[3]=i,q[4]=v,q[5]=V;else V=q[5];let j;if(q[6]===Symbol.for("react.memo_cache_sentinel"))j={context:"ThemePicker"},q[6]=j;else j=q[6];Fq("theme:toggleSyntaxHighlighting",V,j);let d=Oq(b?uq:void 0),w;if(q[7]===Symbol.for("react.memo_cache_sentinel"))w=[...[],{label:"Dark mode",value:"dark"},{label:"Light mode",value:"light"},{label:"Dark mode (colorblind-friendly)",value:"dark-daltonized"},{label:"Light mode (colorblind-friendly)",value:"light-daltonized"},{label:"Dark mode (ANSI colors only)",value:"dark-ansi"},{label:"Light mode (ANSI colors only)",value:"light-ansi"}],q[7]=w;else w=q[7];let Jq=w,Z;if(q[8]!==C)Z=C?G(X,{children:"Let's get started."},void 0,!1,void 0,this):G(X,{bold:!0,color:"permission",children:"Theme"},void 0,!1,void 0,this),q[8]=C,q[9]=Z;else Z=q[9];let E;if(q[10]===Symbol.for("react.memo_cache_sentinel"))E=G(X,{bold:!0,children:"Choose the text style that looks best with your terminal"},void 0,!1,void 0,this),q[10]=E;else E=q[10];let z;if(q[11]!==Q||q[12]!==Y)z=Q&&!Y&&G(X,{dimColor:!0,children:Q},void 0,!1,void 0,this),q[11]=Q,q[12]=Y,q[13]=z;else z=q[13];let W;if(q[14]!==z)W=G(L,{flexDirection:"column",children:[E,z]},void 0,!0,void 0,this),q[14]=z,q[15]=W;else W=q[15];let F;if(q[16]!==l)F=(J)=>{l(J)},q[16]=l,q[17]=F;else F=q[17];let O;if(q[18]!==g||q[19]!==x)O=(J)=>{x(),g(J)},q[18]=g,q[19]=x,q[20]=O;else O=q[20];let k;if(q[21]!==_||q[22]!==c||q[23]!==b)k=b?()=>{_(),c?.()}:async()=>{_(),await Mq(0)},q[21]=_,q[22]=c,q[23]=b,q[24]=k;else k=q[24];let I;if(q[25]!==F||q[26]!==O||q[27]!==k||q[28]!==P)I=G(Iq,{options:Jq,onFocus:F,onChange:O,onCancel:k,visibleOptionCount:Jq.length,defaultValue:P,defaultFocusValue:P},void 0,!1,void 0,this),q[25]=F,q[26]=O,q[27]=k,q[28]=P,q[29]=I;else I=q[29];let M;if(q[30]!==Z||q[31]!==W||q[32]!==I)M=G(L,{flexDirection:"column",gap:1,children:[Z,W,I]},void 0,!0,void 0,this),q[30]=Z,q[31]=W,q[32]=I,q[33]=M;else M=q[33];let m;if(q[34]===Symbol.for("react.memo_cache_sentinel"))m={oldStart:1,newStart:1,oldLines:3,newLines:3,lines:[" function greet() {",'- console.log("Hello, World!");','+ console.log("Hello, Claude!");'," }"]},q[34]=m;else m=q[34];let U;if(q[35]!==h)U=G(L,{flexDirection:"column",borderTop:!0,borderBottom:!0,borderLeft:!1,borderRight:!1,borderStyle:"dashed",borderColor:"subtle",children:G(Rq,{patch:m,dim:!1,filePath:"demo.js",firstLine:null,width:h},void 0,!1,void 0,this)},void 0,!1,void 0,this),q[35]=h,q[36]=U;else U=q[36];let n=a==="env"?`Syntax highlighting disabled (via CLAUDE_CODE_SYNTAX_HIGHLIGHT=${process.env.CLAUDE_CODE_SYNTAX_HIGHLIGHT})`:v?`Syntax highlighting disabled (${o} to enable)`:y?`Syntax theme: ${y.theme}${y.source?` (from ${y.source})`:""} (${o} to disable)`:`Syntax highlighting enabled (${o} to disable)`,A;if(q[37]!==n)A=G(X,{dimColor:!0,children:[" ",n]},void 0,!0,void 0,this),q[37]=n,q[38]=A;else A=q[38];let R;if(q[39]!==U||q[40]!==A)R=G(L,{flexDirection:"column",width:"100%",children:[U,A]},void 0,!0,void 0,this),q[39]=U,q[40]=A,q[41]=R;else R=q[41];let D;if(q[42]!==M||q[43]!==R)D=G(L,{flexDirection:"column",gap:1,children:[M,R]},void 0,!0,void 0,this),q[42]=M,q[43]=R,q[44]=D;else D=q[44];let S=D;if(!C){let J;if(q[45]!==S)J=G(L,{flexDirection:"column",children:S},void 0,!1,void 0,this),q[45]=S,q[46]=J;else J=q[46];let N;if(q[47]!==Q||q[48]!==Y)N=Y&&Q&&G(L,{marginLeft:3,children:G(X,{dimColor:!0,children:Q},void 0,!1,void 0,this)},void 0,!1,void 0,this),q[47]=Q,q[48]=Y,q[49]=N;else N=q[49];let K;if(q[50]!==d||q[51]!==T)K=!T&&G(L,{children:G(X,{dimColor:!0,italic:!0,children:d.pending?G(Lq,{children:["Press ",d.keyName," again to exit"]},void 0,!0,void 0,this):G(kq,{children:[G(s,{shortcut:"Enter",action:"select"},void 0,!1,void 0,this),G(s,{shortcut:"Esc",action:"cancel"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)},void 0,!1,void 0,this)},void 0,!1,void 0,this),q[50]=d,q[51]=T,q[52]=K;else K=q[52];let f;if(q[53]!==N||q[54]!==K)f=G(L,{marginTop:1,children:[N,K]},void 0,!0,void 0,this),q[53]=N,q[54]=K,q[55]=f;else f=q[55];let u;if(q[56]!==J||q[57]!==f)u=G(Lq,{children:[J,f]},void 0,!0,void 0,this),q[56]=J,q[57]=f,q[58]=u;else u=q[58];return u}return S}function uq(){}function pq(p){return p.settings.syntaxHighlightingDisabled}var gq=Cq(()=>{Vq();Bq();Pq();Hq();vq();yq();Dq();dq();bq();wq();jq();_q();Eq();mq()});
3
3
  export{JG as Ve,gq as We};
@@ -1,3 +1,3 @@
1
1
  // @bun
2
- import{E8 as Q,J8 as x}from"./cli-4ewb3q42.js";import{X9 as Z,b_ as H}from"./cli-hke6r0q8.js";import{fda as Y}from"./cli-w1d8n9g3.js";function X(q){let B=q.trim().replace(/\/$/,"");if(!/^https?:\/\//i.test(B))return`https://${B}`;return B}function f(q){let B=q||process.env.UNIEAI_STUDIO_URL||"https://studio.unieai.com";return X(B)}function N(q){let B=q.trim().replace(/\/+$/,"");if(!/^https?:\/\//i.test(B))return`https://${B}`;return B}function E(q){try{let B=new URL(N(q)),J=B.hostname.startsWith("studio.")?`api.${B.hostname.slice(7)}`:B.hostname,K=B.port?`:${B.port}`:"";return`${B.protocol}//${J}${K}/v1`}catch{return"https://api.unieai.com/v1"}}function p(q){let B=process.env.UNIEAI_GATEWAY_URL?.trim();if(B)return N(B);if(q.userGatewayUrl&&q.userGatewayUrl.trim())return N(q.userGatewayUrl);if(q.configBaseURL&&/^https?:\/\/(?!runtime:|localhost|127\.)/i.test(q.configBaseURL))return N(q.configBaseURL);return E(q.studioUrl)}async function L(q,B){if(!q.ok){let J=await q.text().catch(()=>"");throw Error(`${B} failed: HTTP ${q.status}${J?` \u2014 ${J.slice(0,300)}`:""}`)}return await q.json()}async function g(q){let B=await fetch(`${q}/auth/device/code`,{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify({client_id:"opencode-cli"})});return L(B,"device code request")}async function y(q,B){let J=await fetch(`${q}/auth/device/token`,{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify({grant_type:"urn:ietf:params:oauth:grant-type:device_code",device_code:B,client_id:"opencode-cli"})});if(J.ok)return{kind:"success",tokens:await J.json()};let K=await J.json().catch(()=>null),R=K?.error||`http_${J.status}`;switch(R){case"authorization_pending":return{kind:"pending"};case"slow_down":return{kind:"slow_down"};case"expired_token":return{kind:"expired"};case"access_denied":return{kind:"denied"};default:return{kind:"error",error:R,description:K?.error_description}}}async function T(q,B){let J=await fetch(`${q}/auth/device/token`,{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify({grant_type:"refresh_token",refresh_token:B,client_id:"opencode-cli"})});return L(J,"token refresh")}async function k(q,B,J){try{let K=await fetch(`${q}/api/user-api-keys/${encodeURIComponent(J)}`,{method:"DELETE",headers:{Accept:"application/json",Authorization:`Bearer ${B}`}});return K.ok||K.status===404}catch{return!1}}async function m(q,B){let J=await fetch(`${q}/auth/device/revoke`,{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify({refresh_token:B,client_id:"opencode-cli"})});if(!J.ok){let K=await J.text().catch(()=>"");throw Error(`token revoke failed: HTTP ${J.status}${K?` \u2014 ${K.slice(0,300)}`:""}`)}}function V(q,B){return{Accept:"application/json",Authorization:`Bearer ${q}`,...B??{}}}async function U(q,B){let J=await fetch(`${q}/api/user`,{headers:V(B)});return L(J,"fetch user")}async function h(q,B){let J=await fetch(`${q}/api/orgs`,{headers:V(B)});return L(J,"fetch orgs")}async function c(q,B,J){let K=await fetch(`${q}/api/config`,{headers:V(B,{"x-org-id":J})});if(K.status===404)return null;return(await L(K,"fetch config")).config??null}var S="https://api.unieai.com/v1";var F=()=>{};import{existsSync as _,mkdirSync as A,readFileSync as C,writeFileSync as G,chmodSync as O,unlinkSync as z}from"fs";import{homedir as v}from"os";import{dirname as I,join as $}from"path";import b from"lodash-es/memoize.js";function j(){return process.env.CLAUDE_CONFIG_DIR||$(v(),".claude")}function W(){return $(j(),"unieai-auth.json")}function s(q){try{let B=W();A(I(B),{recursive:!0}),G(B,JSON.stringify(q,null,2),{encoding:"utf8"});try{O(B,384)}catch{}return M(),{success:!0}}catch(B){return Q(B),{success:!1,warning:`Failed to save UnieAI Studio tokens: ${Z(B)}`}}}async function o(){return D()}function M(){D.cache?.clear?.()}function r(){try{let q=W();if(_(q))z(q);return M(),!0}catch(q){return Q(q),!1}}var D;var P=Y(()=>{H();x();D=b(()=>{try{let q=W();if(!_(q))return null;let B=C(q,"utf8");return JSON.parse(B)}catch(q){return Q(q),null}})});
3
- export{S as F5,f as G5,N as H5,E as I5,p as J5,g as K5,y as L5,T as M5,k as N5,m as O5,U as P5,h as Q5,c as R5,F as S5,s as T5,D as U5,o as V5,M as W5,r as X5,P as Y5};
2
+ import{G8 as Q,L8 as x}from"./cli-8kpqq0ea.js";import{Z9 as Z,d_ as H}from"./cli-awb77t95.js";import{hda as Y}from"./cli-qwx84m9c.js";function X(q){let B=q.trim().replace(/\/$/,"");if(!/^https?:\/\//i.test(B))return`https://${B}`;return B}function p(q){let B=q||process.env.UNIEAI_STUDIO_URL||"https://studio.unieai.com";return X(B)}function N(q){let B=q.trim().replace(/\/+$/,"");if(!/^https?:\/\//i.test(B))return`https://${B}`;return B}function E(q){try{let B=new URL(N(q)),J=B.hostname.startsWith("studio.")?`api.${B.hostname.slice(7)}`:B.hostname,K=B.port?`:${B.port}`:"";return`${B.protocol}//${J}${K}/v1`}catch{return"https://api.unieai.com/v1"}}function g(q){let B=process.env.UNIEAI_GATEWAY_URL?.trim();if(B)return N(B);if(q.userGatewayUrl&&q.userGatewayUrl.trim())return N(q.userGatewayUrl);if(q.configBaseURL&&/^https?:\/\/(?!runtime:|localhost|127\.)/i.test(q.configBaseURL))return N(q.configBaseURL);return E(q.studioUrl)}async function L(q,B){if(!q.ok){let J=await q.text().catch(()=>"");throw Error(`${B} failed: HTTP ${q.status}${J?` \u2014 ${J.slice(0,300)}`:""}`)}return await q.json()}async function y(q){let B=await fetch(`${q}/auth/device/code`,{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify({client_id:"opencode-cli"})});return L(B,"device code request")}async function T(q,B){let J=await fetch(`${q}/auth/device/token`,{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify({grant_type:"urn:ietf:params:oauth:grant-type:device_code",device_code:B,client_id:"opencode-cli"})});if(J.ok)return{kind:"success",tokens:await J.json()};let K=await J.json().catch(()=>null),R=K?.error||`http_${J.status}`;switch(R){case"authorization_pending":return{kind:"pending"};case"slow_down":return{kind:"slow_down"};case"expired_token":return{kind:"expired"};case"access_denied":return{kind:"denied"};default:return{kind:"error",error:R,description:K?.error_description}}}async function k(q,B){let J=await fetch(`${q}/auth/device/token`,{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify({grant_type:"refresh_token",refresh_token:B,client_id:"opencode-cli"})});return L(J,"token refresh")}async function m(q,B,J){try{let K=await fetch(`${q}/api/user-api-keys/${encodeURIComponent(J)}`,{method:"DELETE",headers:{Accept:"application/json",Authorization:`Bearer ${B}`}});return K.ok||K.status===404}catch{return!1}}async function U(q,B){let J=await fetch(`${q}/auth/device/revoke`,{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify({refresh_token:B,client_id:"opencode-cli"})});if(!J.ok){let K=await J.text().catch(()=>"");throw Error(`token revoke failed: HTTP ${J.status}${K?` \u2014 ${K.slice(0,300)}`:""}`)}}function V(q,B){return{Accept:"application/json",Authorization:`Bearer ${q}`,...B??{}}}async function h(q,B){let J=await fetch(`${q}/api/user`,{headers:V(B)});return L(J,"fetch user")}async function c(q,B){let J=await fetch(`${q}/api/orgs`,{headers:V(B)});return L(J,"fetch orgs")}async function u(q,B,J){let K=await fetch(`${q}/api/config`,{headers:V(B,{"x-org-id":J})});if(K.status===404)return null;return(await L(K,"fetch config")).config??null}var S="https://studio.unieai.com",f="https://api.unieai.com/v1";var F=()=>{};import{existsSync as _,mkdirSync as A,readFileSync as C,writeFileSync as G,chmodSync as O,unlinkSync as z}from"fs";import{homedir as v}from"os";import{dirname as I,join as $}from"path";import b from"lodash-es/memoize.js";function j(){return process.env.CLAUDE_CONFIG_DIR||$(v(),".claude")}function W(){return $(j(),"unieai-auth.json")}function o(q){try{let B=W();A(I(B),{recursive:!0}),G(B,JSON.stringify(q,null,2),{encoding:"utf8"});try{O(B,384)}catch{}return M(),{success:!0}}catch(B){return Q(B),{success:!1,warning:`Failed to save UnieAI Studio tokens: ${Z(B)}`}}}async function r(){return D()}function M(){D.cache?.clear?.()}function e(){try{let q=W();if(_(q))z(q);return M(),!0}catch(q){return Q(q),!1}}var D;var P=Y(()=>{H();x();D=b(()=>{try{let q=W();if(!_(q))return null;let B=C(q,"utf8");return JSON.parse(B)}catch(q){return Q(q),null}})});
3
+ export{S as F5,f as G5,X as H5,p as I5,N as J5,E as K5,g as L5,y as M5,T as N5,k as O5,m as P5,U as Q5,h as R5,c as S5,u as T5,F as U5,o as V5,D as W5,r as X5,M as Y5,e as Z5,P as _5};
@@ -0,0 +1,3 @@
1
+ // @bun
2
+ import{hda as c}from"./cli-qwx84m9c.js";function n(t){let e;return()=>e??=t()}var o=()=>{};
3
+ export{n as $4,o as a5};
@@ -0,0 +1,3 @@
1
+ // @bun
2
+ import{hda as e}from"./cli-qwx84m9c.js";function o(){return!0}var t=()=>{};
3
+ export{o as iN,t as jN};
@@ -1,5 +1,5 @@
1
1
  // @bun
2
- import{wd as UJ,xd as oJ}from"./cli-vwg0v35a.js";import{If as LJ,Jf as nJ}from"./cli-4mvvtchx.js";import{Bg as r,EK as h,Eg as bJ,Fo as KJ,Hk as E,IE as k,Ik as m,JK as l,Jo as SJ,MF as YJ,NF as IJ,OI as CJ,VE as a,ds as R,fH as zJ,hs as qJ,iE as t,il as vJ,is as QJ,jB as wJ,js as hJ,kB as iJ,ll as S,ml as c,oE as e,uK as VJ,wp as ZJ,xK as xJ,xp as kJ}from"./cli-me4e2p3e.js";import{FW as $J,MW as GJ,NW as jJ,SY as s,a3 as MJ,rZ as _J}from"./cli-msmzt4c3.js";import{f4 as OJ,g4 as P,i4 as y,k4 as EJ}from"./cli-s6vr7213.js";import{L7 as o,M7 as NJ}from"./cli-rvad3yhg.js";import{E8 as w,J8 as j,r8 as C,s8 as TJ}from"./cli-4ewb3q42.js";import{Y8 as A,Z8 as n}from"./cli-t9jht3kb.js";import{W9 as T,b_ as f,h_ as FJ,l_ as N,p_ as HJ,v_ as F,y_ as RJ}from"./cli-hke6r0q8.js";import{F_ as M,S_ as AJ}from"./cli-tq5z9qv3.js";import{Uaa as d,bda as i,jaa as p}from"./cli-3ac555qw.js";import{gda as I}from"./cli-w1d8n9g3.js";iJ();nJ();i();MJ();n();l();bJ();c();OJ();NJ();f();j();a();_J();FJ();m();l();c();j();f();a();m();vJ();function JJ(){}async function jX(X,J){if(!X)return;let{join:q}=await import("path"),G=await import("fs/promises"),$=q(o(),".claude","skills",X,"SKILL.md"),K;try{K=await G.readFile($,"utf-8")}catch{w(Error(`Failed to read skill file for improvement: ${$}`));return}let Q=J.map((B)=>`- ${B.section}: ${B.change}`).join(`
2
+ import{wd as UJ,xd as oJ}from"./cli-jz50hv3m.js";import{If as LJ,Jf as nJ}from"./cli-psqvdh1r.js";import{Bg as r,EK as h,Eg as bJ,Fo as KJ,Hk as E,IE as k,Ik as m,JK as l,Jo as SJ,MF as YJ,NF as IJ,OI as CJ,VE as a,ds as R,fH as zJ,hs as qJ,iE as t,il as vJ,is as QJ,jB as wJ,js as hJ,kB as iJ,ll as S,ml as c,oE as e,uK as VJ,wp as ZJ,xK as xJ,xp as kJ}from"./cli-b3k8arn1.js";import{FW as $J,MW as GJ,NW as jJ,SY as s,a3 as MJ,rZ as _J}from"./cli-192xnkcx.js";import{f4 as OJ,g4 as P,i4 as y,k4 as EJ}from"./cli-r43jhzwm.js";import{N7 as o,O7 as NJ}from"./cli-fnt125we.js";import{G8 as w,L8 as j,t8 as C,u8 as TJ}from"./cli-8kpqq0ea.js";import{$8 as n,_8 as A}from"./cli-e5yek4vx.js";import{A_ as RJ,Y9 as T,d_ as f,j_ as FJ,n_ as N,r_ as HJ,x_ as F}from"./cli-awb77t95.js";import{H_ as M,U_ as AJ}from"./cli-q8zmmp6z.js";import{Waa as d,dda as i,laa as p}from"./cli-tafg3e9w.js";import{ida as I}from"./cli-qwx84m9c.js";iJ();nJ();i();MJ();n();l();bJ();c();OJ();NJ();f();j();a();_J();FJ();m();l();c();j();f();a();m();vJ();function JJ(){}async function jX(X,J){if(!X)return;let{join:q}=await import("path"),G=await import("fs/promises"),$=q(o(),".claude","skills",X,"SKILL.md"),K;try{K=await G.readFile($,"utf-8")}catch{w(Error(`Failed to read skill file for improvement: ${$}`));return}let Q=J.map((B)=>`- ${B.section}: ${B.change}`).join(`
3
3
  `),Z=await h({messages:[t({content:`You are editing a skill definition file. Apply the following improvements to the skill.
4
4
 
5
5
  <current_skill_file>
@@ -0,0 +1,3 @@
1
+ // @bun
2
+ import{rR as A}from"./cli-brr3bnrj.js";import{F1 as x,a3 as z}from"./cli-192xnkcx.js";import{U_ as q}from"./cli-q8zmmp6z.js";import{hda as p}from"./cli-qwx84m9c.js";function P(){return!1}async function Q(){return!1}function R(){return!1}function S(){return!0}function T(){return null}var B=p(()=>{z();x();q();A()});
3
+ export{P as Ie,Q as Je,R as Ke,S as Le,T as Me,B as Ne};