@claudiolabs/claudin 1.1.16 → 1.1.18

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 (915) hide show
  1. package/dist/chunks/AgentTool-1.1.18-8r539yq1.mjs +1 -0
  2. package/dist/chunks/App-1.1.18-9qegazdp.mjs +1 -0
  3. package/dist/chunks/ApproveApiKey-1.1.18-75srd2ah.mjs +1 -0
  4. package/dist/chunks/AssistantSessionChooser-1.1.18-8s0prsvd.mjs +1 -0
  5. package/dist/chunks/AutoModeOptInDialog-1.1.18-8908as3d.mjs +1 -0
  6. package/dist/chunks/BypassPermissionsModeDialog-1.1.18-hzr5qznb.mjs +1 -0
  7. package/dist/chunks/ClaudeMdExternalIncludesDialog-1.1.18-11b01q4g.mjs +1 -0
  8. package/dist/chunks/ConsoleOAuthFlow-1.1.18-gdmxhc4c.mjs +1 -0
  9. package/dist/chunks/DiffDialog-1.1.18-0ve87kmt.mjs +6 -0
  10. package/dist/chunks/Doctor-1.1.18-bm9y9hp0.mjs +1 -0
  11. package/dist/chunks/ExplorerDialog-1.1.18-s5gycf8y.mjs +6 -0
  12. package/dist/chunks/ITermBackend-1.1.18-ck22r980.mjs +1 -0
  13. package/dist/chunks/InvalidConfigDialog-1.1.18-k4rxj60y.mjs +1 -0
  14. package/dist/chunks/InvalidSettingsDialog-1.1.18-7jtsdcvz.mjs +1 -0
  15. package/dist/chunks/MigrationDialog-1.1.18-79c4xptb.mjs +1 -0
  16. package/dist/chunks/Onboarding-1.1.18-at9smz0c.mjs +1 -0
  17. package/dist/chunks/ProviderManager-1.1.18-fmn6pds0.mjs +1 -0
  18. package/dist/chunks/REPL-1.1.18-ethctbw9.mjs +1 -0
  19. package/dist/chunks/ResumeConversation-1.1.18-7jny2tma.mjs +1 -0
  20. package/dist/chunks/SnapshotUpdateDialog-1.1.18-4tt9s4sx.mjs +1 -0
  21. package/dist/chunks/TeleportProgress-1.1.18-9y6kadd2.mjs +1 -0
  22. package/dist/chunks/TeleportRepoMismatchDialog-1.1.18-0zp920qr.mjs +1 -0
  23. package/dist/chunks/TeleportResumeWrapper-1.1.18-ywhxqdw4.mjs +1 -0
  24. package/dist/chunks/TmuxBackend-1.1.18-cfmzwnnw.mjs +9 -0
  25. package/dist/chunks/ToolSearchTool-1.1.18-7czxxmxn.mjs +1 -0
  26. package/dist/chunks/TrustDialog-1.1.18-q46q6gnr.mjs +1 -0
  27. package/dist/chunks/activeProvider-1.1.18-0s9sbdx0.mjs +1 -0
  28. package/dist/chunks/add-dir-1.1.18-2v7nqdda.mjs +1 -0
  29. package/dist/chunks/agentTypes-1.1.18-5tbxn6cp.mjs +1 -0
  30. package/dist/chunks/agents-1.1.18-1zj1bttk.mjs +110 -0
  31. package/dist/chunks/agents-1.1.18-n28gzp6b.mjs +3 -0
  32. package/dist/chunks/api-1.1.18-kb26phxt.mjs +1 -0
  33. package/dist/chunks/asciicast-1.1.18-q0418p4r.mjs +1 -0
  34. package/dist/chunks/assistant-1.1.18-ky0pcnme.mjs +1 -0
  35. package/dist/chunks/auth-1.1.18-4de9sj97.mjs +1 -0
  36. package/dist/chunks/auth-1.1.18-6yqhszf3.mjs +1 -0
  37. package/dist/chunks/autoMode-1.1.18-63jx6p2w.mjs +52 -0
  38. package/dist/chunks/autoModeSetup-1.1.18-bk6w4529.mjs +44 -0
  39. package/dist/chunks/autoUpdater-1.1.18-bg5z208x.mjs +1 -0
  40. package/dist/chunks/backgroundHousekeeping-1.1.18-3m48d47f.mjs +1 -0
  41. package/dist/chunks/branch-1.1.18-sgfz4w61.mjs +4 -0
  42. package/dist/chunks/bridge-1.1.18-ewtwajff.mjs +2 -0
  43. package/dist/chunks/bridgeConfig-1.1.18-6aeg22kg.mjs +1 -0
  44. package/dist/chunks/bridgeEnabled-1.1.18-2ybc4ee8.mjs +1 -0
  45. package/dist/chunks/bridgeMain-1.1.18-pt5dztgy.mjs +88 -0
  46. package/dist/chunks/bridgePointer-1.1.18-w72zdv7w.mjs +1 -0
  47. package/dist/chunks/btw-1.1.18-w43t3mem.mjs +1 -0
  48. package/dist/chunks/buddy-1.1.18-zfhza9df.mjs +3 -0
  49. package/dist/chunks/cache-probe-1.1.18-ap6m4e42.mjs +21 -0
  50. package/dist/chunks/cacheStats-1.1.18-gcvx2d6q.mjs +4 -0
  51. package/dist/chunks/caches-1.1.18-warrda1f.mjs +1 -0
  52. package/dist/chunks/claudeDesktop-1.1.18-v3ghw0k9.mjs +1 -0
  53. package/dist/chunks/claudemd-1.1.18-b6tnjsjw.mjs +1 -0
  54. package/dist/chunks/clear-1.1.18-8abstaz1.mjs +1 -0
  55. package/dist/chunks/clearTerminal-1.1.18-wgv6q897.mjs +1 -0
  56. package/dist/chunks/cli-1.1.18-018bk764.mjs +2 -0
  57. package/dist/chunks/cli-1.1.18-049a81dd.mjs +25 -0
  58. package/dist/chunks/cli-1.1.18-0aakxjsk.mjs +2 -0
  59. package/dist/chunks/cli-1.1.18-0h118vrj.mjs +2 -0
  60. package/dist/chunks/cli-1.1.18-0tg14dph.mjs +2 -0
  61. package/dist/chunks/cli-1.1.18-0xknnw9q.mjs +2 -0
  62. package/dist/chunks/cli-1.1.18-0y6qt71a.mjs +2 -0
  63. package/dist/chunks/cli-1.1.18-0yhfm17h.mjs +2 -0
  64. package/dist/chunks/cli-1.1.18-0z5526z3.mjs +4 -0
  65. package/dist/chunks/cli-1.1.18-12tzkcxz.mjs +2 -0
  66. package/dist/chunks/cli-1.1.18-18rbpjbc.mjs +2 -0
  67. package/dist/chunks/cli-1.1.18-1c8pr80a.mjs +2 -0
  68. package/dist/chunks/cli-1.1.18-1spz0azv.mjs +3 -0
  69. package/dist/chunks/cli-1.1.18-1t3rb5a8.mjs +2 -0
  70. package/dist/chunks/cli-1.1.18-251zfmjp.mjs +5 -0
  71. package/dist/chunks/cli-1.1.18-27b82jjj.mjs +3 -0
  72. package/dist/chunks/cli-1.1.18-2ach0t0d.mjs +7 -0
  73. package/dist/chunks/cli-1.1.18-2gvrr93b.mjs +2 -0
  74. package/dist/chunks/cli-1.1.18-2k96kgmz.mjs +2 -0
  75. package/dist/chunks/cli-1.1.18-2qvvz2tv.mjs +2 -0
  76. package/dist/chunks/cli-1.1.18-2vdwwm5f.mjs +3 -0
  77. package/dist/chunks/cli-1.1.18-2w9274tq.mjs +59 -0
  78. package/dist/chunks/cli-1.1.18-2wsf8n3w.mjs +3 -0
  79. package/dist/chunks/cli-1.1.18-3b5j4jfq.mjs +2 -0
  80. package/dist/chunks/cli-1.1.18-3pn5knk8.mjs +2 -0
  81. package/dist/chunks/cli-1.1.18-3rm83ba2.mjs +2 -0
  82. package/dist/chunks/cli-1.1.18-3rxhxwbk.mjs +4 -0
  83. package/dist/chunks/cli-1.1.18-3s03nva1.mjs +2 -0
  84. package/dist/chunks/cli-1.1.18-3w57qes2.mjs +2 -0
  85. package/dist/chunks/cli-1.1.18-3y4pftxb.mjs +206 -0
  86. package/dist/chunks/cli-1.1.18-3z65nz4z.mjs +2 -0
  87. package/dist/chunks/cli-1.1.18-417wb57s.mjs +2 -0
  88. package/dist/chunks/cli-1.1.18-462kn9pt.mjs +2 -0
  89. package/dist/chunks/cli-1.1.18-4c3jqppx.mjs +2 -0
  90. package/dist/chunks/cli-1.1.18-4f2ncqzp.mjs +45 -0
  91. package/dist/chunks/cli-1.1.18-4h2r40da.mjs +2 -0
  92. package/dist/chunks/cli-1.1.18-4j0hy93x.mjs +3 -0
  93. package/dist/chunks/cli-1.1.18-4jy396p1.mjs +6 -0
  94. package/dist/chunks/cli-1.1.18-553zzrge.mjs +2 -0
  95. package/dist/chunks/cli-1.1.18-56vce0gb.mjs +2 -0
  96. package/dist/chunks/cli-1.1.18-5dw1bb8m.mjs +2 -0
  97. package/dist/chunks/cli-1.1.18-5fhws40c.mjs +2 -0
  98. package/dist/chunks/cli-1.1.18-5mr13yxz.mjs +2 -0
  99. package/dist/chunks/cli-1.1.18-5pa0bk59.mjs +2 -0
  100. package/dist/chunks/cli-1.1.18-5s8f8gd5.mjs +3 -0
  101. package/dist/chunks/cli-1.1.18-6hjdcw80.mjs +2 -0
  102. package/dist/chunks/cli-1.1.18-6nxyz9v3.mjs +2 -0
  103. package/dist/chunks/cli-1.1.18-6w9m5m4s.mjs +2 -0
  104. package/dist/chunks/cli-1.1.18-6wrbe4ft.mjs +4 -0
  105. package/dist/chunks/cli-1.1.18-703emt7y.mjs +16 -0
  106. package/dist/chunks/cli-1.1.18-70jytem3.mjs +2 -0
  107. package/dist/chunks/cli-1.1.18-70ktef72.mjs +2 -0
  108. package/dist/chunks/cli-1.1.18-71zz07m4.mjs +3 -0
  109. package/dist/chunks/cli-1.1.18-7g6xwfbz.mjs +2 -0
  110. package/dist/chunks/cli-1.1.18-7nsrr2k0.mjs +2 -0
  111. package/dist/chunks/cli-1.1.18-7pcfwrhj.mjs +2 -0
  112. package/dist/chunks/cli-1.1.18-7set7d4d.mjs +3 -0
  113. package/dist/chunks/cli-1.1.18-7wccrsx9.mjs +2 -0
  114. package/dist/chunks/cli-1.1.18-7xc4d1d9.mjs +2 -0
  115. package/dist/chunks/cli-1.1.18-86jznh5v.mjs +2 -0
  116. package/dist/chunks/cli-1.1.18-8fpwak2g.mjs +4 -0
  117. package/dist/chunks/cli-1.1.18-8thyc5yy.mjs +2 -0
  118. package/dist/chunks/cli-1.1.18-8vxrthte.mjs +4 -0
  119. package/dist/chunks/cli-1.1.18-8zrm4yfd.mjs +2 -0
  120. package/dist/chunks/cli-1.1.18-948h21gh.mjs +2 -0
  121. package/dist/chunks/cli-1.1.18-99wvb94x.mjs +2 -0
  122. package/dist/chunks/cli-1.1.18-9cpcw7fg.mjs +2 -0
  123. package/dist/chunks/cli-1.1.18-9jkqy8de.mjs +2 -0
  124. package/dist/chunks/cli-1.1.18-9zvacjd0.mjs +2 -0
  125. package/dist/chunks/cli-1.1.18-a888prq4.mjs +6 -0
  126. package/dist/chunks/cli-1.1.18-aek1gddg.mjs +2 -0
  127. package/dist/chunks/cli-1.1.18-af7txyky.mjs +133 -0
  128. package/dist/chunks/cli-1.1.18-aj93qvyc.mjs +3 -0
  129. package/dist/chunks/cli-1.1.18-avas0dtp.mjs +2 -0
  130. package/dist/chunks/cli-1.1.18-avhbxgh1.mjs +2 -0
  131. package/dist/chunks/cli-1.1.18-awvejq1d.mjs +2 -0
  132. package/dist/chunks/cli-1.1.18-b4azpwk0.mjs +18 -0
  133. package/dist/chunks/cli-1.1.18-b5h22srd.mjs +2 -0
  134. package/dist/chunks/cli-1.1.18-bfzft69m.mjs +2 -0
  135. package/dist/chunks/cli-1.1.18-c9h4ga5f.mjs +2 -0
  136. package/dist/chunks/cli-1.1.18-cahfd7zp.mjs +15 -0
  137. package/dist/chunks/cli-1.1.18-ccbh77pf.mjs +2 -0
  138. package/dist/chunks/cli-1.1.18-cd5r9mfb.mjs +2 -0
  139. package/dist/chunks/cli-1.1.18-cj8tr93q.mjs +2 -0
  140. package/dist/chunks/cli-1.1.18-cjkn7t4k.mjs +2 -0
  141. package/dist/chunks/cli-1.1.18-cphcr3xr.mjs +15 -0
  142. package/dist/chunks/cli-1.1.18-cqmjby3t.mjs +24 -0
  143. package/dist/chunks/cli-1.1.18-crpxak5f.mjs +2 -0
  144. package/dist/chunks/cli-1.1.18-cxg522yt.mjs +4 -0
  145. package/dist/chunks/cli-1.1.18-cy0ypdkd.mjs +2 -0
  146. package/dist/chunks/cli-1.1.18-dcrg5hwd.mjs +2 -0
  147. package/dist/chunks/cli-1.1.18-ddreb78e.mjs +2 -0
  148. package/dist/chunks/cli-1.1.18-dq2vate5.mjs +2 -0
  149. package/dist/chunks/cli-1.1.18-dvyh5qzn.mjs +2 -0
  150. package/dist/chunks/cli-1.1.18-dzbn08g2.mjs +2 -0
  151. package/dist/chunks/cli-1.1.18-e107yrwx.mjs +2 -0
  152. package/dist/chunks/cli-1.1.18-e8stczm5.mjs +2 -0
  153. package/dist/chunks/cli-1.1.18-ecds9fxm.mjs +2 -0
  154. package/dist/chunks/cli-1.1.18-ek85fj6n.mjs +2 -0
  155. package/dist/chunks/cli-1.1.18-erjpjwnr.mjs +4 -0
  156. package/dist/chunks/cli-1.1.18-esvp6n4e.mjs +66 -0
  157. package/dist/chunks/cli-1.1.18-ezpyhrzw.mjs +133 -0
  158. package/dist/chunks/cli-1.1.18-f2j32mha.mjs +2 -0
  159. package/dist/chunks/cli-1.1.18-f5ggv7be.mjs +2 -0
  160. package/dist/chunks/cli-1.1.18-f6m259he.mjs +2 -0
  161. package/dist/chunks/cli-1.1.18-f7jag2rr.mjs +2 -0
  162. package/dist/chunks/cli-1.1.18-f8sy5pe3.mjs +3 -0
  163. package/dist/chunks/cli-1.1.18-fh3h37zy.mjs +8 -0
  164. package/dist/chunks/cli-1.1.18-fr4nmsgv.mjs +3 -0
  165. package/dist/chunks/cli-1.1.18-fst0kx9m.mjs +24 -0
  166. package/dist/chunks/cli-1.1.18-gdvh8p4h.mjs +2 -0
  167. package/dist/chunks/cli-1.1.18-gnd39prj.mjs +18 -0
  168. package/dist/chunks/cli-1.1.18-gvzkraze.mjs +2 -0
  169. package/dist/chunks/cli-1.1.18-gz2c86d2.mjs +2 -0
  170. package/dist/chunks/cli-1.1.18-hbv881pn.mjs +2 -0
  171. package/dist/chunks/cli-1.1.18-heh8xz6x.mjs +2 -0
  172. package/dist/chunks/cli-1.1.18-hg5srcxb.mjs +7 -0
  173. package/dist/chunks/cli-1.1.18-hgn94jwm.mjs +2 -0
  174. package/dist/chunks/cli-1.1.18-hjp96a36.mjs +2 -0
  175. package/dist/chunks/cli-1.1.18-hphxdvpd.mjs +17 -0
  176. package/dist/chunks/cli-1.1.18-hsqq1hdd.mjs +9 -0
  177. package/dist/chunks/cli-1.1.18-hvd9yyb4.mjs +2 -0
  178. package/dist/chunks/cli-1.1.18-j1ryg6qv.mjs +2 -0
  179. package/dist/chunks/cli-1.1.18-j372h4fv.mjs +4 -0
  180. package/dist/chunks/cli-1.1.18-j461dthr.mjs +2 -0
  181. package/dist/chunks/cli-1.1.18-j5zh2pdx.mjs +17 -0
  182. package/dist/chunks/cli-1.1.18-jcqz5j7y.mjs +2 -0
  183. package/dist/chunks/cli-1.1.18-jgwwkx62.mjs +58 -0
  184. package/dist/chunks/cli-1.1.18-jjekxppq.mjs +25 -0
  185. package/dist/chunks/cli-1.1.18-jp0phw3q.mjs +2 -0
  186. package/dist/chunks/cli-1.1.18-k05shz35.mjs +2 -0
  187. package/dist/chunks/cli-1.1.18-k11n6026.mjs +3 -0
  188. package/dist/chunks/cli-1.1.18-k1pkc44n.mjs +2 -0
  189. package/dist/chunks/cli-1.1.18-kj7gj6vk.mjs +3 -0
  190. package/dist/chunks/cli-1.1.18-kkr6w2g7.mjs +2 -0
  191. package/dist/chunks/cli-1.1.18-m04wmdz7.mjs +9 -0
  192. package/dist/chunks/cli-1.1.18-mfjtdkn6.mjs +20 -0
  193. package/dist/chunks/cli-1.1.18-mg0s34rf.mjs +2 -0
  194. package/dist/chunks/cli-1.1.18-mg7jmbh9.mjs +2 -0
  195. package/dist/chunks/cli-1.1.18-mhy7qzsz.mjs +21 -0
  196. package/dist/chunks/cli-1.1.18-mm8bkmax.mjs +2 -0
  197. package/dist/chunks/cli-1.1.18-mqwcfz14.mjs +2 -0
  198. package/dist/chunks/cli-1.1.18-mrrbn0jj.mjs +6 -0
  199. package/dist/chunks/cli-1.1.18-mwevzyy2.mjs +2 -0
  200. package/dist/chunks/cli-1.1.18-mycrby1p.mjs +2 -0
  201. package/dist/chunks/cli-1.1.18-mz10pywc.mjs +2 -0
  202. package/dist/chunks/cli-1.1.18-n05vxdaj.mjs +2 -0
  203. package/dist/chunks/cli-1.1.18-n7dkmrv9.mjs +24 -0
  204. package/dist/chunks/cli-1.1.18-ndct9t5e.mjs +4 -0
  205. package/dist/chunks/cli-1.1.18-npdweafk.mjs +6 -0
  206. package/dist/chunks/cli-1.1.18-ns45fmht.mjs +2 -0
  207. package/dist/chunks/cli-1.1.18-p0ey1z9w.mjs +2 -0
  208. package/dist/chunks/cli-1.1.18-p28wy0mz.mjs +2 -0
  209. package/dist/chunks/cli-1.1.18-p3yf1aq6.mjs +42 -0
  210. package/dist/chunks/cli-1.1.18-p5rqk1qq.mjs +2 -0
  211. package/dist/chunks/cli-1.1.18-pbdm30bs.mjs +2 -0
  212. package/dist/chunks/cli-1.1.18-psb6qqc1.mjs +2 -0
  213. package/dist/chunks/cli-1.1.18-pt16bxrm.mjs +2 -0
  214. package/dist/chunks/cli-1.1.18-pzeg2p3k.mjs +2 -0
  215. package/dist/chunks/cli-1.1.18-q7qp6pv5.mjs +2 -0
  216. package/dist/chunks/cli-1.1.18-qfz5keqx.mjs +2 -0
  217. package/dist/chunks/cli-1.1.18-qrz1vgy2.mjs +2 -0
  218. package/dist/chunks/cli-1.1.18-qs28eyy1.mjs +2 -0
  219. package/dist/chunks/cli-1.1.18-qykcs1fr.mjs +4 -0
  220. package/dist/chunks/cli-1.1.18-r50x1ezt.mjs +2 -0
  221. package/dist/chunks/cli-1.1.18-ra67yknr.mjs +6 -0
  222. package/dist/chunks/cli-1.1.18-rbfhhwym.mjs +2 -0
  223. package/dist/chunks/cli-1.1.18-rbkz8pj4.mjs +2 -0
  224. package/dist/chunks/cli-1.1.18-rnqtkprk.mjs +2 -0
  225. package/dist/chunks/cli-1.1.18-rp84hvn4.mjs +2 -0
  226. package/dist/chunks/cli-1.1.18-rykfqnyd.mjs +2 -0
  227. package/dist/chunks/cli-1.1.18-s5nhwqft.mjs +2 -0
  228. package/dist/chunks/cli-1.1.18-sdsvkqmn.mjs +2 -0
  229. package/dist/chunks/cli-1.1.18-sq93n51h.mjs +2 -0
  230. package/dist/chunks/cli-1.1.18-t526ry94.mjs +34 -0
  231. package/dist/chunks/cli-1.1.18-ta6r8qry.mjs +2 -0
  232. package/dist/chunks/cli-1.1.18-tm7nmhz8.mjs +2 -0
  233. package/dist/chunks/cli-1.1.18-ts8ermsd.mjs +2 -0
  234. package/dist/chunks/cli-1.1.18-v42h6ekh.mjs +15 -0
  235. package/dist/chunks/cli-1.1.18-v4gc446r.mjs +2 -0
  236. package/dist/chunks/cli-1.1.18-v5btk93t.mjs +3 -0
  237. package/dist/chunks/cli-1.1.18-v75xqnbv.mjs +2 -0
  238. package/dist/chunks/cli-1.1.18-vgfpa3bs.mjs +5 -0
  239. package/dist/chunks/cli-1.1.18-vnsqk2vn.mjs +2 -0
  240. package/dist/chunks/cli-1.1.18-vx2rxj7b.mjs +2 -0
  241. package/dist/chunks/cli-1.1.18-vymgw42z.mjs +2 -0
  242. package/dist/chunks/cli-1.1.18-vzrv28w4.mjs +24 -0
  243. package/dist/chunks/cli-1.1.18-wp7r00wk.mjs +2 -0
  244. package/dist/chunks/cli-1.1.18-wzpxr762.mjs +50 -0
  245. package/dist/chunks/cli-1.1.18-x0bha3jf.mjs +2 -0
  246. package/dist/chunks/cli-1.1.18-x7jyxff1.mjs +3 -0
  247. package/dist/chunks/cli-1.1.18-x7k6y949.mjs +39 -0
  248. package/dist/chunks/cli-1.1.18-x9wfjwnm.mjs +2 -0
  249. package/dist/chunks/cli-1.1.18-xfb4pete.mjs +5410 -0
  250. package/dist/chunks/cli-1.1.18-xpxkw4js.mjs +2 -0
  251. package/dist/chunks/cli-1.1.18-y0eah2b9.mjs +2 -0
  252. package/dist/chunks/cli-1.1.18-y89tqne6.mjs +2 -0
  253. package/dist/chunks/cli-1.1.18-ybazgea3.mjs +1 -0
  254. package/dist/chunks/cli-1.1.18-ybfayy4j.mjs +2 -0
  255. package/dist/chunks/cli-1.1.18-yk1f4vsx.mjs +2 -0
  256. package/dist/chunks/cli-1.1.18-ypcye8ae.mjs +6 -0
  257. package/dist/chunks/cli-1.1.18-ythtynpe.mjs +12 -0
  258. package/dist/chunks/cli-1.1.18-yymp5d28.mjs +12 -0
  259. package/dist/chunks/cli-1.1.18-yysexesh.mjs +2 -0
  260. package/dist/chunks/cli-1.1.18-z2dx0w6b.mjs +2 -0
  261. package/dist/chunks/cli-1.1.18-zd969gzb.mjs +2 -0
  262. package/dist/chunks/cli-1.1.18-zdx4ywwf.mjs +2 -0
  263. package/dist/chunks/cli-1.1.18-zhq044yz.mjs +26 -0
  264. package/dist/chunks/cli-1.1.18-ztyf20j1.mjs +2 -0
  265. package/dist/chunks/client-1.1.18-zdqzxpen.mjs +1 -0
  266. package/dist/chunks/color-1.1.18-qt7znj00.mjs +1 -0
  267. package/dist/chunks/compact-1.1.18-qev191am.mjs +3 -0
  268. package/dist/chunks/config-1.1.18-9kjysdvn.mjs +1 -0
  269. package/dist/chunks/config-1.1.18-am3webex.mjs +1 -0
  270. package/dist/chunks/constants-1.1.18-hdfyvthe.mjs +1 -0
  271. package/dist/chunks/context-1.1.18-ywdzshyf.mjs +1 -0
  272. package/dist/chunks/context-noninteractive-1.1.18-ncf3febd.mjs +1 -0
  273. package/dist/chunks/conversation-1.1.18-h1q8gp2k.mjs +1 -0
  274. package/dist/chunks/copilotHeaders-1.1.18-t0s2718z.mjs +1 -0
  275. package/dist/chunks/copy-1.1.18-66cbtmsa.mjs +9 -0
  276. package/dist/chunks/cost-1.1.18-350gegdk.mjs +1 -0
  277. package/dist/chunks/createSSHSession-1.1.18-vgmc8evp.mjs +1 -0
  278. package/dist/chunks/createSession-1.1.18-0e04rk8g.mjs +1 -0
  279. package/dist/chunks/debug-1.1.18-c4v63z13.mjs +1 -0
  280. package/dist/chunks/defaultActionDeps-1.1.18-jg2xdcgn.mjs +1534 -0
  281. package/dist/chunks/desktop-1.1.18-sghgn08z.mjs +1 -0
  282. package/dist/chunks/detectRepository-1.1.18-m0xvtgqt.mjs +1 -0
  283. package/dist/chunks/detection-1.1.18-d7kpetjp.mjs +1 -0
  284. package/dist/chunks/diff-1.1.18-y9e1gbv0.mjs +1 -0
  285. package/dist/chunks/doctor-1.1.18-me0b6eyh.mjs +1 -0
  286. package/dist/chunks/doctorDiagnostic-1.1.18-d85k2x5j.mjs +1 -0
  287. package/dist/chunks/earlyInput-1.1.18-6jzg1a3e.mjs +1 -0
  288. package/dist/chunks/effort-1.1.18-kzqkmbjd.mjs +13 -0
  289. package/dist/chunks/engine-1.1.18-z5jbth81.mjs +1 -0
  290. package/dist/chunks/envLessBridgeConfig-1.1.18-1cqrnkp2.mjs +1 -0
  291. package/dist/chunks/envUtils-1.1.18-x298f5cb.mjs +1 -0
  292. package/dist/chunks/environmentSelection-1.1.18-6k9hzg6p.mjs +1 -0
  293. package/dist/chunks/environments-1.1.18-r0dv94mx.mjs +1 -0
  294. package/dist/chunks/errors-1.1.18-q6s6h2zs.mjs +1 -0
  295. package/dist/chunks/exampleCommands-1.1.18-0zc9623h.mjs +1 -0
  296. package/dist/chunks/execFileNoThrow-1.1.18-spcbfmbw.mjs +1 -0
  297. package/dist/chunks/exit-1.1.18-zvcsa8gc.mjs +1 -0
  298. package/dist/chunks/explorer-1.1.18-wf8yy5vj.mjs +1 -0
  299. package/dist/chunks/export-1.1.18-qeyf86rn.mjs +2 -0
  300. package/dist/chunks/extra-usage-1.1.18-t0cm4v50.mjs +1 -0
  301. package/dist/chunks/extra-usage-noninteractive-1.1.18-w6zswndv.mjs +1 -0
  302. package/dist/chunks/fast-1.1.18-c6bbr2sj.mjs +1 -0
  303. package/dist/chunks/feedback-1.1.18-8c9j05d9.mjs +14 -0
  304. package/dist/chunks/firstPartyEventLogger-1.1.18-mk3qv1p1.mjs +1 -0
  305. package/dist/chunks/git-1.1.18-716sc7rw.mjs +1 -0
  306. package/dist/chunks/githubModelsCredentials-1.1.18-60dnzg1p.mjs +1 -0
  307. package/dist/chunks/goal-1.1.18-8em4jke5.mjs +4 -0
  308. package/dist/chunks/growthbook-1.1.18-b3tgw6y3.mjs +1 -0
  309. package/dist/chunks/headless-1.1.18-b5szxwsw.mjs +2 -0
  310. package/dist/chunks/heapdump-1.1.18-vjq0hc7v.mjs +6 -0
  311. package/dist/chunks/help-1.1.18-21j0mh6r.mjs +1 -0
  312. package/dist/chunks/hookChains-1.1.18-hptz3v0e.mjs +3 -0
  313. package/dist/chunks/hooks-1.1.18-0zec4dds.mjs +1 -0
  314. package/dist/chunks/hooks-1.1.18-ha1g38hn.mjs +79 -0
  315. package/dist/chunks/ide-1.1.18-rkvs3qqd.mjs +3 -0
  316. package/dist/chunks/image-processor-napi-1.1.18-nakzgnn7.mjs +1 -0
  317. package/dist/chunks/inboundAttachments-1.1.18-qxn6m4rg.mjs +1 -0
  318. package/dist/chunks/index-1.1.18-0ha3tnh6.mjs +1 -0
  319. package/dist/chunks/index-1.1.18-18y0bk36.mjs +1 -0
  320. package/dist/chunks/index-1.1.18-1kzcw8rj.mjs +9 -0
  321. package/dist/chunks/index-1.1.18-3yaj9awp.mjs +1 -0
  322. package/dist/chunks/index-1.1.18-427vyn1s.mjs +1 -0
  323. package/dist/chunks/index-1.1.18-5aebjh6r.mjs +2 -0
  324. package/dist/chunks/index-1.1.18-7qw763sw.mjs +1 -0
  325. package/dist/chunks/index-1.1.18-9p90ysn2.mjs +23 -0
  326. package/dist/chunks/index-1.1.18-a31cga5m.mjs +1 -0
  327. package/dist/chunks/index-1.1.18-awg146jw.mjs +1 -0
  328. package/dist/chunks/index-1.1.18-bsk8rb63.mjs +1 -0
  329. package/dist/chunks/index-1.1.18-cvzxd0hz.mjs +1 -0
  330. package/dist/chunks/index-1.1.18-ejew46p1.mjs +1 -0
  331. package/dist/chunks/index-1.1.18-gdwz7smf.mjs +1 -0
  332. package/dist/chunks/index-1.1.18-hcwn8mp8.mjs +1 -0
  333. package/dist/chunks/index-1.1.18-j843bxtx.mjs +9 -0
  334. package/dist/chunks/index-1.1.18-jhj8ae5j.mjs +30 -0
  335. package/dist/chunks/index-1.1.18-k9471m74.mjs +1 -0
  336. package/dist/chunks/index-1.1.18-kvv48kwq.mjs +5 -0
  337. package/dist/chunks/index-1.1.18-n6ntpnas.mjs +1 -0
  338. package/dist/chunks/index-1.1.18-n8a9f3dp.mjs +2 -0
  339. package/dist/chunks/index-1.1.18-ppwdm9bc.mjs +1 -0
  340. package/dist/chunks/index-1.1.18-zaqj0a20.mjs +1 -0
  341. package/dist/chunks/init-1.1.18-kgjtv56b.mjs +1 -0
  342. package/dist/chunks/initReplBridge-1.1.18-we3h7znp.mjs +1 -0
  343. package/dist/chunks/ink-1.1.18-s45xz0d5.mjs +1 -0
  344. package/dist/chunks/insights-1.1.18-qxdn050x.mjs +870 -0
  345. package/dist/chunks/install-1.1.18-hrtjazqa.mjs +1 -0
  346. package/dist/chunks/install-github-app-1.1.18-9y1kn2dm.mjs +149 -0
  347. package/dist/chunks/install-slack-app-1.1.18-yfeb37pz.mjs +1 -0
  348. package/dist/chunks/instrumentation-1.1.18-0s0n0snp.mjs +1 -0
  349. package/dist/chunks/interactiveHelpers-1.1.18-vsnpskhb.mjs +1 -0
  350. package/dist/chunks/keybindings-1.1.18-6zbse835.mjs +2 -0
  351. package/dist/chunks/knowledge-1.1.18-6ex2a771.mjs +2 -0
  352. package/dist/chunks/latestVersionCache-1.1.18-8dq1wk9a.mjs +1 -0
  353. package/dist/chunks/loadAgentsDir-1.1.18-4vpps6mn.mjs +1 -0
  354. package/dist/chunks/loadPluginHooks-1.1.18-4j6dvx4m.mjs +1 -0
  355. package/dist/chunks/log-1.1.18-ft9dg3fj.mjs +1 -0
  356. package/dist/chunks/main-1.1.18-s1hnrh3q.mjs +1 -0
  357. package/dist/chunks/managedEnv-1.1.18-jqjx86ng.mjs +1 -0
  358. package/dist/chunks/mcp-1.1.18-24906cg4.mjs +1 -0
  359. package/dist/chunks/mcp-1.1.18-7t3h9h66.mjs +4 -0
  360. package/dist/chunks/mcp-1.1.18-ast61twg.mjs +17 -0
  361. package/dist/chunks/mcpb-1.1.18-snfk9dz9.mjs +1 -0
  362. package/dist/chunks/memory-1.1.18-7k51bcr6.mjs +72 -0
  363. package/dist/chunks/model-1.1.18-0njn3xdn.mjs +2 -0
  364. package/dist/chunks/model-1.1.18-ny459y9j.mjs +1 -0
  365. package/dist/chunks/node-1.1.18-gk5h7jp4.mjs +12 -0
  366. package/dist/chunks/oauth-1.1.18-w9bt5qvg.mjs +1 -0
  367. package/dist/chunks/openaiShim-1.1.18-xzt8j2wx.mjs +14 -0
  368. package/dist/chunks/output-style-1.1.18-q591t8v1.mjs +1 -0
  369. package/dist/chunks/package-KQCMZM5L-1.1.18-whakyscr.mjs +1 -0
  370. package/dist/chunks/parseConnectUrl-1.1.18-bwgbwc1r.mjs +1 -0
  371. package/dist/chunks/parser-1.1.18-qad863f5.mjs +1 -0
  372. package/dist/chunks/passes-1.1.18-t0hq8ewm.mjs +1 -0
  373. package/dist/chunks/permissions-1.1.18-5a7765tc.mjs +1 -0
  374. package/dist/chunks/permissions-1.1.18-ed8ysk2a.mjs +3 -0
  375. package/dist/chunks/plan-1.1.18-4hc85kck.mjs +1 -0
  376. package/dist/chunks/plist-1.1.18-7sdbzzm0.mjs +1 -0
  377. package/dist/chunks/plugin-1.1.18-9tkb7bap.mjs +29 -0
  378. package/dist/chunks/pluginStartupCheck-1.1.18-j31xzm3k.mjs +1 -0
  379. package/dist/chunks/plugins-1.1.18-ab7msm6m.mjs +9 -0
  380. package/dist/chunks/preActionHook-1.1.18-dkhj1e0v.mjs +2 -0
  381. package/dist/chunks/print-1.1.18-j2g7hv0n.mjs +57 -0
  382. package/dist/chunks/process-1.1.18-fvq9b7q3.mjs +1 -0
  383. package/dist/chunks/processBashCommand-1.1.18-vq69a3e4.mjs +1 -0
  384. package/dist/chunks/processSlashCommand-1.1.18-n1yqhpgg.mjs +9 -0
  385. package/dist/chunks/prompt-1.1.18-acbj3trk.mjs +1 -0
  386. package/dist/chunks/prompt-1.1.18-wh5jv6ay.mjs +1 -0
  387. package/dist/chunks/prompts-1.1.18-m0az7ynn.mjs +1 -0
  388. package/dist/chunks/protocolHandler-1.1.18-k2shdefe.mjs +13 -0
  389. package/dist/chunks/provider-1.1.18-g384d5y0.mjs +2 -0
  390. package/dist/chunks/providerProfiles-1.1.18-sehcrk96.mjs +1 -0
  391. package/dist/chunks/providerValidation-1.1.18-ge2ffym5.mjs +6 -0
  392. package/dist/chunks/rate-limit-options-1.1.18-9dst3c2h.mjs +1 -0
  393. package/dist/chunks/registerSubcommands-1.1.18-7t053hjx.mjs +26 -0
  394. package/dist/chunks/registry-1.1.18-xrd7m0b5.mjs +1 -0
  395. package/dist/chunks/release-notes-1.1.18-ayafp97j.mjs +5 -0
  396. package/dist/chunks/reload-plugins-1.1.18-hmvtf1f4.mjs +2 -0
  397. package/dist/chunks/remote-env-1.1.18-w9k53dqm.mjs +1 -0
  398. package/dist/chunks/remoteBridgeCore-1.1.18-ex403g4q.mjs +1 -0
  399. package/dist/chunks/remoteSession-1.1.18-4axy7j90.mjs +1 -0
  400. package/dist/chunks/rename-1.1.18-2v175525.mjs +1 -0
  401. package/dist/chunks/replBridgeHandle-1.1.18-z7ttbjsb.mjs +1 -0
  402. package/dist/chunks/replLauncher-1.1.18-4z8q3518.mjs +1 -0
  403. package/dist/chunks/resume-1.1.18-7s9nkn6h.mjs +2 -0
  404. package/dist/chunks/rewind-1.1.18-wwasabaf.mjs +1 -0
  405. package/dist/chunks/rootOptions-1.1.18-drrms6kn.mjs +1 -0
  406. package/dist/chunks/runWorkflowHeadless-1.1.18-grdmbjgn.mjs +10 -0
  407. package/dist/chunks/sandbox-adapter-1.1.18-4290hdqx.mjs +1 -0
  408. package/dist/chunks/sandbox-toggle-1.1.18-859vsbae.mjs +1 -0
  409. package/dist/chunks/session-1.1.18-ndwcefxm.mjs +2 -0
  410. package/dist/chunks/sessionDiscovery-1.1.18-mqhk62gm.mjs +1 -0
  411. package/dist/chunks/sessionFileAccessHooks-1.1.18-2ypck9c4.mjs +1 -0
  412. package/dist/chunks/sessionStorage-1.1.18-w8jyzxb1.mjs +1 -0
  413. package/dist/chunks/settings-1.1.18-8tv1qyh6.mjs +1 -0
  414. package/dist/chunks/setup-1.1.18-frcmhac0.mjs +12 -0
  415. package/dist/chunks/sinks-1.1.18-zxg6qwxv.mjs +1 -0
  416. package/dist/chunks/skills-1.1.18-zxh8yk9d.mjs +1 -0
  417. package/dist/chunks/startupProfiler-1.1.18-h7ey8bj0.mjs +1 -0
  418. package/dist/chunks/startupUpdateCheck-1.1.18-bws73cnz.mjs +1 -0
  419. package/dist/chunks/state-1.1.18-12hrspsf.mjs +1 -0
  420. package/dist/chunks/stats-1.1.18-kmhwdmq9.mjs +6 -0
  421. package/dist/chunks/status-1.1.18-4aep2t86.mjs +1 -0
  422. package/dist/chunks/stickers-1.1.18-20nhxd0w.mjs +1 -0
  423. package/dist/chunks/subprocessEnv-1.1.18-a6f6xtx7.mjs +1 -0
  424. package/dist/chunks/tasks-1.1.18-5brzcp4c.mjs +1 -0
  425. package/dist/chunks/teamHelpers-1.1.18-ewst0n42.mjs +1 -0
  426. package/dist/chunks/teammateModeSnapshot-1.1.18-n1rgqqyr.mjs +1 -0
  427. package/dist/chunks/teleport-1.1.18-e63krqkp.mjs +1 -0
  428. package/dist/chunks/terminalSetup-1.1.18-6nf0ex7b.mjs +1 -0
  429. package/dist/chunks/theme-1.1.18-egp4mwdb.mjs +1 -0
  430. package/dist/chunks/thinkback-1.1.18-wphxbpgs.mjs +1 -0
  431. package/dist/chunks/thinkback-play-1.1.18-rjmn2eej.mjs +1 -0
  432. package/dist/chunks/toolPool-1.1.18-s1ssr2ef.mjs +1 -0
  433. package/dist/chunks/toolSearch-1.1.18-c9cwkafr.mjs +1 -0
  434. package/dist/chunks/tools-1.1.18-1dqtpknx.mjs +1 -0
  435. package/dist/chunks/trustedDevice-1.1.18-3h8z5wdy.mjs +1 -0
  436. package/dist/chunks/turndown.cjs-1.1.18-e9b2pss1.mjs +69 -0
  437. package/dist/chunks/types-1.1.18-31emf7xp.mjs +1 -0
  438. package/dist/chunks/ultrareviewCommand-1.1.18-x96n2df3.mjs +4 -0
  439. package/dist/chunks/update-1.1.18-rfhbgb3x.mjs +72 -0
  440. package/dist/chunks/upgrade-1.1.18-5dd5b35g.mjs +1 -0
  441. package/dist/chunks/upload-1.1.18-6rcbt5xr.mjs +7 -0
  442. package/dist/chunks/upstreamproxy-1.1.18-xx3jrk14.mjs +14 -0
  443. package/dist/chunks/url-handler-napi-1.1.18-y4e042py.mjs +1 -0
  444. package/dist/chunks/usage-1.1.18-q3y9c6vk.mjs +1 -0
  445. package/dist/chunks/util-1.1.18-2vgfzdph.mjs +1 -0
  446. package/dist/chunks/utils-1.1.18-8tjbjr7v.mjs +1 -0
  447. package/dist/chunks/vim-1.1.18-44eqnfwb.mjs +1 -0
  448. package/dist/chunks/watchLoop-1.1.18-c2shb8qc.mjs +13 -0
  449. package/dist/chunks/watcher-1.1.18-cb1x3sr6.mjs +1 -0
  450. package/dist/chunks/wiki-1.1.18-r1abckjp.mjs +132 -0
  451. package/dist/chunks/workflows-1.1.18-jtx40wvq.mjs +1 -0
  452. package/dist/chunks/worktree-1.1.18-ds3kez7h.mjs +1 -0
  453. package/dist/chunks/worktreeModeEnabled-1.1.18-2wj8e6bc.mjs +1 -0
  454. package/dist/chunks/wrapper-1.1.18-shbmq2kg.mjs +7 -0
  455. package/dist/cli.mjs +2 -2
  456. package/dist/help-doctor.txt +3 -3
  457. package/dist/help-install.txt +2 -2
  458. package/dist/help-mcp.txt +2 -2
  459. package/dist/help-plugin.txt +2 -2
  460. package/dist/help-plugins.txt +2 -2
  461. package/dist/help.txt +3 -3
  462. package/package.json +9 -9
  463. package/dist/chunks/AgentTool-1.1.16-d8xg1846.mjs +0 -1
  464. package/dist/chunks/App-1.1.16-1qyat349.mjs +0 -1
  465. package/dist/chunks/ApproveApiKey-1.1.16-gphm4kr9.mjs +0 -1
  466. package/dist/chunks/AssistantSessionChooser-1.1.16-ae0771hz.mjs +0 -1
  467. package/dist/chunks/AutoModeOptInDialog-1.1.16-ntf57kwj.mjs +0 -1
  468. package/dist/chunks/BypassPermissionsModeDialog-1.1.16-z8km64vb.mjs +0 -1
  469. package/dist/chunks/ClaudeMdExternalIncludesDialog-1.1.16-9c1nen0b.mjs +0 -1
  470. package/dist/chunks/ConsoleOAuthFlow-1.1.16-e52dm35b.mjs +0 -1
  471. package/dist/chunks/DiffDialog-1.1.16-frav7jtc.mjs +0 -6
  472. package/dist/chunks/Doctor-1.1.16-rnr2zeqm.mjs +0 -1
  473. package/dist/chunks/ExplorerDialog-1.1.16-32sa07f8.mjs +0 -6
  474. package/dist/chunks/ITermBackend-1.1.16-wcn0wvqj.mjs +0 -1
  475. package/dist/chunks/InvalidConfigDialog-1.1.16-ptpv0yby.mjs +0 -1
  476. package/dist/chunks/InvalidSettingsDialog-1.1.16-2c80150t.mjs +0 -1
  477. package/dist/chunks/MigrationDialog-1.1.16-xf5ytnvw.mjs +0 -1
  478. package/dist/chunks/Onboarding-1.1.16-mq6axxmv.mjs +0 -1
  479. package/dist/chunks/ProviderManager-1.1.16-df81g99v.mjs +0 -1
  480. package/dist/chunks/REPL-1.1.16-67e78vej.mjs +0 -1
  481. package/dist/chunks/ResumeConversation-1.1.16-nfz9vfxh.mjs +0 -1
  482. package/dist/chunks/SnapshotUpdateDialog-1.1.16-nmypjs9s.mjs +0 -1
  483. package/dist/chunks/TeleportProgress-1.1.16-8xp4cat6.mjs +0 -1
  484. package/dist/chunks/TeleportRepoMismatchDialog-1.1.16-b873egjf.mjs +0 -1
  485. package/dist/chunks/TeleportResumeWrapper-1.1.16-p12j7gbz.mjs +0 -1
  486. package/dist/chunks/TmuxBackend-1.1.16-wfj4hbxa.mjs +0 -9
  487. package/dist/chunks/ToolSearchTool-1.1.16-t59p4sqb.mjs +0 -1
  488. package/dist/chunks/TrustDialog-1.1.16-6gnr1pgn.mjs +0 -1
  489. package/dist/chunks/activeProvider-1.1.16-pz7hzyed.mjs +0 -1
  490. package/dist/chunks/add-dir-1.1.16-whsjbedt.mjs +0 -1
  491. package/dist/chunks/agentTypes-1.1.16-7fxyjypa.mjs +0 -1
  492. package/dist/chunks/agents-1.1.16-1d6y0xda.mjs +0 -3
  493. package/dist/chunks/agents-1.1.16-s5e41ewr.mjs +0 -110
  494. package/dist/chunks/api-1.1.16-k1mytgsx.mjs +0 -1
  495. package/dist/chunks/asciicast-1.1.16-bxvyntn8.mjs +0 -1
  496. package/dist/chunks/assistant-1.1.16-acqmddet.mjs +0 -1
  497. package/dist/chunks/auth-1.1.16-7nwthv6n.mjs +0 -1
  498. package/dist/chunks/auth-1.1.16-c46k0chb.mjs +0 -1
  499. package/dist/chunks/autoMode-1.1.16-t7thnrw0.mjs +0 -48
  500. package/dist/chunks/autoUpdater-1.1.16-5k3bxrjz.mjs +0 -1
  501. package/dist/chunks/backgroundHousekeeping-1.1.16-nhb6p8p3.mjs +0 -1
  502. package/dist/chunks/branch-1.1.16-72eesr6a.mjs +0 -4
  503. package/dist/chunks/bridge-1.1.16-8n6h1b8c.mjs +0 -2
  504. package/dist/chunks/bridgeConfig-1.1.16-jmz78ab3.mjs +0 -1
  505. package/dist/chunks/bridgeEnabled-1.1.16-nwrn0y9j.mjs +0 -1
  506. package/dist/chunks/bridgeMain-1.1.16-04vqwa21.mjs +0 -88
  507. package/dist/chunks/bridgePointer-1.1.16-krkxjxkj.mjs +0 -1
  508. package/dist/chunks/btw-1.1.16-h0jqrzph.mjs +0 -1
  509. package/dist/chunks/buddy-1.1.16-k6dwkrbz.mjs +0 -3
  510. package/dist/chunks/cache-probe-1.1.16-rk6d7v9j.mjs +0 -21
  511. package/dist/chunks/cacheStats-1.1.16-f3tggvs4.mjs +0 -4
  512. package/dist/chunks/caches-1.1.16-kxkg6hxt.mjs +0 -1
  513. package/dist/chunks/claudeDesktop-1.1.16-jggzvahb.mjs +0 -1
  514. package/dist/chunks/claudemd-1.1.16-7dtnkedr.mjs +0 -1
  515. package/dist/chunks/clear-1.1.16-qrpawrqq.mjs +0 -1
  516. package/dist/chunks/clearTerminal-1.1.16-hcv9w964.mjs +0 -1
  517. package/dist/chunks/cli-1.1.16-00hws7wd.mjs +0 -15
  518. package/dist/chunks/cli-1.1.16-02ynr76s.mjs +0 -2
  519. package/dist/chunks/cli-1.1.16-06f5zq2n.mjs +0 -3
  520. package/dist/chunks/cli-1.1.16-07smcaht.mjs +0 -2
  521. package/dist/chunks/cli-1.1.16-08mt7pd3.mjs +0 -26
  522. package/dist/chunks/cli-1.1.16-0chc168e.mjs +0 -2
  523. package/dist/chunks/cli-1.1.16-0w56n0k6.mjs +0 -2
  524. package/dist/chunks/cli-1.1.16-11vm4ckb.mjs +0 -3
  525. package/dist/chunks/cli-1.1.16-14fn34eq.mjs +0 -2
  526. package/dist/chunks/cli-1.1.16-14qj3fgz.mjs +0 -2
  527. package/dist/chunks/cli-1.1.16-16cpmrsq.mjs +0 -2
  528. package/dist/chunks/cli-1.1.16-1p0006m7.mjs +0 -2
  529. package/dist/chunks/cli-1.1.16-1rw7f88z.mjs +0 -2
  530. package/dist/chunks/cli-1.1.16-21rqtmb8.mjs +0 -2
  531. package/dist/chunks/cli-1.1.16-2c672gb7.mjs +0 -12
  532. package/dist/chunks/cli-1.1.16-2mzk1cmm.mjs +0 -2
  533. package/dist/chunks/cli-1.1.16-2ssqta47.mjs +0 -2
  534. package/dist/chunks/cli-1.1.16-2v8aceee.mjs +0 -2
  535. package/dist/chunks/cli-1.1.16-2xgcx2pv.mjs +0 -2
  536. package/dist/chunks/cli-1.1.16-3ha615b6.mjs +0 -2
  537. package/dist/chunks/cli-1.1.16-3k3hzdbv.mjs +0 -9
  538. package/dist/chunks/cli-1.1.16-3wey4s8m.mjs +0 -2
  539. package/dist/chunks/cli-1.1.16-48pfhgz1.mjs +0 -2
  540. package/dist/chunks/cli-1.1.16-49bqpfq6.mjs +0 -16
  541. package/dist/chunks/cli-1.1.16-4azerbgs.mjs +0 -2
  542. package/dist/chunks/cli-1.1.16-4eszpnge.mjs +0 -2
  543. package/dist/chunks/cli-1.1.16-4kbzs997.mjs +0 -2
  544. package/dist/chunks/cli-1.1.16-4pr1991p.mjs +0 -8
  545. package/dist/chunks/cli-1.1.16-4qysqchs.mjs +0 -24
  546. package/dist/chunks/cli-1.1.16-4v9hjjtt.mjs +0 -3
  547. package/dist/chunks/cli-1.1.16-50vqanyq.mjs +0 -4
  548. package/dist/chunks/cli-1.1.16-54087k9r.mjs +0 -2
  549. package/dist/chunks/cli-1.1.16-5a4a2nqs.mjs +0 -2
  550. package/dist/chunks/cli-1.1.16-5bx6tpmw.mjs +0 -2
  551. package/dist/chunks/cli-1.1.16-5dtt0nsq.mjs +0 -15
  552. package/dist/chunks/cli-1.1.16-5hfex73v.mjs +0 -2
  553. package/dist/chunks/cli-1.1.16-5vc6gf8n.mjs +0 -2
  554. package/dist/chunks/cli-1.1.16-5wsywzcq.mjs +0 -2
  555. package/dist/chunks/cli-1.1.16-65skb0g1.mjs +0 -2
  556. package/dist/chunks/cli-1.1.16-67hp7vy9.mjs +0 -2
  557. package/dist/chunks/cli-1.1.16-67yh08z2.mjs +0 -2
  558. package/dist/chunks/cli-1.1.16-69ma6qdv.mjs +0 -2
  559. package/dist/chunks/cli-1.1.16-6fekr49f.mjs +0 -2
  560. package/dist/chunks/cli-1.1.16-6ptafg83.mjs +0 -59
  561. package/dist/chunks/cli-1.1.16-72wxrwg0.mjs +0 -2
  562. package/dist/chunks/cli-1.1.16-7aatqp3z.mjs +0 -2
  563. package/dist/chunks/cli-1.1.16-7c9cj19v.mjs +0 -2
  564. package/dist/chunks/cli-1.1.16-7j9fntrz.mjs +0 -2
  565. package/dist/chunks/cli-1.1.16-7k62y2m1.mjs +0 -45
  566. package/dist/chunks/cli-1.1.16-7k7w1py7.mjs +0 -39
  567. package/dist/chunks/cli-1.1.16-7xaxs3ra.mjs +0 -18
  568. package/dist/chunks/cli-1.1.16-7z989ymx.mjs +0 -24
  569. package/dist/chunks/cli-1.1.16-892pqd2m.mjs +0 -3
  570. package/dist/chunks/cli-1.1.16-8azzqa5w.mjs +0 -2
  571. package/dist/chunks/cli-1.1.16-8brzp1nw.mjs +0 -6
  572. package/dist/chunks/cli-1.1.16-8efk3qjx.mjs +0 -2
  573. package/dist/chunks/cli-1.1.16-8pms22dq.mjs +0 -2
  574. package/dist/chunks/cli-1.1.16-90p1j6wj.mjs +0 -3
  575. package/dist/chunks/cli-1.1.16-9bvj95e0.mjs +0 -2
  576. package/dist/chunks/cli-1.1.16-9gc3v32k.mjs +0 -2
  577. package/dist/chunks/cli-1.1.16-9mjvq93j.mjs +0 -2
  578. package/dist/chunks/cli-1.1.16-9vaffwrt.mjs +0 -2
  579. package/dist/chunks/cli-1.1.16-9wfv4nx7.mjs +0 -2
  580. package/dist/chunks/cli-1.1.16-9zybbj79.mjs +0 -2
  581. package/dist/chunks/cli-1.1.16-a09ca16c.mjs +0 -2
  582. package/dist/chunks/cli-1.1.16-a2heems6.mjs +0 -2
  583. package/dist/chunks/cli-1.1.16-a6z5s072.mjs +0 -58
  584. package/dist/chunks/cli-1.1.16-aae4w645.mjs +0 -42
  585. package/dist/chunks/cli-1.1.16-acbajet0.mjs +0 -2
  586. package/dist/chunks/cli-1.1.16-amvj9fsw.mjs +0 -3
  587. package/dist/chunks/cli-1.1.16-b06spwrg.mjs +0 -21
  588. package/dist/chunks/cli-1.1.16-b7t8n05k.mjs +0 -2
  589. package/dist/chunks/cli-1.1.16-b80x5mp6.mjs +0 -2
  590. package/dist/chunks/cli-1.1.16-c6ydw1c8.mjs +0 -2
  591. package/dist/chunks/cli-1.1.16-c839tmen.mjs +0 -2
  592. package/dist/chunks/cli-1.1.16-c9b05x0s.mjs +0 -2
  593. package/dist/chunks/cli-1.1.16-cc5chgna.mjs +0 -2
  594. package/dist/chunks/cli-1.1.16-cddsh2r4.mjs +0 -25
  595. package/dist/chunks/cli-1.1.16-cmfztzmq.mjs +0 -2
  596. package/dist/chunks/cli-1.1.16-cmw3ar20.mjs +0 -2
  597. package/dist/chunks/cli-1.1.16-cnwnk7gb.mjs +0 -2
  598. package/dist/chunks/cli-1.1.16-cs3aeka5.mjs +0 -12
  599. package/dist/chunks/cli-1.1.16-d6tf8dzn.mjs +0 -20
  600. package/dist/chunks/cli-1.1.16-df44y8yq.mjs +0 -3
  601. package/dist/chunks/cli-1.1.16-dfr9axye.mjs +0 -2
  602. package/dist/chunks/cli-1.1.16-dh0eqfrb.mjs +0 -25
  603. package/dist/chunks/cli-1.1.16-dn98cknd.mjs +0 -6
  604. package/dist/chunks/cli-1.1.16-dqwre8s7.mjs +0 -2
  605. package/dist/chunks/cli-1.1.16-dqxwanh1.mjs +0 -2
  606. package/dist/chunks/cli-1.1.16-dtwt84pe.mjs +0 -6
  607. package/dist/chunks/cli-1.1.16-dtyn1qwz.mjs +0 -2
  608. package/dist/chunks/cli-1.1.16-dxyq8q3t.mjs +0 -18
  609. package/dist/chunks/cli-1.1.16-e0fmjnmt.mjs +0 -2
  610. package/dist/chunks/cli-1.1.16-e15bgq0q.mjs +0 -2
  611. package/dist/chunks/cli-1.1.16-eabt3s19.mjs +0 -2
  612. package/dist/chunks/cli-1.1.16-eatavqvn.mjs +0 -2
  613. package/dist/chunks/cli-1.1.16-eg2wh4gb.mjs +0 -2
  614. package/dist/chunks/cli-1.1.16-egxjzfe2.mjs +0 -34
  615. package/dist/chunks/cli-1.1.16-ejy0gvv1.mjs +0 -2
  616. package/dist/chunks/cli-1.1.16-f3tex0kv.mjs +0 -24
  617. package/dist/chunks/cli-1.1.16-f6arq2qw.mjs +0 -3
  618. package/dist/chunks/cli-1.1.16-f9d79a6c.mjs +0 -2
  619. package/dist/chunks/cli-1.1.16-fd7yx131.mjs +0 -2
  620. package/dist/chunks/cli-1.1.16-g0z56bnb.mjs +0 -2
  621. package/dist/chunks/cli-1.1.16-g2m8cf2k.mjs +0 -2
  622. package/dist/chunks/cli-1.1.16-gqgat9ps.mjs +0 -2
  623. package/dist/chunks/cli-1.1.16-gtw5ckd8.mjs +0 -2
  624. package/dist/chunks/cli-1.1.16-gyw71nnw.mjs +0 -2
  625. package/dist/chunks/cli-1.1.16-gze584gt.mjs +0 -2
  626. package/dist/chunks/cli-1.1.16-h1rfrt5t.mjs +0 -1
  627. package/dist/chunks/cli-1.1.16-haqxs2zy.mjs +0 -2
  628. package/dist/chunks/cli-1.1.16-hbzd5k64.mjs +0 -2
  629. package/dist/chunks/cli-1.1.16-hd541yqt.mjs +0 -5
  630. package/dist/chunks/cli-1.1.16-hf9kpgyk.mjs +0 -2
  631. package/dist/chunks/cli-1.1.16-hq7j37g9.mjs +0 -2
  632. package/dist/chunks/cli-1.1.16-htk59n0r.mjs +0 -2
  633. package/dist/chunks/cli-1.1.16-hwr77b8n.mjs +0 -5469
  634. package/dist/chunks/cli-1.1.16-hyxvna5x.mjs +0 -2
  635. package/dist/chunks/cli-1.1.16-j1hg5tkr.mjs +0 -3
  636. package/dist/chunks/cli-1.1.16-jcye29qq.mjs +0 -202
  637. package/dist/chunks/cli-1.1.16-k7hg3739.mjs +0 -2
  638. package/dist/chunks/cli-1.1.16-kf5fv5t0.mjs +0 -2
  639. package/dist/chunks/cli-1.1.16-kndxajhc.mjs +0 -2
  640. package/dist/chunks/cli-1.1.16-kpxhnxpz.mjs +0 -2
  641. package/dist/chunks/cli-1.1.16-kxckvss5.mjs +0 -4
  642. package/dist/chunks/cli-1.1.16-kz0jkcdc.mjs +0 -2
  643. package/dist/chunks/cli-1.1.16-m0b6tw88.mjs +0 -3
  644. package/dist/chunks/cli-1.1.16-m68wgnx0.mjs +0 -50
  645. package/dist/chunks/cli-1.1.16-manqzza5.mjs +0 -2
  646. package/dist/chunks/cli-1.1.16-mbr5p7h4.mjs +0 -2
  647. package/dist/chunks/cli-1.1.16-n37yee4e.mjs +0 -5
  648. package/dist/chunks/cli-1.1.16-n9r7jwvf.mjs +0 -4
  649. package/dist/chunks/cli-1.1.16-nbxzev2y.mjs +0 -3
  650. package/dist/chunks/cli-1.1.16-nh0pt7e0.mjs +0 -2
  651. package/dist/chunks/cli-1.1.16-njacmwr1.mjs +0 -4
  652. package/dist/chunks/cli-1.1.16-p0fj6fyd.mjs +0 -2
  653. package/dist/chunks/cli-1.1.16-pdga6t1k.mjs +0 -133
  654. package/dist/chunks/cli-1.1.16-pj3sbyjh.mjs +0 -2
  655. package/dist/chunks/cli-1.1.16-pzq1a8yw.mjs +0 -2
  656. package/dist/chunks/cli-1.1.16-q827fp1q.mjs +0 -2
  657. package/dist/chunks/cli-1.1.16-qh481y6y.mjs +0 -2
  658. package/dist/chunks/cli-1.1.16-qwgc24yv.mjs +0 -2
  659. package/dist/chunks/cli-1.1.16-qy3897dn.mjs +0 -2
  660. package/dist/chunks/cli-1.1.16-qyhfqd1t.mjs +0 -4
  661. package/dist/chunks/cli-1.1.16-r0tgqw2k.mjs +0 -4
  662. package/dist/chunks/cli-1.1.16-r102pkgg.mjs +0 -3
  663. package/dist/chunks/cli-1.1.16-r2q5qzd6.mjs +0 -2
  664. package/dist/chunks/cli-1.1.16-r3n44d17.mjs +0 -2
  665. package/dist/chunks/cli-1.1.16-r41v96xz.mjs +0 -6
  666. package/dist/chunks/cli-1.1.16-rb7paxmn.mjs +0 -2
  667. package/dist/chunks/cli-1.1.16-rmn7pfkz.mjs +0 -2
  668. package/dist/chunks/cli-1.1.16-rvyqa9q1.mjs +0 -2
  669. package/dist/chunks/cli-1.1.16-s404wy1x.mjs +0 -6
  670. package/dist/chunks/cli-1.1.16-s73aeg9m.mjs +0 -3
  671. package/dist/chunks/cli-1.1.16-sbck6gp1.mjs +0 -2
  672. package/dist/chunks/cli-1.1.16-sk0nvcb8.mjs +0 -2
  673. package/dist/chunks/cli-1.1.16-sk5cfvaa.mjs +0 -2
  674. package/dist/chunks/cli-1.1.16-t0vza3m9.mjs +0 -2
  675. package/dist/chunks/cli-1.1.16-t3hq60ht.mjs +0 -2
  676. package/dist/chunks/cli-1.1.16-t52j6pb6.mjs +0 -6
  677. package/dist/chunks/cli-1.1.16-t7jxtkz8.mjs +0 -2
  678. package/dist/chunks/cli-1.1.16-the4daty.mjs +0 -17
  679. package/dist/chunks/cli-1.1.16-tjqwb7e1.mjs +0 -2
  680. package/dist/chunks/cli-1.1.16-tjzxdkkt.mjs +0 -17
  681. package/dist/chunks/cli-1.1.16-tpxwx276.mjs +0 -2
  682. package/dist/chunks/cli-1.1.16-tv4kjnwq.mjs +0 -24
  683. package/dist/chunks/cli-1.1.16-tv97myza.mjs +0 -7
  684. package/dist/chunks/cli-1.1.16-v2e4pd3g.mjs +0 -2
  685. package/dist/chunks/cli-1.1.16-vchwnr3f.mjs +0 -2
  686. package/dist/chunks/cli-1.1.16-vf5x3nc4.mjs +0 -2
  687. package/dist/chunks/cli-1.1.16-vhwypfn6.mjs +0 -2
  688. package/dist/chunks/cli-1.1.16-vkc2wbwd.mjs +0 -2
  689. package/dist/chunks/cli-1.1.16-vngrsrs8.mjs +0 -3
  690. package/dist/chunks/cli-1.1.16-vq6g4ncg.mjs +0 -2
  691. package/dist/chunks/cli-1.1.16-vra6hr5d.mjs +0 -2
  692. package/dist/chunks/cli-1.1.16-vzv60xz8.mjs +0 -4
  693. package/dist/chunks/cli-1.1.16-w4zy236d.mjs +0 -2
  694. package/dist/chunks/cli-1.1.16-w5ns6t4b.mjs +0 -2
  695. package/dist/chunks/cli-1.1.16-way1d0g7.mjs +0 -2
  696. package/dist/chunks/cli-1.1.16-wbzh2wm5.mjs +0 -2
  697. package/dist/chunks/cli-1.1.16-wpgdph2x.mjs +0 -7
  698. package/dist/chunks/cli-1.1.16-wv6e57r1.mjs +0 -2
  699. package/dist/chunks/cli-1.1.16-wxyxm2zp.mjs +0 -2
  700. package/dist/chunks/cli-1.1.16-wysnfmek.mjs +0 -4
  701. package/dist/chunks/cli-1.1.16-wzzrc1xq.mjs +0 -2
  702. package/dist/chunks/cli-1.1.16-x0gywt7y.mjs +0 -2
  703. package/dist/chunks/cli-1.1.16-x1r7521q.mjs +0 -133
  704. package/dist/chunks/cli-1.1.16-x4k8bzvc.mjs +0 -2
  705. package/dist/chunks/cli-1.1.16-x9m0y8t1.mjs +0 -2
  706. package/dist/chunks/cli-1.1.16-xaye0g9z.mjs +0 -2
  707. package/dist/chunks/cli-1.1.16-xe8wmqtk.mjs +0 -15
  708. package/dist/chunks/cli-1.1.16-xfke0ngj.mjs +0 -2
  709. package/dist/chunks/cli-1.1.16-xqk1znpb.mjs +0 -2
  710. package/dist/chunks/cli-1.1.16-y11gejtr.mjs +0 -9
  711. package/dist/chunks/cli-1.1.16-y1vrwcq4.mjs +0 -2
  712. package/dist/chunks/cli-1.1.16-y4qp7bb2.mjs +0 -2
  713. package/dist/chunks/cli-1.1.16-ynvgphfk.mjs +0 -2
  714. package/dist/chunks/cli-1.1.16-yqaq6eek.mjs +0 -2
  715. package/dist/chunks/cli-1.1.16-yv8wazsp.mjs +0 -2
  716. package/dist/chunks/cli-1.1.16-yymrc4dd.mjs +0 -2
  717. package/dist/chunks/cli-1.1.16-yzrxqdz1.mjs +0 -4
  718. package/dist/chunks/cli-1.1.16-z56ew2eh.mjs +0 -66
  719. package/dist/chunks/cli-1.1.16-z93174n6.mjs +0 -2
  720. package/dist/chunks/cli-1.1.16-zedxs5mz.mjs +0 -2
  721. package/dist/chunks/cli-1.1.16-zgwt3v22.mjs +0 -2
  722. package/dist/chunks/cli-1.1.16-ztv6fvbq.mjs +0 -4
  723. package/dist/chunks/cli-1.1.16-zx2pqyak.mjs +0 -2
  724. package/dist/chunks/cli-1.1.16-zy1hy3m7.mjs +0 -3
  725. package/dist/chunks/cli-1.1.16-zzc307e7.mjs +0 -2
  726. package/dist/chunks/client-1.1.16-mxfnn25v.mjs +0 -1
  727. package/dist/chunks/color-1.1.16-kxb5k02m.mjs +0 -1
  728. package/dist/chunks/compact-1.1.16-zn3r524w.mjs +0 -3
  729. package/dist/chunks/config-1.1.16-866900pg.mjs +0 -1
  730. package/dist/chunks/config-1.1.16-pnqk3e4x.mjs +0 -1
  731. package/dist/chunks/constants-1.1.16-y8q2q4nx.mjs +0 -1
  732. package/dist/chunks/context-1.1.16-g23rxjdc.mjs +0 -1
  733. package/dist/chunks/context-noninteractive-1.1.16-cccdk7gt.mjs +0 -1
  734. package/dist/chunks/conversation-1.1.16-b3c8ysvx.mjs +0 -1
  735. package/dist/chunks/copilotHeaders-1.1.16-n2gqvrz3.mjs +0 -1
  736. package/dist/chunks/copy-1.1.16-evtbz4pr.mjs +0 -9
  737. package/dist/chunks/cost-1.1.16-je2dhky8.mjs +0 -1
  738. package/dist/chunks/createSSHSession-1.1.16-7bjctayt.mjs +0 -1
  739. package/dist/chunks/createSession-1.1.16-q7ezgde2.mjs +0 -1
  740. package/dist/chunks/debug-1.1.16-rwekwqaz.mjs +0 -1
  741. package/dist/chunks/defaultActionDeps-1.1.16-drefjcq7.mjs +0 -1534
  742. package/dist/chunks/desktop-1.1.16-s5p2s8z1.mjs +0 -1
  743. package/dist/chunks/detectRepository-1.1.16-0mj2v70d.mjs +0 -1
  744. package/dist/chunks/detection-1.1.16-a6g1ea8w.mjs +0 -1
  745. package/dist/chunks/diff-1.1.16-5c3cx6ex.mjs +0 -1
  746. package/dist/chunks/doctor-1.1.16-41p56y0f.mjs +0 -1
  747. package/dist/chunks/doctorDiagnostic-1.1.16-w0td1z7t.mjs +0 -1
  748. package/dist/chunks/earlyInput-1.1.16-fb3qxbjk.mjs +0 -1
  749. package/dist/chunks/effort-1.1.16-9gw3x1mz.mjs +0 -13
  750. package/dist/chunks/engine-1.1.16-35cg9rmx.mjs +0 -1
  751. package/dist/chunks/envLessBridgeConfig-1.1.16-1d34y7k2.mjs +0 -1
  752. package/dist/chunks/envUtils-1.1.16-4t6p0jjh.mjs +0 -1
  753. package/dist/chunks/environmentSelection-1.1.16-63yqca4b.mjs +0 -1
  754. package/dist/chunks/environments-1.1.16-zg1cebes.mjs +0 -1
  755. package/dist/chunks/errors-1.1.16-5ry90xtn.mjs +0 -1
  756. package/dist/chunks/exampleCommands-1.1.16-gctdwyey.mjs +0 -1
  757. package/dist/chunks/execFileNoThrow-1.1.16-ja5wfnqk.mjs +0 -1
  758. package/dist/chunks/exit-1.1.16-gp3attw5.mjs +0 -1
  759. package/dist/chunks/explorer-1.1.16-ksz2kh3r.mjs +0 -1
  760. package/dist/chunks/export-1.1.16-4q6eppsd.mjs +0 -2
  761. package/dist/chunks/extra-usage-1.1.16-gtvkswnt.mjs +0 -1
  762. package/dist/chunks/extra-usage-noninteractive-1.1.16-y936p9yp.mjs +0 -1
  763. package/dist/chunks/fast-1.1.16-9d3xqrpf.mjs +0 -1
  764. package/dist/chunks/feedback-1.1.16-3va6ar52.mjs +0 -14
  765. package/dist/chunks/firstPartyEventLogger-1.1.16-rzm5ms2c.mjs +0 -1
  766. package/dist/chunks/git-1.1.16-wxjpazsv.mjs +0 -1
  767. package/dist/chunks/githubModelsCredentials-1.1.16-8db65cwz.mjs +0 -1
  768. package/dist/chunks/goal-1.1.16-n6zn5hv0.mjs +0 -4
  769. package/dist/chunks/growthbook-1.1.16-595crq4b.mjs +0 -1
  770. package/dist/chunks/headless-1.1.16-ngrfttd2.mjs +0 -2
  771. package/dist/chunks/heapdump-1.1.16-xeq6wdmt.mjs +0 -6
  772. package/dist/chunks/help-1.1.16-cr6p1e9d.mjs +0 -1
  773. package/dist/chunks/hookChains-1.1.16-9h14zpb6.mjs +0 -3
  774. package/dist/chunks/hooks-1.1.16-1g8bmj2c.mjs +0 -79
  775. package/dist/chunks/hooks-1.1.16-n1gmh33c.mjs +0 -1
  776. package/dist/chunks/ide-1.1.16-9vtwyzje.mjs +0 -3
  777. package/dist/chunks/image-processor-napi-1.1.16-xs3s51me.mjs +0 -1
  778. package/dist/chunks/inboundAttachments-1.1.16-c6drgpf3.mjs +0 -1
  779. package/dist/chunks/index-1.1.16-18yhpv52.mjs +0 -23
  780. package/dist/chunks/index-1.1.16-2rsmxhr2.mjs +0 -30
  781. package/dist/chunks/index-1.1.16-2xc5zjwe.mjs +0 -5
  782. package/dist/chunks/index-1.1.16-3cscsx0v.mjs +0 -1
  783. package/dist/chunks/index-1.1.16-3vpat7c1.mjs +0 -9
  784. package/dist/chunks/index-1.1.16-3zhbr1qd.mjs +0 -1
  785. package/dist/chunks/index-1.1.16-54nbfa3c.mjs +0 -1
  786. package/dist/chunks/index-1.1.16-6f495kq6.mjs +0 -1
  787. package/dist/chunks/index-1.1.16-82gx3ah5.mjs +0 -1
  788. package/dist/chunks/index-1.1.16-ap17zed0.mjs +0 -1
  789. package/dist/chunks/index-1.1.16-b07w4tdb.mjs +0 -1
  790. package/dist/chunks/index-1.1.16-cca87zba.mjs +0 -9
  791. package/dist/chunks/index-1.1.16-dxjx9gq8.mjs +0 -1
  792. package/dist/chunks/index-1.1.16-ehk0dpk3.mjs +0 -1
  793. package/dist/chunks/index-1.1.16-g6p5h9x8.mjs +0 -1
  794. package/dist/chunks/index-1.1.16-hsmqsx4f.mjs +0 -2
  795. package/dist/chunks/index-1.1.16-n1gyvm02.mjs +0 -1
  796. package/dist/chunks/index-1.1.16-ppkq03k8.mjs +0 -1
  797. package/dist/chunks/index-1.1.16-qpdm2q81.mjs +0 -1
  798. package/dist/chunks/index-1.1.16-qww85f6n.mjs +0 -1
  799. package/dist/chunks/index-1.1.16-s5e31nps.mjs +0 -1
  800. package/dist/chunks/index-1.1.16-v1zrqah7.mjs +0 -2
  801. package/dist/chunks/index-1.1.16-vbj2a5jp.mjs +0 -1
  802. package/dist/chunks/init-1.1.16-6wdrdz2r.mjs +0 -1
  803. package/dist/chunks/initReplBridge-1.1.16-6bhkywe8.mjs +0 -1
  804. package/dist/chunks/ink-1.1.16-e7whmjxf.mjs +0 -1
  805. package/dist/chunks/insights-1.1.16-s2czmsxt.mjs +0 -870
  806. package/dist/chunks/install-1.1.16-hm3j0jqe.mjs +0 -1
  807. package/dist/chunks/install-github-app-1.1.16-xmkdh35y.mjs +0 -149
  808. package/dist/chunks/install-slack-app-1.1.16-1a8z176x.mjs +0 -1
  809. package/dist/chunks/instrumentation-1.1.16-5tqqjvsb.mjs +0 -1
  810. package/dist/chunks/interactiveHelpers-1.1.16-49sn5m39.mjs +0 -1
  811. package/dist/chunks/keybindings-1.1.16-c6n8k84r.mjs +0 -2
  812. package/dist/chunks/knowledge-1.1.16-08yzaswd.mjs +0 -2
  813. package/dist/chunks/latestVersionCache-1.1.16-a0dks1p1.mjs +0 -1
  814. package/dist/chunks/loadAgentsDir-1.1.16-jbfc3ync.mjs +0 -1
  815. package/dist/chunks/loadPluginHooks-1.1.16-0pym4ad2.mjs +0 -1
  816. package/dist/chunks/log-1.1.16-yahqz556.mjs +0 -1
  817. package/dist/chunks/main-1.1.16-2egj6bns.mjs +0 -1
  818. package/dist/chunks/managedEnv-1.1.16-tgd635vq.mjs +0 -1
  819. package/dist/chunks/mcp-1.1.16-fkx2awnj.mjs +0 -17
  820. package/dist/chunks/mcp-1.1.16-n7sgsh7q.mjs +0 -1
  821. package/dist/chunks/mcp-1.1.16-ry6g2t33.mjs +0 -4
  822. package/dist/chunks/mcpb-1.1.16-74c05aj3.mjs +0 -1
  823. package/dist/chunks/memory-1.1.16-6jbqggnn.mjs +0 -72
  824. package/dist/chunks/model-1.1.16-3bvzfbem.mjs +0 -2
  825. package/dist/chunks/model-1.1.16-sjpwhja7.mjs +0 -1
  826. package/dist/chunks/node-1.1.16-gsj0fpm7.mjs +0 -12
  827. package/dist/chunks/oauth-1.1.16-bt9x98w7.mjs +0 -1
  828. package/dist/chunks/openaiShim-1.1.16-8gems3mz.mjs +0 -14
  829. package/dist/chunks/output-style-1.1.16-embrry9v.mjs +0 -1
  830. package/dist/chunks/package-KQCMZM5L-1.1.16-d3m1d21p.mjs +0 -1
  831. package/dist/chunks/parseConnectUrl-1.1.16-zffe39j3.mjs +0 -1
  832. package/dist/chunks/parser-1.1.16-3ps9dtdr.mjs +0 -1
  833. package/dist/chunks/passes-1.1.16-n0a3pvdf.mjs +0 -1
  834. package/dist/chunks/permissions-1.1.16-jk4pmrmf.mjs +0 -3
  835. package/dist/chunks/permissions-1.1.16-wnz2vr3h.mjs +0 -1
  836. package/dist/chunks/plan-1.1.16-rtkh7eh3.mjs +0 -1
  837. package/dist/chunks/plist-1.1.16-t71wt7sc.mjs +0 -1
  838. package/dist/chunks/plugin-1.1.16-t9jaj1gv.mjs +0 -29
  839. package/dist/chunks/pluginStartupCheck-1.1.16-c6cf7tmk.mjs +0 -1
  840. package/dist/chunks/plugins-1.1.16-73hwgvfk.mjs +0 -9
  841. package/dist/chunks/preActionHook-1.1.16-nthzxbp9.mjs +0 -2
  842. package/dist/chunks/print-1.1.16-armgf1aq.mjs +0 -57
  843. package/dist/chunks/process-1.1.16-3ct2vh70.mjs +0 -1
  844. package/dist/chunks/processBashCommand-1.1.16-89y7gsbx.mjs +0 -1
  845. package/dist/chunks/processSlashCommand-1.1.16-1kjtbhx2.mjs +0 -9
  846. package/dist/chunks/prompt-1.1.16-0386v4at.mjs +0 -1
  847. package/dist/chunks/prompt-1.1.16-k5y0dpf7.mjs +0 -1
  848. package/dist/chunks/prompts-1.1.16-xsnbw92m.mjs +0 -1
  849. package/dist/chunks/protocolHandler-1.1.16-yx039y6v.mjs +0 -13
  850. package/dist/chunks/provider-1.1.16-m0kk3yhs.mjs +0 -2
  851. package/dist/chunks/providerProfiles-1.1.16-2v2pwv6d.mjs +0 -1
  852. package/dist/chunks/providerValidation-1.1.16-282tqjjx.mjs +0 -6
  853. package/dist/chunks/rate-limit-options-1.1.16-avgds6pk.mjs +0 -1
  854. package/dist/chunks/registerSubcommands-1.1.16-mzwjj9v6.mjs +0 -26
  855. package/dist/chunks/registry-1.1.16-n34j5qfk.mjs +0 -1
  856. package/dist/chunks/release-notes-1.1.16-8q4sx928.mjs +0 -5
  857. package/dist/chunks/reload-plugins-1.1.16-7znfn6r1.mjs +0 -2
  858. package/dist/chunks/remote-env-1.1.16-pv7edzf2.mjs +0 -1
  859. package/dist/chunks/remoteBridgeCore-1.1.16-jv7q72cp.mjs +0 -1
  860. package/dist/chunks/remoteSession-1.1.16-mmf3btpt.mjs +0 -1
  861. package/dist/chunks/rename-1.1.16-m3xv2hvc.mjs +0 -1
  862. package/dist/chunks/replBridgeHandle-1.1.16-0vph2kjs.mjs +0 -1
  863. package/dist/chunks/replLauncher-1.1.16-g5z9jade.mjs +0 -1
  864. package/dist/chunks/resume-1.1.16-40c9ahqr.mjs +0 -2
  865. package/dist/chunks/rewind-1.1.16-tpy93a43.mjs +0 -1
  866. package/dist/chunks/rootOptions-1.1.16-3apcbhbp.mjs +0 -1
  867. package/dist/chunks/runWorkflowHeadless-1.1.16-ejyeyghc.mjs +0 -10
  868. package/dist/chunks/sandbox-adapter-1.1.16-xb7gb62s.mjs +0 -1
  869. package/dist/chunks/sandbox-toggle-1.1.16-pm4wkyc5.mjs +0 -1
  870. package/dist/chunks/session-1.1.16-vrf7bvfv.mjs +0 -2
  871. package/dist/chunks/sessionDiscovery-1.1.16-e919fb36.mjs +0 -1
  872. package/dist/chunks/sessionFileAccessHooks-1.1.16-6sbxmck5.mjs +0 -1
  873. package/dist/chunks/sessionStorage-1.1.16-1pd52qxc.mjs +0 -1
  874. package/dist/chunks/settings-1.1.16-0twvg2yc.mjs +0 -1
  875. package/dist/chunks/setup-1.1.16-mhj053ej.mjs +0 -12
  876. package/dist/chunks/sinks-1.1.16-10wxx1a3.mjs +0 -1
  877. package/dist/chunks/skills-1.1.16-r7v633j2.mjs +0 -1
  878. package/dist/chunks/startupProfiler-1.1.16-mmrhkw7p.mjs +0 -1
  879. package/dist/chunks/startupUpdateCheck-1.1.16-8tj1n7gt.mjs +0 -1
  880. package/dist/chunks/state-1.1.16-8zy52d2r.mjs +0 -1
  881. package/dist/chunks/stats-1.1.16-mrmhzc8j.mjs +0 -6
  882. package/dist/chunks/status-1.1.16-qpanvb67.mjs +0 -1
  883. package/dist/chunks/stickers-1.1.16-0d4zm7x4.mjs +0 -1
  884. package/dist/chunks/subprocessEnv-1.1.16-3pz224am.mjs +0 -1
  885. package/dist/chunks/tasks-1.1.16-cv8bsqt6.mjs +0 -1
  886. package/dist/chunks/teamHelpers-1.1.16-yrkqrc58.mjs +0 -1
  887. package/dist/chunks/teammateModeSnapshot-1.1.16-xgaxxh5q.mjs +0 -1
  888. package/dist/chunks/teleport-1.1.16-rhtckzvp.mjs +0 -1
  889. package/dist/chunks/terminalSetup-1.1.16-fptwmgph.mjs +0 -1
  890. package/dist/chunks/theme-1.1.16-4tskjw6p.mjs +0 -1
  891. package/dist/chunks/thinkback-1.1.16-d1x5jsx0.mjs +0 -1
  892. package/dist/chunks/thinkback-play-1.1.16-54xyd092.mjs +0 -1
  893. package/dist/chunks/toolPool-1.1.16-ga5s9f1k.mjs +0 -1
  894. package/dist/chunks/toolSearch-1.1.16-xw1xa379.mjs +0 -1
  895. package/dist/chunks/tools-1.1.16-h2yhp23r.mjs +0 -1
  896. package/dist/chunks/trustedDevice-1.1.16-nrdjhk2z.mjs +0 -1
  897. package/dist/chunks/turndown.cjs-1.1.16-4yvp9q16.mjs +0 -69
  898. package/dist/chunks/types-1.1.16-47y90s0f.mjs +0 -1
  899. package/dist/chunks/ultrareviewCommand-1.1.16-ej1e8hkt.mjs +0 -4
  900. package/dist/chunks/update-1.1.16-rtkcq95j.mjs +0 -72
  901. package/dist/chunks/upgrade-1.1.16-52bm5sf9.mjs +0 -1
  902. package/dist/chunks/upload-1.1.16-m2wyhzek.mjs +0 -7
  903. package/dist/chunks/upstreamproxy-1.1.16-vwczyqak.mjs +0 -14
  904. package/dist/chunks/url-handler-napi-1.1.16-qa109pxx.mjs +0 -1
  905. package/dist/chunks/usage-1.1.16-yqk04de2.mjs +0 -1
  906. package/dist/chunks/util-1.1.16-5f2kcd2a.mjs +0 -1
  907. package/dist/chunks/utils-1.1.16-pgvxvt37.mjs +0 -1
  908. package/dist/chunks/vim-1.1.16-9pd3j7qj.mjs +0 -1
  909. package/dist/chunks/watchLoop-1.1.16-wdxk66eb.mjs +0 -13
  910. package/dist/chunks/watcher-1.1.16-cd9fad12.mjs +0 -1
  911. package/dist/chunks/wiki-1.1.16-8290ftnh.mjs +0 -132
  912. package/dist/chunks/workflows-1.1.16-f4k926bs.mjs +0 -1
  913. package/dist/chunks/worktree-1.1.16-4s4hp83q.mjs +0 -1
  914. package/dist/chunks/worktreeModeEnabled-1.1.16-je59whhd.mjs +0 -1
  915. package/dist/chunks/wrapper-1.1.16-dfsehczs.mjs +0 -7
