@unieai/code 0.0.10 → 0.0.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (485) hide show
  1. package/README.en.md +6 -59
  2. package/README.md +5 -59
  3. package/dist/chunks/App-s5ex5j86.js +2 -0
  4. package/dist/chunks/ApproveApiKey-b4z6h2gn.js +2 -0
  5. package/dist/chunks/{assistant-yvtpv5sv.js → AssistantSessionChooser-g1vsya6h.js} +1 -1
  6. package/dist/chunks/BypassPermissionsModeDialog-jbg97eja.js +2 -0
  7. package/dist/chunks/ClaudeInChromeOnboarding-qa0pvwfw.js +2 -0
  8. package/dist/chunks/ClaudeMdExternalIncludesDialog-gqmed78y.js +2 -0
  9. package/dist/chunks/ConsoleOAuthFlow-yh72vs8j.js +2 -0
  10. package/dist/chunks/{DiffDialog-v8smgzpd.js → DiffDialog-t6vvtbb2.js} +1 -1
  11. package/dist/chunks/Doctor-k08ggw2j.js +2 -0
  12. package/dist/chunks/Grove-tkkskg8n.js +2 -0
  13. package/dist/chunks/ITermBackend-73waaahf.js +2 -0
  14. package/dist/chunks/{InProcessTransport-57c2w5v4.js → InProcessTransport-qwjgb17j.js} +1 -1
  15. package/dist/chunks/InvalidConfigDialog-zmqw3fj1.js +2 -0
  16. package/dist/chunks/InvalidSettingsDialog-tnd5hymg.js +2 -0
  17. package/dist/chunks/Onboarding-p0tq6pgz.js +2 -0
  18. package/dist/chunks/REPL-hjjz80kq.js +2 -0
  19. package/dist/chunks/ResumeConversation-krn9hqb1.js +2 -0
  20. package/dist/chunks/{SnapshotUpdateDialog-5yvfnp0q.js → SnapshotUpdateDialog-raq029pd.js} +1 -1
  21. package/dist/chunks/TeleportProgress-vyy2k3bv.js +2 -0
  22. package/dist/chunks/TeleportRepoMismatchDialog-ff0h2cnq.js +2 -0
  23. package/dist/chunks/TeleportResumeWrapper-esjykret.js +2 -0
  24. package/dist/chunks/{TmuxBackend-j665sv6f.js → TmuxBackend-14kmnkcb.js} +1 -1
  25. package/dist/chunks/ToolSearchTool-w4t61c7d.js +2 -0
  26. package/dist/chunks/TrustDialog-7fvaze2x.js +2 -0
  27. package/dist/chunks/TungstenTool-rv96z549.js +2 -0
  28. package/dist/chunks/add-dir-kqw72mky.js +2 -0
  29. package/dist/chunks/agents-3exybgtb.js +4 -0
  30. package/dist/chunks/{agents-e7x38q37.js → agents-z66twpqr.js} +1 -1
  31. package/dist/chunks/ant-claude-for-chrome-mcp-712xg07f.js +2 -0
  32. package/dist/chunks/api-z8svc3xt.js +2 -0
  33. package/dist/chunks/asciicast-vzd7qjbb.js +2 -0
  34. package/dist/chunks/{AssistantSessionChooser-0r5zamt1.js → assistant-ftzr3mjp.js} +1 -1
  35. package/dist/chunks/auth-gbyfq0g2.js +2 -0
  36. package/dist/chunks/auth-wk077awh.js +2 -0
  37. package/dist/chunks/backgroundHousekeeping-m8gthtkh.js +2 -0
  38. package/dist/chunks/branch-1d0b8590.js +5 -0
  39. package/dist/chunks/{bridgePointer-9q6wh2ct.js → bridgePointer-vhd47np6.js} +1 -1
  40. package/dist/chunks/btw-s3r5jhyd.js +2 -0
  41. package/dist/chunks/buddy-xzm5npk8.js +2 -0
  42. package/dist/chunks/{cachedMicrocompact-thnhx1zt.js → cachedMicrocompact-6j3zxr4g.js} +1 -1
  43. package/dist/chunks/caches-fbggdeq7.js +2 -0
  44. package/dist/chunks/chrome-mdyx0s5j.js +2 -0
  45. package/dist/chunks/{chromeNativeHost-nnjkj164.js → chromeNativeHost-8wc6wcr6.js} +1 -1
  46. package/dist/chunks/{claudeDesktop-nsangyk5.js → claudeDesktop-p5bfxmvz.js} +1 -1
  47. package/dist/chunks/{cleanup-mv462dsh.js → cleanup-q46nbce1.js} +1 -1
  48. package/dist/chunks/clear-fwad6zxy.js +2 -0
  49. package/dist/chunks/{cli-sbp2221d.js → cli-0dc8sd37.js} +2 -2
  50. package/dist/chunks/{cli-3xhqacdd.js → cli-0qt9btbe.js} +2 -2
  51. package/dist/chunks/{cli-4j5yyvek.js → cli-0w4wc1z0.js} +2 -2
  52. package/dist/chunks/{cli-r6hm1q63.js → cli-15sqp3mq.js} +2 -2
  53. package/dist/chunks/{cli-45ftgn85.js → cli-15w3eaed.js} +1 -1
  54. package/dist/chunks/{cli-b7wx1479.js → cli-19ncan36.js} +1 -1
  55. package/dist/chunks/{cli-hx28w3cq.js → cli-1jp3rm7n.js} +1 -1
  56. package/dist/chunks/{cli-90b87f45.js → cli-1n8he7s8.js} +2 -2
  57. package/dist/chunks/{cli-bthzmdgv.js → cli-1ny2386w.js} +2 -2
  58. package/dist/chunks/{cli-vq899n8p.js → cli-27mzrnr8.js} +1 -1
  59. package/dist/chunks/{cli-gnjff7md.js → cli-2rw44zfx.js} +2 -2
  60. package/dist/chunks/{cli-7gpep1x5.js → cli-2rwjx3w0.js} +1 -1
  61. package/dist/chunks/{cli-jqppy97b.js → cli-2wd8eaac.js} +2 -2
  62. package/dist/chunks/{cli-3hwpymrd.js → cli-350pymj4.js} +2 -2
  63. package/dist/chunks/{cli-w754xmyv.js → cli-3ac555qw.js} +2 -2
  64. package/dist/chunks/{cli-8kyjh67j.js → cli-3gwqrmcd.js} +1 -1
  65. package/dist/chunks/{cli-msr9n6da.js → cli-3m8n808e.js} +2 -2
  66. package/dist/chunks/{cli-ptv3h2tx.js → cli-42kma5r3.js} +1 -1
  67. package/dist/chunks/{cli-r9p0g894.js → cli-49m97nbg.js} +2 -2
  68. package/dist/chunks/{cli-bkxwwj81.js → cli-4a4bb1kf.js} +1 -1
  69. package/dist/chunks/{cli-3bxtq5dc.js → cli-4ewb3q42.js} +2 -2
  70. package/dist/chunks/{cli-v3mf1g0z.js → cli-4mvvtchx.js} +2 -2
  71. package/dist/chunks/{cli-r2p5bkx5.js → cli-4nejhkd0.js} +2 -2
  72. package/dist/chunks/{cli-dx46fn1w.js → cli-51720d82.js} +2 -2
  73. package/dist/chunks/cli-55jdp9ky.js +3 -0
  74. package/dist/chunks/{cli-6vwdnz9p.js → cli-55ntywtj.js} +1 -1
  75. package/dist/chunks/{cli-pz8vxqw0.js → cli-57yrpnaq.js} +2 -2
  76. package/dist/chunks/{cli-59ysj9y4.js → cli-5dt9yjha.js} +2 -2
  77. package/dist/chunks/{cli-e37w9dxm.js → cli-5f0w3fy6.js} +1 -1
  78. package/dist/chunks/{cli-z9jm4xjn.js → cli-5vsnhp97.js} +2 -2
  79. package/dist/chunks/{cli-x758qvv7.js → cli-61x73ksv.js} +1 -1
  80. package/dist/chunks/{cli-ye3qk73s.js → cli-66jj9zj3.js} +1 -1
  81. package/dist/chunks/{cli-zac1afnb.js → cli-6bxfdgv1.js} +1 -1
  82. package/dist/chunks/{cli-md1h6sbv.js → cli-6pdpyz1a.js} +1 -1
  83. package/dist/chunks/{cli-mejr8b5m.js → cli-6yprtw88.js} +2 -2
  84. package/dist/chunks/{cli-qs0v3mf6.js → cli-73jf8hyz.js} +2 -2
  85. package/dist/chunks/{cli-948we41z.js → cli-749tdaqc.js} +2 -2
  86. package/dist/chunks/{cli-vxxkrd5y.js → cli-764c4bsm.js} +2 -2
  87. package/dist/chunks/cli-78apjp3t.js +3 -0
  88. package/dist/chunks/{cli-k0jpcxwa.js → cli-7c99j0pt.js} +2 -2
  89. package/dist/chunks/{cli-by5b2216.js → cli-89x414pj.js} +2 -2
  90. package/dist/chunks/{cli-fqb71hy3.js → cli-8dmy2s42.js} +1 -1
  91. package/dist/chunks/cli-8hxz2qs6.js +3 -0
  92. package/dist/chunks/cli-8mk2zg4a.js +4 -0
  93. package/dist/chunks/{cli-29gcax34.js → cli-8qd16mt4.js} +2 -2
  94. package/dist/chunks/cli-95wg48h9.js +3 -0
  95. package/dist/chunks/{cli-wz9r5s81.js → cli-99mqr54v.js} +2 -2
  96. package/dist/chunks/{cli-8qk46mt3.js → cli-9aq7vxaq.js} +1 -1
  97. package/dist/chunks/{cli-zcpjf07m.js → cli-9z9r2set.js} +2 -2
  98. package/dist/chunks/{cli-2wvsym16.js → cli-a52ra30v.js} +1 -1
  99. package/dist/chunks/{cli-s6qk3rbv.js → cli-akcxtvv9.js} +2 -2
  100. package/dist/chunks/{cli-h3kcprht.js → cli-bmk0rb5v.js} +2 -2
  101. package/dist/chunks/{cli-pmzht94n.js → cli-br6zjh6x.js} +2 -2
  102. package/dist/chunks/{cli-z8hqtyjg.js → cli-c22wpdk4.js} +1 -1
  103. package/dist/chunks/{cli-zbt28krs.js → cli-c60c9qvm.js} +1 -1
  104. package/dist/chunks/{cli-3357rxva.js → cli-cqkne34j.js} +2 -2
  105. package/dist/chunks/{cli-0s65jzgr.js → cli-cwbxhdt1.js} +1 -1
  106. package/dist/chunks/{cli-xsap3gxj.js → cli-d0hzw78c.js} +1 -1
  107. package/dist/chunks/{cli-0b4dmvvw.js → cli-d53fhs6v.js} +2 -2
  108. package/dist/chunks/{cli-extf4h54.js → cli-dbdqrqmt.js} +1 -1
  109. package/dist/chunks/{cli-yf3sh3aw.js → cli-de1hwp88.js} +1 -1
  110. package/dist/chunks/cli-edkqs0ge.js +3 -0
  111. package/dist/chunks/{cli-dsnjsvqs.js → cli-er7z496e.js} +2 -2
  112. package/dist/chunks/{cli-atpfeg28.js → cli-eyw3czmn.js} +2 -2
  113. package/dist/chunks/{cli-tyxvdf66.js → cli-ezs5sney.js} +2 -2
  114. package/dist/chunks/{cli-tn47e131.js → cli-f63fdj4w.js} +2 -2
  115. package/dist/chunks/cli-fakdskp6.js +3 -0
  116. package/dist/chunks/{cli-nj726gac.js → cli-fdya77ch.js} +3 -3
  117. package/dist/chunks/{cli-b1dptek2.js → cli-fghyxar5.js} +2 -2
  118. package/dist/chunks/{cli-g1spmn9n.js → cli-fm14mg07.js} +1 -1
  119. package/dist/chunks/{cli-cr1hvkmz.js → cli-fs7yttfp.js} +2 -2
  120. package/dist/chunks/{cli-rcvta3zk.js → cli-fwrj8ybs.js} +2 -2
  121. package/dist/chunks/{cli-v77avvvk.js → cli-g4n9das2.js} +1 -1
  122. package/dist/chunks/{cli-cbdrqqf2.js → cli-g5wq5ptg.js} +2 -2
  123. package/dist/chunks/{cli-yrk194b9.js → cli-gq5fve62.js} +1 -1
  124. package/dist/chunks/{cli-nykt265k.js → cli-grxvgq2n.js} +1 -1
  125. package/dist/chunks/{cli-ffjjv4j8.js → cli-gtm212j6.js} +2 -2
  126. package/dist/chunks/{cli-skq9ktf8.js → cli-gxgdnjfn.js} +1 -1
  127. package/dist/chunks/{cli-x5z5m6y7.js → cli-h120wpk2.js} +1 -1
  128. package/dist/chunks/{cli-58t6a5n6.js → cli-h4a90xbh.js} +1 -1
  129. package/dist/chunks/cli-h4dspaac.js +3 -0
  130. package/dist/chunks/{cli-a98b285v.js → cli-hke6r0q8.js} +2 -2
  131. package/dist/chunks/{cli-jxwm52wg.js → cli-hzr2zraz.js} +1 -1
  132. package/dist/chunks/{cli-x4a9geyz.js → cli-j08dmxw5.js} +1 -1
  133. package/dist/chunks/{cli-jvs98a70.js → cli-ja540nr7.js} +1 -1
  134. package/dist/chunks/{cli-dr1ph0pp.js → cli-jegyadmb.js} +2 -2
  135. package/dist/chunks/{cli-xjx11p6m.js → cli-jgn9jprh.js} +2 -2
  136. package/dist/chunks/{cli-n3m134cf.js → cli-jj93qmmc.js} +2 -2
  137. package/dist/chunks/{cli-kje3t5yg.js → cli-jkj867t1.js} +3 -3
  138. package/dist/chunks/{cli-6he3kpeb.js → cli-k2nh5cby.js} +2 -2
  139. package/dist/chunks/{cli-3je4vtx7.js → cli-k4v08k8t.js} +2 -2
  140. package/dist/chunks/{cli-c2pn6csk.js → cli-khs3sj9k.js} +1 -1
  141. package/dist/chunks/{cli-shz2e0q5.js → cli-kq16afrr.js} +2 -2
  142. package/dist/chunks/{cli-2zh6c5xz.js → cli-kqv5b8zh.js} +1 -1
  143. package/dist/chunks/{cli-k8fd74g6.js → cli-m0z3rmf0.js} +2 -2
  144. package/dist/chunks/{cli-a72n4ej7.js → cli-m12smc5e.js} +1 -1
  145. package/dist/chunks/{cli-15zbq52w.js → cli-m8fq163z.js} +1 -1
  146. package/dist/chunks/{cli-1215h20m.js → cli-mb1qrqw1.js} +2 -2
  147. package/dist/chunks/{cli-50wh7ttg.js → cli-mbp8f3f3.js} +2 -2
  148. package/dist/chunks/{cli-5pb6kdxn.js → cli-me4e2p3e.js} +595 -595
  149. package/dist/chunks/{cli-vz1j9n38.js → cli-mj03488e.js} +2 -2
  150. package/dist/chunks/{cli-6dcra6rs.js → cli-ms5j6fff.js} +2 -2
  151. package/dist/chunks/{cli-0v6qg4zv.js → cli-msgx4pnp.js} +2 -2
  152. package/dist/chunks/cli-msmzt4c3.js +130 -0
  153. package/dist/chunks/{cli-h5yfk29j.js → cli-msw0vv86.js} +2 -2
  154. package/dist/chunks/{cli-ewts4g0p.js → cli-mzcsnm06.js} +2 -2
  155. package/dist/chunks/{cli-wr4k6ngg.js → cli-n5s5fnyj.js} +2 -2
  156. package/dist/chunks/{cli-ygq3fy9g.js → cli-ns0aaggm.js} +1 -1
  157. package/dist/chunks/{cli-1a2nss2m.js → cli-nvnj7r73.js} +1 -1
  158. package/dist/chunks/{cli-hpzy0mat.js → cli-p0vh69b9.js} +2 -2
  159. package/dist/chunks/{cli-zf7yzkn6.js → cli-p2cqnrnp.js} +2 -2
  160. package/dist/chunks/{cli-px7jhzgq.js → cli-pbc8sk2d.js} +2 -2
  161. package/dist/chunks/{cli-29078yxj.js → cli-pgg33dhw.js} +2 -2
  162. package/dist/chunks/cli-przq3zk6.js +3 -0
  163. package/dist/chunks/{cli-q9fn82b1.js → cli-q0156x0d.js} +2 -2
  164. package/dist/chunks/{cli-zdy5bccv.js → cli-q46epwyh.js} +1 -1
  165. package/dist/chunks/{cli-v8w48y51.js → cli-qaxvg7gv.js} +1 -1
  166. package/dist/chunks/{cli-ytj910yt.js → cli-qm684n63.js} +1 -1
  167. package/dist/chunks/{cli-2qec7gn4.js → cli-r3etpht1.js} +1 -1
  168. package/dist/chunks/{cli-amy2yafd.js → cli-r83ttew2.js} +2 -2
  169. package/dist/chunks/{cli-22zbzzap.js → cli-r9db9mqv.js} +1 -1
  170. package/dist/chunks/{cli-3q7meftn.js → cli-rjerv816.js} +2 -2
  171. package/dist/chunks/{cli-mx6xk0dw.js → cli-rvad3yhg.js} +2 -2
  172. package/dist/chunks/{cli-wfqsfwa2.js → cli-rxb5q8zw.js} +2 -2
  173. package/dist/chunks/{cli-7cn4gwqc.js → cli-s160fqyz.js} +2 -2
  174. package/dist/chunks/{cli-v2hg35qk.js → cli-s6vr7213.js} +2 -2
  175. package/dist/chunks/{cli-49dqgzsg.js → cli-s9fhtgmz.js} +2 -2
  176. package/dist/chunks/{cli-tezq577c.js → cli-scaqq0v9.js} +2 -2
  177. package/dist/chunks/{cli-15tr7ade.js → cli-sh9w2tbd.js} +1 -1
  178. package/dist/chunks/{cli-zd2e6bq1.js → cli-sycqd3xe.js} +4 -4
  179. package/dist/chunks/{cli-d06qr5p3.js → cli-t4j047cx.js} +2 -2
  180. package/dist/chunks/{cli-s5epnnj5.js → cli-t9jht3kb.js} +2 -2
  181. package/dist/chunks/{cli-bd1ryrzd.js → cli-tckzkegq.js} +1 -1
  182. package/dist/chunks/{cli-p2gt60aj.js → cli-tfv2qcgf.js} +1 -1
  183. package/dist/chunks/{cli-1qszxdan.js → cli-tq5z9qv3.js} +2 -2
  184. package/dist/chunks/{cli-wthnf2t5.js → cli-tt9a4124.js} +1 -1
  185. package/dist/chunks/{cli-8v5ajztt.js → cli-tyqh91zq.js} +1 -1
  186. package/dist/chunks/cli-v943fd6a.js +3 -0
  187. package/dist/chunks/{cli-wn4ywgbv.js → cli-v9f860t5.js} +2 -2
  188. package/dist/chunks/{cli-qc7zfabw.js → cli-vkvmhjha.js} +2 -2
  189. package/dist/chunks/{cli-6b6e5zj9.js → cli-vkzp66cm.js} +2 -2
  190. package/dist/chunks/{cli-6qhwqfwp.js → cli-vwg0v35a.js} +2 -2
  191. package/dist/chunks/{cli-x514vyva.js → cli-w1d8n9g3.js} +1 -1
  192. package/dist/chunks/cli-w52yvzkn.js +3 -0
  193. package/dist/chunks/{cli-et2cj5dc.js → cli-wbe1p8n2.js} +2 -2
  194. package/dist/chunks/{cli-5mdbbvnv.js → cli-wm8qb6j3.js} +1 -1
  195. package/dist/chunks/{cli-1tq57kq0.js → cli-wn2srq2e.js} +1 -1
  196. package/dist/chunks/{cli-088ac95n.js → cli-wt2bfbn0.js} +2 -2
  197. package/dist/chunks/{cli-jmypsed1.js → cli-x70v8rsj.js} +2 -2
  198. package/dist/chunks/{cli-5wh173wa.js → cli-x8xgga1a.js} +3 -3
  199. package/dist/chunks/{cli-2vc9kv40.js → cli-xfsqvp8r.js} +2 -2
  200. package/dist/chunks/{cli-6xmbrh42.js → cli-xmgm2573.js} +2 -2
  201. package/dist/chunks/{cli-d58ptbve.js → cli-xpa1neza.js} +2 -2
  202. package/dist/chunks/{cli-6bxmycm6.js → cli-yqbvprz7.js} +1 -1
  203. package/dist/chunks/{cli-bz32070f.js → cli-yrwenjxs.js} +1 -1
  204. package/dist/chunks/{cli-3p0mfsqg.js → cli-z5e72gsd.js} +1 -1
  205. package/dist/chunks/{cli-z2jpyr57.js → cli-zev50xap.js} +1 -1
  206. package/dist/chunks/{cli-mjz85907.js → cli-zjbzak9n.js} +1 -1
  207. package/dist/chunks/{cli-h2dynmt7.js → cli-zjfya500.js} +1 -1
  208. package/dist/chunks/{cli-60mdvk6q.js → cli-zp8s7q5w.js} +1 -1
  209. package/dist/chunks/{cli-znz72ctn.js → cli-zpcncwrv.js} +1 -1
  210. package/dist/chunks/{cli-ew59cmn3.js → cli-zxdnz6vp.js} +1 -1
  211. package/dist/chunks/client-dkpgx025.js +2 -0
  212. package/dist/chunks/color-zrm6r755.js +2 -0
  213. package/dist/chunks/commitAttribution-3y6pessz.js +2 -0
  214. package/dist/chunks/common-0bee37at.js +2 -0
  215. package/dist/chunks/compact-zmvj1pk0.js +4 -0
  216. package/dist/chunks/config-gj0gbg5g.js +2 -0
  217. package/dist/chunks/config-hbq35b68.js +2 -0
  218. package/dist/chunks/context-h1qc69rg.js +2 -0
  219. package/dist/chunks/context-noninteractive-7wbe6qvd.js +2 -0
  220. package/dist/chunks/conversation-fwnfp0p5.js +2 -0
  221. package/dist/chunks/{copy-bpypgpy8.js → copy-76r9v46d.js} +1 -1
  222. package/dist/chunks/cost-56r5xxqy.js +5 -0
  223. package/dist/chunks/createSession-m5y8fjy4.js +2 -0
  224. package/dist/chunks/desktop-z3jqgnw7.js +2 -0
  225. package/dist/chunks/detectRepository-w6wawmmg.js +2 -0
  226. package/dist/chunks/detection-1yb2c7hh.js +2 -0
  227. package/dist/chunks/{devtools-mt3vnaw3.js → devtools-10ba48t9.js} +1 -1
  228. package/dist/chunks/{diff-bcdc10jv.js → diff-05xxjeqc.js} +1 -1
  229. package/dist/chunks/doctor-hgwjdraj.js +2 -0
  230. package/dist/chunks/earlyInput-navj6cdn.js +2 -0
  231. package/dist/chunks/effort-a190c878.js +9 -0
  232. package/dist/chunks/executor-s42mdmqs.js +2 -0
  233. package/dist/chunks/exit-kyrjy6hb.js +2 -0
  234. package/dist/chunks/export-ct4sty4d.js +3 -0
  235. package/dist/chunks/extra-usage-noninteractive-byts9mme.js +2 -0
  236. package/dist/chunks/extra-usage-xh1mkrca.js +2 -0
  237. package/dist/chunks/fast-g4aa49jf.js +2 -0
  238. package/dist/chunks/feedback-m5r66qd5.js +2 -0
  239. package/dist/chunks/{files-fx3xz1bj.js → files-qrrrkjke.js} +1 -1
  240. package/dist/chunks/firstPartyEventLogger-mthxtmgc.js +2 -0
  241. package/dist/chunks/gates-yhakv4vb.js +2 -0
  242. package/dist/chunks/git-c39vd9dm.js +2 -0
  243. package/dist/chunks/goal-24dr7fwz.js +2 -0
  244. package/dist/chunks/growthbook-f7ag30hy.js +2 -0
  245. package/dist/chunks/heapdump-16gnh3zm.js +7 -0
  246. package/dist/chunks/help-rgcakcxe.js +2 -0
  247. package/dist/chunks/hooks-8dh43zmv.js +2 -0
  248. package/dist/chunks/{hooks-7kspbr6v.js → hooks-c7fqwas5.js} +1 -1
  249. package/dist/chunks/{ide-5bsqkr23.js → ide-q83qr9cn.js} +1 -1
  250. package/dist/chunks/index-v875zpde.js +2 -0
  251. package/dist/chunks/initReplBridge-zfwxgpsm.js +2 -0
  252. package/dist/chunks/ink-vkxsn90v.js +2 -0
  253. package/dist/chunks/{insights-z9edzgf1.js → insights-4fwap4e5.js} +1 -1
  254. package/dist/chunks/install-7nxzmgp5.js +2 -0
  255. package/dist/chunks/{install-github-app-918fh4r2.js → install-github-app-djzea7r4.js} +1 -1
  256. package/dist/chunks/install-slack-app-3rde0k08.js +2 -0
  257. package/dist/chunks/{instrumentation-b8ysw74t.js → instrumentation-223qqr23.js} +1 -1
  258. package/dist/chunks/keybindings-6t5f69wx.js +3 -0
  259. package/dist/chunks/loadAgentsDir-f8shfnw3.js +2 -0
  260. package/dist/chunks/loadPluginHooks-mdwjrjtp.js +2 -0
  261. package/dist/chunks/login-34j3xdr9.js +2 -0
  262. package/dist/chunks/logout-yew8mymc.js +2 -0
  263. package/dist/chunks/{main-sqrzjvg9.js → main-0b8hyp8h.js} +79 -79
  264. package/dist/chunks/mcp-9enw5a8j.js +2 -0
  265. package/dist/chunks/mcp-fn4yrf5y.js +3 -0
  266. package/dist/chunks/{mcp-dqh1vtvf.js → mcp-yymqpmv6.js} +3 -3
  267. package/dist/chunks/mcpServer-60jg9v58.js +2 -0
  268. package/dist/chunks/mcpServer-85gt8ypc.js +2 -0
  269. package/dist/chunks/memory-kam5z1cw.js +4 -0
  270. package/dist/chunks/{mobile-9m41g9bp.js → mobile-7zsgawnb.js} +1 -1
  271. package/dist/chunks/model-03987182.js +2 -0
  272. package/dist/chunks/model-wbxx5kcd.js +3 -0
  273. package/dist/chunks/{oauth-98khjrd8.js → oauth-y0p2y1w5.js} +1 -1
  274. package/dist/chunks/{output-style-1h6b2zf8.js → output-style-x148mzhn.js} +1 -1
  275. package/dist/chunks/parser-4y4b0e6b.js +2 -0
  276. package/dist/chunks/passes-jrmjk5zk.js +2 -0
  277. package/dist/chunks/permissions-karmgb0m.js +4 -0
  278. package/dist/chunks/plan-w0beh9bh.js +2 -0
  279. package/dist/chunks/plugin-6nwptn3s.js +2 -0
  280. package/dist/chunks/pluginStartupCheck-0nzv1ae9.js +2 -0
  281. package/dist/chunks/{plugins-pe89pa7p.js → plugins-vvf897b4.js} +2 -2
  282. package/dist/chunks/{preauthorizedConfig-g0aq6f03.js → preauthorizedConfig-p02f23jb.js} +1 -1
  283. package/dist/chunks/{print-cjjnhg9d.js → print-krwpbp2j.js} +4 -4
  284. package/dist/chunks/privacy-settings-m0mfykh0.js +2 -0
  285. package/dist/chunks/process-26nny2p0.js +2 -0
  286. package/dist/chunks/processBashCommand-8fqgv2ec.js +2 -0
  287. package/dist/chunks/{processSlashCommand-6d8rnm8v.js → processSlashCommand-q32wy80b.js} +1 -1
  288. package/dist/chunks/prompt-gw1e1gef.js +2 -0
  289. package/dist/chunks/prompt-xgw2hxrc.js +2 -0
  290. package/dist/chunks/provider-prompt-s26vatcw.js +2 -0
  291. package/dist/chunks/rate-limit-options-rd4rjfv5.js +2 -0
  292. package/dist/chunks/registry-fp7x9ekd.js +2 -0
  293. package/dist/chunks/release-notes-76y1r2s1.js +6 -0
  294. package/dist/chunks/reload-plugins-z0fepkva.js +3 -0
  295. package/dist/chunks/remote-env-nn9ngr99.js +2 -0
  296. package/dist/chunks/remoteBridgeCore-cg7qd8m4.js +2 -0
  297. package/dist/chunks/rename-fdjzyjar.js +2 -0
  298. package/dist/chunks/resume-4rvj8jbz.js +3 -0
  299. package/dist/chunks/{rewind-cpv2pwfx.js → rewind-r4g5njsg.js} +1 -1
  300. package/dist/chunks/sandbox-adapter-craea9vm.js +2 -0
  301. package/dist/chunks/sandbox-toggle-620bkz9q.js +2 -0
  302. package/dist/chunks/session-5vm1vwv1.js +3 -0
  303. package/dist/chunks/sessionFileAccessHooks-5jbvwabj.js +2 -0
  304. package/dist/chunks/sessionStorage-ffkhmn5q.js +2 -0
  305. package/dist/chunks/settings-s2bcajs6.js +2 -0
  306. package/dist/chunks/setup-fwcttwbm.js +2 -0
  307. package/dist/chunks/setup-pf09nfsj.js +7 -0
  308. package/dist/chunks/{setup-mecsw2ye.js → setup-vegs56f5.js} +1 -1
  309. package/dist/chunks/sinks-wd4ccgbf.js +2 -0
  310. package/dist/chunks/skills-evga8f7n.js +2 -0
  311. package/dist/chunks/startupProfiler-x5zbs2j7.js +2 -0
  312. package/dist/chunks/state-qpmfrvsv.js +2 -0
  313. package/dist/chunks/{stats-3v0r4e1v.js → stats-mgqf6r7c.js} +1 -1
  314. package/dist/chunks/status-78yks3jw.js +2 -0
  315. package/dist/chunks/stickers-bdp8w2gr.js +2 -0
  316. package/dist/chunks/subprocessEnv-s797f06r.js +2 -0
  317. package/dist/chunks/{systemPromptSections-htbs443y.js → systemPromptSections-07y2z2wn.js} +1 -1
  318. package/dist/chunks/tag-gd73kstd.js +12 -0
  319. package/dist/chunks/tasks-63qaca0z.js +2 -0
  320. package/dist/chunks/{teamHelpers-dddedf19.js → teamHelpers-8ykc4bxa.js} +1 -1
  321. package/dist/chunks/teammateModeSnapshot-ae9r29dy.js +2 -0
  322. package/dist/chunks/teleport-es58k4xz.js +2 -0
  323. package/dist/chunks/terminalSetup-gyh5z5e2.js +2 -0
  324. package/dist/chunks/theme-qrhbaht6.js +2 -0
  325. package/dist/chunks/thinkback-5bs7ezv5.js +2 -0
  326. package/dist/chunks/thinkback-play-1dy160y5.js +2 -0
  327. package/dist/chunks/toolSearch-6cv284b7.js +2 -0
  328. package/dist/chunks/trustedDevice-77ketbgg.js +2 -0
  329. package/dist/chunks/{ultrareviewCommand-jtmh2xb1.js → ultrareviewCommand-j23bjbf8.js} +1 -1
  330. package/dist/chunks/{update-mkzzbt54.js → update-w8wdxh3m.js} +1 -1
  331. package/dist/chunks/upgrade-nft7c1yk.js +2 -0
  332. package/dist/chunks/{upstreamproxy-hbbvxzb5.js → upstreamproxy-x405ef9p.js} +1 -1
  333. package/dist/chunks/usage-s5qgc615.js +2 -0
  334. package/dist/chunks/util-1geb93kp.js +2 -0
  335. package/dist/chunks/utils-6sb44pg8.js +2 -0
  336. package/dist/chunks/vim-kq91w44a.js +2 -0
  337. package/dist/chunks/worktree-0af6b1mt.js +2 -0
  338. package/dist/chunks/worktreeModeEnabled-ea6wb7aj.js +2 -0
  339. package/dist/cli.js +1 -1
  340. package/package.json +4 -1
  341. package/dist/chunks/App-skattzvx.js +0 -2
  342. package/dist/chunks/ApproveApiKey-1zk1g80v.js +0 -2
  343. package/dist/chunks/BypassPermissionsModeDialog-4bd5a65d.js +0 -2
  344. package/dist/chunks/ClaudeInChromeOnboarding-jrj410t2.js +0 -2
  345. package/dist/chunks/ClaudeMdExternalIncludesDialog-2bn5pwwr.js +0 -2
  346. package/dist/chunks/ConsoleOAuthFlow-8hn6958t.js +0 -2
  347. package/dist/chunks/Doctor-w0eqwfzb.js +0 -2
  348. package/dist/chunks/Grove-ygg0z9mr.js +0 -2
  349. package/dist/chunks/ITermBackend-ht0ds6se.js +0 -2
  350. package/dist/chunks/InvalidConfigDialog-h2jkde64.js +0 -2
  351. package/dist/chunks/InvalidSettingsDialog-3p7ehs0t.js +0 -2
  352. package/dist/chunks/Onboarding-np5yfyy1.js +0 -2
  353. package/dist/chunks/REPL-8811fta4.js +0 -2
  354. package/dist/chunks/ResumeConversation-d03pbgnw.js +0 -2
  355. package/dist/chunks/TeleportProgress-ghjbbh9h.js +0 -2
  356. package/dist/chunks/TeleportRepoMismatchDialog-hhcyekar.js +0 -2
  357. package/dist/chunks/TeleportResumeWrapper-66e7dnk5.js +0 -2
  358. package/dist/chunks/ToolSearchTool-dgwhh0gd.js +0 -2
  359. package/dist/chunks/TrustDialog-w9tj4t8r.js +0 -2
  360. package/dist/chunks/TungstenTool-7k2gt6pa.js +0 -2
  361. package/dist/chunks/add-dir-pg1rb88e.js +0 -2
  362. package/dist/chunks/agents-mcbqv3h3.js +0 -4
  363. package/dist/chunks/ant-claude-for-chrome-mcp-c765s2bt.js +0 -2
  364. package/dist/chunks/api-qvdz0vdp.js +0 -2
  365. package/dist/chunks/asciicast-ygqjzj6w.js +0 -2
  366. package/dist/chunks/auth-gkfrn4ga.js +0 -2
  367. package/dist/chunks/auth-y1hqesm6.js +0 -2
  368. package/dist/chunks/backgroundHousekeeping-wk8ne1wg.js +0 -2
  369. package/dist/chunks/branch-yre4hh7s.js +0 -5
  370. package/dist/chunks/btw-091q02sh.js +0 -2
  371. package/dist/chunks/buddy-5xd2vjhm.js +0 -2
  372. package/dist/chunks/caches-g4cc992y.js +0 -2
  373. package/dist/chunks/chrome-rd8crze6.js +0 -2
  374. package/dist/chunks/clear-25jzke5j.js +0 -2
  375. package/dist/chunks/cli-6hvqmebc.js +0 -3
  376. package/dist/chunks/cli-9hskw92e.js +0 -130
  377. package/dist/chunks/cli-avcnnw0n.js +0 -3
  378. package/dist/chunks/cli-e9pafjv1.js +0 -4
  379. package/dist/chunks/cli-gyp5wyzg.js +0 -3
  380. package/dist/chunks/cli-jbbxj53h.js +0 -3
  381. package/dist/chunks/cli-pbp5hza0.js +0 -3
  382. package/dist/chunks/cli-tzaj50bd.js +0 -3
  383. package/dist/chunks/cli-xzsc9n84.js +0 -3
  384. package/dist/chunks/cli-yv1znypb.js +0 -3
  385. package/dist/chunks/client-037bm52v.js +0 -2
  386. package/dist/chunks/color-ceqfke15.js +0 -2
  387. package/dist/chunks/commitAttribution-3ewwca68.js +0 -2
  388. package/dist/chunks/common-jn8w5r1w.js +0 -2
  389. package/dist/chunks/compact-631qpkbp.js +0 -4
  390. package/dist/chunks/config-6em7qq45.js +0 -2
  391. package/dist/chunks/config-h2e5ra49.js +0 -2
  392. package/dist/chunks/context-31c3znwn.js +0 -2
  393. package/dist/chunks/context-noninteractive-q418vz0p.js +0 -2
  394. package/dist/chunks/conversation-yz22h1cb.js +0 -2
  395. package/dist/chunks/cost-8rr9expn.js +0 -5
  396. package/dist/chunks/createSession-jratqxvc.js +0 -2
  397. package/dist/chunks/desktop-zq22ksq3.js +0 -2
  398. package/dist/chunks/detectRepository-djxyq37h.js +0 -2
  399. package/dist/chunks/detection-b18r43da.js +0 -2
  400. package/dist/chunks/doctor-cs43t62h.js +0 -2
  401. package/dist/chunks/earlyInput-361tx72y.js +0 -2
  402. package/dist/chunks/effort-qw83nert.js +0 -9
  403. package/dist/chunks/executor-rvxyyheh.js +0 -2
  404. package/dist/chunks/exit-kynz824m.js +0 -2
  405. package/dist/chunks/export-95j3srp6.js +0 -3
  406. package/dist/chunks/extra-usage-hxyp53v5.js +0 -2
  407. package/dist/chunks/extra-usage-noninteractive-53w28t1j.js +0 -2
  408. package/dist/chunks/fast-ec1hxnv7.js +0 -2
  409. package/dist/chunks/feedback-qtsk3t9f.js +0 -2
  410. package/dist/chunks/firstPartyEventLogger-4yfx731e.js +0 -2
  411. package/dist/chunks/gates-85t459a0.js +0 -2
  412. package/dist/chunks/git-e0mvprv8.js +0 -2
  413. package/dist/chunks/goal-ywc7exvv.js +0 -2
  414. package/dist/chunks/growthbook-ykj8089v.js +0 -2
  415. package/dist/chunks/heapdump-w6a13cfe.js +0 -7
  416. package/dist/chunks/help-enq1htxe.js +0 -2
  417. package/dist/chunks/hooks-wxm384wn.js +0 -2
  418. package/dist/chunks/initReplBridge-acrf7hyb.js +0 -2
  419. package/dist/chunks/ink-9vrw9yhe.js +0 -2
  420. package/dist/chunks/install-c8gv4wfg.js +0 -2
  421. package/dist/chunks/install-slack-app-1aqgxsb6.js +0 -2
  422. package/dist/chunks/keybindings-v92d2xht.js +0 -3
  423. package/dist/chunks/loadAgentsDir-k53rdwbr.js +0 -2
  424. package/dist/chunks/loadPluginHooks-rmzgs29p.js +0 -2
  425. package/dist/chunks/login-j9bz1g34.js +0 -2
  426. package/dist/chunks/logout-58wm6hsc.js +0 -2
  427. package/dist/chunks/mcp-z3j236hk.js +0 -3
  428. package/dist/chunks/mcp-zryxxcaz.js +0 -2
  429. package/dist/chunks/mcpServer-b2m7ewct.js +0 -2
  430. package/dist/chunks/mcpServer-xpq096r4.js +0 -2
  431. package/dist/chunks/memory-5tvqvktk.js +0 -4
  432. package/dist/chunks/model-cta1svwb.js +0 -3
  433. package/dist/chunks/model-d96jkka7.js +0 -2
  434. package/dist/chunks/parser-jpf6bfmz.js +0 -2
  435. package/dist/chunks/passes-reh6ja9j.js +0 -2
  436. package/dist/chunks/permissions-xgydmrq2.js +0 -4
  437. package/dist/chunks/plan-z4k8zj56.js +0 -2
  438. package/dist/chunks/plugin-0tztmcsg.js +0 -2
  439. package/dist/chunks/pluginStartupCheck-vxmkvt40.js +0 -2
  440. package/dist/chunks/privacy-settings-zbrc40a1.js +0 -2
  441. package/dist/chunks/process-msr26xa0.js +0 -2
  442. package/dist/chunks/processBashCommand-hnhy8brr.js +0 -2
  443. package/dist/chunks/prompt-cfaneybz.js +0 -2
  444. package/dist/chunks/prompt-wg6hfj0k.js +0 -2
  445. package/dist/chunks/provider-prompt-c8wew66t.js +0 -2
  446. package/dist/chunks/rate-limit-options-fyjqpxp3.js +0 -2
  447. package/dist/chunks/registry-ht9aazng.js +0 -2
  448. package/dist/chunks/release-notes-5v16zb9c.js +0 -6
  449. package/dist/chunks/reload-plugins-apyma8vs.js +0 -3
  450. package/dist/chunks/remote-env-p6ym55w6.js +0 -2
  451. package/dist/chunks/remoteBridgeCore-0v9x8112.js +0 -2
  452. package/dist/chunks/rename-j9rc9dwj.js +0 -2
  453. package/dist/chunks/resume-tbr3mkch.js +0 -3
  454. package/dist/chunks/sandbox-adapter-qh943bs4.js +0 -2
  455. package/dist/chunks/sandbox-toggle-1f70ejwk.js +0 -2
  456. package/dist/chunks/session-42zhjgd2.js +0 -3
  457. package/dist/chunks/sessionFileAccessHooks-1nh915er.js +0 -2
  458. package/dist/chunks/sessionStorage-j5m0nf55.js +0 -2
  459. package/dist/chunks/settings-c709knqg.js +0 -2
  460. package/dist/chunks/setup-0n2p20yw.js +0 -7
  461. package/dist/chunks/setup-2hqyyxff.js +0 -2
  462. package/dist/chunks/sinks-q6etaenz.js +0 -2
  463. package/dist/chunks/skills-xads3027.js +0 -2
  464. package/dist/chunks/startupProfiler-4wmjq0yd.js +0 -2
  465. package/dist/chunks/state-edaz98bj.js +0 -2
  466. package/dist/chunks/status-9rtty0ee.js +0 -2
  467. package/dist/chunks/stickers-m73qwecp.js +0 -2
  468. package/dist/chunks/subprocessEnv-rass28aq.js +0 -2
  469. package/dist/chunks/tag-vj93fgp6.js +0 -12
  470. package/dist/chunks/tasks-avbqta2s.js +0 -2
  471. package/dist/chunks/teammateModeSnapshot-32yfa4hf.js +0 -2
  472. package/dist/chunks/teleport-jw6w0rn4.js +0 -2
  473. package/dist/chunks/terminalSetup-ppt6v9xf.js +0 -2
  474. package/dist/chunks/theme-2csrfbca.js +0 -2
  475. package/dist/chunks/thinkback-2ahfejyt.js +0 -2
  476. package/dist/chunks/thinkback-play-kffa7rdp.js +0 -2
  477. package/dist/chunks/toolSearch-ptrcr8ec.js +0 -2
  478. package/dist/chunks/trustedDevice-xvtp79f1.js +0 -2
  479. package/dist/chunks/upgrade-c4argpvv.js +0 -2
  480. package/dist/chunks/usage-w30yajzy.js +0 -2
  481. package/dist/chunks/util-zkawe0w0.js +0 -2
  482. package/dist/chunks/utils-v86tf27x.js +0 -2
  483. package/dist/chunks/vim-3stm1kbg.js +0 -2
  484. package/dist/chunks/worktree-pbeayfjp.js +0 -2
  485. package/dist/chunks/worktreeModeEnabled-ysks760x.js +0 -2
