@claudiolabs/claudin 0.6.8 → 0.6.9

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 (890) hide show
  1. package/dist/chunks/AgentTool-0.6.9-9rxkpd2w.mjs +1 -0
  2. package/dist/chunks/App-0.6.9-2sr69sb6.mjs +1 -0
  3. package/dist/chunks/ApproveApiKey-0.6.9-qhjbrc90.mjs +1 -0
  4. package/dist/chunks/AssistantSessionChooser-0.6.9-btaax7hk.mjs +1 -0
  5. package/dist/chunks/AutoModeOptInDialog-0.6.9-4a8grmg8.mjs +1 -0
  6. package/dist/chunks/BypassPermissionsModeDialog-0.6.9-jxa6nz5k.mjs +1 -0
  7. package/dist/chunks/ClaudeMdExternalIncludesDialog-0.6.9-nn288md6.mjs +1 -0
  8. package/dist/chunks/ConsoleOAuthFlow-0.6.9-vbwtn6dq.mjs +1 -0
  9. package/dist/chunks/DiffDialog-0.6.9-hpv62yd3.mjs +7 -0
  10. package/dist/chunks/Doctor-0.6.9-tjmn7d05.mjs +1 -0
  11. package/dist/chunks/ExplorerDialog-0.6.9-xm77z99k.mjs +6 -0
  12. package/dist/chunks/Grove-0.6.9-avg93sya.mjs +1 -0
  13. package/dist/chunks/ITermBackend-0.6.9-pk67e59n.mjs +1 -0
  14. package/dist/chunks/InvalidConfigDialog-0.6.9-hjj8wzba.mjs +1 -0
  15. package/dist/chunks/InvalidSettingsDialog-0.6.9-pp8agzjc.mjs +1 -0
  16. package/dist/chunks/MigrationDialog-0.6.9-gqa8pkn6.mjs +1 -0
  17. package/dist/chunks/Onboarding-0.6.9-192qpt8b.mjs +1 -0
  18. package/dist/chunks/ProviderManager-0.6.9-ba2cfwrw.mjs +1 -0
  19. package/dist/chunks/REPL-0.6.9-gzw0s80y.mjs +1 -0
  20. package/dist/chunks/ResumeConversation-0.6.9-s38qycda.mjs +1 -0
  21. package/dist/chunks/SnapshotUpdateDialog-0.6.9-kxmns9zh.mjs +1 -0
  22. package/dist/chunks/TeleportProgress-0.6.9-kr1yf6k8.mjs +1 -0
  23. package/dist/chunks/TeleportRepoMismatchDialog-0.6.9-zmv3c62q.mjs +1 -0
  24. package/dist/chunks/TeleportResumeWrapper-0.6.9-m4jf5dr0.mjs +1 -0
  25. package/dist/chunks/TmuxBackend-0.6.9-b9ax9m6j.mjs +9 -0
  26. package/dist/chunks/ToolSearchTool-0.6.9-kjse2jv1.mjs +1 -0
  27. package/dist/chunks/TrustDialog-0.6.9-dahc1ev9.mjs +1 -0
  28. package/dist/chunks/activeProvider-0.6.9-5jwr5wg3.mjs +1 -0
  29. package/dist/chunks/add-dir-0.6.9-yfzy34qb.mjs +1 -0
  30. package/dist/chunks/agents-0.6.9-0n6mcvce.mjs +110 -0
  31. package/dist/chunks/agents-0.6.9-b31sawy3.mjs +3 -0
  32. package/dist/chunks/api-0.6.9-zdddwgzx.mjs +1 -0
  33. package/dist/chunks/asciicast-0.6.9-bzqqwjta.mjs +1 -0
  34. package/dist/chunks/assistant-0.6.9-7g8mz1p5.mjs +1 -0
  35. package/dist/chunks/auth-0.6.9-hjd8znw9.mjs +1 -0
  36. package/dist/chunks/auth-0.6.9-y5g1mgmg.mjs +1 -0
  37. package/dist/chunks/autoMode-0.6.9-rxq8ymw3.mjs +48 -0
  38. package/dist/chunks/autoUpdater-0.6.9-bpak4p67.mjs +1 -0
  39. package/dist/chunks/backgroundHousekeeping-0.6.9-asafysjv.mjs +1 -0
  40. package/dist/chunks/branch-0.6.9-7nbx2ywt.mjs +4 -0
  41. package/dist/chunks/bridge-0.6.9-1yc7bj8p.mjs +2 -0
  42. package/dist/chunks/bridgeConfig-0.6.9-m23yzban.mjs +1 -0
  43. package/dist/chunks/bridgeEnabled-0.6.9-7njgh7m2.mjs +1 -0
  44. package/dist/chunks/bridgeMain-0.6.9-8py5synr.mjs +88 -0
  45. package/dist/chunks/bridgePointer-0.6.9-j9cxeww1.mjs +1 -0
  46. package/dist/chunks/btw-0.6.9-ma7pmkk5.mjs +1 -0
  47. package/dist/chunks/buddy-0.6.9-1mkd3gdj.mjs +3 -0
  48. package/dist/chunks/cacache-0.6.9-24ya96gj.mjs +1 -0
  49. package/dist/chunks/cache-probe-0.6.9-gsvngvjh.mjs +21 -0
  50. package/dist/chunks/cacheStats-0.6.9-mafdpb09.mjs +4 -0
  51. package/dist/chunks/caches-0.6.9-6j6tyf4b.mjs +1 -0
  52. package/dist/chunks/claudeDesktop-0.6.9-h7d8r8vt.mjs +1 -0
  53. package/dist/chunks/claudemd-0.6.9-51rn86v1.mjs +1 -0
  54. package/dist/chunks/clear-0.6.9-6tv28ch2.mjs +1 -0
  55. package/dist/chunks/clearTerminal-0.6.9-0gh4v4ga.mjs +1 -0
  56. package/dist/chunks/cli-0.6.9-05w6ne3v.mjs +4 -0
  57. package/dist/chunks/cli-0.6.9-0f11memf.mjs +59 -0
  58. package/dist/chunks/cli-0.6.9-0j0w045z.mjs +2 -0
  59. package/dist/chunks/cli-0.6.9-0pfvh3w1.mjs +2 -0
  60. package/dist/chunks/cli-0.6.9-0qtkkmfq.mjs +2 -0
  61. package/dist/chunks/cli-0.6.9-0s223s8s.mjs +18 -0
  62. package/dist/chunks/cli-0.6.9-0t9pwgch.mjs +2 -0
  63. package/dist/chunks/cli-0.6.9-0wmp1q7a.mjs +2 -0
  64. package/dist/chunks/cli-0.6.9-0zey0wyh.mjs +2 -0
  65. package/dist/chunks/cli-0.6.9-143kz7xy.mjs +2 -0
  66. package/dist/chunks/cli-0.6.9-177spsqy.mjs +2 -0
  67. package/dist/chunks/cli-0.6.9-1a1q6vnc.mjs +9 -0
  68. package/dist/chunks/cli-0.6.9-1g9smwnt.mjs +2 -0
  69. package/dist/chunks/cli-0.6.9-268fcggy.mjs +3 -0
  70. package/dist/chunks/cli-0.6.9-2fe32k5y.mjs +2 -0
  71. package/dist/chunks/cli-0.6.9-2ffve69q.mjs +2 -0
  72. package/dist/chunks/cli-0.6.9-2nc79qh3.mjs +2 -0
  73. package/dist/chunks/cli-0.6.9-2zwgc8vn.mjs +2 -0
  74. package/dist/chunks/cli-0.6.9-30djh7wy.mjs +2 -0
  75. package/dist/chunks/cli-0.6.9-31dtrem4.mjs +2 -0
  76. package/dist/chunks/cli-0.6.9-31vx6nd6.mjs +2 -0
  77. package/dist/chunks/cli-0.6.9-35z6rask.mjs +2 -0
  78. package/dist/chunks/cli-0.6.9-3c6mqdk0.mjs +3 -0
  79. package/dist/chunks/cli-0.6.9-47kxmw0y.mjs +3 -0
  80. package/dist/chunks/cli-0.6.9-4e82zcfv.mjs +3 -0
  81. package/dist/chunks/cli-0.6.9-4hmydq2g.mjs +2 -0
  82. package/dist/chunks/cli-0.6.9-4mt6vz89.mjs +2 -0
  83. package/dist/chunks/cli-0.6.9-4nh8xyg8.mjs +3 -0
  84. package/dist/chunks/cli-0.6.9-4tdxta31.mjs +2 -0
  85. package/dist/chunks/cli-0.6.9-4vf40ybe.mjs +2 -0
  86. package/dist/chunks/cli-0.6.9-53jmw39d.mjs +2 -0
  87. package/dist/chunks/cli-0.6.9-5bs313jv.mjs +2 -0
  88. package/dist/chunks/cli-0.6.9-5ssjdjpx.mjs +2 -0
  89. package/dist/chunks/cli-0.6.9-5tam8r4f.mjs +2 -0
  90. package/dist/chunks/cli-0.6.9-618nhe26.mjs +2 -0
  91. package/dist/chunks/cli-0.6.9-64syz6hg.mjs +25 -0
  92. package/dist/chunks/cli-0.6.9-67m8zq43.mjs +2 -0
  93. package/dist/chunks/cli-0.6.9-67ms6qe8.mjs +2 -0
  94. package/dist/chunks/cli-0.6.9-6baq8t33.mjs +6 -0
  95. package/dist/chunks/cli-0.6.9-6c09kxnr.mjs +6 -0
  96. package/dist/chunks/cli-0.6.9-6czn2nk0.mjs +2 -0
  97. package/dist/chunks/cli-0.6.9-6vtgxtwc.mjs +2 -0
  98. package/dist/chunks/cli-0.6.9-703ts6mp.mjs +2 -0
  99. package/dist/chunks/cli-0.6.9-72pqdgfp.mjs +2 -0
  100. package/dist/chunks/cli-0.6.9-72xw2978.mjs +17 -0
  101. package/dist/chunks/cli-0.6.9-75m2z0pe.mjs +2 -0
  102. package/dist/chunks/cli-0.6.9-7c5zf7vm.mjs +2 -0
  103. package/dist/chunks/cli-0.6.9-7cm1vhs1.mjs +2 -0
  104. package/dist/chunks/cli-0.6.9-7e7zn9nj.mjs +42 -0
  105. package/dist/chunks/cli-0.6.9-7jptdarn.mjs +2 -0
  106. package/dist/chunks/cli-0.6.9-7ke3x92f.mjs +2 -0
  107. package/dist/chunks/cli-0.6.9-7p077nar.mjs +2 -0
  108. package/dist/chunks/cli-0.6.9-7s8ys0y7.mjs +2 -0
  109. package/dist/chunks/cli-0.6.9-7zyvegv3.mjs +2 -0
  110. package/dist/chunks/cli-0.6.9-83gnr7zb.mjs +3 -0
  111. package/dist/chunks/cli-0.6.9-8709kpq4.mjs +2 -0
  112. package/dist/chunks/cli-0.6.9-88y94bf5.mjs +2 -0
  113. package/dist/chunks/cli-0.6.9-8984d2qb.mjs +133 -0
  114. package/dist/chunks/cli-0.6.9-8amemx3r.mjs +2 -0
  115. package/dist/chunks/cli-0.6.9-8c45ksaw.mjs +2 -0
  116. package/dist/chunks/cli-0.6.9-8hye8y46.mjs +2 -0
  117. package/dist/chunks/cli-0.6.9-8v4sw3p1.mjs +2 -0
  118. package/dist/chunks/cli-0.6.9-8xxpa4ep.mjs +2 -0
  119. package/dist/chunks/cli-0.6.9-8ymt6nd1.mjs +2 -0
  120. package/dist/chunks/cli-0.6.9-8zqra5w7.mjs +18 -0
  121. package/dist/chunks/cli-0.6.9-97n772v9.mjs +3 -0
  122. package/dist/chunks/cli-0.6.9-9eyrhanm.mjs +3 -0
  123. package/dist/chunks/cli-0.6.9-9tvvnszt.mjs +15 -0
  124. package/dist/chunks/cli-0.6.9-9wvb59y3.mjs +8 -0
  125. package/dist/chunks/cli-0.6.9-9x9r4f8d.mjs +2 -0
  126. package/dist/chunks/cli-0.6.9-9zz415nm.mjs +2 -0
  127. package/dist/chunks/cli-0.6.9-a5zs8qb2.mjs +2 -0
  128. package/dist/chunks/cli-0.6.9-a91pdpbf.mjs +2 -0
  129. package/dist/chunks/cli-0.6.9-acekzr9a.mjs +15 -0
  130. package/dist/chunks/cli-0.6.9-aenf6vb7.mjs +2 -0
  131. package/dist/chunks/cli-0.6.9-ahdefj2b.mjs +2 -0
  132. package/dist/chunks/cli-0.6.9-aqma59cn.mjs +2 -0
  133. package/dist/chunks/cli-0.6.9-az6jyck0.mjs +24 -0
  134. package/dist/chunks/cli-0.6.9-b0y0kf38.mjs +2 -0
  135. package/dist/chunks/cli-0.6.9-bk34v13s.mjs +2 -0
  136. package/dist/chunks/cli-0.6.9-bkvwt4w3.mjs +12 -0
  137. package/dist/chunks/cli-0.6.9-bn2xtan6.mjs +2 -0
  138. package/dist/chunks/cli-0.6.9-cky5efqh.mjs +4 -0
  139. package/dist/chunks/cli-0.6.9-cp5fabjc.mjs +28 -0
  140. package/dist/chunks/cli-0.6.9-csbrfz7b.mjs +2 -0
  141. package/dist/chunks/cli-0.6.9-da750ce8.mjs +2 -0
  142. package/dist/chunks/cli-0.6.9-dhg2zjfr.mjs +2 -0
  143. package/dist/chunks/cli-0.6.9-dvd8t953.mjs +4 -0
  144. package/dist/chunks/cli-0.6.9-ejvhaena.mjs +2 -0
  145. package/dist/chunks/cli-0.6.9-ex3m411t.mjs +2 -0
  146. package/dist/chunks/cli-0.6.9-ey0mcqwk.mjs +2 -0
  147. package/dist/chunks/cli-0.6.9-f8vcjjc6.mjs +2 -0
  148. package/dist/chunks/cli-0.6.9-fc9vqmnf.mjs +2 -0
  149. package/dist/chunks/cli-0.6.9-fd6q2n8f.mjs +5 -0
  150. package/dist/chunks/cli-0.6.9-fepacdf9.mjs +2 -0
  151. package/dist/chunks/cli-0.6.9-fgkzcrmd.mjs +2 -0
  152. package/dist/chunks/cli-0.6.9-fqh9t0h9.mjs +58 -0
  153. package/dist/chunks/cli-0.6.9-fr4y4c0h.mjs +2 -0
  154. package/dist/chunks/cli-0.6.9-frq5etv7.mjs +4 -0
  155. package/dist/chunks/cli-0.6.9-g8vpamhp.mjs +2 -0
  156. package/dist/chunks/cli-0.6.9-gercjmay.mjs +5350 -0
  157. package/dist/chunks/cli-0.6.9-gfqjq2qe.mjs +2 -0
  158. package/dist/chunks/cli-0.6.9-ghdrkvmy.mjs +2 -0
  159. package/dist/chunks/cli-0.6.9-gvkq5xs9.mjs +2 -0
  160. package/dist/chunks/cli-0.6.9-h66ktwkz.mjs +2 -0
  161. package/dist/chunks/cli-0.6.9-h9kchbsc.mjs +6 -0
  162. package/dist/chunks/cli-0.6.9-hk5yv924.mjs +3 -0
  163. package/dist/chunks/cli-0.6.9-hx2vghp7.mjs +50 -0
  164. package/dist/chunks/cli-0.6.9-j94027pe.mjs +2 -0
  165. package/dist/chunks/cli-0.6.9-jfyk8906.mjs +6 -0
  166. package/dist/chunks/cli-0.6.9-jm1v5d99.mjs +2 -0
  167. package/dist/chunks/cli-0.6.9-jvqzvbrh.mjs +2 -0
  168. package/dist/chunks/cli-0.6.9-k0gktpk5.mjs +15 -0
  169. package/dist/chunks/cli-0.6.9-k14bgd9g.mjs +2 -0
  170. package/dist/chunks/cli-0.6.9-k9v9gdzp.mjs +2 -0
  171. package/dist/chunks/cli-0.6.9-kanmrra0.mjs +2 -0
  172. package/dist/chunks/cli-0.6.9-khjkzjgr.mjs +2 -0
  173. package/dist/chunks/cli-0.6.9-knasgz9g.mjs +2 -0
  174. package/dist/chunks/cli-0.6.9-kv2gx7he.mjs +2 -0
  175. package/dist/chunks/cli-0.6.9-kxe1p7p9.mjs +2 -0
  176. package/dist/chunks/cli-0.6.9-m0fs2cnk.mjs +2 -0
  177. package/dist/chunks/cli-0.6.9-m9n8nvmz.mjs +7 -0
  178. package/dist/chunks/cli-0.6.9-mb7kx11j.mjs +2 -0
  179. package/dist/chunks/cli-0.6.9-me596055.mjs +5 -0
  180. package/dist/chunks/cli-0.6.9-mhcym441.mjs +2 -0
  181. package/dist/chunks/cli-0.6.9-mjx2tx8w.mjs +2 -0
  182. package/dist/chunks/cli-0.6.9-mn3sjrek.mjs +2 -0
  183. package/dist/chunks/cli-0.6.9-mn808zcz.mjs +2 -0
  184. package/dist/chunks/cli-0.6.9-n52xxa1k.mjs +3 -0
  185. package/dist/chunks/cli-0.6.9-nahjphjz.mjs +2 -0
  186. package/dist/chunks/cli-0.6.9-njaeg8jw.mjs +4 -0
  187. package/dist/chunks/cli-0.6.9-nm598kmg.mjs +2 -0
  188. package/dist/chunks/cli-0.6.9-ns77j0rb.mjs +2 -0
  189. package/dist/chunks/cli-0.6.9-nyn27tc4.mjs +2 -0
  190. package/dist/chunks/cli-0.6.9-p05qz9pw.mjs +2 -0
  191. package/dist/chunks/cli-0.6.9-p61nt01z.mjs +4 -0
  192. package/dist/chunks/cli-0.6.9-p9sazvks.mjs +2 -0
  193. package/dist/chunks/cli-0.6.9-pc08dfva.mjs +2 -0
  194. package/dist/chunks/cli-0.6.9-pgqqhqcb.mjs +2 -0
  195. package/dist/chunks/cli-0.6.9-prq3ecgt.mjs +2 -0
  196. package/dist/chunks/cli-0.6.9-psmra04s.mjs +2 -0
  197. package/dist/chunks/cli-0.6.9-pxnbcvjk.mjs +2 -0
  198. package/dist/chunks/cli-0.6.9-pyzfty1h.mjs +1 -0
  199. package/dist/chunks/cli-0.6.9-pzdzwxv3.mjs +2 -0
  200. package/dist/chunks/cli-0.6.9-q1k864q5.mjs +24 -0
  201. package/dist/chunks/cli-0.6.9-q1sngnn9.mjs +2 -0
  202. package/dist/chunks/cli-0.6.9-q95j0sxq.mjs +2 -0
  203. package/dist/chunks/cli-0.6.9-qef0vmv4.mjs +2 -0
  204. package/dist/chunks/cli-0.6.9-qfk8bh8k.mjs +20 -0
  205. package/dist/chunks/cli-0.6.9-qq2p34an.mjs +2 -0
  206. package/dist/chunks/cli-0.6.9-qwk9n0r3.mjs +4 -0
  207. package/dist/chunks/cli-0.6.9-r3p8fksb.mjs +2 -0
  208. package/dist/chunks/cli-0.6.9-r46qknk7.mjs +2 -0
  209. package/dist/chunks/cli-0.6.9-r81h8n5p.mjs +2 -0
  210. package/dist/chunks/cli-0.6.9-rcmd16qm.mjs +2 -0
  211. package/dist/chunks/cli-0.6.9-rmmwn2p7.mjs +2 -0
  212. package/dist/chunks/cli-0.6.9-s03y3b3q.mjs +2 -0
  213. package/dist/chunks/cli-0.6.9-s1r1tza8.mjs +133 -0
  214. package/dist/chunks/cli-0.6.9-s2pyty79.mjs +2 -0
  215. package/dist/chunks/cli-0.6.9-s4cwpcyg.mjs +2 -0
  216. package/dist/chunks/cli-0.6.9-sa2fxctp.mjs +2 -0
  217. package/dist/chunks/cli-0.6.9-sd2hp4aq.mjs +2 -0
  218. package/dist/chunks/cli-0.6.9-sg9116zb.mjs +17 -0
  219. package/dist/chunks/cli-0.6.9-sr9jy37c.mjs +3 -0
  220. package/dist/chunks/cli-0.6.9-sx115432.mjs +12 -0
  221. package/dist/chunks/cli-0.6.9-t2yrab6t.mjs +2 -0
  222. package/dist/chunks/cli-0.6.9-tae7g2d9.mjs +2 -0
  223. package/dist/chunks/cli-0.6.9-td7kr6wd.mjs +2 -0
  224. package/dist/chunks/cli-0.6.9-tenfy5s3.mjs +21 -0
  225. package/dist/chunks/cli-0.6.9-tkvj57rn.mjs +2 -0
  226. package/dist/chunks/cli-0.6.9-tn4basxv.mjs +2 -0
  227. package/dist/chunks/cli-0.6.9-tnf75x7v.mjs +2 -0
  228. package/dist/chunks/cli-0.6.9-tt8mt40f.mjs +2 -0
  229. package/dist/chunks/cli-0.6.9-tya05wpq.mjs +2 -0
  230. package/dist/chunks/cli-0.6.9-v3a8d4n8.mjs +12 -0
  231. package/dist/chunks/cli-0.6.9-v3yecwhs.mjs +34 -0
  232. package/dist/chunks/cli-0.6.9-vbzp917y.mjs +3 -0
  233. package/dist/chunks/cli-0.6.9-w56gxnbb.mjs +67 -0
  234. package/dist/chunks/cli-0.6.9-w6ee6p28.mjs +4 -0
  235. package/dist/chunks/cli-0.6.9-wr8a7whz.mjs +2 -0
  236. package/dist/chunks/cli-0.6.9-wrs935pe.mjs +3 -0
  237. package/dist/chunks/cli-0.6.9-x4xhf8vr.mjs +2 -0
  238. package/dist/chunks/cli-0.6.9-x9vbsw98.mjs +2 -0
  239. package/dist/chunks/cli-0.6.9-xd2h9tsn.mjs +2 -0
  240. package/dist/chunks/cli-0.6.9-xdzfwf1n.mjs +2 -0
  241. package/dist/chunks/cli-0.6.9-xpvddrex.mjs +4 -0
  242. package/dist/chunks/cli-0.6.9-y0wg39nk.mjs +2 -0
  243. package/dist/chunks/cli-0.6.9-yh3sfvca.mjs +2 -0
  244. package/dist/chunks/cli-0.6.9-yhp352r8.mjs +193 -0
  245. package/dist/chunks/cli-0.6.9-ymxkw0j9.mjs +5 -0
  246. package/dist/chunks/cli-0.6.9-ynh6kjv5.mjs +2 -0
  247. package/dist/chunks/cli-0.6.9-ytpaqmsk.mjs +45 -0
  248. package/dist/chunks/cli-0.6.9-z2400j8e.mjs +2 -0
  249. package/dist/chunks/cli-0.6.9-z3wh6pmj.mjs +4 -0
  250. package/dist/chunks/cli-0.6.9-z6aaad8t.mjs +10 -0
  251. package/dist/chunks/cli-0.6.9-zsnw0941.mjs +39 -0
  252. package/dist/chunks/cli-0.6.9-zzzn3e8b.mjs +16 -0
  253. package/dist/chunks/client-0.6.9-cz438b8v.mjs +1 -0
  254. package/dist/chunks/color-0.6.9-vdsgnwjj.mjs +1 -0
  255. package/dist/chunks/compact-0.6.9-gp0w7v9s.mjs +3 -0
  256. package/dist/chunks/config-0.6.9-f50cq2by.mjs +1 -0
  257. package/dist/chunks/config-0.6.9-zezbmxp9.mjs +1 -0
  258. package/dist/chunks/constants-0.6.9-d7fjn6ym.mjs +1 -0
  259. package/dist/chunks/context-0.6.9-vs4wf3qj.mjs +1 -0
  260. package/dist/chunks/context-noninteractive-0.6.9-3v8697je.mjs +1 -0
  261. package/dist/chunks/conversation-0.6.9-sq5hwdze.mjs +1 -0
  262. package/dist/chunks/copilotHeaders-0.6.9-kf7a254d.mjs +1 -0
  263. package/dist/chunks/copy-0.6.9-qfs2e58z.mjs +9 -0
  264. package/dist/chunks/cost-0.6.9-w97qsa6d.mjs +1 -0
  265. package/dist/chunks/createSSHSession-0.6.9-9r9vyh4c.mjs +1 -0
  266. package/dist/chunks/createSession-0.6.9-w8bj9hkr.mjs +1 -0
  267. package/dist/chunks/debug-0.6.9-p5c3pfsj.mjs +1 -0
  268. package/dist/chunks/defaultActionDeps-0.6.9-g6wka3f7.mjs +1367 -0
  269. package/dist/chunks/desktop-0.6.9-szcfghe5.mjs +1 -0
  270. package/dist/chunks/detectRepository-0.6.9-sv4rn6e9.mjs +1 -0
  271. package/dist/chunks/detection-0.6.9-avkk26gv.mjs +1 -0
  272. package/dist/chunks/diff-0.6.9-6qtw4swj.mjs +1 -0
  273. package/dist/chunks/doctor-0.6.9-wemp2503.mjs +1 -0
  274. package/dist/chunks/doctorDiagnostic-0.6.9-n4wcbma8.mjs +1 -0
  275. package/dist/chunks/earlyInput-0.6.9-7t2yxx2k.mjs +1 -0
  276. package/dist/chunks/effort-0.6.9-ad6129tk.mjs +10 -0
  277. package/dist/chunks/envLessBridgeConfig-0.6.9-9276szv2.mjs +1 -0
  278. package/dist/chunks/envUtils-0.6.9-ynm3aqgf.mjs +1 -0
  279. package/dist/chunks/environmentSelection-0.6.9-cjwzdh51.mjs +1 -0
  280. package/dist/chunks/environments-0.6.9-s5d4xqep.mjs +1 -0
  281. package/dist/chunks/errors-0.6.9-w9kte9cs.mjs +1 -0
  282. package/dist/chunks/exampleCommands-0.6.9-4056c0dz.mjs +1 -0
  283. package/dist/chunks/exit-0.6.9-j72je7w6.mjs +1 -0
  284. package/dist/chunks/explorer-0.6.9-98k1atn1.mjs +1 -0
  285. package/dist/chunks/export-0.6.9-s9zpgv4f.mjs +2 -0
  286. package/dist/chunks/extra-usage-0.6.9-6nj4st4n.mjs +1 -0
  287. package/dist/chunks/extra-usage-noninteractive-0.6.9-nwh6dbn1.mjs +1 -0
  288. package/dist/chunks/fast-0.6.9-r5349jvd.mjs +1 -0
  289. package/dist/chunks/feedback-0.6.9-ssn1fmcb.mjs +14 -0
  290. package/dist/chunks/firstPartyEventLogger-0.6.9-pm4x6st7.mjs +1 -0
  291. package/dist/chunks/git-0.6.9-y91x52y1.mjs +1 -0
  292. package/dist/chunks/githubModelsCredentials-0.6.9-kfr0nk73.mjs +1 -0
  293. package/dist/chunks/goal-0.6.9-3gwvk3bv.mjs +4 -0
  294. package/dist/chunks/grove-0.6.9-wmv3gysg.mjs +1 -0
  295. package/dist/chunks/growthbook-0.6.9-7ajmx6eh.mjs +1 -0
  296. package/dist/chunks/headless-0.6.9-6ab7stx4.mjs +2 -0
  297. package/dist/chunks/heapdump-0.6.9-1kx1h3ba.mjs +6 -0
  298. package/dist/chunks/help-0.6.9-rf486d17.mjs +1 -0
  299. package/dist/chunks/hookChains-0.6.9-pxna9psh.mjs +3 -0
  300. package/dist/chunks/hooks-0.6.9-wav1pakb.mjs +1 -0
  301. package/dist/chunks/hooks-0.6.9-zc69g73d.mjs +79 -0
  302. package/dist/chunks/ide-0.6.9-kgqwyzh1.mjs +3 -0
  303. package/dist/chunks/image-processor-napi-0.6.9-pa1ny79r.mjs +1 -0
  304. package/dist/chunks/inboundAttachments-0.6.9-jjfdegyr.mjs +1 -0
  305. package/dist/chunks/index-0.6.9-0nqhy7sy.mjs +1 -0
  306. package/dist/chunks/index-0.6.9-1bq0hpw2.mjs +1 -0
  307. package/dist/chunks/index-0.6.9-2snpdxy3.mjs +1 -0
  308. package/dist/chunks/index-0.6.9-5k23gfe9.mjs +1 -0
  309. package/dist/chunks/index-0.6.9-619t4kvv.mjs +9 -0
  310. package/dist/chunks/index-0.6.9-8kfhzkpy.mjs +1 -0
  311. package/dist/chunks/index-0.6.9-902sjqyc.mjs +9 -0
  312. package/dist/chunks/index-0.6.9-a2ssd4wq.mjs +30 -0
  313. package/dist/chunks/index-0.6.9-aqfgsev2.mjs +1 -0
  314. package/dist/chunks/index-0.6.9-arpthr5q.mjs +2 -0
  315. package/dist/chunks/index-0.6.9-bngr20xg.mjs +2 -0
  316. package/dist/chunks/index-0.6.9-ck4qgvty.mjs +1 -0
  317. package/dist/chunks/index-0.6.9-d2vjtgqs.mjs +1 -0
  318. package/dist/chunks/index-0.6.9-e3szhjja.mjs +1 -0
  319. package/dist/chunks/index-0.6.9-efqgg2fb.mjs +1 -0
  320. package/dist/chunks/index-0.6.9-ewht5a34.mjs +5 -0
  321. package/dist/chunks/index-0.6.9-g43bx48w.mjs +1 -0
  322. package/dist/chunks/index-0.6.9-jq16aq9c.mjs +1 -0
  323. package/dist/chunks/index-0.6.9-n4d1shjt.mjs +1 -0
  324. package/dist/chunks/index-0.6.9-r63gj39n.mjs +1 -0
  325. package/dist/chunks/index-0.6.9-rry8n9vj.mjs +1 -0
  326. package/dist/chunks/index-0.6.9-v2xp35sf.mjs +1 -0
  327. package/dist/chunks/index-0.6.9-vev4s22g.mjs +1 -0
  328. package/dist/chunks/init-0.6.9-h8jwxt6h.mjs +1 -0
  329. package/dist/chunks/initReplBridge-0.6.9-c10qt3gn.mjs +1 -0
  330. package/dist/chunks/ink-0.6.9-49s4s9jc.mjs +1 -0
  331. package/dist/chunks/insights-0.6.9-sag6cjh3.mjs +870 -0
  332. package/dist/chunks/install-0.6.9-s1h2dkak.mjs +1 -0
  333. package/dist/chunks/install-github-app-0.6.9-rgv15r8t.mjs +149 -0
  334. package/dist/chunks/install-slack-app-0.6.9-cpn9fgkg.mjs +1 -0
  335. package/dist/chunks/instrumentation-0.6.9-265vgh29.mjs +1 -0
  336. package/dist/chunks/interactiveHelpers-0.6.9-5p2xm7b4.mjs +1 -0
  337. package/dist/chunks/keybindings-0.6.9-8755gwzd.mjs +2 -0
  338. package/dist/chunks/knowledge-0.6.9-vv9d2yhp.mjs +2 -0
  339. package/dist/chunks/latestVersionCache-0.6.9-acef14hs.mjs +1 -0
  340. package/dist/chunks/loadAgentsDir-0.6.9-s5zmmsmj.mjs +1 -0
  341. package/dist/chunks/loadPluginHooks-0.6.9-e65pc8g0.mjs +1 -0
  342. package/dist/chunks/loadPluginHooks-0.6.9-k2ddma7b.mjs +1 -0
  343. package/dist/chunks/log-0.6.9-bb1wwfr9.mjs +1 -0
  344. package/dist/chunks/main-0.6.9-xp3yb12z.mjs +1 -0
  345. package/dist/chunks/managedEnv-0.6.9-9vjjgckq.mjs +1 -0
  346. package/dist/chunks/mcp-0.6.9-3k9qwk6b.mjs +17 -0
  347. package/dist/chunks/mcp-0.6.9-74q0zmbx.mjs +1 -0
  348. package/dist/chunks/mcp-0.6.9-hnmfw09m.mjs +4 -0
  349. package/dist/chunks/mcpb-0.6.9-npmecrdw.mjs +1 -0
  350. package/dist/chunks/memory-0.6.9-r9amy13p.mjs +3 -0
  351. package/dist/chunks/model-0.6.9-j7qkjsh4.mjs +1 -0
  352. package/dist/chunks/model-0.6.9-qvbhjt5a.mjs +2 -0
  353. package/dist/chunks/node-0.6.9-7618k0cs.mjs +12 -0
  354. package/dist/chunks/oauth-0.6.9-10e6vje5.mjs +1 -0
  355. package/dist/chunks/openaiShim-0.6.9-pke3rkx3.mjs +14 -0
  356. package/dist/chunks/output-style-0.6.9-5dww84zv.mjs +1 -0
  357. package/dist/chunks/package-FMOR3ELU-0.6.9-tqcy00ry.mjs +1 -0
  358. package/dist/chunks/parseConnectUrl-0.6.9-rzx7fgrs.mjs +1 -0
  359. package/dist/chunks/parser-0.6.9-r5r8db6m.mjs +1 -0
  360. package/dist/chunks/passes-0.6.9-9ntxdmjs.mjs +1 -0
  361. package/dist/chunks/permissions-0.6.9-06k3424m.mjs +1 -0
  362. package/dist/chunks/permissions-0.6.9-qg4repwk.mjs +3 -0
  363. package/dist/chunks/plan-0.6.9-2bgtj9s7.mjs +1 -0
  364. package/dist/chunks/plist-0.6.9-qwz1tx1x.mjs +1 -0
  365. package/dist/chunks/plugin-0.6.9-tptgr2qf.mjs +29 -0
  366. package/dist/chunks/pluginStartupCheck-0.6.9-9dfate68.mjs +1 -0
  367. package/dist/chunks/plugins-0.6.9-qmzrjgkm.mjs +9 -0
  368. package/dist/chunks/preActionHook-0.6.9-kcp5zkcc.mjs +2 -0
  369. package/dist/chunks/print-0.6.9-m3fbd53e.mjs +57 -0
  370. package/dist/chunks/privacy-settings-0.6.9-16gpzrax.mjs +1 -0
  371. package/dist/chunks/process-0.6.9-3e3f5r17.mjs +1 -0
  372. package/dist/chunks/processBashCommand-0.6.9-542d591h.mjs +1 -0
  373. package/dist/chunks/processSlashCommand-0.6.9-esx1dxzr.mjs +9 -0
  374. package/dist/chunks/prompt-0.6.9-r0j2sxeh.mjs +1 -0
  375. package/dist/chunks/prompt-0.6.9-yqs9hbe5.mjs +1 -0
  376. package/dist/chunks/prompts-0.6.9-aejx76by.mjs +1 -0
  377. package/dist/chunks/protocolHandler-0.6.9-6f15y1bc.mjs +13 -0
  378. package/dist/chunks/provider-0.6.9-cq128p4x.mjs +2 -0
  379. package/dist/chunks/providerProfiles-0.6.9-angsmcpe.mjs +1 -0
  380. package/dist/chunks/providerValidation-0.6.9-jvq9j27j.mjs +6 -0
  381. package/dist/chunks/rate-limit-options-0.6.9-bb7szjxd.mjs +1 -0
  382. package/dist/chunks/registerSubcommands-0.6.9-ntgxbjdf.mjs +34 -0
  383. package/dist/chunks/registry-0.6.9-g3jk5jc0.mjs +1 -0
  384. package/dist/chunks/release-notes-0.6.9-za6qss4x.mjs +5 -0
  385. package/dist/chunks/reload-plugins-0.6.9-4kq8n1bm.mjs +2 -0
  386. package/dist/chunks/remote-env-0.6.9-zf6vx3hg.mjs +1 -0
  387. package/dist/chunks/remoteBridgeCore-0.6.9-pz9x9kkp.mjs +1 -0
  388. package/dist/chunks/remoteSession-0.6.9-b0yejcdh.mjs +1 -0
  389. package/dist/chunks/rename-0.6.9-v12x6k3n.mjs +1 -0
  390. package/dist/chunks/replBridgeHandle-0.6.9-5dnpvxp7.mjs +1 -0
  391. package/dist/chunks/replLauncher-0.6.9-b9vwe3a0.mjs +1 -0
  392. package/dist/chunks/resume-0.6.9-bd2pqpzx.mjs +2 -0
  393. package/dist/chunks/rewind-0.6.9-mtghn6v6.mjs +1 -0
  394. package/dist/chunks/rootOptions-0.6.9-kthybc4f.mjs +1 -0
  395. package/dist/chunks/sandbox-adapter-0.6.9-xy35en8q.mjs +1 -0
  396. package/dist/chunks/sandbox-toggle-0.6.9-5xezm83a.mjs +1 -0
  397. package/dist/chunks/session-0.6.9-m7jcvyhf.mjs +2 -0
  398. package/dist/chunks/sessionDiscovery-0.6.9-xtq2azg8.mjs +1 -0
  399. package/dist/chunks/sessionFileAccessHooks-0.6.9-cw7p2vz4.mjs +1 -0
  400. package/dist/chunks/sessionStorage-0.6.9-cf9hvj5p.mjs +1 -0
  401. package/dist/chunks/settings-0.6.9-3yt2knq2.mjs +1 -0
  402. package/dist/chunks/setup-0.6.9-zyhhsegx.mjs +5 -0
  403. package/dist/chunks/sinks-0.6.9-37az99sx.mjs +1 -0
  404. package/dist/chunks/skills-0.6.9-pmayt9xm.mjs +1 -0
  405. package/dist/chunks/startupProfiler-0.6.9-rqf2vjrq.mjs +1 -0
  406. package/dist/chunks/startupUpdateCheck-0.6.9-2n5g00f9.mjs +1 -0
  407. package/dist/chunks/state-0.6.9-6bv4xar6.mjs +1 -0
  408. package/dist/chunks/stats-0.6.9-vm6c7j7g.mjs +6 -0
  409. package/dist/chunks/status-0.6.9-fm5f7dvn.mjs +1 -0
  410. package/dist/chunks/stickers-0.6.9-wqd21rwz.mjs +1 -0
  411. package/dist/chunks/subprocessEnv-0.6.9-42b0wsjg.mjs +1 -0
  412. package/dist/chunks/tasks-0.6.9-f6fah65x.mjs +1 -0
  413. package/dist/chunks/teamHelpers-0.6.9-0azp8kbe.mjs +1 -0
  414. package/dist/chunks/teammateModeSnapshot-0.6.9-1b3b44py.mjs +1 -0
  415. package/dist/chunks/teleport-0.6.9-y0314abd.mjs +1 -0
  416. package/dist/chunks/terminalSetup-0.6.9-wp4j4emr.mjs +1 -0
  417. package/dist/chunks/theme-0.6.9-wd132tma.mjs +1 -0
  418. package/dist/chunks/thinkback-0.6.9-s2hgsb3p.mjs +1 -0
  419. package/dist/chunks/thinkback-play-0.6.9-n9nbpvnr.mjs +1 -0
  420. package/dist/chunks/toolPool-0.6.9-q3tw4r65.mjs +1 -0
  421. package/dist/chunks/toolSearch-0.6.9-d6we1981.mjs +1 -0
  422. package/dist/chunks/tools-0.6.9-a8ce0ts5.mjs +1 -0
  423. package/dist/chunks/trustedDevice-0.6.9-5mvbmmaw.mjs +1 -0
  424. package/dist/chunks/turndown.cjs-0.6.9-spamn9kh.mjs +69 -0
  425. package/dist/chunks/types-0.6.9-9jzm5cwt.mjs +1 -0
  426. package/dist/chunks/ultrareviewCommand-0.6.9-bpefwyej.mjs +4 -0
  427. package/dist/chunks/update-0.6.9-pxbtnmt1.mjs +86 -0
  428. package/dist/chunks/upgrade-0.6.9-1yghety6.mjs +1 -0
  429. package/dist/chunks/upload-0.6.9-g09ng6tg.mjs +7 -0
  430. package/dist/chunks/upstreamproxy-0.6.9-dk2q7qk2.mjs +14 -0
  431. package/dist/chunks/url-handler-napi-0.6.9-rh07p4qq.mjs +1 -0
  432. package/dist/chunks/usage-0.6.9-z5y3f792.mjs +1 -0
  433. package/dist/chunks/util-0.6.9-fzw6284w.mjs +1 -0
  434. package/dist/chunks/utils-0.6.9-0rg7h5a5.mjs +1 -0
  435. package/dist/chunks/vim-0.6.9-pjkbr7kq.mjs +1 -0
  436. package/dist/chunks/watcher-0.6.9-0r6bzvm6.mjs +1 -0
  437. package/dist/chunks/wiki-0.6.9-v7kdrm8t.mjs +132 -0
  438. package/dist/chunks/worktree-0.6.9-ef4xspe2.mjs +1 -0
  439. package/dist/chunks/worktreeModeEnabled-0.6.9-kvm9x26k.mjs +1 -0
  440. package/dist/chunks/wrapper-0.6.9-b63s2yhh.mjs +7 -0
  441. package/dist/claudin-vscode.vsix +0 -0
  442. package/dist/cli.mjs +2 -2
  443. package/package.json +1 -1
  444. package/dist/chunks/AgentTool-0.6.8-1h6eg55x.mjs +0 -1
  445. package/dist/chunks/App-0.6.8-gf7z37d0.mjs +0 -1
  446. package/dist/chunks/ApproveApiKey-0.6.8-z559z4n4.mjs +0 -1
  447. package/dist/chunks/AssistantSessionChooser-0.6.8-a964szce.mjs +0 -1
  448. package/dist/chunks/AutoModeOptInDialog-0.6.8-hmgphwsn.mjs +0 -1
  449. package/dist/chunks/BypassPermissionsModeDialog-0.6.8-9vwjqk2g.mjs +0 -1
  450. package/dist/chunks/ClaudeMdExternalIncludesDialog-0.6.8-bmx62ftg.mjs +0 -1
  451. package/dist/chunks/ConsoleOAuthFlow-0.6.8-6xg5m0rs.mjs +0 -1
  452. package/dist/chunks/DiffDialog-0.6.8-m77gpjht.mjs +0 -7
  453. package/dist/chunks/Doctor-0.6.8-h33wtqvb.mjs +0 -1
  454. package/dist/chunks/ExplorerDialog-0.6.8-g4rjbnb6.mjs +0 -6
  455. package/dist/chunks/Grove-0.6.8-c6v8rps5.mjs +0 -1
  456. package/dist/chunks/ITermBackend-0.6.8-c6rr3der.mjs +0 -1
  457. package/dist/chunks/InvalidConfigDialog-0.6.8-rq8061vm.mjs +0 -1
  458. package/dist/chunks/InvalidSettingsDialog-0.6.8-k3gjdk9q.mjs +0 -1
  459. package/dist/chunks/MigrationDialog-0.6.8-fndbdavr.mjs +0 -1
  460. package/dist/chunks/Onboarding-0.6.8-p9c1cvpj.mjs +0 -1
  461. package/dist/chunks/ProviderManager-0.6.8-rgwzy8mv.mjs +0 -1
  462. package/dist/chunks/REPL-0.6.8-wz4ky583.mjs +0 -1
  463. package/dist/chunks/ResumeConversation-0.6.8-0vytwym2.mjs +0 -1
  464. package/dist/chunks/SnapshotUpdateDialog-0.6.8-j49mg943.mjs +0 -1
  465. package/dist/chunks/TeleportProgress-0.6.8-1w0czdzd.mjs +0 -1
  466. package/dist/chunks/TeleportRepoMismatchDialog-0.6.8-3tb748qg.mjs +0 -1
  467. package/dist/chunks/TeleportResumeWrapper-0.6.8-cchdkcj0.mjs +0 -1
  468. package/dist/chunks/TmuxBackend-0.6.8-83basabp.mjs +0 -9
  469. package/dist/chunks/ToolSearchTool-0.6.8-vz9cakde.mjs +0 -1
  470. package/dist/chunks/TrustDialog-0.6.8-9xfzmsa4.mjs +0 -1
  471. package/dist/chunks/activeProvider-0.6.8-z6bqkc89.mjs +0 -1
  472. package/dist/chunks/add-dir-0.6.8-maggp9sq.mjs +0 -1
  473. package/dist/chunks/agents-0.6.8-b17xcjhg.mjs +0 -3
  474. package/dist/chunks/agents-0.6.8-n3vcbv4n.mjs +0 -110
  475. package/dist/chunks/api-0.6.8-dx65vfgr.mjs +0 -1
  476. package/dist/chunks/asciicast-0.6.8-xdty46r6.mjs +0 -1
  477. package/dist/chunks/assistant-0.6.8-48pyb11z.mjs +0 -1
  478. package/dist/chunks/auth-0.6.8-jzmpk916.mjs +0 -1
  479. package/dist/chunks/auth-0.6.8-v4ggd1x2.mjs +0 -1
  480. package/dist/chunks/autoMode-0.6.8-e3tpbf8n.mjs +0 -48
  481. package/dist/chunks/autoUpdater-0.6.8-kjwba4kd.mjs +0 -1
  482. package/dist/chunks/backgroundHousekeeping-0.6.8-ahc5b93c.mjs +0 -1
  483. package/dist/chunks/branch-0.6.8-bht94rzm.mjs +0 -4
  484. package/dist/chunks/bridge-0.6.8-w3a5wvz5.mjs +0 -2
  485. package/dist/chunks/bridgeConfig-0.6.8-tcqxv3wr.mjs +0 -1
  486. package/dist/chunks/bridgeEnabled-0.6.8-bbk61bwx.mjs +0 -1
  487. package/dist/chunks/bridgeMain-0.6.8-4gdvjwd9.mjs +0 -88
  488. package/dist/chunks/bridgePointer-0.6.8-y9zbj5sw.mjs +0 -1
  489. package/dist/chunks/btw-0.6.8-p8v9ccqj.mjs +0 -1
  490. package/dist/chunks/buddy-0.6.8-cc9dgg1j.mjs +0 -3
  491. package/dist/chunks/cacache-0.6.8-sa10tzqt.mjs +0 -1
  492. package/dist/chunks/cache-probe-0.6.8-rb3gqp6p.mjs +0 -21
  493. package/dist/chunks/cacheStats-0.6.8-ayfpcw3z.mjs +0 -4
  494. package/dist/chunks/caches-0.6.8-z51zt2q7.mjs +0 -1
  495. package/dist/chunks/claudeDesktop-0.6.8-f2s8faxb.mjs +0 -1
  496. package/dist/chunks/claudemd-0.6.8-b32hs73z.mjs +0 -1
  497. package/dist/chunks/clear-0.6.8-wr581077.mjs +0 -1
  498. package/dist/chunks/clearTerminal-0.6.8-n1mdykjw.mjs +0 -1
  499. package/dist/chunks/cli-0.6.8-00w6vgmt.mjs +0 -4
  500. package/dist/chunks/cli-0.6.8-026meybw.mjs +0 -2
  501. package/dist/chunks/cli-0.6.8-070cxjdc.mjs +0 -2
  502. package/dist/chunks/cli-0.6.8-097dncsw.mjs +0 -2
  503. package/dist/chunks/cli-0.6.8-0dtwbbq2.mjs +0 -10
  504. package/dist/chunks/cli-0.6.8-0gpdjv55.mjs +0 -34
  505. package/dist/chunks/cli-0.6.8-0hn9sy42.mjs +0 -2
  506. package/dist/chunks/cli-0.6.8-0mb0d7wn.mjs +0 -3
  507. package/dist/chunks/cli-0.6.8-0mnxmayn.mjs +0 -2
  508. package/dist/chunks/cli-0.6.8-0rt710pa.mjs +0 -2
  509. package/dist/chunks/cli-0.6.8-0s41dm0j.mjs +0 -2
  510. package/dist/chunks/cli-0.6.8-0yz4b8v5.mjs +0 -2
  511. package/dist/chunks/cli-0.6.8-0zdwjw7h.mjs +0 -17
  512. package/dist/chunks/cli-0.6.8-1bmxpdky.mjs +0 -2
  513. package/dist/chunks/cli-0.6.8-1g5hjvgr.mjs +0 -3
  514. package/dist/chunks/cli-0.6.8-1k0se62h.mjs +0 -2
  515. package/dist/chunks/cli-0.6.8-1mnssvmz.mjs +0 -8
  516. package/dist/chunks/cli-0.6.8-1yx8jjck.mjs +0 -2
  517. package/dist/chunks/cli-0.6.8-21y1120z.mjs +0 -2
  518. package/dist/chunks/cli-0.6.8-239wrpj3.mjs +0 -2
  519. package/dist/chunks/cli-0.6.8-259kprym.mjs +0 -2
  520. package/dist/chunks/cli-0.6.8-25he0rqv.mjs +0 -2
  521. package/dist/chunks/cli-0.6.8-2e9hw0b1.mjs +0 -4
  522. package/dist/chunks/cli-0.6.8-2f4081dz.mjs +0 -2
  523. package/dist/chunks/cli-0.6.8-2h6sve00.mjs +0 -12
  524. package/dist/chunks/cli-0.6.8-2nda5zxh.mjs +0 -67
  525. package/dist/chunks/cli-0.6.8-2p06hgb1.mjs +0 -2
  526. package/dist/chunks/cli-0.6.8-2pj7sdxd.mjs +0 -2
  527. package/dist/chunks/cli-0.6.8-2qb9g75m.mjs +0 -2
  528. package/dist/chunks/cli-0.6.8-34gwg749.mjs +0 -2
  529. package/dist/chunks/cli-0.6.8-3a510y9k.mjs +0 -2
  530. package/dist/chunks/cli-0.6.8-3ewbgezt.mjs +0 -2
  531. package/dist/chunks/cli-0.6.8-3phwrcqa.mjs +0 -3
  532. package/dist/chunks/cli-0.6.8-3z78waf8.mjs +0 -4
  533. package/dist/chunks/cli-0.6.8-416cqzak.mjs +0 -2
  534. package/dist/chunks/cli-0.6.8-4a0ebxtv.mjs +0 -2
  535. package/dist/chunks/cli-0.6.8-4avmxq80.mjs +0 -6
  536. package/dist/chunks/cli-0.6.8-4d57xs6b.mjs +0 -2
  537. package/dist/chunks/cli-0.6.8-4jh3r7br.mjs +0 -2
  538. package/dist/chunks/cli-0.6.8-4zdzrvfa.mjs +0 -2
  539. package/dist/chunks/cli-0.6.8-5enet6dq.mjs +0 -2
  540. package/dist/chunks/cli-0.6.8-5gstf2n7.mjs +0 -2
  541. package/dist/chunks/cli-0.6.8-5n9bwjf9.mjs +0 -2
  542. package/dist/chunks/cli-0.6.8-5sexbrs8.mjs +0 -3
  543. package/dist/chunks/cli-0.6.8-5y8n5kpk.mjs +0 -2
  544. package/dist/chunks/cli-0.6.8-6050y1gw.mjs +0 -2
  545. package/dist/chunks/cli-0.6.8-61qkxc3j.mjs +0 -2
  546. package/dist/chunks/cli-0.6.8-6495m72a.mjs +0 -2
  547. package/dist/chunks/cli-0.6.8-6ccg5qmp.mjs +0 -2
  548. package/dist/chunks/cli-0.6.8-6nasamhy.mjs +0 -2
  549. package/dist/chunks/cli-0.6.8-6pf3s7fk.mjs +0 -6
  550. package/dist/chunks/cli-0.6.8-6tgf3xa0.mjs +0 -133
  551. package/dist/chunks/cli-0.6.8-6v315rd0.mjs +0 -2
  552. package/dist/chunks/cli-0.6.8-6wdxaa6q.mjs +0 -3
  553. package/dist/chunks/cli-0.6.8-6z1655sa.mjs +0 -2
  554. package/dist/chunks/cli-0.6.8-72sec87k.mjs +0 -3
  555. package/dist/chunks/cli-0.6.8-77sjcesf.mjs +0 -2
  556. package/dist/chunks/cli-0.6.8-7g7k6yt9.mjs +0 -2
  557. package/dist/chunks/cli-0.6.8-7nqm28z4.mjs +0 -2
  558. package/dist/chunks/cli-0.6.8-7rznct58.mjs +0 -2
  559. package/dist/chunks/cli-0.6.8-7t0cwmv0.mjs +0 -2
  560. package/dist/chunks/cli-0.6.8-7t8gpbd2.mjs +0 -6
  561. package/dist/chunks/cli-0.6.8-82xanm26.mjs +0 -3
  562. package/dist/chunks/cli-0.6.8-883y3p0j.mjs +0 -5348
  563. package/dist/chunks/cli-0.6.8-8cptc9vb.mjs +0 -4
  564. package/dist/chunks/cli-0.6.8-8ezmkwsw.mjs +0 -2
  565. package/dist/chunks/cli-0.6.8-8h913n7t.mjs +0 -2
  566. package/dist/chunks/cli-0.6.8-8jkm4bym.mjs +0 -2
  567. package/dist/chunks/cli-0.6.8-8zc9gtx8.mjs +0 -2
  568. package/dist/chunks/cli-0.6.8-93hp2f5g.mjs +0 -2
  569. package/dist/chunks/cli-0.6.8-9cxxg2ax.mjs +0 -2
  570. package/dist/chunks/cli-0.6.8-9f5w9wre.mjs +0 -2
  571. package/dist/chunks/cli-0.6.8-9m65pb3r.mjs +0 -18
  572. package/dist/chunks/cli-0.6.8-9pkhxd6z.mjs +0 -2
  573. package/dist/chunks/cli-0.6.8-9xem54f8.mjs +0 -2
  574. package/dist/chunks/cli-0.6.8-a7nmnbm4.mjs +0 -2
  575. package/dist/chunks/cli-0.6.8-a8zm3cbn.mjs +0 -5
  576. package/dist/chunks/cli-0.6.8-abapkbf0.mjs +0 -15
  577. package/dist/chunks/cli-0.6.8-ag8hcaw0.mjs +0 -2
  578. package/dist/chunks/cli-0.6.8-atjt49c4.mjs +0 -2
  579. package/dist/chunks/cli-0.6.8-b280gnkv.mjs +0 -1
  580. package/dist/chunks/cli-0.6.8-b2zms4ec.mjs +0 -2
  581. package/dist/chunks/cli-0.6.8-b3v9vbq6.mjs +0 -2
  582. package/dist/chunks/cli-0.6.8-b6c3tmkx.mjs +0 -2
  583. package/dist/chunks/cli-0.6.8-b6f3e10d.mjs +0 -2
  584. package/dist/chunks/cli-0.6.8-bdhpc7zj.mjs +0 -17
  585. package/dist/chunks/cli-0.6.8-bh09cgap.mjs +0 -6
  586. package/dist/chunks/cli-0.6.8-bp3vvgaw.mjs +0 -2
  587. package/dist/chunks/cli-0.6.8-bsqfs15y.mjs +0 -58
  588. package/dist/chunks/cli-0.6.8-bxcjrmby.mjs +0 -2
  589. package/dist/chunks/cli-0.6.8-c838p5hk.mjs +0 -3
  590. package/dist/chunks/cli-0.6.8-cbvnsxaa.mjs +0 -12
  591. package/dist/chunks/cli-0.6.8-cctyv31j.mjs +0 -4
  592. package/dist/chunks/cli-0.6.8-cthp7gx1.mjs +0 -2
  593. package/dist/chunks/cli-0.6.8-cv73s4x5.mjs +0 -4
  594. package/dist/chunks/cli-0.6.8-dk4bw9mq.mjs +0 -3
  595. package/dist/chunks/cli-0.6.8-dpz3wm8v.mjs +0 -2
  596. package/dist/chunks/cli-0.6.8-dvkyrzw7.mjs +0 -5
  597. package/dist/chunks/cli-0.6.8-dwwx58n6.mjs +0 -2
  598. package/dist/chunks/cli-0.6.8-dxtyt1wg.mjs +0 -2
  599. package/dist/chunks/cli-0.6.8-ee7wzgsq.mjs +0 -5
  600. package/dist/chunks/cli-0.6.8-ee9mr0z2.mjs +0 -2
  601. package/dist/chunks/cli-0.6.8-efkksxch.mjs +0 -2
  602. package/dist/chunks/cli-0.6.8-efve08ng.mjs +0 -2
  603. package/dist/chunks/cli-0.6.8-ekkrzmjw.mjs +0 -2
  604. package/dist/chunks/cli-0.6.8-eyg1sq7b.mjs +0 -2
  605. package/dist/chunks/cli-0.6.8-eypwe6gz.mjs +0 -15
  606. package/dist/chunks/cli-0.6.8-fhedvbz1.mjs +0 -15
  607. package/dist/chunks/cli-0.6.8-fnet85r6.mjs +0 -2
  608. package/dist/chunks/cli-0.6.8-g3yp49rz.mjs +0 -2
  609. package/dist/chunks/cli-0.6.8-gcnabbk4.mjs +0 -3
  610. package/dist/chunks/cli-0.6.8-gfsf3tvy.mjs +0 -2
  611. package/dist/chunks/cli-0.6.8-gmzxyn2t.mjs +0 -2
  612. package/dist/chunks/cli-0.6.8-grdpt7ss.mjs +0 -2
  613. package/dist/chunks/cli-0.6.8-gscmwgeh.mjs +0 -4
  614. package/dist/chunks/cli-0.6.8-gtwt16bp.mjs +0 -2
  615. package/dist/chunks/cli-0.6.8-hj3j54vb.mjs +0 -2
  616. package/dist/chunks/cli-0.6.8-hvckc721.mjs +0 -2
  617. package/dist/chunks/cli-0.6.8-j22112y9.mjs +0 -2
  618. package/dist/chunks/cli-0.6.8-j5wfgenk.mjs +0 -2
  619. package/dist/chunks/cli-0.6.8-j81d3bq4.mjs +0 -2
  620. package/dist/chunks/cli-0.6.8-j8mdppyz.mjs +0 -2
  621. package/dist/chunks/cli-0.6.8-janhze0q.mjs +0 -39
  622. package/dist/chunks/cli-0.6.8-jea2s05x.mjs +0 -2
  623. package/dist/chunks/cli-0.6.8-jf4zbgy5.mjs +0 -2
  624. package/dist/chunks/cli-0.6.8-jp8gk6z3.mjs +0 -2
  625. package/dist/chunks/cli-0.6.8-jp9zzk35.mjs +0 -2
  626. package/dist/chunks/cli-0.6.8-jx1wvs6x.mjs +0 -2
  627. package/dist/chunks/cli-0.6.8-k533p6s5.mjs +0 -2
  628. package/dist/chunks/cli-0.6.8-kjfxmp31.mjs +0 -2
  629. package/dist/chunks/cli-0.6.8-kkh9paa3.mjs +0 -2
  630. package/dist/chunks/cli-0.6.8-kv1xtman.mjs +0 -2
  631. package/dist/chunks/cli-0.6.8-kxp0gfzq.mjs +0 -4
  632. package/dist/chunks/cli-0.6.8-m1r6z413.mjs +0 -2
  633. package/dist/chunks/cli-0.6.8-m2hw29ah.mjs +0 -2
  634. package/dist/chunks/cli-0.6.8-m2yf7dzs.mjs +0 -2
  635. package/dist/chunks/cli-0.6.8-ma2wastm.mjs +0 -50
  636. package/dist/chunks/cli-0.6.8-mecr32eb.mjs +0 -24
  637. package/dist/chunks/cli-0.6.8-mkfx6c2h.mjs +0 -7
  638. package/dist/chunks/cli-0.6.8-n3rhca7k.mjs +0 -2
  639. package/dist/chunks/cli-0.6.8-n4ecq63e.mjs +0 -2
  640. package/dist/chunks/cli-0.6.8-nmdsnavk.mjs +0 -2
  641. package/dist/chunks/cli-0.6.8-nwtmpseh.mjs +0 -2
  642. package/dist/chunks/cli-0.6.8-nz7pwsys.mjs +0 -2
  643. package/dist/chunks/cli-0.6.8-p6rhsdxf.mjs +0 -2
  644. package/dist/chunks/cli-0.6.8-pgcmgfht.mjs +0 -2
  645. package/dist/chunks/cli-0.6.8-pmpv80vx.mjs +0 -2
  646. package/dist/chunks/cli-0.6.8-pz3sbced.mjs +0 -25
  647. package/dist/chunks/cli-0.6.8-pzbspy3n.mjs +0 -2
  648. package/dist/chunks/cli-0.6.8-q027tb7b.mjs +0 -2
  649. package/dist/chunks/cli-0.6.8-q3txjpb9.mjs +0 -2
  650. package/dist/chunks/cli-0.6.8-qg557m5n.mjs +0 -2
  651. package/dist/chunks/cli-0.6.8-r1yjkwda.mjs +0 -2
  652. package/dist/chunks/cli-0.6.8-r42pr0w8.mjs +0 -2
  653. package/dist/chunks/cli-0.6.8-r9jgzx43.mjs +0 -2
  654. package/dist/chunks/cli-0.6.8-rewjhmpq.mjs +0 -133
  655. package/dist/chunks/cli-0.6.8-reyv7f1y.mjs +0 -9
  656. package/dist/chunks/cli-0.6.8-rftvcrp4.mjs +0 -2
  657. package/dist/chunks/cli-0.6.8-rw4y8s92.mjs +0 -2
  658. package/dist/chunks/cli-0.6.8-s0geqcvz.mjs +0 -2
  659. package/dist/chunks/cli-0.6.8-s0s7zs2a.mjs +0 -24
  660. package/dist/chunks/cli-0.6.8-s6yd5ybz.mjs +0 -2
  661. package/dist/chunks/cli-0.6.8-s98bd3q2.mjs +0 -2
  662. package/dist/chunks/cli-0.6.8-sn09eprm.mjs +0 -2
  663. package/dist/chunks/cli-0.6.8-sz1r1tvd.mjs +0 -2
  664. package/dist/chunks/cli-0.6.8-sznj03wy.mjs +0 -3
  665. package/dist/chunks/cli-0.6.8-t1kd2tg3.mjs +0 -2
  666. package/dist/chunks/cli-0.6.8-t3th9jjg.mjs +0 -2
  667. package/dist/chunks/cli-0.6.8-ta6qf4we.mjs +0 -20
  668. package/dist/chunks/cli-0.6.8-tb4rrntr.mjs +0 -16
  669. package/dist/chunks/cli-0.6.8-tewmm6rt.mjs +0 -2
  670. package/dist/chunks/cli-0.6.8-tnqnaqpx.mjs +0 -3
  671. package/dist/chunks/cli-0.6.8-tzmx6gz0.mjs +0 -12
  672. package/dist/chunks/cli-0.6.8-tztjt9fh.mjs +0 -4
  673. package/dist/chunks/cli-0.6.8-v582jfcn.mjs +0 -4
  674. package/dist/chunks/cli-0.6.8-v9wg3pvs.mjs +0 -2
  675. package/dist/chunks/cli-0.6.8-vcpys5fx.mjs +0 -2
  676. package/dist/chunks/cli-0.6.8-vf9cagcj.mjs +0 -59
  677. package/dist/chunks/cli-0.6.8-vpaw67v2.mjs +0 -193
  678. package/dist/chunks/cli-0.6.8-vqhtd9ay.mjs +0 -2
  679. package/dist/chunks/cli-0.6.8-vseqtday.mjs +0 -21
  680. package/dist/chunks/cli-0.6.8-vwhx9xjq.mjs +0 -2
  681. package/dist/chunks/cli-0.6.8-wdjsawer.mjs +0 -3
  682. package/dist/chunks/cli-0.6.8-wdq4r1nd.mjs +0 -2
  683. package/dist/chunks/cli-0.6.8-wfy4hqb2.mjs +0 -2
  684. package/dist/chunks/cli-0.6.8-wh069qak.mjs +0 -2
  685. package/dist/chunks/cli-0.6.8-wj4r5nwg.mjs +0 -2
  686. package/dist/chunks/cli-0.6.8-wnjmpcsm.mjs +0 -2
  687. package/dist/chunks/cli-0.6.8-x87v5pq1.mjs +0 -45
  688. package/dist/chunks/cli-0.6.8-xj1ptmgh.mjs +0 -2
  689. package/dist/chunks/cli-0.6.8-y0p6bqj6.mjs +0 -2
  690. package/dist/chunks/cli-0.6.8-y2c1w6bt.mjs +0 -42
  691. package/dist/chunks/cli-0.6.8-y3hnde8e.mjs +0 -2
  692. package/dist/chunks/cli-0.6.8-yvfgg1kg.mjs +0 -2
  693. package/dist/chunks/cli-0.6.8-yvt0y45m.mjs +0 -28
  694. package/dist/chunks/cli-0.6.8-yztx4k12.mjs +0 -18
  695. package/dist/chunks/cli-0.6.8-z4wpf0ah.mjs +0 -2
  696. package/dist/chunks/client-0.6.8-8kz2zw01.mjs +0 -1
  697. package/dist/chunks/color-0.6.8-jhpvc051.mjs +0 -1
  698. package/dist/chunks/compact-0.6.8-0gcf2ncc.mjs +0 -3
  699. package/dist/chunks/config-0.6.8-dxk5q3qr.mjs +0 -1
  700. package/dist/chunks/config-0.6.8-xdt0r55h.mjs +0 -1
  701. package/dist/chunks/constants-0.6.8-49aaqy22.mjs +0 -1
  702. package/dist/chunks/context-0.6.8-tavd1s8s.mjs +0 -1
  703. package/dist/chunks/context-noninteractive-0.6.8-6vagjsgf.mjs +0 -1
  704. package/dist/chunks/conversation-0.6.8-10fvebzj.mjs +0 -1
  705. package/dist/chunks/copilotHeaders-0.6.8-fqca0jf7.mjs +0 -1
  706. package/dist/chunks/copy-0.6.8-rhzw5vyv.mjs +0 -9
  707. package/dist/chunks/cost-0.6.8-w3qf0kpn.mjs +0 -1
  708. package/dist/chunks/createSSHSession-0.6.8-r7cw30nn.mjs +0 -1
  709. package/dist/chunks/createSession-0.6.8-vwbe80jv.mjs +0 -1
  710. package/dist/chunks/debug-0.6.8-pzm167m4.mjs +0 -1
  711. package/dist/chunks/defaultActionDeps-0.6.8-nnx5s7ws.mjs +0 -1367
  712. package/dist/chunks/desktop-0.6.8-ef8y3qjr.mjs +0 -1
  713. package/dist/chunks/detectRepository-0.6.8-3ayp37pd.mjs +0 -1
  714. package/dist/chunks/detection-0.6.8-pdrw5y2x.mjs +0 -1
  715. package/dist/chunks/diff-0.6.8-fxk9tzbd.mjs +0 -1
  716. package/dist/chunks/doctor-0.6.8-ajzrj1jx.mjs +0 -1
  717. package/dist/chunks/doctorDiagnostic-0.6.8-w72jdksp.mjs +0 -1
  718. package/dist/chunks/earlyInput-0.6.8-ca9mzfzf.mjs +0 -1
  719. package/dist/chunks/effort-0.6.8-e6xp1ycv.mjs +0 -10
  720. package/dist/chunks/envLessBridgeConfig-0.6.8-9vz6evg2.mjs +0 -1
  721. package/dist/chunks/envUtils-0.6.8-vq8np9fm.mjs +0 -1
  722. package/dist/chunks/environmentSelection-0.6.8-mf3acav0.mjs +0 -1
  723. package/dist/chunks/environments-0.6.8-k7rgvnpj.mjs +0 -1
  724. package/dist/chunks/errors-0.6.8-svsjkqng.mjs +0 -1
  725. package/dist/chunks/exampleCommands-0.6.8-7qjc7y64.mjs +0 -1
  726. package/dist/chunks/exit-0.6.8-507vwyf9.mjs +0 -1
  727. package/dist/chunks/explorer-0.6.8-25m08xd0.mjs +0 -1
  728. package/dist/chunks/export-0.6.8-w1yn5sa3.mjs +0 -2
  729. package/dist/chunks/extra-usage-0.6.8-sahj9pr6.mjs +0 -1
  730. package/dist/chunks/extra-usage-noninteractive-0.6.8-3r3nczjf.mjs +0 -1
  731. package/dist/chunks/fast-0.6.8-jpkz65vs.mjs +0 -1
  732. package/dist/chunks/feedback-0.6.8-5w9gvrc0.mjs +0 -14
  733. package/dist/chunks/firstPartyEventLogger-0.6.8-b2w3hkeb.mjs +0 -1
  734. package/dist/chunks/git-0.6.8-drry71tr.mjs +0 -1
  735. package/dist/chunks/githubModelsCredentials-0.6.8-4phd2tn9.mjs +0 -1
  736. package/dist/chunks/goal-0.6.8-vp972bd7.mjs +0 -4
  737. package/dist/chunks/grove-0.6.8-9dr81tf3.mjs +0 -1
  738. package/dist/chunks/growthbook-0.6.8-fcwcztdp.mjs +0 -1
  739. package/dist/chunks/headless-0.6.8-m2jzbvg9.mjs +0 -2
  740. package/dist/chunks/heapdump-0.6.8-awp81a34.mjs +0 -6
  741. package/dist/chunks/help-0.6.8-hbsb7av5.mjs +0 -1
  742. package/dist/chunks/hookChains-0.6.8-04mbkzxt.mjs +0 -3
  743. package/dist/chunks/hooks-0.6.8-6x1xc1rx.mjs +0 -1
  744. package/dist/chunks/hooks-0.6.8-80h8h076.mjs +0 -79
  745. package/dist/chunks/ide-0.6.8-7vbxnmby.mjs +0 -3
  746. package/dist/chunks/image-processor-napi-0.6.8-8m23kpm0.mjs +0 -1
  747. package/dist/chunks/inboundAttachments-0.6.8-wcyd47px.mjs +0 -1
  748. package/dist/chunks/index-0.6.8-1q3w68f1.mjs +0 -1
  749. package/dist/chunks/index-0.6.8-1w8hv7a8.mjs +0 -1
  750. package/dist/chunks/index-0.6.8-2sp7v8r9.mjs +0 -2
  751. package/dist/chunks/index-0.6.8-3782mjyy.mjs +0 -1
  752. package/dist/chunks/index-0.6.8-6eeqw069.mjs +0 -1
  753. package/dist/chunks/index-0.6.8-7dmsg46k.mjs +0 -5
  754. package/dist/chunks/index-0.6.8-7prxs8kr.mjs +0 -1
  755. package/dist/chunks/index-0.6.8-azcjsyp8.mjs +0 -1
  756. package/dist/chunks/index-0.6.8-ccq5xheq.mjs +0 -2
  757. package/dist/chunks/index-0.6.8-dkdk0g9j.mjs +0 -1
  758. package/dist/chunks/index-0.6.8-dv8qe20v.mjs +0 -1
  759. package/dist/chunks/index-0.6.8-fsfq8ekm.mjs +0 -1
  760. package/dist/chunks/index-0.6.8-k3r9pz8v.mjs +0 -1
  761. package/dist/chunks/index-0.6.8-ke45hjqk.mjs +0 -1
  762. package/dist/chunks/index-0.6.8-kvjzqm75.mjs +0 -9
  763. package/dist/chunks/index-0.6.8-m9y8nqmz.mjs +0 -30
  764. package/dist/chunks/index-0.6.8-mc1wvtc8.mjs +0 -1
  765. package/dist/chunks/index-0.6.8-svxnm6ph.mjs +0 -1
  766. package/dist/chunks/index-0.6.8-vvg8dg6z.mjs +0 -9
  767. package/dist/chunks/index-0.6.8-wec8yb9e.mjs +0 -1
  768. package/dist/chunks/index-0.6.8-y535r49s.mjs +0 -1
  769. package/dist/chunks/index-0.6.8-yf6035wh.mjs +0 -1
  770. package/dist/chunks/index-0.6.8-zcf4qg35.mjs +0 -1
  771. package/dist/chunks/init-0.6.8-brwjmnyg.mjs +0 -1
  772. package/dist/chunks/initReplBridge-0.6.8-5jcj5ax3.mjs +0 -1
  773. package/dist/chunks/ink-0.6.8-cts7p4b7.mjs +0 -1
  774. package/dist/chunks/insights-0.6.8-h5b5ve9h.mjs +0 -870
  775. package/dist/chunks/install-0.6.8-e3gdw6r9.mjs +0 -1
  776. package/dist/chunks/install-github-app-0.6.8-hh3mzyfs.mjs +0 -149
  777. package/dist/chunks/install-slack-app-0.6.8-n4pb88x6.mjs +0 -1
  778. package/dist/chunks/instrumentation-0.6.8-67ewcnwm.mjs +0 -1
  779. package/dist/chunks/interactiveHelpers-0.6.8-ryjx3tbw.mjs +0 -1
  780. package/dist/chunks/keybindings-0.6.8-8v6q91kq.mjs +0 -2
  781. package/dist/chunks/knowledge-0.6.8-dn40ytkg.mjs +0 -2
  782. package/dist/chunks/latestVersionCache-0.6.8-xx081act.mjs +0 -1
  783. package/dist/chunks/loadAgentsDir-0.6.8-vhh6hfk9.mjs +0 -1
  784. package/dist/chunks/loadPluginHooks-0.6.8-p15wjdk7.mjs +0 -1
  785. package/dist/chunks/loadPluginHooks-0.6.8-tjd9ekbf.mjs +0 -1
  786. package/dist/chunks/log-0.6.8-srvm2n7a.mjs +0 -1
  787. package/dist/chunks/main-0.6.8-5mcvdtte.mjs +0 -1
  788. package/dist/chunks/managedEnv-0.6.8-3m2x6zgp.mjs +0 -1
  789. package/dist/chunks/mcp-0.6.8-3dztd40j.mjs +0 -17
  790. package/dist/chunks/mcp-0.6.8-5msk2pvy.mjs +0 -4
  791. package/dist/chunks/mcp-0.6.8-nxyt74pa.mjs +0 -1
  792. package/dist/chunks/mcpb-0.6.8-v8q530w6.mjs +0 -1
  793. package/dist/chunks/memory-0.6.8-1pkjxmpb.mjs +0 -3
  794. package/dist/chunks/model-0.6.8-00wgempd.mjs +0 -2
  795. package/dist/chunks/model-0.6.8-99m80ayt.mjs +0 -1
  796. package/dist/chunks/node-0.6.8-b8rvxhkh.mjs +0 -12
  797. package/dist/chunks/oauth-0.6.8-c2r6j7j0.mjs +0 -1
  798. package/dist/chunks/openaiShim-0.6.8-z736wyft.mjs +0 -14
  799. package/dist/chunks/output-style-0.6.8-586m3zta.mjs +0 -1
  800. package/dist/chunks/package-FMOR3ELU-0.6.8-xe49mr3f.mjs +0 -1
  801. package/dist/chunks/parseConnectUrl-0.6.8-wawy5rxc.mjs +0 -1
  802. package/dist/chunks/parser-0.6.8-zjc9fwme.mjs +0 -1
  803. package/dist/chunks/passes-0.6.8-mn4rnfm9.mjs +0 -1
  804. package/dist/chunks/permissions-0.6.8-jdgt2sv8.mjs +0 -1
  805. package/dist/chunks/permissions-0.6.8-z6ybrhdp.mjs +0 -3
  806. package/dist/chunks/plan-0.6.8-9h16p6t0.mjs +0 -1
  807. package/dist/chunks/plist-0.6.8-ras7a7wc.mjs +0 -1
  808. package/dist/chunks/plugin-0.6.8-0p0a1k4b.mjs +0 -29
  809. package/dist/chunks/pluginStartupCheck-0.6.8-ff7hmaes.mjs +0 -1
  810. package/dist/chunks/plugins-0.6.8-fbp29vr3.mjs +0 -9
  811. package/dist/chunks/preActionHook-0.6.8-1qt932q1.mjs +0 -2
  812. package/dist/chunks/print-0.6.8-tm9918yr.mjs +0 -57
  813. package/dist/chunks/privacy-settings-0.6.8-5e2yd64z.mjs +0 -1
  814. package/dist/chunks/process-0.6.8-mqtgb3cx.mjs +0 -1
  815. package/dist/chunks/processBashCommand-0.6.8-xtx2v6da.mjs +0 -1
  816. package/dist/chunks/processSlashCommand-0.6.8-xgvzddwk.mjs +0 -9
  817. package/dist/chunks/prompt-0.6.8-57r1r589.mjs +0 -1
  818. package/dist/chunks/prompt-0.6.8-npwq825f.mjs +0 -1
  819. package/dist/chunks/prompts-0.6.8-ta5q8t8a.mjs +0 -1
  820. package/dist/chunks/protocolHandler-0.6.8-mf45pq35.mjs +0 -13
  821. package/dist/chunks/provider-0.6.8-pemvh2k5.mjs +0 -2
  822. package/dist/chunks/providerProfiles-0.6.8-t4rbsxrj.mjs +0 -1
  823. package/dist/chunks/providerValidation-0.6.8-jvfz53fe.mjs +0 -6
  824. package/dist/chunks/rate-limit-options-0.6.8-egm6fsa2.mjs +0 -1
  825. package/dist/chunks/registerSubcommands-0.6.8-c33k54ns.mjs +0 -34
  826. package/dist/chunks/registry-0.6.8-v7m02nk2.mjs +0 -1
  827. package/dist/chunks/release-notes-0.6.8-wwv5r86y.mjs +0 -5
  828. package/dist/chunks/reload-plugins-0.6.8-72v51g0k.mjs +0 -2
  829. package/dist/chunks/remote-env-0.6.8-gn37jake.mjs +0 -1
  830. package/dist/chunks/remoteBridgeCore-0.6.8-7cd0x0sw.mjs +0 -1
  831. package/dist/chunks/remoteSession-0.6.8-tr5ph176.mjs +0 -1
  832. package/dist/chunks/rename-0.6.8-8jb90c48.mjs +0 -1
  833. package/dist/chunks/replBridgeHandle-0.6.8-znyhk31n.mjs +0 -1
  834. package/dist/chunks/replLauncher-0.6.8-we5yqk5n.mjs +0 -1
  835. package/dist/chunks/resume-0.6.8-x8vd5cdx.mjs +0 -2
  836. package/dist/chunks/rewind-0.6.8-dg7aawme.mjs +0 -1
  837. package/dist/chunks/rootOptions-0.6.8-ezrfenmz.mjs +0 -1
  838. package/dist/chunks/sandbox-adapter-0.6.8-cfj9xd48.mjs +0 -1
  839. package/dist/chunks/sandbox-toggle-0.6.8-mffa8yr5.mjs +0 -1
  840. package/dist/chunks/session-0.6.8-6pyjb4jn.mjs +0 -2
  841. package/dist/chunks/sessionDiscovery-0.6.8-e3h9zvrp.mjs +0 -1
  842. package/dist/chunks/sessionFileAccessHooks-0.6.8-5q6x4jx9.mjs +0 -1
  843. package/dist/chunks/sessionStorage-0.6.8-3tvaj86g.mjs +0 -1
  844. package/dist/chunks/settings-0.6.8-m72ttv29.mjs +0 -1
  845. package/dist/chunks/setup-0.6.8-f3y64bte.mjs +0 -5
  846. package/dist/chunks/sinks-0.6.8-t8e55v3b.mjs +0 -1
  847. package/dist/chunks/skills-0.6.8-17ktqb7y.mjs +0 -1
  848. package/dist/chunks/startupProfiler-0.6.8-qj52vcw4.mjs +0 -1
  849. package/dist/chunks/startupUpdateCheck-0.6.8-51vrdbj6.mjs +0 -1
  850. package/dist/chunks/state-0.6.8-pwxe3dfk.mjs +0 -1
  851. package/dist/chunks/stats-0.6.8-fc152nhd.mjs +0 -6
  852. package/dist/chunks/status-0.6.8-bjgdnsz8.mjs +0 -1
  853. package/dist/chunks/stickers-0.6.8-dndn2kp3.mjs +0 -1
  854. package/dist/chunks/subprocessEnv-0.6.8-zzdkzkpq.mjs +0 -1
  855. package/dist/chunks/tasks-0.6.8-zjm7dnep.mjs +0 -1
  856. package/dist/chunks/teamHelpers-0.6.8-prrabxj1.mjs +0 -1
  857. package/dist/chunks/teammateModeSnapshot-0.6.8-21bj5sj0.mjs +0 -1
  858. package/dist/chunks/teleport-0.6.8-jvcjg7d7.mjs +0 -1
  859. package/dist/chunks/terminalSetup-0.6.8-9y4235w1.mjs +0 -1
  860. package/dist/chunks/theme-0.6.8-wvdhk95e.mjs +0 -1
  861. package/dist/chunks/thinkback-0.6.8-8dn71z5r.mjs +0 -1
  862. package/dist/chunks/thinkback-play-0.6.8-agrskwfn.mjs +0 -1
  863. package/dist/chunks/toolPool-0.6.8-90318hbv.mjs +0 -1
  864. package/dist/chunks/toolSearch-0.6.8-eyr73a52.mjs +0 -1
  865. package/dist/chunks/tools-0.6.8-mdjqydpm.mjs +0 -1
  866. package/dist/chunks/trustedDevice-0.6.8-b7fae7s5.mjs +0 -1
  867. package/dist/chunks/turndown.cjs-0.6.8-sgzhfavm.mjs +0 -69
  868. package/dist/chunks/types-0.6.8-4gf5x9jb.mjs +0 -1
  869. package/dist/chunks/ultrareviewCommand-0.6.8-5cdef89y.mjs +0 -4
  870. package/dist/chunks/update-0.6.8-hv3gahmz.mjs +0 -86
  871. package/dist/chunks/upgrade-0.6.8-w044cw9y.mjs +0 -1
  872. package/dist/chunks/upload-0.6.8-er3nq389.mjs +0 -7
  873. package/dist/chunks/upstreamproxy-0.6.8-zfg8pv8q.mjs +0 -14
  874. package/dist/chunks/url-handler-napi-0.6.8-1q2hrhb3.mjs +0 -1
  875. package/dist/chunks/usage-0.6.8-pc8gdf6b.mjs +0 -1
  876. package/dist/chunks/util-0.6.8-rt8y16fm.mjs +0 -1
  877. package/dist/chunks/utils-0.6.8-8nsbk9w4.mjs +0 -1
  878. package/dist/chunks/vim-0.6.8-y1wq10k6.mjs +0 -1
  879. package/dist/chunks/watcher-0.6.8-hq0y1y68.mjs +0 -1
  880. package/dist/chunks/wiki-0.6.8-jqbmvz1r.mjs +0 -132
  881. package/dist/chunks/worktree-0.6.8-hn8ac7q6.mjs +0 -1
  882. package/dist/chunks/worktreeModeEnabled-0.6.8-k0yys6b0.mjs +0 -1
  883. package/dist/chunks/wrapper-0.6.8-r1wx821t.mjs +0 -7
  884. /package/dist/chunks/{cli-0.6.8-0s2z302k.mjs → cli-0.6.9-2kd0dsnv.mjs} +0 -0
  885. /package/dist/chunks/{cli-0.6.8-0fra5z78.mjs → cli-0.6.9-bvsdx3f8.mjs} +0 -0
  886. /package/dist/chunks/{cli-0.6.8-akzaeas1.mjs → cli-0.6.9-jj198dy3.mjs} +0 -0
  887. /package/dist/chunks/{cli-0.6.8-7cychtp8.mjs → cli-0.6.9-kf28v99d.mjs} +0 -0
  888. /package/dist/chunks/{cli-0.6.8-aasxytdk.mjs → cli-0.6.9-r1m7xdaq.mjs} +0 -0
  889. /package/dist/chunks/{cli-0.6.8-9bt8c69s.mjs → cli-0.6.9-r7fnwtpb.mjs} +0 -0
  890. /package/dist/chunks/{cli-0.6.8-fe86xfp4.mjs → cli-0.6.9-yt963aje.mjs} +0 -0
