@claudiolabs/claudin 1.0.11 → 1.0.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (911) hide show
  1. package/dist/chunks/AgentTool-1.0.13-6b06g673.mjs +1 -0
  2. package/dist/chunks/App-1.0.13-ka050dp3.mjs +1 -0
  3. package/dist/chunks/ApproveApiKey-1.0.13-f6p2r5kq.mjs +1 -0
  4. package/dist/chunks/AssistantSessionChooser-1.0.13-ghffkhts.mjs +1 -0
  5. package/dist/chunks/AutoModeOptInDialog-1.0.13-5b244jsj.mjs +1 -0
  6. package/dist/chunks/BypassPermissionsModeDialog-1.0.13-eqq7qkpy.mjs +1 -0
  7. package/dist/chunks/ClaudeMdExternalIncludesDialog-1.0.13-5279tcga.mjs +1 -0
  8. package/dist/chunks/ConsoleOAuthFlow-1.0.13-gwgar56n.mjs +1 -0
  9. package/dist/chunks/DiffDialog-1.0.13-2jaehz54.mjs +7 -0
  10. package/dist/chunks/Doctor-1.0.13-t887gwxz.mjs +1 -0
  11. package/dist/chunks/ExplorerDialog-1.0.13-85gxb6k8.mjs +6 -0
  12. package/dist/chunks/Grove-1.0.13-hdw88war.mjs +1 -0
  13. package/dist/chunks/ITermBackend-1.0.13-m0d78jq0.mjs +1 -0
  14. package/dist/chunks/InvalidConfigDialog-1.0.13-4z7zd6n8.mjs +1 -0
  15. package/dist/chunks/InvalidSettingsDialog-1.0.13-6xc5sc8a.mjs +1 -0
  16. package/dist/chunks/MigrationDialog-1.0.13-hhrgw5xc.mjs +1 -0
  17. package/dist/chunks/Onboarding-1.0.13-byv83gyv.mjs +1 -0
  18. package/dist/chunks/ProviderManager-1.0.13-gt6ntzcv.mjs +1 -0
  19. package/dist/chunks/REPL-1.0.13-wjxj6xgk.mjs +1 -0
  20. package/dist/chunks/ResumeConversation-1.0.13-tx1ek47f.mjs +1 -0
  21. package/dist/chunks/SnapshotUpdateDialog-1.0.13-4j2e4s72.mjs +1 -0
  22. package/dist/chunks/TeleportProgress-1.0.13-1rpjcxph.mjs +1 -0
  23. package/dist/chunks/TeleportRepoMismatchDialog-1.0.13-5fgav722.mjs +1 -0
  24. package/dist/chunks/TeleportResumeWrapper-1.0.13-gy4sr83e.mjs +1 -0
  25. package/dist/chunks/TmuxBackend-1.0.13-t98nfbxk.mjs +9 -0
  26. package/dist/chunks/ToolSearchTool-1.0.13-n5wg1rcd.mjs +1 -0
  27. package/dist/chunks/TrustDialog-1.0.13-xdkp37x2.mjs +1 -0
  28. package/dist/chunks/activeProvider-1.0.13-v0kphhga.mjs +1 -0
  29. package/dist/chunks/add-dir-1.0.13-7v5rg7km.mjs +1 -0
  30. package/dist/chunks/agentTypes-1.0.13-k5wckd5y.mjs +1 -0
  31. package/dist/chunks/agents-1.0.13-ngbk16a3.mjs +3 -0
  32. package/dist/chunks/agents-1.0.13-tcqasxmv.mjs +110 -0
  33. package/dist/chunks/api-1.0.13-bvwz0wzt.mjs +1 -0
  34. package/dist/chunks/asciicast-1.0.13-j8ad859r.mjs +1 -0
  35. package/dist/chunks/assistant-1.0.13-91499j0p.mjs +1 -0
  36. package/dist/chunks/auth-1.0.13-p0qrnz2b.mjs +1 -0
  37. package/dist/chunks/auth-1.0.13-s1vedchg.mjs +1 -0
  38. package/dist/chunks/autoMode-1.0.13-61pvskhh.mjs +48 -0
  39. package/dist/chunks/autoUpdater-1.0.13-fnpzj0bw.mjs +1 -0
  40. package/dist/chunks/backgroundHousekeeping-1.0.13-92x690ww.mjs +1 -0
  41. package/dist/chunks/branch-1.0.13-encr40nd.mjs +4 -0
  42. package/dist/chunks/bridge-1.0.13-xfcd961b.mjs +2 -0
  43. package/dist/chunks/bridgeConfig-1.0.13-m2jyf3zk.mjs +1 -0
  44. package/dist/chunks/bridgeEnabled-1.0.13-2chm7y0g.mjs +1 -0
  45. package/dist/chunks/bridgeMain-1.0.13-d64q1ebx.mjs +88 -0
  46. package/dist/chunks/bridgePointer-1.0.13-npck2cd4.mjs +1 -0
  47. package/dist/chunks/btw-1.0.13-55x872ns.mjs +1 -0
  48. package/dist/chunks/buddy-1.0.13-9dmgywzm.mjs +3 -0
  49. package/dist/chunks/cacache-1.0.13-3c5hrrs4.mjs +1 -0
  50. package/dist/chunks/cache-probe-1.0.13-n8g8y16c.mjs +21 -0
  51. package/dist/chunks/cacheStats-1.0.13-2kyncvct.mjs +4 -0
  52. package/dist/chunks/caches-1.0.13-md3zkabd.mjs +1 -0
  53. package/dist/chunks/claudeDesktop-1.0.13-crk87hee.mjs +1 -0
  54. package/dist/chunks/claudemd-1.0.13-y42xe571.mjs +1 -0
  55. package/dist/chunks/clear-1.0.13-g8a3zjew.mjs +1 -0
  56. package/dist/chunks/clearTerminal-1.0.13-4k4snh0r.mjs +1 -0
  57. package/dist/chunks/cli-1.0.13-01n6gr4q.mjs +2 -0
  58. package/dist/chunks/cli-1.0.13-0357cnwe.mjs +2 -0
  59. package/dist/chunks/cli-1.0.13-14c24kge.mjs +2 -0
  60. package/dist/chunks/cli-1.0.13-19k4k5jx.mjs +2 -0
  61. package/dist/chunks/cli-1.0.13-1dk8e4ny.mjs +3 -0
  62. package/dist/chunks/cli-1.0.13-1hcywhe5.mjs +2 -0
  63. package/dist/chunks/cli-1.0.13-1hdbaf71.mjs +3 -0
  64. package/dist/chunks/cli-1.0.13-1qbvvc2e.mjs +4 -0
  65. package/dist/chunks/cli-1.0.13-23ev2ept.mjs +45 -0
  66. package/dist/chunks/cli-1.0.13-29x94tf7.mjs +2 -0
  67. package/dist/chunks/cli-1.0.13-2x789qav.mjs +2 -0
  68. package/dist/chunks/cli-1.0.13-2xpprn71.mjs +1 -0
  69. package/dist/chunks/cli-1.0.13-2z8q1mtz.mjs +3 -0
  70. package/dist/chunks/cli-1.0.13-36yeyd1r.mjs +18 -0
  71. package/dist/chunks/cli-1.0.13-3767t4yj.mjs +4 -0
  72. package/dist/chunks/cli-1.0.13-3c13b00m.mjs +2 -0
  73. package/dist/chunks/cli-1.0.13-3dmmr756.mjs +2 -0
  74. package/dist/chunks/cli-1.0.13-3essvqs1.mjs +2 -0
  75. package/dist/chunks/cli-1.0.13-3f0zqjp8.mjs +2 -0
  76. package/dist/chunks/cli-1.0.13-3fs84evm.mjs +2 -0
  77. package/dist/chunks/cli-1.0.13-3pspajgg.mjs +15 -0
  78. package/dist/chunks/cli-1.0.13-3rqmqts3.mjs +2 -0
  79. package/dist/chunks/cli-1.0.13-449f1p6g.mjs +2 -0
  80. package/dist/chunks/cli-1.0.13-466jbd1q.mjs +2 -0
  81. package/dist/chunks/cli-1.0.13-4dp5a597.mjs +6 -0
  82. package/dist/chunks/cli-1.0.13-4x3mr6wk.mjs +2 -0
  83. package/dist/chunks/cli-1.0.13-57993qn6.mjs +2 -0
  84. package/dist/chunks/cli-1.0.13-57ez593b.mjs +3 -0
  85. package/dist/chunks/cli-1.0.13-5g7rhqvq.mjs +4 -0
  86. package/dist/chunks/cli-1.0.13-5keyjg3e.mjs +58 -0
  87. package/dist/chunks/cli-1.0.13-5m2br5vf.mjs +2 -0
  88. package/dist/chunks/cli-1.0.13-5sc2h2hm.mjs +2 -0
  89. package/dist/chunks/cli-1.0.13-5sq4jbf1.mjs +2 -0
  90. package/dist/chunks/cli-1.0.13-696y87my.mjs +18 -0
  91. package/dist/chunks/cli-1.0.13-6b6kn6sd.mjs +2 -0
  92. package/dist/chunks/cli-1.0.13-6thbqr6g.mjs +2 -0
  93. package/dist/chunks/cli-1.0.13-6vb140br.mjs +25 -0
  94. package/dist/chunks/cli-1.0.13-6w1rqgrf.mjs +2 -0
  95. package/dist/chunks/cli-1.0.13-6xc8qzyr.mjs +2 -0
  96. package/dist/chunks/cli-1.0.13-6xkw8tq6.mjs +2 -0
  97. package/dist/chunks/cli-1.0.13-7kg0qv18.mjs +2 -0
  98. package/dist/chunks/cli-1.0.13-7nmrp6gh.mjs +2 -0
  99. package/dist/chunks/cli-1.0.13-7rg014zx.mjs +5 -0
  100. package/dist/chunks/cli-1.0.13-7xfra4by.mjs +2 -0
  101. package/dist/chunks/cli-1.0.13-80pk1w5c.mjs +2 -0
  102. package/dist/chunks/cli-1.0.13-81s2z4sy.mjs +2 -0
  103. package/dist/chunks/cli-1.0.13-83vckpyr.mjs +6 -0
  104. package/dist/chunks/cli-1.0.13-8s33s84f.mjs +2 -0
  105. package/dist/chunks/cli-1.0.13-93twxc7q.mjs +2 -0
  106. package/dist/chunks/cli-1.0.13-98a94f4b.mjs +2 -0
  107. package/dist/chunks/cli-1.0.13-9ax4vv5d.mjs +2 -0
  108. package/dist/chunks/cli-1.0.13-9bh8f53y.mjs +9 -0
  109. package/dist/chunks/cli-1.0.13-9t0q538w.mjs +25 -0
  110. package/dist/chunks/cli-1.0.13-a2j673qk.mjs +2 -0
  111. package/dist/chunks/cli-1.0.13-a5641ktm.mjs +2 -0
  112. package/dist/chunks/cli-1.0.13-a77ea1ga.mjs +2 -0
  113. package/dist/chunks/cli-1.0.13-a8t9066b.mjs +2 -0
  114. package/dist/chunks/cli-1.0.13-afdk25h0.mjs +2 -0
  115. package/dist/chunks/cli-1.0.13-avxss6zg.mjs +9 -0
  116. package/dist/chunks/cli-1.0.13-bj2neb84.mjs +2 -0
  117. package/dist/chunks/cli-1.0.13-bs0esgv1.mjs +2 -0
  118. package/dist/chunks/cli-1.0.13-byhjhrrg.mjs +15 -0
  119. package/dist/chunks/cli-1.0.13-cm3q208z.mjs +2 -0
  120. package/dist/chunks/cli-1.0.13-cwce8b7b.mjs +34 -0
  121. package/dist/chunks/cli-1.0.13-d016ffc7.mjs +3 -0
  122. package/dist/chunks/cli-1.0.13-d4zr1yqd.mjs +2 -0
  123. package/dist/chunks/cli-1.0.13-d7kr7nkk.mjs +2 -0
  124. package/dist/chunks/cli-1.0.13-d9nvpqpw.mjs +2 -0
  125. package/dist/chunks/cli-1.0.13-dg21ms7f.mjs +2 -0
  126. package/dist/chunks/cli-1.0.13-dwp60tja.mjs +2 -0
  127. package/dist/chunks/cli-1.0.13-e19bb64d.mjs +4 -0
  128. package/dist/chunks/cli-1.0.13-e1m0dx6a.mjs +2 -0
  129. package/dist/chunks/cli-1.0.13-e3ca1xwv.mjs +2 -0
  130. package/dist/chunks/cli-1.0.13-e464ab16.mjs +2 -0
  131. package/dist/chunks/cli-1.0.13-e8p0r9r9.mjs +2 -0
  132. package/dist/chunks/cli-1.0.13-e9q9245e.mjs +2 -0
  133. package/dist/chunks/cli-1.0.13-ecv0stcf.mjs +2 -0
  134. package/dist/chunks/cli-1.0.13-ey9smtb0.mjs +3 -0
  135. package/dist/chunks/cli-1.0.13-f38bh25k.mjs +12 -0
  136. package/dist/chunks/cli-1.0.13-f4dfekwp.mjs +133 -0
  137. package/dist/chunks/cli-1.0.13-fb695nhr.mjs +67 -0
  138. package/dist/chunks/cli-1.0.13-fjwhbyeh.mjs +2 -0
  139. package/dist/chunks/cli-1.0.13-fpwws3z2.mjs +2 -0
  140. package/dist/chunks/cli-1.0.13-frs40s6h.mjs +2 -0
  141. package/dist/chunks/cli-1.0.13-fsmjqwpj.mjs +2 -0
  142. package/dist/chunks/cli-1.0.13-fta82vnx.mjs +2 -0
  143. package/dist/chunks/cli-1.0.13-g1rr0zfh.mjs +8 -0
  144. package/dist/chunks/cli-1.0.13-g7daabde.mjs +3 -0
  145. package/dist/chunks/cli-1.0.13-gd9e7w43.mjs +2 -0
  146. package/dist/chunks/cli-1.0.13-gsz0cygn.mjs +2 -0
  147. package/dist/chunks/cli-1.0.13-h5mwwv8w.mjs +16 -0
  148. package/dist/chunks/cli-1.0.13-hbcgx6rs.mjs +2 -0
  149. package/dist/chunks/cli-1.0.13-j0m03dqz.mjs +39 -0
  150. package/dist/chunks/cli-1.0.13-j3gww2v8.mjs +2 -0
  151. package/dist/chunks/cli-1.0.13-jdxaky02.mjs +12 -0
  152. package/dist/chunks/cli-1.0.13-jkahzkac.mjs +12 -0
  153. package/dist/chunks/cli-1.0.13-jrjz42t8.mjs +2 -0
  154. package/dist/chunks/cli-1.0.13-jsezewz5.mjs +2 -0
  155. package/dist/chunks/cli-1.0.13-jxe94sbj.mjs +2 -0
  156. package/dist/chunks/cli-1.0.13-k4znag0a.mjs +2 -0
  157. package/dist/chunks/cli-1.0.13-k71bq854.mjs +2 -0
  158. package/dist/chunks/cli-1.0.13-k8vrp1kw.mjs +2 -0
  159. package/dist/chunks/cli-1.0.13-kc1q3k9n.mjs +2 -0
  160. package/dist/chunks/cli-1.0.13-kg25kqz0.mjs +12 -0
  161. package/dist/chunks/cli-1.0.13-kmmkpfh0.mjs +2 -0
  162. package/dist/chunks/cli-1.0.13-knb8ctbq.mjs +3 -0
  163. package/dist/chunks/cli-1.0.13-kpqaz90n.mjs +7 -0
  164. package/dist/chunks/cli-1.0.13-kq0mvqax.mjs +2 -0
  165. package/dist/chunks/cli-1.0.13-kr3d94dn.mjs +5495 -0
  166. package/dist/chunks/cli-1.0.13-m5hkpjvs.mjs +2 -0
  167. package/dist/chunks/cli-1.0.13-mazxedqg.mjs +4 -0
  168. package/dist/chunks/cli-1.0.13-mtnc53tx.mjs +2 -0
  169. package/dist/chunks/cli-1.0.13-mv57kk3c.mjs +59 -0
  170. package/dist/chunks/cli-1.0.13-n4fsyme7.mjs +2 -0
  171. package/dist/chunks/cli-1.0.13-ndthc14d.mjs +2 -0
  172. package/dist/chunks/cli-1.0.13-nqw7f2pt.mjs +2 -0
  173. package/dist/chunks/cli-1.0.13-ns8m0h8r.mjs +15 -0
  174. package/dist/chunks/cli-1.0.13-p1nsb8ay.mjs +202 -0
  175. package/dist/chunks/cli-1.0.13-p43t5py0.mjs +2 -0
  176. package/dist/chunks/cli-1.0.13-p7b51har.mjs +2 -0
  177. package/dist/chunks/cli-1.0.13-pajjrc2x.mjs +2 -0
  178. package/dist/chunks/cli-1.0.13-pf0ztxpx.mjs +6 -0
  179. package/dist/chunks/cli-1.0.13-ppdtae6a.mjs +2 -0
  180. package/dist/chunks/cli-1.0.13-pwfpt641.mjs +2 -0
  181. package/dist/chunks/cli-1.0.13-q03bdpb3.mjs +17 -0
  182. package/dist/chunks/cli-1.0.13-q40za40w.mjs +50 -0
  183. package/dist/chunks/cli-1.0.13-qpnp3w6h.mjs +2 -0
  184. package/dist/chunks/cli-1.0.13-qx079tft.mjs +2 -0
  185. package/dist/chunks/cli-1.0.13-qxebhem2.mjs +2 -0
  186. package/dist/chunks/cli-1.0.13-r6v8d7e7.mjs +2 -0
  187. package/dist/chunks/cli-1.0.13-r9nmkthw.mjs +2 -0
  188. package/dist/chunks/cli-1.0.13-rcrh6wfx.mjs +4 -0
  189. package/dist/chunks/cli-1.0.13-rgk2vrkz.mjs +2 -0
  190. package/dist/chunks/cli-1.0.13-rhptvh17.mjs +2 -0
  191. package/dist/chunks/cli-1.0.13-rxd329nn.mjs +24 -0
  192. package/dist/chunks/cli-1.0.13-ry9nsg8a.mjs +2 -0
  193. package/dist/chunks/cli-1.0.13-ryajgbr3.mjs +2 -0
  194. package/dist/chunks/cli-1.0.13-s15merj9.mjs +2 -0
  195. package/dist/chunks/cli-1.0.13-s16wgevn.mjs +2 -0
  196. package/dist/chunks/cli-1.0.13-s2czjfzp.mjs +2 -0
  197. package/dist/chunks/cli-1.0.13-s2sd6xfc.mjs +24 -0
  198. package/dist/chunks/cli-1.0.13-s5bfzdbk.mjs +2 -0
  199. package/dist/chunks/cli-1.0.13-sg6bkxg3.mjs +20 -0
  200. package/dist/chunks/cli-1.0.13-shrh1g4z.mjs +2 -0
  201. package/dist/chunks/cli-1.0.13-sj8rg9wk.mjs +24 -0
  202. package/dist/chunks/cli-1.0.13-smrxt9dh.mjs +2 -0
  203. package/dist/chunks/cli-1.0.13-smtbj9fm.mjs +2 -0
  204. package/dist/chunks/cli-1.0.13-sy93t0xx.mjs +2 -0
  205. package/dist/chunks/cli-1.0.13-t1z10ay5.mjs +2 -0
  206. package/dist/chunks/cli-1.0.13-t9wrrtrh.mjs +2 -0
  207. package/dist/chunks/cli-1.0.13-tfd5mr15.mjs +17 -0
  208. package/dist/chunks/cli-1.0.13-thxvtvt4.mjs +2 -0
  209. package/dist/chunks/cli-1.0.13-tmfvcmn3.mjs +2 -0
  210. package/dist/chunks/cli-1.0.13-tnq7z8s5.mjs +3 -0
  211. package/dist/chunks/cli-1.0.13-tp2w17kc.mjs +2 -0
  212. package/dist/chunks/cli-1.0.13-tq5m4f65.mjs +2 -0
  213. package/dist/chunks/cli-1.0.13-tr0fe3hn.mjs +2 -0
  214. package/dist/chunks/cli-1.0.13-trkevtw9.mjs +2 -0
  215. package/dist/chunks/cli-1.0.13-tyhtztew.mjs +2 -0
  216. package/dist/chunks/cli-1.0.13-v1tn9wpw.mjs +21 -0
  217. package/dist/chunks/cli-1.0.13-v38n7n4p.mjs +2 -0
  218. package/dist/chunks/cli-1.0.13-v4annnm3.mjs +2 -0
  219. package/dist/chunks/cli-1.0.13-v5gjxk3n.mjs +4 -0
  220. package/dist/chunks/cli-1.0.13-v7eb8n71.mjs +133 -0
  221. package/dist/chunks/cli-1.0.13-v8tce7qz.mjs +2 -0
  222. package/dist/chunks/cli-1.0.13-vb85p8we.mjs +2 -0
  223. package/dist/chunks/cli-1.0.13-vbby2x4m.mjs +2 -0
  224. package/dist/chunks/cli-1.0.13-vd01re4x.mjs +2 -0
  225. package/dist/chunks/cli-1.0.13-vp1h8f42.mjs +2 -0
  226. package/dist/chunks/cli-1.0.13-vs4d56js.mjs +2 -0
  227. package/dist/chunks/cli-1.0.13-vv5mtvhr.mjs +2 -0
  228. package/dist/chunks/cli-1.0.13-vvtdrd6j.mjs +5 -0
  229. package/dist/chunks/cli-1.0.13-vwmq6bde.mjs +2 -0
  230. package/dist/chunks/cli-1.0.13-w5jash5n.mjs +2 -0
  231. package/dist/chunks/cli-1.0.13-w7jh58qt.mjs +2 -0
  232. package/dist/chunks/cli-1.0.13-w8wwn19j.mjs +2 -0
  233. package/dist/chunks/cli-1.0.13-wmc6ft2f.mjs +6 -0
  234. package/dist/chunks/cli-1.0.13-wrcxv50n.mjs +2 -0
  235. package/dist/chunks/cli-1.0.13-wsk4823v.mjs +2 -0
  236. package/dist/chunks/cli-1.0.13-x4xwa6y3.mjs +4 -0
  237. package/dist/chunks/cli-1.0.13-x8j9z15q.mjs +3 -0
  238. package/dist/chunks/cli-1.0.13-xajnmhak.mjs +2 -0
  239. package/dist/chunks/cli-1.0.13-xg86t5j7.mjs +2 -0
  240. package/dist/chunks/cli-1.0.13-xpc2m6vc.mjs +2 -0
  241. package/dist/chunks/cli-1.0.13-xr55511t.mjs +2 -0
  242. package/dist/chunks/cli-1.0.13-xsvz53d6.mjs +42 -0
  243. package/dist/chunks/cli-1.0.13-y1kzayxj.mjs +18 -0
  244. package/dist/chunks/cli-1.0.13-y20sjx5k.mjs +6 -0
  245. package/dist/chunks/cli-1.0.13-y6y32j2s.mjs +2 -0
  246. package/dist/chunks/cli-1.0.13-y74xv34r.mjs +4 -0
  247. package/dist/chunks/cli-1.0.13-yb1smx77.mjs +2 -0
  248. package/dist/chunks/cli-1.0.13-ymvtrfgn.mjs +4 -0
  249. package/dist/chunks/cli-1.0.13-yq7961x3.mjs +4 -0
  250. package/dist/chunks/cli-1.0.13-yr590qbp.mjs +3 -0
  251. package/dist/chunks/cli-1.0.13-z72v7rwr.mjs +2 -0
  252. package/dist/chunks/cli-1.0.13-z8vs7cc1.mjs +2 -0
  253. package/dist/chunks/cli-1.0.13-zgdatr3s.mjs +3 -0
  254. package/dist/chunks/cli-1.0.13-zmyb9smk.mjs +2 -0
  255. package/dist/chunks/cli-1.0.13-zp9tvwgh.mjs +2 -0
  256. package/dist/chunks/cli-1.0.13-zt4bek0j.mjs +2 -0
  257. package/dist/chunks/cli-1.0.13-ztqnt3qp.mjs +2 -0
  258. package/dist/chunks/cli-1.0.13-zvemnxrj.mjs +2 -0
  259. package/dist/chunks/client-1.0.13-jj0v4n27.mjs +1 -0
  260. package/dist/chunks/color-1.0.13-3v7rvzdv.mjs +1 -0
  261. package/dist/chunks/compact-1.0.13-dbdbjtdk.mjs +3 -0
  262. package/dist/chunks/config-1.0.13-3qrt3cgm.mjs +1 -0
  263. package/dist/chunks/config-1.0.13-r3hkdrhb.mjs +1 -0
  264. package/dist/chunks/constants-1.0.13-rnw6yks8.mjs +1 -0
  265. package/dist/chunks/context-1.0.13-vzh7rmzp.mjs +1 -0
  266. package/dist/chunks/context-noninteractive-1.0.13-pch5w54p.mjs +1 -0
  267. package/dist/chunks/conversation-1.0.13-deetqyn0.mjs +1 -0
  268. package/dist/chunks/copilotHeaders-1.0.13-nt9wrgp5.mjs +1 -0
  269. package/dist/chunks/copy-1.0.13-hzdas7e3.mjs +9 -0
  270. package/dist/chunks/cost-1.0.13-6nzzt5ne.mjs +1 -0
  271. package/dist/chunks/createSSHSession-1.0.13-vy3mcz3k.mjs +1 -0
  272. package/dist/chunks/createSession-1.0.13-9f9eevz2.mjs +1 -0
  273. package/dist/chunks/debug-1.0.13-f3k3n0w9.mjs +1 -0
  274. package/dist/chunks/defaultActionDeps-1.0.13-cnw858jb.mjs +1446 -0
  275. package/dist/chunks/desktop-1.0.13-e005km58.mjs +1 -0
  276. package/dist/chunks/detectRepository-1.0.13-rjbmyf6j.mjs +1 -0
  277. package/dist/chunks/detection-1.0.13-fmg4e9cn.mjs +1 -0
  278. package/dist/chunks/diff-1.0.13-9jypv082.mjs +1 -0
  279. package/dist/chunks/doctor-1.0.13-8tdcwyds.mjs +1 -0
  280. package/dist/chunks/doctorDiagnostic-1.0.13-01b5f1qr.mjs +1 -0
  281. package/dist/chunks/earlyInput-1.0.13-qdaqzn87.mjs +1 -0
  282. package/dist/chunks/effort-1.0.13-xfj9x3jk.mjs +10 -0
  283. package/dist/chunks/engine-1.0.13-8zd1smqp.mjs +1 -0
  284. package/dist/chunks/envLessBridgeConfig-1.0.13-3pv6cjbw.mjs +1 -0
  285. package/dist/chunks/envUtils-1.0.13-vcp6531a.mjs +1 -0
  286. package/dist/chunks/environmentSelection-1.0.13-jeanv46d.mjs +1 -0
  287. package/dist/chunks/environments-1.0.13-w5a33d52.mjs +1 -0
  288. package/dist/chunks/errors-1.0.13-wrs4k863.mjs +1 -0
  289. package/dist/chunks/exampleCommands-1.0.13-f3v5223v.mjs +1 -0
  290. package/dist/chunks/execFileNoThrow-1.0.13-5qgqf50q.mjs +1 -0
  291. package/dist/chunks/exit-1.0.13-dkp2e02s.mjs +1 -0
  292. package/dist/chunks/explorer-1.0.13-0c0437ts.mjs +1 -0
  293. package/dist/chunks/export-1.0.13-cbatvd1c.mjs +2 -0
  294. package/dist/chunks/extra-usage-1.0.13-tm9dn26m.mjs +1 -0
  295. package/dist/chunks/extra-usage-noninteractive-1.0.13-tyfdd6zc.mjs +1 -0
  296. package/dist/chunks/fast-1.0.13-m2jj5axh.mjs +1 -0
  297. package/dist/chunks/feedback-1.0.13-3rc5sphe.mjs +14 -0
  298. package/dist/chunks/firstPartyEventLogger-1.0.13-9cqvyyy3.mjs +1 -0
  299. package/dist/chunks/git-1.0.13-9196pgzv.mjs +1 -0
  300. package/dist/chunks/githubModelsCredentials-1.0.13-h8fyv4hh.mjs +1 -0
  301. package/dist/chunks/goal-1.0.13-cty957vz.mjs +4 -0
  302. package/dist/chunks/grove-1.0.13-jew4jmvf.mjs +1 -0
  303. package/dist/chunks/growthbook-1.0.13-q8xh656p.mjs +1 -0
  304. package/dist/chunks/headless-1.0.13-h0c3ze3f.mjs +2 -0
  305. package/dist/chunks/heapdump-1.0.13-ndzc9093.mjs +6 -0
  306. package/dist/chunks/help-1.0.13-em333cwb.mjs +1 -0
  307. package/dist/chunks/hookChains-1.0.13-ytcm9p3p.mjs +3 -0
  308. package/dist/chunks/hooks-1.0.13-43xm69rv.mjs +79 -0
  309. package/dist/chunks/hooks-1.0.13-xa6gpzvq.mjs +1 -0
  310. package/dist/chunks/ide-1.0.13-4z1afk08.mjs +3 -0
  311. package/dist/chunks/image-processor-napi-1.0.13-e53cs6qw.mjs +1 -0
  312. package/dist/chunks/inboundAttachments-1.0.13-968zpe6v.mjs +1 -0
  313. package/dist/chunks/index-1.0.13-361h9v63.mjs +1 -0
  314. package/dist/chunks/index-1.0.13-4p1eb2pq.mjs +1 -0
  315. package/dist/chunks/index-1.0.13-55th4hhq.mjs +1 -0
  316. package/dist/chunks/index-1.0.13-55vgc9cr.mjs +1 -0
  317. package/dist/chunks/index-1.0.13-5gqy8x3m.mjs +1 -0
  318. package/dist/chunks/index-1.0.13-792fhv61.mjs +1 -0
  319. package/dist/chunks/index-1.0.13-8k0904bs.mjs +1 -0
  320. package/dist/chunks/index-1.0.13-ace8202d.mjs +2 -0
  321. package/dist/chunks/index-1.0.13-e20f9w6f.mjs +1 -0
  322. package/dist/chunks/index-1.0.13-efh2qbe0.mjs +1 -0
  323. package/dist/chunks/index-1.0.13-ej84k860.mjs +1 -0
  324. package/dist/chunks/index-1.0.13-fnd36467.mjs +2 -0
  325. package/dist/chunks/index-1.0.13-hdvj3xyt.mjs +30 -0
  326. package/dist/chunks/index-1.0.13-hgbqf3v1.mjs +1 -0
  327. package/dist/chunks/index-1.0.13-j0146ntq.mjs +1 -0
  328. package/dist/chunks/index-1.0.13-jackh0p4.mjs +17 -0
  329. package/dist/chunks/index-1.0.13-kfmh713v.mjs +9 -0
  330. package/dist/chunks/index-1.0.13-mrvd3mn4.mjs +1 -0
  331. package/dist/chunks/index-1.0.13-rrm8s54m.mjs +1 -0
  332. package/dist/chunks/index-1.0.13-vgmxqgw6.mjs +1 -0
  333. package/dist/chunks/index-1.0.13-xgbfdr5p.mjs +5 -0
  334. package/dist/chunks/index-1.0.13-y5wahjbd.mjs +9 -0
  335. package/dist/chunks/index-1.0.13-ykat42gv.mjs +1 -0
  336. package/dist/chunks/init-1.0.13-pyw980be.mjs +1 -0
  337. package/dist/chunks/initReplBridge-1.0.13-8pye5m3y.mjs +1 -0
  338. package/dist/chunks/ink-1.0.13-4ks3vqg1.mjs +1 -0
  339. package/dist/chunks/insights-1.0.13-8p04qt4e.mjs +870 -0
  340. package/dist/chunks/install-1.0.13-afmkvg4q.mjs +1 -0
  341. package/dist/chunks/install-github-app-1.0.13-nybxp9y9.mjs +149 -0
  342. package/dist/chunks/install-slack-app-1.0.13-ghycqjsr.mjs +1 -0
  343. package/dist/chunks/instrumentation-1.0.13-35rtw7fn.mjs +1 -0
  344. package/dist/chunks/interactiveHelpers-1.0.13-16ydy7kk.mjs +1 -0
  345. package/dist/chunks/keybindings-1.0.13-nt63s9bg.mjs +2 -0
  346. package/dist/chunks/knowledge-1.0.13-g9wcredx.mjs +2 -0
  347. package/dist/chunks/latestVersionCache-1.0.13-783kmyc1.mjs +1 -0
  348. package/dist/chunks/loadAgentsDir-1.0.13-btkcbfn1.mjs +1 -0
  349. package/dist/chunks/loadPluginHooks-1.0.13-6cxg0hz0.mjs +1 -0
  350. package/dist/chunks/loadPluginHooks-1.0.13-tf6npdgj.mjs +1 -0
  351. package/dist/chunks/log-1.0.13-3sscdqcx.mjs +1 -0
  352. package/dist/chunks/main-1.0.13-h958ytkv.mjs +1 -0
  353. package/dist/chunks/managedEnv-1.0.13-kcy78mg2.mjs +1 -0
  354. package/dist/chunks/mcp-1.0.13-gwfzhgtm.mjs +4 -0
  355. package/dist/chunks/mcp-1.0.13-s9hvy6a1.mjs +1 -0
  356. package/dist/chunks/mcp-1.0.13-vathcxfe.mjs +17 -0
  357. package/dist/chunks/mcpb-1.0.13-ynwdmrgy.mjs +1 -0
  358. package/dist/chunks/memory-1.0.13-y5pgdmp0.mjs +72 -0
  359. package/dist/chunks/model-1.0.13-28wkmva5.mjs +2 -0
  360. package/dist/chunks/model-1.0.13-wbne69bf.mjs +1 -0
  361. package/dist/chunks/node-1.0.13-jb6nf3sf.mjs +12 -0
  362. package/dist/chunks/oauth-1.0.13-x9g8753d.mjs +1 -0
  363. package/dist/chunks/openaiShim-1.0.13-dmzfpj84.mjs +14 -0
  364. package/dist/chunks/output-style-1.0.13-dkm9cvhh.mjs +1 -0
  365. package/dist/chunks/package-2VNCXFNY-1.0.13-c2rzk5s5.mjs +1 -0
  366. package/dist/chunks/parseConnectUrl-1.0.13-drfxxfbm.mjs +1 -0
  367. package/dist/chunks/parser-1.0.13-2a4gxkj4.mjs +1 -0
  368. package/dist/chunks/passes-1.0.13-xe1s3afm.mjs +1 -0
  369. package/dist/chunks/permissions-1.0.13-091a123r.mjs +1 -0
  370. package/dist/chunks/permissions-1.0.13-de2kak1c.mjs +3 -0
  371. package/dist/chunks/plan-1.0.13-nq51yj1w.mjs +1 -0
  372. package/dist/chunks/plist-1.0.13-9jnyqg5e.mjs +1 -0
  373. package/dist/chunks/plugin-1.0.13-ravfdrab.mjs +29 -0
  374. package/dist/chunks/pluginStartupCheck-1.0.13-bpnvrbf5.mjs +1 -0
  375. package/dist/chunks/plugins-1.0.13-2g0zcvmn.mjs +9 -0
  376. package/dist/chunks/preActionHook-1.0.13-sh1garss.mjs +2 -0
  377. package/dist/chunks/print-1.0.13-fbmdzf5h.mjs +57 -0
  378. package/dist/chunks/privacy-settings-1.0.13-xmggzdjb.mjs +1 -0
  379. package/dist/chunks/process-1.0.13-yvqmferw.mjs +1 -0
  380. package/dist/chunks/processBashCommand-1.0.13-vymx613b.mjs +1 -0
  381. package/dist/chunks/processSlashCommand-1.0.13-t2b59q54.mjs +9 -0
  382. package/dist/chunks/prompt-1.0.13-5rf0rmyz.mjs +1 -0
  383. package/dist/chunks/prompt-1.0.13-z2a6q0v3.mjs +1 -0
  384. package/dist/chunks/prompts-1.0.13-xntc8d09.mjs +1 -0
  385. package/dist/chunks/protocolHandler-1.0.13-c5pks46d.mjs +13 -0
  386. package/dist/chunks/provider-1.0.13-zfgjs99b.mjs +2 -0
  387. package/dist/chunks/providerProfiles-1.0.13-rk6z9ker.mjs +1 -0
  388. package/dist/chunks/providerValidation-1.0.13-w8m526k7.mjs +6 -0
  389. package/dist/chunks/rate-limit-options-1.0.13-2a7ezwjq.mjs +1 -0
  390. package/dist/chunks/registerSubcommands-1.0.13-fdj1d2vn.mjs +34 -0
  391. package/dist/chunks/registry-1.0.13-p4zgn33y.mjs +1 -0
  392. package/dist/chunks/release-notes-1.0.13-pgzcje06.mjs +5 -0
  393. package/dist/chunks/reload-plugins-1.0.13-6chpnefr.mjs +2 -0
  394. package/dist/chunks/remote-env-1.0.13-j1xk0q03.mjs +1 -0
  395. package/dist/chunks/remoteBridgeCore-1.0.13-ffh4q93x.mjs +1 -0
  396. package/dist/chunks/remoteSession-1.0.13-h715mcc6.mjs +1 -0
  397. package/dist/chunks/rename-1.0.13-x7fma5b1.mjs +1 -0
  398. package/dist/chunks/replBridgeHandle-1.0.13-d1r6xsjs.mjs +1 -0
  399. package/dist/chunks/replLauncher-1.0.13-bhshyrk2.mjs +1 -0
  400. package/dist/chunks/resume-1.0.13-g7w8k889.mjs +2 -0
  401. package/dist/chunks/rewind-1.0.13-9wf9gqtz.mjs +1 -0
  402. package/dist/chunks/rootOptions-1.0.13-7y485878.mjs +1 -0
  403. package/dist/chunks/runWorkflowHeadless-1.0.13-rv0anxz7.mjs +10 -0
  404. package/dist/chunks/sandbox-adapter-1.0.13-kvcvaae5.mjs +1 -0
  405. package/dist/chunks/sandbox-toggle-1.0.13-gzeexqb1.mjs +1 -0
  406. package/dist/chunks/session-1.0.13-hyhbhvkf.mjs +2 -0
  407. package/dist/chunks/sessionDiscovery-1.0.13-525ff4qc.mjs +1 -0
  408. package/dist/chunks/sessionFileAccessHooks-1.0.13-52whtstc.mjs +1 -0
  409. package/dist/chunks/sessionStorage-1.0.13-r00sygqv.mjs +1 -0
  410. package/dist/chunks/settings-1.0.13-sm1hpt00.mjs +1 -0
  411. package/dist/chunks/setup-1.0.13-7y88y2kn.mjs +5 -0
  412. package/dist/chunks/sinks-1.0.13-4g18qqzg.mjs +1 -0
  413. package/dist/chunks/skills-1.0.13-cpct3g7k.mjs +1 -0
  414. package/dist/chunks/startupProfiler-1.0.13-x0k3gz44.mjs +1 -0
  415. package/dist/chunks/startupUpdateCheck-1.0.13-n4bzta5q.mjs +1 -0
  416. package/dist/chunks/state-1.0.13-zq29wtdm.mjs +1 -0
  417. package/dist/chunks/stats-1.0.13-q0gfz40a.mjs +6 -0
  418. package/dist/chunks/status-1.0.13-t69r10gd.mjs +1 -0
  419. package/dist/chunks/stickers-1.0.13-1vnk8fs0.mjs +1 -0
  420. package/dist/chunks/subprocessEnv-1.0.13-1qaxx1mm.mjs +1 -0
  421. package/dist/chunks/tasks-1.0.13-xbf05jds.mjs +1 -0
  422. package/dist/chunks/teamHelpers-1.0.13-ajaffjmv.mjs +1 -0
  423. package/dist/chunks/teammateModeSnapshot-1.0.13-0se6apnj.mjs +1 -0
  424. package/dist/chunks/teleport-1.0.13-fy5929dz.mjs +1 -0
  425. package/dist/chunks/terminalSetup-1.0.13-6vb6xv4h.mjs +1 -0
  426. package/dist/chunks/theme-1.0.13-qh1caywb.mjs +1 -0
  427. package/dist/chunks/thinkback-1.0.13-yxqc5snt.mjs +1 -0
  428. package/dist/chunks/thinkback-play-1.0.13-4zdbm8qa.mjs +1 -0
  429. package/dist/chunks/toolPool-1.0.13-p41w5yd3.mjs +1 -0
  430. package/dist/chunks/toolSearch-1.0.13-4behydd7.mjs +1 -0
  431. package/dist/chunks/tools-1.0.13-vkf5gwtw.mjs +1 -0
  432. package/dist/chunks/trustedDevice-1.0.13-zafdrn99.mjs +1 -0
  433. package/dist/chunks/turndown.cjs-1.0.13-jyfkbj9m.mjs +69 -0
  434. package/dist/chunks/types-1.0.13-7xc46cqv.mjs +1 -0
  435. package/dist/chunks/ultrareviewCommand-1.0.13-3bz6pfy0.mjs +4 -0
  436. package/dist/chunks/update-1.0.13-yevsj7ad.mjs +88 -0
  437. package/dist/chunks/upgrade-1.0.13-exvdsfcj.mjs +1 -0
  438. package/dist/chunks/upload-1.0.13-hnnrtgrv.mjs +7 -0
  439. package/dist/chunks/upstreamproxy-1.0.13-qgbvmb0r.mjs +14 -0
  440. package/dist/chunks/url-handler-napi-1.0.13-7wjfhqg3.mjs +1 -0
  441. package/dist/chunks/usage-1.0.13-jvdr40ma.mjs +1 -0
  442. package/dist/chunks/util-1.0.13-87gxb90q.mjs +1 -0
  443. package/dist/chunks/utils-1.0.13-c5pe460e.mjs +1 -0
  444. package/dist/chunks/vim-1.0.13-nkrbsse9.mjs +1 -0
  445. package/dist/chunks/watchLoop-1.0.13-922mtars.mjs +13 -0
  446. package/dist/chunks/watcher-1.0.13-pt4sgafn.mjs +1 -0
  447. package/dist/chunks/wiki-1.0.13-swp7dc6p.mjs +132 -0
  448. package/dist/chunks/workflows-1.0.13-ykfca04r.mjs +1 -0
  449. package/dist/chunks/worktree-1.0.13-9m47x8ty.mjs +1 -0
  450. package/dist/chunks/worktreeModeEnabled-1.0.13-3jrpyzfm.mjs +1 -0
  451. package/dist/chunks/wrapper-1.0.13-2myaas4p.mjs +7 -0
  452. package/dist/cli.mjs +2 -2
  453. package/package.json +9 -9
  454. package/dist/chunks/AgentTool-1.0.11-51wwd7wk.mjs +0 -1
  455. package/dist/chunks/App-1.0.11-pm9011yz.mjs +0 -1
  456. package/dist/chunks/ApproveApiKey-1.0.11-brap6ck8.mjs +0 -1
  457. package/dist/chunks/AssistantSessionChooser-1.0.11-jnc5xewa.mjs +0 -1
  458. package/dist/chunks/AutoModeOptInDialog-1.0.11-xqtjcrwz.mjs +0 -1
  459. package/dist/chunks/BypassPermissionsModeDialog-1.0.11-bxa57c6k.mjs +0 -1
  460. package/dist/chunks/ClaudeMdExternalIncludesDialog-1.0.11-mjk4k0cx.mjs +0 -1
  461. package/dist/chunks/ConsoleOAuthFlow-1.0.11-28pf6qdg.mjs +0 -1
  462. package/dist/chunks/DiffDialog-1.0.11-1t1esa8x.mjs +0 -7
  463. package/dist/chunks/Doctor-1.0.11-8ph3cvb4.mjs +0 -1
  464. package/dist/chunks/ExplorerDialog-1.0.11-vmj5g24t.mjs +0 -6
  465. package/dist/chunks/Grove-1.0.11-gqz1s2hw.mjs +0 -1
  466. package/dist/chunks/ITermBackend-1.0.11-sp997kvb.mjs +0 -1
  467. package/dist/chunks/InvalidConfigDialog-1.0.11-rsg2ab6t.mjs +0 -1
  468. package/dist/chunks/InvalidSettingsDialog-1.0.11-ryxhg4xz.mjs +0 -1
  469. package/dist/chunks/MigrationDialog-1.0.11-zz173d7f.mjs +0 -1
  470. package/dist/chunks/Onboarding-1.0.11-wpyzhmgg.mjs +0 -1
  471. package/dist/chunks/ProviderManager-1.0.11-snwn3vnq.mjs +0 -1
  472. package/dist/chunks/REPL-1.0.11-es569p75.mjs +0 -1
  473. package/dist/chunks/ResumeConversation-1.0.11-nzzsenn0.mjs +0 -1
  474. package/dist/chunks/SnapshotUpdateDialog-1.0.11-m4xce3w5.mjs +0 -1
  475. package/dist/chunks/TeleportProgress-1.0.11-9fvywbm0.mjs +0 -1
  476. package/dist/chunks/TeleportRepoMismatchDialog-1.0.11-771nz956.mjs +0 -1
  477. package/dist/chunks/TeleportResumeWrapper-1.0.11-rd3v56nj.mjs +0 -1
  478. package/dist/chunks/TmuxBackend-1.0.11-k9k5y3y4.mjs +0 -9
  479. package/dist/chunks/ToolSearchTool-1.0.11-0cdptpgv.mjs +0 -1
  480. package/dist/chunks/TrustDialog-1.0.11-hsv11vk4.mjs +0 -1
  481. package/dist/chunks/activeProvider-1.0.11-p0x6aawy.mjs +0 -1
  482. package/dist/chunks/add-dir-1.0.11-v1gcads2.mjs +0 -1
  483. package/dist/chunks/agentTypes-1.0.11-3gahzent.mjs +0 -1
  484. package/dist/chunks/agents-1.0.11-5cce4kg1.mjs +0 -3
  485. package/dist/chunks/agents-1.0.11-g1tyqxn4.mjs +0 -110
  486. package/dist/chunks/api-1.0.11-p56n9vgp.mjs +0 -1
  487. package/dist/chunks/asciicast-1.0.11-zxg6ccb8.mjs +0 -1
  488. package/dist/chunks/assistant-1.0.11-99e046z4.mjs +0 -1
  489. package/dist/chunks/auth-1.0.11-2f1jz2ja.mjs +0 -1
  490. package/dist/chunks/auth-1.0.11-c765544a.mjs +0 -1
  491. package/dist/chunks/autoMode-1.0.11-0azcy0cz.mjs +0 -48
  492. package/dist/chunks/autoUpdater-1.0.11-w9kx7xt1.mjs +0 -1
  493. package/dist/chunks/backgroundHousekeeping-1.0.11-2aqxrfna.mjs +0 -1
  494. package/dist/chunks/branch-1.0.11-fn3555x1.mjs +0 -4
  495. package/dist/chunks/bridge-1.0.11-vhgwj7ny.mjs +0 -2
  496. package/dist/chunks/bridgeConfig-1.0.11-1pk1ews4.mjs +0 -1
  497. package/dist/chunks/bridgeEnabled-1.0.11-9s33fn2r.mjs +0 -1
  498. package/dist/chunks/bridgeMain-1.0.11-r8f8gzeb.mjs +0 -88
  499. package/dist/chunks/bridgePointer-1.0.11-6gtx4d2f.mjs +0 -1
  500. package/dist/chunks/btw-1.0.11-njxjksj7.mjs +0 -1
  501. package/dist/chunks/buddy-1.0.11-691ezen5.mjs +0 -3
  502. package/dist/chunks/cacache-1.0.11-fzw2ra6s.mjs +0 -1
  503. package/dist/chunks/cache-probe-1.0.11-5m649n3w.mjs +0 -21
  504. package/dist/chunks/cacheStats-1.0.11-vk1bb0kj.mjs +0 -4
  505. package/dist/chunks/caches-1.0.11-vcprvzgt.mjs +0 -1
  506. package/dist/chunks/claudeDesktop-1.0.11-z6vfzw1r.mjs +0 -1
  507. package/dist/chunks/claudemd-1.0.11-nnrcfp85.mjs +0 -1
  508. package/dist/chunks/clear-1.0.11-c4v85tmh.mjs +0 -1
  509. package/dist/chunks/clearTerminal-1.0.11-kqsh7p0y.mjs +0 -1
  510. package/dist/chunks/cli-1.0.11-0080tds0.mjs +0 -2
  511. package/dist/chunks/cli-1.0.11-02c1mb73.mjs +0 -2
  512. package/dist/chunks/cli-1.0.11-04bmcgy4.mjs +0 -3
  513. package/dist/chunks/cli-1.0.11-0h29g56n.mjs +0 -12
  514. package/dist/chunks/cli-1.0.11-0hgxjye5.mjs +0 -2
  515. package/dist/chunks/cli-1.0.11-0k9vxqqs.mjs +0 -2
  516. package/dist/chunks/cli-1.0.11-0p1zjqp0.mjs +0 -3
  517. package/dist/chunks/cli-1.0.11-0ygk88t0.mjs +0 -2
  518. package/dist/chunks/cli-1.0.11-17xvt04z.mjs +0 -1
  519. package/dist/chunks/cli-1.0.11-1bd5qq69.mjs +0 -2
  520. package/dist/chunks/cli-1.0.11-1dfxqwgc.mjs +0 -2
  521. package/dist/chunks/cli-1.0.11-1egpf6qs.mjs +0 -3
  522. package/dist/chunks/cli-1.0.11-1h7wxdn7.mjs +0 -4
  523. package/dist/chunks/cli-1.0.11-1yxgtmp3.mjs +0 -2
  524. package/dist/chunks/cli-1.0.11-20fenyw9.mjs +0 -2
  525. package/dist/chunks/cli-1.0.11-20pm81fa.mjs +0 -2
  526. package/dist/chunks/cli-1.0.11-21pm4290.mjs +0 -2
  527. package/dist/chunks/cli-1.0.11-2f4t6spn.mjs +0 -2
  528. package/dist/chunks/cli-1.0.11-2ge7zan7.mjs +0 -6
  529. package/dist/chunks/cli-1.0.11-2mxpjt2m.mjs +0 -2
  530. package/dist/chunks/cli-1.0.11-2nbsr4t1.mjs +0 -24
  531. package/dist/chunks/cli-1.0.11-31z6bxf0.mjs +0 -2
  532. package/dist/chunks/cli-1.0.11-34p85p1q.mjs +0 -2
  533. package/dist/chunks/cli-1.0.11-3asbkm7z.mjs +0 -15
  534. package/dist/chunks/cli-1.0.11-3m3v9403.mjs +0 -2
  535. package/dist/chunks/cli-1.0.11-3r6e6fsh.mjs +0 -2
  536. package/dist/chunks/cli-1.0.11-3vhtf247.mjs +0 -2
  537. package/dist/chunks/cli-1.0.11-4ae83btb.mjs +0 -2
  538. package/dist/chunks/cli-1.0.11-4bzn0waz.mjs +0 -2
  539. package/dist/chunks/cli-1.0.11-4c594q99.mjs +0 -2
  540. package/dist/chunks/cli-1.0.11-4cr2bh6m.mjs +0 -18
  541. package/dist/chunks/cli-1.0.11-4e7jvdzx.mjs +0 -2
  542. package/dist/chunks/cli-1.0.11-4hjx21ar.mjs +0 -4
  543. package/dist/chunks/cli-1.0.11-4j1ph26v.mjs +0 -5
  544. package/dist/chunks/cli-1.0.11-4pgk7w6b.mjs +0 -2
  545. package/dist/chunks/cli-1.0.11-4qv7w4kd.mjs +0 -2
  546. package/dist/chunks/cli-1.0.11-4tk11fqk.mjs +0 -2
  547. package/dist/chunks/cli-1.0.11-52j8yhqv.mjs +0 -2
  548. package/dist/chunks/cli-1.0.11-570zfkf5.mjs +0 -2
  549. package/dist/chunks/cli-1.0.11-62faj8qv.mjs +0 -2
  550. package/dist/chunks/cli-1.0.11-632mfg4h.mjs +0 -4
  551. package/dist/chunks/cli-1.0.11-6j7kbwbk.mjs +0 -2
  552. package/dist/chunks/cli-1.0.11-6wkx2g7v.mjs +0 -2
  553. package/dist/chunks/cli-1.0.11-6x5rqzvq.mjs +0 -2
  554. package/dist/chunks/cli-1.0.11-6xv0bp4t.mjs +0 -2
  555. package/dist/chunks/cli-1.0.11-705n21zz.mjs +0 -2
  556. package/dist/chunks/cli-1.0.11-70hj75wn.mjs +0 -2
  557. package/dist/chunks/cli-1.0.11-70kbq4w3.mjs +0 -2
  558. package/dist/chunks/cli-1.0.11-738xq402.mjs +0 -2
  559. package/dist/chunks/cli-1.0.11-7a79h2zt.mjs +0 -2
  560. package/dist/chunks/cli-1.0.11-7b3wvn2z.mjs +0 -18
  561. package/dist/chunks/cli-1.0.11-7gjndyyt.mjs +0 -2
  562. package/dist/chunks/cli-1.0.11-7nazvd1q.mjs +0 -2
  563. package/dist/chunks/cli-1.0.11-7t17zc1z.mjs +0 -59
  564. package/dist/chunks/cli-1.0.11-7vb4qcgq.mjs +0 -9
  565. package/dist/chunks/cli-1.0.11-80ek75w2.mjs +0 -12
  566. package/dist/chunks/cli-1.0.11-81ck35ky.mjs +0 -2
  567. package/dist/chunks/cli-1.0.11-8864t240.mjs +0 -199
  568. package/dist/chunks/cli-1.0.11-8ez7ws7j.mjs +0 -2
  569. package/dist/chunks/cli-1.0.11-8h81b3r6.mjs +0 -2
  570. package/dist/chunks/cli-1.0.11-8tbkr5te.mjs +0 -2
  571. package/dist/chunks/cli-1.0.11-90brgsm0.mjs +0 -25
  572. package/dist/chunks/cli-1.0.11-94m7sqz0.mjs +0 -6
  573. package/dist/chunks/cli-1.0.11-94mhst9e.mjs +0 -2
  574. package/dist/chunks/cli-1.0.11-95zkxz27.mjs +0 -2
  575. package/dist/chunks/cli-1.0.11-9ewzkxjm.mjs +0 -2
  576. package/dist/chunks/cli-1.0.11-9gw1e2pa.mjs +0 -2
  577. package/dist/chunks/cli-1.0.11-9kcjny4c.mjs +0 -2
  578. package/dist/chunks/cli-1.0.11-9sz2xbqw.mjs +0 -20
  579. package/dist/chunks/cli-1.0.11-9x0cm4c2.mjs +0 -58
  580. package/dist/chunks/cli-1.0.11-ajtmhz2b.mjs +0 -4
  581. package/dist/chunks/cli-1.0.11-ak9ykkzx.mjs +0 -2
  582. package/dist/chunks/cli-1.0.11-akfr5v7n.mjs +0 -2
  583. package/dist/chunks/cli-1.0.11-akzn9130.mjs +0 -2
  584. package/dist/chunks/cli-1.0.11-aqdmvhz2.mjs +0 -2
  585. package/dist/chunks/cli-1.0.11-b0qj7met.mjs +0 -2
  586. package/dist/chunks/cli-1.0.11-b9fszk50.mjs +0 -3
  587. package/dist/chunks/cli-1.0.11-bemvf7h4.mjs +0 -2
  588. package/dist/chunks/cli-1.0.11-bfj4emzk.mjs +0 -2
  589. package/dist/chunks/cli-1.0.11-bgygdezr.mjs +0 -9
  590. package/dist/chunks/cli-1.0.11-bh58g0t0.mjs +0 -25
  591. package/dist/chunks/cli-1.0.11-bp5zjnce.mjs +0 -3
  592. package/dist/chunks/cli-1.0.11-bq3nkc2q.mjs +0 -3
  593. package/dist/chunks/cli-1.0.11-bv0chgkc.mjs +0 -2
  594. package/dist/chunks/cli-1.0.11-c856qv0y.mjs +0 -8
  595. package/dist/chunks/cli-1.0.11-c8drtmtf.mjs +0 -2
  596. package/dist/chunks/cli-1.0.11-c8xnk02a.mjs +0 -2
  597. package/dist/chunks/cli-1.0.11-c9xzrrj5.mjs +0 -67
  598. package/dist/chunks/cli-1.0.11-cd2qwe1h.mjs +0 -2
  599. package/dist/chunks/cli-1.0.11-cgt4nhqg.mjs +0 -2
  600. package/dist/chunks/cli-1.0.11-cngn2t9n.mjs +0 -24
  601. package/dist/chunks/cli-1.0.11-cppy8zkf.mjs +0 -4
  602. package/dist/chunks/cli-1.0.11-ct42xhge.mjs +0 -2
  603. package/dist/chunks/cli-1.0.11-cw7m4yzj.mjs +0 -2
  604. package/dist/chunks/cli-1.0.11-d4v6gsvj.mjs +0 -50
  605. package/dist/chunks/cli-1.0.11-de9w6fg6.mjs +0 -4
  606. package/dist/chunks/cli-1.0.11-djshp3ed.mjs +0 -5
  607. package/dist/chunks/cli-1.0.11-dm8dxp4h.mjs +0 -2
  608. package/dist/chunks/cli-1.0.11-dmn1n7wp.mjs +0 -2
  609. package/dist/chunks/cli-1.0.11-esgphm1d.mjs +0 -4
  610. package/dist/chunks/cli-1.0.11-et4kv86h.mjs +0 -17
  611. package/dist/chunks/cli-1.0.11-extzyw8w.mjs +0 -2
  612. package/dist/chunks/cli-1.0.11-f5r9n4eb.mjs +0 -2
  613. package/dist/chunks/cli-1.0.11-fwf1nf98.mjs +0 -2
  614. package/dist/chunks/cli-1.0.11-g0b3tp96.mjs +0 -2
  615. package/dist/chunks/cli-1.0.11-gasqmqy8.mjs +0 -2
  616. package/dist/chunks/cli-1.0.11-gb00rzej.mjs +0 -2
  617. package/dist/chunks/cli-1.0.11-gfzsazcc.mjs +0 -2
  618. package/dist/chunks/cli-1.0.11-ghrb1zty.mjs +0 -133
  619. package/dist/chunks/cli-1.0.11-gt57f2g4.mjs +0 -4
  620. package/dist/chunks/cli-1.0.11-gzhzsfkx.mjs +0 -2
  621. package/dist/chunks/cli-1.0.11-h73m5bnx.mjs +0 -2
  622. package/dist/chunks/cli-1.0.11-ha0ah5jk.mjs +0 -2
  623. package/dist/chunks/cli-1.0.11-j1hrkh1n.mjs +0 -42
  624. package/dist/chunks/cli-1.0.11-j1kqr7mn.mjs +0 -3
  625. package/dist/chunks/cli-1.0.11-j65xt6ja.mjs +0 -2
  626. package/dist/chunks/cli-1.0.11-ja63j933.mjs +0 -24
  627. package/dist/chunks/cli-1.0.11-jdchy6a2.mjs +0 -2
  628. package/dist/chunks/cli-1.0.11-jq7g10mp.mjs +0 -2
  629. package/dist/chunks/cli-1.0.11-jstx49pw.mjs +0 -15
  630. package/dist/chunks/cli-1.0.11-k05030ph.mjs +0 -2
  631. package/dist/chunks/cli-1.0.11-kgv9rg65.mjs +0 -45
  632. package/dist/chunks/cli-1.0.11-kknpw2ax.mjs +0 -6
  633. package/dist/chunks/cli-1.0.11-m2ch23x4.mjs +0 -2
  634. package/dist/chunks/cli-1.0.11-m46yk2mx.mjs +0 -4
  635. package/dist/chunks/cli-1.0.11-m5w4w38j.mjs +0 -2
  636. package/dist/chunks/cli-1.0.11-m697h6wz.mjs +0 -3
  637. package/dist/chunks/cli-1.0.11-mjfpmm2a.mjs +0 -2
  638. package/dist/chunks/cli-1.0.11-my4mtasz.mjs +0 -2
  639. package/dist/chunks/cli-1.0.11-myxwbejm.mjs +0 -2
  640. package/dist/chunks/cli-1.0.11-n16smrqc.mjs +0 -2
  641. package/dist/chunks/cli-1.0.11-n1p3f6p7.mjs +0 -3
  642. package/dist/chunks/cli-1.0.11-n530dz5v.mjs +0 -2
  643. package/dist/chunks/cli-1.0.11-n6nabvk7.mjs +0 -2
  644. package/dist/chunks/cli-1.0.11-nfs11yt4.mjs +0 -2
  645. package/dist/chunks/cli-1.0.11-nhebbwew.mjs +0 -15
  646. package/dist/chunks/cli-1.0.11-nmdqvy3x.mjs +0 -2
  647. package/dist/chunks/cli-1.0.11-nnb7707z.mjs +0 -2
  648. package/dist/chunks/cli-1.0.11-p00y0fsg.mjs +0 -2
  649. package/dist/chunks/cli-1.0.11-p3zd6rr3.mjs +0 -34
  650. package/dist/chunks/cli-1.0.11-p9dpg606.mjs +0 -2
  651. package/dist/chunks/cli-1.0.11-pc02gtn4.mjs +0 -2
  652. package/dist/chunks/cli-1.0.11-pfdfw3q0.mjs +0 -2
  653. package/dist/chunks/cli-1.0.11-pggbs1cj.mjs +0 -3
  654. package/dist/chunks/cli-1.0.11-pgv1kx0w.mjs +0 -7
  655. package/dist/chunks/cli-1.0.11-pkx58bcd.mjs +0 -2
  656. package/dist/chunks/cli-1.0.11-ptqnwbvy.mjs +0 -2
  657. package/dist/chunks/cli-1.0.11-pws7rx3y.mjs +0 -2
  658. package/dist/chunks/cli-1.0.11-pyzn99ct.mjs +0 -18
  659. package/dist/chunks/cli-1.0.11-q5ssc147.mjs +0 -2
  660. package/dist/chunks/cli-1.0.11-qe2vnh5s.mjs +0 -2
  661. package/dist/chunks/cli-1.0.11-qj58rk0t.mjs +0 -2
  662. package/dist/chunks/cli-1.0.11-qt9hfn47.mjs +0 -2
  663. package/dist/chunks/cli-1.0.11-qxncga3e.mjs +0 -2
  664. package/dist/chunks/cli-1.0.11-qxyeygmt.mjs +0 -2
  665. package/dist/chunks/cli-1.0.11-r2ms1cmp.mjs +0 -2
  666. package/dist/chunks/cli-1.0.11-r5z57f1e.mjs +0 -3
  667. package/dist/chunks/cli-1.0.11-razjnz1w.mjs +0 -2
  668. package/dist/chunks/cli-1.0.11-rpqx7925.mjs +0 -3
  669. package/dist/chunks/cli-1.0.11-rrzdp5bb.mjs +0 -2
  670. package/dist/chunks/cli-1.0.11-s1b9ek7n.mjs +0 -6
  671. package/dist/chunks/cli-1.0.11-see5c6wp.mjs +0 -2
  672. package/dist/chunks/cli-1.0.11-skmzzhzh.mjs +0 -39
  673. package/dist/chunks/cli-1.0.11-t2x1k63a.mjs +0 -2
  674. package/dist/chunks/cli-1.0.11-t3yw4wkf.mjs +0 -2
  675. package/dist/chunks/cli-1.0.11-t4tx0xwc.mjs +0 -2
  676. package/dist/chunks/cli-1.0.11-taat135t.mjs +0 -2
  677. package/dist/chunks/cli-1.0.11-tv2ja5hq.mjs +0 -2
  678. package/dist/chunks/cli-1.0.11-tyan62wc.mjs +0 -2
  679. package/dist/chunks/cli-1.0.11-v02e3hp0.mjs +0 -2
  680. package/dist/chunks/cli-1.0.11-v2ypvd2f.mjs +0 -17
  681. package/dist/chunks/cli-1.0.11-v5d8hdt5.mjs +0 -2
  682. package/dist/chunks/cli-1.0.11-vd74hjxg.mjs +0 -2
  683. package/dist/chunks/cli-1.0.11-vfcnt54q.mjs +0 -16
  684. package/dist/chunks/cli-1.0.11-vjjxby46.mjs +0 -5494
  685. package/dist/chunks/cli-1.0.11-vkdzrrzk.mjs +0 -2
  686. package/dist/chunks/cli-1.0.11-vmh7n18x.mjs +0 -2
  687. package/dist/chunks/cli-1.0.11-vngmjn6q.mjs +0 -6
  688. package/dist/chunks/cli-1.0.11-vq5ptcrv.mjs +0 -2
  689. package/dist/chunks/cli-1.0.11-vqw5vq1z.mjs +0 -2
  690. package/dist/chunks/cli-1.0.11-wdvw9bs9.mjs +0 -2
  691. package/dist/chunks/cli-1.0.11-wf6fynen.mjs +0 -133
  692. package/dist/chunks/cli-1.0.11-wjmpvhps.mjs +0 -2
  693. package/dist/chunks/cli-1.0.11-wxrv0919.mjs +0 -21
  694. package/dist/chunks/cli-1.0.11-x09790kn.mjs +0 -2
  695. package/dist/chunks/cli-1.0.11-x49bwc7n.mjs +0 -2
  696. package/dist/chunks/cli-1.0.11-x52cbhwa.mjs +0 -2
  697. package/dist/chunks/cli-1.0.11-x5tf1mr7.mjs +0 -2
  698. package/dist/chunks/cli-1.0.11-xac48dmb.mjs +0 -2
  699. package/dist/chunks/cli-1.0.11-xc1vh5jp.mjs +0 -2
  700. package/dist/chunks/cli-1.0.11-xge84nh3.mjs +0 -12
  701. package/dist/chunks/cli-1.0.11-xhtzats1.mjs +0 -2
  702. package/dist/chunks/cli-1.0.11-xq9e8vpr.mjs +0 -2
  703. package/dist/chunks/cli-1.0.11-y0eca1tp.mjs +0 -4
  704. package/dist/chunks/cli-1.0.11-yg666rff.mjs +0 -4
  705. package/dist/chunks/cli-1.0.11-yhfn95eh.mjs +0 -2
  706. package/dist/chunks/cli-1.0.11-yv042eqq.mjs +0 -2
  707. package/dist/chunks/cli-1.0.11-yvxh54fb.mjs +0 -12
  708. package/dist/chunks/cli-1.0.11-ywv4shrr.mjs +0 -2
  709. package/dist/chunks/cli-1.0.11-z0vt71px.mjs +0 -2
  710. package/dist/chunks/cli-1.0.11-z7b0t3bc.mjs +0 -2
  711. package/dist/chunks/cli-1.0.11-zmky8hva.mjs +0 -2
  712. package/dist/chunks/client-1.0.11-312zt2ah.mjs +0 -1
  713. package/dist/chunks/color-1.0.11-vjcywxsb.mjs +0 -1
  714. package/dist/chunks/compact-1.0.11-fz00vbeq.mjs +0 -3
  715. package/dist/chunks/config-1.0.11-69y6ev3m.mjs +0 -1
  716. package/dist/chunks/config-1.0.11-zv8cqcxf.mjs +0 -1
  717. package/dist/chunks/constants-1.0.11-qpv84h99.mjs +0 -1
  718. package/dist/chunks/context-1.0.11-hc8hcd6q.mjs +0 -1
  719. package/dist/chunks/context-noninteractive-1.0.11-z1zhm5t5.mjs +0 -1
  720. package/dist/chunks/conversation-1.0.11-k90tc32f.mjs +0 -1
  721. package/dist/chunks/copilotHeaders-1.0.11-jgc37m2e.mjs +0 -1
  722. package/dist/chunks/copy-1.0.11-6nssqasv.mjs +0 -9
  723. package/dist/chunks/cost-1.0.11-559mqgez.mjs +0 -1
  724. package/dist/chunks/createSSHSession-1.0.11-hg1padm7.mjs +0 -1
  725. package/dist/chunks/createSession-1.0.11-3642anzt.mjs +0 -1
  726. package/dist/chunks/debug-1.0.11-75374a1x.mjs +0 -1
  727. package/dist/chunks/defaultActionDeps-1.0.11-2m29yhnw.mjs +0 -1446
  728. package/dist/chunks/desktop-1.0.11-sppnn5qz.mjs +0 -1
  729. package/dist/chunks/detectRepository-1.0.11-6bgstybg.mjs +0 -1
  730. package/dist/chunks/detection-1.0.11-vdsv7f4b.mjs +0 -1
  731. package/dist/chunks/diff-1.0.11-abdxhwrj.mjs +0 -1
  732. package/dist/chunks/doctor-1.0.11-5z3ab9xa.mjs +0 -1
  733. package/dist/chunks/doctorDiagnostic-1.0.11-pysmhpbt.mjs +0 -1
  734. package/dist/chunks/earlyInput-1.0.11-vahmyps5.mjs +0 -1
  735. package/dist/chunks/effort-1.0.11-vzaz8r9h.mjs +0 -10
  736. package/dist/chunks/engine-1.0.11-e6emj6j2.mjs +0 -1
  737. package/dist/chunks/envLessBridgeConfig-1.0.11-vg4sjhxq.mjs +0 -1
  738. package/dist/chunks/envUtils-1.0.11-12w4key7.mjs +0 -1
  739. package/dist/chunks/environmentSelection-1.0.11-2wk1amzh.mjs +0 -1
  740. package/dist/chunks/environments-1.0.11-y0adm7td.mjs +0 -1
  741. package/dist/chunks/errors-1.0.11-96kg3stq.mjs +0 -1
  742. package/dist/chunks/exampleCommands-1.0.11-jf2hd4mh.mjs +0 -1
  743. package/dist/chunks/execFileNoThrow-1.0.11-7ynf3njs.mjs +0 -1
  744. package/dist/chunks/exit-1.0.11-h50839az.mjs +0 -1
  745. package/dist/chunks/explorer-1.0.11-7aj9bxyd.mjs +0 -1
  746. package/dist/chunks/export-1.0.11-e59deqn4.mjs +0 -2
  747. package/dist/chunks/extra-usage-1.0.11-q4ghsyjs.mjs +0 -1
  748. package/dist/chunks/extra-usage-noninteractive-1.0.11-xqh27mwy.mjs +0 -1
  749. package/dist/chunks/fast-1.0.11-35ftz51m.mjs +0 -1
  750. package/dist/chunks/feedback-1.0.11-cqft1yja.mjs +0 -14
  751. package/dist/chunks/firstPartyEventLogger-1.0.11-a8h2dgak.mjs +0 -1
  752. package/dist/chunks/git-1.0.11-te61wz3p.mjs +0 -1
  753. package/dist/chunks/githubModelsCredentials-1.0.11-drv71n3q.mjs +0 -1
  754. package/dist/chunks/goal-1.0.11-51c2g06j.mjs +0 -4
  755. package/dist/chunks/grove-1.0.11-3wh8z2tp.mjs +0 -1
  756. package/dist/chunks/growthbook-1.0.11-t3qqdanq.mjs +0 -1
  757. package/dist/chunks/headless-1.0.11-bxq9fmpp.mjs +0 -2
  758. package/dist/chunks/heapdump-1.0.11-ck2kcxvg.mjs +0 -6
  759. package/dist/chunks/help-1.0.11-pghsa110.mjs +0 -1
  760. package/dist/chunks/hookChains-1.0.11-20cnxgj2.mjs +0 -3
  761. package/dist/chunks/hooks-1.0.11-hmnqptaj.mjs +0 -79
  762. package/dist/chunks/hooks-1.0.11-hp66ffcw.mjs +0 -1
  763. package/dist/chunks/ide-1.0.11-cw4fsa7v.mjs +0 -3
  764. package/dist/chunks/image-processor-napi-1.0.11-nrs9g8xa.mjs +0 -1
  765. package/dist/chunks/inboundAttachments-1.0.11-72hf9v7f.mjs +0 -1
  766. package/dist/chunks/index-1.0.11-28ze0nsz.mjs +0 -2
  767. package/dist/chunks/index-1.0.11-2rftz5rp.mjs +0 -1
  768. package/dist/chunks/index-1.0.11-5tgfz6qd.mjs +0 -1
  769. package/dist/chunks/index-1.0.11-6bzt2k72.mjs +0 -1
  770. package/dist/chunks/index-1.0.11-6h7vy1ye.mjs +0 -2
  771. package/dist/chunks/index-1.0.11-8w86bp4p.mjs +0 -9
  772. package/dist/chunks/index-1.0.11-av9et6fw.mjs +0 -17
  773. package/dist/chunks/index-1.0.11-bq1vd37a.mjs +0 -1
  774. package/dist/chunks/index-1.0.11-detbxk87.mjs +0 -1
  775. package/dist/chunks/index-1.0.11-har6hagk.mjs +0 -1
  776. package/dist/chunks/index-1.0.11-j5nhmcd0.mjs +0 -1
  777. package/dist/chunks/index-1.0.11-ja482fzv.mjs +0 -1
  778. package/dist/chunks/index-1.0.11-k9vcyag1.mjs +0 -1
  779. package/dist/chunks/index-1.0.11-ktnv60hg.mjs +0 -1
  780. package/dist/chunks/index-1.0.11-m1x1jgbe.mjs +0 -1
  781. package/dist/chunks/index-1.0.11-n9xwyead.mjs +0 -5
  782. package/dist/chunks/index-1.0.11-njbht1ys.mjs +0 -1
  783. package/dist/chunks/index-1.0.11-nrqxgqbx.mjs +0 -9
  784. package/dist/chunks/index-1.0.11-pcp79m82.mjs +0 -1
  785. package/dist/chunks/index-1.0.11-radrr40a.mjs +0 -30
  786. package/dist/chunks/index-1.0.11-rk0pqamg.mjs +0 -1
  787. package/dist/chunks/index-1.0.11-t19ba6z9.mjs +0 -1
  788. package/dist/chunks/index-1.0.11-xxcdw8dk.mjs +0 -1
  789. package/dist/chunks/init-1.0.11-tfrwsdpp.mjs +0 -1
  790. package/dist/chunks/initReplBridge-1.0.11-zsedfvbr.mjs +0 -1
  791. package/dist/chunks/ink-1.0.11-ndrn3qkp.mjs +0 -1
  792. package/dist/chunks/insights-1.0.11-fvyzzx1m.mjs +0 -870
  793. package/dist/chunks/install-1.0.11-3x92gf6c.mjs +0 -1
  794. package/dist/chunks/install-github-app-1.0.11-4dak4den.mjs +0 -149
  795. package/dist/chunks/install-slack-app-1.0.11-mpg4apdn.mjs +0 -1
  796. package/dist/chunks/instrumentation-1.0.11-2bvtppdd.mjs +0 -1
  797. package/dist/chunks/interactiveHelpers-1.0.11-f0yk0vv7.mjs +0 -1
  798. package/dist/chunks/keybindings-1.0.11-xdb8g0wq.mjs +0 -2
  799. package/dist/chunks/knowledge-1.0.11-mp0sdnyp.mjs +0 -2
  800. package/dist/chunks/latestVersionCache-1.0.11-h0kqvb5e.mjs +0 -1
  801. package/dist/chunks/loadAgentsDir-1.0.11-21kfy7d1.mjs +0 -1
  802. package/dist/chunks/loadPluginHooks-1.0.11-62h1ng2x.mjs +0 -1
  803. package/dist/chunks/loadPluginHooks-1.0.11-b876eprh.mjs +0 -1
  804. package/dist/chunks/log-1.0.11-0926ezp3.mjs +0 -1
  805. package/dist/chunks/main-1.0.11-vyk2x3wz.mjs +0 -1
  806. package/dist/chunks/managedEnv-1.0.11-kv0d1mg2.mjs +0 -1
  807. package/dist/chunks/mcp-1.0.11-at6mf974.mjs +0 -4
  808. package/dist/chunks/mcp-1.0.11-daj0k21t.mjs +0 -1
  809. package/dist/chunks/mcp-1.0.11-wryppgt1.mjs +0 -17
  810. package/dist/chunks/mcpb-1.0.11-tbhva8cx.mjs +0 -1
  811. package/dist/chunks/memory-1.0.11-t83eybqk.mjs +0 -72
  812. package/dist/chunks/model-1.0.11-9f373g25.mjs +0 -2
  813. package/dist/chunks/model-1.0.11-x7cy07zz.mjs +0 -1
  814. package/dist/chunks/node-1.0.11-4c5e5x82.mjs +0 -12
  815. package/dist/chunks/oauth-1.0.11-th8148fn.mjs +0 -1
  816. package/dist/chunks/openaiShim-1.0.11-qtx9sy7n.mjs +0 -14
  817. package/dist/chunks/output-style-1.0.11-49xv9nyx.mjs +0 -1
  818. package/dist/chunks/package-ZZWOLTXM-1.0.11-btfehhjf.mjs +0 -1
  819. package/dist/chunks/parseConnectUrl-1.0.11-c54m34vf.mjs +0 -1
  820. package/dist/chunks/parser-1.0.11-k1edcc6s.mjs +0 -1
  821. package/dist/chunks/passes-1.0.11-5pgw1dpk.mjs +0 -1
  822. package/dist/chunks/permissions-1.0.11-985eg7tk.mjs +0 -1
  823. package/dist/chunks/permissions-1.0.11-vw3bb3rr.mjs +0 -3
  824. package/dist/chunks/plan-1.0.11-0p3h0zp0.mjs +0 -1
  825. package/dist/chunks/plist-1.0.11-zbes1djt.mjs +0 -1
  826. package/dist/chunks/plugin-1.0.11-svkt070k.mjs +0 -29
  827. package/dist/chunks/pluginStartupCheck-1.0.11-9x3yfk2j.mjs +0 -1
  828. package/dist/chunks/plugins-1.0.11-yq0rshqb.mjs +0 -9
  829. package/dist/chunks/preActionHook-1.0.11-qerha0cv.mjs +0 -2
  830. package/dist/chunks/print-1.0.11-74zcxacx.mjs +0 -57
  831. package/dist/chunks/privacy-settings-1.0.11-rrq80bc6.mjs +0 -1
  832. package/dist/chunks/process-1.0.11-bbehrbs8.mjs +0 -1
  833. package/dist/chunks/processBashCommand-1.0.11-a69zfnhj.mjs +0 -1
  834. package/dist/chunks/processSlashCommand-1.0.11-sr31ka3t.mjs +0 -9
  835. package/dist/chunks/prompt-1.0.11-d70q78at.mjs +0 -1
  836. package/dist/chunks/prompt-1.0.11-tz8t5d13.mjs +0 -1
  837. package/dist/chunks/prompts-1.0.11-m5saxeyv.mjs +0 -1
  838. package/dist/chunks/protocolHandler-1.0.11-068sth3c.mjs +0 -13
  839. package/dist/chunks/provider-1.0.11-8kxjeahg.mjs +0 -2
  840. package/dist/chunks/providerProfiles-1.0.11-40p5fmg3.mjs +0 -1
  841. package/dist/chunks/providerValidation-1.0.11-56q1by46.mjs +0 -6
  842. package/dist/chunks/rate-limit-options-1.0.11-cx527m21.mjs +0 -1
  843. package/dist/chunks/registerSubcommands-1.0.11-r7zg2d2h.mjs +0 -34
  844. package/dist/chunks/registry-1.0.11-g7ra2fxs.mjs +0 -1
  845. package/dist/chunks/release-notes-1.0.11-qba65ksd.mjs +0 -5
  846. package/dist/chunks/reload-plugins-1.0.11-xmtjje1f.mjs +0 -2
  847. package/dist/chunks/remote-env-1.0.11-sdn1xmkp.mjs +0 -1
  848. package/dist/chunks/remoteBridgeCore-1.0.11-h00qpdp7.mjs +0 -1
  849. package/dist/chunks/remoteSession-1.0.11-bw3qbhsc.mjs +0 -1
  850. package/dist/chunks/rename-1.0.11-x4a5ve41.mjs +0 -1
  851. package/dist/chunks/replBridgeHandle-1.0.11-v6tex0rs.mjs +0 -1
  852. package/dist/chunks/replLauncher-1.0.11-ghgbmprj.mjs +0 -1
  853. package/dist/chunks/resume-1.0.11-9m8zv4f4.mjs +0 -2
  854. package/dist/chunks/rewind-1.0.11-ybm8151x.mjs +0 -1
  855. package/dist/chunks/rootOptions-1.0.11-57s151ex.mjs +0 -1
  856. package/dist/chunks/runWorkflowHeadless-1.0.11-8tpdz498.mjs +0 -10
  857. package/dist/chunks/sandbox-adapter-1.0.11-f6df7e84.mjs +0 -1
  858. package/dist/chunks/sandbox-toggle-1.0.11-805v8r1x.mjs +0 -1
  859. package/dist/chunks/session-1.0.11-z5gxtqnf.mjs +0 -2
  860. package/dist/chunks/sessionDiscovery-1.0.11-6rcvkbfv.mjs +0 -1
  861. package/dist/chunks/sessionFileAccessHooks-1.0.11-gz9z4d2n.mjs +0 -1
  862. package/dist/chunks/sessionStorage-1.0.11-arv0h3mr.mjs +0 -1
  863. package/dist/chunks/settings-1.0.11-g9y3zkwx.mjs +0 -1
  864. package/dist/chunks/setup-1.0.11-2yc6htny.mjs +0 -5
  865. package/dist/chunks/sinks-1.0.11-9r7hfp1n.mjs +0 -1
  866. package/dist/chunks/skills-1.0.11-n37znzpa.mjs +0 -1
  867. package/dist/chunks/startupProfiler-1.0.11-2ydqcpch.mjs +0 -1
  868. package/dist/chunks/startupUpdateCheck-1.0.11-q8jwq4my.mjs +0 -1
  869. package/dist/chunks/state-1.0.11-6kjp26sz.mjs +0 -1
  870. package/dist/chunks/stats-1.0.11-nf5t6mvj.mjs +0 -6
  871. package/dist/chunks/status-1.0.11-qq9snahg.mjs +0 -1
  872. package/dist/chunks/stickers-1.0.11-fyh8mxj5.mjs +0 -1
  873. package/dist/chunks/subprocessEnv-1.0.11-3d9z54ze.mjs +0 -1
  874. package/dist/chunks/tasks-1.0.11-83e7bp46.mjs +0 -1
  875. package/dist/chunks/teamHelpers-1.0.11-k16bbfv8.mjs +0 -1
  876. package/dist/chunks/teammateModeSnapshot-1.0.11-mr9wgcy2.mjs +0 -1
  877. package/dist/chunks/teleport-1.0.11-b5cqkv40.mjs +0 -1
  878. package/dist/chunks/terminalSetup-1.0.11-20p1v1ey.mjs +0 -1
  879. package/dist/chunks/theme-1.0.11-6zqs0xe4.mjs +0 -1
  880. package/dist/chunks/thinkback-1.0.11-8av0ztc7.mjs +0 -1
  881. package/dist/chunks/thinkback-play-1.0.11-3dfrx0pw.mjs +0 -1
  882. package/dist/chunks/toolPool-1.0.11-2qt7n81g.mjs +0 -1
  883. package/dist/chunks/toolSearch-1.0.11-xvkpbypf.mjs +0 -1
  884. package/dist/chunks/tools-1.0.11-f42yjhwf.mjs +0 -1
  885. package/dist/chunks/trustedDevice-1.0.11-enkrexht.mjs +0 -1
  886. package/dist/chunks/turndown.cjs-1.0.11-t6gqtrte.mjs +0 -69
  887. package/dist/chunks/types-1.0.11-05ye0r9a.mjs +0 -1
  888. package/dist/chunks/ultrareviewCommand-1.0.11-qrzcx1s2.mjs +0 -4
  889. package/dist/chunks/update-1.0.11-nn0jnm0e.mjs +0 -88
  890. package/dist/chunks/upgrade-1.0.11-7vz3cph0.mjs +0 -1
  891. package/dist/chunks/upload-1.0.11-mgsj1mhp.mjs +0 -7
  892. package/dist/chunks/upstreamproxy-1.0.11-m96645aj.mjs +0 -14
  893. package/dist/chunks/url-handler-napi-1.0.11-1anw1ty0.mjs +0 -1
  894. package/dist/chunks/usage-1.0.11-7zvmy6j7.mjs +0 -1
  895. package/dist/chunks/util-1.0.11-1rajshq2.mjs +0 -1
  896. package/dist/chunks/utils-1.0.11-6n1vqzht.mjs +0 -1
  897. package/dist/chunks/vim-1.0.11-4773xhch.mjs +0 -1
  898. package/dist/chunks/watchLoop-1.0.11-51hjctnn.mjs +0 -13
  899. package/dist/chunks/watcher-1.0.11-qc4hggjm.mjs +0 -1
  900. package/dist/chunks/wiki-1.0.11-eb2msbxc.mjs +0 -132
  901. package/dist/chunks/workflows-1.0.11-07tdyg64.mjs +0 -1
  902. package/dist/chunks/worktree-1.0.11-gcraavtg.mjs +0 -1
  903. package/dist/chunks/worktreeModeEnabled-1.0.11-9cnkt438.mjs +0 -1
  904. package/dist/chunks/wrapper-1.0.11-r3ecyxab.mjs +0 -7
  905. /package/dist/chunks/{cli-1.0.11-rd2363he.mjs → cli-1.0.13-4z6c4gzk.mjs} +0 -0
  906. /package/dist/chunks/{cli-1.0.11-bgegnqwm.mjs → cli-1.0.13-ap2xrh2s.mjs} +0 -0
  907. /package/dist/chunks/{cli-1.0.11-r4b3hh63.mjs → cli-1.0.13-n6bzzv7p.mjs} +0 -0
  908. /package/dist/chunks/{cli-1.0.11-madrygpa.mjs → cli-1.0.13-q9et56bj.mjs} +0 -0
  909. /package/dist/chunks/{cli-1.0.11-q0n7n5ds.mjs → cli-1.0.13-tzenmc0b.mjs} +0 -0
  910. /package/dist/chunks/{cli-1.0.11-ryt75zjd.mjs → cli-1.0.13-v34fp7gq.mjs} +0 -0
  911. /package/dist/chunks/{cli-1.0.11-1had177w.mjs → cli-1.0.13-wv7skbb9.mjs} +0 -0