@@ -1,3 +1,3 @@
1
1
  // @bun
2
- import{N3 as B,e4 as N}from"./cli-9hskw92e.js";import{B8 as L,w8 as A}from"./cli-3bxtq5dc.js";import{r_ as z,u_ as K}from"./cli-a98b285v.js";import{ada as I,bda as J}from"./cli-x514vyva.js";var V={};I(V,{setCliTeammateModeOverride:()=>P,getTeammateModeFromSnapshot:()=>U,getCliTeammateModeOverride:()=>Q,clearCliTeammateModeOverride:()=>R,captureTeammateModeSnapshot:()=>H});function P(x){y=x}function Q(){return y}function R(x){y=null,q=x,z(`[TeammateModeSnapshot] CLI override cleared, new mode: ${x}`)}function H(){if(y)q=y,z(`[TeammateModeSnapshot] Captured from CLI override: ${q}`);else q=B().teammateMode??"auto",z(`[TeammateModeSnapshot] Captured from config: ${q}`)}function U(){if(q===null)A(Error("getTeammateModeFromSnapshot called before capture - this indicates an initialization bug")),H();return q??"auto"}var q=null,y=null;var W=J(()=>{N();K();L()});
3
- export{P as gL,Q as hL,R as iL,H as jL,U as kL,V as lL,W as mL};
2
+ import{Q3 as N,x3 as B}from"./cli-msmzt4c3.js";import{E8 as A,J8 as L}from"./cli-4ewb3q42.js";import{v_ as z,y_ as K}from"./cli-hke6r0q8.js";import{eda as I,fda as J}from"./cli-w1d8n9g3.js";var V={};I(V,{setCliTeammateModeOverride:()=>P,getTeammateModeFromSnapshot:()=>U,getCliTeammateModeOverride:()=>Q,clearCliTeammateModeOverride:()=>R,captureTeammateModeSnapshot:()=>H});function P(x){y=x}function Q(){return y}function R(x){y=null,q=x,z(`[TeammateModeSnapshot] CLI override cleared, new mode: ${x}`)}function H(){if(y)q=y,z(`[TeammateModeSnapshot] Captured from CLI override: ${q}`);else q=B().teammateMode??"auto",z(`[TeammateModeSnapshot] Captured from config: ${q}`)}function U(){if(q===null)A(Error("getTeammateModeFromSnapshot called before capture - this indicates an initialization bug")),H();return q??"auto"}var q=null,y=null;var W=J(()=>{N();K();L()});
3
+ export{P as dL,Q as eL,R as fL,H as gL,U as hL,V as iL,W as jL};
@@ -1,3 +1,3 @@
1
1
  // @bun
