@claudiolabs/claudin 0.6.4 → 0.6.6

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 (875) hide show
  1. package/dist/chunks/AgentTool-0.6.6-bdcafcej.mjs +1 -0
  2. package/dist/chunks/App-0.6.6-k5gj5n4h.mjs +1 -0
  3. package/dist/chunks/ApproveApiKey-0.6.6-7fdtwksv.mjs +1 -0
  4. package/dist/chunks/AssistantSessionChooser-0.6.6-2j0e7ev9.mjs +1 -0
  5. package/dist/chunks/AutoModeOptInDialog-0.6.6-6yx84pzc.mjs +1 -0
  6. package/dist/chunks/BypassPermissionsModeDialog-0.6.6-vjc7apke.mjs +1 -0
  7. package/dist/chunks/ClaudeMdExternalIncludesDialog-0.6.6-td62cgn4.mjs +1 -0
  8. package/dist/chunks/ConsoleOAuthFlow-0.6.6-5aqhvkcg.mjs +1 -0
  9. package/dist/chunks/DiffDialog-0.6.6-d2jxy48y.mjs +11 -0
  10. package/dist/chunks/Doctor-0.6.6-me4wn4j5.mjs +1 -0
  11. package/dist/chunks/Grove-0.6.6-xfwy6rbw.mjs +1 -0
  12. package/dist/chunks/ITermBackend-0.6.6-qthf2vr3.mjs +1 -0
  13. package/dist/chunks/InvalidConfigDialog-0.6.6-mp5b6a5j.mjs +1 -0
  14. package/dist/chunks/InvalidSettingsDialog-0.6.6-awc54gyk.mjs +1 -0
  15. package/dist/chunks/MigrationDialog-0.6.6-4qg3bf91.mjs +1 -0
  16. package/dist/chunks/Onboarding-0.6.6-fewq1c0b.mjs +1 -0
  17. package/dist/chunks/ProviderManager-0.6.6-cx15mb4s.mjs +1 -0
  18. package/dist/chunks/REPL-0.6.6-ev64pese.mjs +1 -0
  19. package/dist/chunks/ResumeConversation-0.6.6-gkxw58n4.mjs +1 -0
  20. package/dist/chunks/SnapshotUpdateDialog-0.6.6-45f8nb47.mjs +1 -0
  21. package/dist/chunks/TeleportProgress-0.6.6-5314g8tw.mjs +1 -0
  22. package/dist/chunks/TeleportRepoMismatchDialog-0.6.6-w4svp0jn.mjs +1 -0
  23. package/dist/chunks/TeleportResumeWrapper-0.6.6-5vjtrnya.mjs +1 -0
  24. package/dist/chunks/TmuxBackend-0.6.6-rphhdvq8.mjs +9 -0
  25. package/dist/chunks/ToolSearchTool-0.6.6-s2f271df.mjs +1 -0
  26. package/dist/chunks/TrustDialog-0.6.6-s74swp6v.mjs +1 -0
  27. package/dist/chunks/activeProvider-0.6.6-r3wwyv1a.mjs +1 -0
  28. package/dist/chunks/add-dir-0.6.6-nm6s9jm3.mjs +1 -0
  29. package/dist/chunks/agents-0.6.6-yfx529qm.mjs +3 -0
  30. package/dist/chunks/agents-0.6.6-z45zpb7a.mjs +110 -0
  31. package/dist/chunks/api-0.6.6-rrs0y38h.mjs +1 -0
  32. package/dist/chunks/asciicast-0.6.6-qrz006k9.mjs +1 -0
  33. package/dist/chunks/assistant-0.6.6-tfmwrg23.mjs +1 -0
  34. package/dist/chunks/auth-0.6.6-61djjn63.mjs +1 -0
  35. package/dist/chunks/auth-0.6.6-8pgs8nej.mjs +1 -0
  36. package/dist/chunks/autoMode-0.6.6-d0vbqpdq.mjs +48 -0
  37. package/dist/chunks/autoUpdater-0.6.6-xacp5fck.mjs +1 -0
  38. package/dist/chunks/backgroundHousekeeping-0.6.6-dnhts5fj.mjs +1 -0
  39. package/dist/chunks/branch-0.6.6-84wkac2e.mjs +4 -0
  40. package/dist/chunks/bridge-0.6.6-p3dy64f9.mjs +2 -0
  41. package/dist/chunks/bridgeConfig-0.6.6-fvzjs1pa.mjs +1 -0
  42. package/dist/chunks/bridgeEnabled-0.6.6-ge15dg1p.mjs +1 -0
  43. package/dist/chunks/bridgeMain-0.6.6-w0xmef6b.mjs +88 -0
  44. package/dist/chunks/bridgePointer-0.6.6-cba0ahq2.mjs +1 -0
  45. package/dist/chunks/btw-0.6.6-46grbbjr.mjs +1 -0
  46. package/dist/chunks/buddy-0.6.6-90qdgfw4.mjs +3 -0
  47. package/dist/chunks/cacache-0.6.6-v19w3dxf.mjs +1 -0
  48. package/dist/chunks/cache-probe-0.6.6-k4ev06pn.mjs +21 -0
  49. package/dist/chunks/cacheStats-0.6.6-dehpnmz9.mjs +4 -0
  50. package/dist/chunks/caches-0.6.6-4a0mnm1h.mjs +1 -0
  51. package/dist/chunks/claudeDesktop-0.6.6-fhspw8yv.mjs +1 -0
  52. package/dist/chunks/claudemd-0.6.6-s2nktt1h.mjs +1 -0
  53. package/dist/chunks/clear-0.6.6-e06ssw4n.mjs +1 -0
  54. package/dist/chunks/clearTerminal-0.6.6-062bve0j.mjs +1 -0
  55. package/dist/chunks/cli-0.6.6-0ak8r49x.mjs +2 -0
  56. package/dist/chunks/cli-0.6.6-0j61q3w5.mjs +2 -0
  57. package/dist/chunks/cli-0.6.6-0pptmkkg.mjs +4 -0
  58. package/dist/chunks/cli-0.6.6-0w254y38.mjs +2 -0
  59. package/dist/chunks/cli-0.6.6-10re6ept.mjs +2 -0
  60. package/dist/chunks/cli-0.6.6-141tbvn2.mjs +2 -0
  61. package/dist/chunks/cli-0.6.6-1a0fnhh0.mjs +2 -0
  62. package/dist/chunks/cli-0.6.6-1dy4fd01.mjs +2 -0
  63. package/dist/chunks/cli-0.6.6-1jt6s6c8.mjs +2 -0
  64. package/dist/chunks/cli-0.6.6-23snct9d.mjs +5348 -0
  65. package/dist/chunks/cli-0.6.6-27tkk39p.mjs +2 -0
  66. package/dist/chunks/cli-0.6.6-2dtp6rc2.mjs +2 -0
  67. package/dist/chunks/cli-0.6.6-2fasp96a.mjs +2 -0
  68. package/dist/chunks/cli-0.6.6-2gjay42h.mjs +2 -0
  69. package/dist/chunks/cli-0.6.6-2mf6j1pf.mjs +4 -0
  70. package/dist/chunks/cli-0.6.6-36kc5vh1.mjs +3 -0
  71. package/dist/chunks/cli-0.6.6-37wcg59v.mjs +2 -0
  72. package/dist/chunks/cli-0.6.6-3agn70fr.mjs +50 -0
  73. package/dist/chunks/cli-0.6.6-3qbz76xq.mjs +2 -0
  74. package/dist/chunks/cli-0.6.6-3s3k6nsb.mjs +2 -0
  75. package/dist/chunks/cli-0.6.6-3t45jvj0.mjs +2 -0
  76. package/dist/chunks/cli-0.6.6-3t9gkjhn.mjs +8 -0
  77. package/dist/chunks/cli-0.6.6-3ykkcpjf.mjs +2 -0
  78. package/dist/chunks/cli-0.6.6-40n0q9g3.mjs +2 -0
  79. package/dist/chunks/cli-0.6.6-44bk8ev1.mjs +2 -0
  80. package/dist/chunks/cli-0.6.6-4d55s633.mjs +3 -0
  81. package/dist/chunks/cli-0.6.6-4jrf033h.mjs +12 -0
  82. package/dist/chunks/cli-0.6.6-4m7r4esm.mjs +4 -0
  83. package/dist/chunks/cli-0.6.6-4nxq7s1k.mjs +2 -0
  84. package/dist/chunks/cli-0.6.6-4qj9brbk.mjs +2 -0
  85. package/dist/chunks/cli-0.6.6-4qrnzmjb.mjs +2 -0
  86. package/dist/chunks/cli-0.6.6-4r50eqxg.mjs +2 -0
  87. package/dist/chunks/cli-0.6.6-4tp2yb2x.mjs +2 -0
  88. package/dist/chunks/cli-0.6.6-4tzkbyes.mjs +2 -0
  89. package/dist/chunks/cli-0.6.6-504vvx3q.mjs +2 -0
  90. package/dist/chunks/cli-0.6.6-5eww20j0.mjs +2 -0
  91. package/dist/chunks/cli-0.6.6-5p4qy3we.mjs +2 -0
  92. package/dist/chunks/cli-0.6.6-61wnn1as.mjs +3 -0
  93. package/dist/chunks/cli-0.6.6-6gzy2tvk.mjs +12 -0
  94. package/dist/chunks/cli-0.6.6-6p78renb.mjs +2 -0
  95. package/dist/chunks/cli-0.6.6-6zs5dyhh.mjs +20 -0
  96. package/dist/chunks/cli-0.6.6-731hhd3s.mjs +2 -0
  97. package/dist/chunks/cli-0.6.6-73eg8qn0.mjs +2 -0
  98. package/dist/chunks/cli-0.6.6-76rkjh7v.mjs +2 -0
  99. package/dist/chunks/cli-0.6.6-7bzhgmhp.mjs +2 -0
  100. package/dist/chunks/cli-0.6.6-7n7fwzth.mjs +2 -0
  101. package/dist/chunks/cli-0.6.6-7pfzbq40.mjs +2 -0
  102. package/dist/chunks/cli-0.6.6-7r4esgkf.mjs +2 -0
  103. package/dist/chunks/cli-0.6.6-7r817n5d.mjs +2 -0
  104. package/dist/chunks/cli-0.6.6-7s8bhv18.mjs +2 -0
  105. package/dist/chunks/cli-0.6.6-7tnsnb0c.mjs +2 -0
  106. package/dist/chunks/cli-0.6.6-816nja7p.mjs +2 -0
  107. package/dist/chunks/cli-0.6.6-85mqgh7w.mjs +133 -0
  108. package/dist/chunks/cli-0.6.6-8bvd4smw.mjs +3 -0
  109. package/dist/chunks/cli-0.6.6-8e7c224v.mjs +2 -0
  110. package/dist/chunks/cli-0.6.6-8gcxhg7t.mjs +3 -0
  111. package/dist/chunks/cli-0.6.6-8gmesggf.mjs +2 -0
  112. package/dist/chunks/cli-0.6.6-8hzhy95p.mjs +2 -0
  113. package/dist/chunks/cli-0.6.6-8s6h2xee.mjs +3 -0
  114. package/dist/chunks/cli-0.6.6-8vnkmjet.mjs +2 -0
  115. package/dist/chunks/cli-0.6.6-8wwb7c4z.mjs +10 -0
  116. package/dist/chunks/cli-0.6.6-8yvh28tb.mjs +16 -0
  117. package/dist/chunks/cli-0.6.6-92dvpnqv.mjs +3 -0
  118. package/dist/chunks/cli-0.6.6-962my51a.mjs +2 -0
  119. package/dist/chunks/cli-0.6.6-99e532z3.mjs +2 -0
  120. package/dist/chunks/cli-0.6.6-9r04g0xa.mjs +2 -0
  121. package/dist/chunks/cli-0.6.6-9rjdy05g.mjs +2 -0
  122. package/dist/chunks/cli-0.6.6-9tjtzwyt.mjs +2 -0
  123. package/dist/chunks/cli-0.6.6-a2e4eek5.mjs +2 -0
  124. package/dist/chunks/cli-0.6.6-a837m6n5.mjs +2 -0
  125. package/dist/chunks/cli-0.6.6-aep3cnz5.mjs +2 -0
  126. package/dist/chunks/cli-0.6.6-akjyt0hr.mjs +2 -0
  127. package/dist/chunks/cli-0.6.6-akqfmyeb.mjs +2 -0
  128. package/dist/chunks/cli-0.6.6-am3sz82d.mjs +58 -0
  129. package/dist/chunks/cli-0.6.6-ap1eg2xa.mjs +2 -0
  130. package/dist/chunks/cli-0.6.6-apq4h0nf.mjs +2 -0
  131. package/dist/chunks/cli-0.6.6-aq30fm8p.mjs +1 -0
  132. package/dist/chunks/cli-0.6.6-ar43nqjq.mjs +3 -0
  133. package/dist/chunks/cli-0.6.6-arvcw19g.mjs +2 -0
  134. package/dist/chunks/cli-0.6.6-as18fmg3.mjs +2 -0
  135. package/dist/chunks/cli-0.6.6-at7yytqj.mjs +2 -0
  136. package/dist/chunks/cli-0.6.6-axvjexmr.mjs +15 -0
  137. package/dist/chunks/cli-0.6.6-b1wqaqv9.mjs +4 -0
  138. package/dist/chunks/cli-0.6.6-bbv794xs.mjs +4 -0
  139. package/dist/chunks/cli-0.6.6-bn18ty4n.mjs +18 -0
  140. package/dist/chunks/cli-0.6.6-by1ngr5q.mjs +5 -0
  141. package/dist/chunks/cli-0.6.6-c267ckfv.mjs +2 -0
  142. package/dist/chunks/cli-0.6.6-c2xmgnfp.mjs +7 -0
  143. package/dist/chunks/cli-0.6.6-ct7zap14.mjs +2 -0
  144. package/dist/chunks/cli-0.6.6-czhez59x.mjs +2 -0
  145. package/dist/chunks/cli-0.6.6-d0qrt51j.mjs +2 -0
  146. package/dist/chunks/cli-0.6.6-d5dexg4d.mjs +2 -0
  147. package/dist/chunks/cli-0.6.6-dmd73xa3.mjs +2 -0
  148. package/dist/chunks/cli-0.6.6-dmtpt4r7.mjs +17 -0
  149. package/dist/chunks/cli-0.6.6-dnx45tc3.mjs +2 -0
  150. package/dist/chunks/cli-0.6.6-drg8zfkg.mjs +2 -0
  151. package/dist/chunks/cli-0.6.6-e4pcw0z3.mjs +3 -0
  152. package/dist/chunks/cli-0.6.6-eeaxd1dd.mjs +2 -0
  153. package/dist/chunks/cli-0.6.6-efkct3rx.mjs +2 -0
  154. package/dist/chunks/cli-0.6.6-ek8y79wd.mjs +2 -0
  155. package/dist/chunks/cli-0.6.6-en2sexw5.mjs +59 -0
  156. package/dist/chunks/cli-0.6.6-enc586ry.mjs +4 -0
  157. package/dist/chunks/cli-0.6.6-esnwdj9p.mjs +2 -0
  158. package/dist/chunks/cli-0.6.6-ezhp9zxv.mjs +2 -0
  159. package/dist/chunks/cli-0.6.6-f6wc5yc6.mjs +17 -0
  160. package/dist/chunks/cli-0.6.6-fep3xed7.mjs +2 -0
  161. package/dist/chunks/cli-0.6.6-fj9rpekf.mjs +2 -0
  162. package/dist/chunks/cli-0.6.6-g6ja9jcs.mjs +4 -0
  163. package/dist/chunks/cli-0.6.6-g9mdc3pd.mjs +2 -0
  164. package/dist/chunks/cli-0.6.6-gk8s7mch.mjs +67 -0
  165. package/dist/chunks/cli-0.6.6-gte1km05.mjs +2 -0
  166. package/dist/chunks/cli-0.6.6-h02v66zq.mjs +2 -0
  167. package/dist/chunks/cli-0.6.6-h12zw82h.mjs +3 -0
  168. package/dist/chunks/cli-0.6.6-h2aqs05m.mjs +2 -0
  169. package/dist/chunks/cli-0.6.6-h8d7s4qz.mjs +21 -0
  170. package/dist/chunks/cli-0.6.6-h8ew0rcw.mjs +24 -0
  171. package/dist/chunks/cli-0.6.6-hcajyfhg.mjs +6 -0
  172. package/dist/chunks/cli-0.6.6-hejk0ae6.mjs +5 -0
  173. package/dist/chunks/cli-0.6.6-hetrxwwb.mjs +2 -0
  174. package/dist/chunks/cli-0.6.6-heymhe69.mjs +24 -0
  175. package/dist/chunks/cli-0.6.6-hp08wrzx.mjs +15 -0
  176. package/dist/chunks/cli-0.6.6-hsgfy54f.mjs +2 -0
  177. package/dist/chunks/cli-0.6.6-hyqpcaay.mjs +2 -0
  178. package/dist/chunks/cli-0.6.6-j4j7a9y4.mjs +2 -0
  179. package/dist/chunks/cli-0.6.6-je6w2y3h.mjs +2 -0
  180. package/dist/chunks/cli-0.6.6-jh33fwqe.mjs +18 -0
  181. package/dist/chunks/cli-0.6.6-jjj2qt22.mjs +2 -0
  182. package/dist/chunks/cli-0.6.6-jqxfz350.mjs +2 -0
  183. package/dist/chunks/cli-0.6.6-jrpy2bkk.mjs +2 -0
  184. package/dist/chunks/cli-0.6.6-kca8bnv6.mjs +2 -0
  185. package/dist/chunks/cli-0.6.6-khr65dty.mjs +2 -0
  186. package/dist/chunks/cli-0.6.6-ktwh4wvp.mjs +6 -0
  187. package/dist/chunks/cli-0.6.6-mb1z3n48.mjs +2 -0
  188. package/dist/chunks/cli-0.6.6-mc9x1jry.mjs +28 -0
  189. package/dist/chunks/cli-0.6.6-mezb9tga.mjs +2 -0
  190. package/dist/chunks/cli-0.6.6-mfee7shn.mjs +2 -0
  191. package/dist/chunks/cli-0.6.6-mk746t95.mjs +2 -0
  192. package/dist/chunks/cli-0.6.6-mmgfr8v9.mjs +2 -0
  193. package/dist/chunks/cli-0.6.6-mrkkgjdh.mjs +2 -0
  194. package/dist/chunks/cli-0.6.6-mzjbzje2.mjs +2 -0
  195. package/dist/chunks/cli-0.6.6-nbrpn6xq.mjs +2 -0
  196. package/dist/chunks/cli-0.6.6-ncqg4xxp.mjs +2 -0
  197. package/dist/chunks/cli-0.6.6-ntyx46a7.mjs +2 -0
  198. package/dist/chunks/cli-0.6.6-nw0nh4e0.mjs +2 -0
  199. package/dist/chunks/cli-0.6.6-nymfz9tw.mjs +2 -0
  200. package/dist/chunks/cli-0.6.6-p3xdjh86.mjs +12 -0
  201. package/dist/chunks/cli-0.6.6-phfaae6k.mjs +2 -0
  202. package/dist/chunks/cli-0.6.6-q1j20ysc.mjs +193 -0
  203. package/dist/chunks/cli-0.6.6-q6pybpxh.mjs +2 -0
  204. package/dist/chunks/cli-0.6.6-qvmtyvz3.mjs +3 -0
  205. package/dist/chunks/cli-0.6.6-r5fnevcm.mjs +2 -0
  206. package/dist/chunks/cli-0.6.6-r6ph5dqe.mjs +2 -0
  207. package/dist/chunks/cli-0.6.6-rhcte81y.mjs +15 -0
  208. package/dist/chunks/cli-0.6.6-rqfeyzcp.mjs +2 -0
  209. package/dist/chunks/cli-0.6.6-rxhq7h6p.mjs +2 -0
  210. package/dist/chunks/cli-0.6.6-s3y8t7we.mjs +2 -0
  211. package/dist/chunks/cli-0.6.6-sc6nf44p.mjs +2 -0
  212. package/dist/chunks/cli-0.6.6-sh4pyhkw.mjs +2 -0
  213. package/dist/chunks/cli-0.6.6-sqvm4f1y.mjs +2 -0
  214. package/dist/chunks/cli-0.6.6-ssjjspdc.mjs +2 -0
  215. package/dist/chunks/cli-0.6.6-sxde5jj7.mjs +2 -0
  216. package/dist/chunks/cli-0.6.6-t3vvf5fy.mjs +2 -0
  217. package/dist/chunks/cli-0.6.6-t7p08nsw.mjs +2 -0
  218. package/dist/chunks/cli-0.6.6-tam4amwx.mjs +2 -0
  219. package/dist/chunks/cli-0.6.6-tg1e3sdx.mjs +2 -0
  220. package/dist/chunks/cli-0.6.6-tk00k0e1.mjs +34 -0
  221. package/dist/chunks/cli-0.6.6-v17a8yzy.mjs +2 -0
  222. package/dist/chunks/cli-0.6.6-vesqvt0y.mjs +2 -0
  223. package/dist/chunks/cli-0.6.6-vjj3g5dm.mjs +2 -0
  224. package/dist/chunks/cli-0.6.6-vt1181th.mjs +39 -0
  225. package/dist/chunks/cli-0.6.6-vvz9vw7f.mjs +5 -0
  226. package/dist/chunks/cli-0.6.6-vy3wa7f9.mjs +2 -0
  227. package/dist/chunks/cli-0.6.6-w687eya6.mjs +2 -0
  228. package/dist/chunks/cli-0.6.6-w6tqtrzg.mjs +4 -0
  229. package/dist/chunks/cli-0.6.6-wctj7gmc.mjs +6 -0
  230. package/dist/chunks/cli-0.6.6-ww6zy0p0.mjs +2 -0
  231. package/dist/chunks/cli-0.6.6-wxst92je.mjs +4 -0
  232. package/dist/chunks/cli-0.6.6-x1zrpt5g.mjs +45 -0
  233. package/dist/chunks/cli-0.6.6-x3tz7qvq.mjs +2 -0
  234. package/dist/chunks/cli-0.6.6-x88t5n54.mjs +133 -0
  235. package/dist/chunks/cli-0.6.6-xe6egv3r.mjs +25 -0
  236. package/dist/chunks/cli-0.6.6-xmd2zss3.mjs +2 -0
  237. package/dist/chunks/cli-0.6.6-xna6taqd.mjs +9 -0
  238. package/dist/chunks/cli-0.6.6-xnazk7t9.mjs +2 -0
  239. package/dist/chunks/cli-0.6.6-xq4cysdk.mjs +2 -0
  240. package/dist/chunks/cli-0.6.6-xt0p4ems.mjs +4 -0
  241. package/dist/chunks/cli-0.6.6-xtj65dsh.mjs +2 -0
  242. package/dist/chunks/cli-0.6.6-y305shhz.mjs +2 -0
  243. package/dist/chunks/cli-0.6.6-yakt9hjc.mjs +3 -0
  244. package/dist/chunks/cli-0.6.6-yj2tafrk.mjs +26 -0
  245. package/dist/chunks/cli-0.6.6-ymge82rt.mjs +2 -0
  246. package/dist/chunks/cli-0.6.6-ythetarc.mjs +3 -0
  247. package/dist/chunks/cli-0.6.6-ytskhcd3.mjs +42 -0
  248. package/dist/chunks/cli-0.6.6-ytws2j1w.mjs +2 -0
  249. package/dist/chunks/cli-0.6.6-yve3e654.mjs +2 -0
  250. package/dist/chunks/cli-0.6.6-yxd04fex.mjs +2 -0
  251. package/dist/chunks/cli-0.6.6-zb8ddz0k.mjs +2 -0
  252. package/dist/chunks/cli-0.6.6-ze6rx70y.mjs +2 -0
  253. package/dist/chunks/cli-0.6.6-zhky93y3.mjs +2 -0
  254. package/dist/chunks/cli-0.6.6-zk5p5pm9.mjs +3 -0
  255. package/dist/chunks/cli-0.6.6-zwk7a82m.mjs +2 -0
  256. package/dist/chunks/cli-0.6.6-zx0cgvxq.mjs +2 -0
  257. package/dist/chunks/client-0.6.6-epndq4qc.mjs +1 -0
  258. package/dist/chunks/color-0.6.6-8rzmvtwk.mjs +1 -0
  259. package/dist/chunks/compact-0.6.6-hx8hw1kn.mjs +3 -0
  260. package/dist/chunks/config-0.6.6-0j07cdc5.mjs +1 -0
  261. package/dist/chunks/config-0.6.6-2fm368ym.mjs +1 -0
  262. package/dist/chunks/constants-0.6.6-0yxw2f7y.mjs +1 -0
  263. package/dist/chunks/context-0.6.6-1ask7yck.mjs +1 -0
  264. package/dist/chunks/context-noninteractive-0.6.6-kk5a8p4w.mjs +1 -0
  265. package/dist/chunks/conversation-0.6.6-fetjq503.mjs +1 -0
  266. package/dist/chunks/copilotHeaders-0.6.6-fwqs850f.mjs +1 -0
  267. package/dist/chunks/copy-0.6.6-8j7h9rrr.mjs +9 -0
  268. package/dist/chunks/cost-0.6.6-1b4svxh2.mjs +1 -0
  269. package/dist/chunks/createSSHSession-0.6.6-nj5vfp9k.mjs +1 -0
  270. package/dist/chunks/createSession-0.6.6-mphh6gbj.mjs +1 -0
  271. package/dist/chunks/debug-0.6.6-ghaq68w2.mjs +1 -0
  272. package/dist/chunks/defaultActionDeps-0.6.6-t8g2hnht.mjs +1367 -0
  273. package/dist/chunks/desktop-0.6.6-a4mc0bda.mjs +1 -0
  274. package/dist/chunks/detectRepository-0.6.6-ncw5b2aj.mjs +1 -0
  275. package/dist/chunks/detection-0.6.6-214xzj0w.mjs +1 -0
  276. package/dist/chunks/diff-0.6.6-7nwejtje.mjs +1 -0
  277. package/dist/chunks/doctor-0.6.6-2wetaw67.mjs +1 -0
  278. package/dist/chunks/doctorDiagnostic-0.6.6-wvp7h2xr.mjs +1 -0
  279. package/dist/chunks/earlyInput-0.6.6-9jbsyrke.mjs +1 -0
  280. package/dist/chunks/effort-0.6.6-ncb29f3c.mjs +10 -0
  281. package/dist/chunks/envLessBridgeConfig-0.6.6-6pv90cvs.mjs +1 -0
  282. package/dist/chunks/envUtils-0.6.6-mwnbc88a.mjs +1 -0
  283. package/dist/chunks/environmentSelection-0.6.6-gac9h0m9.mjs +1 -0
  284. package/dist/chunks/environments-0.6.6-dyqm7563.mjs +1 -0
  285. package/dist/chunks/errors-0.6.6-q707mqqm.mjs +1 -0
  286. package/dist/chunks/exampleCommands-0.6.6-wd6w9zh5.mjs +1 -0
  287. package/dist/chunks/exit-0.6.6-8vj2yn2g.mjs +1 -0
  288. package/dist/chunks/export-0.6.6-ze9h049t.mjs +2 -0
  289. package/dist/chunks/extra-usage-0.6.6-mp9th9v6.mjs +1 -0
  290. package/dist/chunks/extra-usage-noninteractive-0.6.6-rmjhm3ng.mjs +1 -0
  291. package/dist/chunks/fast-0.6.6-764x92hh.mjs +1 -0
  292. package/dist/chunks/feedback-0.6.6-5x42sy6a.mjs +14 -0
  293. package/dist/chunks/firstPartyEventLogger-0.6.6-x2gcw7ns.mjs +1 -0
  294. package/dist/chunks/git-0.6.6-rw5vzxwm.mjs +1 -0
  295. package/dist/chunks/githubModelsCredentials-0.6.6-f2n56xmf.mjs +1 -0
  296. package/dist/chunks/goal-0.6.6-9rtva22g.mjs +4 -0
  297. package/dist/chunks/grove-0.6.6-97994twv.mjs +1 -0
  298. package/dist/chunks/growthbook-0.6.6-8reejkag.mjs +1 -0
  299. package/dist/chunks/headless-0.6.6-qgkvkz56.mjs +2 -0
  300. package/dist/chunks/heapdump-0.6.6-s68hkj7v.mjs +6 -0
  301. package/dist/chunks/help-0.6.6-a74x2714.mjs +1 -0
  302. package/dist/chunks/hookChains-0.6.6-wrp608b1.mjs +3 -0
  303. package/dist/chunks/hooks-0.6.6-skad5kp2.mjs +79 -0
  304. package/dist/chunks/hooks-0.6.6-zy3p5ymd.mjs +1 -0
  305. package/dist/chunks/ide-0.6.6-xpbxyf5x.mjs +3 -0
  306. package/dist/chunks/image-processor-napi-0.6.6-8ggh2rjn.mjs +1 -0
  307. package/dist/chunks/inboundAttachments-0.6.6-xfbtg9vz.mjs +1 -0
  308. package/dist/chunks/index-0.6.6-0g09kzhh.mjs +1 -0
  309. package/dist/chunks/index-0.6.6-1p1fy7cz.mjs +5 -0
  310. package/dist/chunks/index-0.6.6-27ems47g.mjs +9 -0
  311. package/dist/chunks/index-0.6.6-4v2spjs5.mjs +1 -0
  312. package/dist/chunks/index-0.6.6-5me3rm4s.mjs +9 -0
  313. package/dist/chunks/index-0.6.6-70tj26f9.mjs +1 -0
  314. package/dist/chunks/index-0.6.6-8zcthv4z.mjs +1 -0
  315. package/dist/chunks/index-0.6.6-aef14n9j.mjs +2 -0
  316. package/dist/chunks/index-0.6.6-apxc13te.mjs +1 -0
  317. package/dist/chunks/index-0.6.6-dq42pv3d.mjs +1 -0
  318. package/dist/chunks/index-0.6.6-ebp0mayr.mjs +1 -0
  319. package/dist/chunks/index-0.6.6-ejmkdrzm.mjs +1 -0
  320. package/dist/chunks/index-0.6.6-kqbyedrd.mjs +1 -0
  321. package/dist/chunks/index-0.6.6-m0dywyy2.mjs +30 -0
  322. package/dist/chunks/index-0.6.6-pjnpey6d.mjs +1 -0
  323. package/dist/chunks/index-0.6.6-pykm48ja.mjs +1 -0
  324. package/dist/chunks/index-0.6.6-pzvhyk3s.mjs +1 -0
  325. package/dist/chunks/index-0.6.6-rxae4gv4.mjs +1 -0
  326. package/dist/chunks/index-0.6.6-s4wsdcz8.mjs +2 -0
  327. package/dist/chunks/index-0.6.6-spnbnmsj.mjs +1 -0
  328. package/dist/chunks/index-0.6.6-sqygenvb.mjs +1 -0
  329. package/dist/chunks/index-0.6.6-t43srges.mjs +1 -0
  330. package/dist/chunks/index-0.6.6-zgh9z1rm.mjs +1 -0
  331. package/dist/chunks/init-0.6.6-6yxjq5pc.mjs +1 -0
  332. package/dist/chunks/initReplBridge-0.6.6-eeynkqk3.mjs +1 -0
  333. package/dist/chunks/ink-0.6.6-keyn52qn.mjs +1 -0
  334. package/dist/chunks/insights-0.6.6-2wjtvjnd.mjs +870 -0
  335. package/dist/chunks/install-0.6.6-vdpf15fp.mjs +1 -0
  336. package/dist/chunks/install-github-app-0.6.6-8zk1xfpw.mjs +149 -0
  337. package/dist/chunks/install-slack-app-0.6.6-j2a9c586.mjs +1 -0
  338. package/dist/chunks/instrumentation-0.6.6-35f0r0ts.mjs +1 -0
  339. package/dist/chunks/interactiveHelpers-0.6.6-18x9yezm.mjs +1 -0
  340. package/dist/chunks/keybindings-0.6.6-9r4m4jvq.mjs +2 -0
  341. package/dist/chunks/knowledge-0.6.6-1rjjrsqn.mjs +2 -0
  342. package/dist/chunks/latestVersionCache-0.6.6-32rrz0z9.mjs +1 -0
  343. package/dist/chunks/loadAgentsDir-0.6.6-tjygbn96.mjs +1 -0
  344. package/dist/chunks/loadPluginHooks-0.6.6-8xsdzy59.mjs +1 -0
  345. package/dist/chunks/loadPluginHooks-0.6.6-fr4gdkcy.mjs +1 -0
  346. package/dist/chunks/log-0.6.6-6nzgdpd0.mjs +1 -0
  347. package/dist/chunks/main-0.6.6-aq9jq72v.mjs +1 -0
  348. package/dist/chunks/managedEnv-0.6.6-6bth8e56.mjs +1 -0
  349. package/dist/chunks/mcp-0.6.6-4xb16x7y.mjs +1 -0
  350. package/dist/chunks/mcp-0.6.6-chps3y13.mjs +4 -0
  351. package/dist/chunks/mcp-0.6.6-fxy3qcdv.mjs +17 -0
  352. package/dist/chunks/mcpb-0.6.6-bhpebgzm.mjs +1 -0
  353. package/dist/chunks/memory-0.6.6-89t2e497.mjs +3 -0
  354. package/dist/chunks/model-0.6.6-8bpwy4gg.mjs +1 -0
  355. package/dist/chunks/model-0.6.6-m3x9crqt.mjs +2 -0
  356. package/dist/chunks/node-0.6.6-rm65t01m.mjs +12 -0
  357. package/dist/chunks/oauth-0.6.6-akp7n7mb.mjs +1 -0
  358. package/dist/chunks/openaiShim-0.6.6-ft40jfrp.mjs +14 -0
  359. package/dist/chunks/output-style-0.6.6-bvhtp4tc.mjs +1 -0
  360. package/dist/chunks/package-FMOR3ELU-0.6.6-0ykwzcyt.mjs +1 -0
  361. package/dist/chunks/parseConnectUrl-0.6.6-jve0dvpn.mjs +1 -0
  362. package/dist/chunks/parser-0.6.6-xa5qsjfh.mjs +1 -0
  363. package/dist/chunks/passes-0.6.6-tdv74eqj.mjs +1 -0
  364. package/dist/chunks/permissions-0.6.6-46df10nj.mjs +3 -0
  365. package/dist/chunks/permissions-0.6.6-8wcv4q7d.mjs +1 -0
  366. package/dist/chunks/plan-0.6.6-qw8t4gpk.mjs +1 -0
  367. package/dist/chunks/plist-0.6.6-5m3etrhq.mjs +1 -0
  368. package/dist/chunks/plugin-0.6.6-narwef70.mjs +29 -0
  369. package/dist/chunks/pluginStartupCheck-0.6.6-v7kxdq6w.mjs +1 -0
  370. package/dist/chunks/plugins-0.6.6-10y990d0.mjs +9 -0
  371. package/dist/chunks/preActionHook-0.6.6-0vkxazxv.mjs +2 -0
  372. package/dist/chunks/print-0.6.6-ym6tndvq.mjs +57 -0
  373. package/dist/chunks/privacy-settings-0.6.6-05da2gne.mjs +1 -0
  374. package/dist/chunks/process-0.6.6-da3h3zfe.mjs +1 -0
  375. package/dist/chunks/processBashCommand-0.6.6-m76r9et2.mjs +1 -0
  376. package/dist/chunks/processSlashCommand-0.6.6-xxwnh0cf.mjs +9 -0
  377. package/dist/chunks/prompt-0.6.6-60sg3pmt.mjs +1 -0
  378. package/dist/chunks/prompt-0.6.6-vfh4fr6f.mjs +1 -0
  379. package/dist/chunks/prompts-0.6.6-vbfva1a5.mjs +1 -0
  380. package/dist/chunks/protocolHandler-0.6.6-73vezfvr.mjs +13 -0
  381. package/dist/chunks/provider-0.6.6-ch5qq6n3.mjs +2 -0
  382. package/dist/chunks/providerProfiles-0.6.6-jtysbyrm.mjs +1 -0
  383. package/dist/chunks/providerValidation-0.6.6-5509e4cb.mjs +6 -0
  384. package/dist/chunks/rate-limit-options-0.6.6-cfm37mqk.mjs +1 -0
  385. package/dist/chunks/registerSubcommands-0.6.6-7p5mr9t1.mjs +34 -0
  386. package/dist/chunks/registry-0.6.6-z5cnbznq.mjs +1 -0
  387. package/dist/chunks/release-notes-0.6.6-90zjvqjx.mjs +5 -0
  388. package/dist/chunks/reload-plugins-0.6.6-jyxrw2jq.mjs +2 -0
  389. package/dist/chunks/remote-env-0.6.6-wyekcz2k.mjs +1 -0
  390. package/dist/chunks/remoteBridgeCore-0.6.6-favpnrd5.mjs +1 -0
  391. package/dist/chunks/remoteSession-0.6.6-snjkbaw2.mjs +1 -0
  392. package/dist/chunks/rename-0.6.6-3wang66e.mjs +1 -0
  393. package/dist/chunks/replBridgeHandle-0.6.6-dmxdjqjy.mjs +1 -0
  394. package/dist/chunks/replLauncher-0.6.6-bvhzfdx8.mjs +1 -0
  395. package/dist/chunks/resume-0.6.6-zqn712k4.mjs +2 -0
  396. package/dist/chunks/rewind-0.6.6-h8kc53mc.mjs +1 -0
  397. package/dist/chunks/rootOptions-0.6.6-wcam7tjd.mjs +1 -0
  398. package/dist/chunks/sandbox-adapter-0.6.6-qbm1rqdf.mjs +1 -0
  399. package/dist/chunks/sandbox-toggle-0.6.6-m882ckxv.mjs +1 -0
  400. package/dist/chunks/session-0.6.6-ezqqmxrd.mjs +2 -0
  401. package/dist/chunks/sessionDiscovery-0.6.6-0q34cmbe.mjs +1 -0
  402. package/dist/chunks/sessionFileAccessHooks-0.6.6-3tek8yje.mjs +1 -0
  403. package/dist/chunks/sessionStorage-0.6.6-pgfjqhdj.mjs +1 -0
  404. package/dist/chunks/settings-0.6.6-ms6t0ray.mjs +1 -0
  405. package/dist/chunks/setup-0.6.6-n2vjxxmx.mjs +5 -0
  406. package/dist/chunks/sinks-0.6.6-mq00wrfa.mjs +1 -0
  407. package/dist/chunks/skills-0.6.6-vgr1dpf7.mjs +1 -0
  408. package/dist/chunks/startupProfiler-0.6.6-5nbjv2gp.mjs +1 -0
  409. package/dist/chunks/startupUpdateCheck-0.6.6-z6adga96.mjs +1 -0
  410. package/dist/chunks/state-0.6.6-w2grqwqw.mjs +1 -0
  411. package/dist/chunks/stats-0.6.6-z11zcde6.mjs +6 -0
  412. package/dist/chunks/status-0.6.6-vbcqezgp.mjs +1 -0
  413. package/dist/chunks/stickers-0.6.6-c1pczjgd.mjs +1 -0
  414. package/dist/chunks/subprocessEnv-0.6.6-95tf6phx.mjs +1 -0
  415. package/dist/chunks/tasks-0.6.6-pm1cbtt0.mjs +1 -0
  416. package/dist/chunks/teamHelpers-0.6.6-ec57k1fn.mjs +1 -0
  417. package/dist/chunks/teammateModeSnapshot-0.6.6-964bq8fq.mjs +1 -0
  418. package/dist/chunks/teleport-0.6.6-ksymynm4.mjs +1 -0
  419. package/dist/chunks/terminalSetup-0.6.6-r5q2y7w0.mjs +1 -0
  420. package/dist/chunks/theme-0.6.6-y46frztn.mjs +1 -0
  421. package/dist/chunks/thinkback-0.6.6-3j0w6yjk.mjs +1 -0
  422. package/dist/chunks/thinkback-play-0.6.6-rrcqmyxk.mjs +1 -0
  423. package/dist/chunks/toolPool-0.6.6-2jmzd43n.mjs +1 -0
  424. package/dist/chunks/toolSearch-0.6.6-2rrd60cx.mjs +1 -0
  425. package/dist/chunks/tools-0.6.6-13yxm82t.mjs +1 -0
  426. package/dist/chunks/trustedDevice-0.6.6-yk1yrpb0.mjs +1 -0
  427. package/dist/chunks/turndown.cjs-0.6.6-nhq9m5br.mjs +69 -0
  428. package/dist/chunks/types-0.6.6-stnrzm1j.mjs +1 -0
  429. package/dist/chunks/ultrareviewCommand-0.6.6-7ytrj9jv.mjs +4 -0
  430. package/dist/chunks/update-0.6.6-5hf3mst5.mjs +86 -0
  431. package/dist/chunks/upgrade-0.6.6-y2gdvy9z.mjs +1 -0
  432. package/dist/chunks/upload-0.6.6-mwd7k6ym.mjs +7 -0
  433. package/dist/chunks/upstreamproxy-0.6.6-2fc9x5pq.mjs +14 -0
  434. package/dist/chunks/url-handler-napi-0.6.6-gbs8n3ne.mjs +1 -0
  435. package/dist/chunks/usage-0.6.6-8n0sxpw2.mjs +1 -0
  436. package/dist/chunks/util-0.6.6-hpjf8dnn.mjs +1 -0
  437. package/dist/chunks/utils-0.6.6-w937v7sr.mjs +1 -0
  438. package/dist/chunks/vim-0.6.6-b8g833z7.mjs +1 -0
  439. package/dist/chunks/watcher-0.6.6-bsqe9pa4.mjs +1 -0
  440. package/dist/chunks/wiki-0.6.6-2fstcx28.mjs +132 -0
  441. package/dist/chunks/worktree-0.6.6-yctkpbmx.mjs +1 -0
  442. package/dist/chunks/worktreeModeEnabled-0.6.6-yv2bvj70.mjs +1 -0
  443. package/dist/chunks/wrapper-0.6.6-02cwy0nm.mjs +7 -0
  444. package/dist/claudin-vscode.vsix +0 -0
  445. package/dist/cli.mjs +2 -2
  446. package/package.json +14 -14
  447. package/dist/chunks/AgentTool-0.6.4-rbaf1y65.mjs +0 -1
  448. package/dist/chunks/App-0.6.4-rq289jnp.mjs +0 -1
  449. package/dist/chunks/ApproveApiKey-0.6.4-7d5f28j9.mjs +0 -1
  450. package/dist/chunks/AssistantSessionChooser-0.6.4-phb69d3e.mjs +0 -1
  451. package/dist/chunks/AutoModeOptInDialog-0.6.4-9bf4j0dx.mjs +0 -1
  452. package/dist/chunks/BypassPermissionsModeDialog-0.6.4-62rbe590.mjs +0 -1
  453. package/dist/chunks/ClaudeMdExternalIncludesDialog-0.6.4-5xv95y7k.mjs +0 -1
  454. package/dist/chunks/ConsoleOAuthFlow-0.6.4-7ng7n8ac.mjs +0 -1
  455. package/dist/chunks/DiffDialog-0.6.4-ydwpx8jz.mjs +0 -3
  456. package/dist/chunks/Doctor-0.6.4-r3nh0zs5.mjs +0 -1
  457. package/dist/chunks/Grove-0.6.4-8mwvr7ha.mjs +0 -1
  458. package/dist/chunks/ITermBackend-0.6.4-w345qte9.mjs +0 -1
  459. package/dist/chunks/InvalidConfigDialog-0.6.4-e1xk1r00.mjs +0 -1
  460. package/dist/chunks/InvalidSettingsDialog-0.6.4-7pz7en7r.mjs +0 -1
  461. package/dist/chunks/MigrationDialog-0.6.4-xgqr16p1.mjs +0 -1
  462. package/dist/chunks/Onboarding-0.6.4-2735sbgf.mjs +0 -1
  463. package/dist/chunks/ProviderManager-0.6.4-q840wtmd.mjs +0 -1
  464. package/dist/chunks/REPL-0.6.4-k1gbkvvz.mjs +0 -1
  465. package/dist/chunks/ResumeConversation-0.6.4-mpzvada2.mjs +0 -1
  466. package/dist/chunks/SnapshotUpdateDialog-0.6.4-jctmc6zk.mjs +0 -1
  467. package/dist/chunks/TeleportProgress-0.6.4-gq0hnh6t.mjs +0 -1
  468. package/dist/chunks/TeleportRepoMismatchDialog-0.6.4-21sqsahr.mjs +0 -1
  469. package/dist/chunks/TeleportResumeWrapper-0.6.4-fjbh45wb.mjs +0 -1
  470. package/dist/chunks/TmuxBackend-0.6.4-5w2x0jdm.mjs +0 -9
  471. package/dist/chunks/ToolSearchTool-0.6.4-5qd1qqs9.mjs +0 -1
  472. package/dist/chunks/TrustDialog-0.6.4-rj702s6d.mjs +0 -1
  473. package/dist/chunks/activeProvider-0.6.4-wdg63cg4.mjs +0 -1
  474. package/dist/chunks/add-dir-0.6.4-kchsbt43.mjs +0 -1
  475. package/dist/chunks/agents-0.6.4-99qwf49d.mjs +0 -110
  476. package/dist/chunks/agents-0.6.4-rdvzbjcr.mjs +0 -3
  477. package/dist/chunks/api-0.6.4-9emwrek2.mjs +0 -1
  478. package/dist/chunks/asciicast-0.6.4-v9b43g5d.mjs +0 -1
  479. package/dist/chunks/assistant-0.6.4-f4m6fp3b.mjs +0 -1
  480. package/dist/chunks/auth-0.6.4-767mww9n.mjs +0 -1
  481. package/dist/chunks/auth-0.6.4-sgz2927j.mjs +0 -1
  482. package/dist/chunks/autoMode-0.6.4-n865xxhg.mjs +0 -48
  483. package/dist/chunks/autoUpdater-0.6.4-bvb6j5ck.mjs +0 -1
  484. package/dist/chunks/backgroundHousekeeping-0.6.4-fercqr2y.mjs +0 -1
  485. package/dist/chunks/branch-0.6.4-0hvhjqr5.mjs +0 -4
  486. package/dist/chunks/bridgePointer-0.6.4-dgames2b.mjs +0 -1
  487. package/dist/chunks/btw-0.6.4-fprrp4ch.mjs +0 -1
  488. package/dist/chunks/buddy-0.6.4-0d1rrwbv.mjs +0 -3
  489. package/dist/chunks/cacache-0.6.4-6yj2mrct.mjs +0 -1
  490. package/dist/chunks/cache-probe-0.6.4-x5tn2a2e.mjs +0 -21
  491. package/dist/chunks/cacheStats-0.6.4-ar55ww2f.mjs +0 -4
  492. package/dist/chunks/caches-0.6.4-54fb2qc2.mjs +0 -1
  493. package/dist/chunks/claudeDesktop-0.6.4-h06j868n.mjs +0 -1
  494. package/dist/chunks/claudemd-0.6.4-35r4255p.mjs +0 -1
  495. package/dist/chunks/clear-0.6.4-6chw4mjb.mjs +0 -1
  496. package/dist/chunks/clearTerminal-0.6.4-81zcpvka.mjs +0 -1
  497. package/dist/chunks/cli-0.6.4-00191v0e.mjs +0 -10
  498. package/dist/chunks/cli-0.6.4-02v7f4p3.mjs +0 -2
  499. package/dist/chunks/cli-0.6.4-0dsecg4e.mjs +0 -2
  500. package/dist/chunks/cli-0.6.4-0gnhakty.mjs +0 -42
  501. package/dist/chunks/cli-0.6.4-0m6t3msa.mjs +0 -2
  502. package/dist/chunks/cli-0.6.4-0ngrseg8.mjs +0 -15
  503. package/dist/chunks/cli-0.6.4-167h8t8x.mjs +0 -2
  504. package/dist/chunks/cli-0.6.4-1ery4vpn.mjs +0 -50
  505. package/dist/chunks/cli-0.6.4-1k1e5y32.mjs +0 -2
  506. package/dist/chunks/cli-0.6.4-1mgm8ymv.mjs +0 -3
  507. package/dist/chunks/cli-0.6.4-1nzpzrfm.mjs +0 -2
  508. package/dist/chunks/cli-0.6.4-1qryxm4s.mjs +0 -21
  509. package/dist/chunks/cli-0.6.4-1s60014f.mjs +0 -2
  510. package/dist/chunks/cli-0.6.4-28pnb4ka.mjs +0 -18
  511. package/dist/chunks/cli-0.6.4-29860mke.mjs +0 -2
  512. package/dist/chunks/cli-0.6.4-2d65trmc.mjs +0 -2
  513. package/dist/chunks/cli-0.6.4-2dm4scsb.mjs +0 -2
  514. package/dist/chunks/cli-0.6.4-2dwdm1v9.mjs +0 -2
  515. package/dist/chunks/cli-0.6.4-2fqxn556.mjs +0 -2
  516. package/dist/chunks/cli-0.6.4-2mytx51g.mjs +0 -16
  517. package/dist/chunks/cli-0.6.4-2q70rra3.mjs +0 -2
  518. package/dist/chunks/cli-0.6.4-2qaa0gp3.mjs +0 -2
  519. package/dist/chunks/cli-0.6.4-2sh53v7p.mjs +0 -7
  520. package/dist/chunks/cli-0.6.4-2y7ay1jf.mjs +0 -2
  521. package/dist/chunks/cli-0.6.4-3d8syj43.mjs +0 -15
  522. package/dist/chunks/cli-0.6.4-3rqg480e.mjs +0 -2
  523. package/dist/chunks/cli-0.6.4-43y102gt.mjs +0 -2
  524. package/dist/chunks/cli-0.6.4-48fcth51.mjs +0 -2
  525. package/dist/chunks/cli-0.6.4-4b3h6h1j.mjs +0 -2
  526. package/dist/chunks/cli-0.6.4-4dtvmfyr.mjs +0 -24
  527. package/dist/chunks/cli-0.6.4-4g9qybcx.mjs +0 -5324
  528. package/dist/chunks/cli-0.6.4-4jc68p21.mjs +0 -2
  529. package/dist/chunks/cli-0.6.4-4mfc5kte.mjs +0 -2
  530. package/dist/chunks/cli-0.6.4-4qg60938.mjs +0 -5
  531. package/dist/chunks/cli-0.6.4-4qyz0e3r.mjs +0 -2
  532. package/dist/chunks/cli-0.6.4-55a83gct.mjs +0 -2
  533. package/dist/chunks/cli-0.6.4-5eshcq2g.mjs +0 -2
  534. package/dist/chunks/cli-0.6.4-5j8b83wg.mjs +0 -2
  535. package/dist/chunks/cli-0.6.4-6czv84g6.mjs +0 -2
  536. package/dist/chunks/cli-0.6.4-771h1906.mjs +0 -2
  537. package/dist/chunks/cli-0.6.4-78evvtpq.mjs +0 -2
  538. package/dist/chunks/cli-0.6.4-7djzrbzn.mjs +0 -4
  539. package/dist/chunks/cli-0.6.4-7htjg50k.mjs +0 -2
  540. package/dist/chunks/cli-0.6.4-7jvtehkv.mjs +0 -2
  541. package/dist/chunks/cli-0.6.4-7keg9eew.mjs +0 -45
  542. package/dist/chunks/cli-0.6.4-7xp2yhpq.mjs +0 -2
  543. package/dist/chunks/cli-0.6.4-89pes3g1.mjs +0 -2
  544. package/dist/chunks/cli-0.6.4-8jwbt311.mjs +0 -4
  545. package/dist/chunks/cli-0.6.4-95vk17cy.mjs +0 -2
  546. package/dist/chunks/cli-0.6.4-96m5w0az.mjs +0 -2
  547. package/dist/chunks/cli-0.6.4-9ab34q29.mjs +0 -2
  548. package/dist/chunks/cli-0.6.4-9j2480tb.mjs +0 -3
  549. package/dist/chunks/cli-0.6.4-9k5r0pfb.mjs +0 -1
  550. package/dist/chunks/cli-0.6.4-9wdpd5tf.mjs +0 -2
  551. package/dist/chunks/cli-0.6.4-9ydhssth.mjs +0 -2
  552. package/dist/chunks/cli-0.6.4-9z6f4aka.mjs +0 -2
  553. package/dist/chunks/cli-0.6.4-a1der2pe.mjs +0 -2
  554. package/dist/chunks/cli-0.6.4-a4wjm2rf.mjs +0 -58
  555. package/dist/chunks/cli-0.6.4-a772rm3j.mjs +0 -3
  556. package/dist/chunks/cli-0.6.4-a7tb1zsc.mjs +0 -3
  557. package/dist/chunks/cli-0.6.4-aprgpdp6.mjs +0 -2
  558. package/dist/chunks/cli-0.6.4-bbsbw8kz.mjs +0 -2
  559. package/dist/chunks/cli-0.6.4-bgwzkgj9.mjs +0 -2
  560. package/dist/chunks/cli-0.6.4-btcax77x.mjs +0 -2
  561. package/dist/chunks/cli-0.6.4-bvrcy0gs.mjs +0 -2
  562. package/dist/chunks/cli-0.6.4-cgktpczq.mjs +0 -2
  563. package/dist/chunks/cli-0.6.4-cp53mw1m.mjs +0 -2
  564. package/dist/chunks/cli-0.6.4-cttwajrp.mjs +0 -2
  565. package/dist/chunks/cli-0.6.4-cxhs267r.mjs +0 -2
  566. package/dist/chunks/cli-0.6.4-cy7jqdcj.mjs +0 -2
  567. package/dist/chunks/cli-0.6.4-da88vvgh.mjs +0 -2
  568. package/dist/chunks/cli-0.6.4-dhyghbjg.mjs +0 -2
  569. package/dist/chunks/cli-0.6.4-dny0rntq.mjs +0 -2
  570. package/dist/chunks/cli-0.6.4-dtrjgbbz.mjs +0 -2
  571. package/dist/chunks/cli-0.6.4-dvh5yb9z.mjs +0 -2
  572. package/dist/chunks/cli-0.6.4-dz01y28k.mjs +0 -133
  573. package/dist/chunks/cli-0.6.4-dzer59m8.mjs +0 -2
  574. package/dist/chunks/cli-0.6.4-e0pqs0qg.mjs +0 -4
  575. package/dist/chunks/cli-0.6.4-e4nxzjbd.mjs +0 -3
  576. package/dist/chunks/cli-0.6.4-ehexec8h.mjs +0 -2
  577. package/dist/chunks/cli-0.6.4-ejrq8g7w.mjs +0 -2
  578. package/dist/chunks/cli-0.6.4-ekg42ba5.mjs +0 -2
  579. package/dist/chunks/cli-0.6.4-em2mfvpg.mjs +0 -193
  580. package/dist/chunks/cli-0.6.4-ex2d76ze.mjs +0 -4
  581. package/dist/chunks/cli-0.6.4-eykta4ak.mjs +0 -2
  582. package/dist/chunks/cli-0.6.4-f1ya630v.mjs +0 -39
  583. package/dist/chunks/cli-0.6.4-f51bqfv1.mjs +0 -4
  584. package/dist/chunks/cli-0.6.4-fg71wev8.mjs +0 -2
  585. package/dist/chunks/cli-0.6.4-fh1fzqd2.mjs +0 -133
  586. package/dist/chunks/cli-0.6.4-fhcsv0k7.mjs +0 -2
  587. package/dist/chunks/cli-0.6.4-fppw8yjy.mjs +0 -2
  588. package/dist/chunks/cli-0.6.4-g1kweb8j.mjs +0 -17
  589. package/dist/chunks/cli-0.6.4-g1qw18ad.mjs +0 -2
  590. package/dist/chunks/cli-0.6.4-g2a0w8wh.mjs +0 -3
  591. package/dist/chunks/cli-0.6.4-g37ywszt.mjs +0 -2
  592. package/dist/chunks/cli-0.6.4-gbc9szsq.mjs +0 -20
  593. package/dist/chunks/cli-0.6.4-gdvys9qy.mjs +0 -2
  594. package/dist/chunks/cli-0.6.4-ge6qg76s.mjs +0 -18
  595. package/dist/chunks/cli-0.6.4-ggxbtbd1.mjs +0 -2
  596. package/dist/chunks/cli-0.6.4-ghagvvva.mjs +0 -2
  597. package/dist/chunks/cli-0.6.4-gyb3cp0m.mjs +0 -15
  598. package/dist/chunks/cli-0.6.4-h2c5gxa3.mjs +0 -2
  599. package/dist/chunks/cli-0.6.4-h598qtx2.mjs +0 -2
  600. package/dist/chunks/cli-0.6.4-h9ncym59.mjs +0 -2
  601. package/dist/chunks/cli-0.6.4-hb3rny4x.mjs +0 -3
  602. package/dist/chunks/cli-0.6.4-hhaw00mw.mjs +0 -2
  603. package/dist/chunks/cli-0.6.4-hk0wy6ay.mjs +0 -2
  604. package/dist/chunks/cli-0.6.4-hrs590q0.mjs +0 -2
  605. package/dist/chunks/cli-0.6.4-hx250zvn.mjs +0 -2
  606. package/dist/chunks/cli-0.6.4-j61ta5y1.mjs +0 -2
  607. package/dist/chunks/cli-0.6.4-j7hr5rd4.mjs +0 -2
  608. package/dist/chunks/cli-0.6.4-jc2r75s6.mjs +0 -2
  609. package/dist/chunks/cli-0.6.4-jg4xm27s.mjs +0 -2
  610. package/dist/chunks/cli-0.6.4-jh0d8t91.mjs +0 -9
  611. package/dist/chunks/cli-0.6.4-jk0aqvhn.mjs +0 -2
  612. package/dist/chunks/cli-0.6.4-jmvxa7qj.mjs +0 -2
  613. package/dist/chunks/cli-0.6.4-jn11nc5a.mjs +0 -2
  614. package/dist/chunks/cli-0.6.4-jra8pavs.mjs +0 -2
  615. package/dist/chunks/cli-0.6.4-jrweqe5y.mjs +0 -2
  616. package/dist/chunks/cli-0.6.4-jvfz5yaf.mjs +0 -2
  617. package/dist/chunks/cli-0.6.4-k2azfhje.mjs +0 -12
  618. package/dist/chunks/cli-0.6.4-k498jsqp.mjs +0 -9
  619. package/dist/chunks/cli-0.6.4-k6a4gc0p.mjs +0 -3
  620. package/dist/chunks/cli-0.6.4-k76c1cdx.mjs +0 -2
  621. package/dist/chunks/cli-0.6.4-kkwh828j.mjs +0 -2
  622. package/dist/chunks/cli-0.6.4-ksf3bj49.mjs +0 -2
  623. package/dist/chunks/cli-0.6.4-kygb95p8.mjs +0 -2
  624. package/dist/chunks/cli-0.6.4-m0b0hm20.mjs +0 -2
  625. package/dist/chunks/cli-0.6.4-ms7sef7r.mjs +0 -2
  626. package/dist/chunks/cli-0.6.4-n3wmzz8w.mjs +0 -2
  627. package/dist/chunks/cli-0.6.4-n9mgjg26.mjs +0 -2
  628. package/dist/chunks/cli-0.6.4-nscxc6w9.mjs +0 -2
  629. package/dist/chunks/cli-0.6.4-p1yyrrqa.mjs +0 -2
  630. package/dist/chunks/cli-0.6.4-p56yx5pd.mjs +0 -3
  631. package/dist/chunks/cli-0.6.4-p7mvm2y6.mjs +0 -5
  632. package/dist/chunks/cli-0.6.4-p7q1dk2n.mjs +0 -2
  633. package/dist/chunks/cli-0.6.4-pd75v1wy.mjs +0 -6
  634. package/dist/chunks/cli-0.6.4-pdn08sja.mjs +0 -2
  635. package/dist/chunks/cli-0.6.4-pg577m2t.mjs +0 -18
  636. package/dist/chunks/cli-0.6.4-pjk8hxs1.mjs +0 -4
  637. package/dist/chunks/cli-0.6.4-pp4r33sa.mjs +0 -4
  638. package/dist/chunks/cli-0.6.4-pqdfmet2.mjs +0 -4
  639. package/dist/chunks/cli-0.6.4-prdj94yp.mjs +0 -4
  640. package/dist/chunks/cli-0.6.4-prv34fmj.mjs +0 -2
  641. package/dist/chunks/cli-0.6.4-q45r4rnd.mjs +0 -2
  642. package/dist/chunks/cli-0.6.4-qcpjz3yn.mjs +0 -2
  643. package/dist/chunks/cli-0.6.4-qxhfaxsk.mjs +0 -2
  644. package/dist/chunks/cli-0.6.4-rdtbn65d.mjs +0 -2
  645. package/dist/chunks/cli-0.6.4-rf4gtxa6.mjs +0 -2
  646. package/dist/chunks/cli-0.6.4-rqmfmwew.mjs +0 -4
  647. package/dist/chunks/cli-0.6.4-rw4dqk3e.mjs +0 -2
  648. package/dist/chunks/cli-0.6.4-s062axqp.mjs +0 -67
  649. package/dist/chunks/cli-0.6.4-sd36e6nd.mjs +0 -26
  650. package/dist/chunks/cli-0.6.4-sebyspe3.mjs +0 -2
  651. package/dist/chunks/cli-0.6.4-sg59x1y7.mjs +0 -2
  652. package/dist/chunks/cli-0.6.4-sk4r23n0.mjs +0 -2
  653. package/dist/chunks/cli-0.6.4-spysehd5.mjs +0 -2
  654. package/dist/chunks/cli-0.6.4-sz5jkrwv.mjs +0 -8
  655. package/dist/chunks/cli-0.6.4-t13eh9gb.mjs +0 -2
  656. package/dist/chunks/cli-0.6.4-t87tgqs2.mjs +0 -2
  657. package/dist/chunks/cli-0.6.4-tda6fzwk.mjs +0 -2
  658. package/dist/chunks/cli-0.6.4-tgtxrvzn.mjs +0 -3
  659. package/dist/chunks/cli-0.6.4-ttyv846t.mjs +0 -2
  660. package/dist/chunks/cli-0.6.4-v050kzdd.mjs +0 -2
  661. package/dist/chunks/cli-0.6.4-v2fsc12w.mjs +0 -2
  662. package/dist/chunks/cli-0.6.4-v3ym5bjk.mjs +0 -2
  663. package/dist/chunks/cli-0.6.4-vawbj80d.mjs +0 -5
  664. package/dist/chunks/cli-0.6.4-vekd5qeh.mjs +0 -3
  665. package/dist/chunks/cli-0.6.4-vg82smm8.mjs +0 -24
  666. package/dist/chunks/cli-0.6.4-vs7kwtc6.mjs +0 -2
  667. package/dist/chunks/cli-0.6.4-vyqg6c95.mjs +0 -3
  668. package/dist/chunks/cli-0.6.4-vyyncn9y.mjs +0 -34
  669. package/dist/chunks/cli-0.6.4-wpzc8xj5.mjs +0 -3
  670. package/dist/chunks/cli-0.6.4-x0pe866a.mjs +0 -2
  671. package/dist/chunks/cli-0.6.4-x3pc9zn1.mjs +0 -6
  672. package/dist/chunks/cli-0.6.4-x6d6qxpg.mjs +0 -2
  673. package/dist/chunks/cli-0.6.4-x6npewbm.mjs +0 -6
  674. package/dist/chunks/cli-0.6.4-x7ss8dse.mjs +0 -2
  675. package/dist/chunks/cli-0.6.4-x84dfqja.mjs +0 -2
  676. package/dist/chunks/cli-0.6.4-xf6vdp7p.mjs +0 -2
  677. package/dist/chunks/cli-0.6.4-xgmmcr56.mjs +0 -25
  678. package/dist/chunks/cli-0.6.4-xh0mhy0q.mjs +0 -2
  679. package/dist/chunks/cli-0.6.4-xj949nnt.mjs +0 -2
  680. package/dist/chunks/cli-0.6.4-xm44y40c.mjs +0 -2
  681. package/dist/chunks/cli-0.6.4-y9nrcnx6.mjs +0 -2
  682. package/dist/chunks/cli-0.6.4-yak49q2f.mjs +0 -12
  683. package/dist/chunks/cli-0.6.4-ymgdd6a7.mjs +0 -2
  684. package/dist/chunks/cli-0.6.4-ysvx8vre.mjs +0 -12
  685. package/dist/chunks/cli-0.6.4-yxqfeka0.mjs +0 -2
  686. package/dist/chunks/cli-0.6.4-z0j0rsqe.mjs +0 -2
  687. package/dist/chunks/cli-0.6.4-z3hp0qzv.mjs +0 -59
  688. package/dist/chunks/cli-0.6.4-z63xq66c.mjs +0 -2
  689. package/dist/chunks/cli-0.6.4-zgzya3hb.mjs +0 -17
  690. package/dist/chunks/cli-0.6.4-zkfpt86n.mjs +0 -2
  691. package/dist/chunks/cli-0.6.4-zss3bwjp.mjs +0 -2
  692. package/dist/chunks/cli-0.6.4-ztqssjbf.mjs +0 -2
  693. package/dist/chunks/client-0.6.4-ba2mtgjd.mjs +0 -1
  694. package/dist/chunks/color-0.6.4-2g7drx0s.mjs +0 -1
  695. package/dist/chunks/compact-0.6.4-tnqd9mmn.mjs +0 -3
  696. package/dist/chunks/config-0.6.4-3bhr23pq.mjs +0 -1
  697. package/dist/chunks/config-0.6.4-x56wgtde.mjs +0 -1
  698. package/dist/chunks/constants-0.6.4-cy9scgrh.mjs +0 -1
  699. package/dist/chunks/context-0.6.4-sjcg7yxa.mjs +0 -1
  700. package/dist/chunks/context-noninteractive-0.6.4-630bqrtn.mjs +0 -1
  701. package/dist/chunks/conversation-0.6.4-4wkb13gm.mjs +0 -1
  702. package/dist/chunks/copilotHeaders-0.6.4-6ygmq0rm.mjs +0 -1
  703. package/dist/chunks/copy-0.6.4-bgxrhckq.mjs +0 -9
  704. package/dist/chunks/cost-0.6.4-w83wc8ng.mjs +0 -1
  705. package/dist/chunks/createSSHSession-0.6.4-xcjsx731.mjs +0 -1
  706. package/dist/chunks/createSession-0.6.4-wsz3r56j.mjs +0 -1
  707. package/dist/chunks/debug-0.6.4-98yk6kds.mjs +0 -1
  708. package/dist/chunks/defaultActionDeps-0.6.4-gnr6f4bm.mjs +0 -1365
  709. package/dist/chunks/desktop-0.6.4-hpbrkj08.mjs +0 -1
  710. package/dist/chunks/detectRepository-0.6.4-jtg1wvsa.mjs +0 -1
  711. package/dist/chunks/detection-0.6.4-dqwz1bq1.mjs +0 -1
  712. package/dist/chunks/diff-0.6.4-6mtph9me.mjs +0 -1
  713. package/dist/chunks/doctor-0.6.4-rhc37adv.mjs +0 -1
  714. package/dist/chunks/doctorDiagnostic-0.6.4-dwt35xp9.mjs +0 -1
  715. package/dist/chunks/earlyInput-0.6.4-gwc98r30.mjs +0 -1
  716. package/dist/chunks/effort-0.6.4-gat4neps.mjs +0 -10
  717. package/dist/chunks/envUtils-0.6.4-y2b3abdc.mjs +0 -1
  718. package/dist/chunks/environmentSelection-0.6.4-xxrzk7m6.mjs +0 -1
  719. package/dist/chunks/environments-0.6.4-h1v61wzy.mjs +0 -1
  720. package/dist/chunks/errors-0.6.4-ca74wb6q.mjs +0 -1
  721. package/dist/chunks/exampleCommands-0.6.4-g36htc09.mjs +0 -1
  722. package/dist/chunks/exit-0.6.4-z7yj01cx.mjs +0 -1
  723. package/dist/chunks/export-0.6.4-ffzrse4n.mjs +0 -2
  724. package/dist/chunks/extra-usage-0.6.4-d23skk9c.mjs +0 -1
  725. package/dist/chunks/extra-usage-noninteractive-0.6.4-0akfkh19.mjs +0 -1
  726. package/dist/chunks/fast-0.6.4-dy9ew4g1.mjs +0 -1
  727. package/dist/chunks/feedback-0.6.4-5pw5kr6j.mjs +0 -14
  728. package/dist/chunks/firstPartyEventLogger-0.6.4-58n8gvjr.mjs +0 -1
  729. package/dist/chunks/git-0.6.4-5p9es5sh.mjs +0 -1
  730. package/dist/chunks/githubModelsCredentials-0.6.4-c75tjtm6.mjs +0 -1
  731. package/dist/chunks/goal-0.6.4-05yfbtf5.mjs +0 -4
  732. package/dist/chunks/grove-0.6.4-3mxw3jbp.mjs +0 -1
  733. package/dist/chunks/growthbook-0.6.4-w1a2ja8q.mjs +0 -1
  734. package/dist/chunks/headless-0.6.4-1b8pxyk6.mjs +0 -2
  735. package/dist/chunks/heapdump-0.6.4-ckft18df.mjs +0 -6
  736. package/dist/chunks/help-0.6.4-1qswzq2t.mjs +0 -1
  737. package/dist/chunks/hookChains-0.6.4-mc6w2yn4.mjs +0 -3
  738. package/dist/chunks/hooks-0.6.4-zqycdaww.mjs +0 -1
  739. package/dist/chunks/hooks-0.6.4-zw8ak2ae.mjs +0 -79
  740. package/dist/chunks/ide-0.6.4-kjaythhf.mjs +0 -3
  741. package/dist/chunks/image-processor-napi-0.6.4-9n32xq4y.mjs +0 -1
  742. package/dist/chunks/index-0.6.4-1eqjmyfc.mjs +0 -1
  743. package/dist/chunks/index-0.6.4-5x2zgy8s.mjs +0 -1
  744. package/dist/chunks/index-0.6.4-6er8ykqb.mjs +0 -1
  745. package/dist/chunks/index-0.6.4-6z8pdxeg.mjs +0 -1
  746. package/dist/chunks/index-0.6.4-8gxkz67a.mjs +0 -1
  747. package/dist/chunks/index-0.6.4-ay6td6v7.mjs +0 -1
  748. package/dist/chunks/index-0.6.4-bf4fb2rv.mjs +0 -1
  749. package/dist/chunks/index-0.6.4-cs4qnyse.mjs +0 -9
  750. package/dist/chunks/index-0.6.4-d8a7z3cd.mjs +0 -1
  751. package/dist/chunks/index-0.6.4-e1xb3q84.mjs +0 -1
  752. package/dist/chunks/index-0.6.4-fapqkd13.mjs +0 -30
  753. package/dist/chunks/index-0.6.4-fsypm1g5.mjs +0 -1
  754. package/dist/chunks/index-0.6.4-j1dpgmwz.mjs +0 -5
  755. package/dist/chunks/index-0.6.4-k5z3btpk.mjs +0 -1
  756. package/dist/chunks/index-0.6.4-kv8v270h.mjs +0 -1
  757. package/dist/chunks/index-0.6.4-nn5ynnfb.mjs +0 -2
  758. package/dist/chunks/index-0.6.4-np003dn4.mjs +0 -2
  759. package/dist/chunks/index-0.6.4-qtcndy07.mjs +0 -1
  760. package/dist/chunks/index-0.6.4-s0gg7sga.mjs +0 -1
  761. package/dist/chunks/index-0.6.4-scbwf11t.mjs +0 -9
  762. package/dist/chunks/index-0.6.4-sqrhv68x.mjs +0 -17
  763. package/dist/chunks/index-0.6.4-w93mdh3w.mjs +0 -1
  764. package/dist/chunks/init-0.6.4-ccs2p8cg.mjs +0 -1
  765. package/dist/chunks/initReplBridge-0.6.4-7cnffgw6.mjs +0 -1
  766. package/dist/chunks/ink-0.6.4-kv9v236j.mjs +0 -1
  767. package/dist/chunks/insights-0.6.4-v475bskf.mjs +0 -870
  768. package/dist/chunks/install-0.6.4-9x6x6d7w.mjs +0 -1
  769. package/dist/chunks/install-github-app-0.6.4-e0hnh1ac.mjs +0 -149
  770. package/dist/chunks/install-slack-app-0.6.4-5m1bq4zr.mjs +0 -1
  771. package/dist/chunks/instrumentation-0.6.4-j0dm5kvt.mjs +0 -1
  772. package/dist/chunks/interactiveHelpers-0.6.4-trjfh09v.mjs +0 -1
  773. package/dist/chunks/keybindings-0.6.4-52xyg2q7.mjs +0 -2
  774. package/dist/chunks/knowledge-0.6.4-3pd8yspr.mjs +0 -2
  775. package/dist/chunks/latestVersionCache-0.6.4-6nv1r43c.mjs +0 -1
  776. package/dist/chunks/loadAgentsDir-0.6.4-2f1egc65.mjs +0 -1
  777. package/dist/chunks/loadPluginHooks-0.6.4-6bdefjx0.mjs +0 -1
  778. package/dist/chunks/loadPluginHooks-0.6.4-jg6hn8q1.mjs +0 -1
  779. package/dist/chunks/log-0.6.4-byx1v0aw.mjs +0 -1
  780. package/dist/chunks/main-0.6.4-7kgs4wzg.mjs +0 -1
  781. package/dist/chunks/managedEnv-0.6.4-seg7a473.mjs +0 -1
  782. package/dist/chunks/mcp-0.6.4-fme3jax5.mjs +0 -17
  783. package/dist/chunks/mcp-0.6.4-gw2k9j0s.mjs +0 -4
  784. package/dist/chunks/mcp-0.6.4-hz4ymzf8.mjs +0 -1
  785. package/dist/chunks/mcpb-0.6.4-rm87xg1m.mjs +0 -1
  786. package/dist/chunks/memory-0.6.4-hdem4rfy.mjs +0 -3
  787. package/dist/chunks/mobile-0.6.4-xga427dx.mjs +0 -2
  788. package/dist/chunks/model-0.6.4-e7swq7hs.mjs +0 -1
  789. package/dist/chunks/model-0.6.4-raaz0pn8.mjs +0 -2
  790. package/dist/chunks/node-0.6.4-2mhf46p7.mjs +0 -12
  791. package/dist/chunks/oauth-0.6.4-de05kmr6.mjs +0 -1
  792. package/dist/chunks/openaiShim-0.6.4-shaa1wsv.mjs +0 -14
  793. package/dist/chunks/output-style-0.6.4-gfd6r8hz.mjs +0 -1
  794. package/dist/chunks/package-D6422PQU-0.6.4-syh17p64.mjs +0 -1
  795. package/dist/chunks/parseConnectUrl-0.6.4-k2eex22j.mjs +0 -1
  796. package/dist/chunks/parser-0.6.4-43t4x7r9.mjs +0 -1
  797. package/dist/chunks/passes-0.6.4-tbj019p0.mjs +0 -1
  798. package/dist/chunks/permissions-0.6.4-d0fw76d7.mjs +0 -3
  799. package/dist/chunks/plan-0.6.4-084fq0kq.mjs +0 -1
  800. package/dist/chunks/plist-0.6.4-439zn1sw.mjs +0 -1
  801. package/dist/chunks/plugin-0.6.4-mnsbmvwr.mjs +0 -29
  802. package/dist/chunks/pluginStartupCheck-0.6.4-t2kn51a4.mjs +0 -1
  803. package/dist/chunks/plugins-0.6.4-630t2jf7.mjs +0 -9
  804. package/dist/chunks/preActionHook-0.6.4-gfadf2sk.mjs +0 -2
  805. package/dist/chunks/print-0.6.4-pw4vrnzd.mjs +0 -57
  806. package/dist/chunks/privacy-settings-0.6.4-b97bep23.mjs +0 -1
  807. package/dist/chunks/process-0.6.4-yewqx1g2.mjs +0 -1
  808. package/dist/chunks/processBashCommand-0.6.4-64reh5jq.mjs +0 -1
  809. package/dist/chunks/processSlashCommand-0.6.4-46w7k3kw.mjs +0 -9
  810. package/dist/chunks/prompt-0.6.4-1dfbspxp.mjs +0 -1
  811. package/dist/chunks/prompt-0.6.4-ax8j0qse.mjs +0 -1
  812. package/dist/chunks/prompts-0.6.4-avjtc7j4.mjs +0 -1
  813. package/dist/chunks/protocolHandler-0.6.4-z0382sns.mjs +0 -13
  814. package/dist/chunks/provider-0.6.4-dww4c5j2.mjs +0 -2
  815. package/dist/chunks/providerProfiles-0.6.4-phwwz4cg.mjs +0 -1
  816. package/dist/chunks/providerValidation-0.6.4-zctdw7r7.mjs +0 -6
  817. package/dist/chunks/rate-limit-options-0.6.4-sydaxbv7.mjs +0 -1
  818. package/dist/chunks/registerSubcommands-0.6.4-ejhhvkd5.mjs +0 -34
  819. package/dist/chunks/registry-0.6.4-kb0x4rx3.mjs +0 -1
  820. package/dist/chunks/release-notes-0.6.4-es6sgycw.mjs +0 -5
  821. package/dist/chunks/reload-plugins-0.6.4-z5560vpf.mjs +0 -2
  822. package/dist/chunks/remote-env-0.6.4-6ypd7mgt.mjs +0 -1
  823. package/dist/chunks/remoteBridgeCore-0.6.4-r2nre1by.mjs +0 -1
  824. package/dist/chunks/remoteSession-0.6.4-jhazvxam.mjs +0 -1
  825. package/dist/chunks/rename-0.6.4-wnm225zc.mjs +0 -1
  826. package/dist/chunks/replBridgeHandle-0.6.4-90waxyt2.mjs +0 -1
  827. package/dist/chunks/replLauncher-0.6.4-fqvqymes.mjs +0 -1
  828. package/dist/chunks/resume-0.6.4-2edgjvxb.mjs +0 -2
  829. package/dist/chunks/rewind-0.6.4-43tzjabn.mjs +0 -1
  830. package/dist/chunks/rootOptions-0.6.4-efwh7nb7.mjs +0 -1
  831. package/dist/chunks/sandbox-adapter-0.6.4-7ccq9g0r.mjs +0 -1
  832. package/dist/chunks/sandbox-toggle-0.6.4-ca6p1txa.mjs +0 -1
  833. package/dist/chunks/session-0.6.4-xqz0b6bv.mjs +0 -2
  834. package/dist/chunks/sessionDiscovery-0.6.4-zhn2re2r.mjs +0 -1
  835. package/dist/chunks/sessionFileAccessHooks-0.6.4-0s8vv82b.mjs +0 -1
  836. package/dist/chunks/sessionStorage-0.6.4-k27431kx.mjs +0 -1
  837. package/dist/chunks/settings-0.6.4-xg6qae4k.mjs +0 -1
  838. package/dist/chunks/setup-0.6.4-zc0wstra.mjs +0 -5
  839. package/dist/chunks/sinks-0.6.4-3rycgm4d.mjs +0 -1
  840. package/dist/chunks/skills-0.6.4-jwf0fht6.mjs +0 -1
  841. package/dist/chunks/startupProfiler-0.6.4-6c1wp85a.mjs +0 -1
  842. package/dist/chunks/startupUpdateCheck-0.6.4-xqbvq5b5.mjs +0 -1
  843. package/dist/chunks/state-0.6.4-p0ddysh2.mjs +0 -1
  844. package/dist/chunks/stats-0.6.4-hys6q4f4.mjs +0 -6
  845. package/dist/chunks/status-0.6.4-5f8q60ey.mjs +0 -1
  846. package/dist/chunks/stickers-0.6.4-tftjq5eh.mjs +0 -1
  847. package/dist/chunks/subprocessEnv-0.6.4-gz5jdaaq.mjs +0 -1
  848. package/dist/chunks/tasks-0.6.4-s9qwaetv.mjs +0 -1
  849. package/dist/chunks/teamHelpers-0.6.4-h72qp38f.mjs +0 -1
  850. package/dist/chunks/teammateModeSnapshot-0.6.4-ezcvghhw.mjs +0 -1
  851. package/dist/chunks/teleport-0.6.4-e668czw7.mjs +0 -1
  852. package/dist/chunks/terminalSetup-0.6.4-53azbkac.mjs +0 -1
  853. package/dist/chunks/theme-0.6.4-zhw8bpdv.mjs +0 -1
  854. package/dist/chunks/thinkback-0.6.4-cpckywc7.mjs +0 -1
  855. package/dist/chunks/thinkback-play-0.6.4-ke47vrva.mjs +0 -1
  856. package/dist/chunks/toolPool-0.6.4-whn705s5.mjs +0 -1
  857. package/dist/chunks/toolSearch-0.6.4-80h4rrgj.mjs +0 -1
  858. package/dist/chunks/tools-0.6.4-4kf64373.mjs +0 -1
  859. package/dist/chunks/trustedDevice-0.6.4-zbvda07m.mjs +0 -1
  860. package/dist/chunks/turndown.cjs-0.6.4-ghgzppms.mjs +0 -69
  861. package/dist/chunks/ultrareviewCommand-0.6.4-r028gcax.mjs +0 -4
  862. package/dist/chunks/update-0.6.4-a233wpzj.mjs +0 -86
  863. package/dist/chunks/upgrade-0.6.4-mx4jnstf.mjs +0 -1
  864. package/dist/chunks/upstreamproxy-0.6.4-4cmr0qtj.mjs +0 -14
  865. package/dist/chunks/url-handler-napi-0.6.4-vt0a3wdc.mjs +0 -1
  866. package/dist/chunks/usage-0.6.4-8kncs1zq.mjs +0 -1
  867. package/dist/chunks/util-0.6.4-afjsm52j.mjs +0 -1
  868. package/dist/chunks/utils-0.6.4-r5qbctxg.mjs +0 -1
  869. package/dist/chunks/vim-0.6.4-qb1hpv1s.mjs +0 -1
  870. package/dist/chunks/watcher-0.6.4-w81paz2g.mjs +0 -1
  871. package/dist/chunks/wiki-0.6.4-3wc3s65f.mjs +0 -132
  872. package/dist/chunks/worktree-0.6.4-hy75224j.mjs +0 -1
  873. package/dist/chunks/worktreeModeEnabled-0.6.4-7wyg7p08.mjs +0 -1
  874. package/dist/chunks/wrapper-0.6.4-vqj09efm.mjs +0 -7
  875. /package/dist/chunks/{cli-0.6.4-yrfkm9my.mjs → cli-0.6.6-py5db2ds.mjs} +0 -0