@@ -1,2 +0,0 @@
1
- import{Li as J,Ni as K,Oi as M}from"./cli-1.0.11-20pm81fa.mjs";import{kZ as P,l1 as X}from"./cli-1.0.11-7t17zc1z.mjs";import{W3 as q}from"./cli-1.0.11-ct42xhge.mjs";import{X3 as N}from"./cli-1.0.11-x09790kn.mjs";import{Rea as Z,wea as H}from"./cli-1.0.11-8864t240.mjs";import{Tga as Y}from"./cli-1.0.11-1h7wxdn7.mjs";import{Yia as V}from"./cli-1.0.11-qe2vnh5s.mjs";import{bsa as z,fsa as Q}from"./cli-1.0.11-see5c6wp.mjs";function B(){let k=J();if(!k||!k.available||k.granted)return!1;return K(k)!==null}function c(){if(!B())return!1;let k=H();if(k.hasVisitedExtraUsage)return!1;if((k.overageCreditUpsellSeenCount??0)>=A)return!1;return!0}var R,y,A=3;var D=Q(()=>{X();V();M();Z();Y();q();R=z(P(),1),y=z(N(),1)});
2
- export{c as Sg,D as Tg};
@@ -1,2 +0,0 @@
1
- import{Bja as E,Cja as F,Gja as M}from"./cli-1.0.11-94m7sqz0.mjs";import{Ira as N,qra as H}from"./cli-1.0.11-4cr2bh6m.mjs";N();M();function V(z){let C=Buffer.from(z,"base64url").toString("utf-8"),q=F(C);if(!q||typeof q!=="object"||!("version"in q)||q.version!==1)throw Error(`Unsupported work secret version: ${q&&typeof q==="object"&&"version"in q?q.version:"unknown"}`);let A=q;if(typeof A.session_ingress_token!=="string"||A.session_ingress_token.length===0)throw Error("Invalid work secret: missing or empty session_ingress_token");if(typeof A.api_base_url!=="string")throw Error("Invalid work secret: missing api_base_url");return q}function W(z,C){let q=new URL(z).hostname,A=q==="localhost"||q==="127.0.0.1",D=A?"ws":"wss",J=A?"v2":"v1",K=z.replace(/^https?:\/\//,"").replace(/\/+$/,"");return`${D}://${K}/${J}/session_ingress/ws/${C}`}function X(z,C){if(z===C)return!0;let q=z.slice(z.lastIndexOf("_")+1),A=C.slice(C.lastIndexOf("_")+1);return q.length>=4&&q===A}function Y(z,C){return`${z.replace(/\/+$/,"")}/v1/code/sessions/${C}`}async function Z(z,C){let q=await H.post(`${z}/worker/register`,{},{headers:{Authorization:`Bearer ${C}`,"Content-Type":"application/json","anthropic-version":"2023-06-01"},timeout:1e4}),A=q.data?.worker_epoch,D=typeof A==="string"?Number(A):A;if(typeof D!=="number"||!Number.isFinite(D)||!Number.isSafeInteger(D))throw Error(`registerWorker: invalid worker_epoch in response: ${E(q.data)}`);return D}
2
- export{V as Rb,W as Sb,X as Tb,Y as Ub,Z as Vb};
@@ -1,24 +0,0 @@
1
- import{cc as DY}from"./cli-1.0.11-bgegnqwm.mjs";import{$c as iQ,Yc as LY}from"./cli-1.0.11-9ewzkxjm.mjs";import{bi as V0,ci as p6}from"./cli-1.0.11-pyzn99ct.mjs";import{Vi as pY,Wi as A6}from"./cli-1.0.11-zmky8hva.mjs";import{$J as s,$v as pZ,Ap as i6,Aq as FZ,Bq as _Y,FL as P9,HD as NY,HL as F9,ID as nQ,JD as RY,LD as z6,LL as M9,MA as uY,Nm as yZ,OA as v6,PD as n,PR as wZ,Qm as $Z,RD as U6,Rm as e0,SB as cY,SL as o6,TB as _6,UA as CY,VA as TY,Vv as h0,WA as L6,Wv as uZ,XB as mY,XH as T0,XK as PY,Xv as k0,YB as O6,YH as s9,Yv as x0,Zv as u0,Zx as I0,_K as J6,_v as p0,aS as rY,al as L9,aw as cZ,ay as i9,bk as KZ,bl as u6,bu as ZY,bw as c0,cl as z9,cu as xQ,cw as m0,dl as q9,du as JY,dw as g0,eQ as lY,ek as E0,el as bZ,eu as lQ,ew as d0,fK as gY,fl as Y0,fu as kY,fw as l0,gG as C0,gl as D9,gw as a0,hG as o9,hl as XZ,hw as n0,il as Q0,it as M0,iw as r0,jS as iY,jk as hY,jl as v9,jw as i0,kl as A9,kw as GQ,kz as xY,ll as sY,lt as b0,mK as dY,mt as fZ,nQ as aY,nS as zY,nz as D6,pQ as nY,qS as qY,qt as r9,tQ as w6,uR as kZ,vD as HY,vO as BY,wD as aQ,xO as rQ,yR as xZ,yq as iZ,zp as j9,zq as AY}from"./cli-1.0.11-vjjxby46.mjs";import{pX as Q9,tX as R6}from"./cli-1.0.11-ja63j933.mjs";import{WX as y0,XX as d9,iY as $0,jY as j0,kY as l9,nY as P0,oY as a9,uY as F0,vY as n9}from"./cli-1.0.11-v02e3hp0.mjs";import{G0 as p,I0 as M,kZ as m9,l1 as g9}from"./cli-1.0.11-7t17zc1z.mjs";import{T3 as a,U3 as E,V3 as b,W3 as J0}from"./cli-1.0.11-ct42xhge.mjs";import{X3 as c9}from"./cli-1.0.11-x09790kn.mjs";import{C8 as G6,F7 as jY,b6 as $Y,f6 as K6}from"./cli-1.0.11-vfcnt54q.mjs";import{$$ as x9,Aca as V6,Daa as Y9,Fda as W6,Iaa as T6,S_ as E9,Z$ as TZ,caa as y9,d_ as _Z,e_ as k9,fca as $9,hga as U0,kga as p9,mca as r6,oga as e,q_ as GY,s$ as a6,s_ as dQ,wda as yY,wga as w0,xca as wY,yca as EY,zaa as n6}from"./cli-1.0.11-8864t240.mjs";import{Hga as B0,Pga as L0,Tga as h9}from"./cli-1.0.11-1h7wxdn7.mjs";import{Iha as $6,xha as oY}from"./cli-1.0.11-2mxpjt2m.mjs";import{$ha as Y,aia as h,bia as JZ,cia as q,dia as EZ}from"./cli-1.0.11-c9xzrrj5.mjs";import{Eia as O0,Kia as u9,gia as UY,hia as X6,jia as RZ,mia as z0,nia as q0,oia as D0,pia as v0,ria as A0,sia as _0}from"./cli-1.0.11-q5ssc147.mjs";import{Via as g,Yia as UZ}from"./cli-1.0.11-qe2vnh5s.mjs";import{$ia as Z9,$ja as HZ,Bja as ZZ,Cja as WY,Gja as PZ,Yja as I,bja as C6}from"./cli-1.0.11-94m7sqz0.mjs";import{bka as KY,fka as gQ}from"./cli-1.0.11-tv2ja5hq.mjs";import{Dka as lZ,ika as VY,wka as w9,xka as tZ}from"./cli-1.0.11-632mfg4h.mjs";import{Dma as W0,Ema as eY,Ona as OY,epa as J9,fpa as DZ,gpa as H9,ipa as N9,jpa as X0,lpa as B9,tqa as IY,wqa as BZ,xma as NZ}from"./cli-1.0.11-qt9hfn47.mjs";import{bsa as N0,esa as hZ,fsa as OZ,gsa as rZ}from"./cli-1.0.11-see5c6wp.mjs";var WQ={};hZ(WQ,{selectableUserMessagesFilter:()=>S0,messagesAfterAreOnlySynthetic:()=>VQ,MessageSelector:()=>e9});import{randomUUID as t9}from"crypto";import*as QZ from"path";function R0(Q){return Q.type==="text"}function SZ(Q){return Q==="summarize"||Q==="summarize_up_to"}function e9({messages:Q,onPreRestore:Z,onRestoreMessage:X,onRestoreCode:V,onSummarize:W,onClose:H,preselectedMessage:G}){let K=I0((U)=>U.fileHistory),[B,z]=T.useState(void 0),J=M0(),L=T.useMemo(t9,[]),_=T.useMemo(()=>[...Q.filter(S0),{...s({content:""}),uuid:L}],[Q,L]),[w,v]=T.useState(_.length-1),P=Math.max(0,Math.min(w-Math.floor(CZ/2),_.length-CZ)),f=_.length>1,[D,F]=T.useState(G),[y,S]=T.useState(void 0);T.useEffect(()=>{if(!G||!J)return;let U=!1;return fZ(K,G.uuid).then((R)=>{if(!U)S(R)}),()=>{U=!0}},[G,J,K]);let[O,$]=T.useState(!1),[d,i]=T.useState(null),[o,C]=T.useState("both"),[k,x]=T.useState(""),[A,j]=T.useState("");function N(U){let R=U?[{value:"both",label:"Restore code and conversation"},{value:"conversation",label:"Restore conversation"},{value:"code",label:"Restore code"}]:[{value:"conversation",label:"Restore conversation"}],c={type:"input",placeholder:"add context (optional)",initialValue:"",allowEmptySubmitToCancel:!0,showLabelWithValue:!0,labelValueSeparator:": "};return R.push({value:"summarize",label:"Summarize from here",...c,onChange:x}),R.push({value:"nevermind",label:"Never mind"}),R}T.useEffect(()=>{g("tengu_message_selector_opened",{})},[]);async function u(U){Z(),$(!0);try{await X(U),$(!1),H()}catch(R){e(R),$(!1),z(`Failed to restore the conversation:
2
- ${R}`)}}async function l(U){let R=Q.indexOf(U),c=Q.length-1-R;if(g("tengu_message_selector_selected",{index_from_end:c,message_type:U.type,is_current_prompt:!1}),!Q.includes(U)){H();return}if(!J){await u(U);return}let m=await fZ(K,U.uuid);F(U),S(m)}async function VZ(U){if(g("tengu_message_selector_restore_option_selected",{option:U}),!D){z("Message not found.");return}if(U==="nevermind"){if(G)H();else F(void 0);return}if(SZ(U)){Z(),$(!0),i(U),z(void 0);try{let m=U==="summarize_up_to"?"up_to":"from",YZ=(m==="up_to"?A:k).trim()||void 0;await W(D,YZ,m),$(!1),i(null),F(void 0),H()}catch(m){e(m),$(!1),i(null),F(void 0),z(`Failed to summarize:
3
- ${m}`)}return}Z(),$(!0),z(void 0);let R=null,c=null;if(U==="code"||U==="both")try{await V(D)}catch(m){R=m,e(R)}if(U==="conversation"||U==="both")try{await X(D)}catch(m){c=m,e(c)}if($(!1),F(void 0),c&&R)z(`Failed to restore the conversation and code:
4
- ${c}
5
- ${R}`);else if(c)z(`Failed to restore the conversation:
6
- ${c}`);else if(R)z(`Failed to restore the code:
7
- ${R}`);else H()}let WZ=P0(),t=T.useCallback(()=>{if(D&&!G){F(void 0);return}g("tengu_message_selector_cancelled",{}),H()},[H,D,G]),I9=T.useCallback(()=>v((U)=>Math.max(0,U-1)),[]),C9=T.useCallback(()=>v((U)=>Math.min(_.length-1,U+1)),[_.length]),T9=T.useCallback(()=>v(0),[]),R9=T.useCallback(()=>v(_.length-1),[_.length]),f9=T.useCallback(()=>{let U=_[w];if(U)l(U)},[_,w,l]);$0("confirm:no",t,{context:"Confirmation",isActive:!D}),j0({"messageSelector:up":I9,"messageSelector:down":C9,"messageSelector:top":T9,"messageSelector:bottom":R9,"messageSelector:select":f9},{context:"MessageSelector",isActive:!O&&!B&&!D&&f});let[K0,G0]=T.useState({});T.useEffect(()=>{async function U(){if(!J)return;Promise.all(_.map(async(R,c)=>{if(R.uuid!==L){let m=b0(K,R.uuid),YZ=_.at(c+1),AZ=m?XQ(Q,R.uuid,YZ?.uuid!==L?YZ?.uuid:void 0):void 0;if(AZ!==void 0)G0((r)=>({...r,[c]:AZ}));else G0((r)=>({...r,[c]:void 0}))}}))}U()},[_,Q,L,K,J]);let vZ=J&&y?.filesChanged&&y.filesChanged.length>0,S9=!B&&!D&&!G&&f;return b(p,{flexDirection:"column",width:"100%",children:[E(F0,{color:"suggestion"}),b(p,{flexDirection:"column",marginX:1,gap:1,children:[E(M,{bold:!0,color:"suggestion",children:"Rewind"}),B&&E(a,{children:b(M,{color:"error",children:["Error: ",B]})}),!f&&E(a,{children:E(M,{children:"Nothing to rewind to yet."})}),!B&&D&&f&&b(a,{children:[b(M,{children:["Confirm you want to restore"," ",!y&&"the conversation ","to the point before you sent this message:"]}),b(p,{flexDirection:"column",paddingLeft:1,borderStyle:"single",borderRight:!1,borderTop:!1,borderBottom:!1,borderLeft:!0,borderLeftDimColor:!0,children:[E(H0,{userMessage:D,color:"text",isCurrent:!1}),b(M,{dimColor:!0,children:["(",L0(new Date(D.timestamp)),")"]})]}),E(YQ,{selectedRestoreOption:o,canRestoreCode:!!vZ,diffStatsForRestore:y}),O&&SZ(d)?b(p,{flexDirection:"row",gap:1,children:[E(T0,{}),E(M,{children:"Summarizing…"})]}):E(C0,{isDisabled:O,options:N(!!vZ),defaultFocusValue:vZ?"both":"conversation",onFocus:(U)=>C(U),onChange:(U)=>VZ(U),onCancel:()=>G?H():F(void 0)}),vZ&&E(p,{marginBottom:1,children:b(M,{dimColor:!0,children:[_Z.warning," Rewinding does not affect files edited manually or via bash."]})})]}),S9&&b(a,{children:[J?E(M,{children:"Restore the code and/or conversation to the point before…"}):E(M,{children:"Restore and fork the conversation to the point before…"}),E(p,{width:"100%",flexDirection:"column",children:_.slice(P,P+CZ).map((U,R)=>{let c=P+R,m=c===w,YZ=U.uuid===L,AZ=c in K0,r=K0[c],IZ=r?.filesChanged&&r.filesChanged.length;return b(p,{height:J?3:2,overflow:"hidden",width:"100%",flexDirection:"row",children:[E(p,{width:2,minWidth:2,children:m?b(M,{color:"permission",bold:!0,children:[_Z.pointer," "]}):E(M,{children:" "})}),b(p,{flexDirection:"column",children:[E(p,{flexShrink:1,height:1,overflow:"hidden",children:E(H0,{userMessage:U,color:m?"suggestion":void 0,isCurrent:YZ,paddingRight:10})}),J&&AZ&&E(p,{height:1,flexDirection:"row",children:r?E(a,{children:E(M,{dimColor:!m,color:"inactive",children:IZ?b(a,{children:[IZ===1&&r.filesChanged[0]?`${QZ.basename(r.filesChanged[0])} `:`${IZ} files changed `,E(f0,{diffStats:r})]}):E(a,{children:"No code changes"})})}):b(M,{dimColor:!0,color:"warning",children:[_Z.warning," No code restore"]})})]})]},U.uuid)})})]}),!D&&E(M,{dimColor:!0,italic:!0,children:WZ.pending?b(a,{children:["Press ",WZ.keyName," again to exit"]}):b(a,{children:[!B&&f&&"Enter to continue · ","Esc to exit"]})})]})]})}function ZQ(Q){switch(Q){case"summarize":return"Messages after this point will be summarized.";case"summarize_up_to":return"Preceding messages will be summarized. This and subsequent messages will remain unchanged — you will stay at the end of the conversation.";case"both":case"conversation":return"The conversation will be forked.";case"code":case"nevermind":return"The conversation will be unchanged."}}function YQ(Q){let Z=GZ.c(11),{selectedRestoreOption:X,canRestoreCode:V,diffStatsForRestore:W}=Q,H=V&&(X==="both"||X==="code"),G;if(Z[0]!==X)G=ZQ(X),Z[0]=X,Z[1]=G;else G=Z[1];let K;if(Z[2]!==G)K=E(M,{dimColor:!0,children:G}),Z[2]=G,Z[3]=K;else K=Z[3];let B;if(Z[4]!==W||Z[5]!==X||Z[6]!==H)B=!SZ(X)&&(H?E(QQ,{diffStatsForRestore:W}):E(M,{dimColor:!0,children:"The code will be unchanged."})),Z[4]=W,Z[5]=X,Z[6]=H,Z[7]=B;else B=Z[7];let z;if(Z[8]!==K||Z[9]!==B)z=b(p,{flexDirection:"column",children:[K,B]}),Z[8]=K,Z[9]=B,Z[10]=z;else z=Z[10];return z}function QQ(Q){let Z=GZ.c(14),{diffStatsForRestore:X}=Q;if(X===void 0)return;if(!X.filesChanged||!X.filesChanged[0]){let K;if(Z[0]===Symbol.for("react.memo_cache_sentinel"))K=E(M,{dimColor:!0,children:"The code has not changed (nothing will be restored)."}),Z[0]=K;else K=Z[0];return K}let V=X.filesChanged.length,W;if(V===1){let K;if(Z[1]!==X.filesChanged[0])K=QZ.basename(X.filesChanged[0]||""),Z[1]=X.filesChanged[0],Z[2]=K;else K=Z[2];W=K}else if(V===2){let K;if(Z[3]!==X.filesChanged[0])K=QZ.basename(X.filesChanged[0]||""),Z[3]=X.filesChanged[0],Z[4]=K;else K=Z[4];let B=K,z;if(Z[5]!==X.filesChanged[1])z=QZ.basename(X.filesChanged[1]||""),Z[5]=X.filesChanged[1],Z[6]=z;else z=Z[6];W=`${B} and ${z}`}else{let K;if(Z[7]!==X.filesChanged[0])K=QZ.basename(X.filesChanged[0]||""),Z[7]=X.filesChanged[0],Z[8]=K;else K=Z[8];W=`${K} and ${X.filesChanged.length-1} other files`}let H;if(Z[9]!==X)H=E(f0,{diffStats:X}),Z[9]=X,Z[10]=H;else H=Z[10];let G;if(Z[11]!==W||Z[12]!==H)G=E(a,{children:b(M,{dimColor:!0,children:["The code will be restored"," ",H," in ",W,"."]})}),Z[11]=W,Z[12]=H,Z[13]=G;else G=Z[13];return G}function f0(Q){let Z=GZ.c(7),{diffStats:X}=Q;if(!X||!X.filesChanged)return;let V;if(Z[0]!==X.insertions)V=b(M,{color:"diffAddedWord",children:["+",X.insertions," "]}),Z[0]=X.insertions,Z[1]=V;else V=Z[1];let W;if(Z[2]!==X.deletions)W=b(M,{color:"diffRemovedWord",children:["-",X.deletions]}),Z[2]=X.deletions,Z[3]=W;else W=Z[3];let H;if(Z[4]!==V||Z[5]!==W)H=b(a,{children:[V,W]}),Z[4]=V,Z[5]=W,Z[6]=H;else H=Z[6];return H}function H0(Q){let Z=GZ.c(31),{userMessage:X,color:V,dimColor:W,isCurrent:H,paddingRight:G}=Q,{columns:K}=y0();if(H){let S;if(Z[0]!==V||Z[1]!==W)S=E(p,{width:"100%",children:E(M,{italic:!0,color:V,dimColor:W,children:"(current)"})}),Z[0]=V,Z[1]=W,Z[2]=S;else S=Z[2];return S}let B=X.message.content,z=typeof B==="string"?null:B[B.length-1],J,L,_,w,v,P,f,D;if(Z[3]!==V||Z[4]!==K||Z[5]!==B||Z[6]!==W||Z[7]!==z||Z[8]!==G){D=Symbol.for("react.early_return_sentinel");Z:{let S=typeof B==="string"?B.trim():z&&R0(z)?z.text.trim():"(no prompt)",O=U0(S);if(E0(O)){let $;if(Z[17]!==V||Z[18]!==W)$=E(p,{flexDirection:"row",width:"100%",children:E(M,{italic:!0,color:V,dimColor:W,children:"((empty message))"})}),Z[17]=V,Z[18]=W,Z[19]=$;else $=Z[19];D=$;break Z}if(O.includes("<bash-input>")){let $=KZ(O,"bash-input");if($){let d;if(Z[20]===Symbol.for("react.memo_cache_sentinel"))d=E(M,{color:"bashBorder",children:"!"}),Z[20]=d;else d=Z[20];D=b(p,{flexDirection:"row",width:"100%",children:[d,b(M,{color:V,dimColor:W,children:[" ",$]})]});break Z}}if(O.includes(`<${RZ}>`)){let $=KZ(O,RZ),d=KZ(O,"command-args"),i=KZ(O,"skill-format")==="true";if($)if(i){D=E(p,{flexDirection:"row",width:"100%",children:b(M,{color:V,dimColor:W,children:["Skill(",$,")"]})});break Z}else{D=E(p,{flexDirection:"row",width:"100%",children:b(M,{color:V,dimColor:W,children:["/",$," ",d]})});break Z}}L=p,P="row",f="100%",J=M,_=V,w=W,v=G?B0(O,K-G,!0):O.slice(0,500).split(`
8
- `).slice(0,4).join(`
9
- `)}Z[3]=V,Z[4]=K,Z[5]=B,Z[6]=W,Z[7]=z,Z[8]=G,Z[9]=J,Z[10]=L,Z[11]=_,Z[12]=w,Z[13]=v,Z[14]=P,Z[15]=f,Z[16]=D}else J=Z[9],L=Z[10],_=Z[11],w=Z[12],v=Z[13],P=Z[14],f=Z[15],D=Z[16];if(D!==Symbol.for("react.early_return_sentinel"))return D;let F;if(Z[21]!==J||Z[22]!==_||Z[23]!==w||Z[24]!==v)F=E(J,{color:_,dimColor:w,children:v}),Z[21]=J,Z[22]=_,Z[23]=w,Z[24]=v,Z[25]=F;else F=Z[25];let y;if(Z[26]!==L||Z[27]!==P||Z[28]!==f||Z[29]!==F)y=E(L,{flexDirection:P,width:f,children:F}),Z[26]=L,Z[27]=P,Z[28]=f,Z[29]=F,Z[30]=y;else y=Z[30];return y}function XQ(Q,Z,X){let V=Q.findIndex((B)=>B.uuid===Z);if(V===-1)return;let W=X?Q.findIndex((B)=>B.uuid===X):Q.length;if(W===-1)W=Q.length;let H=[],G=0,K=0;for(let B=V+1;B<W;B++){let z=Q[B];if(!z||!xZ(z))continue;let J=z.toolUseResult;if(!J||!J.filePath||!J.structuredPatch)continue;if(!H.includes(J.filePath))H.push(J.filePath);try{if("type"in J&&J.type==="create")G+=J.content.split(/\r?\n/).length;else for(let L of J.structuredPatch){let _=TZ(L.lines,(v)=>v.startsWith("+")),w=TZ(L.lines,(v)=>v.startsWith("-"));G+=_,K+=w}}catch{continue}}return{filesChanged:H,insertions:G,deletions:K}}function S0(Q){if(Q.type!=="user")return!1;if(Array.isArray(Q.message.content)&&Q.message.content[0]?.type==="tool_result")return!1;if(kZ(Q))return!1;if(Q.isMeta)return!1;if(Q.isCompactSummary||Q.isVisibleInTranscriptOnly)return!1;let Z=Q.message.content,X=typeof Z==="string"?null:Z[Z.length-1],V=typeof Z==="string"?Z.trim():X&&R0(X)?X.text.trim():"";if(V.indexOf(`<${D0}>`)!==-1||V.indexOf(`<${v0}>`)!==-1||V.indexOf(`<${z0}>`)!==-1||V.indexOf(`<${q0}>`)!==-1||V.indexOf(`<${_0}>`)!==-1||V.indexOf(`<${A0}>`)!==-1||V.indexOf(`<${O0}`)!==-1)return!1;return!0}function VQ(Q,Z){for(let X=Z+1;X<Q.length;X++){let V=Q[X];if(!V)continue;if(kZ(V))continue;if(xZ(V))continue;if(V.type==="progress")continue;if(V.type==="system")continue;if(V.type==="attachment")continue;if(V.type==="user"&&V.isMeta)continue;if(V.type==="assistant"){let W=V.message.content;if(Array.isArray(W)){if(W.some((G)=>G.type==="text"&&G.text.trim()||G.type==="tool_use"))return!1}continue}if(V.type==="user")return!1}return!0}var GZ,T,CZ=7;var KQ=OZ(()=>{k9();UZ();i9();r9();w0();a9();g9();l9();p9();wZ();o9();s9();d9();u9();x9();h9();n9();J0();GZ=N0(m9(),1),T=N0(c9(),1)});var b6={};hZ(b6,{getCronJitterConfig:()=>M6});function M6(){let Q=oY("tengu_kairos_cron_config",XZ,j6),Z=F6().safeParse(Q);return Z.success?Z.data:XZ}var j6=60000,oZ=1800000,P6=2592000000,F6;var I6=OZ(()=>{JZ();$6();sY();EZ();F6=q(()=>Y.object({recurringFrac:Y.number().min(0).max(1),recurringCapMs:Y.number().int().min(0).max(oZ),oneShotMaxMs:Y.number().int().min(0).max(oZ),oneShotFloorMs:Y.number().int().min(0).max(oZ),oneShotMinuteMod:Y.number().int().min(1).max(60),recurringMaxAgeMs:Y.number().int().min(0).max(P6).default(XZ.recurringMaxAgeMs)}).refine((Q)=>Q.oneShotFloorMs<=Q.oneShotMaxMs))});import{mkdir as f6,readFile as S6,unlink as X9,writeFile as eZ}from"fs/promises";import{dirname as h6,join as V9}from"path";function zZ(Q){return V9(Q??eY(),k6)}async function W9(Q){let Z;try{Z=await S6(zZ(Q),"utf8")}catch{return}let X=x6().safeParse(Y9(Z,!1));return X.success?X.data:void 0}async function tY(Q,Z){let X=zZ(Z),V=ZZ(Q);try{return await eZ(X,V,{flag:"wx"}),!0}catch(W){let H=tZ(W);if(H==="EEXIST")return!1;if(H==="ENOENT"){await f6(h6(X),{recursive:!0});try{return await eZ(X,V,{flag:"wx"}),!0}catch(G){if(tZ(G)==="EEXIST")return!1;throw G}}throw W}}function sZ(Q){MZ?.(),MZ=Z9(async()=>{await qZ(Q)})}async function Z0(Q){let Z=Q?.dir,X=Q?.lockIdentity??NZ(),V={sessionId:X,pid:process.pid,acquiredAt:Date.now()};if(await tY(V,Z))return LZ=void 0,sZ(Q),I(`[ScheduledTasks] acquired scheduler lock (PID ${process.pid})`),!0;let W=await W9(Z);if(W?.sessionId===X){if(W.pid!==process.pid)await eZ(zZ(Z),ZZ(V)),sZ(Q);return!0}if(W&&Q9(W.pid)){if(LZ!==W.sessionId)LZ=W.sessionId,I(`[ScheduledTasks] scheduler lock held by session ${W.sessionId} (PID ${W.pid})`);return!1}if(W)I(`[ScheduledTasks] recovering stale scheduler lock from PID ${W.pid}`);if(await X9(zZ(Z)).catch(()=>{}),await tY(V,Z))return LZ=void 0,sZ(Q),!0;return!1}async function qZ(Q){MZ?.(),MZ=void 0,LZ=void 0;let Z=Q?.dir,X=Q?.lockIdentity??NZ(),V=await W9(Z);if(!V||V.sessionId!==X)return;try{await X9(zZ(Z)),I("[ScheduledTasks] released scheduler lock")}catch{}}var k6,x6,MZ,LZ;var K9=OZ(()=>{JZ();BZ();C6();HZ();lZ();R6();T6();EZ();PZ();k6=V9(".claudin","scheduled_tasks.lock"),x6=q(()=>Y.object({sessionId:Y.string(),pid:Y.number(),acquiredAt:Y.number()}))});var d6={};hZ(d6,{takeDueSessionWakeup:()=>O9,isRecurringTaskAged:()=>_9,createCronScheduler:()=>g6,buildMissedTaskNotification:()=>U9});function _9(Q,Z,X){if(X===0)return!1;return Boolean(Q.recurring&&!Q.permanent&&Z-Q.createdAt>=X)}function O9(Q){let Z=X0();if(!Z||Q<Z.fireAtMs)return null;return B9(),{prompt:V0(Z.prompt),reason:Z.reason}}function g6(Q){let{onFire:Z,isLoading:X,assistantMode:V=!1,onFireTask:W,onMissed:H,onWakeupFire:G,dir:K,lockIdentity:B,getJitterConfig:z,isKilled:J,filter:L}=Q,_=K||B?{dir:K,lockIdentity:B}:void 0,w=[],v=new Map,P=new Set,f=new Set,D=null,F=null,y=null,S=null,O=!1,$=!1;async function d(C){let k=await q9(K);if(O)return;if(w=k,!C)return;let x=Date.now(),A=A9(k,x).filter((j)=>!j.recurring&&!P.has(j.id)&&(!L||L(j)));if(A.length>0){for(let j of A)P.add(j.id),v.set(j.id,1/0);if(g("tengu_scheduled_task_missed",{count:A.length,taskIds:A.map((j)=>j.id).join(",")}),H)H(A);else Z(U9(A));Y0(A.map((j)=>j.id),K).catch((j)=>I(`[ScheduledTasks] failed to remove missed tasks: ${j}`)),I(`[ScheduledTasks] surfaced ${A.length} missed one-shot task(s)`)}}function i(){if(J?.())return;if(X()&&!V)return;let C=Date.now(),k=new Set,x=[],A=z?.()??XZ;function j(N,u){if(L&&!L(N))return;if(k.add(N.id),f.has(N.id))return;let l=v.get(N.id);if(l===void 0)l=N.recurring?Q0(N.cron,N.lastFiredAt??N.createdAt,N.id,A)??1/0:v9(N.cron,N.createdAt,N.id,A)??1/0,v.set(N.id,l),I(`[ScheduledTasks] scheduled ${N.id} for ${l===1/0?"never":new Date(l).toISOString()}`);if(C<l)return;I(`[ScheduledTasks] firing ${N.id}${N.recurring?" (recurring)":""}`),g("tengu_scheduled_task_fire",{recurring:N.recurring??!1,taskId:N.id});let VZ=K===void 0?V0(N.prompt,void 0,N.agentId):N.prompt;if(W)W(VZ===N.prompt?N:{...N,prompt:VZ});else Z(VZ);let WZ=_9(N,C,A.recurringMaxAgeMs);if(WZ){let t=Math.floor((C-N.createdAt)/1000/60/60);I(`[ScheduledTasks] recurring task ${N.id} aged out (${t}h since creation), deleting after final fire`),g("tengu_scheduled_task_expired",{taskId:N.id,ageHours:t})}if(N.recurring&&!WZ){let t=Q0(N.cron,C,N.id,A)??1/0;if(v.set(N.id,t),!u)x.push(N.id)}else if(u)N9([N.id]),v.delete(N.id);else f.add(N.id),Y0([N.id],K).catch((t)=>I(`[ScheduledTasks] failed to remove task ${N.id}: ${t}`)).finally(()=>f.delete(N.id)),v.delete(N.id)}if($){for(let N of w)j(N,!1);if(x.length>0){for(let N of x)f.add(N);D9(x,C,K).catch((N)=>I(`[ScheduledTasks] failed to persist lastFiredAt: ${N}`)).finally(()=>{for(let N of x)f.delete(N)})}}if(K===void 0){for(let u of H9())j(u,!0);let N=O9(C);if(N!==null)if(I("[ScheduledTasks] firing pending ScheduleWakeup"),g("tengu_schedule_wakeup_fire",{}),G)G(N.prompt,N.reason);else Z(N.prompt)}if(k.size===0){v.clear();return}for(let N of v.keys())if(!k.has(N))v.delete(N)}async function o(){if(O)return;if(D)clearInterval(D),D=null;let{default:C}=await import("./index-1.0.11-t19ba6z9.mjs");if(O)return;if($=await Z0(_).catch(()=>!1),O){if($)$=!1,qZ(_);return}if(!$)y=setInterval(()=>{Z0(_).then((x)=>{if(O){if(x)qZ(_);return}if(x){if($=!0,y)clearInterval(y),y=null}}).catch((x)=>I(String(x),{level:"error"}))},m6),y.unref?.();d(!0);let k=z9(K);S=C.watch(k,{persistent:!1,ignoreInitial:!0,awaitWriteFinish:{stabilityThreshold:c6},ignorePermissionErrors:!0}),S.on("add",()=>void d(!1)),S.on("change",()=>void d(!1)),S.on("unlink",()=>{if(!O)w=[],v.clear()}),F=setInterval(i,G9),F.unref?.()}return{start(){if(O=!1,K!==void 0){I(`[ScheduledTasks] scheduler start() — dir=${K}, hasTasks=${bZ(K)}`),o();return}if(I(`[ScheduledTasks] scheduler start() — enabled=${DZ()}, hasTasks=${bZ()}`),!DZ()&&(V||bZ()))J9(!0);if(DZ()){o();return}D=setInterval((C)=>{if(DZ())C()},G9,o),D.unref?.()},stop(){if(O=!0,D)clearInterval(D),D=null;if(F)clearInterval(F),F=null;if(y)clearInterval(y),y=null;if(S?.close(),S=null,$)$=!1,qZ(_)},getNextFireTime(){let C=1/0;for(let k of v.values())if(k<C)C=k;if(K===void 0){let k=X0();if(k&&k.fireAtMs<C)C=k.fireAtMs}return C===1/0?null:C}}}function U9(Q){let Z=Q.length>1,X=`The following one-shot scheduled task${Z?"s were":" was"} missed while Claude was not running. ${Z?"They have":"It has"} already been removed from .claudin/scheduled_tasks.json.
10
-
11
- Do NOT execute ${Z?"these prompts":"this prompt"} yet. First use the AskUserQuestion tool to ask whether to run ${Z?"each one":"it"} now. Only execute if the user confirms.`,V=Q.map((W)=>{let H=`[${L9(W.cron)}, created ${new Date(W.createdAt).toLocaleString()}]`,G=(W.prompt.match(/`+/g)??[]).reduce((B,z)=>Math.max(B,z.length),0),K="`".repeat(Math.max(3,G+1));return`${H}
12
- ${K}
13
- ${W.prompt}
14
- ${K}`});return`${X}
15
-
16
- ${V.join(`
17
-
18
- `)}`}var G9=1000,c6=300,m6=5000;var l6=OZ(()=>{BZ();UZ();u6();sY();K9();HZ();p6()});import{randomUUID as dZ}from"crypto";JZ();EZ();GQ();var JQ=q(()=>Y.unknown()),HQ=q(()=>Y.object({matcher:Y.string().optional(),hookCallbackIds:Y.array(Y.string()),timeout:Y.number().optional()}).describe("Configuration for matching and routing hook callbacks.")),NQ=q(()=>Y.object({subtype:Y.literal("initialize"),hooks:Y.record(u0(),Y.array(HQ())).optional(),sdkMcpServers:Y.array(Y.string()).optional(),jsonSchema:Y.record(Y.string(),Y.unknown()).optional(),systemPrompt:Y.string().optional(),appendSystemPrompt:Y.string().optional(),agents:Y.record(Y.string(),g0()).optional(),promptSuggestions:Y.boolean().optional(),agentProgressSummaries:Y.boolean().optional()}).describe("Initializes the SDK session with hooks, MCP servers, and agent configuration.")),EX=q(()=>Y.object({commands:Y.array(pZ()),agents:Y.array(cZ()),output_style:Y.string(),available_output_styles:Y.array(Y.string()),models:Y.array(c0()),account:m0(),pid:Y.number().optional().describe("@internal CLI process PID for tmux socket isolation"),fast_mode_state:i0().optional()}).describe("Response from session initialization with available commands, models, and account info.")),BQ=q(()=>Y.object({subtype:Y.literal("interrupt")}).describe("Interrupts the currently running conversation turn.")),LQ=q(()=>Y.object({subtype:Y.literal("can_use_tool"),tool_name:Y.string(),input:Y.record(Y.string(),Y.unknown()),permission_suggestions:Y.array(k0()).optional(),blocked_path:Y.string().optional(),decision_reason:Y.string().optional(),title:Y.string().optional(),display_name:Y.string().optional(),tool_use_id:Y.string(),agent_id:Y.string().optional(),description:Y.string().optional()}).describe("Requests permission to use a tool with the given input.")),zQ=q(()=>Y.object({subtype:Y.literal("set_permission_mode"),mode:x0(),ultraplan:Y.boolean().optional().describe("@internal CCR ultraplan session marker.")}).describe("Sets the permission mode for tool execution handling.")),qQ=q(()=>Y.object({subtype:Y.literal("set_model"),model:Y.string().optional()}).describe("Sets the model to use for subsequent conversation turns.")),DQ=q(()=>Y.object({subtype:Y.literal("set_max_thinking_tokens"),max_thinking_tokens:Y.number().nullable()}).describe("Sets the maximum number of thinking tokens for extended thinking.")),vQ=q(()=>Y.object({subtype:Y.literal("mcp_status")}).describe("Requests the current status of all MCP server connections.")),yX=q(()=>Y.object({mcpServers:Y.array(uZ())}).describe("Response containing the current status of all MCP server connections.")),AQ=q(()=>Y.object({subtype:Y.literal("get_context_usage")}).describe("Requests a breakdown of current context window usage by category.")),_Q=q(()=>Y.object({name:Y.string(),tokens:Y.number(),color:Y.string(),isDeferred:Y.boolean().optional()})),OQ=q(()=>Y.object({color:Y.string(),isFilled:Y.boolean(),categoryName:Y.string(),tokens:Y.number(),percentage:Y.number(),squareFullness:Y.number()})),$X=q(()=>Y.object({categories:Y.array(_Q()),totalTokens:Y.number(),maxTokens:Y.number(),rawMaxTokens:Y.number(),percentage:Y.number(),gridRows:Y.array(Y.array(OQ())),model:Y.string(),memoryFiles:Y.array(Y.object({path:Y.string(),type:Y.string(),tokens:Y.number()})),mcpTools:Y.array(Y.object({name:Y.string(),serverName:Y.string(),tokens:Y.number(),isLoaded:Y.boolean().optional()})),deferredBuiltinTools:Y.array(Y.object({name:Y.string(),tokens:Y.number(),isLoaded:Y.boolean()})).optional(),systemTools:Y.array(Y.object({name:Y.string(),tokens:Y.number()})).optional(),systemPromptSections:Y.array(Y.object({name:Y.string(),tokens:Y.number()})).optional(),agents:Y.array(Y.object({agentType:Y.string(),source:Y.string(),tokens:Y.number()})),slashCommands:Y.object({totalCommands:Y.number(),includedCommands:Y.number(),tokens:Y.number()}).optional(),skills:Y.object({totalSkills:Y.number(),includedSkills:Y.number(),tokens:Y.number(),skillFrontmatter:Y.array(Y.object({name:Y.string(),source:Y.string(),tokens:Y.number()}))}).optional(),autoCompactThreshold:Y.number().optional(),isAutoCompactEnabled:Y.boolean(),messageBreakdown:Y.object({toolCallTokens:Y.number(),toolResultTokens:Y.number(),attachmentTokens:Y.number(),assistantMessageTokens:Y.number(),userMessageTokens:Y.number(),toolCallsByType:Y.array(Y.object({name:Y.string(),callTokens:Y.number(),resultTokens:Y.number()})),attachmentsByType:Y.array(Y.object({name:Y.string(),tokens:Y.number()}))}).optional(),apiUsage:Y.object({input_tokens:Y.number(),output_tokens:Y.number(),cache_creation_input_tokens:Y.number(),cache_read_input_tokens:Y.number()}).nullable()}).describe("Breakdown of current context window usage by category (system prompt, tools, messages, etc.).")),UQ=q(()=>Y.object({subtype:Y.literal("rewind_files"),user_message_id:Y.string(),dry_run:Y.boolean().optional()}).describe("Rewinds file changes made since a specific user message.")),jX=q(()=>Y.object({canRewind:Y.boolean(),error:Y.string().optional(),filesChanged:Y.array(Y.string()).optional(),insertions:Y.number().optional(),deletions:Y.number().optional()}).describe("Result of a rewindFiles operation.")),wQ=q(()=>Y.object({subtype:Y.literal("cancel_async_message"),message_uuid:Y.string()}).describe("Drops a pending async user message from the command queue by uuid. No-op if already dequeued for execution.")),PX=q(()=>Y.object({cancelled:Y.boolean()}).describe("Result of a cancel_async_message operation. cancelled=false means the message was not in the queue (already dequeued or never enqueued).")),EQ=q(()=>Y.object({subtype:Y.literal("seed_read_state"),path:Y.string(),mtime:Y.number()}).describe("Seeds the readFileState cache with a path+mtime entry. Use when a prior Read was removed from context (e.g. by snip) so Edit validation would fail despite the client having observed the Read. The mtime lets the CLI detect if the file changed since the seeded Read — same staleness check as the normal path.")),yQ=q(()=>Y.object({subtype:Y.literal("hook_callback"),callback_id:Y.string(),input:p0(),tool_use_id:Y.string().optional()}).describe("Delivers a hook callback with its input data.")),$Q=q(()=>Y.object({subtype:Y.literal("mcp_message"),server_name:Y.string(),message:JQ()}).describe("Sends a JSON-RPC message to a specific MCP server.")),jQ=q(()=>Y.object({subtype:Y.literal("mcp_set_servers"),servers:Y.record(Y.string(),h0())}).describe("Replaces the set of dynamically managed MCP servers.")),FX=q(()=>Y.object({added:Y.array(Y.string()),removed:Y.array(Y.string()),errors:Y.record(Y.string(),Y.string())}).describe("Result of replacing the set of dynamically managed MCP servers.")),PQ=q(()=>Y.object({subtype:Y.literal("reload_plugins")}).describe("Reloads plugins from disk and returns the refreshed session components.")),MX=q(()=>Y.object({commands:Y.array(pZ()),agents:Y.array(cZ()),plugins:Y.array(Y.object({name:Y.string(),path:Y.string(),source:Y.string().optional()})),mcpServers:Y.array(uZ()),error_count:Y.number()}).describe("Refreshed commands, agents, plugins, and MCP server status after reload.")),FQ=q(()=>Y.object({subtype:Y.literal("mcp_reconnect"),serverName:Y.string()}).describe("Reconnects a disconnected or failed MCP server.")),MQ=q(()=>Y.object({subtype:Y.literal("mcp_toggle"),serverName:Y.string(),enabled:Y.boolean()}).describe("Enables or disables an MCP server.")),bQ=q(()=>Y.object({subtype:Y.literal("stop_task"),task_id:Y.string()}).describe("Stops a running task.")),IQ=q(()=>Y.object({subtype:Y.literal("apply_flag_settings"),settings:Y.record(Y.string(),Y.unknown())}).describe("Merges the provided settings into the flag settings layer, updating the active configuration.")),CQ=q(()=>Y.object({subtype:Y.literal("get_settings")}).describe("Returns the effective merged settings and the raw per-source settings.")),bX=q(()=>Y.object({effective:Y.record(Y.string(),Y.unknown()),sources:Y.array(Y.object({source:Y.enum(["userSettings","projectSettings","localSettings","flagSettings","policySettings"]),settings:Y.record(Y.string(),Y.unknown())})).describe("Ordered low-to-high priority — later entries override earlier ones."),applied:Y.object({model:Y.string(),effort:Y.enum(["low","medium","high","max"]).nullable()}).optional().describe("Runtime-resolved values after env overrides, session state, and model-specific defaults are applied. Unlike `effective` (disk merge), these reflect what will actually be sent to the API.")}).describe("Effective merged settings plus raw per-source settings in merge order.")),TQ=q(()=>Y.object({subtype:Y.literal("elicitation"),mcp_server_name:Y.string(),message:Y.string(),mode:Y.enum(["form","url"]).optional(),url:Y.string().optional(),elicitation_id:Y.string().optional(),requested_schema:Y.record(Y.string(),Y.unknown()).optional()}).describe("Requests the SDK consumer to handle an MCP elicitation (user input request).")),o0=q(()=>Y.object({action:Y.enum(["accept","decline","cancel"]),content:Y.record(Y.string(),Y.unknown()).optional()}).describe("Response from the SDK consumer for an elicitation request.")),RQ=q(()=>Y.union([BQ(),LQ(),NQ(),zQ(),qQ(),DQ(),vQ(),AQ(),yQ(),$Q(),UQ(),wQ(),EQ(),jQ(),PQ(),FQ(),MQ(),bQ(),IQ(),CQ(),TQ()])),mZ=q(()=>Y.object({type:Y.literal("control_request"),request_id:Y.string(),request:RQ()})),fQ=q(()=>Y.object({subtype:Y.literal("success"),request_id:Y.string(),response:Y.record(Y.string(),Y.unknown()).optional()})),SQ=q(()=>Y.object({subtype:Y.literal("error"),request_id:Y.string(),error:Y.string(),pending_permission_requests:Y.array(Y.lazy(()=>mZ())).optional()})),s0=q(()=>Y.object({type:Y.literal("control_response"),response:Y.union([fQ(),SQ()])})),hQ=q(()=>Y.object({type:Y.literal("control_cancel_request"),request_id:Y.string()}).describe("Cancels a currently open control request.")),t0=q(()=>Y.object({type:Y.literal("keep_alive")}).describe("Keep-alive message to maintain WebSocket connection.")),kQ=q(()=>Y.object({type:Y.literal("update_environment_variables"),variables:Y.record(Y.string(),Y.string())}).describe("Updates environment variables at runtime.")),IX=q(()=>Y.union([r0(),l0(),a0(),n0(),s0(),mZ(),hQ(),t0()])),CX=q(()=>Y.union([d0(),mZ(),s0(),t0(),kQ()]));lQ();HZ();dQ();lZ();JZ();HZ();EZ();e0();xQ();var xX=q(()=>h.object({tool_name:h.string().describe("The name of the tool requesting permission"),input:h.record(h.string(),h.unknown()).describe("The input for the tool"),tool_use_id:h.string().optional().describe("The unique tool use request ID")})),YY=q(()=>h.enum(["user_temporary","user_permanent","user_reject"]).optional().catch(void 0)),uQ=q(()=>h.object({behavior:h.literal("allow"),updatedInput:h.record(h.string(),h.unknown()),updatedPermissions:h.array(ZY()).optional().catch((Q)=>{I(`Malformed updatedPermissions from SDK host ignored: ${Q.error.issues[0]?.message??"unknown"}`,{level:"warn"});return}),toolUseID:h.string().optional(),decisionClassification:YY()})),pQ=q(()=>h.object({behavior:h.literal("deny"),message:h.string(),interrupt:h.boolean().optional(),toolUseID:h.string().optional(),decisionClassification:YY()})),gZ=q(()=>h.union([uQ(),pQ()]));function jZ(Q,Z,X,V){let W={type:"permissionPromptTool",permissionPromptToolName:Z.name,toolResult:Q};if(Q.behavior==="allow"){let H=Q.updatedPermissions;if(H)V.setAppState((K)=>({...K,toolPermissionContext:yZ(K.toolPermissionContext,H)})),$Z(H);let G=Object.keys(Q.updatedInput).length>0?Q.updatedInput:X;return{...Q,updatedInput:G,decisionReason:W}}else if(Q.behavior==="deny"&&Q.interrupt)I(`SDK permission prompt deny+interrupt: tool=${Z.name} message=${Q.message}`),V.abortController.abort();return{...Q,decisionReason:W}}rQ();gQ();PZ();JZ();aQ();qY();e0();iQ();PZ();nQ();PZ();var cQ=/\u2028|\u2029/g;function mQ(Q){return Q.replace(cQ,(Z)=>Z==="\u2028"?"\\u2028":"\\u2029")}function QY(Q){return mQ(ZZ(Q))}var oQ="SandboxNetworkAccess";function sQ(Q){if(!Q)return;if(Q.type==="classifier")return Q.reason;switch(Q.type){case"rule":case"mode":case"subcommandResults":case"permissionPromptTool":return;case"hook":case"asyncAgent":case"sandboxOverride":case"workingDir":case"safetyCheck":case"other":return Q.reason}}function tQ(Q,Z,X,V){let W;try{W=Q.getActivityDescription?.(Z)??Q.getToolUseSummary?.(Z)??Q.userFacingName(Z)}catch{W=Q.name}return{tool_name:Q.name,action_description:W,tool_use_id:X,request_id:V,input:Z}}var eQ=1000;class Z6{input;replayUserMessages;structuredInput;pendingRequests=new Map;restoredWorkerState=Promise.resolve(null);inputClosed=!1;unexpectedResponseCallback;resolvedToolUseIds=new Set;prependedLines=[];onControlRequestSent;onControlRequestResolved;outbound=new NY;constructor(Q,Z){this.input=Q;this.replayUserMessages=Z;this.input=Q,this.structuredInput=this.read()}trackResolvedToolUseId(Q){if(Q.request.subtype==="can_use_tool"){if(this.resolvedToolUseIds.add(Q.request.tool_use_id),this.resolvedToolUseIds.size>eQ){let Z=this.resolvedToolUseIds.values().next().value;if(Z!==void 0)this.resolvedToolUseIds.delete(Z)}}}flushInternalEvents(){return Promise.resolve()}get internalEventsPending(){return 0}prependUserMessage(Q){this.prependedLines.push(ZZ({type:"user",session_id:"",message:{role:"user",content:Q},parent_tool_use_id:null})+`
19
- `)}async*read(){let Q="",Z=async function*(){for(;;){if(this.prependedLines.length>0)Q=this.prependedLines.join("")+Q,this.prependedLines=[];let X=Q.indexOf(`
20
- `);if(X===-1)break;let V=Q.slice(0,X);Q=Q.slice(X+1);let W=await this.processLine(V);if(W)GY("info","cli_stdin_message_parsed",{type:W.type}),yield W}}.bind(this);yield*Z();for await(let X of this.input)Q+=X,yield*Z();if(Q){let X=await this.processLine(Q);if(X)yield X}this.inputClosed=!0;for(let X of this.pendingRequests.values())X.reject(Error("Tool permission stream closed before response received"))}getPendingPermissionRequests(){return Array.from(this.pendingRequests.values()).map((Q)=>Q.request).filter((Q)=>Q.request.subtype==="can_use_tool")}setUnexpectedResponseCallback(Q){this.unexpectedResponseCallback=Q}injectControlResponse(Q){let Z=Q.response?.request_id;if(!Z)return;let X=this.pendingRequests.get(Z);if(!X)return;if(this.trackResolvedToolUseId(X.request),this.pendingRequests.delete(Z),this.write({type:"control_cancel_request",request_id:Z}),Q.response.subtype==="error")X.reject(Error(Q.response.error));else{let V=Q.response.response;if(X.schema)try{X.resolve(X.schema.parse(V))}catch(W){X.reject(W)}else X.resolve({})}}setOnControlRequestSent(Q){this.onControlRequestSent=Q}setOnControlRequestResolved(Q){this.onControlRequestResolved=Q}async processLine(Q){if(!Q)return;try{let Z=DY(WY(Q));if(Z.type==="keep_alive")return;if(Z.type==="update_environment_variables"){let X=Object.keys(Z.variables);for(let[V,W]of Object.entries(Z.variables))process.env[V]=W;I(`[structuredIO] applied update_environment_variables: ${X.join(", ")}`);return}if(Z.type==="control_response"){let X="uuid"in Z&&typeof Z.uuid==="string"?Z.uuid:void 0;if(X)HY(X,"completed");let V=this.pendingRequests.get(Z.response.request_id);if(!V){let G=(Z.response.subtype==="success"?Z.response.response:void 0)?.toolUseID;if(typeof G==="string"&&this.resolvedToolUseIds.has(G)){I(`Ignoring duplicate control_response for already-resolved toolUseID=${G} request_id=${Z.response.request_id}`);return}if(this.unexpectedResponseCallback)await this.unexpectedResponseCallback(Z);return}if(this.trackResolvedToolUseId(V.request),this.pendingRequests.delete(Z.response.request_id),V.request.request.subtype==="can_use_tool"&&this.onControlRequestResolved)this.onControlRequestResolved(Z.response.request_id);if(Z.response.subtype==="error"){V.reject(Error(Z.response.error));return}let W=Z.response.response;if(V.schema)try{V.resolve(V.schema.parse(W))}catch(H){V.reject(H)}else V.resolve({});if(this.replayUserMessages)return Z;return}if(Z.type!=="user"&&Z.type!=="control_request"&&Z.type!=="assistant"&&Z.type!=="system"){I(`Ignoring unknown message type: ${Z.type}`,{level:"warn"});return}if(Z.type==="control_request"){if(!Z.request)XY("Error: Missing request on control_request");return Z}if(Z.type==="assistant"||Z.type==="system")return Z;if(Z.message.role!=="user")XY(`Error: Expected message role 'user', got '${Z.message.role}'`);return Z}catch(Z){console.error(`Error parsing streaming input line: ${Q}: ${Z}`),process.exit(1)}}async write(Q){KY(QY(Q)+`
21
- `)}async sendRequest(Q,Z,X,V=dZ()){let W={type:"control_request",request_id:V,request:Q};if(this.inputClosed)throw Error("Stream closed");if(X?.aborted)throw Error("Request aborted");if(this.outbound.enqueue(W),Q.subtype==="can_use_tool"&&this.onControlRequestSent)this.onControlRequestSent(W);let H=()=>{this.outbound.enqueue({type:"control_cancel_request",request_id:V});let G=this.pendingRequests.get(V);if(G)this.trackResolvedToolUseId(G.request),G.reject(new VY)};if(X)X.addEventListener("abort",H,{once:!0});try{return await new Promise((G,K)=>{this.pendingRequests.set(V,{request:{type:"control_request",request_id:V,request:Q},resolve:(B)=>{G(B)},reject:K,schema:Z})})}finally{if(X)X.removeEventListener("abort",H);this.pendingRequests.delete(V)}}createCanUseTool(Q){return async(Z,X,V,W,H,G)=>{let K=G??await BY(Z,X,V,W,H);if(K.behavior==="allow"||K.behavior==="deny")return K;let B=new AbortController,z=V.abortController.signal,J=()=>B.abort();z.addEventListener("abort",J,{once:!0});try{let L=Y6(Z.name,H,X,V,K.suggestions).then((P)=>({source:"hook",decision:P})),_=dZ();Q?.(tQ(Z,X,H,_));let w=this.sendRequest({subtype:"can_use_tool",tool_name:Z.name,input:X,permission_suggestions:K.suggestions,blocked_path:K.blockedPath,decision_reason:sQ(K.decisionReason),tool_use_id:H,agent_id:V.agentId},gZ(),B.signal,_).then((P)=>({source:"sdk",result:P})),v=await Promise.race([L,w]);if(v.source==="hook"){if(v.decision)return w.catch(()=>{}),B.abort(),v.decision;let P=await w;return jZ(P.result,Z,X,V)}return jZ(v.result,Z,X,V)}catch(L){return jZ({behavior:"deny",message:`Tool permission request failed: ${L}`,toolUseID:H},Z,X,V)}finally{if(this.getPendingPermissionRequests().length===0)LY("running");z.removeEventListener("abort",J)}}}createHookCallback(Q,Z){return{type:"callback",timeout:Z,callback:async(X,V,W)=>{try{return await this.sendRequest({subtype:"hook_callback",callback_id:Q,input:X,tool_use_id:V||void 0},JY(),W)}catch(H){return console.error(`Error in hook callback ${Q}:`,H),{}}}}}async handleElicitation(Q,Z,X,V,W,H,G){try{return await this.sendRequest({subtype:"elicitation",mcp_server_name:Q,message:Z,mode:W,url:H,elicitation_id:G,requested_schema:X},o0(),V)}catch{return{action:"cancel"}}}createSandboxAskCallback(){return async(Q)=>{try{return(await this.sendRequest({subtype:"can_use_tool",tool_name:oQ,input:{host:Q.host},tool_use_id:dZ(),description:`Allow network connection to ${Q.host}?`},gZ())).behavior==="allow"}catch{return!1}}}async sendMcpMessage(Q,Z){return(await this.sendRequest({subtype:"mcp_message",server_name:Q,message:Z},Y.object({mcp_response:Y.any()}))).mcp_response}}function XY(Q){console.error(Q),process.exit(1)}async function Y6(Q,Z,X,V,W){let G=V.getAppState().toolPermissionContext.mode,K=zY(Q,Z,X,V,G,W,V.abortController.signal);for await(let B of K)if(B.permissionRequestResult&&(B.permissionRequestResult.behavior==="allow"||B.permissionRequestResult.behavior==="deny")){let z=B.permissionRequestResult;if(z.behavior==="allow"){let J=z.updatedInput||X,L=z.updatedPermissions??[];if(L.length>0){$Z(L);let _=V.getAppState(),w=yZ(_.toolPermissionContext,L);V.setAppState((v)=>{if(v.toolPermissionContext===w)return v;return{...v,toolPermissionContext:w}})}return{behavior:"allow",updatedInput:J,userModified:!1,decisionReason:{type:"hook",hookName:"PermissionRequest"}}}else return{behavior:"deny",message:z.message||"Permission denied by PermissionRequest hook",decisionReason:{type:"hook",hookName:"PermissionRequest"}}}return}_Y();function HV(Q){if(Q.type!=="user")return;let Z=Q.message?.content;if(!Z)return;if(Array.isArray(Z)&&Z.length===0)return;let X="uuid"in Q&&typeof Q.uuid==="string"?Q.uuid:void 0;return{content:Array.isArray(Z)?Q6(Z):Z,uuid:X}}function Q6(Q){if(!Q.some(vY))return Q;return Q.map((Z)=>{if(!vY(Z))return Z;let X=Z.source,V=typeof X.mediaType==="string"&&X.mediaType?X.mediaType:AY(Z.source.data);return{...Z,source:{type:"base64",media_type:V,data:Z.source.data}}})}function vY(Q){if(Q.type!=="image"||Q.source?.type!=="base64")return!1;return!Q.source.media_type}BZ();J6();V6();G6();X6();K6();W6();import{randomUUID as H6}from"crypto";function N6(Q){return Q===wY?EY:Q}function OV(Q){let X=yY()?.outputStyle??PY,V={type:"system",subtype:"init",cwd:UY(),session_id:NZ(),tools:Q.tools.map((W)=>N6(W.name)),mcp_servers:Q.mcpClients.map((W)=>({name:W.name,status:W.type})),model:Q.model,permissionMode:Q.permissionMode,slash_commands:Q.commands.filter((W)=>W.userInvocable!==!1).map((W)=>W.name),apiKeySource:jY().source,betas:OY(),claude_code_version:"99.0.0",output_style:X,agents:Q.agents.map((W)=>W.agentType),skills:Q.skills.filter((W)=>W.userInvocable!==!1).map((W)=>W.name),plugins:Q.plugins.map((W)=>({name:W.name,path:W.path,source:W.source})),uuid:H6()};return V.fast_mode_state=$Y(Q.model,Q.fastMode),V}var FY={"`":"`",'"':'"',"<":">","{":"}","[":"]","(":")","'":"'"};function B6(Q,Z){if(!new RegExp(Z,"i").test(Q))return[];if(Q.startsWith("/"))return[];let V=[],W=null,H=0,G=(J)=>!!J&&/[\p{L}\p{N}_]/u.test(J);for(let J=0;J<Q.length;J++){let L=Q[J];if(W){if(W==="["&&L==="["){H=J;continue}if(L!==FY[W])continue;if(W==="'"&&G(Q[J+1]))continue;V.push({start:H,end:J+1}),W=null}else if(L==="<"&&J+1<Q.length&&/[a-zA-Z/]/.test(Q[J+1])||L==="'"&&!G(Q[J-1])||L!=="<"&&L!=="'"&&L in FY)W=L,H=J}let K=[],B=new RegExp(`\\b${Z}\\b`,"gi"),z=Q.matchAll(B);for(let J of z){if(J.index===void 0)continue;let L=J.index,_=L+J[0].length;if(V.some((P)=>L>=P.start&&L<P.end))continue;let w=Q[L-1],v=Q[_];if(w==="/"||w==="\\"||w==="-")continue;if(v==="/"||v==="\\"||v==="-"||v==="?")continue;if(v==="."&&G(Q[_+1]))continue;K.push({word:J[0],start:L,end:_})}return K}function wV(Q){return B6(Q,"ultrareview")}UZ();wZ();w6();_6();O6();v6();qY();_Y();D6();wZ();U6();A6();import{randomUUID as E6}from"crypto";BZ();UZ();wZ();L6();z6();import{randomUUID as q6}from"crypto";function MY(Q){let Z=Q.toLowerCase();return/\b(wtf|wth|ffs|omfg|shit(ty|tiest)?|dumbass|horrible|awful|piss(ed|ing)? off|piece of (shit|crap|junk)|what the (fuck|hell)|fucking? (broken|useless|terrible|awful|horrible)|fuck you|screw (this|you)|so frustrating|this sucks|damn it)\b/.test(Z)}function bY(Q){let Z=Q.toLowerCase().trim();if(Z==="continue")return!0;return/\b(keep going|go on)\b/.test(Z)}function fY(Q,Z,X,V,W,H,G){let K=q6();IY(K);let B=typeof Q==="string"?Q:Q.find((w)=>w.type==="text")?.text||"";RY(B);let z=typeof Q==="string"?Q:Q.findLast((w)=>w.type==="text")?.text||"";if(z)TY("user_prompt",{prompt_length:String(z.length),prompt:CY(z),"prompt.id":K});let J=MY(B),L=bY(B);if(g("tengu_input_prompt",{is_negative:J,is_keep_going:L}),Z.length>0){let w=typeof Q==="string"?Q.trim()?[{type:"text",text:Q}]:[]:Q;return{messages:[s({content:[...w,...Z],uuid:W,imagePasteIds:X.length>0?X:void 0,permissionMode:H,isMeta:G||void 0}),...V],shouldQuery:!0}}return{messages:[s({content:Q,uuid:W,permissionMode:H,isMeta:G||void 0}),...V],shouldQuery:!0}}async function iV({input:Q,preExpansionInput:Z,mode:X,setToolJSX:V,context:W,pastedContents:H,ideSelection:G,messages:K,setUserInputOnProcessing:B,uuid:z,isAlreadyProcessing:J,querySource:L,canUseTool:_,skipSlashCommands:w,bridgeOrigin:v,isMeta:P,skipAttachments:f}){let D=typeof Q==="string"?Q:null;if(X==="prompt"&&D!==null&&!P)B?.(D);n("query_process_user_input_base_start");let F=W.getAppState(),y=await y6(Q,X,V,W,H,G,K,z,J,L,_,F.toolPermissionContext.mode,w,v,P,f,Z);if(n("query_process_user_input_base_end"),!y.shouldQuery)return y;n("query_hooks_start");let S=hY(Q)||"";for await(let O of iY(S,F.toolPermissionContext.mode,W,W.requestPrompt)){if(O.message?.type==="progress")continue;if(O.blockingError){let $=rY(O.blockingError);return{messages:[gY(`${$}
22
-
23
- Original prompt: ${Q}`,"warning")],shouldQuery:!1,allowedTools:y.allowedTools}}if(O.preventContinuation){let $=O.stopReason?`Operation stopped by hook: ${O.stopReason}`:"Operation stopped by hook";return y.messages.push(s({content:$})),y.shouldQuery=!1,y}if(O.additionalContexts&&O.additionalContexts.length>0)y.messages.push(kY({type:"hook_additional_context",content:O.additionalContexts.map(SY),hookName:"UserPromptSubmit",toolUseID:`hook-${E6()}`,hookEvent:"UserPromptSubmit"}));if(O.message)switch(O.message.attachment.type){case"hook_success":if(!O.message.attachment.content)break;y.messages.push({...O.message,attachment:{...O.message.attachment,content:SY(O.message.attachment.content)}});break;default:y.messages.push(O.message);break}}return n("query_hooks_end"),y}var aZ=1e4;function SY(Q){if(Q.length>aZ)return`${Q.substring(0,aZ)}… [output truncated - exceeded ${aZ} characters]`;return Q}async function y6(Q,Z,X,V,W,H,G,K,B,z,J,L,_,w,v,P,f){let D=null,F=[],y=[],S=Q;if(typeof Q==="string")D=Q;else if(Q.length>0){n("query_image_processing_start");let A=[];for(let N of Q)if(N.type==="image"){let u=await iZ(N);if(u.dimensions){let l=FZ(u.dimensions);if(l)y.push(l)}A.push(u.block)}else A.push(N);S=A,n("query_image_processing_end");let j=A[A.length-1];if(j?.type==="text")D=j.text,F=A.slice(0,-1);else F=A}if(D===null&&Z!=="prompt")throw Error(`Mode: ${Z} requires a string input.`);let O=W?Object.values(W).filter(cY):[],$=O.map((A)=>A.id),d=W?await xY(W):new Map;n("query_pasted_image_processing_start");let i=await Promise.all(O.map(async(A)=>{let j={type:"image",source:{type:"base64",media_type:A.mediaType||"image/png",data:A.content}};return g("tengu_pasted_image_resize_attempt",{original_size_bytes:A.content.length}),{resized:await iZ(j),originalDimensions:A.dimensions,sourcePath:A.sourcePath??d.get(A.id)}})),o=[];for(let{resized:A,originalDimensions:j,sourcePath:N}of i){if(A.dimensions){let u=FZ(A.dimensions,N);if(u)y.push(u)}else if(j){let u=FZ(j,N);if(u)y.push(u)}else if(N)y.push(`[Image source: ${N}]`);o.push(A.block)}n("query_pasted_image_processing_end");let C=_;if(w&&D!==null&&D.startsWith("/")){let A=pY(D),j=A?nY(A.commandName,V.options.commands):void 0;if(j)if(aY(j))C=!1;else{let N=`/${lY(j)} isn't available over Remote Control.`;return{messages:[s({content:D,uuid:K}),dY(`<local-command-stdout>${N}</local-command-stdout>`)],shouldQuery:!1,resultText:N}}}let k=!P&&D!==null&&(Z!=="prompt"||C||!D.startsWith("/"));n("query_attachment_loading_start");let x=k?await uY(mY(D,V,H??null,[],G,z)):[];if(n("query_attachment_loading_end"),D!==null&&Z==="bash"){let{processBashCommand:A}=await import("./processBashCommand-1.0.11-a69zfnhj.mjs");return nZ(await A(D,F,x,V,X),y)}if(D!==null&&!C&&D.startsWith("/")){let{processSlashCommand:A}=await import("./processSlashCommand-1.0.11-sr31ka3t.mjs"),j=await A(D,F,o,x,V,X,K,B,J);return nZ(j,y)}if(D!==null&&Z==="prompt"){let A=D.trim(),j=x.find((N)=>N.attachment.type==="agent_mention");if(j){let N=`@agent-${j.attachment.agentType}`,u=A===N,l=A.startsWith(N)&&!u;g("tengu_subagent_at_mention",{is_subagent_only:u,is_prefix:l})}}return nZ(fY(S,o,$,x,K,L,v),y)}function nZ(Q,Z){if(Z.length>0)Q.messages.push(s({content:Z.map((X)=>({type:"text",text:X})),isMeta:!0}));return Q}i6();BZ();HZ();lZ();n6();a6();w0();o6();r6();import{isAbsolute as s6,resolve as t6}from"path";function e6(Q,Z,X){let V=[],W=[],H=[];for(let[G,K]of Object.entries(Q)){let B=Z[G],z=b9(K.source,X?.projectRoot);if(!B)V.push(G);else if(K.sourceIsFallback)H.push(G);else if(!j9(z,B.source))W.push({name:G,declaredSource:z,materializedSource:B.source});else H.push(G)}return{missing:V,sourceChanged:W,upToDate:H}}async function IW(Q){let Z=P9();if(Object.keys(Z).length===0)return{installed:[],updated:[],failed:[],upToDate:[],skipped:[]};let X;try{X=await F9()}catch(J){e(J),X={}}let V=e6(Z,X,{projectRoot:W0()}),W=[...V.missing.map((J)=>({name:J,source:b9(Z[J].source),action:"install"})),...V.sourceChanged.map(({name:J,declaredSource:L})=>({name:J,source:L,action:"update"}))],H=[],G=[];for(let J of W){if(Q?.skip?.(J.name,J.source)){H.push(J.name);continue}if(J.action==="update"&&$9(J.source)&&!await y9(J.source.path)){I(`[reconcile] '${J.name}' declared path does not exist; keeping materialized entry`),H.push(J.name);continue}G.push(J)}if(G.length===0)return{installed:[],updated:[],failed:[],upToDate:V.upToDate,skipped:H};I(`[reconcile] ${G.length} marketplace(s): ${G.map((J)=>`${J.name}(${J.action})`).join(", ")}`);let K=[],B=[],z=[];for(let J=0;J<G.length;J++){let{name:L,source:_,action:w}=G[J];Q?.onProgress?.({type:"installing",name:L,action:w,index:J+1,total:G.length});try{let v=await M9(_);if(w==="install")K.push(L);else B.push(L);Q?.onProgress?.({type:"installed",name:L,alreadyMaterialized:v.alreadyMaterialized})}catch(v){let P=w9(v);z.push({name:L,error:P}),Q?.onProgress?.({type:"failed",name:L,error:P}),e(v)}}return{installed:K,updated:B,failed:z,upToDate:V.upToDate,skipped:H}}function b9(Q,Z){if((Q.source==="directory"||Q.source==="file")&&!s6(Q.path)){let X=Z??W0(),V=E9(X);return{...Q,path:t6(V??X,Q.path)}}return Q}
24
- export{HV as la,N6 as ma,OV as na,e9 as oa,S0 as pa,VQ as qa,WQ as ra,KQ as sa,wV as ta,iV as ua,gZ as va,jZ as wa,QY as xa,oQ as ya,Z6 as za,e6 as Aa,IW as Ba,M6 as Ca,b6 as Da,I6 as Ea,g6 as Fa,d6 as Ga,l6 as Ha};
@@ -1,4 +0,0 @@
1
- import{Sg as g,Tg as Py}from"./cli-1.0.11-cd2qwe1h.mjs";import{Li as s,Ni as d,Oi as $y}from"./cli-1.0.11-20pm81fa.mjs";import{AL as Ry,CP as l,IL as n,Iv as E,Lv as Xy,Nq as u,SL as vy,YS as c,Yq as A,ZL as x,bM as Ny,eo as V,er as Qy,go as Y,io as D,it as R,lo as M,mo as C,nl as L,no as T,ny as q,oy as Zy,po as f,qt as Wy,rl as Iy,sT as py,vo as Ky,zL as K}from"./cli-1.0.11-vjjxby46.mjs";import{xX as i,yX as Oy}from"./cli-1.0.11-ja63j933.mjs";import{AY as a,BY as t,FY as Uy,zY as _}from"./cli-1.0.11-v02e3hp0.mjs";import{LY as o,RY as hy}from"./cli-1.0.11-p3zd6rr3.mjs";import{E0 as k,F0 as Jy}from"./cli-1.0.11-7t17zc1z.mjs";import{C8 as zy,V6 as qy,j8 as X,v6 as B,w6 as F}from"./cli-1.0.11-vfcnt54q.mjs";import{Y8 as H,Z8 as ry}from"./cli-1.0.11-kknpw2ax.mjs";import{Fda as ky,Rea as N,X_ as h,eba as j,gba as jy,l$ as b,qda as m,s$ as wy,tea as v,u$ as W,v$ as Sy,vda as Z,wda as O,wea as w}from"./cli-1.0.11-8864t240.mjs";import{Iha as Gy,wha as z}from"./cli-1.0.11-2mxpjt2m.mjs";import{$ja as yy,Yja as p}from"./cli-1.0.11-94m7sqz0.mjs";N();function Vy(y){let r=w().numStartups;v((G)=>{let S=G.tipsHistory??{};if(S[y]===r)return G;return{...G,tipsHistory:{...S,[y]:r}}})}function P(y){let r=w(),G=r.tipsHistory?.[y];if(!G)return 1/0;return r.numStartups-G}ry();yy();Wy();ky();hy();Jy();Py();Zy();Iy();zy();Oy();N();Qy();jy();Xy();wy();Ky();qy();Sy();Ny();vy();Ry();py();Gy();$y();Uy();var Q;async function Hy(){if(Q!==void 0)return Q;let y=await n();return Q=K in y,Q}async function U(y,r,G){if(!await Hy())return!1;if(x(`${y}@${K}`))return!1;let{bashTools:S}=r??{};if(G.cli&&S?.size){if(G.cli.some((I)=>S.has(I)))return!0}if(G.filePath&&r?.readFileState){if(E(r.readFileState).some(($)=>G.filePath.test($)))return!0}return!1}var by=[{id:"new-user-warmup",content:async()=>"Start with small features or bug fixes, tell Claudin to propose a plan, and verify its suggested edits",cooldownSessions:3,async isRelevant(){return w().numStartups<10}},{id:"plan-mode-for-complex-tasks",content:async()=>`Use Plan Mode to prepare for a complex request before making changes. Press ${q("chat:cycleMode","Chat","shift+tab")} twice to enable.`,cooldownSessions:5,isRelevant:async()=>{let y=w();return(y.lastPlanModeUse?(Date.now()-y.lastPlanModeUse)/86400000:1/0)>7}},{id:"default-permission-mode-config",content:async()=>"Use /config to change your default permission mode (including Plan Mode)",cooldownSessions:10,isRelevant:async()=>{try{let y=w(),r=O(),G=Boolean(y.lastPlanModeUse),S=Boolean(r?.permissions?.defaultMode);return G&&!S}catch(y){return p(`Failed to check default-permission-mode-config tip relevance: ${y}`,{level:"warn"}),!1}}},{id:"git-worktrees",content:async()=>"Use git worktrees to run multiple Claudin sessions in parallel.",cooldownSessions:10,isRelevant:async()=>{try{let y=w();return await b()<=1&&y.numStartups>50}catch(y){return!1}}},{id:"diff-reviewer",content:async()=>`Review local changes, stashes and the git log side by side — run /diff or hit ${q("chat:openDiff","Chat","ctrl+g")}.`,cooldownSessions:10,isRelevant:async()=>{try{return await h()}catch(y){return!1}}},{id:"diff-git-log",content:async()=>`Scroll back through your git log and open any commit's diff in /diff (or hit ${q("chat:openDiff","Chat","ctrl+g")}).`,cooldownSessions:15,isRelevant:async()=>{try{return await h()}catch(y){return!1}}},{id:"file-explorer",content:async()=>`Browse and edit files without leaving the REPL — run /explorer or hit ${q("chat:openExplorer","Chat","ctrl+e")} for a file tree with a built-in nvim-style editor.`,cooldownSessions:10,isRelevant:async()=>!0},{id:"explorer-fuzzy-find",content:async()=>"Inside /explorer, press / to fuzzy-find any file by name, or @ to drop it into your prompt.",cooldownSessions:15,isRelevant:async()=>!0},{id:"explorer-create-delete",content:async()=>"Inside /explorer, press a to create, r to rename, or d to delete the selected file.",cooldownSessions:15,isRelevant:async()=>!0},{id:"bash-output-filter-token-saving",content:async()=>"Bash output filter is active — redundant command output is trimmed before reaching the model, reducing token usage. Disable in /config.",cooldownSessions:20,async isRelevant(){let y=w();return y.numStartups>5&&y.bashOutputFilterEnabled!==!1}},{id:"color-when-multi-clauding",content:async()=>"Running multiple Claudin sessions? Use /color and /rename to tell them apart at a glance.",cooldownSessions:10,isRelevant:async()=>{if(c())return!1;return await i()>=2}},{id:"terminal-setup",content:async()=>j.terminal==="Apple_Terminal"?"Run /terminal-setup to enable convenient terminal integration like Option + Enter for new line and more":"Run /terminal-setup to enable convenient terminal integration like Shift + Enter for new line and more",cooldownSessions:10,async isRelevant(){let y=w();if(j.terminal==="Apple_Terminal")return!y.optionAsMetaKeyInstalled;return!y.shiftEnterKeyBindingInstalled}},{id:"shift-enter",content:async()=>j.terminal==="Apple_Terminal"?"Press Option+Enter to send a multi-line message":"Press Shift+Enter to send a multi-line message",cooldownSessions:10,async isRelevant(){let y=w();return Boolean((j.terminal==="Apple_Terminal"?y.optionAsMetaKeyInstalled:y.shiftEnterKeyBindingInstalled)&&y.numStartups>3)}},{id:"shift-enter-setup",content:async()=>j.terminal==="Apple_Terminal"?"Run /terminal-setup to enable Option+Enter for new lines":"Run /terminal-setup to enable Shift+Enter for new lines",cooldownSessions:10,async isRelevant(){if(!o())return!1;let y=w();return!(j.terminal==="Apple_Terminal"?y.optionAsMetaKeyInstalled:y.shiftEnterKeyBindingInstalled)}},{id:"memory-command",content:async()=>"Use /memory to view and manage Claudin memory",cooldownSessions:15,async isRelevant(){return w().memoryUsageCount<=0}},{id:"theme-command",content:async()=>"Use /theme to change the color theme",cooldownSessions:20,isRelevant:async()=>!0},{id:"colorterm-truecolor",content:async()=>"Try setting environment variable COLORTERM=truecolor for richer colors",cooldownSessions:30,isRelevant:async()=>!process.env.COLORTERM&&H.level<3},{id:"powershell-tool-env",content:async()=>"Set CLAUDE_CODE_USE_POWERSHELL_TOOL=1 to enable the PowerShell tool (preview)",cooldownSessions:10,isRelevant:async()=>W()==="windows"&&process.env.CLAUDE_CODE_USE_POWERSHELL_TOOL===void 0},{id:"status-line",content:async()=>"Use /statusline to set up a custom status line that will display beneath the input box",cooldownSessions:25,isRelevant:async()=>O().statusLine===void 0},{id:"prompt-queue",content:async()=>"Hit Enter to queue up additional messages while Claudin is working.",cooldownSessions:5,async isRelevant(){return w().promptQueueUseCount<=3}},{id:"enter-to-steer-in-relatime",content:async()=>"Send messages to Claudin while it works to steer Claudin in real-time",cooldownSessions:20,isRelevant:async()=>!0},{id:"todo-list",content:async()=>"Ask Claudin to create a todo list when working on complex tasks to track progress and remain on track",cooldownSessions:20,isRelevant:async()=>!0},{id:"vscode-command-install",content:async()=>`Open the Command Palette (Cmd+Shift+P) and run "Shell Command: Install '${j.terminal==="vscode"?"code":j.terminal}' command in PATH" to enable IDE integration`,cooldownSessions:0,async isRelevant(){if(!V())return!1;if(W()!=="macos")return!1;switch(j.terminal){case"vscode":return!await T();case"cursor":return!await M();case"windsurf":return!await C();default:return!1}}},{id:"ide-upsell-external-terminal",content:async()=>"Connect Claudin to your IDE · /ide",cooldownSessions:4,async isRelevant(){if(Y())return!1;if((await D()).length!==0)return!1;return(await f()).length>0}},{id:"install-github-app",content:async()=>"Run /install-github-app to tag @claude right from your Github issues and PRs",cooldownSessions:10,isRelevant:async()=>!w().githubActionSetupCount},{id:"install-slack-app",content:async()=>"Run /install-slack-app to use Claude in Slack",cooldownSessions:10,isRelevant:async()=>!w().slackAppInstallCount},{id:"permissions",content:async()=>"Use /permissions to pre-approve and pre-deny bash, edit, and MCP tools",cooldownSessions:10,async isRelevant(){return w().numStartups>10}},{id:"drag-and-drop-images",content:async()=>"Did you know you can drag and drop image files into your terminal?",cooldownSessions:10,isRelevant:async()=>!j.isSSH()},{id:"paste-images-mac",content:async()=>"Paste images into Claudin using control+v (not cmd+v!)",cooldownSessions:10,isRelevant:async()=>W()==="macos"},{id:"double-esc",content:async()=>"Double-tap esc to rewind the conversation to a previous point in time",cooldownSessions:10,isRelevant:async()=>!R()},{id:"double-esc-code-restore",content:async()=>"Double-tap esc to rewind the code and/or conversation to a previous point in time",cooldownSessions:10,isRelevant:async()=>R()},{id:"continue",content:async()=>"Run claudin --continue or claudin --resume to resume a conversation",cooldownSessions:10,isRelevant:async()=>!0},{id:"rename-conversation",content:async()=>"Name your conversations with /rename to find them easily in /resume later",cooldownSessions:15,isRelevant:async()=>l()&&w().numStartups>10},{id:"custom-commands",content:async()=>"Create skills by adding .md files to .claudin/skills/ in your project or ~/.claudin/skills/ for skills that work in any project",cooldownSessions:15,async isRelevant(){return w().numStartups>10}},{id:"shift-tab",content:async()=>`Hit ${q("chat:cycleMode","Chat","shift+tab")} to cycle between default mode, auto-accept edit mode, and plan mode`,cooldownSessions:10,isRelevant:async()=>!0},{id:"image-paste",content:async()=>`Use ${q("chat:imagePaste","Chat","ctrl+v")} to paste images from your clipboard`,cooldownSessions:20,isRelevant:async()=>!0},{id:"custom-agents",content:async()=>"Use /agents to optimize specific tasks. Eg. Software Architect, Code Writer, Code Reviewer",cooldownSessions:15,async isRelevant(){return w().numStartups>5}},{id:"agent-flag",content:async()=>"Use --agent <agent_name> to directly start a conversation with a subagent",cooldownSessions:15,async isRelevant(){return w().numStartups>5}},{id:"opusplan-mode-reminder",content:async()=>`Your default model setting is Opus Plan Mode. Press ${q("chat:cycleMode","Chat","shift+tab")} twice to activate Plan Mode and plan with Claude Opus.`,cooldownSessions:2,async isRelevant(){let y=w(),G=B()==="opusplan",S=y.lastPlanModeUse?(Date.now()-y.lastPlanModeUse)/86400000:1/0;return G&&S>3}},{id:"frontend-design-plugin",content:async(y)=>{return`Working with HTML/CSS? Install the frontend-design plugin:
2
- ${k("suggestion",y.theme)(`/plugin install frontend-design@${K}`)}`},cooldownSessions:3,isRelevant:async(y)=>U("frontend-design",y,{filePath:/\.(html|css|htm)$/i})},{id:"vercel-plugin",content:async(y)=>{return`Working with Vercel? Install the vercel plugin:
3
- ${k("suggestion",y.theme)(`/plugin install vercel@${K}`)}`},cooldownSessions:3,isRelevant:async(y)=>U("vercel",y,{filePath:/(?:^|[/\\])vercel\.json$/i,cli:["vercel"]})},{id:"effort-high-nudge",content:async(y)=>{let G=k("suggestion",y.theme)("/effort high");return z("tengu_tide_elm","off")==="copy_b"?`Use ${G} for better one-shot answers. Claudin thinks it through first.`:`Working on something tricky? ${G} gives better first answers`},cooldownSessions:3,isRelevant:async()=>{if(!X())return!1;if(!u(F()))return!1;if(m("policySettings")?.effortLevel!==void 0)return!1;if(A()!==void 0)return!1;let y=Z().effortLevel;if(y==="high"||y==="max")return!1;return z("tengu_tide_elm","off")!=="off"}},{id:"subagent-fanout-nudge",content:async(y)=>{let r=k("suggestion",y.theme);return z("tengu_tern_alloy","off")==="copy_b"?`For big tasks, tell Claudin to ${r("use subagents")}. They work in parallel and keep your main thread clean.`:`Say ${r('"fan out subagents"')} and Claudin sends a team. Each one digs deep so nothing gets missed.`},cooldownSessions:3,isRelevant:async()=>{if(!X())return!1;return z("tengu_tern_alloy","off")!=="off"}},{id:"loop-command-nudge",content:async(y)=>{let r=k("suggestion",y.theme);return z("tengu_timber_lark","off")==="copy_b"?`Use ${r("/loop 5m check the deploy")} to run any prompt on a schedule. Set it and forget it.`:`${r("/loop")} runs any prompt on a recurring schedule. Great for monitoring deploys, babysitting PRs, or polling status.`},cooldownSessions:3,isRelevant:async()=>{if(!X())return!1;if(!L())return!1;return z("tengu_timber_lark","off")!=="off"}},{id:"guest-passes",content:async(y)=>{let r=k("claude",y.theme),G=t();return G?`Share Claudin and earn ${r(a(G))} of extra usage · ${r("/passes")}`:`You have free guest passes to share · ${r("/passes")}`},cooldownSessions:3,isRelevant:async()=>{if(w().hasVisitedPasses)return!1;let{eligible:r}=_();return r}},{id:"overage-credit",content:async(y)=>{let r=k("claude",y.theme),G=s(),S=G?d(G):null;if(!S)return"";return`${r(`${S} in extra usage, on us`)} · third-party apps · ${r("/extra-usage")}`},cooldownSessions:3,isRelevant:async()=>g()},{id:"feedback-command",content:async()=>"Use /feedback to help us improve!",cooldownSessions:15,async isRelevant(){return w().numStartups>5}}],my=[];function By(){let r=Z().spinnerTipsOverride;if(!r?.tips?.length)return[];return r.tips.map((G,S)=>({id:`custom-tip-${S}`,content:async()=>G,cooldownSessions:0,isRelevant:async()=>!0}))}async function kr(y){let G=Z().spinnerTipsOverride,S=By();if(G?.excludeDefault&&S.length>0)return S;let I=[...by,...my],$=await Promise.all(I.map((J)=>J.isRelevant(y)));return[...I.filter((J,e)=>$[e]).filter((J)=>P(J.id)>=J.cooldownSessions),...S]}
4
- export{Vy as cb,P as db,kr as eb};
@@ -1,2 +0,0 @@
1
- import{fsa as l}from"./cli-1.0.11-see5c6wp.mjs";function o(i,e,r){var t=null;if(r!==void 0&&(t=""+r),e.key!==void 0&&(t=""+e.key),"key"in e){r={};for(var s in e)s!=="key"&&(r[s]=e[s])}else r=e;return e=r.ref,{$$typeof:n,type:i,key:t,ref:e!==void 0?e:null,props:r}}var n,d,u,E,a;var c=l(()=>{n=Symbol.for("react.transitional.element"),d=Symbol.for("react.fragment");u=d,E=o,a=o});
2
- export{u as T3,E as U3,a as V3,c as W3};
@@ -1,2 +0,0 @@
1
- import{DV as k,EV as f,UV as u}from"./cli-1.0.11-v5d8hdt5.mjs";import{JX as C,VX as d}from"./cli-1.0.11-nnb7707z.mjs";import{o4 as A,q4 as F}from"./cli-1.0.11-t3yw4wkf.mjs";import{M4 as q,S4 as i}from"./cli-1.0.11-vfcnt54q.mjs";import{G8 as W,J8 as _,Q8 as j,R8 as w,W8 as I}from"./cli-1.0.11-80ek75w2.mjs";import{oga as V,wga as U}from"./cli-1.0.11-8864t240.mjs";import{Tia as M,Uia as v}from"./cli-1.0.11-g0b3tp96.mjs";import{$ja as x,Bja as X,Cja as R,Gja as p,Yja as J}from"./cli-1.0.11-94m7sqz0.mjs";import{Dka as T,wka as P}from"./cli-1.0.11-632mfg4h.mjs";import{gsa as O}from"./cli-1.0.11-see5c6wp.mjs";x();U();F();v();x();T();U();_();I();p();import{randomUUID as E}from"crypto";var h=2000,y=5,S=30000,Y=3,c=new Set([4003]);function D(B){if(typeof B!=="object"||B===null||!("type"in B))return!1;return typeof B.type==="string"}class L{sessionId;orgUuid;getAccessToken;callbacks;ws=null;state="closed";reconnectAttempts=0;sessionNotFoundRetries=0;pingInterval=null;reconnectTimer=null;constructor(B,z,Q,H){this.sessionId=B;this.orgUuid=z;this.getAccessToken=Q;this.callbacks=H}async connect(){if(this.state==="connecting"){J("[SessionsWebSocket] Already connecting");return}this.state="connecting";let z=`${M().BASE_API_URL.replace("https://","wss://")}/v1/sessions/ws/${this.sessionId}/subscribe?organization_uuid=${this.orgUuid}`;J(`[SessionsWebSocket] Connecting to ${z}`);let H={Authorization:`Bearer ${this.getAccessToken()}`,"anthropic-version":"2023-06-01"};if(typeof Bun<"u"){let $=new globalThis.WebSocket(z,{headers:H,proxy:w(z),tls:W()||void 0});this.ws=$,$.addEventListener("open",()=>{J("[SessionsWebSocket] Connection opened, authenticated via headers"),this.state="connected",this.reconnectAttempts=0,this.sessionNotFoundRetries=0,this.startPingInterval(),this.callbacks.onConnected?.()}),$.addEventListener("message",(Z)=>{let K=typeof Z.data==="string"?Z.data:String(Z.data);this.handleMessage(K)}),$.addEventListener("error",()=>{let Z=Error("[SessionsWebSocket] WebSocket error");V(Z),this.callbacks.onError?.(Z)}),$.addEventListener("close",(Z)=>{J(`[SessionsWebSocket] Closed: code=${Z.code} reason=${Z.reason}`),this.handleClose(Z.code)}),$.addEventListener("pong",()=>{J("[SessionsWebSocket] Pong received")})}else{let{default:$}=await import("./wrapper-1.0.11-r3ecyxab.mjs"),Z=new $(z,{headers:H,agent:j(z),...W()});this.ws=Z,Z.on("open",()=>{J("[SessionsWebSocket] Connection opened, authenticated via headers"),this.state="connected",this.reconnectAttempts=0,this.sessionNotFoundRetries=0,this.startPingInterval(),this.callbacks.onConnected?.()}),Z.on("message",(K)=>{this.handleMessage(K.toString())}),Z.on("error",(K)=>{V(Error(`[SessionsWebSocket] Error: ${K.message}`)),this.callbacks.onError?.(K)}),Z.on("close",(K,G)=>{J(`[SessionsWebSocket] Closed: code=${K} reason=${G.toString()}`),this.handleClose(K)}),Z.on("pong",()=>{J("[SessionsWebSocket] Pong received")})}}handleMessage(B){try{let z=R(B);if(D(z))this.callbacks.onMessage(z);else J(`[SessionsWebSocket] Ignoring message type: ${typeof z==="object"&&z!==null&&"type"in z?String(z.type):"unknown"}`)}catch(z){V(Error(`[SessionsWebSocket] Failed to parse message: ${P(z)}`))}}handleClose(B){if(this.stopPingInterval(),this.state==="closed")return;this.ws=null;let z=this.state;if(this.state="closed",c.has(B)){J(`[SessionsWebSocket] Permanent close code ${B}, not reconnecting`),this.callbacks.onClose?.();return}if(B===4001){if(this.sessionNotFoundRetries++,this.sessionNotFoundRetries>Y){J(`[SessionsWebSocket] 4001 retry budget exhausted (${Y}), not reconnecting`),this.callbacks.onClose?.();return}this.scheduleReconnect(h*this.sessionNotFoundRetries,`4001 attempt ${this.sessionNotFoundRetries}/${Y}`);return}if(z==="connected"&&this.reconnectAttempts<y)this.reconnectAttempts++,this.scheduleReconnect(h,`attempt ${this.reconnectAttempts}/${y}`);else J("[SessionsWebSocket] Not reconnecting"),this.callbacks.onClose?.()}scheduleReconnect(B,z){this.callbacks.onReconnecting?.(),J(`[SessionsWebSocket] Scheduling reconnect (${z}) in ${B}ms`),this.reconnectTimer=setTimeout(()=>{this.reconnectTimer=null,this.connect()},B)}startPingInterval(){this.stopPingInterval(),this.pingInterval=setInterval(()=>{if(this.ws&&this.state==="connected")try{this.ws.ping?.()}catch{}},S)}stopPingInterval(){if(this.pingInterval)clearInterval(this.pingInterval),this.pingInterval=null}sendControlResponse(B){if(!this.ws||this.state!=="connected"){V(Error("[SessionsWebSocket] Cannot send: not connected"));return}J("[SessionsWebSocket] Sending control response"),this.ws.send(X(B))}sendControlRequest(B){if(!this.ws||this.state!=="connected"){V(Error("[SessionsWebSocket] Cannot send: not connected"));return}let z={type:"control_request",request_id:E(),request:B};J(`[SessionsWebSocket] Sending control request: ${B.subtype}`),this.ws.send(X(z))}isConnected(){return this.state==="connected"}close(){if(J("[SessionsWebSocket] Closing connection"),this.state="closed",this.stopPingInterval(),this.reconnectTimer)clearTimeout(this.reconnectTimer),this.reconnectTimer=null;if(this.ws)this.ws.close(),this.ws=null}reconnect(){J("[SessionsWebSocket] Force reconnecting"),this.reconnectAttempts=0,this.sessionNotFoundRetries=0,this.close(),this.reconnectTimer=setTimeout(()=>{this.reconnectTimer=null,this.connect()},500)}}function N(B){return B.type!=="control_request"&&B.type!=="control_response"&&B.type!=="control_cancel_request"}class b{config;callbacks;websocket=null;pendingPermissionRequests=new Map;constructor(B,z){this.config=B;this.callbacks=z}connect(){J(`[RemoteSessionManager] Connecting to session ${this.config.sessionId}`);let B={onMessage:(z)=>this.handleMessage(z),onConnected:()=>{J("[RemoteSessionManager] Connected"),this.callbacks.onConnected?.()},onClose:()=>{J("[RemoteSessionManager] Disconnected"),this.callbacks.onDisconnected?.()},onReconnecting:()=>{J("[RemoteSessionManager] Reconnecting"),this.callbacks.onReconnecting?.()},onError:(z)=>{V(z),this.callbacks.onError?.(z)}};this.websocket=new L(this.config.sessionId,this.config.orgUuid,this.config.getAccessToken,B),this.websocket.connect()}handleMessage(B){if(B.type==="control_request"){this.handleControlRequest(B);return}if(B.type==="control_cancel_request"){let{request_id:z}=B,Q=this.pendingPermissionRequests.get(z);J(`[RemoteSessionManager] Permission request cancelled: ${z}`),this.pendingPermissionRequests.delete(z),this.callbacks.onPermissionCancelled?.(z,Q?.tool_use_id);return}if(B.type==="control_response"){J("[RemoteSessionManager] Received control response");return}if(N(B))this.callbacks.onMessage(B)}handleControlRequest(B){let{request_id:z,request:Q}=B;if(Q.subtype==="can_use_tool")J(`[RemoteSessionManager] Permission request for tool: ${Q.tool_name}`),this.pendingPermissionRequests.set(z,Q),this.callbacks.onPermissionRequest(Q,z);else{J(`[RemoteSessionManager] Unsupported control request subtype: ${Q.subtype}`);let H={type:"control_response",response:{subtype:"error",request_id:z,error:`Unsupported control request subtype: ${Q.subtype}`}};this.websocket?.sendControlResponse(H)}}async sendMessage(B,z){J(`[RemoteSessionManager] Sending message to session ${this.config.sessionId}`);let Q=await A(this.config.sessionId,B,z);if(!Q)V(Error(`[RemoteSessionManager] Failed to send message to session ${this.config.sessionId}`));return Q}respondToPermissionRequest(B,z){if(!this.pendingPermissionRequests.get(B)){V(Error(`[RemoteSessionManager] No pending permission request with ID: ${B}`));return}this.pendingPermissionRequests.delete(B);let H={type:"control_response",response:{subtype:"success",request_id:B,response:{behavior:z.behavior,...z.behavior==="allow"?{updatedInput:z.updatedInput}:{message:z.message}}}};J(`[RemoteSessionManager] Sending permission response: ${z.behavior}`),this.websocket?.sendControlResponse(H)}isConnected(){return this.websocket?.isConnected()??!1}cancelSession(){J("[RemoteSessionManager] Sending interrupt signal"),this.websocket?.sendControlRequest({subtype:"interrupt"})}getSessionId(){return this.config.sessionId}disconnect(){J("[RemoteSessionManager] Disconnecting"),this.websocket?.close(),this.websocket=null,this.pendingPermissionRequests.clear()}reconnect(){J("[RemoteSessionManager] Reconnecting WebSocket"),this.websocket?.reconnect()}}function $z(B,z,Q,H=!1,$=!1){return{sessionId:B,getAccessToken:z,orgUuid:Q,hasInitialPrompt:H,viewerOnly:$}}x();U();d();u();function Xz(){let B=C();if(!B?.teamName||!B?.agentName){J("[Reconnection] computeInitialTeamContext: No teammate context set (not a teammate)");return}let{teamName:z,agentId:Q,agentName:H}=B,$=f(z);if(!$){V(Error(`[computeInitialTeamContext] Could not read team file for ${z}`));return}let Z=k(z),K=!Q;return J(`[Reconnection] Computed initial team context for ${K?"leader":`teammate ${H}`} in team ${z}`),{teamName:z,teamFilePath:Z,leadAgentId:$.leadAgentId,selfAgentId:Q,selfAgentName:H,isLeader:K,teammates:{}}}function Wz(B,z,Q){let H=f(z);if(!H){V(Error(`[initializeTeammateContextFromSession] Could not read team file for ${z} (agent: ${Q})`));return}let $=H.members.find((G)=>G.name===Q);if(!$)J(`[Reconnection] Member ${Q} not found in team ${z} - may have been removed`);let Z=$?.agentId,K=k(z);B((G)=>({...G,teamContext:{teamName:z,teamFilePath:K,leadAgentId:H.leadAgentId,selfAgentId:Z,selfAgentName:Q,isLeader:!1,teammates:{}}})),J(`[Reconnection] Initialized agent context from session for ${Q} in team ${z}`)}i();var m={"claude-3-opus":{modelName:"Claude 3 Opus",retirementDates:{firstParty:"January 5, 2026",bedrock:"January 15, 2026",vertex:"January 5, 2026",foundry:"January 5, 2026"}},"claude-3-7-sonnet":{modelName:"Claude 3.7 Sonnet",retirementDates:{firstParty:"February 19, 2026",bedrock:"April 28, 2026",vertex:"May 11, 2026",foundry:"February 19, 2026"}},"claude-3-5-haiku":{modelName:"Claude 3.5 Haiku",retirementDates:{firstParty:"February 19, 2026",bedrock:null,vertex:null,foundry:null}}};function l(B){let z=B.toLowerCase(),Q=q();for(let[H,$]of Object.entries(m)){let Z=$.retirementDates[Q];if(!z.includes(H)||!Z)continue;return{isDeprecated:!0,modelName:$.modelName,retirementDate:Z}}return{isDeprecated:!1}}function Lz(B){if(!B)return null;let z=l(B);if(!z.isDeprecated)return null;return`⚠ ${z.modelName} will be retired on ${z.retirementDate}. Consider switching to a newer model.`}
2
- export{b as Na,$z as Oa,Xz as Pa,Wz as Qa,Lz as Ra};
@@ -1,50 +0,0 @@
1
- import{Fc as zc,Gc as on}from"./cli-1.0.11-738xq402.mjs";import{Hc as Vh,Ic as jt,Jc as Vt,Kc as Oc,Mc as jn}from"./cli-1.0.11-8ez7ws7j.mjs";import{Nc as ft,Qc as Dn}from"./cli-1.0.11-1yxgtmp3.mjs";import{$H as xn,AG as zu,BG as Ru,CG as rn,Np as Mu,Op as Tu,Pp as Uu,Qp as Eu,Rp as nc,Sp as Ct,Tp as Xh,Up as Pu,Vp as Bu,Wp as Ln,XH as eh,Xp as Nh,YF as Xt,YH as jc,ZF as sh,Zp as ou,_H as In,_p as ac,_x as bc,aq as pu,ay as Pn,dq as ku,eq as An,fq as Lu,gG as S,gq as Qu,hG as Dc,hq as Nu,hx as Cc,iG as Bn,iq as Ju,ix as lc,jq as at,jx as rc,kq as Ah,kx as wc,lq as gn,lr as yc,lx as En,mq as Jh,mr as Un,oq as Gu,pq as mc,rq as Su,xG as bu,yG as ln,zG as Ou}from"./cli-1.0.11-vjjxby46.mjs";import{iY as D,kY as Mn,wY as uc,xY as Tn}from"./cli-1.0.11-v02e3hp0.mjs";import{G0 as F,I0 as y,l1 as Eh}from"./cli-1.0.11-7t17zc1z.mjs";import{A2 as oh,B2 as cc,C2 as ph,o2 as Ph,p2 as Bh,q2 as Ih,r2 as xh,s2 as Dh,t2 as xc,w2 as jh}from"./cli-1.0.11-j65xt6ja.mjs";import{T3 as yt,U3 as n,V3 as z,W3 as Tt}from"./cli-1.0.11-ct42xhge.mjs";import{X3 as Qt}from"./cli-1.0.11-x09790kn.mjs";import{s4 as Pt,t4 as qu}from"./cli-1.0.11-pggbs1cj.mjs";import{D6 as Dt,J4 as Uh,L4 as Ic,V6 as Wn}from"./cli-1.0.11-vfcnt54q.mjs";import{$ea as Jt,Afa as wu,Bfa as Cn,Cfa as Lh,Dfa as gu,Efa as Qh,Gfa as Xu,Ifa as hc,Jfa as pt,Sea as tc,Tea as $t,Uea as Hn,Vea as ot,Wea as x,Yea as B,Yfa as Kn,Zea as xt,afa as Fh,bfa as ut,cfa as ct,d_ as qt,e_ as Sn,gfa as nt,hfa as _h,jfa as kh,nfa as Th,sfa as Oh,tfa as yu,ufa as Cu,vfa as Ut,wfa as zh,xfa as lu,yfa as bh,zfa as ru}from"./cli-1.0.11-8864t240.mjs";import{Lka as o,Tka as Et}from"./cli-1.0.11-wjmpvhps.mjs";import{bsa as Lt,csa as Gn,fsa as I}from"./cli-1.0.11-see5c6wp.mjs";function pc(t,h=Ch,u){let a=x().find((w)=>w.provider==="openai"&&w.extras?.githubToken!==void 0);if(a){if(!ct(a.id,{provider:"openai",name:a.name,baseUrl:u||a.baseUrl,model:a.model||h,apiKey:t,extras:{...a.extras,githubToken:t}}))return{mode:"failed"};return nt(a.id),{mode:"updated"}}if(!ut({provider:"openai",name:"GitHub Copilot",baseUrl:u||oc,model:h,apiKey:t,extras:{githubToken:t}},{makeActive:!0}))return{mode:"failed"};return{mode:"created"}}function vh({onDone:t,onBack:h,onChangeAPIKey:u}){let a=jh()?.trim()?"already-authed":"menu",[C,w]=j.useState(a),[f,A]=j.useState(null),[$,R]=j.useState(""),[X,J]=j.useState(0),[Q,H]=j.useState(null),V=j.useCallback(async(i,Z=Ch,mt,N)=>{let P=oh(i,mt,N?.enterpriseDomain);if(!P.success){A(P.warning??"Could not save token to secure storage."),w("error");return}if(pc(i,Z,N?.baseUrl).mode==="failed"){A("Could not save the GitHub Copilot provider profile."),w("error");return}Uh(),u?.(),t("GitHub Copilot onboard complete. Copilot token stored in secure storage and as the active /provider profile.",{display:"user"})},[u,t]),O=j.useCallback(async(i)=>{w("device-busy"),A(null),H(null);try{let Z=await Bh({domain:i});H({user_code:Z.user_code,verification_uri:Z.verification_uri}),await xh(Z.verification_uri);let mt=await Ih(Z.device_code,{initialInterval:Z.interval,timeoutSeconds:Z.expires_in,domain:i}),N=await Dh(mt,{domain:i});await V(N.token,Ch,mt,{baseUrl:N.endpoints.api?.replace(/\/+$/,"")||void 0,enterpriseDomain:i})}catch(Z){A(Z instanceof Error?Z.message:String(Z)),w("error")}},[V]);if(C==="already-authed")return z(F,{flexDirection:"column",gap:1,children:[n(y,{bold:!0,children:"GitHub Copilot"}),n(y,{children:"You are already signed in to GitHub Copilot."}),n(y,{dimColor:!0,children:'Choose "Sign in again" to refresh your token, or go back to the provider menu.'}),n(S,{options:[{label:"Sign in again",value:"sign-in-again"},{label:"Sign in with GitHub Enterprise",value:"enterprise"},{label:h?"Back to /provider menu":"Cancel",value:"back"}],onChange:(Z)=>{if(Z==="sign-in-again"){O();return}if(Z==="enterprise"){w("enterprise-domain");return}if(h){h();return}t("GitHub onboard cancelled",{display:"system"})}})]});if(C==="enterprise-domain")return z(F,{flexDirection:"column",gap:1,children:[n(y,{bold:!0,children:"GitHub Enterprise sign-in"}),n(y,{dimColor:!0,children:"Enter your GitHub Enterprise domain (e.g. github.acme.com). Leave empty for github.com."}),z(F,{flexDirection:"row",gap:1,children:[n(y,{children:">"}),n(Xt,{value:$,onChange:R,onSubmit:()=>{let Z=Ph($);if(!Z){O();return}O(Z)},onExit:()=>w(a),focus:!0,showCursor:!0,placeholder:"github.acme.com",columns:80,cursorOffset:X,onChangeCursorOffset:J})]}),n(y,{dimColor:!0,children:"Press Enter to continue. Press Esc to go back."})]});if(C==="error"&&f)return z(F,{flexDirection:"column",gap:1,children:[n(y,{color:"red",children:f}),n(S,{options:[{label:h?"Back to /provider menu":"Back to menu",value:"back"},{label:"Exit",value:"exit"}],onChange:(Z)=>{if(Z==="back"){if(h){h();return}w("menu"),A(null);return}t("GitHub onboard cancelled",{display:"system"})}})]});if(C==="device-busy")return z(F,{flexDirection:"column",gap:1,children:[n(y,{children:"GitHub Copilot sign-in"}),Q?z(yt,{children:[z(y,{children:["Enter code ",n(y,{bold:!0,children:Q.user_code})," at"," ",Q.verification_uri]}),n(y,{dimColor:!0,children:"A browser window may have opened. Waiting for authorization..."})]}):n(y,{dimColor:!0,children:"Requesting device code from GitHub..."}),n(eh,{})]});return z(F,{flexDirection:"column",gap:1,children:[n(y,{bold:!0,children:"GitHub Copilot setup"}),n(y,{dimColor:!0,children:"Stores your token in the OS credential store (macOS Keychain when available) and creates a /provider profile so Copilot is the active provider — no manual env exports required."}),n(S,{options:[{label:"Sign in with browser",value:"device"},{label:"Sign in with GitHub Enterprise",value:"enterprise"},{label:h?"Back to /provider menu":"Cancel",value:"cancel"}],onChange:(i)=>{if(i==="cancel"){if(h){h();return}t("GitHub onboard cancelled",{display:"system"});return}if(i==="enterprise"){w("enterprise-domain");return}O()}})]})}var j,Ch="github:copilot",oc="https://api.githubcopilot.com";var tu=I(()=>{Dc();jc();sh();Eh();xc();ph();Ic();Th();Tt();j=Lt(Qt(),1)});function uu(t){return[t.name,t.family??"",...t.families??[],t.parameterSize??"",t.quantizationLevel??""].join(" ").toLowerCase()}function Nt(t,h){return h.some((u)=>t.includes(u))}function tn(t){return!Nt(uu(t),hu)}function hn(t){return t.find(tn)??null}function lh(t){let u=`${t.parameterSize??""} ${t.name}`.toLowerCase().match(/(\d+(?:\.\d+)?)\s*b\b/);if(u?.[1])return Number(u[1]);if(typeof t.sizeBytes==="number"&&t.sizeBytes>0)return Number((t.sizeBytes/1e9).toFixed(1));return null}function un(t){return(t.quantizationLevel??t.name).toLowerCase()}function cn(t,h,u){if(t===null)return u.push("unknown size"),0;if(h==="latency"){if(t<=4)return u.push("tiny model for low latency"),32;if(t<=8)return u.push("small model for fast responses"),26;if(t<=14)return u.push("mid-sized model with acceptable latency"),16;if(t<=24)return u.push("larger model may be slower"),8;return u.push("large model likely slower locally"),t<=40?0:-8}if(h==="coding"){if(t>=7&&t<=14)return u.push("strong coding size tier"),24;if(t>14&&t<=34)return u.push("large coding-capable size tier"),28;if(t>34)return u.push("very large model with higher quality potential"),18;return u.push("compact model may trade off coding depth"),12}if(t>=7&&t<=14)return u.push("great balanced size tier"),26;if(t>=3&&t<7)return u.push("compact balanced size tier"),18;if(t>14&&t<=24)return u.push("high quality balanced size tier"),20;if(t>24)return u.push("large model for quality-first usage"),10;return u.push("very small model for general usage"),8}function nn(t,h,u){let a=un(t);if(a.includes("q4"))return u.push("efficient Q4 quantization"),h==="latency"?8:4;if(a.includes("q5"))return u.push("balanced Q5 quantization"),h==="latency"?6:5;if(a.includes("q8"))return u.push("higher quality Q8 quantization"),h==="latency"?2:5;return 0}function an(t,h,u){if(h.score!==t.score)return h.score-t.score;let a=lh(t)??Number.POSITIVE_INFINITY,C=lh(h)??Number.POSITIVE_INFINITY;if(u==="latency")return a-C;if(u==="coding")return C-a;let w=14;return Math.abs(a-w)-Math.abs(C-w)}function rh(t,h){return t.map((u)=>{let a=uu(u),C=[],w=0;if(Nt(a,hu))w-=40,C.push("not a chat-first model");if(Nt(a,sc))w+=h==="coding"?24:h==="balanced"?10:4,C.push("coding-oriented model family");if(Nt(a,ec))w+=h==="latency"?4:h==="coding"?6:8,C.push("strong general-purpose model family");if(Nt(a,vc))w+=h==="latency"?2:6,C.push("chat/instruct tuned");if(a.includes("vision")||a.includes("vl"))w-=2,C.push("vision model adds extra overhead");w+=cn(lh(u),h,C),w+=nn(u,h,C);let f=C.slice(0,3).join(", ");return{...u,score:w,reasons:C,summary:f}}).sort((u,a)=>an(u,a,h))}function cu(t,h){return hn(rh(t,h))}var sc,ec,vc,hu;var nu=I(()=>{sc=["coder","codellama","codegemma","codestral","devstral","starcoder","deepseek-coder","qwen2.5-coder","qwen-coder"],ec=["llama","qwen","mistral","gemma","phi","deepseek"],vc=["instruct","chat","assistant"],hu=["embed","embedding","rerank","bge","whisper"]});function yn(t){let h=t.toLowerCase();return mn.some((u)=>h.includes(u))}function wh(t){try{let h=new URL(t);if(h.username)h.username="redacted";if(h.password)h.password="redacted";for(let u of h.searchParams.keys())if(yn(u))h.searchParams.set(u,"redacted");return h.toString()}catch{return t.replace(/\/\/[^/@\s]+(?::[^/@\s]*)?@/g,"//redacted@").replace(/([?&](?:token|access_token|refresh_token|api_key|apikey|key|password|passwd|pwd|auth|authorization|signature|sig|secret)=)[^&#]*/gi,"$1redacted")}}var mn;var au=I(()=>{mn=["api_key","apikey","key","token","access_token","refresh_token","signature","sig","secret","password","passwd","pwd","auth","authorization"]});function wn(t){let h=`http://localhost:${t.port}/auth/callback`,u=new URL(`${Oh}/oauth/authorize`);return u.searchParams.append("response_type","code"),u.searchParams.append("client_id",zh()),u.searchParams.append("redirect_uri",h),u.searchParams.append("scope",yu),u.searchParams.append("code_challenge",t.codeChallenge),u.searchParams.append("code_challenge_method","S256"),u.searchParams.append("id_token_add_organizations","true"),u.searchParams.append("codex_cli_simplified_flow","true"),u.searchParams.append("state",t.state),u.searchParams.append("originator",Cu),u.toString()}function bn(){return`<!doctype html>
2
- <html lang="en">
3
- <head>
4
- <meta charset="utf-8" />
5
- <title>Codex Login Complete</title>
6
- <style>
7
- body { font-family: sans-serif; padding: 32px; line-height: 1.5; color: #111827; }
8
- h1 { margin: 0 0 12px; font-size: 22px; }
9
- p { margin: 0 0 10px; }
10
- </style>
11
- </head>
12
- <body>
13
- <h1>Codex login complete</h1>
14
- <p>You can return to Claudin now.</p>
15
- <p>Claudin will finish activating your new Codex OAuth login.</p>
16
- </body>
17
- </html>`}function On(t){return`<!doctype html>
18
- <html lang="en">
19
- <head>
20
- <meta charset="utf-8" />
21
- <title>Codex Login Failed</title>
22
- <style>
23
- body { font-family: sans-serif; padding: 32px; line-height: 1.5; color: #111827; }
24
- h1 { margin: 0 0 12px; font-size: 22px; color: #991b1b; }
25
- p { margin: 0 0 10px; }
26
- </style>
27
- </head>
28
- <body>
29
- <h1>Codex login failed</h1>
30
- <p>${ru(t)}</p>
31
- <p>You can close this window and try again in Claudin.</p>
32
- </body>
33
- </html>`}function mu(){return`<!doctype html>
34
- <html lang="en">
35
- <head>
36
- <meta charset="utf-8" />
37
- <title>Codex Login Cancelled</title>
38
- <style>
39
- body { font-family: sans-serif; padding: 32px; line-height: 1.5; color: #111827; }
40
- h1 { margin: 0 0 12px; font-size: 22px; }
41
- p { margin: 0 0 10px; }
42
- </style>
43
- </head>
44
- <body>
45
- <h1>Codex login cancelled</h1>
46
- <p>You can close this window and retry in Claudin.</p>
47
- </body>
48
- </html>`}async function zn(t){let h=`http://localhost:${t.port}/auth/callback`,u=new URLSearchParams({grant_type:"authorization_code",code:t.authorizationCode,redirect_uri:h,client_id:zh(),code_verifier:t.codeVerifier}),a=await fetch(`${Oh}/oauth/token`,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:u,signal:t.signal?AbortSignal.any([t.signal,AbortSignal.timeout(15000)]):AbortSignal.timeout(15000)});if(!a.ok){let R=await a.text().catch(()=>"");throw Error(R.trim()?`Codex OAuth token exchange failed (${a.status}): ${R.trim()}`:`Codex OAuth token exchange failed with status ${a.status}.`)}let C=await a.json(),w=Ut(C.access_token),f=Ut(C.refresh_token);if(!w||!f)throw Error("Codex OAuth completed, but the token response was missing credentials.");let A=Ut(C.id_token);return{apiKey:A?await wu(A).catch(()=>{return}):void 0,accessToken:w,refreshToken:f,idToken:A,accountId:bh(A)??bh(w)}}class Rh{authCodeListener=null;port=null;tokenExchangeAbortController=null;buildCancellationError(){return Error("Codex OAuth flow was cancelled.")}async startOAuthFlow(t){let h=Ou(),u=lu(),a=new bu("/auth/callback");this.authCodeListener=a,this.port=null;try{let C=await a.start(u);this.port=C;let w=Ru(),f=await zu(h),A=wn({port:C,codeChallenge:f,state:w});try{let $=await a.waitForAuthorization(w,async()=>{await t(A)}),R=new AbortController;this.tokenExchangeAbortController=R;let X;try{X=await zn({authorizationCode:$,codeVerifier:h,port:C,signal:R.signal})}finally{if(this.tokenExchangeAbortController===R)this.tokenExchangeAbortController=null}if(this.authCodeListener!==a)throw this.buildCancellationError();return a.handleSuccessRedirect([],(J)=>{J.writeHead(200,{"Content-Type":"text/html; charset=utf-8"}),J.end(bn())}),X}catch($){let R=this.authCodeListener===a?$:this.buildCancellationError();if(a.hasPendingResponse()){let X=R instanceof Error&&R.message==="Codex OAuth flow was cancelled.";a.handleErrorRedirect((J)=>{J.writeHead(X?200:400,{"Content-Type":"text/html; charset=utf-8"}),J.end(X?mu():On(R instanceof Error?R.message:String(R)))})}throw R}finally{this.cleanup()}}catch(C){let w=C instanceof Error?C.message:String(C);if(w.includes("EADDRINUSE")||w.includes(String(u)))throw Error(`Codex OAuth needs localhost:${u} for its callback. Close any app already using that port and try again.`);throw C}}cleanup(){let t=this.buildCancellationError();if(this.tokenExchangeAbortController?.abort(t),this.tokenExchangeAbortController=null,this.authCodeListener?.hasPendingResponse())this.authCodeListener.handleErrorRedirect((h)=>{h.writeHead(200,{"Content-Type":"text/html; charset=utf-8"}),h.end(mu())});this.authCodeListener?.cancelPendingAuthorization(t),this.authCodeListener=null,this.port=null}}var Au=I(()=>{ln();rn();Cn()});function Rn(){return new Rh}function $u(t){let{onAuthenticated:h}=t,u=t.deps?.createOAuthService??Rn,a=t.deps?.openBrowser??Pt,C=t.deps?.saveCodexCredentials??gu,w=t.deps?.isBareMode??o,[f,A]=Bt.useState({state:"starting"});return Bt.useEffect(()=>{if(w()){A({state:"error",message:"Codex OAuth is unavailable in --bare because secure storage is disabled."});return}let $=!1,R=u();return R.startOAuthFlow(async(X)=>{if($)return;A({state:"waiting",authUrl:X,browserOpened:null});let J=await a(X);if($)return;A({state:"waiting",authUrl:X,browserOpened:J})}).then(async(X)=>{if($)return;await h(X,(Q)=>{let H=C({apiKey:X.apiKey,accessToken:X.accessToken,refreshToken:X.refreshToken,idToken:X.idToken,accountId:X.accountId,profileId:Q?.profileId});if(!H.success)throw Error(H.warning??"Codex OAuth succeeded, but credentials could not be saved securely.")})}).catch((X)=>{if($)return;A({state:"error",message:X instanceof Error?X.message:String(X)})}),()=>{$=!0,R.cleanup()}},[u,w,h,a,C]),f}var Bt;var fu=I(()=>{Au();qu();Xu();Et();Bt=Lt(Qt(),1)});function du(){return{"Content-Type":"application/x-www-form-urlencoded",Accept:"application/json","User-Agent":ku()}}function _u(t,h){let u=Number(t);return Number.isFinite(u)&&u>0?u*1000:h}function fn(t,h){if(h?.aborted)return Promise.resolve();return new Promise((u)=>{let a=setTimeout(()=>{h?.removeEventListener("abort",C),u()},t),C=()=>{clearTimeout(a),u()};h?.addEventListener("abort",C,{once:!0})})}async function Fn(t){let h=t?.fetchImpl??fetch,u=t?.signal?AbortSignal.any([t.signal,AbortSignal.timeout(15000)]):AbortSignal.timeout(15000),a=await h(Qu,{method:"POST",headers:du(),body:new URLSearchParams({client_id:Ah(),scope:Ju}).toString(),signal:u});if(!a.ok){let $=await a.text().catch(()=>"");throw Error(`xAI device code request failed (${a.status})${$?`: ${$.trim()}`:""}`)}let C=await a.json(),w=at(C.device_code),f=at(C.user_code),A=at(C.verification_uri);if(!w||!f||!A)throw Error("xAI device code response is missing device_code / user_code / verification_uri.");return{device_code:w,user_code:f,verification_uri:A,verification_uri_complete:at(C.verification_uri_complete),expires_in:typeof C.expires_in==="number"&&C.expires_in>0?C.expires_in:Zu/1000,interval:typeof C.interval==="number"&&C.interval>0?C.interval:Vu/1000}}async function _n(t,h){let u=h?.fetchImpl??fetch,a=h?.sleep??fn,C=h?.now??(()=>Date.now()),w=_u(t.expires_in,Zu),f=C()+w,A=Math.max(_u(t.interval,Vu),Xn);while(C()<f){if(h?.signal?.aborted)throw Error("xAI device authorization was cancelled.");let $=await u(Lu,{method:"POST",headers:du(),body:new URLSearchParams({grant_type:Nu,client_id:Ah(),device_code:t.device_code}).toString(),signal:h?.signal});if($.ok){let Q=await $.json(),H=at(Q.access_token),V=at(Q.refresh_token);if(!H||!V)throw Error("xAI OAuth completed, but the token response was missing credentials.");let O=typeof Q.expires_in==="number"&&Number.isFinite(Q.expires_in)&&Q.expires_in>0?Q.expires_in:3600;return{accessToken:H,refreshToken:V,idToken:at(Q.id_token),expiresAt:C()+O*1000}}let R=await $.json().catch(()=>({})),X=Math.max(0,f-C());if(R.error==="authorization_pending"){await a(Math.min(A+Fu,X),h?.signal);continue}if(R.error==="slow_down"){A=Math.min(A+qn,$n),await a(Math.min(A+Fu,X),h?.signal);continue}if(R.error==="access_denied"||R.error==="authorization_denied")throw Error("xAI device authorization was denied.");if(R.error==="expired_token")throw Error("xAI device code expired - please re-run login.");let J=R.error_description??R.error??"";throw Error(`xAI device token exchange failed (${$.status})${J?`: ${J}`:""}`)}throw Error("xAI device authorization timed out.")}class gh{abortController=null;async startDeviceFlow(t){let h=new AbortController;this.abortController=h;try{let u=await Fn({signal:h.signal});return await t(u),await _n(u,{signal:h.signal})}finally{if(this.abortController===h)this.abortController=null}}cleanup(){this.abortController?.abort(Error("xAI device authorization was cancelled.")),this.abortController=null}}var Vu=5000,Xn=1000,qn=5000,$n=60000,Zu=300000,Fu=3000;var Yu=I(()=>{An();gn()});function kn(){return new gh}function Hu(t){let{onAuthenticated:h}=t,u=t.deps?.createOAuthService??kn,a=t.deps?.saveXaiCredentials??Gu,C=t.deps?.isBareMode??o,[w,f]=It.useState({state:"starting"});return It.useEffect(()=>{if(C()){f({state:"error",message:"xAI OAuth is unavailable in --bare because secure storage is disabled."});return}let A=!1,$=u();return $.startDeviceFlow(async(R)=>{if(A)return;f({state:"waiting",userCode:R.user_code,verificationUri:R.verification_uri,verificationUriComplete:R.verification_uri_complete})}).then(async(R)=>{if(A)return;await h(R,(J)=>{let Q=a({accessToken:R.accessToken,refreshToken:R.refreshToken,idToken:R.idToken,expiresAt:R.expiresAt,profileId:J?.profileId});if(!Q.success)throw Error(Q.warning??"xAI OAuth succeeded, but credentials could not be saved securely.")})}).catch((R)=>{if(A)return;f({state:"error",message:R instanceof Error?R.message:String(R)})}),()=>{A=!0,$.cleanup()}},[u,C,h,a]),w}var It;var Ku=I(()=>{Yu();Et();Su();It=Lt(Qt(),1)});async function Du(){return{"Content-Type":"application/x-www-form-urlencoded",Accept:"application/json","User-Agent":Eu,...await Bu()}}function iu(t,h){let u=Number(t);return Number.isFinite(u)&&u>0?u*1000:h}function Vn(t,h){if(h?.aborted)return Promise.resolve();return new Promise((u)=>{let a=setTimeout(()=>{h?.removeEventListener("abort",C),u()},t),C=()=>{clearTimeout(a),u()};h?.addEventListener("abort",C,{once:!0})})}async function Zn(t){let h=t?.fetchImpl??fetch,u=t?.signal?AbortSignal.any([t.signal,AbortSignal.timeout(15000)]):AbortSignal.timeout(15000),a=await h(Mu,{method:"POST",headers:await Du(),body:new URLSearchParams({client_id:Xh()}).toString(),signal:u});if(!a.ok){let $=await a.text().catch(()=>"");throw Error(`Kimi device code request failed (${a.status})${$?`: ${$.trim()}`:""}`)}let C=await a.json(),w=Ct(C.device_code),f=Ct(C.user_code),A=Ct(C.verification_uri);if(!w||!f||!A)throw Error("Kimi device code response is missing device_code / user_code / verification_uri.");return{device_code:w,user_code:f,verification_uri:A,verification_uri_complete:Ct(C.verification_uri_complete),expires_in:typeof C.expires_in==="number"&&C.expires_in>0?C.expires_in:xu/1000,interval:typeof C.interval==="number"&&C.interval>0?C.interval:Iu/1000}}async function dn(t,h){let u=h?.fetchImpl??fetch,a=h?.sleep??Vn,C=h?.now??(()=>Date.now()),w=iu(t.expires_in,xu),f=C()+w,A=Math.max(iu(t.interval,Iu),Qn);while(C()<f){if(h?.signal?.aborted)throw Error("Kimi device authorization was cancelled.");let $=await u(Tu,{method:"POST",headers:await Du(),body:new URLSearchParams({grant_type:Uu,client_id:Xh(),device_code:t.device_code}).toString(),signal:h?.signal});if($.ok){let Q=await $.json(),H=Ct(Q.access_token),V=Ct(Q.refresh_token);if(!H||!V)throw Error("Kimi OAuth completed, but the token response was missing credentials.");let O=typeof Q.expires_in==="number"&&Number.isFinite(Q.expires_in)&&Q.expires_in>0?Q.expires_in:900;return{accessToken:H,refreshToken:V,expiresAt:C()+O*1000}}let R=await $.json().catch(()=>({})),X=Math.max(0,f-C());if(R.error==="authorization_pending"){await a(Math.min(A+Wu,X),h?.signal);continue}if(R.error==="slow_down"){A=Math.min(A+Nn,Jn),await a(Math.min(A+Wu,X),h?.signal);continue}if(R.error==="access_denied"||R.error==="authorization_denied")throw Error("Kimi device authorization was denied.");if(R.error==="expired_token")throw Error("Kimi device code expired - please re-run login.");let J=R.error_description??R.error??"";throw Error(`Kimi device token exchange failed (${$.status})${J?`: ${J}`:""}`)}throw Error("Kimi device authorization timed out.")}class qh{abortController=null;async startDeviceFlow(t){let h=new AbortController;this.abortController=h;try{let u=await Zn({signal:h.signal});return await t(u),await dn(u,{signal:h.signal})}finally{if(this.abortController===h)this.abortController=null}}cleanup(){this.abortController?.abort(Error("Kimi device authorization was cancelled.")),this.abortController=null}}var Iu=5000,Qn=1000,Nn=5000,Jn=60000,xu=1800000,Wu=3000;var ju=I(()=>{Ln();Pu()});function Yn(){return new qh}function su(t){let{onAuthenticated:h}=t,u=t.deps?.createOAuthService??Yn,a=t.deps?.saveKimiCredentials??ou,C=t.deps?.isBareMode??o,[w,f]=lt.useState({state:"starting"}),A=lt.useRef(!1);return lt.useEffect(()=>{if(C()){f({state:"error",message:"Kimi Code OAuth is unavailable in --bare because secure storage is disabled."});return}let $=!1,R=u();return R.startDeviceFlow(async(X)=>{if($)return;f({state:"waiting",userCode:X.user_code,verificationUri:X.verification_uri,verificationUriComplete:X.verification_uri_complete})}).then(async(X)=>{if($)return;await h(X,(Q)=>{let H=a({accessToken:X.accessToken,refreshToken:X.refreshToken,expiresAt:X.expiresAt,profileId:Q?.profileId});if(!H.success)throw Error(H.warning??"Kimi Code OAuth succeeded, but credentials could not be saved securely.")})}).catch((X)=>{if($)return;f({state:"error",message:X instanceof Error?X.message:String(X)})}),()=>{$=!0,R.cleanup()}},[u,C,h,a]),lt.useEffect(()=>{if(w.state!=="waiting")return;if(A.current)return;let $=w.verificationUriComplete??w.verificationUri;if(!$)return;A.current=!0,Pt($).catch(()=>{})},[w]),w}var lt;var eu=I(()=>{ju();qu();Et();pu();lt=Lt(Qt(),1)});function ca(t){return{name:t.name,baseUrl:t.baseUrl,model:t.model,apiKey:t.apiKey??""}}function na(t){let h=ot(t);return{name:h.name,baseUrl:h.baseUrl,model:h.model,apiKey:h.apiKey??""}}function aa(t){let h={};for(let u of t.split(/\r?\n/)){let a=u.trim();if(!a)continue;let C=a.indexOf(":");if(C<=0)continue;let w=a.slice(0,C).trim(),f=a.slice(C+1).trim();if(w&&f)h[w]=f}return h}function ma(t){if(!t)return"";return Object.entries(t).map(([h,u])=>`${h}: ${u}`).join(`
49
- `)}function ya(t,h){let u={},a=t.awsRegion?.trim();if(a)u.awsRegion=a;let C=t.gcpProject?.trim();if(C)u.gcpProject=C;let w=t.gcpRegion?.trim();if(w)u.gcpRegion=w;let f=t.azureResource?.trim();if(f)u.azureResource=f;let A=aa(h);if(Object.keys(A).length>0)u.customHeaders=A;return Object.keys(u).length>0?u:void 0}function la(t,h){let u=h?" (active)":"",a=t.apiKey?"key set":"no key",C=t.provider==="anthropic"?"anthropic":"openai-compatible",w=tc(t.model),f=w.length<=3?w.join(", "):`${w[0]}, ${w[1]} + ${w.length-2} more`;return`${C} · ${t.baseUrl} · ${f} · ${a}${u}`}function ra(t,h){if(t.state==="unreachable")return`Could not reach Atomic Chat at ${wh(h)}. Start the Atomic Chat app first, or enter the endpoint manually.`;if(t.state==="no_models")return"Atomic Chat is running, but no models are loaded. Download and load a model inside the Atomic Chat app first, or enter details manually.";return""}function wa(t,h){if(t.state==="unreachable")return`Could not reach Ollama at ${wh(h)}. Start Ollama first, or enter the endpoint manually.`;if(t.state==="no_models")return"Ollama is running, but no installed models were found. Pull a chat model such as qwen2.5-coder:7b or llama3.1:8b first, or enter details manually.";if(t.state==="generation_failed"){let u=t.probeModel??"the selected model",a=t.detail?` Details: ${t.detail}.`:"";return`Ollama is reachable and models are installed, but a generation probe failed for ${u}.${a} Run "ollama run ${u}" once and retry, or enter details manually.`}return""}function fh(t,h){if(!h)return;return t.find((u)=>u.id===h)}function vu(t,h){return Boolean(t&&h&&t.id===h)}function ba(t,h){if(h){let u=t.find((a)=>a.id===h);if(u)return u}return t.find((u)=>u.provider==="openai"&&u.baseUrl===Zh&&!u.apiKey)}function Oa(t,h){if(h){let u=t.find((a)=>a.id===h);if(u)return u}return t.find((u)=>u.provider==="openai"&&u.baseUrl===pt&&!u.apiKey)}function za(t,h){return t.find((u)=>u.provider==="anthropic"&&u.baseUrl===h&&!u.apiKey)}function Ra({onBack:t,onConfigured:h}){let u=g.useCallback(async(C,w)=>{await h(C,w)},[h]);D("confirm:no",t,[t]);let a=$u({onAuthenticated:u});if(a.state==="error")return z(F,{flexDirection:"column",gap:1,children:[n(y,{color:"error",bold:!0,children:"Codex OAuth failed"}),n(y,{children:a.message}),n(y,{dimColor:!0,children:"Press Enter or Esc to go back."}),n(S,{options:[{value:"back",label:"Back",description:"Return to provider presets"}],onChange:t,onCancel:t,visibleOptionCount:1})]});return z(F,{flexDirection:"column",gap:1,children:[n(y,{color:"remember",bold:!0,children:"Codex OAuth"}),n(y,{children:"Sign in with your ChatGPT account in the browser. Claudin will store the resulting Codex credentials securely and switch this session to the new Codex login when setup completes."}),a.state==="starting"?n(y,{dimColor:!0,children:"Starting local callback and preparing your browser..."}):a.browserOpened===!1?z(yt,{children:[n(y,{color:"warning",children:"Browser did not open automatically. Visit this URL to continue:"}),n(y,{children:a.authUrl})]}):a.browserOpened===!0?z(yt,{children:[n(y,{dimColor:!0,children:"Browser opened. Finish the ChatGPT sign-in there and this setup will complete automatically."}),n(y,{children:a.authUrl})]}):n(y,{dimColor:!0,children:"Opening your browser..."}),n(y,{dimColor:!0,children:"Press Esc to cancel and go back."})]})}function Aa({onBack:t,onConfigured:h}){let u=g.useCallback(async(C,w)=>{await h(C,w)},[h]);D("confirm:no",t,[t]);let a=Hu({onAuthenticated:u});if(a.state==="error")return z(F,{flexDirection:"column",gap:1,children:[n(y,{color:"error",bold:!0,children:"xAI OAuth failed"}),n(y,{children:a.message}),n(y,{dimColor:!0,children:"Press Enter or Esc to go back."}),n(S,{options:[{value:"back",label:"Back",description:"Return to provider presets"}],onChange:t,onCancel:t,visibleOptionCount:1})]});return z(F,{flexDirection:"column",gap:1,children:[n(y,{color:"remember",bold:!0,children:"xAI / Grok OAuth"}),a.state==="starting"?n(y,{dimColor:!0,children:"Requesting a device code from xAI..."}):z(yt,{children:[z(y,{children:["Open this URL on any device:"," ",n(y,{bold:!0,children:a.verificationUri})]}),z(y,{children:["Enter code ",n(y,{bold:!0,children:a.userCode})]}),a.verificationUriComplete&&a.verificationUriComplete!==a.verificationUri?z(y,{dimColor:!0,children:["Or open this prefilled URL: ",a.verificationUriComplete]}):null,n(y,{dimColor:!0,children:"Waiting for you to authorize in the browser..."})]}),n(y,{dimColor:!0,children:"Press Esc to cancel and go back."})]})}function ga({onBack:t,onConfigured:h}){let u=g.useCallback(async(C,w)=>{await h(C,w)},[h]);D("confirm:no",t);let a=su({onAuthenticated:u});if(a.state==="error")return z(F,{flexDirection:"column",gap:1,children:[n(y,{color:"error",bold:!0,children:"Kimi Code OAuth failed"}),n(y,{children:a.message}),n(y,{dimColor:!0,children:"Press Enter or Esc to go back."}),n(S,{options:[{value:"back",label:"Back",description:"Return to Moonshot AI authentication choices"}],onChange:t,onCancel:t,visibleOptionCount:1})]});return z(F,{flexDirection:"column",gap:1,children:[n(y,{color:"remember",bold:!0,children:"Moonshot AI · Kimi Code"}),a.state==="starting"?n(y,{dimColor:!0,children:"Requesting a device code from Kimi..."}):z(yt,{children:[z(y,{children:["Open this URL on any device:"," ",n(y,{bold:!0,children:a.verificationUri})]}),z(y,{children:["Enter code ",n(y,{bold:!0,children:a.userCode})]}),a.verificationUriComplete&&a.verificationUriComplete!==a.verificationUri?z(y,{dimColor:!0,children:["Or open this prefilled URL: ",a.verificationUriComplete]}):null,n(y,{dimColor:!0,children:"Waiting for you to authorize in the browser..."})]}),n(y,{dimColor:!0,children:"Press Esc to cancel and go back."})]})}function Vm({mode:t,onDone:h}){let u=bc(),[a,C]=g.useState([]),[w,f]=g.useState(),[A,$]=g.useState(),[R,X]=g.useState(!1),[J,Q]=g.useState(),H=g.useRef(0),[V,O]=g.useState(t==="first-run"?"select-preset":"menu"),[wt,i]=g.useState(null),[Z,mt]=g.useState("openai"),[N,P]=g.useState(()=>na("ollama")),[Zt,dt]=g.useState({}),[dh,st]=g.useState(""),[Rc,Ac]=g.useState(0),[gc,Xc]=g.useState(0),[et,Yh]=g.useState(null),[bt,Ft]=g.useState(0),[Ot,p]=g.useState(0),[qc,s]=g.useState(0),[Gh,Y]=g.useState(),[zt,_]=g.useState(),[$c,fc]=g.useState(),[Sh,Yt]=g.useState(!1),[_t,kt]=g.useState(),[e,Gt]=g.useState({state:"idle"}),[v,St]=g.useState({state:"idle"}),[tt,vt]=g.useState({state:"idle"}),[Fc,_c]=g.useState(!0),[kc,E]=g.useState(!1),th=g.useRef(!1),[hh,uh]=g.useState(()=>Vt()),[Hh,Lc]=g.useState(()=>Oc());g.useEffect(()=>{queueMicrotask(()=>{let c=x(),m=B()?.id;C(c),f(m),$(xt()),Q(Fh()),X(Jt()),_c(!1)})},[]);let Rt=rt[Ot]??rt[0],Ht=Rt.key,Qc=N[Ht],ch=a.length>0,Kt=ch,Kh=g.useMemo(()=>[{value:"add",label:"Add provider",description:"Create a new provider profile"},...hh?[{value:"import-legacy",label:"Import from Claude Code",description:"Copy ~/.claude/ tokens, settings, skills, agents, plugins."}]:[],{value:"activate",label:"Set active provider (Global)",description:J?`Currently: ${a.find((c)=>c.id===J)?.name??"unknown"}`:"Default profile for projects without an override",disabled:!Kt},{value:"activate-project",label:"Set active provider (Project)",description:A?`Currently: ${a.find((c)=>c.id===A)?.name??"unknown"} (this project)`:"Override the global default for this project only",disabled:!Kt},...R?[{value:"clear-project-override",label:"Clear project provider override",description:A?"Stop overriding for this project; fall back to global":"Project override points to a missing profile; clear it"}]:[],{value:"edit",label:"Edit provider",description:"Update URL, model, or key",disabled:!ch},{value:"delete",label:"Delete provider",description:"Remove a provider profile",disabled:!Kt},...Sh?[{value:"logout-codex-oauth",label:"Log out Codex OAuth",description:"Clear securely stored Codex OAuth credentials"}]:[],{value:"done",label:"Done",description:"Return to chat"}],[Kt,ch,Sh,hh,J,A,a]),nh=g.useCallback(()=>{if(o()){H.current+=1,Yt(!1),kt(void 0);return}let c=++H.current;(async()=>{let m=await Lh();if(c!==H.current)return;Yt(Boolean(m?.apiKey||m?.accessToken||m?.refreshToken||m?.idToken)),kt(m?.profileId)})()},[]);g.useEffect(()=>{return nh(),()=>{H.current+=1}},[nh]),g.useEffect(()=>{if(V!=="select-ollama-model")return;let c=!1;return Gt({state:"loading"}),(async()=>{let m=await wc({baseUrl:N.baseUrl});if(m.state!=="ready"){if(!c)Gt({state:"unavailable",message:wa(m,N.baseUrl)});return}let l=rh(m.models,"balanced"),r=cu(m.models,"balanced");if(!c)Gt({state:"ready",defaultValue:r?.name??l[0]?.name,options:l.map((b)=>({label:b.name,value:b.name,description:b.summary}))})})(),()=>{c=!0}},[N.baseUrl,V]),g.useEffect(()=>{if(V!=="select-atomic-chat-model")return;let c=!1;return St({state:"loading"}),(async()=>{let m=await rc({baseUrl:N.baseUrl});if(m.state!=="ready"){if(!c)St({state:"unavailable",message:ra(m,N.baseUrl)});return}if(!c)St({state:"ready",defaultValue:m.models[0],options:m.models.map((l)=>({label:l,value:l}))})})(),()=>{c=!0}},[N.baseUrl,V]),g.useEffect(()=>{if(V!=="select-openai-model")return;let c=!1;return vt({state:"loading"}),(async()=>{let m=await Cc({baseUrl:N.baseUrl,apiKey:N.apiKey||void 0});if(c)return;if(!m||m.length===0){vt({state:"unavailable",message:"Couldn't list models from this provider. Enter the model id manually, or go back to check the base URL and API key."});return}let{options:l,defaultValue:r}=lc(m,N.model);vt({state:"ready",options:l,defaultValue:r})})(),()=>{c=!0}},[N.baseUrl,N.apiKey,V]);function K(){if(th.current)return;th.current=!0,queueMicrotask(()=>{let c=x();C(c),f(B()?.id),$(xt()),Q(Fh()),X(Jt()),nh(),th.current=!1})}function At(){return null}function ah(c){if(c.activationWarning)return`${c.prefix}. Saved for next startup. Warning: ${c.warnings.join("; ")}.`;if(c.warnings.length>0)return`${c.prefix}. Claudin switched to it for this session with warnings: ${c.warnings.join("; ")}.`;return`${c.prefix}. Claudin switched to it for this session.`}async function mh(c){if(c?.accessToken&&c.accountId)return null;let m=await Lh();if(!m)return"stored Codex OAuth credentials could not be loaded";if(!m.accountId)return"stored Codex OAuth credentials are missing a ChatGPT account id";return null}function Wh(){yc()}async function Nc(c){let m="provider";E(!0),Y("Activating provider...");try{await new Promise((ht)=>queueMicrotask(ht));let l=Jt(),r=nt(c);if(!r){_("Could not change active provider."),E(!1),L();return}let b=l?B()??r:r,q=$t(b.model)||Dt();if(!l)u((ht)=>({...ht,mainLoopModel:q,mainLoopModelForSession:null}));m=r.name;let k=At(),d=vu(r,_t),T=d?await mh():null;K();let U=l&&b.id!==r.id?` (project override still active — this project keeps using ${b.name}; use "Clear project provider override" to apply the new default here)`:"",W=d?ah({prefix:`Active provider: ${r.name}${U}`,activationWarning:T,warnings:[T,k?`could not clear startup provider override (${k})`:null].filter((ht)=>Boolean(ht))}):k?`Active provider: ${r.name}${U}. Warning: could not clear startup provider override (${k}).`:`Active provider: ${r.name}${U}`;Y(W),E(!1),h({action:"activated",activeProfileId:r.id,activeProviderName:r.name,activeProviderModel:q,message:`Provider switched to ${r.name} (${q})`}),L()}catch(l){K(),Y(void 0),E(!1);let r=l instanceof Error?l.message:String(l);_(`Could not finish activating ${m}: ${r}`),L()}}async function Jc(){E(!0),Y("Clearing project provider override...");try{await new Promise((m)=>queueMicrotask(m)),_h(null),K();let c=B();if(c){let m=$t(c.model)||Dt();ft(),u((l)=>({...l,mainLoopModel:m,mainLoopModelForSession:null})),Y(`Project override cleared. Using global default: ${c.name}.`),E(!1),h({action:"activated",activeProfileId:c.id,activeProviderName:c.name,activeProviderModel:m,message:`Project override cleared — using ${c.name} (${m})`}),L()}else Y("Project provider override cleared. No global default set."),E(!1),h({action:"saved",message:"Project provider override cleared. No global default set."}),L()}catch(c){K(),Y(void 0),E(!1);let m=c instanceof Error?c.message:String(c);_(`Could not clear project provider override: ${m}`),L()}}async function Vc(c){let m="provider";E(!0),Y("Setting provider for this project...");try{await new Promise((W)=>queueMicrotask(W));let l=xt(),r=_h(c);if(!r){_("Could not set project provider override."),E(!1),L();return}let b=$t(r.model)||Dt();if(l===r.id)ft();u((W)=>({...W,mainLoopModel:b,mainLoopModelForSession:null})),m=r.name;let q=At(),k=vu(r,_t),d=k?await mh():null;K();let T=`Active provider for this project: ${r.name}. Other projects keep the global default.`,U=k?ah({prefix:T,activationWarning:d,warnings:[d,q?`could not clear startup provider override (${q})`:null].filter((W)=>Boolean(W))}):q?`${T} Warning: could not clear startup provider override (${q}).`:T;Y(U),E(!1),h({action:"activated",activeProfileId:r.id,activeProviderName:r.name,activeProviderModel:b,message:`Provider switched to ${r.name} (${b}) for this project`}),L()}catch(l){K(),Y(void 0),E(!1);let r=l instanceof Error?l.message:String(l);_(`Could not finish setting ${m} for this project: ${r}`),L()}}function L(){fc("done"),O("menu")}function Wt(c){h({action:"cancelled",message:c})}function ih(c){let m=ot(c),l={name:m.name,baseUrl:m.baseUrl,model:m.model,apiKey:m.apiKey??""};if(i(null),mt(m.provider??"openai"),P(l),dt({}),st(""),Yh(c),p(0),Ft(0),s(l.name.length),_(void 0),c==="ollama"){Gt({state:"loading"}),O("select-ollama-model");return}if(c==="atomic-chat"){St({state:"loading"}),O("select-atomic-chat-model");return}if(c==="anthropic"){O("anthropic-auth-choice");return}if(c==="bedrock"||c==="vertex"||c==="foundry"){O("cloud-extras");return}O("form")}function Zc(c){let m=a.find((r)=>r.id===c);if(!m)return;let l=ca(m);i(c),mt(m.provider??"openai"),P(l),dt({awsRegion:m.extras?.awsRegion,gcpProject:m.extras?.gcpProject,gcpRegion:m.extras?.gcpRegion,azureResource:m.extras?.azureResource}),st(ma(m.extras?.customHeaders)),Yh(null),p(0),Ft(0),s(l.name.length),_(void 0),O("form")}function it(c=N){let m=ya(Zt,dh),l={provider:Z,name:c.name,baseUrl:c.baseUrl,model:c.model,apiKey:c.apiKey,extras:m},r=wt?ct(wt,l):ut(l,{makeActive:!0});if(!r){_("Could not save provider. Fill all required fields.");return}let b=B()?.id===r.id;if(b)ft(),u((U)=>({...U,mainLoopModel:$t(r.model),mainLoopModelForSession:null}));let q=b?At():null;K();let k=!wt&&Jt()&&!b,d=k?B()?.name??"override target":null,T=wt?`Updated provider: ${r.name}`:k?`Added provider: ${r.name} (now global default — project keeps using ${d}; use "Clear project provider override" to apply here)`:`Added provider: ${r.name} (now active)`;if(Y(q?`${T}. Warning: could not clear startup provider override (${q}).`:T),t==="first-run"){h({action:"saved",activeProfileId:r.id,message:`Provider configured: ${r.name}`});return}i(null),p(0),_(void 0),L()}function dc(){if(v.state==="loading"||v.state==="idle")return z(F,{flexDirection:"column",gap:1,children:[n(y,{color:"remember",bold:!0,children:"Checking Atomic Chat"}),n(y,{dimColor:!0,children:"Looking for loaded Atomic Chat models..."})]});if(v.state==="unavailable")return z(F,{flexDirection:"column",gap:1,children:[n(y,{color:"remember",bold:!0,children:"Atomic Chat setup"}),n(y,{dimColor:!0,children:v.message}),n(S,{options:[{value:"manual",label:"Enter manually",description:"Fill in the base URL and model yourself"},{value:"back",label:"Back",description:"Choose another provider preset"}],onChange:(c)=>{if(c==="manual"){p(0),s(N.name.length),O("form");return}O("select-preset")},onCancel:()=>O("select-preset"),visibleOptionCount:2})]});return z(F,{flexDirection:"column",gap:1,children:[n(y,{color:"remember",bold:!0,children:"Choose an Atomic Chat model"}),n(y,{dimColor:!0,children:"Pick one of the models loaded in Atomic Chat to save into a local provider profile."}),n(S,{options:v.options,defaultValue:v.defaultValue,defaultFocusValue:v.defaultValue,inlineDescriptions:!0,visibleOptionCount:Math.min(8,v.options.length),onChange:(c)=>{let m={...N,model:c};P(m),it(m)},onCancel:()=>O("select-preset")})]})}function Yc(){if(e.state==="loading"||e.state==="idle")return z(F,{flexDirection:"column",gap:1,children:[n(y,{color:"remember",bold:!0,children:"Checking Ollama"}),n(y,{dimColor:!0,children:"Looking for installed Ollama models..."})]});if(e.state==="unavailable")return z(F,{flexDirection:"column",gap:1,children:[n(y,{color:"remember",bold:!0,children:"Ollama setup"}),n(y,{dimColor:!0,children:e.message}),n(S,{options:[{value:"manual",label:"Enter manually",description:"Fill in the base URL and model yourself"},{value:"back",label:"Back",description:"Choose another provider preset"}],onChange:(c)=>{if(c==="manual"){p(0),s(N.name.length),O("form");return}O("select-preset")},onCancel:()=>O("select-preset"),visibleOptionCount:2})]});return z(F,{flexDirection:"column",gap:1,children:[n(y,{color:"remember",bold:!0,children:"Choose an Ollama model"}),n(y,{dimColor:!0,children:"Pick one of the installed Ollama models to save into a local provider profile."}),n(S,{options:e.options,defaultValue:e.defaultValue,defaultFocusValue:e.defaultValue,inlineDescriptions:!0,visibleOptionCount:Math.min(8,e.options.length),onChange:(c)=>{let m={...N,model:c};P(m),it(m)},onCancel:()=>O("select-preset")})]})}function gt(c){let m=rt.findIndex((l)=>l.key===c);p(m<0?0:m),s(N[c].length),_(void 0),O("form")}function Gc(){if(tt.state==="loading"||tt.state==="idle")return z(F,{flexDirection:"column",gap:1,children:[n(y,{color:"remember",bold:!0,children:"Fetching models"}),n(y,{dimColor:!0,children:"Looking for models on your OpenAI-compatible provider…"}),n(y,{dimColor:!0,children:"Press Esc to enter the model manually."})]});if(tt.state==="unavailable")return z(F,{flexDirection:"column",gap:1,children:[n(y,{color:"remember",bold:!0,children:"Choose a model"}),n(y,{dimColor:!0,children:tt.message}),n(S,{options:[{value:"manual",label:"Enter manually",description:"Type the model id yourself"},{value:"back",label:"Back",description:"Return to the API key step"}],onChange:(l)=>{if(l==="manual"){gt("model");return}gt("apiKey")},onCancel:()=>gt("apiKey"),visibleOptionCount:2})]});let c=[...tt.options,{value:$h,label:"Enter a model id manually",description:"Type an id the provider did not list"}],m=tt.defaultValue??$h;return z(F,{flexDirection:"column",gap:1,children:[n(y,{color:"remember",bold:!0,children:"Choose a model"}),n(y,{dimColor:!0,children:"Models from your OpenAI-compatible provider."}),n(S,{options:c,defaultValue:m,defaultFocusValue:m,inlineDescriptions:!0,visibleOptionCount:Math.min(8,c.length),onChange:(l)=>{if(l===$h){gt("model");return}let r={...N,model:l};P(r),Mh(r)},onCancel:()=>gt("apiKey")}),n(y,{dimColor:!0,children:"Enter to select · Esc to go back"})]})}function Mh(c){if(et==="anthropic"||et==="custom"){P(c),O("custom-headers");return}it(c)}function Sc(c){let m=c.trim();if(!Rt.optional&&m.length===0){_(`${Rt.label} is required.`);return}let l={...N,[Ht]:m};if(P(l),_(void 0),Ot<rt.length-1){let r=Ot+1,b=rt[r]?.key??"name";if(b==="model"&&!pn.has(Z)&&l.baseUrl.trim().length>0){O("select-openai-model");return}p(r),s(l[b].length);return}Mh(l)}function Hc(){if(_(void 0),Ot>0){let c=Ot-1,m=rt[c]?.key??"name";p(c),s(N[m].length);return}if(t==="first-run"){O("select-preset");return}L()}D("confirm:no",Hc,{context:"Settings",isActive:V==="form"}),D("confirm:no",()=>gt("model"),{context:"Settings",isActive:V==="select-openai-model"&&(tt.state==="loading"||tt.state==="idle")});function Kc(){if(_(void 0),bt>0){Ft(bt-1);return}O("select-preset")}D("confirm:no",Kc,{context:"Settings",isActive:V==="cloud-extras"}),D("confirm:no",()=>O("form"),{context:"Settings",isActive:V==="custom-headers"}),D("confirm:no",()=>O("select-preset"),{context:"Settings",isActive:V==="anthropic-auth-choice"||V==="anthropic-oauth"||V==="kimi-auth-choice"}),D("confirm:no",()=>O("kimi-auth-choice"),{context:"Settings",isActive:V==="kimi-oauth"});function Wc(){let c=!o(),m=[...hh?[{value:"import-legacy",label:"Import from Claude Code",description:"Reuse ~/.claude/ tokens, settings, theme, MCP, skills, agents, plugins."}]:[],{value:"dashscope-intl",label:"Alibaba Coding Plan",description:"Alibaba DashScope International endpoint"},{value:"dashscope-cn",label:"Alibaba Coding Plan (China)",description:"Alibaba DashScope China endpoint"},{value:"anthropic",label:"Anthropic",description:"Native Claude API (x-api-key auth)"},{value:"atomic-chat",label:"Atomic Chat",description:"Local Model Provider"},{value:"azure-openai",label:"Azure OpenAI",description:"Azure OpenAI endpoint (model=deployment name)"},{value:"foundry",label:"Azure AI Foundry",description:"Anthropic models hosted on Azure AI Foundry (resource-scoped)"},{value:"bedrock",label:"AWS Bedrock",description:"Anthropic models on AWS Bedrock (region-scoped, AWS creds)"},{value:"bankr",label:"Bankr",description:"Bankr LLM Gateway (OpenAI-compatible)"},{value:"cloudflare-workers-ai",label:"Cloudflare Workers AI",description:"Cloudflare Workers AI (OpenAI-compatible); set your account ID in the base URL"},{value:"cloudflare-ai-gateway",label:"Cloudflare AI Gateway",description:"Cloudflare AI Gateway unified endpoint; set your account ID in the base URL"},...c?[{value:"codex-oauth",label:"Codex OAuth",description:"Sign in with ChatGPT in your browser and store Codex credentials securely"},{value:"xai-oauth",label:"xAI / Grok (OAuth)",description:"Sign in with xAI in your browser and store Grok credentials securely"}]:[],{value:"github-onboard",label:"GitHub Copilot",description:"Sign in with GitHub in your browser to use Copilot models"},{value:"deepseek",label:"DeepSeek",description:"DeepSeek OpenAI-compatible endpoint"},{value:"gemini",label:"Google Gemini",description:"Gemini OpenAI-compatible endpoint"},{value:"vertex",label:"Google Vertex AI",description:"Anthropic models on Vertex AI (project + region, ADC)"},{value:"groq",label:"Groq",description:"Groq OpenAI-compatible endpoint"},{value:"lmstudio",label:"LM Studio",description:"Local LM Studio endpoint"},{value:"minimax",label:"MiniMax",description:"MiniMax API endpoint"},{value:"mistral",label:"Mistral",description:"Mistral OpenAI-compatible endpoint"},{value:"moonshotai",label:"Moonshot AI",description:"API key or Kimi Code OAuth sign-in"},{value:"nvidia-nim",label:"NVIDIA NIM",description:"NVIDIA NIM endpoint"},{value:"opencode-go",label:"OpenCode GO",description:"OpenCode GO OpenAI-compatible endpoint"},{value:"opencode-zen",label:"OpenCode Zen",description:"OpenCode Zen OpenAI-compatible endpoint"},{value:"ollama",label:"Ollama",description:"Local or remote Ollama endpoint"},{value:"openai",label:"OpenAI",description:"OpenAI API with API key"},{value:"openrouter",label:"OpenRouter",description:"OpenRouter OpenAI-compatible endpoint"},{value:"together",label:"Together AI",description:"Together chat/completions endpoint"},{value:"zai",label:"Z.AI (GLM Coding Plan)",description:"Z.AI GLM Coding Plan (OpenAI-compatible)"},{value:"custom",label:"Custom",description:"Any OpenAI-compatible provider"},...t==="first-run"?[{value:"skip",label:"Skip for now",description:"Continue with current defaults"}]:[]];return z(F,{flexDirection:"column",gap:1,children:[n(y,{color:"remember",bold:!0,children:t==="first-run"?"Set up provider":"Choose provider preset"}),n(y,{dimColor:!0,children:"Pick a preset, then confirm base URL, model, and API key."}),n(S,{options:m,onChange:(l)=>{if(l==="skip"){Wt("Provider setup skipped");return}if(l==="codex-oauth"){O("codex-oauth");return}if(l==="xai-oauth"){O("xai-oauth");return}if(l==="moonshotai"){O("kimi-auth-choice");return}if(l==="github-onboard"){O("github-onboard");return}if(l==="import-legacy"){(async()=>{let r=await Vh({force:!0});uh(Vt()),K();let b=jt(r);if(r.errors.length>0){_(b);return}let q=B();if(t==="first-run"&&q){h({action:"saved",activeProfileId:q.id,activeProviderName:q.name,activeProviderModel:q.model,message:b});return}if(Y(b),_(void 0),t==="manage")L()})();return}ih(l)},onCancel:()=>{if(t==="first-run"){Wt("Provider setup skipped");return}L()},visibleOptionCount:Math.min(13,m.length)})]})}function ic(){return z(F,{flexDirection:"column",gap:1,children:[n(y,{color:"remember",bold:!0,children:"Anthropic — choose authentication"}),n(y,{dimColor:!0,children:"Sign in with your Anthropic account in the browser, or paste an API key."}),n(S,{options:[{value:"oauth",label:"Sign in with web (OAuth)",description:"Open a browser, sign in to Claude, and store tokens in ~/.claudin/.credentials.json"},{value:"apiKey",label:"Use API key",description:"Paste an x-api-key value (sk-ant-…)"},{value:"back",label:"Back",description:"Choose a different provider"}],onChange:(c)=>{if(c==="oauth"){O("anthropic-oauth");return}if(c==="apiKey"){O("form");return}O("select-preset")},onCancel:()=>O("select-preset"),visibleOptionCount:3})]})}function Mc(){return z(F,{flexDirection:"column",gap:1,children:[n(y,{color:"remember",bold:!0,children:"Moonshot AI — choose authentication"}),n(y,{dimColor:!0,children:"Sign in with your Kimi Code subscription in the browser, or paste a Moonshot AI API key."}),n(S,{options:[{value:"oauth",label:"Sign in with web (OAuth)",description:"Open a browser, sign in to Kimi Code, and store tokens in ~/.claudin/.credentials.json"},{value:"apiKey",label:"Use API key",description:"Paste a Moonshot AI API key (sk-…)"},{value:"back",label:"Back",description:"Choose a different provider"}],onChange:(c)=>{if(c==="oauth"){O("kimi-oauth");return}if(c==="apiKey"){ih("moonshotai");return}O("select-preset")},onCancel:()=>O("select-preset"),visibleOptionCount:3})]})}function Tc(){let c=(xn(),Gn(In)).ConsoleOAuthFlow;return n(F,{flexDirection:"column",gap:1,children:n(c,{mode:"login",onDone:()=>{let m=ot("anthropic"),l={provider:"anthropic",name:m.name,baseUrl:m.baseUrl,model:m.model},r=za(x(),m.baseUrl),b=r?ct(r.id,l):ut(l,{makeActive:!0});if(!b){_("OAuth completed, but the Anthropic profile could not be saved."),O("select-preset");return}let q=r&&w!==b.id?nt(b.id):b;if(!q){_("OAuth completed, but the Anthropic profile could not be set as the startup provider."),O("select-preset");return}let k=`Anthropic OAuth configured: ${q.name}`;if(K(),t==="first-run"){h({action:"saved",activeProfileId:q.id,message:k});return}Y(k),_(void 0),L()}})})}function Uc(){let c=et;if(c!=="bedrock"&&c!=="vertex"&&c!=="foundry")return null;let m=Ca[c],l=m[bt]??m[0],r=Zt[l.key]??"";function b(q){let k=q.trim();if(k.length===0){_(`${l.label} is required.`);return}let d={...Zt,[l.key]:k};if(dt(d),_(void 0),bt<m.length-1){Ft(bt+1);return}Ft(0),O("form")}return z(F,{flexDirection:"column",gap:1,children:[n(y,{color:"remember",bold:!0,children:`${c==="bedrock"?"AWS Bedrock":c==="vertex"?"Google Vertex AI":"Azure AI Foundry"} setup`}),n(y,{dimColor:!0,children:l.helpText}),z(y,{dimColor:!0,children:["Step ",bt+1," of ",m.length,": ",l.label]}),z(F,{flexDirection:"row",gap:1,children:[n(y,{children:qt.pointer}),n(Xt,{value:r,onChange:(q)=>dt((k)=>({...k,[l.key]:q})),onSubmit:b,focus:!0,showCursor:!0,placeholder:`${l.placeholder}${qt.ellipsis}`,columns:80,cursorOffset:Rc,onChangeCursorOffset:Ac})]}),zt&&n(y,{color:"error",children:zt}),n(y,{dimColor:!0,children:"Press Enter to continue. Press Esc to go back."})]})}function Ec(){return z(F,{flexDirection:"column",gap:1,children:[n(y,{color:"remember",bold:!0,children:"Custom headers (optional)"}),z(y,{dimColor:!0,children:["Add HTTP headers sent on every request. One header per line as"," ",n(y,{children:"Header: Value"}),". Leave empty to skip."]}),z(F,{flexDirection:"row",gap:1,children:[n(y,{children:qt.pointer}),n(Xt,{value:dh,onChange:st,onSubmit:()=>it(N),focus:!0,showCursor:!0,placeholder:"X-Header: value",columns:80,multiline:!0,cursorOffset:gc,onChangeCursorOffset:Xc})]}),zt&&n(y,{color:"error",children:zt}),n(y,{dimColor:!0,children:"Press Enter on a blank line to save. Press Esc to go back."})]})}function Pc(){return z(F,{flexDirection:"column",gap:1,children:[n(y,{color:"remember",bold:!0,children:wt?"Edit provider profile":"Create provider profile"}),n(y,{dimColor:!0,children:Rt.helpText}),z(y,{dimColor:!0,children:["Provider type:"," ",Z==="anthropic"?"Anthropic native API":"OpenAI-compatible API"]}),z(y,{dimColor:!0,children:["Step ",Ot+1," of ",rt.length,": ",Rt.label]}),z(F,{flexDirection:"row",gap:1,children:[n(y,{children:qt.pointer}),n(Xt,{value:Qc,onChange:(c)=>P((m)=>({...m,[Ht]:c})),onSubmit:Sc,focus:!0,showCursor:!0,placeholder:`${Rt.placeholder}${qt.ellipsis}`,mask:Ht==="apiKey"?"*":void 0,columns:80,cursorOffset:qc,onChangeCursorOffset:s})]}),zt&&n(y,{color:"error",children:zt}),n(y,{dimColor:!0,children:"Press Enter to continue. Press Esc to go back."})]})}function Bc(){let c=a.length>0,m=c;return z(F,{flexDirection:"column",gap:1,children:[n(y,{color:"remember",bold:!0,children:"Provider manager"}),n(y,{dimColor:!0,children:"Active profile controls base URL, model, and API key used by this session."}),Gh&&n(y,{children:Gh}),n(F,{flexDirection:"column",children:a.length===0?n(y,{dimColor:!0,children:"No provider profiles configured yet."}):a.map((l)=>z(y,{dimColor:!0,children:["- ",l.name,": ",la(l,l.id===w)]},l.id))}),n(S,{options:Kh,onChange:(l)=>{switch(_(void 0),l){case"add":O("select-preset");break;case"import-legacy":{(async()=>{let r=await Vh({force:!0});if(uh(Vt()),K(),r.errors.length>0)_(jt(r));else Y(jt(r))})();break}case"activate":if(m)O("select-active");break;case"activate-project":if(m)O("select-active-project");break;case"clear-project-override":Jc();break;case"edit":if(c)O("select-edit");break;case"delete":if(m)O("select-delete");break;case"logout-codex-oauth":{let r=Qh();if(!r.success){_(r.warning??"Could not clear Codex OAuth credentials.");break}Yt(!1),kt(void 0);let b=fh(x(),_t),q=null;if(b){let k=kh(b.id);if(!k.removed){_("Codex OAuth credentials were cleared, but the Codex profile could not be removed."),K();break}Wh(),q=k.activeProfileId?At():null}K(),Y(q?`Codex OAuth logged out. Warning: could not clear startup provider override (${q}).`:"Codex OAuth logged out.");break}default:Wt("Provider manager closed");break}},onCancel:()=>Wt("Provider manager closed"),defaultFocusValue:$c,visibleOptionCount:Kh.length})]})}function Mt(c,m,l){let r=a.map((b)=>{let q=[];if(b.id===w)q.push("active");if(A&&b.id===A)q.push("this project");if(J&&b.id===J)q.push("global default");let k=q.length>0?` (${q.join(", ")})`:"";return{value:b.id,label:`${b.name}${k}`,description:`${b.provider==="anthropic"?"anthropic":"openai-compatible"} · ${b.baseUrl} · ${b.model}`}});if(r.length===0)return z(F,{flexDirection:"column",gap:1,children:[n(y,{color:"remember",bold:!0,children:c}),n(y,{dimColor:!0,children:m}),n(S,{options:[{value:"back",label:"Back",description:"Return to provider manager"}],onChange:()=>L(),onCancel:()=>L(),visibleOptionCount:1})]});return z(F,{flexDirection:"column",gap:1,children:[n(y,{color:"remember",bold:!0,children:c}),n(S,{options:r,onChange:l,onCancel:()=>L(),visibleOptionCount:Math.min(10,Math.max(2,r.length))})]})}let G;switch(V){case"select-preset":G=Wc();break;case"select-ollama-model":G=Yc();break;case"select-openai-model":G=Gc();break;case"select-atomic-chat-model":G=dc();break;case"codex-oauth":G=n(Ra,{onBack:()=>O("select-preset"),onConfigured:async(c,m)=>{let l={provider:"openai",name:sn,baseUrl:hc,model:en,apiKey:""},r=fh(x(),_t),b=r?ct(r.id,l):ut(l,{makeActive:!0});if(!b){_("Codex OAuth login finished, but the provider profile could not be saved."),L();return}let q=r&&w!==b.id?nt(b.id):b;if(!q){_("Codex OAuth login finished, but the provider could not be set as the startup provider."),L();return}m({profileId:b.id});let k=At(),d=await mh(c);Yt(!0),kt(b.id),K();let T=[d,k?`could not clear startup provider override (${k})`:null].filter((W)=>Boolean(W)),U=ah({prefix:"Codex OAuth configured",activationWarning:d,warnings:T});if(t==="first-run"){h({action:"saved",activeProfileId:q.id,message:U});return}Y(U),_(void 0),L()}});break;case"xai-oauth":G=n(Aa,{onBack:()=>O("select-preset"),onConfigured:async(c,m)=>{let l={provider:"openai",name:vn,baseUrl:pt,model:ta,apiKey:""},r=Oa(x(),Jh()?.profileId),b=r?ct(r.id,l):ut(l,{makeActive:!0});if(!b){_("xAI OAuth login finished, but the provider profile could not be saved."),L();return}let q=r&&w!==b.id?nt(b.id):b;if(!q){_("xAI OAuth login finished, but the provider could not be set as the startup provider."),L();return}try{m({profileId:b.id})}catch(d){_(d instanceof Error?d.message:String(d)),L();return}K();let k="xAI / Grok configured. Claudin switched to it for this session.";if(t==="first-run"){h({action:"saved",activeProfileId:q.id,message:k});return}Y(k),_(void 0),L()}});break;case"kimi-auth-choice":G=Mc();break;case"kimi-oauth":G=n(ga,{onBack:()=>O("kimi-auth-choice"),onConfigured:async(c,m)=>{let l={provider:"openai",name:ha,baseUrl:Zh,model:ua,apiKey:""},r=ba(x(),Nh()?.profileId),b=r?ct(r.id,l):ut(l,{makeActive:!0});if(!b){_("Kimi Code OAuth login finished, but the provider profile could not be saved."),L();return}let q=r&&w!==b.id?nt(b.id):b;if(!q){_("Kimi Code OAuth login finished, but the provider could not be set as the startup provider."),L();return}try{m({profileId:b.id})}catch(d){_(d instanceof Error?d.message:String(d)),L();return}K();let k="Kimi Code configured. Claudin switched to it for this session.";if(t==="first-run"){h({action:"saved",activeProfileId:q.id,message:k});return}Y(k),_(void 0),L()}});break;case"github-onboard":G=n(vh,{onDone:(c)=>{if(c)Y(c),_(void 0);K(),L()},onBack:()=>O("select-preset"),onChangeAPIKey:K});break;case"anthropic-auth-choice":G=ic();break;case"anthropic-oauth":G=Tc();break;case"cloud-extras":G=Uc();break;case"custom-headers":G=Ec();break;case"form":G=Pc();break;case"select-active":G=Mt("Set active provider (Global)","No providers available. Add one first.",(c)=>{Nc(c)});break;case"select-active-project":G=Mt("Set active provider (Project)","No providers available. Add one first.",(c)=>{Vc(c)});break;case"select-edit":G=Mt("Edit provider","No providers available. Add one first.",(c)=>{Zc(c)});break;case"select-delete":G=Mt("Delete provider","No providers available. Add one first.",(c)=>{let m=a.find((W)=>W.id===c),l=m?.provider==="openai"&&m?.extras?.githubToken!==void 0,r=fh(a,_t)?.id===c,b=Jh()?.profileId,q=m?.provider==="openai"&&m.baseUrl===pt&&!m.apiKey&&b===c,k=Nh()?.profileId,d=m?.provider==="openai"&&m.baseUrl===Zh&&!m.apiKey&&k===c,T=B()?.id===c,U=kh(c);if(!U.removed)_("Could not delete provider.");else{let W=[];if(r){let M=Qh();if(!M.success)W.push(M.warning??"could not clear Codex OAuth credentials");else kt(void 0);Wh()}if(l){let M=cc();if(!M.success)W.push(M.warning??"could not clear GitHub Copilot token")}if(q){let M=mc();if(!M.success)W.push(M.warning??"could not clear xAI OAuth credentials")}if(d){let M=ac();if(!M.success)W.push(M.warning??"could not clear Kimi Code OAuth credentials")}let ht=U.activeProfileId?At():null;if(ht)W.push(`could not clear startup provider override (${ht})`);if(K(),T){let M=B();if(M)ft(),u((yh)=>({...yh,mainLoopModel:$t(M.model),mainLoopModelForSession:null}));else ft(),u((yh)=>({...yh,mainLoopModel:null,mainLoopModelForSession:null}))}Y(W.length>0?`Provider deleted. Warning: ${W.join("; ")}.`:"Provider deleted")}L()});break;case"menu":default:G=Bc();break}return z(uc,{color:"permission",children:[n(zc,{enabled:Hh,onDismiss:(c)=>{uh(Vt()),Lc(!1),K();let m=B();if(c==="migrated"&&t==="first-run"&&m)h({action:"saved",activeProfileId:m.id,activeProviderName:m.name,activeProviderModel:m.model})}}),Hh?null:Fc?z(F,{flexDirection:"column",gap:1,children:[n(y,{color:"remember",bold:!0,children:"Loading providers..."}),n(y,{dimColor:!0,children:"Reading provider profiles from disk."})]}):kc?z(F,{flexDirection:"column",gap:1,children:[n(y,{color:"remember",bold:!0,children:"Activating provider..."}),n(y,{dimColor:!0,children:"Please wait while the provider is being configured."})]}):G]})}var g,rt,$h="\x00__manual__",pn,sn="Codex OAuth",en="codexplan",vn="xAI / Grok (OAuth)",ta="grok-4",ha="Moonshot AI",ua,Zh="https://api.kimi.com/coding/v1",Ca;var Xa=I(()=>{Sn();tu();Kn();Eh();Mn();Pn();Dn();Xu();Et();Hn();Wn();Un();Th();ph();En();nu();au();Bn();Tn();on();sh();fu();Ku();eu();Su();pu();Pu();jn();Tt();g=Lt(Qt(),1),rt=[{key:"name",label:"Provider name",placeholder:"e.g. Ollama Home, OpenAI Work",helpText:"A short label shown in /provider and startup setup."},{key:"baseUrl",label:"Base URL",placeholder:"e.g. http://localhost:11434/v1",helpText:"API base URL used for this provider profile."},{key:"apiKey",label:"API key",placeholder:"Leave empty if your provider does not require one",helpText:"Optional. Press Enter with empty value to skip.",optional:!0},{key:"model",label:"Default model",placeholder:"e.g. llama3.1:8b or glm-4.7; glm-4.7-flash",helpText:'Model name(s) to use. Separate multiple with ";" or ","; first is default.'}],pn=new Set(["anthropic","bedrock","vertex","foundry"]),ua=nc;Ca={bedrock:[{key:"awsRegion",label:"AWS region",placeholder:"e.g. us-east-1",helpText:"Region of your Bedrock-enabled AWS account. Credentials are picked up from the AWS SDK chain."}],vertex:[{key:"gcpProject",label:"GCP project ID",placeholder:"e.g. my-project-123456",helpText:"Google Cloud project where Vertex AI is enabled. Credentials are picked up from ADC."},{key:"gcpRegion",label:"GCP region",placeholder:"e.g. us-central1",helpText:"Vertex AI region for the model."}],foundry:[{key:"azureResource",label:"Azure resource",placeholder:"e.g. my-foundry-resource",helpText:"Name of your Azure AI Foundry resource. Credentials are picked up from DefaultAzureCredential."}]}});
50
- export{wh as Ac,au as Bc,aa as Cc,Vm as Dc,Xa as Ec};
@@ -1,4 +0,0 @@
1
- import{de as c,je as Eq}from"./cli-1.0.11-7a79h2zt.mjs";import{$o as s,HL as n,NL as e,OL as P,SL as jq,TL as O,UL as qq,WL as I,XL as Gq,ap as Tq,bM as Cq,dp as t,eM as b,fM as Lq,fp as Mq,iM as Hq,jM as Jq,jp as i,lL as v,lM as vq,lp as Rq,mL as m,mM as y,nM as Qq,oL as Oq,oM as Xq,pM as Yq,pp as A,qM as $q,rM as d,rp as D,rt as l,sp as Aq,st as wq,tp as h,uM as Dq,up as S,vp as Fq}from"./cli-1.0.11-vjjxby46.mjs";import{Fda as _q,Nca as V,Vca as Kq,oga as a,qda as F,sda as L,wga as Bq}from"./cli-1.0.11-8864t240.mjs";import{Kja as p,Oja as Wq}from"./cli-1.0.11-94m7sqz0.mjs";import{Dka as Uq,vka as o,yka as N}from"./cli-1.0.11-632mfg4h.mjs";import{Dma as f,wqa as xq}from"./cli-1.0.11-qt9hfn47.mjs";import{fsa as Zq}from"./cli-1.0.11-see5c6wp.mjs";import{dirname as Nq,join as u}from"path";function g(q){if(!k.includes(q))throw Error(`Invalid scope "${q}". Must be one of: ${k.join(", ")}`)}function JG(q){return k.includes(q)}function zq(q){return q==="project"||q==="local"?f():void 0}function QG(q){return F("projectSettings")?.enabledPlugins?.[q]===!0}function Vq(q){let H=q.includes("@"),G=["local","project","user"];for(let X of G){let J=F(D(X))?.enabledPlugins;if(!J)continue;for(let Y of Object.keys(J))if(H?Y===q:Y.startsWith(`${q}@`))return{pluginId:Y,scope:X}}return null}function bq(q,H){let{name:G,marketplace:X}=A(q);return H.find((J)=>{if(J.name===q||J.name===G)return!0;if(X&&J.source)return J.name===G&&J.source.includes(`@${X}`);return!1})}function yq(q){let{name:H}=A(q),G=O();if(G.plugins[q]?.length)return{pluginId:q,pluginName:H};let X=Object.keys(G.plugins).find((J)=>{let{name:Y}=A(J);return Y===H&&(G.plugins[J]?.length??0)>0});if(X)return{pluginId:X,pluginName:H};return null}function kq(q){let G=O().plugins[q];if(!G||G.length===0)return{scope:"user"};let X=f(),J=G.find((Z)=>Z.scope==="local"&&Z.projectPath===X);if(J)return{scope:J.scope,projectPath:J.projectPath};let Y=G.find((Z)=>Z.scope==="project"&&Z.projectPath===X);if(Y)return{scope:Y.scope,projectPath:Y.projectPath};let z=G.find((Z)=>Z.scope==="user");if(z)return{scope:z.scope};return{scope:G[0].scope,projectPath:G[0].projectPath}}async function XG(q,H="user"){g(H);let{name:G,marketplace:X}=A(q),J,Y,z;if(X){let $=await P(q);if($)J=$.entry,Y=X,z=$.marketplaceInstallLocation}else{let $=await n();for(let[B,K]of Object.entries($))try{let M=(await e(B)).plugins.find((R)=>R.name===G);if(M){J=M,Y=B,z=K.installLocation;break}}catch(x){a(o(x));continue}}if(!J||!Y){let $=X?`marketplace "${X}"`:"any configured marketplace";return{success:!1,message:`Plugin "${G}" not found in ${$}`}}let Z=J,W=`${Z.name}@${Y}`,Q=await Jq({pluginId:W,entry:Z,scope:H,marketplaceInstallLocation:z});if(!Q.ok)switch(Q.reason){case"local-source-no-location":return{success:!1,message:`Cannot install local plugin "${Q.pluginName}" without marketplace install location`};case"settings-write-failed":return{success:!1,message:`Failed to update settings: ${Q.message}`};case"resolution-failed":return{success:!1,message:Hq(Q.resolution)};case"blocked-by-policy":return{success:!1,message:`Plugin "${Q.pluginName}" is blocked by your organization's policy and cannot be installed`};case"dependency-blocked-by-policy":return{success:!1,message:`Plugin "${Q.pluginName}" depends on "${Q.blockedDependency}", which is blocked by your organization's policy`}}return{success:!0,message:`Successfully installed plugin: ${W} (scope: ${H})${Q.depNote}`,pluginId:W,pluginName:Z.name,scope:H}}async function YG(q,H="user",G=!0){g(H);let{enabled:X,disabled:J}=await d(),Y=[...X,...J],z=bq(q,Y),Z=D(H),W=F(Z),Q,$;if(z)Q=Object.keys(W?.enabledPlugins??{}).find((U)=>U===q||U===z.name||U.startsWith(`${z.name}@`))??(q.includes("@")?q:z.name),$=z.name;else{let U=yq(q);if(!U)return{success:!1,message:`Plugin "${q}" not found in installed plugins`};Q=U.pluginId,$=U.pluginName}let B=zq(H),x=O().plugins[Q],M=x?.find((U)=>U.scope===H&&U.projectPath===B);if(!M){let{scope:U}=kq(Q);if(U!==H&&x&&x.length>0){if(U==="project")return{success:!1,message:`Plugin "${q}" is enabled at project scope (.claudin/settings.json, shared with your team). To disable just for you: claudin plugin disable ${q} --scope local`};return{success:!1,message:`Plugin "${q}" is installed in ${U} scope, not ${H}. Use --scope ${U} to uninstall.`}}return{success:!1,message:`Plugin "${q}" is not installed in ${H} scope. Use --scope to specify the correct scope.`}}let R=M.installPath,_={...W?.enabledPlugins};_[Q]=void 0,L(Z,{enabledPlugins:_}),v(),qq(Q,H,B);let w=O().plugins[Q],j=!w||w.length===0;if(j&&R)await m(R);if(j){if(t(Q),G)await s(Q)}let C=h(Q,Y),E=S(C);return{success:!0,message:`Successfully uninstalled plugin: ${$} (scope: ${H})${E}`,pluginId:Q,pluginName:$,scope:H,reverseDependents:C.length>0?C:void 0}}async function r(q,H,G){let X=H?"enable":"disable";if(i(q)){let{error:_}=L("userSettings",{enabledPlugins:{...F("userSettings")?.enabledPlugins,[q]:H}});if(_)return{success:!1,message:`Failed to ${X} built-in plugin: ${_.message}`};v();let{name:T}=A(q);return{success:!0,message:`Successfully ${X}d built-in plugin: ${T}`,pluginId:q,pluginName:T,scope:"user"}}if(G)g(G);let J,Y,z=Vq(q);if(G)if(Y=G,z)J=z.pluginId;else if(q.includes("@"))J=q;else return{success:!1,message:`Plugin "${q}" not found in settings. Use plugin@marketplace format.`};else if(z)J=z.pluginId,Y=z.scope;else if(q.includes("@"))J=q,Y="user";else return{success:!1,message:`Plugin "${q}" not found in any editable settings scope. Use plugin@marketplace format.`};if(H&&l(J))return{success:!1,message:`Plugin "${J}" is blocked by your organization's policy and cannot be enabled`};let Z=D(Y),W=F(Z)?.enabledPlugins?.[J],Q={user:0,project:1,local:2},$=G&&z&&Q[G]>Q[z.scope];if(G&&W===void 0&&z&&z.scope!==G&&!$)return{success:!1,message:`Plugin "${q}" is installed at ${z.scope} scope, not ${G}. Use --scope ${z.scope} or omit --scope to auto-detect.`};let B=G&&!$?W===!0:c().has(J);if(H===B)return{success:!1,message:`Plugin "${q}" is already ${H?"enabled":"disabled"}${G?` at ${G} scope`:""}`};let K;if(!H){let{enabled:_,disabled:T}=await d(),w=h(J,[..._,...T]);if(w.length>0)K=w}let{error:x}=L(Z,{enabledPlugins:{...F(Z)?.enabledPlugins,[J]:H}});if(x)return{success:!1,message:`Failed to ${X} plugin: ${x.message}`};v();let{name:M}=A(J),R=S(K);return{success:!0,message:`Successfully ${X}d plugin: ${M} (scope: ${Y})${R}`,pluginId:J,pluginName:M,scope:Y,reverseDependents:K}}async function $G(q,H){return r(q,!0,H)}async function zG(q,H){return r(q,!1,H)}async function ZG(){let q=c();if(q.size===0)return{success:!0,message:"No enabled plugins to disable"};let H=[],G=[];for(let[X]of q){let J=await r(X,!1);if(J.success)H.push(X);else G.push(`${X}: ${J.message}`)}if(G.length>0)return{success:!1,message:`Disabled ${H.length} ${V(H.length,"plugin")}, ${G.length} failed:
2
- ${G.join(`
3
- `)}`};return{success:!0,message:`Disabled ${H.length} ${V(H.length,"plugin")}`}}async function xG(q,H){let{name:G,marketplace:X}=A(q),J=X?`${G}@${X}`:q,Y=await P(q);if(!Y)return{success:!1,message:`Plugin "${G}" not found`,pluginId:J,scope:H};let{entry:z,marketplaceInstallLocation:Z}=Y,Q=I().plugins[J];if(!Q||Q.length===0)return{success:!1,message:`Plugin "${G}" is not installed`,pluginId:J,scope:H};let $=zq(H),B=Q.find((K)=>K.scope===H&&K.projectPath===$);if(!B){let K=$?`${H} (${$})`:H;return{success:!1,message:`Plugin "${G}" is not installed at scope ${K}`,pluginId:J,scope:H}}return fq({pluginId:J,pluginName:G,entry:z,marketplaceInstallLocation:Z,installation:B,scope:H,projectPath:$})}async function fq({pluginId:q,pluginName:H,entry:G,marketplaceInstallLocation:X,installation:J,scope:Y,projectPath:z}){let Z=p(),W=J.version,Q,$,B=!1,K;if(typeof G.source!=="string"){let x=await Yq(G.source,{manifest:{name:G.name}});Q=x.path,B=!0,K=x.gitCommitSha,$=await b(q,G.source,x.manifest,x.path,G.version,x.gitCommitSha)}else{let x;try{x=await Z.stat(X)}catch(T){if(N(T))return{success:!1,message:`Marketplace directory not found at ${X}`,pluginId:q,scope:Y};throw T}let M=x.isDirectory()?X:Nq(X);Q=u(M,G.source);try{await Z.stat(Q)}catch(T){if(N(T))return{success:!1,message:`Plugin source not found at ${Q}`,pluginId:q,scope:Y};throw T}let R,_=u(Q,".claude-plugin","plugin.json");try{R=await $q(_,G.name,G.source)}catch{}$=await b(q,G.source,R,Q,G.version)}try{let x=y(q,$),M=Qq(q,$);if(J.version===$||J.installPath===x||J.installPath===M)return{success:!0,message:`${H} is already at the latest version (${$}).`,pluginId:q,newVersion:$,oldVersion:W,alreadyUpToDate:!0,scope:Y};x=await Xq(Q,q,$,G);let _=J.installPath;if(Gq(q,Y,z,x,$,K),_&&_!==x){let j=I();if(!Object.values(j.plugins).some((E)=>E.some((U)=>U.installPath===_)))await m(_)}let T=z?`${Y} (${z})`:Y;return{success:!0,message:`Plugin "${H}" updated from ${W||"unknown"} to ${$} for scope ${T}. Restart to apply changes.`,pluginId:q,newVersion:$,oldVersion:W,scope:Y}}finally{if(B&&Q!==y(q,$))await Z.rm(Q,{recursive:!0,force:!0})}}var k,HG;var hq=Zq(()=>{xq();Rq();Uq();Wq();Bq();Oq();Fq();Cq();jq();Tq();Aq();vq();Dq();Mq();wq();Eq();Lq();_q();Kq();k=["user","project","local"],HG=["user","project","local","managed"]});
4
- export{k as Sd,HG as Td,JG as Ud,QG as Vd,kq as Wd,XG as Xd,YG as Yd,$G as Zd,zG as _d,ZG as $d,xG as ae,hq as be};
@@ -1,5 +0,0 @@
1
- import{EF as s,ro as F,uF as y,vF as S,vo as o,yF as C}from"./cli-1.0.11-vjjxby46.mjs";import{$Y as r,_Y as D,aZ as z,bZ as j}from"./cli-1.0.11-7t17zc1z.mjs";import{M_ as R,N_ as l,P_ as b,Q_ as u}from"./cli-1.0.11-8864t240.mjs";import{$ja as g,Eja as O,Gja as c,Kja as L,Oja as d,Yja as N}from"./cli-1.0.11-94m7sqz0.mjs";import{Vqa as T,Wqa as I}from"./cli-1.0.11-bemvf7h4.mjs";import{fsa as _}from"./cli-1.0.11-see5c6wp.mjs";import{spawn as G,spawnSync as w}from"child_process";import{basename as k}from"path";function h(q){return!!b(q)}function V(q){let H=k(q.split(" ")[0]??"");return P.find((B)=>H.includes(B))}function p(q,H,B){if(!B)return[H];if(m.has(q))return["-g",`${H}:${B}`];if(q==="subl")return[`${H}:${B}`];return[H]}function Qq(q,H){let B=v();if(!B)return!1;let J=B.split(" "),X=J[0]??B,K=J.slice(1),Q=V(B);if(Q){let W=p(Q,q,H),Z={detached:!0,stdio:"ignore"},M;if(process.platform==="win32"){let U=W.map((E)=>`"${E}"`).join(" ");M=G(`${B} ${U}`,{...Z,shell:!0})}else M=G(X,[...K,...W],Z);return M.on("error",(U)=>N(`editor spawn failed: ${U}`,{level:"error"})),M.unref(),!0}let $=z.get(process.stdout);if(!$)return!1;let Y=H&&f.test(k(X));$.enterAlternateScreen();try{let W={stdio:"inherit"},Z;if(process.platform==="win32"){let M=Y?`+${H} `:"";Z=w(`${B} ${M}"${q}"`,{...W,shell:!0})}else{let M=[...K,...Y?[`+${H}`,q]:[q]];Z=w(X,M,W)}if(Z.error)return N(`editor spawn failed: ${Z.error}`,{level:"error"}),!1;return!0}finally{$.exitAlternateScreen()}}var P,f,m,v;var x=_(()=>{I();j();g();u();P=["code","cursor","windsurf","codium","subl","atom","gedit","notepad++","notepad"],f=/\b(vi|vim|nvim|nano|emacs|pico|micro|helix|hx)\b/,m=new Set(["code","cursor","windsurf","codium"]);v=T(()=>{if(process.env.VISUAL?.trim())return process.env.VISUAL.trim();if(process.env.EDITOR?.trim())return process.env.EDITOR.trim();if(process.platform==="win32")return"start /wait notepad";return["code","vi","nano"].find((H)=>h(H))})});function a(q){return V(q)!==void 0}function i(q){let H=L(),B=z.get(process.stdout);if(!B)throw Error("Ink instance not found - cannot pause rendering");let J=v();if(!J)return{content:null};try{H.statSync(q)}catch{return{content:null}}let X=!a(J);if(X)B.enterAlternateScreen();else B.pause(),B.suspendStdin();try{let K=Object.hasOwn(A,J)?A[J]:J;return R(`${K} "${q}"`,{stdio:"inherit"}),{content:H.readFileSync(q,{encoding:"utf-8"})}}catch(K){if(typeof K==="object"&&K!==null&&"status"in K&&typeof K.status==="number"){let Q=K.status;if(Q!==0)return{content:null,error:`${F(J)} exited with code ${Q}`}}return{content:null}}finally{if(X)B.exitAlternateScreen();else B.resumeStdin(),B.resume()}}function n(q,H,B){let J=q;for(let[X,K]of Object.entries(B))if(K.type==="text"){let Q=parseInt(X),$=K.content,Y=J.indexOf($);if(Y!==-1){let W=y($),Z=S(Q,W);J=J.slice(0,Y)+Z+J.slice(Y+$.length)}}return J}function Vq(q,H){let B=L(),J=D();try{let X=H?C(q,H):q;O(J,X,{encoding:"utf-8",flush:!0});let K=i(J);if(K.content===null)return K;let Q=K.content;if(Q.endsWith(`
2
- `)&&!Q.endsWith(`
3
-
4
- `))Q=Q.slice(0,-1);if(H)Q=n(Q,q,H);return{content:Q}}finally{try{B.unlinkSync(J)}catch{}}}var A;var t=_(()=>{s();j();x();l();d();o();c();r();A={code:"code -w",subl:"subl --wait"}});
5
- export{Qq as Eg,v as Fg,x as Gg,i as Hg,Vq as Ig,t as Jg};
@@ -1,2 +0,0 @@
1
- import{fsa as j}from"./cli-1.0.11-see5c6wp.mjs";var q,v,z;var w=j(()=>{q=["acceptEdits","bypassPermissions","default","dontAsk","plan"],v=[...q,"auto"],z=v});
2
- export{q as jha,v as kha,z as lha,w as mha};
@@ -1,2 +0,0 @@
1
- import{fsa as g}from"./cli-1.0.11-see5c6wp.mjs";import{lstat as c,readdir as Cq,realpath as Mq,stat as Kq}from"node:fs/promises";import{join as Nq,relative as Hq,resolve as l,sep as Yq}from"node:path";import{Readable as Oq}from"node:stream";function i(q,J={}){let X=J.entryType||J.type;if(X==="both")X=H.FILE_DIR_TYPE;if(X)J.type=X;if(!q)throw Error("readdirp: root argument is required. Usage: readdirp(root, options)");else if(typeof q!=="string")throw TypeError("readdirp: root argument must be a string. Usage: readdirp(root, options)");else if(X&&!o.includes(X))throw Error(`readdirp: Invalid type passed. Use one of ${o.join(", ")}`);return J.root=q,new u(J)}var H,_,h="READDIRP_RECURSIVE_ERROR",Iq,o,bq,Dq,Vq=(q)=>Iq.has(q.code),Lq,p=(q)=>!0,n=(q)=>{if(q===void 0)return p;if(typeof q==="function")return q;if(typeof q==="string"){let J=q.trim();return(X)=>X.basename===J}if(Array.isArray(q)){let J=q.map((X)=>X.trim());return(X)=>J.some((Q)=>X.basename===Q)}return p},u;var s=g(()=>{H={FILE_TYPE:"files",DIR_TYPE:"directories",FILE_DIR_TYPE:"files_directories",EVERYTHING_TYPE:"all"},_={root:".",fileFilter:(q)=>!0,directoryFilter:(q)=>!0,type:H.FILE_TYPE,lstat:!1,depth:2147483648,alwaysStat:!1,highWaterMark:4096};Object.freeze(_);Iq=new Set(["ENOENT","EPERM","EACCES","ELOOP",h]),o=[H.DIR_TYPE,H.EVERYTHING_TYPE,H.FILE_DIR_TYPE,H.FILE_TYPE],bq=new Set([H.DIR_TYPE,H.EVERYTHING_TYPE,H.FILE_DIR_TYPE]),Dq=new Set([H.EVERYTHING_TYPE,H.FILE_DIR_TYPE,H.FILE_TYPE]),Lq=process.platform==="win32";u=class u extends Oq{parents;reading;parent;_stat;_maxDepth;_wantsDir;_wantsFile;_wantsEverything;_root;_isDirent;_statsProp;_rdOptions;_fileFilter;_directoryFilter;constructor(q={}){super({objectMode:!0,autoDestroy:!0,highWaterMark:q.highWaterMark});let J={..._,...q},{root:X,type:Q}=J;this._fileFilter=n(J.fileFilter),this._directoryFilter=n(J.directoryFilter);let Z=J.lstat?c:Kq;if(Lq)this._stat=(z)=>Z(z,{bigint:!0});else this._stat=Z;this._maxDepth=J.depth!=null&&Number.isSafeInteger(J.depth)?J.depth:_.depth,this._wantsDir=Q?bq.has(Q):!1,this._wantsFile=Q?Dq.has(Q):!1,this._wantsEverything=Q===H.EVERYTHING_TYPE,this._root=l(X),this._isDirent=!J.alwaysStat,this._statsProp=this._isDirent?"dirent":"stats",this._rdOptions={encoding:"utf8",withFileTypes:this._isDirent},this.parents=[this._exploreDir(X,1)],this.reading=!1,this.parent=void 0}async _read(q){if(this.reading)return;this.reading=!0;try{while(!this.destroyed&&q>0){let J=this.parent,X=J&&J.files;if(X&&X.length>0){let{path:Q,depth:Z}=J,z=X.splice(0,q).map((G)=>this._formatEntry(G,Q)),$=await Promise.all(z);for(let G of $){if(!G)continue;if(this.destroyed)return;let U=await this._getEntryType(G);if(U==="directory"&&this._directoryFilter(G)){if(Z<=this._maxDepth)this.parents.push(this._exploreDir(G.fullPath,Z+1));if(this._wantsDir)this.push(G),q--}else if((U==="file"||this._includeAsFile(G))&&this._fileFilter(G)){if(this._wantsFile)this.push(G),q--}}}else{let Q=this.parents.pop();if(!Q){this.push(null);break}if(this.parent=await Q,this.destroyed)return}}}catch(J){this.destroy(J)}finally{this.reading=!1}}async _exploreDir(q,J){let X;try{X=await Cq(q,this._rdOptions)}catch(Q){this._onError(Q)}return{files:X,depth:J,path:q}}async _formatEntry(q,J){let X,Q=this._isDirent?q.name:q;try{let Z=l(Nq(J,Q));X={path:Hq(this._root,Z),fullPath:Z,basename:Q},X[this._statsProp]=this._isDirent?q:await this._stat(Z)}catch(Z){this._onError(Z);return}return X}_onError(q){if(Vq(q)&&!this.destroyed)this.emit("warn",q);else this.destroy(q)}async _getEntryType(q){if(!q&&this._statsProp in q)return"";let J=q[this._statsProp];if(J.isFile())return"file";if(J.isDirectory())return"directory";if(J&&J.isSymbolicLink()){let X=q.fullPath;try{let Q=await Mq(X),Z=await c(Q);if(Z.isFile())return"file";if(Z.isDirectory()){let z=Q.length;if(X.startsWith(Q)&&X.substr(z,1)===Yq){let $=Error(`Circular symlink detected: "${X}" points to "${Q}"`);return $.code=h,this._onError($)}return"directory"}}catch(Q){return this._onError(Q),""}}}_includeAsFile(q){let J=q&&q[this._statsProp];return J&&this._wantsEverything&&!J.isDirectory()}}});import{watch as Aq,unwatchFile as a,watchFile as Wq}from"node:fs";import{realpath as P,lstat as Fq,open as Rq,stat as e}from"node:fs/promises";import{type as Tq}from"node:os";import*as M from"node:path";function r(q,J,X,Q,Z){let z=($,G)=>{if(X(q),Z($,G,{watchedPath:q}),G&&q!==G)W(M.resolve(q,G),I,M.join(q,G))};try{return Aq(q,{persistent:J.persistent},z)}catch($){Q($);return}}class f{fsw;_boundHandleError;constructor(q){this.fsw=q,this._boundHandleError=(J)=>q._handleError(J)}_watchWithNodeFs(q,J){let X=this.fsw.options,Q=M.dirname(q),Z=M.basename(q);this.fsw._getWatchedDir(Q).add(Z);let $=M.resolve(q),G={persistent:X.persistent};if(!J)J=F;let U;if(X.usePolling){let x=X.interval!==X.binaryInterval;G.interval=x&&fq(Z)?X.binaryInterval:X.interval,U=dq(q,$,G,{listener:J,rawEmitter:this.fsw._emitRaw})}else U=mq(q,$,G,{listener:J,errHandler:this._boundHandleError,rawEmitter:this.fsw._emitRaw});return U}_handleFile(q,J,X){if(this.fsw.closed)return;let Q=M.dirname(q),Z=M.basename(q),z=this.fsw._getWatchedDir(Q),$=J;if(z.has(Z))return;let G=async(x,j)=>{if(!this.fsw._throttle(Sq,q,5))return;if(!j||j.mtimeMs===0)try{let k=await e(q);if(this.fsw.closed)return;let{atimeMs:K,mtimeMs:N}=k;if(!K||K<=N||N!==$.mtimeMs)this.fsw._emit(Y.CHANGE,q,k);if((gq||uq||Pq)&&$.ino!==k.ino){this.fsw._closeFile(x),$=k;let O=this._watchWithNodeFs(q,G);if(O)this.fsw._addPathCloser(x,O)}else $=k}catch(k){this.fsw._remove(Q,Z)}else if(z.has(Z)){let{atimeMs:k,mtimeMs:K}=j;if(!k||k<=K||K!==$.mtimeMs)this.fsw._emit(Y.CHANGE,q,j);$=j}},U=this._watchWithNodeFs(q,G);if(!(X&&this.fsw.options.ignoreInitial)&&this.fsw._isntIgnored(q)){if(!this.fsw._throttle(Y.ADD,q,0))return;this.fsw._emit(Y.ADD,q,J)}return U}async _handleSymlink(q,J,X,Q){if(this.fsw.closed)return;let Z=q.fullPath,z=this.fsw._getWatchedDir(J);if(!this.fsw.options.followSymlinks){this.fsw._incrReadyCount();let $;try{$=await P(X)}catch(G){return this.fsw._emitReady(),!0}if(this.fsw.closed)return;if(z.has(Q)){if(this.fsw._symlinkPaths.get(Z)!==$)this.fsw._symlinkPaths.set(Z,$),this.fsw._emit(Y.CHANGE,X,q.stats)}else z.add(Q),this.fsw._symlinkPaths.set(Z,$),this.fsw._emit(Y.ADD,X,q.stats);return this.fsw._emitReady(),!0}if(this.fsw._symlinkPaths.has(Z))return!0;this.fsw._symlinkPaths.set(Z,!0)}_handleRead(q,J,X,Q,Z,z,$){q=M.join(q,"");let G=Q?`${q}:${Q}`:q;if($=this.fsw._throttle("readdir",G,1000),!$)return;let U=this.fsw._getWatchedDir(X.path),x=new Set,j=this.fsw._readdirp(q,{fileFilter:(k)=>X.filterPath(k),directoryFilter:(k)=>X.filterDir(k)});if(!j)return;return j.on(_q,async(k)=>{if(this.fsw.closed){j=void 0;return}let K=k.path,N=M.join(q,K);if(x.add(K),k.stats.isSymbolicLink()&&await this._handleSymlink(k,q,N,K))return;if(this.fsw.closed){j=void 0;return}if(K===Q||!Q&&!U.has(K))this.fsw._incrReadyCount(),N=M.join(Z,M.relative(Z,N)),this._addToNodeFs(N,J,X,z+1)}).on(Y.ERROR,this._boundHandleError),new Promise((k,K)=>{if(!j)return K();j.once(w,()=>{if(this.fsw.closed){j=void 0;return}let N=$?$.clear():!1;if(k(void 0),U.getChildren().filter((O)=>{return O!==q&&!x.has(O)}).forEach((O)=>{this.fsw._remove(q,O)}),j=void 0,N)this._handleRead(q,!1,X,Q,Z,z,$)})})}async _handleDir(q,J,X,Q,Z,z,$){let G=this.fsw._getWatchedDir(M.dirname(q)),U=G.has(M.basename(q));if(!(X&&this.fsw.options.ignoreInitial)&&!Z&&!U)this.fsw._emit(Y.ADD_DIR,q,J);G.add(M.basename(q)),this.fsw._getWatchedDir(q);let x,j,k=this.fsw.options.depth;if((k==null||Q<=k)&&!this.fsw._symlinkPaths.has($)){if(!Z){if(await this._handleRead(q,X,z,Z,q,Q,x),this.fsw.closed)return}j=this._watchWithNodeFs(q,(K,N)=>{if(N&&N.mtimeMs===0)return;this._handleRead(K,!1,z,Z,q,Q,x)})}return j}async _addToNodeFs(q,J,X,Q,Z){let z=this.fsw._emitReady;if(this.fsw._isIgnored(q)||this.fsw.closed)return z(),!1;let $=this.fsw._getWatchHelpers(q);if(X)$.filterPath=(G)=>X.filterPath(G),$.filterDir=(G)=>X.filterDir(G);try{let G=await vq[$.statMethod]($.watchPath);if(this.fsw.closed)return;if(this.fsw._isIgnored($.watchPath,G))return z(),!1;let U=this.fsw.options.followSymlinks,x;if(G.isDirectory()){let j=M.resolve(q),k=U?await P(q):q;if(this.fsw.closed)return;if(x=await this._handleDir($.watchPath,G,J,Q,Z,$,k),this.fsw.closed)return;if(j!==k&&k!==void 0)this.fsw._symlinkPaths.set(j,k)}else if(G.isSymbolicLink()){let j=U?await P(q):q;if(this.fsw.closed)return;let k=M.dirname($.watchPath);if(this.fsw._getWatchedDir(k).add($.watchPath),this.fsw._emit(Y.ADD,$.watchPath,G),x=await this._handleDir(k,G,J,Q,q,$,j),this.fsw.closed)return;if(j!==void 0)this.fsw._symlinkPaths.set(M.resolve(q),j)}else x=this._handleFile($.watchPath,G,J);if(z(),x)this.fsw._addPathCloser(q,x);return!1}catch(G){if(this.fsw._handleError(G))return z(),q}}}var _q="data",w="end",t="close",F=()=>{},R,E,gq,uq,Pq,qq,C,Y,Sq="watch",vq,I="listeners",L="errHandlers",b="rawEmitters",wq,Eq,fq=(q)=>Eq.has(M.extname(q).slice(1).toLowerCase()),v=(q,J)=>{if(q instanceof Set)q.forEach(J);else J(q)},D=(q,J,X)=>{let Q=q[J];if(!(Q instanceof Set))q[J]=Q=new Set([Q]);Q.add(X)},yq=(q)=>(J)=>{let X=q[J];if(X instanceof Set)X.clear();else delete q[J]},V=(q,J,X)=>{let Q=q[J];if(Q instanceof Set)Q.delete(X);else if(Q===X)delete q[J]},Jq=(q)=>q instanceof Set?q.size===0:!q,A,W=(q,J,X,Q,Z)=>{let z=A.get(q);if(!z)return;v(z[J],($)=>{$(X,Q,Z)})},mq=(q,J,X,Q)=>{let{listener:Z,errHandler:z,rawEmitter:$}=Q,G=A.get(J),U;if(!X.persistent){if(U=r(q,X,Z,z,$),!U)return;return U.close.bind(U)}if(G)D(G,I,Z),D(G,L,z),D(G,b,$);else{if(U=r(q,X,W.bind(null,J,I),z,W.bind(null,J,b)),!U)return;U.on(Y.ERROR,async(x)=>{let j=W.bind(null,J,L);if(G)G.watcherUnusable=!0;if(E&&x.code==="EPERM")try{await(await Rq(q,"r")).close(),j(x)}catch(k){}else j(x)}),G={listeners:Z,errHandlers:z,rawEmitters:$,watcher:U},A.set(J,G)}return()=>{if(V(G,I,Z),V(G,L,z),V(G,b,$),Jq(G.listeners))G.watcher.close(),A.delete(J),wq.forEach(yq(G)),G.watcher=void 0,Object.freeze(G)}},S,dq=(q,J,X,Q)=>{let{listener:Z,rawEmitter:z}=Q,$=S.get(J),G=$&&$.options;if(G&&(G.persistent<X.persistent||G.interval>X.interval))a(J),$=void 0;if($)D($,I,Z),D($,b,z);else $={listeners:Z,rawEmitters:z,options:X,watcher:Wq(J,X,(U,x)=>{v($.rawEmitters,(k)=>{k(Y.CHANGE,J,{curr:U,prev:x})});let j=U.mtimeMs;if(U.size!==x.size||j>x.mtimeMs||j===0)v($.listeners,(k)=>k(q,U))})},S.set(J,$);return()=>{if(V($,I,Z),V($,b,z),Jq($.listeners))S.delete(J),a(J),$.options=$.watcher=void 0,Object.freeze($)}};var Qq=g(()=>{R=process.platform,E=R==="win32",gq=R==="darwin",uq=R==="linux",Pq=R==="freebsd",qq=Tq()==="OS400",C={ALL:"all",READY:"ready",ADD:"add",CHANGE:"change",ADD_DIR:"addDir",UNLINK:"unlink",UNLINK_DIR:"unlinkDir",RAW:"raw",ERROR:"error"},Y=C,vq={lstat:Fq,stat:e},wq=[I,L,b],Eq=new Set(["3dm","3ds","3g2","3gp","7z","a","aac","adp","afdesign","afphoto","afpub","ai","aif","aiff","alz","ape","apk","appimage","ar","arj","asf","au","avi","bak","baml","bh","bin","bk","bmp","btif","bz2","bzip2","cab","caf","cgm","class","cmx","cpio","cr2","cur","dat","dcm","deb","dex","djvu","dll","dmg","dng","doc","docm","docx","dot","dotm","dra","DS_Store","dsk","dts","dtshd","dvb","dwg","dxf","ecelp4800","ecelp7470","ecelp9600","egg","eol","eot","epub","exe","f4v","fbs","fh","fla","flac","flatpak","fli","flv","fpx","fst","fvt","g3","gh","gif","graffle","gz","gzip","h261","h263","h264","icns","ico","ief","img","ipa","iso","jar","jpeg","jpg","jpgv","jpm","jxr","key","ktx","lha","lib","lvp","lz","lzh","lzma","lzo","m3u","m4a","m4v","mar","mdi","mht","mid","midi","mj2","mka","mkv","mmr","mng","mobi","mov","movie","mp3","mp4","mp4a","mpeg","mpg","mpga","mxu","nef","npx","numbers","nupkg","o","odp","ods","odt","oga","ogg","ogv","otf","ott","pages","pbm","pcx","pdb","pdf","pea","pgm","pic","png","pnm","pot","potm","potx","ppa","ppam","ppm","pps","ppsm","ppsx","ppt","pptm","pptx","psd","pya","pyc","pyo","pyv","qt","rar","ras","raw","resources","rgb","rip","rlc","rmf","rmvb","rpm","rtf","rz","s3m","s7z","scpt","sgi","shar","snap","sil","sketch","slk","smv","snk","so","stl","suo","sub","swf","tar","tbz","tbz2","tga","tgz","thmx","tif","tiff","tlz","ttc","ttf","txz","udf","uvh","uvi","uvm","uvp","uvs","uvu","viv","vob","war","wav","wax","wbmp","wdp","weba","webm","webp","whl","wim","wm","wma","wmv","wmx","woff","woff2","wrm","wvx","xbm","xif","xla","xlam","xls","xlsb","xlsm","xlsx","xlt","xltm","xltx","xm","xmind","xpi","xpm","xwd","xz","z","zip","zipx"]),A=new Map;S=new Map});import{EventEmitter as cq}from"node:events";import{stat as lq,Stats as YJ}from"node:fs";import{readdir as oq,stat as pq}from"node:fs/promises";import*as B from"node:path";function T(q){return Array.isArray(q)?q:[q]}function eq(q){if(typeof q==="function")return q;if(typeof q==="string")return(J)=>q===J;if(q instanceof RegExp)return(J)=>q.test(J);if(typeof q==="object"&&q!==null)return(J)=>{if(q.path===J)return!0;if(q.recursive){let X=B.relative(q.path,J);if(!X)return!1;return!X.startsWith("..")&&!B.isAbsolute(X)}return!1};return()=>!1}function tq(q){if(typeof q!=="string")throw Error("string expected");q=B.normalize(q),q=q.replace(/\\/g,"/");let J=!1;if(q.startsWith("//"))J=!0;if(q=q.replace(Uq,"/"),J)q="/"+q;return q}function Xq(q,J,X){let Q=tq(J);for(let Z=0;Z<q.length;Z++){let z=q[Z];if(z(Q,X))return!0}return!1}function qJ(q,J){if(q==null)throw TypeError("anymatch: specify first argument");let Q=T(q).map((Z)=>eq(Z));if(J==null)return(Z,z)=>{return Xq(Q,Z,z)};return Xq(Q,J)}class kq{path;_removeWatcher;items;constructor(q,J){this.path=q,this._removeWatcher=J,this.items=new Set}add(q){let{items:J}=this;if(!J)return;if(q!==zq&&q!==hq)J.add(q)}async remove(q){let{items:J}=this;if(!J)return;if(J.delete(q),J.size>0)return;let X=this.path;try{await oq(X)}catch(Q){if(this._removeWatcher)this._removeWatcher(B.dirname(X),B.basename(X))}}has(q){let{items:J}=this;if(!J)return;return J.has(q)}getChildren(){let{items:q}=this;if(!q)return[];return[...q.values()]}dispose(){this.items.clear(),this.path="",this._removeWatcher=F,this.items=QJ,Object.freeze(this)}}class Bq{fsw;path;watchPath;fullWatchPath;dirParts;followSymlinks;statMethod;constructor(q,J,X){this.fsw=X;let Q=q;this.path=q=q.replace(rq,""),this.watchPath=Q,this.fullWatchPath=B.resolve(Q),this.dirParts=[],this.dirParts.forEach((Z)=>{if(Z.length>1)Z.pop()}),this.followSymlinks=J,this.statMethod=J?XJ:ZJ}entryPath(q){return B.join(this.watchPath,B.relative(this.watchPath,q.fullPath))}filterPath(q){let{stats:J}=q;if(J&&J.isSymbolicLink())return this.filterDir(q);let X=this.entryPath(q);return this.fsw._isntIgnored(X,J)&&this.fsw._hasReadPermissions(J)}filterDir(q){return this.fsw._isntIgnored(this.entryPath(q),q.stats)}}function $J(q,J={}){let X=new d(J);return X.add(q),X}var y="/",nq="//",zq=".",hq="..",iq="string",sq,Uq,aq,rq,m=(q)=>typeof q==="object"&&q!==null&&!(q instanceof RegExp),Zq=(q)=>{let J=T(q).flat();if(!J.every((X)=>typeof X===iq))throw TypeError(`Non-string provided as watch path: ${J}`);return J.map(xq)},$q=(q)=>{let J=q.replace(sq,y),X=!1;if(J.startsWith(nq))X=!0;if(J=J.replace(Uq,y),X)J=y+J;return J},xq=(q)=>$q(B.normalize($q(q))),Gq=(q="")=>(J)=>{if(typeof J==="string")return xq(B.isAbsolute(J)?J:B.join(q,J));else return J},JJ=(q,J)=>{if(B.isAbsolute(q))return q;return B.join(J,q)},QJ,XJ="stat",ZJ="lstat",d,DJ;var GJ=g(()=>{s();Qq();/*! chokidar - MIT License (c) 2012 Paul Miller (paulmillr.com) */sq=/\\/g,Uq=/\/\//g,aq=/\..*\.(sw[px])$|~$|\.subl.*\.tmp/,rq=/^\.[/\\]/;QJ=Object.freeze(new Set);d=class d extends cq{closed;options;_closers;_ignoredPaths;_throttled;_streams;_symlinkPaths;_watched;_pendingWrites;_pendingUnlinks;_readyCount;_emitReady;_closePromise;_userIgnored;_readyEmitted;_emitRaw;_boundRemove;_nodeFsHandler;constructor(q={}){super();this.closed=!1,this._closers=new Map,this._ignoredPaths=new Set,this._throttled=new Map,this._streams=new Set,this._symlinkPaths=new Map,this._watched=new Map,this._pendingWrites=new Map,this._pendingUnlinks=new Map,this._readyCount=0,this._readyEmitted=!1;let J=q.awaitWriteFinish,X={stabilityThreshold:2000,pollInterval:100},Q={persistent:!0,ignoreInitial:!1,ignorePermissionErrors:!1,interval:100,binaryInterval:300,followSymlinks:!0,usePolling:!1,atomic:!0,...q,ignored:q.ignored?T(q.ignored):T([]),awaitWriteFinish:J===!0?X:typeof J==="object"?{...X,...J}:!1};if(qq)Q.usePolling=!0;if(Q.atomic===void 0)Q.atomic=!Q.usePolling;let Z=process.env.CHOKIDAR_USEPOLLING;if(Z!==void 0){let G=Z.toLowerCase();if(G==="false"||G==="0")Q.usePolling=!1;else if(G==="true"||G==="1")Q.usePolling=!0;else Q.usePolling=!!G}let z=process.env.CHOKIDAR_INTERVAL;if(z)Q.interval=Number.parseInt(z,10);let $=0;this._emitReady=()=>{if($++,$>=this._readyCount)this._emitReady=F,this._readyEmitted=!0,process.nextTick(()=>this.emit(C.READY))},this._emitRaw=(...G)=>this.emit(C.RAW,...G),this._boundRemove=this._remove.bind(this),this.options=Q,this._nodeFsHandler=new f(this),Object.freeze(Q)}_addIgnoredPath(q){if(m(q)){for(let J of this._ignoredPaths)if(m(J)&&J.path===q.path&&J.recursive===q.recursive)return}this._ignoredPaths.add(q)}_removeIgnoredPath(q){if(this._ignoredPaths.delete(q),typeof q==="string"){for(let J of this._ignoredPaths)if(m(J)&&J.path===q)this._ignoredPaths.delete(J)}}add(q,J,X){let{cwd:Q}=this.options;this.closed=!1,this._closePromise=void 0;let Z=Zq(q);if(Q)Z=Z.map((z)=>{return JJ(z,Q)});if(Z.forEach((z)=>{this._removeIgnoredPath(z)}),this._userIgnored=void 0,!this._readyCount)this._readyCount=0;return this._readyCount+=Z.length,Promise.all(Z.map(async(z)=>{let $=await this._nodeFsHandler._addToNodeFs(z,!X,void 0,0,J);if($)this._emitReady();return $})).then((z)=>{if(this.closed)return;z.forEach(($)=>{if($)this.add(B.dirname($),B.basename(J||$))})}),this}unwatch(q){if(this.closed)return this;let J=Zq(q),{cwd:X}=this.options;return J.forEach((Q)=>{if(!B.isAbsolute(Q)&&!this._closers.has(Q)){if(X)Q=B.join(X,Q);Q=B.resolve(Q)}if(this._closePath(Q),this._addIgnoredPath(Q),this._watched.has(Q))this._addIgnoredPath({path:Q,recursive:!0});this._userIgnored=void 0}),this}close(){if(this._closePromise)return this._closePromise;this.closed=!0,this.removeAllListeners();let q=[];return this._closers.forEach((J)=>J.forEach((X)=>{let Q=X();if(Q instanceof Promise)q.push(Q)})),this._streams.forEach((J)=>J.destroy()),this._userIgnored=void 0,this._readyCount=0,this._readyEmitted=!1,this._watched.forEach((J)=>J.dispose()),this._closers.clear(),this._watched.clear(),this._streams.clear(),this._symlinkPaths.clear(),this._throttled.clear(),this._closePromise=q.length?Promise.all(q).then(()=>{return}):Promise.resolve(),this._closePromise}getWatched(){let q={};return this._watched.forEach((J,X)=>{let Z=(this.options.cwd?B.relative(this.options.cwd,X):X)||zq;q[Z]=J.getChildren().sort()}),q}emitWithAll(q,J){if(this.emit(q,...J),q!==C.ERROR)this.emit(C.ALL,q,...J)}async _emit(q,J,X){if(this.closed)return;let Q=this.options;if(E)J=B.normalize(J);if(Q.cwd)J=B.relative(Q.cwd,J);let Z=[J];if(X!=null)Z.push(X);let z=Q.awaitWriteFinish,$;if(z&&($=this._pendingWrites.get(J)))return $.lastChange=new Date,this;if(Q.atomic){if(q===C.UNLINK)return this._pendingUnlinks.set(J,[q,...Z]),setTimeout(()=>{this._pendingUnlinks.forEach((G,U)=>{this.emit(...G),this.emit(C.ALL,...G),this._pendingUnlinks.delete(U)})},typeof Q.atomic==="number"?Q.atomic:100),this;if(q===C.ADD&&this._pendingUnlinks.has(J))q=C.CHANGE,this._pendingUnlinks.delete(J)}if(z&&(q===C.ADD||q===C.CHANGE)&&this._readyEmitted){let G=(U,x)=>{if(U)q=C.ERROR,Z[0]=U,this.emitWithAll(q,Z);else if(x){if(Z.length>1)Z[1]=x;else Z.push(x);this.emitWithAll(q,Z)}};return this._awaitWriteFinish(J,z.stabilityThreshold,q,G),this}if(q===C.CHANGE){if(!this._throttle(C.CHANGE,J,50))return this}if(Q.alwaysStat&&X===void 0&&(q===C.ADD||q===C.ADD_DIR||q===C.CHANGE)){let G=Q.cwd?B.join(Q.cwd,J):J,U;try{U=await pq(G)}catch(x){}if(!U||this.closed)return;Z.push(U)}return this.emitWithAll(q,Z),this}_handleError(q){let J=q&&q.code;if(q&&J!=="ENOENT"&&J!=="ENOTDIR"&&(!this.options.ignorePermissionErrors||J!=="EPERM"&&J!=="EACCES"))this.emit(C.ERROR,q);return q||this.closed}_throttle(q,J,X){if(!this._throttled.has(q))this._throttled.set(q,new Map);let Q=this._throttled.get(q);if(!Q)throw Error("invalid throttle");let Z=Q.get(J);if(Z)return Z.count++,!1;let z,$=()=>{let U=Q.get(J),x=U?U.count:0;if(Q.delete(J),clearTimeout(z),U)clearTimeout(U.timeoutObject);return x};z=setTimeout($,X);let G={timeoutObject:z,clear:$,count:0};return Q.set(J,G),G}_incrReadyCount(){return this._readyCount++}_awaitWriteFinish(q,J,X,Q){let Z=this.options.awaitWriteFinish;if(typeof Z!=="object")return;let z=Z.pollInterval,$,G=q;if(this.options.cwd&&!B.isAbsolute(q))G=B.join(this.options.cwd,q);let U=new Date,x=this._pendingWrites;function j(k){lq(G,(K,N)=>{if(K||!x.has(q)){if(K&&K.code!=="ENOENT")Q(K);return}let O=Number(new Date);if(k&&N.size!==k.size)x.get(q).lastChange=O;let jq=x.get(q);if(O-jq.lastChange>=J)x.delete(q),Q(void 0,N);else $=setTimeout(j,z,N)})}if(!x.has(q))x.set(q,{lastChange:U,cancelWait:()=>{return x.delete(q),clearTimeout($),X}}),$=setTimeout(j,z)}_isIgnored(q,J){if(this.options.atomic&&aq.test(q))return!0;if(!this._userIgnored){let{cwd:X}=this.options,Z=(this.options.ignored||[]).map(Gq(X)),$=[...[...this._ignoredPaths].map(Gq(X)),...Z];this._userIgnored=qJ($,void 0)}return this._userIgnored(q,J)}_isntIgnored(q,J){return!this._isIgnored(q,J)}_getWatchHelpers(q){return new Bq(q,this.options.followSymlinks,this)}_getWatchedDir(q){let J=B.resolve(q);if(!this._watched.has(J))this._watched.set(J,new kq(J,this._boundRemove));return this._watched.get(J)}_hasReadPermissions(q){if(this.options.ignorePermissionErrors)return!0;return Boolean(Number(q.mode)&256)}_remove(q,J,X){let Q=B.join(q,J),Z=B.resolve(Q);if(X=X!=null?X:this._watched.has(Q)||this._watched.has(Z),!this._throttle("remove",Q,100))return;if(!X&&this._watched.size===1)this.add(q,J,!0);this._getWatchedDir(Q).getChildren().forEach((k)=>this._remove(Q,k));let G=this._getWatchedDir(q),U=G.has(J);if(G.remove(J),this._symlinkPaths.has(Z))this._symlinkPaths.delete(Z);let x=Q;if(this.options.cwd)x=B.relative(this.options.cwd,Q);if(this.options.awaitWriteFinish&&this._pendingWrites.has(x)){if(this._pendingWrites.get(x).cancelWait()===C.ADD)return}this._watched.delete(Q),this._watched.delete(Z);let j=X?C.UNLINK_DIR:C.UNLINK;if(U&&!this._isIgnored(Q))this._emit(j,Q);this._closePath(Q)}_closePath(q){this._closeFile(q);let J=B.dirname(q);this._getWatchedDir(J).remove(B.basename(q))}_closeFile(q){let J=this._closers.get(q);if(!J)return;J.forEach((X)=>X()),this._closers.delete(q)}_addPathCloser(q,J){if(!J)return;let X=this._closers.get(q);if(!X)X=[],this._closers.set(q,X);X.push(J)}_readdirp(q,J){if(this.closed)return;let X={type:C.ALL,alwaysStat:!0,lstat:!0,...J,depth:0},Q=i(q,X);return this._streams.add(Q),Q.once(t,()=>{Q=void 0}),Q.once(w,()=>{if(Q)this._streams.delete(Q),Q=void 0}),Q}};DJ={watch:$J,FSWatcher:d}});
2
- export{Bq as VV,d as WV,$J as XV,DJ as YV,GJ as ZV};