2
- import{bda as A}from"./cli-x514vyva.js";function C(h){let b;for(let j in h)if(j.startsWith("_PROTO_")){if(b===void 0)b={...h};delete b[j]}return b??h}function D(h){if(x!==null)return;if(x=h,z.length>0){let b=[...z];if(z.length=0,process.env.USER_TYPE==="ant")x.logEvent("analytics_sink_attached",{queued_event_count:b.length});queueMicrotask(()=>{for(let j of b)if(j.async)x.logEventAsync(j.eventName,j.metadata);else x.logEvent(j.eventName,j.metadata)})}}function F(h,b){if(x===null){z.push({eventName:h,metadata:b,async:!1});return}x.logEvent(h,b)}var z,x=null;var B=A(()=>{z=[]});
3
- export{C as S8,D as T8,F as U8,B as V8};
2
+ import{fda as A}from"./cli-w1d8n9g3.js";function C(h){let b;for(let j in h)if(j.startsWith("_PROTO_")){if(b===void 0)b={...h};delete b[j]}return b??h}function D(h){if(x!==null)return;if(x=h,z.length>0){let b=[...z];if(z.length=0,process.env.USER_TYPE==="ant")x.logEvent("analytics_sink_attached",{queued_event_count:b.length});queueMicrotask(()=>{for(let j of b)if(j.async)x.logEventAsync(j.eventName,j.metadata);else x.logEvent(j.eventName,j.metadata)})}}function F(h,b){if(x===null){z.push({eventName:h,metadata:b,async:!1});return}x.logEvent(h,b)}var z,x=null;var B=A(()=>{z=[]});
3
+ export{C as W8,D as X8,F as Y8,B as Z8};
@@ -1,3 +1,3 @@
1
1
  // @bun
2
- import{bda as o}from"./cli-x514vyva.js";function s(r){return{async connect(e){}}}var t;var n=o(()=>{t=[]});
2
+ import{fda as o}from"./cli-w1d8n9g3.js";function s(r){return{async connect(e){}}}var t;var n=o(()=>{t=[]});
3
3
  export{t as vg,s as wg,n as xg};
@@ -1,5 +1,5 @@
1
1
  // @bun
