@unieai/code 0.0.12 → 0.0.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (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-qyytrhe5.js +2 -0
  17. package/dist/chunks/{ResumeConversation-krn9hqb1.js → ResumeConversation-wfhd5xb2.js} +1 -1
  18. package/dist/chunks/{SnapshotUpdateDialog-raq029pd.js → SnapshotUpdateDialog-aya2c2f9.js} +1 -1
  19. package/dist/chunks/{TeleportProgress-vyy2k3bv.js → TeleportProgress-kn3qgvd9.js} +1 -1
  20. package/dist/chunks/{TeleportRepoMismatchDialog-ff0h2cnq.js → TeleportRepoMismatchDialog-01v6e2qz.js} +1 -1
  21. package/dist/chunks/{TeleportResumeWrapper-esjykret.js → TeleportResumeWrapper-48dsm503.js} +1 -1
  22. package/dist/chunks/{TmuxBackend-14kmnkcb.js → TmuxBackend-s0bt8zqj.js} +1 -1
  23. package/dist/chunks/ToolSearchTool-4rm3kr13.js +2 -0
  24. package/dist/chunks/{TrustDialog-7fvaze2x.js → TrustDialog-xtn3kq0n.js} +1 -1
  25. package/dist/chunks/TungstenTool-3wjjz6cf.js +2 -0
  26. package/dist/chunks/{add-dir-kqw72mky.js → add-dir-z0kz5nf7.js} +1 -1
  27. package/dist/chunks/{agents-z66twpqr.js → agents-ex4cdx64.js} +1 -1
  28. package/dist/chunks/agents-w6zde2j9.js +4 -0
  29. package/dist/chunks/ant-claude-for-chrome-mcp-gr0b0jr4.js +2 -0
  30. package/dist/chunks/api-07pqphw5.js +2 -0
  31. package/dist/chunks/asciicast-2k1ztt6v.js +2 -0
  32. package/dist/chunks/{AssistantSessionChooser-g1vsya6h.js → assistant-bmwndz7j.js} +1 -1
  33. package/dist/chunks/{auth-wk077awh.js → auth-g2p039wk.js} +1 -1
  34. package/dist/chunks/auth-g509w5pr.js +2 -0
  35. package/dist/chunks/backgroundHousekeeping-hw0chw1d.js +2 -0
  36. package/dist/chunks/{branch-1d0b8590.js → branch-rdvbhvts.js} +1 -1
  37. package/dist/chunks/{bridgePointer-vhd47np6.js → bridgePointer-9rqn5tp6.js} +1 -1
  38. package/dist/chunks/{btw-s3r5jhyd.js → btw-xts6twbq.js} +1 -1
  39. package/dist/chunks/{buddy-xzm5npk8.js → buddy-yc09g048.js} +1 -1
  40. package/dist/chunks/{cachedMicrocompact-6j3zxr4g.js → cachedMicrocompact-fa2mdnyh.js} +1 -1
  41. package/dist/chunks/caches-3qzm958c.js +2 -0
  42. package/dist/chunks/{chrome-mdyx0s5j.js → chrome-gb6g0d5p.js} +1 -1
  43. package/dist/chunks/{chromeNativeHost-8wc6wcr6.js → chromeNativeHost-jsntnc29.js} +1 -1
  44. package/dist/chunks/{claudeDesktop-p5bfxmvz.js → claudeDesktop-me56qerx.js} +1 -1
  45. package/dist/chunks/{cleanup-q46nbce1.js → cleanup-hxj6tm50.js} +1 -1
  46. package/dist/chunks/clear-ssfbry3k.js +2 -0
  47. package/dist/chunks/{cli-bmk0rb5v.js → cli-07f2hk9d.js} +1 -1
  48. package/dist/chunks/{cli-h4a90xbh.js → cli-0nz8v3dj.js} +1 -1
  49. package/dist/chunks/{cli-fwrj8ybs.js → cli-16k24hzp.js} +1 -1
  50. package/dist/chunks/{cli-msmzt4c3.js → cli-192xnkcx.js} +1 -1
  51. package/dist/chunks/{cli-g4n9das2.js → cli-1eejy071.js} +1 -1
  52. package/dist/chunks/{cli-3m8n808e.js → cli-1p7nc6zb.js} +1 -1
  53. package/dist/chunks/{cli-s160fqyz.js → cli-1q1b8rgs.js} +1 -1
  54. package/dist/chunks/{cli-99mqr54v.js → cli-222ywgt0.js} +1 -1
  55. package/dist/chunks/{cli-f63fdj4w.js → cli-2428yw99.js} +1 -1
  56. package/dist/chunks/{cli-v943fd6a.js → cli-2fqrjjs9.js} +1 -1
  57. package/dist/chunks/{cli-t4j047cx.js → cli-2j6cv2kz.js} +1 -1
  58. package/dist/chunks/{cli-xpa1neza.js → cli-2sbq6ggm.js} +2 -2
  59. package/dist/chunks/{cli-8qd16mt4.js → cli-33tchr20.js} +1 -1
  60. package/dist/chunks/{cli-zjbzak9n.js → cli-3619x17q.js} +1 -1
  61. package/dist/chunks/{cli-gtm212j6.js → cli-3hrmwgsv.js} +1 -1
  62. package/dist/chunks/{cli-hzr2zraz.js → cli-3tkd82y4.js} +1 -1
  63. package/dist/chunks/{cli-zev50xap.js → cli-3tmtx9ka.js} +1 -1
  64. package/dist/chunks/{cli-xfsqvp8r.js → cli-4pwyex04.js} +1 -1
  65. package/dist/chunks/{cli-jj93qmmc.js → cli-5ajcy93q.js} +2 -2
  66. package/dist/chunks/{cli-0w4wc1z0.js → cli-5kehgkgh.js} +1 -1
  67. package/dist/chunks/{cli-fghyxar5.js → cli-601zv0wv.js} +1 -1
  68. package/dist/chunks/{cli-r3etpht1.js → cli-609dp2ck.js} +1 -1
  69. package/dist/chunks/{cli-ns0aaggm.js → cli-63wps6p0.js} +1 -1
  70. package/dist/chunks/{cli-m0z3rmf0.js → cli-64x5ghm5.js} +1 -1
  71. package/dist/chunks/{cli-de1hwp88.js → cli-67azkkwm.js} +1 -1
  72. package/dist/chunks/{cli-dbdqrqmt.js → cli-6cqemsm9.js} +1 -1
  73. package/dist/chunks/{cli-27mzrnr8.js → cli-6ee37m6j.js} +1 -1
  74. package/dist/chunks/{cli-mb1qrqw1.js → cli-6qt2xm18.js} +1 -1
  75. package/dist/chunks/{cli-49m97nbg.js → cli-7ed2q42n.js} +1 -1
  76. package/dist/chunks/{cli-s9fhtgmz.js → cli-7jw2qe69.js} +1 -1
  77. package/dist/chunks/cli-7k17xstr.js +3 -0
  78. package/dist/chunks/{cli-61x73ksv.js → cli-7n4d5yzr.js} +1 -1
  79. package/dist/chunks/{cli-p0vh69b9.js → cli-7wxv39ry.js} +2 -2
  80. package/dist/chunks/{cli-15sqp3mq.js → cli-8h10q2x8.js} +1 -1
  81. package/dist/chunks/{cli-yqbvprz7.js → cli-8j0b3b55.js} +1 -1
  82. package/dist/chunks/{cli-akcxtvv9.js → cli-8jym9hp6.js} +1 -1
  83. package/dist/chunks/{cli-4ewb3q42.js → cli-8kpqq0ea.js} +2 -2
  84. package/dist/chunks/{cli-2rw44zfx.js → cli-8xyb31dy.js} +1 -1
  85. package/dist/chunks/cli-8xz7dd7z.js +3 -0
  86. package/dist/chunks/{cli-g5wq5ptg.js → cli-8ykv66e4.js} +1 -1
  87. package/dist/chunks/{cli-jegyadmb.js → cli-8z8d5bgb.js} +1 -1
  88. package/dist/chunks/{cli-cqkne34j.js → cli-93sm9n17.js} +1 -1
  89. package/dist/chunks/{cli-q0156x0d.js → cli-97vx3m99.js} +1 -1
  90. package/dist/chunks/{cli-1jp3rm7n.js → cli-9e8f55fp.js} +1 -1
  91. package/dist/chunks/{cli-2wd8eaac.js → cli-9hqmq5g6.js} +1 -1
  92. package/dist/chunks/{cli-6bxfdgv1.js → cli-9tbmrp89.js} +1 -1
  93. package/dist/chunks/{cli-5dt9yjha.js → cli-9xtyh8c7.js} +1 -1
  94. package/dist/chunks/{cli-sh9w2tbd.js → cli-a1cx6p3g.js} +1 -1
  95. package/dist/chunks/{cli-ja540nr7.js → cli-a1dqnvy2.js} +1 -1
  96. package/dist/chunks/{cli-wt2bfbn0.js → cli-a25jeqs8.js} +1 -1
  97. package/dist/chunks/{cli-x8xgga1a.js → cli-a2d962bq.js} +2 -2
  98. package/dist/chunks/{cli-h120wpk2.js → cli-a826q5zk.js} +1 -1
  99. package/dist/chunks/{cli-k4v08k8t.js → cli-an97yxg9.js} +1 -1
  100. package/dist/chunks/{cli-m12smc5e.js → cli-asc9xmsr.js} +1 -1
  101. package/dist/chunks/{cli-hke6r0q8.js → cli-awb77t95.js} +2 -2
  102. package/dist/chunks/{cli-6yprtw88.js → cli-awe5yg6m.js} +1 -1
  103. package/dist/chunks/{cli-15w3eaed.js → cli-ax0ckqpv.js} +1 -1
  104. package/dist/chunks/{cli-mbp8f3f3.js → cli-b29enbbc.js} +1 -1
  105. package/dist/chunks/{cli-me4e2p3e.js → cli-b3k8arn1.js} +25 -25
  106. package/dist/chunks/{cli-c22wpdk4.js → cli-b5z57an7.js} +1 -1
  107. package/dist/chunks/{cli-0dc8sd37.js → cli-b8j8bm5m.js} +1 -1
  108. package/dist/chunks/{cli-51720d82.js → cli-bdgrtpsy.js} +2 -2
  109. package/dist/chunks/{cli-yrwenjxs.js → cli-bfm3f0yw.js} +1 -1
  110. package/dist/chunks/{cli-764c4bsm.js → cli-bj0csmzs.js} +1 -1
  111. package/dist/chunks/{cli-ms5j6fff.js → cli-bnr79ddy.js} +1 -1
  112. package/dist/chunks/{cli-a52ra30v.js → cli-bpj9na88.js} +1 -1
  113. package/dist/chunks/{cli-v9f860t5.js → cli-brr3bnrj.js} +1 -1
  114. package/dist/chunks/{cli-eyw3czmn.js → cli-bzrat9yd.js} +1 -1
  115. package/dist/chunks/{cli-msw0vv86.js → cli-ca1jmr8f.js} +1 -1
  116. package/dist/chunks/{cli-br6zjh6x.js → cli-ceas97gw.js} +1 -1
  117. package/dist/chunks/{cli-kqv5b8zh.js → cli-cfbfexxj.js} +1 -1
  118. package/dist/chunks/{cli-tckzkegq.js → cli-chvks6bg.js} +1 -1
  119. package/dist/chunks/cli-cmh6qwg8.js +3 -0
  120. package/dist/chunks/{cli-khs3sj9k.js → cli-d1w21hsm.js} +1 -1
  121. package/dist/chunks/{cli-z5e72gsd.js → cli-d2pn0xfj.js} +1 -1
  122. package/dist/chunks/{cli-fm14mg07.js → cli-df5r5xrp.js} +1 -1
  123. package/dist/chunks/{cli-2rwjx3w0.js → cli-dx0pk7k2.js} +1 -1
  124. package/dist/chunks/{cli-p2cqnrnp.js → cli-dy9qrrps.js} +1 -1
  125. package/dist/chunks/{cli-q46epwyh.js → cli-e3q6b1cv.js} +1 -1
  126. package/dist/chunks/{cli-fs7yttfp.js → cli-e4a4fjx9.js} +2 -2
  127. package/dist/chunks/{cli-t9jht3kb.js → cli-e5yek4vx.js} +2 -2
  128. package/dist/chunks/{cli-5f0w3fy6.js → cli-e9t5kfxm.js} +1 -1
  129. package/dist/chunks/{cli-1n8he7s8.js → cli-eh1wx76n.js} +1 -1
  130. package/dist/chunks/{cli-d0hzw78c.js → cli-ez2xsd4m.js} +1 -1
  131. package/dist/chunks/{cli-n5s5fnyj.js → cli-fdjfk8yq.js} +2 -2
  132. package/dist/chunks/{cli-rvad3yhg.js → cli-fnt125we.js} +2 -2
  133. package/dist/chunks/{cli-0qt9btbe.js → cli-fz053waw.js} +1 -1
  134. package/dist/chunks/{cli-89x414pj.js → cli-g2s3391y.js} +1 -1
  135. package/dist/chunks/cli-geka8fb7.js +3 -0
  136. package/dist/chunks/{cli-73jf8hyz.js → cli-gfweqbpz.js} +1 -1
  137. package/dist/chunks/{cli-tfv2qcgf.js → cli-gypyp608.js} +1 -1
  138. package/dist/chunks/{cli-1ny2386w.js → cli-h2t2hyz7.js} +1 -1
  139. package/dist/chunks/{cli-zp8s7q5w.js → cli-hp5gs22f.js} +1 -1
  140. package/dist/chunks/{cli-pgg33dhw.js → cli-hpxspent.js} +1 -1
  141. package/dist/chunks/{cli-ezs5sney.js → cli-hrmzaf5d.js} +2 -2
  142. package/dist/chunks/{cli-8dmy2s42.js → cli-hs2k9997.js} +1 -1
  143. package/dist/chunks/{cli-19ncan36.js → cli-j403r21v.js} +1 -1
  144. package/dist/chunks/{cli-wn2srq2e.js → cli-j4r75xsd.js} +1 -1
  145. package/dist/chunks/{cli-5vsnhp97.js → cli-jmq1x925.js} +1 -1
  146. package/dist/chunks/{cli-sycqd3xe.js → cli-jnc0ze6w.js} +4 -4
  147. package/dist/chunks/{cli-4nejhkd0.js → cli-jrwh6rs0.js} +1 -1
  148. package/dist/chunks/{cli-vwg0v35a.js → cli-jz50hv3m.js} +1 -1
  149. package/dist/chunks/{cli-vkvmhjha.js → cli-jz8jcrhh.js} +1 -1
  150. package/dist/chunks/{cli-nvnj7r73.js → cli-ktzyyx91.js} +1 -1
  151. package/dist/chunks/{cli-9aq7vxaq.js → cli-kx3r72jp.js} +1 -1
  152. package/dist/chunks/{cli-tyqh91zq.js → cli-m3r80gy0.js} +1 -1
  153. package/dist/chunks/{cli-9z9r2set.js → cli-m6amgxq3.js} +1 -1
  154. package/dist/chunks/{cli-qaxvg7gv.js → cli-mcbntv3p.js} +1 -1
  155. package/dist/chunks/{cli-pbc8sk2d.js → cli-mx33m3gs.js} +1 -1
  156. package/dist/chunks/{cli-r83ttew2.js → cli-n5wt59z1.js} +1 -1
  157. package/dist/chunks/{cli-gq5fve62.js → cli-nqvfpxp6.js} +1 -1
  158. package/dist/chunks/{cli-zpcncwrv.js → cli-pgjnzqk4.js} +1 -1
  159. package/dist/chunks/{cli-6pdpyz1a.js → cli-phwbqkv7.js} +1 -1
  160. package/dist/chunks/{cli-57yrpnaq.js → cli-ps5qshk4.js} +1 -1
  161. package/dist/chunks/{cli-4mvvtchx.js → cli-psqvdh1r.js} +1 -1
  162. package/dist/chunks/{cli-gxgdnjfn.js → cli-q0vret0x.js} +1 -1
  163. package/dist/chunks/{cli-zxdnz6vp.js → cli-q2g5mjv6.js} +1 -1
  164. package/dist/chunks/{cli-tq5z9qv3.js → cli-q8zmmp6z.js} +2 -2
  165. package/dist/chunks/{cli-j08dmxw5.js → cli-qpjkqhg2.js} +1 -1
  166. package/dist/chunks/{cli-scaqq0v9.js → cli-qrmc38f8.js} +1 -1
  167. package/dist/chunks/{cli-w1d8n9g3.js → cli-qwx84m9c.js} +1 -1
  168. package/dist/chunks/{cli-s6vr7213.js → cli-r43jhzwm.js} +1 -1
  169. package/dist/chunks/{cli-x70v8rsj.js → cli-rc3w6tqd.js} +2 -2
  170. package/dist/chunks/{cli-7c99j0pt.js → cli-rd5ax7sn.js} +1 -1
  171. package/dist/chunks/{cli-m8fq163z.js → cli-rjy86nps.js} +1 -1
  172. package/dist/chunks/cli-rwh0a2m1.js +3 -0
  173. package/dist/chunks/{cli-3gwqrmcd.js → cli-ry9g546q.js} +1 -1
  174. package/dist/chunks/{cli-8mk2zg4a.js → cli-rz03bav0.js} +1 -1
  175. package/dist/chunks/{cli-66jj9zj3.js → cli-sbm8tsyq.js} +1 -1
  176. package/dist/chunks/{cli-55ntywtj.js → cli-shsgq494.js} +1 -1
  177. package/dist/chunks/{cli-tt9a4124.js → cli-sr25begm.js} +1 -1
  178. package/dist/chunks/{cli-c60c9qvm.js → cli-swrtc7tv.js} +1 -1
  179. package/dist/chunks/{cli-cwbxhdt1.js → cli-sxe9wke0.js} +1 -1
  180. package/dist/chunks/{cli-qm684n63.js → cli-szxfz15b.js} +1 -1
  181. package/dist/chunks/{cli-w52yvzkn.js → cli-t4see9hh.js} +2 -2
  182. package/dist/chunks/cli-t5ddsvmv.js +3 -0
  183. package/dist/chunks/cli-t5yqvdb3.js +3 -0
  184. package/dist/chunks/{cli-wbe1p8n2.js → cli-t7sx6zqn.js} +1 -1
  185. package/dist/chunks/cli-t8ydjjs7.js +3 -0
  186. package/dist/chunks/{cli-3ac555qw.js → cli-tafg3e9w.js} +2 -2
  187. package/dist/chunks/{cli-zjfya500.js → cli-tpjr1pz9.js} +1 -1
  188. package/dist/chunks/{cli-d53fhs6v.js → cli-vb6aa4jk.js} +1 -1
  189. package/dist/chunks/{cli-749tdaqc.js → cli-vfh77r55.js} +1 -1
  190. package/dist/chunks/{cli-jkj867t1.js → cli-vm7dr5aa.js} +2 -2
  191. package/dist/chunks/{cli-k2nh5cby.js → cli-vqne1z50.js} +1 -1
  192. package/dist/chunks/{cli-42kma5r3.js → cli-vtsy70mz.js} +1 -1
  193. package/dist/chunks/{cli-mj03488e.js → cli-vy3e90k9.js} +1 -1
  194. package/dist/chunks/{cli-vkzp66cm.js → cli-wvctks7e.js} +1 -1
  195. package/dist/chunks/{cli-er7z496e.js → cli-wznsj6nb.js} +1 -1
  196. package/dist/chunks/{cli-msgx4pnp.js → cli-x9s7jxq5.js} +1 -1
  197. package/dist/chunks/{cli-grxvgq2n.js → cli-xqqnx8gk.js} +1 -1
  198. package/dist/chunks/{cli-rjerv816.js → cli-yaxs01at.js} +2 -2
  199. package/dist/chunks/{cli-fdya77ch.js → cli-yb5m6jwq.js} +3 -3
  200. package/dist/chunks/{cli-mzcsnm06.js → cli-yfb8bk69.js} +2 -2
  201. package/dist/chunks/{cli-rxb5q8zw.js → cli-yktdhy9p.js} +2 -2
  202. package/dist/chunks/{cli-4a4bb1kf.js → cli-yt4ezhhk.js} +1 -1
  203. package/dist/chunks/{cli-jgn9jprh.js → cli-yxsn8ang.js} +1 -1
  204. package/dist/chunks/{cli-350pymj4.js → cli-z02gsrtd.js} +2 -2
  205. package/dist/chunks/{cli-xmgm2573.js → cli-z2ewnqgr.js} +2 -2
  206. package/dist/chunks/{cli-r9db9mqv.js → cli-zqrzc3qx.js} +1 -1
  207. package/dist/chunks/{cli-wm8qb6j3.js → cli-zwn9x1p2.js} +1 -1
  208. package/dist/chunks/{cli-kq16afrr.js → cli-zxe1a0ey.js} +2 -2
  209. package/dist/chunks/client-qxx2ja27.js +2 -0
  210. package/dist/chunks/color-k1ew8kzn.js +2 -0
  211. package/dist/chunks/commitAttribution-nsa26sdx.js +2 -0
  212. package/dist/chunks/common-7t28qq0q.js +2 -0
  213. package/dist/chunks/{compact-zmvj1pk0.js → compact-kysg5kxd.js} +1 -1
  214. package/dist/chunks/config-d4kj5q8e.js +2 -0
  215. package/dist/chunks/{config-gj0gbg5g.js → config-txzzncm9.js} +1 -1
  216. package/dist/chunks/{context-h1qc69rg.js → context-aat04hqp.js} +1 -1
  217. package/dist/chunks/context-noninteractive-w54t6xnc.js +2 -0
  218. package/dist/chunks/conversation-brecqh0t.js +2 -0
  219. package/dist/chunks/{copy-76r9v46d.js → copy-zpvnnk85.js} +1 -1
  220. package/dist/chunks/cost-5fbyws6x.js +5 -0
  221. package/dist/chunks/createSession-hsp3x7vw.js +2 -0
  222. package/dist/chunks/desktop-7kdmxet0.js +2 -0
  223. package/dist/chunks/detectRepository-9xqead5f.js +2 -0
  224. package/dist/chunks/detection-z3cdks0s.js +2 -0
  225. package/dist/chunks/{devtools-10ba48t9.js → devtools-7jd4m7th.js} +1 -1
  226. package/dist/chunks/{diff-05xxjeqc.js → diff-xaw6ebj0.js} +1 -1
  227. package/dist/chunks/doctor-nbm4z0tx.js +2 -0
  228. package/dist/chunks/{earlyInput-navj6cdn.js → earlyInput-e8zh4d2d.js} +1 -1
  229. package/dist/chunks/{effort-a190c878.js → effort-bj5x7fcg.js} +1 -1
  230. package/dist/chunks/executor-e1744nra.js +2 -0
  231. package/dist/chunks/exit-894g29w2.js +2 -0
  232. package/dist/chunks/{export-ct4sty4d.js → export-tjrkechp.js} +1 -1
  233. package/dist/chunks/extra-usage-noninteractive-577ac873.js +2 -0
  234. package/dist/chunks/extra-usage-tfwmdc7z.js +2 -0
  235. package/dist/chunks/fast-1krm57mn.js +2 -0
  236. package/dist/chunks/feedback-2421cbpm.js +2 -0
  237. package/dist/chunks/{files-qrrrkjke.js → files-n3b22fs2.js} +1 -1
  238. package/dist/chunks/firstPartyEventLogger-1kwwcqdn.js +2 -0
  239. package/dist/chunks/gates-sd1cp8f2.js +2 -0
  240. package/dist/chunks/git-t6e9xdt2.js +2 -0
  241. package/dist/chunks/goal-0sxyk3va.js +2 -0
  242. package/dist/chunks/{growthbook-f7ag30hy.js → growthbook-4hx0kbpq.js} +1 -1
  243. package/dist/chunks/{heapdump-16gnh3zm.js → heapdump-2y7wcy1r.js} +1 -1
  244. package/dist/chunks/{help-rgcakcxe.js → help-a7mc9946.js} +1 -1
  245. package/dist/chunks/{hooks-c7fqwas5.js → hooks-22nm9hn0.js} +1 -1
  246. package/dist/chunks/hooks-tf9v5b0x.js +2 -0
  247. package/dist/chunks/{ide-q83qr9cn.js → ide-9x5zsk63.js} +1 -1
  248. package/dist/chunks/index-p1k4dhfc.js +2 -0
  249. package/dist/chunks/{initReplBridge-zfwxgpsm.js → initReplBridge-xjc6eaan.js} +1 -1
  250. package/dist/chunks/{ink-vkxsn90v.js → ink-9n8bszp5.js} +1 -1
  251. package/dist/chunks/{insights-4fwap4e5.js → insights-n7k1ty4n.js} +1 -1
  252. package/dist/chunks/{install-github-app-djzea7r4.js → install-github-app-zdsmjft8.js} +1 -1
  253. package/dist/chunks/{install-7nxzmgp5.js → install-rhzcmymh.js} +1 -1
  254. package/dist/chunks/install-slack-app-vhfe2dsf.js +2 -0
  255. package/dist/chunks/{instrumentation-223qqr23.js → instrumentation-5jjvsvke.js} +1 -1
  256. package/dist/chunks/keybindings-tqnmw7ng.js +3 -0
  257. package/dist/chunks/loadAgentsDir-j7pntb5v.js +2 -0
  258. package/dist/chunks/loadPluginHooks-sta7ra57.js +2 -0
  259. package/dist/chunks/login-j7x2fjw8.js +2 -0
  260. package/dist/chunks/logout-53bvwba1.js +2 -0
  261. package/dist/chunks/{main-0b8hyp8h.js → main-07p6q3f9.js} +13 -13
  262. package/dist/chunks/{mcp-fn4yrf5y.js → mcp-3mjagnnt.js} +1 -1
  263. package/dist/chunks/{mcp-9enw5a8j.js → mcp-yqhzespv.js} +1 -1
  264. package/dist/chunks/{mcp-yymqpmv6.js → mcp-yrt7dbxp.js} +3 -3
  265. package/dist/chunks/{mcpServer-85gt8ypc.js → mcpServer-f90a93nt.js} +1 -1
  266. package/dist/chunks/{mcpServer-60jg9v58.js → mcpServer-v1dy489g.js} +1 -1
  267. package/dist/chunks/{memory-kam5z1cw.js → memory-mdwb22wh.js} +1 -1
  268. package/dist/chunks/{mobile-7zsgawnb.js → mobile-j4jwvavn.js} +1 -1
  269. package/dist/chunks/{model-03987182.js → model-hz3nn362.js} +1 -1
  270. package/dist/chunks/{model-wbxx5kcd.js → model-tf1ne2j9.js} +1 -1
  271. package/dist/chunks/{oauth-y0p2y1w5.js → oauth-1b0qpxz4.js} +1 -1
  272. package/dist/chunks/{output-style-x148mzhn.js → output-style-t39s3jqx.js} +1 -1
  273. package/dist/chunks/parser-8venanpw.js +2 -0
  274. package/dist/chunks/{passes-jrmjk5zk.js → passes-s3fqswrg.js} +1 -1
  275. package/dist/chunks/{permissions-karmgb0m.js → permissions-a050zfqv.js} +1 -1
  276. package/dist/chunks/plan-gjaybyvb.js +2 -0
  277. package/dist/chunks/plugin-trf2388p.js +2 -0
  278. package/dist/chunks/pluginStartupCheck-wxmc7h98.js +2 -0
  279. package/dist/chunks/{plugins-vvf897b4.js → plugins-4py04yzf.js} +2 -2
  280. package/dist/chunks/{preauthorizedConfig-p02f23jb.js → preauthorizedConfig-hmxcgb8e.js} +1 -1
  281. package/dist/chunks/{print-krwpbp2j.js → print-pmzxgktf.js} +4 -4
  282. package/dist/chunks/privacy-settings-b2rz35r5.js +2 -0
  283. package/dist/chunks/process-n5355p53.js +2 -0
  284. package/dist/chunks/{processBashCommand-8fqgv2ec.js → processBashCommand-zkztsgn4.js} +1 -1
  285. package/dist/chunks/{processSlashCommand-q32wy80b.js → processSlashCommand-mfh1h592.js} +1 -1
  286. package/dist/chunks/prompt-2jyjhkwg.js +2 -0
  287. package/dist/chunks/prompt-b34a0h5z.js +2 -0
  288. package/dist/chunks/provider-prompt-qe4s2yzh.js +2 -0
  289. package/dist/chunks/{rate-limit-options-rd4rjfv5.js → rate-limit-options-kd432dap.js} +1 -1
  290. package/dist/chunks/registry-d7cd5dqg.js +2 -0
  291. package/dist/chunks/release-notes-rwgbn4pp.js +6 -0
  292. package/dist/chunks/reload-plugins-9axdwaaj.js +3 -0
  293. package/dist/chunks/{remote-env-nn9ngr99.js → remote-env-rg4k5em5.js} +1 -1
  294. package/dist/chunks/{remoteBridgeCore-cg7qd8m4.js → remoteBridgeCore-t980tt3v.js} +1 -1
  295. package/dist/chunks/rename-xap3rpbv.js +2 -0
  296. package/dist/chunks/{resume-4rvj8jbz.js → resume-3tc40yn9.js} +1 -1
  297. package/dist/chunks/{rewind-r4g5njsg.js → rewind-b6vg7dxs.js} +1 -1
  298. package/dist/chunks/sandbox-adapter-1z8xktva.js +2 -0
  299. package/dist/chunks/{sandbox-toggle-620bkz9q.js → sandbox-toggle-eke03mr8.js} +1 -1
  300. package/dist/chunks/{session-5vm1vwv1.js → session-53f3eza5.js} +1 -1
  301. package/dist/chunks/sessionFileAccessHooks-xscvsvqt.js +2 -0
  302. package/dist/chunks/{sessionStorage-ffkhmn5q.js → sessionStorage-rb63e8bn.js} +1 -1
  303. package/dist/chunks/settings-hp0ksjn9.js +2 -0
  304. package/dist/chunks/{setup-vegs56f5.js → setup-gravfzvg.js} +1 -1
  305. package/dist/chunks/setup-ssq8b1e6.js +2 -0
  306. package/dist/chunks/{setup-pf09nfsj.js → setup-z05dsr8q.js} +2 -2
  307. package/dist/chunks/sinks-agafqaxj.js +2 -0
  308. package/dist/chunks/{skills-evga8f7n.js → skills-41mfq71n.js} +1 -1
  309. package/dist/chunks/startupProfiler-wmf8nvfd.js +2 -0
  310. package/dist/chunks/state-rhxyy4qm.js +2 -0
  311. package/dist/chunks/{stats-mgqf6r7c.js → stats-7qg84dw1.js} +1 -1
  312. package/dist/chunks/status-sran2y9h.js +2 -0
  313. package/dist/chunks/stickers-hythmrsd.js +2 -0
  314. package/dist/chunks/subprocessEnv-b12dkzky.js +2 -0
  315. package/dist/chunks/{systemPromptSections-07y2z2wn.js → systemPromptSections-jxxyhnxe.js} +1 -1
  316. package/dist/chunks/{tag-gd73kstd.js → tag-58ndeaa9.js} +1 -1
  317. package/dist/chunks/tasks-52g28x72.js +2 -0
  318. package/dist/chunks/{teamHelpers-8ykc4bxa.js → teamHelpers-rxt9rvmd.js} +1 -1
  319. package/dist/chunks/teammateModeSnapshot-2782d4w9.js +2 -0
  320. package/dist/chunks/teleport-8gjys6yn.js +2 -0
  321. package/dist/chunks/terminalSetup-bbftxeqk.js +2 -0
  322. package/dist/chunks/theme-b38te5rz.js +2 -0
  323. package/dist/chunks/thinkback-05a9q24j.js +2 -0
  324. package/dist/chunks/thinkback-play-1nbagfm5.js +2 -0
  325. package/dist/chunks/toolSearch-7rnke366.js +2 -0
  326. package/dist/chunks/trustedDevice-2dn4981h.js +2 -0
  327. package/dist/chunks/{ultrareviewCommand-j23bjbf8.js → ultrareviewCommand-qwnsjdez.js} +1 -1
  328. package/dist/chunks/{update-w8wdxh3m.js → update-ney1krzn.js} +1 -1
  329. package/dist/chunks/upgrade-zxxxfq8c.js +2 -0
  330. package/dist/chunks/{upstreamproxy-x405ef9p.js → upstreamproxy-34wva0r5.js} +1 -1
  331. package/dist/chunks/usage-82ghrfb3.js +2 -0
  332. package/dist/chunks/util-xm9cs164.js +2 -0
  333. package/dist/chunks/utils-zs0ft181.js +2 -0
  334. package/dist/chunks/vim-6gxdrp1k.js +2 -0
  335. package/dist/chunks/worktree-xjxz4ndt.js +2 -0
  336. package/dist/chunks/worktreeModeEnabled-8ndm5yfs.js +2 -0
  337. package/dist/cli.js +1 -1
  338. package/package.json +1 -1
  339. package/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,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};