@@ -0,0 +1,88 @@
1
+ import{sb as yJ,tb as xz,ub as rz,vb as cz,wb as iz,xb as kJ}from"./cli-1.1.18-2gvrr93b.mjs";import{zb as Tz}from"./cli-1.1.18-y89tqne6.mjs";import{Jb as EJ,Kb as TJ,Lb as xJ,Mb as MJ,Nb as wJ}from"./cli-1.1.18-6hjdcw80.mjs";import{Pb as fJ}from"./cli-1.1.18-b5h22srd.mjs";import{He as jJ,Ie as cJ}from"./cli-1.1.18-v42h6ekh.mjs";import{$e as oz,Ze as LJ,bf as RK}from"./cli-1.1.18-7wccrsx9.mjs";import{pf as mz,rf as UJ,vf as OJ}from"./cli-1.1.18-dcrg5hwd.mjs";import{NH as JJ,OH as Cz,On as AJ,PH as KJ,Pn as PK,QH as ZJ,SH as $J,TH as YJ,UH as XJ,VH as QJ,WH as WJ,cm as DJ,dm as vz,fk as CJ,gk as FK,hm as NK}from"./cli-1.1.18-xfb4pete.mjs";import"./cli-1.1.18-pzeg2p3k.mjs";import"./cli-1.1.18-2qvvz2tv.mjs";import"./cli-1.1.18-cphcr3xr.mjs";import"./cli-1.1.18-k1pkc44n.mjs";import"./cli-1.1.18-hphxdvpd.mjs";import"./cli-1.1.18-ta6r8qry.mjs";import"./cli-1.1.18-heh8xz6x.mjs";import"./cli-1.1.18-rnqtkprk.mjs";import"./cli-1.1.18-cy0ypdkd.mjs";import{rW as RJ,xW as _K}from"./cli-1.1.18-f7jag2rr.mjs";import"./cli-1.1.18-v75xqnbv.mjs";import"./cli-1.1.18-5s8f8gd5.mjs";import"./cli-1.1.18-ccbh77pf.mjs";import{VW as az,ZW as CK}from"./cli-1.1.18-zd969gzb.mjs";import"./cli-1.1.18-27b82jjj.mjs";import"./cli-1.1.18-pbdm30bs.mjs";import"./cli-1.1.18-ybfayy4j.mjs";import"./cli-1.1.18-fst0kx9m.mjs";import"./cli-1.1.18-1c8pr80a.mjs";import"./cli-1.1.18-0h118vrj.mjs";import"./cli-1.1.18-t526ry94.mjs";import"./cli-1.1.18-2w9274tq.mjs";import"./cli-1.1.18-x7jyxff1.mjs";import"./cli-1.1.18-ecds9fxm.mjs";import"./cli-1.1.18-ztyf20j1.mjs";import{E2 as pz,H2 as BK}from"./cli-1.1.18-12tzkcxz.mjs";import"./cli-1.1.18-mg7jmbh9.mjs";import"./cli-1.1.18-mwevzyy2.mjs";import"./cli-1.1.18-a888prq4.mjs";import"./cli-1.1.18-1t3rb5a8.mjs";import"./cli-1.1.18-8thyc5yy.mjs";import"./cli-1.1.18-npdweafk.mjs";import"./cli-1.1.18-f2j32mha.mjs";import"./cli-1.1.18-cjkn7t4k.mjs";import"./cli-1.1.18-0aakxjsk.mjs";import"./cli-1.1.18-948h21gh.mjs";import"./cli-1.1.18-ddreb78e.mjs";import"./cli-1.1.18-1spz0azv.mjs";import{K7 as i,L7 as OK}from"./cli-1.1.18-703emt7y.mjs";import"./cli-1.1.18-ythtynpe.mjs";import{k9 as V,l9 as gJ}from"./cli-1.1.18-mrrbn0jj.mjs";import"./cli-1.1.18-af7txyky.mjs";import"./cli-1.1.18-7nsrr2k0.mjs";import"./cli-1.1.18-avas0dtp.mjs";import"./cli-1.1.18-f6m259he.mjs";import{Cba as PJ,Dba as HK,J_ as Wz,L_ as GK,Wga as Ez,cca as fz,cha as qK,dca as ez,eca as zJ,fca as pJ}from"./cli-1.1.18-3y4pftxb.mjs";import{hha as sz,iha as uJ,kha as Rz,rha as qz,zha as jK}from"./cli-1.1.18-ndct9t5e.mjs";import"./cli-1.1.18-c9h4ga5f.mjs";import"./cli-1.1.18-psb6qqc1.mjs";import{eia as BJ,mia as VK}from"./cli-1.1.18-7pcfwrhj.mjs";import"./cli-1.1.18-esvp6n4e.mjs";import"./cli-1.1.18-cj8tr93q.mjs";import"./cli-1.1.18-k05shz35.mjs";import{Zja as zz,_ja as _J,aka as XK}from"./cli-1.1.18-hbv881pn.mjs";import{Fka as qJ,Gka as uz,Kka as aJ,ala as q,dla as tz}from"./cli-1.1.18-ypcye8ae.mjs";import"./cli-1.1.18-mz10pywc.mjs";import{Ala as g,Hla as WK}from"./cli-1.1.18-cxg522yt.mjs";import{Nla as NJ,Vla as QK}from"./cli-1.1.18-3s03nva1.mjs";import"./cli-1.1.18-4c3jqppx.mjs";import"./cli-1.1.18-417wb57s.mjs";import"./cli-1.1.18-p3yf1aq6.mjs";import"./cli-1.1.18-vzrv28w4.mjs";import"./cli-1.1.18-4jy396p1.mjs";import"./cli-1.1.18-553zzrge.mjs";import{lta as I}from"./cli-1.1.18-hvd9yyb4.mjs";PK();FK();_K();VK();XK();HK();tz();GK();QK();WK();jK();qK();OK();NK();import{randomUUID as Sz}from"crypto";import{hostname as bJ,tmpdir as DK}from"os";import{basename as AK,join as UK,resolve as lz}from"path";WJ();gJ();cJ();pJ();uJ();tz();WJ();var lJ={type:"utf8",errorCorrectionLevel:"L",small:!0};async function dJ(z){return(await jJ(z,lJ)).split(`
2
+ `).filter((K)=>K.length>0)}function VJ(z){let J=z.write??(($)=>process.stdout.write($)),K=z.verbose,Y=0,O="idle",Z="Ready",R="",B="",U="",F="",L="",A=null,_=[],M=!1,y=null,P=0,x=0,N=1,f=null,k="single-session",b=new Map,d=null,S=0;function Xz($){let G=process.stdout.columns||80,w=0;for(let Vz of $.split(`
3
+ `)){if(Vz.length===0){w++;continue}let _z=sz(Vz);w+=Math.max(1,Math.ceil(_z/G))}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($){dJ($).then((G)=>{_=G,p()}).catch((G)=>{q(`QR code generation failed: ${G}`,{level:"error"})})}function o(){a();let $=fz[S%fz.length],G="";if(R)G+=V.dim(" · ")+V.dim(R);if(B)G+=V.dim(" · ")+V.dim(B);m(`${V.yellow($)} ${V.yellow("Connecting")}${G}
5
+ `)}function jz(){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 _)m(`${V.dim(Jz)}
6
+ `);let G=ez,w=$?V.green:V.cyan,_z=($?V.green:V.cyan)(Z),Oz="";if(R)Oz+=V.dim(" · ")+V.dim(R);if(B&&k!=="worktree")Oz+=V.dim(" · ")+V.dim(B);if(m(`${w(G)} ${_z}${Oz}
7
+ `),N>1){let Jz=k==="worktree"?"New sessions will be created in an isolated worktree":"New sessions will be created in the current directory";m(` ${V.dim(`Capacity: ${x}/${N} · ${Jz}`)}
8
+ `);for(let[,Kz]of b){let r=Kz.title?Rz(Kz.title,35):V.dim("Attached"),Mz=QJ(r,Kz.url),Fz=Kz.activity,j=Fz&&Fz.type!=="result"&&Fz.type!=="error"?V.dim(` ${Rz(Fz.summary,40)}`):"";m(` ${Mz}${j}
9
+ `)}}if(N===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(` ${V.dim(Jz)}
10
+ `)}if(N===1&&!$&&y&&Date.now()-P<JJ)m(` ${V.dim(Rz(y,60))}
11
+ `);let Qz=A??U;if(Qz){m(`
12
+ `);let Jz=$?$J(Qz):YJ(Qz),Kz=M?V.dim.italic("space to hide QR code"):V.dim.italic("space to show QR code"),r=f?V.dim.italic(" · w to toggle spawn mode"):"";m(`${V.dim(Jz)}
13
+ `),m(`${Kz}${r}
14
+ `)}}return{printBanner($,G){if(F=$.sessionIngressUrl,L=G,U=KJ(G,F),n(U),K)J(V.dim("Remote Control")+` v99.0.0
15
+ `);if(K){if($.spawnMode!=="single-session")J(V.dim("Spawn mode: ")+`${$.spawnMode}
16
+ `),J(V.dim("Max concurrent sessions: ")+`${$.maxSessions}
17
+ `);J(V.dim("Environment ID: ")+`${G}
18
+ `)}if($.sandbox)J(V.dim("Sandbox: ")+`${V.green("Enabled")}
19
+ `);J(`
20
+ `),jz()},logSessionStart($,G){if(K){let w=Rz(G,80);$z(V.dim(`[${Cz()}]`)+` Session started: ${V.white(`"${w}"`)} (${V.dim($)})
21
+ `)}},logSessionComplete($,G){$z(V.dim(`[${Cz()}]`)+` Session ${V.green("completed")} (${qz(G)}) ${V.dim($)}
22
+ `)},logSessionFailed($,G){$z(V.dim(`[${Cz()}]`)+` Session ${V.red("failed")}: ${G} ${V.dim($)}
23
+ `)},logStatus($){$z(V.dim(`[${Cz()}]`)+` ${$}
24
+ `)},logVerbose($){if(K)$z(V.dim(`[${Cz()}] ${$}`)+`
25
+ `)},logError($){$z(V.red(`[${Cz()}] Error: ${$}`)+`
26
+ `)},logReconnected($){$z(V.dim(`[${Cz()}]`)+` ${V.green("Reconnected")} after ${qz($)}
27
+ `)},setRepoInfo($,G){R=$,B=G},updateIdleStatus(){t(),O="idle",Z="Ready",y=null,P=0,A=null,n(U),p()},setAttached($){if(t(),O="attached",Z="Connected",y=null,P=0,N<=1)A=ZJ($,L,F),n(A);p()},updateReconnectingStatus($,G){if(t(),a(),O="reconnecting",M)for(let Vz of _)m(`${V.dim(Vz)}
28
+ `);let w=fz[S%fz.length];S++,m(`${V.yellow(w)} ${V.yellow("Reconnecting")} ${V.dim("·")} ${V.dim(`retrying in ${$}`)} ${V.dim("·")} ${V.dim(`disconnected ${G}`)}
29
+ `)},updateFailedStatus($){t(),a(),O="failed";let G="";if(R)G+=V.dim(" · ")+V.dim(R);if(B)G+=V.dim(" · ")+V.dim(B);if(m(`${V.red(zJ)} ${V.red("Remote Control Failed")}${G}
30
+ `),m(`${V.dim(XJ)}
31
+ `),$)m(`${V.red($)}
32
+ `)},updateSessionStatus($,G,w,Vz){if(w.type==="tool_start")y=w.summary,P=Date.now();p()},clearStatus(){t(),a()},toggleQr(){M=!M,p()},updateSessionCount($,G,w){if(x===$&&N===G&&k===w)return;x=$,N=G,k=w},setSpawnModeDisplay($){if(f===$)return;if(f=$,$)k=$},addSession($,G){b.set($,{url:G})},updateSessionActivity($,G){let w=b.get($);if(!w)return;w.activity=G},setSessionTitle($,G){let w=b.get($);if(!w)return;if(w.title=G,O==="reconnecting"||O==="failed")return;if(N===1)O="titled",Z=Rz(G,40);p()},removeSession($){b.delete($)},refreshDisplay(){if(O==="reconnecting"||O==="failed")return;p()}}}OJ();BK();aJ();OJ();import{spawn as oJ}from"child_process";import{createWriteStream as rJ}from"fs";import{tmpdir as iJ}from"os";import{dirname as nJ,join as GJ}from"path";import{createInterface as HJ}from"readline";var tJ=10,sJ=10,eJ=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","CLAUDIN_BUBBLEWRAP","CLAUDE_CODE_ENTRYPOINT","CLAUDIN_COORDINATOR_MODE","CLAUDE_CODE_PERMISSIONS_VERSION","CLAUDE_CODE_PERMISSIONS_SETTING","TERM","COLORTERM","FORCE_COLOR","NO_COLOR"]);function zK(z,J){let K={};for(let Y of Object.keys(z))if(eJ.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 JK={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 KK(z,J){let K=JK[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 ZK(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",_=L.input??{},M=KK(A,_);Z.push({type:"tool_start",summary:M,timestamp:R}),K(`[bridge:activity] sessionId=${J} tool_use name=${A} ${YK(_)}`)}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 $K(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 YK(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 N=z.debugFile.lastIndexOf(".");if(N>0)O=`${z.debugFile.slice(0,N)}-${Y}${z.debugFile.slice(N)}`;else O=`${z.debugFile}-${Y}`}else if(z.verbose)O=GJ(iJ(),"claude",`bridge-session-${Y}.log`);let Z=null,R;if(z.debugFile)R=GJ(nJ(z.debugFile),`bridge-transcript-${Y}.jsonl`),Z=rJ(R,{flags:"a"}),Z.on("error",(N)=>{z.onDebug(`[bridge:session] Transcript write error: ${N.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=zK(z.env,{accessToken:J.accessToken,useCcrV2:J.useCcrV2??!1,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=oJ(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,_=[],M=!1,y=!1;if(F.stderr)HJ({input:F.stderr}).on("line",(f)=>{if(z.verbose)process.stderr.write(f+`
33
+ `);if(_.length>=sJ)_.shift();_.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=ZK(f,J.sessionId,z.onDebug);for(let b of k){if(L.length>=tJ)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"&&!y&&J.onFirstUserMessage){let S=$K(d);if(S)y=!0,J.onFirstUserMessage(S)}}}});let P=new Promise((N)=>{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}`),N("interrupted");else if(f===0)z.onDebug(`[bridge:session] sessionId=${J.sessionId} completed exit_code=0 pid=${F.pid}`),N("completed");else z.onDebug(`[bridge:session] sessionId=${J.sessionId} failed exit_code=${f} pid=${F.pid}`),N("failed")}),F.on("error",(f)=>{z.onDebug(`[bridge:session] sessionId=${J.sessionId} spawn error: ${f.message}`),N("failed")})}),x={sessionId:J.sessionId,done:P,activities:L,accessToken:J.accessToken,lastStderr:_,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(N){if(F.stdin&&!F.stdin.destroyed)z.onDebug(`[bridge:ws] sessionId=${J.sessionId} >>> ${mz(N)}`),F.stdin.write(N)},updateAccessToken(N){x.accessToken=N,x.writeStdin(qJ({type:"update_environment_variables",variables:{CLAUDE_CODE_SESSION_ACCESS_TOKEN:N}})+`
36
+ `),z.onDebug(`[bridge:session] Sent token refresh via stdin for sessionId=${J.sessionId}`)}};return x}}}CK();RK();var LK={connInitialMs:2000,connCapMs:120000,connGiveUpMs:600000,generalInitialMs:500,generalCapMs:30000,generalGiveUpMs:600000},yK=1000,IJ=32;async function vJ(){return BJ("tengu_ccr_bridge_multi_session")}function FJ(z){return z.connCapMs*2}function hJ(){if(PJ()||!process.argv[1])return[];return[process.argv[1]]}function EK(z,J,K){try{return z.spawn(J,K)}catch(Y){let O=g(Y);return Ez(Error(`Session spawn failed: ${O}`)),O}}async function SJ(z,J,K,Y,O,Z,R,B=LK,U,F){let L=new AbortController;if(R.aborted)L.abort();else R.addEventListener("abort",()=>L.abort(),{once:!0});let A=L.signal,_=new Map,M=new Map,y=new Map,P=new Map,x=new Map,N=new Map,f=new Set,k=new Map,b=new Set,d=new Set,S=kJ(A);async function Xz(){let Q=!1,j=!1,E=[];for(let[H]of _){let D=y.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("",{status:u.status,error_type:u.status===401||u.status===403?"auth_failed":"fatal"}),u.status===401||u.status===403)E.push(H);else j=!0}}for(let H of E){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(j)return"fatal";if(E.length>0)return"auth_failed";return Q?"ok":"failed"}let m=new Set,a=F?fJ({getAccessToken:F,onRefresh:(Q,j)=>{let E=_.get(Q);if(!E)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 E.updateAccessToken(j)},label:"bridge"}):null,$z=Date.now(),n=new Set;function o(Q){n.add(Q),Q.finally(()=>n.delete(Q))}let jz=0,t=0,p=null,$=null,G=null,w=null,Vz=!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 _z(){Z.updateSessionCount(_.size,z.maxSessions,z.spawnMode);for(let[u,X]of _){let T=X.currentActivity;if(T)Z.updateSessionActivity(P.get(u)??u,T)}if(_.size===0){Z.updateIdleStatus();return}let[Q,j]=[..._.entries()].pop(),E=M.get(Q);if(!E)return;let H=j.currentActivity;if(!H||H.type==="result"||H.type==="error"){if(z.maxSessions>1)Z.refreshDisplay();return}let D=qz(Date.now()-E),v=j.activities.filter((u)=>u.type==="tool_start").slice(-5).map((u)=>u.summary);Z.updateSessionStatus(Q,D,H,v)}function Oz(){Qz(),_z(),w=setInterval(_z,yK)}function Qz(){if(w)clearInterval(w),w=null}function Jz(Q,j,E){return(H)=>{let D=y.get(Q);_.delete(Q),M.delete(Q),y.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=N.get(Q);if(u)clearTimeout(u),N.delete(Q);a?.cancel(Q),S.wake();let X=b.delete(Q),T=X&&H==="interrupted"?"failed":H,c=Date.now()-j;q(`[bridge:session] sessionId=${Q} workId=${D??"unknown"} exited status=${T} duration=${qz(c)}`),zz("",{status:T,duration_ms:c}),Wz("info","bridge_session_done",{status:T,duration_ms:c}),Z.clearStatus(),Qz();let s=E.lastStderr.length>0?E.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),Ez(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 j=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("",{disconnected_ms:X})}if(jz=0,t=0,p=null,$=null,G=null,!j){if(_.size>=z.maxSessions){let T=Q.multisession_poll_interval_ms_at_capacity;if(Q.non_exclusive_heartbeat_interval_ms>0){zz("",{active_sessions:_.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&&_.size>=z.maxSessions&&(c===null||Date.now()<c)){let l=Tz();if(l.non_exclusive_heartbeat_interval_ms<=0)break;let Nz=S.signal();if(s=await Xz(),s==="auth_failed"||s==="fatal"){Nz.cleanup();break}Yz++,await i(l.non_exclusive_heartbeat_interval_ms,Nz.signal),Nz.cleanup()}let Zz=s==="auth_failed"||s==="fatal"?s:A.aborted?"shutdown":_.size<z.maxSessions?"capacity_changed":c!==null&&Date.now()>=c?"poll_due":"config_disabled";if(zz("",{reason:Zz,heartbeat_cycles:Yz,active_sessions:_.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=_.size>0?Q.multisession_poll_interval_ms_partial_capacity:Q.multisession_poll_interval_ms_not_at_capacity;await i(T,A)}continue}let H=_.size>=z.maxSessions;if(f.has(j.id)){if(q(`[bridge:work] Skipping already-completed workId=${j.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=EJ(j.secret)}catch(X){let T=g(X);if(Z.logError(`Failed to decode work secret for workId=${j.id}: ${T}`),zz("",{}),f.add(j.id),o(kz(Y,J,j.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=${j.id}`);try{await Y.acknowledgeWork(J,j.id,D.session_ingress_token)}catch(X){q(`[bridge:work] Acknowledge failed workId=${j.id}: ${g(X)}`)}},u=j.data.type;switch(j.data.type){case"healthcheck":await v(),q("[bridge:work] Healthcheck received"),Z.logVerbose("Healthcheck received");break;case"session":{let X=j.data.id;try{yJ(X,"session_id")}catch{await v(),Z.logError(`Invalid session_id received: ${X}`);break}let T=_.get(X);if(T){T.updateAccessToken(D.session_ingress_token),x.set(X,D.session_ingress_token),y.set(X,j.id),a?.schedule(X,D.session_ingress_token),q(`[bridge:work] Updated access token for existing sessionId=${X} workId=${j.id}`),await v();break}if(_.size>=z.maxSessions){q(`[bridge:work] At capacity (${_.size}/${z.maxSessions}), cannot spawn new session for workId=${j.id}`);break}await v();let c=Date.now(),s,Yz=!1,Zz;if(D.use_code_sessions===!0||NJ(process.env.CLAUDE_BRIDGE_USE_CCR_V2)){s=MJ(z.apiBaseUrl,X);for(let W=1;W<=2;W++)try{Zz=await wJ(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}`),Ez(Error(`registerWorker failed: ${h}`)),f.add(j.id),o(kz(Y,J,j.id,Z,B.stopWorkBaseDelayMs))}if(!Yz)break}else s=TJ(z.sessionIngressUrl,X);let{spawnMode:l,dir:Nz}=z,Uz=0;if(l==="worktree"&&(U===void 0||!xJ(X,U))){let W=Date.now();try{let C=await DJ(`bridge-${Iz(X)}`);Uz=Date.now()-W,k.set(X,{worktreePath:C.worktreePath,worktreeBranch:C.worktreeBranch,gitRoot:C.gitRoot,hookBased:C.hookBased}),Nz=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}`),Ez(Error(`Worktree creation failed: ${h}`)),f.add(j.id),o(kz(Y,J,j.id,Z,B.stopWorkBaseDelayMs));break}}q(`[bridge:session] Spawning sessionId=${X} sdkUrl=${s}`);let e=pz(X),Lz=EK(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=SK(W);Z.setSessionTitle(e,C),q(`[bridge:title] derived title for ${e}: ${C}`),import("./createSession-1.1.18-0e04rk8g.mjs").then(({updateBridgeSessionTitle:h})=>h(e,C,{baseUrl:z.apiBaseUrl})).catch((h)=>q(`[bridge:title] failed to update title for ${e}: ${h}`,{level:"error"}))}},Nz);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(j.id),o(kz(Y,J,j.id,Z,B.stopWorkBaseDelayMs));break}let Dz=Lz,Az=Date.now()-c;zz("",{active_sessions:_.size,spawn_mode:l,in_worktree:k.has(X),spawn_duration_ms:Az,worktree_create_ms:Uz}),Wz("info","bridge_session_started",{spawn_mode:l,in_worktree:k.has(X),spawn_duration_ms:Az,worktree_create_ms:Uz}),_.set(X,Dz),y.set(X,j.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 yz=Iz(X),Gz;if(z.debugFile){let W=z.debugFile.lastIndexOf(".");if(W>0)Gz=`${z.debugFile.slice(0,W)}-${yz}${z.debugFile.slice(W)}`;else Gz=`${z.debugFile}-${yz}`}else if(z.verbose)Gz=UK(DK(),"claude",`bridge-session-${yz}.log`);if(Gz)Z.logVerbose(`Debug log: ${Gz}`);Z.addSession(e,AJ(e,z.sessionIngressUrl)),Oz(),Z.setAttached(e),mK(e,z.apiBaseUrl).then((W)=>{if(W&&_.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??LJ;if(Bz>0){let W=setTimeout(wK,Bz,X,Bz,Z,b,Dz);N.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(j){if(A.aborted)break;if(j instanceof xz){if(Vz=!0,cz(j.errorType))Z.logStatus(j.message);else if(iz(j))q(`[bridge:work] Suppressed 403 error: ${j.message}`);else Z.logError(j.message),Ez(j);zz("",{status:j.status,error_type:j.errorType}),Wz(cz(j.errorType)?"info":"error","bridge_fatal_error",{status:j.status,error_type:j.errorType});break}let E=UJ(j);if(xK(j)||MK(j)){let H=Date.now();if(G!==null&&H-G>FJ(B))q(`[bridge:work] Detected system sleep (${Math.round((H-G)/1000)}s gap), resetting error budget`),Wz("info","bridge_poll_sleep_detected",{gapMs:H-G}),p=null,jz=0,$=null,t=0;if(G=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("",{error_type:"connection",elapsed_ms:D}),Wz("error","bridge_poll_give_up",{error_type:"connection",elapsed_ms:D}),Vz=!0;break}$=null,t=0,jz=jz?Math.min(jz*2,B.connCapMs):B.connInitialMs;let v=dz(jz);if(Z.logVerbose(`Connection error, retrying in ${bz(v)} (${Math.round(D/1000)}s elapsed): ${E}`),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(G!==null&&H-G>FJ(B))q(`[bridge:work] Detected system sleep (${Math.round((H-G)/1000)}s gap), resetting error budget`),Wz("info","bridge_poll_sleep_detected",{gapMs:H-G}),p=null,jz=0,$=null,t=0;if(G=H,!$)$=H;let D=H-$;if(D>=B.generalGiveUpMs){Z.logError(`Persistent errors for ${Math.round(D/60000)} minutes, giving up.`),zz("",{error_type:"general",elapsed_ms:D}),Wz("error","bridge_poll_give_up",{error_type:"general",elapsed_ms:D}),Vz=!0;break}p=null,jz=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): ${E}`),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("",{active_sessions:_.size,loop_duration_ms:Kz}),Wz("info","bridge_shutdown",{active_sessions:_.size,loop_duration_ms:Kz});let r=new Set(_.keys());if(U)r.add(U);let Mz=new Map(P);if(_.size>0){q(`[bridge:shutdown] Shutting down ${_.size} active session(s)`),Z.logStatus(`Shutting down ${_.size} active session(s)…`);let Q=new Map(y);for(let[E,H]of _.entries())q(`[bridge:shutdown] Sending SIGTERM to sessionId=${E}`),H.kill();let j=new AbortController;await Promise.race([Promise.allSettled([..._.values()].map((E)=>E.done)),i(B.shutdownGraceMs??30000,j.signal)]),j.abort();for(let[E,H]of _.entries())q(`[bridge:shutdown] Force-killing stuck sessionId=${E}`),H.forceKill();for(let E of N.values())clearTimeout(E);if(N.clear(),a?.cancelAll(),k.size>0){let E=[...k.values()];k.clear(),q(`[bridge:shutdown] Cleaning up ${E.length} worktree(s)`),await Promise.allSettled(E.map((H)=>vz(H.worktreePath,H.worktreeBranch,H.gitRoot,H.hookBased)))}await Promise.allSettled([...Q.entries()].map(([E,H])=>{return Y.stopWork(J,H,!0).catch((D)=>Z.logVerbose(`Failed to stop work ${H} for session ${E}: ${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((j)=>Z.logVerbose(`Failed to archive session ${Q}: ${g(j)}`))));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-1.1.18-w72zdv7w.mjs");await Fz(z.dir),Z.logVerbose("Environment offline.")}var TK=new Set(["ECONNREFUSED","ECONNRESET","ETIMEDOUT","ENETUNREACH","EHOSTUNREACH"]);function xK(z){if(z&&typeof z==="object"&&"code"in z&&typeof z.code==="string"&&TK.has(z.code))return!0;return!1}function MK(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 wK(z,J,K,Y,O){q(`[bridge:session] sessionId=${z} timed out after ${qz(J)}`),zz("",{timeout_ms:J}),K.logSessionFailed(z,`Session timed out after ${qz(J)}`),Y.add(z),O.kill()}var fK=["session","same-dir","worktree"];function kK(z){if(z==="session")return"single-session";if(z==="same-dir")return"same-dir";if(z==="worktree")return"worktree";return`--spawn requires one of: ${fK.join(", ")} (got: ${z??"<missing>"})`}function bK(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 IK(z){let J=!1,K=!1,Y,O,Z,R,B=!1,U,F,L,A,_=!1;for(let y=0;y<z.length;y++){let P=z[y];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"&&y+1<z.length)Y=lz(z[++y]);else if(P.startsWith("--debug-file="))Y=lz(P.slice(13));else if(P==="--session-timeout"&&y+1<z.length)O=parseInt(z[++y],10)*1000;else if(P.startsWith("--session-timeout="))O=parseInt(P.slice(18),10)*1000;else if(P==="--permission-mode"&&y+1<z.length)Z=z[++y];else if(P.startsWith("--permission-mode="))Z=P.slice(18);else if(P==="--name"&&y+1<z.length)R=z[++y];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[++y],N=kK(x);if(N==="single-session"||N==="same-dir"||N==="worktree")U=N;else return M(N)}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[++y],N=bK(x);if(typeof N==="number")F=N;else return M(N)}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 'claudin 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||_)&&(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&&_)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:_,help:B};function M(y){return{verbose:J,sandbox:K,debugFile:Y,sessionTimeoutMs:O,permissionMode:Z,name:R,spawnMode:U,capacity:F,createSessionInDir:L,sessionId:A,continueSession:_,help:B,error:y}}}async function vK(){let{EXTERNAL_PERMISSION_MODES:z}=await import("./permissions-1.1.18-5a7765tc.mjs"),J=z.join(", "),K=await vJ(),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: ${IJ})
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
+ claudin 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 \`claudin\` 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 hK=80;function SK(z){let J=z.replace(/\s+/g," ").trim();return Rz(J,hK)}async function mK(z,J){let{getBridgeSession:K}=await import("./createSession-1.1.18-0e04rk8g.mjs");return(await K(z,{baseUrl:J}))?.title||void 0}async function fZ(z){let J=IK(z);if(J.help){await vK();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:_}=J,M=A,y,P=U!==void 0||F!==void 0||L!==void 0;if(R!==void 0){let{PERMISSION_MODES:W}=await import("./permissions-1.1.18-5a7765tc.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:N,checkHasTrustDialogAccepted:f}=await import("./config-1.1.18-9kjysdvn.mjs");N();let{initSinks:k}=await import("./sinks-1.1.18-zxg6qwxv.mjs");k();let b=await vJ();if(P&&!b)await _J("",{used_spawn:U!==void 0,used_capacity:F!==void 0,used_create_session_in_dir:L!==void 0}),await Promise.race([Promise.all([RJ(),CJ()]),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-1.1.18-12hrspsf.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-1.1.18-4de9sj97.mjs"),{getBridgeAccessToken:a,getBridgeBaseUrl:$z}=await import("./bridgeConfig-1.1.18-6aeg22kg.mjs");if(!a())console.error(oz),process.exit(1);let{getGlobalConfig:o,saveGlobalConfig:jz,getCurrentProjectConfig:t,saveCurrentProjectConfig:p}=await import("./config-1.1.18-9kjysdvn.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(),jz((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 G=process.env.CLAUDE_BRIDGE_SESSION_INGRESS_URL||$,{getBranch:w,getRemoteUrl:Vz,findGitRoot:_z}=await import("./git-1.1.18-716sc7rw.mjs"),{hasWorktreeCreateHook:Oz}=await import("./hooks-1.1.18-0zec4dds.mjs"),Qz=Oz()||_z(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("",{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??IJ,Fz=L??!0;if(!M){let{clearBridgePointer:W}=await import("./bridgePointer-1.1.18-w72zdv7w.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(),j=await Vz(),E=bJ(),H=Sz(),{handleOAuth401Error:D}=await import("./auth-1.1.18-4de9sj97.mjs"),v=rz({baseUrl:$,getAccessToken:a,runnerVersion:"99.0.0",onDebug:q,onAuth401:D,getTrustedDeviceToken:az}),u,X={dir:x,machineName:E,branch:Q,gitRepoUrl:j,maxSessions:Mz,spawnMode:r,verbose:K,sandbox:Y,bridgeId:H,workerType:"claude_code",environmentId:Sz(),reuseEnvironmentId:u,apiBaseUrl:$,sessionIngressUrl:G,debugFile:O,sessionTimeoutMs:Z};q(`[bridge:init] bridgeId=${H}${u?` reuseEnvironmentId=${u}`:""} dir=${x} branch=${Q} gitRepoUrl=${j} machine=${E}`),q(`[bridge:init] apiBaseUrl=${$} sessionIngressUrl=${G}`),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("",{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("",{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:hJ(),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=VJ({verbose:K}),{parseGitHubRepository:Nz}=await import("./detectRepository-1.1.18-m0xvtgqt.mjs"),Uz=j?Nz(j):null,e=Uz?Uz.split("/").pop():AK(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("",{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()},yz=()=>{q("[bridge:shutdown] SIGTERM received, shutting down"),Az.abort()};process.on("SIGINT",wz),process.on("SIGTERM",yz);let Gz=null;if(Fz){let{createBridgeSession:W}=await import("./createSession-1.1.18-0e04rk8g.mjs");try{if(Gz=await W({environmentId:T,title:B,events:[],gitRepoUrl:j,branch:Q,signal:Az.signal,baseUrl:$,getAccessToken:a,permissionMode:R}),Gz)q(`[bridge:init] Created initial session ${Gz}`)}catch(C){q(`[bridge:init] Session creation failed (non-fatal): ${g(C)}`)}}let Bz=null;if(Gz&&r==="single-session"){let{writeBridgePointer:W}=await import("./bridgePointer-1.1.18-w72zdv7w.mjs"),C={sessionId:Gz,environmentId:T,source:"standalone"};await W(X.dir,C),Bz=setInterval(W,3600000,X.dir,C),Bz.unref?.()}try{await SJ(X,T,c,v,Zz,l,Az.signal,void 0,Gz??void 0,async()=>{return Xz(),await m(),a()})}finally{if(Bz!==null)clearInterval(Bz);if(process.off("SIGINT",wz),process.off("SIGTERM",yz),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 kZ(z,J){let{dir:K,log:Y}=z;process.chdir(K);let{setOriginalCwd:O,setCwdState:Z}=await import("./state-1.1.18-12hrspsf.mjs");O(K),Z(K);let{enableConfigs:R,checkHasTrustDialogAccepted:B}=await import("./config-1.1.18-9kjysdvn.mjs");R();let{initSinks:U}=await import("./sinks-1.1.18-zxg6qwxv.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-1.1.18-6aeg22kg.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:_,getRemoteUrl:M,findGitRoot:y}=await import("./git-1.1.18-716sc7rw.mjs"),{hasWorktreeCreateHook:P}=await import("./hooks-1.1.18-0zec4dds.mjs");if(z.spawnMode==="worktree"){if(!(P()||y(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=bJ(),k=Sz(),b={dir:K,machineName:f,branch:x,gitRepoUrl:N,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:hJ(),env:process.env,verbose:!1,sandbox:z.sandbox,permissionMode:z.permissionMode,onDebug:Y}),a=uK(Y);a.printBanner(b,S);let $z;if(z.createSessionOnStart){let{createBridgeSession:n}=await import("./createSession-1.1.18-0e04rk8g.mjs");try{let o=await n({environmentId:S,title:z.name,events:[],gitRepoUrl:N,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 SJ(b,S,Xz,d,m,a,J,void 0,$z,async()=>z.getAccessToken())}function uK(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{SJ as runBridgeLoop,kZ as runBridgeHeadless,IK as parseArgs,MK as isServerError,xK as isConnectionError,fZ as bridgeMain,hz as BridgeHeadlessPermanentError};
@@ -0,0 +1 @@
1
+ import{GW as S,HW as c}from"./cli-1.1.18-5s8f8gd5.mjs";import{Bia as M,cja as Y,eja as O,fja as N,gja as _,wia as G,xia as A}from"./cli-1.1.18-esvp6n4e.mjs";import{Fka as K,Gka as W,Kka as R,ala as C,dla as k}from"./cli-1.1.18-ypcye8ae.mjs";import"./cli-1.1.18-mz10pywc.mjs";import{Cla as y,Hla as j}from"./cli-1.1.18-cxg522yt.mjs";import"./cli-1.1.18-3s03nva1.mjs";import"./cli-1.1.18-4c3jqppx.mjs";import"./cli-1.1.18-417wb57s.mjs";import"./cli-1.1.18-p3yf1aq6.mjs";import"./cli-1.1.18-hvd9yyb4.mjs";O();k();j();c();_();M();R();import{mkdir as z,readFile as E,stat as T,unlink as m,writeFile as B}from"fs/promises";import{dirname as b,join as f}from"path";var I=50,u=14400000,D=N(()=>Y.object({sessionId:Y.string(),environmentId:Y.string(),source:Y.enum(["standalone","repl"])}));function J(q){return f(A(),G(q),"bridge-pointer.json")}async function g(q,x){let v=J(q);try{await z(b(v),{recursive:!0}),await B(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 T(x)).mtimeMs,v=await E(x,"utf8")}catch{return null}let Z=D().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($>u)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 S(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 m(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,u as BRIDGE_POINTER_TTL_MS};
@@ -0,0 +1 @@
1
+ import{Xh as a,Yh as AJ}from"./cli-1.1.18-mhy7qzsz.mjs";import{Zh as x,_h as vJ}from"./cli-1.1.18-0xknnw9q.mjs";import{$Q as TJ,JE as c,Ky as m,My as HJ,PE as WJ,QQ as r,SR as o,Wn as g,Xn as UJ,cI as $,dI as bJ,eS as hJ,iU as s,jU as t,kU as DJ,vx as u,wx as IJ}from"./cli-1.1.18-xfb4pete.mjs";import"./cli-1.1.18-pzeg2p3k.mjs";import"./cli-1.1.18-2qvvz2tv.mjs";import"./cli-1.1.18-cphcr3xr.mjs";import"./cli-1.1.18-k1pkc44n.mjs";import"./cli-1.1.18-hphxdvpd.mjs";import"./cli-1.1.18-ta6r8qry.mjs";import"./cli-1.1.18-heh8xz6x.mjs";import"./cli-1.1.18-rnqtkprk.mjs";import"./cli-1.1.18-cy0ypdkd.mjs";import"./cli-1.1.18-f7jag2rr.mjs";import"./cli-1.1.18-v75xqnbv.mjs";import"./cli-1.1.18-5s8f8gd5.mjs";import"./cli-1.1.18-ccbh77pf.mjs";import"./cli-1.1.18-zd969gzb.mjs";import"./cli-1.1.18-27b82jjj.mjs";import"./cli-1.1.18-pbdm30bs.mjs";import"./cli-1.1.18-ybfayy4j.mjs";import"./cli-1.1.18-fst0kx9m.mjs";import"./cli-1.1.18-1c8pr80a.mjs";import{KY as l,MY as kJ,nY as i,oY as QJ}from"./cli-1.1.18-0h118vrj.mjs";import"./cli-1.1.18-t526ry94.mjs";import{DZ as GJ,H1 as NJ,a1 as W,c1 as b,t1 as S,v1 as KJ}from"./cli-1.1.18-2w9274tq.mjs";import"./cli-1.1.18-x7jyxff1.mjs";import"./cli-1.1.18-ecds9fxm.mjs";import"./cli-1.1.18-ztyf20j1.mjs";import"./cli-1.1.18-12tzkcxz.mjs";import"./cli-1.1.18-mg7jmbh9.mjs";import"./cli-1.1.18-mwevzyy2.mjs";import"./cli-1.1.18-a888prq4.mjs";import"./cli-1.1.18-1t3rb5a8.mjs";import"./cli-1.1.18-8thyc5yy.mjs";import"./cli-1.1.18-npdweafk.mjs";import{d4 as F,e4 as H,f4 as _}from"./cli-1.1.18-f2j32mha.mjs";import{g4 as zJ}from"./cli-1.1.18-cjkn7t4k.mjs";import"./cli-1.1.18-0aakxjsk.mjs";import"./cli-1.1.18-948h21gh.mjs";import"./cli-1.1.18-ddreb78e.mjs";import"./cli-1.1.18-1spz0azv.mjs";import"./cli-1.1.18-703emt7y.mjs";import"./cli-1.1.18-ythtynpe.mjs";import"./cli-1.1.18-mrrbn0jj.mjs";import"./cli-1.1.18-af7txyky.mjs";import"./cli-1.1.18-7nsrr2k0.mjs";import"./cli-1.1.18-avas0dtp.mjs";import"./cli-1.1.18-f6m259he.mjs";import{Oba as j,Pba as p,_ea as C,fca as ZJ,wfa as FJ}from"./cli-1.1.18-3y4pftxb.mjs";import"./cli-1.1.18-ndct9t5e.mjs";import"./cli-1.1.18-c9h4ga5f.mjs";import"./cli-1.1.18-psb6qqc1.mjs";import"./cli-1.1.18-7pcfwrhj.mjs";import"./cli-1.1.18-esvp6n4e.mjs";import"./cli-1.1.18-cj8tr93q.mjs";import"./cli-1.1.18-k05shz35.mjs";import"./cli-1.1.18-hbv881pn.mjs";import"./cli-1.1.18-ypcye8ae.mjs";import"./cli-1.1.18-mz10pywc.mjs";import{Ala as f,Hla as YJ}from"./cli-1.1.18-cxg522yt.mjs";import"./cli-1.1.18-3s03nva1.mjs";import"./cli-1.1.18-4c3jqppx.mjs";import"./cli-1.1.18-417wb57s.mjs";import"./cli-1.1.18-p3yf1aq6.mjs";import"./cli-1.1.18-vzrv28w4.mjs";import"./cli-1.1.18-4jy396p1.mjs";import"./cli-1.1.18-553zzrge.mjs";import{gta as R,kta as XJ}from"./cli-1.1.18-hvd9yyb4.mjs";function BJ(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}=l(i()),v;if(J[0]===Symbol.for("react.memo_cache_sentinel"))v=()=>JJ(EJ),J[0]=v;else v=J[0];S(v,Z||K?null:80);let A;if(J[1]!==G)A=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(-d);if(X.key==="down"||X.ctrl&&X.key==="n")X.preventDefault(),T.current?.scrollBy(d)},J[1]=G,J[2]=A;else A=J[2];let h=A,w,L;if(J[3]!==z||J[4]!==Y)w=()=>{let q=g();return async function(){try{let O=await MJ(z),M=await a({question:Y,cacheSafeParams:O});if(!q.signal.aborted)if(M.response)e(M.response);else y("No response received")}catch(O){let M=O;if(!q.signal.aborted)y(f(M)||"Failed to get response")}}(),()=>{q.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),B;if(J[7]===Symbol.for("react.memo_cache_sentinel"))B=H(b,{color:"warning",bold:!0,children:["/btw"," "]}),J[7]=B;else B=J[7];let Q;if(J[8]!==Y)Q=H(W,{children:[B,F(b,{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(b,{color:"error",children:K}):Z?F(m,{children:Z}):H(W,{children:[F($,{frame:P,messageColor:"warning"}),F(b,{color:"warning",children:"Answering..."})]})}),J[10]=K,J[11]=P,J[12]=Z,J[13]=U;else U=J[13];let k;if(J[14]!==D||J[15]!==U)k=F(W,{marginTop:1,marginLeft:2,maxHeight:D,children:U}),J[14]=D,J[15]=U,J[16]=k;else k=J[16];let I;if(J[17]!==K||J[18]!==Z)I=(Z||K)&&F(W,{marginTop:1,children:H(b,{dimColor:!0,children:[j,"/",p," to scroll · Space, Enter, or Escape to dismiss"]})}),J[17]=K,J[18]=Z,J[19]=I;else I=J[19];let E;if(J[20]!==h||J[21]!==Q||J[22]!==k||J[23]!==I)E=H(W,{flexDirection:"column",paddingLeft:2,marginTop:1,tabIndex:0,autoFocus:!0,onKeyDown:h,children:[Q,k,I]}),J[20]=h,J[21]=Q,J[22]=k,J[23]=I,J[24]=E;else E=J[24];return E}function EJ(V){return V+1}function qJ(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(qJ(V.messages)),Y=c();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:u(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 C((G)=>({...G,btwUseCount:G.btwUseCount+1})),F(BJ,{question:z,context:J,onDone:V})}var n,N,wJ=5,LJ=6,d=3;var PJ=XJ(()=>{KJ();HJ();bJ();ZJ();TJ();kJ();DJ();QJ();vJ();NJ();UJ();FJ();YJ();WJ();hJ();AJ();IJ();_();n=R(GJ(),1),N=R(zJ(),1)});PJ();export{aJ as call};
@@ -0,0 +1,3 @@
1
+ import{EX as p,FX as f,GX as a,HX as S}from"./cli-1.1.18-ybfayy4j.mjs";import{_ea as d,wfa as C}from"./cli-1.1.18-3y4pftxb.mjs";import"./cli-1.1.18-ndct9t5e.mjs";import"./cli-1.1.18-c9h4ga5f.mjs";import"./cli-1.1.18-psb6qqc1.mjs";import"./cli-1.1.18-7pcfwrhj.mjs";import"./cli-1.1.18-esvp6n4e.mjs";import{Mja as m,Nja as y,Oja as b}from"./cli-1.1.18-cj8tr93q.mjs";import"./cli-1.1.18-k05shz35.mjs";import"./cli-1.1.18-hbv881pn.mjs";import"./cli-1.1.18-ypcye8ae.mjs";import"./cli-1.1.18-mz10pywc.mjs";import"./cli-1.1.18-cxg522yt.mjs";import"./cli-1.1.18-3s03nva1.mjs";import"./cli-1.1.18-4c3jqppx.mjs";import"./cli-1.1.18-417wb57s.mjs";import"./cli-1.1.18-p3yf1aq6.mjs";import{kta as g}from"./cli-1.1.18-hvd9yyb4.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,21 @@
1
+ import{S2 as h,W2 as zz}from"./cli-1.1.18-mg7jmbh9.mjs";import"./cli-1.1.18-1spz0azv.mjs";import{H6 as m,f7 as e}from"./cli-1.1.18-703emt7y.mjs";import"./cli-1.1.18-ythtynpe.mjs";import"./cli-1.1.18-mrrbn0jj.mjs";import"./cli-1.1.18-af7txyky.mjs";import"./cli-1.1.18-avas0dtp.mjs";import{Ega as s,Hga as v,Kga as r,wga as y}from"./cli-1.1.18-3y4pftxb.mjs";import"./cli-1.1.18-ndct9t5e.mjs";import"./cli-1.1.18-c9h4ga5f.mjs";import"./cli-1.1.18-psb6qqc1.mjs";import"./cli-1.1.18-7pcfwrhj.mjs";import"./cli-1.1.18-esvp6n4e.mjs";import"./cli-1.1.18-cj8tr93q.mjs";import"./cli-1.1.18-k05shz35.mjs";import"./cli-1.1.18-hbv881pn.mjs";import{ala as k,dla as o}from"./cli-1.1.18-ypcye8ae.mjs";import"./cli-1.1.18-mz10pywc.mjs";import"./cli-1.1.18-cxg522yt.mjs";import"./cli-1.1.18-3s03nva1.mjs";import{yra as a,zna as b}from"./cli-1.1.18-4c3jqppx.mjs";import"./cli-1.1.18-417wb57s.mjs";import"./cli-1.1.18-p3yf1aq6.mjs";import"./cli-1.1.18-vzrv28w4.mjs";import"./cli-1.1.18-4jy396p1.mjs";import"./cli-1.1.18-553zzrge.mjs";import{kta as n}from"./cli-1.1.18-hvd9yyb4.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}};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{$2 as P,_2 as L,a3 as $,e3 as Q,f3 as U,g3 as V,h3 as j}from"./cli-1.1.18-mwevzyy2.mjs";import{kta as Z}from"./cli-1.1.18-hvd9yyb4.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{bi as a,ci as b}from"./cli-1.1.18-dvyh5qzn.mjs";import"./cli-1.1.18-jgwwkx62.mjs";import"./cli-1.1.18-0z5526z3.mjs";import"./cli-1.1.18-xfb4pete.mjs";import"./cli-1.1.18-pzeg2p3k.mjs";import"./cli-1.1.18-2qvvz2tv.mjs";import"./cli-1.1.18-cphcr3xr.mjs";import"./cli-1.1.18-k1pkc44n.mjs";import"./cli-1.1.18-hphxdvpd.mjs";import"./cli-1.1.18-ta6r8qry.mjs";import"./cli-1.1.18-heh8xz6x.mjs";import"./cli-1.1.18-rnqtkprk.mjs";import"./cli-1.1.18-cy0ypdkd.mjs";import"./cli-1.1.18-f7jag2rr.mjs";import"./cli-1.1.18-v75xqnbv.mjs";import"./cli-1.1.18-5s8f8gd5.mjs";import"./cli-1.1.18-ccbh77pf.mjs";import"./cli-1.1.18-zd969gzb.mjs";import"./cli-1.1.18-27b82jjj.mjs";import"./cli-1.1.18-pbdm30bs.mjs";import"./cli-1.1.18-ybfayy4j.mjs";import"./cli-1.1.18-fst0kx9m.mjs";import"./cli-1.1.18-1c8pr80a.mjs";import"./cli-1.1.18-0h118vrj.mjs";import"./cli-1.1.18-t526ry94.mjs";import"./cli-1.1.18-2w9274tq.mjs";import"./cli-1.1.18-x7jyxff1.mjs";import"./cli-1.1.18-ecds9fxm.mjs";import"./cli-1.1.18-ztyf20j1.mjs";import"./cli-1.1.18-12tzkcxz.mjs";import"./cli-1.1.18-mg7jmbh9.mjs";import"./cli-1.1.18-mwevzyy2.mjs";import"./cli-1.1.18-a888prq4.mjs";import"./cli-1.1.18-1t3rb5a8.mjs";import"./cli-1.1.18-8thyc5yy.mjs";import"./cli-1.1.18-npdweafk.mjs";import"./cli-1.1.18-f2j32mha.mjs";import"./cli-1.1.18-cjkn7t4k.mjs";import"./cli-1.1.18-0aakxjsk.mjs";import"./cli-1.1.18-948h21gh.mjs";import"./cli-1.1.18-ddreb78e.mjs";import"./cli-1.1.18-1spz0azv.mjs";import"./cli-1.1.18-703emt7y.mjs";import"./cli-1.1.18-ythtynpe.mjs";import"./cli-1.1.18-mrrbn0jj.mjs";import"./cli-1.1.18-af7txyky.mjs";import"./cli-1.1.18-7nsrr2k0.mjs";import"./cli-1.1.18-avas0dtp.mjs";import"./cli-1.1.18-f6m259he.mjs";import"./cli-1.1.18-3y4pftxb.mjs";import"./cli-1.1.18-ndct9t5e.mjs";import"./cli-1.1.18-c9h4ga5f.mjs";import"./cli-1.1.18-psb6qqc1.mjs";import"./cli-1.1.18-7pcfwrhj.mjs";import"./cli-1.1.18-esvp6n4e.mjs";import"./cli-1.1.18-cj8tr93q.mjs";import"./cli-1.1.18-k05shz35.mjs";import"./cli-1.1.18-hbv881pn.mjs";import"./cli-1.1.18-ypcye8ae.mjs";import"./cli-1.1.18-mz10pywc.mjs";import"./cli-1.1.18-cxg522yt.mjs";import"./cli-1.1.18-3s03nva1.mjs";import"./cli-1.1.18-4c3jqppx.mjs";import"./cli-1.1.18-417wb57s.mjs";import"./cli-1.1.18-p3yf1aq6.mjs";import"./cli-1.1.18-vzrv28w4.mjs";import"./cli-1.1.18-4jy396p1.mjs";import"./cli-1.1.18-553zzrge.mjs";import"./cli-1.1.18-hvd9yyb4.mjs";b();export{a as clearSessionCaches};
@@ -0,0 +1 @@
1
+ import{Bca as A,N$ as V,O$ as W,P$ as J,Wga as X,Xaa as k,aba as N,cha as H,yca as x}from"./cli-1.1.18-3y4pftxb.mjs";import"./cli-1.1.18-ndct9t5e.mjs";import"./cli-1.1.18-c9h4ga5f.mjs";import"./cli-1.1.18-psb6qqc1.mjs";import"./cli-1.1.18-7pcfwrhj.mjs";import"./cli-1.1.18-esvp6n4e.mjs";import"./cli-1.1.18-cj8tr93q.mjs";import"./cli-1.1.18-k05shz35.mjs";import"./cli-1.1.18-hbv881pn.mjs";import"./cli-1.1.18-ypcye8ae.mjs";import"./cli-1.1.18-mz10pywc.mjs";import{Bla as b,Hla as y}from"./cli-1.1.18-cxg522yt.mjs";import"./cli-1.1.18-3s03nva1.mjs";import"./cli-1.1.18-4c3jqppx.mjs";import"./cli-1.1.18-417wb57s.mjs";import"./cli-1.1.18-p3yf1aq6.mjs";import"./cli-1.1.18-hvd9yyb4.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 v(){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{v as readClaudeDesktopMcpServers,F as getClaudeDesktopConfigPath};
@@ -0,0 +1 @@
1
+ import{$T as l,QT as a,RT as b,ST as c,TT as d,UT as e,VT as f,WT as g,XT as h,YT as i,ZT as j,_T as k,aU as m,bU as n,cU as o,dU as p,eU as q,fU as r}from"./cli-1.1.18-xfb4pete.mjs";import"./cli-1.1.18-pzeg2p3k.mjs";import"./cli-1.1.18-2qvvz2tv.mjs";import"./cli-1.1.18-cphcr3xr.mjs";import"./cli-1.1.18-k1pkc44n.mjs";import"./cli-1.1.18-hphxdvpd.mjs";import"./cli-1.1.18-ta6r8qry.mjs";import"./cli-1.1.18-heh8xz6x.mjs";import"./cli-1.1.18-rnqtkprk.mjs";import"./cli-1.1.18-cy0ypdkd.mjs";import"./cli-1.1.18-f7jag2rr.mjs";import"./cli-1.1.18-v75xqnbv.mjs";import"./cli-1.1.18-5s8f8gd5.mjs";import"./cli-1.1.18-ccbh77pf.mjs";import"./cli-1.1.18-zd969gzb.mjs";import"./cli-1.1.18-27b82jjj.mjs";import"./cli-1.1.18-pbdm30bs.mjs";import"./cli-1.1.18-ybfayy4j.mjs";import"./cli-1.1.18-fst0kx9m.mjs";import"./cli-1.1.18-1c8pr80a.mjs";import"./cli-1.1.18-0h118vrj.mjs";import"./cli-1.1.18-t526ry94.mjs";import"./cli-1.1.18-2w9274tq.mjs";import"./cli-1.1.18-x7jyxff1.mjs";import"./cli-1.1.18-ecds9fxm.mjs";import"./cli-1.1.18-ztyf20j1.mjs";import"./cli-1.1.18-12tzkcxz.mjs";import"./cli-1.1.18-mg7jmbh9.mjs";import"./cli-1.1.18-mwevzyy2.mjs";import"./cli-1.1.18-a888prq4.mjs";import"./cli-1.1.18-1t3rb5a8.mjs";import"./cli-1.1.18-8thyc5yy.mjs";import"./cli-1.1.18-npdweafk.mjs";import"./cli-1.1.18-f2j32mha.mjs";import"./cli-1.1.18-cjkn7t4k.mjs";import"./cli-1.1.18-0aakxjsk.mjs";import"./cli-1.1.18-948h21gh.mjs";import"./cli-1.1.18-ddreb78e.mjs";import"./cli-1.1.18-1spz0azv.mjs";import"./cli-1.1.18-703emt7y.mjs";import"./cli-1.1.18-ythtynpe.mjs";import"./cli-1.1.18-mrrbn0jj.mjs";import"./cli-1.1.18-af7txyky.mjs";import"./cli-1.1.18-7nsrr2k0.mjs";import"./cli-1.1.18-avas0dtp.mjs";import"./cli-1.1.18-f6m259he.mjs";import"./cli-1.1.18-3y4pftxb.mjs";import"./cli-1.1.18-ndct9t5e.mjs";import"./cli-1.1.18-c9h4ga5f.mjs";import"./cli-1.1.18-psb6qqc1.mjs";import"./cli-1.1.18-7pcfwrhj.mjs";import"./cli-1.1.18-esvp6n4e.mjs";import"./cli-1.1.18-cj8tr93q.mjs";import"./cli-1.1.18-k05shz35.mjs";import"./cli-1.1.18-hbv881pn.mjs";import"./cli-1.1.18-ypcye8ae.mjs";import"./cli-1.1.18-mz10pywc.mjs";import"./cli-1.1.18-cxg522yt.mjs";import"./cli-1.1.18-3s03nva1.mjs";import"./cli-1.1.18-4c3jqppx.mjs";import"./cli-1.1.18-417wb57s.mjs";import"./cli-1.1.18-p3yf1aq6.mjs";import"./cli-1.1.18-vzrv28w4.mjs";import"./cli-1.1.18-4jy396p1.mjs";import"./cli-1.1.18-553zzrge.mjs";import"./cli-1.1.18-hvd9yyb4.mjs";r();export{p as shouldShowClaudeMdExternalIncludesWarning,f as resetGetMemoryFilesCache,b as processMemoryFile,c as processMdRules,m as processConditionedMdRules,q as isMemoryFilePath,o as hasExternalClaudeMdIncludes,k as getMemoryFilesForNestedDirectory,d as getMemoryFiles,j as getManagedAndUserConditionalRules,g as getLargeMemoryFiles,n as getExternalClaudeMdIncludes,l as getConditionalRulesForCwdLevelDirectory,i as getClaudeMds,h as filterInjectedMemoryFiles,e as clearMemoryFileCaches,a as MAX_MEMORY_CHARACTER_COUNT};
@@ -0,0 +1 @@
1
+ import{$h as b,ai as h}from"./cli-1.1.18-3pn5knk8.mjs";import"./cli-1.1.18-dvyh5qzn.mjs";import"./cli-1.1.18-b4azpwk0.mjs";import"./cli-1.1.18-jgwwkx62.mjs";import"./cli-1.1.18-0z5526z3.mjs";import"./cli-1.1.18-xfb4pete.mjs";import"./cli-1.1.18-pzeg2p3k.mjs";import"./cli-1.1.18-2qvvz2tv.mjs";import"./cli-1.1.18-cphcr3xr.mjs";import"./cli-1.1.18-k1pkc44n.mjs";import"./cli-1.1.18-hphxdvpd.mjs";import"./cli-1.1.18-ta6r8qry.mjs";import"./cli-1.1.18-heh8xz6x.mjs";import"./cli-1.1.18-rnqtkprk.mjs";import"./cli-1.1.18-cy0ypdkd.mjs";import"./cli-1.1.18-f7jag2rr.mjs";import"./cli-1.1.18-v75xqnbv.mjs";import"./cli-1.1.18-5s8f8gd5.mjs";import"./cli-1.1.18-ccbh77pf.mjs";import"./cli-1.1.18-zd969gzb.mjs";import"./cli-1.1.18-27b82jjj.mjs";import"./cli-1.1.18-pbdm30bs.mjs";import"./cli-1.1.18-ybfayy4j.mjs";import"./cli-1.1.18-fst0kx9m.mjs";import"./cli-1.1.18-1c8pr80a.mjs";import"./cli-1.1.18-0h118vrj.mjs";import"./cli-1.1.18-t526ry94.mjs";import"./cli-1.1.18-2w9274tq.mjs";import"./cli-1.1.18-x7jyxff1.mjs";import"./cli-1.1.18-ecds9fxm.mjs";import"./cli-1.1.18-ztyf20j1.mjs";import"./cli-1.1.18-12tzkcxz.mjs";import"./cli-1.1.18-mg7jmbh9.mjs";import"./cli-1.1.18-mwevzyy2.mjs";import"./cli-1.1.18-a888prq4.mjs";import"./cli-1.1.18-1t3rb5a8.mjs";import"./cli-1.1.18-8thyc5yy.mjs";import"./cli-1.1.18-npdweafk.mjs";import"./cli-1.1.18-f2j32mha.mjs";import"./cli-1.1.18-cjkn7t4k.mjs";import"./cli-1.1.18-0aakxjsk.mjs";import"./cli-1.1.18-948h21gh.mjs";import"./cli-1.1.18-ddreb78e.mjs";import"./cli-1.1.18-1spz0azv.mjs";import"./cli-1.1.18-703emt7y.mjs";import"./cli-1.1.18-ythtynpe.mjs";import"./cli-1.1.18-mrrbn0jj.mjs";import"./cli-1.1.18-af7txyky.mjs";import"./cli-1.1.18-7nsrr2k0.mjs";import"./cli-1.1.18-avas0dtp.mjs";import"./cli-1.1.18-f6m259he.mjs";import"./cli-1.1.18-3y4pftxb.mjs";import"./cli-1.1.18-ndct9t5e.mjs";import"./cli-1.1.18-c9h4ga5f.mjs";import"./cli-1.1.18-psb6qqc1.mjs";import"./cli-1.1.18-7pcfwrhj.mjs";import"./cli-1.1.18-esvp6n4e.mjs";import"./cli-1.1.18-cj8tr93q.mjs";import"./cli-1.1.18-k05shz35.mjs";import"./cli-1.1.18-hbv881pn.mjs";import"./cli-1.1.18-ypcye8ae.mjs";import"./cli-1.1.18-mz10pywc.mjs";import"./cli-1.1.18-cxg522yt.mjs";import"./cli-1.1.18-3s03nva1.mjs";import"./cli-1.1.18-4c3jqppx.mjs";import"./cli-1.1.18-417wb57s.mjs";import"./cli-1.1.18-p3yf1aq6.mjs";import"./cli-1.1.18-vzrv28w4.mjs";import"./cli-1.1.18-4jy396p1.mjs";import"./cli-1.1.18-553zzrge.mjs";import{kta as g}from"./cli-1.1.18-hvd9yyb4.mjs";var u=async(p,f)=>{return await b(f),{type:"text",value:""}};var k=g(()=>{h()});k();export{u as call};
@@ -0,0 +1 @@
1
+ import{u2 as a,v2 as b,w2 as c}from"./cli-1.1.18-ecds9fxm.mjs";import"./cli-1.1.18-hvd9yyb4.mjs";c();export{a as getClearTerminalSequence,b as clearTerminal};
@@ -0,0 +1,2 @@
1
+ import{Of as EG,Pf as iG,Vf as rG}from"./cli-1.1.18-8fpwak2g.mjs";import{$M as l,$N as c,$x as a,FN as _G,Fn as fG,GN as oG,Gs as vG,JF as KG,KF as mG,QM as LG,RM as WG,SN as $G,TM as pG,VM as BG,VN as sG,WM as DG,ZN as f,_N as s,aO as v,ay as jG,bO as i,by as HG,cy as dG,dN as qG,dt as uG,eO as u,fN as y,gN as o,hN as aG,iO as cG,jN as kG,oN as bG,qn as YG,rn as FG,vn as VG,xN as lG}from"./cli-1.1.18-xfb4pete.mjs";import{DZ as OJ}from"./cli-1.1.18-2w9274tq.mjs";import{d4 as wG,f4 as PG}from"./cli-1.1.18-f2j32mha.mjs";import{g4 as zG}from"./cli-1.1.18-cjkn7t4k.mjs";import{$ga as b,Vca as ZG,_ca as CG,_ga as R,cha as gG}from"./cli-1.1.18-3y4pftxb.mjs";import{mia as NG}from"./cli-1.1.18-7pcfwrhj.mjs";import{Zja as A,aka as MG}from"./cli-1.1.18-hbv881pn.mjs";import{Kka as yG,ala as XG,dla as SG}from"./cli-1.1.18-ypcye8ae.mjs";import{Ala as h,Hla as TG}from"./cli-1.1.18-cxg522yt.mjs";import{yra as QG,zna as OG}from"./cli-1.1.18-4c3jqppx.mjs";import{gta as r,kta as p}from"./cli-1.1.18-hvd9yyb4.mjs";var e=p(()=>{yG();NG()});function GG(X){let Z="plugin"in X?X.plugin:"no-plugin";return`${X.type}:${X.source}:${Z}`}function JG(X,Z){if(Z.length===0)return;X((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(X,Z,k,U){let _=Z==="disabled"?U??[]:U;if(_===void 0)return X;let j=new Map;for(let B of _)if(B.name!==void 0)j.set(B.name,B);let V=[],P=new Set;for(let B of X){if(!B.name?.startsWith(k)){V.push(B);continue}let w=j.get(B.name);if(w)V.push(w),P.add(B.name)}for(let B of _)if(B.name===void 0||!P.has(B.name))V.push(B);return V}function IG(X,Z=!1){let k=HG(),U=a((G)=>G.authVersion),_=a((G)=>G.mcp.pluginReconnectKey),j=jG(),V=q.useRef(new Map),P=q.useRef(new Set),B=q.useRef(null);q.useEffect(()=>{},[j]);let{addNotification:w}=KG(),RG=16,d=q.useRef([]),N=q.useRef(null),C=q.useCallback(()=>{N.current=null;let G=d.current;if(G.length===0)return;d.current=[],j((z)=>{let Y=z.mcp;for(let W of G){let{tools:Q,commands:H,resources:D,...J}=W,K=J.type==="disabled"||J.type==="failed"?H??[]:H,O=J.type==="disabled"||J.type==="failed"?D??[]:D,F=ZG(J.name),I=Y.clients.findIndex((M)=>M.name===J.name)===-1?[...Y.clients,J]:Y.clients.map((M)=>M.name===J.name?J:M),g=GJ(Y.tools,J.type,F,Q),x=K===void 0?Y.commands:[..._G(Y.commands,(M)=>kG(M,J.name)),...K],m=O===void 0?Y.resources:{...Y.resources,...O.length>0?{[J.name]:O}:EG(Y.resources,J.name)};Y={...Y,clients:I,tools:g,commands:x,resources:m}}return{...z,mcp:Y}})},[j]),$=q.useCallback((G)=>{if(d.current.push(G),N.current===null)N.current=setTimeout(C,RG)},[C]),E=q.useCallback(({client:G,tools:z,commands:Y,resources:W})=>{switch($({...G,tools:z,commands:Y,resources:W}),G.type){case"connected":{if($G(G.client,G.name,j),G.client.onclose=()=>{let Q=G.config.type??"stdio";if(u(G.name,G.config).catch(()=>{XG(`Failed to invalidate the server cache: ${G.name}`)}),y(G.name)){b(G.name,"Server is disabled, skipping automatic reconnection");return}if(Q!=="stdio"&&Q!=="sdk"){let H=JJ(Q);b(G.name,`${H} transport closed/disconnected, attempting automatic reconnection`);let D=V.current.get(G.name);if(D)clearTimeout(D),V.current.delete(G.name);(async()=>{for(let K=1;K<=T;K++){if(y(G.name)){b(G.name,"Server disabled during reconnection, stopping retry"),V.current.delete(G.name);return}$({...G,type:"pending",reconnectAttempt:K,maxReconnectAttempts:T});let O=Date.now();try{let L=await v(G.name,G.config),I=Date.now()-O;if(L.client.type==="connected"){b(G.name,`${H} reconnection successful after ${I}ms (attempt ${K})`),V.current.delete(G.name),E(L);return}if(b(G.name,`${H} reconnection attempt ${K} completed with status: ${L.client.type}`),K===T){b(G.name,`Max reconnection attempts (${T}) reached, giving up`),V.current.delete(G.name),E(L);return}}catch(L){let I=Date.now()-O;if(R(G.name,`${H} reconnection attempt ${K} failed after ${I}ms: ${L}`),K===T){b(G.name,`Max reconnection attempts (${T}) reached, giving up`),V.current.delete(G.name),$({...G,type:"failed"});return}}let F=Math.min(tG*Math.pow(2,K-1),eG);b(G.name,`Scheduling reconnection attempt ${K+1} in ${F}ms`),await new Promise((L)=>{let I=setTimeout(L,F);V.current.set(G.name,I)})}})()}else $({...G,type:"failed"})},!1)switch(Q.action){case"register":case"skip":}if(G.capabilities?.tools?.listChanged)G.client.setNotificationHandler(VG,async()=>{b(G.name,"Received tools/list_changed notification, refreshing tools");try{let Q=f.cache.get(G.name);f.cache.delete(G.name);let H=await f(G),D=H.length;if(Q)Q.then((J)=>{A("",{type:"tools",previousCount:J.length,newCount:D})},()=>{A("",{type:"tools",newCount:D})});else A("",{type:"tools",newCount:D});$({...G,tools:H})}catch(Q){R(G.name,`Failed to refresh tools after list_changed notification: ${h(Q)}`)}});if(G.capabilities?.prompts?.listChanged)G.client.setNotificationHandler(FG,async()=>{b(G.name,"Received prompts/list_changed notification, refreshing prompts"),A("",{type:"prompts"});try{c.cache.delete(G.name);let[Q,H]=await Promise.all([c(G),Promise.resolve([])]);$({...G,commands:[...Q,...H]}),nG?.()}catch(Q){R(G.name,`Failed to refresh prompts after list_changed notification: ${h(Q)}`)}});if(G.capabilities?.resources?.listChanged)G.client.setNotificationHandler(YG,async()=>{b(G.name,"Received resources/list_changed notification, refreshing resources"),A("",{type:"resources"});try{s.cache.delete(G.name);{let Q=await s(G);$({...G,resources:Q})}}catch(Q){R(G.name,`Failed to refresh resources after list_changed notification: ${h(Q)}`)}});break}case"needs-auth":case"failed":case"pending":case"disabled":break}},[$]),t=OG();q.useEffect(()=>{async function G(){let{servers:z,errors:Y}=Z?{servers:{},errors:[]}:await l(X),W={...z,...X};JG(j,Y),j((Q)=>{let{stale:H,...D}=bG(Q.mcp,W);for(let O of H){let F=V.current.get(O.name);if(F)clearTimeout(F),V.current.delete(O.name);if(O.type==="connected")O.client.onclose=void 0,u(O.name,O.config).catch(()=>{})}let J=new Set(D.clients.map((O)=>O.name)),K=Object.entries(W).filter(([O])=>!J.has(O)).map(([O,F])=>({name:O,type:y(O)?"disabled":"pending",config:F}));if(K.length===0&&H.length===0)return Q;return{...Q,mcp:{...Q.mcp,...D,clients:[...D.clients,...K]}}})}G().catch((z)=>{R("useManageMCPConnections",`Failed to initialize servers as pending: ${h(z)}`)})},[Z,X,j,t,_]),q.useEffect(()=>{let G=!1;async function z(){let Y;if(Z||qG())Y=Promise.resolve({});else WG(),Y=LG();let{servers:W,errors:Q}=Z?{servers:{},errors:[]}:await l(X,Y);if(G)return;JG(j,Q);let H={...W,...X},D=Object.fromEntries(Object.entries(H).filter(([F])=>!y(F)));i(E,D).catch((F)=>{R("useManageMcpConnections",`Failed to get MCP resources: ${h(F)}`)});let J={};if(!Z){if(J=DG(await Y).allowed,G)return;if(Object.keys(J).length>0){let{servers:F}=BG(J,H);J=F}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 F=Object.fromEntries(Object.entries(J).filter(([L])=>!y(L)));i(E,F).catch((L)=>{R("useManageMcpConnections",`Failed to get claude.ai MCP resources: ${h(L)}`)})}}let K={...H,...J},O={enterprise:0,global:0,project:0,user:0,plugin:0,claudeai:0};for(let F of Object.values(K))if(F.scope==="enterprise")O.enterprise++;else if(F.scope==="user")O.global++;else if(F.scope==="project")O.project++;else if(F.scope==="local")O.user++;else if(F.scope==="dynamic")O.plugin++;else if(F.scope==="claudeai")O.claudeai++;A("",{...O})}return z(),()=>{G=!0}},[Z,X,E,j,U,t,_]),q.useEffect(()=>{let G=V.current;return()=>{for(let z of G.values())clearTimeout(z);if(G.clear(),N.current!==null)clearTimeout(N.current),N.current=null,C()}},[C]);let AG=q.useCallback(async(G)=>{let z=k.getState().mcp.clients.find((Q)=>Q.name===G);if(!z)throw Error(`MCP server ${G} not found`);let Y=V.current.get(G);if(Y)clearTimeout(Y),V.current.delete(G);let W=await v(G,z.config);return E(W),W},[k,E]),hG=q.useCallback(async(G)=>{let z=k.getState().mcp.clients.find((W)=>W.name===G);if(!z)throw Error(`MCP server ${G} not found`);if(z.type!=="disabled"){let W=V.current.get(G);if(W)clearTimeout(W),V.current.delete(G);if(o(G,!1),z.type==="connected")await u(G,z.config);$({name:G,type:"disabled",config:z.config})}else{o(G,!0),$({name:G,type:"pending",config:z.config});let W=await v(G,z.config);E(W)}},[k,$,E]);return{reconnectMcpServer:AG,toggleMcpServer:hG}}function JJ(X){switch(X){case"http":return"HTTP";case"ws":case"ws-ide":return"WebSocket";default:return"SSE"}}var q,nG=null,T=5,tG=1000,eG=30000;var UG=p(()=>{QG();cG();fG();iG();oG();MG();aG();SG();QG();mG();dG();TG();gG();uG();rG();e();pG();sG();CG();lG();vG();q=r(zG(),1)});function lJ(){let X=S.useContext(n);if(!X)throw Error("useMcpReconnect must be used within MCPConnectionManager");return X.reconnectMcpServer}function oJ(){let X=S.useContext(n);if(!X)throw Error("useMcpToggleEnabled must be used within MCPConnectionManager");return X.toggleMcpServer}function sJ(X){let Z=xG.c(6),{children:k,dynamicMcpConfig:U,isStrictMcpConfig:_}=X,{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 B=P,w;if(Z[3]!==k||Z[4]!==B)w=wG(n.Provider,{value:B,children:k}),Z[3]=k,Z[4]=B,Z[5]=w;else w=Z[5];return w}var xG,S,n;var QJ=p(()=>{UG();PG();xG=r(OJ(),1),S=r(zG(),1),n=S.createContext(null)});
2
+ export{e as Jf,lJ as Kf,oJ as Lf,sJ as Mf,QJ as Nf};
@@ -0,0 +1,25 @@
1
+ import{$J as zq,BR as yq,IK as Pq,PK as Yq,Qx as e,RK as Uq,Rx as Hq,UJ as S,VB as qq,VJ as R,Vp as a,WB as Nq,WJ as Xq,Xp as Kq,ZJ as p,_J as k,aK as Bq,bK as I,bv as s,cK as b,el as r,gl as vq,hv as t,jK as Gq,kK as Jq,nv as Wq,oK as hq,rK as Qq,sK as Oq,uK as Vq,vR as Zq}from"./cli-1.1.18-xfb4pete.mjs";import{Wga as w,cha as Fq}from"./cli-1.1.18-3y4pftxb.mjs";import{jja as o,lja as Lq}from"./cli-1.1.18-cj8tr93q.mjs";import{Hla as jq,tla as y}from"./cli-1.1.18-cxg522yt.mjs";import{kta as M}from"./cli-1.1.18-hvd9yyb4.mjs";function x(B,z){let G=m[z]??1,Y=B!==void 0?m[B]:void 0;if(Y===void 0)return z;return Y<=G?B:z}var m;var g=M(()=>{m={plan:0,default:1,acceptEdits:2,bypassPermissions:3}});function C(B,z){if(B.length<=z)return B;return`${B.slice(0,z)}
2
+ …[truncated ${B.length-z} chars]`}function u(B,z,G,Y){let V=[];if(V.push(`You are a worker agent in the "${B.name}" workflow, phase "${Y.name}".`),B.instructions.trim())V.push(`Workflow instructions:
3
+ ${B.instructions.trim()}`);if(V.push(`Task:
4
+ ${z}`),G.trim())V.push(`Work so far (accumulated artifact from earlier phases):
5
+ ${C(G.trim(),$q)}`);return V.push("Do your part of this phase and report your findings/output. Another agent (the orchestrator) will synthesize the phase and decide what happens next — you do not decide the flow."),V.join(`
6
+
7
+ `)}function c(B,z){let G=[];if(G.push(`You are the orchestrator (main) of the "${z.name}" workflow. You control the flow.`),z.instructions.trim())G.push(`Workflow instructions:
8
+ ${z.instructions.trim()}`);G.push(`Task:
9
+ ${B.task}`);let Y=z.steps.findIndex((Q)=>Q.name===B.currentStep),V=z.steps.map((Q,J)=>{let j=J<Y?"[done]":J===Y?"[current]":"[pending]",W=I(Q)?" (terminal)":"";return` ${J+1}. ${Q.name} ${j}${W}`}).join(`
10
+ `);if(G.push(`Phases:
11
+ ${V}`),B.history.length>0){let Q=B.history.map((J)=>{let j=J.agents.map((q)=>{let L=q.failed?" (FAILED)":"";return` • ${q.label}${L}:
12
+ ${C(q.output,f).split(`
13
+ `).map((H)=>` ${H}`).join(`
14
+ `)}`}).join(`
15
+ `),W=J.decision?` decision: ${J.decision.decision}${J.decision.target?` → ${J.decision.target}`:""} — ${J.decision.notes}`:" decision: (pending — this is the phase you are deciding now)";return` Phase "${J.step}":
16
+ ${j}
17
+ ${J.synthesis?` synthesis: ${C(J.synthesis,f)}
18
+ `:""}${W}`}).join(`
19
+
20
+ `);G.push(`History (all phases so far):
21
+ ${Q}`)}let $=z.steps[Y]?.handbackTo??[];return G.push($.length>0?`From the current phase you may hand back to: ${$.join(", ")}.`:"The current phase has no handback targets; you may only advance or refine."),G.push("Synthesize the current phase's worker outputs into an updated artifact (your final text), then call the StructuredOutput tool with your decision: advance (next phase), refine (re-run this phase), or handback (return to an allowed earlier phase). Include a short `notes` explaining why."),G.join(`
22
+
23
+ `)}var f=4000,$q=6000;var l=M(()=>{b()});function d(B,z,G){let Y=G.steps,V=Y.findIndex((j)=>j.name===B.currentStep),Z={...B.refineCounts},$=B.transitions+1,Q=B.currentStep,J="running";if(z.decision==="advance"){let j=Y[V+1];if(I(j)){if(J="done",j)Q=j.name}else Q=j.name}else if(z.decision==="refine"){if(Z[Q]=(Z[Q]??0)+1,Z[Q]>k)J="stalled"}else{let j=Y[V]?.handbackTo??[];if(!z.target||!j.includes(z.target))J="stalled";else if(Z[z.target]=(Z[z.target]??0)+1,Z[z.target]>k)J="stalled";else Q=z.target}if(J==="running"&&$>=p)J="stalled";return{...B,currentStep:Q,status:J,refineCounts:Z,transitions:$,updatedAt:Date.now()}}var i=M(()=>{b()});import Dq from"os";function Iq(){return Math.max(1,Math.min(8,Dq.cpus().length-1))}function wq(B){let z="",G=0;for(let V=B.length-1;V>=0;V--){let Z=B[V];if(Z.type!=="assistant"||!Z.message)continue;if(!z){let $=(Z.message.content??[]).filter((Q)=>Q.type==="text"&&Q.text);if($.length>0)z=$.map((Q)=>Q.text??"").join(`
24
+ `)}if(G===0&&Z.message.usage)G=Zq(Z.message.usage);if(z&&G)break}let Y=e(B);return{text:z,tokens:G,tools:Y}}async function n(B){let{label:z,agentDef:G,promptText:Y,toolUseContext:V,canUseTool:Z,extraTools:$,runId:Q}=B,J=Date.now(),j=V.getAppState(),W=j.toolPermissionContext.mode,q={...j.toolPermissionContext,mode:x(G.permissionMode,W)},L=Yq(q,j.mcp.tools);if($&&$.length>0)L=[...L,...$];let H=G.model??String(V.options.mainLoopModel??""),F=[],N,P=!1;try{let K=qq({agentDefinition:G,promptMessages:[Vq({content:Y})],toolUseContext:V,canUseTool:Z,isAsync:!1,querySource:a(G.agentType,s(G)),availableTools:L,transcriptSubdir:`workflows/${Q}`,description:`${z} (workflow)`,override:{abortController:B.abortController}});for await(let h of K)if(F.push(h),h.type==="attachment"&&h.attachment?.type==="structured_output")N=h.attachment.data}catch(K){if(y(K))throw K;w(K),P=!0}let{text:E,tokens:_,tools:X}=wq(F);return{run:{label:z,model:H,tokens:_,tools:X,ms:Date.now()-J,output:P?"":E,failed:P},structuredOutput:N}}async function tq(B){let{def:z,task:G,toolUseContext:Y,canUseTool:V,onProgress:Z,signal:$}=B,{allAgents:Q}=await t(o()),J=new Map(Q.map((H)=>[H.agentType,H]));J.set(S,R);let j=J.get(z.main??S)??R,W=new AbortController;if($)if($.aborted)W.abort();else $.addEventListener("abort",()=>W.abort(),{once:!0});let q=await Gq({workflow:z.name,description:z.description,task:G,firstStep:z.steps[0].name});Z?.(q);let L=async()=>{await Jq(q),Z?.(q)};while(q.status==="running"){if($?.aborted){q={...q,status:"cancelled",updatedAt:Date.now()},await L();break}let H=z.steps.findIndex((v)=>v.name===q.currentStep),F=z.steps[H];if(I(F)){q={...q,status:"done",updatedAt:Date.now()},await L();break}q={...q,agentsInPhase:F.agents.length,agentsDone:0,updatedAt:Date.now()},await L();let N;try{N=(await Qq(F.agents,async(O)=>{let T={run:{label:`${F.name}:${O}`,model:"",tokens:0,tools:0,ms:0,output:"",failed:!0}},A;try{let D=J.get(O);A=D?await n({label:`${F.name}:${O}`,agentDef:D,promptText:u(z,G,q.artifact,F),toolUseContext:Y,canUseTool:V,runId:q.runId,abortController:W}):T}catch(D){if(y(D))throw D;w(D),A=T}return q={...q,agentsDone:(q.agentsDone??0)+1,updatedAt:Date.now()},await L(),A},{concurrency:Iq()})).map((O)=>O.run)}catch(v){if(y(v)){q={...q,status:"cancelled",updatedAt:Date.now()},await L();break}throw v}let P={step:F.name,stepIndex:H,agents:N,synthesis:"",decision:null,at:Date.now()};if(q={...q,history:[...q.history,P],totalTokens:q.totalTokens+N.reduce((v,O)=>v+O.tokens,0),updatedAt:Date.now()},await L(),F.agents.length>0&&N.every((v)=>v.failed)){w(Error(`workflow phase "${F.name}": all ${N.length} worker(s) failed`)),q={...q,status:"failed",updatedAt:Date.now()},await L();break}if($?.aborted){q={...q,status:"cancelled",updatedAt:Date.now()},await L();break}let E=r(Bq(F));if(!("tool"in E)){w(Error(`workflow decision schema build failed: ${E.error}`)),q={...q,status:"failed",updatedAt:Date.now()},await L();break}let _=[E.tool],X;try{X=await n({label:"main",agentDef:j,promptText:c(q,z),toolUseContext:Y,canUseTool:V,extraTools:_,runId:q.runId,abortController:W})}catch(v){if(y(v)){q={...q,status:"cancelled",updatedAt:Date.now()},await L();break}throw v}let K=zq.safeParse(X.structuredOutput),h=[...q.history];if(h[h.length-1]={...P,synthesis:X.run.output,decision:K.success?K.data:null,agents:[...N,X.run]},q={...q,history:h,artifact:X.run.output.trim()?X.run.output:q.artifact,totalTokens:q.totalTokens+X.run.tokens,updatedAt:Date.now()},!K.success){w(Error(`workflow main produced no valid decision: ${K.error?.message??"no decision"}`)),q={...q,status:"failed",updatedAt:Date.now()},await L();break}let U=d(q,K.data,z);q={...q,currentStep:U.currentStep,status:U.status,refineCounts:U.refineCounts,transitions:U.transitions,updatedAt:U.updatedAt},await L()}return q}var Eq=M(()=>{Oq();Uq();Wq();Hq();Nq();vq();Lq();jq();Fq();Pq();Kq();yq();Xq();g();l();hq();i();b()});
25
+ export{tq as Di,Eq as Ei};
@@ -0,0 +1,2 @@
1
+ import{r4 as V,s4 as q}from"./cli-1.1.18-948h21gh.mjs";import{B8 as _,Q7 as H,Q8 as D,R7 as P,q8 as W,s8 as x,v8 as N}from"./cli-1.1.18-703emt7y.mjs";import{bfa as X,wfa as K}from"./cli-1.1.18-3y4pftxb.mjs";import{Sja as Z,Yja as U}from"./cli-1.1.18-k05shz35.mjs";import{Nla as G,Vla as I}from"./cli-1.1.18-3s03nva1.mjs";import{Ksa as j,ssa as $}from"./cli-1.1.18-vzrv28w4.mjs";import{kta as Y}from"./cli-1.1.18-hvd9yyb4.mjs";function C(){let z=process.env.CLAUDE_AGENT_SDK_VERSION?`, agent-sdk/${process.env.CLAUDE_AGENT_SDK_VERSION}`:"",J=process.env.CLAUDE_AGENT_SDK_CLIENT_APP?`, client-app/${process.env.CLAUDE_AGENT_SDK_CLIENT_APP}`:"";return`claude-cli/99.0.0 (${process.env.CLAUDE_CODE_ENTRYPOINT??"cli"}${z}${J})`}function v(){let z=[];if(process.env.CLAUDE_CODE_ENTRYPOINT)z.push(process.env.CLAUDE_CODE_ENTRYPOINT);if(process.env.CLAUDE_AGENT_SDK_VERSION)z.push(`agent-sdk/${process.env.CLAUDE_AGENT_SDK_VERSION}`);if(process.env.CLAUDE_AGENT_SDK_CLIENT_APP)z.push(`client-app/${process.env.CLAUDE_AGENT_SDK_CLIENT_APP}`);return`claude-code/99.0.0${z.length>0?` (${z.join(", ")})`:""}`}function y(){return`Claudin-User (${V()})`}function f(){if(N()){let J=W();if(!J?.accessToken)return{headers:{},error:"No OAuth token available"};return{headers:{Authorization:`Bearer ${J.accessToken}`,"anthropic-beta":Z}}}let z=P();if(!z)return{headers:{},error:"No API key available"};return{headers:{"x-api-key":z}}}async function b(z,J){try{return await z()}catch(F){if(!$.isAxiosError(F))throw F;let L=F.response?.status;if(!(L===401||J?.also403Revoked&&L===403&&typeof F.response?.data==="string"&&F.response.data.includes("OAuth token has been revoked")))throw F;let M=W()?.accessToken;if(!M)throw F;return await x(M),await z()}}var B=Y(()=>{j();U();D();q()});function A(){if(G(process.env.DISABLE_COST_WARNINGS))return!1;if(N())return!1;let J=H(),F=P()!==null;if(!J.hasToken&&!F)return!1;let L=X(),Q=L.oauthAccount?.organizationRole,M=L.oauthAccount?.workspaceRole;if(!Q||!M)return!1;return["admin","billing"].includes(Q)||["workspace_admin","workspace_billing"].includes(M)}function g(){if(w!==null)return w;if(!N())return!1;let z=_();if(z==="max"||z==="pro")return!0;let F=X().oauthAccount?.organizationRole;return!!F&&["admin","billing","owner","primary_owner"].includes(F)}var w=null;var m=Y(()=>{D();K();I()});
2
+ export{C as h4,v as i4,y as j4,f as k4,b as l4,B as m4,A as n4,g as o4,m as p4};
@@ -0,0 +1,2 @@
1
+ import{DZ as u,H1 as a,P0 as QQ,Q0 as uQ,a1 as k,c1 as y,i1 as MQ,r1 as _Q,s1 as aQ,w1 as d}from"./cli-1.1.18-2w9274tq.mjs";import{d4 as K,e4 as l,f4 as m}from"./cli-1.1.18-f2j32mha.mjs";import{g4 as v}from"./cli-1.1.18-cjkn7t4k.mjs";import{D4 as YV,w4 as n,y4 as t}from"./cli-1.1.18-ddreb78e.mjs";import{B8 as pQ,Q8 as XV,v8 as $Q,y8 as P}from"./cli-1.1.18-703emt7y.mjs";import{Wga as CQ,_ea as fQ,bfa as x,cha as VV,wea as mQ,wfa as QV,xea as eQ}from"./cli-1.1.18-3y4pftxb.mjs";import{hha as IQ,iha as sQ}from"./cli-1.1.18-ndct9t5e.mjs";import{Xja as r,Yja as nQ}from"./cli-1.1.18-k05shz35.mjs";import{ala as E,dla as iQ}from"./cli-1.1.18-ypcye8ae.mjs";import{Ksa as tQ,ssa as i}from"./cli-1.1.18-vzrv28w4.mjs";import{gta as T,kta as F}from"./cli-1.1.18-hvd9yyb4.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=T(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 GQ=()=>{};function JQ(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 hQ(X){if(X===" ")return[JQ("space")];return X.trim().split(/\s+/).map(JQ)}function yQ(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=lQ(X.key);return Q.push(V),Q.join("+")}function lQ(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 c(X){return X.map(yQ).join(" ")}function NV(X){let Q=[];for(let V of X)for(let[Z,Y]of Object.entries(V.bindings))Q.push({chord:hQ(Z),action:Y,context:V.context});return Q}var LQ=()=>{};function qQ(X,Q,V){let Z=V.findLast((Y)=>Y.action===X&&Y.context===Q);return Z?c(Z.chord):void 0}function kQ(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 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 gQ(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 G=kQ(X,Q);if(!G){if(Y!==null)return{type:"chord_cancelled"};return{type:"none"}}let J=Y?[...Y,G]:[G],L=new Set(V),N=Z.filter((q)=>L.has(q.context)),z=new Map;for(let q of N)if(q.chord.length>J.length&&cQ(J,q))z.set(c(q.chord),q.action);let B=!1;for(let q of z.values())if(q!==null){B=!0;break}if(B)return{type:"chord_started",pending:J};let H;for(let q of N)if(gQ(J,q))H=q;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 NQ=F(()=>{GQ();LQ()});function TV(X){let Q=g.c(24),{bindings:V,pendingChordRef:Z,pendingChord:Y,setPendingChord:G,activeContexts:J,registerActiveContext:L,unregisterActiveContext:N,handlerRegistryRef:z,children:B}=X,H;if(Q[0]!==V)H=(U,O)=>qQ(U,O,V),Q[0]=V,Q[1]=H;else H=Q[1];let q=H,w;if(Q[2]!==z)w=(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 S=O.get(U.action);if(S){if(S.delete(U),S.size===0)O.delete(U.action)}}},Q[2]=z,Q[3]=w;else w=Q[3];let p=w,D;if(Q[4]!==J||Q[5]!==z)D=(U)=>{let O=z.current;if(!O)return!1;let S=O.get(U);if(!S||S.size===0)return!1;for(let e of S)if(J.has(e.context))return e.handler(),!0;return!1},Q[4]=J,Q[5]=z,Q[6]=D;else D=Q[6];let A=D,_;if(Q[7]!==V||Q[8]!==Z)_=(U,O,S)=>zQ(U,O,S,V,Z.current),Q[7]=V,Q[8]=Z,Q[9]=_;else _=Q[9];let I;if(Q[10]!==J||Q[11]!==V||Q[12]!==q||Q[13]!==A||Q[14]!==Y||Q[15]!==L||Q[16]!==p||Q[17]!==G||Q[18]!==_||Q[19]!==N)I={resolve:_,setPendingChord:G,getDisplayText:q,bindings:V,pendingChord:Y,activeContexts:J,registerActiveContext:L,unregisterActiveContext:N,registerHandler:p,invokeAction:A},Q[10]=J,Q[11]=V,Q[12]=q,Q[13]=A,Q[14]=Y,Q[15]=L,Q[16]=p,Q[17]=G,Q[18]=_,Q[19]=N,Q[20]=I;else I=Q[20];let j=I,W;if(Q[21]!==B||Q[22]!==j)W=K(BQ.Provider,{value:j,children:B}),Q[21]=B,Q[22]=j,Q[23]=W;else W=Q[23];return W}function dQ(){}function h(){return f.useContext(BQ)}function KV(X,Q){let V=g.c(5),Z=Q===void 0?!0:Q,Y=h(),G,J;if(V[0]!==X||V[1]!==Z||V[2]!==Y)G=()=>{if(!Y||!Z)return;return Y.registerActiveContext(X),()=>{Y.unregisterActiveContext(X)}},J=[X,Y,Z],V[0]=X,V[1]=Z,V[2]=Y,V[3]=G,V[4]=J;else G=V[3],J=V[4];f.useLayoutEffect(G,J)}var g,f,BQ;var UQ=F(()=>{NQ();m();g=T(u(),1),f=T(v(),1),BQ=f.createContext(null)});function RV(X,Q,V={}){let{context:Z="Global",isActive:Y=!0}=V,G=h();C.useEffect(()=>{if(!G||!Y)return;return G.registerHandler({action:X,context:Z,handler:Q})},[X,Z,Q,G,Y]);let J=C.useCallback((L,N,z)=>{if(!G)return;let B=[...G.activeContexts,Z,"Global"],H=[...new Set(B)],q=G.resolve(L,N,H);switch(q.type){case"match":if(G.setPendingChord(null),q.action===X){if(Q()!==!1)z.stopImmediatePropagation()}break;case"chord_started":G.setPendingChord(q.pending),z.stopImmediatePropagation();break;case"chord_cancelled":G.setPendingChord(null);break;case"unbound":G.setPendingChord(null),z.stopImmediatePropagation();break;case"none":break}},[X,Z,Q,G]);d(J,{isActive:Y})}function OQ(X,Q={}){let{context:V="Global",isActive:Z=!0}=Q,Y=h();C.useEffect(()=>{if(!Y||!Z)return;let J=[];for(let[L,N]of Object.entries(X))J.push(Y.registerHandler({action:L,context:V,handler:N}));return()=>{for(let L of J)L()}},[V,X,Y,Z]);let G=C.useCallback((J,L,N)=>{if(!Y)return;let z=[...Y.activeContexts,V,"Global"],B=[...new Set(z)],H=Y.resolve(J,L,B);switch(H.type){case"match":if(Y.setPendingChord(null),H.action in X){let q=X[H.action];if(q&&q()!==!1)N.stopImmediatePropagation()}break;case"chord_started":Y.setPendingChord(H.pending),N.stopImmediatePropagation();break;case"chord_cancelled":Y.setPendingChord(null);break;case"unbound":Y.setPendingChord(null),N.stopImmediatePropagation();break;case"none":break}},[V,X,Y]);d(G,{isActive:Z})}var C;var wQ=F(()=>{a();UQ();C=T(v(),1)});function o(X,Q,V){let Z=M.useRef(0),Y=M.useRef(void 0),G=M.useCallback(()=>{if(Y.current)clearTimeout(Y.current),Y.current=void 0},[]);return M.useEffect(()=>{return()=>{G()}},[G]),M.useCallback(()=>{let J=Date.now();if(J-Z.current<=FQ&&Y.current!==void 0)G(),X(!1),Q();else V?.(),X(!0),G(),Y.current=setTimeout((z,B)=>{z(!1),B.current=void 0},FQ,X,Y);Z.current=J},[X,Q,V,G])}var M,FQ=800;var WQ=F(()=>{M=T(v(),1)});function jQ(X,Q,V,Z=!0){let{exit:Y}=_Q(),[G,J]=R.useState({pending:!1,keyName:null}),L=R.useMemo(()=>V??Y,[V,Y]),N=o((w)=>J({pending:w,keyName:"Ctrl-C"}),L),z=o((w)=>J({pending:w,keyName:"Ctrl-D"}),L),B=R.useCallback(()=>{if(Q?.())return;N()},[N,Q]),H=R.useCallback(()=>{z()},[z]),q=R.useMemo(()=>({"app:interrupt":B,"app:exit":H}),[B,H]);return X(q,{context:"Global",isActive:Z}),G}var R;var TQ=F(()=>{aQ();WQ();R=T(v(),1)});function $V(X,Q,V){return jQ(OQ,Q,X,V)}var oQ=F(()=>{wQ();TQ()});function SQ(){return $.useContext(s)!==null}function bV(X){let Q=KQ.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 KQ,$,s;var AQ=F(()=>{KQ=T(u(),1),$=T(v(),1),s=$.createContext(null)});function DQ(X){let Q=RQ.c(21),{width:V,color:Z,char:Y,padding:G,title:J}=X,L=Y===void 0?"─":Y,N=G===void 0?0:G,{columns:z}=XQ(),B=Math.max(0,(V??z)-N);if(J){let p=IQ(J)+2,D=Math.max(0,B-p),A=Math.floor(D/2),_=D-A,I=!Z,j;if(Q[0]!==L||Q[1]!==A)j=L.repeat(A),Q[0]=L,Q[1]=A,Q[2]=j;else j=Q[2];let W;if(Q[3]!==J)W=K(y,{dimColor:!0,children:K(MQ,{children:J})}),Q[3]=J,Q[4]=W;else W=Q[4];let U;if(Q[5]!==L||Q[6]!==_)U=L.repeat(_),Q[5]=L,Q[6]=_,Q[7]=U;else U=Q[7];let O;if(Q[8]!==Z||Q[9]!==I||Q[10]!==j||Q[11]!==W||Q[12]!==U)O=l(y,{color:Z,dimColor:I,children:[j," ",W," ",U]}),Q[8]=Z,Q[9]=I,Q[10]=j,Q[11]=W,Q[12]=U,Q[13]=O;else O=Q[13];return O}let H=!Z,q;if(Q[14]!==L||Q[15]!==B)q=L.repeat(B),Q[14]=L,Q[15]=B,Q[16]=q;else q=Q[16];let w;if(Q[17]!==Z||Q[18]!==H||Q[19]!==q)w=K(y,{color:Z,dimColor:H,children:q}),Q[17]=Z,Q[18]=H,Q[19]=q,Q[20]=w;else w=Q[20];return w}var RQ;var EQ=F(()=>{YQ();sQ();a();m();RQ=T(u(),1)});function oV(X){let Q=PQ.c(9),{children:V,color:Z}=X;if(SQ()){let L;if(Q[0]!==V)L=K(k,{flexDirection:"column",paddingX:1,flexShrink:0,children:V}),Q[0]=V,Q[1]=L;else L=Q[1];return L}let Y;if(Q[2]!==Z)Y=K(DQ,{color:Z}),Q[2]=Z,Q[3]=Y;else Y=Q[3];let G;if(Q[4]!==V)G=K(k,{flexDirection:"column",paddingX:2,children:V}),Q[4]=V,Q[5]=G;else G=Q[5];let J;if(Q[6]!==Y||Q[7]!==G)J=l(k,{flexDirection:"column",paddingTop:1,children:[Y,G]}),Q[6]=Y,Q[7]=G,Q[8]=J;else J=Q[8];return J}var PQ;var rQ=F(()=>{AQ();a();EQ();m();PQ=T(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()&&pQ()==="max")}function GX(){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,J=Date.now()-Y>bQ;return{eligible:Z,needsRefresh:J,hasCache:!0}}function JX(X){let Q=GV[X.currency]??`${X.currency} `,V=X.amount_minor_units/100,Z=V%1===0?V.toString():V.toFixed(2);return`${Q}${Z}`}function LX(){let X=P()?.organizationUuid;if(!X)return null;return x().passesEligibilityCache?.[X]?.referrer_reward??null}function qX(){let X=P()?.organizationUuid;if(!X)return null;return x().passesEligibilityCache?.[X]?.remaining_passes??null}async function vQ(){if(b)return E("Passes: Reusing in-flight eligibility fetch"),b;let X=P()?.organizationUuid;if(!X)return null;return b=(async()=>{try{let Q=await ZV(),V={...Q,timestamp:Date.now()};return fQ((Z)=>({...Z,passesEligibilityCache:{...Z.passesEligibilityCache,[X]:V}})),E(`Passes eligibility cached for org ${X}: ${Q.eligible}`),Q}catch(Q){return E("Failed to fetch and cache passes eligibility"),CQ(Q),null}finally{b=null}})(),b}async function JV(){if(!xQ())return null;let X=P()?.organizationUuid;if(!X)return null;let V=x().passesEligibilityCache?.[X],Z=Date.now();if(!V)return E("Passes: No cache, fetching eligibility in background (command unavailable this session)"),vQ(),null;if(Z-V.timestamp>bQ){E("Passes: Cache stale, returning cached data and refreshing in background"),vQ();let{timestamp:J,...L}=V;return L}E("Passes: Using fresh cached eligibility data");let{timestamp:Y,...G}=V;return G}async function HX(){if(mQ())return;JV()}var bQ=86400000,b=null,GV;var LV=F(()=>{tQ();nQ();XV();QV();iQ();VV();eQ();YV();GV={USD:"$",EUR:"€",GBP:"£",BRL:"R$",CAD:"CA$",AUD:"A$",NZD:"NZ$",SGD:"S$"}});
2
+ export{XQ as nY,YQ as oY,JQ as pY,hQ as qY,c as rY,NV as sY,LQ as tY,qQ as uY,zQ as vY,NQ as wY,TV as xY,h as yY,KV as zY,UQ as AY,RV as BY,OQ as CY,wQ as DY,o as EY,WQ as FY,$V as GY,oQ as HY,s as IY,SQ as JY,bV as KY,xV as LY,AQ as MY,DQ as NY,EQ as OY,oV as PY,rQ as QY,ZX as RY,GX as SY,JX as TY,LX as UY,qX as VY,JV as WY,HX as XY,LV as YY};
@@ -0,0 +1,2 @@
1
+ import{Wi as p,Xi as z}from"./cli-1.1.18-5mr13yxz.mjs";import{Yi as q,Zi as A}from"./cli-1.1.18-ns45fmht.mjs";import{d4 as k,f4 as h}from"./cli-1.1.18-f2j32mha.mjs";import{kta as y}from"./cli-1.1.18-hvd9yyb4.mjs";async function G(b,v){let f=await q();if(f.type==="message")return b(f.value),null;return k(p,{startingMessage:"Starting new login following /extra-usage. Exit with Ctrl-C to use existing account.",onDone:(w)=>{v.onChangeAPIKey(),b(w?"Login successful":"Login interrupted")}})}var B=y(()=>{z();A();h()});
2
+ export{G as Ui,B as Vi};
@@ -0,0 +1,2 @@
1
+ import{K0 as v,L0 as X,M0 as D,r0 as O,s0 as V,t0 as I,v0 as W,w0 as p}from"./cli-1.1.18-2w9274tq.mjs";import{d4 as N,f4 as T}from"./cli-1.1.18-f2j32mha.mjs";import{g4 as H}from"./cli-1.1.18-cjkn7t4k.mjs";import{Hoa as U,yra as F}from"./cli-1.1.18-4c3jqppx.mjs";import{gta as A,kta as C}from"./cli-1.1.18-hvd9yyb4.mjs";function h({children:Y,ref:Z,stickyScroll:_,...G}){let w=E.useRef(null),[,$]=E.useState(0),J=E.useRef(new Set),K=E.useRef(!1),P=()=>{for(let g of J.current)g()};function L(g){if(U(),O(g),W(),P(),K.current)return;K.current=!0,queueMicrotask(()=>{K.current=!1,V(g)})}return E.useImperativeHandle(Z,()=>({scrollTo(g){let q=w.current;if(!q)return;q.stickyScroll=!1,q.pendingScrollDelta=void 0,q.scrollAnchor=void 0,q.scrollTop=Math.max(0,Math.floor(g)),L(q)},scrollToElement(g,q=0){let z=w.current;if(!z)return;z.stickyScroll=!1,z.pendingScrollDelta=void 0,z.scrollAnchor={el:g,offset:q},L(z)},scrollBy(g){let q=w.current;if(!q)return;q.stickyScroll=!1,q.scrollAnchor=void 0,q.pendingScrollDelta=(q.pendingScrollDelta??0)+Math.floor(g),L(q)},scrollToBottom(){let g=w.current;if(!g)return;g.pendingScrollDelta=void 0,g.stickyScroll=!0,O(g),P(),$((q)=>q+1)},getScrollTop(){return w.current?.scrollTop??0},getPendingDelta(){return w.current?.pendingScrollDelta??0},getScrollHeight(){return w.current?.scrollHeight??0},getFreshScrollHeight(){return w.current?.childNodes[0]?.yogaNode?.getComputedHeight()??w.current?.scrollHeight??0},getViewportHeight(){return w.current?.scrollViewportHeight??0},getViewportTop(){return w.current?.scrollViewportTop??0},isSticky(){let g=w.current;if(!g)return!1;return g.stickyScroll??Boolean(g.attributes.stickyScroll)},subscribe(g){return J.current.add(g),()=>J.current.delete(g)},setClampBounds(g,q){let z=w.current;if(!z)return;z.scrollClampMin=g,z.scrollClampMax=q}}),[]),N("ink-box",{ref:(g)=>{if(w.current=g,g)g.scrollTop??=0},style:{flexWrap:"nowrap",flexDirection:G.flexDirection??"row",flexGrow:G.flexGrow??0,flexShrink:G.flexShrink??1,...G,overflowX:"scroll",overflowY:"scroll"},..._?{stickyScroll:!0}:{},children:N(X,{flexDirection:"column",flexGrow:1,flexShrink:0,width:"100%",children:Y})})}var E,a;var B=C(()=>{F();I();p();v();D();T();E=A(H(),1);a=h});
2
+ export{a as Zh,B as _h};
@@ -0,0 +1,2 @@
1
+ import{Qd as Jq,Ud as Tq}from"./cli-1.1.18-erjpjwnr.mjs";import{Zd as zq,_d as bq}from"./cli-1.1.18-7g6xwfbz.mjs";import{BG as r,CG as Gq,GL as S,JL as Nq,MM as D,PM as Cq,UL as s,VL as _q,ZL as a,aM as l,eM as t,jM as e,ko as n,lM as Rq,lo as yq,oI as h,pI as fq,sM as qq,wM as Fq}from"./cli-1.1.18-xfb4pete.mjs";import{DZ as Bq,H1 as Oq,a1 as F,c1 as C,tZ as i,uZ as Kq}from"./cli-1.1.18-2w9274tq.mjs";import{d4 as v,e4 as R,f4 as p}from"./cli-1.1.18-f2j32mha.mjs";import{g4 as Lq}from"./cli-1.1.18-cjkn7t4k.mjs";import{B_ as g,C_ as Zq,O$ as o,O_ as $,P$ as Hq,Q_ as Xq,Taa as vq,Wga as m,cha as wq,waa as x}from"./cli-1.1.18-3y4pftxb.mjs";import{ala as B,dla as Yq}from"./cli-1.1.18-ypcye8ae.mjs";import{Cla as u,Hla as Wq,zla as P}from"./cli-1.1.18-cxg522yt.mjs";import{gta as d,kta as Vq}from"./cli-1.1.18-hvd9yyb4.mjs";import{readFile as c}from"fs/promises";import{join as j}from"path";function Qq(){return s}function Aq(){return Mq}function Uq(){return`thinkback@${Qq()}`}async function jq(){let{enabled:H}=await D(),q=H.find((U)=>U.name==="thinkback"||U.source&&U.source.includes(Uq()));if(!q)return null;let J=j(q.path,"skills",Sq);if(await x(J))return J;return null}async function Iq(H){let q=j(H,"year_in_review.js"),J=j(H,"player.js");try{await c(q)}catch(z){if(u(z))return{success:!1,message:"No animation found. Run /think-back first to generate one."};return m(z),{success:!1,message:`Could not access animation data: ${P(z).message}`}}try{await c(J)}catch(z){if(u(z))return{success:!1,message:"Player script not found. The player.js file is missing from the thinkback skill."};return m(z),{success:!1,message:`Could not access player script: ${P(z).message}`}}let U=i.get(process.stdout);if(!U)return{success:!1,message:"Failed to access terminal instance"};U.enterAlternateScreen();try{await g("node",[J],{stdio:"inherit",cwd:H,reject:!1})}catch{}finally{U.exitAlternateScreen()}let O=j(H,"year_in_review.html");if(await x(O)){let z=o();$(z==="macos"?"open":z==="windows"?"start":"xdg-open",[O])}return{success:!0,message:"Year in review animation complete!"}}function Pq({onReady:H,onError:q}){let[J,U]=K.useState({phase:"checking"}),[O,z]=K.useState("");if(K.useEffect(()=>{async function Z(){try{let y=await l(),Y=Qq(),G=Aq(),X=Uq(),_=Y in y,L=qq(X);if(!_)U({phase:"installing-marketplace"}),B(`Installing marketplace ${G}`),await t({source:"github",repo:G},(V)=>{z(V)}),S(),B(`Marketplace ${Y} installed`);else if(!L)U({phase:"installing-marketplace"}),z("Updating marketplace…"),B(`Refreshing marketplace ${Y}`),await e(Y,(V)=>{z(V)}),a(),S(),B(`Marketplace ${Y} refreshed`);if(!L){U({phase:"installing-plugin"}),B(`Installing plugin ${X}`);let V=await zq([X]);if(V.failed.length>0){let w=V.failed.map((W)=>`${W.name}: ${W.error}`).join(", ");throw Error(`Failed to install plugin: ${w}`)}S(),B(`Plugin ${X} installed`)}else{let{disabled:V}=await D();if(V.some((W)=>W.name==="thinkback"||W.source?.includes(X))){U({phase:"enabling-plugin"}),B(`Enabling plugin ${X}`);let W=await Jq(X);if(!W.success)throw Error(`Failed to enable plugin: ${W.message}`);S(),B(`Plugin ${X} enabled`)}}U({phase:"ready"}),H()}catch(y){let Y=P(y);m(Y),U({phase:"error",message:Y.message}),q(Y.message)}}Z()},[H,q]),J.phase==="error")return v(F,{flexDirection:"column",children:R(C,{color:"error",children:["Error: ",J.message]})});if(J.phase==="ready")return null;let T=J.phase==="checking"?"Checking thinkback installation…":J.phase==="installing-marketplace"?"Installing marketplace…":J.phase==="enabling-plugin"?"Enabling thinkback plugin…":"Installing thinkback plugin…";return v(F,{flexDirection:"column",children:R(F,{children:[v(h,{}),v(C,{children:O||T})]})})}function mq(H){let q=k.c(19),{onDone:J,onAction:U,skillDir:O,hasGenerated:z}=H,[T,Z]=K.useState(!1),y;if(q[0]!==z)y=z?[{label:"Play animation",value:"play",description:"Watch your year in review"},{label:"Edit content",value:"edit",description:"Modify the animation"},{label:"Fix errors",value:"fix",description:"Fix validation or rendering issues"},{label:"Regenerate",value:"regenerate",description:"Create a new animation from scratch"}]:[{label:"Let's go!",value:"regenerate",description:"Generate your personalized animation"}],q[0]=z,q[1]=y;else y=q[1];let Y=y,G;if(q[2]!==U||q[3]!==J||q[4]!==O)G=function(b){if(Z(!0),b==="play")Iq(O).then(()=>{J(void 0,{display:"skip"})});else U(b)},q[2]=U,q[3]=J,q[4]=O,q[5]=G;else G=q[5];let X=G,_;if(q[6]!==J)_=function(){J(void 0,{display:"skip"})},q[6]=J,q[7]=_;else _=q[7];let L=_;if(T)return null;let V;if(q[8]!==z)V=!z&&R(F,{flexDirection:"column",children:[v(C,{children:"Relive your year of coding with Claude."}),v(C,{dimColor:!0,children:"We'll create a personalized ASCII animation celebrating your journey."})]}),q[8]=z,q[9]=V;else V=q[9];let w;if(q[10]!==X||q[11]!==Y)w=v(r,{options:Y,onChange:X,visibleOptionCount:5}),q[10]=X,q[11]=Y,q[12]=w;else w=q[12];let W;if(q[13]!==V||q[14]!==w)W=R(F,{flexDirection:"column",gap:1,children:[V,w]}),q[13]=V,q[14]=w,q[15]=W;else W=q[15];let f;if(q[16]!==L||q[17]!==W)f=v(n,{title:"Think Back on 2025 with Claude Code",subtitle:"Generate your 2025 Claude Code Think Back (takes a few minutes to run)",onCancel:L,color:"claude",children:W}),q[16]=L,q[17]=W,q[18]=f;else f=q[18];return f}function hq(H){let q=k.c(27),{onDone:J}=H,[U,O]=K.useState(!1),[z,T]=K.useState(null),[Z,y]=K.useState(null),[Y,G]=K.useState(null),X;if(q[0]===Symbol.for("react.memo_cache_sentinel"))X=function(){O(!0)},q[0]=X;else X=q[0];let _=X,L;if(q[1]!==J)L=(Q)=>{T(Q),J(`Error with thinkback: ${Q}. Try running /plugin to manually install the think-back plugin.`,{display:"system"})},q[1]=J,q[2]=L;else L=q[2];let V=L,w,W;if(q[3]!==V||q[4]!==U||q[5]!==z||q[6]!==Z)w=()=>{if(U&&!Z&&!z)jq().then((Q)=>{if(Q)B(`Thinkback skill directory: ${Q}`),y(Q);else V("Could not find thinkback skill directory")})},W=[U,Z,z,V],q[3]=V,q[4]=U,q[5]=z,q[6]=Z,q[7]=w,q[8]=W;else w=q[7],W=q[8];K.useEffect(w,W);let f,M;if(q[9]!==Z)f=()=>{if(!Z)return;let Q=j(Z,"year_in_review.js");x(Q).then((N)=>{B(`Checking for ${Q}: ${N?"found":"not found"}`),G(N)})},M=[Z],q[9]=Z,q[10]=f,q[11]=M;else f=q[10],M=q[11];K.useEffect(f,M);let b;if(q[12]!==J)b=function(N){J({edit:xq,fix:Eq,regenerate:uq}[N],{display:"user",shouldQuery:!0})},q[12]=J,q[13]=b;else b=q[13];let E=b;if(z){let Q;if(q[14]!==z)Q=R(C,{color:"error",children:["Error: ",z]}),q[14]=z,q[15]=Q;else Q=q[15];let N;if(q[16]===Symbol.for("react.memo_cache_sentinel"))N=v(C,{dimColor:!0,children:"Try running /plugin to manually install the think-back plugin."}),q[16]=N;else N=q[16];let A;if(q[17]!==Q)A=R(F,{flexDirection:"column",children:[Q,N]}),q[17]=Q,q[18]=A;else A=q[18];return A}if(!U){let Q;if(q[19]!==V)Q=v(Pq,{onReady:_,onError:V}),q[19]=V,q[20]=Q;else Q=q[20];return Q}if(!Z||Y===null){let Q;if(q[21]===Symbol.for("react.memo_cache_sentinel"))Q=R(F,{children:[v(h,{}),v(C,{children:"Loading thinkback skill…"})]}),q[21]=Q;else Q=q[21];return Q}let I;if(q[22]!==E||q[23]!==Y||q[24]!==J||q[25]!==Z)I=v(mq,{onDone:J,onAction:E,skillDir:Z,hasGenerated:Y}),q[22]=E,q[23]=Y,q[24]=J,q[25]=Z,q[26]=I;else I=q[26];return I}async function Yz(H){return v(hq,{onDone:H})}var k,K,Mq="anthropics/claude-plugins-official",Sq="thinkback",xq='Use the Skill tool to invoke the "thinkback" skill with mode=edit to modify my existing Claude Code year in review animation. Ask me what I want to change. When the animation is ready, tell the user to run /think-back again to play it.',Eq='Use the Skill tool to invoke the "thinkback" skill with mode=fix to fix validation or rendering errors in my existing Claude Code year in review animation. Run the validator, identify errors, and fix them. When the animation is ready, tell the user to run /think-back again to play it.',uq='Use the Skill tool to invoke the "thinkback" skill with mode=regenerate to create a completely new Claude Code year in review animation from scratch. Delete the existing animation and start fresh. When the animation is ready, tell the user to run /think-back again to play it.';var Dq=Vq(()=>{Zq();Gq();yq();fq();Kq();Oq();Tq();Yq();Wq();Xq();vq();wq();Hq();Nq();Fq();Rq();_q();Cq();bq();p();k=d(Bq(),1),K=d(Lq(),1)});
2
+ export{Iq as Gd,Yz as Hd,Dq as Id};
@@ -0,0 +1,2 @@
1
+ import{sd as t,td as DJ}from"./cli-1.1.18-3rm83ba2.mjs";import{ki as r,li as IJ}from"./cli-1.1.18-jgwwkx62.mjs";import{BE as o,CE as xJ,JT as bJ,Km as m,Mj as p,NF as a,OF as LJ,Qm as wJ,Xn as JJ,eS as h,em as g,hm as UJ,mH as s,oE as YJ,oz as c,pz as MJ,qH as yJ,rH as l,sH as TJ,sO as $J,um as d,vE as jJ,wE as PJ,wx as XJ,zm as _J}from"./cli-1.1.18-xfb4pete.mjs";import{BV as u,CV as f,NV as BJ}from"./cli-1.1.18-rnqtkprk.mjs";import{f7 as QJ}from"./cli-1.1.18-703emt7y.mjs";import{Nga as A,Oga as NJ,Wga as U,Zda as I,cha as k,jea as D,kea as zJ,taa as KJ}from"./cli-1.1.18-3y4pftxb.mjs";import{mia as GJ}from"./cli-1.1.18-7pcfwrhj.mjs";import{Zja as b,aka as C}from"./cli-1.1.18-hbv881pn.mjs";import{Kka as qJ,Oka as W,Ska as VJ,ala as y,dla as WJ}from"./cli-1.1.18-ypcye8ae.mjs";import{Hla as e}from"./cli-1.1.18-cxg522yt.mjs";import{Kla as _,Vla as ZJ}from"./cli-1.1.18-3s03nva1.mjs";import{Goa as H,ppa as F,yra as S}from"./cli-1.1.18-4c3jqppx.mjs";import{hta as CJ}from"./cli-1.1.18-hvd9yyb4.mjs";xJ();IJ();S();GJ();C();KJ();h();QJ();qJ();$J();JJ();k();e();h();XJ();YJ();function j(){}S();C();NJ();WJ();ZJ();VJ();MJ();k();LJ();_J();bJ();TJ();BJ();zJ();wJ();UJ();import{join as Z}from"path";var AJ=30;function N(){let q=((I()||{}).cleanupPeriodDays??AJ)*24*60*60*1000;return new Date(Date.now()-q)}function i(X,J){return{messages:X.messages+J.messages,errors:X.errors+J.errors}}function vJ(X){let J=X.split(".")[0].replace(/T(\d{2})-(\d{2})-(\d{2})-(\d{3})Z/,"T$1:$2:$3.$4Z");return new Date(J)}async function P(X,J,q){let $={messages:0,errors:0};try{let G=await W().readdir(X);for(let K of G)try{if(vJ(K.name)<J)if(await W().unlink(Z(X,K.name)),q)$.messages++;else $.errors++}catch(Y){U(Y)}}catch(G){if(G instanceof Error&&"code"in G&&G.code!=="ENOENT")U(G)}return $}async function HJ(){let X=W(),J=N(),q=A.errors(),$=A.baseLogs(),G=await P(q,J,!1);try{let K;try{K=await X.readdir($)}catch{return G}let Y=K.filter((Q)=>Q.isDirectory()&&Q.name.startsWith("mcp-logs-")).map((Q)=>Z($,Q.name));for(let Q of Y)G=i(G,await P(Q,J,!0)),await V(Q,X)}catch(K){if(K instanceof Error&&"code"in K&&K.code!=="ENOENT")U(K)}return G}async function w(X,J,q){if((await q.stat(X)).mtime<J)return await q.unlink(X),!0;return!1}async function V(X,J){try{await J.rmdir(X)}catch{}}async function FJ(){let X=N(),J={messages:0,errors:0},q=p(),$=W(),G;try{G=await $.readdir(q)}catch{return J}for(let K of G){if(!K.isDirectory())continue;let Y=Z(q,K.name),Q;try{Q=await $.readdir(Y)}catch{J.errors++;continue}for(let z of Q)if(z.isFile()){if(!z.name.endsWith(".jsonl")&&!z.name.endsWith(".cast"))continue;try{if(await w(Z(Y,z.name),X,$))J.messages++}catch{J.errors++}}else if(z.isDirectory()){let L=Z(Y,z.name),B=Z(L,m),O;try{O=await $.readdir(B)}catch{await V(L,$);continue}for(let M of O)if(M.isFile())try{if(await w(Z(B,M.name),X,$))J.messages++}catch{J.errors++}else if(M.isDirectory()){let T=Z(B,M.name),R;try{R=await $.readdir(T)}catch{continue}for(let E of R){if(!E.isFile())continue;try{if(await w(Z(T,E.name),X,$))J.messages++}catch{J.errors++}}await V(T,$)}await V(B,$),await V(L,$)}await V(Y,$)}return J}async function x(X,J,q=!0){let $=N(),G={messages:0,errors:0},K=W(),Y;try{Y=await K.readdir(X)}catch{return G}for(let Q of Y){if(!Q.isFile()||!Q.name.endsWith(J))continue;try{if(await w(Z(X,Q.name),$,K))G.messages++}catch{G.errors++}}if(q)await V(X,K);return G}async function OJ(){let X=d(),J=await x(X,".md"),q=Z(_(),"plans");if(q!==X){let $=await x(q,".md");return i(J,$)}return J}async function RJ(){let X=N(),J={messages:0,errors:0},q=W();try{let $=_(),G=Z($,"file-history"),K;try{K=await q.readdir(G)}catch{return J}let Y=K.filter((Q)=>Q.isDirectory()).map((Q)=>Z(G,Q.name));await Promise.all(Y.map(async(Q)=>{try{if((await q.stat(Q)).mtime<X)await q.rm(Q,{recursive:!0,force:!0}),J.messages++}catch{J.errors++}})),await V(G,q)}catch($){U($)}return J}async function EJ(){let X=N(),J={messages:0,errors:0},q=W();try{let $=_(),G=Z($,"session-env"),K;try{K=await q.readdir(G)}catch{return J}let Y=K.filter((Q)=>Q.isDirectory()).map((Q)=>Z(G,Q.name));for(let Q of Y)try{if((await q.stat(Q)).mtime<X)await q.rm(Q,{recursive:!0,force:!0}),J.messages++}catch{J.errors++}await V(G,q)}catch($){U($)}return J}async function kJ(){let X=N(),J={messages:0,errors:0},q=W();try{let $=Z(_(),"tasks"),G=f(u()),K;try{K=await q.readdir($)}catch{return J}for(let Y of K){if(!Y.isDirectory()||Y.name===G)continue;let Q=Z($,Y.name);try{if(await hJ(Q,q)<X)await q.rm(Q,{recursive:!0,force:!0}),J.messages++}catch{J.errors++}}await V($,q)}catch($){U($)}return J}async function hJ(X,J){let q=(await J.stat(X)).mtime,$=await J.readdir(X).catch(()=>[]);for(let G of $){if(!G.isFile())continue;try{let{mtime:K}=await J.stat(Z(X,G.name));if(K>q)q=K}catch{}}return q}async function SJ(){let X=N(),J={messages:0,errors:0},q=W(),$=Z(_(),"debug"),G;try{G=await q.readdir($)}catch{return J}for(let K of G){if(!K.isFile()||!K.name.endsWith(".txt")||K.name==="latest")continue;try{if(await w(Z($,K.name),X,q))J.messages++}catch{J.errors++}}return J}async function n(){let{errors:X}=l();if(X.length>0&&D("cleanupPeriodDays")){y("Skipping cleanup: settings have validation errors but cleanupPeriodDays was explicitly set. Fix settings errors to enable cleanup.");return}await HJ(),await FJ(),await OJ(),await RJ(),await EJ(),await kJ(),await SJ(),await c(),await a(N());let J=await g(N());if(J>0)b("",{removed:J})}yJ();DJ();var pJ=(PJ(),CJ(jJ));var v=600000;function mX(){r(),j(),pJ.initExtractMemories(),o(),t();let X=!0;async function J(){if(F()&&H()>Date.now()-60000){setTimeout(J,v).unref();return}if(X)X=!1,await n();if(F()&&H()>Date.now()-60000){setTimeout(J,v).unref();return}await s()}setTimeout(J,v).unref()}
2
+ export{mX as Va};
@@ -0,0 +1,4 @@
1
+ import{GS as jJ,HS as $V,Yo as IJ,_o as pJ,gj as cJ,hS as UJ,nL as DJ,oL as BJ,pL as lJ}from"./cli-1.1.18-xfb4pete.mjs";import{M$ as mJ,P_ as p,Q_ as fJ,V$ as qJ,Wga as G,Z$ as gJ,Zda as m,bfa as YJ,cha as dJ,j$ as WJ,kea as uJ,o$ as l,wfa as hJ}from"./cli-1.1.18-3y4pftxb.mjs";import{jja as U,lja as PJ}from"./cli-1.1.18-cj8tr93q.mjs";import{Zja as f,aka as SJ}from"./cli-1.1.18-hbv881pn.mjs";import{Oka as VJ,Ska as bJ,ala as Q,dla as kJ}from"./cli-1.1.18-ypcye8ae.mjs";import{Ala as JJ,Hla as yJ}from"./cli-1.1.18-cxg522yt.mjs";import{vna as AJ,wna as zJ}from"./cli-1.1.18-4c3jqppx.mjs";import{gta as wJ,kta as _J}from"./cli-1.1.18-hvd9yyb4.mjs";class c{paths=[];lowerPaths=[];charBits=new Int32Array(0);pathLens=new Uint16Array(0);topLevelCache=null;readyCount=0;loadFromFileList(J){let W=new Set,Z=[];for(let V of J)if(V.length>0&&!W.has(V))W.add(V),Z.push(V);this.buildIndex(Z)}loadFromFileListAsync(J){let W=()=>{},Z=new Promise((Y)=>{W=Y}),V=this.buildAsync(J,W);return{queryable:Z,done:V}}async buildAsync(J,W){let Z=new Set,V=[],Y=performance.now();for(let $=0;$<J.length;$++){let _=J[$];if(_.length>0&&!Z.has(_))Z.add(_),V.push(_);if(($&255)===255&&performance.now()-Y>4)await b(),Y=performance.now()}this.resetArrays(V),Y=performance.now();let X=!0;for(let $=0;$<V.length;$++)if(this.indexPath($),($&255)===255&&performance.now()-Y>4){if(this.readyCount=$+1,X)W(),X=!1;await b(),Y=performance.now()}this.readyCount=V.length,W()}buildIndex(J){this.resetArrays(J);for(let W=0;W<J.length;W++)this.indexPath(W);this.readyCount=J.length}resetArrays(J){let W=J.length;this.paths=J,this.lowerPaths=Array(W),this.charBits=new Int32Array(W),this.pathLens=new Uint16Array(W),this.readyCount=0,this.topLevelCache=LJ(J,100)}indexPath(J){let W=this.paths[J].toLowerCase();this.lowerPaths[J]=W;let Z=W.length;this.pathLens[J]=Z;let V=0;for(let Y=0;Y<Z;Y++){let X=W.charCodeAt(Y);if(X>=97&&X<=122)V|=1<<X-97}this.charBits[J]=V}search(J,W){if(W<=0)return[];if(J.length===0){if(this.topLevelCache)return this.topLevelCache.slice(0,W);return[]}let Z=J!==J.toLowerCase(),V=Z?J:J.toLowerCase(),Y=Math.min(V.length,64),X=Array(Y),$=0;for(let M=0;M<Y;M++){let B=V.charAt(M);X[M]=B;let E=B.charCodeAt(0);if(E>=97&&E<=122)$|=1<<E-97}let _=Y*24+8+32,H=[],q=-1/0,{paths:I,lowerPaths:A,charBits:F,pathLens:j,readyCount:g}=this;J:for(let M=0;M<g;M++){if((F[M]&$)!==$)continue;let B=Z?I[M]:A[M],E=B.indexOf(X[0]);if(E===-1)continue;y[0]=E;let C=0,u=0,h=E;for(let N=1;N<Y;N++){if(E=B.indexOf(X[N],h+1),E===-1)continue J;y[N]=E;let K=E-h-1;if(K===0)u+=4;else C+=3+K*1;h=E}if(H.length===W&&_+u-C<=q)continue;let S=I[M],vJ=j[M],T=Y*16+u-C;T+=HJ(S,y[0],!0);for(let N=1;N<Y;N++)T+=HJ(S,y[N],!1);if(T+=Math.max(0,32-(vJ>>2)),H.length<W){if(H.push({path:S,fuzzScore:T}),H.length===W)H.sort((N,K)=>N.fuzzScore-K.fuzzScore),q=H[0].fuzzScore}else if(T>q){let N=0,K=H.length;while(N<K){let d=N+K>>1;if(H[d].fuzzScore<T)N=d+1;else K=d}H.splice(N,0,{path:S,fuzzScore:T}),H.shift(),q=H[0].fuzzScore}}H.sort((M,B)=>B.fuzzScore-M.fuzzScore);let D=H.length,w=Math.max(D,1),z=Array(D);for(let M=0;M<D;M++){let B=H[M].path,E=M/w,C=B.includes("test")?Math.min(E*1.05,1):E;z[M]={path:B,score:C}}return z}}function HJ(J,W,Z){if(W===0)return Z?8:0;let V=J.charCodeAt(W-1);if(RJ(V))return 8;if(GJ(V)&&CJ(J.charCodeAt(W)))return 6;return 0}function RJ(J){return J===47||J===92||J===45||J===95||J===46||J===32}function GJ(J){return J>=97&&J<=122}function CJ(J){return J>=65&&J<=90}function b(){return new Promise((J)=>setImmediate(J))}function LJ(J,W){let Z=new Set;for(let Y of J){let X=Y.length;for(let _=0;_<Y.length;_++){let H=Y.charCodeAt(_);if(H===47||H===92){X=_;break}}let $=Y.slice(0,X);if($.length>0){if(Z.add($),Z.size>=W)break}}let V=Array.from(Z);return V.sort((Y,X)=>{let $=Y.length-X.length;if($!==0)return $;return Y<X?-1:Y>X?1:0}),V.slice(0,W).map((Y)=>({path:Y,score:0}))}var QJ=4,y;var MJ=_J(()=>{y=new Int32Array(64)});import{statSync as nJ}from"fs";import*as O from"path";function n(){if(!x)x=new c;return x}function vV(){x=null,v=null,R++,k=null,L=[],$J=[],XJ=[],ZJ.clear(),s=null,o=null,a=0,i=null,r=null,P=null}function FJ(J){let W=J.length,Z=Math.max(1,Math.floor(W/500)),V=-2128831035;for(let Y=0;Y<W;Y+=Z){let X=J[Y];for(let $=0;$<X.length;$++)V=(V^X.charCodeAt($))*16777619|0;V=V*16777619|0}if(W>0){let Y=J[W-1];for(let X=0;X<Y.length;X++)V=(V^Y.charCodeAt(X))*16777619|0}return`${W}:${(V>>>0).toString(16)}`}function sJ(){let J=WJ(U());if(!J)return null;try{return nJ(O.join(J,".git","index")).mtimeMs}catch{return null}}function OJ(J,W,Z){if(Z===W)return J;return J.map((V)=>{let Y=O.join(W,V);return O.relative(Z,Y)})}async function oJ(J){if(J.length===0)return;if(!x||L.length===0)return;let W=await KJ(J),Z=[...L,...$J,...XJ,...J,...W],V=FJ(Z);if(V===P){Q("[FileIndex] skipped index rebuild — merged paths unchanged");return}await x.loadFromFileListAsync(Z).done,P=V,Q(`[FileIndex] rebuilt index with ${L.length} tracked + ${J.length} untracked files`)}async function EJ(J,W){let Z=`${J}:${W}`;if(o===Z)return s;let V=VJ(),Y=[".ignore",".rgignore"],X=[...new Set([J,W])],$=xJ.default(),_=!1,H=X.flatMap((A)=>Y.map((F)=>O.join(A,F))),q=await Promise.all(H.map((A)=>V.readFile(A,{encoding:"utf8"}).catch(()=>null)));for(let[A,F]of q.entries()){if(F===null)continue;$.add(F),_=!0,Q(`[FileIndex] loaded ignore patterns from ${H[A]}`)}let I=_?$:null;return s=I,o=Z,I}async function aJ(J,W){let Z=Date.now();Q("[FileIndex] getFilesUsingGit called");let V=WJ(U());if(!V)return Q("[FileIndex] not a git repo, returning null"),null;try{let Y=U(),X=Date.now(),$=await p(l(),["-c","core.quotepath=false","ls-files","--recurse-submodules"],{timeout:5000,abortSignal:J,cwd:V});if(Q(`[FileIndex] git ls-files (tracked) took ${Date.now()-X}ms`),$.code!==0)return Q(`[FileIndex] git ls-files failed (code=${$.code}, stderr=${$.stderr}), falling back to ripgrep`),null;let _=$.stdout.trim().split(`
2
+ `).filter(Boolean),H=OJ(_,V,Y),q=await EJ(V,Y);if(q){let A=H.length;H=q.filter(H),Q(`[FileIndex] applied ignore patterns: ${A} -> ${H.length} files`)}L=H;let I=Date.now()-Z;if(Q(`[FileIndex] git ls-files: ${H.length} tracked files in ${I}ms`),f("",{file_count:H.length,tracked_count:H.length,untracked_count:0,duration_ms:I}),!k){let A=W?["-c","core.quotepath=false","ls-files","--others","--exclude-standard"]:["-c","core.quotepath=false","ls-files","--others"],F=R;k=p(l(),A,{timeout:1e4,cwd:V}).then(async(j)=>{if(F!==R)return;if(j.code===0){let g=j.stdout.trim().split(`
3
+ `).filter(Boolean),D=OJ(g,V,Y),w=await EJ(V,Y);if(w&&D.length>0){let z=D.length;D=w.filter(D),Q(`[FileIndex] applied ignore patterns to untracked: ${z} -> ${D.length} files`)}Q(`[FileIndex] background untracked fetch: ${D.length} files`),oJ(D)}}).catch((j)=>{Q(`[FileIndex] background untracked fetch failed: ${j}`)}).finally(()=>{k=null})}return H}catch(Y){return Q(`[FileIndex] git ls-files error: ${JJ(Y)}`),null}}async function KJ(J){let W=new Set,Z=performance.now();for(let V=0;V<J.length;V++)if(iJ(J,V,V+1,W),(V&255)===255&&performance.now()-Z>QJ)await b(),Z=performance.now();return[...W].map((V)=>V+O.sep)}function iJ(J,W,Z,V){for(let Y=W;Y<Z;Y++){let X=O.dirname(J[Y]);while(X!=="."&&!V.has(X)){let $=O.dirname(X);if($===X)break;V.add(X),X=$}}}async function rJ(J){return(await Promise.all(DJ.map((Z)=>BJ(Z,J)))).flatMap((Z)=>Z.map((V)=>V.filePath))}async function tJ(J,W){Q(`[FileIndex] getProjectFiles called, respectGitignore=${W}`);let Z=await aJ(J,W);if(Z!==null)return Q(`[FileIndex] using git ls-files result (${Z.length} files)`),Z;return Q("[FileIndex] git ls-files returned null, falling back to ripgrep"),TJ(J,W)}async function TJ(J,W){let Z=Date.now(),V=["--files","--follow","--hidden","--glob","!.git/","--glob","!.svn/","--glob","!.hg/","--glob","!.bzr/","--glob","!.jj/","--glob","!.sl/"];if(!W)V.push("--no-ignore-vcs");let Y=U(),$=(await IJ(V,Y,J)).map((H)=>O.relative(Y,H)),_=Date.now()-Z;return Q(`[FileIndex] ripgrep: ${$.length} files in ${_}ms`),f("",{file_count:$.length,duration_ms:_}),$}async function RV(){let J=AbortSignal.timeout(1e4),W=m(),Z=YJ(),V=W.respectGitignore??Z.respectGitignore??!0;try{return await TJ(J,V)}catch(Y){return G(Y),[]}}async function eJ(){let J=AbortSignal.timeout(1e4),W=n();try{let Z=m(),V=YJ(),Y=Z.respectGitignore??V.respectGitignore??!0,X=U(),[$,_]=await Promise.all([tJ(J,Y),rJ(X)]);$J=_;let H=[...$,..._],q=await KJ(H);XJ=q;let I=[...q,...H],A=FJ(I);if(A!==r)await W.loadFromFileListAsync(I).done,r=A,P=null;else Q("[FileIndex] skipped index rebuild — tracked paths unchanged")}catch(Z){G(Z)}return W}function JV(J,W){let Z=Math.min(J.length,W.length),V=0;while(V<Z&&J[V]===W[V])V++;return J.substring(0,V)}function GV(J){if(J.length===0)return"";let W=J.map((V)=>V.displayText),Z=W[0];for(let V=1;V<W.length;V++){let Y=W[V];if(Z=JV(Z,Y),Z==="")return""}return Z}function t(J,W){return{id:`file-${J}`,displayText:J,metadata:W!==void 0?{score:W}:void 0}}function VV(J,W){return J.search(W,e).map((V)=>t(V.path,V.score))}function NJ(){if(v)return;let J=sJ();if(x){if(!(J!==null&&J!==i)&&Date.now()-a<WV)return}let W=R,Z=Date.now();n(),v=eJ().then((V)=>{if(W!==R)return V;return v=null,ZJ.emit(),i=J,a=Date.now(),Q(`[FileIndex] cache refresh completed in ${Date.now()-Z}ms`),V}).catch((V)=>{if(Q(`[FileIndex] Cache refresh failed: ${JJ(V)}`),G(V),W===R)v=null;return n()})}async function YV(){let J=VJ(),W=U();try{let Z=await J.readdir(W);return Z.sort((V,Y)=>{let X=V.isDirectory(),$=Y.isDirectory();if(X!==$)return X?-1:1;let _=V.name.startsWith("."),H=Y.name.startsWith(".");if(_!==H)return _?-1:1;return V.name.toLowerCase().localeCompare(Y.name.toLowerCase())}),Z.map((V)=>{let Y=O.join(W,V.name),X=O.relative(W,Y);return V.isDirectory()?X+O.sep:X})}catch(Z){return G(Z),[]}}async function CV(J,W=!1){if(!J&&!W)return[];if(m().fileSuggestion?.type==="command"){let V={...UJ(),query:J};return(await jJ(V)).slice(0,e).map(t)}if(J===""||J==="."||J==="./"){let V=await YV();return NJ(),V.slice(0,e).map(t)}let Z=Date.now();try{let V=v!==null;NJ();let Y=J,X="."+O.sep;if(J.startsWith(X))Y=J.substring(2);if(Y.startsWith("~"))Y=qJ(Y);let $=x?VV(x,Y):[],_=Date.now()-Z;return Q(`[FileIndex] generateFileSuggestions: ${$.length} results in ${_}ms (${V?"partial":"full"} index)`),f("",{duration_ms:_,cache_hit:!V,result_count:$.length,query_length:J.length}),$}catch(V){return G(V),[]}}function LV(J,W,Z,V,Y,X){let $=typeof J==="string"?J:J.displayText,_=W.substring(0,V)+$+W.substring(V+Z.length);Y(_);let H=V+$.length;X(H)}var xJ,x=null,v=null,ZJ,jV,R=0,k=null,L,$J,XJ,s=null,o=null,a=0,i=null,r=null,P=null,e=100,WV=5000;var ZV=_J(()=>{lJ();MJ();SJ();hJ();PJ();kJ();yJ();fJ();bJ();mJ();$V();dJ();gJ();pJ();uJ();zJ();xJ=wJ(cJ(),1);ZJ=AJ(),jV=ZJ.subscribe,L=[],$J=[],XJ=[]});
4
+ export{c as mi,MJ as ni,jV as oi,vV as pi,RV as qi,GV as ri,NJ as si,CV as ti,LV as ui,ZV as vi};
@@ -0,0 +1,2 @@
1
+ import{jta as x,kta as z}from"./cli-1.1.18-hvd9yyb4.mjs";var H={};x(H,{toInfraSessionId:()=>G,toCompatSessionId:()=>F,setCseShimGate:()=>A});function A(j){q=j}function F(j){if(!j.startsWith("cse_"))return j;if(q&&!q())return j;return"session_"+j.slice(4)}function G(j){if(!j.startsWith("session_"))return j;return"cse_"+j.slice(8)}var q;var J=()=>{};
2
+ export{A as D2,F as E2,G as F2,H as G2,J as H2};
@@ -0,0 +1,2 @@
1
+ import{kta as r}from"./cli-1.1.18-hvd9yyb4.mjs";var i,a=(s,e)=>function(){try{return e||(0,s[i(s)[0]])((e={exports:{}}).exports,e),e.exports}catch(t){throw e=0,t}},n;var p=r(()=>{i=Object.getOwnPropertyNames,n=a({"package.json"(s,e){e.exports={name:"@mendable/firecrawl-js",version:"4.32.1",description:"JavaScript SDK for the Firecrawl API: web scraping, crawling, web search, and scientific literature search over a research paper index of PubMed, bioRxiv, medRxiv and arXiv abstracts",main:"dist/index.js",types:"dist/index.d.ts",exports:{"./package.json":"./package.json",".":{import:"./dist/index.js",default:"./dist/index.cjs"}},type:"module",scripts:{build:"tsup","build-and-publish":"pnpm run build && pnpm publish --access public","publish-beta":"pnpm run build && pnpm publish --access public --tag beta",test:"NODE_OPTIONS=--experimental-vm-modules jest --verbose src/__tests__/e2e/v2/*.test.ts --detectOpenHandles","test:unit":"NODE_OPTIONS=--experimental-vm-modules jest --verbose src/__tests__/unit/v2/*.test.ts"},repository:{type:"git",url:"git+https://github.com/firecrawl/firecrawl.git"},author:"Mendable.ai",license:"MIT",dependencies:{axios:"1.18.0",firecrawl:"4.30.1","typescript-event-target":"^1.1.1",zod:"^3.23.8","zod-to-json-schema":"^3.23.0"},bugs:{url:"https://github.com/firecrawl/firecrawl/issues"},homepage:"https://github.com/firecrawl/firecrawl#readme",devDependencies:{"@jest/globals":"^30.2.0","@types/dotenv":"^8.2.0","@types/jest":"^30.0.0","@types/mocha":"^10.0.6","@types/node":"^20.12.12","@types/uuid":"^9.0.8",dotenv:"^16.4.5",jest:"^30.2.0","ts-jest":"^29.4.5",tsup:"^8.5.0",typescript:"^5.4.5",uuid:"^14.0.0"},keywords:["firecrawl","mendable","crawler","web","scraper","api","sdk","web-search","literature-search","research","scientific-papers","academic-search","biomedical","life-sciences","pubmed","biorxiv","medrxiv","arxiv","preprints","citations","bioinformatics"],engines:{node:">=22.0.0"}}}})});
2
+ export{n as wi,p as xi};
@@ -0,0 +1,2 @@
1
+ import{Nla as $,Vla as F}from"./cli-1.1.18-3s03nva1.mjs";import{jta as E,kta as W}from"./cli-1.1.18-hvd9yyb4.mjs";import{AsyncLocalStorage as q}from"async_hooks";function G(){return O.getStore()}function X(z,B){return O.run(z,B)}function Y(){return O.getStore()!==void 0}function Z(z){return{...z,isInProcess:!0}}var O;var Q=W(()=>{O=new q});var y={};E(y,{waitForTeammatesToBecomeIdle:()=>l,setDynamicTeamContext:()=>_,runWithTeammateContext:()=>X,isTeammate:()=>h,isTeamLead:()=>S,isPlanModeRequired:()=>w,isInProcessTeammate:()=>Y,hasWorkingInProcessTeammates:()=>I,hasActiveInProcessTeammates:()=>P,getTeammateContext:()=>G,getTeammateColor:()=>u,getTeamName:()=>f,getParentSessionId:()=>L,getDynamicTeamContext:()=>v,getAgentName:()=>A,getAgentId:()=>j,createTeammateContext:()=>Z,clearDynamicTeamContext:()=>b});function L(){let z=G();if(z)return z.parentSessionId;return D?.parentSessionId}function _(z){D=z}function b(){D=null}function v(){return D}function j(){let z=G();if(z)return z.agentId;return D?.agentId}function A(){let z=G();if(z)return z.agentName;return D?.agentName}function f(z){let B=G();if(B)return B.teamName;if(D?.teamName)return D.teamName;return z?.teamName}function h(){if(G())return!0;return!!(D?.agentId&&D?.teamName)}function u(){let z=G();if(z)return z.color;return D?.color}function w(){let z=G();if(z)return z.planModeRequired;if(D!==null)return D.planModeRequired;return $(process.env.CLAUDIN_PLAN_MODE_REQUIRED)}function S(z){if(!z?.leadAgentId)return!1;let B=j(),H=z.leadAgentId;if(B===H)return!0;if(!B)return!0;return!1}function P(z){for(let B of Object.values(z.tasks))if(B.type==="in_process_teammate"&&B.status==="running")return!0;return!1}function I(z){for(let B of Object.values(z.tasks))if(B.type==="in_process_teammate"&&B.status==="running"&&!B.isIdle)return!0;return!1}function l(z,B){let H=[];for(let[M,J]of Object.entries(B.tasks))if(J.type==="in_process_teammate"&&J.status==="running"&&!J.isIdle)H.push(M);if(H.length===0)return Promise.resolve();return new Promise((M)=>{let J=H.length,R=()=>{if(J--,J===0)M()};z((U)=>{let N={...U.tasks};for(let V of H){let K=N[V];if(K&&K.type==="in_process_teammate")if(K.isIdle)R();else N[V]={...K,onIdleCallbacks:[...K.onIdleCallbacks??[],R]}}return{...U,tasks:N}})})}var D=null;var g=W(()=>{Q();F();Q()});
2
+ export{G as WX,X as XX,Y as YX,Z as ZX,Q as _X,L as $X,v as aY,j as bY,A as cY,f as dY,h as eY,u as fY,w as gY,S as hY,P as iY,I as jY,l as kY,y as lY,g as mY};
@@ -0,0 +1,3 @@
1
+ import{O_ as Q,Q_ as M,bfa as P,wfa as R}from"./cli-1.1.18-3y4pftxb.mjs";import{ala as G,dla as C}from"./cli-1.1.18-ypcye8ae.mjs";import{kta as j}from"./cli-1.1.18-hvd9yyb4.mjs";import{promises as I}from"node:fs";import{homedir as y}from"node:os";import K from"node:path";function O(q){let z;try{z=new URL(q)}catch(A){throw Error(`Invalid URL format: ${q}`)}if(z.protocol!=="http:"&&z.protocol!=="https:")throw Error(`Invalid URL protocol: must use http:// or https://, got ${z.protocol}`)}async function g(q){try{let z=process.platform;if(z==="win32"){let{code:V}=await Q("explorer",[q]);return V===0}let A=z==="darwin"?"open":"xdg-open",{code:J}=await Q(A,[q]);return J===0}catch(z){return!1}}function k(){let q=process.env.XDG_DATA_HOME&&process.env.XDG_DATA_HOME.length>0?process.env.XDG_DATA_HOME:K.join(y(),".local","share");return[K.join(q,"applications"),"/usr/local/share/applications","/usr/share/applications","/var/lib/snapd/desktop/applications","/var/lib/flatpak/exports/share/applications"]}function U(q){let z=q.split(`
2
+ `),A=!1;for(let J of z){let V=J.trim();if(V.startsWith("[")){A=V==="[Desktop Entry]";continue}if(!A)continue;if(!V.startsWith("Exec="))continue;let $=V.slice(5).replace(S,"").replace(/%%/g,"%").trim();if($.length===0)return null;let Y=$.match(/^"([^"]+)"|^(\S+)/);if(!Y)return null;return Y[1]??Y[2]??null}return null}async function L(q){for(let z of k()){let A=K.join(z,q);try{return await I.readFile(A,"utf8")}catch(J){}}return null}async function _(q){let{code:z}=await Q("which",[q],{timeout:X,useCwd:!1});return z===0}async function B(){let{code:q,stdout:z}=await Q("xdg-settings",["get","default-web-browser"],{timeout:X,useCwd:!1});if(q!==0)return null;let A=z.trim();if(A.length===0||!A.endsWith(".desktop"))return null;let J=await L(A);if(J==null)return null;return U(J)}async function N(){for(let q of v)if(await _(q))return q;return null}async function f(){if(Z!==void 0)return Z;try{let q=await B();if(q)return Z=q,q}catch(q){G(`browser: xdg-settings detection failed: ${String(q)}`)}try{let q=await N();return Z=q,q}catch(q){return G(`browser: probe list failed: ${String(q)}`),Z=null,null}}async function W(q,z){let{code:A}=await Q(q,[z]);return A===0}async function w(q){try{O(q);let z=process.env.BROWSER,A=process.platform;if(A==="win32"){if(z){let{code:H}=await Q(z,[`"${q}"`]);return H===0}let{code:Y}=await Q("rundll32",["url,OpenURL",q],{});return Y===0}if(A==="darwin"){let Y=z||"open",{code:H}=await Q(Y,[q]);return H===0}if(z){if(await W(z,q))return!0}let J;try{J=P().oauthBrowser}catch(Y){G(`browser: failed to read oauthBrowser setting: ${String(Y)}`)}if(J&&J.length>0){if(await W(J,q))return!0}let V=await f();if(V){if(await W(V,q))return!0}let{code:$}=await Q("xdg-open",[q]);return $===0}catch(z){return!1}}var S,v,X=2000,Z=void 0;var m=j(()=>{M();C();R();S=/%[fFuUdDnNickvm]/g,v=["brave-browser","brave","firefox","chromium","google-chrome","microsoft-edge"]});
3
+ export{g as E4,w as F4,m as G4};
@@ -0,0 +1,2 @@
1
+ import{v3 as y,z3 as V}from"./cli-1.1.18-8thyc5yy.mjs";import{Iba as q,Kba as Q,O_ as p,Q_ as K}from"./cli-1.1.18-3y4pftxb.mjs";import{kta as J}from"./cli-1.1.18-hvd9yyb4.mjs";function g(){return!!z}async function D(){if(b!==null)return b;return b=!!z,b}function F(){return W||null}async function P(){return(await p(y,["-V"])).code===0}function l(){if(f!==null)return f;let k=process.env.TERM_PROGRAM,B=!!process.env.ITERM_SESSION_ID,H=q.terminal==="iTerm.app";return f=k==="iTerm.app"||B||H,f}async function w(){return(await p(Y,["session","list"])).code===0}var z,W,b=null,f=null,Y="it2";var Z=J(()=>{Q();K();V();z=process.env.TMUX,W=process.env.TMUX_PANE});
2
+ export{g as k3,D as l3,F as m3,P as n3,l as o3,Y as p3,w as q3,Z as r3};