2
- import{c5 as f}from"./cli-b1dptek2.js";import{k5 as v}from"./cli-bthzmdgv.js";import{$9 as _,E9 as I,F9 as D,G9 as z,I9 as b,d_ as P,h_ as $,l_ as w,r_ as x,u_ as S}from"./cli-a98b285v.js";import{B_ as U,E_ as F,O_ as C}from"./cli-1qszxdan.js";import{Zca as O,a$ as B,g$ as E}from"./cli-w754xmyv.js";O();D();b();S();C();w();f();P();import{appendFile as m,rename as u}from"fs/promises";import{basename as R,dirname as p,join as M}from"path";var A={filePath:null,timestamp:0};function j(){if(A.filePath!==null)return A.filePath;if(process.env.USER_TYPE!=="ant")return null;if(!F(process.env.CLAUDE_CODE_TERMINAL_RECORDING))return null;let q=M(U(),"projects"),K=M(q,v(E()));return A.timestamp=Date.now(),A.filePath=M(K,`${B()}-${A.timestamp}.cast`),A.filePath}function t(){A.filePath=null,A.timestamp=0}function r(){let q=B(),K=M(U(),"projects"),X=M(K,v(E()));try{let G=$().readdirSync(X);return(typeof G[0]==="string"?G:G.map((J)=>J.name)).filter((J)=>J.startsWith(q)&&J.endsWith(".cast")).sort().map((J)=>M(X,J))}catch{return[]}}async function e(){let q=A.filePath;if(!q||A.timestamp===0)return;let K=M(U(),"projects"),X=M(K,v(E())),G=M(X,`${B()}-${A.timestamp}.cast`);if(q===G)return;await Z?.flush();let Y=R(q),Q=R(G);try{await u(q,G),A.filePath=G,x(`[asciicast] Renamed recording: ${Y} \u2192 ${Q}`)}catch{x(`[asciicast] Failed to rename recording from ${Y} to ${Q}`)}}var Z=null;function T(){let q=process.stdout.columns||80,K=process.stdout.rows||24;return{cols:q,rows:K}}async function qq(){await Z?.flush()}function Aq(){let q=j();if(!q)return;let{cols:K,rows:X}=T(),G=performance.now(),Y=_({version:2,width:K,height:X,timestamp:Math.floor(Date.now()/1000),env:{SHELL:process.env.SHELL||"",TERM:process.env.TERM||""}});try{$().mkdirSync(p(q))}catch{}$().appendFileSync(q,Y+`
2
+ import{O4 as f}from"./cli-fghyxar5.js";import{W4 as v}from"./cli-1ny2386w.js";import{I9 as I,J9 as D,K9 as z,M9 as b,d_ as _,h_ as P,l_ as $,p_ as w,v_ as x,y_ as S}from"./cli-hke6r0q8.js";import{F_ as U,I_ as F,S_ as C}from"./cli-tq5z9qv3.js";import{bda as O,e$ as B,k$ as E}from"./cli-3ac555qw.js";O();D();b();S();C();w();f();P();import{appendFile as m,rename as u}from"fs/promises";import{basename as R,dirname as p,join as M}from"path";var A={filePath:null,timestamp:0};function j(){if(A.filePath!==null)return A.filePath;if(process.env.USER_TYPE!=="ant")return null;if(!F(process.env.CLAUDE_CODE_TERMINAL_RECORDING))return null;let q=M(U(),"projects"),K=M(q,v(E()));return A.timestamp=Date.now(),A.filePath=M(K,`${B()}-${A.timestamp}.cast`),A.filePath}function t(){A.filePath=null,A.timestamp=0}function r(){let q=B(),K=M(U(),"projects"),X=M(K,v(E()));try{let G=$().readdirSync(X);return(typeof G[0]==="string"?G:G.map((J)=>J.name)).filter((J)=>J.startsWith(q)&&J.endsWith(".cast")).sort().map((J)=>M(X,J))}catch{return[]}}async function e(){let q=A.filePath;if(!q||A.timestamp===0)return;let K=M(U(),"projects"),X=M(K,v(E())),G=M(X,`${B()}-${A.timestamp}.cast`);if(q===G)return;await Z?.flush();let Y=R(q),Q=R(G);try{await u(q,G),A.filePath=G,x(`[asciicast] Renamed recording: ${Y} \u2192 ${Q}`)}catch{x(`[asciicast] Failed to rename recording from ${Y} to ${Q}`)}}var Z=null;function T(){let q=process.stdout.columns||80,K=process.stdout.rows||24;return{cols:q,rows:K}}async function qq(){await Z?.flush()}function Aq(){let q=j();if(!q)return;let{cols:K,rows:X}=T(),G=performance.now(),Y=_({version:2,width:K,height:X,timestamp:Math.floor(Date.now()/1000),env:{SHELL:process.env.SHELL||"",TERM:process.env.TERM||""}});try{$().mkdirSync(p(q))}catch{}$().appendFileSync(q,Y+`
3
3
  `,{mode:384});let Q=Promise.resolve(),J=I({writeFn(L){let V=A.filePath;if(!V)return;Q=Q.then(()=>m(V,L)).catch(()=>{})},flushIntervalMs:500,maxBufferSize:50,maxBufferBytes:10485760}),H=process.stdout.write.bind(process.stdout);process.stdout.write=function(L,V,N){let W=(performance.now()-G)/1000,k=typeof L==="string"?L:Buffer.from(L).toString("utf-8");if(J.write(_([W,"o",k])+`
4
4
  `),typeof V==="function")return H(L,V);return H(L,V,N)};function y(){let L=(performance.now()-G)/1000,{cols:V,rows:N}=T();J.write(_([L,"r",`${V}x${N}`])+`
5
5
  `)}process.stdout.on("resize",y),Z={async flush(){J.flush(),await Q},async dispose(){J.dispose(),await Q,process.stdout.removeListener("resize",y),process.stdout.write=H}},z(async()=>{await Z?.dispose(),Z=null}),x(`[asciicast] Recording to ${q}`)}
@@ -1,3 +1,3 @@
1
1
  // @bun
2
- import{_ca as O,ada as X,bda as W}from"./cli-x514vyva.js";var Y={};X(Y,{resetCachedMCState:()=>S,markToolsSentToAPI:()=>P,isModelSupportedForCacheEditing:()=>N,isCachedMicrocompactEnabled:()=>G,getCoordinatorUserContext:()=>w,getCachedMCConfig:()=>I,default:()=>z,createCachedMCState:()=>C,checkProtectedNamespace:()=>j,__stubMissing:()=>k});var J=function(){},K,F,z,k=!0,C,G,N,I,P,S,j,w;var Z=W(()=>{K={get(q,B){if(B==="__esModule")return!0;if(B==="default")return new Proxy(J,K);if(B===Symbol.toPrimitive)return()=>{return};if(B===Symbol.iterator)return function*(){};if(B===Symbol.asyncIterator)return async function*(){};if(B==="then")return;return new Proxy(J,K)},apply(){return new Proxy(J,K)},construct(){return new Proxy(J,K)}},F=new Proxy(J,K),z=F,C=F,G=F,N=F,I=F,P=F,S=F,j=F,w=F});import T from"lodash-es/memoize.js";import{homedir as A}from"os";import{join as H}from"path";function f(){return H(D(),"teams")}function h(q){let B=process.env.NODE_OPTIONS;if(!B)return!1;return B.split(/\s+/).includes(q)}function M(q){if(!q)return!1;if(typeof q==="boolean")return q;let B=q.toLowerCase().trim();return["1","true","yes","on"].includes(B)}function E(q){if(q===void 0)return!1;if(typeof q==="boolean")return!q;if(!q)return!1;let B=q.toLowerCase().trim();return["0","false","no","off"].includes(B)}function m(){return M(process.env.CLAUDE_CODE_SIMPLE)||process.argv.includes("--bare")}function g(q){let B={};if(q)for(let L of q){let[Q,...U]=L.split("=");if(!Q||U.length===0)throw Error(`Invalid environment variable format: ${L}, environment variables should be added as: -e KEY1=value1 -e KEY2=value2`);B[Q]=U.join("=")}return B}function u(){return process.env.AWS_REGION||process.env.AWS_DEFAULT_REGION||"us-east-1"}function $(){return process.env.CLOUD_ML_REGION||"us-east5"}function _(){return M(process.env.CLAUDE_BASH_MAINTAIN_PROJECT_WORKING_DIR)}function d(){return process.env.USER_TYPE==="ant"&&M(process.env.COO_RUNNING_ON_HOMESPACE)}function V(){if(process.env.USER_TYPE==="ant")return(Z(),O(Y)).checkProtectedNamespace();return!1}function i(q){if(q){let B=c.find(([L])=>q.startsWith(L));if(B)return process.env[B[1]]||$()}return $()}var D,c;var x=W(()=>{D=T(()=>{return(process.env.CLAUDE_CONFIG_DIR??H(A(),".claude")).normalize("NFC")},()=>process.env.CLAUDE_CONFIG_DIR);c=[["claude-haiku-4-5","VERTEX_REGION_CLAUDE_HAIKU_4_5"],["claude-3-5-haiku","VERTEX_REGION_CLAUDE_3_5_HAIKU"],["claude-3-5-sonnet","VERTEX_REGION_CLAUDE_3_5_SONNET"],["claude-3-7-sonnet","VERTEX_REGION_CLAUDE_3_7_SONNET"],["claude-opus-4-1","VERTEX_REGION_CLAUDE_4_1_OPUS"],["claude-opus-4","VERTEX_REGION_CLAUDE_4_0_OPUS"],["claude-sonnet-4-6","VERTEX_REGION_CLAUDE_4_6_SONNET"],["claude-sonnet-4-5","VERTEX_REGION_CLAUDE_4_5_SONNET"],["claude-sonnet-4","VERTEX_REGION_CLAUDE_4_0_SONNET"]]});
3
- export{D as B_,f as C_,h as D_,M as E_,E as F_,m as G_,g as H_,u as I_,$ as J_,_ as K_,d as L_,V as M_,i as N_,x as O_};
2
+ import{cda as O,eda as X,fda as W}from"./cli-w1d8n9g3.js";var Y={};X(Y,{resetCachedMCState:()=>S,markToolsSentToAPI:()=>P,isModelSupportedForCacheEditing:()=>N,isCachedMicrocompactEnabled:()=>G,getCoordinatorUserContext:()=>w,getCachedMCConfig:()=>I,default:()=>z,createCachedMCState:()=>C,checkProtectedNamespace:()=>j,__stubMissing:()=>k});var J=function(){},K,F,z,k=!0,C,G,N,I,P,S,j,w;var Z=W(()=>{K={get(q,B){if(B==="__esModule")return!0;if(B==="default")return new Proxy(J,K);if(B===Symbol.toPrimitive)return()=>{return};if(B===Symbol.iterator)return function*(){};if(B===Symbol.asyncIterator)return async function*(){};if(B==="then")return;return new Proxy(J,K)},apply(){return new Proxy(J,K)},construct(){return new Proxy(J,K)}},F=new Proxy(J,K),z=F,C=F,G=F,N=F,I=F,P=F,S=F,j=F,w=F});import T from"lodash-es/memoize.js";import{homedir as A}from"os";import{join as H}from"path";function f(){return H(D(),"teams")}function h(q){let B=process.env.NODE_OPTIONS;if(!B)return!1;return B.split(/\s+/).includes(q)}function M(q){if(!q)return!1;if(typeof q==="boolean")return q;let B=q.toLowerCase().trim();return["1","true","yes","on"].includes(B)}function E(q){if(q===void 0)return!1;if(typeof q==="boolean")return!q;if(!q)return!1;let B=q.toLowerCase().trim();return["0","false","no","off"].includes(B)}function m(){return M(process.env.CLAUDE_CODE_SIMPLE)||process.argv.includes("--bare")}function g(q){let B={};if(q)for(let L of q){let[Q,...U]=L.split("=");if(!Q||U.length===0)throw Error(`Invalid environment variable format: ${L}, environment variables should be added as: -e KEY1=value1 -e KEY2=value2`);B[Q]=U.join("=")}return B}function u(){return process.env.AWS_REGION||process.env.AWS_DEFAULT_REGION||"us-east-1"}function $(){return process.env.CLOUD_ML_REGION||"us-east5"}function _(){return M(process.env.CLAUDE_BASH_MAINTAIN_PROJECT_WORKING_DIR)}function d(){return process.env.USER_TYPE==="ant"&&M(process.env.COO_RUNNING_ON_HOMESPACE)}function V(){if(process.env.USER_TYPE==="ant")return(Z(),O(Y)).checkProtectedNamespace();return!1}function i(q){if(q){let B=c.find(([L])=>q.startsWith(L));if(B)return process.env[B[1]]||$()}return $()}var D,c;var x=W(()=>{D=T(()=>{return(process.env.CLAUDE_CONFIG_DIR??H(A(),".claude")).normalize("NFC")},()=>process.env.CLAUDE_CONFIG_DIR);c=[["claude-haiku-4-5","VERTEX_REGION_CLAUDE_HAIKU_4_5"],["claude-3-5-haiku","VERTEX_REGION_CLAUDE_3_5_HAIKU"],["claude-3-5-sonnet","VERTEX_REGION_CLAUDE_3_5_SONNET"],["claude-3-7-sonnet","VERTEX_REGION_CLAUDE_3_7_SONNET"],["claude-opus-4-1","VERTEX_REGION_CLAUDE_4_1_OPUS"],["claude-opus-4","VERTEX_REGION_CLAUDE_4_0_OPUS"],["claude-sonnet-4-6","VERTEX_REGION_CLAUDE_4_6_SONNET"],["claude-sonnet-4-5","VERTEX_REGION_CLAUDE_4_5_SONNET"],["claude-sonnet-4","VERTEX_REGION_CLAUDE_4_0_SONNET"]]});
3
+ export{D as F_,f as G_,h as H_,M as I_,E as J_,m as K_,g as L_,u as M_,$ as N_,_ as O_,d as P_,V as Q_,i as R_,x as S_};
@@ -1,3 +1,3 @@
1
1
  // @bun
2
- import{ya as P}from"./cli-sbp2221d.js";import{td as M,xd as Bq}from"./cli-by5b2216.js";import{Bn as o,CC as E,DF as h,EC as s,EF as A,GF as e,HF as _,IF as qq,Pi as O,Qi as p,SD as f,VD as r,gx as L,hx as t,lx as N,nx as a,tw as k,zn as R,zw as n}from"./cli-5pb6kdxn.js";import{t4 as K,v4 as l}from"./cli-v2hg35qk.js";import{K6 as I,M6 as d}from"./cli-nj726gac.js";import{B8 as i,w8 as F}from"./cli-3bxtq5dc.js";import{U8 as y,V8 as b}from"./cli-s5epnnj5.js";import{S9 as D,Z9 as g,r_ as H,u_ as m}from"./cli-a98b285v.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-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])}
3
3
  export{Iq as P};
@@ -1,3 +1,3 @@
1
1
  // @bun
2
- import{BX as z,GX as Q,V1 as V,W1 as G,X1 as W,c2 as J,e2 as X,r1 as B,w1 as D,x1 as F}from"./cli-9hskw92e.js";import{x9 as y,y9 as N}from"./cli-shz2e0q5.js";import{bda as M}from"./cli-x514vyva.js";import Y from"axios";async function b(){if(!D()||!F())return{};let w=B();if(w&&z(w.expiresAt))return null;let q=J();if(q.error)throw Error(`Auth error: ${q.error}`);let K={"Content-Type":"application/json","User-Agent":G(),...q.headers},L=`${y().BASE_API_URL}/api/oauth/usage`;return(await Y.get(L,{headers:K,timeout:5000})).data}var Z=M(()=>{N();V();X();W();Q()});
2
+ import{EX as z,F1 as V,G1 as G,H1 as W,JX as Q,O1 as J,Q1 as X,b1 as B,g1 as D,h1 as F}from"./cli-msmzt4c3.js";import{B9 as y,C9 as N}from"./cli-kq16afrr.js";import{fda as M}from"./cli-w1d8n9g3.js";import Y from"axios";async function b(){if(!D()||!F())return{};let w=B();if(w&&z(w.expiresAt))return null;let q=J();if(q.error)throw Error(`Auth error: ${q.error}`);let K={"Content-Type":"application/json","User-Agent":G(),...q.headers},L=`${y().BASE_API_URL}/api/oauth/usage`;return(await Y.get(L,{headers:K,timeout:5000})).data}var Z=M(()=>{N();V();X();W();Q()});
3
3
  export{b as rg,Z as sg};
@@ -0,0 +1,3 @@
1
+ // @bun
2
+ import{yf as j,zf as Gz}from"./cli-edkqs0ge.js";import{Aw as e,CA as Bz,Fm as N,Gm as o,Jx as E,Kx as zz,LH as M,Ns as w,OI as Vz,Os as t,PJ as A,Tp as O,Up as a,bK as Yz,dJ as I,dK as u,dw as L,eJ as c,fI as m,fJ as Xz,jw as s,lH as h,mI as T,oJ as v,vA as C,xK as Zz,yw as P}from"./cli-me4e2p3e.js";import{KL as r,vL as y}from"./cli-49m97nbg.js";import{E8 as R,J8 as i}from"./cli-4ewb3q42.js";import{Y8 as H,Z8 as n}from"./cli-t9jht3kb.js";import{bda as k,daa as F,e$ as f,f$ as q,k$ as x}from"./cli-3ac555qw.js";import{fda as l}from"./cli-w1d8n9g3.js";import{randomUUID as Jz}from"crypto";async function Lz({setMessages:X,readFileState:g,discoveredSkillNames:S,loadedNestedMemoryPaths:p,getAppState:G,setAppState:J,setConversationId:Y}){let Z=v();await A("clear",{getAppState:G,setAppState:J,signal:AbortSignal.timeout(Z),timeoutMs:Z});let _=F();if(_)H("tengu_cache_eviction_hint",{scope:"conversation_clear",last_request_id:_});let Q=new Set,$=[],D=(z)=>("isBackgrounded"in z)&&z.isBackgrounded===!1;if(G)for(let z of Object.values(G().tasks)){if(D(z))continue;if(C(z))Q.add(z.agentId),$.push(z);else if(w(z))Q.add(z.identity.agentId)}if(X(()=>[]),Y)Y(Jz());if(j(Q),E(x()),g.clear(),S?.clear(),p?.clear(),J)J((z)=>{let V={};for(let[U,B]of Object.entries(z.tasks)){if(!D(B)){V[U]=B;continue}try{if(B.status==="running"){if(O(B)){if(B.shellCommand?.kill(),B.shellCommand?.cleanup(),B.cleanupTimeoutId)clearTimeout(B.cleanupTimeoutId)}if("abortController"in B)B.abortController?.abort();if("unregisterCleanup"in B)B.unregisterCleanup?.()}}catch(d){R(d)}I(U)}return{...z,tasks:V,attribution:y(),standaloneAgentContext:void 0,fileHistory:{snapshots:[],trackedFiles:new Set,snapshotSequence:0},mcp:{clients:[],tools:[],commands:[],resources:{},pluginReconnectKey:z.mcp.pluginReconnectKey}}});if(L(),m(),q({setCurrentAsParent:!0}),process.env.USER_TYPE==="ant"&&process.env.CLAUDE_CODE_SESSION_ID)process.env.CLAUDE_CODE_SESSION_ID=f();await M();for(let z of $){if(z.status!=="running")continue;c(z.id,h(N(z.agentId)))}let b=u();if(b)T(b);let K=await P("clear");if(K.length>0)X(()=>K)}var Qz=l(()=>{k();n();t();Bz();a();o();r();Yz();i();s();zz();e();Vz();Xz();Zz();Gz()});
3
+ export{Lz as wf,Qz as xf};
@@ -1,3 +1,3 @@
1
1
  // @bun
2
- import{bda as w,cda as z}from"./cli-x514vyva.js";function j(){if(!k)k=z("semver");return k}function B(f,h){if(typeof Bun<"u")return Bun.semver.order(f,h)===1;return j().gt(f,h,{loose:!0})}function C(f,h){if(typeof Bun<"u")return Bun.semver.order(f,h)>=0;return j().gte(f,h,{loose:!0})}function D(f,h){if(typeof Bun<"u")return Bun.semver.order(f,h)===-1;return j().lt(f,h,{loose:!0})}function E(f,h){if(typeof Bun<"u")return Bun.semver.satisfies(f,h);return j().satisfies(f,h,{loose:!0})}var k;var A=()=>{};
3
- export{B as qR,C as rR,D as sR,E as tR,A as uR};
2
+ import{fda as w,gda as z}from"./cli-w1d8n9g3.js";function j(){if(!k)k=z("semver");return k}function B(f,h){if(typeof Bun<"u")return Bun.semver.order(f,h)===1;return j().gt(f,h,{loose:!0})}function C(f,h){if(typeof Bun<"u")return Bun.semver.order(f,h)>=0;return j().gte(f,h,{loose:!0})}function D(f,h){if(typeof Bun<"u")return Bun.semver.order(f,h)===-1;return j().lt(f,h,{loose:!0})}function E(f,h){if(typeof Bun<"u")return Bun.semver.satisfies(f,h);return j().satisfies(f,h,{loose:!0})}var k;var A=()=>{};
3
+ export{B as nR,C as oR,D as pR,E as qR,A as rR};
@@ -1,5 +1,5 @@
1
1
  // @bun
2
- import{aK as TJ,eK as WV,lh as DJ,nh as uJ,rh as IJ,sh as BJ,tJ as FJ,th as hJ}from"./cli-5pb6kdxn.js";import{BW as WJ,KW as mJ,N3 as NJ,e4 as gJ}from"./cli-9hskw92e.js";import{Z4 as qJ,c5 as kJ}from"./cli-b1dptek2.js";import{$6 as p,Z6 as VJ,w7 as fJ}from"./cli-nj726gac.js";import{D7 as c,E7 as PJ}from"./cli-hpzy0mat.js";import{B8 as bJ,w8 as L}from"./cli-3bxtq5dc.js";import{I8 as j,J8 as yJ}from"./cli-mx6xk0dw.js";import{U8 as f,V8 as LJ}from"./cli-s5epnnj5.js";import{T9 as e,Z9 as wJ,h_ as JJ,l_ as zJ,r_ as Q,u_ as SJ}from"./cli-a98b285v.js";import{$_ as CJ,__ as AJ}from"./cli-w754xmyv.js";import{bda as XJ}from"./cli-x514vyva.js";class d{paths=[];lowerPaths=[];charBits=new Int32Array(0);pathLens=new Uint16Array(0);topLevelCache=null;readyCount=0;loadFromFileList(J){let W=new Set,Z=[];for(let V of J)if(V.length>0&&!W.has(V))W.add(V),Z.push(V);this.buildIndex(Z)}loadFromFileListAsync(J){let W=()=>{},Z=new Promise((Y)=>{W=Y}),V=this.buildAsync(J,W);return{queryable:Z,done:V}}async buildAsync(J,W){let Z=new Set,V=[],Y=performance.now();for(let $=0;$<J.length;$++){let _=J[$];if(_.length>0&&!Z.has(_))Z.add(_),V.push(_);if(($&255)===255&&performance.now()-Y>4)await y(),Y=performance.now()}this.resetArrays(V),Y=performance.now();let H=!0;for(let $=0;$<V.length;$++)if(this.indexPath($),($&255)===255&&performance.now()-Y>4){if(this.readyCount=$+1,H)W(),H=!1;await y(),Y=performance.now()}this.readyCount=V.length,W()}buildIndex(J){this.resetArrays(J);for(let W=0;W<J.length;W++)this.indexPath(W);this.readyCount=J.length}resetArrays(J){let W=J.length;this.paths=J,this.lowerPaths=Array(W),this.charBits=new Int32Array(W),this.pathLens=new Uint16Array(W),this.readyCount=0,this.topLevelCache=RJ(J,100)}indexPath(J){let W=this.paths[J].toLowerCase();this.lowerPaths[J]=W;let Z=W.length;this.pathLens[J]=Z;let V=0;for(let Y=0;Y<Z;Y++){let H=W.charCodeAt(Y);if(H>=97&&H<=122)V|=1<<H-97}this.charBits[J]=V}search(J,W){if(W<=0)return[];if(J.length===0){if(this.topLevelCache)return this.topLevelCache.slice(0,W);return[]}let Z=J!==J.toLowerCase(),V=Z?J:J.toLowerCase(),Y=Math.min(V.length,64),H=Array(Y),$=0;for(let M=0;M<Y;M++){let B=V.charAt(M);H[M]=B;let E=B.charCodeAt(0);if(E>=97&&E<=122)$|=1<<E-97}let _=Y*24+8+32,X=[],N=-1/0,{paths:D,lowerPaths:q,charBits:x,pathLens:U,readyCount:m}=this;J:for(let M=0;M<m;M++){if((x[M]&$)!==$)continue;let B=Z?D[M]:q[M],E=B.indexOf(H[0]);if(E===-1)continue;b[0]=E;let R=0,g=0,u=E;for(let A=1;A<Y;A++){if(E=B.indexOf(H[A],u+1),E===-1)continue J;b[A]=E;let F=E-u-1;if(F===0)g+=4;else R+=3+F*1;u=E}if(X.length===W&&_+g-R<=N)continue;let S=D[M],jJ=U[M],T=Y*16+g-R;T+=HJ(S,b[0],!0);for(let A=1;A<Y;A++)T+=HJ(S,b[A],!1);if(T+=Math.max(0,32-(jJ>>2)),X.length<W){if(X.push({path:S,fuzzScore:T}),X.length===W)X.sort((A,F)=>A.fuzzScore-F.fuzzScore),N=X[0].fuzzScore}else if(T>N){let A=0,F=X.length;while(A<F){let h=A+F>>1;if(X[h].fuzzScore<T)A=h+1;else F=h}X.splice(A,0,{path:S,fuzzScore:T}),X.shift(),N=X[0].fuzzScore}}X.sort((M,B)=>B.fuzzScore-M.fuzzScore);let I=X.length,w=Math.max(I,1),z=Array(I);for(let M=0;M<I;M++){let B=X[M].path,E=M/w,R=B.includes("test")?Math.min(E*1.05,1):E;z[M]={path:B,score:R}}return z}}function HJ(J,W,Z){if(W===0)return Z?8:0;let V=J.charCodeAt(W-1);if(UJ(V))return 8;if(vJ(V)&&GJ(J.charCodeAt(W)))return 6;return 0}function UJ(J){return J===47||J===92||J===45||J===95||J===46||J===32}function vJ(J){return J>=97&&J<=122}function GJ(J){return J>=65&&J<=90}function y(){return new Promise((J)=>setImmediate(J))}function RJ(J,W){let Z=new Set;for(let Y of J){let H=Y.length;for(let _=0;_<Y.length;_++){let X=Y.charCodeAt(_);if(X===47||X===92){H=_;break}}let $=Y.slice(0,H);if($.length>0){if(Z.add($),Z.size>=W)break}}let V=Array.from(Z);return V.sort((Y,H)=>{let $=Y.length-H.length;if($!==0)return $;return Y<H?-1:Y>H?1:0}),V.slice(0,W).map((Y)=>({path:Y,score:0}))}var _J=4,b;var QJ=XJ(()=>{b=new Int32Array(64)});import{statSync as dJ}from"fs";import cJ from"ignore";import*as O from"path";function l(){if(!K)K=new d;return K}function jV(){K=null,v=null,G++,k=null,C=[],ZJ=[],$J=[],YJ.clear(),n=null,s=null,o=0,a=null,i=null,P=null}function KJ(J){let W=J.length,Z=Math.max(1,Math.floor(W/500)),V=-2128831035;for(let Y=0;Y<W;Y+=Z){let H=J[Y];for(let $=0;$<H.length;$++)V=(V^H.charCodeAt($))*16777619|0;V=V*16777619|0}if(W>0){let Y=J[W-1];for(let H=0;H<Y.length;H++)V=(V^Y.charCodeAt(H))*16777619|0}return`${W}:${(V>>>0).toString(16)}`}function pJ(){let J=VJ(j());if(!J)return null;try{return dJ(O.join(J,".git","index")).mtimeMs}catch{return null}}function MJ(J,W,Z){if(Z===W)return J;return J.map((V)=>{let Y=O.join(W,V);return O.relative(Z,Y)})}async function lJ(J){if(J.length===0)return;if(!K||C.length===0)return;let W=await xJ(J),Z=[...C,...ZJ,...$J,...J,...W],V=KJ(Z);if(V===P){Q("[FileIndex] skipped index rebuild \u2014 merged paths unchanged");return}await K.loadFromFileListAsync(Z).done,P=V,Q(`[FileIndex] rebuilt index with ${C.length} tracked + ${J.length} untracked files`)}async function OJ(J,W){let Z=`${J}:${W}`;if(s===Z)return n;let V=JJ(),Y=[".ignore",".rgignore"],H=[...new Set([J,W])],$=cJ(),_=!1,X=H.flatMap((q)=>Y.map((x)=>O.join(q,x))),N=await Promise.all(X.map((q)=>V.readFile(q,{encoding:"utf8"}).catch(()=>null)));for(let[q,x]of N.entries()){if(x===null)continue;$.add(x),_=!0,Q(`[FileIndex] loaded ignore patterns from ${X[q]}`)}let D=_?$:null;return n=D,s=Z,D}async function nJ(J,W){let Z=Date.now();Q("[FileIndex] getFilesUsingGit called");let V=VJ(j());if(!V)return Q("[FileIndex] not a git repo, returning null"),null;try{let Y=j(),H=Date.now(),$=await c(p(),["-c","core.quotepath=false","ls-files","--recurse-submodules"],{timeout:5000,abortSignal:J,cwd:V});if(Q(`[FileIndex] git ls-files (tracked) took ${Date.now()-H}ms`),$.code!==0)return Q(`[FileIndex] git ls-files failed (code=${$.code}, stderr=${$.stderr}), falling back to ripgrep`),null;let _=$.stdout.trim().split(`
2
+ import{ZJ as TJ,bK as WV,lh as DJ,nh as uJ,qJ as FJ,rh as IJ,sh as BJ,th as hJ}from"./cli-me4e2p3e.js";import{EW as WJ,NW as mJ,Q3 as gJ,x3 as NJ}from"./cli-msmzt4c3.js";import{J4 as qJ,O4 as kJ}from"./cli-fghyxar5.js";import{A7 as fJ,b7 as VJ,d7 as p}from"./cli-fdya77ch.js";import{H7 as c,I7 as PJ}from"./cli-p0vh69b9.js";import{L7 as j,M7 as yJ}from"./cli-rvad3yhg.js";import{E8 as L,J8 as bJ}from"./cli-4ewb3q42.js";import{Y8 as f,Z8 as LJ}from"./cli-t9jht3kb.js";import{X9 as e,b_ as wJ,l_ as JJ,p_ as zJ,v_ as Q,y_ as SJ}from"./cli-hke6r0q8.js";import{c$ as AJ,d$ as CJ}from"./cli-3ac555qw.js";import{fda as XJ}from"./cli-w1d8n9g3.js";class d{paths=[];lowerPaths=[];charBits=new Int32Array(0);pathLens=new Uint16Array(0);topLevelCache=null;readyCount=0;loadFromFileList(J){let W=new Set,Z=[];for(let V of J)if(V.length>0&&!W.has(V))W.add(V),Z.push(V);this.buildIndex(Z)}loadFromFileListAsync(J){let W=()=>{},Z=new Promise((Y)=>{W=Y}),V=this.buildAsync(J,W);return{queryable:Z,done:V}}async buildAsync(J,W){let Z=new Set,V=[],Y=performance.now();for(let $=0;$<J.length;$++){let _=J[$];if(_.length>0&&!Z.has(_))Z.add(_),V.push(_);if(($&255)===255&&performance.now()-Y>4)await y(),Y=performance.now()}this.resetArrays(V),Y=performance.now();let H=!0;for(let $=0;$<V.length;$++)if(this.indexPath($),($&255)===255&&performance.now()-Y>4){if(this.readyCount=$+1,H)W(),H=!1;await y(),Y=performance.now()}this.readyCount=V.length,W()}buildIndex(J){this.resetArrays(J);for(let W=0;W<J.length;W++)this.indexPath(W);this.readyCount=J.length}resetArrays(J){let W=J.length;this.paths=J,this.lowerPaths=Array(W),this.charBits=new Int32Array(W),this.pathLens=new Uint16Array(W),this.readyCount=0,this.topLevelCache=RJ(J,100)}indexPath(J){let W=this.paths[J].toLowerCase();this.lowerPaths[J]=W;let Z=W.length;this.pathLens[J]=Z;let V=0;for(let Y=0;Y<Z;Y++){let H=W.charCodeAt(Y);if(H>=97&&H<=122)V|=1<<H-97}this.charBits[J]=V}search(J,W){if(W<=0)return[];if(J.length===0){if(this.topLevelCache)return this.topLevelCache.slice(0,W);return[]}let Z=J!==J.toLowerCase(),V=Z?J:J.toLowerCase(),Y=Math.min(V.length,64),H=Array(Y),$=0;for(let M=0;M<Y;M++){let B=V.charAt(M);H[M]=B;let E=B.charCodeAt(0);if(E>=97&&E<=122)$|=1<<E-97}let _=Y*24+8+32,X=[],N=-1/0,{paths:D,lowerPaths:q,charBits:x,pathLens:U,readyCount:m}=this;J:for(let M=0;M<m;M++){if((x[M]&$)!==$)continue;let B=Z?D[M]:q[M],E=B.indexOf(H[0]);if(E===-1)continue;b[0]=E;let R=0,g=0,u=E;for(let A=1;A<Y;A++){if(E=B.indexOf(H[A],u+1),E===-1)continue J;b[A]=E;let F=E-u-1;if(F===0)g+=4;else R+=3+F*1;u=E}if(X.length===W&&_+g-R<=N)continue;let S=D[M],jJ=U[M],T=Y*16+g-R;T+=HJ(S,b[0],!0);for(let A=1;A<Y;A++)T+=HJ(S,b[A],!1);if(T+=Math.max(0,32-(jJ>>2)),X.length<W){if(X.push({path:S,fuzzScore:T}),X.length===W)X.sort((A,F)=>A.fuzzScore-F.fuzzScore),N=X[0].fuzzScore}else if(T>N){let A=0,F=X.length;while(A<F){let h=A+F>>1;if(X[h].fuzzScore<T)A=h+1;else F=h}X.splice(A,0,{path:S,fuzzScore:T}),X.shift(),N=X[0].fuzzScore}}X.sort((M,B)=>B.fuzzScore-M.fuzzScore);let I=X.length,w=Math.max(I,1),z=Array(I);for(let M=0;M<I;M++){let B=X[M].path,E=M/w,R=B.includes("test")?Math.min(E*1.05,1):E;z[M]={path:B,score:R}}return z}}function HJ(J,W,Z){if(W===0)return Z?8:0;let V=J.charCodeAt(W-1);if(UJ(V))return 8;if(vJ(V)&&GJ(J.charCodeAt(W)))return 6;return 0}function UJ(J){return J===47||J===92||J===45||J===95||J===46||J===32}function vJ(J){return J>=97&&J<=122}function GJ(J){return J>=65&&J<=90}function y(){return new Promise((J)=>setImmediate(J))}function RJ(J,W){let Z=new Set;for(let Y of J){let H=Y.length;for(let _=0;_<Y.length;_++){let X=Y.charCodeAt(_);if(X===47||X===92){H=_;break}}let $=Y.slice(0,H);if($.length>0){if(Z.add($),Z.size>=W)break}}let V=Array.from(Z);return V.sort((Y,H)=>{let $=Y.length-H.length;if($!==0)return $;return Y<H?-1:Y>H?1:0}),V.slice(0,W).map((Y)=>({path:Y,score:0}))}var _J=4,b;var QJ=XJ(()=>{b=new Int32Array(64)});import{statSync as dJ}from"fs";import cJ from"ignore";import*as O from"path";function l(){if(!K)K=new d;return K}function jV(){K=null,v=null,G++,k=null,C=[],ZJ=[],$J=[],YJ.clear(),n=null,s=null,o=0,a=null,i=null,P=null}function KJ(J){let W=J.length,Z=Math.max(1,Math.floor(W/500)),V=-2128831035;for(let Y=0;Y<W;Y+=Z){let H=J[Y];for(let $=0;$<H.length;$++)V=(V^H.charCodeAt($))*16777619|0;V=V*16777619|0}if(W>0){let Y=J[W-1];for(let H=0;H<Y.length;H++)V=(V^Y.charCodeAt(H))*16777619|0}return`${W}:${(V>>>0).toString(16)}`}function pJ(){let J=VJ(j());if(!J)return null;try{return dJ(O.join(J,".git","index")).mtimeMs}catch{return null}}function MJ(J,W,Z){if(Z===W)return J;return J.map((V)=>{let Y=O.join(W,V);return O.relative(Z,Y)})}async function lJ(J){if(J.length===0)return;if(!K||C.length===0)return;let W=await xJ(J),Z=[...C,...ZJ,...$J,...J,...W],V=KJ(Z);if(V===P){Q("[FileIndex] skipped index rebuild \u2014 merged paths unchanged");return}await K.loadFromFileListAsync(Z).done,P=V,Q(`[FileIndex] rebuilt index with ${C.length} tracked + ${J.length} untracked files`)}async function OJ(J,W){let Z=`${J}:${W}`;if(s===Z)return n;let V=JJ(),Y=[".ignore",".rgignore"],H=[...new Set([J,W])],$=cJ(),_=!1,X=H.flatMap((q)=>Y.map((x)=>O.join(q,x))),N=await Promise.all(X.map((q)=>V.readFile(q,{encoding:"utf8"}).catch(()=>null)));for(let[q,x]of N.entries()){if(x===null)continue;$.add(x),_=!0,Q(`[FileIndex] loaded ignore patterns from ${X[q]}`)}let D=_?$:null;return n=D,s=Z,D}async function nJ(J,W){let Z=Date.now();Q("[FileIndex] getFilesUsingGit called");let V=VJ(j());if(!V)return Q("[FileIndex] not a git repo, returning null"),null;try{let Y=j(),H=Date.now(),$=await c(p(),["-c","core.quotepath=false","ls-files","--recurse-submodules"],{timeout:5000,abortSignal:J,cwd:V});if(Q(`[FileIndex] git ls-files (tracked) took ${Date.now()-H}ms`),$.code!==0)return Q(`[FileIndex] git ls-files failed (code=${$.code}, stderr=${$.stderr}), falling back to ripgrep`),null;let _=$.stdout.trim().split(`
3
3
  `).filter(Boolean),X=MJ(_,V,Y),N=await OJ(V,Y);if(N){let q=X.length;X=N.filter(X),Q(`[FileIndex] applied ignore patterns: ${q} -> ${X.length} files`)}C=X;let D=Date.now()-Z;if(Q(`[FileIndex] git ls-files: ${X.length} tracked files in ${D}ms`),f("tengu_file_suggestions_git_ls_files",{file_count:X.length,tracked_count:X.length,untracked_count:0,duration_ms:D}),!k){let q=W?["-c","core.quotepath=false","ls-files","--others","--exclude-standard"]:["-c","core.quotepath=false","ls-files","--others"],x=G;k=c(p(),q,{timeout:1e4,cwd:V}).then(async(U)=>{if(x!==G)return;if(U.code===0){let m=U.stdout.trim().split(`
4
4
  `).filter(Boolean),I=MJ(m,V,Y),w=await OJ(V,Y);if(w&&I.length>0){let z=I.length;I=w.filter(I),Q(`[FileIndex] applied ignore patterns to untracked: ${z} -> ${I.length} files`)}Q(`[FileIndex] background untracked fetch: ${I.length} files`),lJ(I)}}).catch((U)=>{Q(`[FileIndex] background untracked fetch failed: ${U}`)}).finally(()=>{k=null})}return X}catch(Y){return Q(`[FileIndex] git ls-files error: ${e(Y)}`),null}}async function xJ(J){let W=new Set,Z=performance.now();for(let V=0;V<J.length;V++)if(sJ(J,V,V+1,W),(V&255)===255&&performance.now()-Z>_J)await y(),Z=performance.now();return[...W].map((V)=>V+O.sep)}function sJ(J,W,Z,V){for(let Y=W;Y<Z;Y++){let H=O.dirname(J[Y]);while(H!=="."&&!V.has(H)){let $=O.dirname(H);if($===H)break;V.add(H),H=$}}}async function oJ(J){return(await Promise.all(IJ.map((Z)=>BJ(Z,J)))).flatMap((Z)=>Z.map((V)=>V.filePath))}async function aJ(J,W){Q(`[FileIndex] getProjectFiles called, respectGitignore=${W}`);let Z=await nJ(J,W);if(Z!==null)return Q(`[FileIndex] using git ls-files result (${Z.length} files)`),Z;Q("[FileIndex] git ls-files returned null, falling back to ripgrep");let V=Date.now(),Y=["--files","--follow","--hidden","--glob","!.git/","--glob","!.svn/","--glob","!.hg/","--glob","!.bzr/","--glob","!.jj/","--glob","!.sl/"];if(!W)Y.push("--no-ignore-vcs");let $=(await DJ(Y,".",J)).map((X)=>O.relative(j(),X)),_=Date.now()-V;return Q(`[FileIndex] ripgrep: ${$.length} files in ${_}ms`),f("tengu_file_suggestions_ripgrep",{file_count:$.length,duration_ms:_}),$}async function iJ(){let J=AbortSignal.timeout(1e4),W=l();try{let Z=WJ(),V=NJ(),Y=Z.respectGitignore??V.respectGitignore??!0,H=j(),[$,_]=await Promise.all([aJ(J,Y),oJ(H)]);ZJ=_;let X=[...$,..._],N=await xJ(X);$J=N;let D=[...N,...X],q=KJ(D);if(q!==i)await W.loadFromFileListAsync(D).done,i=q,P=null;else Q("[FileIndex] skipped index rebuild \u2014 tracked paths unchanged")}catch(Z){L(Z)}return W}function rJ(J,W){let Z=Math.min(J.length,W.length),V=0;while(V<Z&&J[V]===W[V])V++;return J.substring(0,V)}function UV(J){if(J.length===0)return"";let W=J.map((V)=>V.displayText),Z=W[0];for(let V=1;V<W.length;V++){let Y=W[V];if(Z=rJ(Z,Y),Z==="")return""}return Z}function r(J,W){return{id:`file-${J}`,displayText:J,metadata:W!==void 0?{score:W}:void 0}}function tJ(J,W){return J.search(W,t).map((V)=>r(V.path,V.score))}function EJ(){if(v)return;let J=pJ();if(K){if(!(J!==null&&J!==a)&&Date.now()-o<eJ)return}let W=G,Z=Date.now();l(),v=iJ().then((V)=>{if(W!==G)return V;return v=null,YJ.emit(),a=J,o=Date.now(),Q(`[FileIndex] cache refresh completed in ${Date.now()-Z}ms`),V}).catch((V)=>{if(Q(`[FileIndex] Cache refresh failed: ${e(V)}`),L(V),W===G)v=null;return l()})}async function JV(){let J=JJ(),W=j();try{return(await J.readdir(W)).map((V)=>{let Y=O.join(W,V.name),H=O.relative(W,Y);return V.isDirectory()?H+O.sep:H})}catch(Z){return L(Z),[]}}async function vV(J,W=!1){if(!J&&!W)return[];if(WJ().fileSuggestion?.type==="command"){let V={...FJ(),query:J};return(await TJ(V)).slice(0,t).map(r)}if(J===""||J==="."||J==="./"){let V=await JV();return EJ(),V.slice(0,t).map(r)}let Z=Date.now();try{let V=v!==null;EJ();let Y=J,H="."+O.sep;if(J.startsWith(H))Y=J.substring(2);if(Y.startsWith("~"))Y=qJ(Y);let $=K?tJ(K,Y):[],_=Date.now()-Z;return Q(`[FileIndex] generateFileSuggestions: ${$.length} results in ${_}ms (${V?"partial":"full"} index)`),f("tengu_file_suggestions_query",{duration_ms:_,cache_hit:!V,result_count:$.length,query_length:J.length}),$}catch(V){return L(V),[]}}function GV(J,W,Z,V,Y,H){let $=typeof J==="string"?J:J.displayText,_=W.substring(0,V)+$+W.substring(V+Z.length);Y(_);let X=V+$.length;H(X)}var K=null,v=null,YJ,TV,G=0,k=null,C,ZJ,$J,n=null,s=null,o=0,a=null,i=null,P=null,t=15,eJ=5000;var VV=XJ(()=>{hJ();QJ();LJ();gJ();yJ();SJ();wJ();PJ();zJ();fJ();WV();bJ();kJ();uJ();mJ();CJ();YJ=AJ(),TV=YJ.subscribe,C=[],ZJ=[],$J=[]});
5
- export{TV as xf,jV as yf,UV as zf,EJ as Af,vV as Bf,GV as Cf,VV as Df};
5
+ export{TV as Af,jV as Bf,UV as Cf,EJ as Df,vV as Ef,GV as Ff,VV as Gf};
@@ -1,3 +1,3 @@
1
1
  // @bun
2
- import{U1 as M,V1 as O,e3 as R,i3 as W,nX as x,oX as L,q3 as U}from"./cli-9hskw92e.js";import{p8 as Q,s8 as I}from"./cli-3bxtq5dc.js";import{x9 as P,y9 as H}from"./cli-shz2e0q5.js";import{$9 as N,T9 as w,Z9 as h,d_ as B,r_ as f,u_ as F}from"./cli-a98b285v.js";import{_ca as $,bda as b}from"./cli-x514vyva.js";import V from"axios";import Y from"lodash-es/memoize.js";import{hostname as v}from"os";function X(){return R(G,!1)}function k(){if(!X())return;return y()}function g(){y.cache?.clear?.()}function u(){if(!X())return;let i=x();try{let q=i.read();if(q?.trustedDeviceToken)delete q.trustedDeviceToken,i.update(q)}catch{}y.cache?.clear?.()}async function n(){try{if(!await W(G)){f(`[trusted-device] Gate ${G} is off, skipping enrollment`);return}if(process.env.CLAUDE_TRUSTED_DEVICE_TOKEN){f("[trusted-device] CLAUDE_TRUSTED_DEVICE_TOKEN env var is set, skipping enrollment (env var takes precedence)");return}let{getClaudeAIOAuthTokens:i}=(O(),$(M)),q=i()?.accessToken;if(!q){f("[trusted-device] No OAuth token, skipping enrollment");return}let J=x();if(Q()){f("[trusted-device] Essential traffic only, skipping enrollment");return}let Z=P().BASE_API_URL,m;try{m=await V.post(`${Z}/api/auth/trusted_devices`,{display_name:`Claude Code on ${v()} \xB7 ${process.platform}`},{headers:{Authorization:`Bearer ${q}`,"Content-Type":"application/json"},timeout:1e4,validateStatus:(j)=>j<500})}catch(j){f(`[trusted-device] Enrollment request failed: ${w(j)}`);return}if(m.status!==200&&m.status!==201){f(`[trusted-device] Enrollment failed ${m.status}: ${N(m.data).slice(0,200)}`);return}let z=m.data?.device_token;if(!z||typeof z!=="string"){f("[trusted-device] Enrollment response missing device_token field");return}try{let j=J.read();if(!j){f("[trusted-device] Cannot read storage, skipping token persist");return}j.trustedDeviceToken=z;let K=J.update(j);if(!K.success){f(`[trusted-device] Failed to persist token: ${K.warning??"unknown"}`);return}y.cache?.clear?.(),f(`[trusted-device] Enrolled device_id=${m.data.device_id??"unknown"}`)}catch(j){f(`[trusted-device] Storage write failed: ${w(j)}`)}}catch(i){f(`[trusted-device] Enrollment error: ${w(i)}`)}}var G="tengu_sessions_elevated_auth_enforcement",y;var C=b(()=>{H();U();F();h();I();L();B();y=Y(()=>{let i=process.env.CLAUDE_TRUSTED_DEVICE_TOKEN;if(i)return i;return x().read()?.trustedDeviceToken})});
3
- export{k as bL,g as cL,u as dL,n as eL,C as fL};
2
+ import{E1 as M,F1 as O,Q2 as R,U2 as W,a3 as U,qX as x,rX as L}from"./cli-msmzt4c3.js";import{A8 as I,x8 as Q}from"./cli-4ewb3q42.js";import{B9 as P,C9 as H}from"./cli-kq16afrr.js";import{X9 as w,b_ as h,d_ as N,h_ as B,v_ as f,y_ as F}from"./cli-hke6r0q8.js";import{cda as $,fda as b}from"./cli-w1d8n9g3.js";import V from"axios";import Y from"lodash-es/memoize.js";import{hostname as v}from"os";function X(){return R(G,!1)}function k(){if(!X())return;return y()}function g(){y.cache?.clear?.()}function u(){if(!X())return;let i=x();try{let q=i.read();if(q?.trustedDeviceToken)delete q.trustedDeviceToken,i.update(q)}catch{}y.cache?.clear?.()}async function n(){try{if(!await W(G)){f(`[trusted-device] Gate ${G} is off, skipping enrollment`);return}if(process.env.CLAUDE_TRUSTED_DEVICE_TOKEN){f("[trusted-device] CLAUDE_TRUSTED_DEVICE_TOKEN env var is set, skipping enrollment (env var takes precedence)");return}let{getClaudeAIOAuthTokens:i}=(O(),$(M)),q=i()?.accessToken;if(!q){f("[trusted-device] No OAuth token, skipping enrollment");return}let J=x();if(Q()){f("[trusted-device] Essential traffic only, skipping enrollment");return}let Z=P().BASE_API_URL,m;try{m=await V.post(`${Z}/api/auth/trusted_devices`,{display_name:`Claude Code on ${v()} \xB7 ${process.platform}`},{headers:{Authorization:`Bearer ${q}`,"Content-Type":"application/json"},timeout:1e4,validateStatus:(j)=>j<500})}catch(j){f(`[trusted-device] Enrollment request failed: ${w(j)}`);return}if(m.status!==200&&m.status!==201){f(`[trusted-device] Enrollment failed ${m.status}: ${N(m.data).slice(0,200)}`);return}let z=m.data?.device_token;if(!z||typeof z!=="string"){f("[trusted-device] Enrollment response missing device_token field");return}try{let j=J.read();if(!j){f("[trusted-device] Cannot read storage, skipping token persist");return}j.trustedDeviceToken=z;let K=J.update(j);if(!K.success){f(`[trusted-device] Failed to persist token: ${K.warning??"unknown"}`);return}y.cache?.clear?.(),f(`[trusted-device] Enrolled device_id=${m.data.device_id??"unknown"}`)}catch(j){f(`[trusted-device] Storage write failed: ${w(j)}`)}}catch(i){f(`[trusted-device] Enrollment error: ${w(i)}`)}}var G="tengu_sessions_elevated_auth_enforcement",y;var C=b(()=>{H();U();F();h();I();L();B();y=Y(()=>{let i=process.env.CLAUDE_TRUSTED_DEVICE_TOKEN;if(i)return i;return x().read()?.trustedDeviceToken})});
3
+ export{k as _K,g as $K,u as aL,n as bL,C as cL};
@@ -1,3 +1,3 @@
1
1
  // @bun
2
- import{Id as j,Jd as E}from"./cli-zdy5bccv.js";import{CD as f,Ch as W,Fh as v,eD as X,gD as Y,pD as Z,rD as w,vD as _,yD as $}from"./cli-5pb6kdxn.js";import{V3 as V,bV as S,e4 as N,oV as A}from"./cli-9hskw92e.js";import{B8 as T,w8 as Q}from"./cli-3bxtq5dc.js";import{T9 as L,Z9 as K,r_ as B,u_ as R}from"./cli-a98b285v.js";import{bda as y}from"./cli-x514vyva.js";function d(q){if(J=q,G!==null&&G.length>0)q(G),G=null;return()=>{J=null}}async function C(){let q=await Y(),D=X(),x=new Set;for(let[z,h]of Object.entries(q)){let F=D[z]?.autoUpdate;if(F!==void 0?F:S(z,h))x.add(z.toLowerCase())}return x}async function M(q,D){let x=!1;for(let{scope:z}of D)try{let h=await j(q,z);if(h.success&&!h.alreadyUpToDate)x=!0,B(`Plugin autoupdate: updated ${q} from ${h.oldVersion} to ${h.newVersion}`);else if(!h.alreadyUpToDate)B(`Plugin autoupdate: failed to update ${q}: ${h.message}`,{level:"warn"})}catch(h){B(`Plugin autoupdate: error updating ${q}: ${L(h)}`,{level:"warn"})}return x?q:null}async function P(q){let D=_(),x=Object.keys(D.plugins);if(x.length===0)return[];return(await Promise.allSettled(x.map(async(h)=>{let{marketplace:F}=W(h);if(!F||!q.has(F.toLowerCase()))return null;let H=D.plugins[h];if(!H||H.length===0)return null;let O=H.filter($);if(O.length===0)return null;return M(h,O)}))).filter((h)=>h.status==="fulfilled"&&h.value!==null).map((h)=>h.value)}async function m(q){return P(q)}function t(){(async()=>{if(V()){B("Plugin autoupdate: skipped (auto-updater disabled)");return}try{let q=await C();if(q.size===0)return;let x=(await Promise.allSettled(Array.from(q).map(async(h)=>{try{await Z(h,void 0,{disableCredentialHelper:!0})}catch(F){B(`Plugin autoupdate: failed to refresh marketplace ${h}: ${L(F)}`,{level:"warn"})}}))).filter((h)=>h.status==="rejected");if(x.length>0)B(`Plugin autoupdate: ${x.length} marketplace refresh(es) failed`,{level:"warn"});B("Plugin autoupdate: checking installed plugins");let z=await m(q);if(z.length>0)if(J)J(z);else G=z}catch(q){Q(q)}})()}var J=null,G=null;var U=y(()=>{E();N();R();K();T();f();w();v();A()});
3
- export{d as id,P as jd,t as kd,U as ld};
2
+ import{Id as j,Jd as E}from"./cli-q46epwyh.js";import{Ch as W,Fh as v,bD as X,dD as Y,mD as Z,oD as w,sD as _,vD as $,zD as f}from"./cli-me4e2p3e.js";import{F3 as V,Q3 as N,eV as S,rV as A}from"./cli-msmzt4c3.js";import{E8 as Q,J8 as T}from"./cli-4ewb3q42.js";import{X9 as L,b_ as K,v_ as B,y_ as R}from"./cli-hke6r0q8.js";import{fda as y}from"./cli-w1d8n9g3.js";function d(q){if(J=q,G!==null&&G.length>0)q(G),G=null;return()=>{J=null}}async function C(){let q=await Y(),D=X(),x=new Set;for(let[z,h]of Object.entries(q)){let F=D[z]?.autoUpdate;if(F!==void 0?F:S(z,h))x.add(z.toLowerCase())}return x}async function M(q,D){let x=!1;for(let{scope:z}of D)try{let h=await j(q,z);if(h.success&&!h.alreadyUpToDate)x=!0,B(`Plugin autoupdate: updated ${q} from ${h.oldVersion} to ${h.newVersion}`);else if(!h.alreadyUpToDate)B(`Plugin autoupdate: failed to update ${q}: ${h.message}`,{level:"warn"})}catch(h){B(`Plugin autoupdate: error updating ${q}: ${L(h)}`,{level:"warn"})}return x?q:null}async function P(q){let D=_(),x=Object.keys(D.plugins);if(x.length===0)return[];return(await Promise.allSettled(x.map(async(h)=>{let{marketplace:F}=W(h);if(!F||!q.has(F.toLowerCase()))return null;let H=D.plugins[h];if(!H||H.length===0)return null;let O=H.filter($);if(O.length===0)return null;return M(h,O)}))).filter((h)=>h.status==="fulfilled"&&h.value!==null).map((h)=>h.value)}async function m(q){return P(q)}function t(){(async()=>{if(V()){B("Plugin autoupdate: skipped (auto-updater disabled)");return}try{let q=await C();if(q.size===0)return;let x=(await Promise.allSettled(Array.from(q).map(async(h)=>{try{await Z(h,void 0,{disableCredentialHelper:!0})}catch(F){B(`Plugin autoupdate: failed to refresh marketplace ${h}: ${L(F)}`,{level:"warn"})}}))).filter((h)=>h.status==="rejected");if(x.length>0)B(`Plugin autoupdate: ${x.length} marketplace refresh(es) failed`,{level:"warn"});B("Plugin autoupdate: checking installed plugins");let z=await m(q);if(z.length>0)if(J)J(z);else G=z}catch(q){Q(q)}})()}var J=null,G=null;var U=y(()=>{E();N();R();K();T();f();w();v();A()});
3
+ export{d as ud,P as vd,t as wd,U as xd};
@@ -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 _ca,r as $ca,s as ada,t as bda,u as cda,v as dda,w as eda};
3
+ export{q as cda,r as dda,s as eda,t as fda,u as gda,v as hda,w as ida};
@@ -0,0 +1,3 @@
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};
@@ -1,5 +1,5 @@
1
1
  // @bun