@@ -1,3 +1,3 @@
1
1
  // @bun
2
- import{fda as j}from"./cli-w1d8n9g3.js";import{randomUUID as Y}from"crypto";var w=()=>{};function l(){return b}function i(G){b=G}function n(G){return H.has(G)?H.get(G):void 0}function r(G,J){H.set(G,J)}function s(G){return q.get(G)}function a(G,J){q.set(G,J)}function y(){b=null,H.clear(),q.clear()}function o(){return F}function E(G){F=G}function t(){F=void 0}var b=null,H,q,F;var L=j(()=>{H=new Map;q=new Map});function O(){let G=new Set;return{subscribe(J){return G.add(J),()=>{G.delete(J)}},emit(...J){for(let Q of G)Q(...J)},clear(){G.clear()}}}var _=()=>{};import{realpathSync as h}from"fs";import z from"lodash-es/sumBy.js";import{cwd as m}from"process";function k(){let G="";if(typeof process<"u"&&typeof process.cwd==="function"&&typeof h==="function"){let Q=m();try{G=h(Q).normalize("NFC")}catch{G=Q.normalize("NFC")}}return{originalCwd:G,projectRoot:G,totalCostUSD:0,totalAPIDuration:0,totalAPIDurationWithoutRetries:0,totalToolDuration:0,turnHookDurationMs:0,turnToolDurationMs:0,turnClassifierDurationMs:0,turnToolCount:0,turnHookCount:0,turnClassifierCount:0,startTime:Date.now(),lastInteractionTime:Date.now(),totalLinesAdded:0,totalLinesRemoved:0,hasUnknownModelCost:!1,cwd:G,modelUsage:{},mainLoopModelOverride:void 0,initialMainLoopModel:null,modelStrings:null,isInteractive:!1,kairosActive:!1,strictToolResultPairing:!1,sdkAgentProgressSummariesEnabled:!1,userMsgOptIn:!1,clientType:"cli",sessionSource:void 0,questionPreviewFormat:void 0,sessionIngressToken:void 0,oauthTokenFromFd:void 0,apiKeyFromFd:void 0,flagSettingsPath:void 0,flagSettingsInline:null,allowedSettingSources:["userSettings","projectSettings","localSettings","flagSettings","policySettings"],meter:null,sessionCounter:null,locCounter:null,prCounter:null,commitCounter:null,costCounter:null,tokenCounter:null,codeEditToolDecisionCounter:null,activeTimeCounter:null,statsStore:null,sessionId:Y(),parentSessionId:void 0,loggerProvider:null,eventLogger:null,meterProvider:null,tracerProvider:null,agentColorMap:new Map,agentColorIndex:0,lastAPIRequest:null,lastAPIRequestMessages:null,lastClassifierRequests:null,cachedClaudeMdContent:null,inMemoryErrorLog:[],inlinePlugins:[],chromeFlagOverride:void 0,useCoworkPlugins:!1,sessionBypassPermissionsMode:!1,scheduledTasksEnabled:!1,sessionCronTasks:[],sessionCreatedTeams:new Set,sessionTrustAccepted:!1,sessionPersistenceDisabled:!1,hasExitedPlanMode:!1,needsPlanModeExitAttachment:!1,needsAutoModeExitAttachment:!1,lspRecommendationShownThisSession:!1,initJsonSchema:null,registeredHooks:null,planSlugCache:new Map,teleportedSessionInfo:null,invokedSkills:new Map,slowOperations:[],sdkBetas:void 0,mainThreadAgentType:void 0,isRemoteMode:!1,replBridgeActive:!1,directConnectServerUrl:void 0,systemPromptSectionCache:new Map,lastEmittedDate:null,additionalDirectoriesForClaudeMd:[],allowedChannels:[],hasDevChannels:!1,sessionProjectDir:null,promptCache1hAllowlist:null,promptCache1hEligible:null,afkModeHeaderLatched:null,fastModeHeaderLatched:null,cacheEditingHeaderLatched:null,thinkingClearLatched:null,promptId:null,lastMainRequestId:void 0,lastApiCompletionTimestamp:null,pendingPostCompaction:!1}}function Vx(){return x.sessionId}function Zx(G={}){if(G.setCurrentAsParent)x.parentSessionId=x.sessionId;return x.planSlugCache.delete(x.sessionId),x.sessionId=Y(),x.sessionProjectDir=null,x.sessionId}function $x(){return x.parentSessionId}function zx(G,J=null){x.planSlugCache.delete(x.sessionId),x.sessionId=G,x.sessionProjectDir=J,B.emit(G)}function Hx(){return x.sessionProjectDir}function Kx(){return x.originalCwd}function Xx(){return x.projectRoot}function Yx(G){x.originalCwd=G.normalize("NFC")}function bx(G){x.projectRoot=G.normalize("NFC")}function qx(){return x.cwd}function Fx(G){x.cwd=G.normalize("NFC")}function Ux(){return x.directConnectServerUrl}function Bx(G){x.directConnectServerUrl=G}function Wx(G,J){x.totalAPIDuration+=G,x.totalAPIDurationWithoutRetries+=J}function Nx(){x.totalAPIDuration=0,x.totalAPIDurationWithoutRetries=0,x.totalCostUSD=0}function fx(G,J,Q){x.modelUsage[Q]=J,x.totalCostUSD+=G}function Px(){return x.totalCostUSD}function Rx(){return x.totalAPIDuration}function wx(){return Date.now()-x.startTime}function yx(){return x.totalAPIDurationWithoutRetries}function Lx(){return x.totalToolDuration}function Ox(G){x.totalToolDuration+=G,x.turnToolDurationMs+=G,x.turnToolCount++}function _x(){return x.turnHookDurationMs}function hx(G){x.turnHookDurationMs+=G,x.turnHookCount++}function Dx(){x.turnHookDurationMs=0,x.turnHookCount=0}function Mx(){return x.turnHookCount}function kx(){return x.turnToolDurationMs}function Ix(){x.turnToolDurationMs=0,x.turnToolCount=0}function Cx(){return x.turnToolCount}function px(){return x.turnClassifierDurationMs}function gx(G){x.turnClassifierDurationMs+=G,x.turnClassifierCount++}function mx(){x.turnClassifierDurationMs=0,x.turnClassifierCount=0}function vx(){return x.turnClassifierCount}function cx(){return x.statsStore}function dx(G){x.statsStore=G}function ux(G){if(G)I();else W=!0}function lx(){if(W)I()}function I(){x.lastInteractionTime=Date.now(),W=!1}function ix(G,J){x.totalLinesAdded+=G,x.totalLinesRemoved+=J}function nx(){return x.totalLinesAdded}function rx(){return x.totalLinesRemoved}function sx(){return z(Object.values(x.modelUsage),"inputTokens")}function C(){return z(Object.values(x.modelUsage),"outputTokens")}function ax(){return z(Object.values(x.modelUsage),"cacheReadInputTokens")}function ox(){return z(Object.values(x.modelUsage),"cacheCreationInputTokens")}function Ex(){return z(Object.values(x.modelUsage),"webSearchRequests")}function tx(){return C()-N}function Ax(){return f}function Sx(G){N=C(),f=G,X=0}function ex(){return X}function Tx(){X++}function x0(){x.hasUnknownModelCost=!0}function G0(){return x.hasUnknownModelCost}function J0(){return x.lastMainRequestId}function Q0(G){x.lastMainRequestId=G}function V0(){return x.lastApiCompletionTimestamp}function Z0(G){x.lastApiCompletionTimestamp=G}function $0(){x.pendingPostCompaction=!0}function z0(){let G=x.pendingPostCompaction;return x.pendingPostCompaction=!1,G}function j0(){return x.lastInteractionTime}function H0(){if(K=!0,$)clearTimeout($);$=setTimeout(()=>{K=!1,$=void 0},p),$.unref?.()}function K0(){return K}async function X0(){while(K)await new Promise((G)=>setTimeout(G,p).unref?.())}function Y0(){return x.modelUsage}function b0(G){return x.modelUsage[G]}function q0(){return x.mainLoopModelOverride}function F0(){return x.initialMainLoopModel}function U0(G){x.mainLoopModelOverride=G}function B0(G){x.initialMainLoopModel=G}function W0(){return x.sdkBetas}function N0(G){x.sdkBetas=G}function f0(){x.totalCostUSD=0,x.totalAPIDuration=0,x.totalAPIDurationWithoutRetries=0,x.totalToolDuration=0,x.startTime=Date.now(),x.totalLinesAdded=0,x.totalLinesRemoved=0,x.hasUnknownModelCost=!1,x.modelUsage={},x.promptId=null}function P0({totalCostUSD:G,totalAPIDuration:J,totalAPIDurationWithoutRetries:Q,totalToolDuration:V,totalLinesAdded:Z,totalLinesRemoved:g,lastDuration:P,modelUsage:R}){if(x.totalCostUSD=G,x.totalAPIDuration=J,x.totalAPIDurationWithoutRetries=Q,x.totalToolDuration=V,x.totalLinesAdded=Z,x.totalLinesRemoved=g,R)x.modelUsage=R;if(P)x.startTime=Date.now()-P}function R0(){throw Error("resetStateForTests can only be called in tests")}function w0(){return x.modelStrings}function y0(G){x.modelStrings=G}function L0(){x.modelStrings=null}function O0(G,J){x.meter=G,x.sessionCounter=J("claude_code.session.count",{description:"Count of CLI sessions started"}),x.locCounter=J("claude_code.lines_of_code.count",{description:"Count of lines of code modified, with the 'type' attribute indicating whether lines were added or removed"}),x.prCounter=J("claude_code.pull_request.count",{description:"Number of pull requests created"}),x.commitCounter=J("claude_code.commit.count",{description:"Number of git commits created"}),x.costCounter=J("claude_code.cost.usage",{description:"Cost of the Claude Code session",unit:"USD"}),x.tokenCounter=J("claude_code.token.usage",{description:"Number of tokens used",unit:"tokens"}),x.codeEditToolDecisionCounter=J("claude_code.code_edit_tool.decision",{description:"Count of code editing tool permission decisions (accept/reject) for Edit, Write, and NotebookEdit tools"}),x.activeTimeCounter=J("claude_code.active_time.total",{description:"Total active time in seconds",unit:"s"})}function _0(){return x.meter}function h0(){return x.sessionCounter}function D0(){return x.locCounter}function M0(){return x.prCounter}function k0(){return x.commitCounter}function I0(){return x.costCounter}function C0(){return x.tokenCounter}function p0(){return x.codeEditToolDecisionCounter}function g0(){return x.activeTimeCounter}function m0(){return x.loggerProvider}function v0(G){x.loggerProvider=G}function c0(){return x.eventLogger}function d0(G){x.eventLogger=G}function u0(){return x.meterProvider}function l0(G){x.meterProvider=G}function i0(){return x.tracerProvider}function n0(G){x.tracerProvider=G}function v(){return!x.isInteractive}function r0(){return x.isInteractive}function s0(G){x.isInteractive=G}function a0(){return x.clientType}function o0(G){x.clientType=G}function E0(){return x.sdkAgentProgressSummariesEnabled}function t0(G){x.sdkAgentProgressSummariesEnabled=G}function A0(){return x.kairosActive}function S0(G){x.kairosActive=G}function e0(){return x.replBridgeActive}function T0(G){x.replBridgeActive=G}function x1(){return x.strictToolResultPairing}function G1(G){x.strictToolResultPairing=G}function J1(){return x.userMsgOptIn}function Q1(G){x.userMsgOptIn=G}function V1(){return x.sessionSource}function Z1(G){x.sessionSource=G}function $1(){return x.questionPreviewFormat}function z1(G){x.questionPreviewFormat=G}function j1(){return x.agentColorMap}function H1(){return x.flagSettingsPath}function K1(G){x.flagSettingsPath=G}function X1(){return x.flagSettingsInline}function Y1(G){x.flagSettingsInline=G}function b1(){return x.sessionIngressToken}function q1(G){x.sessionIngressToken=G}function F1(){return x.oauthTokenFromFd}function U1(G){x.oauthTokenFromFd=G}function B1(){return x.apiKeyFromFd}function W1(G){x.apiKeyFromFd=G}function N1(G){x.lastAPIRequest=G}function f1(){return x.lastAPIRequest}function P1(G){x.lastAPIRequestMessages=G}function R1(){return x.lastAPIRequestMessages}function w1(G){x.lastClassifierRequests=G}function y1(){return x.lastClassifierRequests}function L1(G){x.cachedClaudeMdContent=G}function O1(){return x.cachedClaudeMdContent}function _1(G){if(x.inMemoryErrorLog.length>=100)x.inMemoryErrorLog.shift();x.inMemoryErrorLog.push(G)}function h1(){return x.allowedSettingSources}function D1(G){x.allowedSettingSources=G}function M1(){return v()&&x.clientType!=="claude-vscode"}function k1(G){x.inlinePlugins=G}function I1(){return x.inlinePlugins}function C1(G){x.chromeFlagOverride=G}function p1(){return x.chromeFlagOverride}function g1(G){x.useCoworkPlugins=G,y()}function m1(){return x.useCoworkPlugins}function v1(G){x.sessionBypassPermissionsMode=G}function c1(){return x.sessionBypassPermissionsMode}function d1(G){x.scheduledTasksEnabled=G}function u1(){return x.scheduledTasksEnabled}function l1(){return x.sessionCronTasks}function i1(G){x.sessionCronTasks.push(G)}function n1(G){if(G.length===0)return 0;let J=new Set(G),Q=x.sessionCronTasks.filter((Z)=>!J.has(Z.id)),V=x.sessionCronTasks.length-Q.length;if(V===0)return 0;return x.sessionCronTasks=Q,V}function r1(G){x.sessionTrustAccepted=G}function s1(){return x.sessionTrustAccepted}function a1(G){x.sessionPersistenceDisabled=G}function o1(){return x.sessionPersistenceDisabled}function E1(){return x.hasExitedPlanMode}function t1(G){x.hasExitedPlanMode=G}function A1(){return x.needsPlanModeExitAttachment}function S1(G){x.needsPlanModeExitAttachment=G}function e1(G,J){if(J==="plan"&&G!=="plan")x.needsPlanModeExitAttachment=!1;if(G==="plan"&&J!=="plan")x.needsPlanModeExitAttachment=!0}function T1(){return x.needsAutoModeExitAttachment}function x2(G){x.needsAutoModeExitAttachment=G}function G2(G,J){if(G==="auto"&&J==="plan"||G==="plan"&&J==="auto")return;let Q=G==="auto",V=J==="auto";if(V&&!Q)x.needsAutoModeExitAttachment=!1;if(Q&&!V)x.needsAutoModeExitAttachment=!0}function J2(){return x.lspRecommendationShownThisSession}function Q2(G){x.lspRecommendationShownThisSession=G}function V2(G){x.initJsonSchema=G}function Z2(){return x.initJsonSchema}function $2(G){if(!x.registeredHooks)x.registeredHooks={};for(let[J,Q]of Object.entries(G)){let V=J;if(!x.registeredHooks[V])x.registeredHooks[V]=[];x.registeredHooks[V].push(...Q)}}function z2(){return x.registeredHooks}function j2(){x.registeredHooks=null}function H2(){if(!x.registeredHooks)return;let G={};for(let[J,Q]of Object.entries(x.registeredHooks)){let V=Q.filter((Z)=>!("pluginRoot"in Z));if(V.length>0)G[J]=V}x.registeredHooks=Object.keys(G).length>0?G:null}function K2(){x.initJsonSchema=null,x.registeredHooks=null}function X2(){return x.planSlugCache}function Y2(){return x.sessionCreatedTeams}function b2(G){x.teleportedSessionInfo={isTeleported:!0,hasLoggedFirstMessage:!1,sessionId:G.sessionId}}function q2(){return x.teleportedSessionInfo}function F2(){if(x.teleportedSessionInfo)x.teleportedSessionInfo.hasLoggedFirstMessage=!0}function U2(G,J,Q,V=null){let Z=`${V??""}:${G}`;x.invokedSkills.set(Z,{skillName:G,skillPath:J,content:Q,invokedAt:Date.now(),agentId:V})}function B2(){return x.invokedSkills}function W2(G){let J=G??null,Q=new Map;for(let[V,Z]of x.invokedSkills)if(Z.agentId===J)Q.set(V,Z);return Q}function N2(G){if(!G||G.size===0){x.invokedSkills.clear();return}for(let[J,Q]of x.invokedSkills)if(Q.agentId===null||!G.has(Q.agentId))x.invokedSkills.delete(J)}function f2(G){for(let[J,Q]of x.invokedSkills)if(Q.agentId===G)x.invokedSkills.delete(J)}function P2(G,J){if(process.env.USER_TYPE!=="ant")return;if(G.includes("exec")&&G.includes("claude-prompt-"))return;let Q=Date.now();if(x.slowOperations=x.slowOperations.filter((V)=>Q-V.timestamp<U),x.slowOperations.push({operation:G,durationMs:J,timestamp:Q}),x.slowOperations.length>D)x.slowOperations=x.slowOperations.slice(-D)}function R2(){if(x.slowOperations.length===0)return M;let G=Date.now();if(x.slowOperations.some((J)=>G-J.timestamp>=U)){if(x.slowOperations=x.slowOperations.filter((J)=>G-J.timestamp<U),x.slowOperations.length===0)return M}return x.slowOperations}function w2(){return x.mainThreadAgentType}function y2(G){x.mainThreadAgentType=G}function L2(){return x.isRemoteMode}function O2(G){x.isRemoteMode=G}function _2(){return x.systemPromptSectionCache}function h2(G,J){x.systemPromptSectionCache.set(G,J)}function D2(){x.systemPromptSectionCache.clear()}function M2(){return x.lastEmittedDate}function k2(G){x.lastEmittedDate=G}function I2(){return x.additionalDirectoriesForClaudeMd}function C2(G){x.additionalDirectoriesForClaudeMd=G}function p2(){return x.allowedChannels}function g2(G){x.allowedChannels=G}function m2(){return x.hasDevChannels}function v2(G){x.hasDevChannels=G}function c2(){return x.promptCache1hAllowlist}function d2(G){x.promptCache1hAllowlist=G}function u2(){return x.promptCache1hEligible}function l2(G){x.promptCache1hEligible=G}function i2(){return x.afkModeHeaderLatched}function n2(G){x.afkModeHeaderLatched=G}function r2(){return x.fastModeHeaderLatched}function s2(G){x.fastModeHeaderLatched=G}function a2(){return x.cacheEditingHeaderLatched}function o2(G){x.cacheEditingHeaderLatched=G}function E2(){return x.thinkingClearLatched}function t2(G){x.thinkingClearLatched=G}function A2(){x.afkModeHeaderLatched=null,x.fastModeHeaderLatched=null,x.cacheEditingHeaderLatched=null,x.thinkingClearLatched=null}function S2(){return x.promptId}function e2(G){x.promptId=G}var x,B,jx,W=!1,N=0,f=null,X=0,K=!1,$,p=150,D=10,U=1e4,M;var c=j(()=>{w();L();_();x=k();B=O(),jx=B.subscribe;M=[]});
3
- export{l as T_,i as U_,n as V_,r as W_,s as X_,a as Y_,y as Z_,o as __,E as $_,t as a$,L as b$,O as c$,_ as d$,Vx as e$,Zx as f$,$x as g$,zx as h$,jx as i$,Hx as j$,Kx as k$,Xx as l$,Yx as m$,bx as n$,qx as o$,Fx as p$,Ux as q$,Bx as r$,Wx as s$,Nx as t$,fx as u$,Px as v$,Rx as w$,wx as x$,yx as y$,Lx as z$,Ox as A$,_x as B$,hx as C$,Dx as D$,Mx as E$,kx as F$,Ix as G$,Cx as H$,px as I$,gx as J$,mx as K$,vx as L$,cx as M$,dx as N$,ux as O$,lx as P$,ix as Q$,nx as R$,rx as S$,sx as T$,C as U$,ax as V$,ox as W$,Ex as X$,tx as Y$,Ax as Z$,Sx as _$,ex as $$,Tx as aaa,x0 as baa,G0 as caa,J0 as daa,Q0 as eaa,V0 as faa,Z0 as gaa,$0 as haa,z0 as iaa,j0 as jaa,H0 as kaa,K0 as laa,X0 as maa,Y0 as naa,b0 as oaa,q0 as paa,F0 as qaa,U0 as raa,B0 as saa,W0 as taa,N0 as uaa,f0 as vaa,P0 as waa,R0 as xaa,w0 as yaa,y0 as zaa,L0 as Aaa,O0 as Baa,_0 as Caa,h0 as Daa,D0 as Eaa,M0 as Faa,k0 as Gaa,I0 as Haa,C0 as Iaa,p0 as Jaa,g0 as Kaa,m0 as Laa,v0 as Maa,c0 as Naa,d0 as Oaa,u0 as Paa,l0 as Qaa,i0 as Raa,n0 as Saa,v as Taa,r0 as Uaa,s0 as Vaa,a0 as Waa,o0 as Xaa,E0 as Yaa,t0 as Zaa,A0 as _aa,S0 as $aa,e0 as aba,T0 as bba,x1 as cba,G1 as dba,J1 as eba,Q1 as fba,V1 as gba,Z1 as hba,$1 as iba,z1 as jba,j1 as kba,H1 as lba,K1 as mba,X1 as nba,Y1 as oba,b1 as pba,q1 as qba,F1 as rba,U1 as sba,B1 as tba,W1 as uba,N1 as vba,f1 as wba,P1 as xba,R1 as yba,w1 as zba,y1 as Aba,L1 as Bba,O1 as Cba,_1 as Dba,h1 as Eba,D1 as Fba,M1 as Gba,k1 as Hba,I1 as Iba,C1 as Jba,p1 as Kba,g1 as Lba,m1 as Mba,v1 as Nba,c1 as Oba,d1 as Pba,u1 as Qba,l1 as Rba,i1 as Sba,n1 as Tba,r1 as Uba,s1 as Vba,a1 as Wba,o1 as Xba,E1 as Yba,t1 as Zba,A1 as _ba,S1 as $ba,e1 as aca,T1 as bca,x2 as cca,G2 as dca,J2 as eca,Q2 as fca,V2 as gca,Z2 as hca,$2 as ica,z2 as jca,j2 as kca,H2 as lca,K2 as mca,X2 as nca,Y2 as oca,b2 as pca,q2 as qca,F2 as rca,U2 as sca,B2 as tca,W2 as uca,N2 as vca,f2 as wca,P2 as xca,R2 as yca,w2 as zca,y2 as Aca,L2 as Bca,O2 as Cca,_2 as Dca,h2 as Eca,D2 as Fca,M2 as Gca,k2 as Hca,I2 as Ica,C2 as Jca,p2 as Kca,g2 as Lca,m2 as Mca,v2 as Nca,c2 as Oca,d2 as Pca,u2 as Qca,l2 as Rca,i2 as Sca,n2 as Tca,r2 as Uca,s2 as Vca,a2 as Wca,o2 as Xca,E2 as Yca,t2 as Zca,A2 as _ca,S2 as $ca,e2 as ada,c as bda};
2
+ import{hda as j}from"./cli-qwx84m9c.js";import{randomUUID as Y}from"crypto";var w=()=>{};function l(){return b}function i(G){b=G}function n(G){return H.has(G)?H.get(G):void 0}function r(G,J){H.set(G,J)}function s(G){return q.get(G)}function a(G,J){q.set(G,J)}function y(){b=null,H.clear(),q.clear()}function o(){return F}function E(G){F=G}function t(){F=void 0}var b=null,H,q,F;var L=j(()=>{H=new Map;q=new Map});function O(){let G=new Set;return{subscribe(J){return G.add(J),()=>{G.delete(J)}},emit(...J){for(let Q of G)Q(...J)},clear(){G.clear()}}}var _=()=>{};import{realpathSync as h}from"fs";import z from"lodash-es/sumBy.js";import{cwd as m}from"process";function k(){let G="";if(typeof process<"u"&&typeof process.cwd==="function"&&typeof h==="function"){let Q=m();try{G=h(Q).normalize("NFC")}catch{G=Q.normalize("NFC")}}return{originalCwd:G,projectRoot:G,totalCostUSD:0,totalAPIDuration:0,totalAPIDurationWithoutRetries:0,totalToolDuration:0,turnHookDurationMs:0,turnToolDurationMs:0,turnClassifierDurationMs:0,turnToolCount:0,turnHookCount:0,turnClassifierCount:0,startTime:Date.now(),lastInteractionTime:Date.now(),totalLinesAdded:0,totalLinesRemoved:0,hasUnknownModelCost:!1,cwd:G,modelUsage:{},mainLoopModelOverride:void 0,initialMainLoopModel:null,modelStrings:null,isInteractive:!1,kairosActive:!1,strictToolResultPairing:!1,sdkAgentProgressSummariesEnabled:!1,userMsgOptIn:!1,clientType:"cli",sessionSource:void 0,questionPreviewFormat:void 0,sessionIngressToken:void 0,oauthTokenFromFd:void 0,apiKeyFromFd:void 0,flagSettingsPath:void 0,flagSettingsInline:null,allowedSettingSources:["userSettings","projectSettings","localSettings","flagSettings","policySettings"],meter:null,sessionCounter:null,locCounter:null,prCounter:null,commitCounter:null,costCounter:null,tokenCounter:null,codeEditToolDecisionCounter:null,activeTimeCounter:null,statsStore:null,sessionId:Y(),parentSessionId:void 0,loggerProvider:null,eventLogger:null,meterProvider:null,tracerProvider:null,agentColorMap:new Map,agentColorIndex:0,lastAPIRequest:null,lastAPIRequestMessages:null,lastClassifierRequests:null,cachedClaudeMdContent:null,inMemoryErrorLog:[],inlinePlugins:[],chromeFlagOverride:void 0,useCoworkPlugins:!1,sessionBypassPermissionsMode:!1,scheduledTasksEnabled:!1,sessionCronTasks:[],sessionCreatedTeams:new Set,sessionTrustAccepted:!1,sessionPersistenceDisabled:!1,hasExitedPlanMode:!1,needsPlanModeExitAttachment:!1,needsAutoModeExitAttachment:!1,lspRecommendationShownThisSession:!1,initJsonSchema:null,registeredHooks:null,planSlugCache:new Map,teleportedSessionInfo:null,invokedSkills:new Map,slowOperations:[],sdkBetas:void 0,mainThreadAgentType:void 0,isRemoteMode:!1,replBridgeActive:!1,directConnectServerUrl:void 0,systemPromptSectionCache:new Map,lastEmittedDate:null,additionalDirectoriesForClaudeMd:[],allowedChannels:[],hasDevChannels:!1,sessionProjectDir:null,promptCache1hAllowlist:null,promptCache1hEligible:null,afkModeHeaderLatched:null,fastModeHeaderLatched:null,cacheEditingHeaderLatched:null,thinkingClearLatched:null,promptId:null,lastMainRequestId:void 0,lastApiCompletionTimestamp:null,pendingPostCompaction:!1}}function Vx(){return x.sessionId}function Zx(G={}){if(G.setCurrentAsParent)x.parentSessionId=x.sessionId;return x.planSlugCache.delete(x.sessionId),x.sessionId=Y(),x.sessionProjectDir=null,x.sessionId}function $x(){return x.parentSessionId}function zx(G,J=null){x.planSlugCache.delete(x.sessionId),x.sessionId=G,x.sessionProjectDir=J,B.emit(G)}function Hx(){return x.sessionProjectDir}function Kx(){return x.originalCwd}function Xx(){return x.projectRoot}function Yx(G){x.originalCwd=G.normalize("NFC")}function bx(G){x.projectRoot=G.normalize("NFC")}function qx(){return x.cwd}function Fx(G){x.cwd=G.normalize("NFC")}function Ux(){return x.directConnectServerUrl}function Bx(G){x.directConnectServerUrl=G}function Wx(G,J){x.totalAPIDuration+=G,x.totalAPIDurationWithoutRetries+=J}function Nx(){x.totalAPIDuration=0,x.totalAPIDurationWithoutRetries=0,x.totalCostUSD=0}function fx(G,J,Q){x.modelUsage[Q]=J,x.totalCostUSD+=G}function Px(){return x.totalCostUSD}function Rx(){return x.totalAPIDuration}function wx(){return Date.now()-x.startTime}function yx(){return x.totalAPIDurationWithoutRetries}function Lx(){return x.totalToolDuration}function Ox(G){x.totalToolDuration+=G,x.turnToolDurationMs+=G,x.turnToolCount++}function _x(){return x.turnHookDurationMs}function hx(G){x.turnHookDurationMs+=G,x.turnHookCount++}function Dx(){x.turnHookDurationMs=0,x.turnHookCount=0}function Mx(){return x.turnHookCount}function kx(){return x.turnToolDurationMs}function Ix(){x.turnToolDurationMs=0,x.turnToolCount=0}function Cx(){return x.turnToolCount}function px(){return x.turnClassifierDurationMs}function gx(G){x.turnClassifierDurationMs+=G,x.turnClassifierCount++}function mx(){x.turnClassifierDurationMs=0,x.turnClassifierCount=0}function vx(){return x.turnClassifierCount}function cx(){return x.statsStore}function dx(G){x.statsStore=G}function ux(G){if(G)I();else W=!0}function lx(){if(W)I()}function I(){x.lastInteractionTime=Date.now(),W=!1}function ix(G,J){x.totalLinesAdded+=G,x.totalLinesRemoved+=J}function nx(){return x.totalLinesAdded}function rx(){return x.totalLinesRemoved}function sx(){return z(Object.values(x.modelUsage),"inputTokens")}function C(){return z(Object.values(x.modelUsage),"outputTokens")}function ax(){return z(Object.values(x.modelUsage),"cacheReadInputTokens")}function ox(){return z(Object.values(x.modelUsage),"cacheCreationInputTokens")}function Ex(){return z(Object.values(x.modelUsage),"webSearchRequests")}function tx(){return C()-N}function Ax(){return f}function Sx(G){N=C(),f=G,X=0}function ex(){return X}function Tx(){X++}function x0(){x.hasUnknownModelCost=!0}function G0(){return x.hasUnknownModelCost}function J0(){return x.lastMainRequestId}function Q0(G){x.lastMainRequestId=G}function V0(){return x.lastApiCompletionTimestamp}function Z0(G){x.lastApiCompletionTimestamp=G}function $0(){x.pendingPostCompaction=!0}function z0(){let G=x.pendingPostCompaction;return x.pendingPostCompaction=!1,G}function j0(){return x.lastInteractionTime}function H0(){if(K=!0,$)clearTimeout($);$=setTimeout(()=>{K=!1,$=void 0},p),$.unref?.()}function K0(){return K}async function X0(){while(K)await new Promise((G)=>setTimeout(G,p).unref?.())}function Y0(){return x.modelUsage}function b0(G){return x.modelUsage[G]}function q0(){return x.mainLoopModelOverride}function F0(){return x.initialMainLoopModel}function U0(G){x.mainLoopModelOverride=G}function B0(G){x.initialMainLoopModel=G}function W0(){return x.sdkBetas}function N0(G){x.sdkBetas=G}function f0(){x.totalCostUSD=0,x.totalAPIDuration=0,x.totalAPIDurationWithoutRetries=0,x.totalToolDuration=0,x.startTime=Date.now(),x.totalLinesAdded=0,x.totalLinesRemoved=0,x.hasUnknownModelCost=!1,x.modelUsage={},x.promptId=null}function P0({totalCostUSD:G,totalAPIDuration:J,totalAPIDurationWithoutRetries:Q,totalToolDuration:V,totalLinesAdded:Z,totalLinesRemoved:g,lastDuration:P,modelUsage:R}){if(x.totalCostUSD=G,x.totalAPIDuration=J,x.totalAPIDurationWithoutRetries=Q,x.totalToolDuration=V,x.totalLinesAdded=Z,x.totalLinesRemoved=g,R)x.modelUsage=R;if(P)x.startTime=Date.now()-P}function R0(){throw Error("resetStateForTests can only be called in tests")}function w0(){return x.modelStrings}function y0(G){x.modelStrings=G}function L0(){x.modelStrings=null}function O0(G,J){x.meter=G,x.sessionCounter=J("claude_code.session.count",{description:"Count of CLI sessions started"}),x.locCounter=J("claude_code.lines_of_code.count",{description:"Count of lines of code modified, with the 'type' attribute indicating whether lines were added or removed"}),x.prCounter=J("claude_code.pull_request.count",{description:"Number of pull requests created"}),x.commitCounter=J("claude_code.commit.count",{description:"Number of git commits created"}),x.costCounter=J("claude_code.cost.usage",{description:"Cost of the Claude Code session",unit:"USD"}),x.tokenCounter=J("claude_code.token.usage",{description:"Number of tokens used",unit:"tokens"}),x.codeEditToolDecisionCounter=J("claude_code.code_edit_tool.decision",{description:"Count of code editing tool permission decisions (accept/reject) for Edit, Write, and NotebookEdit tools"}),x.activeTimeCounter=J("claude_code.active_time.total",{description:"Total active time in seconds",unit:"s"})}function _0(){return x.meter}function h0(){return x.sessionCounter}function D0(){return x.locCounter}function M0(){return x.prCounter}function k0(){return x.commitCounter}function I0(){return x.costCounter}function C0(){return x.tokenCounter}function p0(){return x.codeEditToolDecisionCounter}function g0(){return x.activeTimeCounter}function m0(){return x.loggerProvider}function v0(G){x.loggerProvider=G}function c0(){return x.eventLogger}function d0(G){x.eventLogger=G}function u0(){return x.meterProvider}function l0(G){x.meterProvider=G}function i0(){return x.tracerProvider}function n0(G){x.tracerProvider=G}function v(){return!x.isInteractive}function r0(){return x.isInteractive}function s0(G){x.isInteractive=G}function a0(){return x.clientType}function o0(G){x.clientType=G}function E0(){return x.sdkAgentProgressSummariesEnabled}function t0(G){x.sdkAgentProgressSummariesEnabled=G}function A0(){return x.kairosActive}function S0(G){x.kairosActive=G}function e0(){return x.replBridgeActive}function T0(G){x.replBridgeActive=G}function x1(){return x.strictToolResultPairing}function G1(G){x.strictToolResultPairing=G}function J1(){return x.userMsgOptIn}function Q1(G){x.userMsgOptIn=G}function V1(){return x.sessionSource}function Z1(G){x.sessionSource=G}function $1(){return x.questionPreviewFormat}function z1(G){x.questionPreviewFormat=G}function j1(){return x.agentColorMap}function H1(){return x.flagSettingsPath}function K1(G){x.flagSettingsPath=G}function X1(){return x.flagSettingsInline}function Y1(G){x.flagSettingsInline=G}function b1(){return x.sessionIngressToken}function q1(G){x.sessionIngressToken=G}function F1(){return x.oauthTokenFromFd}function U1(G){x.oauthTokenFromFd=G}function B1(){return x.apiKeyFromFd}function W1(G){x.apiKeyFromFd=G}function N1(G){x.lastAPIRequest=G}function f1(){return x.lastAPIRequest}function P1(G){x.lastAPIRequestMessages=G}function R1(){return x.lastAPIRequestMessages}function w1(G){x.lastClassifierRequests=G}function y1(){return x.lastClassifierRequests}function L1(G){x.cachedClaudeMdContent=G}function O1(){return x.cachedClaudeMdContent}function _1(G){if(x.inMemoryErrorLog.length>=100)x.inMemoryErrorLog.shift();x.inMemoryErrorLog.push(G)}function h1(){return x.allowedSettingSources}function D1(G){x.allowedSettingSources=G}function M1(){return v()&&x.clientType!=="claude-vscode"}function k1(G){x.inlinePlugins=G}function I1(){return x.inlinePlugins}function C1(G){x.chromeFlagOverride=G}function p1(){return x.chromeFlagOverride}function g1(G){x.useCoworkPlugins=G,y()}function m1(){return x.useCoworkPlugins}function v1(G){x.sessionBypassPermissionsMode=G}function c1(){return x.sessionBypassPermissionsMode}function d1(G){x.scheduledTasksEnabled=G}function u1(){return x.scheduledTasksEnabled}function l1(){return x.sessionCronTasks}function i1(G){x.sessionCronTasks.push(G)}function n1(G){if(G.length===0)return 0;let J=new Set(G),Q=x.sessionCronTasks.filter((Z)=>!J.has(Z.id)),V=x.sessionCronTasks.length-Q.length;if(V===0)return 0;return x.sessionCronTasks=Q,V}function r1(G){x.sessionTrustAccepted=G}function s1(){return x.sessionTrustAccepted}function a1(G){x.sessionPersistenceDisabled=G}function o1(){return x.sessionPersistenceDisabled}function E1(){return x.hasExitedPlanMode}function t1(G){x.hasExitedPlanMode=G}function A1(){return x.needsPlanModeExitAttachment}function S1(G){x.needsPlanModeExitAttachment=G}function e1(G,J){if(J==="plan"&&G!=="plan")x.needsPlanModeExitAttachment=!1;if(G==="plan"&&J!=="plan")x.needsPlanModeExitAttachment=!0}function T1(){return x.needsAutoModeExitAttachment}function x2(G){x.needsAutoModeExitAttachment=G}function G2(G,J){if(G==="auto"&&J==="plan"||G==="plan"&&J==="auto")return;let Q=G==="auto",V=J==="auto";if(V&&!Q)x.needsAutoModeExitAttachment=!1;if(Q&&!V)x.needsAutoModeExitAttachment=!0}function J2(){return x.lspRecommendationShownThisSession}function Q2(G){x.lspRecommendationShownThisSession=G}function V2(G){x.initJsonSchema=G}function Z2(){return x.initJsonSchema}function $2(G){if(!x.registeredHooks)x.registeredHooks={};for(let[J,Q]of Object.entries(G)){let V=J;if(!x.registeredHooks[V])x.registeredHooks[V]=[];x.registeredHooks[V].push(...Q)}}function z2(){return x.registeredHooks}function j2(){x.registeredHooks=null}function H2(){if(!x.registeredHooks)return;let G={};for(let[J,Q]of Object.entries(x.registeredHooks)){let V=Q.filter((Z)=>!("pluginRoot"in Z));if(V.length>0)G[J]=V}x.registeredHooks=Object.keys(G).length>0?G:null}function K2(){x.initJsonSchema=null,x.registeredHooks=null}function X2(){return x.planSlugCache}function Y2(){return x.sessionCreatedTeams}function b2(G){x.teleportedSessionInfo={isTeleported:!0,hasLoggedFirstMessage:!1,sessionId:G.sessionId}}function q2(){return x.teleportedSessionInfo}function F2(){if(x.teleportedSessionInfo)x.teleportedSessionInfo.hasLoggedFirstMessage=!0}function U2(G,J,Q,V=null){let Z=`${V??""}:${G}`;x.invokedSkills.set(Z,{skillName:G,skillPath:J,content:Q,invokedAt:Date.now(),agentId:V})}function B2(){return x.invokedSkills}function W2(G){let J=G??null,Q=new Map;for(let[V,Z]of x.invokedSkills)if(Z.agentId===J)Q.set(V,Z);return Q}function N2(G){if(!G||G.size===0){x.invokedSkills.clear();return}for(let[J,Q]of x.invokedSkills)if(Q.agentId===null||!G.has(Q.agentId))x.invokedSkills.delete(J)}function f2(G){for(let[J,Q]of x.invokedSkills)if(Q.agentId===G)x.invokedSkills.delete(J)}function P2(G,J){if(process.env.USER_TYPE!=="ant")return;if(G.includes("exec")&&G.includes("claude-prompt-"))return;let Q=Date.now();if(x.slowOperations=x.slowOperations.filter((V)=>Q-V.timestamp<U),x.slowOperations.push({operation:G,durationMs:J,timestamp:Q}),x.slowOperations.length>D)x.slowOperations=x.slowOperations.slice(-D)}function R2(){if(x.slowOperations.length===0)return M;let G=Date.now();if(x.slowOperations.some((J)=>G-J.timestamp>=U)){if(x.slowOperations=x.slowOperations.filter((J)=>G-J.timestamp<U),x.slowOperations.length===0)return M}return x.slowOperations}function w2(){return x.mainThreadAgentType}function y2(G){x.mainThreadAgentType=G}function L2(){return x.isRemoteMode}function O2(G){x.isRemoteMode=G}function _2(){return x.systemPromptSectionCache}function h2(G,J){x.systemPromptSectionCache.set(G,J)}function D2(){x.systemPromptSectionCache.clear()}function M2(){return x.lastEmittedDate}function k2(G){x.lastEmittedDate=G}function I2(){return x.additionalDirectoriesForClaudeMd}function C2(G){x.additionalDirectoriesForClaudeMd=G}function p2(){return x.allowedChannels}function g2(G){x.allowedChannels=G}function m2(){return x.hasDevChannels}function v2(G){x.hasDevChannels=G}function c2(){return x.promptCache1hAllowlist}function d2(G){x.promptCache1hAllowlist=G}function u2(){return x.promptCache1hEligible}function l2(G){x.promptCache1hEligible=G}function i2(){return x.afkModeHeaderLatched}function n2(G){x.afkModeHeaderLatched=G}function r2(){return x.fastModeHeaderLatched}function s2(G){x.fastModeHeaderLatched=G}function a2(){return x.cacheEditingHeaderLatched}function o2(G){x.cacheEditingHeaderLatched=G}function E2(){return x.thinkingClearLatched}function t2(G){x.thinkingClearLatched=G}function A2(){x.afkModeHeaderLatched=null,x.fastModeHeaderLatched=null,x.cacheEditingHeaderLatched=null,x.thinkingClearLatched=null}function S2(){return x.promptId}function e2(G){x.promptId=G}var x,B,jx,W=!1,N=0,f=null,X=0,K=!1,$,p=150,D=10,U=1e4,M;var c=j(()=>{w();L();_();x=k();B=O(),jx=B.subscribe;M=[]});
3
+ export{l as V_,i as W_,n as X_,r as Y_,s as Z_,a as __,y as $_,o as a$,E as b$,t as c$,L as d$,O as e$,_ as f$,Vx as g$,Zx as h$,$x as i$,zx as j$,jx as k$,Hx as l$,Kx as m$,Xx as n$,Yx as o$,bx as p$,qx as q$,Fx as r$,Ux as s$,Bx as t$,Wx as u$,Nx as v$,fx as w$,Px as x$,Rx as y$,wx as z$,yx as A$,Lx as B$,Ox as C$,_x as D$,hx as E$,Dx as F$,Mx as G$,kx as H$,Ix as I$,Cx as J$,px as K$,gx as L$,mx as M$,vx as N$,cx as O$,dx as P$,ux as Q$,lx as R$,ix as S$,nx as T$,rx as U$,sx as V$,C as W$,ax as X$,ox as Y$,Ex as Z$,tx as _$,Ax as $$,Sx as aaa,ex as baa,Tx as caa,x0 as daa,G0 as eaa,J0 as faa,Q0 as gaa,V0 as haa,Z0 as iaa,$0 as jaa,z0 as kaa,j0 as laa,H0 as maa,K0 as naa,X0 as oaa,Y0 as paa,b0 as qaa,q0 as raa,F0 as saa,U0 as taa,B0 as uaa,W0 as vaa,N0 as waa,f0 as xaa,P0 as yaa,R0 as zaa,w0 as Aaa,y0 as Baa,L0 as Caa,O0 as Daa,_0 as Eaa,h0 as Faa,D0 as Gaa,M0 as Haa,k0 as Iaa,I0 as Jaa,C0 as Kaa,p0 as Laa,g0 as Maa,m0 as Naa,v0 as Oaa,c0 as Paa,d0 as Qaa,u0 as Raa,l0 as Saa,i0 as Taa,n0 as Uaa,v as Vaa,r0 as Waa,s0 as Xaa,a0 as Yaa,o0 as Zaa,E0 as _aa,t0 as $aa,A0 as aba,S0 as bba,e0 as cba,T0 as dba,x1 as eba,G1 as fba,J1 as gba,Q1 as hba,V1 as iba,Z1 as jba,$1 as kba,z1 as lba,j1 as mba,H1 as nba,K1 as oba,X1 as pba,Y1 as qba,b1 as rba,q1 as sba,F1 as tba,U1 as uba,B1 as vba,W1 as wba,N1 as xba,f1 as yba,P1 as zba,R1 as Aba,w1 as Bba,y1 as Cba,L1 as Dba,O1 as Eba,_1 as Fba,h1 as Gba,D1 as Hba,M1 as Iba,k1 as Jba,I1 as Kba,C1 as Lba,p1 as Mba,g1 as Nba,m1 as Oba,v1 as Pba,c1 as Qba,d1 as Rba,u1 as Sba,l1 as Tba,i1 as Uba,n1 as Vba,r1 as Wba,s1 as Xba,a1 as Yba,o1 as Zba,E1 as _ba,t1 as $ba,A1 as aca,S1 as bca,e1 as cca,T1 as dca,x2 as eca,G2 as fca,J2 as gca,Q2 as hca,V2 as ica,Z2 as jca,$2 as kca,z2 as lca,j2 as mca,H2 as nca,K2 as oca,X2 as pca,Y2 as qca,b2 as rca,q2 as sca,F2 as tca,U2 as uca,B2 as vca,W2 as wca,N2 as xca,f2 as yca,P2 as zca,R2 as Aca,w2 as Bca,y2 as Cca,L2 as Dca,O2 as Eca,_2 as Fca,h2 as Gca,D2 as Hca,M2 as Ica,k2 as Jca,I2 as Kca,C2 as Lca,p2 as Mca,g2 as Nca,m2 as Oca,v2 as Pca,c2 as Qca,d2 as Rca,u2 as Sca,l2 as Tca,i2 as Uca,n2 as Vca,r2 as Wca,s2 as Xca,a2 as Yca,o2 as Zca,E2 as _ca,t2 as $ca,A2 as ada,S2 as bda,e2 as cda,c as dda};
@@ -1,5 +1,5 @@
1
1
  // @bun