@@ -1,39 +0,0 @@
1
- import{DP as d,Vx as B,Xx as U,mO as L,nO as w,pP as N}from"./cli-0.6.8-883y3p0j.mjs";import{C_ as z,J_ as F,Maa as P}from"./cli-0.6.8-vpaw67v2.mjs";import{Cea as H,Iea as v}from"./cli-0.6.8-gscmwgeh.mjs";import{Lpa as j}from"./cli-0.6.8-259kprym.mjs";async function V(R){let{messages:I,getAppState:O,options:{mainLoopModel:J,tools:Y,agentDefinitions:Z,customSystemPrompt:W,appendSystemPrompt:X}}=R,Q=N(I),{messages:K}=await B(Q),h=O();return L(K,J,async()=>h.toolPermissionContext,Y,Z,void 0,{options:{customSystemPrompt:W,appendSystemPrompt:X}},void 0,Q)}async function g(R,I){let O=await V(I);return{type:"text",value:b(O)}}function b(R){let{categories:I,totalTokens:O,rawMaxTokens:J,percentage:Y,model:Z,memoryFiles:W,mcpTools:X,agents:Q,skills:K}=R,h=`## Context Usage
2
-
3
- `;h+=`**Model:** ${Z}
4
- `,h+=`**Tokens:** ${H(O)} / ${H(J)} (${Y}%)
5
- `,h+=`
6
- `;let _=I.filter((q)=>q.tokens>0&&q.name!=="Free space"&&q.name!=="Autocompact buffer");if(_.length>0){h+=`### Estimated usage by category
7
-
8
- `,h+=`| Category | Tokens | Percentage |
9
- `,h+=`|----------|--------|------------|
10
- `;for(let G of _){let $=(G.tokens/J*100).toFixed(1);h+=`| ${G.name} | ${H(G.tokens)} | ${$}% |
11
- `}let q=I.find((G)=>G.name==="Free space");if(q&&q.tokens>0){let G=(q.tokens/J*100).toFixed(1);h+=`| Free space | ${H(q.tokens)} | ${G}% |
12
- `}let E=I.find((G)=>G.name==="Autocompact buffer");if(E&&E.tokens>0){let G=(E.tokens/J*100).toFixed(1);h+=`| Autocompact buffer | ${H(E.tokens)} | ${G}% |
13
- `}h+=`
14
- `}if(X.length>0){h+=`### MCP Tools
15
-
16
- `,h+=`| Tool | Server | Tokens |
17
- `,h+=`|------|--------|--------|
18
- `;for(let q of X)h+=`| ${q.name} | ${q.serverName} | ${H(q.tokens)} |
19
- `;h+=`
20
- `}if(Q.length>0){h+=`### Custom Agents
21
-
22
- `,h+=`| Agent Type | Source | Tokens |
23
- `,h+=`|------------|--------|--------|
24
- `;for(let q of Q){let E;switch(q.source){case"projectSettings":E="Project";break;case"userSettings":E="User";break;case"localSettings":E="Local";break;case"flagSettings":E="Flag";break;case"policySettings":E="Policy";break;case"plugin":E="Plugin";break;case"built-in":E="Built-in";break;default:E=String(q.source)}h+=`| ${q.agentType} | ${E} | ${H(q.tokens)} |
25
- `}h+=`
26
- `}if(W.length>0){h+=`### Memory Files
27
-
28
- `,h+=`| Type | Path | Tokens |
29
- `,h+=`|------|------|--------|
30
- `;for(let q of W)h+=`| ${q.type} | ${q.path} | ${H(q.tokens)} |
31
- `;h+=`
32
- `}if(K&&K.tokens>0&&K.skillFrontmatter.length>0){h+=`### Skills
33
-
34
- `,h+=`| Skill | Source | Tokens |
35
- `,h+=`|-------|--------|--------|
36
- `;for(let q of K.skillFrontmatter)h+=`| ${q.name} | ${z(q.source)} | ${H(q.tokens)} |
37
- `;h+=`
38
- `}return h}var A=j(()=>{U();w();v();d();F();P()});
39
- export{V as ih,g as jh,A as kh};
@@ -1,2 +0,0 @@
1
- import{B2 as G,F2 as W,G2 as V,S5 as j,q6 as f,t5 as M}from"./cli-0.6.8-tb4rrntr.mjs";import{Iba as x,Jba as B,M9 as w,N9 as z,Q9 as Y}from"./cli-0.6.8-vpaw67v2.mjs";import{Cga as J,Kga as F}from"./cli-0.6.8-5gstf2n7.mjs";import{Lpa as Z}from"./cli-0.6.8-259kprym.mjs";function g(){q=void 0,w()}function p(){if(q!==void 0)return q;if(G()!=="firstParty")return q=z(!1);if(!W())return q=z(!1);if(x())return q=z(!1);if(process.env.CLAUDE_CODE_ENTRYPOINT==="local-agent")return q=z(!1);let Q=j();if(Q?.accessToken&&Q.subscriptionType===null)return q=z(!0);if(Q?.accessToken&&Q.scopes?.includes(J)&&(Q.subscriptionType==="enterprise"||Q.subscriptionType==="team"))return q=z(!0);try{let{key:$}=M({skipRetrievingKeyFromApiKeyHelper:!0});if($)return q=z(!0)}catch{}return q=z(!1)}var q;var X=Z(()=>{F();f();V();B();Y()});function S(Q){let $=Q.toUpperCase();return K.has($)||k.some((m)=>$.startsWith(m))}var K,k,y,I;var b=Z(()=>{K=new Set(["CLAUDE_CODE_PROVIDER_MANAGED_BY_HOST","CLAUDE_CODE_USE_BEDROCK","CLAUDE_CODE_USE_VERTEX","CLAUDE_CODE_USE_FOUNDRY","CLAUDE_CODE_USE_GITHUB","ANTHROPIC_BASE_URL","ANTHROPIC_BEDROCK_BASE_URL","ANTHROPIC_VERTEX_BASE_URL","ANTHROPIC_FOUNDRY_BASE_URL","ANTHROPIC_FOUNDRY_RESOURCE","ANTHROPIC_VERTEX_PROJECT_ID","CLOUD_ML_REGION","ANTHROPIC_API_KEY","ANTHROPIC_AUTH_TOKEN","CLAUDE_CODE_OAUTH_TOKEN","AWS_BEARER_TOKEN_BEDROCK","ANTHROPIC_FOUNDRY_API_KEY","CLAUDE_CODE_SKIP_BEDROCK_AUTH","CLAUDE_CODE_SKIP_VERTEX_AUTH","CLAUDE_CODE_SKIP_FOUNDRY_AUTH","ANTHROPIC_MODEL","ANTHROPIC_DEFAULT_HAIKU_MODEL","ANTHROPIC_DEFAULT_HAIKU_MODEL_DESCRIPTION","ANTHROPIC_DEFAULT_HAIKU_MODEL_NAME","ANTHROPIC_DEFAULT_HAIKU_MODEL_SUPPORTED_CAPABILITIES","ANTHROPIC_DEFAULT_OPUS_MODEL","ANTHROPIC_DEFAULT_OPUS_MODEL_DESCRIPTION","ANTHROPIC_DEFAULT_OPUS_MODEL_NAME","ANTHROPIC_DEFAULT_OPUS_MODEL_SUPPORTED_CAPABILITIES","ANTHROPIC_DEFAULT_SONNET_MODEL","ANTHROPIC_DEFAULT_SONNET_MODEL_DESCRIPTION","ANTHROPIC_DEFAULT_SONNET_MODEL_NAME","ANTHROPIC_DEFAULT_SONNET_MODEL_SUPPORTED_CAPABILITIES","ANTHROPIC_SMALL_FAST_MODEL","ANTHROPIC_SMALL_FAST_MODEL_AWS_REGION","CLAUDE_CODE_SUBAGENT_MODEL"]),k=["VERTEX_REGION_CLAUDE_"];y=["apiKeyHelper","awsAuthRefresh","awsCredentialExport","gcpAuthRefresh","otelHeadersHelper","statusLine"],I=new Set(["ANTHROPIC_CUSTOM_HEADERS","ANTHROPIC_CUSTOM_MODEL_OPTION","ANTHROPIC_CUSTOM_MODEL_OPTION_DESCRIPTION","ANTHROPIC_CUSTOM_MODEL_OPTION_NAME","ANTHROPIC_DEFAULT_HAIKU_MODEL","ANTHROPIC_DEFAULT_HAIKU_MODEL_DESCRIPTION","ANTHROPIC_DEFAULT_HAIKU_MODEL_NAME","ANTHROPIC_DEFAULT_HAIKU_MODEL_SUPPORTED_CAPABILITIES","ANTHROPIC_DEFAULT_OPUS_MODEL","ANTHROPIC_DEFAULT_OPUS_MODEL_DESCRIPTION","ANTHROPIC_DEFAULT_OPUS_MODEL_NAME","ANTHROPIC_DEFAULT_OPUS_MODEL_SUPPORTED_CAPABILITIES","ANTHROPIC_DEFAULT_SONNET_MODEL","ANTHROPIC_DEFAULT_SONNET_MODEL_DESCRIPTION","ANTHROPIC_DEFAULT_SONNET_MODEL_NAME","ANTHROPIC_DEFAULT_SONNET_MODEL_SUPPORTED_CAPABILITIES","ANTHROPIC_MODEL","ANTHROPIC_SMALL_FAST_MODEL_AWS_REGION","ANTHROPIC_SMALL_FAST_MODEL","AWS_DEFAULT_REGION","AWS_PROFILE","AWS_REGION","BASH_DEFAULT_TIMEOUT_MS","BASH_MAX_OUTPUT_LENGTH","BASH_MAX_TIMEOUT_MS","CLAUDE_BASH_MAINTAIN_PROJECT_WORKING_DIR","CLAUDE_CODE_API_KEY_HELPER_TTL_MS","CLAUDE_CODE_DISABLE_EXPERIMENTAL_BETAS","CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC","CLAUDE_CODE_DISABLE_TERMINAL_TITLE","CLAUDE_CODE_ENABLE_TELEMETRY","CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS","CLAUDE_CODE_IDE_SKIP_AUTO_INSTALL","CLAUDE_CODE_MAX_OUTPUT_TOKENS","CLAUDE_CODE_SKIP_BEDROCK_AUTH","CLAUDE_CODE_SKIP_FOUNDRY_AUTH","CLAUDE_CODE_SKIP_VERTEX_AUTH","CLAUDE_CODE_SUBAGENT_MODEL","CLAUDE_CODE_USE_BEDROCK","CLAUDE_CODE_USE_FOUNDRY","CLAUDE_CODE_USE_GITHUB","CLAUDE_CODE_USE_VERTEX","DISABLE_AUTOUPDATER","DISABLE_BUG_COMMAND","DISABLE_COST_WARNINGS","DISABLE_ERROR_REPORTING","DISABLE_FEEDBACK_COMMAND","DISABLE_TELEMETRY","ENABLE_TOOL_SEARCH","MAX_MCP_OUTPUT_TOKENS","MAX_THINKING_TOKENS","MCP_TIMEOUT","MCP_TOOL_TIMEOUT","OTEL_EXPORTER_OTLP_HEADERS","OTEL_EXPORTER_OTLP_LOGS_HEADERS","OTEL_EXPORTER_OTLP_LOGS_PROTOCOL","OTEL_EXPORTER_OTLP_METRICS_CLIENT_CERTIFICATE","OTEL_EXPORTER_OTLP_METRICS_CLIENT_KEY","OTEL_EXPORTER_OTLP_METRICS_HEADERS","OTEL_EXPORTER_OTLP_METRICS_PROTOCOL","OTEL_EXPORTER_OTLP_PROTOCOL","OTEL_EXPORTER_OTLP_TRACES_HEADERS","OTEL_LOG_TOOL_DETAILS","OTEL_LOG_USER_PROMPTS","OTEL_LOGS_EXPORT_INTERVAL","OTEL_LOGS_EXPORTER","OTEL_METRIC_EXPORT_INTERVAL","OTEL_METRICS_EXPORTER","OTEL_METRICS_INCLUDE_ACCOUNT_UUID","OTEL_METRICS_INCLUDE_SESSION_ID","OTEL_METRICS_INCLUDE_VERSION","OTEL_RESOURCE_ATTRIBUTES","USE_BUILTIN_RIPGREP","VERTEX_REGION_CLAUDE_3_5_HAIKU","VERTEX_REGION_CLAUDE_3_5_SONNET","VERTEX_REGION_CLAUDE_3_7_SONNET","VERTEX_REGION_CLAUDE_4_0_OPUS","VERTEX_REGION_CLAUDE_4_0_SONNET","VERTEX_REGION_CLAUDE_4_1_OPUS","VERTEX_REGION_CLAUDE_4_5_SONNET","VERTEX_REGION_CLAUDE_4_6_SONNET","VERTEX_REGION_CLAUDE_HAIKU_4_5"])});
2
- export{g as sS,p as tS,X as uS,S as vS,y as wS,I as xS,b as yS};
@@ -1,2 +0,0 @@
1
- import{Ff as N0,Gf as U0,If as VP}from"./cli-0.6.8-sz1r1tvd.mjs";import{KL as ZP,LL as m0,NL as qP,QK as WP,SL as CP,ZK as cP,_K as fP,aH as G0,aL as M0,bF as XP,bH as YP,bL as h0,cF as mP,cL as T0,dL as d0,gL as R0,hM as C0,kv as J0,lF as L0,lM as pP,lv as QP,nF as i0,nL as u0,nv as j0,qn as h,rn as c0,sn as p,tn as w0,un as r,vn as W0,yn as O0,zn as EP}from"./cli-0.6.8-883y3p0j.mjs";import{BW as z0,DW as TP,GW as D0,HW as LP,nW as JP,oW as hP}from"./cli-0.6.8-34gwg749.mjs";import{CX as AP,DX as I0,DZ as q0,MX as k0,WY as C,YY as X,_Y as L,cZ as F0,sZ as GP,xX as PP}from"./cli-0.6.8-vf9cagcj.mjs";import{I1 as n,J1 as J,K1 as Q,L1 as a}from"./cli-0.6.8-jx1wvs6x.mjs";import{M1 as $0}from"./cli-0.6.8-gmzxyn2t.mjs";import{h2 as A0,i2 as dP}from"./cli-0.6.8-5sexbrs8.mjs";import{_5 as e0,q6 as gP}from"./cli-0.6.8-tb4rrntr.mjs";import{Daa as H0,Eaa as zP,Maa as p0,Y7 as _,Z7 as r0,iea as s0,laa as y0,lea as SP,maa as B0,naa as KP}from"./cli-0.6.8-vpaw67v2.mjs";import{Jga as g0,Kga as _P}from"./cli-0.6.8-5gstf2n7.mjs";import{Lga as m,Oga as IP}from"./cli-0.6.8-dxtyt1wg.mjs";import{gia as f0,nia as t0}from"./cli-0.6.8-cv73s4x5.mjs";import{Hpa as e,Lpa as P0}from"./cli-0.6.8-259kprym.mjs";function K0(G){let P=o0.c(9),{serverToolsCount:Y,serverPromptsCount:z,serverResourcesCount:Z}=G,f;if(P[0]!==z||P[1]!==Z||P[2]!==Y){if(f=[],Y>0)f.push("tools");if(Z>0)f.push("resources");if(z>0)f.push("prompts");P[0]=z,P[1]=Z,P[2]=Y,P[3]=f}else f=P[3];let H;if(P[4]===Symbol.for("react.memo_cache_sentinel"))H=J(L,{bold:!0,children:"Capabilities: "}),P[4]=H;else H=P[4];let W;if(P[5]!==f)W=f.length>0?J(r,{children:f}):"none",P[5]=f,P[6]=W;else W=P[6];let k;if(P[7]!==W)k=Q(X,{children:[H,J(L,{color:"text",children:W})]}),P[7]=W,P[8]=k;else k=P[8];return k}var o0;var _0=P0(()=>{q0();W0();a();o0=e(I0(),1)});function E0(G,P){switch(G.client.type){case"connected":return{message:`Reconnected to ${P}.`,success:!0};case"needs-auth":return{message:`${P} requires authentication. Use the 'Authenticate' option.`,success:!1};case"failed":return{message:`Failed to reconnect to ${P}.`,success:!1};default:return{message:`Unknown result when reconnecting to ${P}.`,success:!1}}}function V0(G,P){let Y=G instanceof Error?G.message:String(G);return`Error reconnecting to ${P}: ${Y}`}var S0=()=>{};function bG({server:G,serverToolsCount:P,onViewTools:Y,onCancel:z,onComplete:Z,borderless:f=!1}){let[H]=k0(),W=D0(),{columns:k}=JP(),[B,N]=E.default.useState(!1),[$,U]=E.default.useState(null),S=J0((q)=>q.mcp),M=QP(),[b,K]=E.default.useState(null),[V,D]=E.useState(!1),R=E.useRef(null),[g,c]=E.useState(!1),[j,T]=E.useState(null),[A,y]=E.useState(!1),[i,u]=E.useState(null),[l,v]=E.useState(!1),[o,s]=E.useState(!1),x=E.useRef(void 0),O=E.useRef(!1),[x0,Q0]=E.useState(""),[kP,DP]=E.useState(0),[a0,n0]=E.useState(null);E.useEffect(()=>()=>{if(O.current=!0,R.current?.abort(),x.current!==void 0)clearTimeout(x.current)},[]);let X0=G.isAuthenticated||G.client.type==="connected"&&P>0,Y0=N0(),wP=E.default.useCallback(async()=>{c(!1),T(null),D(!0);try{let q=await Y0(G.name),F=q.client.type==="connected";if(m("tengu_claudeai_mcp_auth_completed",{success:F}),F)Z?.(`Authentication successful. Connected to ${G.name}.`);else if(q.client.type==="needs-auth")Z?.("Authentication successful, but server still requires authentication. You may need to manually restart Claude Code.");else Z?.("Authentication successful, but server reconnection failed. You may need to manually restart Claude Code for the changes to take effect.")}catch(q){m("tengu_claudeai_mcp_auth_completed",{success:!1}),Z?.(V0(q,G.name))}finally{D(!1)}},[Y0,G.name,Z]),MP=E.default.useCallback(async()=>{await C0(G.name,{...G.config,scope:G.scope}),M((q)=>{let F=q.mcp.clients.map((t)=>t.name===G.name?{...t,type:"needs-auth"}:t),w=h0(q.mcp.tools,G.name),d=T0(q.mcp.commands,G.name),Z0=d0(q.mcp.resources,G.name);return{...q,mcp:{...q.mcp,clients:F,tools:w,commands:d,resources:Z0}}}),m("tengu_claudeai_mcp_clear_auth_completed",{}),Z?.(`Disconnected from ${G.name}.`),y(!1),u(null),v(!1)},[G.name,G.config,G.scope,M,Z]);z0("confirm:no",()=>{R.current?.abort(),R.current=null,N(!1),K(null)},{context:"Confirmation",isActive:B}),z0("confirm:no",()=>{c(!1),T(null)},{context:"Confirmation",isActive:g}),z0("confirm:no",()=>{y(!1),u(null),v(!1)},{context:"Confirmation",isActive:A}),GP((q,F)=>{if(F.return&&g)wP();if(F.return&&A)if(l)MP();else{let w=`${g0().CLAUDE_AI_ORIGIN}/settings/connectors`;u(w),v(!0),A0(w)}if(q==="c"&&!o){let w=b||j||i;if(w)PP(w).then((d)=>{if(O.current)return;if(d)process.stdout.write(d);if(s(!0),x.current!==void 0)clearTimeout(x.current);x.current=setTimeout(s,2000,!1)})}});let RP=H0(String(G.name)),NP=M0(S.commands,G.name).length,l0=U0(),UP=E.default.useCallback(async()=>{let q=g0().CLAUDE_AI_ORIGIN,w=e0()?.organizationUuid,d;if(w&&G.config.type==="claudeai-proxy"&&G.config.id){let Z0=G.config.id.startsWith("mcprs")?"mcpsrv"+G.config.id.slice(5):G.config.id,t=encodeURIComponent(process.env.CLAUDE_CODE_ENTRYPOINT||"cli");d=`${q}/api/organizations/${w}/mcp/start-auth/${Z0}?product_surface=${t}`}else d=`${q}/settings/connectors`;T(d),c(!0),m("tengu_claudeai_mcp_auth_started",{}),await A0(d)},[G.config]),bP=E.default.useCallback(()=>{y(!0),m("tengu_claudeai_mcp_clear_auth_started",{})},[]),yP=E.default.useCallback(async()=>{let q=G.client.type!=="disabled";try{if(await l0(G.name),G.config.type==="claudeai-proxy")m("tengu_claudeai_mcp_toggle",{new_state:q?"disabled":"enabled"});z()}catch(F){Z?.(`Failed to ${q?"disable":"enable"} MCP server '${G.name}': ${f0(F)}`)}},[G.client.type,G.config.type,G.name,l0,z,Z]),BP=E.default.useCallback(async()=>{if(G.config.type==="claudeai-proxy")return;N(!0),U(null);let q=new AbortController;R.current=q;try{if(G.isAuthenticated&&G.config)await m0(G.name,G.config,{preserveStepUpState:!0});if(G.config){await qP(G.name,G.config,K,q.signal,{onWaitingForCallback:(w)=>{n0(()=>w)}}),m("tengu_mcp_auth_config_authenticate",{wasAuthenticated:G.isAuthenticated});let F=await Y0(G.name);if(F.client.type==="connected"){let w=X0?`Authentication successful. Reconnected to ${G.name}.`:`Authentication successful. Connected to ${G.name}.`;Z?.(w)}else if(F.client.type==="needs-auth")Z?.("Authentication successful, but server still requires authentication. You may need to manually restart Claude Code.");else s0(G.name,"Reconnection failed after authentication"),Z?.("Authentication successful, but server reconnection failed. You may need to manually restart Claude Code for the changes to take effect.")}}catch(F){if(F instanceof Error&&!(F instanceof ZP))U(F.message)}finally{N(!1),R.current=null,n0(null),Q0("")}},[G.isAuthenticated,G.config,G.name,Z,Y0,X0]),OP=async()=>{if(G.config.type==="claudeai-proxy")return;if(G.config)await m0(G.name,G.config),m("tengu_mcp_auth_config_clear",{}),await C0(G.name,{...G.config,scope:G.scope}),M((q)=>{let F=q.mcp.clients.map((t)=>t.name===G.name?{...t,type:"failed"}:t),w=h0(q.mcp.tools,G.name),d=T0(q.mcp.commands,G.name),Z0=d0(q.mcp.resources,G.name);return{...q,mcp:{...q.mcp,clients:F,tools:w,commands:d,resources:Z0}}}),Z?.(`Authentication cleared for ${G.name}.`)};if(B){let q=G.config.type!=="claudeai-proxy"&&G.config.oauth?.xaa?" Authenticating via your identity provider":" A browser window will open for authentication";return Q(X,{flexDirection:"column",gap:1,padding:1,children:[Q(L,{color:"claude",children:["Authenticating with ",G.name,"…"]}),Q(X,{children:[J(G0,{}),J(L,{children:q})]}),b&&Q(X,{flexDirection:"column",children:[Q(X,{children:[Q(L,{dimColor:!0,children:["If your browser doesn't open automatically, copy this URL manually"," "]}),o?J(L,{color:"success",children:"(Copied!)"}):J(L,{dimColor:!0,children:J(h,{shortcut:"c",action:"copy",parens:!0})})]}),J(F0,{url:b})]}),B&&b&&a0&&Q(X,{flexDirection:"column",marginTop:1,children:[J(L,{dimColor:!0,children:"If the redirect page shows a connection error, paste the URL from your browser's address bar:"}),Q(X,{children:[Q(L,{dimColor:!0,children:["URL ",">"," "]}),J(XP,{value:x0,onChange:Q0,onSubmit:(F)=>{a0(F.trim()),Q0("")},cursorOffset:kP,onChangeCursorOffset:DP,columns:k-8})]})]}),J(X,{marginLeft:3,children:J(L,{dimColor:!0,children:"Return here after authenticating in your browser. Press Esc to go back."})})]})}if(g)return Q(X,{flexDirection:"column",gap:1,padding:1,children:[Q(L,{color:"claude",children:["Authenticating with ",G.name,"…"]}),Q(X,{children:[J(G0,{}),J(L,{children:" A browser window will open for authentication"})]}),j&&Q(X,{flexDirection:"column",children:[Q(X,{children:[Q(L,{dimColor:!0,children:["If your browser doesn't open automatically, copy this URL manually"," "]}),o?J(L,{color:"success",children:"(Copied!)"}):J(L,{dimColor:!0,children:J(h,{shortcut:"c",action:"copy",parens:!0})})]}),J(F0,{url:j})]}),Q(X,{marginLeft:3,flexDirection:"column",children:[Q(L,{color:"permission",children:["Press ",J(L,{bold:!0,children:"Enter"})," after authenticating in your browser."]}),J(L,{dimColor:!0,italic:!0,children:J(p,{action:"confirm:no",context:"Confirmation",fallback:"Esc",description:"back"})})]})]});if(A)return Q(X,{flexDirection:"column",gap:1,padding:1,children:[Q(L,{color:"claude",children:["Clear authentication for ",G.name]}),l?Q(n,{children:[J(L,{children:'Find the MCP server in the browser and click "Disconnect".'}),i&&Q(X,{flexDirection:"column",children:[Q(X,{children:[Q(L,{dimColor:!0,children:["If your browser didn't open automatically, copy this URL manually"," "]}),o?J(L,{color:"success",children:"(Copied!)"}):J(L,{dimColor:!0,children:J(h,{shortcut:"c",action:"copy",parens:!0})})]}),J(F0,{url:i})]}),Q(X,{marginLeft:3,flexDirection:"column",children:[Q(L,{color:"permission",children:["Press ",J(L,{bold:!0,children:"Enter"})," when done."]}),J(L,{dimColor:!0,italic:!0,children:J(p,{action:"confirm:no",context:"Confirmation",fallback:"Esc",description:"back"})})]})]}):Q(n,{children:[J(L,{children:'This will open claude.ai in the browser. Find the MCP server in the list and click "Disconnect".'}),Q(X,{marginLeft:3,flexDirection:"column",children:[Q(L,{color:"permission",children:["Press ",J(L,{bold:!0,children:"Enter"})," to open the browser."]}),J(L,{dimColor:!0,italic:!0,children:J(p,{action:"confirm:no",context:"Confirmation",fallback:"Esc",description:"back"})})]})]})]});if(V)return Q(X,{flexDirection:"column",gap:1,padding:1,children:[Q(L,{color:"text",children:["Connecting to ",J(L,{bold:!0,children:G.name}),"…"]}),Q(X,{children:[J(G0,{}),J(L,{children:" Establishing connection to MCP server"})]}),J(L,{dimColor:!0,children:"This may take a few moments."})]});let I=[];if(G.client.type==="disabled")I.push({label:"Enable",value:"toggle-enabled"});if(G.client.type==="connected"&&P>0)I.push({label:"View tools",value:"tools"});if(G.config.type==="claudeai-proxy"){if(G.client.type==="connected")I.push({label:"Clear authentication",value:"claudeai-clear-auth"});else if(G.client.type!=="disabled")I.push({label:"Authenticate",value:"claudeai-auth"})}else{if(X0)I.push({label:"Re-authenticate",value:"reauth"}),I.push({label:"Clear authentication",value:"clear-auth"});if(!X0)I.push({label:"Authenticate",value:"auth"})}if(G.client.type!=="disabled"){if(G.client.type!=="needs-auth")I.push({label:"Reconnect",value:"reconnectMcpServer"});I.push({label:"Disable",value:"toggle-enabled"})}if(I.length===0)I.push({label:"Back",value:"back"});return Q(X,{flexDirection:"column",children:[Q(X,{flexDirection:"column",paddingX:1,borderStyle:f?void 0:"round",children:[J(X,{marginBottom:1,children:Q(L,{bold:!0,children:[RP," MCP Server"]})}),Q(X,{flexDirection:"column",gap:0,children:[Q(X,{children:[J(L,{bold:!0,children:"Status: "}),G.client.type==="disabled"?Q(L,{children:[C("inactive",H)(_.radioOff)," disabled"]}):G.client.type==="connected"?Q(L,{children:[C("success",H)(_.tick)," connected"]}):G.client.type==="pending"?Q(n,{children:[J(L,{dimColor:!0,children:_.radioOff}),J(L,{children:" connecting…"})]}):G.client.type==="needs-auth"?Q(L,{children:[C("warning",H)(_.triangleUpOutline)," needs authentication"]}):Q(L,{children:[C("error",H)(_.cross)," failed"]})]}),G.transport!=="claudeai-proxy"&&Q(X,{children:[J(L,{bold:!0,children:"Auth: "}),X0?Q(L,{children:[C("success",H)(_.tick)," authenticated"]}):Q(L,{children:[C("error",H)(_.cross)," not authenticated"]})]}),Q(X,{children:[J(L,{bold:!0,children:"URL: "}),J(L,{dimColor:!0,children:G.config.url})]}),Q(X,{children:[J(L,{bold:!0,children:"Config location: "}),J(L,{dimColor:!0,children:R0(G.scope)})]}),G.client.type==="connected"&&J(K0,{serverToolsCount:P,serverPromptsCount:NP,serverResourcesCount:S.resources[G.name]?.length||0}),G.client.type==="connected"&&P>0&&Q(X,{children:[J(L,{bold:!0,children:"Tools: "}),Q(L,{dimColor:!0,children:[P," tools"]})]})]}),$&&J(X,{marginTop:1,children:Q(L,{color:"error",children:["Error: ",$]})}),I.length>0&&J(X,{marginTop:1,children:J(L0,{options:I,onChange:async(q)=>{switch(q){case"tools":Y();break;case"auth":case"reauth":await BP();break;case"clear-auth":await OP();break;case"claudeai-auth":await UP();break;case"claudeai-clear-auth":bP();break;case"reconnectMcpServer":D(!0);try{let F=await Y0(G.name);if(G.config.type==="claudeai-proxy")m("tengu_claudeai_mcp_reconnect",{success:F.client.type==="connected"});let{message:w}=E0(F,G.name);Z?.(w)}catch(F){if(G.config.type==="claudeai-proxy")m("tengu_claudeai_mcp_reconnect",{success:!1});Z?.(V0(F,G.name))}finally{D(!1)}break;case"toggle-enabled":await yP();break;case"back":z();break}},onCancel:z})})]}),J(X,{marginTop:1,children:J(L,{dimColor:!0,italic:!0,children:W.pending?Q(n,{children:["Press ",W.keyName," again to exit"]}):Q(r,{children:[J(h,{shortcut:"↑↓",action:"navigate"}),J(h,{shortcut:"Enter",action:"select"}),J(p,{action:"confirm:no",context:"Confirmation",fallback:"Esc",description:"back"})]})})})]})}var E;var $P=P0(()=>{r0();IP();_P();LP();hP();AP();q0();TP();CP();pP();VP();u0();j0();gP();dP();t0();SP();p0();w0();i0();W0();c0();YP();mP();_0();S0();a();E=e($0(),1)});function uG({server:G,serverToolsCount:P,onViewTools:Y,onCancel:z,onComplete:Z,borderless:f=!1}){let[H]=k0(),W=D0(),k=J0((V)=>V.mcp),B=N0(),N=U0(),[$,U]=b0.useState(!1),S=b0.default.useCallback(async()=>{let V=G.client.type!=="disabled";try{await N(G.name),z()}catch(D){Z(`Failed to ${V?"disable":"enable"} MCP server '${G.name}': ${f0(D)}`)}},[G.client.type,G.name,N,z,Z]),M=H0(String(G.name)),b=M0(k.commands,G.name).length,K=[];if(G.client.type!=="disabled"&&P>0)K.push({label:"View tools",value:"tools"});if(G.client.type!=="disabled")K.push({label:"Reconnect",value:"reconnectMcpServer"});if(K.push({label:G.client.type!=="disabled"?"Disable":"Enable",value:"toggle-enabled"}),K.length===0)K.push({label:"Back",value:"back"});if($)return Q(X,{flexDirection:"column",gap:1,padding:1,children:[Q(L,{color:"text",children:["Reconnecting to ",J(L,{bold:!0,children:G.name})]}),Q(X,{children:[J(G0,{}),J(L,{children:" Restarting MCP server process"})]}),J(L,{dimColor:!0,children:"This may take a few moments."})]});return Q(X,{flexDirection:"column",children:[Q(X,{flexDirection:"column",paddingX:1,borderStyle:f?void 0:"round",children:[J(X,{marginBottom:1,children:Q(L,{bold:!0,children:[M," MCP Server"]})}),Q(X,{flexDirection:"column",gap:0,children:[Q(X,{children:[J(L,{bold:!0,children:"Status: "}),G.client.type==="disabled"?Q(L,{children:[C("inactive",H)(_.radioOff)," disabled"]}):G.client.type==="connected"?Q(L,{children:[C("success",H)(_.tick)," connected"]}):G.client.type==="pending"?Q(n,{children:[J(L,{dimColor:!0,children:_.radioOff}),J(L,{children:" connecting…"})]}):Q(L,{children:[C("error",H)(_.cross)," failed"]})]}),Q(X,{children:[J(L,{bold:!0,children:"Command: "}),J(L,{dimColor:!0,children:G.config.command})]}),G.config.args&&G.config.args.length>0&&Q(X,{children:[J(L,{bold:!0,children:"Args: "}),J(L,{dimColor:!0,children:G.config.args.join(" ")})]}),Q(X,{children:[J(L,{bold:!0,children:"Config location: "}),J(L,{dimColor:!0,children:R0(WP(G.name)?.scope??"dynamic")})]}),G.client.type==="connected"&&J(K0,{serverToolsCount:P,serverPromptsCount:b,serverResourcesCount:k.resources[G.name]?.length||0}),G.client.type==="connected"&&P>0&&Q(X,{children:[J(L,{bold:!0,children:"Tools: "}),Q(L,{dimColor:!0,children:[P," tools"]})]})]}),K.length>0&&J(X,{marginTop:1,children:J(L0,{options:K,onChange:async(V)=>{if(V==="tools")Y();else if(V==="reconnectMcpServer"){U(!0);try{let D=await B(G.name),{message:R}=E0(D,G.name);Z?.(R)}catch(D){Z?.(V0(D,G.name))}finally{U(!1)}}else if(V==="toggle-enabled")await S();else if(V==="back")z()},onCancel:z})})]}),J(X,{marginTop:1,children:J(L,{dimColor:!0,italic:!0,children:W.pending?Q(n,{children:["Press ",W.keyName," again to exit"]}):Q(r,{children:[J(h,{shortcut:"↑↓",action:"navigate"}),J(h,{shortcut:"Enter",action:"select"}),J(p,{action:"confirm:no",context:"Confirmation",fallback:"Esc",description:"back"})]})})})]})}var b0;var jP=P0(()=>{r0();LP();q0();cP();VP();u0();j0();t0();p0();w0();i0();W0();c0();YP();_0();S0();a();b0=e($0(),1)});function tG(G){let P=FP.c(44),{tool:Y,server:z,onBack:Z}=G,[f,H]=v0.default.useState(""),W,k;if(P[0]!==z.name||P[1]!==Y){k=y0(Y.name,z.name);let s=Y.userFacingName?Y.userFacingName({}):k;W=B0(s),P[0]=z.name,P[1]=Y,P[2]=W,P[3]=k}else W=P[2],k=P[3];let B=W,N;if(P[4]!==Y)N=Y.isReadOnly?.({})??!1,P[4]=Y,P[5]=N;else N=P[5];let $=N,U;if(P[6]!==Y)U=Y.isDestructive?.({})??!1,P[6]=Y,P[7]=U;else U=P[7];let S=U,M;if(P[8]!==Y)M=Y.isOpenWorld?.({})??!1,P[8]=Y,P[9]=M;else M=P[9];let b=M,K,V;if(P[10]!==Y)K=()=>{(async function(){try{let O=await Y.description({},{isNonInteractiveSession:!1,toolPermissionContext:{mode:"default",additionalWorkingDirectories:new Map,alwaysAllowRules:{},alwaysDenyRules:{},alwaysAskRules:{},isBypassPermissionsModeAvailable:!1},tools:[]});H(O)}catch{H("Failed to load description")}})()},V=[Y],P[10]=Y,P[11]=K,P[12]=V;else K=P[11],V=P[12];v0.default.useEffect(K,V);let D;if(P[13]!==$)D=$&&J(L,{color:"success",children:" [read-only]"}),P[13]=$,P[14]=D;else D=P[14];let R;if(P[15]!==S)R=S&&J(L,{color:"error",children:" [destructive]"}),P[15]=S,P[16]=R;else R=P[16];let g;if(P[17]!==b)g=b&&J(L,{dimColor:!0,children:" [open-world]"}),P[17]=b,P[18]=g;else g=P[18];let c;if(P[19]!==B||P[20]!==D||P[21]!==R||P[22]!==g)c=Q(n,{children:[B,D,R,g]}),P[19]=B,P[20]=D,P[21]=R,P[22]=g,P[23]=c;else c=P[23];let j=c,T;if(P[24]===Symbol.for("react.memo_cache_sentinel"))T=J(L,{bold:!0,children:"Tool name: "}),P[24]=T;else T=P[24];let A;if(P[25]!==k)A=Q(X,{children:[T,J(L,{dimColor:!0,children:k})]}),P[25]=k,P[26]=A;else A=P[26];let y;if(P[27]===Symbol.for("react.memo_cache_sentinel"))y=J(L,{bold:!0,children:"Full name: "}),P[27]=y;else y=P[27];let i;if(P[28]!==Y.name)i=Q(X,{children:[y,J(L,{dimColor:!0,children:Y.name})]}),P[28]=Y.name,P[29]=i;else i=P[29];let u;if(P[30]!==f)u=f&&Q(X,{flexDirection:"column",marginTop:1,children:[J(L,{bold:!0,children:"Description:"}),J(L,{wrap:"wrap",children:f})]}),P[30]=f,P[31]=u;else u=P[31];let l;if(P[32]!==Y.inputJSONSchema)l=Y.inputJSONSchema&&Y.inputJSONSchema.properties&&Object.keys(Y.inputJSONSchema.properties).length>0&&Q(X,{flexDirection:"column",marginTop:1,children:[J(L,{bold:!0,children:"Parameters:"}),J(X,{marginLeft:2,flexDirection:"column",children:Object.entries(Y.inputJSONSchema.properties).map((s)=>{let[x,O]=s,Q0=Y.inputJSONSchema?.required?.includes(x);return Q(L,{children:["• ",x,Q0&&J(L,{dimColor:!0,children:" (required)"}),":"," ",J(L,{dimColor:!0,children:typeof O==="object"&&O&&"type"in O?String(O.type):"unknown"}),typeof O==="object"&&O&&"description"in O&&Q(L,{dimColor:!0,children:[" - ",String(O.description)]})]},x)})})]}),P[32]=Y.inputJSONSchema,P[33]=l;else l=P[33];let v;if(P[34]!==A||P[35]!==i||P[36]!==u||P[37]!==l)v=Q(X,{flexDirection:"column",children:[A,i,u,l]}),P[34]=A,P[35]=i,P[36]=u,P[37]=l,P[38]=v;else v=P[38];let o;if(P[39]!==Z||P[40]!==z.name||P[41]!==v||P[42]!==j)o=J(O0,{title:j,subtitle:z.name,onCancel:Z,inputGuide:iP,children:v}),P[39]=Z,P[40]=z.name,P[41]=v,P[42]=j,P[43]=o;else o=P[43];return o}function iP(G){return G.pending?Q(L,{children:["Press ",G.keyName," again to exit"]}):J(p,{action:"confirm:no",context:"Confirmation",fallback:"Esc",description:"go back"})}var FP,v0;var uP=P0(()=>{q0();KP();w0();EP();a();FP=e(I0(),1),v0=e($0(),1)});function VJ(G){let P=HP.c(21),{server:Y,onSelectTool:z,onBack:Z}=G,f=J0(xP),H;P:{if(Y.client.type!=="connected"){let V;if(P[0]===Symbol.for("react.memo_cache_sentinel"))V=[],P[0]=V;else V=P[0];H=V;break P}let K;if(P[1]!==f||P[2]!==Y.name)K=fP(f,Y.name),P[1]=f,P[2]=Y.name,P[3]=K;else K=P[3];H=K}let W=H,k;if(P[4]!==Y.name||P[5]!==W){let K;if(P[7]!==Y.name)K=(V,D)=>{let R=y0(V.name,Y.name),g=V.userFacingName?V.userFacingName({}):R,c=B0(g),j=V.isReadOnly?.({})??!1,T=V.isDestructive?.({})??!1,A=V.isOpenWorld?.({})??!1,y=[];if(j)y.push("read-only");if(T)y.push("destructive");if(A)y.push("open-world");return{label:c,value:D.toString(),description:y.length>0?y.join(", "):void 0,descriptionColor:T?"error":j?"success":void 0}},P[7]=Y.name,P[8]=K;else K=P[8];k=W.map(K),P[4]=Y.name,P[5]=W,P[6]=k}else k=P[6];let B=k,N=`Tools for ${Y.name}`,$=W.length,U;if(P[9]!==W.length)U=zP(W.length,"tool"),P[9]=W.length,P[10]=U;else U=P[10];let S=`${$} ${U}`,M;if(P[11]!==Z||P[12]!==z||P[13]!==W||P[14]!==B)M=W.length===0?J(L,{dimColor:!0,children:"No tools available"}):J(L0,{options:B,onChange:(K)=>{let V=parseInt(K),D=W[V];if(D)z(D,V)},onCancel:Z}),P[11]=Z,P[12]=z,P[13]=W,P[14]=B,P[15]=M;else M=P[15];let b;if(P[16]!==Z||P[17]!==N||P[18]!==S||P[19]!==M)b=J(O0,{title:N,subtitle:S,onCancel:Z,inputGuide:vP,children:M}),P[16]=Z,P[17]=N,P[18]=S,P[19]=M,P[20]=b;else b=P[20];return b}function vP(G){return G.pending?Q(L,{children:["Press ",G.keyName," again to exit"]}):Q(r,{children:[J(h,{shortcut:"↑↓",action:"navigate"}),J(h,{shortcut:"Enter",action:"select"}),J(p,{action:"confirm:no",context:"Confirmation",fallback:"Esc",description:"back"})]})}function xP(G){return G.mcp.tools}var HP;var aP=P0(()=>{q0();KP();u0();j0();p0();w0();i0();W0();EP();c0();a();HP=e(I0(),1)});
2
- export{bG as wf,$P as xf,uG as yf,jP as zf,tG as Af,uP as Bf,VJ as Cf,aP as Df};
@@ -1,2 +0,0 @@
1
- import{Hh as g,Ih as Uf}from"./cli-0.6.8-p6rhsdxf.mjs";import{Mh as A,Oh as Kf}from"./cli-0.6.8-yztx4k12.mjs";import{AB as bf,Aj as w,Bj as zf,Dl as Jf,EP as l,KD as v,PR as Hf,Pl as N,QR as d,RD as Df,Rt as m,St as Zf,VQ as S,Vl as Qf,Wr as h,Xr as Yf,Zl as L,bl as Bf,cl as Gf,cm as Vf,eQ as Ff,fu as C,gR as p,il as y,ju as T,kB as I,lC as u,lr as E,mr as P,nR as k,nj as W,nr as Xf,nu as _f,oC as jf,vw as M,ww as $f,zB as c}from"./cli-0.6.8-883y3p0j.mjs";import{dea as R,lea as ff}from"./cli-0.6.8-vpaw67v2.mjs";import{Lga as O,Oga as e}from"./cli-0.6.8-dxtyt1wg.mjs";import{Vma as H,eoa as s,gla as F,hka as U,ika as q,nka as x}from"./cli-0.6.8-dwwx58n6.mjs";import{Ipa as K,Lpa as t}from"./cli-0.6.8-259kprym.mjs";import{randomUUID as qf}from"crypto";async function lf({setMessages:V,readFileState:i,discoveredSkillNames:n,loadedNestedMemoryPaths:r,getAppState:G,setAppState:J,setConversationId:X}){let Y=l();await I("clear",{getAppState:G,setAppState:J,signal:AbortSignal.timeout(Y),timeoutMs:Y});let Z=F();if(Z)O("tengu_cache_eviction_hint",{scope:"conversation_clear",last_request_id:Z});let Q=new Set,_=[],$=(f)=>("isBackgrounded"in f)&&f.isBackgrounded===!1;if(G)for(let f of Object.values(G().tasks)){if($(f))continue;if(v(f))Q.add(f.agentId),_.push(f);else if(M(f))Q.add(f.identity.agentId)}if(V(()=>[]),X)X(qf());if(g(Q),c(x()),i.clear(),n?.clear(),r?.clear(),J)J((f)=>{let B={};for(let[D,z]of Object.entries(f.tasks)){if(!$(z)){B[D]=z;continue}try{if(z.status==="running"){if(h(z)){if(z.shellCommand?.kill(),z.shellCommand?.cleanup(),z.cleanupTimeoutId)clearTimeout(z.cleanupTimeoutId)}if("abortController"in z)z.abortController?.abort();if("unregisterCleanup"in z)z.unregisterCleanup?.()}}catch(a){R(a)}E(D)}return{...f,tasks:B,attribution:m(),standaloneAgentContext:void 0,fileHistory:{snapshots:[],trackedFiles:new Set,snapshotSequence:0},mcp:{clients:[],tools:[],commands:[],resources:{},pluginReconnectKey:f.mcp.pluginReconnectKey}}});N(),p(),H(),A(),T(),C();let o=U();q({setCurrentAsParent:!0}),L(o),await S();for(let f of _){if(f.status!=="running")continue;P(f.id,W(w(f.agentId)))}{let{saveMode:f}=(d(),K(Hf)),{isCoordinatorMode:B}=(Gf(),K(Bf));f(B()?"coordinator":"normal")}let b=y();if(b)k(b);let j=await u("clear");if(j.length>0)V(()=>j)}var xf=t(()=>{s();e();$f();Df();Yf();zf();_f();Zf();Ff();ff();Kf();Qf();bf();jf();d();Xf();Vf();Jf();Uf()});
2
- export{lf as Fh,xf as Gh};
@@ -1,2 +0,0 @@
1
- import{lF as O,nF as j,yn as y,zn as p}from"./cli-0.6.8-883y3p0j.mjs";import{DX as S,DZ as v,YY as F,_Y as I,cZ as R}from"./cli-0.6.8-vf9cagcj.mjs";import{J1 as Z,K1 as N,L1 as U}from"./cli-0.6.8-jx1wvs6x.mjs";import{M1 as d}from"./cli-0.6.8-gmzxyn2t.mjs";import{jba as M,wba as E}from"./cli-0.6.8-vpaw67v2.mjs";import{Lga as H,Oga as b}from"./cli-0.6.8-dxtyt1wg.mjs";import{Hpa as k}from"./cli-0.6.8-259kprym.mjs";b();v();E();j();p();U();var T=k(S(),1),h=k(d(),1),x="Auto mode lets Claudin handle permission prompts automatically — Claudin checks each tool call for risky actions and prompt injection before executing. Actions Claudin identifies as safe are executed, while actions Claudin identifies as risky are blocked and Claudin may try a different approach. Ideal for long-running tasks. Sessions are slightly more expensive. Claudin can make mistakes that allow harmful commands to run, it's recommended to only use in isolated environments. Shift+Tab to change mode.";function l(A){let f=T.c(18),{onAccept:J,onDecline:q,declineExits:C}=A,K;if(f[0]===Symbol.for("react.memo_cache_sentinel"))K=[],f[0]=K;else K=f[0];h.default.useEffect(_,K);let Q;if(f[1]!==J||f[2]!==q)Q=function(m){f:switch(m){case"accept":{H("tengu_auto_mode_opt_in_dialog_accept",{}),M("userSettings",{skipAutoPermissionPrompt:!0}),J();break f}case"accept-default":{H("tengu_auto_mode_opt_in_dialog_accept_default",{}),M("userSettings",{skipAutoPermissionPrompt:!0,permissions:{defaultMode:"auto"}}),J();break f}case"decline":H("tengu_auto_mode_opt_in_dialog_decline",{}),q()}},f[1]=J,f[2]=q,f[3]=Q;else Q=f[3];let B=Q,V;if(f[4]===Symbol.for("react.memo_cache_sentinel"))V=N(F,{flexDirection:"column",gap:1,children:[Z(I,{children:x}),Z(R,{url:"https://code.claude.com/docs/en/security"})]}),f[4]=V;else V=f[4];let W;if(f[5]===Symbol.for("react.memo_cache_sentinel"))W=[{label:"Yes, and make it my default mode",value:"accept-default"}],f[5]=W;else W=f[5];let X;if(f[6]===Symbol.for("react.memo_cache_sentinel"))X={label:"Yes, enable auto mode",value:"accept"},f[6]=X;else X=f[6];let L=C?"No, exit":"No, go back",w;if(f[7]!==L)w=[...W,X,{label:L,value:"decline"}],f[7]=L,f[8]=w;else w=f[8];let z;if(f[9]!==B)z=(P)=>B(P),f[9]=B,f[10]=z;else z=f[10];let G;if(f[11]!==q||f[12]!==w||f[13]!==z)G=Z(O,{options:w,onChange:z,onCancel:q}),f[11]=q,f[12]=w,f[13]=z,f[14]=G;else G=f[14];let Y;if(f[15]!==q||f[16]!==G)Y=N(y,{title:"Enable auto mode?",color:"warning",onCancel:q,children:[V,G]}),f[15]=q,f[16]=G,f[17]=Y;else Y=f[17];return Y}function _(){H("tengu_auto_mode_opt_in_dialog_shown",{})}
2
- export{x as Ja,l as Ka};
@@ -1,2 +0,0 @@
1
- import{Lpa as l}from"./cli-0.6.8-259kprym.mjs";function o(i,e,r){var t=null;if(r!==void 0&&(t=""+r),e.key!==void 0&&(t=""+e.key),"key"in e){r={};for(var s in e)s!=="key"&&(r[s]=e[s])}else r=e;return e=r.ref,{$$typeof:n,type:i,key:t,ref:e!==void 0?e:null,props:r}}var n,d,u,E,a;var c=l(()=>{n=Symbol.for("react.transitional.element"),d=Symbol.for("react.fragment");u=d,E=o,a=o});
2
- export{u as I1,E as J1,a as K1,c as L1};
@@ -1,2 +0,0 @@
1
- import{EM as O,FM as P,GM as Q,HM as U,Ii as M,Ji as W,KM as X}from"./cli-0.6.8-883y3p0j.mjs";import{Lpa as V}from"./cli-0.6.8-259kprym.mjs";function Y(f){return f==="projectSettings"||f==="policySettings"||f==="command"}function J(f){return O(f)}function L(f,G,q){let v=J(G.source),z=J(q.source),j=G.ruleValue.toolName;if(f==="deny")return`Remove the "${j}" deny rule from ${v}, or remove the specific allow rule from ${z}`;return`Remove the "${j}" ask rule from ${v}, or remove the specific allow rule from ${z}`}function Z(f,G,q){let{toolName:v,ruleContent:z}=f.ruleValue;if(z===void 0)return{shadowed:!1};let j=G.find((E)=>E.ruleValue.toolName===v&&E.ruleValue.ruleContent===void 0);if(!j)return{shadowed:!1};if(v===M&&q.sandboxAutoAllowEnabled){if(!Y(j.source))return{shadowed:!1}}return{shadowed:!0,shadowedBy:j,shadowType:"ask"}}function _(f,G){let{toolName:q,ruleContent:v}=f.ruleValue;if(v===void 0)return{shadowed:!1};let z=G.find((j)=>j.ruleValue.toolName===q&&j.ruleValue.ruleContent===void 0);if(!z)return{shadowed:!1};return{shadowed:!0,shadowedBy:z,shadowType:"deny"}}function F(f,G){let q=[],v=P(f),z=U(f),j=Q(f);for(let E of v){let H=_(E,j);if(H.shadowed){let K=J(H.shadowedBy.source);q.push({rule:E,reason:`Blocked by "${H.shadowedBy.ruleValue.toolName}" deny rule (from ${K})`,shadowedBy:H.shadowedBy,shadowType:"deny",fix:L("deny",H.shadowedBy,E)});continue}let I=Z(E,z,G);if(I.shadowed){let K=J(I.shadowedBy.source);q.push({rule:E,reason:`Shadowed by "${I.shadowedBy.ruleValue.toolName}" ask rule (from ${K})`,shadowedBy:I.shadowedBy,shadowType:"ask",fix:L("ask",I.shadowedBy,E)})}}return q}var $=V(()=>{W();X()});
2
- export{F as ig,$ as jg};
@@ -1,2 +0,0 @@
1
- import{kW as M,mW as X}from"./cli-0.6.8-sn09eprm.mjs";import{A_ as B,J_ as V,hba as K,nba as L,wba as W}from"./cli-0.6.8-vpaw67v2.mjs";import{Lpa as Q}from"./cli-0.6.8-259kprym.mjs";async function F(){let b=await M();if(b.length===0)return{availableEnvironments:[],selectedEnvironment:null,selectedEnvironmentSource:null};let z=L()?.remote?.defaultEnvironmentId,H=b.find((x)=>x.kind!=="bridge")??b[0],J=null;if(z){let x=b.find((q)=>q.environment_id===z);if(x){H=x;for(let q=B.length-1;q>=0;q--){let y=B[q];if(!y||y==="flagSettings")continue;if(K(y)?.remote?.defaultEnvironmentId===z){J=y;break}}}}return{availableEnvironments:b,selectedEnvironment:H,selectedEnvironmentSource:J}}var Y=Q(()=>{V();W();X()});
2
- export{F as Sb,Y as Tb};
@@ -1,2 +0,0 @@
1
- import{ti as a,ui as l}from"./cli-0.6.8-hvckc721.mjs";import{vi as m,wi as c}from"./cli-0.6.8-070cxjdc.mjs";import{J1 as e,L1 as n}from"./cli-0.6.8-jx1wvs6x.mjs";import{Lpa as s}from"./cli-0.6.8-259kprym.mjs";async function f(o,r){let t=await m();if(t.type==="message")return o(t.value),null;return e(a,{startingMessage:"Starting new login following /extra-usage. Exit with Ctrl-C to use existing account.",onDone:(i)=>{r.onChangeAPIKey(),o(i?"Login successful":"Login interrupted")}})}var g=s(()=>{l();c();n()});
2
- export{f as ri,g as si};
@@ -1,2 +0,0 @@
1
- import{of as R,qf as d}from"./cli-0.6.8-z4wpf0ah.mjs";import{C0 as j,F0 as c}from"./cli-0.6.8-7g7k6yt9.mjs";import{Oha as K,Rha as D}from"./cli-0.6.8-4avmxq80.mjs";import{gia as C,nia as h}from"./cli-0.6.8-cv73s4x5.mjs";import{Lpa as I,Mpa as J}from"./cli-0.6.8-259kprym.mjs";async function i({environmentId:X,title:Q,events:q,gitRepoUrl:$,branch:Y,signal:z,baseUrl:G,getAccessToken:L,permissionMode:W}){let{getClaudeAIOAuthTokens:B}=await import("./auth-0.6.8-jzmpk916.mjs"),{getOrganizationUUID:Z}=await import("./client-0.6.8-8kz2zw01.mjs"),{getOauthConfig:V}=await import("./oauth-0.6.8-c2r6j7j0.mjs"),{getOAuthHeaders:P}=await import("./api-0.6.8-dx65vfgr.mjs"),{parseGitHubRepository:N}=await import("./detectRepository-0.6.8-3ayp37pd.mjs"),{getDefaultBranch:_}=await import("./git-0.6.8-drry71tr.mjs"),{getMainLoopModel:M}=await import("./model-0.6.8-99m80ayt.mjs"),{default:T}=await import("./index-0.6.8-dkdk0g9j.mjs"),x=L?.()??B()?.accessToken;if(!x)return K("[bridge] No access token for session creation"),null;let k=await Z();if(!k)return K("[bridge] No org UUID for session creation"),null;let E=null,v=null;if($){let{parseGitRemote:y}=await import("./detectRepository-0.6.8-3ayp37pd.mjs"),O=y($);if(O){let{host:A,owner:S,name:f}=O,F=Y||await _()||void 0;E={type:"git_repository",url:`https://${A}/${S}/${f}`,revision:F},v={type:"git_repository",git_info:{type:"github",repo:`${S}/${f}`,branches:[`claude/${Y||"task"}`]}}}else{let A=N($);if(A){let[S,f]=A.split("/");if(S&&f){let F=Y||await _()||void 0;E={type:"git_repository",url:`https://github.com/${S}/${f}`,revision:F},v={type:"git_repository",git_info:{type:"github",repo:`${S}/${f}`,branches:[`claude/${Y||"task"}`]}}}}}}let m={...Q!==void 0&&{title:Q},events:q,session_context:{sources:E?[E]:[],outcomes:v?[v]:[],model:M()},environment_id:X,source:"remote-control",...W&&{permission_mode:W}},U={...P(x),"anthropic-beta":"ccr-byoc-2025-07-29","x-organization-uuid":k},b=`${G??V().BASE_API_URL}/v1/sessions`,H;try{H=await T.post(b,m,{headers:U,signal:z,validateStatus:(y)=>y<500})}catch(y){return K(`[bridge] Session creation request failed: ${C(y)}`),null}if(!(H.status===200||H.status===201)){let y=R(H.data);return K(`[bridge] Session creation failed with status ${H.status}${y?`: ${y}`:""}`),null}let w=H.data;if(!w||typeof w!=="object"||!("id"in w)||typeof w.id!=="string")return K("[bridge] No session ID in response"),null;return w.id}async function r(X,Q){let{getClaudeAIOAuthTokens:q}=await import("./auth-0.6.8-jzmpk916.mjs"),{getOrganizationUUID:$}=await import("./client-0.6.8-8kz2zw01.mjs"),{getOauthConfig:Y}=await import("./oauth-0.6.8-c2r6j7j0.mjs"),{getOAuthHeaders:z}=await import("./api-0.6.8-dx65vfgr.mjs"),{default:G}=await import("./index-0.6.8-dkdk0g9j.mjs"),L=Q?.getAccessToken?.()??q()?.accessToken;if(!L)return K("[bridge] No access token for session fetch"),null;let W=await $();if(!W)return K("[bridge] No org UUID for session fetch"),null;let B={...z(L),"anthropic-beta":"ccr-byoc-2025-07-29","x-organization-uuid":W},Z=`${Q?.baseUrl??Y().BASE_API_URL}/v1/sessions/${X}`,V=1e4;K(`[bridge] Fetching session ${X}`);let P;try{P=await G.get(Z,{headers:B,timeout:V,validateStatus:(N)=>N<500})}catch(N){if(G.isAxiosError(N)){let _=N.response?.status??"no-response",M=N.code??"unknown-code",T=N.config?.url??Z,x=N.config?.method?.toUpperCase()??"GET",k=N.message??C(N),E=N.config?.timeout??V;K(`[bridge] Session fetch request failed: status=${_} code=${M} method=${x} url=${T} timeout=${E} message=${k}`)}else K(`[bridge] Session fetch request failed: url=${Z} timeout=${V} message=${C(N)}`);return null}if(P.status!==200){let N=R(P.data);return K(`[bridge] Session fetch failed with status ${P.status} url=${Z}${N?`: ${N}`:""}`),null}return P.data}async function t(X,Q){let{getClaudeAIOAuthTokens:q}=await import("./auth-0.6.8-jzmpk916.mjs"),{getOrganizationUUID:$}=await import("./client-0.6.8-8kz2zw01.mjs"),{getOauthConfig:Y}=await import("./oauth-0.6.8-c2r6j7j0.mjs"),{getOAuthHeaders:z}=await import("./api-0.6.8-dx65vfgr.mjs"),{default:G}=await import("./index-0.6.8-dkdk0g9j.mjs"),L=Q?.getAccessToken?.()??q()?.accessToken;if(!L){K("[bridge] No access token for session archive");return}let W=await $();if(!W){K("[bridge] No org UUID for session archive");return}let B={...z(L),"anthropic-beta":"ccr-byoc-2025-07-29","x-organization-uuid":W},Z=`${Q?.baseUrl??Y().BASE_API_URL}/v1/sessions/${X}/archive`;K(`[bridge] Archiving session ${X}`);let V=await G.post(Z,{},{headers:B,timeout:Q?.timeoutMs??1e4,validateStatus:(P)=>P<500});if(V.status===200)K(`[bridge] Session ${X} archived successfully`);else{let P=R(V.data);K(`[bridge] Session archive failed with status ${V.status}${P?`: ${P}`:""}`)}}async function o(X,Q,q){let{getClaudeAIOAuthTokens:$}=await import("./auth-0.6.8-jzmpk916.mjs"),{getOrganizationUUID:Y}=await import("./client-0.6.8-8kz2zw01.mjs"),{getOauthConfig:z}=await import("./oauth-0.6.8-c2r6j7j0.mjs"),{getOAuthHeaders:G}=await import("./api-0.6.8-dx65vfgr.mjs"),{default:L}=await import("./index-0.6.8-dkdk0g9j.mjs"),W=q?.getAccessToken?.()??$()?.accessToken;if(!W){K("[bridge] No access token for session title update");return}let B=await Y();if(!B){K("[bridge] No org UUID for session title update");return}let Z={...G(W),"anthropic-beta":"ccr-byoc-2025-07-29","x-organization-uuid":B},V=j(X),P=`${q?.baseUrl??z().BASE_API_URL}/v1/sessions/${V}`;K(`[bridge] Updating session title: ${V} → ${Q}`);try{let N=await L.patch(P,{title:Q},{headers:Z,timeout:1e4,validateStatus:(_)=>_<500});if(N.status===200)K("[bridge] Session title updated successfully");else{let _=R(N.data);K(`[bridge] Session title update failed with status ${N.status}${_?`: ${_}`:""}`)}}catch(N){K(`[bridge] Session title update request failed: ${C(N)}`)}}var p=I(()=>{D();h();d();c()});
2
- export{i as ff,r as gf,t as hf,o as if,p as jf};
@@ -1,4 +0,0 @@
1
- import{AD as HJ,Oo as G,Qr as D,Ro as a,Rr as hJ,cn as R,dn as BJ,zD as k}from"./cli-0.6.8-883y3p0j.mjs";import{S5 as ZJ,b6 as $J,q6 as bJ}from"./cli-0.6.8-tb4rrntr.mjs";import{B9 as C,C9 as GJ,D9 as h,E9 as FJ,F9 as u,G9 as kJ,hba as WJ,wba as jJ}from"./cli-0.6.8-vpaw67v2.mjs";import{lfa as x,xfa as gJ}from"./cli-0.6.8-hj3j54vb.mjs";import{Qfa as q,Sfa as s,Tfa as Y,Ufa as r}from"./cli-0.6.8-2nda5zxh.mjs";import{Aga as yJ,vga as M}from"./cli-0.6.8-9cxxg2ax.mjs";import{$ga as CJ,_ga as o,iha as n,jha as EJ,oha as l,pha as TJ}from"./cli-0.6.8-4avmxq80.mjs";import{Gja as c,Hja as OJ,Kja as H,Kna as QJ,Lja as F,Mja as I,Nja as YJ,Oia as g,Oja as P,Pia as zJ,Pja as XJ,Qia as A,Ria as wJ,aja as f,bja as PJ,eoa as mJ}from"./cli-0.6.8-dwwx58n6.mjs";import{noa as K,ooa as DJ}from"./cli-0.6.8-8ezmkwsw.mjs";import{Lpa as B}from"./cli-0.6.8-259kprym.mjs";function UJ(J,Q){return Q.length<2?J:P(J,R(Q,0,-1))}var z;var L=B(()=>{XJ();BJ();z=UJ});function xJ(J,Q){Q=H(Q,J);var W=-1,$=Q.length;if(!$)return!0;while(++W<$){var Z=I(Q[W]);if(Z==="__proto__"&&!KJ.call(J,"__proto__"))return!1;if((Z==="constructor"||Z==="prototype")&&W<$-1)return!1}var X=z(J,Q);return X==null||delete X[I(k(Q))]}var IJ,KJ,N;var O=B(()=>{F();HJ();L();YJ();IJ=Object.prototype,KJ=IJ.hasOwnProperty;N=xJ});function MJ(J){return C(J)?void 0:J}var E;var T=B(()=>{GJ();E=MJ});function RJ(J){return A(J)||f(J)||!!(S&&J&&J[S])}var S,d;var _=B(()=>{DJ();PJ();wJ();S=K?K.isConcatSpreadable:void 0;d=RJ});function v(J,Q,W,$,Z){var X=-1,V=J.length;W||(W=d),Z||(Z=[]);while(++X<V){var U=J[X];if(Q>0&&W(U))if(Q>1)v(U,Q-1,W,$,Z);else g(Z,U);else if(!$)Z[Z.length]=U}return Z}var m;var j=B(()=>{zJ();_();m=v});function LJ(J){var Q=J==null?0:J.length;return Q?m(J,1):[]}var y;var b=B(()=>{j();y=LJ});function NJ(J){return u(h(J,void 0,y),J+"")}var i;var p=B(()=>{b();FJ();kJ();i=NJ});var SJ=1,AJ=2,fJ=4,dJ,NQ;var _J=B(()=>{OJ();TJ();O();F();CJ();T();p();EJ();dJ=i(function(J,Q){var W={};if(J==null)return W;var $=!1;if(Q=c(Q,function(X){return X=H(X,J),$||($=X.length>1),X}),o(J,n(J),W),$)W=l(W,SJ|AJ|fJ,E);var Z=Q.length;while(Z--)N(W,Q[Z]);return W}),NQ=dJ});function t(){let J=x("tengu_harbor_ledger",[]),Q=vJ().safeParse(J);return Q.success?Q.data:[]}function e(){return x("tengu_harbor",!1)}var vJ;var JJ=B(()=>{s();r();a();gJ();vJ=Y(()=>q.array(q.object({marketplace:q.string(),plugin:q.string()})))});function uQ(J,Q,W){let $=Object.entries(W??{}).filter(([Z])=>iJ.test(Z)).map(([Z,X])=>` ${Z}="${D(X)}"`).join("");return`<${M} source="${D(J)}"${$}>
2
- ${Q}
3
- </${M}>`}function pJ(J,Q){if((J==="team"||J==="enterprise")&&Q)return{entries:Q,source:"org"};return{entries:t(),source:"ledger"}}function cJ(J,Q){let W=J.split(":");return Q.find(($)=>$.kind==="server"?J===$.name:W[0]==="plugin"&&W[1]===$.name)}function iQ(J,Q,W){if(!Q?.experimental?.["claude/channel"])return{action:"skip",kind:"capability",reason:"server did not declare claude/channel capability"};if(!e())return{action:"skip",kind:"disabled",reason:"channels feature is not currently available"};if(!ZJ()?.accessToken)return{action:"skip",kind:"auth",reason:"channels requires claude.ai authentication (run /login)"};let $=$J(),Z=$==="team"||$==="enterprise",X=Z?WJ("policySettings"):void 0;if(Z&&X?.channelsEnabled!==!0)return{action:"skip",kind:"policy",reason:"channels not enabled by org policy (set channelsEnabled: true in managed settings)"};let V=cJ(J,QJ());if(!V)return{action:"skip",kind:"session",reason:`server ${J} not in --channels list for this session`};if(V.kind==="plugin"){let U=W?G(W).marketplace:void 0;if(U!==V.marketplace)return{action:"skip",kind:"marketplace",reason:`you asked for plugin:${V.name}@${V.marketplace} but the installed ${V.name} plugin is from ${U??"an unknown source"}`};if(!V.dev){let{entries:qJ,source:VJ}=pJ($,X?.allowedChannelPlugins);if(!qJ.some((w)=>w.plugin===V.name&&w.marketplace===V.marketplace))return{action:"skip",kind:"allowlist",reason:VJ==="org"?`plugin ${V.name}@${V.marketplace} is not on your org's approved channels list (set allowedChannelPlugins in managed settings)`:`plugin ${V.name}@${V.marketplace} is not on the approved channels allowlist (use --dangerously-load-development-channels for local dev)`}}}else if(!V.dev)return{action:"skip",kind:"allowlist",reason:`server ${V.name} is not on the approved channels allowlist (use --dangerously-load-development-channels for local dev)`};return{action:"register"}}var bQ,uJ="notifications/claude/channel/permission",hQ,iJ;var oJ=B(()=>{s();mJ();yJ();bJ();r();a();jJ();hJ();JJ();bQ=Y(()=>q.object({method:q.literal("notifications/claude/channel"),params:q.object({content:q.string(),meta:q.record(q.string(),q.string()).optional()})})),hQ=Y(()=>q.object({method:q.literal(uJ),params:q.object({request_id:q.string(),behavior:q.enum(["allow","deny"])})})),iJ=/^[a-zA-Z_][a-zA-Z0-9_]*$/});
4
- export{NQ as Jf,_J as Kf,JJ as Lf,bQ as Mf,uQ as Nf,cJ as Of,iQ as Pf,oJ as Qf};
@@ -1,2 +0,0 @@
1
- import{Oga as f}from"./cli-0.6.8-dxtyt1wg.mjs";import{Rha as h}from"./cli-0.6.8-4avmxq80.mjs";import{Lpa as Z}from"./cli-0.6.8-259kprym.mjs";var $=()=>{};var F=Z(()=>{$()});var K;var G=Z(()=>{K=new Set(["if","then","elif","else","fi","while","until","for","in","do","done","case","esac","function","select"])});var M=Z(()=>{G();$();F();_();O()});var _=Z(()=>{G();$();F();M()});var O=Z(()=>{G();$();F();_();M()});var Sz;var w=Z(()=>{$();F();O();G();Sz=Promise.resolve()});async function kz(){}async function oz(z){if(!z||z.length>D)return null;return null}async function dz(z){if(!z||z.length>D)return null;return null}function nz(z){if(z.type==="declaration_command"){let J=z.children[0];return J&&x.has(J.text)?[J.text]:[]}let X=[],V=!1;for(let J of z.children){if(J.type==="variable_assignment")continue;if(J.type==="command_name"||!V&&J.type==="word"){V=!0,X.push(J.text);continue}if(v.has(J.type))X.push(l(J.text));else if(m.has(J.type))break}return X}function l(z){return z.length>=2&&(z[0]==='"'&&z.at(-1)==='"'||z[0]==="'"&&z.at(-1)==="'")?z.slice(1,-1):z}var D=1e4,x,v,m,pz;var L=Z(()=>{f();h();w();x=new Set(["export","declare","typeset","readonly","local","unset","unsetenv"]),v=new Set(["word","string","raw_string","number"]),m=new Set(["command_substitution","process_substitution"]);pz=Symbol("parse-aborted")});
2
- export{K as i1,w as j1,kz as k1,oz as l1,pz as m1,dz as n1,nz as o1,L as p1};
@@ -1,2 +0,0 @@
1
- import{nh as e,qh as fq}from"./cli-0.6.8-1yx8jjck.mjs";import{rh as t,th as Hq}from"./cli-0.6.8-ekkrzmjw.mjs";import{VM as o,WM as s,XM as Oq,bF as r,cF as kq,lF as n,mF as Mq,qn as S,rn as Nq,sn as g,tn as Vq,un as $,vn as Wq,yn as i,zn as Yq}from"./cli-0.6.8-883y3p0j.mjs";import{BW as u,DW as Zq}from"./cli-0.6.8-34gwg749.mjs";import{DX as Qq,DZ as Xq,YY as M,_Y as F,qZ as c,rZ as Uq}from"./cli-0.6.8-vf9cagcj.mjs";import{J1 as L,K1 as R,L1 as l}from"./cli-0.6.8-jx1wvs6x.mjs";import{M1 as Lq}from"./cli-0.6.8-gmzxyn2t.mjs";import{Y7 as d,Z7 as Jq}from"./cli-0.6.8-vpaw67v2.mjs";import{Hpa as a,Lpa as Gq}from"./cli-0.6.8-259kprym.mjs";function qq(){let Z=T.c(1),q;if(Z[0]===Symbol.for("react.memo_cache_sentinel"))q=L(F,{dimColor:!0,children:"Claude Code will be able to read files in this directory and make edits when auto-accept edits is on."}),Z[0]=q;else q=Z[0];return q}function wq(Z){let q=T.c(5),{path:X}=Z,Q;if(q[0]!==X)Q=L(F,{color:"permission",children:X}),q[0]=X,q[1]=Q;else Q=q[1];let N;if(q[2]===Symbol.for("react.memo_cache_sentinel"))N=L(qq,{}),q[2]=N;else N=q[2];let J;if(q[3]!==Q)J=R(M,{flexDirection:"column",paddingX:2,gap:1,children:[Q,N]}),q[3]=Q,q[4]=J;else J=q[4];return J}function Kq(Z){let q=T.c(14),{value:X,onChange:Q,onSubmit:N,error:J,suggestions:V,selectedSuggestion:w}=Z,k;if(q[0]===Symbol.for("react.memo_cache_sentinel"))k=L(F,{children:"Enter the path to the directory:"}),q[0]=k;else k=q[0];let Y;if(q[1]!==Q||q[2]!==N||q[3]!==X)Y=L(M,{borderDimColor:!0,borderStyle:"round",marginY:1,paddingLeft:1,children:L(r,{showCursor:!0,placeholder:`Directory path${d.ellipsis}`,value:X,onChange:Q,onSubmit:N,columns:80,cursorOffset:X.length,onChangeCursorOffset:Aq})}),q[1]=Q,q[2]=N,q[3]=X,q[4]=Y;else Y=q[4];let W;if(q[5]!==w||q[6]!==V)W=V.length>0&&L(M,{marginBottom:1,children:L(t,{suggestions:V,selectedSuggestion:w})}),q[5]=w,q[6]=V,q[7]=W;else W=q[7];let U;if(q[8]!==J)U=J&&L(F,{color:"error",children:J}),q[8]=J,q[9]=U;else U=q[9];let O;if(q[10]!==Y||q[11]!==W||q[12]!==U)O=R(M,{flexDirection:"column",children:[k,Y,W,U]}),q[10]=Y,q[11]=W,q[12]=U,q[13]=O;else O=q[13];return O}function Aq(){}function lq(Z){let q=T.c(34),{onAddDirectory:X,onCancel:Q,permissionContext:N,directoryPath:J}=Z,[V,w]=H.useState(""),[k,Y]=H.useState(null),W;if(q[0]===Symbol.for("react.memo_cache_sentinel"))W=[],q[0]=W;else W=q[0];let[U,O]=H.useState(W),[f,B]=H.useState(0),v;if(q[1]===Symbol.for("react.memo_cache_sentinel"))v=async(z)=>{if(!z){O([]),B(0);return}let G=await e(z);O(G),B(0)},q[1]=v;else v=q[1];let I=c(v,100),C,P;if(q[2]!==I||q[3]!==V)C=()=>{I(V)},P=[V,I],q[2]=I,q[3]=V,q[4]=C,q[5]=P;else C=q[4],P=q[5];H.useEffect(C,P);let m;if(q[6]===Symbol.for("react.memo_cache_sentinel"))m=(z)=>{let G=z.id+"/";w(G),Y(null)},q[6]=m;else m=q[6];let zq=m,_;if(q[7]!==X||q[8]!==N)_=async(z)=>{let G=await o(z,N);if(G.resultType==="success")X(G.absolutePath,!1);else Y(s(G))},q[7]=X,q[8]=N,q[9]=_;else _=q[9];let K=_,D;if(q[10]===Symbol.for("react.memo_cache_sentinel"))D={context:"Settings"},q[10]=D;else D=q[10];u("confirm:no",Q,D);let b;if(q[11]!==K||q[12]!==f||q[13]!==U)b=(z)=>{if(U.length>0){if(z.key==="tab"){z.preventDefault();let G=U[f];if(G)zq(G);return}if(z.key==="return"){z.preventDefault();let G=U[f];if(G)K(G.id+"/");return}if(z.key==="up"||z.ctrl&&z.key==="p"){z.preventDefault(),B((G)=>G<=0?U.length-1:G-1);return}if(z.key==="down"||z.ctrl&&z.key==="n"){z.preventDefault(),B((G)=>G>=U.length-1?0:G+1);return}}},q[11]=K,q[12]=f,q[13]=U,q[14]=b;else b=q[14];let x=b,j;if(q[15]!==J||q[16]!==X||q[17]!==Q)j=(z)=>{if(!J)return;let G=z;q:switch(G){case"yes-session":{X(J,!1);break q}case"yes-remember":{X(J,!0);break q}case"no":Q()}},q[15]=J,q[16]=X,q[17]=Q,q[18]=j;else j=q[18];let y=j,p=J?void 0:Eq,A;if(q[19]!==V||q[20]!==J||q[21]!==k||q[22]!==y||q[23]!==K||q[24]!==f||q[25]!==U)A=J?R(M,{flexDirection:"column",gap:1,children:[L(wq,{path:J}),L(n,{options:Rq,onChange:y,onCancel:()=>y("no")})]}):R(M,{flexDirection:"column",gap:1,marginX:2,children:[L(qq,{}),L(Kq,{value:V,onChange:w,onSubmit:K,error:k,suggestions:U,selectedSuggestion:f})]}),q[19]=V,q[20]=J,q[21]=k,q[22]=y,q[23]=K,q[24]=f,q[25]=U,q[26]=A;else A=q[26];let E;if(q[27]!==Q||q[28]!==p||q[29]!==A)E=L(i,{title:"Add directory to workspace",onCancel:Q,color:"permission",isCancelActive:!1,inputGuide:p,children:A}),q[27]=Q,q[28]=p,q[29]=A,q[30]=E;else E=q[30];let h;if(q[31]!==x||q[32]!==E)h=L(M,{flexDirection:"column",tabIndex:0,autoFocus:!0,onKeyDown:x,children:E}),q[31]=x,q[32]=E,q[33]=h;else h=q[33];return h}function Eq(Z){return Z.pending?R(F,{children:["Press ",Z.keyName," again to exit"]}):R($,{children:[L(S,{shortcut:"Tab",action:"complete"}),L(S,{shortcut:"Enter",action:"add"}),L(g,{action:"confirm:no",context:"Settings",fallback:"Esc",description:"cancel"})]})}var T,H,Rq;var Fq=Gq(()=>{Jq();Uq();Oq();kq();Xq();Zq();fq();Vq();Mq();Wq();Yq();Nq();Hq();l();T=a(Qq(),1),H=a(Lq(),1),Rq=[{value:"yes-session",label:"Yes, for this session"},{value:"yes-remember",label:"Yes, and remember this directory"},{value:"no",label:"No"}]});
2
- export{lq as lh,Fq as mh};
@@ -1,2 +0,0 @@
1
- import{ld as t,md as pJ}from"./cli-0.6.8-dpz3wm8v.mjs";import{Qh as r,Rh as DJ}from"./cli-0.6.8-bsqfs15y.mjs";import{Al as g,DP as P,Dl as _J,HC as VJ,QR as OJ,XC as PJ,YC as jJ,YF as T,Yl as c,aG as i,bD as o,bG as n,cD as yJ,cG as RJ,cm as MJ,hj as u,jn as h,nz as a,ok as zJ,oy as x,oz as AJ,xE as l,xM as I,yE as HJ}from"./cli-0.6.8-883y3p0j.mjs";import{J4 as YJ}from"./cli-0.6.8-tb4rrntr.mjs";import{Hba as UJ,U9 as QJ,Wda as O,Xda as NJ,dea as B,lea as H,nba as m,vba as f,wba as wJ}from"./cli-0.6.8-vpaw67v2.mjs";import{xfa as ZJ}from"./cli-0.6.8-hj3j54vb.mjs";import{Yfa as qJ}from"./cli-0.6.8-9cxxg2ax.mjs";import{Lga as R,Oga as y}from"./cli-0.6.8-dxtyt1wg.mjs";import{Aha as V,Eha as BJ,Oha as d,Rha as LJ,wha as KJ}from"./cli-0.6.8-4avmxq80.mjs";import{nia as C}from"./cli-0.6.8-cv73s4x5.mjs";import{Dia as WJ,qia as U}from"./cli-0.6.8-4jh3r7br.mjs";import{Xla as b,eoa as j,mla as F}from"./cli-0.6.8-dwwx58n6.mjs";import{Ipa as IJ}from"./cli-0.6.8-259kprym.mjs";yJ();DJ();j();ZJ();y();I();zJ();h();QJ();qJ();C();H();P();YJ();KJ();x();I();h();H();C();P();x();VJ();function D(){}j();y();NJ();LJ();WJ();BJ();AJ();UJ();H();i();HJ();OJ();RJ();wJ();MJ();_J();import{join as Q}from"path";var TJ=30;function L(){let q=((m()||{}).cleanupPeriodDays??TJ)*24*60*60*1000;return new Date(Date.now()-q)}function vJ(X,J){return{messages:X.messages+J.messages,errors:X.errors+J.errors}}function FJ(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 p(X,J,q){let $={messages:0,errors:0};try{let G=await V().readdir(X);for(let K of G)try{if(FJ(K.name)<J)if(await V().unlink(Q(X,K.name)),q)$.messages++;else $.errors++}catch(Y){B(Y)}}catch(G){if(G instanceof Error&&"code"in G&&G.code!=="ENOENT")B(G)}return $}async function bJ(){let X=V(),J=L(),q=O.errors(),$=O.baseLogs(),G=await p(q,J,!1);try{let K;try{K=await X.readdir($)}catch{return G}let Y=K.filter((Z)=>Z.isDirectory()&&Z.name.startsWith("mcp-logs-")).map((Z)=>Q($,Z.name));for(let Z of Y)G=vJ(G,await p(Z,J,!0)),await z(Z,X)}catch(K){if(K instanceof Error&&"code"in K&&K.code!=="ENOENT")B(K)}return G}async function w(X,J,q){if((await q.stat(X)).mtime<J)return await q.unlink(X),!0;return!1}async function z(X,J){try{await J.rmdir(X)}catch{}}async function SJ(){let X=L(),J={messages:0,errors:0},q=u(),$=V(),G;try{G=await $.readdir(q)}catch{return J}for(let K of G){if(!K.isDirectory())continue;let Y=Q(q,K.name),Z;try{Z=await $.readdir(Y)}catch{J.errors++;continue}for(let W of Z)if(W.isFile()){if(!W.name.endsWith(".jsonl")&&!W.name.endsWith(".cast"))continue;try{if(await w(Q(Y,W.name),X,$))J.messages++}catch{J.errors++}}else if(W.isDirectory()){let M=Q(Y,W.name),N=Q(M,c),S;try{S=await $.readdir(N)}catch{await z(M,$);continue}for(let _ of S)if(_.isFile())try{if(await w(Q(N,_.name),X,$))J.messages++}catch{J.errors++}else if(_.isDirectory()){let A=Q(N,_.name),k;try{k=await $.readdir(A)}catch{continue}for(let E of k){if(!E.isFile())continue;try{if(await w(Q(A,E.name),X,$))J.messages++}catch{J.errors++}}await z(A,$)}await z(N,$),await z(M,$)}await z(Y,$)}return J}async function kJ(X,J,q=!0){let $=L(),G={messages:0,errors:0},K=V(),Y;try{Y=await K.readdir(X)}catch{return G}for(let Z of Y){if(!Z.isFile()||!Z.name.endsWith(J))continue;try{if(await w(Q(X,Z.name),$,K))G.messages++}catch{G.errors++}}if(q)await z(X,K);return G}function EJ(){let X=Q(U(),"plans");return kJ(X,".md")}async function CJ(){let X=L(),J={messages:0,errors:0},q=V();try{let $=U(),G=Q($,"file-history"),K;try{K=await q.readdir(G)}catch{return J}let Y=K.filter((Z)=>Z.isDirectory()).map((Z)=>Q(G,Z.name));await Promise.all(Y.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 z(G,q)}catch($){B($)}return J}async function hJ(){let X=L(),J={messages:0,errors:0},q=V();try{let $=U(),G=Q($,"session-env"),K;try{K=await q.readdir(G)}catch{return J}let Y=K.filter((Z)=>Z.isDirectory()).map((Z)=>Q(G,Z.name));for(let Z of Y)try{if((await q.stat(Z)).mtime<X)await q.rm(Z,{recursive:!0,force:!0}),J.messages++}catch{J.errors++}await z(G,q)}catch($){B($)}return J}async function xJ(){let X=L(),J={messages:0,errors:0},q=V(),$=Q(U(),"debug"),G;try{G=await q.readdir($)}catch{return J}for(let K of G){if(!K.isFile()||!K.name.endsWith(".txt")||K.name==="latest")continue;try{if(await w(Q($,K.name),X,q))J.messages++}catch{J.errors++}}return J}async function s(){let{errors:X}=n();if(X.length>0&&f("cleanupPeriodDays")){d("Skipping cleanup: settings have validation errors but cleanupPeriodDays was explicitly set. Fix settings errors to enable cleanup.");return}await bJ(),await SJ(),await EJ(),await CJ(),await hJ(),await xJ(),await a(),await l(L());let J=await g(L());if(J>0)R("tengu_worktree_cleanup",{removed:J})}i();pJ();var dJ=(jJ(),IJ(PJ));var v=600000;function iX(){r(),D(),dJ.initExtractMemories(),o(),t();let X=!0;async function J(){if(b()&&F()>Date.now()-60000){setTimeout(J,v).unref();return}if(X)X=!1,await s();if(b()&&F()>Date.now()-60000){setTimeout(J,v).unref();return}await T()}setTimeout(J,v).unref()}
2
- export{iX as Y};
@@ -1,50 +0,0 @@
1
- import{qc as Mc,rc as aa}from"./cli-0.6.8-n4ecq63e.mjs";import{sc as bn,tc as Zt,uc as Rt,vc as Nc,xc as ua}from"./cli-0.6.8-6050y1gw.mjs";import{Bc as ca,yc as Ct}from"./cli-0.6.8-wh069qak.mjs";import{CF as xn,DF as qu,EF as Dn,FF as jn,GF as vn,HF as Su,Np as Sc,Op as xu,aH as Gn,bF as ot,bH as du,by as $c,cF as Qn,cy as Lc,dH as ta,dy as ju,eH as na,ip as ic,jp as Qu,kp as ec,lF as Y,lp as oc,lv as Fc,mF as mu,mp as mc,nF as vu,np as dc,nv as Du,op as I,pp as rn,qp as Gu,rp as _c,tp as wc,up as qc,wp as Oc}from"./cli-0.6.8-883y3p0j.mjs";import{BW as ct,DW as pu,PW as kc,QW as Iu}from"./cli-0.6.8-34gwg749.mjs";import{DZ as _n,YY as g,_Y as l}from"./cli-0.6.8-vf9cagcj.mjs";import{G0 as qn,H0 as Sn,I0 as Fn,J0 as $n,K0 as Ln,L0 as ou,O0 as Nn,S0 as Mn,T0 as Xc,U0 as Vn}from"./cli-0.6.8-8jkm4bym.mjs";import{I1 as et,J1 as a,K1 as y,L1 as Nt}from"./cli-0.6.8-jx1wvs6x.mjs";import{M1 as Vt}from"./cli-0.6.8-gmzxyn2t.mjs";import{h2 as uc,i2 as Mu}from"./cli-0.6.8-5sexbrs8.mjs";import{A2 as eu,y2 as Xn}from"./cli-0.6.8-tb4rrntr.mjs";import{$ca as dn,Ica as Rc,Jca as yt,Kca as Pu,Lca as Kt,Mca as v,Nda as Bu,Oca as T,Pca as Jt,Rca as ft,Sca as on,Tca as tt,Uca as Ot,Y7 as dt,Yca as gt,Z7 as Eu,Zca as mn,dda as kn,ida as cn,jda as En,kda as Pn,lda as Qt,mda as un,nda as Bn,oda as nn,pda as pn,qda as In,rda as _u,sda as yn,tda as nc,uda as Cn,wda as cc,yda as zc,zda as sn}from"./cli-0.6.8-vpaw67v2.mjs";import{Dia as hn,via as nt}from"./cli-0.6.8-4jh3r7br.mjs";import{Hpa as Mt,Ipa as Uu,Lpa as p}from"./cli-0.6.8-259kprym.mjs";function Cu(t,n=Dt,u){let h=v().find((i)=>i.provider==="openai"&&i.extras?.githubToken!==void 0);if(h)return Ot(h.id,{provider:"openai",name:h.name,baseUrl:u||h.baseUrl,model:h.model||n,apiKey:t,extras:{...h.extras,githubToken:t}}),gt(h.id),{mode:"updated"};return tt({provider:"openai",name:"GitHub Copilot",baseUrl:u||yu,model:n,apiKey:t,extras:{githubToken:t}},{makeActive:!0}),{mode:"created"}}function Yn({onDone:t,onBack:n,onChangeAPIKey:u}){let h=Nn()?.trim()?"already-authed":"menu",[i,m]=E.useState(h),[A,w]=E.useState(null),[z,b]=E.useState(""),[R,q]=E.useState(0),[L,Z]=E.useState(null),V=E.useCallback(async(Q,_=Dt,x,S)=>{let W=Mn(Q,x,S?.enterpriseDomain);if(!W.success){w(W.warning??"Could not save token to secure storage."),m("error");return}Cu(Q,_,S?.baseUrl),Xn(),u?.(),t("GitHub Copilot onboard complete. Copilot token stored in secure storage and as the active /provider profile.",{display:"user"})},[u,t]),C=E.useCallback(async(Q)=>{m("device-busy"),w(null),Z(null);try{let _=await Sn({domain:Q});Z({user_code:_.user_code,verification_uri:_.verification_uri}),await $n(_.verification_uri);let x=await Fn(_.device_code,{initialInterval:_.interval,timeoutSeconds:_.expires_in,domain:Q}),S=await Ln(x,{domain:Q});await V(S.token,Dt,x,{baseUrl:S.endpoints.api?.replace(/\/+$/,"")||void 0,enterpriseDomain:Q})}catch(_){w(_ instanceof Error?_.message:String(_)),m("error")}},[V]);if(i==="already-authed")return y(g,{flexDirection:"column",gap:1,children:[a(l,{bold:!0,children:"GitHub Copilot"}),a(l,{children:"You are already signed in to GitHub Copilot."}),a(l,{dimColor:!0,children:'Choose "Sign in again" to refresh your token, or go back to the provider menu.'}),a(Y,{options:[{label:"Sign in again",value:"sign-in-again"},{label:"Sign in with GitHub Enterprise",value:"enterprise"},{label:n?"Back to /provider menu":"Cancel",value:"back"}],onChange:(_)=>{if(_==="sign-in-again"){C();return}if(_==="enterprise"){m("enterprise-domain");return}if(n){n();return}t("GitHub onboard cancelled",{display:"system"})}})]});if(i==="enterprise-domain")return y(g,{flexDirection:"column",gap:1,children:[a(l,{bold:!0,children:"GitHub Enterprise sign-in"}),a(l,{dimColor:!0,children:"Enter your GitHub Enterprise domain (e.g. github.acme.com). Leave empty for github.com."}),y(g,{flexDirection:"row",gap:1,children:[a(l,{children:">"}),a(ot,{value:z,onChange:b,onSubmit:()=>{let _=qn(z);if(!_){C();return}C(_)},onExit:()=>m(h),focus:!0,showCursor:!0,placeholder:"github.acme.com",columns:80,cursorOffset:R,onChangeCursorOffset:q})]}),a(l,{dimColor:!0,children:"Press Enter to continue. Press Esc to go back."})]});if(i==="error"&&A)return y(g,{flexDirection:"column",gap:1,children:[a(l,{color:"red",children:A}),a(Y,{options:[{label:n?"Back to /provider menu":"Back to menu",value:"back"},{label:"Exit",value:"exit"}],onChange:(_)=>{if(_==="back"){if(n){n();return}m("menu"),w(null);return}t("GitHub onboard cancelled",{display:"system"})}})]});if(i==="device-busy")return y(g,{flexDirection:"column",gap:1,children:[a(l,{children:"GitHub Copilot sign-in"}),L?y(et,{children:[y(l,{children:["Enter code ",a(l,{bold:!0,children:L.user_code})," at"," ",L.verification_uri]}),a(l,{dimColor:!0,children:"A browser window may have opened. Waiting for authorization..."})]}):a(l,{dimColor:!0,children:"Requesting device code from GitHub..."}),a(Gn,{})]});return y(g,{flexDirection:"column",gap:1,children:[a(l,{bold:!0,children:"GitHub Copilot setup"}),a(l,{dimColor:!0,children:"Stores your token in the OS credential store (macOS Keychain when available) and creates a /provider profile so Copilot is the active provider — no manual env exports required."}),a(Y,{options:[{label:"Sign in with browser",value:"device"},{label:"Sign in with GitHub Enterprise",value:"enterprise"},{label:n?"Back to /provider menu":"Cancel",value:"cancel"}],onChange:(Q)=>{if(Q==="cancel"){if(n){n();return}t("GitHub onboard cancelled",{display:"system"});return}if(Q==="enterprise"){m("enterprise-domain");return}C()}})]})}var E,Dt="github:copilot",yu="https://api.githubcopilot.com";var Jn=p(()=>{mu();du();Qn();_n();ou();Vn();eu();kn();Nt();E=Mt(Vt(),1)});function Kn(t){return[t.name,t.family??"",...t.families??[],t.parameterSize??"",t.quantizationLevel??""].join(" ").toLowerCase()}function At(t,n){return n.some((u)=>t.includes(u))}function Ou(t){return!At(Kn(t),Zn)}function gu(t){return t.find(Ou)??null}function jt(t){let u=`${t.parameterSize??""} ${t.name}`.toLowerCase().match(/(\d+(?:\.\d+)?)\s*b\b/);if(u?.[1])return Number(u[1]);if(typeof t.sizeBytes==="number"&&t.sizeBytes>0)return Number((t.sizeBytes/1e9).toFixed(1));return null}function Au(t){return(t.quantizationLevel??t.name).toLowerCase()}function fu(t,n,u){if(t===null)return u.push("unknown size"),0;if(n==="latency"){if(t<=4)return u.push("tiny model for low latency"),32;if(t<=8)return u.push("small model for fast responses"),26;if(t<=14)return u.push("mid-sized model with acceptable latency"),16;if(t<=24)return u.push("larger model may be slower"),8;return u.push("large model likely slower locally"),t<=40?0:-8}if(n==="coding"){if(t>=7&&t<=14)return u.push("strong coding size tier"),24;if(t>14&&t<=34)return u.push("large coding-capable size tier"),28;if(t>34)return u.push("very large model with higher quality potential"),18;return u.push("compact model may trade off coding depth"),12}if(t>=7&&t<=14)return u.push("great balanced size tier"),26;if(t>=3&&t<7)return u.push("compact balanced size tier"),18;if(t>14&&t<=24)return u.push("high quality balanced size tier"),20;if(t>24)return u.push("large model for quality-first usage"),10;return u.push("very small model for general usage"),8}function Ru(t,n,u){let h=Au(t);if(h.includes("q4"))return u.push("efficient Q4 quantization"),n==="latency"?8:4;if(h.includes("q5"))return u.push("balanced Q5 quantization"),n==="latency"?6:5;if(h.includes("q8"))return u.push("higher quality Q8 quantization"),n==="latency"?2:5;return 0}function zu(t,n,u){if(n.score!==t.score)return n.score-t.score;let h=jt(t)??Number.POSITIVE_INFINITY,i=jt(n)??Number.POSITIVE_INFINITY;if(u==="latency")return h-i;if(u==="coding")return i-h;let m=14;return Math.abs(h-m)-Math.abs(i-m)}function vt(t,n){return t.map((u)=>{let h=Kn(u),i=[],m=0;if(At(h,Zn))m-=40,i.push("not a chat-first model");if(At(h,su))m+=n==="coding"?24:n==="balanced"?10:4,i.push("coding-oriented model family");if(At(h,bu))m+=n==="latency"?4:n==="coding"?6:8,i.push("strong general-purpose model family");if(At(h,wu))m+=n==="latency"?2:6,i.push("chat/instruct tuned");if(h.includes("vision")||h.includes("vl"))m-=2,i.push("vision model adds extra overhead");m+=fu(jt(u),n,i),m+=Ru(u,n,i);let A=i.slice(0,3).join(", ");return{...u,score:m,reasons:i,summary:A}}).sort((u,h)=>zu(u,h,n))}function Hn(t,n){return gu(vt(t,n))}var su,bu,wu,Zn;var Tn=p(()=>{su=["coder","codellama","codegemma","codestral","devstral","starcoder","deepseek-coder","qwen2.5-coder","qwen-coder"],bu=["llama","qwen","mistral","gemma","phi","deepseek"],wu=["instruct","chat","assistant"],Zn=["embed","embedding","rerank","bge","whisper"]});function Xu(t){let n=t.toLowerCase();return ku.some((u)=>n.includes(u))}function tn(t){try{let n=new URL(t);if(n.username)n.username="redacted";if(n.password)n.password="redacted";for(let u of n.searchParams.keys())if(Xu(u))n.searchParams.set(u,"redacted");return n.toString()}catch{return t.replace(/\/\/[^/@\s]+(?::[^/@\s]*)?@/g,"//redacted@").replace(/([?&](?:token|access_token|refresh_token|api_key|apikey|key|password|passwd|pwd|auth|authorization|signature|sig|secret)=)[^&#]*/gi,"$1redacted")}}var ku;var Wn=p(()=>{ku=["api_key","apikey","key","token","access_token","refresh_token","signature","sig","secret","password","passwd","pwd","auth","authorization"]});function Fu(t){let n=`http://localhost:${t.port}/auth/callback`,u=new URL(`${cn}/oauth/authorize`);return u.searchParams.append("response_type","code"),u.searchParams.append("client_id",un()),u.searchParams.append("redirect_uri",n),u.searchParams.append("scope",En),u.searchParams.append("code_challenge",t.codeChallenge),u.searchParams.append("code_challenge_method","S256"),u.searchParams.append("id_token_add_organizations","true"),u.searchParams.append("codex_cli_simplified_flow","true"),u.searchParams.append("state",t.state),u.searchParams.append("originator",Pn),u.toString()}function $u(){return`<!doctype html>
2
- <html lang="en">
3
- <head>
4
- <meta charset="utf-8" />
5
- <title>Codex Login Complete</title>
6
- <style>
7
- body { font-family: sans-serif; padding: 32px; line-height: 1.5; color: #111827; }
8
- h1 { margin: 0 0 12px; font-size: 22px; }
9
- p { margin: 0 0 10px; }
10
- </style>
11
- </head>
12
- <body>
13
- <h1>Codex login complete</h1>
14
- <p>You can return to Claudin now.</p>
15
- <p>Claudin will finish activating your new Codex OAuth login.</p>
16
- </body>
17
- </html>`}function Lu(t){return`<!doctype html>
18
- <html lang="en">
19
- <head>
20
- <meta charset="utf-8" />
21
- <title>Codex Login Failed</title>
22
- <style>
23
- body { font-family: sans-serif; padding: 32px; line-height: 1.5; color: #111827; }
24
- h1 { margin: 0 0 12px; font-size: 22px; color: #991b1b; }
25
- p { margin: 0 0 10px; }
26
- </style>
27
- </head>
28
- <body>
29
- <h1>Codex login failed</h1>
30
- <p>${pn(t)}</p>
31
- <p>You can close this window and try again in Claudin.</p>
32
- </body>
33
- </html>`}function Un(){return`<!doctype html>
34
- <html lang="en">
35
- <head>
36
- <meta charset="utf-8" />
37
- <title>Codex Login Cancelled</title>
38
- <style>
39
- body { font-family: sans-serif; padding: 32px; line-height: 1.5; color: #111827; }
40
- h1 { margin: 0 0 12px; font-size: 22px; }
41
- p { margin: 0 0 10px; }
42
- </style>
43
- </head>
44
- <body>
45
- <h1>Codex login cancelled</h1>
46
- <p>You can close this window and retry in Claudin.</p>
47
- </body>
48
- </html>`}async function Nu(t){let n=`http://localhost:${t.port}/auth/callback`,u=new URLSearchParams({grant_type:"authorization_code",code:t.authorizationCode,redirect_uri:n,client_id:un(),code_verifier:t.codeVerifier}),h=await fetch(`${cn}/oauth/token`,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:u,signal:t.signal?AbortSignal.any([t.signal,AbortSignal.timeout(15000)]):AbortSignal.timeout(15000)});if(!h.ok){let b=await h.text().catch(()=>"");throw Error(b.trim()?`Codex OAuth token exchange failed (${h.status}): ${b.trim()}`:`Codex OAuth token exchange failed with status ${h.status}.`)}let i=await h.json(),m=Qt(i.access_token),A=Qt(i.refresh_token);if(!m||!A)throw Error("Codex OAuth completed, but the token response was missing credentials.");let w=Qt(i.id_token);return{apiKey:w?await In(w).catch(()=>{return}):void 0,accessToken:m,refreshToken:A,idToken:w,accountId:nn(w)??nn(m)}}class an{authCodeListener=null;port=null;tokenExchangeAbortController=null;buildCancellationError(){return Error("Codex OAuth flow was cancelled.")}async startOAuthFlow(t){let n=Dn(),u=Bn(),h=new xn("/auth/callback");this.authCodeListener=h,this.port=null;try{let i=await h.start(u);this.port=i;let m=vn(),A=await jn(n),w=Fu({port:i,codeChallenge:A,state:m});try{let z=await h.waitForAuthorization(m,async()=>{await t(w)}),b=new AbortController;this.tokenExchangeAbortController=b;let R;try{R=await Nu({authorizationCode:z,codeVerifier:n,port:i,signal:b.signal})}finally{if(this.tokenExchangeAbortController===b)this.tokenExchangeAbortController=null}if(this.authCodeListener!==h)throw this.buildCancellationError();return h.handleSuccessRedirect([],(q)=>{q.writeHead(200,{"Content-Type":"text/html; charset=utf-8"}),q.end($u())}),R}catch(z){let b=this.authCodeListener===h?z:this.buildCancellationError();if(h.hasPendingResponse()){let R=b instanceof Error&&b.message==="Codex OAuth flow was cancelled.";h.handleErrorRedirect((q)=>{q.writeHead(R?200:400,{"Content-Type":"text/html; charset=utf-8"}),q.end(R?Un():Lu(b instanceof Error?b.message:String(b)))})}throw b}finally{this.cleanup()}}catch(i){let m=i instanceof Error?i.message:String(i);if(m.includes("EADDRINUSE")||m.includes(String(u)))throw Error(`Codex OAuth needs localhost:${u} for its callback. Close any app already using that port and try again.`);throw i}}cleanup(){let t=this.buildCancellationError();if(this.tokenExchangeAbortController?.abort(t),this.tokenExchangeAbortController=null,this.authCodeListener?.hasPendingResponse())this.authCodeListener.handleErrorRedirect((n)=>{n.writeHead(200,{"Content-Type":"text/html; charset=utf-8"}),n.end(Un())});this.authCodeListener?.cancelPendingAuthorization(t),this.authCodeListener=null,this.port=null}}var tc=p(()=>{qu();Su();_u()});function Vu(){return new an}function ac(t){let{onAuthenticated:n}=t,u=t.deps?.createOAuthService??Vu,h=t.deps?.openBrowser??uc,i=t.deps?.saveCodexCredentials??nc,m=t.deps?.isBareMode??nt,[A,w]=Gt.useState({state:"starting"});return Gt.useEffect(()=>{if(m()){w({state:"error",message:"Codex OAuth is unavailable in --bare because secure storage is disabled."});return}let z=!1,b=u();return b.startOAuthFlow(async(R)=>{if(z)return;w({state:"waiting",authUrl:R,browserOpened:null});let q=await h(R);if(z)return;w({state:"waiting",authUrl:R,browserOpened:q})}).then(async(R)=>{if(z)return;await n(R,(L)=>{let Z=i({apiKey:R.apiKey,accessToken:R.accessToken,refreshToken:R.refreshToken,idToken:R.idToken,accountId:R.accountId,profileId:L?.profileId});if(!Z.success)throw Error(Z.warning??"Codex OAuth succeeded, but credentials could not be saved securely.")})}).catch((R)=>{if(z)return;w({state:"error",message:R instanceof Error?R.message:String(R)})}),()=>{z=!0,b.cleanup()}},[u,m,n,h,i]),A}var Gt;var hc=p(()=>{tc();Mu();cc();hn();Gt=Mt(Vt(),1)});function sc(){return{"Content-Type":"application/x-www-form-urlencoded",Accept:"application/json","User-Agent":ic()}}function lc(t,n){let u=Number(t);return Number.isFinite(u)&&u>0?u*1000:n}function Ku(t,n){if(n?.aborted)return Promise.resolve();return new Promise((u)=>{let h=setTimeout(()=>{n?.removeEventListener("abort",i),u()},t),i=()=>{clearTimeout(h),u()};n?.addEventListener("abort",i,{once:!0})})}async function Hu(t){let n=t?.fetchImpl??fetch,u=t?.signal?AbortSignal.any([t.signal,AbortSignal.timeout(15000)]):AbortSignal.timeout(15000),h=await n(oc,{method:"POST",headers:sc(),body:new URLSearchParams({client_id:rn(),scope:dc}).toString(),signal:u});if(!h.ok){let z=await h.text().catch(()=>"");throw Error(`xAI device code request failed (${h.status})${z?`: ${z.trim()}`:""}`)}let i=await h.json(),m=I(i.device_code),A=I(i.user_code),w=I(i.verification_uri);if(!m||!A||!w)throw Error("xAI device code response is missing device_code / user_code / verification_uri.");return{device_code:m,user_code:A,verification_uri:w,verification_uri_complete:I(i.verification_uri_complete),expires_in:typeof i.expires_in==="number"&&i.expires_in>0?i.expires_in:Cc/1000,interval:typeof i.interval==="number"&&i.interval>0?i.interval:yc/1000}}async function Tu(t,n){let u=n?.fetchImpl??fetch,h=n?.sleep??Ku,i=n?.now??(()=>Date.now()),m=lc(t.expires_in,Cc),A=i()+m,w=Math.max(lc(t.interval,yc),Yu);while(i()<A){if(n?.signal?.aborted)throw Error("xAI device authorization was cancelled.");let z=await u(ec,{method:"POST",headers:sc(),body:new URLSearchParams({grant_type:mc,client_id:rn(),device_code:t.device_code}).toString(),signal:n?.signal});if(z.ok){let L=await z.json(),Z=I(L.access_token),V=I(L.refresh_token);if(!Z||!V)throw Error("xAI OAuth completed, but the token response was missing credentials.");let C=typeof L.expires_in==="number"&&Number.isFinite(L.expires_in)&&L.expires_in>0?L.expires_in:3600;return{accessToken:Z,refreshToken:V,idToken:I(L.id_token),expiresAt:i()+C*1000}}let b=await z.json().catch(()=>({})),R=Math.max(0,A-i());if(b.error==="authorization_pending"){await h(Math.min(w+rc,R),n?.signal);continue}if(b.error==="slow_down"){w=Math.min(w+Ju,Zu),await h(Math.min(w+rc,R),n?.signal);continue}if(b.error==="access_denied"||b.error==="authorization_denied")throw Error("xAI device authorization was denied.");if(b.error==="expired_token")throw Error("xAI device code expired - please re-run login.");let q=b.error_description??b.error??"";throw Error(`xAI device token exchange failed (${z.status})${q?`: ${q}`:""}`)}throw Error("xAI device authorization timed out.")}class ln{abortController=null;async startDeviceFlow(t){let n=new AbortController;this.abortController=n;try{let u=await Hu({signal:n.signal});return await t(u),await Tu(u,{signal:n.signal})}finally{if(this.abortController===n)this.abortController=null}}cleanup(){this.abortController?.abort(Error("xAI device authorization was cancelled.")),this.abortController=null}}var yc=5000,Yu=1000,Ju=5000,Zu=60000,Cc=300000,rc=3000;var bc=p(()=>{Qu();Gu()});function Wu(){return new ln}function gc(t){let{onAuthenticated:n}=t,u=t.deps?.createOAuthService??Wu,h=t.deps?.saveXaiCredentials??wc,i=t.deps?.isBareMode??nt,[m,A]=Yt.useState({state:"starting"});return Yt.useEffect(()=>{if(i()){A({state:"error",message:"xAI OAuth is unavailable in --bare because secure storage is disabled."});return}let w=!1,z=u();return z.startDeviceFlow(async(b)=>{if(w)return;A({state:"waiting",userCode:b.user_code,verificationUri:b.verification_uri,verificationUriComplete:b.verification_uri_complete})}).then(async(b)=>{if(w)return;await n(b,(q)=>{let L=h({accessToken:b.accessToken,refreshToken:b.refreshToken,idToken:b.idToken,expiresAt:b.expiresAt,profileId:q?.profileId});if(!L.success)throw Error(L.warning??"xAI OAuth succeeded, but credentials could not be saved securely.")})}).catch((b)=>{if(w)return;A({state:"error",message:b instanceof Error?b.message:String(b)})}),()=>{w=!0,z.cleanup()}},[u,i,n,h]),m}var Yt;var Ac=p(()=>{bc();hn();Oc();Yt=Mt(Vt(),1)});function ea(t){return{name:t.name,baseUrl:t.baseUrl,model:t.model,apiKey:t.apiKey??""}}function oa(t){let n=Kt(t);return{name:n.name,baseUrl:n.baseUrl,model:n.model,apiKey:n.apiKey??""}}function ma(t){let n={};for(let u of t.split(/\r?\n/)){let h=u.trim();if(!h)continue;let i=h.indexOf(":");if(i<=0)continue;let m=h.slice(0,i).trim(),A=h.slice(i+1).trim();if(m&&A)n[m]=A}return n}function da(t){if(!t)return"";return Object.entries(t).map(([n,u])=>`${n}: ${u}`).join(`
49
- `)}function ya(t,n){let u={},h=t.awsRegion?.trim();if(h)u.awsRegion=h;let i=t.gcpProject?.trim();if(i)u.gcpProject=i;let m=t.gcpRegion?.trim();if(m)u.gcpRegion=m;let A=t.azureResource?.trim();if(A)u.azureResource=A;let w=ma(n);if(Object.keys(w).length>0)u.customHeaders=w;return Object.keys(u).length>0?u:void 0}function sa(t,n){let u=n?" (active)":"",h=t.apiKey?"key set":"no key",i=t.provider==="anthropic"?"anthropic":"openai-compatible",m=Rc(t.model),A=m.length<=3?m.join(", "):`${m[0]}, ${m[1]} + ${m.length-2} more`;return`${i} · ${t.baseUrl} · ${A} · ${h}${u}`}function ba(t,n){if(t.state==="unreachable")return`Could not reach Atomic Chat at ${tn(n)}. Start the Atomic Chat app first, or enter the endpoint manually.`;if(t.state==="no_models")return"Atomic Chat is running, but no models are loaded. Download and load a model inside the Atomic Chat app first, or enter details manually.";return""}function wa(t,n){if(t.state==="unreachable")return`Could not reach Ollama at ${tn(n)}. Start Ollama first, or enter the endpoint manually.`;if(t.state==="no_models")return"Ollama is running, but no installed models were found. Pull a chat model such as qwen2.5-coder:7b or llama3.1:8b first, or enter details manually.";if(t.state==="generation_failed"){let u=t.probeModel??"the selected model",h=t.detail?` Details: ${t.detail}.`:"";return`Ollama is reachable and models are installed, but a generation probe failed for ${u}.${h} Run "ollama run ${u}" once and retry, or enter details manually.`}return""}function en(t,n){if(!n)return;return t.find((u)=>u.id===n)}function fc(t,n){return Boolean(t&&n&&t.id===n)}function Oa({onBack:t,onConfigured:n}){let u=s.useCallback(async(i,m)=>{await n(i,m)},[n]);ct("confirm:no",t,[t]);let h=ac({onAuthenticated:u});if(h.state==="error")return y(g,{flexDirection:"column",gap:1,children:[a(l,{color:"error",bold:!0,children:"Codex OAuth failed"}),a(l,{children:h.message}),a(l,{dimColor:!0,children:"Press Enter or Esc to go back."}),a(Y,{options:[{value:"back",label:"Back",description:"Return to provider presets"}],onChange:t,onCancel:t,visibleOptionCount:1})]});return y(g,{flexDirection:"column",gap:1,children:[a(l,{color:"remember",bold:!0,children:"Codex OAuth"}),a(l,{children:"Sign in with your ChatGPT account in the browser. Claudin will store the resulting Codex credentials securely and switch this session to the new Codex login when setup completes."}),h.state==="starting"?a(l,{dimColor:!0,children:"Starting local callback and preparing your browser..."}):h.browserOpened===!1?y(et,{children:[a(l,{color:"warning",children:"Browser did not open automatically. Visit this URL to continue:"}),a(l,{children:h.authUrl})]}):h.browserOpened===!0?y(et,{children:[a(l,{dimColor:!0,children:"Browser opened. Finish the ChatGPT sign-in there and this setup will complete automatically."}),a(l,{children:h.authUrl})]}):a(l,{dimColor:!0,children:"Opening your browser..."}),a(l,{dimColor:!0,children:"Press Esc to cancel and go back."})]})}function ga({onBack:t,onConfigured:n}){let u=s.useCallback(async(i,m)=>{await n(i,m)},[n]);ct("confirm:no",t,[t]);let h=gc({onAuthenticated:u});if(h.state==="error")return y(g,{flexDirection:"column",gap:1,children:[a(l,{color:"error",bold:!0,children:"xAI OAuth failed"}),a(l,{children:h.message}),a(l,{dimColor:!0,children:"Press Enter or Esc to go back."}),a(Y,{options:[{value:"back",label:"Back",description:"Return to provider presets"}],onChange:t,onCancel:t,visibleOptionCount:1})]});return y(g,{flexDirection:"column",gap:1,children:[a(l,{color:"remember",bold:!0,children:"xAI / Grok OAuth"}),h.state==="starting"?a(l,{dimColor:!0,children:"Requesting a device code from xAI..."}):y(et,{children:[y(l,{children:["Open this URL on any device:"," ",a(l,{bold:!0,children:h.verificationUri})]}),y(l,{children:["Enter code ",a(l,{bold:!0,children:h.userCode})]}),h.verificationUriComplete&&h.verificationUriComplete!==h.verificationUri?y(l,{dimColor:!0,children:["Or open this prefilled URL: ",h.verificationUriComplete]}):null,a(l,{dimColor:!0,children:"Waiting for you to authorize in the browser..."})]}),a(l,{dimColor:!0,children:"Press Esc to cancel and go back."})]})}function gh({mode:t,onDone:n}){let u=Fc(),[h,i]=s.useState([]),[m,A]=s.useState(),[w,z]=s.useState(),[b,R]=s.useState(!1),[q,L]=s.useState(),Z=s.useRef(0),[V,C]=s.useState(t==="first-run"?"select-preset":"menu"),[ut,Q]=s.useState(null),[_,x]=s.useState("openai"),[S,W]=s.useState(()=>oa("ollama")),[Ht,zt]=s.useState({}),[wn,Tt]=s.useState(""),[Vc,Qc]=s.useState(0),[Gc,Yc]=s.useState(0),[Wt,On]=s.useState(null),[at,st]=s.useState(0),[ht,D]=s.useState(0),[Jc,j]=s.useState(0),[gn,N]=s.useState(),[rt,f]=s.useState(),[Zc,Kc]=s.useState(),[An,kt]=s.useState(!1),[bt,wt]=s.useState(),[P,Xt]=s.useState({state:"idle"}),[B,_t]=s.useState({state:"idle"}),[Hc,Tc]=s.useState(!0),[Wc,H]=s.useState(!1),Ut=s.useRef(!1),[Et,Pt]=s.useState(()=>Rt()),[fn,Uc]=s.useState(()=>Nc());s.useEffect(()=>{queueMicrotask(()=>{let c=v(),r=T()?.id;i(c),A(r),z(Jt()),L(on()),R(ft()),Tc(!1)})},[]);let lt=mt[ht]??mt[0],qt=lt.key,Ec=S[qt],Bt=h.length>0,St=Bt,Rn=s.useMemo(()=>[{value:"add",label:"Add provider",description:"Create a new provider profile"},...Et?[{value:"import-legacy",label:"Import from Claude Code",description:"Copy ~/.claude/ tokens, settings, skills, agents, plugins."}]:[],{value:"activate",label:"Set active provider (Global)",description:q?`Currently: ${h.find((c)=>c.id===q)?.name??"unknown"}`:"Default profile for projects without an override",disabled:!St},{value:"activate-project",label:"Set active provider (Project)",description:w?`Currently: ${h.find((c)=>c.id===w)?.name??"unknown"} (this project)`:"Override the global default for this project only",disabled:!St},...b?[{value:"clear-project-override",label:"Clear project provider override",description:w?"Stop overriding for this project; fall back to global":"Project override points to a missing profile; clear it"}]:[],{value:"edit",label:"Edit provider",description:"Update URL, model, or key",disabled:!Bt},{value:"delete",label:"Delete provider",description:"Remove a provider profile",disabled:!St},...An?[{value:"logout-codex-oauth",label:"Log out Codex OAuth",description:"Clear securely stored Codex OAuth credentials"}]:[],{value:"done",label:"Done",description:"Return to chat"}],[St,Bt,An,Et,q,w,h]),pt=s.useCallback(()=>{if(nt()){Z.current+=1,kt(!1),wt(void 0);return}let c=++Z.current;(async()=>{let r=await yn();if(c!==Z.current)return;kt(Boolean(r?.apiKey||r?.accessToken||r?.refreshToken||r?.idToken)),wt(r?.profileId)})()},[]);s.useEffect(()=>{return pt(),()=>{Z.current+=1}},[pt]),s.useEffect(()=>{if(V!=="select-ollama-model")return;let c=!1;return Xt({state:"loading"}),(async()=>{let r=await Lc({baseUrl:S.baseUrl});if(r.state!=="ready"){if(!c)Xt({state:"unavailable",message:wa(r,S.baseUrl)});return}let o=vt(r.models,"balanced"),e=Hn(r.models,"balanced");if(!c)Xt({state:"ready",defaultValue:e?.name??o[0]?.name,options:o.map((d)=>({label:d.name,value:d.name,description:d.summary}))})})(),()=>{c=!0}},[S.baseUrl,V]),s.useEffect(()=>{if(V!=="select-atomic-chat-model")return;let c=!1;return _t({state:"loading"}),(async()=>{let r=await $c({baseUrl:S.baseUrl});if(r.state!=="ready"){if(!c)_t({state:"unavailable",message:ba(r,S.baseUrl)});return}if(!c)_t({state:"ready",defaultValue:r.models[0],options:r.models.map((o)=>({label:o,value:o}))})})(),()=>{c=!0}},[S.baseUrl,V]);function M(){if(Ut.current)return;Ut.current=!0,queueMicrotask(()=>{let c=v();i(c),A(T()?.id),z(Jt()),L(on()),R(ft()),pt(),Ut.current=!1})}function it(){return null}function It(c){if(c.activationWarning)return`${c.prefix}. Saved for next startup. Warning: ${c.warnings.join("; ")}.`;if(c.warnings.length>0)return`${c.prefix}. Claudin switched to it for this session with warnings: ${c.warnings.join("; ")}.`;return`${c.prefix}. Claudin switched to it for this session.`}async function xt(c){if(c?.accessToken&&c.accountId)return null;let r=await yn();if(!r)return"stored Codex OAuth credentials could not be loaded";if(!r.accountId)return"stored Codex OAuth credentials are missing a ChatGPT account id";return null}function zn(){Sc()}async function Pc(c){let r="provider";H(!0),N("Activating provider...");try{await new Promise((U)=>queueMicrotask(U));let o=ft(),e=gt(c);if(!e){f("Could not change active provider."),H(!1),k();return}let d=o?T()??e:e,O=yt(d.model);if(!o)u((U)=>({...U,mainLoopModel:O,mainLoopModelForSession:null}));r=e.name;let X=it(),J=fc(e,bt),$=J?await xt():null;M();let K=o&&d.id!==e.id?` (project override still active — this project keeps using ${d.name}; use "Clear project provider override" to apply the new default here)`:"",F=J?It({prefix:`Active provider: ${e.name}${K}`,activationWarning:$,warnings:[$,X?`could not clear startup provider override (${X})`:null].filter((U)=>Boolean(U))}):X?`Active provider: ${e.name}${K}. Warning: could not clear startup provider override (${X}).`:`Active provider: ${e.name}${K}`;N(F),H(!1),n({action:"activated",activeProfileId:e.id,activeProviderName:e.name,activeProviderModel:O,message:`Provider switched to ${e.name} (${O})`}),k()}catch(o){M(),N(void 0),H(!1);let e=o instanceof Error?o.message:String(o);f(`Could not finish activating ${r}: ${e}`),k()}}async function Bc(){H(!0),N("Clearing project provider override...");try{await new Promise((r)=>queueMicrotask(r)),mn(null),M();let c=T();if(c){let r=yt(c.model);Ct(),u((o)=>({...o,mainLoopModel:r,mainLoopModelForSession:null})),N(`Project override cleared. Using global default: ${c.name}.`),H(!1),n({action:"activated",activeProfileId:c.id,activeProviderName:c.name,activeProviderModel:r,message:`Project override cleared — using ${c.name} (${r})`}),k()}else N("Project provider override cleared. No global default set."),H(!1),n({action:"saved",message:"Project provider override cleared. No global default set."}),k()}catch(c){M(),N(void 0),H(!1);let r=c instanceof Error?c.message:String(c);f(`Could not clear project provider override: ${r}`),k()}}async function pc(c){let r="provider";H(!0),N("Setting provider for this project...");try{await new Promise((F)=>queueMicrotask(F));let o=Jt(),e=mn(c);if(!e){f("Could not set project provider override."),H(!1),k();return}let d=yt(e.model);if(o===e.id)Ct();u((F)=>({...F,mainLoopModel:d,mainLoopModelForSession:null})),r=e.name;let O=it(),X=fc(e,bt),J=X?await xt():null;M();let $=`Active provider for this project: ${e.name}. Other projects keep the global default.`,K=X?It({prefix:$,activationWarning:J,warnings:[J,O?`could not clear startup provider override (${O})`:null].filter((F)=>Boolean(F))}):O?`${$} Warning: could not clear startup provider override (${O}).`:$;N(K),H(!1),n({action:"activated",activeProfileId:e.id,activeProviderName:e.name,activeProviderModel:d,message:`Provider switched to ${e.name} (${d}) for this project`}),k()}catch(o){M(),N(void 0),H(!1);let e=o instanceof Error?o.message:String(o);f(`Could not finish setting ${r} for this project: ${e}`),k()}}function k(){Kc("done"),C("menu")}function Ft(c){n({action:"cancelled",message:c})}function Ic(c){let r=Kt(c),o={name:r.name,baseUrl:r.baseUrl,model:r.model,apiKey:r.apiKey??""};if(Q(null),x(r.provider??"openai"),W(o),zt({}),Tt(""),On(c),D(0),st(0),j(o.name.length),f(void 0),c==="ollama"){Xt({state:"loading"}),C("select-ollama-model");return}if(c==="atomic-chat"){_t({state:"loading"}),C("select-atomic-chat-model");return}if(c==="anthropic"){C("anthropic-auth-choice");return}if(c==="bedrock"||c==="vertex"||c==="foundry"){C("cloud-extras");return}C("form")}function xc(c){let r=h.find((e)=>e.id===c);if(!r)return;let o=ea(r);Q(c),x(r.provider??"openai"),W(o),zt({awsRegion:r.extras?.awsRegion,gcpProject:r.extras?.gcpProject,gcpRegion:r.extras?.gcpRegion,azureResource:r.extras?.azureResource}),Tt(da(r.extras?.customHeaders)),On(null),D(0),st(0),j(o.name.length),f(void 0),C("form")}function $t(c=S){let r=ya(Ht,wn),o={provider:_,name:c.name,baseUrl:c.baseUrl,model:c.model,apiKey:c.apiKey,extras:r},e=ut?Ot(ut,o):tt(o,{makeActive:!0});if(!e){f("Could not save provider. Fill all required fields.");return}let d=T()?.id===e.id;if(d)Ct(),u((K)=>({...K,mainLoopModel:yt(e.model),mainLoopModelForSession:null}));let O=d?it():null;M();let X=!ut&&ft()&&!d,J=X?T()?.name??"override target":null,$=ut?`Updated provider: ${e.name}`:X?`Added provider: ${e.name} (now global default — project keeps using ${J}; use "Clear project provider override" to apply here)`:`Added provider: ${e.name} (now active)`;if(N(O?`${$}. Warning: could not clear startup provider override (${O}).`:$),t==="first-run"){n({action:"saved",activeProfileId:e.id,message:`Provider configured: ${e.name}`});return}Q(null),D(0),f(void 0),k()}function Dc(){if(B.state==="loading"||B.state==="idle")return y(g,{flexDirection:"column",gap:1,children:[a(l,{color:"remember",bold:!0,children:"Checking Atomic Chat"}),a(l,{dimColor:!0,children:"Looking for loaded Atomic Chat models..."})]});if(B.state==="unavailable")return y(g,{flexDirection:"column",gap:1,children:[a(l,{color:"remember",bold:!0,children:"Atomic Chat setup"}),a(l,{dimColor:!0,children:B.message}),a(Y,{options:[{value:"manual",label:"Enter manually",description:"Fill in the base URL and model yourself"},{value:"back",label:"Back",description:"Choose another provider preset"}],onChange:(c)=>{if(c==="manual"){D(0),j(S.name.length),C("form");return}C("select-preset")},onCancel:()=>C("select-preset"),visibleOptionCount:2})]});return y(g,{flexDirection:"column",gap:1,children:[a(l,{color:"remember",bold:!0,children:"Choose an Atomic Chat model"}),a(l,{dimColor:!0,children:"Pick one of the models loaded in Atomic Chat to save into a local provider profile."}),a(Y,{options:B.options,defaultValue:B.defaultValue,defaultFocusValue:B.defaultValue,inlineDescriptions:!0,visibleOptionCount:Math.min(8,B.options.length),onChange:(c)=>{let r={...S,model:c};W(r),$t(r)},onCancel:()=>C("select-preset")})]})}function jc(){if(P.state==="loading"||P.state==="idle")return y(g,{flexDirection:"column",gap:1,children:[a(l,{color:"remember",bold:!0,children:"Checking Ollama"}),a(l,{dimColor:!0,children:"Looking for installed Ollama models..."})]});if(P.state==="unavailable")return y(g,{flexDirection:"column",gap:1,children:[a(l,{color:"remember",bold:!0,children:"Ollama setup"}),a(l,{dimColor:!0,children:P.message}),a(Y,{options:[{value:"manual",label:"Enter manually",description:"Fill in the base URL and model yourself"},{value:"back",label:"Back",description:"Choose another provider preset"}],onChange:(c)=>{if(c==="manual"){D(0),j(S.name.length),C("form");return}C("select-preset")},onCancel:()=>C("select-preset"),visibleOptionCount:2})]});return y(g,{flexDirection:"column",gap:1,children:[a(l,{color:"remember",bold:!0,children:"Choose an Ollama model"}),a(l,{dimColor:!0,children:"Pick one of the installed Ollama models to save into a local provider profile."}),a(Y,{options:P.options,defaultValue:P.defaultValue,defaultFocusValue:P.defaultValue,inlineDescriptions:!0,visibleOptionCount:Math.min(8,P.options.length),onChange:(c)=>{let r={...S,model:c};W(r),$t(r)},onCancel:()=>C("select-preset")})]})}function vc(c){let r=c.trim();if(!lt.optional&&r.length===0){f(`${lt.label} is required.`);return}let o={...S,[qt]:r};if(W(o),f(void 0),ht<mt.length-1){let e=ht+1,d=mt[e]?.key??"name";D(e),j(o[d].length);return}if((Wt==="anthropic"||Wt==="custom")&&V==="form"){W(o),C("custom-headers");return}$t(o)}function tu(){if(f(void 0),ht>0){let c=ht-1,r=mt[c]?.key??"name";D(c),j(S[r].length);return}if(t==="first-run"){C("select-preset");return}k()}ct("confirm:no",tu,{context:"Settings",isActive:V==="form"});function nu(){if(f(void 0),at>0){st(at-1);return}C("select-preset")}ct("confirm:no",nu,{context:"Settings",isActive:V==="cloud-extras"}),ct("confirm:no",()=>C("form"),{context:"Settings",isActive:V==="custom-headers"}),ct("confirm:no",()=>C("select-preset"),{context:"Settings",isActive:V==="anthropic-auth-choice"||V==="anthropic-oauth"});function cu(){let c=!nt(),r=[...Et?[{value:"import-legacy",label:"Import from Claude Code",description:"Reuse ~/.claude/ tokens, settings, theme, MCP, skills, agents, plugins."}]:[],{value:"dashscope-intl",label:"Alibaba Coding Plan",description:"Alibaba DashScope International endpoint"},{value:"dashscope-cn",label:"Alibaba Coding Plan (China)",description:"Alibaba DashScope China endpoint"},{value:"anthropic",label:"Anthropic",description:"Native Claude API (x-api-key auth)"},{value:"atomic-chat",label:"Atomic Chat",description:"Local Model Provider"},{value:"azure-openai",label:"Azure OpenAI",description:"Azure OpenAI endpoint (model=deployment name)"},{value:"foundry",label:"Azure AI Foundry",description:"Anthropic models hosted on Azure AI Foundry (resource-scoped)"},{value:"bedrock",label:"AWS Bedrock",description:"Anthropic models on AWS Bedrock (region-scoped, AWS creds)"},{value:"bankr",label:"Bankr",description:"Bankr LLM Gateway (OpenAI-compatible)"},{value:"cloudflare-workers-ai",label:"Cloudflare Workers AI",description:"Cloudflare Workers AI (OpenAI-compatible); set your account ID in the base URL"},{value:"cloudflare-ai-gateway",label:"Cloudflare AI Gateway",description:"Cloudflare AI Gateway unified endpoint; set your account ID in the base URL"},...c?[{value:"codex-oauth",label:"Codex OAuth",description:"Sign in with ChatGPT in your browser and store Codex credentials securely"},{value:"xai-oauth",label:"xAI / Grok (OAuth)",description:"Sign in with xAI in your browser and store Grok credentials securely"}]:[],{value:"github-onboard",label:"GitHub Copilot",description:"Sign in with GitHub in your browser to use Copilot models"},{value:"deepseek",label:"DeepSeek",description:"DeepSeek OpenAI-compatible endpoint"},{value:"gemini",label:"Google Gemini",description:"Gemini OpenAI-compatible endpoint"},{value:"vertex",label:"Google Vertex AI",description:"Anthropic models on Vertex AI (project + region, ADC)"},{value:"groq",label:"Groq",description:"Groq OpenAI-compatible endpoint"},{value:"lmstudio",label:"LM Studio",description:"Local LM Studio endpoint"},{value:"minimax",label:"MiniMax",description:"MiniMax API endpoint"},{value:"mistral",label:"Mistral",description:"Mistral OpenAI-compatible endpoint"},{value:"moonshotai",label:"Moonshot AI - API",description:"Moonshot AI - API endpoint"},{value:"kimi-code",label:"Moonshot AI - Kimi Code",description:"Moonshot AI - Kimi Code Subscription endpoint"},{value:"nvidia-nim",label:"NVIDIA NIM",description:"NVIDIA NIM endpoint"},{value:"opencode-go",label:"OpenCode GO",description:"OpenCode GO OpenAI-compatible endpoint"},{value:"opencode-zen",label:"OpenCode Zen",description:"OpenCode Zen OpenAI-compatible endpoint"},{value:"ollama",label:"Ollama",description:"Local or remote Ollama endpoint"},{value:"openai",label:"OpenAI",description:"OpenAI API with API key"},{value:"openrouter",label:"OpenRouter",description:"OpenRouter OpenAI-compatible endpoint"},{value:"together",label:"Together AI",description:"Together chat/completions endpoint"},{value:"zai",label:"Z.AI (GLM Coding Plan)",description:"Z.AI GLM Coding Plan (OpenAI-compatible)"},{value:"custom",label:"Custom",description:"Any OpenAI-compatible provider"},...t==="first-run"?[{value:"skip",label:"Skip for now",description:"Continue with current defaults"}]:[]];return y(g,{flexDirection:"column",gap:1,children:[a(l,{color:"remember",bold:!0,children:t==="first-run"?"Set up provider":"Choose provider preset"}),a(l,{dimColor:!0,children:"Pick a preset, then confirm base URL, model, and API key."}),a(Y,{options:r,onChange:(o)=>{if(o==="skip"){Ft("Provider setup skipped");return}if(o==="codex-oauth"){C("codex-oauth");return}if(o==="xai-oauth"){C("xai-oauth");return}if(o==="github-onboard"){C("github-onboard");return}if(o==="import-legacy"){(async()=>{let e=await bn({force:!0});Pt(Rt()),M();let d=Zt(e);if(e.errors.length>0){f(d);return}let O=T();if(t==="first-run"&&O){n({action:"saved",activeProfileId:O.id,activeProviderName:O.name,activeProviderModel:O.model,message:d});return}if(N(d),f(void 0),t==="manage")k()})();return}Ic(o)},onCancel:()=>{if(t==="first-run"){Ft("Provider setup skipped");return}k()},visibleOptionCount:Math.min(13,r.length)})]})}function uu(){return y(g,{flexDirection:"column",gap:1,children:[a(l,{color:"remember",bold:!0,children:"Anthropic — choose authentication"}),a(l,{dimColor:!0,children:"Sign in with your Anthropic account in the browser, or paste an API key."}),a(Y,{options:[{value:"oauth",label:"Sign in with web (OAuth)",description:"Open a browser, sign in to Claude, and store tokens in ~/.claudin/.credentials.json"},{value:"apiKey",label:"Use API key",description:"Paste an x-api-key value (sk-ant-…)"},{value:"back",label:"Back",description:"Choose a different provider"}],onChange:(c)=>{if(c==="oauth"){C("anthropic-oauth");return}if(c==="apiKey"){C("form");return}C("select-preset")},onCancel:()=>C("select-preset"),visibleOptionCount:3})]})}function au(){let c=(na(),Uu(ta)).ConsoleOAuthFlow;return a(g,{flexDirection:"column",gap:1,children:a(c,{mode:"login",onDone:()=>{let r=Kt("anthropic"),o={provider:"anthropic",name:r.name,baseUrl:r.baseUrl,model:r.model},e=tt(o,{makeActive:!0});if(!e){f("OAuth completed, but the Anthropic profile could not be saved."),C("select-preset");return}let d=`Anthropic OAuth configured: ${e.name}`;if(M(),t==="first-run"){n({action:"saved",activeProfileId:e.id,message:d});return}N(d),f(void 0),k()}})})}function hu(){let c=Wt;if(c!=="bedrock"&&c!=="vertex"&&c!=="foundry")return null;let r=Ca[c],o=r[at]??r[0],e=Ht[o.key]??"";function d(O){let X=O.trim();if(X.length===0){f(`${o.label} is required.`);return}let J={...Ht,[o.key]:X};if(zt(J),f(void 0),at<r.length-1){st(at+1);return}st(0),C("form")}return y(g,{flexDirection:"column",gap:1,children:[a(l,{color:"remember",bold:!0,children:`${c==="bedrock"?"AWS Bedrock":c==="vertex"?"Google Vertex AI":"Azure AI Foundry"} setup`}),a(l,{dimColor:!0,children:o.helpText}),y(l,{dimColor:!0,children:["Step ",at+1," of ",r.length,": ",o.label]}),y(g,{flexDirection:"row",gap:1,children:[a(l,{children:dt.pointer}),a(ot,{value:e,onChange:(O)=>zt((X)=>({...X,[o.key]:O})),onSubmit:d,focus:!0,showCursor:!0,placeholder:`${o.placeholder}${dt.ellipsis}`,columns:80,cursorOffset:Vc,onChangeCursorOffset:Qc})]}),rt&&a(l,{color:"error",children:rt}),a(l,{dimColor:!0,children:"Press Enter to continue. Press Esc to go back."})]})}function ru(){return y(g,{flexDirection:"column",gap:1,children:[a(l,{color:"remember",bold:!0,children:"Custom headers (optional)"}),y(l,{dimColor:!0,children:["Add HTTP headers sent on every request. One header per line as"," ",a(l,{children:"Header: Value"}),". Leave empty to skip."]}),y(g,{flexDirection:"row",gap:1,children:[a(l,{children:dt.pointer}),a(ot,{value:wn,onChange:Tt,onSubmit:()=>$t(S),focus:!0,showCursor:!0,placeholder:"X-Header: value",columns:80,multiline:!0,cursorOffset:Gc,onChangeCursorOffset:Yc})]}),rt&&a(l,{color:"error",children:rt}),a(l,{dimColor:!0,children:"Press Enter on a blank line to save. Press Esc to go back."})]})}function lu(){return y(g,{flexDirection:"column",gap:1,children:[a(l,{color:"remember",bold:!0,children:ut?"Edit provider profile":"Create provider profile"}),a(l,{dimColor:!0,children:lt.helpText}),y(l,{dimColor:!0,children:["Provider type:"," ",_==="anthropic"?"Anthropic native API":"OpenAI-compatible API"]}),y(l,{dimColor:!0,children:["Step ",ht+1," of ",mt.length,": ",lt.label]}),y(g,{flexDirection:"row",gap:1,children:[a(l,{children:dt.pointer}),a(ot,{value:Ec,onChange:(c)=>W((r)=>({...r,[qt]:c})),onSubmit:vc,focus:!0,showCursor:!0,placeholder:`${lt.placeholder}${dt.ellipsis}`,mask:qt==="apiKey"?"*":void 0,columns:80,cursorOffset:Jc,onChangeCursorOffset:j})]}),rt&&a(l,{color:"error",children:rt}),a(l,{dimColor:!0,children:"Press Enter to continue. Press Esc to go back."})]})}function iu(){let c=h.length>0,r=c;return y(g,{flexDirection:"column",gap:1,children:[a(l,{color:"remember",bold:!0,children:"Provider manager"}),a(l,{dimColor:!0,children:"Active profile controls base URL, model, and API key used by this session."}),gn&&a(l,{children:gn}),a(g,{flexDirection:"column",children:h.length===0?a(l,{dimColor:!0,children:"No provider profiles configured yet."}):h.map((o)=>y(l,{dimColor:!0,children:["- ",o.name,": ",sa(o,o.id===m)]},o.id))}),a(Y,{options:Rn,onChange:(o)=>{switch(f(void 0),o){case"add":C("select-preset");break;case"import-legacy":{(async()=>{let e=await bn({force:!0});if(Pt(Rt()),M(),e.errors.length>0)f(Zt(e));else N(Zt(e))})();break}case"activate":if(r)C("select-active");break;case"activate-project":if(r)C("select-active-project");break;case"clear-project-override":Bc();break;case"edit":if(c)C("select-edit");break;case"delete":if(r)C("select-delete");break;case"logout-codex-oauth":{let e=Cn();if(!e.success){f(e.warning??"Could not clear Codex OAuth credentials.");break}kt(!1),wt(void 0);let d=en(v(),bt),O=null;if(d){let X=dn(d.id);if(!X.removed){f("Codex OAuth credentials were cleared, but the Codex profile could not be removed."),M();break}zn(),O=X.activeProfileId?it():null}M(),N(O?`Codex OAuth logged out. Warning: could not clear startup provider override (${O}).`:"Codex OAuth logged out.");break}default:Ft("Provider manager closed");break}},onCancel:()=>Ft("Provider manager closed"),defaultFocusValue:Zc,visibleOptionCount:Rn.length})]})}function Lt(c,r,o){let e=h.map((d)=>{let O=[];if(d.id===m)O.push("active");if(w&&d.id===w)O.push("this project");if(q&&d.id===q)O.push("global default");let X=O.length>0?` (${O.join(", ")})`:"";return{value:d.id,label:`${d.name}${X}`,description:`${d.provider==="anthropic"?"anthropic":"openai-compatible"} · ${d.baseUrl} · ${d.model}`}});if(e.length===0)return y(g,{flexDirection:"column",gap:1,children:[a(l,{color:"remember",bold:!0,children:c}),a(l,{dimColor:!0,children:r}),a(Y,{options:[{value:"back",label:"Back",description:"Return to provider manager"}],onChange:()=>k(),onCancel:()=>k(),visibleOptionCount:1})]});return y(g,{flexDirection:"column",gap:1,children:[a(l,{color:"remember",bold:!0,children:c}),a(Y,{options:e,onChange:o,onCancel:()=>k(),visibleOptionCount:Math.min(10,Math.max(2,e.length))})]})}let G;switch(V){case"select-preset":G=cu();break;case"select-ollama-model":G=jc();break;case"select-atomic-chat-model":G=Dc();break;case"codex-oauth":G=a(Oa,{onBack:()=>C("select-preset"),onConfigured:async(c,r)=>{let o={provider:"openai",name:ha,baseUrl:zc,model:ra,apiKey:""},e=en(v(),bt),d=e?Ot(e.id,o):tt(o,{makeActive:!0});if(!d){f("Codex OAuth login finished, but the provider profile could not be saved."),k();return}let O=e&&m!==d.id?gt(d.id):d;if(!O){f("Codex OAuth login finished, but the provider could not be set as the startup provider."),k();return}r({profileId:d.id});let X=it(),J=await xt(c);kt(!0),wt(d.id),M();let $=[J,X?`could not clear startup provider override (${X})`:null].filter((F)=>Boolean(F)),K=It({prefix:"Codex OAuth configured",activationWarning:J,warnings:$});if(t==="first-run"){n({action:"saved",activeProfileId:O.id,message:K});return}N(K),f(void 0),k()}});break;case"xai-oauth":G=a(ga,{onBack:()=>C("select-preset"),onConfigured:async(c,r)=>{let e=tt({provider:"openai",name:la,baseUrl:sn,model:ia,apiKey:""},{makeActive:!0});if(!e){f("xAI OAuth login finished, but the provider profile could not be saved."),k();return}try{r({profileId:e.id})}catch(O){f(O instanceof Error?O.message:String(O)),k();return}M();let d="xAI / Grok configured. Claudin switched to it for this session.";if(t==="first-run"){n({action:"saved",activeProfileId:e.id,message:d});return}N(d),f(void 0),k()}});break;case"github-onboard":G=a(Yn,{onDone:(c)=>{if(c)N(c),f(void 0);M(),k()},onBack:()=>C("select-preset"),onChangeAPIKey:M});break;case"anthropic-auth-choice":G=uu();break;case"anthropic-oauth":G=au();break;case"cloud-extras":G=hu();break;case"custom-headers":G=ru();break;case"form":G=lu();break;case"select-active":G=Lt("Set active provider (Global)","No providers available. Add one first.",(c)=>{Pc(c)});break;case"select-active-project":G=Lt("Set active provider (Project)","No providers available. Add one first.",(c)=>{pc(c)});break;case"select-edit":G=Lt("Edit provider","No providers available. Add one first.",(c)=>{xc(c)});break;case"select-delete":G=Lt("Delete provider","No providers available. Add one first.",(c)=>{let r=h.find(($)=>$.id===c),o=r?.provider==="openai"&&r?.extras?.githubToken!==void 0,e=en(h,bt)?.id===c,d=_c()?.profileId,O=r?.provider==="openai"&&r.baseUrl===sn&&!r.apiKey&&d===c,X=T()?.id===c,J=dn(c);if(!J.removed)f("Could not delete provider.");else{let $=[];if(e){let F=Cn();if(!F.success)$.push(F.warning??"could not clear Codex OAuth credentials");else wt(void 0);zn()}if(o){let F=Xc();if(!F.success)$.push(F.warning??"could not clear GitHub Copilot token")}if(O){let F=qc();if(!F.success)$.push(F.warning??"could not clear xAI OAuth credentials")}let K=J.activeProfileId?it():null;if(K)$.push(`could not clear startup provider override (${K})`);if(M(),X){let F=T();if(F)Ct(),u((U)=>({...U,mainLoopModel:yt(F.model),mainLoopModelForSession:null}));else Ct(),u((U)=>({...U,mainLoopModel:null,mainLoopModelForSession:null}))}N($.length>0?`Provider deleted. Warning: ${$.join("; ")}.`:"Provider deleted")}k()});break;case"menu":default:G=iu();break}return y(kc,{color:"permission",children:[a(Mc,{enabled:fn,onDismiss:(c)=>{Pt(Rt()),Uc(!1),M();let r=T();if(c==="migrated"&&t==="first-run"&&r)n({action:"saved",activeProfileId:r.id,activeProviderName:r.name,activeProviderModel:r.model})}}),fn?null:Hc?y(g,{flexDirection:"column",gap:1,children:[a(l,{color:"remember",bold:!0,children:"Loading providers..."}),a(l,{dimColor:!0,children:"Reading provider profiles from disk."})]}):Wc?y(g,{flexDirection:"column",gap:1,children:[a(l,{color:"remember",bold:!0,children:"Activating provider..."}),a(l,{dimColor:!0,children:"Please wait while the provider is being configured."})]}):G]})}var s,mt,ha="Codex OAuth",ra="codexplan",la="xAI / Grok (OAuth)",ia="grok-4",Ca;var Aa=p(()=>{Eu();Jn();Bu();_n();pu();Du();ca();cc();hn();Pu();xu();kn();Vn();ju();Tn();Wn();vu();Iu();aa();Qn();hc();Ac();Oc();ua();Nt();s=Mt(Vt(),1),mt=[{key:"name",label:"Provider name",placeholder:"e.g. Ollama Home, OpenAI Work",helpText:"A short label shown in /provider and startup setup."},{key:"baseUrl",label:"Base URL",placeholder:"e.g. http://localhost:11434/v1",helpText:"API base URL used for this provider profile."},{key:"model",label:"Default model",placeholder:"e.g. llama3.1:8b or glm-4.7; glm-4.7-flash",helpText:'Model name(s) to use. Separate multiple with ";" or ","; first is default.'},{key:"apiKey",label:"API key",placeholder:"Leave empty if your provider does not require one",helpText:"Optional. Press Enter with empty value to skip.",optional:!0}];Ca={bedrock:[{key:"awsRegion",label:"AWS region",placeholder:"e.g. us-east-1",helpText:"Region of your Bedrock-enabled AWS account. Credentials are picked up from the AWS SDK chain."}],vertex:[{key:"gcpProject",label:"GCP project ID",placeholder:"e.g. my-project-123456",helpText:"Google Cloud project where Vertex AI is enabled. Credentials are picked up from ADC."},{key:"gcpRegion",label:"GCP region",placeholder:"e.g. us-central1",helpText:"Vertex AI region for the model."}],foundry:[{key:"azureResource",label:"Azure resource",placeholder:"e.g. my-foundry-resource",helpText:"Name of your Azure AI Foundry resource. Credentials are picked up from DefaultAzureCredential."}]}});
50
- export{tn as lc,Wn as mc,ma as nc,gh as oc,Aa as pc};
@@ -1,24 +0,0 @@
1
- import{Cb as DY}from"./cli-0.6.8-aasxytdk.mjs";import{Jc as LY,Mc as iQ}from"./cli-0.6.8-8h913n7t.mjs";import{Nh as V0,Oh as p6}from"./cli-0.6.8-yztx4k12.mjs";import{li as pY,mi as A6}from"./cli-0.6.8-wj4r5nwg.mjs";import{$A as O6,$w as d0,Bp as iZ,Cp as AY,DP as wZ,Dk as L9,Dp as FZ,Ek as u6,Ep as _Y,Fk as z9,Gk as q9,Hj as KZ,Hk as bZ,IM as BY,IN as gY,Ik as Y0,Jk as D9,KC as NY,KM as rQ,Kj as E0,Kk as XZ,LC as nQ,Lk as Q0,MC as RY,Mk as v9,Nk as A9,OC as z6,Ok as sY,Pj as hY,Pz as uY,QJ as P9,QP as rY,Qw as h0,RN as dY,Rw as uZ,Rz as v6,SC as n,SJ as F9,Sw as k0,TN as lY,Tw as x0,UC as U6,Uw as u0,VA as cY,Vw as p0,WA as _6,WJ as M9,WO as s,Ww as pZ,XN as w6,Xw as cZ,Xz as CY,Yo as j9,Yw as c0,Yz as TY,ZP as iY,Zo as i6,Zw as m0,Zz as L6,_A as mY,_w as g0,aH as T0,aP as aY,ax as l0,bH as s9,bK as o6,bQ as zY,bt as ZY,bx as a0,ct as xQ,cx as n0,dt as JY,dx as r0,eQ as qY,et as lQ,ex as i0,ft as kY,fx as GQ,gJ as PY,hP as nY,iP as kZ,is as M0,jJ as J6,km as yZ,kv as I0,lF as C0,ls as b0,lz as xY,mF as o9,mP as xZ,ms as fZ,nm as $Z,nv as i9,om as e0,oz as D6,qs as r9,yC as HY,zC as aQ}from"./cli-0.6.8-883y3p0j.mjs";import{FV as Q9,JV as R6}from"./cli-0.6.8-s0s7zs2a.mjs";import{BW as $0,CW as j0,DW as l9,GW as P0,HW as a9,NW as F0,OW as n9,nW as y0,oW as d9}from"./cli-0.6.8-34gwg749.mjs";import{DX as m9,DZ as g9,YY as p,_Y as M}from"./cli-0.6.8-vf9cagcj.mjs";import{I1 as a,J1 as E,K1 as b,L1 as J0}from"./cli-0.6.8-jx1wvs6x.mjs";import{M1 as c9}from"./cli-0.6.8-gmzxyn2t.mjs";import{R3 as $Y,V3 as K6,q6 as G6,t5 as jY}from"./cli-0.6.8-tb4rrntr.mjs";import{$da as p9,L8 as E9,S9 as TZ,U9 as x9,X9 as y9,Y$ as $9,Y7 as _Z,Yda as U0,Z7 as k9,daa as r6,dea as e,j8 as GY,l8 as dQ,l9 as a6,lea as w0,nba as yY,oaa as wY,paa as EY,r_ as n6,raa as V6,u_ as Y9,wba as W6,z_ as T6}from"./cli-0.6.8-vpaw67v2.mjs";import{Eea as L0,Iea as h9,wea as B0}from"./cli-0.6.8-gscmwgeh.mjs";import{mfa as oY,xfa as $6}from"./cli-0.6.8-hj3j54vb.mjs";import{Qfa as Y,Rfa as h,Sfa as JZ,Tfa as q,Ufa as EZ}from"./cli-0.6.8-2nda5zxh.mjs";import{Aga as u9,Xfa as UY,Yfa as X6,_fa as RZ,bga as z0,cga as q0,dga as D0,ega as v0,hga as A0,iga as _0,uga as O0}from"./cli-0.6.8-9cxxg2ax.mjs";import{Lga as g,Oga as UZ}from"./cli-0.6.8-dxtyt1wg.mjs";import{Oha as I,Rga as Z9,Rha as HZ,Tga as C6,rha as ZZ,sha as WY,wha as PZ}from"./cli-0.6.8-4avmxq80.mjs";import{Tha as KY,Xha as gQ}from"./cli-0.6.8-q3txjpb9.mjs";import{_ha as VY,gia as w9,hia as tZ,nia as lZ}from"./cli-0.6.8-cv73s4x5.mjs";import{Oma as J9,Pma as DZ,Qma as H9,Sma as N9,Tma as X0,Vma as B9,boa as IY,eoa as BZ,hka as NZ,nka as W0,oka as eY,wla as OY}from"./cli-0.6.8-dwwx58n6.mjs";import{Hpa as N0,Kpa as hZ,Lpa as OZ,Mpa as rZ}from"./cli-0.6.8-259kprym.mjs";var WQ={};hZ(WQ,{selectableUserMessagesFilter:()=>S0,messagesAfterAreOnlySynthetic:()=>VQ,MessageSelector:()=>e9});import{randomUUID as t9}from"crypto";import*as QZ from"path";function R0(Q){return Q.type==="text"}function SZ(Q){return Q==="summarize"||Q==="summarize_up_to"}function e9({messages:Q,onPreRestore:Z,onRestoreMessage:X,onRestoreCode:V,onSummarize:W,onClose:H,preselectedMessage:G}){let K=I0((U)=>U.fileHistory),[B,z]=T.useState(void 0),J=M0(),L=T.useMemo(t9,[]),_=T.useMemo(()=>[...Q.filter(S0),{...s({content:""}),uuid:L}],[Q,L]),[w,v]=T.useState(_.length-1),P=Math.max(0,Math.min(w-Math.floor(CZ/2),_.length-CZ)),f=_.length>1,[D,F]=T.useState(G),[y,S]=T.useState(void 0);T.useEffect(()=>{if(!G||!J)return;let U=!1;return fZ(K,G.uuid).then((R)=>{if(!U)S(R)}),()=>{U=!0}},[G,J,K]);let[O,$]=T.useState(!1),[d,i]=T.useState(null),[o,C]=T.useState("both"),[k,x]=T.useState(""),[A,j]=T.useState("");function N(U){let R=U?[{value:"both",label:"Restore code and conversation"},{value:"conversation",label:"Restore conversation"},{value:"code",label:"Restore code"}]:[{value:"conversation",label:"Restore conversation"}],c={type:"input",placeholder:"add context (optional)",initialValue:"",allowEmptySubmitToCancel:!0,showLabelWithValue:!0,labelValueSeparator:": "};return R.push({value:"summarize",label:"Summarize from here",...c,onChange:x}),R.push({value:"nevermind",label:"Never mind"}),R}T.useEffect(()=>{g("tengu_message_selector_opened",{})},[]);async function u(U){Z(),$(!0);try{await X(U),$(!1),H()}catch(R){e(R),$(!1),z(`Failed to restore the conversation:
2
- ${R}`)}}async function l(U){let R=Q.indexOf(U),c=Q.length-1-R;if(g("tengu_message_selector_selected",{index_from_end:c,message_type:U.type,is_current_prompt:!1}),!Q.includes(U)){H();return}if(!J){await u(U);return}let m=await fZ(K,U.uuid);F(U),S(m)}async function VZ(U){if(g("tengu_message_selector_restore_option_selected",{option:U}),!D){z("Message not found.");return}if(U==="nevermind"){if(G)H();else F(void 0);return}if(SZ(U)){Z(),$(!0),i(U),z(void 0);try{let m=U==="summarize_up_to"?"up_to":"from",YZ=(m==="up_to"?A:k).trim()||void 0;await W(D,YZ,m),$(!1),i(null),F(void 0),H()}catch(m){e(m),$(!1),i(null),F(void 0),z(`Failed to summarize:
3
- ${m}`)}return}Z(),$(!0),z(void 0);let R=null,c=null;if(U==="code"||U==="both")try{await V(D)}catch(m){R=m,e(R)}if(U==="conversation"||U==="both")try{await X(D)}catch(m){c=m,e(c)}if($(!1),F(void 0),c&&R)z(`Failed to restore the conversation and code:
4
- ${c}
5
- ${R}`);else if(c)z(`Failed to restore the conversation:
6
- ${c}`);else if(R)z(`Failed to restore the code:
7
- ${R}`);else H()}let WZ=P0(),t=T.useCallback(()=>{if(D&&!G){F(void 0);return}g("tengu_message_selector_cancelled",{}),H()},[H,D,G]),I9=T.useCallback(()=>v((U)=>Math.max(0,U-1)),[]),C9=T.useCallback(()=>v((U)=>Math.min(_.length-1,U+1)),[_.length]),T9=T.useCallback(()=>v(0),[]),R9=T.useCallback(()=>v(_.length-1),[_.length]),f9=T.useCallback(()=>{let U=_[w];if(U)l(U)},[_,w,l]);$0("confirm:no",t,{context:"Confirmation",isActive:!D}),j0({"messageSelector:up":I9,"messageSelector:down":C9,"messageSelector:top":T9,"messageSelector:bottom":R9,"messageSelector:select":f9},{context:"MessageSelector",isActive:!O&&!B&&!D&&f});let[K0,G0]=T.useState({});T.useEffect(()=>{async function U(){if(!J)return;Promise.all(_.map(async(R,c)=>{if(R.uuid!==L){let m=b0(K,R.uuid),YZ=_.at(c+1),AZ=m?XQ(Q,R.uuid,YZ?.uuid!==L?YZ?.uuid:void 0):void 0;if(AZ!==void 0)G0((r)=>({...r,[c]:AZ}));else G0((r)=>({...r,[c]:void 0}))}}))}U()},[_,Q,L,K,J]);let vZ=J&&y?.filesChanged&&y.filesChanged.length>0,S9=!B&&!D&&!G&&f;return b(p,{flexDirection:"column",width:"100%",children:[E(F0,{color:"suggestion"}),b(p,{flexDirection:"column",marginX:1,gap:1,children:[E(M,{bold:!0,color:"suggestion",children:"Rewind"}),B&&E(a,{children:b(M,{color:"error",children:["Error: ",B]})}),!f&&E(a,{children:E(M,{children:"Nothing to rewind to yet."})}),!B&&D&&f&&b(a,{children:[b(M,{children:["Confirm you want to restore"," ",!y&&"the conversation ","to the point before you sent this message:"]}),b(p,{flexDirection:"column",paddingLeft:1,borderStyle:"single",borderRight:!1,borderTop:!1,borderBottom:!1,borderLeft:!0,borderLeftDimColor:!0,children:[E(H0,{userMessage:D,color:"text",isCurrent:!1}),b(M,{dimColor:!0,children:["(",L0(new Date(D.timestamp)),")"]})]}),E(YQ,{selectedRestoreOption:o,canRestoreCode:!!vZ,diffStatsForRestore:y}),O&&SZ(d)?b(p,{flexDirection:"row",gap:1,children:[E(T0,{}),E(M,{children:"Summarizing…"})]}):E(C0,{isDisabled:O,options:N(!!vZ),defaultFocusValue:vZ?"both":"conversation",onFocus:(U)=>C(U),onChange:(U)=>VZ(U),onCancel:()=>G?H():F(void 0)}),vZ&&E(p,{marginBottom:1,children:b(M,{dimColor:!0,children:[_Z.warning," Rewinding does not affect files edited manually or via bash."]})})]}),S9&&b(a,{children:[J?E(M,{children:"Restore the code and/or conversation to the point before…"}):E(M,{children:"Restore and fork the conversation to the point before…"}),E(p,{width:"100%",flexDirection:"column",children:_.slice(P,P+CZ).map((U,R)=>{let c=P+R,m=c===w,YZ=U.uuid===L,AZ=c in K0,r=K0[c],IZ=r?.filesChanged&&r.filesChanged.length;return b(p,{height:J?3:2,overflow:"hidden",width:"100%",flexDirection:"row",children:[E(p,{width:2,minWidth:2,children:m?b(M,{color:"permission",bold:!0,children:[_Z.pointer," "]}):E(M,{children:" "})}),b(p,{flexDirection:"column",children:[E(p,{flexShrink:1,height:1,overflow:"hidden",children:E(H0,{userMessage:U,color:m?"suggestion":void 0,isCurrent:YZ,paddingRight:10})}),J&&AZ&&E(p,{height:1,flexDirection:"row",children:r?E(a,{children:E(M,{dimColor:!m,color:"inactive",children:IZ?b(a,{children:[IZ===1&&r.filesChanged[0]?`${QZ.basename(r.filesChanged[0])} `:`${IZ} files changed `,E(f0,{diffStats:r})]}):E(a,{children:"No code changes"})})}):b(M,{dimColor:!0,color:"warning",children:[_Z.warning," No code restore"]})})]})]},U.uuid)})})]}),!D&&E(M,{dimColor:!0,italic:!0,children:WZ.pending?b(a,{children:["Press ",WZ.keyName," again to exit"]}):b(a,{children:[!B&&f&&"Enter to continue · ","Esc to exit"]})})]})]})}function ZQ(Q){switch(Q){case"summarize":return"Messages after this point will be summarized.";case"summarize_up_to":return"Preceding messages will be summarized. This and subsequent messages will remain unchanged — you will stay at the end of the conversation.";case"both":case"conversation":return"The conversation will be forked.";case"code":case"nevermind":return"The conversation will be unchanged."}}function YQ(Q){let Z=GZ.c(11),{selectedRestoreOption:X,canRestoreCode:V,diffStatsForRestore:W}=Q,H=V&&(X==="both"||X==="code"),G;if(Z[0]!==X)G=ZQ(X),Z[0]=X,Z[1]=G;else G=Z[1];let K;if(Z[2]!==G)K=E(M,{dimColor:!0,children:G}),Z[2]=G,Z[3]=K;else K=Z[3];let B;if(Z[4]!==W||Z[5]!==X||Z[6]!==H)B=!SZ(X)&&(H?E(QQ,{diffStatsForRestore:W}):E(M,{dimColor:!0,children:"The code will be unchanged."})),Z[4]=W,Z[5]=X,Z[6]=H,Z[7]=B;else B=Z[7];let z;if(Z[8]!==K||Z[9]!==B)z=b(p,{flexDirection:"column",children:[K,B]}),Z[8]=K,Z[9]=B,Z[10]=z;else z=Z[10];return z}function QQ(Q){let Z=GZ.c(14),{diffStatsForRestore:X}=Q;if(X===void 0)return;if(!X.filesChanged||!X.filesChanged[0]){let K;if(Z[0]===Symbol.for("react.memo_cache_sentinel"))K=E(M,{dimColor:!0,children:"The code has not changed (nothing will be restored)."}),Z[0]=K;else K=Z[0];return K}let V=X.filesChanged.length,W;if(V===1){let K;if(Z[1]!==X.filesChanged[0])K=QZ.basename(X.filesChanged[0]||""),Z[1]=X.filesChanged[0],Z[2]=K;else K=Z[2];W=K}else if(V===2){let K;if(Z[3]!==X.filesChanged[0])K=QZ.basename(X.filesChanged[0]||""),Z[3]=X.filesChanged[0],Z[4]=K;else K=Z[4];let B=K,z;if(Z[5]!==X.filesChanged[1])z=QZ.basename(X.filesChanged[1]||""),Z[5]=X.filesChanged[1],Z[6]=z;else z=Z[6];W=`${B} and ${z}`}else{let K;if(Z[7]!==X.filesChanged[0])K=QZ.basename(X.filesChanged[0]||""),Z[7]=X.filesChanged[0],Z[8]=K;else K=Z[8];W=`${K} and ${X.filesChanged.length-1} other files`}let H;if(Z[9]!==X)H=E(f0,{diffStats:X}),Z[9]=X,Z[10]=H;else H=Z[10];let G;if(Z[11]!==W||Z[12]!==H)G=E(a,{children:b(M,{dimColor:!0,children:["The code will be restored"," ",H," in ",W,"."]})}),Z[11]=W,Z[12]=H,Z[13]=G;else G=Z[13];return G}function f0(Q){let Z=GZ.c(7),{diffStats:X}=Q;if(!X||!X.filesChanged)return;let V;if(Z[0]!==X.insertions)V=b(M,{color:"diffAddedWord",children:["+",X.insertions," "]}),Z[0]=X.insertions,Z[1]=V;else V=Z[1];let W;if(Z[2]!==X.deletions)W=b(M,{color:"diffRemovedWord",children:["-",X.deletions]}),Z[2]=X.deletions,Z[3]=W;else W=Z[3];let H;if(Z[4]!==V||Z[5]!==W)H=b(a,{children:[V,W]}),Z[4]=V,Z[5]=W,Z[6]=H;else H=Z[6];return H}function H0(Q){let Z=GZ.c(31),{userMessage:X,color:V,dimColor:W,isCurrent:H,paddingRight:G}=Q,{columns:K}=y0();if(H){let S;if(Z[0]!==V||Z[1]!==W)S=E(p,{width:"100%",children:E(M,{italic:!0,color:V,dimColor:W,children:"(current)"})}),Z[0]=V,Z[1]=W,Z[2]=S;else S=Z[2];return S}let B=X.message.content,z=typeof B==="string"?null:B[B.length-1],J,L,_,w,v,P,f,D;if(Z[3]!==V||Z[4]!==K||Z[5]!==B||Z[6]!==W||Z[7]!==z||Z[8]!==G){D=Symbol.for("react.early_return_sentinel");Z:{let S=typeof B==="string"?B.trim():z&&R0(z)?z.text.trim():"(no prompt)",O=U0(S);if(E0(O)){let $;if(Z[17]!==V||Z[18]!==W)$=E(p,{flexDirection:"row",width:"100%",children:E(M,{italic:!0,color:V,dimColor:W,children:"((empty message))"})}),Z[17]=V,Z[18]=W,Z[19]=$;else $=Z[19];D=$;break Z}if(O.includes("<bash-input>")){let $=KZ(O,"bash-input");if($){let d;if(Z[20]===Symbol.for("react.memo_cache_sentinel"))d=E(M,{color:"bashBorder",children:"!"}),Z[20]=d;else d=Z[20];D=b(p,{flexDirection:"row",width:"100%",children:[d,b(M,{color:V,dimColor:W,children:[" ",$]})]});break Z}}if(O.includes(`<${RZ}>`)){let $=KZ(O,RZ),d=KZ(O,"command-args"),i=KZ(O,"skill-format")==="true";if($)if(i){D=E(p,{flexDirection:"row",width:"100%",children:b(M,{color:V,dimColor:W,children:["Skill(",$,")"]})});break Z}else{D=E(p,{flexDirection:"row",width:"100%",children:b(M,{color:V,dimColor:W,children:["/",$," ",d]})});break Z}}L=p,P="row",f="100%",J=M,_=V,w=W,v=G?B0(O,K-G,!0):O.slice(0,500).split(`
8
- `).slice(0,4).join(`
9
- `)}Z[3]=V,Z[4]=K,Z[5]=B,Z[6]=W,Z[7]=z,Z[8]=G,Z[9]=J,Z[10]=L,Z[11]=_,Z[12]=w,Z[13]=v,Z[14]=P,Z[15]=f,Z[16]=D}else J=Z[9],L=Z[10],_=Z[11],w=Z[12],v=Z[13],P=Z[14],f=Z[15],D=Z[16];if(D!==Symbol.for("react.early_return_sentinel"))return D;let F;if(Z[21]!==J||Z[22]!==_||Z[23]!==w||Z[24]!==v)F=E(J,{color:_,dimColor:w,children:v}),Z[21]=J,Z[22]=_,Z[23]=w,Z[24]=v,Z[25]=F;else F=Z[25];let y;if(Z[26]!==L||Z[27]!==P||Z[28]!==f||Z[29]!==F)y=E(L,{flexDirection:P,width:f,children:F}),Z[26]=L,Z[27]=P,Z[28]=f,Z[29]=F,Z[30]=y;else y=Z[30];return y}function XQ(Q,Z,X){let V=Q.findIndex((B)=>B.uuid===Z);if(V===-1)return;let W=X?Q.findIndex((B)=>B.uuid===X):Q.length;if(W===-1)W=Q.length;let H=[],G=0,K=0;for(let B=V+1;B<W;B++){let z=Q[B];if(!z||!xZ(z))continue;let J=z.toolUseResult;if(!J||!J.filePath||!J.structuredPatch)continue;if(!H.includes(J.filePath))H.push(J.filePath);try{if("type"in J&&J.type==="create")G+=J.content.split(/\r?\n/).length;else for(let L of J.structuredPatch){let _=TZ(L.lines,(v)=>v.startsWith("+")),w=TZ(L.lines,(v)=>v.startsWith("-"));G+=_,K+=w}}catch{continue}}return{filesChanged:H,insertions:G,deletions:K}}function S0(Q){if(Q.type!=="user")return!1;if(Array.isArray(Q.message.content)&&Q.message.content[0]?.type==="tool_result")return!1;if(kZ(Q))return!1;if(Q.isMeta)return!1;if(Q.isCompactSummary||Q.isVisibleInTranscriptOnly)return!1;let Z=Q.message.content,X=typeof Z==="string"?null:Z[Z.length-1],V=typeof Z==="string"?Z.trim():X&&R0(X)?X.text.trim():"";if(V.indexOf(`<${D0}>`)!==-1||V.indexOf(`<${v0}>`)!==-1||V.indexOf(`<${z0}>`)!==-1||V.indexOf(`<${q0}>`)!==-1||V.indexOf(`<${_0}>`)!==-1||V.indexOf(`<${A0}>`)!==-1||V.indexOf(`<${O0}`)!==-1)return!1;return!0}function VQ(Q,Z){for(let X=Z+1;X<Q.length;X++){let V=Q[X];if(!V)continue;if(kZ(V))continue;if(xZ(V))continue;if(V.type==="progress")continue;if(V.type==="system")continue;if(V.type==="attachment")continue;if(V.type==="user"&&V.isMeta)continue;if(V.type==="assistant"){let W=V.message.content;if(Array.isArray(W)){if(W.some((G)=>G.type==="text"&&G.text.trim()||G.type==="tool_use"))return!1}continue}if(V.type==="user")return!1}return!0}var GZ,T,CZ=7;var KQ=OZ(()=>{k9();UZ();i9();r9();w0();a9();g9();l9();p9();wZ();o9();s9();d9();u9();x9();h9();n9();J0();GZ=N0(m9(),1),T=N0(c9(),1)});var b6={};hZ(b6,{getCronJitterConfig:()=>M6});function M6(){let Q=oY("tengu_kairos_cron_config",XZ,j6),Z=F6().safeParse(Q);return Z.success?Z.data:XZ}var j6=60000,oZ=1800000,P6=2592000000,F6;var I6=OZ(()=>{JZ();$6();sY();EZ();F6=q(()=>Y.object({recurringFrac:Y.number().min(0).max(1),recurringCapMs:Y.number().int().min(0).max(oZ),oneShotMaxMs:Y.number().int().min(0).max(oZ),oneShotFloorMs:Y.number().int().min(0).max(oZ),oneShotMinuteMod:Y.number().int().min(1).max(60),recurringMaxAgeMs:Y.number().int().min(0).max(P6).default(XZ.recurringMaxAgeMs)}).refine((Q)=>Q.oneShotFloorMs<=Q.oneShotMaxMs))});import{mkdir as f6,readFile as S6,unlink as X9,writeFile as eZ}from"fs/promises";import{dirname as h6,join as V9}from"path";function zZ(Q){return V9(Q??eY(),k6)}async function W9(Q){let Z;try{Z=await S6(zZ(Q),"utf8")}catch{return}let X=x6().safeParse(Y9(Z,!1));return X.success?X.data:void 0}async function tY(Q,Z){let X=zZ(Z),V=ZZ(Q);try{return await eZ(X,V,{flag:"wx"}),!0}catch(W){let H=tZ(W);if(H==="EEXIST")return!1;if(H==="ENOENT"){await f6(h6(X),{recursive:!0});try{return await eZ(X,V,{flag:"wx"}),!0}catch(G){if(tZ(G)==="EEXIST")return!1;throw G}}throw W}}function sZ(Q){MZ?.(),MZ=Z9(async()=>{await qZ(Q)})}async function Z0(Q){let Z=Q?.dir,X=Q?.lockIdentity??NZ(),V={sessionId:X,pid:process.pid,acquiredAt:Date.now()};if(await tY(V,Z))return LZ=void 0,sZ(Q),I(`[ScheduledTasks] acquired scheduler lock (PID ${process.pid})`),!0;let W=await W9(Z);if(W?.sessionId===X){if(W.pid!==process.pid)await eZ(zZ(Z),ZZ(V)),sZ(Q);return!0}if(W&&Q9(W.pid)){if(LZ!==W.sessionId)LZ=W.sessionId,I(`[ScheduledTasks] scheduler lock held by session ${W.sessionId} (PID ${W.pid})`);return!1}if(W)I(`[ScheduledTasks] recovering stale scheduler lock from PID ${W.pid}`);if(await X9(zZ(Z)).catch(()=>{}),await tY(V,Z))return LZ=void 0,sZ(Q),!0;return!1}async function qZ(Q){MZ?.(),MZ=void 0,LZ=void 0;let Z=Q?.dir,X=Q?.lockIdentity??NZ(),V=await W9(Z);if(!V||V.sessionId!==X)return;try{await X9(zZ(Z)),I("[ScheduledTasks] released scheduler lock")}catch{}}var k6,x6,MZ,LZ;var K9=OZ(()=>{JZ();BZ();C6();HZ();lZ();R6();T6();EZ();PZ();k6=V9(".claudin","scheduled_tasks.lock"),x6=q(()=>Y.object({sessionId:Y.string(),pid:Y.number(),acquiredAt:Y.number()}))});var d6={};hZ(d6,{takeDueSessionWakeup:()=>O9,isRecurringTaskAged:()=>_9,createCronScheduler:()=>g6,buildMissedTaskNotification:()=>U9});function _9(Q,Z,X){if(X===0)return!1;return Boolean(Q.recurring&&!Q.permanent&&Z-Q.createdAt>=X)}function O9(Q){let Z=X0();if(!Z||Q<Z.fireAtMs)return null;return B9(),{prompt:V0(Z.prompt),reason:Z.reason}}function g6(Q){let{onFire:Z,isLoading:X,assistantMode:V=!1,onFireTask:W,onMissed:H,onWakeupFire:G,dir:K,lockIdentity:B,getJitterConfig:z,isKilled:J,filter:L}=Q,_=K||B?{dir:K,lockIdentity:B}:void 0,w=[],v=new Map,P=new Set,f=new Set,D=null,F=null,y=null,S=null,O=!1,$=!1;async function d(C){let k=await q9(K);if(O)return;if(w=k,!C)return;let x=Date.now(),A=A9(k,x).filter((j)=>!j.recurring&&!P.has(j.id)&&(!L||L(j)));if(A.length>0){for(let j of A)P.add(j.id),v.set(j.id,1/0);if(g("tengu_scheduled_task_missed",{count:A.length,taskIds:A.map((j)=>j.id).join(",")}),H)H(A);else Z(U9(A));Y0(A.map((j)=>j.id),K).catch((j)=>I(`[ScheduledTasks] failed to remove missed tasks: ${j}`)),I(`[ScheduledTasks] surfaced ${A.length} missed one-shot task(s)`)}}function i(){if(J?.())return;if(X()&&!V)return;let C=Date.now(),k=new Set,x=[],A=z?.()??XZ;function j(N,u){if(L&&!L(N))return;if(k.add(N.id),f.has(N.id))return;let l=v.get(N.id);if(l===void 0)l=N.recurring?Q0(N.cron,N.lastFiredAt??N.createdAt,N.id,A)??1/0:v9(N.cron,N.createdAt,N.id,A)??1/0,v.set(N.id,l),I(`[ScheduledTasks] scheduled ${N.id} for ${l===1/0?"never":new Date(l).toISOString()}`);if(C<l)return;I(`[ScheduledTasks] firing ${N.id}${N.recurring?" (recurring)":""}`),g("tengu_scheduled_task_fire",{recurring:N.recurring??!1,taskId:N.id});let VZ=K===void 0?V0(N.prompt,void 0,N.agentId):N.prompt;if(W)W(VZ===N.prompt?N:{...N,prompt:VZ});else Z(VZ);let WZ=_9(N,C,A.recurringMaxAgeMs);if(WZ){let t=Math.floor((C-N.createdAt)/1000/60/60);I(`[ScheduledTasks] recurring task ${N.id} aged out (${t}h since creation), deleting after final fire`),g("tengu_scheduled_task_expired",{taskId:N.id,ageHours:t})}if(N.recurring&&!WZ){let t=Q0(N.cron,C,N.id,A)??1/0;if(v.set(N.id,t),!u)x.push(N.id)}else if(u)N9([N.id]),v.delete(N.id);else f.add(N.id),Y0([N.id],K).catch((t)=>I(`[ScheduledTasks] failed to remove task ${N.id}: ${t}`)).finally(()=>f.delete(N.id)),v.delete(N.id)}if($){for(let N of w)j(N,!1);if(x.length>0){for(let N of x)f.add(N);D9(x,C,K).catch((N)=>I(`[ScheduledTasks] failed to persist lastFiredAt: ${N}`)).finally(()=>{for(let N of x)f.delete(N)})}}if(K===void 0){for(let u of H9())j(u,!0);let N=O9(C);if(N!==null)if(I("[ScheduledTasks] firing pending ScheduleWakeup"),g("tengu_schedule_wakeup_fire",{}),G)G(N.prompt,N.reason);else Z(N.prompt)}if(k.size===0){v.clear();return}for(let N of v.keys())if(!k.has(N))v.delete(N)}async function o(){if(O)return;if(D)clearInterval(D),D=null;let{default:C}=await import("./index-0.6.8-k3r9pz8v.mjs");if(O)return;if($=await Z0(_).catch(()=>!1),O){if($)$=!1,qZ(_);return}if(!$)y=setInterval(()=>{Z0(_).then((x)=>{if(O){if(x)qZ(_);return}if(x){if($=!0,y)clearInterval(y),y=null}}).catch((x)=>I(String(x),{level:"error"}))},m6),y.unref?.();d(!0);let k=z9(K);S=C.watch(k,{persistent:!1,ignoreInitial:!0,awaitWriteFinish:{stabilityThreshold:c6},ignorePermissionErrors:!0}),S.on("add",()=>void d(!1)),S.on("change",()=>void d(!1)),S.on("unlink",()=>{if(!O)w=[],v.clear()}),F=setInterval(i,G9),F.unref?.()}return{start(){if(O=!1,K!==void 0){I(`[ScheduledTasks] scheduler start() — dir=${K}, hasTasks=${bZ(K)}`),o();return}if(I(`[ScheduledTasks] scheduler start() — enabled=${DZ()}, hasTasks=${bZ()}`),!DZ()&&(V||bZ()))J9(!0);if(DZ()){o();return}D=setInterval((C)=>{if(DZ())C()},G9,o),D.unref?.()},stop(){if(O=!0,D)clearInterval(D),D=null;if(F)clearInterval(F),F=null;if(y)clearInterval(y),y=null;if(S?.close(),S=null,$)$=!1,qZ(_)},getNextFireTime(){let C=1/0;for(let k of v.values())if(k<C)C=k;if(K===void 0){let k=X0();if(k&&k.fireAtMs<C)C=k.fireAtMs}return C===1/0?null:C}}}function U9(Q){let Z=Q.length>1,X=`The following one-shot scheduled task${Z?"s were":" was"} missed while Claude was not running. ${Z?"They have":"It has"} already been removed from .claudin/scheduled_tasks.json.
10
-
11
- Do NOT execute ${Z?"these prompts":"this prompt"} yet. First use the AskUserQuestion tool to ask whether to run ${Z?"each one":"it"} now. Only execute if the user confirms.`,V=Q.map((W)=>{let H=`[${L9(W.cron)}, created ${new Date(W.createdAt).toLocaleString()}]`,G=(W.prompt.match(/`+/g)??[]).reduce((B,z)=>Math.max(B,z.length),0),K="`".repeat(Math.max(3,G+1));return`${H}
12
- ${K}
13
- ${W.prompt}
14
- ${K}`});return`${X}
15
-
16
- ${V.join(`
17
-
18
- `)}`}var G9=1000,c6=300,m6=5000;var l6=OZ(()=>{BZ();UZ();u6();sY();K9();HZ();p6()});import{randomUUID as dZ}from"crypto";JZ();EZ();GQ();var JQ=q(()=>Y.unknown()),HQ=q(()=>Y.object({matcher:Y.string().optional(),hookCallbackIds:Y.array(Y.string()),timeout:Y.number().optional()}).describe("Configuration for matching and routing hook callbacks.")),NQ=q(()=>Y.object({subtype:Y.literal("initialize"),hooks:Y.record(u0(),Y.array(HQ())).optional(),sdkMcpServers:Y.array(Y.string()).optional(),jsonSchema:Y.record(Y.string(),Y.unknown()).optional(),systemPrompt:Y.string().optional(),appendSystemPrompt:Y.string().optional(),agents:Y.record(Y.string(),g0()).optional(),promptSuggestions:Y.boolean().optional(),agentProgressSummaries:Y.boolean().optional()}).describe("Initializes the SDK session with hooks, MCP servers, and agent configuration.")),EX=q(()=>Y.object({commands:Y.array(pZ()),agents:Y.array(cZ()),output_style:Y.string(),available_output_styles:Y.array(Y.string()),models:Y.array(c0()),account:m0(),pid:Y.number().optional().describe("@internal CLI process PID for tmux socket isolation"),fast_mode_state:i0().optional()}).describe("Response from session initialization with available commands, models, and account info.")),BQ=q(()=>Y.object({subtype:Y.literal("interrupt")}).describe("Interrupts the currently running conversation turn.")),LQ=q(()=>Y.object({subtype:Y.literal("can_use_tool"),tool_name:Y.string(),input:Y.record(Y.string(),Y.unknown()),permission_suggestions:Y.array(k0()).optional(),blocked_path:Y.string().optional(),decision_reason:Y.string().optional(),title:Y.string().optional(),display_name:Y.string().optional(),tool_use_id:Y.string(),agent_id:Y.string().optional(),description:Y.string().optional()}).describe("Requests permission to use a tool with the given input.")),zQ=q(()=>Y.object({subtype:Y.literal("set_permission_mode"),mode:x0(),ultraplan:Y.boolean().optional().describe("@internal CCR ultraplan session marker.")}).describe("Sets the permission mode for tool execution handling.")),qQ=q(()=>Y.object({subtype:Y.literal("set_model"),model:Y.string().optional()}).describe("Sets the model to use for subsequent conversation turns.")),DQ=q(()=>Y.object({subtype:Y.literal("set_max_thinking_tokens"),max_thinking_tokens:Y.number().nullable()}).describe("Sets the maximum number of thinking tokens for extended thinking.")),vQ=q(()=>Y.object({subtype:Y.literal("mcp_status")}).describe("Requests the current status of all MCP server connections.")),yX=q(()=>Y.object({mcpServers:Y.array(uZ())}).describe("Response containing the current status of all MCP server connections.")),AQ=q(()=>Y.object({subtype:Y.literal("get_context_usage")}).describe("Requests a breakdown of current context window usage by category.")),_Q=q(()=>Y.object({name:Y.string(),tokens:Y.number(),color:Y.string(),isDeferred:Y.boolean().optional()})),OQ=q(()=>Y.object({color:Y.string(),isFilled:Y.boolean(),categoryName:Y.string(),tokens:Y.number(),percentage:Y.number(),squareFullness:Y.number()})),$X=q(()=>Y.object({categories:Y.array(_Q()),totalTokens:Y.number(),maxTokens:Y.number(),rawMaxTokens:Y.number(),percentage:Y.number(),gridRows:Y.array(Y.array(OQ())),model:Y.string(),memoryFiles:Y.array(Y.object({path:Y.string(),type:Y.string(),tokens:Y.number()})),mcpTools:Y.array(Y.object({name:Y.string(),serverName:Y.string(),tokens:Y.number(),isLoaded:Y.boolean().optional()})),deferredBuiltinTools:Y.array(Y.object({name:Y.string(),tokens:Y.number(),isLoaded:Y.boolean()})).optional(),systemTools:Y.array(Y.object({name:Y.string(),tokens:Y.number()})).optional(),systemPromptSections:Y.array(Y.object({name:Y.string(),tokens:Y.number()})).optional(),agents:Y.array(Y.object({agentType:Y.string(),source:Y.string(),tokens:Y.number()})),slashCommands:Y.object({totalCommands:Y.number(),includedCommands:Y.number(),tokens:Y.number()}).optional(),skills:Y.object({totalSkills:Y.number(),includedSkills:Y.number(),tokens:Y.number(),skillFrontmatter:Y.array(Y.object({name:Y.string(),source:Y.string(),tokens:Y.number()}))}).optional(),autoCompactThreshold:Y.number().optional(),isAutoCompactEnabled:Y.boolean(),messageBreakdown:Y.object({toolCallTokens:Y.number(),toolResultTokens:Y.number(),attachmentTokens:Y.number(),assistantMessageTokens:Y.number(),userMessageTokens:Y.number(),toolCallsByType:Y.array(Y.object({name:Y.string(),callTokens:Y.number(),resultTokens:Y.number()})),attachmentsByType:Y.array(Y.object({name:Y.string(),tokens:Y.number()}))}).optional(),apiUsage:Y.object({input_tokens:Y.number(),output_tokens:Y.number(),cache_creation_input_tokens:Y.number(),cache_read_input_tokens:Y.number()}).nullable()}).describe("Breakdown of current context window usage by category (system prompt, tools, messages, etc.).")),UQ=q(()=>Y.object({subtype:Y.literal("rewind_files"),user_message_id:Y.string(),dry_run:Y.boolean().optional()}).describe("Rewinds file changes made since a specific user message.")),jX=q(()=>Y.object({canRewind:Y.boolean(),error:Y.string().optional(),filesChanged:Y.array(Y.string()).optional(),insertions:Y.number().optional(),deletions:Y.number().optional()}).describe("Result of a rewindFiles operation.")),wQ=q(()=>Y.object({subtype:Y.literal("cancel_async_message"),message_uuid:Y.string()}).describe("Drops a pending async user message from the command queue by uuid. No-op if already dequeued for execution.")),PX=q(()=>Y.object({cancelled:Y.boolean()}).describe("Result of a cancel_async_message operation. cancelled=false means the message was not in the queue (already dequeued or never enqueued).")),EQ=q(()=>Y.object({subtype:Y.literal("seed_read_state"),path:Y.string(),mtime:Y.number()}).describe("Seeds the readFileState cache with a path+mtime entry. Use when a prior Read was removed from context (e.g. by snip) so Edit validation would fail despite the client having observed the Read. The mtime lets the CLI detect if the file changed since the seeded Read — same staleness check as the normal path.")),yQ=q(()=>Y.object({subtype:Y.literal("hook_callback"),callback_id:Y.string(),input:p0(),tool_use_id:Y.string().optional()}).describe("Delivers a hook callback with its input data.")),$Q=q(()=>Y.object({subtype:Y.literal("mcp_message"),server_name:Y.string(),message:JQ()}).describe("Sends a JSON-RPC message to a specific MCP server.")),jQ=q(()=>Y.object({subtype:Y.literal("mcp_set_servers"),servers:Y.record(Y.string(),h0())}).describe("Replaces the set of dynamically managed MCP servers.")),FX=q(()=>Y.object({added:Y.array(Y.string()),removed:Y.array(Y.string()),errors:Y.record(Y.string(),Y.string())}).describe("Result of replacing the set of dynamically managed MCP servers.")),PQ=q(()=>Y.object({subtype:Y.literal("reload_plugins")}).describe("Reloads plugins from disk and returns the refreshed session components.")),MX=q(()=>Y.object({commands:Y.array(pZ()),agents:Y.array(cZ()),plugins:Y.array(Y.object({name:Y.string(),path:Y.string(),source:Y.string().optional()})),mcpServers:Y.array(uZ()),error_count:Y.number()}).describe("Refreshed commands, agents, plugins, and MCP server status after reload.")),FQ=q(()=>Y.object({subtype:Y.literal("mcp_reconnect"),serverName:Y.string()}).describe("Reconnects a disconnected or failed MCP server.")),MQ=q(()=>Y.object({subtype:Y.literal("mcp_toggle"),serverName:Y.string(),enabled:Y.boolean()}).describe("Enables or disables an MCP server.")),bQ=q(()=>Y.object({subtype:Y.literal("stop_task"),task_id:Y.string()}).describe("Stops a running task.")),IQ=q(()=>Y.object({subtype:Y.literal("apply_flag_settings"),settings:Y.record(Y.string(),Y.unknown())}).describe("Merges the provided settings into the flag settings layer, updating the active configuration.")),CQ=q(()=>Y.object({subtype:Y.literal("get_settings")}).describe("Returns the effective merged settings and the raw per-source settings.")),bX=q(()=>Y.object({effective:Y.record(Y.string(),Y.unknown()),sources:Y.array(Y.object({source:Y.enum(["userSettings","projectSettings","localSettings","flagSettings","policySettings"]),settings:Y.record(Y.string(),Y.unknown())})).describe("Ordered low-to-high priority — later entries override earlier ones."),applied:Y.object({model:Y.string(),effort:Y.enum(["low","medium","high","max"]).nullable()}).optional().describe("Runtime-resolved values after env overrides, session state, and model-specific defaults are applied. Unlike `effective` (disk merge), these reflect what will actually be sent to the API.")}).describe("Effective merged settings plus raw per-source settings in merge order.")),TQ=q(()=>Y.object({subtype:Y.literal("elicitation"),mcp_server_name:Y.string(),message:Y.string(),mode:Y.enum(["form","url"]).optional(),url:Y.string().optional(),elicitation_id:Y.string().optional(),requested_schema:Y.record(Y.string(),Y.unknown()).optional()}).describe("Requests the SDK consumer to handle an MCP elicitation (user input request).")),o0=q(()=>Y.object({action:Y.enum(["accept","decline","cancel"]),content:Y.record(Y.string(),Y.unknown()).optional()}).describe("Response from the SDK consumer for an elicitation request.")),RQ=q(()=>Y.union([BQ(),LQ(),NQ(),zQ(),qQ(),DQ(),vQ(),AQ(),yQ(),$Q(),UQ(),wQ(),EQ(),jQ(),PQ(),FQ(),MQ(),bQ(),IQ(),CQ(),TQ()])),mZ=q(()=>Y.object({type:Y.literal("control_request"),request_id:Y.string(),request:RQ()})),fQ=q(()=>Y.object({subtype:Y.literal("success"),request_id:Y.string(),response:Y.record(Y.string(),Y.unknown()).optional()})),SQ=q(()=>Y.object({subtype:Y.literal("error"),request_id:Y.string(),error:Y.string(),pending_permission_requests:Y.array(Y.lazy(()=>mZ())).optional()})),s0=q(()=>Y.object({type:Y.literal("control_response"),response:Y.union([fQ(),SQ()])})),hQ=q(()=>Y.object({type:Y.literal("control_cancel_request"),request_id:Y.string()}).describe("Cancels a currently open control request.")),t0=q(()=>Y.object({type:Y.literal("keep_alive")}).describe("Keep-alive message to maintain WebSocket connection.")),kQ=q(()=>Y.object({type:Y.literal("update_environment_variables"),variables:Y.record(Y.string(),Y.string())}).describe("Updates environment variables at runtime.")),IX=q(()=>Y.union([r0(),l0(),a0(),n0(),s0(),mZ(),hQ(),t0()])),CX=q(()=>Y.union([d0(),mZ(),s0(),t0(),kQ()]));lQ();HZ();dQ();lZ();JZ();HZ();EZ();e0();xQ();var xX=q(()=>h.object({tool_name:h.string().describe("The name of the tool requesting permission"),input:h.record(h.string(),h.unknown()).describe("The input for the tool"),tool_use_id:h.string().optional().describe("The unique tool use request ID")})),YY=q(()=>h.enum(["user_temporary","user_permanent","user_reject"]).optional().catch(void 0)),uQ=q(()=>h.object({behavior:h.literal("allow"),updatedInput:h.record(h.string(),h.unknown()),updatedPermissions:h.array(ZY()).optional().catch((Q)=>{I(`Malformed updatedPermissions from SDK host ignored: ${Q.error.issues[0]?.message??"unknown"}`,{level:"warn"});return}),toolUseID:h.string().optional(),decisionClassification:YY()})),pQ=q(()=>h.object({behavior:h.literal("deny"),message:h.string(),interrupt:h.boolean().optional(),toolUseID:h.string().optional(),decisionClassification:YY()})),gZ=q(()=>h.union([uQ(),pQ()]));function jZ(Q,Z,X,V){let W={type:"permissionPromptTool",permissionPromptToolName:Z.name,toolResult:Q};if(Q.behavior==="allow"){let H=Q.updatedPermissions;if(H)V.setAppState((K)=>({...K,toolPermissionContext:yZ(K.toolPermissionContext,H)})),$Z(H);let G=Object.keys(Q.updatedInput).length>0?Q.updatedInput:X;return{...Q,updatedInput:G,decisionReason:W}}else if(Q.behavior==="deny"&&Q.interrupt)I(`SDK permission prompt deny+interrupt: tool=${Z.name} message=${Q.message}`),V.abortController.abort();return{...Q,decisionReason:W}}rQ();gQ();PZ();JZ();aQ();qY();e0();iQ();PZ();nQ();PZ();var cQ=/\u2028|\u2029/g;function mQ(Q){return Q.replace(cQ,(Z)=>Z==="\u2028"?"\\u2028":"\\u2029")}function QY(Q){return mQ(ZZ(Q))}var oQ="SandboxNetworkAccess";function sQ(Q){if(!Q)return;if(Q.type==="classifier")return Q.reason;switch(Q.type){case"rule":case"mode":case"subcommandResults":case"permissionPromptTool":return;case"hook":case"asyncAgent":case"sandboxOverride":case"workingDir":case"safetyCheck":case"other":return Q.reason}}function tQ(Q,Z,X,V){let W;try{W=Q.getActivityDescription?.(Z)??Q.getToolUseSummary?.(Z)??Q.userFacingName(Z)}catch{W=Q.name}return{tool_name:Q.name,action_description:W,tool_use_id:X,request_id:V,input:Z}}var eQ=1000;class Z6{input;replayUserMessages;structuredInput;pendingRequests=new Map;restoredWorkerState=Promise.resolve(null);inputClosed=!1;unexpectedResponseCallback;resolvedToolUseIds=new Set;prependedLines=[];onControlRequestSent;onControlRequestResolved;outbound=new NY;constructor(Q,Z){this.input=Q;this.replayUserMessages=Z;this.input=Q,this.structuredInput=this.read()}trackResolvedToolUseId(Q){if(Q.request.subtype==="can_use_tool"){if(this.resolvedToolUseIds.add(Q.request.tool_use_id),this.resolvedToolUseIds.size>eQ){let Z=this.resolvedToolUseIds.values().next().value;if(Z!==void 0)this.resolvedToolUseIds.delete(Z)}}}flushInternalEvents(){return Promise.resolve()}get internalEventsPending(){return 0}prependUserMessage(Q){this.prependedLines.push(ZZ({type:"user",session_id:"",message:{role:"user",content:Q},parent_tool_use_id:null})+`
19
- `)}async*read(){let Q="",Z=async function*(){for(;;){if(this.prependedLines.length>0)Q=this.prependedLines.join("")+Q,this.prependedLines=[];let X=Q.indexOf(`
20
- `);if(X===-1)break;let V=Q.slice(0,X);Q=Q.slice(X+1);let W=await this.processLine(V);if(W)GY("info","cli_stdin_message_parsed",{type:W.type}),yield W}}.bind(this);yield*Z();for await(let X of this.input)Q+=X,yield*Z();if(Q){let X=await this.processLine(Q);if(X)yield X}this.inputClosed=!0;for(let X of this.pendingRequests.values())X.reject(Error("Tool permission stream closed before response received"))}getPendingPermissionRequests(){return Array.from(this.pendingRequests.values()).map((Q)=>Q.request).filter((Q)=>Q.request.subtype==="can_use_tool")}setUnexpectedResponseCallback(Q){this.unexpectedResponseCallback=Q}injectControlResponse(Q){let Z=Q.response?.request_id;if(!Z)return;let X=this.pendingRequests.get(Z);if(!X)return;if(this.trackResolvedToolUseId(X.request),this.pendingRequests.delete(Z),this.write({type:"control_cancel_request",request_id:Z}),Q.response.subtype==="error")X.reject(Error(Q.response.error));else{let V=Q.response.response;if(X.schema)try{X.resolve(X.schema.parse(V))}catch(W){X.reject(W)}else X.resolve({})}}setOnControlRequestSent(Q){this.onControlRequestSent=Q}setOnControlRequestResolved(Q){this.onControlRequestResolved=Q}async processLine(Q){if(!Q)return;try{let Z=DY(WY(Q));if(Z.type==="keep_alive")return;if(Z.type==="update_environment_variables"){let X=Object.keys(Z.variables);for(let[V,W]of Object.entries(Z.variables))process.env[V]=W;I(`[structuredIO] applied update_environment_variables: ${X.join(", ")}`);return}if(Z.type==="control_response"){let X="uuid"in Z&&typeof Z.uuid==="string"?Z.uuid:void 0;if(X)HY(X,"completed");let V=this.pendingRequests.get(Z.response.request_id);if(!V){let G=(Z.response.subtype==="success"?Z.response.response:void 0)?.toolUseID;if(typeof G==="string"&&this.resolvedToolUseIds.has(G)){I(`Ignoring duplicate control_response for already-resolved toolUseID=${G} request_id=${Z.response.request_id}`);return}if(this.unexpectedResponseCallback)await this.unexpectedResponseCallback(Z);return}if(this.trackResolvedToolUseId(V.request),this.pendingRequests.delete(Z.response.request_id),V.request.request.subtype==="can_use_tool"&&this.onControlRequestResolved)this.onControlRequestResolved(Z.response.request_id);if(Z.response.subtype==="error"){V.reject(Error(Z.response.error));return}let W=Z.response.response;if(V.schema)try{V.resolve(V.schema.parse(W))}catch(H){V.reject(H)}else V.resolve({});if(this.replayUserMessages)return Z;return}if(Z.type!=="user"&&Z.type!=="control_request"&&Z.type!=="assistant"&&Z.type!=="system"){I(`Ignoring unknown message type: ${Z.type}`,{level:"warn"});return}if(Z.type==="control_request"){if(!Z.request)XY("Error: Missing request on control_request");return Z}if(Z.type==="assistant"||Z.type==="system")return Z;if(Z.message.role!=="user")XY(`Error: Expected message role 'user', got '${Z.message.role}'`);return Z}catch(Z){console.error(`Error parsing streaming input line: ${Q}: ${Z}`),process.exit(1)}}async write(Q){KY(QY(Q)+`
21
- `)}async sendRequest(Q,Z,X,V=dZ()){let W={type:"control_request",request_id:V,request:Q};if(this.inputClosed)throw Error("Stream closed");if(X?.aborted)throw Error("Request aborted");if(this.outbound.enqueue(W),Q.subtype==="can_use_tool"&&this.onControlRequestSent)this.onControlRequestSent(W);let H=()=>{this.outbound.enqueue({type:"control_cancel_request",request_id:V});let G=this.pendingRequests.get(V);if(G)this.trackResolvedToolUseId(G.request),G.reject(new VY)};if(X)X.addEventListener("abort",H,{once:!0});try{return await new Promise((G,K)=>{this.pendingRequests.set(V,{request:{type:"control_request",request_id:V,request:Q},resolve:(B)=>{G(B)},reject:K,schema:Z})})}finally{if(X)X.removeEventListener("abort",H);this.pendingRequests.delete(V)}}createCanUseTool(Q){return async(Z,X,V,W,H,G)=>{let K=G??await BY(Z,X,V,W,H);if(K.behavior==="allow"||K.behavior==="deny")return K;let B=new AbortController,z=V.abortController.signal,J=()=>B.abort();z.addEventListener("abort",J,{once:!0});try{let L=Y6(Z.name,H,X,V,K.suggestions).then((P)=>({source:"hook",decision:P})),_=dZ();Q?.(tQ(Z,X,H,_));let w=this.sendRequest({subtype:"can_use_tool",tool_name:Z.name,input:X,permission_suggestions:K.suggestions,blocked_path:K.blockedPath,decision_reason:sQ(K.decisionReason),tool_use_id:H,agent_id:V.agentId},gZ(),B.signal,_).then((P)=>({source:"sdk",result:P})),v=await Promise.race([L,w]);if(v.source==="hook"){if(v.decision)return w.catch(()=>{}),B.abort(),v.decision;let P=await w;return jZ(P.result,Z,X,V)}return jZ(v.result,Z,X,V)}catch(L){return jZ({behavior:"deny",message:`Tool permission request failed: ${L}`,toolUseID:H},Z,X,V)}finally{if(this.getPendingPermissionRequests().length===0)LY("running");z.removeEventListener("abort",J)}}}createHookCallback(Q,Z){return{type:"callback",timeout:Z,callback:async(X,V,W)=>{try{return await this.sendRequest({subtype:"hook_callback",callback_id:Q,input:X,tool_use_id:V||void 0},JY(),W)}catch(H){return console.error(`Error in hook callback ${Q}:`,H),{}}}}}async handleElicitation(Q,Z,X,V,W,H,G){try{return await this.sendRequest({subtype:"elicitation",mcp_server_name:Q,message:Z,mode:W,url:H,elicitation_id:G,requested_schema:X},o0(),V)}catch{return{action:"cancel"}}}createSandboxAskCallback(){return async(Q)=>{try{return(await this.sendRequest({subtype:"can_use_tool",tool_name:oQ,input:{host:Q.host},tool_use_id:dZ(),description:`Allow network connection to ${Q.host}?`},gZ())).behavior==="allow"}catch{return!1}}}async sendMcpMessage(Q,Z){return(await this.sendRequest({subtype:"mcp_message",server_name:Q,message:Z},Y.object({mcp_response:Y.any()}))).mcp_response}}function XY(Q){console.error(Q),process.exit(1)}async function Y6(Q,Z,X,V,W){let G=V.getAppState().toolPermissionContext.mode,K=zY(Q,Z,X,V,G,W,V.abortController.signal);for await(let B of K)if(B.permissionRequestResult&&(B.permissionRequestResult.behavior==="allow"||B.permissionRequestResult.behavior==="deny")){let z=B.permissionRequestResult;if(z.behavior==="allow"){let J=z.updatedInput||X,L=z.updatedPermissions??[];if(L.length>0){$Z(L);let _=V.getAppState(),w=yZ(_.toolPermissionContext,L);V.setAppState((v)=>{if(v.toolPermissionContext===w)return v;return{...v,toolPermissionContext:w}})}return{behavior:"allow",updatedInput:J,userModified:!1,decisionReason:{type:"hook",hookName:"PermissionRequest"}}}else return{behavior:"deny",message:z.message||"Permission denied by PermissionRequest hook",decisionReason:{type:"hook",hookName:"PermissionRequest"}}}return}_Y();function HV(Q){if(Q.type!=="user")return;let Z=Q.message?.content;if(!Z)return;if(Array.isArray(Z)&&Z.length===0)return;let X="uuid"in Q&&typeof Q.uuid==="string"?Q.uuid:void 0;return{content:Array.isArray(Z)?Q6(Z):Z,uuid:X}}function Q6(Q){if(!Q.some(vY))return Q;return Q.map((Z)=>{if(!vY(Z))return Z;let X=Z.source,V=typeof X.mediaType==="string"&&X.mediaType?X.mediaType:AY(Z.source.data);return{...Z,source:{type:"base64",media_type:V,data:Z.source.data}}})}function vY(Q){if(Q.type!=="image"||Q.source?.type!=="base64")return!1;return!Q.source.media_type}BZ();J6();V6();G6();X6();K6();W6();import{randomUUID as H6}from"crypto";function N6(Q){return Q===wY?EY:Q}function OV(Q){let X=yY()?.outputStyle??PY,V={type:"system",subtype:"init",cwd:UY(),session_id:NZ(),tools:Q.tools.map((W)=>N6(W.name)),mcp_servers:Q.mcpClients.map((W)=>({name:W.name,status:W.type})),model:Q.model,permissionMode:Q.permissionMode,slash_commands:Q.commands.filter((W)=>W.userInvocable!==!1).map((W)=>W.name),apiKeySource:jY().source,betas:OY(),claude_code_version:"99.0.0",output_style:X,agents:Q.agents.map((W)=>W.agentType),skills:Q.skills.filter((W)=>W.userInvocable!==!1).map((W)=>W.name),plugins:Q.plugins.map((W)=>({name:W.name,path:W.path,source:W.source})),uuid:H6()};return V.fast_mode_state=$Y(Q.model,Q.fastMode),V}var FY={"`":"`",'"':'"',"<":">","{":"}","[":"]","(":")","'":"'"};function B6(Q,Z){if(!new RegExp(Z,"i").test(Q))return[];if(Q.startsWith("/"))return[];let V=[],W=null,H=0,G=(J)=>!!J&&/[\p{L}\p{N}_]/u.test(J);for(let J=0;J<Q.length;J++){let L=Q[J];if(W){if(W==="["&&L==="["){H=J;continue}if(L!==FY[W])continue;if(W==="'"&&G(Q[J+1]))continue;V.push({start:H,end:J+1}),W=null}else if(L==="<"&&J+1<Q.length&&/[a-zA-Z/]/.test(Q[J+1])||L==="'"&&!G(Q[J-1])||L!=="<"&&L!=="'"&&L in FY)W=L,H=J}let K=[],B=new RegExp(`\\b${Z}\\b`,"gi"),z=Q.matchAll(B);for(let J of z){if(J.index===void 0)continue;let L=J.index,_=L+J[0].length;if(V.some((P)=>L>=P.start&&L<P.end))continue;let w=Q[L-1],v=Q[_];if(w==="/"||w==="\\"||w==="-")continue;if(v==="/"||v==="\\"||v==="-"||v==="?")continue;if(v==="."&&G(Q[_+1]))continue;K.push({word:J[0],start:L,end:_})}return K}function wV(Q){return B6(Q,"ultrareview")}UZ();wZ();w6();_6();O6();v6();qY();_Y();D6();wZ();U6();A6();import{randomUUID as E6}from"crypto";BZ();UZ();wZ();L6();z6();import{randomUUID as q6}from"crypto";function MY(Q){let Z=Q.toLowerCase();return/\b(wtf|wth|ffs|omfg|shit(ty|tiest)?|dumbass|horrible|awful|piss(ed|ing)? off|piece of (shit|crap|junk)|what the (fuck|hell)|fucking? (broken|useless|terrible|awful|horrible)|fuck you|screw (this|you)|so frustrating|this sucks|damn it)\b/.test(Z)}function bY(Q){let Z=Q.toLowerCase().trim();if(Z==="continue")return!0;return/\b(keep going|go on)\b/.test(Z)}function fY(Q,Z,X,V,W,H,G){let K=q6();IY(K);let B=typeof Q==="string"?Q:Q.find((w)=>w.type==="text")?.text||"";RY(B);let z=typeof Q==="string"?Q:Q.findLast((w)=>w.type==="text")?.text||"";if(z)TY("user_prompt",{prompt_length:String(z.length),prompt:CY(z),"prompt.id":K});let J=MY(B),L=bY(B);if(g("tengu_input_prompt",{is_negative:J,is_keep_going:L}),Z.length>0){let w=typeof Q==="string"?Q.trim()?[{type:"text",text:Q}]:[]:Q;return{messages:[s({content:[...w,...Z],uuid:W,imagePasteIds:X.length>0?X:void 0,permissionMode:H,isMeta:G||void 0}),...V],shouldQuery:!0}}return{messages:[s({content:Q,uuid:W,permissionMode:H,isMeta:G||void 0}),...V],shouldQuery:!0}}async function iV({input:Q,preExpansionInput:Z,mode:X,setToolJSX:V,context:W,pastedContents:H,ideSelection:G,messages:K,setUserInputOnProcessing:B,uuid:z,isAlreadyProcessing:J,querySource:L,canUseTool:_,skipSlashCommands:w,bridgeOrigin:v,isMeta:P,skipAttachments:f}){let D=typeof Q==="string"?Q:null;if(X==="prompt"&&D!==null&&!P)B?.(D);n("query_process_user_input_base_start");let F=W.getAppState(),y=await y6(Q,X,V,W,H,G,K,z,J,L,_,F.toolPermissionContext.mode,w,v,P,f,Z);if(n("query_process_user_input_base_end"),!y.shouldQuery)return y;n("query_hooks_start");let S=hY(Q)||"";for await(let O of iY(S,F.toolPermissionContext.mode,W,W.requestPrompt)){if(O.message?.type==="progress")continue;if(O.blockingError){let $=rY(O.blockingError);return{messages:[aY(`${$}
22
-
23
- Original prompt: ${Q}`,"warning")],shouldQuery:!1,allowedTools:y.allowedTools}}if(O.preventContinuation){let $=O.stopReason?`Operation stopped by hook: ${O.stopReason}`:"Operation stopped by hook";return y.messages.push(s({content:$})),y.shouldQuery=!1,y}if(O.additionalContexts&&O.additionalContexts.length>0)y.messages.push(kY({type:"hook_additional_context",content:O.additionalContexts.map(SY),hookName:"UserPromptSubmit",toolUseID:`hook-${E6()}`,hookEvent:"UserPromptSubmit"}));if(O.message)switch(O.message.attachment.type){case"hook_success":if(!O.message.attachment.content)break;y.messages.push({...O.message,attachment:{...O.message.attachment,content:SY(O.message.attachment.content)}});break;default:y.messages.push(O.message);break}}return n("query_hooks_end"),y}var aZ=1e4;function SY(Q){if(Q.length>aZ)return`${Q.substring(0,aZ)}… [output truncated - exceeded ${aZ} characters]`;return Q}async function y6(Q,Z,X,V,W,H,G,K,B,z,J,L,_,w,v,P,f){let D=null,F=[],y=[],S=Q;if(typeof Q==="string")D=Q;else if(Q.length>0){n("query_image_processing_start");let A=[];for(let N of Q)if(N.type==="image"){let u=await iZ(N);if(u.dimensions){let l=FZ(u.dimensions);if(l)y.push(l)}A.push(u.block)}else A.push(N);S=A,n("query_image_processing_end");let j=A[A.length-1];if(j?.type==="text")D=j.text,F=A.slice(0,-1);else F=A}if(D===null&&Z!=="prompt")throw Error(`Mode: ${Z} requires a string input.`);let O=W?Object.values(W).filter(cY):[],$=O.map((A)=>A.id),d=W?await xY(W):new Map;n("query_pasted_image_processing_start");let i=await Promise.all(O.map(async(A)=>{let j={type:"image",source:{type:"base64",media_type:A.mediaType||"image/png",data:A.content}};return g("tengu_pasted_image_resize_attempt",{original_size_bytes:A.content.length}),{resized:await iZ(j),originalDimensions:A.dimensions,sourcePath:A.sourcePath??d.get(A.id)}})),o=[];for(let{resized:A,originalDimensions:j,sourcePath:N}of i){if(A.dimensions){let u=FZ(A.dimensions,N);if(u)y.push(u)}else if(j){let u=FZ(j,N);if(u)y.push(u)}else if(N)y.push(`[Image source: ${N}]`);o.push(A.block)}n("query_pasted_image_processing_end");let C=_;if(w&&D!==null&&D.startsWith("/")){let A=pY(D),j=A?lY(A.commandName,V.options.commands):void 0;if(j)if(dY(j))C=!1;else{let N=`/${gY(j)} isn't available over Remote Control.`;return{messages:[s({content:D,uuid:K}),nY(`<local-command-stdout>${N}</local-command-stdout>`)],shouldQuery:!1,resultText:N}}}let k=!P&&D!==null&&(Z!=="prompt"||C||!D.startsWith("/"));n("query_attachment_loading_start");let x=k?await uY(mY(D,V,H??null,[],G,z)):[];if(n("query_attachment_loading_end"),D!==null&&Z==="bash"){let{processBashCommand:A}=await import("./processBashCommand-0.6.8-xtx2v6da.mjs");return nZ(await A(D,F,x,V,X),y)}if(D!==null&&!C&&D.startsWith("/")){let{processSlashCommand:A}=await import("./processSlashCommand-0.6.8-xgvzddwk.mjs"),j=await A(D,F,o,x,V,X,K,B,J);return nZ(j,y)}if(D!==null&&Z==="prompt"){let A=D.trim(),j=x.find((N)=>N.attachment.type==="agent_mention");if(j){let N=`@agent-${j.attachment.agentType}`,u=A===N,l=A.startsWith(N)&&!u;g("tengu_subagent_at_mention",{is_subagent_only:u,is_prefix:l})}}return nZ(fY(S,o,$,x,K,L,v),y)}function nZ(Q,Z){if(Z.length>0)Q.messages.push(s({content:Z.map((X)=>({type:"text",text:X})),isMeta:!0}));return Q}i6();BZ();HZ();lZ();n6();a6();w0();o6();r6();import{isAbsolute as s6,resolve as t6}from"path";function e6(Q,Z,X){let V=[],W=[],H=[];for(let[G,K]of Object.entries(Q)){let B=Z[G],z=b9(K.source,X?.projectRoot);if(!B)V.push(G);else if(K.sourceIsFallback)H.push(G);else if(!j9(z,B.source))W.push({name:G,declaredSource:z,materializedSource:B.source});else H.push(G)}return{missing:V,sourceChanged:W,upToDate:H}}async function IW(Q){let Z=P9();if(Object.keys(Z).length===0)return{installed:[],updated:[],failed:[],upToDate:[],skipped:[]};let X;try{X=await F9()}catch(J){e(J),X={}}let V=e6(Z,X,{projectRoot:W0()}),W=[...V.missing.map((J)=>({name:J,source:b9(Z[J].source),action:"install"})),...V.sourceChanged.map(({name:J,declaredSource:L})=>({name:J,source:L,action:"update"}))],H=[],G=[];for(let J of W){if(Q?.skip?.(J.name,J.source)){H.push(J.name);continue}if(J.action==="update"&&$9(J.source)&&!await y9(J.source.path)){I(`[reconcile] '${J.name}' declared path does not exist; keeping materialized entry`),H.push(J.name);continue}G.push(J)}if(G.length===0)return{installed:[],updated:[],failed:[],upToDate:V.upToDate,skipped:H};I(`[reconcile] ${G.length} marketplace(s): ${G.map((J)=>`${J.name}(${J.action})`).join(", ")}`);let K=[],B=[],z=[];for(let J=0;J<G.length;J++){let{name:L,source:_,action:w}=G[J];Q?.onProgress?.({type:"installing",name:L,action:w,index:J+1,total:G.length});try{let v=await M9(_);if(w==="install")K.push(L);else B.push(L);Q?.onProgress?.({type:"installed",name:L,alreadyMaterialized:v.alreadyMaterialized})}catch(v){let P=w9(v);z.push({name:L,error:P}),Q?.onProgress?.({type:"failed",name:L,error:P}),e(v)}}return{installed:K,updated:B,failed:z,upToDate:V.upToDate,skipped:H}}function b9(Q,Z){if((Q.source==="directory"||Q.source==="file")&&!s6(Q.path)){let X=Z??W0(),V=E9(X);return{...Q,path:t6(V??X,Q.path)}}return Q}
24
- export{HV as Z,N6 as _,OV as $,e9 as aa,S0 as ba,VQ as ca,WQ as da,KQ as ea,wV as fa,iV as ga,gZ as ha,jZ as ia,QY as ja,oQ as ka,Z6 as la,e6 as ma,IW as na,M6 as oa,b6 as pa,I6 as qa,g6 as ra,d6 as sa,l6 as ta};