2
- import{kd as UJ,ld as oJ}from"./cli-6qhwqfwp.js";import{Ff as LJ,Gf as nJ}from"./cli-v3mf1g0z.js";import{AK as xJ,Bg as r,Eg as bJ,Fo as KJ,HK as h,Hk as E,Ik as m,Jo as SJ,LE as k,MK as l,PF as YJ,QF as IJ,RI as CJ,YE as a,gs as R,iH as zJ,il as vJ,ks as qJ,lE as t,ll as S,ls as QJ,mB as wJ,ml as c,ms as hJ,nB as iJ,rE as e,wp as ZJ,xK as VJ,xp as kJ}from"./cli-5pb6kdxn.js";import{CW as $J,JW as GJ,KW as jJ,PY as s,oZ as _J,q3 as MJ}from"./cli-9hskw92e.js";import{A4 as EJ,v4 as OJ,w4 as P,y4 as y}from"./cli-v2hg35qk.js";import{B8 as j,j8 as C,k8 as TJ,w8 as w}from"./cli-3bxtq5dc.js";import{I8 as o,J8 as NJ}from"./cli-mx6xk0dw.js";import{U8 as A,V8 as n}from"./cli-s5epnnj5.js";import{S9 as T,Z9 as f,d_ as FJ,h_ as N,l_ as HJ,r_ as F,u_ as RJ}from"./cli-a98b285v.js";import{B_ as M,O_ as AJ}from"./cli-1qszxdan.js";import{Qaa as d,Zca as i,faa as p}from"./cli-w754xmyv.js";import{cda as I}from"./cli-x514vyva.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-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(`
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>
@@ -16,4 +16,4 @@ Rules:
16
16
  - Preserve the overall format and style