2
- import{nR as X,rR as S}from"./cli-v9f860t5.js";import{Q3 as b,u3 as B,x3 as O}from"./cli-msmzt4c3.js";import{A8 as y,E8 as w,J8 as P,x8 as H}from"./cli-4ewb3q42.js";import{W9 as k,b_ as p}from"./cli-hke6r0q8.js";import{F_ as I,S_ as M}from"./cli-tq5z9qv3.js";import{Taa as W,bda as f}from"./cli-3ac555qw.js";import{fda as A}from"./cli-w1d8n9g3.js";import E from"axios";import{mkdir as _,readFile as d,writeFile as F}from"fs/promises";import{dirname as G,join as N}from"path";import{coerce as U}from"semver";function T(){return N(I(),"cache","changelog.md")}async function qq(){let J=O();if(!J.cachedChangelog)return;let q=T();try{await _(G(q),{recursive:!0}),await F(q,J.cachedChangelog,{encoding:"utf-8",flag:"wx"})}catch{}B(({cachedChangelog:Y,...z})=>z)}async function m(){if(W())return;if(H())return;let J=await E.get(V);if(J.status===200){let q=J.data;if(q===$)return;let Y=T();await _(G(Y),{recursive:!0}),await F(Y,q,{encoding:"utf-8"}),$=q;let z=Date.now();B((K)=>({...K,changelogLastFetched:z}))}}async function v(){if($!==null)return $;let J=T();try{let q=await d(J,"utf-8");return $=q,q}catch{return $="",""}}function j(){return $??""}function L(J){try{if(!J)return{};let q={},Y=J.split(/^## /gm).slice(1);for(let z of Y){let K=z.trim().split(`
2
+ import{nR as X,rR as S}from"./cli-brr3bnrj.js";import{Q3 as b,u3 as B,x3 as O}from"./cli-192xnkcx.js";import{C8 as y,G8 as w,L8 as P,z8 as H}from"./cli-8kpqq0ea.js";import{Y9 as k,d_ as p}from"./cli-awb77t95.js";import{H_ as I,U_ as M}from"./cli-q8zmmp6z.js";import{Vaa as W,dda as f}from"./cli-tafg3e9w.js";import{hda as A}from"./cli-qwx84m9c.js";import E from"axios";import{mkdir as _,readFile as d,writeFile as F}from"fs/promises";import{dirname as G,join as N}from"path";import{coerce as U}from"semver";function T(){return N(I(),"cache","changelog.md")}async function qq(){let J=O();if(!J.cachedChangelog)return;let q=T();try{await _(G(q),{recursive:!0}),await F(q,J.cachedChangelog,{encoding:"utf-8",flag:"wx"})}catch{}B(({cachedChangelog:Y,...z})=>z)}async function m(){if(W())return;if(H())return;let J=await E.get(V);if(J.status===200){let q=J.data;if(q===$)return;let Y=T();await _(G(Y),{recursive:!0}),await F(Y,q,{encoding:"utf-8"}),$=q;let z=Date.now();B((K)=>({...K,changelogLastFetched:z}))}}async function v(){if($!==null)return $;let J=T();try{let q=await d(J,"utf-8");return $=q,q}catch{return $="",""}}function j(){return $??""}function L(J){try{if(!J)return{};let q={},Y=J.split(/^## /gm).slice(1);for(let z of Y){let K=z.trim().split(`
3
3
  `);if(K.length===0)continue;let Q=K[0];if(!Q)continue;let Z=Q.split(" - ")[0]?.trim()||"";if(!Z)continue;let D=K.slice(1).filter((x)=>x.trim().startsWith("- ")).map((x)=>x.trim().substring(2).trim()).filter(Boolean);if(D.length>0)q[Z]=D}return q}catch(q){return w(k(q)),{}}}function R(J,q,Y=j()){try{let z=L(Y),K=U(J),Q=q?U(q):null;if(!Q||K&&X(K.version,Q.version))return Object.entries(z).filter(([Z])=>!Q||X(Z,Q.version)).sort(([Z],[D])=>X(Z,D)?-1:1).flatMap(([Z,D])=>D).filter(Boolean).slice(0,u)}catch(z){return w(k(z)),[]}return[]}function zq(J=j()){try{let q=L(J);return Object.keys(q).sort((z,K)=>X(z,K)?1:-1).map((z)=>{let K=q[z];if(!K||K.length===0)return null;let Q=K.filter(Boolean);if(Q.length===0)return null;return[z,Q]}).filter((z)=>z!==null)}catch(q){return w(k(q)),[]}}async function Jq(J,q=MACRO.VERSION){if(process.env.USER_TYPE==="ant"){let Q=MACRO.VERSION_CHANGELOG;if(Q){let Z=Q.trim().split(`
4
4
  `).filter(Boolean);return{hasReleaseNotes:Z.length>0,releaseNotes:Z}}return{hasReleaseNotes:!1,releaseNotes:[]}}let Y=await v();if(J!==q||!Y)m().catch((Q)=>w(k(Q)));let z=R(q,J,Y);return{hasReleaseNotes:z.length>0,releaseNotes:z}}function Kq(J,q=MACRO.VERSION){if(process.env.USER_TYPE==="ant"){let z=MACRO.VERSION_CHANGELOG;if(z){let K=z.trim().split(`
5
5
  `).filter(Boolean);return{hasReleaseNotes:K.length>0,releaseNotes:K}}return{hasReleaseNotes:!1,releaseNotes:[]}}let Y=R(q,J);return{hasReleaseNotes:Y.length>0,releaseNotes:Y}}var u=5,e="https://github.com/anthropics/claude-code/blob/main/CHANGELOG.md",V="https://raw.githubusercontent.com/anthropics/claude-code/refs/heads/main/CHANGELOG.md",$=null;var C=A(()=>{f();b();M();p();P();y();S()});
@@ -1,3 +1,3 @@
1
1
  // @bun
2
- import{$R as y,dS as V}from"./cli-wt2bfbn0.js";import{G7 as p,I7 as K}from"./cli-p0vh69b9.js";import{q9 as q,s9 as Q}from"./cli-jj93qmmc.js";import{fda as J}from"./cli-w1d8n9g3.js";function j(){return!!z}async function D(){if(b!==null)return b;return b=!!z,b}function P(){return W||null}async function w(){return(await p(y,["-V"])).code===0}function E(){if(f!==null)return f;let k=process.env.TERM_PROGRAM,B=!!process.env.ITERM_SESSION_ID,H=q.terminal==="iTerm.app";return f=k==="iTerm.app"||B||H,f}async function F(){return(await p(Y,["session","list"])).code===0}function G(){b=null,f=null}var z,W,b=null,f=null,Y="it2";var Z=J(()=>{Q();K();V();z=process.env.TMUX,W=process.env.TMUX_PANE});
2
+ import{$R as y,dS as V}from"./cli-a25jeqs8.js";import{I7 as p,K7 as K}from"./cli-7wxv39ry.js";import{s9 as q,u9 as Q}from"./cli-5ajcy93q.js";import{hda as J}from"./cli-qwx84m9c.js";function j(){return!!z}async function D(){if(b!==null)return b;return b=!!z,b}function P(){return W||null}async function w(){return(await p(y,["-V"])).code===0}function E(){if(f!==null)return f;let k=process.env.TERM_PROGRAM,B=!!process.env.ITERM_SESSION_ID,H=q.terminal==="iTerm.app";return f=k==="iTerm.app"||B||H,f}async function F(){return(await p(Y,["session","list"])).code===0}function G(){b=null,f=null}var z,W,b=null,f=null,Y="it2";var Z=J(()=>{Q();K();V();z=process.env.TMUX,W=process.env.TMUX_PANE});
3
3
  export{j as PR,D as QR,P as RR,w as SR,E as TR,Y as UR,F as VR,G as WR,Z as XR};
@@ -1,5 +1,5 @@
1
1
  // @bun
2
- import{Tb as Ef,Zb as Y8}from"./cli-9z9r2set.js";import{AF as z6,Ap as MK,BF as hK,Bg as sq,Bu as HK,CA as zf,DF as n8,Dg as Pf,Dp as S8,EA as jK,Eg as Z6,Ep as Sq,Fp as M8,Gu as o8,HA as I8,Ku as Jq,Lm as gf,Lu as Bq,Mm as O8,Nw as Vf,Pk as Zq,Qw as V6,Rw as F6,Sw as J6,Tw as v6,Uw as B6,VE as hf,Vw as U6,Wm as zK,Ww as Q6,Xm as c8,Ym as h6,Yw as iq,Zk as RK,Zm as CK,Zw as gq,_w as X6,aj as Iq,av as Yf,bj as g6,bt as tq,bv as eK,cJ as tf,ct as Nf,dt as rq,et as wf,fJ as d8,gJ as c6,hA as Uq,hJ as AK,jA as vf,ki as Gf,ni as FK,oE as jf,oq as pf,oz as YK,pq as BK,pz as V8,rE as If,sv as of,tA as _f,tv as H8,uA as lK,uG as t6,um as nq,vE as nf,vG as dK,wm as DK,zA as vK}from"./cli-me4e2p3e.js";import{QL as OK,RL as L8,SL as a,TL as Tq,WL as wq,XL as mq,YL as t,ZL as $q}from"./cli-xfsqvp8r.js";import{EO as P6,FO as sf,TO as Yq,UO as dq}from"./cli-akcxtvv9.js";import{DQ as N,FQ as M,JQ as K6,TQ as Af,fR as Hq,kP as Fq}from"./cli-x8xgga1a.js";import{YR as m6,dS as g8}from"./cli-wt2bfbn0.js";import{fS as o6,pS as pK}from"./cli-br6zjh6x.js";import{FU as Mq,FV as Lf,GU as Gq,GV as Sf,JV as _8,LU as Eq,Q2 as s6,VW as e6,WV as _q,WW as mK,a3 as $K,cW as u6}from"./cli-msmzt4c3.js";import{c4 as _K,d4 as pq,f4 as y6}from"./cli-s6vr7213.js";import{B5 as r6,C5 as z8}from"./cli-k4v08k8t.js";import{D5 as Y6,E5 as GK}from"./cli-pgg33dhw.js";import{a6 as yq,d6 as uq,f6 as ef,h6 as f6,i6 as eq,p6 as Cq}from"./cli-51720d82.js";import{E8 as l6,J8 as TK}from"./cli-4ewb3q42.js";import{Y8 as Pq,Z8 as C6}from"./cli-t9jht3kb.js";import{X9 as Dq,b_ as a6,n_ as lf,p_ as k8,v_ as Rq,y_ as S6}from"./cli-hke6r0q8.js";import{dda as uK,fda as fq}from"./cli-w1d8n9g3.js";function Vq(K){return typeof K==="object"&&K!==null&&"type"in K&&K.type==="local_agent"}function O6(K){return{...K,retain:!1,messages:void 0,diskLoaded:!1,evictAfter:c6(K.status)?Date.now()+ZK:void 0}}function M6(K,q){Pq("tengu_transcript_view_enter",{}),q((f)=>{let P=f.tasks[K],_=f.viewingAgentTaskId,w=_!==void 0?f.tasks[_]:void 0,O=_!==void 0&&_!==K&&Vq(w)&&w.retain,z=Vq(P)&&(!P.retain||P.evictAfter!==void 0),Y=f.viewingAgentTaskId!==K||f.viewSelectionMode!=="viewing-agent";if(!z&&!Y&&!O)return f;let v=f.tasks;if(O||z){if(v={...f.tasks},O)v[_]=O6(w);if(z)v[K]={...P,retain:!0,evictAfter:void 0}}return{...f,viewingAgentTaskId:K,viewSelectionMode:"viewing-agent",tasks:v}})}function H6(K){Pq("tengu_transcript_view_exit",{}),K((q)=>{let f=q.viewingAgentTaskId,P={...q,viewingAgentTaskId:void 0,viewSelectionMode:"none"};if(f===void 0)return q.viewSelectionMode==="none"?q:P;let _=q.tasks[f];if(!Vq(_)||!_.retain)return P;return{...P,tasks:{...q.tasks,[f]:O6(_)}}})}function PP(K,q){q((f)=>{let P=f.tasks[K];if(!Vq(P))return f;if(P.status==="running")return P.abortController?.abort(),f;if(P.evictAfter===0)return f;let _=f.viewingAgentTaskId===K;return{...f,tasks:{...f.tasks,[K]:{...O6(P),evictAfter:0}},..._&&{viewingAgentTaskId:void 0,viewSelectionMode:"none"}}})}var ZK=30000;var d6=fq(()=>{C6();AK()});class I6{exitPlanCalls=[];results=new Map;rejectedIds=new Set;terminated=null;rescanAfterRejection=!1;everSeenPending=!1;get rejectCount(){return this.rejectedIds.size}get hasPendingPlan(){let K=this.exitPlanCalls.findLast((q)=>!this.rejectedIds.has(q));return K!==void 0&&!this.results.has(K)}ingest(K){for(let P of K)if(P.type==="assistant")for(let _ of P.message.content){if(_.type!=="tool_use")continue;let w=_;if(w.name===Iq)this.exitPlanCalls.push(w.id)}else if(P.type==="user"){let _=P.message.content;if(!Array.isArray(_))continue;for(let w of _)if(w.type==="tool_result")this.results.set(w.tool_use_id,w)}else if(P.type==="result"&&P.subtype!=="success")this.terminated={subtype:P.subtype};let q=K.length>0||this.rescanAfterRejection;this.rescanAfterRejection=!1;let f=null;if(q){for(let P=this.exitPlanCalls.length-1;P>=0;P--){let _=this.exitPlanCalls[P];if(this.rejectedIds.has(_))continue;let w=this.results.get(_);if(!w)f={kind:"pending"};else if(w.is_error===!0){let O=bK(w.content);f=O!==null?{kind:"teleport",plan:O}:{kind:"rejected",id:_}}else f={kind:"approved",plan:NK(w.content)};break}if(f?.kind==="approved"||f?.kind==="teleport")return f}if(f?.kind==="rejected")this.rejectedIds.add(f.id),this.rescanAfterRejection=!0;if(this.terminated)return{kind:"terminated",subtype:this.terminated.subtype};if(f?.kind==="rejected")return f;if(f?.kind==="pending")return this.everSeenPending=!0,f;return{kind:"unchanged"}}}async function n6(K,q,f,P){let _=Date.now()+q,w=new I6,O=null,z=0,Y="running";while(Date.now()<_){if(P?.())throw new hq("poll stopped by caller","stopped",w.rejectCount);let v,h;try{let X=await V6(K,O);v=X.newEvents,O=X.lastEventId,h=X.sessionStatus,z=0}catch(X){if(!o6(X)||++z>=yK)throw new hq(X instanceof Error?X.message:String(X),"network_or_unknown",w.rejectCount,{cause:X});await Y6(L6);continue}let j;try{j=w.ingest(v)}catch(X){throw new hq(X instanceof Error?X.message:String(X),"extract_marker_missing",w.rejectCount)}if(j.kind==="approved")return{plan:j.plan,rejectCount:w.rejectCount,executionTarget:"remote"};if(j.kind==="teleport")return{plan:j.plan,rejectCount:w.rejectCount,executionTarget:"local"};if(j.kind==="terminated")throw new hq(`remote session ended (${j.subtype}) before plan approval`,"terminated",w.rejectCount);let J=(h==="idle"||h==="requires_action")&&v.length===0,Z=w.hasPendingPlan?"plan_ready":J?"needs_input":"running";if(Z!==Y)Rq(`[ultraplan] phase ${Y} \u2192 ${Z}`),Y=Z,f?.(Z);await Y6(L6)}throw new hq(w.everSeenPending?`no approval after ${q/1000}s`:`ExitPlanMode never reached after ${q/1000}s (the remote container failed to start, or session ID mismatch?)`,w.everSeenPending?"timeout_pending":"timeout_no_plan",w.rejectCount)}function E6(K){return typeof K==="string"?K:Array.isArray(K)?K.map((q)=>("text"in q)?q.text:"").join(""):""}function bK(K){let q=E6(K),f=`${kK}
2
+ import{Tb as Ef,Zb as Y8}from"./cli-m6amgxq3.js";import{AF as z6,Ap as MK,BF as hK,Bg as sq,Bu as HK,CA as zf,DF as n8,Dg as Pf,Dp as S8,EA as jK,Eg as Z6,Ep as Sq,Fp as M8,Gu as o8,HA as I8,Ku as Jq,Lm as gf,Lu as Bq,Mm as O8,Nw as Vf,Pk as Zq,Qw as V6,Rw as F6,Sw as J6,Tw as v6,Uw as B6,VE as hf,Vw as U6,Wm as zK,Ww as Q6,Xm as c8,Ym as h6,Yw as iq,Zk as RK,Zm as CK,Zw as gq,_w as X6,aj as Iq,av as Yf,bj as g6,bt as tq,bv as eK,cJ as tf,ct as Nf,dt as rq,et as wf,fJ as d8,gJ as c6,hA as Uq,hJ as AK,jA as vf,ki as Gf,ni as FK,oE as jf,oq as pf,oz as YK,pq as BK,pz as V8,rE as If,sv as of,tA as _f,tv as H8,uA as lK,uG as t6,um as nq,vE as nf,vG as dK,wm as DK,zA as vK}from"./cli-b3k8arn1.js";import{QL as OK,RL as L8,SL as a,TL as Tq,WL as wq,XL as mq,YL as t,ZL as $q}from"./cli-4pwyex04.js";import{EO as P6,FO as sf,TO as Yq,UO as dq}from"./cli-8jym9hp6.js";import{DQ as N,FQ as M,JQ as K6,TQ as Af,fR as Hq,kP as Fq}from"./cli-a2d962bq.js";import{YR as m6,dS as g8}from"./cli-a25jeqs8.js";import{fS as o6,pS as pK}from"./cli-ceas97gw.js";import{FU as Mq,FV as Lf,GU as Gq,GV as Sf,JV as _8,LU as Eq,Q2 as s6,VW as e6,WV as _q,WW as mK,a3 as $K,cW as u6}from"./cli-192xnkcx.js";import{c4 as _K,d4 as pq,f4 as y6}from"./cli-r43jhzwm.js";import{B5 as r6,C5 as z8}from"./cli-an97yxg9.js";import{D5 as Y6,E5 as GK}from"./cli-hpxspent.js";import{c6 as yq,f6 as uq,h6 as ef,j6 as f6,k6 as eq,r6 as Cq}from"./cli-bdgrtpsy.js";import{G8 as l6,L8 as TK}from"./cli-8kpqq0ea.js";import{$8 as C6,_8 as Pq}from"./cli-e5yek4vx.js";import{A_ as S6,Z9 as Dq,d_ as a6,p_ as lf,r_ as k8,x_ as Rq}from"./cli-awb77t95.js";import{fda as uK,hda as fq}from"./cli-qwx84m9c.js";function Vq(K){return typeof K==="object"&&K!==null&&"type"in K&&K.type==="local_agent"}function O6(K){return{...K,retain:!1,messages:void 0,diskLoaded:!1,evictAfter:c6(K.status)?Date.now()+ZK:void 0}}function M6(K,q){Pq("tengu_transcript_view_enter",{}),q((f)=>{let P=f.tasks[K],_=f.viewingAgentTaskId,w=_!==void 0?f.tasks[_]:void 0,O=_!==void 0&&_!==K&&Vq(w)&&w.retain,z=Vq(P)&&(!P.retain||P.evictAfter!==void 0),Y=f.viewingAgentTaskId!==K||f.viewSelectionMode!=="viewing-agent";if(!z&&!Y&&!O)return f;let v=f.tasks;if(O||z){if(v={...f.tasks},O)v[_]=O6(w);if(z)v[K]={...P,retain:!0,evictAfter:void 0}}return{...f,viewingAgentTaskId:K,viewSelectionMode:"viewing-agent",tasks:v}})}function H6(K){Pq("tengu_transcript_view_exit",{}),K((q)=>{let f=q.viewingAgentTaskId,P={...q,viewingAgentTaskId:void 0,viewSelectionMode:"none"};if(f===void 0)return q.viewSelectionMode==="none"?q:P;let _=q.tasks[f];if(!Vq(_)||!_.retain)return P;return{...P,tasks:{...q.tasks,[f]:O6(_)}}})}function PP(K,q){q((f)=>{let P=f.tasks[K];if(!Vq(P))return f;if(P.status==="running")return P.abortController?.abort(),f;if(P.evictAfter===0)return f;let _=f.viewingAgentTaskId===K;return{...f,tasks:{...f.tasks,[K]:{...O6(P),evictAfter:0}},..._&&{viewingAgentTaskId:void 0,viewSelectionMode:"none"}}})}var ZK=30000;var d6=fq(()=>{C6();AK()});class I6{exitPlanCalls=[];results=new Map;rejectedIds=new Set;terminated=null;rescanAfterRejection=!1;everSeenPending=!1;get rejectCount(){return this.rejectedIds.size}get hasPendingPlan(){let K=this.exitPlanCalls.findLast((q)=>!this.rejectedIds.has(q));return K!==void 0&&!this.results.has(K)}ingest(K){for(let P of K)if(P.type==="assistant")for(let _ of P.message.content){if(_.type!=="tool_use")continue;let w=_;if(w.name===Iq)this.exitPlanCalls.push(w.id)}else if(P.type==="user"){let _=P.message.content;if(!Array.isArray(_))continue;for(let w of _)if(w.type==="tool_result")this.results.set(w.tool_use_id,w)}else if(P.type==="result"&&P.subtype!=="success")this.terminated={subtype:P.subtype};let q=K.length>0||this.rescanAfterRejection;this.rescanAfterRejection=!1;let f=null;if(q){for(let P=this.exitPlanCalls.length-1;P>=0;P--){let _=this.exitPlanCalls[P];if(this.rejectedIds.has(_))continue;let w=this.results.get(_);if(!w)f={kind:"pending"};else if(w.is_error===!0){let O=bK(w.content);f=O!==null?{kind:"teleport",plan:O}:{kind:"rejected",id:_}}else f={kind:"approved",plan:NK(w.content)};break}if(f?.kind==="approved"||f?.kind==="teleport")return f}if(f?.kind==="rejected")this.rejectedIds.add(f.id),this.rescanAfterRejection=!0;if(this.terminated)return{kind:"terminated",subtype:this.terminated.subtype};if(f?.kind==="rejected")return f;if(f?.kind==="pending")return this.everSeenPending=!0,f;return{kind:"unchanged"}}}async function n6(K,q,f,P){let _=Date.now()+q,w=new I6,O=null,z=0,Y="running";while(Date.now()<_){if(P?.())throw new hq("poll stopped by caller","stopped",w.rejectCount);let v,h;try{let X=await V6(K,O);v=X.newEvents,O=X.lastEventId,h=X.sessionStatus,z=0}catch(X){if(!o6(X)||++z>=yK)throw new hq(X instanceof Error?X.message:String(X),"network_or_unknown",w.rejectCount,{cause:X});await Y6(L6);continue}let j;try{j=w.ingest(v)}catch(X){throw new hq(X instanceof Error?X.message:String(X),"extract_marker_missing",w.rejectCount)}if(j.kind==="approved")return{plan:j.plan,rejectCount:w.rejectCount,executionTarget:"remote"};if(j.kind==="teleport")return{plan:j.plan,rejectCount:w.rejectCount,executionTarget:"local"};if(j.kind==="terminated")throw new hq(`remote session ended (${j.subtype}) before plan approval`,"terminated",w.rejectCount);let J=(h==="idle"||h==="requires_action")&&v.length===0,Z=w.hasPendingPlan?"plan_ready":J?"needs_input":"running";if(Z!==Y)Rq(`[ultraplan] phase ${Y} \u2192 ${Z}`),Y=Z,f?.(Z);await Y6(L6)}throw new hq(w.everSeenPending?`no approval after ${q/1000}s`:`ExitPlanMode never reached after ${q/1000}s (the remote container failed to start, or session ID mismatch?)`,w.everSeenPending?"timeout_pending":"timeout_no_plan",w.rejectCount)}function E6(K){return typeof K==="string"?K:Array.isArray(K)?K.map((q)=>("text"in q)?q.text:"").join(""):""}function bK(K){let q=E6(K),f=`${kK}
3
3
  `,P=q.indexOf(f);if(P===-1)return null;return q.slice(P+f.length).trimEnd()}function NK(K){let q=E6(K),f=[`## Approved Plan (edited by user):
4
4
  `,`## Approved Plan:
5
5
  `];for(let P of f){let _=q.indexOf(P);if(_!==-1)return q.slice(_+P.length).trimEnd()}throw Error(`ExitPlanMode approved but tool_result has no "## Approved Plan:" marker \u2014 remote may have hit the empty-plan or isAgent branch. Content preview: ${q.slice(0,200)}`)}var L6=3000,yK=5,hq,kK="__ULTRAPLAN_TELEPORT_LOCAL__";var i6=fq(()=>{g6();S6();GK();pK();v6();hq=class hq extends Error{reason;rejectCount;constructor(K,q,f,P){super(K,P);this.reason=q;this.rejectCount=f;this.name="UltraplanPollError"}}});var x6=uK((vP,rK)=>{rK.exports=`You are a planning assistant.