@@ -0,0 +1,88 @@
1
+ import{$a as bJ,Wa as yJ,Xa as xz,Ya as rz,Za as cz,_a as iz}from"./cli-0.6.6-7s8bhv18.mjs";import{bb as Tz}from"./cli-0.6.6-sh4pyhkw.mjs";import{jb as TJ,kb as xJ,lb as MJ,mb as wJ,nb as fJ}from"./cli-0.6.6-akqfmyeb.mjs";import{pb as kJ}from"./cli-0.6.6-5eww20j0.mjs";import{ge as VJ,he as lJ}from"./cli-0.6.6-rhcte81y.mjs";import{Ae as oz,Ce as DK,ye as EJ}from"./cli-0.6.6-hsgfy54f.mjs";import{Ie as mz,Ke as LJ,Oe as OJ}from"./cli-0.6.6-3t45jvj0.mjs";import{Om as UJ,Pm as CK,iG as JJ,jG as Cz,kG as KJ,kl as AJ,lG as ZJ,ll as vz,nG as $J,oG as YJ,oj as RJ,pG as XJ,pj as NK,pl as BK,qG as QJ,rG as WJ}from"./cli-0.6.6-23snct9d.mjs";import"./cli-0.6.6-37wcg59v.mjs";import"./cli-0.6.6-axvjexmr.mjs";import"./cli-0.6.6-at7yytqj.mjs";import"./cli-0.6.6-4qj9brbk.mjs";import"./cli-0.6.6-xtj65dsh.mjs";import"./cli-0.6.6-f6wc5yc6.mjs";import{hT as DJ,nT as _K}from"./cli-0.6.6-h02v66zq.mjs";import"./cli-0.6.6-76rkjh7v.mjs";import"./cli-0.6.6-ww6zy0p0.mjs";import"./cli-0.6.6-zx0cgvxq.mjs";import{tU as az,xU as RK}from"./cli-0.6.6-hetrxwwb.mjs";import"./cli-0.6.6-ar43nqjq.mjs";import"./cli-0.6.6-hyqpcaay.mjs";import"./cli-0.6.6-g9mdc3pd.mjs";import"./cli-0.6.6-heymhe69.mjs";import"./cli-0.6.6-fj9rpekf.mjs";import"./cli-0.6.6-s3y8t7we.mjs";import"./cli-0.6.6-4r50eqxg.mjs";import"./cli-0.6.6-1a0fnhh0.mjs";import"./cli-0.6.6-tk00k0e1.mjs";import"./cli-0.6.6-en2sexw5.mjs";import"./cli-0.6.6-92dvpnqv.mjs";import"./cli-0.6.6-efkct3rx.mjs";import{h0 as pz,k0 as PK}from"./cli-0.6.6-je6w2y3h.mjs";import"./cli-0.6.6-vy3wa7f9.mjs";import"./cli-0.6.6-zhky93y3.mjs";import"./cli-0.6.6-4nxq7s1k.mjs";import"./cli-0.6.6-ktwh4wvp.mjs";import"./cli-0.6.6-zwk7a82m.mjs";import"./cli-0.6.6-jqxfz350.mjs";import"./cli-0.6.6-0j61q3w5.mjs";import"./cli-0.6.6-hejk0ae6.mjs";import"./cli-0.6.6-arvcw19g.mjs";import"./cli-0.6.6-c267ckfv.mjs";import"./cli-0.6.6-8vnkmjet.mjs";import"./cli-0.6.6-4tp2yb2x.mjs";import"./cli-0.6.6-nymfz9tw.mjs";import"./cli-0.6.6-ythetarc.mjs";import{X4 as i,Y4 as FK}from"./cli-0.6.6-8yvh28tb.mjs";import"./cli-0.6.6-4jrf033h.mjs";import{x6 as G,y6 as pJ}from"./cli-0.6.6-wctj7gmc.mjs";import"./cli-0.6.6-x88t5n54.mjs";import"./cli-0.6.6-akjyt0hr.mjs";import"./cli-0.6.6-0w254y38.mjs";import{C_ as CJ,D_ as qK,Qda as yz,W7 as Wz,Y7 as HK,Yda as OK,c$ as fz,d$ as ez,e$ as zJ,f$ as cJ}from"./cli-0.6.6-q1j20ysc.mjs";import{bea as sz,cea as gJ,eea as Rz,lea as qz,tea as GK}from"./cli-0.6.6-b1wqaqv9.mjs";import"./cli-0.6.6-czhez59x.mjs";import"./cli-0.6.6-73eg8qn0.mjs";import{afa as PJ,ifa as jK}from"./cli-0.6.6-y305shhz.mjs";import"./cli-0.6.6-gk8s7mch.mjs";import"./cli-0.6.6-d5dexg4d.mjs";import"./cli-0.6.6-7r4esgkf.mjs";import{wga as zz,xga as NJ,zga as QK}from"./cli-0.6.6-a837m6n5.mjs";import{Cha as tz,cha as qJ,dha as uz,hha as oJ,zha as q}from"./cli-0.6.6-hcajyfhg.mjs";import"./cli-0.6.6-t3vvf5fy.mjs";import{Tha as g,_ha as VK}from"./cli-0.6.6-g6ja9jcs.mjs";import{eia as _J,mia as BJ,oia as WK}from"./cli-0.6.6-nw0nh4e0.mjs";import"./cli-0.6.6-ncqg4xxp.mjs";import"./cli-0.6.6-sqvm4f1y.mjs";import"./cli-0.6.6-ytskhcd3.mjs";import"./cli-0.6.6-mc9x1jry.mjs";import"./cli-0.6.6-kca8bnv6.mjs";import{xpa as I}from"./cli-0.6.6-py5db2ds.mjs";CK();NK();_K();jK();QK();qK();tz();HK();WK();VK();GK();OK();FK();BK();import{randomUUID as Sz}from"crypto";import{hostname as IJ,tmpdir as AK}from"os";import{basename as UK,join as LK,resolve as lz}from"path";WJ();pJ();lJ();cJ();gJ();tz();WJ();var dJ={type:"utf8",errorCorrectionLevel:"L",small:!0};async function aJ(z){return(await VJ(z,dJ)).split(`
2
+ `).filter((K)=>K.length>0)}function GJ(z){let J=z.write??(($)=>process.stdout.write($)),K=z.verbose,Y=0,O="idle",Z="Ready",R="",B="",U="",F="",L="",A=null,N=[],M=!1,E=null,P=0,x=0,_=1,f=null,k="single-session",b=new Map,d=null,S=0;function Xz($){let j=process.stdout.columns||80,w=0;for(let Gz of $.split(`
3
+ `)){if(Gz.length===0){w++;continue}let Nz=sz(Gz);w+=Math.max(1,Math.ceil(Nz/j))}if($.endsWith(`
4
+ `))w--;return w}function m($){J($),Y+=Xz($)}function a(){if(Y<=0)return;q(`[bridge:ui] clearStatusLines count=${Y}`),J(`\x1B[${Y}A`),J("\x1B[J"),Y=0}function $z($){a(),J($)}function n($){aJ($).then((j)=>{N=j,p()}).catch((j)=>{q(`QR code generation failed: ${j}`,{level:"error"})})}function o(){a();let $=fz[S%fz.length],j="";if(R)j+=G.dim(" · ")+G.dim(R);if(B)j+=G.dim(" · ")+G.dim(B);m(`${G.yellow($)} ${G.yellow("Connecting")}${j}
5
+ `)}function Vz(){t(),o(),d=setInterval(()=>{S++,o()},150)}function t(){if(d)clearInterval(d),d=null}function p(){if(O==="reconnecting"||O==="failed")return;a();let $=O==="idle";if(M)for(let Jz of N)m(`${G.dim(Jz)}
6
+ `);let j=ez,w=$?G.green:G.cyan,Nz=($?G.green:G.cyan)(Z),Oz="";if(R)Oz+=G.dim(" · ")+G.dim(R);if(B&&k!=="worktree")Oz+=G.dim(" · ")+G.dim(B);if(m(`${w(j)} ${Nz}${Oz}
7
+ `),_>1){let Jz=k==="worktree"?"New sessions will be created in an isolated worktree":"New sessions will be created in the current directory";m(` ${G.dim(`Capacity: ${x}/${_} · ${Jz}`)}
8
+ `);for(let[,Kz]of b){let r=Kz.title?Rz(Kz.title,35):G.dim("Attached"),Mz=QJ(r,Kz.url),Fz=Kz.activity,V=Fz&&Fz.type!=="result"&&Fz.type!=="error"?G.dim(` ${Rz(Fz.summary,40)}`):"";m(` ${Mz}${V}
9
+ `)}}if(_===1){let Jz=k==="single-session"?"Single session · exits when complete":k==="worktree"?`Capacity: ${x}/1 · New sessions will be created in an isolated worktree`:`Capacity: ${x}/1 · New sessions will be created in the current directory`;m(` ${G.dim(Jz)}
10
+ `)}if(_===1&&!$&&E&&Date.now()-P<JJ)m(` ${G.dim(Rz(E,60))}
11
+ `);let Qz=A??U;if(Qz){m(`
12
+ `);let Jz=$?$J(Qz):YJ(Qz),Kz=M?G.dim.italic("space to hide QR code"):G.dim.italic("space to show QR code"),r=f?G.dim.italic(" · w to toggle spawn mode"):"";m(`${G.dim(Jz)}
13
+ `),m(`${Kz}${r}
14
+ `)}}return{printBanner($,j){if(F=$.sessionIngressUrl,L=j,U=KJ(j,F),n(U),K)J(G.dim("Remote Control")+` v99.0.0
15
+ `);if(K){if($.spawnMode!=="single-session")J(G.dim("Spawn mode: ")+`${$.spawnMode}
16
+ `),J(G.dim("Max concurrent sessions: ")+`${$.maxSessions}
17
+ `);J(G.dim("Environment ID: ")+`${j}
18
+ `)}if($.sandbox)J(G.dim("Sandbox: ")+`${G.green("Enabled")}
19
+ `);J(`
20
+ `),Vz()},logSessionStart($,j){if(K){let w=Rz(j,80);$z(G.dim(`[${Cz()}]`)+` Session started: ${G.white(`"${w}"`)} (${G.dim($)})
21
+ `)}},logSessionComplete($,j){$z(G.dim(`[${Cz()}]`)+` Session ${G.green("completed")} (${qz(j)}) ${G.dim($)}
22
+ `)},logSessionFailed($,j){$z(G.dim(`[${Cz()}]`)+` Session ${G.red("failed")}: ${j} ${G.dim($)}
23
+ `)},logStatus($){$z(G.dim(`[${Cz()}]`)+` ${$}
24
+ `)},logVerbose($){if(K)$z(G.dim(`[${Cz()}] ${$}`)+`
25
+ `)},logError($){$z(G.red(`[${Cz()}] Error: ${$}`)+`
26
+ `)},logReconnected($){$z(G.dim(`[${Cz()}]`)+` ${G.green("Reconnected")} after ${qz($)}
27
+ `)},setRepoInfo($,j){R=$,B=j},updateIdleStatus(){t(),O="idle",Z="Ready",E=null,P=0,A=null,n(U),p()},setAttached($){if(t(),O="attached",Z="Connected",E=null,P=0,_<=1)A=ZJ($,L,F),n(A);p()},updateReconnectingStatus($,j){if(t(),a(),O="reconnecting",M)for(let Gz of N)m(`${G.dim(Gz)}
28
+ `);let w=fz[S%fz.length];S++,m(`${G.yellow(w)} ${G.yellow("Reconnecting")} ${G.dim("·")} ${G.dim(`retrying in ${$}`)} ${G.dim("·")} ${G.dim(`disconnected ${j}`)}
29
+ `)},updateFailedStatus($){t(),a(),O="failed";let j="";if(R)j+=G.dim(" · ")+G.dim(R);if(B)j+=G.dim(" · ")+G.dim(B);if(m(`${G.red(zJ)} ${G.red("Remote Control Failed")}${j}
30
+ `),m(`${G.dim(XJ)}
31
+ `),$)m(`${G.red($)}
32
+ `)},updateSessionStatus($,j,w,Gz){if(w.type==="tool_start")E=w.summary,P=Date.now();p()},clearStatus(){t(),a()},toggleQr(){M=!M,p()},updateSessionCount($,j,w){if(x===$&&_===j&&k===w)return;x=$,_=j,k=w},setSpawnModeDisplay($){if(f===$)return;if(f=$,$)k=$},addSession($,j){b.set($,{url:j})},updateSessionActivity($,j){let w=b.get($);if(!w)return;w.activity=j},setSessionTitle($,j){let w=b.get($);if(!w)return;if(w.title=j,O==="reconnecting"||O==="failed")return;if(_===1)O="titled",Z=Rz(j,40);p()},removeSession($){b.delete($)},refreshDisplay(){if(O==="reconnecting"||O==="failed")return;p()}}}OJ();PK();oJ();OJ();import{spawn as rJ}from"child_process";import{createWriteStream as iJ}from"fs";import{tmpdir as nJ}from"os";import{dirname as tJ,join as jJ}from"path";import{createInterface as HJ}from"readline";var sJ=10,eJ=10,zK=new Set(["PATH","HOME","USERPROFILE","HOMEPATH","HOMEDRIVE","USERNAME","USER","LOGNAME","TEMP","TMP","TMPDIR","SYSTEMROOT","SYSTEMDRIVE","COMSPEC","WINDIR","LANG","LC_ALL","LC_CTYPE","NODE_OPTIONS","NODE_PATH","NODE_ENV","CLAUDE_CODE_ENVIRONMENT_KIND","CLAUDE_CODE_FORCE_SANDBOX","CLAUDE_CODE_BUBBLEWRAP","CLAUDE_CODE_ENTRYPOINT","CLAUDE_CODE_COORDINATOR_MODE","CLAUDE_CODE_PERMISSIONS_VERSION","CLAUDE_CODE_PERMISSIONS_SETTING","TERM","COLORTERM","FORCE_COLOR","NO_COLOR"]);function JK(z,J){let K={};for(let Y of Object.keys(z))if(zK.has(Y))K[Y]=z[Y];if(K.CLAUDE_CODE_OAUTH_TOKEN=void 0,K.CLAUDE_CODE_ENVIRONMENT_KIND="bridge",J.sandbox)K.CLAUDE_CODE_FORCE_SANDBOX="1";if(K.CLAUDE_CODE_SESSION_ACCESS_TOKEN=J.accessToken,K.CLAUDE_CODE_POST_FOR_SESSION_INGRESS_V2="1",J.useCcrV2)K.CLAUDE_CODE_USE_CCR_V2="1",K.CLAUDE_CODE_WORKER_EPOCH=String(J.workerEpoch);return K}function Iz(z){return z.replace(/[^a-zA-Z0-9_-]/g,"_")}var KK={Read:"Reading",Write:"Writing",Edit:"Editing",MultiEdit:"Editing",Bash:"Running",Glob:"Searching",Grep:"Searching",WebFetch:"Fetching",WebSearch:"Searching",Task:"Running task",FileReadTool:"Reading",FileWriteTool:"Writing",FileEditTool:"Editing",GlobTool:"Searching",GrepTool:"Searching",BashTool:"Running",NotebookEditTool:"Editing notebook",LSP:"LSP"};function ZK(z,J){let K=KK[z]??z,Y=J.file_path??J.filePath??J.pattern??J.command?.slice(0,60)??J.url??J.query??"";if(Y)return`${K} ${Y}`;return K}function $K(z,J,K){let Y;try{Y=uz(z)}catch{return[]}if(!Y||typeof Y!=="object")return[];let O=Y,Z=[],R=Date.now();switch(O.type){case"assistant":{let B=O.message;if(!B)break;let U=B.content;if(!Array.isArray(U))break;for(let F of U){if(!F||typeof F!=="object")continue;let L=F;if(L.type==="tool_use"){let A=L.name??"Tool",N=L.input??{},M=ZK(A,N);Z.push({type:"tool_start",summary:M,timestamp:R}),K(`[bridge:activity] sessionId=${J} tool_use name=${A} ${XK(N)}`)}else if(L.type==="text"){let A=L.text??"";if(A.length>0)Z.push({type:"text",summary:A.slice(0,80),timestamp:R}),K(`[bridge:activity] sessionId=${J} text "${A.slice(0,100)}"`)}}break}case"result":{let B=O.subtype;if(B==="success")Z.push({type:"result",summary:"Session completed",timestamp:R}),K(`[bridge:activity] sessionId=${J} result subtype=success`);else if(B){let F=O.errors?.[0]??`Error: ${B}`;Z.push({type:"error",summary:F,timestamp:R}),K(`[bridge:activity] sessionId=${J} result subtype=${B} error="${F}"`)}else K(`[bridge:activity] sessionId=${J} result subtype=undefined`);break}default:break}return Z}function YK(z){if(z.parent_tool_use_id!=null||z.isSynthetic||z.isReplay)return;let K=z.message?.content,Y;if(typeof K==="string")Y=K;else if(Array.isArray(K)){for(let O of K)if(O&&typeof O==="object"&&O.type==="text"){Y=O.text;break}}return Y=Y?.trim(),Y?Y:void 0}function XK(z){let J=[];for(let[K,Y]of Object.entries(z)){if(typeof Y==="string")J.push(`${K}="${Y.slice(0,100)}"`);if(J.length>=3)break}return J.join(" ")}function gz(z){return{spawn(J,K){let Y=Iz(J.sessionId),O;if(z.debugFile){let _=z.debugFile.lastIndexOf(".");if(_>0)O=`${z.debugFile.slice(0,_)}-${Y}${z.debugFile.slice(_)}`;else O=`${z.debugFile}-${Y}`}else if(z.verbose)O=jJ(nJ(),"claude",`bridge-session-${Y}.log`);let Z=null,R;if(z.debugFile)R=jJ(tJ(z.debugFile),`bridge-transcript-${Y}.jsonl`),Z=iJ(R,{flags:"a"}),Z.on("error",(_)=>{z.onDebug(`[bridge:session] Transcript write error: ${_.message}`),Z=null}),z.onDebug(`[bridge:session] Transcript log: ${R}`);let B=[...z.scriptArgs,"--print","--sdk-url",J.sdkUrl,"--session-id",J.sessionId,"--input-format","stream-json","--output-format","stream-json","--replay-user-messages",...z.verbose?["--verbose"]:[],...O?["--debug-file",O]:[],...z.permissionMode?["--permission-mode",z.permissionMode]:[]],U=JK(z.env,{accessToken:J.accessToken,useCcrV2:J.useCcrV2,workerEpoch:J.workerEpoch,sandbox:z.sandbox});if(z.onDebug(`[bridge:session] Spawning sessionId=${J.sessionId} sdkUrl=${J.sdkUrl} accessToken=${J.accessToken?"present":"MISSING"}`),z.onDebug(`[bridge:session] Child args: ${B.join(" ")}`),O)z.onDebug(`[bridge:session] Debug log: ${O}`);let F=rJ(z.execPath,B,{cwd:K,stdio:["pipe","pipe","pipe"],env:U,windowsHide:!0});z.onDebug(`[bridge:session] sessionId=${J.sessionId} pid=${F.pid}`);let L=[],A=null,N=[],M=!1,E=!1;if(F.stderr)HJ({input:F.stderr}).on("line",(f)=>{if(z.verbose)process.stderr.write(f+`
33
+ `);if(N.length>=eJ)N.shift();N.push(f)});if(F.stdout)HJ({input:F.stdout}).on("line",(f)=>{if(Z)Z.write(f+`
34
+ `);if(z.onDebug(`[bridge:ws] sessionId=${J.sessionId} <<< ${mz(f)}`),z.verbose)process.stderr.write(f+`
35
+ `);let k=$K(f,J.sessionId,z.onDebug);for(let b of k){if(L.length>=sJ)L.shift();L.push(b),A=b,z.onActivity?.(J.sessionId,b)}{let b;try{b=uz(f)}catch{}if(b&&typeof b==="object"){let d=b;if(d.type==="control_request"){if(d.request?.subtype==="can_use_tool"&&z.onPermissionRequest)z.onPermissionRequest(J.sessionId,b,J.accessToken)}else if(d.type==="user"&&!E&&J.onFirstUserMessage){let S=YK(d);if(S)E=!0,J.onFirstUserMessage(S)}}}});let P=new Promise((_)=>{F.on("close",(f,k)=>{if(Z)Z.end(),Z=null;if(k==="SIGTERM"||k==="SIGINT")z.onDebug(`[bridge:session] sessionId=${J.sessionId} interrupted signal=${k} pid=${F.pid}`),_("interrupted");else if(f===0)z.onDebug(`[bridge:session] sessionId=${J.sessionId} completed exit_code=0 pid=${F.pid}`),_("completed");else z.onDebug(`[bridge:session] sessionId=${J.sessionId} failed exit_code=${f} pid=${F.pid}`),_("failed")}),F.on("error",(f)=>{z.onDebug(`[bridge:session] sessionId=${J.sessionId} spawn error: ${f.message}`),_("failed")})}),x={sessionId:J.sessionId,done:P,activities:L,accessToken:J.accessToken,lastStderr:N,get currentActivity(){return A},kill(){if(!F.killed)if(z.onDebug(`[bridge:session] Sending SIGTERM to sessionId=${J.sessionId} pid=${F.pid}`),process.platform==="win32")F.kill();else F.kill("SIGTERM")},forceKill(){if(!M&&F.pid)if(M=!0,z.onDebug(`[bridge:session] Sending SIGKILL to sessionId=${J.sessionId} pid=${F.pid}`),process.platform==="win32")F.kill();else F.kill("SIGKILL")},writeStdin(_){if(F.stdin&&!F.stdin.destroyed)z.onDebug(`[bridge:ws] sessionId=${J.sessionId} >>> ${mz(_)}`),F.stdin.write(_)},updateAccessToken(_){x.accessToken=_,x.writeStdin(qJ({type:"update_environment_variables",variables:{CLAUDE_CODE_SESSION_ACCESS_TOKEN:_}})+`
36
+ `),z.onDebug(`[bridge:session] Sent token refresh via stdin for sessionId=${J.sessionId}`)}};return x}}}RK();DK();var EK={connInitialMs:2000,connCapMs:120000,connGiveUpMs:600000,generalInitialMs:500,generalCapMs:30000,generalGiveUpMs:600000},yK=1000,vJ=32;async function hJ(){return PJ("tengu_ccr_bridge_multi_session")}function FJ(z){return z.connCapMs*2}function SJ(){if(CJ()||!process.argv[1])return[];return[process.argv[1]]}function TK(z,J,K){try{return z.spawn(J,K)}catch(Y){let O=g(Y);return yz(Error(`Session spawn failed: ${O}`)),O}}async function mJ(z,J,K,Y,O,Z,R,B=EK,U,F){let L=new AbortController;if(R.aborted)L.abort();else R.addEventListener("abort",()=>L.abort(),{once:!0});let A=L.signal,N=new Map,M=new Map,E=new Map,P=new Map,x=new Map,_=new Map,f=new Set,k=new Map,b=new Set,d=new Set,S=bJ(A);async function Xz(){let Q=!1,V=!1,y=[];for(let[H]of N){let D=E.get(H),v=x.get(H);if(!D||!v)continue;try{await Y.heartbeatWork(J,D,v),Q=!0}catch(u){if(q(`[bridge:heartbeat] Failed for sessionId=${H} workId=${D}: ${g(u)}`),u instanceof xz)if(zz("tengu_bridge_heartbeat_error",{status:u.status,error_type:u.status===401||u.status===403?"auth_failed":"fatal"}),u.status===401||u.status===403)y.push(H);else V=!0}}for(let H of y){Z.logVerbose(`Session ${H} token expired — re-queuing via bridge/reconnect`);try{await Y.reconnectSession(J,H),q(`[bridge:heartbeat] Re-queued sessionId=${H} via bridge/reconnect`)}catch(D){Z.logError(`Failed to refresh session ${H} token: ${g(D)}`),q(`[bridge:heartbeat] reconnectSession(${H}) failed: ${g(D)}`,{level:"error"})}}if(V)return"fatal";if(y.length>0)return"auth_failed";return Q?"ok":"failed"}let m=new Set,a=F?kJ({getAccessToken:F,onRefresh:(Q,V)=>{let y=N.get(Q);if(!y)return;if(m.has(Q))Z.logVerbose(`Refreshing session ${Q} token via bridge/reconnect`),Y.reconnectSession(J,Q).catch((H)=>{Z.logError(`Failed to refresh session ${Q} token: ${g(H)}`),q(`[bridge:token] reconnectSession(${Q}) failed: ${g(H)}`,{level:"error"})});else y.updateAccessToken(V)},label:"bridge"}):null,$z=Date.now(),n=new Set;function o(Q){n.add(Q),Q.finally(()=>n.delete(Q))}let Vz=0,t=0,p=null,$=null,j=null,w=null,Gz=!1;if(q(`[bridge:work] Starting poll loop spawnMode=${z.spawnMode} maxSessions=${z.maxSessions} environmentId=${J}`),Wz("info","bridge_loop_started",{max_sessions:z.maxSessions,spawn_mode:z.spawnMode}),Z.printBanner(z,J),Z.updateSessionCount(0,z.maxSessions,z.spawnMode),U)Z.setAttached(U);function Nz(){Z.updateSessionCount(N.size,z.maxSessions,z.spawnMode);for(let[u,X]of N){let T=X.currentActivity;if(T)Z.updateSessionActivity(P.get(u)??u,T)}if(N.size===0){Z.updateIdleStatus();return}let[Q,V]=[...N.entries()].pop(),y=M.get(Q);if(!y)return;let H=V.currentActivity;if(!H||H.type==="result"||H.type==="error"){if(z.maxSessions>1)Z.refreshDisplay();return}let D=qz(Date.now()-y),v=V.activities.filter((u)=>u.type==="tool_start").slice(-5).map((u)=>u.summary);Z.updateSessionStatus(Q,D,H,v)}function Oz(){Qz(),Nz(),w=setInterval(Nz,yK)}function Qz(){if(w)clearInterval(w),w=null}function Jz(Q,V,y){return(H)=>{let D=E.get(Q);N.delete(Q),M.delete(Q),E.delete(Q),x.delete(Q);let v=P.get(Q)??Q;P.delete(Q),Z.removeSession(v),d.delete(v),m.delete(Q);let u=_.get(Q);if(u)clearTimeout(u),_.delete(Q);a?.cancel(Q),S.wake();let X=b.delete(Q),T=X&&H==="interrupted"?"failed":H,c=Date.now()-V;q(`[bridge:session] sessionId=${Q} workId=${D??"unknown"} exited status=${T} duration=${qz(c)}`),zz("tengu_bridge_session_done",{status:T,duration_ms:c}),Wz("info","bridge_session_done",{status:T,duration_ms:c}),Z.clearStatus(),Qz();let s=y.lastStderr.length>0?y.lastStderr.join(`
37
+ `):void 0,Yz;switch(T){case"completed":Z.logSessionComplete(Q,c);break;case"failed":if(!X&&!A.aborted)Yz=s??"Process exited with error",Z.logSessionFailed(Q,Yz),yz(Error(`Bridge session failed: ${Yz}`));break;case"interrupted":Z.logVerbose(`Session ${Q} interrupted`);break}if(T!=="interrupted"&&D)o(kz(Y,J,D,Z,B.stopWorkBaseDelayMs)),f.add(D);let Zz=k.get(Q);if(Zz)k.delete(Q),o(vz(Zz.worktreePath,Zz.worktreeBranch,Zz.gitRoot,Zz.hookBased).catch((l)=>Z.logVerbose(`Failed to remove worktree ${Zz.worktreePath}: ${g(l)}`)));if(T!=="interrupted"&&!A.aborted)if(z.spawnMode!=="single-session")o(Y.archiveSession(v).catch((l)=>Z.logVerbose(`Failed to archive session ${Q}: ${g(l)}`))),q(`[bridge:session] Session ${T}, returning to idle (multi-session mode)`);else{q(`[bridge:session] Session ${T}, aborting poll loop to tear down environment`),L.abort();return}if(!A.aborted)Oz()}}if(!U)Oz();while(!A.aborted){let Q=Tz();try{let V=await Y.pollForWork(J,K,A,Q.reclaim_older_than_ms);if(p!==null||$!==null){let X=Date.now()-(p??$??Date.now());Z.logReconnected(X),q(`[bridge:poll] Reconnected after ${qz(X)}`),zz("tengu_bridge_reconnected",{disconnected_ms:X})}if(Vz=0,t=0,p=null,$=null,j=null,!V){if(N.size>=z.maxSessions){let T=Q.multisession_poll_interval_ms_at_capacity;if(Q.non_exclusive_heartbeat_interval_ms>0){zz("tengu_bridge_heartbeat_mode_entered",{active_sessions:N.size,heartbeat_interval_ms:Q.non_exclusive_heartbeat_interval_ms});let c=T>0?Date.now()+T:null,s="ok",Yz=0;while(!A.aborted&&N.size>=z.maxSessions&&(c===null||Date.now()<c)){let l=Tz();if(l.non_exclusive_heartbeat_interval_ms<=0)break;let _z=S.signal();if(s=await Xz(),s==="auth_failed"||s==="fatal"){_z.cleanup();break}Yz++,await i(l.non_exclusive_heartbeat_interval_ms,_z.signal),_z.cleanup()}let Zz=s==="auth_failed"||s==="fatal"?s:A.aborted?"shutdown":N.size<z.maxSessions?"capacity_changed":c!==null&&Date.now()>=c?"poll_due":"config_disabled";if(zz("tengu_bridge_heartbeat_mode_exited",{reason:Zz,heartbeat_cycles:Yz,active_sessions:N.size}),Zz==="poll_due")q(`[bridge:poll] Heartbeat poll_due after ${Yz} cycles — falling through to pollForWork`);if(s==="auth_failed"||s==="fatal"){let l=S.signal();await i(T>0?T:Q.non_exclusive_heartbeat_interval_ms,l.signal),l.cleanup()}}else if(T>0){let c=S.signal();await i(T,c.signal),c.cleanup()}}else{let T=N.size>0?Q.multisession_poll_interval_ms_partial_capacity:Q.multisession_poll_interval_ms_not_at_capacity;await i(T,A)}continue}let H=N.size>=z.maxSessions;if(f.has(V.id)){if(q(`[bridge:work] Skipping already-completed workId=${V.id}`),H){let X=S.signal();if(Q.non_exclusive_heartbeat_interval_ms>0)await Xz(),await i(Q.non_exclusive_heartbeat_interval_ms,X.signal);else if(Q.multisession_poll_interval_ms_at_capacity>0)await i(Q.multisession_poll_interval_ms_at_capacity,X.signal);X.cleanup()}else await i(1000,A);continue}let D;try{D=TJ(V.secret)}catch(X){let T=g(X);if(Z.logError(`Failed to decode work secret for workId=${V.id}: ${T}`),zz("tengu_bridge_work_secret_failed",{}),f.add(V.id),o(kz(Y,J,V.id,Z,B.stopWorkBaseDelayMs)),H){let c=S.signal();if(Q.non_exclusive_heartbeat_interval_ms>0)await Xz(),await i(Q.non_exclusive_heartbeat_interval_ms,c.signal);else if(Q.multisession_poll_interval_ms_at_capacity>0)await i(Q.multisession_poll_interval_ms_at_capacity,c.signal);c.cleanup()}continue}let v=async()=>{q(`[bridge:work] Acknowledging workId=${V.id}`);try{await Y.acknowledgeWork(J,V.id,D.session_ingress_token)}catch(X){q(`[bridge:work] Acknowledge failed workId=${V.id}: ${g(X)}`)}},u=V.data.type;switch(V.data.type){case"healthcheck":await v(),q("[bridge:work] Healthcheck received"),Z.logVerbose("Healthcheck received");break;case"session":{let X=V.data.id;try{yJ(X,"session_id")}catch{await v(),Z.logError(`Invalid session_id received: ${X}`);break}let T=N.get(X);if(T){T.updateAccessToken(D.session_ingress_token),x.set(X,D.session_ingress_token),E.set(X,V.id),a?.schedule(X,D.session_ingress_token),q(`[bridge:work] Updated access token for existing sessionId=${X} workId=${V.id}`),await v();break}if(N.size>=z.maxSessions){q(`[bridge:work] At capacity (${N.size}/${z.maxSessions}), cannot spawn new session for workId=${V.id}`);break}await v();let c=Date.now(),s,Yz=!1,Zz;if(D.use_code_sessions===!0||_J(process.env.CLAUDE_BRIDGE_USE_CCR_V2)){s=wJ(z.apiBaseUrl,X);for(let W=1;W<=2;W++)try{Zz=await fJ(s,D.session_ingress_token),Yz=!0,q(`[bridge:session] CCR v2: registered worker sessionId=${X} epoch=${Zz} attempt=${W}`);break}catch(C){let h=g(C);if(W<2){if(q(`[bridge:session] CCR v2: registerWorker attempt ${W} failed, retrying: ${h}`),await i(2000,A),A.aborted)break;continue}Z.logError(`CCR v2 worker registration failed for session ${X}: ${h}`),yz(Error(`registerWorker failed: ${h}`)),f.add(V.id),o(kz(Y,J,V.id,Z,B.stopWorkBaseDelayMs))}if(!Yz)break}else s=xJ(z.sessionIngressUrl,X);let{spawnMode:l,dir:_z}=z,Uz=0;if(l==="worktree"&&(U===void 0||!MJ(X,U))){let W=Date.now();try{let C=await AJ(`bridge-${Iz(X)}`);Uz=Date.now()-W,k.set(X,{worktreePath:C.worktreePath,worktreeBranch:C.worktreeBranch,gitRoot:C.gitRoot,hookBased:C.hookBased}),_z=C.worktreePath,q(`[bridge:session] Created worktree for sessionId=${X} at ${C.worktreePath}`)}catch(C){let h=g(C);Z.logError(`Failed to create worktree for session ${X}: ${h}`),yz(Error(`Worktree creation failed: ${h}`)),f.add(V.id),o(kz(Y,J,V.id,Z,B.stopWorkBaseDelayMs));break}}q(`[bridge:session] Spawning sessionId=${X} sdkUrl=${s}`);let e=pz(X),Lz=TK(O,{sessionId:X,sdkUrl:s,accessToken:D.session_ingress_token,useCcrV2:Yz,workerEpoch:Zz,onFirstUserMessage:(W)=>{if(d.has(e))return;d.add(e);let C=mK(W);Z.setSessionTitle(e,C),q(`[bridge:title] derived title for ${e}: ${C}`),import("./createSession-0.6.6-mphh6gbj.mjs").then(({updateBridgeSessionTitle:h})=>h(e,C,{baseUrl:z.apiBaseUrl})).catch((h)=>q(`[bridge:title] failed to update title for ${e}: ${h}`,{level:"error"}))}},_z);if(typeof Lz==="string"){Z.logError(`Failed to spawn session ${X}: ${Lz}`);let W=k.get(X);if(W)k.delete(X),o(vz(W.worktreePath,W.worktreeBranch,W.gitRoot,W.hookBased).catch((C)=>Z.logVerbose(`Failed to remove worktree ${W.worktreePath}: ${g(C)}`)));f.add(V.id),o(kz(Y,J,V.id,Z,B.stopWorkBaseDelayMs));break}let Dz=Lz,Az=Date.now()-c;zz("tengu_bridge_session_started",{active_sessions:N.size,spawn_mode:l,in_worktree:k.has(X),spawn_duration_ms:Az,worktree_create_ms:Uz,inProtectedNamespace:BJ()}),Wz("info","bridge_session_started",{spawn_mode:l,in_worktree:k.has(X),spawn_duration_ms:Az,worktree_create_ms:Uz}),N.set(X,Dz),E.set(X,V.id),x.set(X,D.session_ingress_token),P.set(X,e);let wz=Date.now();M.set(X,wz),Z.logSessionStart(X,`Session ${X}`);let Ez=Iz(X),jz;if(z.debugFile){let W=z.debugFile.lastIndexOf(".");if(W>0)jz=`${z.debugFile.slice(0,W)}-${Ez}${z.debugFile.slice(W)}`;else jz=`${z.debugFile}-${Ez}`}else if(z.verbose)jz=LK(AK(),"claude",`bridge-session-${Ez}.log`);if(jz)Z.logVerbose(`Debug log: ${jz}`);Z.addSession(e,UJ(e,z.sessionIngressUrl)),Oz(),Z.setAttached(e),uK(e,z.apiBaseUrl).then((W)=>{if(W&&N.has(X))d.add(e),Z.setSessionTitle(e,W),q(`[bridge:title] server title for ${e}: ${W}`)}).catch((W)=>q(`[bridge:title] failed to fetch title for ${e}: ${W}`,{level:"error"}));let Bz=z.sessionTimeoutMs??EJ;if(Bz>0){let W=setTimeout(fK,Bz,X,Bz,Z,b,Dz);_.set(X,W)}if(Yz)m.add(X);a?.schedule(X,D.session_ingress_token),Dz.done.then(Jz(X,wz,Dz));break}default:await v(),q(`[bridge:work] Unknown work type: ${u}, skipping`);break}if(H){let X=S.signal();if(Q.non_exclusive_heartbeat_interval_ms>0)await Xz(),await i(Q.non_exclusive_heartbeat_interval_ms,X.signal);else if(Q.multisession_poll_interval_ms_at_capacity>0)await i(Q.multisession_poll_interval_ms_at_capacity,X.signal);X.cleanup()}}catch(V){if(A.aborted)break;if(V instanceof xz){if(Gz=!0,cz(V.errorType))Z.logStatus(V.message);else if(iz(V))q(`[bridge:work] Suppressed 403 error: ${V.message}`);else Z.logError(V.message),yz(V);zz("tengu_bridge_fatal_error",{status:V.status,error_type:V.errorType}),Wz(cz(V.errorType)?"info":"error","bridge_fatal_error",{status:V.status,error_type:V.errorType});break}let y=LJ(V);if(MK(V)||wK(V)){let H=Date.now();if(j!==null&&H-j>FJ(B))q(`[bridge:work] Detected system sleep (${Math.round((H-j)/1000)}s gap), resetting error budget`),Wz("info","bridge_poll_sleep_detected",{gapMs:H-j}),p=null,Vz=0,$=null,t=0;if(j=H,!p)p=H;let D=H-p;if(D>=B.connGiveUpMs){Z.logError(`Server unreachable for ${Math.round(D/60000)} minutes, giving up.`),zz("tengu_bridge_poll_give_up",{error_type:"connection",elapsed_ms:D}),Wz("error","bridge_poll_give_up",{error_type:"connection",elapsed_ms:D}),Gz=!0;break}$=null,t=0,Vz=Vz?Math.min(Vz*2,B.connCapMs):B.connInitialMs;let v=dz(Vz);if(Z.logVerbose(`Connection error, retrying in ${bz(v)} (${Math.round(D/1000)}s elapsed): ${y}`),Z.updateReconnectingStatus(bz(v),qz(D)),Tz().non_exclusive_heartbeat_interval_ms>0)await Xz();await i(v,A)}else{let H=Date.now();if(j!==null&&H-j>FJ(B))q(`[bridge:work] Detected system sleep (${Math.round((H-j)/1000)}s gap), resetting error budget`),Wz("info","bridge_poll_sleep_detected",{gapMs:H-j}),p=null,Vz=0,$=null,t=0;if(j=H,!$)$=H;let D=H-$;if(D>=B.generalGiveUpMs){Z.logError(`Persistent errors for ${Math.round(D/60000)} minutes, giving up.`),zz("tengu_bridge_poll_give_up",{error_type:"general",elapsed_ms:D}),Wz("error","bridge_poll_give_up",{error_type:"general",elapsed_ms:D}),Gz=!0;break}p=null,Vz=0,t=t?Math.min(t*2,B.generalCapMs):B.generalInitialMs;let v=dz(t);if(Z.logVerbose(`Poll failed, retrying in ${bz(v)} (${Math.round(D/1000)}s elapsed): ${y}`),Z.updateReconnectingStatus(bz(v),qz(D)),Tz().non_exclusive_heartbeat_interval_ms>0)await Xz();await i(v,A)}}}Qz(),Z.clearStatus();let Kz=Date.now()-$z;zz("tengu_bridge_shutdown",{active_sessions:N.size,loop_duration_ms:Kz}),Wz("info","bridge_shutdown",{active_sessions:N.size,loop_duration_ms:Kz});let r=new Set(N.keys());if(U)r.add(U);let Mz=new Map(P);if(N.size>0){q(`[bridge:shutdown] Shutting down ${N.size} active session(s)`),Z.logStatus(`Shutting down ${N.size} active session(s)…`);let Q=new Map(E);for(let[y,H]of N.entries())q(`[bridge:shutdown] Sending SIGTERM to sessionId=${y}`),H.kill();let V=new AbortController;await Promise.race([Promise.allSettled([...N.values()].map((y)=>y.done)),i(B.shutdownGraceMs??30000,V.signal)]),V.abort();for(let[y,H]of N.entries())q(`[bridge:shutdown] Force-killing stuck sessionId=${y}`),H.forceKill();for(let y of _.values())clearTimeout(y);if(_.clear(),a?.cancelAll(),k.size>0){let y=[...k.values()];k.clear(),q(`[bridge:shutdown] Cleaning up ${y.length} worktree(s)`),await Promise.allSettled(y.map((H)=>vz(H.worktreePath,H.worktreeBranch,H.gitRoot,H.hookBased)))}await Promise.allSettled([...Q.entries()].map(([y,H])=>{return Y.stopWork(J,H,!0).catch((D)=>Z.logVerbose(`Failed to stop work ${H} for session ${y}: ${g(D)}`))}))}if(n.size>0)await Promise.allSettled([...n]);if(r.size>0)q(`[bridge:shutdown] Archiving ${r.size} session(s)`),await Promise.allSettled([...r].map((Q)=>Y.archiveSession(Mz.get(Q)??pz(Q)).catch((V)=>Z.logVerbose(`Failed to archive session ${Q}: ${g(V)}`))));try{await Y.deregisterEnvironment(J),q("[bridge:shutdown] Environment deregistered, bridge offline"),Z.logVerbose("Environment deregistered.")}catch(Q){Z.logVerbose(`Failed to deregister environment: ${g(Q)}`)}let{clearBridgePointer:Fz}=await import("./bridgePointer-0.6.6-cba0ahq2.mjs");await Fz(z.dir),Z.logVerbose("Environment offline.")}var xK=new Set(["ECONNREFUSED","ECONNRESET","ETIMEDOUT","ENETUNREACH","EHOSTUNREACH"]);function MK(z){if(z&&typeof z==="object"&&"code"in z&&typeof z.code==="string"&&xK.has(z.code))return!0;return!1}function wK(z){return!!z&&typeof z==="object"&&"code"in z&&typeof z.code==="string"&&z.code==="ERR_BAD_RESPONSE"}function dz(z){return Math.max(0,z+z*0.25*(2*Math.random()-1))}function bz(z){return z>=1000?`${(z/1000).toFixed(1)}s`:`${Math.round(z)}ms`}async function kz(z,J,K,Y,O=1000){for(let R=1;R<=3;R++)try{await z.stopWork(J,K,!1),q(`[bridge:work] stopWork succeeded for workId=${K} on attempt ${R}/3`);return}catch(B){if(B instanceof xz){if(iz(B))q(`[bridge:work] Suppressed stopWork 403 for ${K}: ${B.message}`);else Y.logError(`Failed to stop work ${K}: ${B.message}`);Wz("error","bridge_stop_work_failed",{attempts:R,fatal:!0});return}let U=g(B);if(R<3){let F=dz(O*Math.pow(2,R-1));Y.logVerbose(`Failed to stop work ${K} (attempt ${R}/3), retrying in ${bz(F)}: ${U}`),await i(F)}else Y.logError(`Failed to stop work ${K} after 3 attempts: ${U}`),Wz("error","bridge_stop_work_failed",{attempts:3})}}function fK(z,J,K,Y,O){q(`[bridge:session] sessionId=${z} timed out after ${qz(J)}`),zz("tengu_bridge_session_timeout",{timeout_ms:J}),K.logSessionFailed(z,`Session timed out after ${qz(J)}`),Y.add(z),O.kill()}var kK=["session","same-dir","worktree"];function bK(z){if(z==="session")return"single-session";if(z==="same-dir")return"same-dir";if(z==="worktree")return"worktree";return`--spawn requires one of: ${kK.join(", ")} (got: ${z??"<missing>"})`}function IK(z){let J=z===void 0?NaN:parseInt(z,10);if(isNaN(J)||J<1)return`--capacity requires a positive integer (got: ${z??"<missing>"})`;return J}function vK(z){let J=!1,K=!1,Y,O,Z,R,B=!1,U,F,L,A,N=!1;for(let E=0;E<z.length;E++){let P=z[E];if(P==="--help"||P==="-h")B=!0;else if(P==="--verbose"||P==="-v")J=!0;else if(P==="--sandbox")K=!0;else if(P==="--no-sandbox")K=!1;else if(P==="--debug-file"&&E+1<z.length)Y=lz(z[++E]);else if(P.startsWith("--debug-file="))Y=lz(P.slice(13));else if(P==="--session-timeout"&&E+1<z.length)O=parseInt(z[++E],10)*1000;else if(P.startsWith("--session-timeout="))O=parseInt(P.slice(18),10)*1000;else if(P==="--permission-mode"&&E+1<z.length)Z=z[++E];else if(P.startsWith("--permission-mode="))Z=P.slice(18);else if(P==="--name"&&E+1<z.length)R=z[++E];else if(P.startsWith("--name="))R=P.slice(7);else if(P==="--spawn"||P.startsWith("--spawn=")){if(U!==void 0)return M("--spawn may only be specified once");let x=P.startsWith("--spawn=")?P.slice(8):z[++E],_=bK(x);if(_==="single-session"||_==="same-dir"||_==="worktree")U=_;else return M(_)}else if(P==="--capacity"||P.startsWith("--capacity=")){if(F!==void 0)return M("--capacity may only be specified once");let x=P.startsWith("--capacity=")?P.slice(11):z[++E],_=IK(x);if(typeof _==="number")F=_;else return M(_)}else if(P==="--create-session-in-dir")L=!0;else if(P==="--no-create-session-in-dir")L=!1;else return M(`Unknown argument: ${P}
38
+ Run 'claude remote-control --help' for usage.`)}if(U==="single-session"&&F!==void 0)return M("--capacity cannot be used with --spawn=session (single-session mode has fixed capacity 1).");if((A||N)&&(U!==void 0||F!==void 0||L!==void 0))return M("--session-id and --continue cannot be used with --spawn, --capacity, or --create-session-in-dir.");if(A&&N)return M("--session-id and --continue cannot be used together.");return{verbose:J,sandbox:K,debugFile:Y,sessionTimeoutMs:O,permissionMode:Z,name:R,spawnMode:U,capacity:F,createSessionInDir:L,sessionId:A,continueSession:N,help:B};function M(E){return{verbose:J,sandbox:K,debugFile:Y,sessionTimeoutMs:O,permissionMode:Z,name:R,spawnMode:U,capacity:F,createSessionInDir:L,sessionId:A,continueSession:N,help:B,error:E}}}async function hK(){let{EXTERNAL_PERMISSION_MODES:z}=await import("./permissions-0.6.6-8wcv4q7d.mjs"),J=z.join(", "),K=await hJ(),Y=K?` --spawn <mode> Spawn mode: same-dir, worktree, session
39
+ (default: same-dir)
40
+ --capacity <N> Max concurrent sessions in worktree or
41
+ same-dir mode (default: ${vJ})
42
+ --[no-]create-session-in-dir Pre-create a session in the current
43
+ directory; in worktree mode this session
44
+ stays in cwd while on-demand sessions get
45
+ isolated worktrees (default: on)
46
+ `:"",R=`
47
+ Remote Control - Connect your local environment to claude.ai/code
48
+
49
+ USAGE
50
+ claude remote-control [options]
51
+ OPTIONS
52
+ --name <name> Name for the session (shown in claude.ai/code)
53
+ --permission-mode <mode> Permission mode for spawned sessions
54
+ (${J})
55
+ --debug-file <path> Write debug logs to file
56
+ -v, --verbose Enable verbose output
57
+ -h, --help Show this help
58
+ ${Y}
59
+ DESCRIPTION
60
+ Remote Control allows you to control sessions on your local device from
61
+ claude.ai/code (https://claude.ai/code). Run this command in the
62
+ directory you want to work in, then connect from the Claude app or web.
63
+ ${K?`
64
+ Remote Control runs as a persistent server that accepts multiple concurrent
65
+ sessions in the current directory. One session is pre-created on start so
66
+ you have somewhere to type immediately. Use --spawn=worktree to isolate
67
+ each on-demand session in its own git worktree, or --spawn=session for
68
+ the classic single-session mode (exits when that session ends). Press 'w'
69
+ during runtime to toggle between same-dir and worktree.
70
+ `:""}
71
+ NOTES
72
+ - You must be logged in with a Claude account that has a subscription
73
+ - Run \`claude\` first in the directory to accept the workspace trust dialog
74
+ ${K?` - Worktree mode requires a git repository or WorktreeCreate/WorktreeRemove hooks
75
+ `:""}`;console.log(R)}var SK=80;function mK(z){let J=z.replace(/\s+/g," ").trim();return Rz(J,SK)}async function uK(z,J){let{getBridgeSession:K}=await import("./createSession-0.6.6-mphh6gbj.mjs");return(await K(z,{baseUrl:J}))?.title||void 0}async function kZ(z){let J=vK(z);if(J.help){await hK();return}if(J.error)console.error(`Error: ${J.error}`),process.exit(1);let{verbose:K,sandbox:Y,debugFile:O,sessionTimeoutMs:Z,permissionMode:R,name:B,spawnMode:U,capacity:F,createSessionInDir:L,sessionId:A,continueSession:N}=J,M=A,E,P=U!==void 0||F!==void 0||L!==void 0;if(R!==void 0){let{PERMISSION_MODES:W}=await import("./permissions-0.6.6-8wcv4q7d.mjs"),C=W;if(!C.includes(R))console.error(`Error: Invalid permission mode '${R}'. Valid modes: ${C.join(", ")}`),process.exit(1)}let x=lz("."),{enableConfigs:_,checkHasTrustDialogAccepted:f}=await import("./config-0.6.6-2fm368ym.mjs");_();let{initSinks:k}=await import("./sinks-0.6.6-mq00wrfa.mjs");k();let b=await hJ();if(P&&!b)await NJ("tengu_bridge_multi_session_denied",{used_spawn:U!==void 0,used_capacity:F!==void 0,used_create_session_in_dir:L!==void 0}),await Promise.race([Promise.all([DJ(),RJ()]),i(500,void 0,{unref:!0})]).catch(()=>{}),console.error("Error: Multi-session Remote Control is not enabled for your account yet."),process.exit(1);let{setOriginalCwd:d,setCwdState:S}=await import("./state-0.6.6-w2grqwqw.mjs");if(d(x),S(x),!f())console.error(`Error: Workspace not trusted. Please run \`claude\` in ${x} first to review and accept the workspace trust dialog.`),process.exit(1);let{clearOAuthTokenCache:Xz,checkAndRefreshOAuthTokenIfNeeded:m}=await import("./auth-0.6.6-61djjn63.mjs"),{getBridgeAccessToken:a,getBridgeBaseUrl:$z}=await import("./bridgeConfig-0.6.6-fvzjs1pa.mjs");if(!a())console.error(oz),process.exit(1);let{getGlobalConfig:o,saveGlobalConfig:Vz,getCurrentProjectConfig:t,saveCurrentProjectConfig:p}=await import("./config-0.6.6-2fm368ym.mjs");if(!o().remoteDialogSeen){let C=(await import("readline")).createInterface({input:process.stdin,output:process.stdout});console.log(`
76
+ Remote Control lets you access this CLI session from the web (claude.ai/code)
77
+ or the Claude app, so you can pick up where you left off on any device.
78
+
79
+ You can disconnect remote access anytime by running /remote-control again.
80
+ `);let h=await new Promise((Hz)=>{C.question("Enable Remote Control? (y/n) ",Hz)});if(C.close(),Vz((Hz)=>{if(Hz.remoteDialogSeen)return Hz;return{...Hz,remoteDialogSeen:!0}}),h.toLowerCase()!=="y"&&h.toLowerCase()!=="yes")process.exit(0)}let $=$z();if($.startsWith("http://")&&!$.includes("localhost")&&!$.includes("127.0.0.1"))console.error("Error: Remote Control base URL uses HTTP. Only HTTPS or localhost HTTP is allowed."),process.exit(1);let j=process.env.CLAUDE_BRIDGE_SESSION_INGRESS_URL||$,{getBranch:w,getRemoteUrl:Gz,findGitRoot:Nz}=await import("./git-0.6.6-rw5vzxwm.mjs"),{hasWorktreeCreateHook:Oz}=await import("./hooks-0.6.6-zy3p5ymd.mjs"),Qz=Oz()||Nz(x)!==null,Jz=b?t().remoteControlSpawnMode:void 0;if(Jz==="worktree"&&!Qz)console.error("Warning: Saved spawn mode is worktree but this directory is not a git repository. Falling back to same-dir."),Jz=void 0,p((W)=>{if(W.remoteControlSpawnMode===void 0)return W;return{...W,remoteControlSpawnMode:void 0}});if(b&&!Jz&&Qz&&U===void 0&&!M&&process.stdin.isTTY){let C=(await import("readline")).createInterface({input:process.stdin,output:process.stdout});console.log(`
81
+ Claude Remote Control is launching in spawn mode which lets you create new sessions in this project from Claude Code on Web or your Mobile app. Learn more here: https://code.claude.com/docs/en/remote-control
82
+
83
+ Spawn mode for this project:
84
+ `+` [1] same-dir — sessions share the current directory (default)
85
+ `+` [2] worktree — each session gets an isolated git worktree
86
+
87
+ `+`This can be changed later or explicitly set with --spawn=same-dir or --spawn=worktree.
88
+ `);let h=await new Promise((Pz)=>{C.question("Choose [1/2] (default: 1): ",Pz)});C.close();let Hz=h.trim()==="2"?"worktree":"same-dir";Jz=Hz,zz("tengu_bridge_spawn_mode_chosen",{spawn_mode:Hz}),p((Pz)=>{if(Pz.remoteControlSpawnMode===Hz)return Pz;return{...Pz,remoteControlSpawnMode:Hz}})}let Kz,r;if(M)r="single-session",Kz="resume";else if(U!==void 0)r=U,Kz="flag";else if(Jz!==void 0)r=Jz,Kz="saved";else r=b?"same-dir":"single-session",Kz="gate_default";let Mz=r==="single-session"?1:F??vJ,Fz=L??!0;if(!M){let{clearBridgePointer:W}=await import("./bridgePointer-0.6.6-cba0ahq2.mjs");await W(x)}if(r==="worktree"&&!Qz)console.error("Error: Worktree mode requires a git repository or WorktreeCreate hooks configured. Use --spawn=session for single-session mode."),process.exit(1);let Q=await w(),V=await Gz(),y=IJ(),H=Sz(),{handleOAuth401Error:D}=await import("./auth-0.6.6-61djjn63.mjs"),v=rz({baseUrl:$,getAccessToken:a,runnerVersion:"99.0.0",onDebug:q,onAuth401:D,getTrustedDeviceToken:az}),u,X={dir:x,machineName:y,branch:Q,gitRepoUrl:V,maxSessions:Mz,spawnMode:r,verbose:K,sandbox:Y,bridgeId:H,workerType:"claude_code",environmentId:Sz(),reuseEnvironmentId:u,apiBaseUrl:$,sessionIngressUrl:j,debugFile:O,sessionTimeoutMs:Z};q(`[bridge:init] bridgeId=${H}${u?` reuseEnvironmentId=${u}`:""} dir=${x} branch=${Q} gitRepoUrl=${V} machine=${y}`),q(`[bridge:init] apiBaseUrl=${$} sessionIngressUrl=${j}`),q(`[bridge:init] sandbox=${Y}${O?` debugFile=${O}`:""}`);let T,c;try{let W=await v.registerBridgeEnvironment(X);T=W.environment_id,c=W.environment_secret}catch(W){zz("tengu_bridge_registration_failed",{status:W instanceof xz?W.status:void 0}),console.error(W instanceof xz&&W.status===404?"Remote Control environments are not available for your account.":`Error: ${g(W)}`),process.exit(1)}let s;q(`[bridge:init] Registered, server environmentId=${T}`);let Yz=Tz();zz("tengu_bridge_started",{max_sessions:X.maxSessions,has_debug_file:!!X.debugFile,sandbox:X.sandbox,verbose:X.verbose,heartbeat_interval_ms:Yz.non_exclusive_heartbeat_interval_ms,spawn_mode:X.spawnMode,spawn_mode_source:Kz,multi_session_gate:b,pre_create_session:Fz,worktree_available:Qz}),Wz("info","bridge_started",{max_sessions:X.maxSessions,sandbox:X.sandbox,spawn_mode:X.spawnMode});let Zz=gz({execPath:process.execPath,scriptArgs:SJ(),env:process.env,verbose:K,sandbox:Y,debugFile:O,permissionMode:R,onDebug:q,onActivity:(W,C)=>{q(`[bridge:activity] sessionId=${W} ${C.type} ${C.summary}`)},onPermissionRequest:(W,C,h)=>{q(`[bridge:perm] sessionId=${W} tool=${C.request.tool_name} request_id=${C.request_id} (not auto-approving)`)}}),l=GJ({verbose:K}),{parseGitHubRepository:_z}=await import("./detectRepository-0.6.6-ncw5b2aj.mjs"),Uz=V?_z(V):null,e=Uz?Uz.split("/").pop():UK(x);l.setRepoInfo(e,Q);let Lz=r!=="single-session"&&Qz;if(Lz)l.setSpawnModeDisplay(r);let Dz=(W)=>{if(W[0]===3||W[0]===4){process.emit("SIGINT");return}if(W[0]===32){l.toggleQr();return}if(W[0]===119){if(!Lz)return;let C=X.spawnMode==="same-dir"?"worktree":"same-dir";X.spawnMode=C,zz("tengu_bridge_spawn_mode_toggled",{spawn_mode:C}),l.logStatus(C==="worktree"?"Spawn mode: worktree (new sessions get isolated git worktrees)":"Spawn mode: same-dir (new sessions share the current directory)"),l.setSpawnModeDisplay(C),l.refreshDisplay(),p((h)=>{if(h.remoteControlSpawnMode===C)return h;return{...h,remoteControlSpawnMode:C}});return}};if(process.stdin.isTTY)process.stdin.setRawMode(!0),process.stdin.resume(),process.stdin.on("data",Dz);let Az=new AbortController,wz=()=>{q("[bridge:shutdown] SIGINT received, shutting down"),Az.abort()},Ez=()=>{q("[bridge:shutdown] SIGTERM received, shutting down"),Az.abort()};process.on("SIGINT",wz),process.on("SIGTERM",Ez);let jz=null;if(Fz){let{createBridgeSession:W}=await import("./createSession-0.6.6-mphh6gbj.mjs");try{if(jz=await W({environmentId:T,title:B,events:[],gitRepoUrl:V,branch:Q,signal:Az.signal,baseUrl:$,getAccessToken:a,permissionMode:R}),jz)q(`[bridge:init] Created initial session ${jz}`)}catch(C){q(`[bridge:init] Session creation failed (non-fatal): ${g(C)}`)}}let Bz=null;if(jz&&r==="single-session"){let{writeBridgePointer:W}=await import("./bridgePointer-0.6.6-cba0ahq2.mjs"),C={sessionId:jz,environmentId:T,source:"standalone"};await W(X.dir,C),Bz=setInterval(W,3600000,X.dir,C),Bz.unref?.()}try{await mJ(X,T,c,v,Zz,l,Az.signal,void 0,jz??void 0,async()=>{return Xz(),await m(),a()})}finally{if(Bz!==null)clearInterval(Bz);if(process.off("SIGINT",wz),process.off("SIGTERM",Ez),process.stdin.off("data",Dz),process.stdin.isTTY)process.stdin.setRawMode(!1);process.stdin.pause()}process.exit(0)}class hz extends Error{constructor(z){super(z);this.name="BridgeHeadlessPermanentError"}}async function bZ(z,J){let{dir:K,log:Y}=z;process.chdir(K);let{setOriginalCwd:O,setCwdState:Z}=await import("./state-0.6.6-w2grqwqw.mjs");O(K),Z(K);let{enableConfigs:R,checkHasTrustDialogAccepted:B}=await import("./config-0.6.6-2fm368ym.mjs");R();let{initSinks:U}=await import("./sinks-0.6.6-mq00wrfa.mjs");if(U(),!B())throw new hz(`Workspace not trusted: ${K}. Run \`claude\` in that directory first to accept the trust dialog.`);if(!z.getAccessToken())throw Error(oz);let{getBridgeBaseUrl:F}=await import("./bridgeConfig-0.6.6-fvzjs1pa.mjs"),L=F();if(L.startsWith("http://")&&!L.includes("localhost")&&!L.includes("127.0.0.1"))throw new hz("Remote Control base URL uses HTTP. Only HTTPS or localhost HTTP is allowed.");let A=process.env.CLAUDE_BRIDGE_SESSION_INGRESS_URL||L,{getBranch:N,getRemoteUrl:M,findGitRoot:E}=await import("./git-0.6.6-rw5vzxwm.mjs"),{hasWorktreeCreateHook:P}=await import("./hooks-0.6.6-zy3p5ymd.mjs");if(z.spawnMode==="worktree"){if(!(P()||E(K)!==null))throw new hz(`Worktree mode requires a git repository or WorktreeCreate hooks. Directory ${K} has neither.`)}let x=await N(),_=await M(),f=IJ(),k=Sz(),b={dir:K,machineName:f,branch:x,gitRepoUrl:_,maxSessions:z.capacity,spawnMode:z.spawnMode,verbose:!1,sandbox:z.sandbox,bridgeId:k,workerType:"claude_code",environmentId:Sz(),apiBaseUrl:L,sessionIngressUrl:A,sessionTimeoutMs:z.sessionTimeoutMs},d=rz({baseUrl:L,getAccessToken:z.getAccessToken,runnerVersion:"99.0.0",onDebug:Y,onAuth401:z.onAuth401,getTrustedDeviceToken:az}),S,Xz;try{let n=await d.registerBridgeEnvironment(b);S=n.environment_id,Xz=n.environment_secret}catch(n){throw Error(`Bridge registration failed: ${g(n)}`)}let m=gz({execPath:process.execPath,scriptArgs:SJ(),env:process.env,verbose:!1,sandbox:z.sandbox,permissionMode:z.permissionMode,onDebug:Y}),a=gK(Y);a.printBanner(b,S);let $z;if(z.createSessionOnStart){let{createBridgeSession:n}=await import("./createSession-0.6.6-mphh6gbj.mjs");try{let o=await n({environmentId:S,title:z.name,events:[],gitRepoUrl:_,branch:x,signal:J,baseUrl:L,getAccessToken:z.getAccessToken,permissionMode:z.permissionMode});if(o)$z=o,Y(`created initial session ${o}`)}catch(o){Y(`session pre-creation failed (non-fatal): ${g(o)}`)}}await mJ(b,S,Xz,d,m,a,J,void 0,$z,async()=>z.getAccessToken())}function gK(z){let J=()=>{};return{printBanner:(K,Y)=>z(`registered environmentId=${Y} dir=${K.dir} spawnMode=${K.spawnMode} capacity=${K.maxSessions}`),logSessionStart:(K,Y)=>z(`session start ${K}`),logSessionComplete:(K,Y)=>z(`session complete ${K} (${Y}ms)`),logSessionFailed:(K,Y)=>z(`session failed ${K}: ${Y}`),logStatus:z,logVerbose:z,logError:(K)=>z(`error: ${K}`),logReconnected:(K)=>z(`reconnected after ${K}ms`),addSession:(K,Y)=>z(`session attached ${K}`),removeSession:(K)=>z(`session detached ${K}`),updateIdleStatus:J,updateReconnectingStatus:J,updateSessionStatus:J,updateSessionActivity:J,updateSessionCount:J,updateFailedStatus:J,setSpawnModeDisplay:J,setRepoInfo:J,setAttached:J,setSessionTitle:J,clearStatus:J,toggleQr:J,refreshDisplay:J}}export{mJ as runBridgeLoop,bZ as runBridgeHeadless,vK as parseArgs,wK as isServerError,MK as isConnectionError,kZ as bridgeMain,hz as BridgeHeadlessPermanentError};
@@ -0,0 +1 @@
1
+ import{Bfa as Y,Dfa as O,Efa as S,Ffa as _,jfa as A,kfa as k,ufa as G,vfa as N,yfa as M}from"./cli-0.6.6-gk8s7mch.mjs";import{Cha as R,cha as K,dha as W,hha as j,zha as C}from"./cli-0.6.6-hcajyfhg.mjs";import"./cli-0.6.6-t3vvf5fy.mjs";import{Vha as y,_ha as c}from"./cli-0.6.6-g6ja9jcs.mjs";import"./cli-0.6.6-nw0nh4e0.mjs";import"./cli-0.6.6-ncqg4xxp.mjs";import"./cli-0.6.6-sqvm4f1y.mjs";import"./cli-0.6.6-ytskhcd3.mjs";import"./cli-0.6.6-py5db2ds.mjs";O();R();c();k();_();M();j();import{mkdir as m,readFile as z,stat as E,unlink as T,writeFile as f}from"fs/promises";import{dirname as B,join as b}from"path";var I=50,D=14400000,u=S(()=>Y.object({sessionId:Y.string(),environmentId:Y.string(),source:Y.enum(["standalone","repl"])}));function J(q){return b(N(),G(q),"bridge-pointer.json")}async function g(q,x){let v=J(q);try{await m(B(v),{recursive:!0}),await f(v,K(x),"utf8"),C(`[bridge:pointer] wrote ${v}`)}catch(V){C(`[bridge:pointer] write failed: ${V}`,{level:"warn"})}}async function U(q){let x=J(q),v,V;try{V=(await E(x)).mtimeMs,v=await z(x,"utf8")}catch{return null}let Z=u().safeParse(F(v));if(!Z.success)return C(`[bridge:pointer] invalid schema, clearing: ${x}`),await X(q),null;let $=Math.max(0,Date.now()-V);if($>D)return C(`[bridge:pointer] stale (>4h mtime), clearing: ${x}`),await X(q),null;return{...Z.data,ageMs:$}}async function s(q){let x=await U(q);if(x)return{pointer:x,dir:q};let v=await A(q);if(v.length<=1)return null;if(v.length>I)return C(`[bridge:pointer] ${v.length} worktrees exceeds fanout cap ${I}, skipping`),null;let V=G(q),Z=v.filter((H)=>G(H)!==V),$=await Promise.all(Z.map(async(H)=>{let L=await U(H);return L?{pointer:L,dir:H}:null})),Q=null;for(let H of $)if(H&&(!Q||H.pointer.ageMs<Q.pointer.ageMs))Q=H;if(Q)C(`[bridge:pointer] fanout found pointer in worktree ${Q.dir} (ageMs=${Q.pointer.ageMs})`);return Q}async function X(q){let x=J(q);try{await T(x),C(`[bridge:pointer] cleared ${x}`)}catch(v){if(!y(v))C(`[bridge:pointer] clear failed: ${v}`,{level:"warn"})}}function F(q){try{return W(q)}catch{return null}}export{g as writeBridgePointer,s as readBridgePointerAcrossWorktrees,U as readBridgePointer,J as getBridgePointerPath,X as clearBridgePointer,D as BRIDGE_POINTER_TTL_MS};
@@ -0,0 +1 @@
1
+ import{qh as a,rh as bJ}from"./cli-0.6.6-h8d7s4qz.mjs";import{sh as x,th as AJ}from"./cli-0.6.6-962my51a.mjs";import{$R as t,$x as HJ,AG as vJ,QN as r,WC as l,Wm as m,XN as TJ,Xm as UJ,_R as s,_x as i,aD as kJ,aP as o,aS as DJ,oP as hJ,uy as u,wy as WJ,zG as $}from"./cli-0.6.6-23snct9d.mjs";import"./cli-0.6.6-37wcg59v.mjs";import"./cli-0.6.6-axvjexmr.mjs";import"./cli-0.6.6-at7yytqj.mjs";import"./cli-0.6.6-4qj9brbk.mjs";import"./cli-0.6.6-xtj65dsh.mjs";import"./cli-0.6.6-f6wc5yc6.mjs";import"./cli-0.6.6-h02v66zq.mjs";import"./cli-0.6.6-76rkjh7v.mjs";import"./cli-0.6.6-ww6zy0p0.mjs";import"./cli-0.6.6-zx0cgvxq.mjs";import"./cli-0.6.6-hetrxwwb.mjs";import"./cli-0.6.6-ar43nqjq.mjs";import"./cli-0.6.6-hyqpcaay.mjs";import"./cli-0.6.6-g9mdc3pd.mjs";import"./cli-0.6.6-heymhe69.mjs";import"./cli-0.6.6-fj9rpekf.mjs";import"./cli-0.6.6-s3y8t7we.mjs";import"./cli-0.6.6-4r50eqxg.mjs";import{$V as QJ,_V as g,vW as c,xW as IJ}from"./cli-0.6.6-1a0fnhh0.mjs";import"./cli-0.6.6-tk00k0e1.mjs";import{JY as k,LY as v,aZ as j,cZ as KJ,oX as GJ,oZ as NJ}from"./cli-0.6.6-en2sexw5.mjs";import"./cli-0.6.6-92dvpnqv.mjs";import"./cli-0.6.6-efkct3rx.mjs";import"./cli-0.6.6-je6w2y3h.mjs";import"./cli-0.6.6-vy3wa7f9.mjs";import"./cli-0.6.6-zhky93y3.mjs";import"./cli-0.6.6-4nxq7s1k.mjs";import"./cli-0.6.6-ktwh4wvp.mjs";import"./cli-0.6.6-zwk7a82m.mjs";import"./cli-0.6.6-jqxfz350.mjs";import"./cli-0.6.6-0j61q3w5.mjs";import"./cli-0.6.6-hejk0ae6.mjs";import{u1 as F,v1 as W,w1 as d}from"./cli-0.6.6-arvcw19g.mjs";import{x1 as zJ}from"./cli-0.6.6-c267ckfv.mjs";import"./cli-0.6.6-8vnkmjet.mjs";import"./cli-0.6.6-4tp2yb2x.mjs";import"./cli-0.6.6-nymfz9tw.mjs";import"./cli-0.6.6-ythetarc.mjs";import"./cli-0.6.6-8yvh28tb.mjs";import"./cli-0.6.6-4jrf033h.mjs";import"./cli-0.6.6-wctj7gmc.mjs";import"./cli-0.6.6-x88t5n54.mjs";import"./cli-0.6.6-akjyt0hr.mjs";import"./cli-0.6.6-0w254y38.mjs";import{O_ as p,P_ as C,Wba as S,f$ as ZJ,sca as FJ}from"./cli-0.6.6-q1j20ysc.mjs";import"./cli-0.6.6-b1wqaqv9.mjs";import"./cli-0.6.6-czhez59x.mjs";import"./cli-0.6.6-73eg8qn0.mjs";import"./cli-0.6.6-y305shhz.mjs";import"./cli-0.6.6-gk8s7mch.mjs";import"./cli-0.6.6-d5dexg4d.mjs";import"./cli-0.6.6-7r4esgkf.mjs";import"./cli-0.6.6-a837m6n5.mjs";import"./cli-0.6.6-hcajyfhg.mjs";import"./cli-0.6.6-t3vvf5fy.mjs";import{Tha as f,_ha as YJ}from"./cli-0.6.6-g6ja9jcs.mjs";import"./cli-0.6.6-nw0nh4e0.mjs";import"./cli-0.6.6-ncqg4xxp.mjs";import"./cli-0.6.6-sqvm4f1y.mjs";import"./cli-0.6.6-ytskhcd3.mjs";import"./cli-0.6.6-mc9x1jry.mjs";import"./cli-0.6.6-kca8bnv6.mjs";import{spa as R,wpa as XJ}from"./cli-0.6.6-py5db2ds.mjs";function EJ(V){let J=n.c(25),{question:Y,context:z,onDone:G}=V,[Z,e]=N.useState(null),[K,y]=N.useState(null),[P,JJ]=N.useState(0),T=N.useRef(null),{rows:VJ}=c(g()),A;if(J[0]===Symbol.for("react.memo_cache_sentinel"))A=()=>JJ(qJ),J[0]=A;else A=J[0];j(A,Z||K?null:80);let b;if(J[1]!==G)b=function(X){if(X.key==="escape"||X.key==="return"||X.key===" "||X.ctrl&&(X.key==="c"||X.key==="d")){X.preventDefault(),G(void 0,{display:"skip"});return}if(X.key==="up"||X.ctrl&&X.key==="p")X.preventDefault(),T.current?.scrollBy(-_);if(X.key==="down"||X.ctrl&&X.key==="n")X.preventDefault(),T.current?.scrollBy(_)},J[1]=G,J[2]=b;else b=J[2];let h=b,w,L;if(J[3]!==z||J[4]!==Y)w=()=>{let B=m();return async function(){try{let O=await MJ(z),M=await a({question:Y,cacheSafeParams:O});if(!B.signal.aborted)if(M.response)e(M.response);else y("No response received")}catch(O){let M=O;if(!B.signal.aborted)y(f(M)||"Failed to get response")}}(),()=>{B.abort()}},L=[Y,z],J[3]=z,J[4]=Y,J[5]=w,J[6]=L;else w=J[5],L=J[6];N.useEffect(w,L);let D=Math.max(5,VJ-wJ-LJ),E;if(J[7]===Symbol.for("react.memo_cache_sentinel"))E=W(v,{color:"warning",bold:!0,children:["/btw"," "]}),J[7]=E;else E=J[7];let Q;if(J[8]!==Y)Q=W(k,{children:[E,F(v,{dimColor:!0,children:Y})]}),J[8]=Y,J[9]=Q;else Q=J[9];let U;if(J[10]!==K||J[11]!==P||J[12]!==Z)U=F(x,{ref:T,flexDirection:"column",flexGrow:1,children:K?F(v,{color:"error",children:K}):Z?F(u,{children:Z}):W(k,{children:[F($,{frame:P,messageColor:"warning"}),F(v,{color:"warning",children:"Answering..."})]})}),J[10]=K,J[11]=P,J[12]=Z,J[13]=U;else U=J[13];let I;if(J[14]!==D||J[15]!==U)I=F(k,{marginTop:1,marginLeft:2,maxHeight:D,children:U}),J[14]=D,J[15]=U,J[16]=I;else I=J[16];let H;if(J[17]!==K||J[18]!==Z)H=(Z||K)&&F(k,{marginTop:1,children:W(v,{dimColor:!0,children:[p,"/",C," to scroll · Space, Enter, or Escape to dismiss"]})}),J[17]=K,J[18]=Z,J[19]=H;else H=J[19];let q;if(J[20]!==h||J[21]!==Q||J[22]!==I||J[23]!==H)q=W(k,{flexDirection:"column",paddingLeft:2,marginTop:1,tabIndex:0,autoFocus:!0,onKeyDown:h,children:[Q,I,H]}),J[20]=h,J[21]=Q,J[22]=I,J[23]=H,J[24]=q;else q=J[24];return q}function qJ(V){return V+1}function BJ(V){let J=V.at(-1);if(J?.type==="assistant"&&J.message.stop_reason===null)return V.slice(0,-1);return V}async function MJ(V){let J=o(BJ(V.messages)),Y=l();if(Y)return{systemPrompt:Y.systemPrompt,userContext:Y.userContext,systemContext:Y.systemContext,toolUseContext:V,forkContextMessages:J};let[z,G,Z]=await Promise.all([r(V.options.tools,V.options.mainLoopModel,[],V.options.mcpClients),t(),s()]);return{systemPrompt:i(z),userContext:G,systemContext:Z,toolUseContext:V,forkContextMessages:J}}async function aJ(V,J,Y){let z=Y?.trim();if(!z)return V("Usage: /btw <your question>",{display:"system"}),null;return S((G)=>({...G,btwUseCount:G.btwUseCount+1})),F(EJ,{question:z,context:J,onDone:V})}var n,N,wJ=5,LJ=6,_=3;var PJ=XJ(()=>{KJ();WJ();vJ();ZJ();TJ();IJ();DJ();QJ();AJ();NJ();UJ();FJ();YJ();kJ();hJ();bJ();HJ();d();n=R(GJ(),1),N=R(zJ(),1)});PJ();export{aJ as call};
@@ -0,0 +1,3 @@
1
+ import{WV as p,XV as f,YV as a,ZV as S}from"./cli-0.6.6-4r50eqxg.mjs";import{Wba as d,sca as C}from"./cli-0.6.6-q1j20ysc.mjs";import"./cli-0.6.6-b1wqaqv9.mjs";import"./cli-0.6.6-czhez59x.mjs";import"./cli-0.6.6-73eg8qn0.mjs";import"./cli-0.6.6-y305shhz.mjs";import"./cli-0.6.6-gk8s7mch.mjs";import{jga as m,kga as y,lga as b}from"./cli-0.6.6-d5dexg4d.mjs";import"./cli-0.6.6-7r4esgkf.mjs";import"./cli-0.6.6-a837m6n5.mjs";import"./cli-0.6.6-hcajyfhg.mjs";import"./cli-0.6.6-t3vvf5fy.mjs";import"./cli-0.6.6-g6ja9jcs.mjs";import"./cli-0.6.6-nw0nh4e0.mjs";import"./cli-0.6.6-ncqg4xxp.mjs";import"./cli-0.6.6-sqvm4f1y.mjs";import"./cli-0.6.6-ytskhcd3.mjs";import{wpa as g}from"./cli-0.6.6-py5db2ds.mjs";function R(t){let o=2166136261;for(let s=0;s<t.length;s++)o^=t.charCodeAt(s),o=Math.imul(o,16777619);return o>>>0}function r(t,o){return t[R(o)%t.length]}function M(t){return t.charAt(0).toUpperCase()+t.slice(1)}function O(){let t=f(),{bones:o}=p(`${t}:buddy`),s=r($,`${t}:prefix`),n=r(A,`${t}:suffix`),i=r(w,`${t}:personality`);return{name:`${s}${n}`,personality:`${i}.`,hatchedAt:Date.now()}}function l(t,o,s=!1){t.setAppState((n)=>({...n,companionReaction:o,companionPetAt:s?Date.now():n.companionPetAt}))}function c(t){t(`Usage: /buddy [status|mute|unmute]
2
+
3
+ Run /buddy with no args to hatch your companion the first time, then pet it on later runs.`,{display:"system"})}async function X(t,o,s){let n=s?.trim().toLowerCase()??"";if(m.includes(n)||n===""){let e=a();if(n!==""||e){if(n!=="")return c(t),null}}if(m.includes(n))return c(t),null;if(y.includes(n)||n==="status"){let e=a();if(!e)return t("No buddy hatched yet. Run /buddy to hatch one.",{display:"system"}),null;return t(`${e.name} is your ${M(e.rarity)} ${e.species}. ${e.personality}`,{display:"system"}),null}if(n==="mute"||n==="unmute"){let e=n==="mute";if(d((u)=>({...u,companionMuted:e})),e)l(o,void 0);return t(`Buddy ${e?"muted":"unmuted"}.`,{display:"system"}),null}if(n!=="")return c(t),null;let i=a();if(!i){let e=O();return d((u)=>({...u,companion:e,companionMuted:!1})),i={...p(`${f()}:buddy`).bones,...e},l(o,`${i.name} the ${i.species} has hatched.`,!0),t(`${i.name} the ${i.species} is now your buddy. Run /buddy again to pet them.`,{display:"system"}),null}let h=`${i.name} ${r(E,`${Date.now()}:${i.name}`)}`;return l(o,h,!0),t(void 0,{display:"skip"}),null}var $,A,w,E;var L=g(()=>{C();S();b();$=["Byte","Echo","Glint","Miso","Nova","Pixel","Rune","Static","Vector","Whisk"],A=["bean","bit","bud","dot","ling","loop","moss","patch","puff","spark"],w=["Curious and quietly encouraging","A patient little watcher with strong debugging instincts","Playful, observant, and suspicious of flaky tests","Calm under pressure and fond of clean diffs","A tiny terminal gremlin who likes successful builds"],E=["leans into the headpat","does a proud little bounce","emits a content beep","looks delighted","wiggles happily"]});L();export{X as call};
@@ -0,0 +1 @@
1
+ import"./cli-0.6.6-py5db2ds.mjs";var g=()=>null,c=class{},q={get(v,j){if(j==="__esModule")return!0;if(j==="default")return new Proxy({},q);if(j==="ExportResultCode")return{SUCCESS:0,FAILED:1};if(j==="resourceFromAttributes")return()=>({});if(j==="SandboxRuntimeConfigSchema")return{parse:()=>({})};return g}},z=new Proxy(g,q),C=z,A=!0,B=null,D=new Proxy({},{get:()=>g}),E={parse:()=>({})},F=[],G=g,H=null,I=null,J=g,K=g,L={SUCCESS:0,FAILED:1},M=g,P=c,Q=c,R=c,S=c,U=c,V=c,W=c,X=c,Y=c,Z=c,_=c,$=c,b=c,i=c,k={getTracer:()=>({startSpan:()=>({end:g,setAttribute:g,setStatus:g,recordException:g})})},u={active:g,with:(v,j)=>j()},w={OK:0,ERROR:1,UNSET:2},y="service.name",N="service.version",O="service.name",T="service.version",h={CUMULATIVE:0,DELTA:1},x={HISTOGRAM:0,SUM:1,GAUGE:2},d={COUNTER:0,HISTOGRAM:1,UP_DOWN_COUNTER:2},f=c,m={};export{k as trace,M as resourceFromAttributes,K as plot,J as getSyntaxTheme,G as getMcpConfigForManifest,C as default,u as context,A as __stub,w as SpanStatusCode,Q as SimpleSpanProcessor,_ as SimpleLogRecordProcessor,m as SeverityNumber,B as SandboxViolationStore,E as SandboxRuntimeConfigSchema,D as SandboxManager,T as SEMRESATTRS_SERVICE_VERSION,O as SEMRESATTRS_SERVICE_NAME,P as Resource,f as PushMetricExporter,Y as PrometheusExporter,i as PeriodicExportingMetricReader,V as OTLPTraceExporter,X as OTLPMetricExporter,W as OTLPLogExporter,S as NodeTracerProvider,b as MeterProvider,Z as LoggerProvider,d as InstrumentType,L as ExportResultCode,x as DataPointType,I as ColorFile,H as ColorDiff,R as BatchSpanProcessor,$ as BatchLogRecordProcessor,U as BasicTracerProvider,F as BROWSER_TOOLS,h as AggregationTemporality,N as ATTR_SERVICE_VERSION,y as ATTR_SERVICE_NAME};
@@ -0,0 +1,21 @@
1
+ import{v0 as h,z0 as zz}from"./cli-0.6.6-vy3wa7f9.mjs";import"./cli-0.6.6-ythetarc.mjs";import{X3 as m,u4 as e}from"./cli-0.6.6-8yvh28tb.mjs";import"./cli-0.6.6-4jrf033h.mjs";import"./cli-0.6.6-wctj7gmc.mjs";import"./cli-0.6.6-x88t5n54.mjs";import"./cli-0.6.6-akjyt0hr.mjs";import{Bda as v,Eda as r,rda as y,yda as s}from"./cli-0.6.6-q1j20ysc.mjs";import"./cli-0.6.6-b1wqaqv9.mjs";import"./cli-0.6.6-czhez59x.mjs";import"./cli-0.6.6-73eg8qn0.mjs";import"./cli-0.6.6-y305shhz.mjs";import"./cli-0.6.6-gk8s7mch.mjs";import"./cli-0.6.6-d5dexg4d.mjs";import"./cli-0.6.6-7r4esgkf.mjs";import"./cli-0.6.6-a837m6n5.mjs";import{Cha as o,zha as k}from"./cli-0.6.6-hcajyfhg.mjs";import"./cli-0.6.6-t3vvf5fy.mjs";import"./cli-0.6.6-g6ja9jcs.mjs";import"./cli-0.6.6-nw0nh4e0.mjs";import{Rna as a,Uja as b}from"./cli-0.6.6-ncqg4xxp.mjs";import"./cli-0.6.6-sqvm4f1y.mjs";import"./cli-0.6.6-ytskhcd3.mjs";import"./cli-0.6.6-mc9x1jry.mjs";import"./cli-0.6.6-kca8bnv6.mjs";import{wpa as n}from"./cli-0.6.6-py5db2ds.mjs";function Nz(J){if(!J)return"unknown";return J.replace(/-\d{4,}$/,"").replace(/-latest$/,"").replace(/-preview$/,"")}function Y(J,Q){return Q.split(".").reduce((X,O)=>X!=null?X[O]:void 0,J)}async function R(J,Q,X,O){let q=Date.now(),V;try{V=await fetch(J,{method:"POST",headers:Q,body:JSON.stringify(X)})}catch(B){return{label:O,status:0,elapsed:Date.now()-q,headers:{},usage:null,responseId:null,error:B.message}}let A=Date.now()-q,U={};if(V.headers.forEach((B,w)=>{U[w]=B}),!V.ok){let B=await V.text().catch(()=>"");return{label:O,status:V.status,elapsed:A,headers:U,usage:null,responseId:null,error:B}}let L=await V.text(),$=null,T=null,_=J.endsWith("/responses");for(let B of L.split(`
2
+
3
+ `)){let w=B.split(`
4
+ `).map((x)=>x.trim()).filter(Boolean);if(_){let x=w.find((z)=>z.startsWith("event: ")),j=w.filter((z)=>z.startsWith("data: "));if(!x||!j.length)continue;let C=x.slice(7).trim();if(C==="response.completed"||C==="response.incomplete")try{let z=JSON.parse(j.map((W)=>W.slice(6)).join(`
5
+ `));$=z?.response?.usage??null,T=z?.response?.id??null}catch{}}else for(let x of w){if(!x.startsWith("data: "))continue;let j=x.slice(6).trim();if(j==="[DONE]")continue;try{let C=JSON.parse(j);if(C.usage)$=C.usage,T=C.id??null}catch{}}}return{label:O,status:V.status,elapsed:A,headers:U,usage:$,responseId:T,error:null}}function S(J){let Q=[`--- ${J.label} ---`];if(J.error)return Q.push(` ERROR (HTTP ${J.status}): ${J.error.slice(0,200)}`),Q.join(`
6
+ `);if(Q.push(` HTTP ${J.status} — ${J.elapsed}ms`),J.responseId)Q.push(` response.id: ${J.responseId}`);if(J.usage)Q.push(" Usage:"),Q.push(` ${JSON.stringify(J.usage,null,2).replace(/\n/g,`
7
+ `)}`);else Q.push(" Usage: null");for(let X of["openai-processing-ms","x-ratelimit-remaining","x-ratelimit-limit","x-ms-region","x-github-request-id","x-request-id"])if(J.headers[X])Q.push(` ${X}: ${J.headers[X]}`);return Q.join(`
8
+ `)}var Jz,K,M='Say "hello" and nothing else.',g=3000,jz=async(J)=>{let Q=(J??"").trim().split(/\s+/).filter(Boolean),X=Q.includes("--no-key"),q=(Q.find((N)=>!N.startsWith("--"))||void 0)??m(),V=y({model:q}),A=v(),U=A?.transport==="github_copilot";if(U)h();let L=A?.apiKey??A?.extras?.githubToken??"";if(!L)return{type:"text",value:`No API key found. Make sure you are in an active OpenAI-compatible or GitHub Copilot session.
9
+ For GitHub Copilot: run /provider and choose GitHub Copilot.
10
+ For OpenAI-compatible: configure a profile via /provider.`};let $=V.transport==="codex_responses",T=$?"/responses":"/chat/completions",_=`${V.baseUrl}${T}`,B=Nz(V.resolvedModel),w=`${b()}:${B}`,x={"Content-Type":"application/json",Authorization:`Bearer ${L}`,originator:"claudin"};if(U)Object.assign(x,Jz);let j;if($)j={model:V.resolvedModel,instructions:K,input:[{type:"message",role:"user",content:[{type:"input_text",text:M}]}],stream:!0,...X?{}:{store:!1,prompt_cache_key:w,prompt_cache_retention:"24h"}};else j={model:V.resolvedModel,messages:[{role:"system",content:K},{role:"user",content:M}],stream:!0,stream_options:{include_usage:!0},max_tokens:20,...X?{}:{store:!1,prompt_cache_key:w}};let C=[`[cache-probe] Starting cache probe${X?" (--no-key: cache params OMITTED)":""}`,` model: ${V.resolvedModel} (family: ${B})`,` transport: ${V.transport}`,` endpoint: ${_}`,` prompt_cache_key: ${X?"NOT SENT":w}`,` store: ${X?"NOT SENT":"false"}`,` system prompt: ~${Math.round(K.length/4)} tokens`,` delay between calls: ${g}ms`].join(`
11
+ `);k(C);let z=await R(_,x,j,"CALL 1 — Cold (no cache)");if(k(`[cache-probe]
12
+ ${S(z)}`),z.error)return{type:"text",value:`Cache probe failed on first call: HTTP ${z.status}
13
+ ${z.error.slice(0,300)}
14
+
15
+ Full details in debug log.`};await new Promise((N)=>setTimeout(N,g));let W=await R(_,x,j,"CALL 2 — Warm (cache expected)");k(`[cache-probe]
16
+ ${S(W)}`);let c=["input_tokens","output_tokens","total_tokens","prompt_tokens","completion_tokens","input_tokens_details.cached_tokens","prompt_tokens_details.cached_tokens","output_tokens_details.reasoning_tokens"],Z=["[cache-probe] COMPARISON"];Z.push(` ${"Field".padEnd(42)} ${"Call 1".padStart(8)} ${"Call 2".padStart(8)} ${"Delta".padStart(8)}`),Z.push(` ${"-".repeat(72)}`);for(let N of c){let H=Y(z.usage,N),I=Y(W.usage,N);if(H===void 0&&I===void 0)continue;let i=typeof H==="number"&&typeof I==="number"?I-H:"";Z.push(` ${N.padEnd(42)} ${String(H??"-").padStart(8)} ${String(I??"-").padStart(8)} ${String(i).padStart(8)}`)}Z.push(""),Z.push(` Latency: ${z.elapsed}ms → ${W.elapsed}ms (${W.elapsed-z.elapsed>0?"+":""}${W.elapsed-z.elapsed}ms)`);for(let N of["openai-processing-ms","x-ms-region","x-ratelimit-remaining"]){let H=z.headers[N],I=W.headers[N];if(H||I)Z.push(` ${N}: ${H??"-"} → ${I??"-"}`)}let D=Y(W.usage,"input_tokens_details.cached_tokens")??Y(W.usage,"prompt_tokens_details.cached_tokens")??0,F=z.usage?.input_tokens??z.usage?.prompt_tokens??0,P=W.usage?.input_tokens??W.usage?.prompt_tokens??0,G;if(D>0){let N=P>0?Math.round(D/P*100):"?";G=`CACHE HIT: ${D} cached tokens (${N}% of input)`}else if(F===0&&P===0)G="INCONCLUSIVE: Server returns 0 input_tokens — cannot measure";else if(W.elapsed<z.elapsed*0.6&&F>100)G=`POSSIBLE SILENT CACHING: Call 2 was ${Math.round((1-W.elapsed/z.elapsed)*100)}% faster but no cached_tokens reported`;else G="NO CACHE DETECTED";Z.push(`
17
+ Verdict: ${G}`);function u(N){return{input_tokens:N?.input_tokens??0,output_tokens:N?.output_tokens??0,cache_creation_input_tokens:0,cache_read_input_tokens:0}}function p(N){return{input_tokens:N?.prompt_tokens??0,output_tokens:N?.completion_tokens??0,cache_creation_input_tokens:0,cache_read_input_tokens:N?.prompt_tokens_details?.cached_tokens??0}}let f=$?u:p,d=f(z.usage),E=f(W.usage);if(Z.push(""),Z.push(` --- What main's shim reports (${$?"codexShim.makeUsage":"openaiShim.convertChunkUsage"}) ---`),Z.push(` Call 1: cache_read_input_tokens=${d.cache_read_input_tokens}`),Z.push(` Call 2: cache_read_input_tokens=${E.cache_read_input_tokens}`),$&&D>0)Z.push(` BUG: Server returned ${D} cached tokens but main's makeUsage() drops it → reports 0`);else if(!$&&E.cache_read_input_tokens>0)Z.push(" OK: Chat Completions path on main correctly reads cached_tokens");k(Z.join(`
18
+ `));let t=X?" (NO cache key sent)":"",l=$?"codexShim.makeUsage()":"openaiShim.convertChunkUsage()";return{type:"text",value:[`Cache Probe — ${V.resolvedModel} via ${$?"Responses API":"Chat Completions"}${t}`,"",`Call 1: ${z.elapsed}ms, input=${F}, cached=${Y(z.usage,"input_tokens_details.cached_tokens")??Y(z.usage,"prompt_tokens_details.cached_tokens")??0}`,`Call 2: ${W.elapsed}ms, input=${P}, cached=${D}`,"",G,"",`What main's ${l} reports:`,` Call 2 cache_read_input_tokens = ${E.cache_read_input_tokens}${$&&D>0?" ← BUG: server sent "+D+" but main drops it":""}`,"","Full details written to debug log."].join(`
19
+ `)}};var Qz=n(()=>{a();r();s();o();zz();e();Jz={"User-Agent":"GitHubCopilotChat/0.26.7","Editor-Version":"vscode/1.99.3","Editor-Plugin-Version":"copilot-chat/0.26.7","Copilot-Integration-Id":"vscode-chat"},K=["You are a coding assistant. Answer concisely.","CONTEXT: User is working on a TypeScript project with Bun runtime.",...Array.from({length:80},(J,Q)=>`Rule ${Q+1}: Follow best practices for TypeScript including strict typing, error handling, testing, and clean code. Prefer explicit types over any. Use const assertions. Await all async operations.`)].join(`
20
+
21
+ `)});Qz();export{jz as call};
@@ -0,0 +1,4 @@
1
+ import{D0 as L,E0 as P,F0 as $,J0 as Q,K0 as U,L0 as V,M0 as j}from"./cli-0.6.6-zhky93y3.mjs";import{wpa as Z}from"./cli-0.6.6-py5db2ds.mjs";function w(k,D){let G=new Date(k.timestamp).toISOString(),B=`${G.slice(0,10)} ${G.slice(11,19)}`,I=L(k.metrics);return` #${String(D+1).padStart(3)} ${B} ${k.label.padEnd(28).slice(0,28)} ${I}`}function K(k,D){return`${k.padEnd(18)}${P(D)}`}var v=20,O=async()=>{let k=V(),D=U(),G=Q();if(k.length===0)return{type:"text",value:`Cache stats
2
+ No API requests yet this session.
3
+ Start a turn and re-run /cache-stats to see results.`};let B=k.slice(-v),I=k.length-B.length,q=["Cache stats",""];q.push(K("Current turn:",G)),q.push(K("Session total:",D)),q.push(""),q.push(`Recent requests (${B.length}${I>0?` of ${k.length}, ${I} older omitted`:""}):`),q.push(" # time model cache");for(let[J,Y]of B.entries())q.push(w(Y,k.length-B.length+J));if(B.some((J)=>!J.metrics.supported))q.push(""),q.push(" N/A rows: provider API does not expose cache usage (GitHub Copilot, Ollama)."),q.push(" The request still ran normally — only the metric is unavailable.");return{type:"text",value:q.join(`
4
+ `)}};var A=Z(()=>{j();$()});A();export{O as call};
@@ -0,0 +1 @@
1
+ import{wh as a,xh as b}from"./cli-0.6.6-ymge82rt.mjs";import"./cli-0.6.6-w6tqtrzg.mjs";import"./cli-0.6.6-am3sz82d.mjs";import"./cli-0.6.6-23snct9d.mjs";import"./cli-0.6.6-37wcg59v.mjs";import"./cli-0.6.6-axvjexmr.mjs";import"./cli-0.6.6-at7yytqj.mjs";import"./cli-0.6.6-4qj9brbk.mjs";import"./cli-0.6.6-xtj65dsh.mjs";import"./cli-0.6.6-f6wc5yc6.mjs";import"./cli-0.6.6-h02v66zq.mjs";import"./cli-0.6.6-76rkjh7v.mjs";import"./cli-0.6.6-ww6zy0p0.mjs";import"./cli-0.6.6-zx0cgvxq.mjs";import"./cli-0.6.6-hetrxwwb.mjs";import"./cli-0.6.6-ar43nqjq.mjs";import"./cli-0.6.6-hyqpcaay.mjs";import"./cli-0.6.6-g9mdc3pd.mjs";import"./cli-0.6.6-heymhe69.mjs";import"./cli-0.6.6-fj9rpekf.mjs";import"./cli-0.6.6-s3y8t7we.mjs";import"./cli-0.6.6-4r50eqxg.mjs";import"./cli-0.6.6-1a0fnhh0.mjs";import"./cli-0.6.6-tk00k0e1.mjs";import"./cli-0.6.6-en2sexw5.mjs";import"./cli-0.6.6-92dvpnqv.mjs";import"./cli-0.6.6-efkct3rx.mjs";import"./cli-0.6.6-je6w2y3h.mjs";import"./cli-0.6.6-vy3wa7f9.mjs";import"./cli-0.6.6-zhky93y3.mjs";import"./cli-0.6.6-4nxq7s1k.mjs";import"./cli-0.6.6-ktwh4wvp.mjs";import"./cli-0.6.6-zwk7a82m.mjs";import"./cli-0.6.6-jqxfz350.mjs";import"./cli-0.6.6-0j61q3w5.mjs";import"./cli-0.6.6-hejk0ae6.mjs";import"./cli-0.6.6-arvcw19g.mjs";import"./cli-0.6.6-c267ckfv.mjs";import"./cli-0.6.6-8vnkmjet.mjs";import"./cli-0.6.6-4tp2yb2x.mjs";import"./cli-0.6.6-nymfz9tw.mjs";import"./cli-0.6.6-ythetarc.mjs";import"./cli-0.6.6-8yvh28tb.mjs";import"./cli-0.6.6-4jrf033h.mjs";import"./cli-0.6.6-wctj7gmc.mjs";import"./cli-0.6.6-x88t5n54.mjs";import"./cli-0.6.6-akjyt0hr.mjs";import"./cli-0.6.6-0w254y38.mjs";import"./cli-0.6.6-q1j20ysc.mjs";import"./cli-0.6.6-b1wqaqv9.mjs";import"./cli-0.6.6-czhez59x.mjs";import"./cli-0.6.6-73eg8qn0.mjs";import"./cli-0.6.6-y305shhz.mjs";import"./cli-0.6.6-gk8s7mch.mjs";import"./cli-0.6.6-d5dexg4d.mjs";import"./cli-0.6.6-7r4esgkf.mjs";import"./cli-0.6.6-a837m6n5.mjs";import"./cli-0.6.6-hcajyfhg.mjs";import"./cli-0.6.6-t3vvf5fy.mjs";import"./cli-0.6.6-g6ja9jcs.mjs";import"./cli-0.6.6-nw0nh4e0.mjs";import"./cli-0.6.6-ncqg4xxp.mjs";import"./cli-0.6.6-sqvm4f1y.mjs";import"./cli-0.6.6-ytskhcd3.mjs";import"./cli-0.6.6-mc9x1jry.mjs";import"./cli-0.6.6-kca8bnv6.mjs";import"./cli-0.6.6-py5db2ds.mjs";b();export{a as clearSessionCaches};
@@ -0,0 +1 @@
1
+ import{$8 as J,B$ as A,Qda as X,Yda as H,Z8 as V,_8 as W,f_ as k,k_ as N,y$ as x}from"./cli-0.6.6-q1j20ysc.mjs";import"./cli-0.6.6-b1wqaqv9.mjs";import"./cli-0.6.6-czhez59x.mjs";import"./cli-0.6.6-73eg8qn0.mjs";import"./cli-0.6.6-y305shhz.mjs";import"./cli-0.6.6-gk8s7mch.mjs";import"./cli-0.6.6-d5dexg4d.mjs";import"./cli-0.6.6-7r4esgkf.mjs";import"./cli-0.6.6-a837m6n5.mjs";import"./cli-0.6.6-hcajyfhg.mjs";import"./cli-0.6.6-t3vvf5fy.mjs";import{Uha as b,_ha as y}from"./cli-0.6.6-g6ja9jcs.mjs";import"./cli-0.6.6-nw0nh4e0.mjs";import"./cli-0.6.6-ncqg4xxp.mjs";import"./cli-0.6.6-sqvm4f1y.mjs";import"./cli-0.6.6-ytskhcd3.mjs";import"./cli-0.6.6-py5db2ds.mjs";A();y();N();H();J();import{readdir as L,readFile as U,stat as Z}from"fs/promises";import{homedir as _}from"os";import{join as $}from"path";async function F(){let B=W();if(!V.includes(B))throw Error(`Unsupported platform: ${B} - Claude Desktop integration only works on macOS and WSL.`);if(B==="macos")return $(_(),"Library","Application Support","Claude","claude_desktop_config.json");let K=process.env.USERPROFILE?process.env.USERPROFILE.replace(/\\/g,"/"):null;if(K){let q=`/mnt/c${K.replace(/^[A-Z]:/,"")}/AppData/Roaming/Claude/claude_desktop_config.json`;try{return await Z(q),q}catch{}}try{try{let q=await L("/mnt/c/Users",{withFileTypes:!0});for(let z of q){if(z.name==="Public"||z.name==="Default"||z.name==="Default User"||z.name==="All Users")continue;let I=$("/mnt/c/Users",z.name,"AppData","Roaming","Claude","claude_desktop_config.json");try{return await Z(I),I}catch{}}}catch{}}catch(G){X(G)}throw Error("Could not find Claude Desktop config file in Windows. Make sure Claude Desktop is installed on Windows.")}async function h(){if(!V.includes(W()))throw Error("Unsupported platform - Claude Desktop integration only works on macOS and WSL.");try{let B=await F(),K;try{K=await U(B,{encoding:"utf8"})}catch(I){if(b(I)==="ENOENT")return{};throw I}let G=k(K);if(!G||typeof G!=="object")return{};let q=G.mcpServers;if(!q||typeof q!=="object")return{};let z={};for(let[I,Q]of Object.entries(q)){if(!Q||typeof Q!=="object")continue;let Y=x().safeParse(Q);if(Y.success)z[I]=Y.data}return z}catch(B){return X(B),{}}}export{h as readClaudeDesktopMcpServers,F as getClaudeDesktopConfigPath};
@@ -0,0 +1 @@
1
+ import{ER as a,FR as b,GR as c,HR as d,IR as e,JR as f,KR as g,LR as h,MR as i,NR as j,OR as k,PR as l,QR as m,RR as n,SR as o,TR as p,UR as q,VR as r,WR as s,XR as t}from"./cli-0.6.6-23snct9d.mjs";import"./cli-0.6.6-37wcg59v.mjs";import"./cli-0.6.6-axvjexmr.mjs";import"./cli-0.6.6-at7yytqj.mjs";import"./cli-0.6.6-4qj9brbk.mjs";import"./cli-0.6.6-xtj65dsh.mjs";import"./cli-0.6.6-f6wc5yc6.mjs";import"./cli-0.6.6-h02v66zq.mjs";import"./cli-0.6.6-76rkjh7v.mjs";import"./cli-0.6.6-ww6zy0p0.mjs";import"./cli-0.6.6-zx0cgvxq.mjs";import"./cli-0.6.6-hetrxwwb.mjs";import"./cli-0.6.6-ar43nqjq.mjs";import"./cli-0.6.6-hyqpcaay.mjs";import"./cli-0.6.6-g9mdc3pd.mjs";import"./cli-0.6.6-heymhe69.mjs";import"./cli-0.6.6-fj9rpekf.mjs";import"./cli-0.6.6-s3y8t7we.mjs";import"./cli-0.6.6-4r50eqxg.mjs";import"./cli-0.6.6-1a0fnhh0.mjs";import"./cli-0.6.6-tk00k0e1.mjs";import"./cli-0.6.6-en2sexw5.mjs";import"./cli-0.6.6-92dvpnqv.mjs";import"./cli-0.6.6-efkct3rx.mjs";import"./cli-0.6.6-je6w2y3h.mjs";import"./cli-0.6.6-vy3wa7f9.mjs";import"./cli-0.6.6-zhky93y3.mjs";import"./cli-0.6.6-4nxq7s1k.mjs";import"./cli-0.6.6-ktwh4wvp.mjs";import"./cli-0.6.6-zwk7a82m.mjs";import"./cli-0.6.6-jqxfz350.mjs";import"./cli-0.6.6-0j61q3w5.mjs";import"./cli-0.6.6-hejk0ae6.mjs";import"./cli-0.6.6-arvcw19g.mjs";import"./cli-0.6.6-c267ckfv.mjs";import"./cli-0.6.6-8vnkmjet.mjs";import"./cli-0.6.6-4tp2yb2x.mjs";import"./cli-0.6.6-nymfz9tw.mjs";import"./cli-0.6.6-ythetarc.mjs";import"./cli-0.6.6-8yvh28tb.mjs";import"./cli-0.6.6-4jrf033h.mjs";import"./cli-0.6.6-wctj7gmc.mjs";import"./cli-0.6.6-x88t5n54.mjs";import"./cli-0.6.6-akjyt0hr.mjs";import"./cli-0.6.6-0w254y38.mjs";import"./cli-0.6.6-q1j20ysc.mjs";import"./cli-0.6.6-b1wqaqv9.mjs";import"./cli-0.6.6-czhez59x.mjs";import"./cli-0.6.6-73eg8qn0.mjs";import"./cli-0.6.6-y305shhz.mjs";import"./cli-0.6.6-gk8s7mch.mjs";import"./cli-0.6.6-d5dexg4d.mjs";import"./cli-0.6.6-7r4esgkf.mjs";import"./cli-0.6.6-a837m6n5.mjs";import"./cli-0.6.6-hcajyfhg.mjs";import"./cli-0.6.6-t3vvf5fy.mjs";import"./cli-0.6.6-g6ja9jcs.mjs";import"./cli-0.6.6-nw0nh4e0.mjs";import"./cli-0.6.6-ncqg4xxp.mjs";import"./cli-0.6.6-sqvm4f1y.mjs";import"./cli-0.6.6-ytskhcd3.mjs";import"./cli-0.6.6-mc9x1jry.mjs";import"./cli-0.6.6-kca8bnv6.mjs";import"./cli-0.6.6-py5db2ds.mjs";t();export{b as stripHtmlComments,q as shouldShowClaudeMdExternalIncludesWarning,g as resetGetMemoryFilesCache,c as processMemoryFile,d as processMdRules,n as processConditionedMdRules,r as isMemoryFilePath,p as hasExternalClaudeMdIncludes,l as getMemoryFilesForNestedDirectory,e as getMemoryFiles,k as getManagedAndUserConditionalRules,h as getLargeMemoryFiles,o as getExternalClaudeMdIncludes,m as getConditionalRulesForCwdLevelDirectory,j as getClaudeMds,s as getAllMemoryFilePaths,i as filterInjectedMemoryFiles,f as clearMemoryFileCaches,a as MAX_MEMORY_CHARACTER_COUNT};
@@ -0,0 +1 @@
1
+ import{uh as a,vh as l}from"./cli-0.6.6-27tkk39p.mjs";import"./cli-0.6.6-ymge82rt.mjs";import"./cli-0.6.6-w6tqtrzg.mjs";import"./cli-0.6.6-am3sz82d.mjs";import"./cli-0.6.6-bn18ty4n.mjs";import"./cli-0.6.6-23snct9d.mjs";import"./cli-0.6.6-37wcg59v.mjs";import"./cli-0.6.6-axvjexmr.mjs";import"./cli-0.6.6-at7yytqj.mjs";import"./cli-0.6.6-4qj9brbk.mjs";import"./cli-0.6.6-xtj65dsh.mjs";import"./cli-0.6.6-f6wc5yc6.mjs";import"./cli-0.6.6-h02v66zq.mjs";import"./cli-0.6.6-76rkjh7v.mjs";import"./cli-0.6.6-ww6zy0p0.mjs";import"./cli-0.6.6-zx0cgvxq.mjs";import"./cli-0.6.6-hetrxwwb.mjs";import"./cli-0.6.6-ar43nqjq.mjs";import"./cli-0.6.6-hyqpcaay.mjs";import"./cli-0.6.6-g9mdc3pd.mjs";import"./cli-0.6.6-heymhe69.mjs";import"./cli-0.6.6-fj9rpekf.mjs";import"./cli-0.6.6-s3y8t7we.mjs";import"./cli-0.6.6-4r50eqxg.mjs";import"./cli-0.6.6-1a0fnhh0.mjs";import"./cli-0.6.6-tk00k0e1.mjs";import"./cli-0.6.6-en2sexw5.mjs";import"./cli-0.6.6-92dvpnqv.mjs";import"./cli-0.6.6-efkct3rx.mjs";import"./cli-0.6.6-je6w2y3h.mjs";import"./cli-0.6.6-vy3wa7f9.mjs";import"./cli-0.6.6-zhky93y3.mjs";import"./cli-0.6.6-4nxq7s1k.mjs";import"./cli-0.6.6-ktwh4wvp.mjs";import"./cli-0.6.6-zwk7a82m.mjs";import"./cli-0.6.6-jqxfz350.mjs";import"./cli-0.6.6-0j61q3w5.mjs";import"./cli-0.6.6-hejk0ae6.mjs";import"./cli-0.6.6-arvcw19g.mjs";import"./cli-0.6.6-c267ckfv.mjs";import"./cli-0.6.6-8vnkmjet.mjs";import"./cli-0.6.6-4tp2yb2x.mjs";import"./cli-0.6.6-nymfz9tw.mjs";import"./cli-0.6.6-ythetarc.mjs";import"./cli-0.6.6-8yvh28tb.mjs";import"./cli-0.6.6-4jrf033h.mjs";import"./cli-0.6.6-wctj7gmc.mjs";import"./cli-0.6.6-x88t5n54.mjs";import"./cli-0.6.6-akjyt0hr.mjs";import"./cli-0.6.6-0w254y38.mjs";import"./cli-0.6.6-q1j20ysc.mjs";import"./cli-0.6.6-b1wqaqv9.mjs";import"./cli-0.6.6-czhez59x.mjs";import"./cli-0.6.6-73eg8qn0.mjs";import"./cli-0.6.6-y305shhz.mjs";import"./cli-0.6.6-gk8s7mch.mjs";import"./cli-0.6.6-d5dexg4d.mjs";import"./cli-0.6.6-7r4esgkf.mjs";import"./cli-0.6.6-a837m6n5.mjs";import"./cli-0.6.6-hcajyfhg.mjs";import"./cli-0.6.6-t3vvf5fy.mjs";import"./cli-0.6.6-g6ja9jcs.mjs";import"./cli-0.6.6-nw0nh4e0.mjs";import"./cli-0.6.6-ncqg4xxp.mjs";import"./cli-0.6.6-sqvm4f1y.mjs";import"./cli-0.6.6-ytskhcd3.mjs";import"./cli-0.6.6-mc9x1jry.mjs";import"./cli-0.6.6-kca8bnv6.mjs";import{wpa as t}from"./cli-0.6.6-py5db2ds.mjs";var n=async(e,o)=>{return await a(o),{type:"text",value:""}};var m=t(()=>{l()});m();export{n as call};
@@ -0,0 +1 @@
1
+ import{d0 as a,e0 as b,f0 as c}from"./cli-0.6.6-efkct3rx.mjs";import"./cli-0.6.6-py5db2ds.mjs";c();export{a as getClearTerminalSequence,b as clearTerminal};
@@ -0,0 +1,2 @@
1
+ import{NG as U,OG as w}from"./cli-0.6.6-23snct9d.mjs";import{JY as N,LY as O,oX as f,oZ as k}from"./cli-0.6.6-en2sexw5.mjs";import{u1 as M,v1 as H,w1 as R}from"./cli-0.6.6-arvcw19g.mjs";import{spa as Y,wpa as Z}from"./cli-0.6.6-py5db2ds.mjs";function _(X){let q=V.c(10),{message:I,bold:P,dimColor:Q,subtitle:D}=X,J=P===void 0?!1:P,K=Q===void 0?!1:Q,E;if(q[0]===Symbol.for("react.memo_cache_sentinel"))E=M(U,{}),q[0]=E;else E=q[0];let v;if(q[1]!==J||q[2]!==K||q[3]!==I)v=H(N,{flexDirection:"row",children:[E,H(O,{bold:J,dimColor:K,children:[" ",I]})]}),q[1]=J,q[2]=K,q[3]=I,q[4]=v;else v=q[4];let z;if(q[5]!==D)z=D&&M(O,{dimColor:!0,children:D}),q[5]=D,q[6]=z;else z=q[6];let G;if(q[7]!==v||q[8]!==z)G=H(N,{flexDirection:"column",children:[v,z]}),q[7]=v,q[8]=z,q[9]=G;else G=q[9];return G}var V;var A=Z(()=>{k();w();R();V=Y(f(),1)});
2
+ export{_ as mg,A as ng};
@@ -0,0 +1,2 @@
1
+ import{wpa as j}from"./cli-0.6.6-py5db2ds.mjs";function C(){return`claude-swarm-${process.pid}`}var x="team-lead",y="claude-swarm",z="swarm-view",A="tmux",B="claude-hidden",D="CLAUDE_CODE_TEAMMATE_COMMAND";var k=()=>{};
2
+ export{x as k1,y as l1,z as m1,A as n1,B as o1,C as p1,D as q1,k as r1};
@@ -0,0 +1,4 @@
1
+ import{rpa as Z}from"./cli-0.6.6-dmtpt4r7.mjs";import{upa as Y,xpa as O}from"./cli-0.6.6-py5db2ds.mjs";var ye=Y((he)=>{var R=O("node:https"),$=Z(),z=O("node:stream"),D=O("node:http2");function H(e){let t=e&&typeof e==="object"&&"reason"in e?e.reason:void 0;if(t){if(t instanceof Error){let s=Error("Request aborted");return s.name="AbortError",s.cause=t,s}let o=Error(String(t));return o.name="AbortError",o}let n=Error("Request aborted");return n.name="AbortError",n}var ee=["ECONNRESET","EPIPE","ETIMEDOUT"],Q=(e)=>{let t={};for(let n in e){let o=e[n];t[n]=Array.isArray(o)?o.join(","):o}return t},d={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:(e)=>clearTimeout(e)},F=1000,te=(e,t,n=0)=>{if(!n)return-1;let o=(s)=>{let r=d.setTimeout(()=>{e.destroy(),t(Object.assign(Error(`@smithy/node-http-handler - the request socket did not establish a connection with the server within the configured timeout of ${n} ms.`),{name:"TimeoutError"}))},n-s),c=(u)=>{if(u?.connecting)u.on("connect",()=>{d.clearTimeout(r)});else d.clearTimeout(r)};if(e.socket)c(e.socket);else e.on("socket",c)};if(n<2000)return o(0),0;return d.setTimeout(o.bind(null,F),F)},oe=(e,t,n=0,o,s)=>{if(n)return d.setTimeout(()=>{let r=`@smithy/node-http-handler - [${o?"ERROR":"WARN"}] a request has exceeded the configured ${n} ms requestTimeout.`;if(o){let c=Object.assign(Error(r),{name:"TimeoutError",code:"ETIMEDOUT"});e.destroy(c),t(c)}else r+=" Init client requestHandler with throwOnRequestTimeout=true to turn this into an error.",s?.warn?.(r)},n);return-1},ne=3000,se=(e,{keepAlive:t,keepAliveMsecs:n},o=ne)=>{if(t!==!0)return-1;let s=()=>{if(e.socket)e.socket.setKeepAlive(t,n||0);else e.on("socket",(r)=>{r.setKeepAlive(t,n||0)})};if(o===0)return s(),0;return d.setTimeout(s,o)},W=3000,re=(e,t,n=0)=>{let o=(s)=>{let r=n-s,c=()=>{e.destroy(),t(Object.assign(Error(`@smithy/node-http-handler - the request socket timed out after ${n} ms of inactivity (configured by client requestHandler).`),{name:"TimeoutError"}))};if(e.socket)e.socket.setTimeout(r,c),e.on("close",()=>e.socket?.removeListener("timeout",c));else e.setTimeout(r,c)};if(0<n&&n<6000)return o(0),0;return d.setTimeout(o.bind(null,n===0?0:W),W)},j=6000;async function V(e,t,n=j,o=!1){let s=t.headers,r=s?s.Expect||s.expect:void 0,c=-1,u=!0;if(!o&&r==="100-continue")u=await Promise.race([new Promise((f)=>{c=Number(d.setTimeout(()=>f(!0),Math.max(j,n)))}),new Promise((f)=>{e.on("continue",()=>{d.clearTimeout(c),f(!0)}),e.on("response",()=>{d.clearTimeout(c),f(!1)}),e.on("error",()=>{d.clearTimeout(c),f(!1)})})]);if(u)ie(e,t.body)}function ie(e,t){if(t instanceof z.Readable){t.pipe(e);return}if(t){let n=Buffer.isBuffer(t);if(n||typeof t==="string"){if(n&&t.byteLength===0)e.end();else e.end(t);return}let s=t;if(typeof s==="object"&&s.buffer&&typeof s.byteOffset==="number"&&typeof s.byteLength==="number"){e.end(Buffer.from(s.buffer,s.byteOffset,s.byteLength));return}e.end(Buffer.from(t));return}e.end()}var ce=0,_=void 0,q=void 0;class I{config;configProvider;socketWarningTimestamp=0;externalAgent=!1;metadata={handlerProtocol:"http/1.1"};static create(e){if(typeof e?.handle==="function")return e;return new I(e)}static checkSocketUsage(e,t,n=console){let{sockets:o,requests:s,maxSockets:r}=e;if(typeof r!=="number"||r===1/0)return t;let c=15000;if(Date.now()-c<t)return t;if(o&&s)for(let u in o){let f=o[u]?.length??0,l=s[u]?.length??0;if(f>=r&&l>=2*r)return n?.warn?.(`@smithy/node-http-handler:WARN - socket usage at capacity=${f} and ${l} additional requests are enqueued.
2
+ See https://docs.aws.amazon.com/sdk-for-javascript/v3/developer-guide/node-configuring-maxsockets.html
3
+ or increase socketAcquisitionWarningTimeout=(millis) in the NodeHttpHandler config.`),Date.now()}return t}constructor(e){this.configProvider=new Promise((t,n)=>{if(typeof e==="function")e().then((o)=>{t(this.resolveDefaultConfig(o))}).catch(n);else t(this.resolveDefaultConfig(e))})}destroy(){this.config?.httpAgent?.destroy(),this.config?.httpsAgent?.destroy()}async handle(e,{abortSignal:t,requestTimeout:n}={}){if(!this.config)this.config=await this.configProvider;let o=this.config,s=e.protocol==="https:";if(!s&&!this.config.httpAgent)this.config.httpAgent=await this.config.httpAgentProvider();return new Promise((r,c)=>{let u=void 0,f=-1,l=-1,m=-1,y=-1,A=-1,b=()=>{d.clearTimeout(f),d.clearTimeout(l),d.clearTimeout(m),d.clearTimeout(y),d.clearTimeout(A)},U=async(i)=>{await u,b(),r(i)},p=async(i)=>{await u,b(),c(i)};if(t?.aborted){let i=H(t);p(i);return}let x=e.headers,M=x?(x.Expect??x.expect)==="100-continue":!1,C=s?o.httpsAgent:o.httpAgent;if(M&&!this.externalAgent)C=new(s?R.Agent:_)({keepAlive:!1,maxSockets:1/0});f=d.setTimeout(()=>{this.socketWarningTimestamp=I.checkSocketUsage(C,this.socketWarningTimestamp,o.logger)},o.socketAcquisitionWarningTimeout??(o.requestTimeout??2000)+(o.connectionTimeout??1000));let P=e.query?$.buildQueryString(e.query):"",S=void 0;if(e.username!=null||e.password!=null){let i=e.username??"",a=e.password??"";S=`${i}:${a}`}let w=e.path;if(P)w+=`?${P}`;if(e.fragment)w+=`#${e.fragment}`;let T=e.hostname??"";if(T[0]==="["&&T.endsWith("]"))T=e.hostname.slice(1,-1);else T=e.hostname;let v={headers:e.headers,host:T,method:e.method,path:w,port:e.port,agent:C,auth:S},h=(s?R.request:q)(v,(i)=>{let a=new $.HttpResponse({statusCode:i.statusCode||-1,reason:i.statusMessage,headers:Q(i.headers),body:i});U({response:a})});if(h.on("error",(i)=>{if(ee.includes(i.code))p(Object.assign(i,{name:"TimeoutError"}));else p(i)}),t){let i=()=>{h.destroy();let a=H(t);p(a)};if(typeof t.addEventListener==="function"){let a=t;a.addEventListener("abort",i,{once:!0}),h.once("close",()=>a.removeEventListener("abort",i))}else t.onabort=i}let k=n??o.requestTimeout;l=te(h,p,o.connectionTimeout),m=oe(h,p,k,o.throwOnRequestTimeout,o.logger??console),y=re(h,p,o.socketTimeout);let E=v.agent;if(typeof E==="object"&&"keepAlive"in E)A=se(h,{keepAlive:E.keepAlive,keepAliveMsecs:E.keepAliveMsecs});u=V(h,e,k,this.externalAgent).catch((i)=>{return b(),c(i)})})}updateHttpClientConfig(e,t){this.config=void 0,this.configProvider=this.configProvider.then((n)=>{return{...n,[e]:t}})}httpHandlerConfigs(){return this.config??{}}resolveDefaultConfig(e){let{requestTimeout:t,connectionTimeout:n,socketTimeout:o,socketAcquisitionWarningTimeout:s,httpAgent:r,httpsAgent:c,throwOnRequestTimeout:u,logger:f}=e||{},l=!0,m=50;return{connectionTimeout:n,requestTimeout:t,socketTimeout:o,socketAcquisitionWarningTimeout:s,throwOnRequestTimeout:u,httpAgentProvider:async()=>{let{Agent:y,request:A}=await import("node:http");if(q=A,_=y,r instanceof _||typeof r?.destroy==="function")return this.externalAgent=!0,r;return new _({keepAlive:!0,maxSockets:50,...r})},httpsAgent:(()=>{if(c instanceof R.Agent||typeof c?.destroy==="function")return this.externalAgent=!0,c;return new R.Agent({keepAlive:!0,maxSockets:50,...c})})(),logger:f}}}var ae=new Uint16Array(1);class L{id=ae[0]++;total=0;max=0;session;refs=0;constructor(e){e.unref(),this.session=e}retain(){if(this.session.destroyed)throw Error("@smithy/node-http-handler - cannot acquire reference to destroyed session.");this.refs+=1,this.total+=1,this.max=Math.max(this.refs,this.max),this.session.ref()}free(){if(this.session.destroyed)return;if(this.refs-=1,this.refs===0)this.session.unref();if(this.refs<0)throw Error("@smithy/node-http-handler - ClientHttp2Session refcount at zero, cannot decrement.")}deref(){return this.session}close(){if(!this.session.closed)this.session.close()}destroy(){if(this.refs=0,!this.session.destroyed)this.session.destroy()}useCount(){return this.refs}}class K{sessions=[];maxConcurrency=0;constructor(e){this.sessions=(e??[]).map((t)=>new L(t))}poll(){let e=!1;for(let t of this.sessions){if(t.deref().destroyed){e=!0;continue}if(!this.maxConcurrency||t.useCount()<this.maxConcurrency)return t}if(e){for(let t of this.sessions)if(t.deref().destroyed)this.remove(t)}}offerLast(e){this.sessions.push(e)}remove(e){let t=this.sessions.indexOf(e);if(t>-1)this.sessions.splice(t,1)}[Symbol.iterator](){return this.sessions[Symbol.iterator]()}setMaxConcurrency(e){this.maxConcurrency=e}destroy(e){this.remove(e),e.destroy()}}class J{config;connectOptions;connectionPools=new Map;constructor(e){if(this.config=e,this.config.maxConcurrency&&this.config.maxConcurrency<=0)throw RangeError("maxConcurrency must be greater than zero.")}lease(e,t){let n=this.getUrlString(e),o=this.getPool(n);if(!this.config.disableConcurrency&&!t.isEventStream){let f=o.poll();if(f)return f.retain(),f}let s=new L(this.connect(n)),r=s.deref();if(this.config.maxConcurrency)r.settings({maxConcurrentStreams:this.config.maxConcurrency},(f)=>{if(f)throw Error("Fail to set maxConcurrentStreams to "+this.config.maxConcurrency+"when creating new session for "+e.destination.toString())});let c=()=>{this.removeFromPoolAndClose(n,s)},u=()=>{this.removeFromPoolAndCheckedDestroy(n,s)};if(r.on("goaway",c),r.on("error",u),r.on("frameError",u),r.on("close",u),t.requestTimeout)r.setTimeout(t.requestTimeout,u);return o.offerLast(s),s.retain(),s}release(e,t){t.free()}createIsolatedSession(e,t){let n=this.getUrlString(e),o=new L(this.connect(n)),s=o.deref();s.settings({maxConcurrentStreams:1});let r=()=>{o.destroy()};if(s.on("error",r),s.on("frameError",r),s.on("close",r),t.requestTimeout)s.setTimeout(t.requestTimeout,r);return o.retain(),o}destroy(){for(let[e,t]of this.connectionPools){for(let n of[...t])n.destroy();this.connectionPools.delete(e)}}setMaxConcurrentStreams(e){if(e&&e<=0)throw RangeError("maxConcurrentStreams must be greater than zero.");this.config.maxConcurrency=e;for(let t of this.connectionPools.values())t.setMaxConcurrency(e)}setDisableConcurrentStreams(e){this.config.disableConcurrency=e}setNodeHttp2ConnectOptions(e){this.connectOptions=e}debug(){let e={};for(let[t,n]of this.connectionPools){let o=[];for(let s of n)o.push({id:s.id,active:s.useCount(),maxConcurrent:s.max,totalRequests:s.total});e[t]={sessions:o}}return e}removeFromPoolAndClose(e,t){this.connectionPools.get(e)?.remove(t),t.close()}removeFromPoolAndCheckedDestroy(e,t){this.connectionPools.get(e)?.remove(t),t.destroy()}getPool(e){if(!this.connectionPools.has(e)){let t=new K;if(this.config.maxConcurrency)t.setMaxConcurrency(this.config.maxConcurrency);this.connectionPools.set(e,t)}return this.connectionPools.get(e)}getUrlString(e){return e.destination.toString()}connect(e){return this.connectOptions===void 0?D.connect(e):D.connect(e,this.connectOptions)}}class B{config;configProvider;metadata={handlerProtocol:"h2"};connectionManager=new J({});static create(e){if(typeof e?.handle==="function")return e;return new B(e)}constructor(e){this.configProvider=new Promise((t,n)=>{if(typeof e==="function")e().then((o)=>{t(o||{})}).catch(n);else t(e||{})})}destroy(){this.connectionManager.destroy()}async handle(e,{abortSignal:t,requestTimeout:n,isEventStream:o}={}){if(!this.config){this.config=await this.configProvider;let{disableConcurrentStreams:f,maxConcurrentStreams:l,nodeHttp2ConnectOptions:m}=this.config;if(this.connectionManager.setDisableConcurrentStreams(f??!1),l)this.connectionManager.setMaxConcurrentStreams(l);if(m)this.connectionManager.setNodeHttp2ConnectOptions(m)}let{requestTimeout:s,disableConcurrentStreams:r}=this.config,c=r||o,u=n??s;return new Promise((f,l)=>{let m=!1,y=void 0,A=async(a)=>{await y,f(a)},b=async(a)=>{await y,l(a)};if(t?.aborted){m=!0;let a=H(t);b(a);return}let{hostname:U,method:p,port:x,protocol:M,query:C}=e,P="";if(e.username!=null||e.password!=null){let a=e.username??"",g=e.password??"";P=`${a}:${g}@`}let S=`${M}//${P}${U}${x?`:${x}`:""}`,w={destination:new URL(S)},T={requestTimeout:this.config?.sessionTimeout,isEventStream:o},v=c?this.connectionManager.createIsolatedSession(w,T):this.connectionManager.lease(w,T),N=v.deref(),h=(a)=>{if(c)v.destroy();m=!0,b(a)},k=C?$.buildQueryString(C):"",E=e.path;if(k)E+=`?${k}`;if(e.fragment)E+=`#${e.fragment}`;let i=N.request({...e.headers,[D.constants.HTTP2_HEADER_PATH]:E,[D.constants.HTTP2_HEADER_METHOD]:p});if(u)i.setTimeout(u,()=>{i.close();let a=Error(`Stream timed out because of no activity for ${u} ms`);a.name="TimeoutError",h(a)});if(t){let a=()=>{i.close();let g=H(t);h(g)};if(typeof t.addEventListener==="function"){let g=t;g.addEventListener("abort",a,{once:!0}),i.once("close",()=>g.removeEventListener("abort",a))}else t.onabort=a}i.on("frameError",(a,g,X)=>{h(Error(`Frame type id ${a} in stream id ${X} has failed with code ${g}.`))}),i.on("error",h),i.on("aborted",()=>{h(Error(`HTTP/2 stream is abnormally aborted in mid-communication with result code ${i.rstCode}.`))}),i.on("response",(a)=>{let g=new $.HttpResponse({statusCode:a[":status"]??-1,headers:Q(a),body:i});if(m=!0,A({response:g}),c)N.close()}),i.on("close",()=>{if(c)v.destroy();else this.connectionManager.release(w,v);if(!m)h(Error("Unexpected error: http2 request did not get a response"))}),y=V(i,e,u)})}updateHttpClientConfig(e,t){this.config=void 0,this.configProvider=this.configProvider.then((n)=>{return{...n,[e]:t}})}httpHandlerConfigs(){return this.config??{}}}class G extends z.Writable{bufferedBytes=[];_write(e,t,n){this.bufferedBytes.push(e),n()}}var ue=(e)=>{if(fe(e))return de(e);return new Promise((t,n)=>{let o=new G;e.pipe(o),e.on("error",(s)=>{o.end(),n(s)}),o.on("error",n),o.on("finish",function(){let s=new Uint8Array(Buffer.concat(this.bufferedBytes));t(s)})})},fe=(e)=>typeof ReadableStream==="function"&&e instanceof ReadableStream;async function de(e){let t=[],n=e.getReader(),o=!1,s=0;while(!o){let{done:u,value:f}=await n.read();if(f)t.push(f),s+=f.length;o=u}let r=new Uint8Array(s),c=0;for(let u of t)r.set(u,c),c+=u.length;return r}he.DEFAULT_REQUEST_TIMEOUT=ce;he.NodeHttp2Handler=B;he.NodeHttpHandler=I;he.streamCollector=ue});
4
+ export{ye as kpa};
@@ -0,0 +1,2 @@
1
+ import{I8 as Q,Y8 as _}from"./cli-0.6.6-q1j20ysc.mjs";import{Ifa as I,Jfa as X}from"./cli-0.6.6-d5dexg4d.mjs";import{Cha as V,zha as B}from"./cli-0.6.6-hcajyfhg.mjs";import{wpa as T}from"./cli-0.6.6-py5db2ds.mjs";function j(){A.clear()}async function P(){let f=await Y();if(!f)return null;if(f.host!=="github.com")return null;return`${f.owner}/${f.name}`}async function Y(){let f=I();if(A.has(f))return A.get(f)??null;try{let q=await Q();if(B(`Git remote URL: ${q}`),!q)return B("No git remote URL found"),A.set(f,null),null;let x=O(q);return B(`Parsed repository: ${x?`${x.host}/${x.owner}/${x.name}`:null} from URL: ${q}`),A.set(f,x),x}catch(q){return B(`Error detecting repository: ${q}`),A.set(f,null),null}}function S(){let f=A.get(I());if(!f||f.host!=="github.com")return null;return`${f.owner}/${f.name}`}function O(f){let q=f.trim(),x=q.match(/^git@([^:]+):([^/]+)\/([^/]+?)(?:\.git)?$/);if(x?.[1]&&x[2]&&x[3]){if(!N(x[1]))return null;return{host:x[1],owner:x[2],name:x[3]}}let z=q.match(/^(https?|ssh|git):\/\/(?:[^@]+@)?([^/:]+(?::\d+)?)\/([^/]+)\/([^/]+?)(?:\.git)?$/);if(z?.[1]&&z[2]&&z[3]&&z[4]){let E=z[1],J=z[2],K=J.split(":")[0]??"";if(!N(K))return null;return{host:E==="https"||E==="http"?J:K,owner:z[3],name:z[4]}}return null}function D(f){let q=f.trim(),x=O(q);if(x){if(x.host!=="github.com")return null;return`${x.owner}/${x.name}`}if(!q.includes("://")&&!q.includes("@")&&q.includes("/")){let z=q.split("/");if(z.length===2&&z[0]&&z[1]){let E=z[1].replace(/\.git$/,"");return`${z[0]}/${E}`}}return B(`Could not parse repository from: ${q}`),null}function N(f){if(!f.includes("."))return!1;let q=f.split(".").pop();if(!q)return!1;return/^[a-zA-Z]+$/.test(q)}var A;var Z=T(()=>{X();V();_();A=new Map});
2
+ export{j as u7,P as v7,Y as w7,S as x7,O as y7,D as z7,Z as A7};
@@ -0,0 +1,2 @@
1
+ import{Ga as S}from"./cli-0.6.6-mfee7shn.mjs";import{Ia as c}from"./cli-0.6.6-731hhd3s.mjs";import{ld as P,pd as Vq}from"./cli-0.6.6-as18fmg3.mjs";import{td as I,ud as v,vd as $,wd as Wq}from"./cli-0.6.6-aep3cnz5.mjs";import{$u as Gq,St as L,Tt as qq,XI as E,Xt as h,YI as Qq,Yu as A,Zt as Bq,Zu as _,aE as M,bE as Jq,kt as N,lt as e,nK as f,qK as Tq,ro as C,to as r}from"./cli-0.6.6-23snct9d.mjs";import{x1 as s}from"./cli-0.6.6-c267ckfv.mjs";import{D9 as w,F9 as t,Qda as F,W7 as D,Y7 as n,Yda as a}from"./cli-0.6.6-q1j20ysc.mjs";import{wga as x,zga as d}from"./cli-0.6.6-a837m6n5.mjs";import{Cha as o,zha as j}from"./cli-0.6.6-hcajyfhg.mjs";import{Sha as y,_ha as l}from"./cli-0.6.6-g6ja9jcs.mjs";import{spa as p}from"./cli-0.6.6-py5db2ds.mjs";Jq();d();Bq();Gq();Wq();t();o();n();l();a();e();Qq();var V=p(s(),1);qq();r();Vq();Tq();function Lq({enabled:W=!0}={}){let b=V.useSyncExternalStore(v,I,I),H=_(),O=A((J)=>J.plugins.needsRefresh),{addNotification:z}=M(),R=V.useCallback(async()=>{try{let{enabled:J,disabled:T,errors:Q}=await f();await c();let X=P();if(Object.keys(X).length>0)z({key:"plugin-delisted-flagged",text:"Plugins flagged. Check /plugins",color:"warning",priority:"high"});let Y=[],Z=[];try{Y=await E(),$(Y)}catch(q){let B=q instanceof Error?q.message:String(q);Q.push({type:"generic-error",source:"plugin-commands",error:`Failed to load plugin commands: ${B}`}),$([])}try{Z=await N()}catch(q){let B=q instanceof Error?q.message:String(q);Q.push({type:"generic-error",source:"plugin-agents",error:`Failed to load plugin agents: ${B}`})}try{await S()}catch(q){let B=q instanceof Error?q.message:String(q);Q.push({type:"generic-error",source:"plugin-hooks",error:`Failed to load plugin hooks: ${B}`})}let u=(await Promise.all(J.map(async(q)=>{if(q.mcpServers)return Object.keys(q.mcpServers).length;let B=await C(q,Q);if(B)q.mcpServers=B;return B?Object.keys(B).length:0}))).reduce((q,B)=>q+B,0),m=(await Promise.all(J.map(async(q)=>{if(q.lspServers)return Object.keys(q.lspServers).length;let B=await L(q,Q);if(B)q.lspServers=B;return B?Object.keys(B).length:0}))).reduce((q,B)=>q+B,0);h(),H((q)=>{let B=q.plugins.errors.filter((G)=>G.source==="lsp-manager"||G.source.startsWith("plugin:")),K=new Set(Q.map((G)=>G.type==="generic-error"?`generic-error:${G.source}:${G.error}`:`${G.type}:${G.source}`)),U=[...B.filter((G)=>{let i=G.type==="generic-error"?`generic-error:${G.source}:${G.error}`:`${G.type}:${G.source}`;return!K.has(i)}),...Q];return{...q,plugins:{...q.plugins,enabled:J,disabled:T,commands:[],errors:U}}}),j(`Loaded plugins - Enabled: ${J.length}, Disabled: ${T.length}, Commands: ${Y.length}, Agents: ${Z.length}, Errors: ${Q.length}`);let g=J.reduce((q,B)=>{if(!B.hooksConfig)return q;return q+Object.values(B.hooksConfig).reduce((K,k)=>K+(k?.reduce((U,G)=>U+G.hooks.length,0)??0),0)},0);return{enabled_count:J.length,disabled_count:T.length,inline_count:w(J,(q)=>q.source.endsWith("@inline")),marketplace_count:w(J,(q)=>!q.source.endsWith("@inline")),error_count:Q.length,skill_count:Y.length,agent_count:Z.length,hook_count:g,mcp_count:u,lsp_count:m}}catch(J){let T=y(J);return F(T),j(`Error loading plugins: ${J}`),$([]),H((Q)=>{let X=Q.plugins.errors.filter((Z)=>Z.source==="lsp-manager"||Z.source.startsWith("plugin:")),Y={type:"generic-error",source:"plugin-system",error:T.message};return{...Q,plugins:{...Q.plugins,enabled:[],disabled:[],commands:[],errors:[...X,Y]}}}),{enabled_count:0,disabled_count:0,inline_count:0,marketplace_count:0,error_count:1,skill_count:0,agent_count:0,hook_count:0,mcp_count:0,lsp_count:0,load_failed:!0,ant_enabled_names:void 0}}},[H,z]);return V.useEffect(()=>{if(!W)return;R().then((J)=>{let{ant_enabled_names:T,...Q}=J,X={...Q,has_custom_plugin_cache_dir:!!process.env.CLAUDE_CODE_PLUGIN_CACHE_DIR};x("tengu_plugins_loaded",{...X,...T!==void 0&&{enabled_names:T}}),D("info","tengu_plugins_loaded",X)})},[R,W]),V.useEffect(()=>{if(W)return;$([])},[W]),V.useEffect(()=>{if(!W||!O)return;z({key:"plugin-reload-pending",text:"Plugins changed. Run /reload-plugins to activate.",color:"suggestion",priority:"low"})},[W,O,z]),W?b:[]}
2
+ export{Lq as Fa};
@@ -0,0 +1,2 @@
1
+ import{Ef as rG,xf as EG,yf as iG}from"./cli-0.6.6-xt0p4ems.mjs";import{$u as dG,CK as a,Fm as fG,GK as DG,GL as bG,IK as y,JK as o,JL as sG,KK as lG,MK as kG,NL as f,OL as s,PL as c,QL as v,RK as _G,RL as i,UL as u,Vq as vG,YL as cG,Yu as l,Zu as jG,_K as aG,_u as HG,aE as KG,bE as mG,iL as $G,jL as oG,qm as FG,rK as LG,rm as OG,sK as BG,sr as uG,uK as pG,vm as VG,wK as WG,xK as qG}from"./cli-0.6.6-23snct9d.mjs";import{oX as QJ}from"./cli-0.6.6-en2sexw5.mjs";import{u1 as wG,w1 as PG}from"./cli-0.6.6-arvcw19g.mjs";import{x1 as YG}from"./cli-0.6.6-c267ckfv.mjs";import{Uda as R,V$ as zG,Vda as _,Yda as gG,_$ as CG}from"./cli-0.6.6-q1j20ysc.mjs";import{ifa as NG}from"./cli-0.6.6-y305shhz.mjs";import{wga as A,zga as MG}from"./cli-0.6.6-a837m6n5.mjs";import{Cha as SG,hha as yG,zha as ZG}from"./cli-0.6.6-hcajyfhg.mjs";import{Tha as h,_ha as TG}from"./cli-0.6.6-g6ja9jcs.mjs";import{Rna as XG,Uja as QG}from"./cli-0.6.6-ncqg4xxp.mjs";import{spa as r,wpa as p}from"./cli-0.6.6-py5db2ds.mjs";var e=p(()=>{yG();NG()});function GG(Z){let z="plugin"in Z?Z.plugin:"no-plugin";return`${Z.type}:${Z.source}:${z}`}function JG(Z,z){if(z.length===0)return;Z((k)=>{let U=new Set(k.plugins.errors.map((j)=>GG(j))),$=z.filter((j)=>!U.has(GG(j)));if($.length===0)return k;return{...k,plugins:{...k.plugins,errors:[...k.plugins.errors,...$]}}})}function GJ(Z,z,k,U){let $=z==="disabled"?U??[]:U;if($===void 0)return Z;let j=new Map;for(let W of $)if(W.name!==void 0)j.set(W.name,W);let V=[],P=new Set;for(let W of Z){if(!W.name?.startsWith(k)){V.push(W);continue}let w=j.get(W.name);if(w)V.push(w),P.add(W.name)}for(let W of $)if(W.name===void 0||!P.has(W.name))V.push(W);return V}function IG(Z,z=!1){let k=HG(),U=l((G)=>G.authVersion),$=l((G)=>G.mcp.pluginReconnectKey),j=jG(),V=D.useRef(new Map),P=D.useRef(new Set),W=D.useRef(null);D.useEffect(()=>{},[j]);let{addNotification:w}=KG(),RG=16,d=D.useRef([]),N=D.useRef(null),C=D.useCallback(()=>{N.current=null;let G=d.current;if(G.length===0)return;d.current=[],j((Y)=>{let F=Y.mcp;for(let B of G){let{tools:X,commands:H,resources:q,...J}=B,K=J.type==="disabled"||J.type==="failed"?H??[]:H,Q=J.type==="disabled"||J.type==="failed"?q??[]:q,O=zG(J.name),I=F.clients.findIndex((M)=>M.name===J.name)===-1?[...F.clients,J]:F.clients.map((M)=>M.name===J.name?J:M),g=GJ(F.tools,J.type,O,X),x=K===void 0?F.commands:[...$G(F.commands,(M)=>kG(M,J.name)),...K],m=Q===void 0?F.resources:{...F.resources,...Q.length>0?{[J.name]:Q}:EG(F.resources,J.name)};F={...F,clients:I,tools:g,commands:x,resources:m}}return{...Y,mcp:F}})},[j]),b=D.useCallback((G)=>{if(d.current.push(G),N.current===null)N.current=setTimeout(C,RG)},[C]),E=D.useCallback(({client:G,tools:Y,commands:F,resources:B})=>{switch(b({...G,tools:Y,commands:F,resources:B}),G.type){case"connected":{if(bG(G.client,G.name,j),G.client.onclose=()=>{let X=G.config.type??"stdio";if(u(G.name,G.config).catch(()=>{ZG(`Failed to invalidate the server cache: ${G.name}`)}),y(G.name)){_(G.name,"Server is disabled, skipping automatic reconnection");return}if(X!=="stdio"&&X!=="sdk"){let H=JJ(X);_(G.name,`${H} transport closed/disconnected, attempting automatic reconnection`);let q=V.current.get(G.name);if(q)clearTimeout(q),V.current.delete(G.name);(async()=>{for(let K=1;K<=T;K++){if(y(G.name)){_(G.name,"Server disabled during reconnection, stopping retry"),V.current.delete(G.name);return}b({...G,type:"pending",reconnectAttempt:K,maxReconnectAttempts:T});let Q=Date.now();try{let L=await v(G.name,G.config),I=Date.now()-Q;if(L.client.type==="connected"){_(G.name,`${H} reconnection successful after ${I}ms (attempt ${K})`),V.current.delete(G.name),E(L);return}if(_(G.name,`${H} reconnection attempt ${K} completed with status: ${L.client.type}`),K===T){_(G.name,`Max reconnection attempts (${T}) reached, giving up`),V.current.delete(G.name),E(L);return}}catch(L){let I=Date.now()-Q;if(R(G.name,`${H} reconnection attempt ${K} failed after ${I}ms: ${L}`),K===T){_(G.name,`Max reconnection attempts (${T}) reached, giving up`),V.current.delete(G.name),b({...G,type:"failed"});return}}let O=Math.min(tG*Math.pow(2,K-1),eG);_(G.name,`Scheduling reconnection attempt ${K+1} in ${O}ms`),await new Promise((L)=>{let I=setTimeout(L,O);V.current.set(G.name,I)})}})()}else b({...G,type:"failed"})},!1)switch(X.action){case"register":case"skip":}if(G.capabilities?.tools?.listChanged)G.client.setNotificationHandler(VG,async()=>{_(G.name,"Received tools/list_changed notification, refreshing tools");try{let X=f.cache.get(G.name);f.cache.delete(G.name);let H=await f(G),q=H.length;if(X)X.then((J)=>{A("tengu_mcp_list_changed",{type:"tools",previousCount:J.length,newCount:q})},()=>{A("tengu_mcp_list_changed",{type:"tools",newCount:q})});else A("tengu_mcp_list_changed",{type:"tools",newCount:q});b({...G,tools:H})}catch(X){R(G.name,`Failed to refresh tools after list_changed notification: ${h(X)}`)}});if(G.capabilities?.prompts?.listChanged)G.client.setNotificationHandler(OG,async()=>{_(G.name,"Received prompts/list_changed notification, refreshing prompts"),A("tengu_mcp_list_changed",{type:"prompts"});try{c.cache.delete(G.name);let[X,H]=await Promise.all([c(G),Promise.resolve([])]);b({...G,commands:[...X,...H]}),nG?.()}catch(X){R(G.name,`Failed to refresh prompts after list_changed notification: ${h(X)}`)}});if(G.capabilities?.resources?.listChanged)G.client.setNotificationHandler(FG,async()=>{_(G.name,"Received resources/list_changed notification, refreshing resources"),A("tengu_mcp_list_changed",{type:"resources"});try{s.cache.delete(G.name);{let X=await s(G);b({...G,resources:X})}}catch(X){R(G.name,`Failed to refresh resources after list_changed notification: ${h(X)}`)}});break}case"needs-auth":case"failed":case"pending":case"disabled":break}},[b]),t=QG();D.useEffect(()=>{async function G(){let{servers:Y,errors:F}=z?{servers:{},errors:[]}:await a(Z),B={...Y,...Z};JG(j,F),j((X)=>{let{stale:H,...q}=_G(X.mcp,B);for(let Q of H){let O=V.current.get(Q.name);if(O)clearTimeout(O),V.current.delete(Q.name);if(Q.type==="connected")Q.client.onclose=void 0,u(Q.name,Q.config).catch(()=>{})}let J=new Set(q.clients.map((Q)=>Q.name)),K=Object.entries(B).filter(([Q])=>!J.has(Q)).map(([Q,O])=>({name:Q,type:y(Q)?"disabled":"pending",config:O}));if(K.length===0&&H.length===0)return X;return{...X,mcp:{...X.mcp,...q,clients:[...q.clients,...K]}}})}G().catch((Y)=>{R("useManageMCPConnections",`Failed to initialize servers as pending: ${h(Y)}`)})},[z,Z,j,t,$]),D.useEffect(()=>{let G=!1;async function Y(){let F;if(z||DG())F=Promise.resolve({});else BG(),F=LG();let{servers:B,errors:X}=z?{servers:{},errors:[]}:await a(Z,F);if(G)return;JG(j,X);let H={...B,...Z},q=Object.fromEntries(Object.entries(H).filter(([O])=>!y(O)));i(E,q).catch((O)=>{R("useManageMcpConnections",`Failed to get MCP resources: ${h(O)}`)});let J={};if(!z){if(J=qG(await F).allowed,G)return;if(Object.keys(J).length>0){let{servers:O}=WG(J,H);J=O}if(Object.keys(J).length>0){j((L)=>{let I=new Set(L.mcp.clients.map((x)=>x.name)),g=Object.entries(J).filter(([x])=>!I.has(x)).map(([x,m])=>({name:x,type:y(x)?"disabled":"pending",config:m}));if(g.length===0)return L;return{...L,mcp:{...L.mcp,clients:[...L.mcp.clients,...g]}}});let O=Object.fromEntries(Object.entries(J).filter(([L])=>!y(L)));i(E,O).catch((L)=>{R("useManageMcpConnections",`Failed to get claude.ai MCP resources: ${h(L)}`)})}}let K={...H,...J},Q={enterprise:0,global:0,project:0,user:0,plugin:0,claudeai:0};for(let O of Object.values(K))if(O.scope==="enterprise")Q.enterprise++;else if(O.scope==="user")Q.global++;else if(O.scope==="project")Q.project++;else if(O.scope==="local")Q.user++;else if(O.scope==="dynamic")Q.plugin++;else if(O.scope==="claudeai")Q.claudeai++;A("tengu_mcp_servers",{...Q})}return Y(),()=>{G=!0}},[z,Z,E,j,U,t,$]),D.useEffect(()=>{let G=V.current;return()=>{for(let Y of G.values())clearTimeout(Y);if(G.clear(),N.current!==null)clearTimeout(N.current),N.current=null,C()}},[C]);let AG=D.useCallback(async(G)=>{let Y=k.getState().mcp.clients.find((X)=>X.name===G);if(!Y)throw Error(`MCP server ${G} not found`);let F=V.current.get(G);if(F)clearTimeout(F),V.current.delete(G);let B=await v(G,Y.config);return E(B),B},[k,E]),hG=D.useCallback(async(G)=>{let Y=k.getState().mcp.clients.find((B)=>B.name===G);if(!Y)throw Error(`MCP server ${G} not found`);if(Y.type!=="disabled"){let B=V.current.get(G);if(B)clearTimeout(B),V.current.delete(G);if(o(G,!1),Y.type==="connected")await u(G,Y.config);b({name:G,type:"disabled",config:Y.config})}else{o(G,!0),b({name:G,type:"pending",config:Y.config});let B=await v(G,Y.config);E(B)}},[k,b,E]);return{reconnectMcpServer:AG,toggleMcpServer:hG}}function JJ(Z){switch(Z){case"http":return"HTTP";case"ws":case"ws-ide":return"WebSocket";default:return"SSE"}}var D,nG=null,T=5,tG=1000,eG=30000;var UG=p(()=>{XG();cG();fG();iG();oG();MG();lG();SG();XG();mG();dG();TG();gG();uG();rG();e();pG();sG();CG();aG();vG();D=r(YG(),1)});function aJ(){let Z=S.useContext(n);if(!Z)throw Error("useMcpReconnect must be used within MCPConnectionManager");return Z.reconnectMcpServer}function oJ(){let Z=S.useContext(n);if(!Z)throw Error("useMcpToggleEnabled must be used within MCPConnectionManager");return Z.toggleMcpServer}function sJ(Z){let z=xG.c(6),{children:k,dynamicMcpConfig:U,isStrictMcpConfig:$}=Z,{reconnectMcpServer:j,toggleMcpServer:V}=IG(U,$),P;if(z[0]!==j||z[1]!==V)P={reconnectMcpServer:j,toggleMcpServer:V},z[0]=j,z[1]=V,z[2]=P;else P=z[2];let W=P,w;if(z[3]!==k||z[4]!==W)w=wG(n.Provider,{value:W,children:k}),z[3]=k,z[4]=W,z[5]=w;else w=z[5];return w}var xG,S,n;var XJ=p(()=>{UG();PG();xG=r(QJ(),1),S=r(YG(),1),n=S.createContext(null)});
2
+ export{e as sf,aJ as tf,oJ as uf,sJ as vf,XJ as wf};
@@ -0,0 +1,2 @@
1
+ import{$Y as aQ,JY as g,LY as h,RY as RQ,_Y as jQ,dZ as d,oX as u,oZ as a,wY as QQ,xY as uQ}from"./cli-0.6.6-en2sexw5.mjs";import{u1 as S,v1 as k,w1 as f}from"./cli-0.6.6-arvcw19g.mjs";import{x1 as v}from"./cli-0.6.6-c267ckfv.mjs";import{L1 as n,N1 as t,S1 as YV}from"./cli-0.6.6-nymfz9tw.mjs";import{I5 as $Q,L5 as P,O5 as bQ,b6 as XV}from"./cli-0.6.6-8yvh28tb.mjs";import{Qda as CQ,Wba as mQ,Yda as VV,Zba as x,sca as QV,tba as fQ,uba as eQ}from"./cli-0.6.6-q1j20ysc.mjs";import{bea as AQ,cea as sQ}from"./cli-0.6.6-b1wqaqv9.mjs";import{uga as r,vga as nQ}from"./cli-0.6.6-7r4esgkf.mjs";import{Cha as iQ,zha as D}from"./cli-0.6.6-hcajyfhg.mjs";import{Moa as i,cpa as tQ}from"./cli-0.6.6-mc9x1jry.mjs";import{spa as M,wpa as F}from"./cli-0.6.6-py5db2ds.mjs";function XQ(){let X=VQ.useContext(QQ);if(!X)throw Error("useTerminalSize must be used within an Ink App component");return X}var VQ;var YQ=F(()=>{uQ();VQ=M(v(),1)});function ZQ(X,Q){if(Q.escape)return"escape";if(Q.return)return"enter";if(Q.tab)return"tab";if(Q.backspace)return"backspace";if(Q.delete)return"delete";if(Q.upArrow)return"up";if(Q.downArrow)return"down";if(Q.leftArrow)return"left";if(Q.rightArrow)return"right";if(Q.pageUp)return"pageup";if(Q.pageDown)return"pagedown";if(Q.wheelUp)return"wheelup";if(Q.wheelDown)return"wheeldown";if(Q.home)return"home";if(Q.end)return"end";if(X.length===1)return X.toLowerCase();return null}var JQ=()=>{};function GQ(X){let Q=X.split("+"),V={key:"",ctrl:!1,alt:!1,shift:!1,meta:!1,super:!1};for(let Z of Q){let Y=Z.toLowerCase();switch(Y){case"ctrl":case"control":V.ctrl=!0;break;case"alt":case"opt":case"option":V.alt=!0;break;case"shift":V.shift=!0;break;case"meta":V.meta=!0;break;case"cmd":case"command":case"super":case"win":V.super=!0;break;case"esc":V.key="escape";break;case"return":V.key="enter";break;case"space":V.key=" ";break;case"↑":V.key="up";break;case"↓":V.key="down";break;case"←":V.key="left";break;case"→":V.key="right";break;default:V.key=Y;break}}return V}function yQ(X){if(X===" ")return[GQ("space")];return X.trim().split(/\s+/).map(GQ)}function hQ(X){let Q=[];if(X.ctrl)Q.push("ctrl");if(X.alt)Q.push("alt");if(X.shift)Q.push("shift");if(X.meta)Q.push("meta");if(X.super)Q.push("cmd");let V=kQ(X.key);return Q.push(V),Q.join("+")}function kQ(X){switch(X){case"escape":return"Esc";case" ":return"Space";case"tab":return"tab";case"enter":return"Enter";case"backspace":return"Backspace";case"delete":return"Delete";case"up":return"↑";case"down":return"↓";case"left":return"←";case"right":return"→";case"pageup":return"PageUp";case"pagedown":return"PageDown";case"home":return"Home";case"end":return"End";default:return X}}function l(X){return X.map(hQ).join(" ")}function BV(X){let Q=[];for(let V of X)for(let[Z,Y]of Object.entries(V.bindings))Q.push({chord:yQ(Z),action:Y,context:V.context});return Q}var qQ=()=>{};function LQ(X,Q,V){let Z=V.findLast((Y)=>Y.action===X&&Y.context===Q);return Z?l(Z.chord):void 0}function gQ(X,Q){let V=ZQ(X,Q);if(!V)return null;let Z=Q.escape?!1:Q.meta;return{key:V,ctrl:Q.ctrl,alt:Z,shift:Q.shift,meta:Z,super:Q.super}}function HQ(X,Q){return X.key===Q.key&&X.ctrl===Q.ctrl&&X.shift===Q.shift&&(X.alt||X.meta)===(Q.alt||Q.meta)&&X.super===Q.super}function lQ(X,Q){if(X.length>=Q.chord.length)return!1;for(let V=0;V<X.length;V++){let Z=X[V],Y=Q.chord[V];if(!Z||!Y)return!1;if(!HQ(Z,Y))return!1}return!0}function cQ(X,Q){if(X.length!==Q.chord.length)return!1;for(let V=0;V<X.length;V++){let Z=X[V],Y=Q.chord[V];if(!Z||!Y)return!1;if(!HQ(Z,Y))return!1}return!0}function zQ(X,Q,V,Z,Y){if(Q.escape&&Y!==null)return{type:"chord_cancelled"};let J=gQ(X,Q);if(!J){if(Y!==null)return{type:"chord_cancelled"};return{type:"none"}}let G=Y?[...Y,J]:[J],q=new Set(V),B=Z.filter((L)=>q.has(L.context)),z=new Map;for(let L of B)if(L.chord.length>G.length&&lQ(G,L))z.set(l(L.chord),L.action);let N=!1;for(let L of z.values())if(L!==null){N=!0;break}if(N)return{type:"chord_started",pending:G};let H;for(let L of B)if(cQ(G,L))H=L;if(H){if(H.action===null)return{type:"unbound"};return{type:"match",action:H.action}}if(Y!==null)return{type:"chord_cancelled"};return{type:"none"}}var BQ=F(()=>{JQ();qQ()});function MV(X){let Q=c.c(24),{bindings:V,pendingChordRef:Z,pendingChord:Y,setPendingChord:J,activeContexts:G,registerActiveContext:q,unregisterActiveContext:B,handlerRegistryRef:z,children:N}=X,H;if(Q[0]!==V)H=(U,O)=>LQ(U,O,V),Q[0]=V,Q[1]=H;else H=Q[1];let L=H,_;if(Q[2]!==z)_=(U)=>{let O=z.current;if(!O)return dQ;if(!O.has(U.action))O.set(U.action,new Set);return O.get(U.action).add(U),()=>{let I=O.get(U.action);if(I){if(I.delete(U),I.size===0)O.delete(U.action)}}},Q[2]=z,Q[3]=_;else _=Q[3];let b=_,E;if(Q[4]!==G||Q[5]!==z)E=(U)=>{let O=z.current;if(!O)return!1;let I=O.get(U);if(!I||I.size===0)return!1;for(let e of I)if(G.has(e.context))return e.handler(),!0;return!1},Q[4]=G,Q[5]=z,Q[6]=E;else E=Q[6];let K=E,j;if(Q[7]!==V||Q[8]!==Z)j=(U,O,I)=>zQ(U,O,I,V,Z.current),Q[7]=V,Q[8]=Z,Q[9]=j;else j=Q[9];let A;if(Q[10]!==G||Q[11]!==V||Q[12]!==L||Q[13]!==K||Q[14]!==Y||Q[15]!==q||Q[16]!==b||Q[17]!==J||Q[18]!==j||Q[19]!==B)A={resolve:j,setPendingChord:J,getDisplayText:L,bindings:V,pendingChord:Y,activeContexts:G,registerActiveContext:q,unregisterActiveContext:B,registerHandler:b,invokeAction:K},Q[10]=G,Q[11]=V,Q[12]=L,Q[13]=K,Q[14]=Y,Q[15]=q,Q[16]=b,Q[17]=J,Q[18]=j,Q[19]=B,Q[20]=A;else A=Q[20];let w=A,W;if(Q[21]!==N||Q[22]!==w)W=S(NQ.Provider,{value:w,children:N}),Q[21]=N,Q[22]=w,Q[23]=W;else W=Q[23];return W}function dQ(){}function y(){return m.useContext(NQ)}function SV(X,Q){let V=c.c(5),Z=Q===void 0?!0:Q,Y=y(),J,G;if(V[0]!==X||V[1]!==Z||V[2]!==Y)J=()=>{if(!Y||!Z)return;return Y.registerActiveContext(X),()=>{Y.unregisterActiveContext(X)}},G=[X,Y,Z],V[0]=X,V[1]=Z,V[2]=Y,V[3]=J,V[4]=G;else J=V[3],G=V[4];m.useLayoutEffect(J,G)}var c,m,NQ;var UQ=F(()=>{BQ();f();c=M(u(),1),m=M(v(),1),NQ=m.createContext(null)});function TV(X,Q,V={}){let{context:Z="Global",isActive:Y=!0}=V,J=y();C.useEffect(()=>{if(!J||!Y)return;return J.registerHandler({action:X,context:Z,handler:Q})},[X,Z,Q,J,Y]);let G=C.useCallback((q,B,z)=>{if(!J)return;let N=[...J.activeContexts,Z,"Global"],H=[...new Set(N)],L=J.resolve(q,B,H);switch(L.type){case"match":if(J.setPendingChord(null),L.action===X){if(Q()!==!1)z.stopImmediatePropagation()}break;case"chord_started":J.setPendingChord(L.pending),z.stopImmediatePropagation();break;case"chord_cancelled":J.setPendingChord(null);break;case"unbound":J.setPendingChord(null),z.stopImmediatePropagation();break;case"none":break}},[X,Z,Q,J]);d(G,{isActive:Y})}function OQ(X,Q={}){let{context:V="Global",isActive:Z=!0}=Q,Y=y();C.useEffect(()=>{if(!Y||!Z)return;let G=[];for(let[q,B]of Object.entries(X))G.push(Y.registerHandler({action:q,context:V,handler:B}));return()=>{for(let q of G)q()}},[V,X,Y,Z]);let J=C.useCallback((G,q,B)=>{if(!Y)return;let z=[...Y.activeContexts,V,"Global"],N=[...new Set(z)],H=Y.resolve(G,q,N);switch(H.type){case"match":if(Y.setPendingChord(null),H.action in X){let L=X[H.action];if(L&&L()!==!1)B.stopImmediatePropagation()}break;case"chord_started":Y.setPendingChord(H.pending),B.stopImmediatePropagation();break;case"chord_cancelled":Y.setPendingChord(null);break;case"unbound":Y.setPendingChord(null),B.stopImmediatePropagation();break;case"none":break}},[V,X,Y]);d(J,{isActive:Z})}var C;var _Q=F(()=>{a();UQ();C=M(v(),1)});function o(X,Q,V){let Z=R.useRef(0),Y=R.useRef(void 0),J=R.useCallback(()=>{if(Y.current)clearTimeout(Y.current),Y.current=void 0},[]);return R.useEffect(()=>{return()=>{J()}},[J]),R.useCallback(()=>{let G=Date.now();if(G-Z.current<=FQ&&Y.current!==void 0)J(),X(!1),Q();else V?.(),X(!0),J(),Y.current=setTimeout((z,N)=>{z(!1),N.current=void 0},FQ,X,Y);Z.current=G},[X,Q,V,J])}var R,FQ=800;var WQ=F(()=>{R=M(v(),1)});function wQ(X,Q,V,Z=!0){let{exit:Y}=jQ(),[J,G]=T.useState({pending:!1,keyName:null}),q=T.useMemo(()=>V??Y,[V,Y]),B=o((_)=>G({pending:_,keyName:"Ctrl-C"}),q),z=o((_)=>G({pending:_,keyName:"Ctrl-D"}),q),N=T.useCallback(()=>{if(Q?.())return;B()},[B,Q]),H=T.useCallback(()=>{z()},[z]),L=T.useMemo(()=>({"app:interrupt":N,"app:exit":H}),[N,H]);return X(L,{context:"Global",isActive:Z}),J}var T;var MQ=F(()=>{aQ();WQ();T=M(v(),1)});function $V(X,Q,V){return wQ(OQ,Q,X,V)}var oQ=F(()=>{_Q();MQ()});function IQ(){return $.useContext(s)!==null}function pV(X){let Q=SQ.c(3),V=$.useContext(s),Z;if(Q[0]!==V||Q[1]!==X)Z=V?{rows:V.rows,columns:V.columns}:X,Q[0]=V,Q[1]=X,Q[2]=Z;else Z=Q[2];return Z}function xV(){return $.useContext(s)?.scrollRef??null}var SQ,$,s;var KQ=F(()=>{SQ=M(u(),1),$=M(v(),1),s=$.createContext(null)});function EQ(X){let Q=TQ.c(21),{width:V,color:Z,char:Y,padding:J,title:G}=X,q=Y===void 0?"─":Y,B=J===void 0?0:J,{columns:z}=XQ(),N=Math.max(0,(V??z)-B);if(G){let b=AQ(G)+2,E=Math.max(0,N-b),K=Math.floor(E/2),j=E-K,A=!Z,w;if(Q[0]!==q||Q[1]!==K)w=q.repeat(K),Q[0]=q,Q[1]=K,Q[2]=w;else w=Q[2];let W;if(Q[3]!==G)W=S(h,{dimColor:!0,children:S(RQ,{children:G})}),Q[3]=G,Q[4]=W;else W=Q[4];let U;if(Q[5]!==q||Q[6]!==j)U=q.repeat(j),Q[5]=q,Q[6]=j,Q[7]=U;else U=Q[7];let O;if(Q[8]!==Z||Q[9]!==A||Q[10]!==w||Q[11]!==W||Q[12]!==U)O=k(h,{color:Z,dimColor:A,children:[w," ",W," ",U]}),Q[8]=Z,Q[9]=A,Q[10]=w,Q[11]=W,Q[12]=U,Q[13]=O;else O=Q[13];return O}let H=!Z,L;if(Q[14]!==q||Q[15]!==N)L=q.repeat(N),Q[14]=q,Q[15]=N,Q[16]=L;else L=Q[16];let _;if(Q[17]!==Z||Q[18]!==H||Q[19]!==L)_=S(h,{color:Z,dimColor:H,children:L}),Q[17]=Z,Q[18]=H,Q[19]=L,Q[20]=_;else _=Q[20];return _}var TQ;var DQ=F(()=>{YQ();sQ();a();f();TQ=M(u(),1)});function oV(X){let Q=PQ.c(9),{children:V,color:Z}=X;if(IQ()){let q;if(Q[0]!==V)q=S(g,{flexDirection:"column",paddingX:1,flexShrink:0,children:V}),Q[0]=V,Q[1]=q;else q=Q[1];return q}let Y;if(Q[2]!==Z)Y=S(EQ,{color:Z}),Q[2]=Z,Q[3]=Y;else Y=Q[3];let J;if(Q[4]!==V)J=S(g,{flexDirection:"column",paddingX:2,children:V}),Q[4]=V,Q[5]=J;else J=Q[5];let G;if(Q[6]!==Y||Q[7]!==J)G=k(g,{flexDirection:"column",paddingTop:1,children:[Y,J]}),Q[6]=Y,Q[7]=J,Q[8]=G;else G=Q[8];return G}var PQ;var rQ=F(()=>{KQ();a();DQ();f();PQ=M(u(),1)});async function ZV(X="claude_code_guest_pass"){let{accessToken:Q,orgUUID:V}=await n(),Z={...t(Q),"x-organization-uuid":V},Y=`${r().BASE_API_URL}/api/oauth/organizations/${V}/referral/eligibility`;return(await i.get(Y,{headers:Z,params:{campaign:X},timeout:5000})).data}async function ZX(X="claude_code_guest_pass"){let{accessToken:Q,orgUUID:V}=await n(),Z={...t(Q),"x-organization-uuid":V},Y=`${r().BASE_API_URL}/api/oauth/organizations/${V}/referral/redemptions`;return(await i.get(Y,{headers:Z,params:{campaign:X},timeout:1e4})).data}function xQ(){return!!(P()?.organizationUuid&&$Q()&&bQ()==="max")}function JX(){if(!xQ())return{eligible:!1,needsRefresh:!1,hasCache:!1};let X=P()?.organizationUuid;if(!X)return{eligible:!1,needsRefresh:!1,hasCache:!1};let V=x().passesEligibilityCache?.[X];if(!V)return{eligible:!1,needsRefresh:!0,hasCache:!1};let{eligible:Z,timestamp:Y}=V,G=Date.now()-Y>pQ;return{eligible:Z,needsRefresh:G,hasCache:!0}}function GX(X){let Q=JV[X.currency]??`${X.currency} `,V=X.amount_minor_units/100,Z=V%1===0?V.toString():V.toFixed(2);return`${Q}${Z}`}function qX(){let X=P()?.organizationUuid;if(!X)return null;return x().passesEligibilityCache?.[X]?.referrer_reward??null}function LX(){let X=P()?.organizationUuid;if(!X)return null;return x().passesEligibilityCache?.[X]?.remaining_passes??null}async function vQ(){if(p)return D("Passes: Reusing in-flight eligibility fetch"),p;let X=P()?.organizationUuid;if(!X)return null;return p=(async()=>{try{let Q=await ZV(),V={...Q,timestamp:Date.now()};return mQ((Z)=>({...Z,passesEligibilityCache:{...Z.passesEligibilityCache,[X]:V}})),D(`Passes eligibility cached for org ${X}: ${Q.eligible}`),Q}catch(Q){return D("Failed to fetch and cache passes eligibility"),CQ(Q),null}finally{p=null}})(),p}async function GV(){if(!xQ())return null;let X=P()?.organizationUuid;if(!X)return null;let V=x().passesEligibilityCache?.[X],Z=Date.now();if(!V)return D("Passes: No cache, fetching eligibility in background (command unavailable this session)"),vQ(),null;if(Z-V.timestamp>pQ){D("Passes: Cache stale, returning cached data and refreshing in background"),vQ();let{timestamp:G,...q}=V;return q}D("Passes: Using fresh cached eligibility data");let{timestamp:Y,...J}=V;return J}async function HX(){if(fQ())return;GV()}var pQ=86400000,p=null,JV;var qV=F(()=>{tQ();nQ();XV();QV();iQ();VV();eQ();YV();JV={USD:"$",EUR:"€",GBP:"£",BRL:"R$",CAD:"CA$",AUD:"A$",NZD:"NZ$",SGD:"S$"}});
2
+ export{XQ as _V,YQ as $V,GQ as aW,yQ as bW,l as cW,BV as dW,qQ as eW,LQ as fW,zQ as gW,BQ as hW,MV as iW,y as jW,SV as kW,UQ as lW,TV as mW,OQ as nW,_Q as oW,o as pW,WQ as qW,$V as rW,oQ as sW,s as tW,IQ as uW,pV as vW,xV as wW,KQ as xW,EQ as yW,DQ as zW,oV as AW,rQ as BW,ZX as CW,JX as DW,GX as EW,qX as FW,LX as GW,GV as HW,HX as IW,qV as JW};
@@ -0,0 +1,2 @@
1
+ import{wpa as M}from"./cli-0.6.6-py5db2ds.mjs";function P(j){return j.message?.role??j.role}function G(j){return j.message?j.message.content:j.content}function K(j){if(!j||typeof j!=="object")return!1;if(j.type==="image")return!0;if(j.type==="tool_result"&&Array.isArray(j.content))return j.content.some((q)=>K(q));return!1}function Q(j){if(!Array.isArray(j))return!1;return j.some((q)=>K(q))}function U(j){if(!Array.isArray(j)||j.length===0)return!1;return j.every((q)=>{let w=q;return w&&typeof w==="object"&&w.type==="tool_result"})}function V(j){let q=j[j.length-1];if(!q||typeof q!=="object")return"user";if(P(q)!=="user")return"agent";if(U(G(q)))return"agent";return"user"}function W(j){return j.some((q)=>Q(G(q)))}function X(j){let q={"x-initiator":V(j)};if(W(j))q["Copilot-Vision-Request"]="true";return q}function Z(j,q={}){return(w,B)=>{let E=new Headers(B?.headers);for(let[z,F]of Object.entries(q))if(!E.has(z))E.set(z,F);try{if(typeof B?.body==="string"){let z=JSON.parse(B.body);if(Array.isArray(z?.messages))for(let[F,L]of Object.entries(X(z.messages)))E.set(F,L)}}catch{}return j(w,{...B,headers:E})}}var Y=()=>{};
2
+ export{V as M6,W as N6,X as O6,Z as P6,Y as Q6};
@@ -0,0 +1,2 @@
1
+ import{wpa as q}from"./cli-0.6.6-py5db2ds.mjs";function x(k){j=[k,...j.slice(0,v-1)]}function y(){return j}var j,v=20;var w=q(()=>{j=[]});
2
+ export{x as Ud,y as Vd,w as Wd};