17
17
  - Do not remove existing content unless an improvement explicitly replaces it
18
18
  - Output the complete updated file inside <updated_file> tags`})],systemPrompt:E(["You edit skill definition files to incorporate user preferences. Output only the updated file content."]),thinkingConfig:{type:"disabled"},tools:[],signal:S().signal,options:{getToolPermissionContext:async()=>r(),model:s(),toolChoice:void 0,isNonInteractiveSession:!1,hasAppendSystemPrompt:!1,temperatureOverride:0,agents:[],querySource:"skill_improvement_apply",mcpTools:[]}}),V=k(Z.message.content).trim(),L=e(V,"updated_file");if(!L){w(Error("Skill improvement apply: no updated_file tag in response"));return}try{await G.writeFile($,L,"utf-8")}catch(B){w(T(B))}}i();n();TJ();RJ();AJ();HJ();kJ();EJ();j();qJ();IJ();CJ();hJ();jJ();SJ();xJ();import*as b from"fs/promises";import{homedir as PJ}from"os";import{join as Y}from"path";var yJ=30;function _(){let q=(($J()||{}).cleanupPeriodDays??yJ)*24*60*60*1000;return new Date(Date.now()-q)}function DJ(X,J){return{messages:X.messages+J.messages,errors:X.errors+J.errors}}function gJ(X){let J=X.split(".")[0].replace(/T(\d{2})-(\d{2})-(\d{2})-(\d{3})Z/,"T$1:$2:$3.$4Z");return new Date(J)}async function XJ(X,J,q){let G={messages:0,errors:0};try{let $=await N().readdir(X);for(let K of $)try{if(gJ(K.name)<J)if(await N().unlink(Y(X,K.name)),q)G.messages++;else G.errors++}catch(Q){w(Q)}}catch($){if($ instanceof Error&&"code"in $&&$.code!=="ENOENT")w($)}return G}async function pJ(){let X=N(),J=_(),q=C.errors(),G=C.baseLogs(),$=await XJ(q,J,!1);try{let K;try{K=await X.readdir(G)}catch{return $}let Q=K.filter((Z)=>Z.isDirectory()&&Z.name.startsWith("mcp-logs-")).map((Z)=>Y(G,Z.name));for(let Z of Q)$=DJ($,await XJ(Z,J,!0)),await O(Z,X)}catch(K){if(K instanceof Error&&"code"in K&&K.code!=="ENOENT")w(K)}return $}async function H(X,J,q){if((await q.stat(X)).mtime<J)return await q.unlink(X),!0;return!1}async function O(X,J){try{await J.rmdir(X)}catch{}}async function dJ(){let X=_(),J={messages:0,errors:0},q=zJ(),G=N(),$;try{$=await G.readdir(q)}catch{return J}for(let K of $){if(!K.isDirectory())continue;let Q=Y(q,K.name),Z;try{Z=await G.readdir(Q)}catch{J.errors++;continue}for(let V of Z)if(V.isFile()){if(!V.name.endsWith(".jsonl")&&!V.name.endsWith(".cast"))continue;try{if(await H(Y(Q,V.name),X,G))J.messages++}catch{J.errors++}}else if(V.isDirectory()){let L=Y(Q,V.name),B=Y(L,KJ),z;try{z=await G.readdir(B)}catch{await O(L,G);continue}for(let W of z)if(W.isFile())try{if(await H(Y(B,W.name),X,G))J.messages++}catch{J.errors++}else if(W.isDirectory()){let U=Y(B,W.name),v;try{v=await G.readdir(U)}catch{continue}for(let u of v){if(!u.isFile())continue;try{if(await H(Y(U,u.name),X,G))J.messages++}catch{J.errors++}}await O(U,G)}await O(B,G),await O(L,G)}await O(Q,G)}return J}async function uJ(X,J,q=!0){let G=_(),$={messages:0,errors:0},K=N(),Q;try{Q=await K.readdir(X)}catch{return $}for(let Z of Q){if(!Z.isFile()||!Z.name.endsWith(J))continue;try{if(await H(Y(X,Z.name),G,K))$.messages++}catch{$.errors++}}if(q)await O(X,K);return $}function fJ(){let X=Y(M(),"plans");return uJ(X,".md")}async function mJ(){let X=_(),J={messages:0,errors:0},q=N();try{let G=M(),$=Y(G,"file-history"),K;try{K=await q.readdir($)}catch{return J}let Q=K.filter((Z)=>Z.isDirectory()).map((Z)=>Y($,Z.name));await Promise.all(Q.map(async(Z)=>{try{if((await q.stat(Z)).mtime<X)await q.rm(Z,{recursive:!0,force:!0}),J.messages++}catch{J.errors++}})),await O($,q)}catch(G){w(G)}return J}async function cJ(){let X=_(),J={messages:0,errors:0},q=N();try{let G=M(),$=Y(G,"session-env"),K;try{K=await q.readdir($)}catch{return J}let Q=K.filter((Z)=>Z.isDirectory()).map((Z)=>Y($,Z.name));for(let Z of Q)try{if((await q.stat(Z)).mtime<X)await q.rm(Z,{recursive:!0,force:!0}),J.messages++}catch{J.errors++}await O($,q)}catch(G){w(G)}return J}async function aJ(){let X=_(),J={messages:0,errors:0},q=N(),G=Y(M(),"debug"),$;try{$=await q.readdir(G)}catch{return J}for(let K of $){if(!K.isFile()||!K.name.endsWith(".txt")||K.name==="latest")continue;try{if(await H(Y(G,K.name),X,q))J.messages++}catch{J.errors++}}return J}var x=86400000;async function D(){let X=Y(M(),".npm-cache-cleanup");try{let $=await b.stat(X);if(Date.now()-$.mtimeMs<x){F("npm cache cleanup: skipping, ran recently");return}}catch{}try{await P(X,{retries:0,realpath:!1})}catch{F("npm cache cleanup: skipping, lock held");return}F("npm cache cleanup: starting");let J=Y(PJ(),".npm","_cacache"),q=5,G=Date.now();try{let $=await import("cacache"),K=G-x,Q=$.ls.stream(J),Z=[];for await(let z of Q)if(z.key.includes("@anthropic-ai/claude-"))Z.push({key:z.key,time:z.time});let V=new Map;for(let z of Z){let W=z.key.lastIndexOf("@"),U=W>0?z.key.slice(0,W):z.key,v=V.get(U)??[];v.push(z),V.set(U,v)}let L=[];for(let[,z]of V){z.sort((W,U)=>U.time-W.time);for(let W=0;W<z.length;W++){let U=z[W];if(U.time<K||W>=q)L.push(U.key)}}await Promise.all(L.map((z)=>$.rm.entry(J,z))),await b.writeFile(X,new Date().toISOString());let B=Date.now()-G;if(L.length>0)F(`npm cache cleanup: Removed ${L.length} old @anthropic-ai entries in ${B}ms`);else F(`npm cache cleanup: completed in ${B}ms`);A("tengu_npm_cache_cleanup",{success:!0,durationMs:B,entriesRemoved:L.length})}catch($){w($),A("tengu_npm_cache_cleanup",{success:!1,durationMs:Date.now()-G})}finally{await y(X,{realpath:!1}).catch(()=>{})}}async function WJ(){let X=Y(M(),".version-cleanup");try{let J=await b.stat(X);if(Date.now()-J.mtimeMs<x){F("version cleanup: skipping, ran recently");return}}catch{}try{await P(X,{retries:0,realpath:!1})}catch{F("version cleanup: skipping, lock held");return}F("version cleanup: starting (throttled)");try{await R(),await b.writeFile(X,new Date().toISOString())}catch(J){w(J)}finally{await y(X,{realpath:!1}).catch(()=>{})}}async function BJ(){let{errors:X}=QJ();if(X.length>0&&GJ("cleanupPeriodDays")){F("Skipping cleanup: settings have validation errors but cleanupPeriodDays was explicitly set. Fix settings errors to enable cleanup.");return}await pJ(),await dJ(),await fJ(),await mJ(),await cJ(),await aJ(),await ZJ(),await YJ(_());let J=await VJ(_());if(J>0)A("tengu_worktree_cleanup",{removed:J});if(process.env.USER_TYPE==="ant")await D()}qJ();oJ();var sJ=86400000,g=600000;function J0(){LJ(),JJ(),wJ(),UJ();let X=!0;async function J(){if(d()&&p()>Date.now()-60000){setTimeout(J,g).unref();return}if(X)X=!1,await BJ();if(d()&&p()>Date.now()-60000){setTimeout(J,g).unref();return}await R()}if(setTimeout(J,g).unref(),process.env.USER_TYPE==="ant")setInterval(()=>{D(),WJ()},sJ).unref()}
19
- export{jX as aa,J0 as ba};
19
+ export{jX as ya,J0 as za};
@@ -1,5 +1,5 @@
1
1
  // @bun
2
- import{Bk as yq,Dr as Kq,Ep as f,Er as Rq,Fp as Qq,Fr as cq,Fs as Bq,Gs as s,Hs as Cq,Or as Xq,Ru as k,Sr as Yq,Su as d,Tr as vq,Tu as Fq,Uu as pq,pG as U,qG as qq,zk as x,zs as a}from"./cli-5pb6kdxn.js";import{VL as r,WL as Pq}from"./cli-2vc9kv40.js";import{HO as n,IO as wq,VO as P,XO as o}from"./cli-s6qk3rbv.js";import{GQ as Z,IQ as q,MQ as w,ZP as i,cQ as Aq,iR as h,yQ as u,zQ as Oq}from"./cli-5wh173wa.js";import{rR as Jq,uR as fq}from"./cli-wn4ywgbv.js";import{CW as Nq,K3 as Hq,KW as Sq,KZ as l,LZ as kq,OZ as _q,YZ as hq,e4 as dq,pX as j,qX as bq}from"./cli-9hskw92e.js";import{R5 as zq,S5 as Tq}from"./cli-3je4vtx7.js";import{B8 as T,w8 as b}from"./cli-3bxtq5dc.js";import{U8 as C,V8 as Mq}from"./cli-s5epnnj5.js";import{bda as S}from"./cli-x514vyva.js";import{useCallback as D,useEffect as v,useRef as Uq,useState as y}from"react";import{jsxDEV as $}from"react/jsx-dev-runtime";function t({onDone:z,startingMessage:W}){let[_]=y(()=>new l),[X,Q]=y({state:"ready_to_start"}),[Y,K]=y(!1),[R,H]=y(!1),[G,A]=y(""),[B,m]=y(0),M=u(),Lq=n().columns-E.length-1;P("confirm:yes",()=>{C("tengu_openai_oauth_success",{}),z()},{context:"Confirmation",isActive:X.state==="success"}),P("confirm:yes",()=>{if(X.state==="error"&&X.toRetry)A(""),Q({state:"about_to_retry",nextState:X.toRetry})},{context:"Confirmation",isActive:X.state==="error"&&!!X.toRetry}),v(()=>{if(G==="c"&&X.state==="waiting_for_login"&&Y&&!R)i(X.url).then((F)=>{if(F)process.stdout.write(F);H(!0),setTimeout(H,2000,!1)}),A("")},[G,X,Y,R]),v(()=>{if(X.state==="about_to_retry"){let F=setTimeout(Q,1000,X.nextState);return()=>clearTimeout(F)}},[X]);let Iq=D(async(F,O)=>{try{let[L,V]=F.split("#");if(!L||!V){Q({state:"error",message:"Invalid code. Please make sure the full code was copied",toRetry:{state:"waiting_for_login",url:O}});return}C("tengu_openai_oauth_manual_entry",{}),_.handleManualAuthCodeInput({authorizationCode:L,state:V})}catch(L){b(L),Q({state:"error",message:L.message,toRetry:{state:"waiting_for_login",url:O}})}},[_]),c=D(async()=>{try{C("tengu_openai_oauth_flow_start",{});let F=await _.startOAuthFlow(async(L)=>{Q({state:"waiting_for_login",url:L}),setTimeout(K,3000,!0)}),O=await a(F);Q({state:"success",warning:O}),s({message:"UnieAI Code Haha OpenAI login successful",notificationType:"auth_success"},M)}catch(F){let O=F.message,L=x(F);b(F),Q({state:"error",message:L??O,toRetry:{state:"ready_to_start"}}),C("tengu_openai_oauth_error",{error:O,ssl_error:L!==null})}},[_,M]),g=Uq(!1);v(()=>{if(X.state==="ready_to_start"&&!g.current)g.current=!0,process.nextTick(()=>{c(),g.current=!1})},[X.state,c]),v(()=>{return()=>{_.cleanup()}},[_]);let p=j();return $(Z,{flexDirection:"column",gap:1,children:[X.state==="waiting_for_login"&&Y&&$(Z,{flexDirection:"column",gap:1,paddingBottom:1,children:[$(Z,{paddingX:1,children:[$(q,{dimColor:!0,children:["Browser didn't open? Use the url below to sign in"," "]},void 0,!0,void 0,this),R?$(q,{color:"success",children:"(Copied!)"},void 0,!1,void 0,this):$(q,{dimColor:!0,children:$(r,{shortcut:"c",action:"copy",parens:!0},void 0,!1,void 0,this)},void 0,!1,void 0,this)]},void 0,!0,void 0,this),$(w,{url:X.url,children:$(q,{dimColor:!0,children:X.url},void 0,!1,void 0,this)},void 0,!1,void 0,this)]},"urlToCopy",!0,void 0,this),$(Z,{flexDirection:"column",gap:1,children:[$(q,{bold:!0,children:W??"UnieAI Code can also run through your ChatGPT subscription via OpenAI auth."},void 0,!1,void 0,this),X.state==="waiting_for_login"&&!Y&&$(Z,{children:[$(k,{},void 0,!1,void 0,this),$(q,{children:"Opening browser to sign in to OpenAI\u2026"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),X.state==="waiting_for_login"&&Y&&$(Z,{children:[$(q,{children:E},void 0,!1,void 0,this),$(U,{value:G,onChange:A,onSubmit:(F)=>Iq(F,X.url),cursorOffset:B,onChangeCursorOffset:m,columns:Lq,mask:"*"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),X.state==="about_to_retry"&&$(Z,{flexDirection:"column",gap:1,children:$(q,{color:"permission",children:"Retrying\u2026"},void 0,!1,void 0,this)},void 0,!1,void 0,this),X.state==="success"&&$(Z,{flexDirection:"column",children:[p?.email?$(q,{dimColor:!0,children:["Logged in as ",$(q,{children:p.email},void 0,!1,void 0,this)]},void 0,!0,void 0,this):null,X.warning?$(q,{color:"warning",children:X.warning},void 0,!1,void 0,this):null,$(q,{color:"success",children:["Login successful. Press ",$(q,{bold:!0,children:"Enter"},void 0,!1,void 0,this)," to continue\u2026"]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),X.state==="error"&&$(Z,{flexDirection:"column",gap:1,children:[$(q,{color:"error",children:["OpenAI OAuth error: ",X.message]},void 0,!0,void 0,this),X.toRetry&&$(Z,{marginTop:1,children:$(q,{color:"permission",children:["Press ",$(q,{bold:!0,children:"Enter"},void 0,!1,void 0,this)," to retry."]},void 0,!0,void 0,this)},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)}var E="Paste code here if prompted > ";var e=S(()=>{Mq();Bq();wq();Aq();Oq();h();o();yq();Cq();kq();bq();T();Pq();d();qq()});import{useEffect as mq,useState as gq}from"react";import{jsxDEV as N}from"react/jsx-dev-runtime";function Zq({onDone:z}){let[W,_]=gq({state:"checking"});mq(()=>{let Q=!1;return(async()=>{try{let Y=await Xq("latest");if(Q)return;if(!Y||Jq(MACRO.VERSION,Y)){z();return}_({state:"available",latest:Y})}catch(Y){b(Y),z()}})(),()=>{Q=!0}},[]);async function X(Q){_({state:"updating",latest:Q});try{let Y=await Yq(Q);if(Y==="success"||Y==="in_progress")_({state:"updated",latest:Q}),setTimeout(()=>process.exit(0),1200);else _({state:"error",latest:Q,message:`Update did not complete (${Y}). Run: npm i -g @unieai/code@latest`})}catch(Y){b(Y),_({state:"error",latest:Q,message:"Update failed. Run: npm i -g @unieai/code@latest"})}}if(W.state==="checking")return N(Z,{marginTop:1,children:[N(k,{},void 0,!1,void 0,this),N(q,{children:" Checking for updates\u2026"},void 0,!1,void 0,this)]},void 0,!0,void 0,this);if(W.state==="updating")return N(Z,{marginTop:1,children:[N(k,{},void 0,!1,void 0,this),N(q,{children:[" Updating to v",W.latest,"\u2026"]},void 0,!0,void 0,this)]},void 0,!0,void 0,this);if(W.state==="updated")return N(Z,{flexDirection:"column",marginTop:1,children:N(q,{color:"success",children:["Updated to v",W.latest,". Restarting \u2014 run `unieai` again."]},void 0,!0,void 0,this)},void 0,!1,void 0,this);if(W.state==="error")return N(Z,{flexDirection:"column",gap:1,marginTop:1,children:[N(q,{color:"error",children:W.message},void 0,!1,void 0,this),N(f,{options:[{label:N(q,{children:"Continue"},void 0,!1,void 0,this),value:"skip"}],onChange:()=>z()},void 0,!1,void 0,this)]},void 0,!0,void 0,this);return N(Z,{flexDirection:"column",gap:1,marginTop:1,children:[N(q,{bold:!0,children:["A new version of UnieAI Code is available:"," ",N(q,{color:"suggestion",children:["v",W.latest]},void 0,!0,void 0,this)," ",N(q,{dimColor:!0,children:["(current v",MACRO.VERSION,")"]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),N(f,{options:[{label:N(q,{children:["Update now and restart \xB7"," ",N(q,{dimColor:!0,children:["install v",W.latest,", then relaunch"]},void 0,!0,void 0,this),`
2
+ import{Bk as yq,Cs as Bq,Ds as s,Ep as f,Es as Cq,Fp as Qq,Lr as Xq,Ou as k,Pr as Yq,Pu as d,Qr as vq,Qu as Fq,Ru as pq,mG as U,nG as qq,ws as a,zk as x}from"./cli-me4e2p3e.js";import{SL as r,TL as Pq}from"./cli-xfsqvp8r.js";import{EO as n,FO as wq,SO as P,UO as o}from"./cli-akcxtvv9.js";import{$P as Aq,DQ as Z,FQ as q,JQ as w,WP as i,fR as h,vQ as u,wQ as Oq}from"./cli-x8xgga1a.js";import{oR as Jq,rR as fq}from"./cli-v9f860t5.js";import{LR as Kq,NR as Rq,OR as cq}from"./cli-8hxz2qs6.js";import{FW as Nq,NW as Sq,NZ as l,OZ as kq,Q3 as dq,sX as j,tX as bq,u3 as Hq}from"./cli-msmzt4c3.js";import{B5 as zq,C5 as Tq}from"./cli-k4v08k8t.js";import{I5 as _q,S5 as hq}from"./cli-w52yvzkn.js";import{E8 as b,J8 as T}from"./cli-4ewb3q42.js";import{Y8 as C,Z8 as Mq}from"./cli-t9jht3kb.js";import{fda as S}from"./cli-w1d8n9g3.js";import{useCallback as D,useEffect as v,useRef as Uq,useState as y}from"react";import{jsxDEV as $}from"react/jsx-dev-runtime";function t({onDone:z,startingMessage:W}){let[_]=y(()=>new l),[X,Q]=y({state:"ready_to_start"}),[Y,K]=y(!1),[R,H]=y(!1),[G,A]=y(""),[B,m]=y(0),M=u(),Lq=n().columns-E.length-1;P("confirm:yes",()=>{C("tengu_openai_oauth_success",{}),z()},{context:"Confirmation",isActive:X.state==="success"}),P("confirm:yes",()=>{if(X.state==="error"&&X.toRetry)A(""),Q({state:"about_to_retry",nextState:X.toRetry})},{context:"Confirmation",isActive:X.state==="error"&&!!X.toRetry}),v(()=>{if(G==="c"&&X.state==="waiting_for_login"&&Y&&!R)i(X.url).then((F)=>{if(F)process.stdout.write(F);H(!0),setTimeout(H,2000,!1)}),A("")},[G,X,Y,R]),v(()=>{if(X.state==="about_to_retry"){let F=setTimeout(Q,1000,X.nextState);return()=>clearTimeout(F)}},[X]);let Iq=D(async(F,O)=>{try{let[L,V]=F.split("#");if(!L||!V){Q({state:"error",message:"Invalid code. Please make sure the full code was copied",toRetry:{state:"waiting_for_login",url:O}});return}C("tengu_openai_oauth_manual_entry",{}),_.handleManualAuthCodeInput({authorizationCode:L,state:V})}catch(L){b(L),Q({state:"error",message:L.message,toRetry:{state:"waiting_for_login",url:O}})}},[_]),c=D(async()=>{try{C("tengu_openai_oauth_flow_start",{});let F=await _.startOAuthFlow(async(L)=>{Q({state:"waiting_for_login",url:L}),setTimeout(K,3000,!0)}),O=await a(F);Q({state:"success",warning:O}),s({message:"UnieAI Code Haha OpenAI login successful",notificationType:"auth_success"},M)}catch(F){let O=F.message,L=x(F);b(F),Q({state:"error",message:L??O,toRetry:{state:"ready_to_start"}}),C("tengu_openai_oauth_error",{error:O,ssl_error:L!==null})}},[_,M]),g=Uq(!1);v(()=>{if(X.state==="ready_to_start"&&!g.current)g.current=!0,process.nextTick(()=>{c(),g.current=!1})},[X.state,c]),v(()=>{return()=>{_.cleanup()}},[_]);let p=j();return $(Z,{flexDirection:"column",gap:1,children:[X.state==="waiting_for_login"&&Y&&$(Z,{flexDirection:"column",gap:1,paddingBottom:1,children:[$(Z,{paddingX:1,children:[$(q,{dimColor:!0,children:["Browser didn't open? Use the url below to sign in"," "]},void 0,!0,void 0,this),R?$(q,{color:"success",children:"(Copied!)"},void 0,!1,void 0,this):$(q,{dimColor:!0,children:$(r,{shortcut:"c",action:"copy",parens:!0},void 0,!1,void 0,this)},void 0,!1,void 0,this)]},void 0,!0,void 0,this),$(w,{url:X.url,children:$(q,{dimColor:!0,children:X.url},void 0,!1,void 0,this)},void 0,!1,void 0,this)]},"urlToCopy",!0,void 0,this),$(Z,{flexDirection:"column",gap:1,children:[$(q,{bold:!0,children:W??"UnieAI Code can also run through your ChatGPT subscription via OpenAI auth."},void 0,!1,void 0,this),X.state==="waiting_for_login"&&!Y&&$(Z,{children:[$(k,{},void 0,!1,void 0,this),$(q,{children:"Opening browser to sign in to OpenAI\u2026"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),X.state==="waiting_for_login"&&Y&&$(Z,{children:[$(q,{children:E},void 0,!1,void 0,this),$(U,{value:G,onChange:A,onSubmit:(F)=>Iq(F,X.url),cursorOffset:B,onChangeCursorOffset:m,columns:Lq,mask:"*"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),X.state==="about_to_retry"&&$(Z,{flexDirection:"column",gap:1,children:$(q,{color:"permission",children:"Retrying\u2026"},void 0,!1,void 0,this)},void 0,!1,void 0,this),X.state==="success"&&$(Z,{flexDirection:"column",children:[p?.email?$(q,{dimColor:!0,children:["Logged in as ",$(q,{children:p.email},void 0,!1,void 0,this)]},void 0,!0,void 0,this):null,X.warning?$(q,{color:"warning",children:X.warning},void 0,!1,void 0,this):null,$(q,{color:"success",children:["Login successful. Press ",$(q,{bold:!0,children:"Enter"},void 0,!1,void 0,this)," to continue\u2026"]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),X.state==="error"&&$(Z,{flexDirection:"column",gap:1,children:[$(q,{color:"error",children:["OpenAI OAuth error: ",X.message]},void 0,!0,void 0,this),X.toRetry&&$(Z,{marginTop:1,children:$(q,{color:"permission",children:["Press ",$(q,{bold:!0,children:"Enter"},void 0,!1,void 0,this)," to retry."]},void 0,!0,void 0,this)},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)}var E="Paste code here if prompted > ";var e=S(()=>{Mq();Bq();wq();Aq();Oq();h();o();yq();Cq();kq();bq();T();Pq();d();qq()});import{useEffect as mq,useState as gq}from"react";import{jsxDEV as N}from"react/jsx-dev-runtime";function Zq({onDone:z}){let[W,_]=gq({state:"checking"});mq(()=>{let Q=!1;return(async()=>{try{let Y=await Xq("latest");if(Q)return;if(!Y||Jq(MACRO.VERSION,Y)){z();return}_({state:"available",latest:Y})}catch(Y){b(Y),z()}})(),()=>{Q=!0}},[]);async function X(Q){_({state:"updating",latest:Q});try{let Y=await Yq(Q);if(Y==="success"||Y==="in_progress")_({state:"updated",latest:Q}),setTimeout(()=>process.exit(0),1200);else _({state:"error",latest:Q,message:`Update did not complete (${Y}). Run: npm i -g @unieai/code@latest`})}catch(Y){b(Y),_({state:"error",latest:Q,message:"Update failed. Run: npm i -g @unieai/code@latest"})}}if(W.state==="checking")return N(Z,{marginTop:1,children:[N(k,{},void 0,!1,void 0,this),N(q,{children:" Checking for updates\u2026"},void 0,!1,void 0,this)]},void 0,!0,void 0,this);if(W.state==="updating")return N(Z,{marginTop:1,children:[N(k,{},void 0,!1,void 0,this),N(q,{children:[" Updating to v",W.latest,"\u2026"]},void 0,!0,void 0,this)]},void 0,!0,void 0,this);if(W.state==="updated")return N(Z,{flexDirection:"column",marginTop:1,children:N(q,{color:"success",children:["Updated to v",W.latest,". Restarting \u2014 run `unieai` again."]},void 0,!0,void 0,this)},void 0,!1,void 0,this);if(W.state==="error")return N(Z,{flexDirection:"column",gap:1,marginTop:1,children:[N(q,{color:"error",children:W.message},void 0,!1,void 0,this),N(f,{options:[{label:N(q,{children:"Continue"},void 0,!1,void 0,this),value:"skip"}],onChange:()=>z()},void 0,!1,void 0,this)]},void 0,!0,void 0,this);return N(Z,{flexDirection:"column",gap:1,marginTop:1,children:[N(q,{bold:!0,children:["A new version of UnieAI Code is available:"," ",N(q,{color:"suggestion",children:["v",W.latest]},void 0,!0,void 0,this)," ",N(q,{dimColor:!0,children:["(current v",MACRO.VERSION,")"]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),N(f,{options:[{label:N(q,{children:["Update now and restart \xB7"," ",N(q,{dimColor:!0,children:["install v",W.latest,", then relaunch"]},void 0,!0,void 0,this),`
3
3
  `]},void 0,!0,void 0,this),value:"update"},{label:N(q,{children:["Skip for now \xB7"," ",N(q,{dimColor:!0,children:["keep using v",MACRO.VERSION]},void 0,!0,void 0,this),`
4
4
  `]},void 0,!0,void 0,this),value:"skip"}],onChange:(Q)=>{if(Q==="update")X(W.latest);else z()}},void 0,!1,void 0,this)]},void 0,!0,void 0,this)}var $q=S(()=>{h();Qq();d();vq();T();fq()});import{useEffect as Vq,useMemo as Gq,useState as I}from"react";import{jsxDEV as J}from"react/jsx-dev-runtime";function Dq({onBack:z}){return P("confirm:yes",()=>{z()},{context:"Confirmation",isActive:!0}),J(Z,{flexDirection:"column",gap:1,marginTop:1,children:[J(q,{bold:!0,children:"Using 3rd-party platforms"},void 0,!1,void 0,this),J(q,{children:"UnieAI Code supports Amazon Bedrock, Microsoft Foundry, and Vertex AI. Set the required environment variables, then restart UnieAI Code."},void 0,!1,void 0,this),J(q,{children:"If you are part of an enterprise organization, contact your administrator for setup instructions."},void 0,!1,void 0,this),J(Z,{flexDirection:"column",children:[J(q,{bold:!0,children:"Documentation:"},void 0,!1,void 0,this),J(q,{children:["\xB7 Amazon Bedrock:"," ",J(w,{url:"https://code.claude.com/docs/en/amazon-bedrock"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),J(q,{children:["\xB7 Microsoft Foundry:"," ",J(w,{url:"https://code.claude.com/docs/en/microsoft-foundry"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),J(q,{children:["\xB7 Vertex AI:"," ",J(w,{url:"https://code.claude.com/docs/en/google-vertex-ai"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),J(q,{dimColor:!0,children:["Press ",J(q,{bold:!0,children:"Enter"},void 0,!1,void 0,this)," to go back to login options."]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)}function hJ({onDone:z,startingMessage:W}){let X=(Nq()||{}).forceLoginMethod,[Q,Y]=I(()=>{if(X==="claudeai"||X==="console")return X;return"idle"}),[K,R]=I(null),[H,G]=I(null),[A,B]=I(!1),m=Gq(()=>[{label:J(q,{children:["UnieAI Studio \xB7"," ",J(q,{dimColor:!0,children:"Sign in with your UnieAI Studio account"},void 0,!1,void 0,this),`
5
5
  `]},void 0,!0,void 0,this),value:"unieai"},{label:J(q,{children:["Company UnieAI Studio \xB7"," ",J(q,{dimColor:!0,children:"Sign in with your company's Studio URL"},void 0,!1,void 0,this),`
@@ -1,3 +1,3 @@
1
1
  // @bun
2
- import{Ep as X,dr as i}from"./cli-5pb6kdxn.js";import{$L as J,aM as D}from"./cli-2vc9kv40.js";import{GQ as e,IQ as O,MQ as u,iR as N}from"./cli-5wh173wa.js";import{T3 as n,e4 as A}from"./cli-9hskw92e.js";import{U8 as k,V8 as y}from"./cli-s5epnnj5.js";import{bda as W}from"./cli-x514vyva.js";import{c}from"react/compiler-runtime";import S from"react";import{jsxDEV as _}from"react/jsx-dev-runtime";function s(K){let q=c(18),{onDone:Y,isStandaloneDialog:m,externalIncludes:P}=K,p;if(q[0]===Symbol.for("react.memo_cache_sentinel"))p=[],q[0]=p;else p=q[0];S.useEffect(R,p);let j;if(q[1]!==Y)j=(T)=>{if(T==="no")k("tengu_claude_md_external_includes_dialog_declined",{}),n(Z);else k("tengu_claude_md_external_includes_dialog_accepted",{}),n(b);Y()},q[1]=Y,q[2]=j;else j=q[2];let f=j,w;if(q[3]!==f)w=()=>{f("no")},q[3]=f,q[4]=w;else w=q[4];let h=w,H=!m,a=!m,z;if(q[5]===Symbol.for("react.memo_cache_sentinel"))z=_(O,{children:"This project's CLAUDE.md imports files outside the current working directory. Never allow this for third-party repositories."},void 0,!1,void 0,this),q[5]=z;else z=q[5];let r;if(q[6]!==P)r=P&&P.length>0&&_(e,{flexDirection:"column",children:[_(O,{dimColor:!0,children:"External imports:"},void 0,!1,void 0,this),P.map(t)]},void 0,!0,void 0,this),q[6]=P,q[7]=r;else r=q[7];let o;if(q[8]===Symbol.for("react.memo_cache_sentinel"))o=_(O,{dimColor:!0,children:["Important: Only use UnieAI Code with files you trust. Accessing untrusted files may pose security risks"," ",_(u,{url:"https://unieai.com/code/security"},void 0,!1,void 0,this)," "]},void 0,!0,void 0,this),q[8]=o;else o=q[8];let v;if(q[9]===Symbol.for("react.memo_cache_sentinel"))v=[{label:"Yes, allow external imports",value:"yes"},{label:"No, disable external imports",value:"no"}],q[9]=v;else v=q[9];let $;if(q[10]!==f)$=_(X,{options:v,onChange:(T)=>f(T)},void 0,!1,void 0,this),q[10]=f,q[11]=$;else $=q[11];let M;if(q[12]!==h||q[13]!==$||q[14]!==H||q[15]!==a||q[16]!==r)M=_(J,{title:"Allow external CLAUDE.md file imports?",color:"warning",onCancel:h,hideBorder:H,hideInputGuide:a,children:[z,r,o,$]},void 0,!0,void 0,this),q[12]=h,q[13]=$,q[14]=H,q[15]=a,q[16]=r,q[17]=M;else M=q[17];return M}function t(K,q){return _(O,{dimColor:!0,children:[" ",K.path]},q,!0,void 0,this)}function b(K){return{...K,hasClaudeMdExternalIncludesApproved:!0,hasClaudeMdExternalIncludesWarningShown:!0}}function Z(K){return{...K,hasClaudeMdExternalIncludesApproved:!1,hasClaudeMdExternalIncludesWarningShown:!0}}function R(){k("tengu_claude_md_includes_dialog_shown",{})}var G=W(()=>{y();N();A();i();D()});
2
+ import{Ep as X,dr as i}from"./cli-me4e2p3e.js";import{YL as J,ZL as D}from"./cli-xfsqvp8r.js";import{DQ as e,FQ as O,JQ as u,fR as N}from"./cli-x8xgga1a.js";import{D3 as n,Q3 as A}from"./cli-msmzt4c3.js";import{Y8 as k,Z8 as y}from"./cli-t9jht3kb.js";import{fda as W}from"./cli-w1d8n9g3.js";import{c}from"react/compiler-runtime";import S from"react";import{jsxDEV as _}from"react/jsx-dev-runtime";function s(K){let q=c(18),{onDone:Y,isStandaloneDialog:m,externalIncludes:P}=K,p;if(q[0]===Symbol.for("react.memo_cache_sentinel"))p=[],q[0]=p;else p=q[0];S.useEffect(R,p);let j;if(q[1]!==Y)j=(T)=>{if(T==="no")k("tengu_claude_md_external_includes_dialog_declined",{}),n(Z);else k("tengu_claude_md_external_includes_dialog_accepted",{}),n(b);Y()},q[1]=Y,q[2]=j;else j=q[2];let f=j,w;if(q[3]!==f)w=()=>{f("no")},q[3]=f,q[4]=w;else w=q[4];let h=w,H=!m,a=!m,z;if(q[5]===Symbol.for("react.memo_cache_sentinel"))z=_(O,{children:"This project's CLAUDE.md imports files outside the current working directory. Never allow this for third-party repositories."},void 0,!1,void 0,this),q[5]=z;else z=q[5];let r;if(q[6]!==P)r=P&&P.length>0&&_(e,{flexDirection:"column",children:[_(O,{dimColor:!0,children:"External imports:"},void 0,!1,void 0,this),P.map(t)]},void 0,!0,void 0,this),q[6]=P,q[7]=r;else r=q[7];let o;if(q[8]===Symbol.for("react.memo_cache_sentinel"))o=_(O,{dimColor:!0,children:["Important: Only use UnieAI Code with files you trust. Accessing untrusted files may pose security risks"," ",_(u,{url:"https://unieai.com/code/security"},void 0,!1,void 0,this)," "]},void 0,!0,void 0,this),q[8]=o;else o=q[8];let v;if(q[9]===Symbol.for("react.memo_cache_sentinel"))v=[{label:"Yes, allow external imports",value:"yes"},{label:"No, disable external imports",value:"no"}],q[9]=v;else v=q[9];let $;if(q[10]!==f)$=_(X,{options:v,onChange:(T)=>f(T)},void 0,!1,void 0,this),q[10]=f,q[11]=$;else $=q[11];let M;if(q[12]!==h||q[13]!==$||q[14]!==H||q[15]!==a||q[16]!==r)M=_(J,{title:"Allow external CLAUDE.md file imports?",color:"warning",onCancel:h,hideBorder:H,hideInputGuide:a,children:[z,r,o,$]},void 0,!0,void 0,this),q[12]=h,q[13]=$,q[14]=H,q[15]=a,q[16]=r,q[17]=M;else M=q[17];return M}function t(K,q){return _(O,{dimColor:!0,children:[" ",K.path]},q,!0,void 0,this)}function b(K){return{...K,hasClaudeMdExternalIncludesApproved:!0,hasClaudeMdExternalIncludesWarningShown:!0}}function Z(K){return{...K,hasClaudeMdExternalIncludesApproved:!1,hasClaudeMdExternalIncludesWarningShown:!0}}function R(){k("tengu_claude_md_includes_dialog_shown",{})}var G=W(()=>{y();N();A();i();D()});
3
3
  export{s as Ge,G as He};
@@ -1,3 +1,3 @@
1
1
  // @bun
2
- import{bda as j}from"./cli-x514vyva.js";function C(){return`claude-swarm-${process.pid}`}var x="team-lead",y="claude-swarm",z="swarm-view",A="tmux",B="claude-hidden",D="CLAUDE_CODE_TEAMMATE_COMMAND";var k=()=>{};
3
- export{x as VR,y as WR,z as XR,A as YR,B as ZR,C as _R,D as $R,k as aS};
2
+ import{fda as j}from"./cli-w1d8n9g3.js";function C(){return`claude-swarm-${process.pid}`}var x="team-lead",y="claude-swarm",z="swarm-view",A="tmux",B="claude-hidden",D="CLAUDE_CODE_TEAMMATE_COMMAND";var k=()=>{};
3
+ export{x as YR,y as ZR,z as _R,A as $R,B as aS,C as bS,D as cS,k as dS};
@@ -1,3 +1,3 @@
1
1
  // @bun
2
- import{bda as K}from"./cli-x514vyva.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 v_,N as w_,Q as x_,R as y_,S as z_,L as A_};
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_};